@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 CHANGED
@@ -1,5 +1,7 @@
1
1
  # @omni-commerce/sdk
2
2
 
3
+ SDK 0.21.0 adds server-side `catalog.query`, durable `bulk.start`/`status`/`results`, and asynchronous product verification. See [Catalog operations](https://docs.omnicommerce.sg/sdk/catalog-operations).
4
+
3
5
  SDK 0.20.1 expands batch method documentation with submission limits, concurrency, partial-result handling and job verification guidance. Runtime API contracts are unchanged.
4
6
 
5
7
  SDK 0.20.0 adds headless campaign import, validators, Full sync approval/run, lifecycle batches, and promotion publishing, modification, deletion and delivery checks. See [Campaign automation](https://docs.omnicommerce.sg/guides/campaign-automation). API clients can be explicitly named campaign approvers; browser cookies are unnecessary.
package/dist/index.cjs CHANGED
@@ -35,7 +35,7 @@ function normalizeClientOptions(options = {}) {
35
35
  }
36
36
 
37
37
  // src/version.ts
38
- var SDK_VERSION = "0.20.1";
38
+ var SDK_VERSION = "0.21.0";
39
39
  var SDK_USER_AGENT = `omnicommerce-js/${SDK_VERSION}`;
40
40
 
41
41
  // src/environments.ts
@@ -1480,6 +1480,79 @@ var BrandsgatewayClient = class {
1480
1480
  });
1481
1481
  }
1482
1482
  };
1483
+ var BulkClient = class {
1484
+ constructor(_http) {
1485
+ __publicField(this, "_http", _http);
1486
+ }
1487
+ /**
1488
+ * List Catalog Operations for Session
1489
+ *
1490
+ * Read the latest 20 compact catalog-operation summaries linked to an authorized session. Requires catalog:read; product data scope is rechecked.
1491
+ *
1492
+ * `GET /api/v1/catalog/operations`
1493
+ */
1494
+ listForSession(request, requestOptions) {
1495
+ const { organizationId, sessionId } = request ?? {};
1496
+ return this._http.request({
1497
+ method: "GET",
1498
+ path: "/api/v1/catalog/operations",
1499
+ query: { organizationId, sessionId },
1500
+ body: void 0,
1501
+ ...mergeRequestOptions(requestOptions)
1502
+ });
1503
+ }
1504
+ /**
1505
+ * Start Catalog Operation
1506
+ *
1507
+ * 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.
1508
+ *
1509
+ * `POST /api/v1/catalog/operations`
1510
+ */
1511
+ start(request, requestOptions) {
1512
+ const { ...body } = request ?? {};
1513
+ return this._http.request({
1514
+ method: "POST",
1515
+ path: "/api/v1/catalog/operations",
1516
+ query: void 0,
1517
+ body,
1518
+ ...mergeRequestOptions(requestOptions)
1519
+ });
1520
+ }
1521
+ /**
1522
+ * Get Catalog Operation Results
1523
+ *
1524
+ * 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.
1525
+ *
1526
+ * `POST /api/v1/catalog/operations/results`
1527
+ */
1528
+ results(request, requestOptions) {
1529
+ const { ...body } = request ?? {};
1530
+ return this._http.request({
1531
+ method: "POST",
1532
+ path: "/api/v1/catalog/operations/results",
1533
+ query: void 0,
1534
+ body,
1535
+ ...mergeRequestOptions(requestOptions)
1536
+ });
1537
+ }
1538
+ /**
1539
+ * Get Catalog Operation Status
1540
+ *
1541
+ * 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.
1542
+ *
1543
+ * `POST /api/v1/catalog/operations/status`
1544
+ */
1545
+ status(request, requestOptions) {
1546
+ const { ...body } = request ?? {};
1547
+ return this._http.request({
1548
+ method: "POST",
1549
+ path: "/api/v1/catalog/operations/status",
1550
+ query: void 0,
1551
+ body,
1552
+ ...mergeRequestOptions(requestOptions)
1553
+ });
1554
+ }
1555
+ };
1483
1556
  var CampaignsClient = class {
1484
1557
  constructor(_http) {
1485
1558
  __publicField(this, "_http", _http);
@@ -1835,6 +1908,23 @@ var CatalogClient = class {
1835
1908
  ...mergeRequestOptions(requestOptions)
1836
1909
  });
1837
1910
  }
1911
+ /**
1912
+ * Query Catalog
1913
+ *
1914
+ * 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.
1915
+ *
1916
+ * `POST /api/v1/catalog/query`
1917
+ */
1918
+ query(request, requestOptions) {
1919
+ const { ...body } = request ?? {};
1920
+ return this._http.request({
1921
+ method: "POST",
1922
+ path: "/api/v1/catalog/query",
1923
+ query: void 0,
1924
+ body,
1925
+ ...mergeRequestOptions(requestOptions)
1926
+ });
1927
+ }
1838
1928
  };
1839
1929
  var CheckoutSessionsClient = class {
1840
1930
  constructor(_http) {
@@ -1997,6 +2087,23 @@ var CommerceClient = class {
1997
2087
  ...mergeRequestOptions(requestOptions)
1998
2088
  });
1999
2089
  }
2090
+ /**
2091
+ * Start Commerce Verification
2092
+ *
2093
+ * 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.
2094
+ *
2095
+ * `POST /api/v1/commerce/state/verify/jobs`
2096
+ */
2097
+ startVerification(request, requestOptions) {
2098
+ const { ...body } = request ?? {};
2099
+ return this._http.request({
2100
+ method: "POST",
2101
+ path: "/api/v1/commerce/state/verify/jobs",
2102
+ query: void 0,
2103
+ body,
2104
+ ...mergeRequestOptions(requestOptions)
2105
+ });
2106
+ }
2000
2107
  };
2001
2108
  var CompareClient = class {
2002
2109
  constructor(_http) {
@@ -4880,6 +4987,7 @@ var OmniGeneratedClient = class {
4880
4987
  __publicField(this, "api");
4881
4988
  __publicField(this, "brandKits");
4882
4989
  __publicField(this, "brandsgateway");
4990
+ __publicField(this, "bulk");
4883
4991
  __publicField(this, "campaigns");
4884
4992
  __publicField(this, "catalog");
4885
4993
  __publicField(this, "checkoutSessions");
@@ -4920,6 +5028,7 @@ var OmniGeneratedClient = class {
4920
5028
  this.api = new ApiClient(this._http);
4921
5029
  this.brandKits = new BrandKitsClient(this._http);
4922
5030
  this.brandsgateway = new BrandsgatewayClient(this._http);
5031
+ this.bulk = new BulkClient(this._http);
4923
5032
  this.campaigns = new CampaignsClient(this._http);
4924
5033
  this.catalog = new CatalogClient(this._http);
4925
5034
  this.checkoutSessions = new CheckoutSessionsClient(this._http);