lemma-sdk 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +1,26 @@
1
1
  import type { HttpClient } from "../http.js";
2
+ import type { AssistantListResponse } from "../openapi_client/models/AssistantListResponse.js";
3
+ import type { AssistantResponse } from "../openapi_client/models/AssistantResponse.js";
4
+ import type { ConversationListResponse } from "../openapi_client/models/ConversationListResponse.js";
5
+ import type { ConversationMessageListResponse } from "../openapi_client/models/ConversationMessageListResponse.js";
6
+ import type { ConversationResponse } from "../openapi_client/models/ConversationResponse.js";
2
7
  import type { CreateAssistantRequest } from "../openapi_client/models/CreateAssistantRequest.js";
3
8
  import type { CreateConversationRequest } from "../openapi_client/models/CreateConversationRequest.js";
4
9
  import type { CreateMessageRequest } from "../openapi_client/models/CreateMessageRequest.js";
5
10
  import type { UpdateAssistantRequest } from "../openapi_client/models/UpdateAssistantRequest.js";
11
+ import type { UpdateConversationRequest } from "../openapi_client/models/UpdateConversationRequest.js";
6
12
  export declare class AssistantsNamespace {
7
13
  private readonly http;
8
14
  private readonly podId;
9
15
  constructor(http: HttpClient, podId: () => string);
10
16
  list(options?: {
11
17
  limit?: number;
12
- pageToken?: string;
13
- cursor?: string;
14
- }): Promise<unknown>;
15
- create(payload: CreateAssistantRequest | Record<string, unknown>): Promise<unknown>;
16
- get(assistantName: string): Promise<unknown>;
17
- update(assistantName: string, payload: UpdateAssistantRequest | Record<string, unknown>): Promise<unknown>;
18
- delete(assistantName: string): Promise<unknown>;
18
+ page_token?: string;
19
+ }): Promise<AssistantListResponse>;
20
+ create(payload: CreateAssistantRequest): Promise<AssistantResponse>;
21
+ get(assistantName: string): Promise<AssistantResponse>;
22
+ update(assistantName: string, payload: UpdateAssistantRequest): Promise<AssistantResponse>;
23
+ delete(assistantName: string): Promise<void>;
19
24
  }
20
25
  export declare class ConversationsNamespace {
21
26
  private readonly http;
@@ -24,58 +29,48 @@ export declare class ConversationsNamespace {
24
29
  private resolvePodId;
25
30
  private requirePodId;
26
31
  list(options?: {
27
- assistantId?: string;
28
- assistantName?: string;
29
- podId?: string;
30
- organizationId?: string;
32
+ assistant_id?: string;
33
+ pod_id?: string;
34
+ organization_id?: string;
31
35
  limit?: number;
32
- pageToken?: string;
33
- cursor?: string;
34
- }): Promise<unknown>;
35
- listByAssistant(assistantName: string, options?: {
36
- podId?: string;
37
- organizationId?: string;
36
+ page_token?: string;
37
+ }): Promise<ConversationListResponse>;
38
+ listByAssistant(assistantId: string, options?: {
39
+ pod_id?: string;
40
+ organization_id?: string;
38
41
  limit?: number;
39
- pageToken?: string;
40
- cursor?: string;
41
- }): Promise<unknown>;
42
- create(payload: Omit<CreateConversationRequest, "pod_id"> & {
42
+ page_token?: string;
43
+ }): Promise<ConversationListResponse>;
44
+ create(payload: CreateConversationRequest): Promise<ConversationResponse>;
45
+ createForAssistant(assistantId: string, payload?: Omit<CreateConversationRequest, "assistant_id">): Promise<ConversationResponse>;
46
+ get(conversationId: string, options?: {
43
47
  pod_id?: string;
44
- assistant_name?: string | null;
45
- }): Promise<unknown>;
46
- createForAssistant(assistantName: string, payload?: Omit<CreateConversationRequest, "pod_id" | "assistant_id"> & {
48
+ }): Promise<ConversationResponse>;
49
+ update(conversationId: string, payload: UpdateConversationRequest, options?: {
47
50
  pod_id?: string;
48
- }): Promise<unknown>;
49
- get(conversationId: string, options?: {
50
- podId?: string;
51
- }): Promise<unknown>;
52
- update(conversationId: string, payload: Record<string, unknown>, options?: {
53
- podId?: string;
54
- }): Promise<unknown>;
51
+ }): Promise<ConversationResponse>;
55
52
  delete(conversationId: string, options?: {
56
- podId?: string;
53
+ pod_id?: string;
57
54
  }): Promise<unknown>;
58
55
  sendMessageStream(conversationId: string, payload: CreateMessageRequest, options?: {
59
- podId?: string;
56
+ pod_id?: string;
60
57
  signal?: AbortSignal;
61
58
  }): Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>;
62
59
  resumeStream(conversationId: string, options?: {
63
- podId?: string;
60
+ pod_id?: string;
64
61
  signal?: AbortSignal;
65
62
  }): Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>;
66
63
  stopRun(conversationId: string, options?: {
67
- podId?: string;
64
+ pod_id?: string;
68
65
  }): Promise<unknown>;
69
66
  readonly messages: {
70
67
  list: (conversationId: string, options?: {
71
68
  limit?: number;
72
- pageToken?: string;
73
- cursor?: string;
74
- order?: "asc" | "desc" | string;
75
- podId?: string;
76
- }) => Promise<unknown>;
69
+ page_token?: string;
70
+ pod_id?: string;
71
+ }) => Promise<ConversationMessageListResponse>;
77
72
  send: (conversationId: string, payload: CreateMessageRequest, options?: {
78
- podId?: string;
73
+ pod_id?: string;
79
74
  }) => Promise<unknown>;
80
75
  };
81
76
  }
@@ -9,8 +9,7 @@ export class AssistantsNamespace {
9
9
  return this.http.request("GET", `/pods/${this.podId()}/assistants`, {
10
10
  params: {
11
11
  limit: options.limit ?? 100,
12
- page_token: options.pageToken ?? options.cursor,
13
- cursor: options.cursor,
12
+ page_token: options.page_token,
14
13
  },
15
14
  });
16
15
  }
@@ -57,58 +56,55 @@ export class ConversationsNamespace {
57
56
  list(options = {}) {
58
57
  return this.http.request("GET", "/conversations", {
59
58
  params: {
60
- assistant_id: options.assistantName ?? options.assistantId,
61
- pod_id: this.resolvePodId(options.podId),
62
- organization_id: options.organizationId,
59
+ assistant_id: options.assistant_id,
60
+ pod_id: this.resolvePodId(options.pod_id),
61
+ organization_id: options.organization_id,
63
62
  limit: options.limit ?? 20,
64
- page_token: options.pageToken ?? options.cursor,
65
- cursor: options.cursor,
63
+ page_token: options.page_token,
66
64
  },
67
65
  });
68
66
  }
69
- listByAssistant(assistantName, options = {}) {
70
- return this.list({ ...options, assistantName });
67
+ listByAssistant(assistantId, options = {}) {
68
+ return this.list({ ...options, assistant_id: assistantId });
71
69
  }
72
70
  create(payload) {
73
71
  return this.http.request("POST", "/conversations", {
74
72
  body: {
75
73
  ...payload,
76
- assistant_id: payload.assistant_id ?? payload.assistant_name,
77
74
  pod_id: this.resolvePodId(payload.pod_id),
78
75
  },
79
76
  });
80
77
  }
81
- createForAssistant(assistantName, payload = {}) {
78
+ createForAssistant(assistantId, payload = {}) {
82
79
  return this.create({
83
80
  ...payload,
84
- assistant_name: assistantName,
85
- pod_id: payload.pod_id,
81
+ assistant_id: assistantId,
86
82
  });
87
83
  }
88
84
  get(conversationId, options = {}) {
89
85
  return this.http.request("GET", `/conversations/${conversationId}`, {
90
86
  params: {
91
- pod_id: this.resolvePodId(options.podId),
87
+ pod_id: this.resolvePodId(options.pod_id),
92
88
  },
93
89
  });
94
90
  }
95
91
  update(conversationId, payload, options = {}) {
96
92
  return this.http.request("PATCH", `/conversations/${conversationId}`, {
97
93
  params: {
98
- pod_id: this.resolvePodId(options.podId),
94
+ pod_id: this.resolvePodId(options.pod_id),
99
95
  },
100
96
  body: payload,
101
97
  });
102
98
  }
103
99
  delete(conversationId, options = {}) {
104
- const scopedPodId = this.requirePodId(options.podId);
100
+ const scopedPodId = this.requirePodId(options.pod_id);
105
101
  return this.http.request("DELETE", `/pods/${scopedPodId}/conversations/${conversationId}`);
106
102
  }
107
103
  sendMessageStream(conversationId, payload, options = {}) {
108
104
  return this.http.stream(`/conversations/${conversationId}/messages`, {
109
105
  method: "POST",
110
106
  params: {
111
- pod_id: this.resolvePodId(options.podId),
107
+ pod_id: this.resolvePodId(options.pod_id),
112
108
  },
113
109
  body: payload,
114
110
  signal: options.signal,
@@ -121,7 +117,7 @@ export class ConversationsNamespace {
121
117
  resumeStream(conversationId, options = {}) {
122
118
  return this.http.stream(`/conversations/${conversationId}/stream`, {
123
119
  params: {
124
- pod_id: this.resolvePodId(options.podId),
120
+ pod_id: this.resolvePodId(options.pod_id),
125
121
  },
126
122
  signal: options.signal,
127
123
  headers: {
@@ -132,7 +128,7 @@ export class ConversationsNamespace {
132
128
  stopRun(conversationId, options = {}) {
133
129
  return this.http.request("PATCH", `/conversations/${conversationId}/stop`, {
134
130
  params: {
135
- pod_id: this.resolvePodId(options.podId),
131
+ pod_id: this.resolvePodId(options.pod_id),
136
132
  },
137
133
  body: {},
138
134
  });
@@ -140,16 +136,14 @@ export class ConversationsNamespace {
140
136
  messages = {
141
137
  list: (conversationId, options = {}) => this.http.request("GET", `/conversations/${conversationId}/messages`, {
142
138
  params: {
143
- pod_id: this.resolvePodId(options.podId),
139
+ pod_id: this.resolvePodId(options.pod_id),
144
140
  limit: options.limit ?? 20,
145
- page_token: options.pageToken ?? options.cursor,
146
- cursor: options.cursor,
147
- order: options.order,
141
+ page_token: options.page_token,
148
142
  },
149
143
  }),
150
144
  send: (conversationId, payload, options = {}) => this.http.request("POST", `/conversations/${conversationId}/messages`, {
151
145
  params: {
152
- pod_id: this.resolvePodId(options.podId),
146
+ pod_id: this.resolvePodId(options.pod_id),
153
147
  },
154
148
  body: payload,
155
149
  }),
@@ -9,10 +9,10 @@ export declare class DatastoresNamespace {
9
9
  list(options?: {
10
10
  limit?: number;
11
11
  pageToken?: string;
12
- }): Promise<import("../index.js").DatastoreListResponse>;
13
- create(payload: CreateDatastoreRequest): Promise<import("../index.js").DatastoreResponse>;
14
- get(name: string): Promise<import("../index.js").DatastoreResponse>;
15
- update(name: string, payload: UpdateDatastoreRequest): Promise<import("../index.js").DatastoreResponse>;
16
- delete(name: string): Promise<import("../index.js").DatastoreMessageResponse>;
17
- query(name: string, request: DatastoreQueryRequest | string): Promise<import("../index.js").RecordQueryResponse>;
12
+ }): Promise<import("../types.js").DatastoreListResponse>;
13
+ create(payload: CreateDatastoreRequest): Promise<import("../types.js").DatastoreResponse>;
14
+ get(name: string): Promise<import("../types.js").DatastoreResponse>;
15
+ update(name: string, payload: UpdateDatastoreRequest): Promise<import("../types.js").DatastoreResponse>;
16
+ delete(name: string): Promise<import("../types.js").DatastoreMessageResponse>;
17
+ query(name: string, request: DatastoreQueryRequest | string): Promise<import("../types.js").RecordQueryResponse>;
18
18
  }
@@ -11,16 +11,16 @@ export declare class DesksNamespace {
11
11
  list(options?: {
12
12
  limit?: number;
13
13
  pageToken?: string;
14
- }): Promise<import("../index.js").DeskListResponse>;
15
- create(payload: CreateDeskRequest): Promise<import("../index.js").DeskResponse>;
16
- get(name: string): Promise<import("../index.js").DeskResponse>;
17
- update(name: string, payload: UpdateDeskRequest): Promise<import("../index.js").DeskResponse>;
18
- delete(name: string): Promise<import("../index.js").DeskMessageResponse>;
14
+ }): Promise<import("../types.js").DeskListResponse>;
15
+ create(payload: CreateDeskRequest): Promise<import("../types.js").DeskResponse>;
16
+ get(name: string): Promise<import("../types.js").DeskResponse>;
17
+ update(name: string, payload: UpdateDeskRequest): Promise<import("../types.js").DeskResponse>;
18
+ delete(name: string): Promise<import("../types.js").DeskMessageResponse>;
19
19
  readonly html: {
20
20
  get: (name: string) => Promise<string>;
21
21
  };
22
22
  readonly bundle: {
23
- upload: (name: string, payload: Body_pod_desk_bundle_upload) => Promise<import("../index.js").DeskBundleUploadResponse>;
23
+ upload: (name: string, payload: Body_pod_desk_bundle_upload) => Promise<import("../types.js").DeskBundleUploadResponse>;
24
24
  };
25
25
  readonly source: {
26
26
  download: (name: string) => Promise<Blob>;
@@ -10,31 +10,31 @@ export declare class FilesNamespace {
10
10
  limit?: number;
11
11
  pageToken?: string;
12
12
  parentId?: string;
13
- }): Promise<import("../index.js").FileListResponse>;
14
- get(datastore: string, fileId: string): Promise<import("../index.js").FileResponse>;
15
- delete(datastore: string, fileId: string): Promise<import("../index.js").DatastoreMessageResponse>;
13
+ }): Promise<import("../types.js").FileListResponse>;
14
+ get(datastore: string, fileId: string): Promise<import("../types.js").FileResponse>;
15
+ delete(datastore: string, fileId: string): Promise<import("../types.js").DatastoreMessageResponse>;
16
16
  search(datastore: string, query: string, options?: {
17
17
  limit?: number;
18
18
  searchMethod?: SearchMethod;
19
- }): Promise<import("../index.js").FileSearchResponse>;
19
+ }): Promise<import("../types.js").FileSearchResponse>;
20
20
  download(datastore: string, fileId: string): Promise<Blob>;
21
21
  upload(datastore: string, file: Blob, options?: {
22
22
  name?: string;
23
23
  parentId?: string;
24
24
  searchEnabled?: boolean;
25
25
  description?: string;
26
- }): Promise<import("../index.js").FileResponse>;
26
+ }): Promise<import("../types.js").FileResponse>;
27
27
  update(datastore: string, fileId: string, options?: {
28
28
  file?: Blob;
29
29
  name?: string;
30
30
  description?: string;
31
31
  parentId?: string;
32
32
  searchEnabled?: boolean;
33
- }): Promise<import("../index.js").FileResponse>;
33
+ }): Promise<import("../types.js").FileResponse>;
34
34
  readonly folder: {
35
35
  create: (datastore: string, name: string, options?: {
36
36
  parentId?: string;
37
37
  description?: string;
38
- }) => Promise<import("../index.js").FileResponse>;
38
+ }) => Promise<import("../types.js").FileResponse>;
39
39
  };
40
40
  }
@@ -9,17 +9,17 @@ export declare class FunctionsNamespace {
9
9
  list(options?: {
10
10
  limit?: number;
11
11
  pageToken?: string;
12
- }): Promise<import("../index.js").FunctionListResponse>;
13
- create(payload: CreateFunctionRequest): Promise<import("../index.js").FunctionResponse>;
14
- get(name: string): Promise<import("../index.js").FunctionResponse>;
15
- update(name: string, payload: UpdateFunctionRequest): Promise<import("../index.js").FunctionResponse>;
16
- delete(name: string): Promise<import("../index.js").FunctionMessageResponse>;
12
+ }): Promise<import("../types.js").FunctionListResponse>;
13
+ create(payload: CreateFunctionRequest): Promise<import("../types.js").FunctionResponse>;
14
+ get(name: string): Promise<import("../types.js").FunctionResponse>;
15
+ update(name: string, payload: UpdateFunctionRequest): Promise<import("../types.js").FunctionResponse>;
16
+ delete(name: string): Promise<import("../types.js").FunctionMessageResponse>;
17
17
  readonly runs: {
18
- create: (name: string, options?: RunFunctionOptions) => Promise<import("../index.js").FunctionRunResponse>;
18
+ create: (name: string, options?: RunFunctionOptions) => Promise<import("../types.js").FunctionRunResponse>;
19
19
  list: (name: string, params?: {
20
20
  limit?: number;
21
21
  pageToken?: string;
22
- }) => Promise<import("../index.js").FunctionRunListResponse>;
23
- get: (name: string, runId: string) => Promise<import("../index.js").FunctionRunResponse>;
22
+ }) => Promise<import("../types.js").FunctionRunListResponse>;
23
+ get: (name: string, runId: string) => Promise<import("../types.js").FunctionRunResponse>;
24
24
  };
25
25
  }
@@ -2,6 +2,6 @@ import type { GeneratedClientAdapter } from "../generated.js";
2
2
  export declare class IconsNamespace {
3
3
  private readonly client;
4
4
  constructor(client: GeneratedClientAdapter);
5
- upload(file: Blob): Promise<import("../index.js").IconUploadResponse>;
5
+ upload(file: Blob): Promise<import("../types.js").IconUploadResponse>;
6
6
  getPublic(iconPath: string): Promise<any>;
7
7
  }
@@ -5,13 +5,13 @@ export declare class IntegrationsNamespace {
5
5
  list(options?: {
6
6
  limit?: number;
7
7
  pageToken?: string;
8
- }): Promise<import("../index.js").ApplicationListResponseSchema>;
9
- get(applicationId: string): Promise<import("../index.js").ApplicationDetailResponseSchema>;
8
+ }): Promise<import("../types.js").ApplicationListResponseSchema>;
9
+ get(applicationId: string): Promise<import("../types.js").ApplicationDetailResponseSchema>;
10
10
  readonly operations: {
11
- list: (applicationId: string) => Promise<import("../index.js").OperationListResponse>;
12
- get: (applicationId: string, operationName: string) => Promise<import("../index.js").OperationDetail>;
13
- execute: (applicationId: string, operationName: string, payload: Record<string, unknown>, accountId?: string) => Promise<import("../index.js").OperationExecutionResponse>;
14
- descriptor: (applicationId: string) => Promise<import("../index.js").AppDescriptorResponse>;
11
+ list: (applicationId: string) => Promise<import("../types.js").OperationListResponse>;
12
+ get: (applicationId: string, operationName: string) => Promise<import("../types.js").OperationDetail>;
13
+ execute: (applicationId: string, operationName: string, payload: Record<string, unknown>, accountId?: string) => Promise<import("../types.js").OperationExecutionResponse>;
14
+ descriptor: (applicationId: string) => Promise<import("../types.js").AppDescriptorResponse>;
15
15
  };
16
16
  readonly triggers: {
17
17
  list: (options?: {
@@ -19,18 +19,18 @@ export declare class IntegrationsNamespace {
19
19
  search?: string;
20
20
  limit?: number;
21
21
  pageToken?: string;
22
- }) => Promise<import("../index.js").AppTriggerListResponseSchema>;
23
- get: (triggerId: string) => Promise<import("../index.js").AppTriggerResponseSchema>;
22
+ }) => Promise<import("../types.js").AppTriggerListResponseSchema>;
23
+ get: (triggerId: string) => Promise<import("../types.js").AppTriggerResponseSchema>;
24
24
  };
25
25
  readonly accounts: {
26
26
  list: (options?: {
27
27
  applicationId?: string;
28
28
  limit?: number;
29
29
  pageToken?: string;
30
- }) => Promise<import("../index.js").AccountListResponseSchema>;
31
- get: (accountId: string) => Promise<import("../index.js").AccountResponseSchema>;
32
- credentials: (accountId: string) => Promise<import("../index.js").AccountCredentialsResponseSchema>;
33
- delete: (accountId: string) => Promise<import("../index.js").MessageResponseSchema>;
30
+ }) => Promise<import("../types.js").AccountListResponseSchema>;
31
+ get: (accountId: string) => Promise<import("../types.js").AccountResponseSchema>;
32
+ credentials: (accountId: string) => Promise<import("../types.js").AccountCredentialsResponseSchema>;
33
+ delete: (accountId: string) => Promise<import("../types.js").MessageResponseSchema>;
34
34
  };
35
- createConnectRequest(applicationId: string): Promise<import("../index.js").ConnectRequestResponseSchema>;
35
+ createConnectRequest(applicationId: string): Promise<import("../types.js").ConnectRequestResponseSchema>;
36
36
  }
@@ -13,16 +13,16 @@ export declare class OrganizationsNamespace {
13
13
  limit?: number;
14
14
  pageToken?: string;
15
15
  cursor?: string;
16
- }): Promise<import("../index.js").OrganizationListResponse>;
17
- get(orgId: string): Promise<import("../index.js").OrganizationResponse>;
18
- create(payload: OrganizationCreateRequest): Promise<import("../index.js").OrganizationResponse>;
16
+ }): Promise<import("../types.js").OrganizationListResponse>;
17
+ get(orgId: string): Promise<import("../types.js").OrganizationResponse>;
18
+ create(payload: OrganizationCreateRequest): Promise<import("../types.js").OrganizationResponse>;
19
19
  readonly members: {
20
20
  list: (orgId: string, options?: {
21
21
  limit?: number;
22
22
  pageToken?: string;
23
23
  cursor?: string;
24
- }) => Promise<import("../index.js").OrganizationMemberListResponse>;
25
- updateRole: (orgId: string, memberId: string, role: OrganizationRole) => Promise<import("../index.js").OrganizationMemberResponse>;
24
+ }) => Promise<import("../types.js").OrganizationMemberListResponse>;
25
+ updateRole: (orgId: string, memberId: string, role: OrganizationRole) => Promise<import("../types.js").OrganizationMemberResponse>;
26
26
  remove: (orgId: string, memberId: string) => Promise<void>;
27
27
  };
28
28
  readonly invitations: {
@@ -38,9 +38,9 @@ export declare class OrganizationsNamespace {
38
38
  pageToken?: string;
39
39
  cursor?: string;
40
40
  }) => Promise<OrganizationInvitationListResponse>;
41
- get: (invitationId: string) => Promise<import("../index.js").OrganizationInvitationResponse>;
42
- invite: (orgId: string, payload: OrganizationInvitationRequest) => Promise<import("../index.js").OrganizationInvitationResponse>;
43
- accept: (invitationId: string) => Promise<import("../index.js").OrganizationMessageResponse>;
41
+ get: (invitationId: string) => Promise<import("../types.js").OrganizationInvitationResponse>;
42
+ invite: (orgId: string, payload: OrganizationInvitationRequest) => Promise<import("../types.js").OrganizationInvitationResponse>;
43
+ accept: (invitationId: string) => Promise<import("../types.js").OrganizationMessageResponse>;
44
44
  revoke: (invitationId: string) => Promise<void>;
45
45
  };
46
46
  }
@@ -8,8 +8,8 @@ export declare class PodMembersNamespace {
8
8
  limit?: number;
9
9
  pageToken?: string;
10
10
  cursor?: string;
11
- }): Promise<import("../index.js").PodMemberListResponse>;
12
- add(podId: string, payload: PodMemberAddRequest): Promise<import("../index.js").PodMemberResponse>;
13
- updateRole(podId: string, memberId: string, role: PodRole): Promise<import("../index.js").PodMemberResponse>;
11
+ }): Promise<import("../types.js").PodMemberListResponse>;
12
+ add(podId: string, payload: PodMemberAddRequest): Promise<import("../types.js").PodMemberResponse>;
13
+ updateRole(podId: string, memberId: string, role: PodRole): Promise<import("../types.js").PodMemberResponse>;
14
14
  remove(podId: string, memberId: string): Promise<void>;
15
15
  }
@@ -8,7 +8,7 @@ export declare class PodSurfacesNamespace {
8
8
  limit?: number;
9
9
  pageToken?: string;
10
10
  cursor?: string;
11
- }): Promise<import("../index.js").AssistantSurfaceListResponse>;
11
+ }): Promise<import("../types.js").AssistantSurfaceListResponse>;
12
12
  create(podId: string, payload: CreateSurfaceRequest): Promise<any>;
13
13
  get(podId: string, surfaceId: string): Promise<any>;
14
14
  updateConfig(podId: string, surfaceId: string, payload: UpdateSurfaceRequest): Promise<any>;
@@ -18,9 +18,9 @@ export declare class PodsNamespace {
18
18
  pageToken?: string;
19
19
  cursor?: string;
20
20
  }): Promise<PodListResponse>;
21
- get(podId: string): Promise<import("../index.js").PodResponse>;
22
- create(payload: PodCreateRequest): Promise<import("../index.js").PodResponse>;
23
- update(podId: string, payload: PodUpdateRequest): Promise<import("../index.js").PodResponse>;
21
+ get(podId: string): Promise<import("../types.js").PodResponse>;
22
+ create(payload: PodCreateRequest): Promise<import("../types.js").PodResponse>;
23
+ update(podId: string, payload: PodUpdateRequest): Promise<import("../types.js").PodResponse>;
24
24
  delete(podId: string): Promise<void>;
25
- config(podId: string): Promise<import("../index.js").PodConfigResponse>;
25
+ config(podId: string): Promise<import("../types.js").PodConfigResponse>;
26
26
  }
@@ -10,14 +10,14 @@ export declare class RecordsNamespace {
10
10
  constructor(client: GeneratedClientAdapter, http: HttpClient, podId: () => string);
11
11
  list(datastore: string, table: string, options?: ListRecordsOptions): Promise<RecordListResponse>;
12
12
  listWithParams(datastore: string, table: string, params: Record<string, string | number | boolean | undefined | null>): Promise<RecordListResponse>;
13
- create(datastore: string, table: string, data: Record<string, unknown>): Promise<import("../index.js").RecordResponse>;
14
- get(datastore: string, table: string, recordId: string): Promise<import("../index.js").RecordResponse>;
15
- update(datastore: string, table: string, recordId: string, data: Record<string, unknown>): Promise<import("../index.js").RecordResponse>;
16
- delete(datastore: string, table: string, recordId: string): Promise<import("../index.js").DatastoreMessageResponse>;
13
+ create(datastore: string, table: string, data: Record<string, unknown>): Promise<import("../types.js").RecordResponse>;
14
+ get(datastore: string, table: string, recordId: string): Promise<import("../types.js").RecordResponse>;
15
+ update(datastore: string, table: string, recordId: string, data: Record<string, unknown>): Promise<import("../types.js").RecordResponse>;
16
+ delete(datastore: string, table: string, recordId: string): Promise<import("../types.js").DatastoreMessageResponse>;
17
17
  query(datastore: string, table: string, payload: RecordQueryRequest): Promise<RecordListResponse>;
18
18
  readonly bulk: {
19
- create: (datastore: string, table: string, records: Record<string, unknown>[]) => Promise<import("../index.js").DatastoreMessageResponse>;
20
- update: (datastore: string, table: string, records: Record<string, unknown>[]) => Promise<import("../index.js").DatastoreMessageResponse>;
21
- delete: (datastore: string, table: string, recordIds: string[]) => Promise<import("../index.js").DatastoreMessageResponse>;
19
+ create: (datastore: string, table: string, records: Record<string, unknown>[]) => Promise<import("../types.js").DatastoreMessageResponse>;
20
+ update: (datastore: string, table: string, records: Record<string, unknown>[]) => Promise<import("../types.js").DatastoreMessageResponse>;
21
+ delete: (datastore: string, table: string, recordIds: string[]) => Promise<import("../types.js").DatastoreMessageResponse>;
22
22
  };
23
23
  }
@@ -1,16 +1,20 @@
1
1
  import type { HttpClient } from "../http.js";
2
- export type ResourceType = "conversation" | "assistant" | "task" | string;
2
+ import type { FileUploadResponse } from "../openapi_client/models/FileUploadResponse.js";
3
+ import type { ResourceFileListResponse } from "../openapi_client/models/ResourceFileListResponse.js";
4
+ import type { ResourceType as OpenApiResourceType } from "../openapi_client/models/ResourceType.js";
5
+ export type ResourceType = `${OpenApiResourceType}`;
3
6
  export declare class ResourcesNamespace {
4
7
  private readonly http;
5
8
  constructor(http: HttpClient);
6
9
  list(resourceType: ResourceType, resourceId: string, options?: {
7
10
  path?: string;
8
- }): Promise<unknown>;
11
+ limit?: number;
12
+ page_token?: string;
13
+ }): Promise<ResourceFileListResponse>;
9
14
  upload(resourceType: ResourceType, resourceId: string, file: Blob, options?: {
10
15
  path?: string;
11
16
  name?: string;
12
- fieldName?: string;
13
- }): Promise<unknown>;
14
- delete(resourceType: ResourceType, resourceId: string, filePath: string): Promise<unknown>;
17
+ }): Promise<FileUploadResponse>;
18
+ delete(resourceType: ResourceType, resourceId: string, filePath: string): Promise<Record<string, unknown>>;
15
19
  download(resourceType: ResourceType, resourceId: string, filePath: string): Promise<Blob>;
16
20
  }
@@ -7,14 +7,15 @@ export class ResourcesNamespace {
7
7
  return this.http.request("GET", `/files/${resourceType}/${resourceId}/list`, {
8
8
  params: {
9
9
  path: options.path,
10
+ limit: options.limit ?? 100,
11
+ page_token: options.page_token,
10
12
  },
11
13
  });
12
14
  }
13
15
  upload(resourceType, resourceId, file, options = {}) {
14
16
  const formData = new FormData();
15
- const fieldName = options.fieldName ?? "file";
16
17
  const name = options.name ?? (file instanceof File ? file.name : "upload.bin");
17
- formData.append(fieldName, file, name);
18
+ formData.append("file", file, name);
18
19
  return this.http.request("POST", `/files/${resourceType}/${resourceId}/upload`, {
19
20
  params: {
20
21
  path: options.path,
@@ -14,14 +14,14 @@ export declare class TablesNamespace {
14
14
  list(datastore: string, options?: {
15
15
  limit?: number;
16
16
  pageToken?: string;
17
- }): Promise<import("../index.js").TableListResponse>;
18
- create(datastore: string, payload: CreateTableInput): Promise<import("../index.js").TableResponse>;
19
- get(datastore: string, tableName: string): Promise<import("../index.js").TableResponse>;
20
- update(datastore: string, tableName: string, payload: UpdateTableRequest): Promise<import("../index.js").TableResponse>;
21
- delete(datastore: string, tableName: string): Promise<import("../index.js").DatastoreMessageResponse>;
17
+ }): Promise<import("../types.js").TableListResponse>;
18
+ create(datastore: string, payload: CreateTableInput): Promise<import("../types.js").TableResponse>;
19
+ get(datastore: string, tableName: string): Promise<import("../types.js").TableResponse>;
20
+ update(datastore: string, tableName: string, payload: UpdateTableRequest): Promise<import("../types.js").TableResponse>;
21
+ delete(datastore: string, tableName: string): Promise<import("../types.js").DatastoreMessageResponse>;
22
22
  readonly columns: {
23
- add: (datastore: string, tableName: string, request: AddColumnRequest | AddColumnRequest["column"]) => Promise<import("../index.js").TableResponse>;
24
- remove: (datastore: string, tableName: string, columnName: string) => Promise<import("../index.js").DatastoreMessageResponse>;
23
+ add: (datastore: string, tableName: string, request: AddColumnRequest | AddColumnRequest["column"]) => Promise<import("../types.js").TableResponse>;
24
+ remove: (datastore: string, tableName: string, columnName: string) => Promise<import("../types.js").DatastoreMessageResponse>;
25
25
  };
26
26
  }
27
27
  export {};
@@ -1,28 +1,29 @@
1
1
  import type { HttpClient } from "../http.js";
2
- import type { CreateTaskOptions } from "../types.js";
2
+ import type { AddMessageRequest } from "../openapi_client/models/AddMessageRequest.js";
3
+ import type { CreateTaskRequest } from "../openapi_client/models/CreateTaskRequest.js";
4
+ import type { TaskListResponse } from "../openapi_client/models/TaskListResponse.js";
5
+ import type { TaskMessageListResponse } from "../openapi_client/models/TaskMessageListResponse.js";
6
+ import type { TaskResponse } from "../openapi_client/models/TaskResponse.js";
3
7
  export declare class TasksNamespace {
4
8
  private readonly http;
5
9
  private readonly podId;
6
10
  constructor(http: HttpClient, podId: () => string);
7
11
  list(options?: {
8
- agentName?: string;
9
- agentId?: string;
12
+ agent_name?: string;
10
13
  limit?: number;
11
- pageToken?: string;
12
- cursor?: string;
13
- }): Promise<unknown>;
14
- create(options: CreateTaskOptions): Promise<unknown>;
15
- get(taskId: string): Promise<unknown>;
16
- stop(taskId: string): Promise<unknown>;
14
+ page_token?: string;
15
+ }): Promise<TaskListResponse>;
16
+ create(payload: CreateTaskRequest): Promise<TaskResponse>;
17
+ get(taskId: string): Promise<TaskResponse>;
18
+ stop(taskId: string): Promise<TaskResponse>;
17
19
  stream(taskId: string, options?: {
18
20
  signal?: AbortSignal;
19
21
  }): Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>;
20
22
  readonly messages: {
21
23
  list: (taskId: string, options?: {
22
24
  limit?: number;
23
- pageToken?: string;
24
- cursor?: string;
25
- }) => Promise<unknown>;
26
- add: (taskId: string, content: string) => Promise<unknown>;
25
+ page_token?: string;
26
+ }) => Promise<TaskMessageListResponse>;
27
+ add: (taskId: string, payload: AddMessageRequest) => Promise<TaskResponse>;
27
28
  };
28
29
  }