@omni-commerce/sdk 0.22.0 → 0.24.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/README.md +4 -0
- package/dist/index.cjs +350 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1845 -74
- package/dist/index.d.ts +1845 -74
- package/dist/index.js +350 -57
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.24.0";
|
|
37
37
|
var SDK_USER_AGENT = `omnicommerce-js/${SDK_VERSION}`;
|
|
38
38
|
|
|
39
39
|
// src/environments.ts
|
|
@@ -765,6 +765,49 @@ var AgentsClient = class {
|
|
|
765
765
|
__publicField(this, "general");
|
|
766
766
|
this.general = new AgentsGeneralClient(this._http);
|
|
767
767
|
}
|
|
768
|
+
/**
|
|
769
|
+
* Send a message to an agent
|
|
770
|
+
*
|
|
771
|
+
* Message the exact built-in or custom agent in the URL, using its saved model, instructions, tools, permissions and Programmatic starting mode.
|
|
772
|
+
|
|
773
|
+
### Authentication
|
|
774
|
+
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`.
|
|
775
|
+
|
|
776
|
+
### Conversation and execution
|
|
777
|
+
- The same caller, agent and `clientThreadKey` continue one conversation. Different callers, agents and organizations are isolated.
|
|
778
|
+
- No model, prompt or tool overrides are accepted.
|
|
779
|
+
- `wait=false` queues durable work and returns 202; `wait=true` returns the final reply or pending approvals.
|
|
780
|
+
- Send `decisions` with the same `cli
|
|
781
|
+
*
|
|
782
|
+
* `POST /api/v1/agents/{agentId}/messages`
|
|
783
|
+
*/
|
|
784
|
+
messages(request, requestOptions) {
|
|
785
|
+
const { agentId, ...body } = request ?? {};
|
|
786
|
+
return this._http.request({
|
|
787
|
+
method: "POST",
|
|
788
|
+
path: `/api/v1/agents/${encodePathParam("agentId", agentId)}/messages`,
|
|
789
|
+
query: void 0,
|
|
790
|
+
body,
|
|
791
|
+
...mergeRequestOptions(requestOptions)
|
|
792
|
+
});
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* Get an agent message run
|
|
796
|
+
*
|
|
797
|
+
* 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.
|
|
798
|
+
*
|
|
799
|
+
* `GET /api/v1/agents/{agentId}/runs/{runId}`
|
|
800
|
+
*/
|
|
801
|
+
getRuns(request, requestOptions) {
|
|
802
|
+
const { agentId, runId, organizationId } = request ?? {};
|
|
803
|
+
return this._http.request({
|
|
804
|
+
method: "GET",
|
|
805
|
+
path: `/api/v1/agents/${encodePathParam("agentId", agentId)}/runs/${encodePathParam("runId", runId)}`,
|
|
806
|
+
query: { organizationId },
|
|
807
|
+
body: void 0,
|
|
808
|
+
...mergeRequestOptions(requestOptions)
|
|
809
|
+
});
|
|
810
|
+
}
|
|
768
811
|
};
|
|
769
812
|
var AnalyticsClient = class {
|
|
770
813
|
constructor(_http) {
|
|
@@ -1333,7 +1376,7 @@ var ApiClient = class {
|
|
|
1333
1376
|
*
|
|
1334
1377
|
* ### Operations
|
|
1335
1378
|
|
|
1336
|
-
create: offers[] (1–5), with stable requestId, exact purchasable product/variant IDs, quantities, shipping country and optional unitAmount proposals. get/cancel: sessionIds[] (1–20). complete: sessionId, paymentProof, and buyer approval of cartVersion, totalAmount and currency. pay: sessionId and the same exact approval; returns checkoutUrl for Stripe
|
|
1379
|
+
create: offers[] (1–5), with stable requestId, exact purchasable product/variant IDs, quantities, shipping country and optional unitAmount proposals. get/cancel: sessionIds[] (1–20). complete: sessionId, paymentProof, and buyer approval of cartVersion, totalAmount and currency. pay: sessionId and the same exact approval; returns checkoutUrl for Stripe, Qashier or HitPay hosted payment.
|
|
1337
1380
|
|
|
1338
1381
|
### Results and safeguards
|
|
1339
1382
|
|
|
@@ -1341,7 +1384,7 @@ var ApiClient = class {
|
|
|
1341
1384
|
|
|
1342
1385
|
### Payment
|
|
1343
1386
|
|
|
1344
|
-
Completion
|
|
1387
|
+
Completion uses the configured Stripe ACP, x402, Qashier or HitPay rail. Qashi
|
|
1345
1388
|
*
|
|
1346
1389
|
* `POST /api/embed/{deploymentId}/checkout-sessions/{operation}`
|
|
1347
1390
|
*/
|
|
@@ -1500,12 +1543,18 @@ var BulkClient = class {
|
|
|
1500
1543
|
});
|
|
1501
1544
|
}
|
|
1502
1545
|
/**
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1546
|
+
* Start Catalog Operation
|
|
1547
|
+
*
|
|
1548
|
+
* ### Scope
|
|
1549
|
+
|
|
1550
|
+
Durable bulk price/cost updates for 1–2000 products or variants. Requires catalog:write.
|
|
1551
|
+
|
|
1552
|
+
### Consistency and progress
|
|
1553
|
+
|
|
1554
|
+
Identical duplicates collapse in requested order; conflicting duplicates fail. An idempotencyKey freezes the original targets and versions. Reusing it with changed input returns 409. expectedUpdatedAt guards reviewed values. Catalog cost never syncs to marketplaces. syncToMarketplaces queues existing canonical marketplace services for every applicable connected listing. A failed target does not stop other targets. The operation continues after the caller disconnects. Read aggregate status, then page failures through bulk.results. Optional sessionId links progress to the initiating user's existing session.
|
|
1555
|
+
*
|
|
1556
|
+
* `POST /api/v1/catalog/operations`
|
|
1557
|
+
*/
|
|
1509
1558
|
start(request, requestOptions) {
|
|
1510
1559
|
const { ...body } = request ?? {};
|
|
1511
1560
|
return this._http.request({
|
|
@@ -1684,6 +1733,8 @@ var CampaignsClient = class {
|
|
|
1684
1733
|
*
|
|
1685
1734
|
* Read the same imported-order campaign analytics as the application. Monetary totals are partitioned by currency. Optional analyticsWindow selects one campaign window; voucher utilisation limitations are explicit.
|
|
1686
1735
|
|
|
1736
|
+
### Authorization
|
|
1737
|
+
|
|
1687
1738
|
Requires promotions:read. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
1688
1739
|
*
|
|
1689
1740
|
* `GET /api/v1/campaigns/{campaignId}/analytics`
|
|
@@ -1703,6 +1754,8 @@ var CampaignsClient = class {
|
|
|
1703
1754
|
*
|
|
1704
1755
|
* Read the executing actor's campaign notification preference.
|
|
1705
1756
|
|
|
1757
|
+
### Authorization
|
|
1758
|
+
|
|
1706
1759
|
Requires promotions:read. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
1707
1760
|
*
|
|
1708
1761
|
* `GET /api/v1/campaigns/{campaignId}/notifications`
|
|
@@ -1722,6 +1775,8 @@ var CampaignsClient = class {
|
|
|
1722
1775
|
*
|
|
1723
1776
|
* Set only the executing actor's campaign notification preference. Does not change campaign delivery or other members' preferences.
|
|
1724
1777
|
|
|
1778
|
+
### Authorization
|
|
1779
|
+
|
|
1725
1780
|
Requires promotions:read. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
1726
1781
|
*
|
|
1727
1782
|
* `PUT /api/v1/campaigns/{campaignId}/notifications`
|
|
@@ -1741,6 +1796,8 @@ var CampaignsClient = class {
|
|
|
1741
1796
|
*
|
|
1742
1797
|
* Filter and page the canonical campaign plan or pending live proposal, with the same attention rules as the campaign editor.
|
|
1743
1798
|
|
|
1799
|
+
### Authorization
|
|
1800
|
+
|
|
1744
1801
|
Requires promotions:read. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
1745
1802
|
*
|
|
1746
1803
|
* `GET /api/v1/campaigns/{campaignId}/offers`
|
|
@@ -1760,6 +1817,8 @@ var CampaignsClient = class {
|
|
|
1760
1817
|
*
|
|
1761
1818
|
* Apply one action to 1–20 reviewed targets. Approve, run, approve_and_run, end, resume, retry, approve_change, discard_change, archive, restore or delete. Requires each expectedRevision and the pending version for live-change decisions. Named-approver and current role/store checks remain enforced. Duplicates execute once; partial failures remain explicit. Starting queues durable delivery; inspect campaign executions to verify marketplace outcomes.
|
|
1762
1819
|
|
|
1820
|
+
### Authorization
|
|
1821
|
+
|
|
1763
1822
|
Requires promotions:write. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
1764
1823
|
*
|
|
1765
1824
|
* `POST /api/v1/campaigns/actions`
|
|
@@ -1813,6 +1872,8 @@ var CampaignsClient = class {
|
|
|
1813
1872
|
*
|
|
1814
1873
|
* Import 1–10 uploaded Excel document IDs. Preview defaults to true; set preview=false to save. Re-upload one document with campaignId to update a campaign. To apply a running campaign immediately, use applyChanges=true with the reviewed expectedRevision and expectedPendingVersion (null when none); only the named approver with publish permission may apply. Changed values and qualifying SKU removals use canonical marketplace validation and durable sync. Requires documents:read in addition to promotions:write. No browser session is required.
|
|
1815
1874
|
|
|
1875
|
+
### Authorization
|
|
1876
|
+
|
|
1816
1877
|
Requires promotions:write. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
1817
1878
|
*
|
|
1818
1879
|
* `POST /api/v1/campaigns/import`
|
|
@@ -1849,6 +1910,8 @@ var CampaignsClient = class {
|
|
|
1849
1910
|
*
|
|
1850
1911
|
* Read 1–50 eligible draft promotions as campaign offers without creating or publishing promotions. Exact organization/store ownership and existing campaign links are checked.
|
|
1851
1912
|
|
|
1913
|
+
### Authorization
|
|
1914
|
+
|
|
1852
1915
|
Requires promotions:write. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
1853
1916
|
*
|
|
1854
1917
|
* `POST /api/v1/campaigns/promotion-options`
|
|
@@ -1868,6 +1931,8 @@ var CampaignsClient = class {
|
|
|
1868
1931
|
*
|
|
1869
1932
|
* Read-only preflight of 1–10 saved campaign IDs or proposed plans. Uses the same readiness, connected-store and offer validation as approval. shiftToNow returns a proposed shifted plan; syncMode=campaign_start selects Full sync. Neither option saves or publishes. Save the returned plan with the reviewed revision before approve_and_run. Current marketplace delivery is separate execution evidence.
|
|
1870
1933
|
|
|
1934
|
+
### Authorization
|
|
1935
|
+
|
|
1871
1936
|
Requires promotions:read. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
1872
1937
|
*
|
|
1873
1938
|
* `POST /api/v1/campaigns/validate`
|
|
@@ -1907,12 +1972,31 @@ var CatalogClient = class {
|
|
|
1907
1972
|
});
|
|
1908
1973
|
}
|
|
1909
1974
|
/**
|
|
1910
|
-
*
|
|
1975
|
+
* Get Public Product Details
|
|
1911
1976
|
*
|
|
1912
|
-
*
|
|
1977
|
+
* Read the same stored public product details as /catalog/{productId}, including product capabilities, FAQs, localizations, citations, variants, recorded prices, stock and marketplace offers. No account or AI generation. Missing products are explicit per-target failures.
|
|
1913
1978
|
*
|
|
1914
|
-
* `
|
|
1979
|
+
* `GET /api/v1/catalog/products`
|
|
1915
1980
|
*/
|
|
1981
|
+
listProducts(request, requestOptions) {
|
|
1982
|
+
const { productIds } = request ?? {};
|
|
1983
|
+
return this._http.request({
|
|
1984
|
+
method: "GET",
|
|
1985
|
+
path: "/api/v1/catalog/products",
|
|
1986
|
+
query: { productIds },
|
|
1987
|
+
body: void 0,
|
|
1988
|
+
...mergeRequestOptions(requestOptions)
|
|
1989
|
+
});
|
|
1990
|
+
}
|
|
1991
|
+
/**
|
|
1992
|
+
* Query Catalog
|
|
1993
|
+
*
|
|
1994
|
+
* Filter and project simple products and variants on the server. Requires catalog:read. Defaults to active sellable SKUs, excluding parent containers. costComparison=above_price compares known cost in each product's catalog currency using valid recorded conversions; unknown costs or unavailable conversions do not match.
|
|
1995
|
+
|
|
1996
|
+
Fields bound the response. Maximum 500 rows per page. Omit counts after the first page with includeCount=false. No SQL input is accepted.
|
|
1997
|
+
*
|
|
1998
|
+
* `POST /api/v1/catalog/query`
|
|
1999
|
+
*/
|
|
1916
2000
|
query(request, requestOptions) {
|
|
1917
2001
|
const { ...body } = request ?? {};
|
|
1918
2002
|
return this._http.request({
|
|
@@ -2030,6 +2114,27 @@ var CheckoutSessionsClient = class {
|
|
|
2030
2114
|
...mergeRequestOptions(requestOptions)
|
|
2031
2115
|
});
|
|
2032
2116
|
}
|
|
2117
|
+
/**
|
|
2118
|
+
* Start payment for an approved checkout offer
|
|
2119
|
+
*
|
|
2120
|
+
* Requires checkout:write.
|
|
2121
|
+
|
|
2122
|
+
Starts seller Stripe, Qashier or HitPay hosted checkout. Buyer approval must match the current cart version, total and currency. Qashier and HitPay require a full delivery address before payment.
|
|
2123
|
+
|
|
2124
|
+
Qashier and HitPay support PayNow in Singapore when enabled for the merchant. Payment is confirmed using signed webhooks and authenticated server-side receipts. Closing the buyer page does not cancel or complete payment.
|
|
2125
|
+
*
|
|
2126
|
+
* `POST /api/v1/checkout-sessions/{sessionId}/pay`
|
|
2127
|
+
*/
|
|
2128
|
+
pay(request, requestOptions) {
|
|
2129
|
+
const { sessionId, ...body } = request ?? {};
|
|
2130
|
+
return this._http.request({
|
|
2131
|
+
method: "POST",
|
|
2132
|
+
path: `/api/v1/checkout-sessions/${encodePathParam("sessionId", sessionId)}/pay`,
|
|
2133
|
+
query: void 0,
|
|
2134
|
+
body,
|
|
2135
|
+
...mergeRequestOptions(requestOptions)
|
|
2136
|
+
});
|
|
2137
|
+
}
|
|
2033
2138
|
};
|
|
2034
2139
|
var CommerceClient = class {
|
|
2035
2140
|
constructor(_http) {
|
|
@@ -2086,12 +2191,14 @@ var CommerceClient = class {
|
|
|
2086
2191
|
});
|
|
2087
2192
|
}
|
|
2088
2193
|
/**
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2194
|
+
* Start Commerce Verification
|
|
2195
|
+
*
|
|
2196
|
+
* Queue durable fresh verification for up to 2000 products in the existing verification contract, under verification. Requires catalog:read.
|
|
2197
|
+
|
|
2198
|
+
Returns immediately with operationIds. Read bulk.status and bulk.results; a client timeout does not discard work. Fulfillment correlations continue to use commerce.verifyState.
|
|
2199
|
+
*
|
|
2200
|
+
* `POST /api/v1/commerce/state/verify/jobs`
|
|
2201
|
+
*/
|
|
2095
2202
|
startVerification(request, requestOptions) {
|
|
2096
2203
|
const { ...body } = request ?? {};
|
|
2097
2204
|
return this._http.request({
|
|
@@ -2170,12 +2277,14 @@ var DocumentsClient = class {
|
|
|
2170
2277
|
});
|
|
2171
2278
|
}
|
|
2172
2279
|
/**
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2280
|
+
* Get Document
|
|
2281
|
+
*
|
|
2282
|
+
* Read one knowledge base document and its indexing status. Requires `documents:read`.
|
|
2283
|
+
|
|
2284
|
+
Set includeDownloadUrl=true for a private file URL valid for five minutes, suitable for SDK file downloads. URLs are scoped to the authenticated organization and are not returned for bank statements. Responses must not be cached.
|
|
2285
|
+
*
|
|
2286
|
+
* `GET /api/v1/documents/{documentId}`
|
|
2287
|
+
*/
|
|
2179
2288
|
get(request, requestOptions) {
|
|
2180
2289
|
const { documentId, organizationId, includeDownloadUrl } = request ?? {};
|
|
2181
2290
|
return this._http.request({
|
|
@@ -2231,6 +2340,82 @@ var FeedClient = class {
|
|
|
2231
2340
|
});
|
|
2232
2341
|
}
|
|
2233
2342
|
};
|
|
2343
|
+
var FollowUpsClient = class {
|
|
2344
|
+
constructor(_http) {
|
|
2345
|
+
__publicField(this, "_http", _http);
|
|
2346
|
+
}
|
|
2347
|
+
/**
|
|
2348
|
+
* List Follow-ups
|
|
2349
|
+
*
|
|
2350
|
+
* Your follow-ups on every conversation, plus every follow-up on `threadId` (whoever left it) when you can open that conversation. Waiting follow-ups come first.
|
|
2351
|
+
|
|
2352
|
+
`state` is `waiting`, `fired`, `expired` (it waited past `expiresAt`), `canceled` or `failed` (`failure` says why: its owner lost access, or the conversation was stopped or its last run failed).
|
|
2353
|
+
|
|
2354
|
+
### Authorization
|
|
2355
|
+
|
|
2356
|
+
Requires `agents:invoke`.
|
|
2357
|
+
*
|
|
2358
|
+
* `GET /api/v1/follow-ups`
|
|
2359
|
+
*/
|
|
2360
|
+
list(request = {}, requestOptions) {
|
|
2361
|
+
const { threadId, limit, organizationId } = request ?? {};
|
|
2362
|
+
return this._http.request({
|
|
2363
|
+
method: "GET",
|
|
2364
|
+
path: "/api/v1/follow-ups",
|
|
2365
|
+
query: { threadId, limit, organizationId },
|
|
2366
|
+
body: void 0,
|
|
2367
|
+
...mergeRequestOptions(requestOptions)
|
|
2368
|
+
});
|
|
2369
|
+
}
|
|
2370
|
+
/**
|
|
2371
|
+
* Create Follow-up
|
|
2372
|
+
*
|
|
2373
|
+
* Leave a one-shot follow-up on an assistant conversation you can open. Give exactly one of `at` (ISO 8601 with a timezone), `after` (a duration such as 90m, 4h, 14d or 2w) or `eventType` with an optional CEL `match` over `event` (the event's condition fields, as in AOP event triggers).
|
|
2374
|
+
|
|
2375
|
+
When it fires it continues `threadId` from `note` as you (`then=resume`, the default) or only emails you (`then=notify`). It never interrupts a run in progress: the continuation waits in the conversation's queue. A stopped conversation, or one whose last run failed, is not continued.
|
|
2376
|
+
|
|
2377
|
+
An event follow-up waits `expires` (10d by default) for its event; a timed one may be at most a year ahead.
|
|
2378
|
+
|
|
2379
|
+
### Authorization
|
|
2380
|
+
|
|
2381
|
+
Requires `agents:invoke` with a person's credential (API key or session); OAuth client credentials
|
|
2382
|
+
*
|
|
2383
|
+
* `POST /api/v1/follow-ups`
|
|
2384
|
+
*/
|
|
2385
|
+
create(request, requestOptions) {
|
|
2386
|
+
const { ...body } = request ?? {};
|
|
2387
|
+
return this._http.request({
|
|
2388
|
+
method: "POST",
|
|
2389
|
+
path: "/api/v1/follow-ups",
|
|
2390
|
+
query: void 0,
|
|
2391
|
+
body,
|
|
2392
|
+
...mergeRequestOptions(requestOptions)
|
|
2393
|
+
});
|
|
2394
|
+
}
|
|
2395
|
+
/**
|
|
2396
|
+
* Cancel Follow-ups
|
|
2397
|
+
*
|
|
2398
|
+
* Cancel your follow-ups that have not fired, so they never fire. One that already fired, expired or was canceled reports why per id; another person's follow-up reads as not found.
|
|
2399
|
+
|
|
2400
|
+
Returns `followUpIds`, `succeededCount`, `failedCount` and ordered `results`; `ok` is true only when every id was canceled.
|
|
2401
|
+
|
|
2402
|
+
### Authorization
|
|
2403
|
+
|
|
2404
|
+
Requires `agents:invoke`.
|
|
2405
|
+
*
|
|
2406
|
+
* `POST /api/v1/follow-ups/cancel`
|
|
2407
|
+
*/
|
|
2408
|
+
cancel(request, requestOptions) {
|
|
2409
|
+
const { ...body } = request ?? {};
|
|
2410
|
+
return this._http.request({
|
|
2411
|
+
method: "POST",
|
|
2412
|
+
path: "/api/v1/follow-ups/cancel",
|
|
2413
|
+
query: void 0,
|
|
2414
|
+
body,
|
|
2415
|
+
...mergeRequestOptions(requestOptions)
|
|
2416
|
+
});
|
|
2417
|
+
}
|
|
2418
|
+
};
|
|
2234
2419
|
var ImagesClient = class {
|
|
2235
2420
|
constructor(_http) {
|
|
2236
2421
|
__publicField(this, "_http", _http);
|
|
@@ -2753,9 +2938,9 @@ var OrdersClient = class {
|
|
|
2753
2938
|
/**
|
|
2754
2939
|
* Get Order Action Options
|
|
2755
2940
|
*
|
|
2756
|
-
*
|
|
2941
|
+
* Read marketplace choices for this order, including seller cancellation reasons for `action=cancel`. Eligible orders can include orders awaiting carrier collection. Requires `orders:write`.
|
|
2757
2942
|
|
|
2758
|
-
|
|
2943
|
+
Review the selected reason or fulfillment choice and send its exact `payload` with `POST /api/v1/orders/{orderId}/actions`.
|
|
2759
2944
|
*
|
|
2760
2945
|
* `GET /api/v1/orders/{orderId}/action-options`
|
|
2761
2946
|
*/
|
|
@@ -2774,7 +2959,7 @@ var OrdersClient = class {
|
|
|
2774
2959
|
*
|
|
2775
2960
|
* The order's 20 most recent action jobs, newest first, plus its latest successful label job. Requires `orders:read`.
|
|
2776
2961
|
|
|
2777
|
-
|
|
2962
|
+
After submission, find the returned job ID here. Read its status for the marketplace outcome and `errorMessage` for failures. A succeeded `labels` job lists its label files in `labels`.
|
|
2778
2963
|
*
|
|
2779
2964
|
* `GET /api/v1/orders/{orderId}/actions`
|
|
2780
2965
|
*/
|
|
@@ -2793,7 +2978,7 @@ var OrdersClient = class {
|
|
|
2793
2978
|
*
|
|
2794
2979
|
* Ship, cancel, generate shipping labels for, or update tracking on a marketplace order. Requires `orders:write`.
|
|
2795
2980
|
|
|
2796
|
-
The marketplace call runs in the background
|
|
2981
|
+
For `cancel`, send the exact payload of a reviewed cancellation reason from the action options endpoint. The marketplace call runs in the background. The `202` response provides a `jobId`. Poll `GET /api/v1/orders/{orderId}/actions` for its outcome. A repeated `idempotencyKey` with the same request returns `200` with the original job.
|
|
2797
2982
|
*
|
|
2798
2983
|
* `POST /api/v1/orders/{orderId}/actions`
|
|
2799
2984
|
*/
|
|
@@ -2816,7 +3001,7 @@ var OrdersClient = class {
|
|
|
2816
3001
|
|
|
2817
3002
|
### Choices
|
|
2818
3003
|
|
|
2819
|
-
Read
|
|
3004
|
+
Read marketplace choices for `ship`, `cancel`, `labels`, or `update_tracking` for 1–50 UUIDs using repeated `orderIds` parameters. Results preserve first-requested order and report any per-order eligibility or capability errors. For `cancel`, review an available reason for each order and use its exact `payload`. Orders awaiting collection can be eligible when the marketplace permits it. For other actions, supply any fields marked `requiresInput`.
|
|
2820
3005
|
*
|
|
2821
3006
|
* `GET /api/v1/orders/actions`
|
|
2822
3007
|
*/
|
|
@@ -2839,11 +3024,9 @@ var OrdersClient = class {
|
|
|
2839
3024
|
|
|
2840
3025
|
### Batch submission
|
|
2841
3026
|
|
|
2842
|
-
Queue 1–50 distinct
|
|
3027
|
+
Queue 1–50 distinct orders with a UUID `requestId` and one operation per order. Each operation carries an `orderId`, `action`, and any marketplace inputs in `payload`. For `cancel`, send the reviewed reason's exact payload from GET /api/v1/orders/actions. All targets are authorized before enqueue. Per-order results preserve request order and report acceptance or errors.
|
|
2843
3028
|
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
Retain requestId and unchanged operations for retr
|
|
3029
|
+
Retain `requestId` and unchanged operations for retries. Follow `links.poll` with every returned job ID to check the marketplace outcomes. The worker rechecks permissions before each marketplace write.
|
|
2847
3030
|
*
|
|
2848
3031
|
* `POST /api/v1/orders/actions`
|
|
2849
3032
|
*/
|
|
@@ -2866,7 +3049,7 @@ var OrdersClient = class {
|
|
|
2866
3049
|
|
|
2867
3050
|
### Outcomes and labels
|
|
2868
3051
|
|
|
2869
|
-
Read
|
|
3052
|
+
Read 1–50 jobs using repeated `jobIds` parameters. Results preserve first-requested order. `data.success` requires every job to succeed. `pendingCount` includes queued and running jobs. `failedCount` includes failed and unsupported jobs. Amazon cancellations can stay running while its feed is processed. Successful label jobs return download links. A missing or cross-organization job returns 404. Current store restrictions apply.
|
|
2870
3053
|
*
|
|
2871
3054
|
* `GET /api/v1/orders/actions/jobs`
|
|
2872
3055
|
*/
|
|
@@ -2954,7 +3137,13 @@ var PriceBooksClient = class {
|
|
|
2954
3137
|
*
|
|
2955
3138
|
* Create a marketplace price book rule for a platform (optional store and country). Does not change Omni product prices. Requires `price_books:write`.
|
|
2956
3139
|
|
|
3140
|
+
### Pricing
|
|
3141
|
+
|
|
2957
3142
|
`expression` is the buyer formula and replaces markup percent. `price` in that formula is the catalog price, not cost price. Without an expression, `marginValue` is the markup percent.
|
|
3143
|
+
|
|
3144
|
+
### Direct checkout
|
|
3145
|
+
|
|
3146
|
+
The Direct checkout channel (`agentic_checkout`) applies immediately to direct checkout and public headline prices, defaults to catalog price with zero markup when no enabled rule matches, and requires null/omitted storeId and country. Marketplace rules only price their own offers; Direct checkout rules require no marketplace sync.
|
|
2958
3147
|
*
|
|
2959
3148
|
* `POST /api/v1/price-books`
|
|
2960
3149
|
*/
|
|
@@ -3457,6 +3646,69 @@ var ProductsClient = class {
|
|
|
3457
3646
|
...mergeRequestOptions(requestOptions)
|
|
3458
3647
|
});
|
|
3459
3648
|
}
|
|
3649
|
+
/**
|
|
3650
|
+
* Get Bulk Product Update Options
|
|
3651
|
+
*
|
|
3652
|
+
* List active stock-file sources used by Omni Bulk Update, including manual warehouses and supported CSV sources. Requires catalog:read and inventory.read.
|
|
3653
|
+
|
|
3654
|
+
Use an eligible sourceId before starting inventory updates. Ask the seller to choose when multiple sources are eligible.
|
|
3655
|
+
*
|
|
3656
|
+
* `GET /api/v1/products/bulk-update`
|
|
3657
|
+
*/
|
|
3658
|
+
bulkUpdateOptions(request = {}, requestOptions) {
|
|
3659
|
+
const { organizationId } = request ?? {};
|
|
3660
|
+
return this._http.request({
|
|
3661
|
+
method: "GET",
|
|
3662
|
+
path: "/api/v1/products/bulk-update",
|
|
3663
|
+
query: { organizationId },
|
|
3664
|
+
body: void 0,
|
|
3665
|
+
...mergeRequestOptions(requestOptions)
|
|
3666
|
+
});
|
|
3667
|
+
}
|
|
3668
|
+
/**
|
|
3669
|
+
* Bulk Update Product Prices and Stock
|
|
3670
|
+
*
|
|
3671
|
+
* Update existing catalog SKUs from 1–10 uploaded CSV or Excel documentIds, with up to 10,000 rows per file. Requires catalog:write and the corresponding product or inventory capabilities.
|
|
3672
|
+
|
|
3673
|
+
### File and source selection
|
|
3674
|
+
|
|
3675
|
+
Exact SKU matching preserves zero values and rejects duplicate, ambiguous, or unknown SKUs. Inventory needs an authorized manual or CSV sourceId or locationId. Explicit column names override detection. syncToMarketplaces defaults to true. Use marketplaces to limit which existing listings are synced.
|
|
3676
|
+
|
|
3677
|
+
### Track the results
|
|
3678
|
+
|
|
3679
|
+
Pass every saved import reference to products.bulkUpdateStatus. Results preserve document order. The workflow runs after the request returns. Applied inventory means source balances were saved and listing sync was queued.
|
|
3680
|
+
*
|
|
3681
|
+
* `POST /api/v1/products/bulk-update`
|
|
3682
|
+
*/
|
|
3683
|
+
bulkUpdate(request, requestOptions) {
|
|
3684
|
+
const { ...body } = request ?? {};
|
|
3685
|
+
return this._http.request({
|
|
3686
|
+
method: "POST",
|
|
3687
|
+
path: "/api/v1/products/bulk-update",
|
|
3688
|
+
query: void 0,
|
|
3689
|
+
body,
|
|
3690
|
+
...mergeRequestOptions(requestOptions)
|
|
3691
|
+
});
|
|
3692
|
+
}
|
|
3693
|
+
/**
|
|
3694
|
+
* Get Bulk Product Update Status
|
|
3695
|
+
*
|
|
3696
|
+
* Read up to 20 saved imports in request order. Requires catalog:read and the corresponding product or inventory read capabilities. Imports are deduplicated by kind and importId.
|
|
3697
|
+
|
|
3698
|
+
Pending imports are incomplete. Results report invalid or unknown rows and missing organization-scoped imports. Use includeRows with rowOffset and rowLimit for up to 100 rows per import. The result describes saved catalog stock.
|
|
3699
|
+
*
|
|
3700
|
+
* `POST /api/v1/products/bulk-update/status`
|
|
3701
|
+
*/
|
|
3702
|
+
bulkUpdateStatus(request, requestOptions) {
|
|
3703
|
+
const { ...body } = request ?? {};
|
|
3704
|
+
return this._http.request({
|
|
3705
|
+
method: "POST",
|
|
3706
|
+
path: "/api/v1/products/bulk-update/status",
|
|
3707
|
+
query: void 0,
|
|
3708
|
+
body,
|
|
3709
|
+
...mergeRequestOptions(requestOptions)
|
|
3710
|
+
});
|
|
3711
|
+
}
|
|
3460
3712
|
/**
|
|
3461
3713
|
* Compare Product Market Prices
|
|
3462
3714
|
*
|
|
@@ -3594,11 +3846,7 @@ var ProductsClient = class {
|
|
|
3594
3846
|
*
|
|
3595
3847
|
* Merge exact-SKU duplicate products into one master product per group. The master keeps its content, images, price and stock; the group's other products are archived into it, and orders, reviews, promotions and other catalog references move to the master.
|
|
3596
3848
|
|
|
3597
|
-
All marketplace listings move to the master, including listings in other stores of the same marketplace. Different listing identities in the same store block the group.
|
|
3598
|
-
|
|
3599
|
-
Each group commits independently; the response lists every group's outcome. Sources with inventory history or immutable order composition snapshots must be reconciled before archiving so returns and stock replays keep their targets.
|
|
3600
|
-
|
|
3601
|
-
Supports every OmniCommerce marketplace. Variant families, bundles and product
|
|
3849
|
+
All marketplace listings move to the master, including listings in other stores of the same marketplace. Different listing identities in the same store block the group. Standalone-only merges do not publish. When variants remain, variantStrategy selects keeping the master's variant set or merging compatible source variants, and the same operation automatically publishes the resulting variants to every preserved store listing. Live/draft visibility is retained; the marketplace may require a replacement listing for an incompatible variant s
|
|
3602
3850
|
*
|
|
3603
3851
|
* `POST /api/v1/products/duplicates/merge`
|
|
3604
3852
|
*/
|
|
@@ -3636,12 +3884,14 @@ var ProductsClient = class {
|
|
|
3636
3884
|
});
|
|
3637
3885
|
}
|
|
3638
3886
|
/**
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3887
|
+
* Get Duplicate Scan
|
|
3888
|
+
*
|
|
3889
|
+
* Read the same organization-scoped duplicate scan status as Products → Check duplicates. Requires catalog:read.
|
|
3890
|
+
|
|
3891
|
+
queued/running means the durable scan is still in progress; failed includes errorMessage. completed exposes computedAt and the number of duplicate products. Results are read through products.list with status=duplicates and detail=full. The shared UI scan currently examines at most the 5,000 most recently updated non-archived root products; a completed scan is not proof that a larger catalog has been fully examined.
|
|
3892
|
+
*
|
|
3893
|
+
* `GET /api/v1/products/duplicates/scan`
|
|
3894
|
+
*/
|
|
3645
3895
|
getDuplicateScan(request = {}, requestOptions) {
|
|
3646
3896
|
const { organizationId } = request ?? {};
|
|
3647
3897
|
return this._http.request({
|
|
@@ -3653,12 +3903,14 @@ var ProductsClient = class {
|
|
|
3653
3903
|
});
|
|
3654
3904
|
}
|
|
3655
3905
|
/**
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3906
|
+
* Scan Duplicate Products
|
|
3907
|
+
*
|
|
3908
|
+
* Start the existing durable organization duplicate scan, equivalent to Products → Check duplicates. Requires catalog:write.
|
|
3909
|
+
|
|
3910
|
+
An already queued/running scan is reused. This only refreshes duplicate evidence; it does not merge, publish or delist products. Read completion with products.getDuplicateScan, then list status=duplicates, duplicateType=sku, detail=full and page all matching results before previewing a merge. Uses the same 5,000-candidate scan limit as the UI.
|
|
3911
|
+
*
|
|
3912
|
+
* `POST /api/v1/products/duplicates/scan`
|
|
3913
|
+
*/
|
|
3662
3914
|
scanDuplicates(request, requestOptions) {
|
|
3663
3915
|
const { ...body } = request ?? {};
|
|
3664
3916
|
return this._http.request({
|
|
@@ -3874,6 +4126,8 @@ var PromotionsClient = class {
|
|
|
3874
4126
|
*
|
|
3875
4127
|
* Read canonical effective prices for up to 50 products, optionally scoped to an exact marketplace, store and country. Uses the same authoring permissions as the application's preview. Does not publish or change prices.
|
|
3876
4128
|
|
|
4129
|
+
### Authorization
|
|
4130
|
+
|
|
3877
4131
|
Requires promotions:write. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
3878
4132
|
*
|
|
3879
4133
|
* `POST /api/v1/promotions/{promotionId}/preview`
|
|
@@ -3923,12 +4177,14 @@ var PromotionsClient = class {
|
|
|
3923
4177
|
});
|
|
3924
4178
|
}
|
|
3925
4179
|
/**
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
4180
|
+
* Assign Products to Promotion
|
|
4181
|
+
*
|
|
4182
|
+
* Assign qualifying products and optional per-product discounts to a promotion. Active or scheduled promotions automatically queue durable marketplace delivery; drafts retain assignments for later publication.
|
|
4183
|
+
|
|
4184
|
+
Requires `promotions:write` and current publish permission when publishing. Read promotion delivery to verify every target store.
|
|
4185
|
+
*
|
|
4186
|
+
* `POST /api/v1/promotions/{promotionId}/products`
|
|
4187
|
+
*/
|
|
3932
4188
|
addProducts(request, requestOptions) {
|
|
3933
4189
|
const { promotionId, organizationId, ...body } = request ?? {};
|
|
3934
4190
|
return this._http.request({
|
|
@@ -3963,6 +4219,8 @@ var PromotionsClient = class {
|
|
|
3963
4219
|
*
|
|
3964
4220
|
* Create 1–50 promotions using the shared flat promotion-write contract, with qualifying products and per-product discounts. Set promotion.status=draft explicitly when preparing drafts; otherwise the canonical creation flow activates promotions and requires publish permission. Saved IDs and delivery evidence are retained on partial delivery failure; retry those IDs rather than creating duplicates.
|
|
3965
4221
|
|
|
4222
|
+
### Authorization
|
|
4223
|
+
|
|
3966
4224
|
Requires promotions:write. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
3967
4225
|
*
|
|
3968
4226
|
* `POST /api/v1/promotions/batch`
|
|
@@ -3982,6 +4240,8 @@ var PromotionsClient = class {
|
|
|
3982
4240
|
*
|
|
3983
4241
|
* Search campaign options with assigned promotions in the authenticated organization.
|
|
3984
4242
|
|
|
4243
|
+
### Authorization
|
|
4244
|
+
|
|
3985
4245
|
Requires promotions:read. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
3986
4246
|
*
|
|
3987
4247
|
* `GET /api/v1/promotions/campaign-options`
|
|
@@ -4001,6 +4261,8 @@ var PromotionsClient = class {
|
|
|
4001
4261
|
*
|
|
4002
4262
|
* Report every canonical marketplace and promotion kind, including native, projected, browser-AOP and unsupported capabilities and voucher subtypes. WhatsApp's lack of promotion publishing is explicit.
|
|
4003
4263
|
|
|
4264
|
+
### Authorization
|
|
4265
|
+
|
|
4004
4266
|
Requires promotions:read. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
4005
4267
|
*
|
|
4006
4268
|
* `GET /api/v1/promotions/capabilities`
|
|
@@ -4020,6 +4282,8 @@ var PromotionsClient = class {
|
|
|
4020
4282
|
*
|
|
4021
4283
|
* Delete 1–500 promotions with the canonical marketplace cleanup flow. Requires promotions.delete permission. Ordered per-target errors and partial failures remain explicit.
|
|
4022
4284
|
|
|
4285
|
+
### Authorization
|
|
4286
|
+
|
|
4023
4287
|
Requires promotions:write. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
4024
4288
|
*
|
|
4025
4289
|
* `POST /api/v1/promotions/delete`
|
|
@@ -4039,6 +4303,8 @@ var PromotionsClient = class {
|
|
|
4039
4303
|
*
|
|
4040
4304
|
* Read exact store/assignment delivery evidence for 1–50 promotions. A saved or active promotion is not proof that marketplace delivery succeeded. Check every returned deliveryStatuses entry, including explicit unsupported or unavailable states.
|
|
4041
4305
|
|
|
4306
|
+
### Authorization
|
|
4307
|
+
|
|
4042
4308
|
Requires promotions:read. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
4043
4309
|
*
|
|
4044
4310
|
* `POST /api/v1/promotions/delivery`
|
|
@@ -4058,6 +4324,8 @@ var PromotionsClient = class {
|
|
|
4058
4324
|
*
|
|
4059
4325
|
* Search or check up to 50 product IDs using canonical promotion assignment eligibility for the selected exact stores. Draft/unlisted products can be eligible for planning; live marketplace availability is rechecked during delivery.
|
|
4060
4326
|
|
|
4327
|
+
### Authorization
|
|
4328
|
+
|
|
4061
4329
|
Requires promotions:read. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
4062
4330
|
*
|
|
4063
4331
|
* `POST /api/v1/promotions/product-options`
|
|
@@ -4077,6 +4345,8 @@ var PromotionsClient = class {
|
|
|
4077
4345
|
*
|
|
4078
4346
|
* Activate/publish, pause or archive 1–500 promotions. Activation requires promotions.publish permission. Uses the canonical status transition and durable marketplace sync/teardown flow; verify delivery separately.
|
|
4079
4347
|
|
|
4348
|
+
### Authorization
|
|
4349
|
+
|
|
4080
4350
|
Requires promotions:write. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
4081
4351
|
*
|
|
4082
4352
|
* `POST /api/v1/promotions/status`
|
|
@@ -4096,6 +4366,8 @@ var PromotionsClient = class {
|
|
|
4096
4366
|
*
|
|
4097
4367
|
* Read-only validation of 1–50 saved promotion IDs or proposed definitions and product IDs. Reports marketplace terms, connected-store targeting and qualifying-product issues per target. Publishing still revalidates current state and can encounter marketplace API rejections.
|
|
4098
4368
|
|
|
4369
|
+
### Authorization
|
|
4370
|
+
|
|
4099
4371
|
Requires promotions:read. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
4100
4372
|
*
|
|
4101
4373
|
* `POST /api/v1/promotions/validate`
|
|
@@ -4165,6 +4437,25 @@ var ReturnsClient = class {
|
|
|
4165
4437
|
...mergeRequestOptions(requestOptions)
|
|
4166
4438
|
});
|
|
4167
4439
|
}
|
|
4440
|
+
/**
|
|
4441
|
+
* Upload Return Rejection Evidence
|
|
4442
|
+
*
|
|
4443
|
+
* Requires `orders:write`. For a rejection choice with `input.evidenceUpload: true`, upload one JPEG or PNG image up to 5 MB.
|
|
4444
|
+
|
|
4445
|
+
Use the receipt and filename in `input.evidence` when submitting the reviewed rejection. A rejection can include up to six images. Each receipt is scoped to its return and expires after 24 hours.
|
|
4446
|
+
*
|
|
4447
|
+
* `POST /api/v1/returns/{returnId}/evidence`
|
|
4448
|
+
*/
|
|
4449
|
+
uploadEvidence(request, requestOptions) {
|
|
4450
|
+
const { returnId, organizationId, ...body } = request ?? {};
|
|
4451
|
+
return this._http.request({
|
|
4452
|
+
method: "POST",
|
|
4453
|
+
path: `/api/v1/returns/${encodePathParam("returnId", returnId)}/evidence`,
|
|
4454
|
+
query: { organizationId },
|
|
4455
|
+
body: toMultipartBody(body),
|
|
4456
|
+
...mergeRequestOptions(requestOptions)
|
|
4457
|
+
});
|
|
4458
|
+
}
|
|
4168
4459
|
/**
|
|
4169
4460
|
* Check Return Actions
|
|
4170
4461
|
*
|
|
@@ -5079,6 +5370,7 @@ var OmniGeneratedClient = class {
|
|
|
5079
5370
|
__publicField(this, "documents");
|
|
5080
5371
|
__publicField(this, "evaluate");
|
|
5081
5372
|
__publicField(this, "feed");
|
|
5373
|
+
__publicField(this, "followUps");
|
|
5082
5374
|
__publicField(this, "images");
|
|
5083
5375
|
__publicField(this, "inventory");
|
|
5084
5376
|
__publicField(this, "jobs");
|
|
@@ -5120,6 +5412,7 @@ var OmniGeneratedClient = class {
|
|
|
5120
5412
|
this.documents = new DocumentsClient(this._http);
|
|
5121
5413
|
this.evaluate = new EvaluateClient(this._http);
|
|
5122
5414
|
this.feed = new FeedClient(this._http);
|
|
5415
|
+
this.followUps = new FollowUpsClient(this._http);
|
|
5123
5416
|
this.images = new ImagesClient(this._http);
|
|
5124
5417
|
this.inventory = new InventoryClient(this._http);
|
|
5125
5418
|
this.jobs = new JobsClient(this._http);
|