@omni-commerce/sdk 0.27.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.cjs +25 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +58 -254
- package/dist/index.d.ts +58 -254
- package/dist/index.js +25 -32
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -192,50 +192,23 @@ interface paths {
|
|
|
192
192
|
* Invoke a saved agent
|
|
193
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
|
-
*
|
|
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
|
-
};
|
|
212
|
-
"/api/v1/agents/{agentId}/messages": {
|
|
213
|
-
parameters: {
|
|
214
|
-
query?: never;
|
|
215
|
-
header?: never;
|
|
216
|
-
path?: never;
|
|
217
|
-
cookie?: never;
|
|
218
|
-
};
|
|
219
|
-
get?: never;
|
|
220
|
-
put?: never;
|
|
221
|
-
/**
|
|
222
|
-
* Invoke a saved agent (alias)
|
|
223
|
-
* @deprecated
|
|
224
|
-
* @description Alias of /agents/{agentId}/invoke with the identical request and response. Prefer /invoke.
|
|
225
|
-
*
|
|
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.
|
|
195
|
+
* ### Authorization
|
|
227
196
|
*
|
|
228
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.
|
|
229
198
|
*
|
|
199
|
+
* ### Messages and conversation history
|
|
200
|
+
*
|
|
230
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.
|
|
231
202
|
*
|
|
232
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.
|
|
233
204
|
*
|
|
234
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.
|
|
235
206
|
*
|
|
207
|
+
* ### Approvals
|
|
208
|
+
*
|
|
236
209
|
* Send decisions instead of messages with the same thread_id and audience to resume approvals. Resolve pending approvals before sending new messages.
|
|
237
210
|
*/
|
|
238
|
-
post: operations["
|
|
211
|
+
post: operations["post_v1_agents_by_agentid_invoke"];
|
|
239
212
|
delete?: never;
|
|
240
213
|
options?: never;
|
|
241
214
|
head?: never;
|
|
@@ -257,14 +230,20 @@ interface paths {
|
|
|
257
230
|
*
|
|
258
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.
|
|
259
232
|
*
|
|
233
|
+
* ### Authorization
|
|
234
|
+
*
|
|
260
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.
|
|
261
236
|
*
|
|
237
|
+
* ### Messages and conversation history
|
|
238
|
+
*
|
|
262
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.
|
|
263
240
|
*
|
|
264
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.
|
|
265
242
|
*
|
|
266
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.
|
|
267
244
|
*
|
|
245
|
+
* ### Approvals
|
|
246
|
+
*
|
|
268
247
|
* Send decisions instead of messages with the same thread_id and audience to resume approvals. Resolve pending approvals before sending new messages.
|
|
269
248
|
*/
|
|
270
249
|
post: operations["post_v1_agents_by_agentid_runs"];
|
|
@@ -307,7 +286,13 @@ interface paths {
|
|
|
307
286
|
* Invoke the Omni agent
|
|
308
287
|
* @description Run the general Omni agent and wait until it completes, pauses for approval, or fails. Requires `agents:invoke`.
|
|
309
288
|
*
|
|
310
|
-
*
|
|
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.
|
|
311
296
|
*/
|
|
312
297
|
post: operations["post_v1_agents_general_invoke"];
|
|
313
298
|
delete?: never;
|
|
@@ -2033,7 +2018,7 @@ interface paths {
|
|
|
2033
2018
|
*
|
|
2034
2019
|
* ### Pricing and catalog defaults
|
|
2035
2020
|
*
|
|
2036
|
-
* - Each line can provide `
|
|
2021
|
+
* - Each line can provide `unitPrice`, `paidPrice`, and `costPrice`.
|
|
2037
2022
|
* - When `productId` is provided, missing price or currency values may resolve from the product catalog.
|
|
2038
2023
|
* - An explicit `costPrice` updates `product_data.costPrice` and is snapshotted on the order line. Omitting it never clears an existing product cost.
|
|
2039
2024
|
*
|
|
@@ -2631,7 +2616,7 @@ interface paths {
|
|
|
2631
2616
|
*
|
|
2632
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.
|
|
2633
2618
|
*
|
|
2634
|
-
* Supply explicit SKU options in each row's `variationAttributes` and native marketplace attributes in `marketplaceAttributes`.
|
|
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.
|
|
2635
2620
|
*
|
|
2636
2621
|
* ### Input options
|
|
2637
2622
|
*
|
|
@@ -7256,179 +7241,6 @@ interface operations {
|
|
|
7256
7241
|
};
|
|
7257
7242
|
};
|
|
7258
7243
|
};
|
|
7259
|
-
post_v1_agents_by_agentid_messages: {
|
|
7260
|
-
parameters: {
|
|
7261
|
-
query?: never;
|
|
7262
|
-
header?: never;
|
|
7263
|
-
path: {
|
|
7264
|
-
agentId: string;
|
|
7265
|
-
};
|
|
7266
|
-
cookie?: never;
|
|
7267
|
-
};
|
|
7268
|
-
requestBody: {
|
|
7269
|
-
content: {
|
|
7270
|
-
/**
|
|
7271
|
-
* @example {
|
|
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
|
-
* ]
|
|
7282
|
-
* }
|
|
7283
|
-
*/
|
|
7284
|
-
"application/json": {
|
|
7285
|
-
organizationId?: string;
|
|
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
|
-
};
|
|
7319
|
-
decisions?: {
|
|
7320
|
-
/** @enum {string} */
|
|
7321
|
-
action: "approve" | "reject";
|
|
7322
|
-
reason?: string;
|
|
7323
|
-
}[];
|
|
7324
|
-
};
|
|
7325
|
-
};
|
|
7326
|
-
};
|
|
7327
|
-
responses: {
|
|
7328
|
-
/** @description The run completed or paused for approval. */
|
|
7329
|
-
200: {
|
|
7330
|
-
headers: {
|
|
7331
|
-
[name: string]: unknown;
|
|
7332
|
-
};
|
|
7333
|
-
content: {
|
|
7334
|
-
"application/json": {
|
|
7335
|
-
run_id: string;
|
|
7336
|
-
thread_id: string;
|
|
7337
|
-
/** @enum {string} */
|
|
7338
|
-
status:
|
|
7339
|
-
| "queued"
|
|
7340
|
-
| "running"
|
|
7341
|
-
| "completed"
|
|
7342
|
-
| "awaiting_approval"
|
|
7343
|
-
| "failed";
|
|
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;
|
|
7362
|
-
approvals:
|
|
7363
|
-
| {
|
|
7364
|
-
interrupt_instance_id: string;
|
|
7365
|
-
tool_name: string | null;
|
|
7366
|
-
tool_args: unknown;
|
|
7367
|
-
message: string;
|
|
7368
|
-
}[]
|
|
7369
|
-
| null;
|
|
7370
|
-
error: string | null;
|
|
7371
|
-
};
|
|
7372
|
-
};
|
|
7373
|
-
};
|
|
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
7244
|
post_v1_agents_by_agentid_runs: {
|
|
7433
7245
|
parameters: {
|
|
7434
7246
|
query?: never;
|
|
@@ -20358,7 +20170,7 @@ interface operations {
|
|
|
20358
20170
|
store?: string;
|
|
20359
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. */
|
|
20360
20172
|
bundleType?: "" | "hard" | "virtual" | "non_bundle";
|
|
20361
|
-
/** @description Comma-separated sort tokens. Supports multi-sort up to six tokens.
|
|
20173
|
+
/** @description Comma-separated sort tokens. Supports multi-sort up to six tokens. */
|
|
20362
20174
|
sortBy?: string;
|
|
20363
20175
|
/** @description Inclusive lower bound on order created date (`YYYY-MM-DD`). */
|
|
20364
20176
|
dateFrom?: string;
|
|
@@ -20368,6 +20180,8 @@ interface operations {
|
|
|
20368
20180
|
limit?: number;
|
|
20369
20181
|
/** @description Zero-based pagination offset. Use `pagination.nextOffset` from the previous response to page forward. */
|
|
20370
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;
|
|
20371
20185
|
};
|
|
20372
20186
|
header?: never;
|
|
20373
20187
|
path?: never;
|
|
@@ -20375,7 +20189,7 @@ interface operations {
|
|
|
20375
20189
|
};
|
|
20376
20190
|
requestBody?: never;
|
|
20377
20191
|
responses: {
|
|
20378
|
-
/** @description Orders page returned. */
|
|
20192
|
+
/** @description Orders page returned. summary is omitted and pagination.total is null when includeSummary=false. */
|
|
20379
20193
|
200: {
|
|
20380
20194
|
headers: {
|
|
20381
20195
|
[name: string]: unknown;
|
|
@@ -20434,7 +20248,8 @@ interface operations {
|
|
|
20434
20248
|
pagination?: {
|
|
20435
20249
|
offset?: number;
|
|
20436
20250
|
limit?: number;
|
|
20437
|
-
|
|
20251
|
+
/** @description Orders matching the filters, ignoring offset/limit. Null when includeSummary=false. */
|
|
20252
|
+
total?: number | null;
|
|
20438
20253
|
hasMore?: boolean;
|
|
20439
20254
|
nextOffset?: number | null;
|
|
20440
20255
|
maxLimit?: number;
|
|
@@ -20570,18 +20385,14 @@ interface operations {
|
|
|
20570
20385
|
sellerSku?: string;
|
|
20571
20386
|
shopSku?: string;
|
|
20572
20387
|
quantity: number;
|
|
20573
|
-
/** @description
|
|
20574
|
-
price?: number;
|
|
20575
|
-
/** @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. */
|
|
20576
20389
|
unitPrice?: number;
|
|
20577
|
-
/** @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
|
|
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. */
|
|
20578
20391
|
paidPrice?: number;
|
|
20579
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. */
|
|
20580
20393
|
costPrice?: number;
|
|
20581
|
-
/** @description ISO currency of the raw costPrice (e.g. USD) before conversion. Required when cost is not already in the order/line currency.
|
|
20394
|
+
/** @description ISO currency of the raw costPrice (e.g. USD) before conversion. Required when cost is not already in the order/line currency. */
|
|
20582
20395
|
costPriceCurrency?: string;
|
|
20583
|
-
/** @description Alias for costPriceCurrency. */
|
|
20584
|
-
costCurrency?: string;
|
|
20585
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). */
|
|
20586
20397
|
costPriceFxRate?: number;
|
|
20587
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. */
|
|
@@ -20942,18 +20753,14 @@ interface operations {
|
|
|
20942
20753
|
shopSku?: string;
|
|
20943
20754
|
/** @description Required with productName when inserting a new line. */
|
|
20944
20755
|
quantity?: number;
|
|
20945
|
-
/** @description
|
|
20946
|
-
price?: number;
|
|
20947
|
-
/** @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. */
|
|
20948
20757
|
unitPrice?: number;
|
|
20949
|
-
/** @description Per-unit amount actually charged after discounts. Preferred for totals and return refund estimates (paidPrice×quantity when set, else
|
|
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. */
|
|
20950
20759
|
paidPrice?: number;
|
|
20951
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. */
|
|
20952
20761
|
costPrice?: number;
|
|
20953
|
-
/** @description ISO currency of the raw costPrice (e.g. USD) before conversion. Required when cost is not already in the order/line currency.
|
|
20762
|
+
/** @description ISO currency of the raw costPrice (e.g. USD) before conversion. Required when cost is not already in the order/line currency. */
|
|
20954
20763
|
costPriceCurrency?: string;
|
|
20955
|
-
/** @description Alias for costPriceCurrency. */
|
|
20956
|
-
costCurrency?: string;
|
|
20957
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). */
|
|
20958
20765
|
costPriceFxRate?: number;
|
|
20959
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. */
|
|
@@ -22411,7 +22218,7 @@ interface operations {
|
|
|
22411
22218
|
publishedTo?: string;
|
|
22412
22219
|
/** @description IANA time zone for date-only publication bounds. */
|
|
22413
22220
|
publishedTimeZone?: string;
|
|
22414
|
-
/** @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. */
|
|
22415
22222
|
cursor?: string;
|
|
22416
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. */
|
|
22417
22224
|
includeSummary?: boolean;
|
|
@@ -22577,10 +22384,12 @@ interface operations {
|
|
|
22577
22384
|
summary?: {
|
|
22578
22385
|
/** @description All-tab count under the other filters, before applying the selected status. Use pagination.total for the matching result count. */
|
|
22579
22386
|
totalCount?: number;
|
|
22580
|
-
/** @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. */
|
|
22581
22388
|
statusCounts?: {
|
|
22582
22389
|
[key: string]: number;
|
|
22583
22390
|
};
|
|
22391
|
+
/** @description True when statusCounts includes the computed views. */
|
|
22392
|
+
includesComputedCounts?: boolean;
|
|
22584
22393
|
};
|
|
22585
22394
|
/** @description Echoes the offset/limit actually applied to the query (after clamping) plus discovery metadata for paging. */
|
|
22586
22395
|
pagination?: {
|
|
@@ -22729,8 +22538,6 @@ interface operations {
|
|
|
22729
22538
|
/** @description Unique SKU used as the product upsert identifier. */
|
|
22730
22539
|
sku: string;
|
|
22731
22540
|
title: string;
|
|
22732
|
-
/** @description Alias accepted for `title`. */
|
|
22733
|
-
name?: string;
|
|
22734
22541
|
brand?: string;
|
|
22735
22542
|
/** @description Original product description or source evidence for enrichment. */
|
|
22736
22543
|
description?: string;
|
|
@@ -22759,9 +22566,6 @@ interface operations {
|
|
|
22759
22566
|
images?: string[];
|
|
22760
22567
|
category?: string;
|
|
22761
22568
|
categoryName?: string;
|
|
22762
|
-
category_name?: string;
|
|
22763
|
-
/** @description Alias/source hint used for category name when present. */
|
|
22764
|
-
product_type?: string;
|
|
22765
22569
|
/**
|
|
22766
22570
|
* @description Select connected stores with `product.marketplaces.<platform>.storeId`. This request supports one store and country per marketplace.
|
|
22767
22571
|
*
|
|
@@ -35114,7 +34918,13 @@ declare class AgentsGeneralClient {
|
|
|
35114
34918
|
*
|
|
35115
34919
|
* Run the general Omni agent and wait until it completes, pauses for approval, or fails. Requires `agents:invoke`.
|
|
35116
34920
|
|
|
35117
|
-
|
|
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 }`
|
|
35118
34928
|
*
|
|
35119
34929
|
* `POST /api/v1/agents/general/invoke`
|
|
35120
34930
|
*/
|
|
@@ -35145,27 +34955,17 @@ declare class AgentsClient {
|
|
|
35145
34955
|
*
|
|
35146
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.
|
|
35147
34957
|
|
|
34958
|
+
### Authorization
|
|
34959
|
+
|
|
35148
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.
|
|
35149
34961
|
|
|
35150
|
-
|
|
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
|
|
35151
34965
|
*
|
|
35152
34966
|
* `POST /api/v1/agents/{agentId}/invoke`
|
|
35153
34967
|
*/
|
|
35154
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"]>>;
|
|
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
|
|
35165
|
-
*
|
|
35166
|
-
* `POST /api/v1/agents/{agentId}/messages`
|
|
35167
|
-
*/
|
|
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"]>>;
|
|
35169
34969
|
/**
|
|
35170
34970
|
* Start a saved agent run
|
|
35171
34971
|
*
|
|
@@ -35173,9 +34973,13 @@ declare class AgentsClient {
|
|
|
35173
34973
|
|
|
35174
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.
|
|
35175
34975
|
|
|
34976
|
+
### Authorization
|
|
34977
|
+
|
|
35176
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.
|
|
35177
34979
|
|
|
35178
|
-
|
|
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
|
|
35179
34983
|
*
|
|
35180
34984
|
* `POST /api/v1/agents/{agentId}/runs`
|
|
35181
34985
|
*/
|
|
@@ -36199,9 +36003,9 @@ declare class OrdersClient {
|
|
|
36199
36003
|
|
|
36200
36004
|
### Pricing and catalog defaults
|
|
36201
36005
|
|
|
36202
|
-
- Each line can provide `
|
|
36006
|
+
- Each line can provide `unitPrice`, `paidPrice`, and `costPrice`.
|
|
36203
36007
|
- When `productId` is provided, missing price or currency values may resolve from the product catalog.
|
|
36204
|
-
- An explicit `costPrice` updates `product_data.costPrice` and is
|
|
36008
|
+
- An explicit `costPrice` updates `product_data.costPrice` and is snapshotted on
|
|
36205
36009
|
*
|
|
36206
36010
|
* `POST /api/v1/orders`
|
|
36207
36011
|
*/
|
|
@@ -36611,7 +36415,7 @@ declare class ProductsClient {
|
|
|
36611
36415
|
|
|
36612
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.
|
|
36613
36417
|
|
|
36614
|
-
Supply explicit SKU options in each row's `variationAttributes` and native marketplace attributes in `marketplaceAttributes`.
|
|
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
|
|
36615
36419
|
*
|
|
36616
36420
|
* `POST /api/v1/products/bulk-import`
|
|
36617
36421
|
*/
|
|
@@ -37706,7 +37510,7 @@ declare function constructEvent(payload: string | Uint8Array, headers: WebhookHe
|
|
|
37706
37510
|
toleranceInSeconds?: number;
|
|
37707
37511
|
}): Promise<ConstructedWebhookEvent>;
|
|
37708
37512
|
|
|
37709
|
-
declare const SDK_VERSION = "0.
|
|
37513
|
+
declare const SDK_VERSION = "0.28.0";
|
|
37710
37514
|
|
|
37711
37515
|
type ProductCreatedWebhookEvent = components["schemas"]["ProductCreatedWebhookEvent"];
|
|
37712
37516
|
type ProductUpdatedWebhookEvent = components["schemas"]["ProductUpdatedWebhookEvent"];
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ function normalizeClientOptions(options = {}) {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
// src/version.ts
|
|
36
|
-
var SDK_VERSION = "0.
|
|
36
|
+
var SDK_VERSION = "0.28.0";
|
|
37
37
|
var SDK_USER_AGENT = `omnicommerce-js/${SDK_VERSION}`;
|
|
38
38
|
|
|
39
39
|
// src/environments.ts
|
|
@@ -710,7 +710,13 @@ var AgentsGeneralClient = class {
|
|
|
710
710
|
*
|
|
711
711
|
* Run the general Omni agent and wait until it completes, pauses for approval, or fails. Requires `agents:invoke`.
|
|
712
712
|
|
|
713
|
-
|
|
713
|
+
### Waiting and approvals
|
|
714
|
+
|
|
715
|
+
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.
|
|
716
|
+
|
|
717
|
+
### Messages and tools
|
|
718
|
+
|
|
719
|
+
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 }`
|
|
714
720
|
*
|
|
715
721
|
* `POST /api/v1/agents/general/invoke`
|
|
716
722
|
*/
|
|
@@ -770,9 +776,13 @@ var AgentsClient = class {
|
|
|
770
776
|
*
|
|
771
777
|
* 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.
|
|
772
778
|
|
|
779
|
+
### Authorization
|
|
780
|
+
|
|
773
781
|
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.
|
|
774
782
|
|
|
775
|
-
|
|
783
|
+
### Messages and conversation history
|
|
784
|
+
|
|
785
|
+
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
|
|
776
786
|
*
|
|
777
787
|
* `POST /api/v1/agents/{agentId}/invoke`
|
|
778
788
|
*/
|
|
@@ -786,29 +796,6 @@ var AgentsClient = class {
|
|
|
786
796
|
...mergeRequestOptions(requestOptions)
|
|
787
797
|
});
|
|
788
798
|
}
|
|
789
|
-
/**
|
|
790
|
-
* Invoke a saved agent (alias)
|
|
791
|
-
*
|
|
792
|
-
* Alias of /agents/{agentId}/invoke with the identical request and response. Prefer /invoke.
|
|
793
|
-
|
|
794
|
-
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.
|
|
795
|
-
|
|
796
|
-
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.
|
|
797
|
-
|
|
798
|
-
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
|
|
799
|
-
*
|
|
800
|
-
* `POST /api/v1/agents/{agentId}/messages`
|
|
801
|
-
*/
|
|
802
|
-
messages(request, requestOptions) {
|
|
803
|
-
const { agentId, ...body } = request ?? {};
|
|
804
|
-
return this._http.request({
|
|
805
|
-
method: "POST",
|
|
806
|
-
path: `/api/v1/agents/${encodePathParam("agentId", agentId)}/messages`,
|
|
807
|
-
query: void 0,
|
|
808
|
-
body,
|
|
809
|
-
...mergeRequestOptions(requestOptions)
|
|
810
|
-
});
|
|
811
|
-
}
|
|
812
799
|
/**
|
|
813
800
|
* Start a saved agent run
|
|
814
801
|
*
|
|
@@ -816,9 +803,13 @@ var AgentsClient = class {
|
|
|
816
803
|
|
|
817
804
|
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.
|
|
818
805
|
|
|
806
|
+
### Authorization
|
|
807
|
+
|
|
819
808
|
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.
|
|
820
809
|
|
|
821
|
-
|
|
810
|
+
### Messages and conversation history
|
|
811
|
+
|
|
812
|
+
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
|
|
822
813
|
*
|
|
823
814
|
* `POST /api/v1/agents/{agentId}/runs`
|
|
824
815
|
*/
|
|
@@ -2957,7 +2948,8 @@ var OrdersClient = class {
|
|
|
2957
2948
|
dateFrom,
|
|
2958
2949
|
dateTo,
|
|
2959
2950
|
limit,
|
|
2960
|
-
offset
|
|
2951
|
+
offset,
|
|
2952
|
+
includeSummary
|
|
2961
2953
|
} = request ?? {};
|
|
2962
2954
|
return this._http.request({
|
|
2963
2955
|
method: "GET",
|
|
@@ -2974,7 +2966,8 @@ var OrdersClient = class {
|
|
|
2974
2966
|
dateFrom,
|
|
2975
2967
|
dateTo,
|
|
2976
2968
|
limit,
|
|
2977
|
-
offset
|
|
2969
|
+
offset,
|
|
2970
|
+
includeSummary
|
|
2978
2971
|
},
|
|
2979
2972
|
body: void 0,
|
|
2980
2973
|
...mergeRequestOptions(requestOptions)
|
|
@@ -2997,9 +2990,9 @@ var OrdersClient = class {
|
|
|
2997
2990
|
|
|
2998
2991
|
### Pricing and catalog defaults
|
|
2999
2992
|
|
|
3000
|
-
- Each line can provide `
|
|
2993
|
+
- Each line can provide `unitPrice`, `paidPrice`, and `costPrice`.
|
|
3001
2994
|
- When `productId` is provided, missing price or currency values may resolve from the product catalog.
|
|
3002
|
-
- An explicit `costPrice` updates `product_data.costPrice` and is
|
|
2995
|
+
- An explicit `costPrice` updates `product_data.costPrice` and is snapshotted on
|
|
3003
2996
|
*
|
|
3004
2997
|
* `POST /api/v1/orders`
|
|
3005
2998
|
*/
|
|
@@ -3735,7 +3728,7 @@ var ProductsClient = class {
|
|
|
3735
3728
|
|
|
3736
3729
|
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.
|
|
3737
3730
|
|
|
3738
|
-
Supply explicit SKU options in each row's `variationAttributes` and native marketplace attributes in `marketplaceAttributes`.
|
|
3731
|
+
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
|
|
3739
3732
|
*
|
|
3740
3733
|
* `POST /api/v1/products/bulk-import`
|
|
3741
3734
|
*/
|