@omni-commerce/sdk 0.26.0 → 0.28.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.cts CHANGED
@@ -179,7 +179,7 @@ interface paths {
179
179
  patch?: never;
180
180
  trace?: never;
181
181
  };
182
- "/api/v1/agents/{agentId}/messages": {
182
+ "/api/v1/agents/{agentId}/invoke": {
183
183
  parameters: {
184
184
  query?: never;
185
185
  header?: never;
@@ -189,19 +189,64 @@ interface paths {
189
189
  get?: never;
190
190
  put?: never;
191
191
  /**
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.
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
194
  *
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`.
195
+ * ### Authorization
196
+ *
197
+ * 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.
198
+ *
199
+ * ### Messages and conversation history
200
+ *
201
+ * 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.
202
+ *
203
+ * 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.
204
+ *
205
+ * 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.
206
+ *
207
+ * ### Approvals
208
+ *
209
+ * Send decisions instead of messages with the same thread_id and audience to resume approvals. Resolve pending approvals before sending new messages.
210
+ */
211
+ post: operations["post_v1_agents_by_agentid_invoke"];
212
+ delete?: never;
213
+ options?: never;
214
+ head?: never;
215
+ patch?: never;
216
+ trace?: never;
217
+ };
218
+ "/api/v1/agents/{agentId}/runs": {
219
+ parameters: {
220
+ query?: never;
221
+ header?: never;
222
+ path?: never;
223
+ cookie?: never;
224
+ };
225
+ get?: never;
226
+ put?: never;
227
+ /**
228
+ * Start a saved agent run
229
+ * @description Queue durable execution using the identical invocation contract. Poll Location, honoring Retry-After.
230
+ *
231
+ * 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.
232
+ *
233
+ * ### Authorization
234
+ *
235
+ * 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.
236
+ *
237
+ * ### Messages and conversation history
238
+ *
239
+ * 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.
240
+ *
241
+ * 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
242
  *
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.
243
+ * 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.
244
+ *
245
+ * ### Approvals
246
+ *
247
+ * Send decisions instead of messages with the same thread_id and audience to resume approvals. Resolve pending approvals before sending new messages.
203
248
  */
204
- post: operations["post_v1_agents_by_agentid_messages"];
249
+ post: operations["post_v1_agents_by_agentid_runs"];
205
250
  delete?: never;
206
251
  options?: never;
207
252
  head?: never;
@@ -216,8 +261,8 @@ interface paths {
216
261
  cookie?: never;
217
262
  };
218
263
  /**
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.
264
+ * Get a saved agent run
265
+ * @description Read the canonical run resource. Organization, caller, credential and exact agent access are checked again. Requires agents:invoke.
221
266
  */
222
267
  get: operations["get_v1_agents_by_agentid_runs_by_runid"];
223
268
  put?: never;
@@ -241,7 +286,13 @@ interface paths {
241
286
  * Invoke the Omni agent
242
287
  * @description Run the general Omni agent and wait until it completes, pauses for approval, or fails. Requires `agents:invoke`.
243
288
  *
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.
289
+ * ### Waiting and approvals
290
+ *
291
+ * 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.
292
+ *
293
+ * ### Messages and tools
294
+ *
295
+ * 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
296
  */
246
297
  post: operations["post_v1_agents_general_invoke"];
247
298
  delete?: never;
@@ -1426,6 +1477,106 @@ interface paths {
1426
1477
  patch?: never;
1427
1478
  trace?: never;
1428
1479
  };
1480
+ "/api/v1/email/accounts": {
1481
+ parameters: {
1482
+ query?: never;
1483
+ header?: never;
1484
+ path?: never;
1485
+ cookie?: never;
1486
+ };
1487
+ /**
1488
+ * List Email Accounts
1489
+ * @description Your connected Gmail and Outlook accounts, default first. Pass an account's `connectionId` to the other email endpoints to choose it.
1490
+ *
1491
+ * ### Authorization
1492
+ *
1493
+ * 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.
1494
+ */
1495
+ get: operations["get_v1_email_accounts"];
1496
+ put?: never;
1497
+ post?: never;
1498
+ delete?: never;
1499
+ options?: never;
1500
+ head?: never;
1501
+ patch?: never;
1502
+ trace?: never;
1503
+ };
1504
+ "/api/v1/email/drafts": {
1505
+ parameters: {
1506
+ query?: never;
1507
+ header?: never;
1508
+ path?: never;
1509
+ cookie?: never;
1510
+ };
1511
+ get?: never;
1512
+ put?: never;
1513
+ /**
1514
+ * Create Email Draft
1515
+ * @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.
1516
+ *
1517
+ * 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.
1518
+ *
1519
+ * ### Authorization
1520
+ *
1521
+ * 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.
1522
+ */
1523
+ post: operations["post_v1_email_drafts"];
1524
+ delete?: never;
1525
+ options?: never;
1526
+ head?: never;
1527
+ patch?: never;
1528
+ trace?: never;
1529
+ };
1530
+ "/api/v1/email/messages/{messageId}": {
1531
+ parameters: {
1532
+ query?: never;
1533
+ header?: never;
1534
+ path?: never;
1535
+ cookie?: never;
1536
+ };
1537
+ /**
1538
+ * Get Email Message
1539
+ * @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.
1540
+ *
1541
+ * ### Authorization
1542
+ *
1543
+ * 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.
1544
+ */
1545
+ get: operations["get_v1_email_messages_by_messageid"];
1546
+ put?: never;
1547
+ post?: never;
1548
+ delete?: never;
1549
+ options?: never;
1550
+ head?: never;
1551
+ patch?: never;
1552
+ trace?: never;
1553
+ };
1554
+ "/api/v1/email/search": {
1555
+ parameters: {
1556
+ query?: never;
1557
+ header?: never;
1558
+ path?: never;
1559
+ cookie?: never;
1560
+ };
1561
+ /**
1562
+ * Search Emails
1563
+ * @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.
1564
+ *
1565
+ * 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.
1566
+ *
1567
+ * ### Authorization
1568
+ *
1569
+ * 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.
1570
+ */
1571
+ get: operations["get_v1_email_search"];
1572
+ put?: never;
1573
+ post?: never;
1574
+ delete?: never;
1575
+ options?: never;
1576
+ head?: never;
1577
+ patch?: never;
1578
+ trace?: never;
1579
+ };
1429
1580
  "/api/v1/evaluate": {
1430
1581
  parameters: {
1431
1582
  query?: never;
@@ -1867,7 +2018,7 @@ interface paths {
1867
2018
  *
1868
2019
  * ### Pricing and catalog defaults
1869
2020
  *
1870
- * - Each line can provide `price`, `unitPrice`, `paidPrice`, and `costPrice`.
2021
+ * - Each line can provide `unitPrice`, `paidPrice`, and `costPrice`.
1871
2022
  * - When `productId` is provided, missing price or currency values may resolve from the product catalog.
1872
2023
  * - An explicit `costPrice` updates `product_data.costPrice` and is snapshotted on the order line. Omitting it never clears an existing product cost.
1873
2024
  *
@@ -2465,7 +2616,7 @@ interface paths {
2465
2616
  *
2466
2617
  * Supply targetMarketplaces and marketplaceStoreSelections to prepare for specific connected stores. Set deferStoreSelection=true to choose marketplaces only and assign stores later with POST /api/v1/products/marketplace-stores. Omit marketplaceStoreSelections and leave workflow.publish off when deferring. Automatic publishing requires catalog:sync in addition to catalog:write.
2467
2618
  *
2468
- * Supply explicit SKU options in each row's `variationAttributes` and native marketplace attributes in `marketplaceAttributes`. Enrichment never infers SKU options. At Zalora publish time, a missing required Size defaults to One Size only when valid for the selected category and supplied size system. Supplied sizes are preserved; missing or incompatible size systems and other required options block publishing. Each row remains a standalone product; no child variants are created for the default.
2619
+ * Supply explicit SKU options in each row's `variationAttributes` and native marketplace attributes in `marketplaceAttributes`. Taxonomy enrichment can propose missing required sale attributes in its existing attribute request when supported by product evidence. Supplied values take precedence. At Zalora publish time, a missing required Size defaults to One Size only when valid for the selected category and supplied size system. Missing or incompatible size systems and other required options block publishing. Each row remains a standalone product.
2469
2620
  *
2470
2621
  * ### Input options
2471
2622
  *
@@ -4847,6 +4998,8 @@ interface components {
4847
4998
  voucherReward?: "discount" | "coins_cashback";
4848
4999
  /** @enum {string} */
4849
5000
  voucherAudience?: "general" | "shop_follow";
5001
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
5002
+ redemptionPoints?: number;
4850
5003
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
4851
5004
  repeatPurchaseMinCount?: number;
4852
5005
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -6915,7 +7068,7 @@ interface operations {
6915
7068
  };
6916
7069
  };
6917
7070
  };
6918
- post_v1_agents_by_agentid_messages: {
7071
+ post_v1_agents_by_agentid_invoke: {
6919
7072
  parameters: {
6920
7073
  query?: never;
6921
7074
  header?: never;
@@ -6928,18 +7081,53 @@ interface operations {
6928
7081
  content: {
6929
7082
  /**
6930
7083
  * @example {
6931
- * "message": "Summarize today's orders.",
6932
- * "clientThreadKey": "daily-report",
6933
- * "wait": true
7084
+ * "thread_id": "whatsapp-123",
7085
+ * "channel": "whatsapp",
7086
+ * "audience": "customer",
7087
+ * "messages": [
7088
+ * {
7089
+ * "id": "wamid.123",
7090
+ * "role": "user",
7091
+ * "content": "Can you deliver tomorrow?"
7092
+ * }
7093
+ * ]
6934
7094
  * }
6935
7095
  */
6936
7096
  "application/json": {
6937
7097
  organizationId?: string;
6938
- message?: string;
6939
- /** @default default */
6940
- clientThreadKey?: string;
6941
- /** @default false */
6942
- wait?: boolean;
7098
+ thread_id?: string | null;
7099
+ channel?: string;
7100
+ /** @enum {string} */
7101
+ audience?: "member" | "customer";
7102
+ messages?: {
7103
+ /** @enum {string} */
7104
+ role?: "user" | "assistant" | "system";
7105
+ content:
7106
+ | string
7107
+ | (
7108
+ | {
7109
+ /** @constant */
7110
+ type: "text";
7111
+ text: string;
7112
+ }
7113
+ | {
7114
+ /** @constant */
7115
+ type: "image";
7116
+ url: string;
7117
+ filename?: string;
7118
+ }
7119
+ )[];
7120
+ id?: string;
7121
+ name?: string;
7122
+ }[];
7123
+ config?: {
7124
+ enabled_tools?: string[];
7125
+ model?: string | null;
7126
+ system_prompt?: string;
7127
+ structured_output?: {
7128
+ [key: string]: unknown;
7129
+ } | null;
7130
+ };
6943
7131
  decisions?: {
6944
7132
  /** @enum {string} */
6945
7133
  action: "approve" | "reject";
@@ -6949,60 +7137,40 @@ interface operations {
6949
7137
  };
6950
7138
  };
6951
7139
  responses: {
6952
- /** @description The agent's verbatim final reply or pending approvals. */
7140
+ /** @description The run completed or paused for approval. */
6953
7141
  200: {
6954
7142
  headers: {
6955
7143
  [name: string]: unknown;
6956
7144
  };
6957
7145
  content: {
6958
7146
  "application/json": {
6959
- agentId: string;
6960
- threadKey: string;
6961
- runId: string;
6962
- threadId: string;
6963
- /** @enum {string} */
6964
- status:
6965
- | "accepted"
6966
- | "running"
6967
- | "completed"
6968
- | "awaiting_approval"
6969
- | "failed";
6970
- reply: string | null;
6971
- approvals:
6972
- | {
6973
- interrupt_instance_id: string;
6974
- tool_name: string | null;
6975
- tool_args: unknown;
6976
- message: string;
6977
- }[]
6978
- | null;
6979
- error: string | null;
6980
- };
6981
- };
6982
- };
6983
- /** @description Accepted for durable execution. */
6984
- 202: {
6985
- 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. */
6989
- "Retry-After"?: number;
6990
- [name: string]: unknown;
6991
- };
6992
- content: {
6993
- "application/json": {
6994
- agentId: string;
6995
- threadKey: string;
6996
- runId: string;
6997
- threadId: string;
7147
+ run_id: string;
7148
+ thread_id: string;
6998
7149
  /** @enum {string} */
6999
7150
  status:
7000
- | "accepted"
7151
+ | "queued"
7001
7152
  | "running"
7002
7153
  | "completed"
7003
7154
  | "awaiting_approval"
7004
7155
  | "failed";
7005
- reply: string | null;
7156
+ messages: {
7157
+ /** @enum {string} */
7158
+ type: "human" | "ai" | "tool" | "system";
7159
+ /** @enum {string} */
7160
+ role: "user" | "assistant" | "tool" | "system";
7161
+ content: string;
7162
+ id?: string;
7163
+ name?: string;
7164
+ tool_calls?: {
7165
+ id?: string;
7166
+ name: string;
7167
+ args: unknown;
7168
+ }[];
7169
+ tool_call_id?: string;
7170
+ }[];
7171
+ structured_output: {
7172
+ [key: string]: unknown;
7173
+ } | null;
7006
7174
  approvals:
7007
7175
  | {
7008
7176
  interrupt_instance_id: string;
@@ -7015,14 +7183,14 @@ interface operations {
7015
7183
  };
7016
7184
  };
7017
7185
  };
7018
- /** @description Invalid message, decisions or organization scope. */
7186
+ /** @description Invalid invocation, configuration override for a saved agent, or organization mismatch. */
7019
7187
  400: {
7020
7188
  headers: {
7021
7189
  [name: string]: unknown;
7022
7190
  };
7023
7191
  content?: never;
7024
7192
  };
7025
- /** @description A valid Bearer API key or sign-in session is required. */
7193
+ /** @description Authentication required. */
7026
7194
  401: {
7027
7195
  headers: {
7028
7196
  [name: string]: unknown;
@@ -7036,21 +7204,21 @@ interface operations {
7036
7204
  };
7037
7205
  content?: never;
7038
7206
  };
7039
- /** @description Missing agents:invoke scope, inactive agent, revoked key, or the credential owner lacks organization membership or agent sharing access. */
7207
+ /** @description Missing agents:invoke scope, inactive agent or credential, or missing membership or agent access. */
7040
7208
  403: {
7041
7209
  headers: {
7042
7210
  [name: string]: unknown;
7043
7211
  };
7044
7212
  content?: never;
7045
7213
  };
7046
- /** @description The run does not belong to this agent and caller. */
7214
+ /** @description The conversation or run is not available to this caller and agent. */
7047
7215
  404: {
7048
7216
  headers: {
7049
7217
  [name: string]: unknown;
7050
7218
  };
7051
7219
  content?: never;
7052
7220
  };
7053
- /** @description This conversation already has an active run, or there is no matching pending approval. */
7221
+ /** @description The thread has an active run or an unresolved approval. */
7054
7222
  409: {
7055
7223
  headers: {
7056
7224
  [name: string]: unknown;
@@ -7073,42 +7241,113 @@ interface operations {
7073
7241
  };
7074
7242
  };
7075
7243
  };
7076
- get_v1_agents_by_agentid_runs_by_runid: {
7244
+ post_v1_agents_by_agentid_runs: {
7077
7245
  parameters: {
7078
- query?: {
7079
- /** @description Required for sign-in sessions. API keys already identify their organization. */
7080
- organizationId?: string;
7081
- };
7246
+ query?: never;
7082
7247
  header?: never;
7083
7248
  path: {
7084
7249
  agentId: string;
7085
- runId: string;
7086
7250
  };
7087
7251
  cookie?: never;
7088
7252
  };
7089
- requestBody?: never;
7253
+ requestBody: {
7254
+ content: {
7255
+ /**
7256
+ * @example {
7257
+ * "thread_id": "whatsapp-123",
7258
+ * "channel": "whatsapp",
7259
+ * "audience": "customer",
7260
+ * "messages": [
7261
+ * {
7262
+ * "id": "wamid.123",
7263
+ * "role": "user",
7264
+ * "content": "Can you deliver tomorrow?"
7265
+ * }
7266
+ * ]
7267
+ * }
7268
+ */
7269
+ "application/json": {
7270
+ organizationId?: string;
7271
+ thread_id?: string | null;
7272
+ channel?: string;
7273
+ /** @enum {string} */
7274
+ audience?: "member" | "customer";
7275
+ messages?: {
7276
+ /** @enum {string} */
7277
+ role?: "user" | "assistant" | "system";
7278
+ content:
7279
+ | string
7280
+ | (
7281
+ | {
7282
+ /** @constant */
7283
+ type: "text";
7284
+ text: string;
7285
+ }
7286
+ | {
7287
+ /** @constant */
7288
+ type: "image";
7289
+ url: string;
7290
+ filename?: string;
7291
+ }
7292
+ )[];
7293
+ id?: string;
7294
+ name?: string;
7295
+ }[];
7296
+ config?: {
7297
+ enabled_tools?: string[];
7298
+ model?: string | null;
7299
+ system_prompt?: string;
7300
+ structured_output?: {
7301
+ [key: string]: unknown;
7302
+ } | null;
7303
+ };
7304
+ decisions?: {
7305
+ /** @enum {string} */
7306
+ action: "approve" | "reject";
7307
+ reason?: string;
7308
+ }[];
7309
+ };
7310
+ };
7311
+ };
7090
7312
  responses: {
7091
- /** @description Current run status, reply and approvals. */
7092
- 200: {
7313
+ /** @description Queued for durable execution. */
7314
+ 202: {
7093
7315
  headers: {
7094
- /** @description Seconds to wait before reading an open run again. */
7316
+ /** @description Seconds before polling again. */
7095
7317
  "Retry-After"?: number;
7318
+ /** @description Caller-scoped run status URL. */
7319
+ Location?: string;
7096
7320
  [name: string]: unknown;
7097
7321
  };
7098
7322
  content: {
7099
7323
  "application/json": {
7100
- agentId: string;
7101
- threadKey: string;
7102
- runId: string;
7103
- threadId: string;
7324
+ run_id: string;
7325
+ thread_id: string;
7104
7326
  /** @enum {string} */
7105
7327
  status:
7106
- | "accepted"
7328
+ | "queued"
7107
7329
  | "running"
7108
7330
  | "completed"
7109
7331
  | "awaiting_approval"
7110
7332
  | "failed";
7111
- reply: string | null;
7333
+ messages: {
7334
+ /** @enum {string} */
7335
+ type: "human" | "ai" | "tool" | "system";
7336
+ /** @enum {string} */
7337
+ role: "user" | "assistant" | "tool" | "system";
7338
+ content: string;
7339
+ id?: string;
7340
+ name?: string;
7341
+ tool_calls?: {
7342
+ id?: string;
7343
+ name: string;
7344
+ args: unknown;
7345
+ }[];
7346
+ tool_call_id?: string;
7347
+ }[];
7348
+ structured_output: {
7349
+ [key: string]: unknown;
7350
+ } | null;
7112
7351
  approvals:
7113
7352
  | {
7114
7353
  interrupt_instance_id: string;
@@ -7121,14 +7360,14 @@ interface operations {
7121
7360
  };
7122
7361
  };
7123
7362
  };
7124
- /** @description Invalid message, decisions or organization scope. */
7363
+ /** @description Invalid invocation, configuration override for a saved agent, or organization mismatch. */
7125
7364
  400: {
7126
7365
  headers: {
7127
7366
  [name: string]: unknown;
7128
7367
  };
7129
7368
  content?: never;
7130
7369
  };
7131
- /** @description A valid Bearer API key or sign-in session is required. */
7370
+ /** @description Authentication required. */
7132
7371
  401: {
7133
7372
  headers: {
7134
7373
  [name: string]: unknown;
@@ -7142,21 +7381,21 @@ interface operations {
7142
7381
  };
7143
7382
  content?: never;
7144
7383
  };
7145
- /** @description Missing agents:invoke scope, inactive agent, revoked key, or the credential owner lacks organization membership or agent sharing access. */
7384
+ /** @description Missing agents:invoke scope, inactive agent or credential, or missing membership or agent access. */
7146
7385
  403: {
7147
7386
  headers: {
7148
7387
  [name: string]: unknown;
7149
7388
  };
7150
7389
  content?: never;
7151
7390
  };
7152
- /** @description The run does not belong to this agent and caller. */
7391
+ /** @description The conversation or run is not available to this caller and agent. */
7153
7392
  404: {
7154
7393
  headers: {
7155
7394
  [name: string]: unknown;
7156
7395
  };
7157
7396
  content?: never;
7158
7397
  };
7159
- /** @description This conversation already has an active run, or there is no matching pending approval. */
7398
+ /** @description The thread has an active run or an unresolved approval. */
7160
7399
  409: {
7161
7400
  headers: {
7162
7401
  [name: string]: unknown;
@@ -7170,6 +7409,134 @@ interface operations {
7170
7409
  };
7171
7410
  content?: never;
7172
7411
  };
7412
+ /** @description The waiting request timed out. The error includes the stored run ID. */
7413
+ 504: {
7414
+ headers: {
7415
+ [name: string]: unknown;
7416
+ };
7417
+ content?: never;
7418
+ };
7419
+ };
7420
+ };
7421
+ get_v1_agents_by_agentid_runs_by_runid: {
7422
+ parameters: {
7423
+ query?: {
7424
+ /** @description Required for session authentication; API keys identify their organization. */
7425
+ organizationId?: string;
7426
+ };
7427
+ header?: never;
7428
+ path: {
7429
+ agentId: string;
7430
+ runId: string;
7431
+ };
7432
+ cookie?: never;
7433
+ };
7434
+ requestBody?: never;
7435
+ responses: {
7436
+ /** @description The run resource. */
7437
+ 200: {
7438
+ headers: {
7439
+ /** @description Seconds before polling again. */
7440
+ "Retry-After"?: number;
7441
+ [name: string]: unknown;
7442
+ };
7443
+ content: {
7444
+ "application/json": {
7445
+ run_id: string;
7446
+ thread_id: string;
7447
+ /** @enum {string} */
7448
+ status:
7449
+ | "queued"
7450
+ | "running"
7451
+ | "completed"
7452
+ | "awaiting_approval"
7453
+ | "failed";
7454
+ messages: {
7455
+ /** @enum {string} */
7456
+ type: "human" | "ai" | "tool" | "system";
7457
+ /** @enum {string} */
7458
+ role: "user" | "assistant" | "tool" | "system";
7459
+ content: string;
7460
+ id?: string;
7461
+ name?: string;
7462
+ tool_calls?: {
7463
+ id?: string;
7464
+ name: string;
7465
+ args: unknown;
7466
+ }[];
7467
+ tool_call_id?: string;
7468
+ }[];
7469
+ structured_output: {
7470
+ [key: string]: unknown;
7471
+ } | null;
7472
+ approvals:
7473
+ | {
7474
+ interrupt_instance_id: string;
7475
+ tool_name: string | null;
7476
+ tool_args: unknown;
7477
+ message: string;
7478
+ }[]
7479
+ | null;
7480
+ error: string | null;
7481
+ };
7482
+ };
7483
+ };
7484
+ /** @description Invalid invocation, configuration override for a saved agent, or organization mismatch. */
7485
+ 400: {
7486
+ headers: {
7487
+ [name: string]: unknown;
7488
+ };
7489
+ content?: never;
7490
+ };
7491
+ /** @description Authentication required. */
7492
+ 401: {
7493
+ headers: {
7494
+ [name: string]: unknown;
7495
+ };
7496
+ content?: never;
7497
+ };
7498
+ /** @description Insufficient AI credits. */
7499
+ 402: {
7500
+ headers: {
7501
+ [name: string]: unknown;
7502
+ };
7503
+ content?: never;
7504
+ };
7505
+ /** @description Missing agents:invoke scope, inactive agent or credential, or missing membership or agent access. */
7506
+ 403: {
7507
+ headers: {
7508
+ [name: string]: unknown;
7509
+ };
7510
+ content?: never;
7511
+ };
7512
+ /** @description The conversation or run is not available to this caller and agent. */
7513
+ 404: {
7514
+ headers: {
7515
+ [name: string]: unknown;
7516
+ };
7517
+ content?: never;
7518
+ };
7519
+ /** @description The thread has an active run or an unresolved approval. */
7520
+ 409: {
7521
+ headers: {
7522
+ [name: string]: unknown;
7523
+ };
7524
+ content?: never;
7525
+ };
7526
+ /** @description The agent run failed. */
7527
+ 500: {
7528
+ headers: {
7529
+ [name: string]: unknown;
7530
+ };
7531
+ content?: never;
7532
+ };
7533
+ /** @description The waiting request timed out. The error includes the stored run ID. */
7534
+ 504: {
7535
+ headers: {
7536
+ [name: string]: unknown;
7537
+ };
7538
+ content?: never;
7539
+ };
7173
7540
  };
7174
7541
  };
7175
7542
  post_v1_agents_general_invoke: {
@@ -7195,6 +7562,8 @@ interface operations {
7195
7562
  organizationId?: string;
7196
7563
  thread_id?: string | null;
7197
7564
  channel?: string;
7565
+ /** @enum {string} */
7566
+ audience?: "member" | "customer";
7198
7567
  messages?: {
7199
7568
  /** @enum {string} */
7200
7569
  role?: "user" | "assistant" | "system";
@@ -7353,6 +7722,8 @@ interface operations {
7353
7722
  organizationId?: string;
7354
7723
  thread_id?: string | null;
7355
7724
  channel?: string;
7725
+ /** @enum {string} */
7726
+ audience?: "member" | "customer";
7356
7727
  messages?: {
7357
7728
  /** @enum {string} */
7358
7729
  role?: "user" | "assistant" | "system";
@@ -11550,6 +11921,8 @@ interface operations {
11550
11921
  voucherReward?: "discount" | "coins_cashback";
11551
11922
  /** @enum {string} */
11552
11923
  voucherAudience?: "general" | "shop_follow";
11924
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
11925
+ redemptionPoints?: number;
11553
11926
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
11554
11927
  repeatPurchaseMinCount?: number;
11555
11928
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -12302,6 +12675,8 @@ interface operations {
12302
12675
  voucherReward?: "discount" | "coins_cashback";
12303
12676
  /** @enum {string} */
12304
12677
  voucherAudience?: "general" | "shop_follow";
12678
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
12679
+ redemptionPoints?: number;
12305
12680
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
12306
12681
  repeatPurchaseMinCount?: number;
12307
12682
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -12783,6 +13158,8 @@ interface operations {
12783
13158
  voucherReward?: "discount" | "coins_cashback";
12784
13159
  /** @enum {string} */
12785
13160
  voucherAudience?: "general" | "shop_follow";
13161
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
13162
+ redemptionPoints?: number;
12786
13163
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
12787
13164
  repeatPurchaseMinCount?: number;
12788
13165
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -13723,6 +14100,8 @@ interface operations {
13723
14100
  voucherReward?: "discount" | "coins_cashback";
13724
14101
  /** @enum {string} */
13725
14102
  voucherAudience?: "general" | "shop_follow";
14103
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
14104
+ redemptionPoints?: number;
13726
14105
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
13727
14106
  repeatPurchaseMinCount?: number;
13728
14107
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -14530,6 +14909,8 @@ interface operations {
14530
14909
  voucherReward?: "discount" | "coins_cashback";
14531
14910
  /** @enum {string} */
14532
14911
  voucherAudience?: "general" | "shop_follow";
14912
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
14913
+ redemptionPoints?: number;
14533
14914
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
14534
14915
  repeatPurchaseMinCount?: number;
14535
14916
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -17478,6 +17859,326 @@ interface operations {
17478
17859
  };
17479
17860
  };
17480
17861
  };
17862
+ get_v1_email_accounts: {
17863
+ parameters: {
17864
+ query?: {
17865
+ /** @description Required for session auth. Optional for API keys, which already belong to one organization. */
17866
+ organizationId?: string;
17867
+ };
17868
+ header?: never;
17869
+ path?: never;
17870
+ cookie?: never;
17871
+ };
17872
+ requestBody?: never;
17873
+ responses: {
17874
+ /** @description Your connected accounts. */
17875
+ 200: {
17876
+ headers: {
17877
+ [name: string]: unknown;
17878
+ };
17879
+ content: {
17880
+ "application/json": {
17881
+ ok?: boolean;
17882
+ operationId?: string;
17883
+ status?: string;
17884
+ data?: {
17885
+ accounts?: {
17886
+ connectionId?: string;
17887
+ /** @enum {string} */
17888
+ provider?: "gmail" | "outlook";
17889
+ emailAddress?: string;
17890
+ isDefault?: boolean;
17891
+ capabilities?: string[];
17892
+ /** @enum {string} */
17893
+ status?: "active" | "needs_reauth" | "revoked";
17894
+ }[];
17895
+ count?: number;
17896
+ };
17897
+ };
17898
+ };
17899
+ };
17900
+ /** @description Invalid request, no connected mailbox, a mailbox that needs reconnecting, or a provider refusal (`error` says which). */
17901
+ 400: {
17902
+ headers: {
17903
+ [name: string]: unknown;
17904
+ };
17905
+ content?: never;
17906
+ };
17907
+ /** @description Unauthorized */
17908
+ 401: {
17909
+ headers: {
17910
+ [name: string]: unknown;
17911
+ };
17912
+ content?: never;
17913
+ };
17914
+ /** @description Missing scope or integration permission, or a credential that acts for no person: organization API clients, Applications and Computer previews cannot reach mail. */
17915
+ 403: {
17916
+ headers: {
17917
+ [name: string]: unknown;
17918
+ };
17919
+ content?: never;
17920
+ };
17921
+ /** @description Internal Server Error */
17922
+ 500: {
17923
+ headers: {
17924
+ [name: string]: unknown;
17925
+ };
17926
+ content?: never;
17927
+ };
17928
+ };
17929
+ };
17930
+ post_v1_email_drafts: {
17931
+ parameters: {
17932
+ query?: never;
17933
+ header?: never;
17934
+ path?: never;
17935
+ cookie?: never;
17936
+ };
17937
+ requestBody: {
17938
+ content: {
17939
+ /**
17940
+ * @example {
17941
+ * "to": "buyer@example.com",
17942
+ * "subject": "Re: Order 1042",
17943
+ * "body": "Thanks for your order. It ships tomorrow.",
17944
+ * "replyToMessageId": "18c2f0a9b7e4d123"
17945
+ * }
17946
+ */
17947
+ "application/json": {
17948
+ to: string;
17949
+ subject: string;
17950
+ body: string;
17951
+ /** @description Connected account id from email_list_accounts. Omit to use the user's default. */
17952
+ connectionId?: string;
17953
+ replyToMessageId?: string;
17954
+ threadId?: string;
17955
+ /** @description Required for session auth. Optional for API keys, which already belong to one organization. */
17956
+ organizationId?: string;
17957
+ };
17958
+ };
17959
+ };
17960
+ responses: {
17961
+ /** @description The saved draft. */
17962
+ 200: {
17963
+ headers: {
17964
+ [name: string]: unknown;
17965
+ };
17966
+ content: {
17967
+ "application/json": {
17968
+ ok?: boolean;
17969
+ operationId?: string;
17970
+ status?: string;
17971
+ data?: {
17972
+ connectionId?: string;
17973
+ /** @enum {string} */
17974
+ provider?: "gmail" | "outlook";
17975
+ emailAddress?: string;
17976
+ draft?: {
17977
+ draftId?: string | null;
17978
+ messageId?: string | null;
17979
+ /** @description Gmail only. */
17980
+ threadId?: string | null;
17981
+ /** @description Outlook only: opens the draft. */
17982
+ webLink?: string | null;
17983
+ };
17984
+ note?: string;
17985
+ };
17986
+ };
17987
+ };
17988
+ };
17989
+ /** @description Invalid request, no connected mailbox, a mailbox that needs reconnecting, or a provider refusal (`error` says which). */
17990
+ 400: {
17991
+ headers: {
17992
+ [name: string]: unknown;
17993
+ };
17994
+ content?: never;
17995
+ };
17996
+ /** @description Unauthorized */
17997
+ 401: {
17998
+ headers: {
17999
+ [name: string]: unknown;
18000
+ };
18001
+ content?: never;
18002
+ };
18003
+ /** @description Missing scope or integration permission, or a credential that acts for no person: organization API clients, Applications and Computer previews cannot reach mail. */
18004
+ 403: {
18005
+ headers: {
18006
+ [name: string]: unknown;
18007
+ };
18008
+ content?: never;
18009
+ };
18010
+ /** @description Internal Server Error */
18011
+ 500: {
18012
+ headers: {
18013
+ [name: string]: unknown;
18014
+ };
18015
+ content?: never;
18016
+ };
18017
+ };
18018
+ };
18019
+ get_v1_email_messages_by_messageid: {
18020
+ parameters: {
18021
+ query?: {
18022
+ /** @description Connected account from `GET /api/v1/email/accounts`. Defaults to your default mailbox. */
18023
+ connectionId?: string;
18024
+ /** @description Required for session auth. Optional for API keys, which already belong to one organization. */
18025
+ organizationId?: string;
18026
+ };
18027
+ header?: never;
18028
+ path: {
18029
+ /** @description Provider message id from Search Emails. */
18030
+ messageId: string;
18031
+ };
18032
+ cookie?: never;
18033
+ };
18034
+ requestBody?: never;
18035
+ responses: {
18036
+ /** @description The message. */
18037
+ 200: {
18038
+ headers: {
18039
+ [name: string]: unknown;
18040
+ };
18041
+ content: {
18042
+ "application/json": {
18043
+ ok?: boolean;
18044
+ operationId?: string;
18045
+ status?: string;
18046
+ data?: {
18047
+ connectionId?: string;
18048
+ /** @enum {string} */
18049
+ provider?: "gmail" | "outlook";
18050
+ emailAddress?: string;
18051
+ message?: {
18052
+ id?: string;
18053
+ threadId?: string | null;
18054
+ subject?: string;
18055
+ from?: string;
18056
+ to?: string;
18057
+ date?: string;
18058
+ snippet?: string;
18059
+ bodyText?: string;
18060
+ hasAttachments?: boolean;
18061
+ attachments?: Record<string, never>[];
18062
+ };
18063
+ };
18064
+ };
18065
+ };
18066
+ };
18067
+ /** @description Invalid request, no connected mailbox, a mailbox that needs reconnecting, or a provider refusal (`error` says which). */
18068
+ 400: {
18069
+ headers: {
18070
+ [name: string]: unknown;
18071
+ };
18072
+ content?: never;
18073
+ };
18074
+ /** @description Unauthorized */
18075
+ 401: {
18076
+ headers: {
18077
+ [name: string]: unknown;
18078
+ };
18079
+ content?: never;
18080
+ };
18081
+ /** @description Missing scope or integration permission, or a credential that acts for no person: organization API clients, Applications and Computer previews cannot reach mail. */
18082
+ 403: {
18083
+ headers: {
18084
+ [name: string]: unknown;
18085
+ };
18086
+ content?: never;
18087
+ };
18088
+ /** @description Internal Server Error */
18089
+ 500: {
18090
+ headers: {
18091
+ [name: string]: unknown;
18092
+ };
18093
+ content?: never;
18094
+ };
18095
+ };
18096
+ };
18097
+ get_v1_email_search: {
18098
+ parameters: {
18099
+ query?: {
18100
+ /** @description Search query. Empty lists the newest messages. */
18101
+ query?: string;
18102
+ /** @description Connected account from `GET /api/v1/email/accounts`. Defaults to your default mailbox. */
18103
+ connectionId?: string;
18104
+ /** @description 1–50; 20 when omitted. */
18105
+ maxResults?: number;
18106
+ /** @description `nextPageToken` from the previous page. */
18107
+ pageToken?: string;
18108
+ /** @description Filter by read state. */
18109
+ readState?: "all" | "unread" | "read";
18110
+ /** @description Required for session auth. Optional for API keys, which already belong to one organization. */
18111
+ organizationId?: string;
18112
+ };
18113
+ header?: never;
18114
+ path?: never;
18115
+ cookie?: never;
18116
+ };
18117
+ requestBody?: never;
18118
+ responses: {
18119
+ /** @description One page of matching messages. */
18120
+ 200: {
18121
+ headers: {
18122
+ [name: string]: unknown;
18123
+ };
18124
+ content: {
18125
+ "application/json": {
18126
+ ok?: boolean;
18127
+ operationId?: string;
18128
+ status?: string;
18129
+ data?: {
18130
+ connectionId?: string;
18131
+ /** @enum {string} */
18132
+ provider?: "gmail" | "outlook";
18133
+ emailAddress?: string;
18134
+ query?: string;
18135
+ results?: {
18136
+ id?: string;
18137
+ threadId?: string | null;
18138
+ subject?: string;
18139
+ from?: string;
18140
+ to?: string;
18141
+ date?: string;
18142
+ snippet?: string;
18143
+ isRead?: boolean;
18144
+ isDraft?: boolean;
18145
+ }[];
18146
+ count?: number;
18147
+ nextPageToken?: string | null;
18148
+ };
18149
+ };
18150
+ };
18151
+ };
18152
+ /** @description Invalid request, no connected mailbox, a mailbox that needs reconnecting, or a provider refusal (`error` says which). */
18153
+ 400: {
18154
+ headers: {
18155
+ [name: string]: unknown;
18156
+ };
18157
+ content?: never;
18158
+ };
18159
+ /** @description Unauthorized */
18160
+ 401: {
18161
+ headers: {
18162
+ [name: string]: unknown;
18163
+ };
18164
+ content?: never;
18165
+ };
18166
+ /** @description Missing scope or integration permission, or a credential that acts for no person: organization API clients, Applications and Computer previews cannot reach mail. */
18167
+ 403: {
18168
+ headers: {
18169
+ [name: string]: unknown;
18170
+ };
18171
+ content?: never;
18172
+ };
18173
+ /** @description Internal Server Error */
18174
+ 500: {
18175
+ headers: {
18176
+ [name: string]: unknown;
18177
+ };
18178
+ content?: never;
18179
+ };
18180
+ };
18181
+ };
17481
18182
  post_v1_evaluate: {
17482
18183
  parameters: {
17483
18184
  query?: never;
@@ -19469,7 +20170,7 @@ interface operations {
19469
20170
  store?: string;
19470
20171
  /** @description Filter whole orders by recorded catalog bundle type, with mapped catalog fallback for legacy lines. Hard/virtual match any line; non_bundle requires no bundle lines. Marketplace bundle-deal promotions alone are not catalog bundles. */
19471
20172
  bundleType?: "" | "hard" | "virtual" | "non_bundle";
19472
- /** @description Comma-separated sort tokens. Supports multi-sort up to six tokens. Aliases: `latest` -> `updated_desc`, `oldest` -> `updated_asc`. */
20173
+ /** @description Comma-separated sort tokens. Supports multi-sort up to six tokens. */
19473
20174
  sortBy?: string;
19474
20175
  /** @description Inclusive lower bound on order created date (`YYYY-MM-DD`). */
19475
20176
  dateFrom?: string;
@@ -19479,6 +20180,8 @@ interface operations {
19479
20180
  limit?: number;
19480
20181
  /** @description Zero-based pagination offset. Use `pagination.nextOffset` from the previous response to page forward. */
19481
20182
  offset?: number;
20183
+ /** @description Set false for scans to skip status counts on every page. summary is omitted and pagination.total is null. */
20184
+ includeSummary?: boolean;
19482
20185
  };
19483
20186
  header?: never;
19484
20187
  path?: never;
@@ -19486,7 +20189,7 @@ interface operations {
19486
20189
  };
19487
20190
  requestBody?: never;
19488
20191
  responses: {
19489
- /** @description Orders page returned. */
20192
+ /** @description Orders page returned. summary is omitted and pagination.total is null when includeSummary=false. */
19490
20193
  200: {
19491
20194
  headers: {
19492
20195
  [name: string]: unknown;
@@ -19545,7 +20248,8 @@ interface operations {
19545
20248
  pagination?: {
19546
20249
  offset?: number;
19547
20250
  limit?: number;
19548
- total?: number;
20251
+ /** @description Orders matching the filters, ignoring offset/limit. Null when includeSummary=false. */
20252
+ total?: number | null;
19549
20253
  hasMore?: boolean;
19550
20254
  nextOffset?: number | null;
19551
20255
  maxLimit?: number;
@@ -19681,18 +20385,14 @@ interface operations {
19681
20385
  sellerSku?: string;
19682
20386
  shopSku?: string;
19683
20387
  quantity: number;
19684
- /** @description Alias for `unitPrice` (list / original unit price). Prefer `unitPrice` on new integrations. When list and paid amounts are the same, you may send only `price` or only `paidPrice`. When omitted together with unitPrice/paidPrice, may resolve from the product catalog if productId is provided. */
19685
- price?: number;
19686
- /** @description Per-unit list / original (sticker) price before line discounts. Same meaning as `price`. Not the order total. Use with `paidPrice` when you need list vs discounted; otherwise one of unitPrice/price/paidPrice is enough. */
20388
+ /** @description Per-unit list / original (sticker) price before line discounts. Not the order total. Use with `paidPrice` when you need list vs discounted; otherwise one of unitPrice/paidPrice is enough. When both are omitted, may resolve from the product catalog if productId is provided. */
19687
20389
  unitPrice?: number;
19688
- /** @description Per-unit amount actually charged after discounts (what the buyer paid for one unit). Preferred for order totals, GMV, and return refund estimates: total line money uses paidPrice×quantity when set, else unitPrice/price×quantity. Not COGS (see costPrice). Not marketplace fees. */
20390
+ /** @description Per-unit amount actually charged after discounts (what the buyer paid for one unit). Preferred for order totals, GMV, and return refund estimates: total line money uses paidPrice×quantity when set, else unitPrice×quantity. Not COGS (see costPrice). Not marketplace fees. */
19689
20391
  paidPrice?: number;
19690
20392
  /** @description Unit cost (COGS). When provided with productId, updates the reusable product_data.costPrice catalog default. The metadata.costPrice order-line snapshot is canonical for historical P&L. Omitted costPrice never clears existing product or line cost. When omitted with productId on create, the line snapshot may resolve from the product catalog. Distinct from price/unitPrice/paidPrice (selling prices). Stored in the local/target currency after FX when costPriceCurrency is set. */
19691
20393
  costPrice?: number;
19692
- /** @description ISO currency of the raw costPrice (e.g. USD) before conversion. Required when cost is not already in the order/line currency. Alias: costCurrency. */
20394
+ /** @description ISO currency of the raw costPrice (e.g. USD) before conversion. Required when cost is not already in the order/line currency. */
19693
20395
  costPriceCurrency?: string;
19694
- /** @description Alias for costPriceCurrency. */
19695
- costCurrency?: string;
19696
20396
  /** @description Manual FX rate: units of costPriceFxTo per 1 unit of costPriceCurrency (USD→MYR at 4.45 means 1 USD = 4.45 MYR). Omit to auto-fetch the rate from Frankfurter (ECB daily rates). */
19697
20397
  costPriceFxRate?: number;
19698
20398
  /** @description Target currency for the conversion. Defaults to the line currency, then the order currency, and must match that accounting currency when one is present. */
@@ -20053,18 +20753,14 @@ interface operations {
20053
20753
  shopSku?: string;
20054
20754
  /** @description Required with productName when inserting a new line. */
20055
20755
  quantity?: number;
20056
- /** @description Alias for `unitPrice` (list / original unit price). Prefer `unitPrice` on new integrations. */
20057
- price?: number;
20058
- /** @description Per-unit list / original (sticker) price before line discounts. Same meaning as `price`. */
20756
+ /** @description Per-unit list / original (sticker) price before line discounts. */
20059
20757
  unitPrice?: number;
20060
- /** @description Per-unit amount actually charged after discounts. Preferred for totals and return refund estimates (paidPrice×quantity when set, else unitPrice/price×quantity). Not COGS. */
20758
+ /** @description Per-unit amount actually charged after discounts. Preferred for totals and return refund estimates (paidPrice×quantity when set, else unitPrice×quantity). Not COGS. */
20061
20759
  paidPrice?: number;
20062
20760
  /** @description Unit COGS. With productId (on the patch or existing line), upserts product_data.costPrice. Omitted costPrice never clears existing product or line cost. Distinct from price/unitPrice/paidPrice. Stored in the local/target currency after FX when costPriceCurrency is set. */
20063
20761
  costPrice?: number;
20064
- /** @description ISO currency of the raw costPrice (e.g. USD) before conversion. Required when cost is not already in the order/line currency. Alias: costCurrency. */
20762
+ /** @description ISO currency of the raw costPrice (e.g. USD) before conversion. Required when cost is not already in the order/line currency. */
20065
20763
  costPriceCurrency?: string;
20066
- /** @description Alias for costPriceCurrency. */
20067
- costCurrency?: string;
20068
20764
  /** @description Manual FX rate: units of costPriceFxTo per 1 unit of costPriceCurrency (USD→MYR at 4.45 means 1 USD = 4.45 MYR). Omit to auto-fetch the rate from Frankfurter (ECB daily rates). */
20069
20765
  costPriceFxRate?: number;
20070
20766
  /** @description Target currency for the conversion. Defaults to the line currency, then the order currency, and must match that accounting currency when one is present. */
@@ -21522,7 +22218,7 @@ interface operations {
21522
22218
  publishedTo?: string;
21523
22219
  /** @description IANA time zone for date-only publication bounds. */
21524
22220
  publishedTimeZone?: string;
21525
- /** @description Opaque nextCursor from the previous page with identical organization and filters. Supported for created_desc without search; other sorts use nextOffset. */
22221
+ /** @description Opaque nextCursor from the previous page with identical organization and filters. Supported for created_desc and updated_desc without search; other sorts use nextOffset. */
21526
22222
  cursor?: string;
21527
22223
  /** @description Set false for scans to skip catalog summary classification on every page. summary is omitted and pagination.total is null; use products.count for a count-only request. */
21528
22224
  includeSummary?: boolean;
@@ -21688,10 +22384,12 @@ interface operations {
21688
22384
  summary?: {
21689
22385
  /** @description All-tab count under the other filters, before applying the selected status. Use pagination.total for the matching result count. */
21690
22386
  totalCount?: number;
21691
- /** @description Counts by product status under the other selected filters. */
22387
+ /** @description Counts by product status under the other selected filters. Computed views (not_ready, flagged, errors, needs_sync, qc_pending, qc_rejected) are counted only when status selects one; use products.count for another computed view. */
21692
22388
  statusCounts?: {
21693
22389
  [key: string]: number;
21694
22390
  };
22391
+ /** @description True when statusCounts includes the computed views. */
22392
+ includesComputedCounts?: boolean;
21695
22393
  };
21696
22394
  /** @description Echoes the offset/limit actually applied to the query (after clamping) plus discovery metadata for paging. */
21697
22395
  pagination?: {
@@ -21840,8 +22538,6 @@ interface operations {
21840
22538
  /** @description Unique SKU used as the product upsert identifier. */
21841
22539
  sku: string;
21842
22540
  title: string;
21843
- /** @description Alias accepted for `title`. */
21844
- name?: string;
21845
22541
  brand?: string;
21846
22542
  /** @description Original product description or source evidence for enrichment. */
21847
22543
  description?: string;
@@ -21870,9 +22566,6 @@ interface operations {
21870
22566
  images?: string[];
21871
22567
  category?: string;
21872
22568
  categoryName?: string;
21873
- category_name?: string;
21874
- /** @description Alias/source hint used for category name when present. */
21875
- product_type?: string;
21876
22569
  /**
21877
22570
  * @description Select connected stores with `product.marketplaces.<platform>.storeId`. This request supports one store and country per marketplace.
21878
22571
  *
@@ -26555,6 +27248,8 @@ interface operations {
26555
27248
  voucherReward?: "discount" | "coins_cashback";
26556
27249
  /** @enum {string} */
26557
27250
  voucherAudience?: "general" | "shop_follow";
27251
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
27252
+ redemptionPoints?: number;
26558
27253
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
26559
27254
  repeatPurchaseMinCount?: number;
26560
27255
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -26919,6 +27614,8 @@ interface operations {
26919
27614
  voucherReward?: "discount" | "coins_cashback";
26920
27615
  /** @enum {string} */
26921
27616
  voucherAudience?: "general" | "shop_follow";
27617
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
27618
+ redemptionPoints?: number;
26922
27619
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
26923
27620
  repeatPurchaseMinCount?: number;
26924
27621
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -27517,6 +28214,8 @@ interface operations {
27517
28214
  voucherReward?: "discount" | "coins_cashback";
27518
28215
  /** @enum {string} */
27519
28216
  voucherAudience?: "general" | "shop_follow";
28217
+ /** @description Membership points required per voucher redemption. Required for shopee_redemption and lazada_points_redeemable; unavailable for other voucher types. */
28218
+ redemptionPoints?: number;
27520
28219
  /** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
27521
28220
  repeatPurchaseMinCount?: number;
27522
28221
  /** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
@@ -34219,7 +34918,13 @@ declare class AgentsGeneralClient {
34219
34918
  *
34220
34919
  * Run the general Omni agent and wait until it completes, pauses for approval, or fails. Requires `agents:invoke`.
34221
34920
 
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.
34921
+ ### Waiting and approvals
34922
+
34923
+ 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.
34924
+
34925
+ ### Messages and tools
34926
+
34927
+ 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 }`
34223
34928
  *
34224
34929
  * `POST /api/v1/agents/general/invoke`
34225
34930
  */
@@ -34246,26 +34951,43 @@ declare class AgentsClient {
34246
34951
  readonly general: AgentsGeneralClient;
34247
34952
  constructor(_http: OmniHttp);
34248
34953
  /**
34249
- * Send a message to an agent
34954
+ * Invoke a saved agent
34250
34955
  *
34251
- * Message the exact built-in or custom agent in the URL, using its saved model, instructions, tools, permissions and Programmatic starting mode.
34956
+ * 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
34957
 
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`.
34958
+ ### Authorization
34959
+
34960
+ 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.
34961
+
34962
+ ### Messages and conversation history
34963
+
34964
+ 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
34965
+ *
34966
+ * `POST /api/v1/agents/{agentId}/invoke`
34967
+ */
34968
+ 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"]>>;
34969
+ /**
34970
+ * Start a saved agent run
34971
+ *
34972
+ * Queue durable execution using the identical invocation contract. Poll Location, honoring Retry-After.
34255
34973
 
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
34974
+ 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.
34975
+
34976
+ ### Authorization
34977
+
34978
+ 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.
34979
+
34980
+ ### Messages and conversation history
34981
+
34982
+ 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
34261
34983
  *
34262
- * `POST /api/v1/agents/{agentId}/messages`
34984
+ * `POST /api/v1/agents/{agentId}/runs`
34263
34985
  */
34264
- 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"]>>;
34986
+ 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"]>>;
34265
34987
  /**
34266
- * Get an agent message run
34988
+ * Get a saved agent run
34267
34989
  *
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.
34990
+ * Read the canonical run resource. Organization, caller, credential and exact agent access are checked again. Requires agents:invoke.
34269
34991
  *
34270
34992
  * `GET /api/v1/agents/{agentId}/runs/{runId}`
34271
34993
  */
@@ -34957,6 +35679,62 @@ declare class DocumentsClient {
34957
35679
  */
34958
35680
  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
35681
  }
35682
+ declare class EmailClient {
35683
+ protected readonly _http: OmniHttp;
35684
+ constructor(_http: OmniHttp);
35685
+ /**
35686
+ * List Email Accounts
35687
+ *
35688
+ * Your connected Gmail and Outlook accounts, default first. Pass an account's `connectionId` to the other email endpoints to choose it.
35689
+
35690
+ ### Authorization
35691
+
35692
+ 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.
35693
+ *
35694
+ * `GET /api/v1/email/accounts`
35695
+ */
35696
+ listAccounts(request?: OperationQuery<operations["get_v1_email_accounts"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_email_accounts"]>>;
35697
+ /**
35698
+ * Create Email Draft
35699
+ *
35700
+ * 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.
35701
+
35702
+ 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.
35703
+
35704
+ ### Authorization
35705
+
35706
+ 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.
35707
+ *
35708
+ * `POST /api/v1/email/drafts`
35709
+ */
35710
+ createDraft(request: OperationBody<operations["post_v1_email_drafts"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_email_drafts"]>>;
35711
+ /**
35712
+ * Get Email Message
35713
+ *
35714
+ * 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.
35715
+
35716
+ ### Authorization
35717
+
35718
+ 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.
35719
+ *
35720
+ * `GET /api/v1/email/messages/{messageId}`
35721
+ */
35722
+ 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"]>>;
35723
+ /**
35724
+ * Search Emails
35725
+ *
35726
+ * 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.
35727
+
35728
+ 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.
35729
+
35730
+ ### Authorization
35731
+
35732
+ 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.
35733
+ *
35734
+ * `GET /api/v1/email/search`
35735
+ */
35736
+ search(request?: OperationQuery<operations["get_v1_email_search"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_email_search"]>>;
35737
+ }
34960
35738
  declare class EvaluateClient {
34961
35739
  protected readonly _http: OmniHttp;
34962
35740
  constructor(_http: OmniHttp);
@@ -35225,9 +36003,9 @@ declare class OrdersClient {
35225
36003
 
35226
36004
  ### Pricing and catalog defaults
35227
36005
 
35228
- - Each line can provide `price`, `unitPrice`, `paidPrice`, and `costPrice`.
36006
+ - Each line can provide `unitPrice`, `paidPrice`, and `costPrice`.
35229
36007
  - When `productId` is provided, missing price or currency values may resolve from the product catalog.
35230
- - An explicit `costPrice` updates `product_data.costPrice` and is snaps
36008
+ - An explicit `costPrice` updates `product_data.costPrice` and is snapshotted on
35231
36009
  *
35232
36010
  * `POST /api/v1/orders`
35233
36011
  */
@@ -35637,7 +36415,7 @@ declare class ProductsClient {
35637
36415
 
35638
36416
  Supply targetMarketplaces and marketplaceStoreSelections to prepare for specific connected stores. Set deferStoreSelection=true to choose marketplaces only and assign stores later with POST /api/v1/products/marketplace-stores. Omit marketplaceStoreSelections and leave workflow.publish off when deferring. Automatic publishing requires catalog:sync in addition to catalog:write.
35639
36417
 
35640
- Supply explicit SKU options in each row's `variationAttributes` and native marketplace attributes in `marketplaceAttributes`. Enrichment never infers SKU options. At Zalora publish time, a missing required Size defaults to One Size only when valid for the selected category and supplied size system. Supplied sizes are preserved; missing
36418
+ Supply explicit SKU options in each row's `variationAttributes` and native marketplace attributes in `marketplaceAttributes`. Taxonomy enrichment can propose missing required sale attributes in its existing attribute request when supported by product evidence. Supplied values take precedence. At Zalora publish time, a missing required
35641
36419
  *
35642
36420
  * `POST /api/v1/products/bulk-import`
35643
36421
  */
@@ -36612,6 +37390,7 @@ declare class OmniGeneratedClient {
36612
37390
  readonly compare: CompareClient;
36613
37391
  readonly directory: DirectoryClient;
36614
37392
  readonly documents: DocumentsClient;
37393
+ readonly email: EmailClient;
36615
37394
  readonly evaluate: EvaluateClient;
36616
37395
  readonly feed: FeedClient;
36617
37396
  readonly followUps: FollowUpsClient;
@@ -36658,6 +37437,7 @@ type OmniResources = {
36658
37437
  compare: CompareClient;
36659
37438
  directory: DirectoryClient;
36660
37439
  documents: DocumentsClient;
37440
+ email: EmailClient;
36661
37441
  evaluate: EvaluateClient;
36662
37442
  feed: FeedClient;
36663
37443
  followUps: FollowUpsClient;
@@ -36730,7 +37510,7 @@ declare function constructEvent(payload: string | Uint8Array, headers: WebhookHe
36730
37510
  toleranceInSeconds?: number;
36731
37511
  }): Promise<ConstructedWebhookEvent>;
36732
37512
 
36733
- declare const SDK_VERSION = "0.26.0";
37513
+ declare const SDK_VERSION = "0.28.0";
36734
37514
 
36735
37515
  type ProductCreatedWebhookEvent = components["schemas"]["ProductCreatedWebhookEvent"];
36736
37516
  type ProductUpdatedWebhookEvent = components["schemas"]["ProductUpdatedWebhookEvent"];