Skip to content
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 4 additions & 4 deletions src/utils/CopilotAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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<string, string>, workspaceId?: string) {
Expand Down Expand Up @@ -193,7 +193,7 @@ export class CopilotAPI {

async _getCustomFields(): Promise<CustomFieldResponse> {
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<InternalUsersResponse> {
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
Loading