Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix connectorUpdate #466

Merged
merged 1 commit into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/api/scripts/connectorUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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`,
Expand Down Expand Up @@ -377,7 +377,7 @@ function updateObjectTypes(baseDir, objectType, vertical) {
baseDir,
objectType,
);
console.log(importStatements)
// console.log(importStatements)
updateTargetFile(targetFile, importStatements, possibleProviderForImportStatements, objectType);
}

Expand Down
16 changes: 12 additions & 4 deletions packages/api/src/@core/utils/types/original/original.ticketing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -247,7 +253,9 @@ export type OriginalAttachmentOutput =

/* collection */

export type OriginalCollectionOutput = JiraCollectionOutput | GitlabCollectionOutput;
export type OriginalCollectionOutput =
| JiraCollectionOutput
| GitlabCollectionOutput;


export type TicketingObjectOutput =
Expand Down
Loading