lemma-sdk 0.2.2 → 0.2.3

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.
@@ -1241,8 +1241,7 @@ class AssistantsNamespace {
1241
1241
  return this.http.request("GET", `/pods/${this.podId()}/assistants`, {
1242
1242
  params: {
1243
1243
  limit: options.limit ?? 100,
1244
- page_token: options.pageToken ?? options.cursor,
1245
- cursor: options.cursor,
1244
+ page_token: options.page_token,
1246
1245
  },
1247
1246
  });
1248
1247
  }
@@ -1269,16 +1268,14 @@ class ConversationsNamespace {
1269
1268
  this.messages = {
1270
1269
  list: (conversationId, options = {}) => this.http.request("GET", `/conversations/${conversationId}/messages`, {
1271
1270
  params: {
1272
- pod_id: this.resolvePodId(options.podId),
1271
+ pod_id: this.resolvePodId(options.pod_id),
1273
1272
  limit: options.limit ?? 20,
1274
- page_token: options.pageToken ?? options.cursor,
1275
- cursor: options.cursor,
1276
- order: options.order,
1273
+ page_token: options.page_token,
1277
1274
  },
1278
1275
  }),
1279
1276
  send: (conversationId, payload, options = {}) => this.http.request("POST", `/conversations/${conversationId}/messages`, {
1280
1277
  params: {
1281
- pod_id: this.resolvePodId(options.podId),
1278
+ pod_id: this.resolvePodId(options.pod_id),
1282
1279
  },
1283
1280
  body: payload,
1284
1281
  }),
@@ -1305,58 +1302,55 @@ class ConversationsNamespace {
1305
1302
  list(options = {}) {
1306
1303
  return this.http.request("GET", "/conversations", {
1307
1304
  params: {
1308
- assistant_id: options.assistantName ?? options.assistantId,
1309
- pod_id: this.resolvePodId(options.podId),
1310
- organization_id: options.organizationId,
1305
+ assistant_id: options.assistant_id,
1306
+ pod_id: this.resolvePodId(options.pod_id),
1307
+ organization_id: options.organization_id,
1311
1308
  limit: options.limit ?? 20,
1312
- page_token: options.pageToken ?? options.cursor,
1313
- cursor: options.cursor,
1309
+ page_token: options.page_token,
1314
1310
  },
1315
1311
  });
1316
1312
  }
1317
- listByAssistant(assistantName, options = {}) {
1318
- return this.list({ ...options, assistantName });
1313
+ listByAssistant(assistantId, options = {}) {
1314
+ return this.list({ ...options, assistant_id: assistantId });
1319
1315
  }
1320
1316
  create(payload) {
1321
1317
  return this.http.request("POST", "/conversations", {
1322
1318
  body: {
1323
1319
  ...payload,
1324
- assistant_id: payload.assistant_id ?? payload.assistant_name,
1325
1320
  pod_id: this.resolvePodId(payload.pod_id),
1326
1321
  },
1327
1322
  });
1328
1323
  }
1329
- createForAssistant(assistantName, payload = {}) {
1324
+ createForAssistant(assistantId, payload = {}) {
1330
1325
  return this.create({
1331
1326
  ...payload,
1332
- assistant_name: assistantName,
1333
- pod_id: payload.pod_id,
1327
+ assistant_id: assistantId,
1334
1328
  });
1335
1329
  }
1336
1330
  get(conversationId, options = {}) {
1337
1331
  return this.http.request("GET", `/conversations/${conversationId}`, {
1338
1332
  params: {
1339
- pod_id: this.resolvePodId(options.podId),
1333
+ pod_id: this.resolvePodId(options.pod_id),
1340
1334
  },
1341
1335
  });
1342
1336
  }
1343
1337
  update(conversationId, payload, options = {}) {
1344
1338
  return this.http.request("PATCH", `/conversations/${conversationId}`, {
1345
1339
  params: {
1346
- pod_id: this.resolvePodId(options.podId),
1340
+ pod_id: this.resolvePodId(options.pod_id),
1347
1341
  },
1348
1342
  body: payload,
1349
1343
  });
1350
1344
  }
1351
1345
  delete(conversationId, options = {}) {
1352
- const scopedPodId = this.requirePodId(options.podId);
1346
+ const scopedPodId = this.requirePodId(options.pod_id);
1353
1347
  return this.http.request("DELETE", `/pods/${scopedPodId}/conversations/${conversationId}`);
1354
1348
  }
1355
1349
  sendMessageStream(conversationId, payload, options = {}) {
1356
1350
  return this.http.stream(`/conversations/${conversationId}/messages`, {
1357
1351
  method: "POST",
1358
1352
  params: {
1359
- pod_id: this.resolvePodId(options.podId),
1353
+ pod_id: this.resolvePodId(options.pod_id),
1360
1354
  },
1361
1355
  body: payload,
1362
1356
  signal: options.signal,
@@ -1369,7 +1363,7 @@ class ConversationsNamespace {
1369
1363
  resumeStream(conversationId, options = {}) {
1370
1364
  return this.http.stream(`/conversations/${conversationId}/stream`, {
1371
1365
  params: {
1372
- pod_id: this.resolvePodId(options.podId),
1366
+ pod_id: this.resolvePodId(options.pod_id),
1373
1367
  },
1374
1368
  signal: options.signal,
1375
1369
  headers: {
@@ -1380,7 +1374,7 @@ class ConversationsNamespace {
1380
1374
  stopRun(conversationId, options = {}) {
1381
1375
  return this.http.request("PATCH", `/conversations/${conversationId}/stop`, {
1382
1376
  params: {
1383
- pod_id: this.resolvePodId(options.podId),
1377
+ pod_id: this.resolvePodId(options.pod_id),
1384
1378
  },
1385
1379
  body: {},
1386
1380
  });
@@ -3973,14 +3967,15 @@ class ResourcesNamespace {
3973
3967
  return this.http.request("GET", `/files/${resourceType}/${resourceId}/list`, {
3974
3968
  params: {
3975
3969
  path: options.path,
3970
+ limit: options.limit ?? 100,
3971
+ page_token: options.page_token,
3976
3972
  },
3977
3973
  });
3978
3974
  }
3979
3975
  upload(resourceType, resourceId, file, options = {}) {
3980
3976
  const formData = new FormData();
3981
- const fieldName = options.fieldName ?? "file";
3982
3977
  const name = options.name ?? (file instanceof File ? file.name : "upload.bin");
3983
- formData.append(fieldName, file, name);
3978
+ formData.append("file", file, name);
3984
3979
  return this.http.request("POST", `/files/${resourceType}/${resourceId}/upload`, {
3985
3980
  params: {
3986
3981
  path: options.path,
@@ -4242,12 +4237,10 @@ class TasksNamespace {
4242
4237
  list: (taskId, options = {}) => this.http.request("GET", `/pods/${this.podId()}/tasks/${taskId}/messages`, {
4243
4238
  params: {
4244
4239
  limit: options.limit ?? 100,
4245
- page_token: options.pageToken ?? options.cursor,
4246
- cursor: options.cursor,
4240
+ page_token: options.page_token,
4247
4241
  },
4248
4242
  }),
4249
- add: (taskId, content) => {
4250
- const payload = { content };
4243
+ add: (taskId, payload) => {
4251
4244
  return this.http.request("POST", `/pods/${this.podId()}/tasks/${taskId}/messages`, {
4252
4245
  body: payload,
4253
4246
  });
@@ -4257,25 +4250,15 @@ class TasksNamespace {
4257
4250
  list(options = {}) {
4258
4251
  return this.http.request("GET", `/pods/${this.podId()}/tasks`, {
4259
4252
  params: {
4260
- agent_name: options.agentName,
4261
- agent_id: options.agentId,
4253
+ agent_name: options.agent_name,
4262
4254
  limit: options.limit ?? 100,
4263
- page_token: options.pageToken ?? options.cursor,
4264
- cursor: options.cursor,
4255
+ page_token: options.page_token,
4265
4256
  },
4266
4257
  });
4267
4258
  }
4268
- create(options) {
4269
- if (!options.agentId && !options.agentName) {
4270
- throw new Error("Either agentId or agentName is required.");
4271
- }
4259
+ create(payload) {
4272
4260
  return this.http.request("POST", `/pods/${this.podId()}/tasks`, {
4273
- body: {
4274
- agent_id: options.agentId,
4275
- agent_name: options.agentName ?? options.agentId,
4276
- input_data: options.input,
4277
- runtime_account_ids: options.runtimeAccountIds,
4278
- },
4261
+ body: payload,
4279
4262
  });
4280
4263
  }
4281
4264
  get(taskId) {
package/dist/index.d.ts CHANGED
@@ -3,10 +3,9 @@ export type { LemmaConfig } from "./client.js";
3
3
  export { AuthManager } from "./auth.js";
4
4
  export type { AuthState, AuthListener, AuthStatus, UserInfo } from "./auth.js";
5
5
  export { ApiError } from "./http.js";
6
- export type { Agent, Assistant, Conversation, ConversationMessage, ConversationModel, CreateAgentInput, CreateAssistantInput, CreateTaskOptions, CursorPage, ListRecordsOptions, Organization, OrganizationInvitation, OrganizationMember, Pod, PodConfig, PodMember, RecordFilter, RecordSort, RunFunctionOptions, StreamOptions, Task, TaskMessage, UpdateAgentInput, UpdateAssistantInput, UploadedIcon, User, WorkflowRunInputs, } from "./types.js";
6
+ export * from "./types.js";
7
7
  export { readSSE, parseSSEJson } from "./streams.js";
8
8
  export type { SseRawEvent } from "./streams.js";
9
- export * from "./openapi_client/index.js";
10
9
  export type { AgentsNamespace } from "./namespaces/agents.js";
11
10
  export type { AssistantsNamespace, ConversationsNamespace } from "./namespaces/assistants.js";
12
11
  export type { DatastoresNamespace } from "./namespaces/datastores.js";
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { LemmaClient } from "./client.js";
2
2
  export { AuthManager } from "./auth.js";
3
3
  export { ApiError } from "./http.js";
4
+ export * from "./types.js";
4
5
  export { readSSE, parseSSEJson } from "./streams.js";
5
- export * from "./openapi_client/index.js";
@@ -8,9 +8,9 @@ export declare class AgentsNamespace {
8
8
  list(options?: {
9
9
  limit?: number;
10
10
  pageToken?: string;
11
- }): Promise<import("../index.js").AgentListResponse>;
12
- create(payload: CreateAgentRequest): Promise<import("../index.js").AgentResponse>;
13
- get(agentName: string): Promise<import("../index.js").AgentResponse>;
14
- update(agentName: string, payload: UpdateAgentRequest): Promise<import("../index.js").AgentResponse>;
15
- delete(agentName: string): Promise<import("../index.js").AgentMessageResponse>;
11
+ }): Promise<import("../types.js").AgentListResponse>;
12
+ create(payload: CreateAgentRequest): Promise<import("../types.js").AgentResponse>;
13
+ get(agentName: string): Promise<import("../types.js").AgentResponse>;
14
+ update(agentName: string, payload: UpdateAgentRequest): Promise<import("../types.js").AgentResponse>;
15
+ delete(agentName: string): Promise<import("../types.js").AgentMessageResponse>;
16
16
  }
@@ -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
  }
@@ -8,25 +8,15 @@ export class TasksNamespace {
8
8
  list(options = {}) {
9
9
  return this.http.request("GET", `/pods/${this.podId()}/tasks`, {
10
10
  params: {
11
- agent_name: options.agentName,
12
- agent_id: options.agentId,
11
+ agent_name: options.agent_name,
13
12
  limit: options.limit ?? 100,
14
- page_token: options.pageToken ?? options.cursor,
15
- cursor: options.cursor,
13
+ page_token: options.page_token,
16
14
  },
17
15
  });
18
16
  }
19
- create(options) {
20
- if (!options.agentId && !options.agentName) {
21
- throw new Error("Either agentId or agentName is required.");
22
- }
17
+ create(payload) {
23
18
  return this.http.request("POST", `/pods/${this.podId()}/tasks`, {
24
- body: {
25
- agent_id: options.agentId,
26
- agent_name: options.agentName ?? options.agentId,
27
- input_data: options.input,
28
- runtime_account_ids: options.runtimeAccountIds,
29
- },
19
+ body: payload,
30
20
  });
31
21
  }
32
22
  get(taskId) {
@@ -47,12 +37,10 @@ export class TasksNamespace {
47
37
  list: (taskId, options = {}) => this.http.request("GET", `/pods/${this.podId()}/tasks/${taskId}/messages`, {
48
38
  params: {
49
39
  limit: options.limit ?? 100,
50
- page_token: options.pageToken ?? options.cursor,
51
- cursor: options.cursor,
40
+ page_token: options.page_token,
52
41
  },
53
42
  }),
54
- add: (taskId, content) => {
55
- const payload = { content };
43
+ add: (taskId, payload) => {
56
44
  return this.http.request("POST", `/pods/${this.podId()}/tasks/${taskId}/messages`, {
57
45
  body: payload,
58
46
  });
@@ -3,7 +3,7 @@ import type { UserProfileRequest } from "../openapi_client/models/UserProfileReq
3
3
  export declare class UsersNamespace {
4
4
  private readonly client;
5
5
  constructor(client: GeneratedClientAdapter);
6
- current(): Promise<import("../index.js").UserResponse>;
7
- getProfile(): Promise<import("../index.js").UserResponse>;
8
- upsertProfile(payload: UserProfileRequest): Promise<import("../index.js").UserResponse>;
6
+ current(): Promise<import("../types.js").UserResponse>;
7
+ getProfile(): Promise<import("../types.js").UserResponse>;
8
+ upsertProfile(payload: UserProfileRequest): Promise<import("../types.js").UserResponse>;
9
9
  }
@@ -13,28 +13,28 @@ export declare class WorkflowsNamespace {
13
13
  list(options?: {
14
14
  limit?: number;
15
15
  pageToken?: string;
16
- }): Promise<import("../index.js").WorkflowListResponse>;
17
- create(payload: WorkflowCreateRequest): Promise<import("../index.js").FlowEntity>;
18
- get(workflowName: string): Promise<import("../index.js").FlowEntity>;
19
- update(workflowName: string, payload: WorkflowUpdateRequest): Promise<import("../index.js").FlowEntity>;
16
+ }): Promise<import("../types.js").WorkflowListResponse>;
17
+ create(payload: WorkflowCreateRequest): Promise<import("../types.js").FlowEntity>;
18
+ get(workflowName: string): Promise<import("../types.js").FlowEntity>;
19
+ update(workflowName: string, payload: WorkflowUpdateRequest): Promise<import("../types.js").FlowEntity>;
20
20
  delete(workflowName: string): Promise<void>;
21
21
  visualize(workflowName: string): Promise<string>;
22
22
  readonly graph: {
23
- update: (workflowName: string, graph: WorkflowGraphUpdateRequest) => Promise<import("../index.js").FlowEntity>;
23
+ update: (workflowName: string, graph: WorkflowGraphUpdateRequest) => Promise<import("../types.js").FlowEntity>;
24
24
  };
25
25
  readonly installs: {
26
- create: (workflowName: string, payload?: WorkflowInstallRequest) => Promise<import("../index.js").FlowInstallEntity>;
26
+ create: (workflowName: string, payload?: WorkflowInstallRequest) => Promise<import("../types.js").FlowInstallEntity>;
27
27
  delete: (workflowName: string, installId: string) => Promise<void>;
28
28
  };
29
29
  private postRunAction;
30
30
  readonly runs: {
31
- start: (workflowName: string, inputs?: WorkflowRunInputs) => Promise<import("../index.js").FlowRunEntity>;
31
+ start: (workflowName: string, inputs?: WorkflowRunInputs) => Promise<import("../types.js").FlowRunEntity>;
32
32
  list: (workflowName: string, options?: {
33
33
  limit?: number;
34
34
  pageToken?: string;
35
- }) => Promise<import("../index.js").WorkflowRunListResponse>;
36
- get: (runId: string, podId?: string) => Promise<import("../index.js").FlowRunEntity>;
37
- resume: (runId: string, inputs?: WorkflowRunInputs, podId?: string) => Promise<import("../index.js").FlowRunEntity>;
35
+ }) => Promise<import("../types.js").WorkflowRunListResponse>;
36
+ get: (runId: string, podId?: string) => Promise<import("../types.js").FlowRunEntity>;
37
+ resume: (runId: string, inputs?: WorkflowRunInputs, podId?: string) => Promise<import("../types.js").FlowRunEntity>;
38
38
  visualize: (runId: string, podId?: string) => Promise<string>;
39
39
  cancel: (runId: string, podId?: string) => Promise<Record<string, unknown>>;
40
40
  retry: (runId: string, podId?: string) => Promise<Record<string, unknown>>;
package/dist/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { RecordFilter as GeneratedRecordFilter } from "./openapi_client/models/RecordFilter.js";
2
2
  import type { RecordSort as GeneratedRecordSort } from "./openapi_client/models/RecordSort.js";
3
- import type { AgentResponse, AssistantResponse, AvailableModels, ConversationMessageResponse, ConversationResponse, CreateAgentRequest, CreateAssistantRequest, IconUploadResponse, OrganizationInvitationResponse, OrganizationMemberResponse, OrganizationResponse, PodConfigResponse, PodMemberResponse, PodResponse, TaskMessageResponse, TaskResponse, UpdateAgentRequest, UpdateAssistantRequest, UserResponse } from "./openapi_client/index.js";
3
+ import type { AgentResponse, AssistantResponse, AvailableModels, ConversationMessageResponse, ConversationResponse, CreateAgentRequest, CreateAssistantRequest, CreateTaskRequest, IconUploadResponse, OrganizationInvitationResponse, OrganizationMemberResponse, OrganizationResponse, PodConfigResponse, PodMemberResponse, PodResponse, TaskMessageResponse, TaskResponse, UpdateAgentRequest, UpdateAssistantRequest, UserResponse } from "./openapi_client/index.js";
4
4
  /** Public ergonomic types. */
5
5
  export interface PageResult<T> {
6
6
  items: T[];
@@ -23,14 +23,8 @@ export interface RunFunctionOptions {
23
23
  /** Input payload for the function */
24
24
  input?: Record<string, unknown>;
25
25
  }
26
- export interface CreateTaskOptions {
27
- /** Preferred field in newer APIs */
28
- agentId?: string;
29
- /** Backward-compatible alias supported by older APIs */
30
- agentName?: string;
31
- input?: Record<string, unknown>;
32
- runtimeAccountIds?: string[];
33
- }
26
+ /** Alias kept for backward compatibility; shape follows generated OpenAPI schema exactly. */
27
+ export type CreateTaskOptions = CreateTaskRequest;
34
28
  export interface WorkflowRunInputs {
35
29
  [key: string]: unknown;
36
30
  }
@@ -63,3 +57,8 @@ export interface CursorPage<T> {
63
57
  limit: number;
64
58
  next_page_token?: string | null;
65
59
  }
60
+ /**
61
+ * Re-export generated OpenAPI models/enums/services from the same module so this
62
+ * file remains the single public type surface for the SDK.
63
+ */
64
+ export * from "./openapi_client/index.js";
package/dist/types.js CHANGED
@@ -1 +1,5 @@
1
- export {};
1
+ /**
2
+ * Re-export generated OpenAPI models/enums/services from the same module so this
3
+ * file remains the single public type surface for the SDK.
4
+ */
5
+ export * from "./openapi_client/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lemma-sdk",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Official TypeScript SDK for Lemma pod-scoped APIs",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",