diff --git a/package.json b/package.json index c25b1b8..a6ab241 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "postinstall": "prisma generate" }, "dependencies": { + "@assembly-js/node-sdk": "^3.19.1", "@emotion/react": "^11.11.3", "@emotion/styled": "^11.11.0", "@mui/icons-material": "^5.14.5", @@ -26,7 +27,6 @@ "@sentry/nextjs": "^8", "@vercel/postgres": "^0.5.1", "ag-grid-react": "^31.0.2", - "copilot-node-sdk": "^3.5.1", "next": "^14.1.0", "prisma": "^5.7.1", "react": "^18", diff --git a/src/utils/copilotApiUtils.ts b/src/utils/copilotApiUtils.ts index 877cfa4..8a950cb 100644 --- a/src/utils/copilotApiUtils.ts +++ b/src/utils/copilotApiUtils.ts @@ -1,5 +1,5 @@ -import { copilotApi } from 'copilot-node-sdk'; -import type { CopilotAPI as SDK } from 'copilot-node-sdk'; +import { assemblyApi } from '@assembly-js/node-sdk'; +import type { AssemblyAPI as SDK } from '@assembly-js/node-sdk'; import { ClientResponse, ClientResponseSchema, @@ -26,7 +26,7 @@ export class CopilotAPI { copilot: SDK; constructor(apiToken: string) { - this.copilot = copilotApi({ + this.copilot = assemblyApi({ apiKey: copilotAPIKey, token: apiToken, }); @@ -70,6 +70,6 @@ export class CopilotAPI { } async getCustomFields(): Promise { - return CustomFieldResponseSchema.parse(await this.copilot.listCustomFields()); + return CustomFieldResponseSchema.parse(await this.copilot.listCustomFields({})); } } diff --git a/yarn.lock b/yarn.lock index 82f2139..4a74726 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,6 +15,14 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" +"@assembly-js/node-sdk@^3.19.1": + version "3.19.1" + resolved "https://registry.yarnpkg.com/@assembly-js/node-sdk/-/node-sdk-3.19.1.tgz#3d9ff79782250e9ee7f0afc43d050d205afdb3f8" + integrity sha512-8td1ks3Oj3aPmFGUXdoTC28fEH3t5keyDt4vTewfOBSZW3sW0Rxw7LP9oP4clw29KIeLQtM5BTpsP3I5VM0edw== + dependencies: + isomorphic-fetch "^3.0.0" + next "^14.0.2" + "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.23.5": version "7.23.5" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.23.5.tgz#9009b69a8c602293476ad598ff53e4562e15c244" @@ -3053,14 +3061,6 @@ convert-source-map@^2.0.0: resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-2.0.0.tgz#4b560f649fc4e918dd0ab75cf4961e8bc882d82a" integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== -copilot-node-sdk@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/copilot-node-sdk/-/copilot-node-sdk-3.5.1.tgz#99fb3db7b1f2e0f7574862b9cf5accebc161af3e" - integrity sha512-0qmmJJD0LMnORVxsbhqjtqEJ3f2d8TbY5BYXL2sDiNTi53QDuQuAwQUmHp8DZfqVbaTz9waZhgJMq5zL7c8BmA== - dependencies: - isomorphic-fetch "^3.0.0" - next "^14.0.2" - core-js-compat@^3.31.0, core-js-compat@^3.34.0: version "3.35.1" resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.35.1.tgz#215247d7edb9e830efa4218ff719beb2803555e2"