From f2dc425900ae9b2bcfc54a8b1e279758593a9407 Mon Sep 17 00:00:00 2001 From: SandipBajracharya Date: Fri, 6 Feb 2026 17:50:30 +0545 Subject: [PATCH] chore(OUT-3058): add latest @assembly-js/node-sdk --- package.json | 1 + src/utils/CopilotAPI.ts | 8 ++++---- yarn.lock | 16 ++++++++-------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 05e3c500b..8d6345e31 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { "dependencies": { + "@assembly-js/node-sdk": "^3.19.1", "@cyntler/react-doc-viewer": "^1.17.0", "@emotion/react": "^11.11.3", "@emotion/styled": "^11.11.0", diff --git a/src/utils/CopilotAPI.ts b/src/utils/CopilotAPI.ts index d734d02df..9259ac276 100644 --- a/src/utils/CopilotAPI.ts +++ b/src/utils/CopilotAPI.ts @@ -37,8 +37,8 @@ import { } from '@/types/common' import { DISPATCHABLE_EVENT } from '@/types/webhook' import Bottleneck from 'bottleneck' -import type { CopilotAPI as SDK } from 'copilot-node-sdk' -import { copilotApi } from 'copilot-node-sdk' +import type { AssemblyAPI as SDK } from '@assembly-js/node-sdk' +import { assemblyApi } from '@assembly-js/node-sdk' import { z } from 'zod' export class CopilotAPI { @@ -48,7 +48,7 @@ export class CopilotAPI { private token: string, customApiKey?: string, ) { - this.copilot = copilotApi({ apiKey: customApiKey ?? apiKey, token }) + this.copilot = assemblyApi({ apiKey: customApiKey ?? apiKey, token }) } private async _manualFetch(route: string, query?: Record, workspaceId?: string) { @@ -193,7 +193,7 @@ export class CopilotAPI { async _getCustomFields(): Promise { console.info('CopilotAPI#_getCustomFields', this.token) - return CustomFieldResponseSchema.parse(await this.copilot.listCustomFields()) + return CustomFieldResponseSchema.parse(await this.copilot.listCustomFields({})) } async _getInternalUsers(args: CopilotListArgs = {}): Promise { diff --git a/yarn.lock b/yarn.lock index 599e62c91..dd0819973 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,6 +18,14 @@ "@csstools/css-tokenizer" "^3.0.3" lru-cache "^10.4.3" +"@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.12.13", "@babel/code-frame@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.27.1.tgz#200f715e66d52a23b221a9435534a91cc13ad5be" @@ -4893,14 +4901,6 @@ copilot-design-system@^2.3.4: tailwind-merge "^2.3.0" uuid "^9.0.1" -copilot-node-sdk@^3.16.0: - version "3.16.0" - resolved "https://registry.yarnpkg.com/copilot-node-sdk/-/copilot-node-sdk-3.16.0.tgz#c1335c768bd3f9d091c154f930fce9a2633ade8d" - integrity sha512-wqqeJuW+uge39nC1/+cqMWSSgCCNThtCR+JykPYFB2PTj0d0tfROCXofwtqZZccUUzk/xXXkJF53QfweVxmMLg== - dependencies: - isomorphic-fetch "^3.0.0" - next "^14.0.2" - copy-anything@^3.0.2: version "3.0.5" resolved "https://registry.yarnpkg.com/copy-anything/-/copy-anything-3.0.5.tgz#2d92dce8c498f790fa7ad16b01a1ae5a45b020a0"