@@ -85,7 +85,7 @@ function formatScopesForRemote(scopes) {
85
85
}
86
86
87
87
// @ts -expect-error TS(7006) FIXME: Parameter 'name' implicitly has an 'any' type.
88
- function verifyRequiredFieldsAreInConfig ( name , description , scopes , integrationLevel ) {
88
+ function verifyRequiredFieldsAreInConfig ( name , description , scopes ) {
89
89
const missingFields = [ ]
90
90
91
91
if ( ! name ) {
@@ -97,9 +97,6 @@ function verifyRequiredFieldsAreInConfig(name, description, scopes, integrationL
97
97
if ( ! scopes ) {
98
98
missingFields . push ( 'scopes' )
99
99
}
100
- if ( ! integrationLevel ) {
101
- missingFields . push ( 'integrationLevel' )
102
- }
103
100
if ( missingFields . length !== 0 ) {
104
101
log (
105
102
chalk . yellow (
@@ -120,7 +117,7 @@ function verifyRequiredFieldsAreInConfig(name, description, scopes, integrationL
120
117
121
118
// @ts -expect-error TS(7006) FIXME: Parameter 'workingDir' implicitly has an 'any' typ... Remove this comment to see the full error message
122
119
export async function registerIntegration ( workingDir , siteId , accountId , localIntegrationConfig , token ) {
123
- const { description, integrationLevel , name, scopes, slug } = localIntegrationConfig
120
+ const { description, name, scopes, slug } = localIntegrationConfig
124
121
log ( chalk . yellow ( `An integration associated with the site ID ${ siteId } is not registered.` ) )
125
122
const registerPrompt = await inquirer . prompt ( [
126
123
{
@@ -145,7 +142,7 @@ export async function registerIntegration(workingDir, siteId, accountId, localIn
145
142
exit ( 1 )
146
143
}
147
144
148
- if ( ! verifyRequiredFieldsAreInConfig ( name , description , scopes , integrationLevel ) ) {
145
+ if ( ! verifyRequiredFieldsAreInConfig ( name , description , scopes ) ) {
149
146
exit ( 1 )
150
147
}
151
148
@@ -162,7 +159,6 @@ export async function registerIntegration(workingDir, siteId, accountId, localIn
162
159
description,
163
160
hostSiteId : siteId ,
164
161
scopes : formatScopesForRemote ( scopes ) ,
165
- integrationLevel,
166
162
} ) ,
167
163
} ) . then ( async ( res ) => {
168
164
const response = await res . json ( )
@@ -186,7 +182,7 @@ export async function registerIntegration(workingDir, siteId, accountId, localIn
186
182
187
183
const updatedIntegrationConfig = yaml . dump ( {
188
184
// @ts -expect-error TS(18046) - 'body' is of type 'unknown'
189
- config : { name, description, slug : body . slug , scopes, integrationLevel } ,
185
+ config : { name, description, slug : body . slug , scopes } ,
190
186
} )
191
187
192
188
const filePath = resolve ( workingDir , 'integration.yaml' )
@@ -211,7 +207,7 @@ export async function updateIntegration(
211
207
// @ts -expect-error TS(7006) FIXME: Parameter 'registeredIntegration' implicitly has a... Remove this comment to see the full error message
212
208
registeredIntegration ,
213
209
) {
214
- let { description, integrationLevel , name, scopes, slug } = localIntegrationConfig
210
+ let { description, name, scopes, slug } = localIntegrationConfig
215
211
216
212
let integrationSlug = slug
217
213
if ( slug !== registeredIntegration . slug ) {
@@ -232,11 +228,6 @@ export async function updateIntegration(
232
228
description = registeredIntegration . description
233
229
}
234
230
235
- if ( ! integrationLevel ) {
236
- // eslint-disable-next-line prefer-destructuring
237
- integrationLevel = registeredIntegration . integrationLevel
238
- }
239
-
240
231
// This is returned as a comma separated string and will be easier to manage here as an array
241
232
const registeredIntegrationScopes = registeredIntegration . scopes . split ( ',' )
242
233
@@ -287,7 +278,6 @@ export async function updateIntegration(
287
278
hostSiteId : siteId ,
288
279
// @ts -expect-error TS(7005) FIXME: Variable 'localScopes' implicitly has an 'any[]' t... Remove this comment to see the full error message
289
280
scopes : localScopes . join ( ',' ) ,
290
- integrationLevel,
291
281
} ) ,
292
282
} ,
293
283
) . then ( async ( res ) => {
@@ -325,7 +315,7 @@ export async function updateIntegration(
325
315
}
326
316
327
317
const updatedIntegrationConfig = yaml . dump ( {
328
- config : { name, description, slug : integrationSlug , scopes : scopesToWrite , integrationLevel } ,
318
+ config : { name, description, slug : integrationSlug , scopes : scopesToWrite } ,
329
319
} )
330
320
331
321
const filePath = resolve ( workingDir , 'integration.yaml' )
@@ -348,7 +338,6 @@ const IntegrationConfigurationSchema = z.object({
348
338
user : z . array ( z . enum ( [ 'read' , 'write' ] ) ) . optional ( ) ,
349
339
} )
350
340
. optional ( ) ,
351
- integrationLevel : z . enum ( [ 'site' , 'team' , 'team-and-site' ] ) . optional ( ) ,
352
341
} )
353
342
354
343
// @ts -expect-error TS(7006) FIXME: Parameter 'workingDir' implicitly has an 'any' typ... Remove this comment to see the full error message
@@ -409,8 +398,8 @@ export const deploy = async (options: OptionValues, command: BaseCommand) => {
409
398
// Confirm that a site is linked and that the user is logged in
410
399
checkOptions ( buildOptions )
411
400
412
- const { description, integrationLevel , name, scopes, slug } = await getConfiguration ( command . workingDir )
413
- const localIntegrationConfig = { name, description, scopes, slug, integrationLevel }
401
+ const { description, name, scopes, slug } = await getConfiguration ( command . workingDir )
402
+ const localIntegrationConfig = { name, description, scopes, slug }
414
403
415
404
const headers = token ? { 'netlify-token' : token } : undefined
416
405
// @ts -expect-error TS(2345) FIXME: Argument of type '{ api: any; site: any; siteInfo:... Remove this comment to see the full error message
0 commit comments