@omni-commerce/sdk 0.20.0 → 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 +4 -0
- package/dist/index.cjs +146 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +973 -46
- package/dist/index.d.ts +973 -46
- package/dist/index.js +146 -4
- 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) {
|
|
@@ -3509,7 +3616,18 @@ var ProductsClient = class {
|
|
|
3509
3616
|
options
|
|
3510
3617
|
);
|
|
3511
3618
|
}
|
|
3512
|
-
/**
|
|
3619
|
+
/**
|
|
3620
|
+
* Publish saved products; updateFields limits writes to selected fields on existing listings.
|
|
3621
|
+
* Accepts 1–100 entries; concurrency is 1–10 (default 3).
|
|
3622
|
+
* productIds are trimmed and deduplicated in first-requested order.
|
|
3623
|
+
* Omit marketplaces for all eligible marketplaces, or preserve the requested targets.
|
|
3624
|
+
* Returns success, productIds, succeededCount, failedCount, ordered results and jobIds.
|
|
3625
|
+
* Results retain each response/error, even for partial failures. Success means submitted,
|
|
3626
|
+
* not marketplace-verified. Preserve typed correlations from the responses for commerce.awaitJobs.
|
|
3627
|
+
* These client-side requests are not atomic or a durable server batch. Keep this process
|
|
3628
|
+
* alive during submission and persist receipts before the next chunk. Request options
|
|
3629
|
+
* apply per product, not to the entire batch. An abortSignal stops unstarted submissions.
|
|
3630
|
+
*/
|
|
3513
3631
|
batchPublish(request, options) {
|
|
3514
3632
|
return batchPublishProducts(
|
|
3515
3633
|
(item, requestOptions) => this.publish(item, requestOptions),
|
|
@@ -3517,7 +3635,18 @@ var ProductsClient = class {
|
|
|
3517
3635
|
options
|
|
3518
3636
|
);
|
|
3519
3637
|
}
|
|
3520
|
-
/**
|
|
3638
|
+
/**
|
|
3639
|
+
* Delist products using their eligible or explicitly selected marketplaces.
|
|
3640
|
+
* Accepts 1–100 entries; concurrency is 1–10 (default 3).
|
|
3641
|
+
* productIds are trimmed and deduplicated in first-requested order.
|
|
3642
|
+
* Omit marketplaces for all eligible marketplaces, or preserve the requested targets.
|
|
3643
|
+
* Returns success, productIds, succeededCount, failedCount, ordered results and jobIds.
|
|
3644
|
+
* Results retain each response/error, even for partial failures. Success means submitted,
|
|
3645
|
+
* not marketplace-verified. Preserve typed correlations from the responses for commerce.awaitJobs.
|
|
3646
|
+
* These client-side requests are not atomic or a durable server batch. Keep this process
|
|
3647
|
+
* alive during submission and persist receipts before the next chunk. Request options
|
|
3648
|
+
* apply per product, not to the entire batch. An abortSignal stops unstarted submissions.
|
|
3649
|
+
*/
|
|
3521
3650
|
batchDelist(request, options) {
|
|
3522
3651
|
return batchDelistProducts(
|
|
3523
3652
|
(item, requestOptions) => this.delist(item, requestOptions),
|
|
@@ -3525,7 +3654,18 @@ var ProductsClient = class {
|
|
|
3525
3654
|
options
|
|
3526
3655
|
);
|
|
3527
3656
|
}
|
|
3528
|
-
/**
|
|
3657
|
+
/**
|
|
3658
|
+
* Save per-product catalog edits; publish saved fields separately when requested.
|
|
3659
|
+
* Accepts 1–100 entries; concurrency is 1–10 (default 3).
|
|
3660
|
+
* Each update uses productId and normal update fields; duplicate IDs are rejected.
|
|
3661
|
+
* Submit price/currency changes separately from other product fields.
|
|
3662
|
+
* Returns success, productIds, succeededCount, failedCount, ordered results and jobIds.
|
|
3663
|
+
* Results retain each response/error, even for partial failures. Success means submitted,
|
|
3664
|
+
* not marketplace-verified. Preserve typed correlations from the responses for commerce.awaitJobs.
|
|
3665
|
+
* These client-side requests are not atomic or a durable server batch. Keep this process
|
|
3666
|
+
* alive during submission and persist receipts before the next chunk. Request options
|
|
3667
|
+
* apply per product, not to the entire batch. An abortSignal stops unstarted submissions.
|
|
3668
|
+
*/
|
|
3529
3669
|
batchUpdate(request, options) {
|
|
3530
3670
|
return batchUpdateProducts(
|
|
3531
3671
|
(item, requestOptions) => this.update(item, requestOptions),
|
|
@@ -4845,6 +4985,7 @@ var OmniGeneratedClient = class {
|
|
|
4845
4985
|
__publicField(this, "api");
|
|
4846
4986
|
__publicField(this, "brandKits");
|
|
4847
4987
|
__publicField(this, "brandsgateway");
|
|
4988
|
+
__publicField(this, "bulk");
|
|
4848
4989
|
__publicField(this, "campaigns");
|
|
4849
4990
|
__publicField(this, "catalog");
|
|
4850
4991
|
__publicField(this, "checkoutSessions");
|
|
@@ -4885,6 +5026,7 @@ var OmniGeneratedClient = class {
|
|
|
4885
5026
|
this.api = new ApiClient(this._http);
|
|
4886
5027
|
this.brandKits = new BrandKitsClient(this._http);
|
|
4887
5028
|
this.brandsgateway = new BrandsgatewayClient(this._http);
|
|
5029
|
+
this.bulk = new BulkClient(this._http);
|
|
4888
5030
|
this.campaigns = new CampaignsClient(this._http);
|
|
4889
5031
|
this.catalog = new CatalogClient(this._http);
|
|
4890
5032
|
this.checkoutSessions = new CheckoutSessionsClient(this._http);
|