lemma-sdk 0.2.45 → 0.2.46

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.
Files changed (56) hide show
  1. package/dist/assistant-events.js +12 -2
  2. package/dist/browser/lemma-client.js +56 -84
  3. package/dist/client.js +1 -1
  4. package/dist/hey_client/types.gen.d.ts +2 -14
  5. package/dist/namespaces/conversations.d.ts +2 -2
  6. package/dist/namespaces/integrations.d.ts +2 -4
  7. package/dist/namespaces/integrations.js +2 -2
  8. package/dist/namespaces/records.d.ts +3 -9
  9. package/dist/namespaces/records.js +4 -33
  10. package/dist/openapi_client/index.d.ts +3 -5
  11. package/dist/openapi_client/index.js +2 -0
  12. package/dist/openapi_client/models/AgentToolset.d.ts +2 -1
  13. package/dist/openapi_client/models/AgentToolset.js +1 -0
  14. package/dist/openapi_client/models/AppTriggerResponseSchema.d.ts +2 -0
  15. package/dist/openapi_client/models/ApprovalDecisionResponse.d.ts +6 -0
  16. package/dist/openapi_client/models/AuthProvider.d.ts +4 -0
  17. package/dist/openapi_client/models/AuthProvider.js +9 -0
  18. package/dist/openapi_client/models/FlowRunStatus.d.ts +3 -2
  19. package/dist/openapi_client/models/FlowRunStatus.js +3 -2
  20. package/dist/openapi_client/models/MessageKind.d.ts +14 -0
  21. package/dist/openapi_client/models/MessageKind.js +19 -0
  22. package/dist/openapi_client/models/MessageResponse.d.ts +5 -6
  23. package/dist/openapi_client/models/WorkflowRunResponse.d.ts +2 -2
  24. package/dist/openapi_client/services/AgentConversationsService.d.ts +5 -5
  25. package/dist/openapi_client/services/AgentConversationsService.js +3 -3
  26. package/dist/openapi_client/services/ApplicationsService.d.ts +19 -19
  27. package/dist/openapi_client/services/ApplicationsService.js +48 -44
  28. package/dist/openapi_client/services/RecordsService.d.ts +1 -3
  29. package/dist/openapi_client/services/RecordsService.js +1 -5
  30. package/dist/react/assistant-output.d.ts +6 -0
  31. package/dist/react/assistant-output.js +16 -0
  32. package/dist/react/useAssistantController.d.ts +8 -1
  33. package/dist/react/useAssistantController.js +87 -250
  34. package/dist/react/useAssistantRuntime.js +6 -17
  35. package/dist/react/useAssistantSession.d.ts +4 -2
  36. package/dist/react/useAssistantSession.js +6 -7
  37. package/dist/react/useConversationMessages.d.ts +2 -2
  38. package/dist/react/useConversationMessages.js +3 -5
  39. package/dist/react/useRecords.d.ts +1 -1
  40. package/dist/react/useRecords.js +2 -13
  41. package/dist/react/useReferencingRecords.d.ts +4 -6
  42. package/dist/react/useReferencingRecords.js +5 -5
  43. package/dist/react/useReverseRelatedRecords.d.ts +3 -4
  44. package/dist/react/useReverseRelatedRecords.js +5 -5
  45. package/dist/types.d.ts +12 -6
  46. package/package.json +1 -1
  47. package/dist/openapi_client/models/NotificationContent.d.ts +0 -4
  48. package/dist/openapi_client/models/TextContent.d.ts +0 -4
  49. package/dist/openapi_client/models/TextContent.js +0 -1
  50. package/dist/openapi_client/models/ThinkingContent.d.ts +0 -4
  51. package/dist/openapi_client/models/ThinkingContent.js +0 -1
  52. package/dist/openapi_client/models/ToolCallContent.d.ts +0 -6
  53. package/dist/openapi_client/models/ToolCallContent.js +0 -1
  54. package/dist/openapi_client/models/ToolReturnContent.d.ts +0 -6
  55. package/dist/openapi_client/models/ToolReturnContent.js +0 -1
  56. /package/dist/openapi_client/models/{NotificationContent.js → ApprovalDecisionResponse.js} +0 -0
@@ -29,13 +29,23 @@ function toConversationMessage(value) {
29
29
  return undefined;
30
30
  if (typeof value.role !== "string")
31
31
  return undefined;
32
- if (!("content" in value))
32
+ // Flat shape: every persisted message carries a `kind` discriminator. The old
33
+ // nested `content` object is gone.
34
+ if (typeof value.kind !== "string")
33
35
  return undefined;
34
36
  const message = {
35
37
  id: value.id,
36
38
  role: value.role,
37
- content: value.content,
39
+ kind: value.kind,
40
+ text: typeof value.text === "string" ? value.text : null,
41
+ tool_name: typeof value.tool_name === "string" ? value.tool_name : null,
42
+ tool_call_id: typeof value.tool_call_id === "string" ? value.tool_call_id : null,
43
+ tool_args: "tool_args" in value ? value.tool_args : null,
44
+ tool_result: "tool_result" in value ? value.tool_result : null,
38
45
  created_at: typeof value.created_at === "string" ? value.created_at : new Date().toISOString(),
46
+ conversation_id: typeof value.conversation_id === "string" ? value.conversation_id : undefined,
47
+ sequence: typeof value.sequence === "number" ? value.sequence : undefined,
48
+ agent_run_id: typeof value.agent_run_id === "string" ? value.agent_run_id : null,
39
49
  metadata: isRecord(value.metadata) ? value.metadata : null,
40
50
  };
41
51
  return message;
@@ -75,7 +75,7 @@ class LemmaClient {
75
75
  return this._currentPodId;
76
76
  };
77
77
  this.tables = new tables_js_1.TablesNamespace(this._generated, podIdFn);
78
- this.records = new records_js_1.RecordsNamespace(this._generated, this._http, podIdFn);
78
+ this.records = new records_js_1.RecordsNamespace(this._generated, podIdFn);
79
79
  this.files = new files_js_1.FilesNamespace(this._generated, this._http, podIdFn);
80
80
  this.functions = new functions_js_1.FunctionsNamespace(this._generated, podIdFn);
81
81
  this.agents = new agents_js_1.AgentsNamespace(this._generated, podIdFn);
@@ -3059,8 +3059,8 @@ class IntegrationsNamespace {
3059
3059
  },
3060
3060
  };
3061
3061
  this.triggers = {
3062
- list: (options = {}) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationTriggerList(options.applicationId, options.search, options.limit ?? 100, options.pageToken)),
3063
- get: (triggerId) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationTriggerGet(triggerId)),
3062
+ list: (scope, options = {}) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationTriggerList(scope.organizationId, scope.authConfigName, options.search, options.limit ?? 100)),
3063
+ get: (scope, triggerName) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationTriggerGet(scope.organizationId, scope.authConfigName, triggerName)),
3064
3064
  };
3065
3065
  this.accounts = {
3066
3066
  list: (organizationId, options = {}) => this.client.request(() => IntegrationsService_js_1.IntegrationsService.integrationAccountList(organizationId, options.applicationId, options.limit ?? 100, options.pageToken)),
@@ -3214,50 +3214,6 @@ class ApplicationsService {
3214
3214
  },
3215
3215
  });
3216
3216
  }
3217
- /**
3218
- * List Triggers
3219
- * Get all triggers. Optionally filter by application_id and search in description
3220
- * @param applicationId
3221
- * @param search
3222
- * @param limit
3223
- * @param pageToken
3224
- * @returns AppTriggerListResponseSchema Successful Response
3225
- * @throws ApiError
3226
- */
3227
- static applicationTriggerList(applicationId, search, limit = 100, pageToken) {
3228
- return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3229
- method: 'GET',
3230
- url: '/integrations/applications/triggers',
3231
- query: {
3232
- 'application_id': applicationId,
3233
- 'search': search,
3234
- 'limit': limit,
3235
- 'page_token': pageToken,
3236
- },
3237
- errors: {
3238
- 422: `Validation Error`,
3239
- },
3240
- });
3241
- }
3242
- /**
3243
- * Get Trigger
3244
- * Get a specific trigger by ID
3245
- * @param triggerId
3246
- * @returns AppTriggerResponseSchema Successful Response
3247
- * @throws ApiError
3248
- */
3249
- static applicationTriggerGet(triggerId) {
3250
- return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3251
- method: 'GET',
3252
- url: '/integrations/applications/triggers/{trigger_id}',
3253
- path: {
3254
- 'trigger_id': triggerId,
3255
- },
3256
- errors: {
3257
- 422: `Validation Error`,
3258
- },
3259
- });
3260
- }
3261
3217
  /**
3262
3218
  * Get Application
3263
3219
  * Get a specific application by ID along with its operation catalog
@@ -3396,6 +3352,54 @@ class ApplicationsService {
3396
3352
  },
3397
3353
  });
3398
3354
  }
3355
+ /**
3356
+ * List Application Triggers
3357
+ * @param organizationId
3358
+ * @param authConfigName
3359
+ * @param search
3360
+ * @param limit
3361
+ * @returns AppTriggerListResponseSchema Successful Response
3362
+ * @throws ApiError
3363
+ */
3364
+ static applicationTriggerList(organizationId, authConfigName, search, limit = 100) {
3365
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3366
+ method: 'GET',
3367
+ url: '/organizations/{organization_id}/integrations/{auth_config_name}/triggers',
3368
+ path: {
3369
+ 'organization_id': organizationId,
3370
+ 'auth_config_name': authConfigName,
3371
+ },
3372
+ query: {
3373
+ 'search': search,
3374
+ 'limit': limit,
3375
+ },
3376
+ errors: {
3377
+ 422: `Validation Error`,
3378
+ },
3379
+ });
3380
+ }
3381
+ /**
3382
+ * Get Application Trigger
3383
+ * @param organizationId
3384
+ * @param authConfigName
3385
+ * @param triggerName
3386
+ * @returns AppTriggerResponseSchema Successful Response
3387
+ * @throws ApiError
3388
+ */
3389
+ static applicationTriggerGet(organizationId, authConfigName, triggerName) {
3390
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3391
+ method: 'GET',
3392
+ url: '/organizations/{organization_id}/integrations/{auth_config_name}/triggers/{trigger_name}',
3393
+ path: {
3394
+ 'organization_id': organizationId,
3395
+ 'auth_config_name': authConfigName,
3396
+ 'trigger_name': triggerName,
3397
+ },
3398
+ errors: {
3399
+ 422: `Validation Error`,
3400
+ },
3401
+ });
3402
+ }
3399
3403
  }
3400
3404
  exports.ApplicationsService = ApplicationsService;
3401
3405
 
@@ -5146,9 +5150,6 @@ exports.AgentSurfacesService = AgentSurfacesService;
5146
5150
  Object.defineProperty(exports, "__esModule", { value: true });
5147
5151
  exports.RecordsNamespace = void 0;
5148
5152
  const RecordsService_js_1 = require("./openapi_client/services/RecordsService.js");
5149
- function getRecordsPath(podId, table) {
5150
- return `/pods/${encodeURIComponent(podId)}/datastore/tables/${encodeURIComponent(table)}/records`;
5151
- }
5152
5153
  function serializeFilters(filters) {
5153
5154
  if (!filters || filters.length === 0) {
5154
5155
  return undefined;
@@ -5162,9 +5163,8 @@ function serializeSort(sort) {
5162
5163
  return sort.map((entry) => JSON.stringify(entry));
5163
5164
  }
5164
5165
  class RecordsNamespace {
5165
- constructor(client, http, podId) {
5166
+ constructor(client, podId) {
5166
5167
  this.client = client;
5167
- this.http = http;
5168
5168
  this.podId = podId;
5169
5169
  this.bulk = {
5170
5170
  create: (table, records) => {
@@ -5182,32 +5182,8 @@ class RecordsNamespace {
5182
5182
  };
5183
5183
  }
5184
5184
  list(table, options = {}) {
5185
- const { filters, sort, limit, pageToken, offset, sortBy, order, params } = options;
5186
- if (filters || sort) {
5187
- return this.client.request(() => RecordsService_js_1.RecordsService.recordList(this.podId(), table, limit ?? 20, offset, sortBy ?? undefined, order ?? "asc", serializeFilters(filters), serializeSort(sort), pageToken));
5188
- }
5189
- const hasCustomParams = typeof offset === "number" ||
5190
- typeof sortBy === "string" ||
5191
- typeof order === "string" ||
5192
- !!params;
5193
- if (hasCustomParams) {
5194
- return this.http.request("GET", getRecordsPath(this.podId(), table), {
5195
- params: {
5196
- limit: limit ?? 20,
5197
- page_token: pageToken,
5198
- offset,
5199
- sort_by: sortBy,
5200
- order,
5201
- ...(params ?? {}),
5202
- },
5203
- });
5204
- }
5205
- return this.client.request(() => RecordsService_js_1.RecordsService.recordList(this.podId(), table, limit ?? 20, offset, sortBy ?? undefined, order ?? "asc", undefined, undefined, pageToken));
5206
- }
5207
- listWithParams(table, params) {
5208
- return this.http.request("GET", getRecordsPath(this.podId(), table), {
5209
- params,
5210
- });
5185
+ const { filters, sort, limit, pageToken, offset } = options;
5186
+ return this.client.request(() => RecordsService_js_1.RecordsService.recordList(this.podId(), table, limit ?? 20, offset, serializeFilters(filters), serializeSort(sort), pageToken));
5211
5187
  }
5212
5188
  create(table, data) {
5213
5189
  return this.client.request(() => RecordsService_js_1.RecordsService.recordCreate(this.podId(), table, { data }));
@@ -5222,7 +5198,7 @@ class RecordsNamespace {
5222
5198
  return this.client.request(() => RecordsService_js_1.RecordsService.recordDelete(this.podId(), table, recordId));
5223
5199
  }
5224
5200
  query(table, payload) {
5225
- return this.client.request(() => RecordsService_js_1.RecordsService.recordList(this.podId(), table, payload.limit ?? 20, payload.offset, payload.sort_by ?? undefined, payload.order ?? "asc", serializeFilters(payload.filters), serializeSort(payload.sort), payload.page_token));
5201
+ return this.client.request(() => RecordsService_js_1.RecordsService.recordList(this.podId(), table, payload.limit ?? 20, payload.offset, serializeFilters(payload.filters), serializeSort(payload.sort), payload.page_token));
5226
5202
  }
5227
5203
  }
5228
5204
  exports.RecordsNamespace = RecordsNamespace;
@@ -5242,15 +5218,13 @@ class RecordsService {
5242
5218
  * @param tableName
5243
5219
  * @param limit Max number of rows to return.
5244
5220
  * @param offset Row offset for direct pagination.
5245
- * @param sortBy Optional column name to sort by.
5246
- * @param order Sort direction for `sort_by`: `asc` or `desc`.
5247
5221
  * @param filter Optional repeated JSON filters for advanced comparisons. Each `filter` value must be a JSON object with shape `{"field":"<column_name>","op":"<operator>","value":<comparison_value>}`. Allowed operators are: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `like`, `ilike`. Repeat the query parameter to combine multiple filters with AND semantics. Examples: `filter={"field":"amount","op":"gt","value":100}` and `filter={"field":"status","op":"eq","value":"OPEN"}`.
5248
5222
  * @param sort Optional repeated JSON sort clauses. Each `sort` value must be a JSON object with shape `{"field":"<column_name>","direction":"<direction>"}`. Allowed directions are: `asc`, `desc`. Repeat the query parameter to provide multi-column sorting in priority order. Example: `sort={"field":"created_at","direction":"desc"}`.
5249
5223
  * @param pageToken Opaque token from a previous response page.
5250
5224
  * @returns RecordListResponse Successful Response
5251
5225
  * @throws ApiError
5252
5226
  */
5253
- static recordList(podId, tableName, limit = 20, offset, sortBy, order = 'asc', filter, sort, pageToken) {
5227
+ static recordList(podId, tableName, limit = 20, offset, filter, sort, pageToken) {
5254
5228
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
5255
5229
  method: 'GET',
5256
5230
  url: '/pods/{pod_id}/datastore/tables/{table_name}/records',
@@ -5261,8 +5235,6 @@ class RecordsService {
5261
5235
  query: {
5262
5236
  'limit': limit,
5263
5237
  'offset': offset,
5264
- 'sort_by': sortBy,
5265
- 'order': order,
5266
5238
  'filter': filter,
5267
5239
  'sort': sort,
5268
5240
  'page_token': pageToken,
package/dist/client.js CHANGED
@@ -72,7 +72,7 @@ export class LemmaClient {
72
72
  return this._currentPodId;
73
73
  };
74
74
  this.tables = new TablesNamespace(this._generated, podIdFn);
75
- this.records = new RecordsNamespace(this._generated, this._http, podIdFn);
75
+ this.records = new RecordsNamespace(this._generated, podIdFn);
76
76
  this.files = new FilesNamespace(this._generated, this._http, podIdFn);
77
77
  this.functions = new FunctionsNamespace(this._generated, podIdFn);
78
78
  this.agents = new AgentsNamespace(this._generated, podIdFn);
@@ -9889,28 +9889,16 @@ export type RecordListData = {
9889
9889
  * Row offset for direct pagination.
9890
9890
  */
9891
9891
  offset?: number;
9892
- /**
9893
- * Sort By
9894
- *
9895
- * Optional column name to sort by.
9896
- */
9897
- sort_by?: string | null;
9898
- /**
9899
- * Order
9900
- *
9901
- * Sort direction for `sort_by`: `asc` or `desc`.
9902
- */
9903
- order?: string;
9904
9892
  /**
9905
9893
  * Filter
9906
9894
  *
9907
- * Optional repeated JSON filters for advanced comparisons. Each `filter` value must be a JSON object with shape `{"field":"<column_name>","op":"<operator>","value":<comparison_value>}`. Allowed operators are: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `like`, `ilike`. Repeat the query parameter to combine multiple filters with AND semantics. Examples: `filter={"field":"amount","op":"gt","value":100}` and `filter={"field":"status","op":"eq","value":"OPEN"}`.
9895
+ * Optional repeated JSON filters for advanced comparisons. Each `filter` value must be a JSON object with shape `{"field":"<column_name>","op":"<operator>","value":<comparison_value>}`. Repeat the query parameter to combine filters with AND semantics.
9908
9896
  */
9909
9897
  filter?: Array<string> | null;
9910
9898
  /**
9911
9899
  * Sort
9912
9900
  *
9913
- * Optional repeated JSON sort clauses. Each `sort` value must be a JSON object with shape `{"field":"<column_name>","direction":"<direction>"}`. Allowed directions are: `asc`, `desc`. Repeat the query parameter to provide multi-column sorting in priority order. Example: `sort={"field":"created_at","direction":"desc"}`.
9901
+ * Optional repeated JSON sort clauses. Each `sort` value must be a JSON object with shape `{"field":"<column_name>","direction":"<direction>"}`.
9914
9902
  */
9915
9903
  sort?: Array<string> | null;
9916
9904
  /**
@@ -1,9 +1,9 @@
1
1
  import type { HttpClient } from "../http.js";
2
+ import type { ApprovalDecisionResponse } from "../openapi_client/models/ApprovalDecisionResponse.js";
2
3
  import type { AgentRuntimeConfig } from "../openapi_client/models/AgentRuntimeConfig.js";
3
4
  import type { ConversationListResponse } from "../openapi_client/models/ConversationListResponse.js";
4
5
  import type { CreateConversationRequest } from "../openapi_client/models/CreateConversationRequest.js";
5
6
  import type { HarnessKind } from "../openapi_client/models/HarnessKind.js";
6
- import type { MessageResponse } from "../openapi_client/models/MessageResponse.js";
7
7
  import type { ResolveUserApprovalRequest } from "../openapi_client/models/ResolveUserApprovalRequest.js";
8
8
  import type { SendMessageRequest } from "../openapi_client/models/SendMessageRequest.js";
9
9
  import type { UpdateConversationRequest } from "../openapi_client/models/UpdateConversationRequest.js";
@@ -96,7 +96,7 @@ export declare class ConversationsNamespace {
96
96
  }) => Promise<UserApprovalListResponse>;
97
97
  resolve: (conversationId: string, approvalId: string, payload: ResolveUserApprovalInput, options?: {
98
98
  pod_id?: string | null;
99
- }) => Promise<MessageResponse>;
99
+ }) => Promise<ApprovalDecisionResponse>;
100
100
  };
101
101
  }
102
102
  export {};
@@ -44,13 +44,11 @@ export declare class IntegrationsNamespace {
44
44
  };
45
45
  helperAgent(goal: string, appNames: string[]): Promise<import("../types.js").IntegrationHelperAgentResponse>;
46
46
  readonly triggers: {
47
- list: (options?: {
48
- applicationId?: string;
47
+ list: (scope: OperationScope, options?: {
49
48
  search?: string;
50
49
  limit?: number;
51
- pageToken?: string;
52
50
  }) => Promise<import("../types.js").AppTriggerListResponseSchema>;
53
- get: (triggerId: string) => Promise<import("../types.js").AppTriggerResponseSchema>;
51
+ get: (scope: OperationScope, triggerName: string) => Promise<import("../types.js").AppTriggerResponseSchema>;
54
52
  };
55
53
  readonly accounts: {
56
54
  list: (organizationId: string, options?: {
@@ -41,8 +41,8 @@ export class IntegrationsNamespace {
41
41
  return this.client.request(() => AgentToolsService.agentToolIntegrationHelperAgent(body));
42
42
  }
43
43
  triggers = {
44
- list: (options = {}) => this.client.request(() => ApplicationsService.applicationTriggerList(options.applicationId, options.search, options.limit ?? 100, options.pageToken)),
45
- get: (triggerId) => this.client.request(() => ApplicationsService.applicationTriggerGet(triggerId)),
44
+ list: (scope, options = {}) => this.client.request(() => ApplicationsService.applicationTriggerList(scope.organizationId, scope.authConfigName, options.search, options.limit ?? 100)),
45
+ get: (scope, triggerName) => this.client.request(() => ApplicationsService.applicationTriggerGet(scope.organizationId, scope.authConfigName, triggerName)),
46
46
  };
47
47
  accounts = {
48
48
  list: (organizationId, options = {}) => this.client.request(() => IntegrationsService.integrationAccountList(organizationId, options.applicationId, options.limit ?? 100, options.pageToken)),
@@ -1,6 +1,4 @@
1
1
  import type { GeneratedClientAdapter } from "../generated.js";
2
- import type { HttpClient } from "../http.js";
3
- import type { RecordListResponse } from "../openapi_client/models/RecordListResponse.js";
4
2
  import type { ListRecordsOptions, RecordFilter, RecordSort } from "../types.js";
5
3
  export interface RecordQueryRequest {
6
4
  filters?: RecordFilter[];
@@ -8,21 +6,17 @@ export interface RecordQueryRequest {
8
6
  limit?: number;
9
7
  page_token?: string;
10
8
  offset?: number;
11
- sort_by?: string;
12
- order?: "asc" | "desc" | string;
13
9
  }
14
10
  export declare class RecordsNamespace {
15
11
  private readonly client;
16
- private readonly http;
17
12
  private readonly podId;
18
- constructor(client: GeneratedClientAdapter, http: HttpClient, podId: () => string);
19
- list(table: string, options?: ListRecordsOptions): Promise<RecordListResponse>;
20
- listWithParams(table: string, params: Record<string, string | number | boolean | undefined | null>): Promise<RecordListResponse>;
13
+ constructor(client: GeneratedClientAdapter, podId: () => string);
14
+ list(table: string, options?: ListRecordsOptions): Promise<import("../types.js").RecordListResponse>;
21
15
  create(table: string, data: Record<string, unknown>): Promise<Record<string, any>>;
22
16
  get(table: string, recordId: string): Promise<Record<string, any>>;
23
17
  update(table: string, recordId: string, data: Record<string, unknown>): Promise<Record<string, any>>;
24
18
  delete(table: string, recordId: string): Promise<void>;
25
- query(table: string, payload: RecordQueryRequest): Promise<RecordListResponse>;
19
+ query(table: string, payload: RecordQueryRequest): Promise<import("../types.js").RecordListResponse>;
26
20
  readonly bulk: {
27
21
  create: (table: string, records: Record<string, unknown>[]) => Promise<import("../types.js").DatastoreCountResponse>;
28
22
  update: (table: string, records: Record<string, unknown>[]) => Promise<import("../types.js").DatastoreCountResponse>;
@@ -1,7 +1,4 @@
1
1
  import { RecordsService } from "../openapi_client/services/RecordsService.js";
2
- function getRecordsPath(podId, table) {
3
- return `/pods/${encodeURIComponent(podId)}/datastore/tables/${encodeURIComponent(table)}/records`;
4
- }
5
2
  function serializeFilters(filters) {
6
3
  if (!filters || filters.length === 0) {
7
4
  return undefined;
@@ -16,40 +13,14 @@ function serializeSort(sort) {
16
13
  }
17
14
  export class RecordsNamespace {
18
15
  client;
19
- http;
20
16
  podId;
21
- constructor(client, http, podId) {
17
+ constructor(client, podId) {
22
18
  this.client = client;
23
- this.http = http;
24
19
  this.podId = podId;
25
20
  }
26
21
  list(table, options = {}) {
27
- const { filters, sort, limit, pageToken, offset, sortBy, order, params } = options;
28
- if (filters || sort) {
29
- return this.client.request(() => RecordsService.recordList(this.podId(), table, limit ?? 20, offset, sortBy ?? undefined, order ?? "asc", serializeFilters(filters), serializeSort(sort), pageToken));
30
- }
31
- const hasCustomParams = typeof offset === "number" ||
32
- typeof sortBy === "string" ||
33
- typeof order === "string" ||
34
- !!params;
35
- if (hasCustomParams) {
36
- return this.http.request("GET", getRecordsPath(this.podId(), table), {
37
- params: {
38
- limit: limit ?? 20,
39
- page_token: pageToken,
40
- offset,
41
- sort_by: sortBy,
42
- order,
43
- ...(params ?? {}),
44
- },
45
- });
46
- }
47
- return this.client.request(() => RecordsService.recordList(this.podId(), table, limit ?? 20, offset, sortBy ?? undefined, order ?? "asc", undefined, undefined, pageToken));
48
- }
49
- listWithParams(table, params) {
50
- return this.http.request("GET", getRecordsPath(this.podId(), table), {
51
- params,
52
- });
22
+ const { filters, sort, limit, pageToken, offset } = options;
23
+ return this.client.request(() => RecordsService.recordList(this.podId(), table, limit ?? 20, offset, serializeFilters(filters), serializeSort(sort), pageToken));
53
24
  }
54
25
  create(table, data) {
55
26
  return this.client.request(() => RecordsService.recordCreate(this.podId(), table, { data }));
@@ -64,7 +35,7 @@ export class RecordsNamespace {
64
35
  return this.client.request(() => RecordsService.recordDelete(this.podId(), table, recordId));
65
36
  }
66
37
  query(table, payload) {
67
- return this.client.request(() => RecordsService.recordList(this.podId(), table, payload.limit ?? 20, payload.offset, payload.sort_by ?? undefined, payload.order ?? "asc", serializeFilters(payload.filters), serializeSort(payload.sort), payload.page_token));
38
+ return this.client.request(() => RecordsService.recordList(this.podId(), table, payload.limit ?? 20, payload.offset, serializeFilters(payload.filters), serializeSort(payload.sort), payload.page_token));
68
39
  }
69
40
  bulk = {
70
41
  create: (table, records) => {
@@ -34,11 +34,13 @@ export type { ApplicationDetailResponseSchema } from './models/ApplicationDetail
34
34
  export type { ApplicationListResponseSchema } from './models/ApplicationListResponseSchema.js';
35
35
  export type { ApplicationResponseSchema } from './models/ApplicationResponseSchema.js';
36
36
  export type { ApplicationSkillResponse } from './models/ApplicationSkillResponse.js';
37
+ export type { ApprovalDecisionResponse } from './models/ApprovalDecisionResponse.js';
37
38
  export type { AppTriggerListResponseSchema } from './models/AppTriggerListResponseSchema.js';
38
39
  export type { AppTriggerResponseSchema } from './models/AppTriggerResponseSchema.js';
39
40
  export type { AuthConfigCreateSchema } from './models/AuthConfigCreateSchema.js';
40
41
  export type { AuthConfigListResponseSchema } from './models/AuthConfigListResponseSchema.js';
41
42
  export type { AuthConfigResponseSchema } from './models/AuthConfigResponseSchema.js';
43
+ export { AuthProvider } from './models/AuthProvider.js';
42
44
  export { AuthScheme } from './models/AuthScheme.js';
43
45
  export type { BulkCreateRecordsRequest } from './models/BulkCreateRecordsRequest.js';
44
46
  export type { BulkDeleteRecordsRequest } from './models/BulkDeleteRecordsRequest.js';
@@ -144,10 +146,10 @@ export type { LoopNodeConfig } from './models/LoopNodeConfig.js';
144
146
  export type { LoopNodeResponse } from './models/LoopNodeResponse.js';
145
147
  export type { ManualWorkflowStartInput } from './models/ManualWorkflowStartInput.js';
146
148
  export type { ManualWorkflowStartOutput } from './models/ManualWorkflowStartOutput.js';
149
+ export { MessageKind } from './models/MessageKind.js';
147
150
  export type { MessageListResponse } from './models/MessageListResponse.js';
148
151
  export type { MessageResponse } from './models/MessageResponse.js';
149
152
  export type { MessageResponseSchema } from './models/MessageResponseSchema.js';
150
- export type { NotificationContent } from './models/NotificationContent.js';
151
153
  export type { OAuth2DefaultsResponseSchema } from './models/OAuth2DefaultsResponseSchema.js';
152
154
  export type { OauthCredentialsResponseSchema } from './models/OauthCredentialsResponseSchema.js';
153
155
  export type { OperationDetail } from './models/OperationDetail.js';
@@ -244,11 +246,7 @@ export type { SurfaceSetupStatusResponse } from './models/SurfaceSetupStatusResp
244
246
  export type { SurfaceSetupStep } from './models/SurfaceSetupStep.js';
245
247
  export type { TableDetailResponse } from './models/TableDetailResponse.js';
246
248
  export type { TableListResponse } from './models/TableListResponse.js';
247
- export type { TextContent } from './models/TextContent.js';
248
- export type { ThinkingContent } from './models/ThinkingContent.js';
249
249
  export type { ToggleSurfaceRequest } from './models/ToggleSurfaceRequest.js';
250
- export type { ToolCallContent } from './models/ToolCallContent.js';
251
- export type { ToolReturnContent } from './models/ToolReturnContent.js';
252
250
  export type { update } from './models/update.js';
253
251
  export type { UpdateAgentRequest } from './models/UpdateAgentRequest.js';
254
252
  export type { UpdateConversationRequest } from './models/UpdateConversationRequest.js';
@@ -8,6 +8,7 @@ export { OpenAPI } from './core/OpenAPI.js';
8
8
  export { AgentRunApprovalDecision } from './models/AgentRunApprovalDecision.js';
9
9
  export { AgentSurfaceStatus } from './models/AgentSurfaceStatus.js';
10
10
  export { AgentToolset } from './models/AgentToolset.js';
11
+ export { AuthProvider } from './models/AuthProvider.js';
11
12
  export { AuthScheme } from './models/AuthScheme.js';
12
13
  export { ConversationStatus } from './models/ConversationStatus.js';
13
14
  export { ConversationType } from './models/ConversationType.js';
@@ -22,6 +23,7 @@ export { FunctionRunStatus } from './models/FunctionRunStatus.js';
22
23
  export { FunctionStatus } from './models/FunctionStatus.js';
23
24
  export { FunctionType } from './models/FunctionType.js';
24
25
  export { HarnessKind } from './models/HarnessKind.js';
26
+ export { MessageKind } from './models/MessageKind.js';
25
27
  export { OrganizationInvitationStatus } from './models/OrganizationInvitationStatus.js';
26
28
  export { OrganizationRole } from './models/OrganizationRole.js';
27
29
  export { PodAppMode } from './models/PodAppMode.js';
@@ -8,5 +8,6 @@ export declare enum AgentToolset {
8
8
  WEB_SEARCH = "WEB_SEARCH",
9
9
  USER_INTERACTION = "USER_INTERACTION",
10
10
  IMAGE_GENERATION = "IMAGE_GENERATION",
11
- AUDIO_GENERATION = "AUDIO_GENERATION"
11
+ AUDIO_GENERATION = "AUDIO_GENERATION",
12
+ POD = "POD"
12
13
  }
@@ -14,4 +14,5 @@ export var AgentToolset;
14
14
  AgentToolset["USER_INTERACTION"] = "USER_INTERACTION";
15
15
  AgentToolset["IMAGE_GENERATION"] = "IMAGE_GENERATION";
16
16
  AgentToolset["AUDIO_GENERATION"] = "AUDIO_GENERATION";
17
+ AgentToolset["POD"] = "POD";
17
18
  })(AgentToolset || (AgentToolset = {}));
@@ -1,3 +1,4 @@
1
+ import type { AuthProvider } from './AuthProvider.js';
1
2
  /**
2
3
  * Schema for trigger response.
3
4
  */
@@ -9,5 +10,6 @@ export type AppTriggerResponseSchema = {
9
10
  id: string;
10
11
  payload_example: (Record<string, any> | null);
11
12
  payload_schema: (Record<string, any> | null);
13
+ provider: AuthProvider;
12
14
  updated_at: string;
13
15
  };
@@ -0,0 +1,6 @@
1
+ import type { AgentRunApprovalDecision } from './AgentRunApprovalDecision.js';
2
+ export type ApprovalDecisionResponse = {
3
+ approval_id: string;
4
+ decision: AgentRunApprovalDecision;
5
+ status?: string;
6
+ };
@@ -0,0 +1,4 @@
1
+ export declare enum AuthProvider {
2
+ LEMMA = "LEMMA",
3
+ COMPOSIO = "COMPOSIO"
4
+ }
@@ -0,0 +1,9 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ export var AuthProvider;
6
+ (function (AuthProvider) {
7
+ AuthProvider["LEMMA"] = "LEMMA";
8
+ AuthProvider["COMPOSIO"] = "COMPOSIO";
9
+ })(AuthProvider || (AuthProvider = {}));
@@ -2,8 +2,9 @@
2
2
  * Status of a flow run.
3
3
  *
4
4
  * PENDING exists only in memory before the first advance; persisted runs
5
- * are RUNNING, WAITING, or terminal. What a WAITING run waits on is the
6
- * active wait row's wait_type.
5
+ * are RUNNING, WAITING, or terminal. WAITING is reserved for human form
6
+ * waits. Runs suspended on platform work such as an agent, function job, or
7
+ * timer remain RUNNING; the active wait row records the exact wait_type.
7
8
  */
8
9
  export declare enum FlowRunStatus {
9
10
  PENDING = "PENDING",
@@ -6,8 +6,9 @@
6
6
  * Status of a flow run.
7
7
  *
8
8
  * PENDING exists only in memory before the first advance; persisted runs
9
- * are RUNNING, WAITING, or terminal. What a WAITING run waits on is the
10
- * active wait row's wait_type.
9
+ * are RUNNING, WAITING, or terminal. WAITING is reserved for human form
10
+ * waits. Runs suspended on platform work such as an agent, function job, or
11
+ * timer remain RUNNING; the active wait row records the exact wait_type.
11
12
  */
12
13
  export var FlowRunStatus;
13
14
  (function (FlowRunStatus) {
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Discriminates the flat message body.
3
+ *
4
+ * A message carries exactly one kind. Textual kinds use ``text``; tool kinds
5
+ * use ``tool_name``/``tool_call_id`` plus ``tool_args`` (call) or
6
+ * ``tool_result`` (return). There is no nested ``content`` object.
7
+ */
8
+ export declare enum MessageKind {
9
+ TEXT = "text",
10
+ NOTIFICATION = "notification",
11
+ THINKING = "thinking",
12
+ TOOL_CALL = "tool_call",
13
+ TOOL_RETURN = "tool_return"
14
+ }
@@ -0,0 +1,19 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ /**
6
+ * Discriminates the flat message body.
7
+ *
8
+ * A message carries exactly one kind. Textual kinds use ``text``; tool kinds
9
+ * use ``tool_name``/``tool_call_id`` plus ``tool_args`` (call) or
10
+ * ``tool_result`` (return). There is no nested ``content`` object.
11
+ */
12
+ export var MessageKind;
13
+ (function (MessageKind) {
14
+ MessageKind["TEXT"] = "text";
15
+ MessageKind["NOTIFICATION"] = "notification";
16
+ MessageKind["THINKING"] = "thinking";
17
+ MessageKind["TOOL_CALL"] = "tool_call";
18
+ MessageKind["TOOL_RETURN"] = "tool_return";
19
+ })(MessageKind || (MessageKind = {}));
@@ -1,16 +1,15 @@
1
- import type { NotificationContent } from './NotificationContent.js';
2
- import type { TextContent } from './TextContent.js';
3
- import type { ThinkingContent } from './ThinkingContent.js';
4
- import type { ToolCallContent } from './ToolCallContent.js';
5
- import type { ToolReturnContent } from './ToolReturnContent.js';
1
+ import type { MessageKind } from './MessageKind.js';
6
2
  export type MessageResponse = {
7
- content: (NotificationContent | TextContent | ThinkingContent | ToolCallContent | ToolReturnContent);
8
3
  conversation_id: string;
9
4
  created_at: string;
10
5
  id: string;
6
+ kind: MessageKind;
11
7
  metadata?: (Record<string, any> | null);
12
8
  role: string;
13
9
  sequence: number;
10
+ text?: (string | null);
11
+ tool_args?: null;
14
12
  tool_call_id?: (string | null);
15
13
  tool_name?: (string | null);
14
+ tool_result?: null;
16
15
  };
@@ -4,8 +4,8 @@ import type { WorkflowRunWaitResponse } from './WorkflowRunWaitResponse.js';
4
4
  /**
5
5
  * Full run state. `execution_context` is the same flat view that
6
6
  * workflow expressions resolve against (`<node_id>.<field>`, `start.*`,
7
- * `loop.*`). `active_wait` is set whenever the run is WAITING including
8
- * form waits, so UIs can render the form straight from this response.
7
+ * `loop.*`). `active_wait` is set when the run is suspended, including
8
+ * WAITING form waits and RUNNING platform waits.
9
9
  */
10
10
  export type WorkflowRunResponse = {
11
11
  active_wait?: (WorkflowRunWaitResponse | null);