@omni-commerce/sdk 0.26.0 → 0.27.0

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.
package/dist/index.d.ts CHANGED
@@ -179,6 +179,36 @@ interface paths {
179
179
  patch?: never;
180
180
  trace?: never;
181
181
  };
182
+ "/api/v1/agents/{agentId}/invoke": {
183
+ parameters: {
184
+ query?: never;
185
+ header?: never;
186
+ path?: never;
187
+ cookie?: never;
188
+ };
189
+ get?: never;
190
+ put?: never;
191
+ /**
192
+ * Invoke a saved agent
193
+ * @description Invoke the exact built-in or custom agent in the URL using its saved configuration and Programmatic starting mode. Uses the same invocation request and run response as the general agent and MCP.
194
+ *
195
+ * Requires agents:invoke and current organization membership and agent access. Organization-owned keys use their recorded creator; no alternate organization member is substituted. Session requests include organizationId.
196
+ *
197
+ * Send one or more new messages (at most 50 and 100000 text characters) ending with a user message. Omit thread_id to create a conversation, or reuse the returned thread_id to continue its stored history. An initial batch can import external history, including human replies. Do not resend history on subsequent turns. Optional message IDs follow native LangGraph replacement semantics, not request idempotency; retrying an invocation may run the agent again.
198
+ *
199
+ * Conversations are stored in Omni sessions and checkpoints and isolated by organization, caller, credential, agent and audience. Uploaded HTTP(S) images belong on the latest user message.
200
+ *
201
+ * audience=customer uses the public storefront tool boundary and accepts user/assistant messages. It does not establish a verified customer identity. audience=member is the default. Saved agents accept user/assistant messages and reject configuration overrides; general/invoke accepts config.
202
+ *
203
+ * Send decisions instead of messages with the same thread_id and audience to resume approvals. Resolve pending approvals before sending new messages.
204
+ */
205
+ post: operations["post_v1_agents_by_agentid_invoke"];
206
+ delete?: never;
207
+ options?: never;
208
+ head?: never;
209
+ patch?: never;
210
+ trace?: never;
211
+ };
182
212
  "/api/v1/agents/{agentId}/messages": {
183
213
  parameters: {
184
214
  query?: never;
@@ -189,17 +219,21 @@ interface paths {
189
219
  get?: never;
190
220
  put?: never;
191
221
  /**
192
- * Send a message to an agent
193
- * @description Message the exact built-in or custom agent in the URL, using its saved model, instructions, tools, permissions and Programmatic starting mode.
222
+ * Invoke a saved agent (alias)
223
+ * @deprecated
224
+ * @description Alias of /agents/{agentId}/invoke with the identical request and response. Prefer /invoke.
194
225
  *
195
- * ### Authentication
196
- * Requires an API key with `agents:invoke`, or a sign-in session. Organization-owned keys use their recorded creator's current membership and agent access; keys without a valid owner are refused. API keys identify their organization; session requests include `organizationId`.
226
+ * Invoke the exact built-in or custom agent in the URL using its saved configuration and Programmatic starting mode. Uses the same invocation request and run response as the general agent and MCP.
227
+ *
228
+ * Requires agents:invoke and current organization membership and agent access. Organization-owned keys use their recorded creator; no alternate organization member is substituted. Session requests include organizationId.
229
+ *
230
+ * Send one or more new messages (at most 50 and 100000 text characters) ending with a user message. Omit thread_id to create a conversation, or reuse the returned thread_id to continue its stored history. An initial batch can import external history, including human replies. Do not resend history on subsequent turns. Optional message IDs follow native LangGraph replacement semantics, not request idempotency; retrying an invocation may run the agent again.
231
+ *
232
+ * Conversations are stored in Omni sessions and checkpoints and isolated by organization, caller, credential, agent and audience. Uploaded HTTP(S) images belong on the latest user message.
197
233
  *
198
- * ### Conversation and execution
199
- * - The same caller, agent and `clientThreadKey` continue one conversation. Different callers, agents and organizations are isolated.
200
- * - No model, prompt or tool overrides are accepted.
201
- * - `wait=false` queues durable work and returns 202; `wait=true` returns the final reply or pending approvals.
202
- * - Send `decisions` with the same `clientThreadKey` to approve or reject a paused run.
234
+ * audience=customer uses the public storefront tool boundary and accepts user/assistant messages. It does not establish a verified customer identity. audience=member is the default. Saved agents accept user/assistant messages and reject configuration overrides; general/invoke accepts config.
235
+ *
236
+ * Send decisions instead of messages with the same thread_id and audience to resume approvals. Resolve pending approvals before sending new messages.
203
237
  */
204
238
  post: operations["post_v1_agents_by_agentid_messages"];
205
239
  delete?: never;
@@ -208,6 +242,38 @@ interface paths {
208
242
  patch?: never;
209
243
  trace?: never;
210
244
  };
245
+ "/api/v1/agents/{agentId}/runs": {
246
+ parameters: {
247
+ query?: never;
248
+ header?: never;
249
+ path?: never;
250
+ cookie?: never;
251
+ };
252
+ get?: never;
253
+ put?: never;
254
+ /**
255
+ * Start a saved agent run
256
+ * @description Queue durable execution using the identical invocation contract. Poll Location, honoring Retry-After.
257
+ *
258
+ * Invoke the exact built-in or custom agent in the URL using its saved configuration and Programmatic starting mode. Uses the same invocation request and run response as the general agent and MCP.
259
+ *
260
+ * Requires agents:invoke and current organization membership and agent access. Organization-owned keys use their recorded creator; no alternate organization member is substituted. Session requests include organizationId.
261
+ *
262
+ * Send one or more new messages (at most 50 and 100000 text characters) ending with a user message. Omit thread_id to create a conversation, or reuse the returned thread_id to continue its stored history. An initial batch can import external history, including human replies. Do not resend history on subsequent turns. Optional message IDs follow native LangGraph replacement semantics, not request idempotency; retrying an invocation may run the agent again.
263
+ *
264
+ * Conversations are stored in Omni sessions and checkpoints and isolated by organization, caller, credential, agent and audience. Uploaded HTTP(S) images belong on the latest user message.
265
+ *
266
+ * audience=customer uses the public storefront tool boundary and accepts user/assistant messages. It does not establish a verified customer identity. audience=member is the default. Saved agents accept user/assistant messages and reject configuration overrides; general/invoke accepts config.
267
+ *
268
+ * Send decisions instead of messages with the same thread_id and audience to resume approvals. Resolve pending approvals before sending new messages.
269
+ */
270
+ post: operations["post_v1_agents_by_agentid_runs"];
271
+ delete?: never;
272
+ options?: never;
273
+ head?: never;
274
+ patch?: never;
275
+ trace?: never;
276
+ };
211
277
  "/api/v1/agents/{agentId}/runs/{runId}": {
212
278
  parameters: {
213
279
  query?: never;
@@ -216,8 +282,8 @@ interface paths {
216
282
  cookie?: never;
217
283
  };
218
284
  /**
219
- * Get an agent message run
220
- * @description Read an agent message run belonging to the authenticated caller and the exact agent in the URL. Current organization membership and agent sharing are checked again. Requires agents:invoke.
285
+ * Get a saved agent run
286
+ * @description Read the canonical run resource. Organization, caller, credential and exact agent access are checked again. Requires agents:invoke.
221
287
  */
222
288
  get: operations["get_v1_agents_by_agentid_runs_by_runid"];
223
289
  put?: never;
@@ -241,7 +307,7 @@ interface paths {
241
307
  * Invoke the Omni agent
242
308
  * @description Run the general Omni agent and wait until it completes, pauses for approval, or fails. Requires `agents:invoke`.
243
309
  *
244
- * A waiting call can take several minutes; raise the client timeout. Send `decisions` with the same `thread_id` to approve or reject a paused run. Omit `config.enabled_tools` to use the organization's agent tools. Attach images on the latest user message as `{ type: "image", url }` HTTP(S) URLs.
310
+ * A waiting call can take several minutes; raise the client timeout. Send `decisions` with the same `thread_id` to approve or reject a paused run. Omit `config.enabled_tools` to use the organization's agent tools. Send only new messages on each turn; thread_id continues the conversation stored in Omni sessions and checkpoints. Omit thread_id for a new conversation. Optional message IDs use native LangGraph replacement semantics, not run idempotency. audience=customer restricts tools to public storefront access without establishing a verified customer identity. Attach images on the latest user message as `{ type: "image", url }` HTTP(S) URLs.
245
311
  */
246
312
  post: operations["post_v1_agents_general_invoke"];
247
313
  delete?: never;
@@ -1426,6 +1492,106 @@ interface paths {
1426
1492
  patch?: never;
1427
1493
  trace?: never;
1428
1494
  };
1495
+ "/api/v1/email/accounts": {
1496
+ parameters: {
1497
+ query?: never;
1498
+ header?: never;
1499
+ path?: never;
1500
+ cookie?: never;
1501
+ };
1502
+ /**
1503
+ * List Email Accounts
1504
+ * @description Your connected Gmail and Outlook accounts, default first. Pass an account's `connectionId` to the other email endpoints to choose it.
1505
+ *
1506
+ * ### Authorization
1507
+ *
1508
+ * Requires `email:read` and the integration permission the matching chat tool needs, with a person's credential: a CLI login, a signed-in session, or the SDK key inside your own chat sandbox. Only your own connected mailboxes are reachable; another account's `connectionId` is refused.
1509
+ */
1510
+ get: operations["get_v1_email_accounts"];
1511
+ put?: never;
1512
+ post?: never;
1513
+ delete?: never;
1514
+ options?: never;
1515
+ head?: never;
1516
+ patch?: never;
1517
+ trace?: never;
1518
+ };
1519
+ "/api/v1/email/drafts": {
1520
+ parameters: {
1521
+ query?: never;
1522
+ header?: never;
1523
+ path?: never;
1524
+ cookie?: never;
1525
+ };
1526
+ get?: never;
1527
+ put?: never;
1528
+ /**
1529
+ * Create Email Draft
1530
+ * @description Save a draft in your mailbox; nothing is sent. Pass `replyToMessageId` (and `threadId`) from Search Emails to draft a reply in its conversation. Review and send it from Gmail or Outlook.
1531
+ *
1532
+ * When the provider saved a draft whose threading could not be verified, the request fails with `unverifiedDraftId` in `data` so you can find or discard it.
1533
+ *
1534
+ * ### Authorization
1535
+ *
1536
+ * Requires `email:write` and the integration permission the matching chat tool needs, with a person's credential: a CLI login, a signed-in session, or the SDK key inside your own chat sandbox. Only your own connected mailboxes are reachable; another account's `connectionId` is refused.
1537
+ */
1538
+ post: operations["post_v1_email_drafts"];
1539
+ delete?: never;
1540
+ options?: never;
1541
+ head?: never;
1542
+ patch?: never;
1543
+ trace?: never;
1544
+ };
1545
+ "/api/v1/email/messages/{messageId}": {
1546
+ parameters: {
1547
+ query?: never;
1548
+ header?: never;
1549
+ path?: never;
1550
+ cookie?: never;
1551
+ };
1552
+ /**
1553
+ * Get Email Message
1554
+ * @description One message from your mailbox: headers, plain-text body (at most 12,000 characters) and attachment metadata. Use a message `id` from Search Emails; encode it as one path segment.
1555
+ *
1556
+ * ### Authorization
1557
+ *
1558
+ * Requires `email:read` and the integration permission the matching chat tool needs, with a person's credential: a CLI login, a signed-in session, or the SDK key inside your own chat sandbox. Only your own connected mailboxes are reachable; another account's `connectionId` is refused.
1559
+ */
1560
+ get: operations["get_v1_email_messages_by_messageid"];
1561
+ put?: never;
1562
+ post?: never;
1563
+ delete?: never;
1564
+ options?: never;
1565
+ head?: never;
1566
+ patch?: never;
1567
+ trace?: never;
1568
+ };
1569
+ "/api/v1/email/search": {
1570
+ parameters: {
1571
+ query?: never;
1572
+ header?: never;
1573
+ path?: never;
1574
+ cookie?: never;
1575
+ };
1576
+ /**
1577
+ * Search Emails
1578
+ * @description One page of message summaries (subject, from, to, date, snippet, read and draft state) from your mailbox. Gmail accepts its search operators (`from:`, `subject:`, `newer_than:`); Outlook takes free text.
1579
+ *
1580
+ * Pass `nextPageToken` back as `pageToken` with the same mailbox, query, `readState` and `maxResults` until it is null; a token is refused with different search arguments. `readState=unread` filters unread messages, which is not the same as unreplied.
1581
+ *
1582
+ * ### Authorization
1583
+ *
1584
+ * Requires `email:read` and the integration permission the matching chat tool needs, with a person's credential: a CLI login, a signed-in session, or the SDK key inside your own chat sandbox. Only your own connected mailboxes are reachable; another account's `connectionId` is refused.
1585
+ */
1586
+ get: operations["get_v1_email_search"];
1587
+ put?: never;
1588
+ post?: never;
1589
+ delete?: never;
1590
+ options?: never;
1591
+ head?: never;
1592
+ patch?: never;
1593
+ trace?: never;
1594
+ };
1429
1595
  "/api/v1/evaluate": {
1430
1596
  parameters: {
1431
1597
  query?: never;
@@ -4847,6 +5013,8 @@ interface components {
4847
5013
  voucherReward?: "discount" | "coins_cashback";
4848
5014
  /** @enum {string} */
4849
5015
  voucherAudience?: "general" | "shop_follow";
5016
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
5017
+ redemptionPoints?: number;
4850
5018
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
4851
5019
  repeatPurchaseMinCount?: number;
4852
5020
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -6915,6 +7083,179 @@ interface operations {
6915
7083
  };
6916
7084
  };
6917
7085
  };
7086
+ post_v1_agents_by_agentid_invoke: {
7087
+ parameters: {
7088
+ query?: never;
7089
+ header?: never;
7090
+ path: {
7091
+ agentId: string;
7092
+ };
7093
+ cookie?: never;
7094
+ };
7095
+ requestBody: {
7096
+ content: {
7097
+ /**
7098
+ * @example {
7099
+ * "thread_id": "whatsapp-123",
7100
+ * "channel": "whatsapp",
7101
+ * "audience": "customer",
7102
+ * "messages": [
7103
+ * {
7104
+ * "id": "wamid.123",
7105
+ * "role": "user",
7106
+ * "content": "Can you deliver tomorrow?"
7107
+ * }
7108
+ * ]
7109
+ * }
7110
+ */
7111
+ "application/json": {
7112
+ organizationId?: string;
7113
+ thread_id?: string | null;
7114
+ channel?: string;
7115
+ /** @enum {string} */
7116
+ audience?: "member" | "customer";
7117
+ messages?: {
7118
+ /** @enum {string} */
7119
+ role?: "user" | "assistant" | "system";
7120
+ content:
7121
+ | string
7122
+ | (
7123
+ | {
7124
+ /** @constant */
7125
+ type: "text";
7126
+ text: string;
7127
+ }
7128
+ | {
7129
+ /** @constant */
7130
+ type: "image";
7131
+ url: string;
7132
+ filename?: string;
7133
+ }
7134
+ )[];
7135
+ id?: string;
7136
+ name?: string;
7137
+ }[];
7138
+ config?: {
7139
+ enabled_tools?: string[];
7140
+ model?: string | null;
7141
+ system_prompt?: string;
7142
+ structured_output?: {
7143
+ [key: string]: unknown;
7144
+ } | null;
7145
+ };
7146
+ decisions?: {
7147
+ /** @enum {string} */
7148
+ action: "approve" | "reject";
7149
+ reason?: string;
7150
+ }[];
7151
+ };
7152
+ };
7153
+ };
7154
+ responses: {
7155
+ /** @description The run completed or paused for approval. */
7156
+ 200: {
7157
+ headers: {
7158
+ [name: string]: unknown;
7159
+ };
7160
+ content: {
7161
+ "application/json": {
7162
+ run_id: string;
7163
+ thread_id: string;
7164
+ /** @enum {string} */
7165
+ status:
7166
+ | "queued"
7167
+ | "running"
7168
+ | "completed"
7169
+ | "awaiting_approval"
7170
+ | "failed";
7171
+ messages: {
7172
+ /** @enum {string} */
7173
+ type: "human" | "ai" | "tool" | "system";
7174
+ /** @enum {string} */
7175
+ role: "user" | "assistant" | "tool" | "system";
7176
+ content: string;
7177
+ id?: string;
7178
+ name?: string;
7179
+ tool_calls?: {
7180
+ id?: string;
7181
+ name: string;
7182
+ args: unknown;
7183
+ }[];
7184
+ tool_call_id?: string;
7185
+ }[];
7186
+ structured_output: {
7187
+ [key: string]: unknown;
7188
+ } | null;
7189
+ approvals:
7190
+ | {
7191
+ interrupt_instance_id: string;
7192
+ tool_name: string | null;
7193
+ tool_args: unknown;
7194
+ message: string;
7195
+ }[]
7196
+ | null;
7197
+ error: string | null;
7198
+ };
7199
+ };
7200
+ };
7201
+ /** @description Invalid invocation, configuration override for a saved agent, or organization mismatch. */
7202
+ 400: {
7203
+ headers: {
7204
+ [name: string]: unknown;
7205
+ };
7206
+ content?: never;
7207
+ };
7208
+ /** @description Authentication required. */
7209
+ 401: {
7210
+ headers: {
7211
+ [name: string]: unknown;
7212
+ };
7213
+ content?: never;
7214
+ };
7215
+ /** @description Insufficient AI credits. */
7216
+ 402: {
7217
+ headers: {
7218
+ [name: string]: unknown;
7219
+ };
7220
+ content?: never;
7221
+ };
7222
+ /** @description Missing agents:invoke scope, inactive agent or credential, or missing membership or agent access. */
7223
+ 403: {
7224
+ headers: {
7225
+ [name: string]: unknown;
7226
+ };
7227
+ content?: never;
7228
+ };
7229
+ /** @description The conversation or run is not available to this caller and agent. */
7230
+ 404: {
7231
+ headers: {
7232
+ [name: string]: unknown;
7233
+ };
7234
+ content?: never;
7235
+ };
7236
+ /** @description The thread has an active run or an unresolved approval. */
7237
+ 409: {
7238
+ headers: {
7239
+ [name: string]: unknown;
7240
+ };
7241
+ content?: never;
7242
+ };
7243
+ /** @description The agent run failed. */
7244
+ 500: {
7245
+ headers: {
7246
+ [name: string]: unknown;
7247
+ };
7248
+ content?: never;
7249
+ };
7250
+ /** @description The waiting request timed out. The error includes the stored run ID. */
7251
+ 504: {
7252
+ headers: {
7253
+ [name: string]: unknown;
7254
+ };
7255
+ content?: never;
7256
+ };
7257
+ };
7258
+ };
6918
7259
  post_v1_agents_by_agentid_messages: {
6919
7260
  parameters: {
6920
7261
  query?: never;
@@ -6928,18 +7269,53 @@ interface operations {
6928
7269
  content: {
6929
7270
  /**
6930
7271
  * @example {
6931
- * "message": "Summarize today's orders.",
6932
- * "clientThreadKey": "daily-report",
6933
- * "wait": true
7272
+ * "thread_id": "whatsapp-123",
7273
+ * "channel": "whatsapp",
7274
+ * "audience": "customer",
7275
+ * "messages": [
7276
+ * {
7277
+ * "id": "wamid.123",
7278
+ * "role": "user",
7279
+ * "content": "Can you deliver tomorrow?"
7280
+ * }
7281
+ * ]
6934
7282
  * }
6935
7283
  */
6936
7284
  "application/json": {
6937
7285
  organizationId?: string;
6938
- message?: string;
6939
- /** @default default */
6940
- clientThreadKey?: string;
6941
- /** @default false */
6942
- wait?: boolean;
7286
+ thread_id?: string | null;
7287
+ channel?: string;
7288
+ /** @enum {string} */
7289
+ audience?: "member" | "customer";
7290
+ messages?: {
7291
+ /** @enum {string} */
7292
+ role?: "user" | "assistant" | "system";
7293
+ content:
7294
+ | string
7295
+ | (
7296
+ | {
7297
+ /** @constant */
7298
+ type: "text";
7299
+ text: string;
7300
+ }
7301
+ | {
7302
+ /** @constant */
7303
+ type: "image";
7304
+ url: string;
7305
+ filename?: string;
7306
+ }
7307
+ )[];
7308
+ id?: string;
7309
+ name?: string;
7310
+ }[];
7311
+ config?: {
7312
+ enabled_tools?: string[];
7313
+ model?: string | null;
7314
+ system_prompt?: string;
7315
+ structured_output?: {
7316
+ [key: string]: unknown;
7317
+ } | null;
7318
+ };
6943
7319
  decisions?: {
6944
7320
  /** @enum {string} */
6945
7321
  action: "approve" | "reject";
@@ -6949,25 +7325,40 @@ interface operations {
6949
7325
  };
6950
7326
  };
6951
7327
  responses: {
6952
- /** @description The agent's verbatim final reply or pending approvals. */
7328
+ /** @description The run completed or paused for approval. */
6953
7329
  200: {
6954
7330
  headers: {
6955
7331
  [name: string]: unknown;
6956
7332
  };
6957
7333
  content: {
6958
7334
  "application/json": {
6959
- agentId: string;
6960
- threadKey: string;
6961
- runId: string;
6962
- threadId: string;
7335
+ run_id: string;
7336
+ thread_id: string;
6963
7337
  /** @enum {string} */
6964
7338
  status:
6965
- | "accepted"
7339
+ | "queued"
6966
7340
  | "running"
6967
7341
  | "completed"
6968
7342
  | "awaiting_approval"
6969
7343
  | "failed";
6970
- reply: string | null;
7344
+ messages: {
7345
+ /** @enum {string} */
7346
+ type: "human" | "ai" | "tool" | "system";
7347
+ /** @enum {string} */
7348
+ role: "user" | "assistant" | "tool" | "system";
7349
+ content: string;
7350
+ id?: string;
7351
+ name?: string;
7352
+ tool_calls?: {
7353
+ id?: string;
7354
+ name: string;
7355
+ args: unknown;
7356
+ }[];
7357
+ tool_call_id?: string;
7358
+ }[];
7359
+ structured_output: {
7360
+ [key: string]: unknown;
7361
+ } | null;
6971
7362
  approvals:
6972
7363
  | {
6973
7364
  interrupt_instance_id: string;
@@ -6980,29 +7371,171 @@ interface operations {
6980
7371
  };
6981
7372
  };
6982
7373
  };
6983
- /** @description Accepted for durable execution. */
7374
+ /** @description Invalid invocation, configuration override for a saved agent, or organization mismatch. */
7375
+ 400: {
7376
+ headers: {
7377
+ [name: string]: unknown;
7378
+ };
7379
+ content?: never;
7380
+ };
7381
+ /** @description Authentication required. */
7382
+ 401: {
7383
+ headers: {
7384
+ [name: string]: unknown;
7385
+ };
7386
+ content?: never;
7387
+ };
7388
+ /** @description Insufficient AI credits. */
7389
+ 402: {
7390
+ headers: {
7391
+ [name: string]: unknown;
7392
+ };
7393
+ content?: never;
7394
+ };
7395
+ /** @description Missing agents:invoke scope, inactive agent or credential, or missing membership or agent access. */
7396
+ 403: {
7397
+ headers: {
7398
+ [name: string]: unknown;
7399
+ };
7400
+ content?: never;
7401
+ };
7402
+ /** @description The conversation or run is not available to this caller and agent. */
7403
+ 404: {
7404
+ headers: {
7405
+ [name: string]: unknown;
7406
+ };
7407
+ content?: never;
7408
+ };
7409
+ /** @description The thread has an active run or an unresolved approval. */
7410
+ 409: {
7411
+ headers: {
7412
+ [name: string]: unknown;
7413
+ };
7414
+ content?: never;
7415
+ };
7416
+ /** @description The agent run failed. */
7417
+ 500: {
7418
+ headers: {
7419
+ [name: string]: unknown;
7420
+ };
7421
+ content?: never;
7422
+ };
7423
+ /** @description The waiting request timed out. The error includes the stored run ID. */
7424
+ 504: {
7425
+ headers: {
7426
+ [name: string]: unknown;
7427
+ };
7428
+ content?: never;
7429
+ };
7430
+ };
7431
+ };
7432
+ post_v1_agents_by_agentid_runs: {
7433
+ parameters: {
7434
+ query?: never;
7435
+ header?: never;
7436
+ path: {
7437
+ agentId: string;
7438
+ };
7439
+ cookie?: never;
7440
+ };
7441
+ requestBody: {
7442
+ content: {
7443
+ /**
7444
+ * @example {
7445
+ * "thread_id": "whatsapp-123",
7446
+ * "channel": "whatsapp",
7447
+ * "audience": "customer",
7448
+ * "messages": [
7449
+ * {
7450
+ * "id": "wamid.123",
7451
+ * "role": "user",
7452
+ * "content": "Can you deliver tomorrow?"
7453
+ * }
7454
+ * ]
7455
+ * }
7456
+ */
7457
+ "application/json": {
7458
+ organizationId?: string;
7459
+ thread_id?: string | null;
7460
+ channel?: string;
7461
+ /** @enum {string} */
7462
+ audience?: "member" | "customer";
7463
+ messages?: {
7464
+ /** @enum {string} */
7465
+ role?: "user" | "assistant" | "system";
7466
+ content:
7467
+ | string
7468
+ | (
7469
+ | {
7470
+ /** @constant */
7471
+ type: "text";
7472
+ text: string;
7473
+ }
7474
+ | {
7475
+ /** @constant */
7476
+ type: "image";
7477
+ url: string;
7478
+ filename?: string;
7479
+ }
7480
+ )[];
7481
+ id?: string;
7482
+ name?: string;
7483
+ }[];
7484
+ config?: {
7485
+ enabled_tools?: string[];
7486
+ model?: string | null;
7487
+ system_prompt?: string;
7488
+ structured_output?: {
7489
+ [key: string]: unknown;
7490
+ } | null;
7491
+ };
7492
+ decisions?: {
7493
+ /** @enum {string} */
7494
+ action: "approve" | "reject";
7495
+ reason?: string;
7496
+ }[];
7497
+ };
7498
+ };
7499
+ };
7500
+ responses: {
7501
+ /** @description Queued for durable execution. */
6984
7502
  202: {
6985
7503
  headers: {
6986
- /** @description Caller-scoped status URL for this agent's run. */
6987
- Location?: string;
6988
- /** @description Seconds to wait before reading an open run again. */
7504
+ /** @description Seconds before polling again. */
6989
7505
  "Retry-After"?: number;
7506
+ /** @description Caller-scoped run status URL. */
7507
+ Location?: string;
6990
7508
  [name: string]: unknown;
6991
7509
  };
6992
7510
  content: {
6993
7511
  "application/json": {
6994
- agentId: string;
6995
- threadKey: string;
6996
- runId: string;
6997
- threadId: string;
7512
+ run_id: string;
7513
+ thread_id: string;
6998
7514
  /** @enum {string} */
6999
7515
  status:
7000
- | "accepted"
7516
+ | "queued"
7001
7517
  | "running"
7002
7518
  | "completed"
7003
7519
  | "awaiting_approval"
7004
7520
  | "failed";
7005
- reply: string | null;
7521
+ messages: {
7522
+ /** @enum {string} */
7523
+ type: "human" | "ai" | "tool" | "system";
7524
+ /** @enum {string} */
7525
+ role: "user" | "assistant" | "tool" | "system";
7526
+ content: string;
7527
+ id?: string;
7528
+ name?: string;
7529
+ tool_calls?: {
7530
+ id?: string;
7531
+ name: string;
7532
+ args: unknown;
7533
+ }[];
7534
+ tool_call_id?: string;
7535
+ }[];
7536
+ structured_output: {
7537
+ [key: string]: unknown;
7538
+ } | null;
7006
7539
  approvals:
7007
7540
  | {
7008
7541
  interrupt_instance_id: string;
@@ -7015,14 +7548,14 @@ interface operations {
7015
7548
  };
7016
7549
  };
7017
7550
  };
7018
- /** @description Invalid message, decisions or organization scope. */
7551
+ /** @description Invalid invocation, configuration override for a saved agent, or organization mismatch. */
7019
7552
  400: {
7020
7553
  headers: {
7021
7554
  [name: string]: unknown;
7022
7555
  };
7023
7556
  content?: never;
7024
7557
  };
7025
- /** @description A valid Bearer API key or sign-in session is required. */
7558
+ /** @description Authentication required. */
7026
7559
  401: {
7027
7560
  headers: {
7028
7561
  [name: string]: unknown;
@@ -7036,21 +7569,21 @@ interface operations {
7036
7569
  };
7037
7570
  content?: never;
7038
7571
  };
7039
- /** @description Missing agents:invoke scope, inactive agent, revoked key, or the credential owner lacks organization membership or agent sharing access. */
7572
+ /** @description Missing agents:invoke scope, inactive agent or credential, or missing membership or agent access. */
7040
7573
  403: {
7041
7574
  headers: {
7042
7575
  [name: string]: unknown;
7043
7576
  };
7044
7577
  content?: never;
7045
7578
  };
7046
- /** @description The run does not belong to this agent and caller. */
7579
+ /** @description The conversation or run is not available to this caller and agent. */
7047
7580
  404: {
7048
7581
  headers: {
7049
7582
  [name: string]: unknown;
7050
7583
  };
7051
7584
  content?: never;
7052
7585
  };
7053
- /** @description This conversation already has an active run, or there is no matching pending approval. */
7586
+ /** @description The thread has an active run or an unresolved approval. */
7054
7587
  409: {
7055
7588
  headers: {
7056
7589
  [name: string]: unknown;
@@ -7076,7 +7609,7 @@ interface operations {
7076
7609
  get_v1_agents_by_agentid_runs_by_runid: {
7077
7610
  parameters: {
7078
7611
  query?: {
7079
- /** @description Required for sign-in sessions. API keys already identify their organization. */
7612
+ /** @description Required for session authentication; API keys identify their organization. */
7080
7613
  organizationId?: string;
7081
7614
  };
7082
7615
  header?: never;
@@ -7088,27 +7621,42 @@ interface operations {
7088
7621
  };
7089
7622
  requestBody?: never;
7090
7623
  responses: {
7091
- /** @description Current run status, reply and approvals. */
7624
+ /** @description The run resource. */
7092
7625
  200: {
7093
7626
  headers: {
7094
- /** @description Seconds to wait before reading an open run again. */
7627
+ /** @description Seconds before polling again. */
7095
7628
  "Retry-After"?: number;
7096
7629
  [name: string]: unknown;
7097
7630
  };
7098
7631
  content: {
7099
7632
  "application/json": {
7100
- agentId: string;
7101
- threadKey: string;
7102
- runId: string;
7103
- threadId: string;
7633
+ run_id: string;
7634
+ thread_id: string;
7104
7635
  /** @enum {string} */
7105
7636
  status:
7106
- | "accepted"
7637
+ | "queued"
7107
7638
  | "running"
7108
7639
  | "completed"
7109
7640
  | "awaiting_approval"
7110
7641
  | "failed";
7111
- reply: string | null;
7642
+ messages: {
7643
+ /** @enum {string} */
7644
+ type: "human" | "ai" | "tool" | "system";
7645
+ /** @enum {string} */
7646
+ role: "user" | "assistant" | "tool" | "system";
7647
+ content: string;
7648
+ id?: string;
7649
+ name?: string;
7650
+ tool_calls?: {
7651
+ id?: string;
7652
+ name: string;
7653
+ args: unknown;
7654
+ }[];
7655
+ tool_call_id?: string;
7656
+ }[];
7657
+ structured_output: {
7658
+ [key: string]: unknown;
7659
+ } | null;
7112
7660
  approvals:
7113
7661
  | {
7114
7662
  interrupt_instance_id: string;
@@ -7121,14 +7669,14 @@ interface operations {
7121
7669
  };
7122
7670
  };
7123
7671
  };
7124
- /** @description Invalid message, decisions or organization scope. */
7672
+ /** @description Invalid invocation, configuration override for a saved agent, or organization mismatch. */
7125
7673
  400: {
7126
7674
  headers: {
7127
7675
  [name: string]: unknown;
7128
7676
  };
7129
7677
  content?: never;
7130
7678
  };
7131
- /** @description A valid Bearer API key or sign-in session is required. */
7679
+ /** @description Authentication required. */
7132
7680
  401: {
7133
7681
  headers: {
7134
7682
  [name: string]: unknown;
@@ -7142,21 +7690,21 @@ interface operations {
7142
7690
  };
7143
7691
  content?: never;
7144
7692
  };
7145
- /** @description Missing agents:invoke scope, inactive agent, revoked key, or the credential owner lacks organization membership or agent sharing access. */
7693
+ /** @description Missing agents:invoke scope, inactive agent or credential, or missing membership or agent access. */
7146
7694
  403: {
7147
7695
  headers: {
7148
7696
  [name: string]: unknown;
7149
7697
  };
7150
7698
  content?: never;
7151
7699
  };
7152
- /** @description The run does not belong to this agent and caller. */
7700
+ /** @description The conversation or run is not available to this caller and agent. */
7153
7701
  404: {
7154
7702
  headers: {
7155
7703
  [name: string]: unknown;
7156
7704
  };
7157
7705
  content?: never;
7158
7706
  };
7159
- /** @description This conversation already has an active run, or there is no matching pending approval. */
7707
+ /** @description The thread has an active run or an unresolved approval. */
7160
7708
  409: {
7161
7709
  headers: {
7162
7710
  [name: string]: unknown;
@@ -7170,6 +7718,13 @@ interface operations {
7170
7718
  };
7171
7719
  content?: never;
7172
7720
  };
7721
+ /** @description The waiting request timed out. The error includes the stored run ID. */
7722
+ 504: {
7723
+ headers: {
7724
+ [name: string]: unknown;
7725
+ };
7726
+ content?: never;
7727
+ };
7173
7728
  };
7174
7729
  };
7175
7730
  post_v1_agents_general_invoke: {
@@ -7195,6 +7750,8 @@ interface operations {
7195
7750
  organizationId?: string;
7196
7751
  thread_id?: string | null;
7197
7752
  channel?: string;
7753
+ /** @enum {string} */
7754
+ audience?: "member" | "customer";
7198
7755
  messages?: {
7199
7756
  /** @enum {string} */
7200
7757
  role?: "user" | "assistant" | "system";
@@ -7353,6 +7910,8 @@ interface operations {
7353
7910
  organizationId?: string;
7354
7911
  thread_id?: string | null;
7355
7912
  channel?: string;
7913
+ /** @enum {string} */
7914
+ audience?: "member" | "customer";
7356
7915
  messages?: {
7357
7916
  /** @enum {string} */
7358
7917
  role?: "user" | "assistant" | "system";
@@ -11550,6 +12109,8 @@ interface operations {
11550
12109
  voucherReward?: "discount" | "coins_cashback";
11551
12110
  /** @enum {string} */
11552
12111
  voucherAudience?: "general" | "shop_follow";
12112
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
12113
+ redemptionPoints?: number;
11553
12114
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
11554
12115
  repeatPurchaseMinCount?: number;
11555
12116
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -12302,6 +12863,8 @@ interface operations {
12302
12863
  voucherReward?: "discount" | "coins_cashback";
12303
12864
  /** @enum {string} */
12304
12865
  voucherAudience?: "general" | "shop_follow";
12866
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
12867
+ redemptionPoints?: number;
12305
12868
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
12306
12869
  repeatPurchaseMinCount?: number;
12307
12870
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -12783,6 +13346,8 @@ interface operations {
12783
13346
  voucherReward?: "discount" | "coins_cashback";
12784
13347
  /** @enum {string} */
12785
13348
  voucherAudience?: "general" | "shop_follow";
13349
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
13350
+ redemptionPoints?: number;
12786
13351
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
12787
13352
  repeatPurchaseMinCount?: number;
12788
13353
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -13723,6 +14288,8 @@ interface operations {
13723
14288
  voucherReward?: "discount" | "coins_cashback";
13724
14289
  /** @enum {string} */
13725
14290
  voucherAudience?: "general" | "shop_follow";
14291
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
14292
+ redemptionPoints?: number;
13726
14293
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
13727
14294
  repeatPurchaseMinCount?: number;
13728
14295
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -14530,6 +15097,8 @@ interface operations {
14530
15097
  voucherReward?: "discount" | "coins_cashback";
14531
15098
  /** @enum {string} */
14532
15099
  voucherAudience?: "general" | "shop_follow";
15100
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
15101
+ redemptionPoints?: number;
14533
15102
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
14534
15103
  repeatPurchaseMinCount?: number;
14535
15104
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -17478,6 +18047,326 @@ interface operations {
17478
18047
  };
17479
18048
  };
17480
18049
  };
18050
+ get_v1_email_accounts: {
18051
+ parameters: {
18052
+ query?: {
18053
+ /** @description Required for session auth. Optional for API keys, which already belong to one organization. */
18054
+ organizationId?: string;
18055
+ };
18056
+ header?: never;
18057
+ path?: never;
18058
+ cookie?: never;
18059
+ };
18060
+ requestBody?: never;
18061
+ responses: {
18062
+ /** @description Your connected accounts. */
18063
+ 200: {
18064
+ headers: {
18065
+ [name: string]: unknown;
18066
+ };
18067
+ content: {
18068
+ "application/json": {
18069
+ ok?: boolean;
18070
+ operationId?: string;
18071
+ status?: string;
18072
+ data?: {
18073
+ accounts?: {
18074
+ connectionId?: string;
18075
+ /** @enum {string} */
18076
+ provider?: "gmail" | "outlook";
18077
+ emailAddress?: string;
18078
+ isDefault?: boolean;
18079
+ capabilities?: string[];
18080
+ /** @enum {string} */
18081
+ status?: "active" | "needs_reauth" | "revoked";
18082
+ }[];
18083
+ count?: number;
18084
+ };
18085
+ };
18086
+ };
18087
+ };
18088
+ /** @description Invalid request, no connected mailbox, a mailbox that needs reconnecting, or a provider refusal (`error` says which). */
18089
+ 400: {
18090
+ headers: {
18091
+ [name: string]: unknown;
18092
+ };
18093
+ content?: never;
18094
+ };
18095
+ /** @description Unauthorized */
18096
+ 401: {
18097
+ headers: {
18098
+ [name: string]: unknown;
18099
+ };
18100
+ content?: never;
18101
+ };
18102
+ /** @description Missing scope or integration permission, or a credential that acts for no person: organization API clients, Applications and Computer previews cannot reach mail. */
18103
+ 403: {
18104
+ headers: {
18105
+ [name: string]: unknown;
18106
+ };
18107
+ content?: never;
18108
+ };
18109
+ /** @description Internal Server Error */
18110
+ 500: {
18111
+ headers: {
18112
+ [name: string]: unknown;
18113
+ };
18114
+ content?: never;
18115
+ };
18116
+ };
18117
+ };
18118
+ post_v1_email_drafts: {
18119
+ parameters: {
18120
+ query?: never;
18121
+ header?: never;
18122
+ path?: never;
18123
+ cookie?: never;
18124
+ };
18125
+ requestBody: {
18126
+ content: {
18127
+ /**
18128
+ * @example {
18129
+ * "to": "buyer@example.com",
18130
+ * "subject": "Re: Order 1042",
18131
+ * "body": "Thanks for your order. It ships tomorrow.",
18132
+ * "replyToMessageId": "18c2f0a9b7e4d123"
18133
+ * }
18134
+ */
18135
+ "application/json": {
18136
+ to: string;
18137
+ subject: string;
18138
+ body: string;
18139
+ /** @description Connected account id from email_list_accounts. Omit to use the user's default. */
18140
+ connectionId?: string;
18141
+ replyToMessageId?: string;
18142
+ threadId?: string;
18143
+ /** @description Required for session auth. Optional for API keys, which already belong to one organization. */
18144
+ organizationId?: string;
18145
+ };
18146
+ };
18147
+ };
18148
+ responses: {
18149
+ /** @description The saved draft. */
18150
+ 200: {
18151
+ headers: {
18152
+ [name: string]: unknown;
18153
+ };
18154
+ content: {
18155
+ "application/json": {
18156
+ ok?: boolean;
18157
+ operationId?: string;
18158
+ status?: string;
18159
+ data?: {
18160
+ connectionId?: string;
18161
+ /** @enum {string} */
18162
+ provider?: "gmail" | "outlook";
18163
+ emailAddress?: string;
18164
+ draft?: {
18165
+ draftId?: string | null;
18166
+ messageId?: string | null;
18167
+ /** @description Gmail only. */
18168
+ threadId?: string | null;
18169
+ /** @description Outlook only: opens the draft. */
18170
+ webLink?: string | null;
18171
+ };
18172
+ note?: string;
18173
+ };
18174
+ };
18175
+ };
18176
+ };
18177
+ /** @description Invalid request, no connected mailbox, a mailbox that needs reconnecting, or a provider refusal (`error` says which). */
18178
+ 400: {
18179
+ headers: {
18180
+ [name: string]: unknown;
18181
+ };
18182
+ content?: never;
18183
+ };
18184
+ /** @description Unauthorized */
18185
+ 401: {
18186
+ headers: {
18187
+ [name: string]: unknown;
18188
+ };
18189
+ content?: never;
18190
+ };
18191
+ /** @description Missing scope or integration permission, or a credential that acts for no person: organization API clients, Applications and Computer previews cannot reach mail. */
18192
+ 403: {
18193
+ headers: {
18194
+ [name: string]: unknown;
18195
+ };
18196
+ content?: never;
18197
+ };
18198
+ /** @description Internal Server Error */
18199
+ 500: {
18200
+ headers: {
18201
+ [name: string]: unknown;
18202
+ };
18203
+ content?: never;
18204
+ };
18205
+ };
18206
+ };
18207
+ get_v1_email_messages_by_messageid: {
18208
+ parameters: {
18209
+ query?: {
18210
+ /** @description Connected account from `GET /api/v1/email/accounts`. Defaults to your default mailbox. */
18211
+ connectionId?: string;
18212
+ /** @description Required for session auth. Optional for API keys, which already belong to one organization. */
18213
+ organizationId?: string;
18214
+ };
18215
+ header?: never;
18216
+ path: {
18217
+ /** @description Provider message id from Search Emails. */
18218
+ messageId: string;
18219
+ };
18220
+ cookie?: never;
18221
+ };
18222
+ requestBody?: never;
18223
+ responses: {
18224
+ /** @description The message. */
18225
+ 200: {
18226
+ headers: {
18227
+ [name: string]: unknown;
18228
+ };
18229
+ content: {
18230
+ "application/json": {
18231
+ ok?: boolean;
18232
+ operationId?: string;
18233
+ status?: string;
18234
+ data?: {
18235
+ connectionId?: string;
18236
+ /** @enum {string} */
18237
+ provider?: "gmail" | "outlook";
18238
+ emailAddress?: string;
18239
+ message?: {
18240
+ id?: string;
18241
+ threadId?: string | null;
18242
+ subject?: string;
18243
+ from?: string;
18244
+ to?: string;
18245
+ date?: string;
18246
+ snippet?: string;
18247
+ bodyText?: string;
18248
+ hasAttachments?: boolean;
18249
+ attachments?: Record<string, never>[];
18250
+ };
18251
+ };
18252
+ };
18253
+ };
18254
+ };
18255
+ /** @description Invalid request, no connected mailbox, a mailbox that needs reconnecting, or a provider refusal (`error` says which). */
18256
+ 400: {
18257
+ headers: {
18258
+ [name: string]: unknown;
18259
+ };
18260
+ content?: never;
18261
+ };
18262
+ /** @description Unauthorized */
18263
+ 401: {
18264
+ headers: {
18265
+ [name: string]: unknown;
18266
+ };
18267
+ content?: never;
18268
+ };
18269
+ /** @description Missing scope or integration permission, or a credential that acts for no person: organization API clients, Applications and Computer previews cannot reach mail. */
18270
+ 403: {
18271
+ headers: {
18272
+ [name: string]: unknown;
18273
+ };
18274
+ content?: never;
18275
+ };
18276
+ /** @description Internal Server Error */
18277
+ 500: {
18278
+ headers: {
18279
+ [name: string]: unknown;
18280
+ };
18281
+ content?: never;
18282
+ };
18283
+ };
18284
+ };
18285
+ get_v1_email_search: {
18286
+ parameters: {
18287
+ query?: {
18288
+ /** @description Search query. Empty lists the newest messages. */
18289
+ query?: string;
18290
+ /** @description Connected account from `GET /api/v1/email/accounts`. Defaults to your default mailbox. */
18291
+ connectionId?: string;
18292
+ /** @description 1–50; 20 when omitted. */
18293
+ maxResults?: number;
18294
+ /** @description `nextPageToken` from the previous page. */
18295
+ pageToken?: string;
18296
+ /** @description Filter by read state. */
18297
+ readState?: "all" | "unread" | "read";
18298
+ /** @description Required for session auth. Optional for API keys, which already belong to one organization. */
18299
+ organizationId?: string;
18300
+ };
18301
+ header?: never;
18302
+ path?: never;
18303
+ cookie?: never;
18304
+ };
18305
+ requestBody?: never;
18306
+ responses: {
18307
+ /** @description One page of matching messages. */
18308
+ 200: {
18309
+ headers: {
18310
+ [name: string]: unknown;
18311
+ };
18312
+ content: {
18313
+ "application/json": {
18314
+ ok?: boolean;
18315
+ operationId?: string;
18316
+ status?: string;
18317
+ data?: {
18318
+ connectionId?: string;
18319
+ /** @enum {string} */
18320
+ provider?: "gmail" | "outlook";
18321
+ emailAddress?: string;
18322
+ query?: string;
18323
+ results?: {
18324
+ id?: string;
18325
+ threadId?: string | null;
18326
+ subject?: string;
18327
+ from?: string;
18328
+ to?: string;
18329
+ date?: string;
18330
+ snippet?: string;
18331
+ isRead?: boolean;
18332
+ isDraft?: boolean;
18333
+ }[];
18334
+ count?: number;
18335
+ nextPageToken?: string | null;
18336
+ };
18337
+ };
18338
+ };
18339
+ };
18340
+ /** @description Invalid request, no connected mailbox, a mailbox that needs reconnecting, or a provider refusal (`error` says which). */
18341
+ 400: {
18342
+ headers: {
18343
+ [name: string]: unknown;
18344
+ };
18345
+ content?: never;
18346
+ };
18347
+ /** @description Unauthorized */
18348
+ 401: {
18349
+ headers: {
18350
+ [name: string]: unknown;
18351
+ };
18352
+ content?: never;
18353
+ };
18354
+ /** @description Missing scope or integration permission, or a credential that acts for no person: organization API clients, Applications and Computer previews cannot reach mail. */
18355
+ 403: {
18356
+ headers: {
18357
+ [name: string]: unknown;
18358
+ };
18359
+ content?: never;
18360
+ };
18361
+ /** @description Internal Server Error */
18362
+ 500: {
18363
+ headers: {
18364
+ [name: string]: unknown;
18365
+ };
18366
+ content?: never;
18367
+ };
18368
+ };
18369
+ };
17481
18370
  post_v1_evaluate: {
17482
18371
  parameters: {
17483
18372
  query?: never;
@@ -26555,6 +27444,8 @@ interface operations {
26555
27444
  voucherReward?: "discount" | "coins_cashback";
26556
27445
  /** @enum {string} */
26557
27446
  voucherAudience?: "general" | "shop_follow";
27447
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
27448
+ redemptionPoints?: number;
26558
27449
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
26559
27450
  repeatPurchaseMinCount?: number;
26560
27451
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -26919,6 +27810,8 @@ interface operations {
26919
27810
  voucherReward?: "discount" | "coins_cashback";
26920
27811
  /** @enum {string} */
26921
27812
  voucherAudience?: "general" | "shop_follow";
27813
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
27814
+ redemptionPoints?: number;
26922
27815
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
26923
27816
  repeatPurchaseMinCount?: number;
26924
27817
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -27517,6 +28410,8 @@ interface operations {
27517
28410
  voucherReward?: "discount" | "coins_cashback";
27518
28411
  /** @enum {string} */
27519
28412
  voucherAudience?: "general" | "shop_follow";
28413
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
28414
+ redemptionPoints?: number;
27520
28415
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
27521
28416
  repeatPurchaseMinCount?: number;
27522
28417
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -34219,7 +35114,7 @@ declare class AgentsGeneralClient {
34219
35114
  *
34220
35115
  * Run the general Omni agent and wait until it completes, pauses for approval, or fails. Requires `agents:invoke`.
34221
35116
 
34222
- A waiting call can take several minutes; raise the client timeout. Send `decisions` with the same `thread_id` to approve or reject a paused run. Omit `config.enabled_tools` to use the organization's agent tools. Attach images on the latest user message as `{ type: "image", url }` HTTP(S) URLs.
35117
+ A waiting call can take several minutes; raise the client timeout. Send `decisions` with the same `thread_id` to approve or reject a paused run. Omit `config.enabled_tools` to use the organization's agent tools. Send only new messages on each turn; thread_id continues the conversation stored in Omni sessions and checkpoints. Omit thread_id for a new conversation. Optional message IDs use native LangGraph replacement semantics, not run idempotency. audience=customer restricts tools to public storefront access without establishing a verified customer identity. Attach images on the latest user message as `{ type: "image", url }` HTTP(S) URLs.
34223
35118
  *
34224
35119
  * `POST /api/v1/agents/general/invoke`
34225
35120
  */
@@ -34246,26 +35141,49 @@ declare class AgentsClient {
34246
35141
  readonly general: AgentsGeneralClient;
34247
35142
  constructor(_http: OmniHttp);
34248
35143
  /**
34249
- * Send a message to an agent
35144
+ * Invoke a saved agent
34250
35145
  *
34251
- * Message the exact built-in or custom agent in the URL, using its saved model, instructions, tools, permissions and Programmatic starting mode.
35146
+ * Invoke the exact built-in or custom agent in the URL using its saved configuration and Programmatic starting mode. Uses the same invocation request and run response as the general agent and MCP.
34252
35147
 
34253
- ### Authentication
34254
- Requires an API key with `agents:invoke`, or a sign-in session. Organization-owned keys use their recorded creator's current membership and agent access; keys without a valid owner are refused. API keys identify their organization; session requests include `organizationId`.
35148
+ Requires agents:invoke and current organization membership and agent access. Organization-owned keys use their recorded creator; no alternate organization member is substituted. Session requests include organizationId.
34255
35149
 
34256
- ### Conversation and execution
34257
- - The same caller, agent and `clientThreadKey` continue one conversation. Different callers, agents and organizations are isolated.
34258
- - No model, prompt or tool overrides are accepted.
34259
- - `wait=false` queues durable work and returns 202; `wait=true` returns the final reply or pending approvals.
34260
- - Send `decisions` with the same `cli
35150
+ Send one or more new messages (at most 50 and 100000 text characters) ending with a user message. Omit thread_id to create a conversation, or reuse the returned thread_id to continue its stored history. An initial batch can import external history, including human replies. Do not resend history on subsequent turns. Optional message IDs follow native LangGraph replacement semantics,
35151
+ *
35152
+ * `POST /api/v1/agents/{agentId}/invoke`
35153
+ */
35154
+ invoke(request: OperationPath<operations["post_v1_agents_by_agentid_invoke"]> & OperationBody<operations["post_v1_agents_by_agentid_invoke"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_agents_by_agentid_invoke"]>>;
35155
+ /**
35156
+ * Invoke a saved agent (alias)
35157
+ *
35158
+ * Alias of /agents/{agentId}/invoke with the identical request and response. Prefer /invoke.
35159
+
35160
+ Invoke the exact built-in or custom agent in the URL using its saved configuration and Programmatic starting mode. Uses the same invocation request and run response as the general agent and MCP.
35161
+
35162
+ Requires agents:invoke and current organization membership and agent access. Organization-owned keys use their recorded creator; no alternate organization member is substituted. Session requests include organizationId.
35163
+
35164
+ Send one or more new messages (at most 50 and 100000 text characters) ending with a user message. Omit thread_id to create a conversation, or reuse the returned thread_id to continue its stored history. An initial batch can import external history, including human replies. Do not resend hist
34261
35165
  *
34262
35166
  * `POST /api/v1/agents/{agentId}/messages`
34263
35167
  */
34264
35168
  messages(request: OperationPath<operations["post_v1_agents_by_agentid_messages"]> & OperationBody<operations["post_v1_agents_by_agentid_messages"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_agents_by_agentid_messages"]>>;
34265
35169
  /**
34266
- * Get an agent message run
35170
+ * Start a saved agent run
35171
+ *
35172
+ * Queue durable execution using the identical invocation contract. Poll Location, honoring Retry-After.
35173
+
35174
+ Invoke the exact built-in or custom agent in the URL using its saved configuration and Programmatic starting mode. Uses the same invocation request and run response as the general agent and MCP.
35175
+
35176
+ Requires agents:invoke and current organization membership and agent access. Organization-owned keys use their recorded creator; no alternate organization member is substituted. Session requests include organizationId.
35177
+
35178
+ Send one or more new messages (at most 50 and 100000 text characters) ending with a user message. Omit thread_id to create a conversation, or reuse the returned thread_id to continue its stored history. An initial batch can import external history, including human replies. Do not
35179
+ *
35180
+ * `POST /api/v1/agents/{agentId}/runs`
35181
+ */
35182
+ runs(request: OperationPath<operations["post_v1_agents_by_agentid_runs"]> & OperationBody<operations["post_v1_agents_by_agentid_runs"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_agents_by_agentid_runs"]>>;
35183
+ /**
35184
+ * Get a saved agent run
34267
35185
  *
34268
- * Read an agent message run belonging to the authenticated caller and the exact agent in the URL. Current organization membership and agent sharing are checked again. Requires agents:invoke.
35186
+ * Read the canonical run resource. Organization, caller, credential and exact agent access are checked again. Requires agents:invoke.
34269
35187
  *
34270
35188
  * `GET /api/v1/agents/{agentId}/runs/{runId}`
34271
35189
  */
@@ -34957,6 +35875,62 @@ declare class DocumentsClient {
34957
35875
  */
34958
35876
  get(request: OperationPath<operations["get_v1_documents_by_documentid"]> & OperationQuery<operations["get_v1_documents_by_documentid"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_documents_by_documentid"]>>;
34959
35877
  }
35878
+ declare class EmailClient {
35879
+ protected readonly _http: OmniHttp;
35880
+ constructor(_http: OmniHttp);
35881
+ /**
35882
+ * List Email Accounts
35883
+ *
35884
+ * Your connected Gmail and Outlook accounts, default first. Pass an account's `connectionId` to the other email endpoints to choose it.
35885
+
35886
+ ### Authorization
35887
+
35888
+ Requires `email:read` and the integration permission the matching chat tool needs, with a person's credential: a CLI login, a signed-in session, or the SDK key inside your own chat sandbox. Only your own connected mailboxes are reachable; another account's `connectionId` is refused.
35889
+ *
35890
+ * `GET /api/v1/email/accounts`
35891
+ */
35892
+ listAccounts(request?: OperationQuery<operations["get_v1_email_accounts"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_email_accounts"]>>;
35893
+ /**
35894
+ * Create Email Draft
35895
+ *
35896
+ * Save a draft in your mailbox; nothing is sent. Pass `replyToMessageId` (and `threadId`) from Search Emails to draft a reply in its conversation. Review and send it from Gmail or Outlook.
35897
+
35898
+ When the provider saved a draft whose threading could not be verified, the request fails with `unverifiedDraftId` in `data` so you can find or discard it.
35899
+
35900
+ ### Authorization
35901
+
35902
+ Requires `email:write` and the integration permission the matching chat tool needs, with a person's credential: a CLI login, a signed-in session, or the SDK key inside your own chat sandbox. Only your own connected mailboxes are reachable; another account's `connectionId` is refused.
35903
+ *
35904
+ * `POST /api/v1/email/drafts`
35905
+ */
35906
+ createDraft(request: OperationBody<operations["post_v1_email_drafts"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_email_drafts"]>>;
35907
+ /**
35908
+ * Get Email Message
35909
+ *
35910
+ * One message from your mailbox: headers, plain-text body (at most 12,000 characters) and attachment metadata. Use a message `id` from Search Emails; encode it as one path segment.
35911
+
35912
+ ### Authorization
35913
+
35914
+ Requires `email:read` and the integration permission the matching chat tool needs, with a person's credential: a CLI login, a signed-in session, or the SDK key inside your own chat sandbox. Only your own connected mailboxes are reachable; another account's `connectionId` is refused.
35915
+ *
35916
+ * `GET /api/v1/email/messages/{messageId}`
35917
+ */
35918
+ getMessage(request: OperationPath<operations["get_v1_email_messages_by_messageid"]> & OperationQuery<operations["get_v1_email_messages_by_messageid"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_email_messages_by_messageid"]>>;
35919
+ /**
35920
+ * Search Emails
35921
+ *
35922
+ * One page of message summaries (subject, from, to, date, snippet, read and draft state) from your mailbox. Gmail accepts its search operators (`from:`, `subject:`, `newer_than:`); Outlook takes free text.
35923
+
35924
+ Pass `nextPageToken` back as `pageToken` with the same mailbox, query, `readState` and `maxResults` until it is null; a token is refused with different search arguments. `readState=unread` filters unread messages, which is not the same as unreplied.
35925
+
35926
+ ### Authorization
35927
+
35928
+ Requires `email:read` and the integration permission the matching chat tool needs, with a person's credential: a CLI login, a signed-in session, or the SDK key inside your own chat sandbox. Only your own connected mailboxes are reachable; another account's `connectionId` is refused.
35929
+ *
35930
+ * `GET /api/v1/email/search`
35931
+ */
35932
+ search(request?: OperationQuery<operations["get_v1_email_search"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_email_search"]>>;
35933
+ }
34960
35934
  declare class EvaluateClient {
34961
35935
  protected readonly _http: OmniHttp;
34962
35936
  constructor(_http: OmniHttp);
@@ -36612,6 +37586,7 @@ declare class OmniGeneratedClient {
36612
37586
  readonly compare: CompareClient;
36613
37587
  readonly directory: DirectoryClient;
36614
37588
  readonly documents: DocumentsClient;
37589
+ readonly email: EmailClient;
36615
37590
  readonly evaluate: EvaluateClient;
36616
37591
  readonly feed: FeedClient;
36617
37592
  readonly followUps: FollowUpsClient;
@@ -36658,6 +37633,7 @@ type OmniResources = {
36658
37633
  compare: CompareClient;
36659
37634
  directory: DirectoryClient;
36660
37635
  documents: DocumentsClient;
37636
+ email: EmailClient;
36661
37637
  evaluate: EvaluateClient;
36662
37638
  feed: FeedClient;
36663
37639
  followUps: FollowUpsClient;
@@ -36730,7 +37706,7 @@ declare function constructEvent(payload: string | Uint8Array, headers: WebhookHe
36730
37706
  toleranceInSeconds?: number;
36731
37707
  }): Promise<ConstructedWebhookEvent>;
36732
37708
 
36733
- declare const SDK_VERSION = "0.26.0";
37709
+ declare const SDK_VERSION = "0.27.0";
36734
37710
 
36735
37711
  type ProductCreatedWebhookEvent = components["schemas"]["ProductCreatedWebhookEvent"];
36736
37712
  type ProductUpdatedWebhookEvent = components["schemas"]["ProductUpdatedWebhookEvent"];