@omni-commerce/sdk 0.21.0 → 0.23.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 +7 -0
- package/dist/index.cjs +378 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2535 -242
- package/dist/index.d.ts +2535 -242
- package/dist/index.js +378 -30
- 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.23.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);
|
|
@@ -2954,7 +3139,13 @@ var PriceBooksClient = class {
|
|
|
2954
3139
|
*
|
|
2955
3140
|
* Create a marketplace price book rule for a platform (optional store and country). Does not change Omni product prices. Requires `price_books:write`.
|
|
2956
3141
|
|
|
3142
|
+
### Pricing
|
|
3143
|
+
|
|
2957
3144
|
`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.
|
|
3145
|
+
|
|
3146
|
+
### Direct checkout
|
|
3147
|
+
|
|
3148
|
+
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
3149
|
*
|
|
2959
3150
|
* `POST /api/v1/price-books`
|
|
2960
3151
|
*/
|
|
@@ -3071,6 +3262,10 @@ var ProductsClient = class {
|
|
|
3071
3262
|
### Stock and variants
|
|
3072
3263
|
|
|
3073
3264
|
Rows are in `items`. Read catalog stock from `items[].stockQuantity`: parent rows already aggregate their non-deleted variants, and virtual bundles use component availability with any manual cap. Null means unknown, not zero. A row with `variantCount` above 0 has variants; fetch them from `GET /api/v1/products/{productId}`. List rows do not contain `inventoryQuantity`, `inventory.quantity`, or an embedded `variants` array.
|
|
3265
|
+
|
|
3266
|
+
### Duplicate discovery and merge
|
|
3267
|
+
|
|
3268
|
+
Use status=duplicates, duplicateType=sku and detail=full for exact-SKU candidates. Each root ro
|
|
3074
3269
|
*
|
|
3075
3270
|
* `GET /api/v1/products`
|
|
3076
3271
|
*/
|
|
@@ -3453,6 +3648,57 @@ var ProductsClient = class {
|
|
|
3453
3648
|
...mergeRequestOptions(requestOptions)
|
|
3454
3649
|
});
|
|
3455
3650
|
}
|
|
3651
|
+
/**
|
|
3652
|
+
* Get Bulk Product Update Options
|
|
3653
|
+
*
|
|
3654
|
+
* List the same active stock-file-capable sources as Omni Bulk Update, including manual warehouses and supported CSV sources. Requires catalog:read and inventory.read. Resolve a sourceId from this organization-scoped result before starting inventory/both updates; an ambiguous choice requires seller selection.
|
|
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/Excel documentIds (up to 10,000 rows per file), using the same price and inventory import services as Omni Bulk Update. Requires catalog:write and the corresponding product/inventory capabilities. No product creation. Exact SKU matching rejects duplicate/ambiguous and unknown SKUs; zero values are preserved. Inventory requires an authorized manual/CSV sourceId or locationId. Explicit column names override detection. syncToMarketplaces defaults true; optional marketplaces restricts existing listing sync across supported platforms. Returns ordered per-document results and saved imports references. Updates continue through the durable file-update workflow beyond the caller lifetime; acceptance is not completion. Pass every returned reference
|
|
3672
|
+
*
|
|
3673
|
+
* `POST /api/v1/products/bulk-update`
|
|
3674
|
+
*/
|
|
3675
|
+
bulkUpdate(request, requestOptions) {
|
|
3676
|
+
const { ...body } = request ?? {};
|
|
3677
|
+
return this._http.request({
|
|
3678
|
+
method: "POST",
|
|
3679
|
+
path: "/api/v1/products/bulk-update",
|
|
3680
|
+
query: void 0,
|
|
3681
|
+
body,
|
|
3682
|
+
...mergeRequestOptions(requestOptions)
|
|
3683
|
+
});
|
|
3684
|
+
}
|
|
3685
|
+
/**
|
|
3686
|
+
* Get Bulk Product Update Status
|
|
3687
|
+
*
|
|
3688
|
+
* Read up to 20 typed saved imports in requested order. Requires catalog:read and the corresponding product/inventory read capabilities. IDs are deduplicated by kind and importId. Pending imports are incomplete; invalid/unknown rows and missing organization-scoped imports remain explicit failures. Compact by default; includeRows returns at most 100 rows per import using rowOffset/rowLimit. Catalog stock apply does not certify marketplace state.
|
|
3689
|
+
*
|
|
3690
|
+
* `POST /api/v1/products/bulk-update/status`
|
|
3691
|
+
*/
|
|
3692
|
+
bulkUpdateStatus(request, requestOptions) {
|
|
3693
|
+
const { ...body } = request ?? {};
|
|
3694
|
+
return this._http.request({
|
|
3695
|
+
method: "POST",
|
|
3696
|
+
path: "/api/v1/products/bulk-update/status",
|
|
3697
|
+
query: void 0,
|
|
3698
|
+
body,
|
|
3699
|
+
...mergeRequestOptions(requestOptions)
|
|
3700
|
+
});
|
|
3701
|
+
}
|
|
3456
3702
|
/**
|
|
3457
3703
|
* Compare Product Market Prices
|
|
3458
3704
|
*
|
|
@@ -3585,6 +3831,86 @@ var ProductsClient = class {
|
|
|
3585
3831
|
...mergeRequestOptions(requestOptions)
|
|
3586
3832
|
});
|
|
3587
3833
|
}
|
|
3834
|
+
/**
|
|
3835
|
+
* Merge Duplicate Products
|
|
3836
|
+
*
|
|
3837
|
+
* 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.
|
|
3838
|
+
|
|
3839
|
+
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
|
|
3840
|
+
*
|
|
3841
|
+
* `POST /api/v1/products/duplicates/merge`
|
|
3842
|
+
*/
|
|
3843
|
+
mergeDuplicates(request, requestOptions) {
|
|
3844
|
+
const { ...body } = request ?? {};
|
|
3845
|
+
return this._http.request({
|
|
3846
|
+
method: "POST",
|
|
3847
|
+
path: "/api/v1/products/duplicates/merge",
|
|
3848
|
+
query: void 0,
|
|
3849
|
+
body,
|
|
3850
|
+
...mergeRequestOptions(requestOptions)
|
|
3851
|
+
});
|
|
3852
|
+
}
|
|
3853
|
+
/**
|
|
3854
|
+
* Preview Duplicate Product Merge
|
|
3855
|
+
*
|
|
3856
|
+
* Read-only preview of merging duplicate catalog products into one master product. Uses the same contract and rules as `POST /api/v1/products/duplicates/merge` and the assistant's Fix Listing Duplicates tool.
|
|
3857
|
+
|
|
3858
|
+
Products are grouped by exact SKU. Each group shows its master (first in `productIds`), every product's marketplace listings per store with live status. A blocked group reports its `error`; nothing is changed.
|
|
3859
|
+
|
|
3860
|
+
Supports every OmniCommerce marketplace. All marketplace listings are preserved. Different listing identities in the same store block that group; the merge never delists listings.
|
|
3861
|
+
|
|
3862
|
+
Discover candidates with `GET /api/v1/products?status=duplicates&duplicateType=sku&detail=full`. Refresh the saved scan through `POST /api/v1/products/duplicates/scan` when needed. Each group's `maste
|
|
3863
|
+
*
|
|
3864
|
+
* `POST /api/v1/products/duplicates/merge-preview`
|
|
3865
|
+
*/
|
|
3866
|
+
previewDuplicateMerge(request, requestOptions) {
|
|
3867
|
+
const { ...body } = request ?? {};
|
|
3868
|
+
return this._http.request({
|
|
3869
|
+
method: "POST",
|
|
3870
|
+
path: "/api/v1/products/duplicates/merge-preview",
|
|
3871
|
+
query: void 0,
|
|
3872
|
+
body,
|
|
3873
|
+
...mergeRequestOptions(requestOptions)
|
|
3874
|
+
});
|
|
3875
|
+
}
|
|
3876
|
+
/**
|
|
3877
|
+
* Get Duplicate Scan
|
|
3878
|
+
*
|
|
3879
|
+
* Read the same organization-scoped duplicate scan status as Products → Check duplicates. Requires catalog:read.
|
|
3880
|
+
|
|
3881
|
+
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.
|
|
3882
|
+
*
|
|
3883
|
+
* `GET /api/v1/products/duplicates/scan`
|
|
3884
|
+
*/
|
|
3885
|
+
getDuplicateScan(request = {}, requestOptions) {
|
|
3886
|
+
const { organizationId } = request ?? {};
|
|
3887
|
+
return this._http.request({
|
|
3888
|
+
method: "GET",
|
|
3889
|
+
path: "/api/v1/products/duplicates/scan",
|
|
3890
|
+
query: { organizationId },
|
|
3891
|
+
body: void 0,
|
|
3892
|
+
...mergeRequestOptions(requestOptions)
|
|
3893
|
+
});
|
|
3894
|
+
}
|
|
3895
|
+
/**
|
|
3896
|
+
* Scan Duplicate Products
|
|
3897
|
+
*
|
|
3898
|
+
* Start the existing durable organization duplicate scan, equivalent to Products → Check duplicates. Requires catalog:write.
|
|
3899
|
+
|
|
3900
|
+
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.
|
|
3901
|
+
*
|
|
3902
|
+
* `POST /api/v1/products/duplicates/scan`
|
|
3903
|
+
*/
|
|
3904
|
+
scanDuplicates(request, requestOptions) {
|
|
3905
|
+
const { ...body } = request ?? {};
|
|
3906
|
+
return this._http.request({
|
|
3907
|
+
method: "POST",
|
|
3908
|
+
path: "/api/v1/products/duplicates/scan",
|
|
3909
|
+
query: void 0,
|
|
3910
|
+
body,
|
|
3911
|
+
...mergeRequestOptions(requestOptions)
|
|
3912
|
+
});
|
|
3913
|
+
}
|
|
3588
3914
|
/**
|
|
3589
3915
|
* Queue Product Enrichment
|
|
3590
3916
|
*
|
|
@@ -3790,6 +4116,8 @@ var PromotionsClient = class {
|
|
|
3790
4116
|
*
|
|
3791
4117
|
* 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.
|
|
3792
4118
|
|
|
4119
|
+
### Authorization
|
|
4120
|
+
|
|
3793
4121
|
Requires promotions:write. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
3794
4122
|
*
|
|
3795
4123
|
* `POST /api/v1/promotions/{promotionId}/preview`
|
|
@@ -3839,12 +4167,14 @@ var PromotionsClient = class {
|
|
|
3839
4167
|
});
|
|
3840
4168
|
}
|
|
3841
4169
|
/**
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
4170
|
+
* Assign Products to Promotion
|
|
4171
|
+
*
|
|
4172
|
+
* 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.
|
|
4173
|
+
|
|
4174
|
+
Requires `promotions:write` and current publish permission when publishing. Read promotion delivery to verify every target store.
|
|
4175
|
+
*
|
|
4176
|
+
* `POST /api/v1/promotions/{promotionId}/products`
|
|
4177
|
+
*/
|
|
3848
4178
|
addProducts(request, requestOptions) {
|
|
3849
4179
|
const { promotionId, organizationId, ...body } = request ?? {};
|
|
3850
4180
|
return this._http.request({
|
|
@@ -3879,6 +4209,8 @@ var PromotionsClient = class {
|
|
|
3879
4209
|
*
|
|
3880
4210
|
* 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.
|
|
3881
4211
|
|
|
4212
|
+
### Authorization
|
|
4213
|
+
|
|
3882
4214
|
Requires promotions:write. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
3883
4215
|
*
|
|
3884
4216
|
* `POST /api/v1/promotions/batch`
|
|
@@ -3898,6 +4230,8 @@ var PromotionsClient = class {
|
|
|
3898
4230
|
*
|
|
3899
4231
|
* Search campaign options with assigned promotions in the authenticated organization.
|
|
3900
4232
|
|
|
4233
|
+
### Authorization
|
|
4234
|
+
|
|
3901
4235
|
Requires promotions:read. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
3902
4236
|
*
|
|
3903
4237
|
* `GET /api/v1/promotions/campaign-options`
|
|
@@ -3917,6 +4251,8 @@ var PromotionsClient = class {
|
|
|
3917
4251
|
*
|
|
3918
4252
|
* 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.
|
|
3919
4253
|
|
|
4254
|
+
### Authorization
|
|
4255
|
+
|
|
3920
4256
|
Requires promotions:read. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
3921
4257
|
*
|
|
3922
4258
|
* `GET /api/v1/promotions/capabilities`
|
|
@@ -3936,6 +4272,8 @@ var PromotionsClient = class {
|
|
|
3936
4272
|
*
|
|
3937
4273
|
* Delete 1–500 promotions with the canonical marketplace cleanup flow. Requires promotions.delete permission. Ordered per-target errors and partial failures remain explicit.
|
|
3938
4274
|
|
|
4275
|
+
### Authorization
|
|
4276
|
+
|
|
3939
4277
|
Requires promotions:write. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
3940
4278
|
*
|
|
3941
4279
|
* `POST /api/v1/promotions/delete`
|
|
@@ -3955,6 +4293,8 @@ var PromotionsClient = class {
|
|
|
3955
4293
|
*
|
|
3956
4294
|
* 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.
|
|
3957
4295
|
|
|
4296
|
+
### Authorization
|
|
4297
|
+
|
|
3958
4298
|
Requires promotions:read. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
3959
4299
|
*
|
|
3960
4300
|
* `POST /api/v1/promotions/delivery`
|
|
@@ -3974,6 +4314,8 @@ var PromotionsClient = class {
|
|
|
3974
4314
|
*
|
|
3975
4315
|
* 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.
|
|
3976
4316
|
|
|
4317
|
+
### Authorization
|
|
4318
|
+
|
|
3977
4319
|
Requires promotions:read. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
3978
4320
|
*
|
|
3979
4321
|
* `POST /api/v1/promotions/product-options`
|
|
@@ -3993,6 +4335,8 @@ var PromotionsClient = class {
|
|
|
3993
4335
|
*
|
|
3994
4336
|
* 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.
|
|
3995
4337
|
|
|
4338
|
+
### Authorization
|
|
4339
|
+
|
|
3996
4340
|
Requires promotions:write. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
3997
4341
|
*
|
|
3998
4342
|
* `POST /api/v1/promotions/status`
|
|
@@ -4012,6 +4356,8 @@ var PromotionsClient = class {
|
|
|
4012
4356
|
*
|
|
4013
4357
|
* 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.
|
|
4014
4358
|
|
|
4359
|
+
### Authorization
|
|
4360
|
+
|
|
4015
4361
|
Requires promotions:read. API keys and delegated Computer credentials resolve organization scope without browser cookies; optional organizationId must match that scope.
|
|
4016
4362
|
*
|
|
4017
4363
|
* `POST /api/v1/promotions/validate`
|
|
@@ -4995,6 +5341,7 @@ var OmniGeneratedClient = class {
|
|
|
4995
5341
|
__publicField(this, "documents");
|
|
4996
5342
|
__publicField(this, "evaluate");
|
|
4997
5343
|
__publicField(this, "feed");
|
|
5344
|
+
__publicField(this, "followUps");
|
|
4998
5345
|
__publicField(this, "images");
|
|
4999
5346
|
__publicField(this, "inventory");
|
|
5000
5347
|
__publicField(this, "jobs");
|
|
@@ -5036,6 +5383,7 @@ var OmniGeneratedClient = class {
|
|
|
5036
5383
|
this.documents = new DocumentsClient(this._http);
|
|
5037
5384
|
this.evaluate = new EvaluateClient(this._http);
|
|
5038
5385
|
this.feed = new FeedClient(this._http);
|
|
5386
|
+
this.followUps = new FollowUpsClient(this._http);
|
|
5039
5387
|
this.images = new ImagesClient(this._http);
|
|
5040
5388
|
this.inventory = new InventoryClient(this._http);
|
|
5041
5389
|
this.jobs = new JobsClient(this._http);
|