@omni-commerce/sdk 0.20.1 → 0.21.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 +2 -0
- package/dist/index.cjs +110 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +884 -40
- package/dist/index.d.ts +884 -40
- package/dist/index.js +110 -1
- 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.21.0";
|
|
37
37
|
var SDK_USER_AGENT = `omnicommerce-js/${SDK_VERSION}`;
|
|
38
38
|
|
|
39
39
|
// src/environments.ts
|
|
@@ -1478,6 +1478,79 @@ var BrandsgatewayClient = class {
|
|
|
1478
1478
|
});
|
|
1479
1479
|
}
|
|
1480
1480
|
};
|
|
1481
|
+
var BulkClient = class {
|
|
1482
|
+
constructor(_http) {
|
|
1483
|
+
__publicField(this, "_http", _http);
|
|
1484
|
+
}
|
|
1485
|
+
/**
|
|
1486
|
+
* List Catalog Operations for Session
|
|
1487
|
+
*
|
|
1488
|
+
* Read the latest 20 compact catalog-operation summaries linked to an authorized session. Requires catalog:read; product data scope is rechecked.
|
|
1489
|
+
*
|
|
1490
|
+
* `GET /api/v1/catalog/operations`
|
|
1491
|
+
*/
|
|
1492
|
+
listForSession(request, requestOptions) {
|
|
1493
|
+
const { organizationId, sessionId } = request ?? {};
|
|
1494
|
+
return this._http.request({
|
|
1495
|
+
method: "GET",
|
|
1496
|
+
path: "/api/v1/catalog/operations",
|
|
1497
|
+
query: { organizationId, sessionId },
|
|
1498
|
+
body: void 0,
|
|
1499
|
+
...mergeRequestOptions(requestOptions)
|
|
1500
|
+
});
|
|
1501
|
+
}
|
|
1502
|
+
/**
|
|
1503
|
+
* Start Catalog Operation
|
|
1504
|
+
*
|
|
1505
|
+
* Durable bulk price/cost updates for 1–2000 products or variants. Requires catalog:write. 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.
|
|
1506
|
+
*
|
|
1507
|
+
* `POST /api/v1/catalog/operations`
|
|
1508
|
+
*/
|
|
1509
|
+
start(request, requestOptions) {
|
|
1510
|
+
const { ...body } = request ?? {};
|
|
1511
|
+
return this._http.request({
|
|
1512
|
+
method: "POST",
|
|
1513
|
+
path: "/api/v1/catalog/operations",
|
|
1514
|
+
query: void 0,
|
|
1515
|
+
body,
|
|
1516
|
+
...mergeRequestOptions(requestOptions)
|
|
1517
|
+
});
|
|
1518
|
+
}
|
|
1519
|
+
/**
|
|
1520
|
+
* Get Catalog Operation Results
|
|
1521
|
+
*
|
|
1522
|
+
* Read ordered per-product receipts and verification evidence for up to 50 operationIds. Filter status=failed to inspect failures directly. At most 100 rows across the requested operations per page. Requires catalog:read.
|
|
1523
|
+
*
|
|
1524
|
+
* `POST /api/v1/catalog/operations/results`
|
|
1525
|
+
*/
|
|
1526
|
+
results(request, requestOptions) {
|
|
1527
|
+
const { ...body } = request ?? {};
|
|
1528
|
+
return this._http.request({
|
|
1529
|
+
method: "POST",
|
|
1530
|
+
path: "/api/v1/catalog/operations/results",
|
|
1531
|
+
query: void 0,
|
|
1532
|
+
body,
|
|
1533
|
+
...mergeRequestOptions(requestOptions)
|
|
1534
|
+
});
|
|
1535
|
+
}
|
|
1536
|
+
/**
|
|
1537
|
+
* Get Catalog Operation Status
|
|
1538
|
+
*
|
|
1539
|
+
* Read compact progress for up to 50 operationIds in first-requested order. Pending is incomplete, and partial failures remain explicit. Requires catalog:read. Detailed receipts are returned only by the paginated report API.
|
|
1540
|
+
*
|
|
1541
|
+
* `POST /api/v1/catalog/operations/status`
|
|
1542
|
+
*/
|
|
1543
|
+
status(request, requestOptions) {
|
|
1544
|
+
const { ...body } = request ?? {};
|
|
1545
|
+
return this._http.request({
|
|
1546
|
+
method: "POST",
|
|
1547
|
+
path: "/api/v1/catalog/operations/status",
|
|
1548
|
+
query: void 0,
|
|
1549
|
+
body,
|
|
1550
|
+
...mergeRequestOptions(requestOptions)
|
|
1551
|
+
});
|
|
1552
|
+
}
|
|
1553
|
+
};
|
|
1481
1554
|
var CampaignsClient = class {
|
|
1482
1555
|
constructor(_http) {
|
|
1483
1556
|
__publicField(this, "_http", _http);
|
|
@@ -1833,6 +1906,23 @@ var CatalogClient = class {
|
|
|
1833
1906
|
...mergeRequestOptions(requestOptions)
|
|
1834
1907
|
});
|
|
1835
1908
|
}
|
|
1909
|
+
/**
|
|
1910
|
+
* Query Catalog
|
|
1911
|
+
*
|
|
1912
|
+
* 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. Fields bound the response. Maximum 500 rows per page. Omit counts after the first page with includeCount=false. No SQL input is accepted.
|
|
1913
|
+
*
|
|
1914
|
+
* `POST /api/v1/catalog/query`
|
|
1915
|
+
*/
|
|
1916
|
+
query(request, requestOptions) {
|
|
1917
|
+
const { ...body } = request ?? {};
|
|
1918
|
+
return this._http.request({
|
|
1919
|
+
method: "POST",
|
|
1920
|
+
path: "/api/v1/catalog/query",
|
|
1921
|
+
query: void 0,
|
|
1922
|
+
body,
|
|
1923
|
+
...mergeRequestOptions(requestOptions)
|
|
1924
|
+
});
|
|
1925
|
+
}
|
|
1836
1926
|
};
|
|
1837
1927
|
var CheckoutSessionsClient = class {
|
|
1838
1928
|
constructor(_http) {
|
|
@@ -1995,6 +2085,23 @@ var CommerceClient = class {
|
|
|
1995
2085
|
...mergeRequestOptions(requestOptions)
|
|
1996
2086
|
});
|
|
1997
2087
|
}
|
|
2088
|
+
/**
|
|
2089
|
+
* Start Commerce Verification
|
|
2090
|
+
*
|
|
2091
|
+
* Queue durable fresh verification for up to 2000 products in the existing verification contract, under verification. Requires catalog:read. Returns immediately with operationIds. Read bulk.status and bulk.results; a client timeout does not discard work. Fulfillment correlations continue to use commerce.verifyState.
|
|
2092
|
+
*
|
|
2093
|
+
* `POST /api/v1/commerce/state/verify/jobs`
|
|
2094
|
+
*/
|
|
2095
|
+
startVerification(request, requestOptions) {
|
|
2096
|
+
const { ...body } = request ?? {};
|
|
2097
|
+
return this._http.request({
|
|
2098
|
+
method: "POST",
|
|
2099
|
+
path: "/api/v1/commerce/state/verify/jobs",
|
|
2100
|
+
query: void 0,
|
|
2101
|
+
body,
|
|
2102
|
+
...mergeRequestOptions(requestOptions)
|
|
2103
|
+
});
|
|
2104
|
+
}
|
|
1998
2105
|
};
|
|
1999
2106
|
var CompareClient = class {
|
|
2000
2107
|
constructor(_http) {
|
|
@@ -4878,6 +4985,7 @@ var OmniGeneratedClient = class {
|
|
|
4878
4985
|
__publicField(this, "api");
|
|
4879
4986
|
__publicField(this, "brandKits");
|
|
4880
4987
|
__publicField(this, "brandsgateway");
|
|
4988
|
+
__publicField(this, "bulk");
|
|
4881
4989
|
__publicField(this, "campaigns");
|
|
4882
4990
|
__publicField(this, "catalog");
|
|
4883
4991
|
__publicField(this, "checkoutSessions");
|
|
@@ -4918,6 +5026,7 @@ var OmniGeneratedClient = class {
|
|
|
4918
5026
|
this.api = new ApiClient(this._http);
|
|
4919
5027
|
this.brandKits = new BrandKitsClient(this._http);
|
|
4920
5028
|
this.brandsgateway = new BrandsgatewayClient(this._http);
|
|
5029
|
+
this.bulk = new BulkClient(this._http);
|
|
4921
5030
|
this.campaigns = new CampaignsClient(this._http);
|
|
4922
5031
|
this.catalog = new CatalogClient(this._http);
|
|
4923
5032
|
this.checkoutSessions = new CheckoutSessionsClient(this._http);
|