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

feat: new integration create and initaite connection + reinitiate and update API schema #1189

Merged
merged 17 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from 14 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
7 changes: 7 additions & 0 deletions js/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ install:
build:
pnpm run build

.PHONY: api_client_generate
api_client_generate:
pnpm run openapispec:generate
sed -i '' '/export type in = '\''query'\'' | '\''header'\'';/d' src/sdk/client/types.gen.ts
sed -i '' 's/successfull: boolean/successfull?: boolean/g' src/sdk/client/types.gen.ts
Comment on lines +13 to +14

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sed command lacks error handling, potentially failing silently on some platforms.

pnpm prettier

.PHONY: lint
lint:
pnpm run lint
Expand Down
6 changes: 3 additions & 3 deletions js/config/getTestConfig.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const env = process.env.TEST_ENV || "prod"
export const env = process.env.TEST_ENV || "staging"
const CURRENT_FILE_DIR = __dirname;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default environment changed from 'prod' to 'staging' which could affect production deployments if TEST_ENV is not explicitly set. This is a potentially risky change.


export type BACKEND_CONFIG = {
Expand All @@ -12,6 +12,6 @@ export const getTestConfig = (): BACKEND_CONFIG => {
return JSON.parse(JSON.stringify(require(path))) as unknown as BACKEND_CONFIG;
} catch (error) {
console.error("Error loading test config file:", error);
throw new Error("Error loading test config file. You can create test.{{env}}.json file in the config folder.");
throw new Error(`Error loading test config file. You can create test.config.${env}.json file in the config folder.`);
}
}
}
2 changes: 1 addition & 1 deletion js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"test:watch": "jest --testMatch=\"**/*.spec.ts\" --watch",
"test:coverage": "jest --coverage --testMatch=\"**/*.spec.ts\"",
"type-docs": "typedoc",
"openapispec:generate": "npx @hey-api/openapi-ts",
"openapispec:generate": "npx @hey-api/openapi-ts ",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The openapispec:generate script in package.json has a trailing space, which might cause issues with some tools or scripts.

📝 Committable Code Suggestion

‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
"openapispec:generate": "npx @hey-api/openapi-ts ",
"openapispec:generate": "npx @hey-api/openapi-ts"

"run:cli": "ts-node src/cli/index.ts",
"run:sample": "ts-node sample.ts",
"prettier": "prettier --write 'src/**/*.{ts,js,cjs}'",
Expand Down
2 changes: 2 additions & 0 deletions js/src/sdk/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ export default {
clientAuth: SDKClient.ClientService,
cli: SDKClient.CliService,
appConnector: SDKClient.IntegrationsService,
appConnectorV2: SDKClient.IntegrationsV2Service,
apps: SDKClient.AppsService,
connections: SDKClient.ConnectionsService,
connectionsV2: SDKClient.Connectionsv2Service,
triggers: SDKClient.TriggersService,
};
Loading
Loading