diff --git a/packages/api/scripts/connectorUpdate.js b/packages/api/scripts/connectorUpdate.js index 97943a4be..e22400458 100755 --- a/packages/api/scripts/connectorUpdate.js +++ b/packages/api/scripts/connectorUpdate.js @@ -276,7 +276,7 @@ function updateEnumFile(enumFilePath, newServiceDirs, vertical) { const base = vertical.substring(0, 1).toUpperCase() + vertical.substring(1); // Define the enum name to be updated based on the vertical - let enumName = `${base}Providers`; + let enumName = `${base}Connectors`; // Extract the enum content const enumRegex = new RegExp(`export enum ${enumName} {([\\s\\S]*?)}\n`, 'm'); const match = fileContent.match(enumRegex); @@ -328,9 +328,9 @@ function updateObjectTypes(baseDir, objectType, vertical) { // Extract the current provider arrays from providers.ts and enum.ts const providersFilePath = path.join( __dirname, - '../../shared/src/providers.ts', + '../../shared/src/connectors/index.ts', ); - const enumFilePath = path.join(__dirname, '../../shared/src/enum.ts'); + const enumFilePath = path.join(__dirname, '../../shared/src/connectors/enum.ts'); const currentProviders = extractArrayFromFile( providersFilePath, `${vertical.toUpperCase()}_PROVIDERS`, @@ -377,7 +377,7 @@ function updateObjectTypes(baseDir, objectType, vertical) { baseDir, objectType, ); - console.log(importStatements) + // console.log(importStatements) updateTargetFile(targetFile, importStatements, possibleProviderForImportStatements, objectType); } diff --git a/packages/api/src/@core/utils/types/original/original.ticketing.ts b/packages/api/src/@core/utils/types/original/original.ticketing.ts index a67434042..aa905750f 100644 --- a/packages/api/src/@core/utils/types/original/original.ticketing.ts +++ b/packages/api/src/@core/utils/types/original/original.ticketing.ts @@ -155,7 +155,9 @@ export type OriginalUserInput = | JiraUserInput; //| JiraServiceMgmtUserInput; /* account */ -export type OriginalAccountInput = ZendeskAccountInput | FrontAccountInput; +export type OriginalAccountInput = + | ZendeskAccountInput + | FrontAccountInput; /* contact */ export type OriginalContactInput = | ZendeskContactInput @@ -178,7 +180,9 @@ export type OriginalTeamInput = /* attachment */ export type OriginalAttachmentInput = null; -export type OriginalCollectionInput = JiraCollectionInput | GitlabCollectionInput; +export type OriginalCollectionInput = + | JiraCollectionInput + | GitlabCollectionInput; export type TicketingObjectInput = | OriginalTicketInput @@ -217,7 +221,9 @@ export type OriginalUserOutput = | GorgiasUserOutput | JiraUserOutput; /* account */ -export type OriginalAccountOutput = ZendeskAccountOutput | FrontAccountOutput; +export type OriginalAccountOutput = + | ZendeskAccountOutput + | FrontAccountOutput; /* contact */ export type OriginalContactOutput = | ZendeskContactOutput @@ -247,7 +253,9 @@ export type OriginalAttachmentOutput = /* collection */ -export type OriginalCollectionOutput = JiraCollectionOutput | GitlabCollectionOutput; +export type OriginalCollectionOutput = + | JiraCollectionOutput + | GitlabCollectionOutput; export type TicketingObjectOutput =