@omni-commerce/sdk 0.8.1 → 0.9.2
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 +24 -1
- package/dist/embed.cjs +419 -140
- package/dist/embed.cjs.map +1 -1
- package/dist/embed.d.cts +37 -4
- package/dist/embed.d.ts +37 -4
- package/dist/embed.global.js +58 -16
- package/dist/embed.global.js.map +1 -1
- package/dist/embed.js +416 -141
- package/dist/embed.js.map +1 -1
- package/dist/index.cjs +85 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19168 -20085
- package/dist/index.d.ts +19168 -20085
- package/dist/index.js +85 -9
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +373 -74
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +13 -4
- package/dist/react.d.ts +13 -4
- package/dist/react.js +380 -75
- package/dist/react.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.9.2";
|
|
37
37
|
var SDK_USER_AGENT = `omnicommerce-js/${SDK_VERSION}`;
|
|
38
38
|
|
|
39
39
|
// src/environments.ts
|
|
@@ -1145,11 +1145,11 @@ var CampaignsClient = class {
|
|
|
1145
1145
|
* `GET /api/v1/campaigns`
|
|
1146
1146
|
*/
|
|
1147
1147
|
list(request = {}, requestOptions) {
|
|
1148
|
-
const { organizationId, q, stage, offset, limit } = request ?? {};
|
|
1148
|
+
const { organizationId, q, stage, offset, limit, sortBy, sortDir } = request ?? {};
|
|
1149
1149
|
return this._http.request({
|
|
1150
1150
|
method: "GET",
|
|
1151
1151
|
path: "/api/v1/campaigns",
|
|
1152
|
-
query: { organizationId, q, stage, offset, limit },
|
|
1152
|
+
query: { organizationId, q, stage, offset, limit, sortBy, sortDir },
|
|
1153
1153
|
body: void 0,
|
|
1154
1154
|
...mergeRequestOptions(requestOptions)
|
|
1155
1155
|
});
|
|
@@ -1560,12 +1560,14 @@ var JobsClient = class {
|
|
|
1560
1560
|
__publicField(this, "_http", _http);
|
|
1561
1561
|
}
|
|
1562
1562
|
/**
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1563
|
+
* Get Developer Job Status
|
|
1564
|
+
*
|
|
1565
|
+
* Fetch shared async status for developer-platform operations, including product workflow jobs, bulk CSV import jobs, Look generation jobs, import jobs, enrichment jobs, price comparison jobs, and sync jobs.
|
|
1566
|
+
|
|
1567
|
+
Price comparison jobs expose partial progress in data.results and their final batch result in data.result; completed means processing finished, so inspect data.result.success for comparison failures.
|
|
1568
|
+
*
|
|
1569
|
+
* `GET /api/v1/jobs/{jobId}`
|
|
1570
|
+
*/
|
|
1569
1571
|
get(request, requestOptions) {
|
|
1570
1572
|
const { jobId, organizationId } = request ?? {};
|
|
1571
1573
|
return this._http.request({
|
|
@@ -1736,6 +1738,11 @@ var MerchantsClient = class {
|
|
|
1736
1738
|
search(request, requestOptions) {
|
|
1737
1739
|
const {
|
|
1738
1740
|
merchantId,
|
|
1741
|
+
currency,
|
|
1742
|
+
min_rating,
|
|
1743
|
+
min_review_count,
|
|
1744
|
+
added_after,
|
|
1745
|
+
variant_options,
|
|
1739
1746
|
q,
|
|
1740
1747
|
category,
|
|
1741
1748
|
brand,
|
|
@@ -1754,6 +1761,11 @@ var MerchantsClient = class {
|
|
|
1754
1761
|
method: "GET",
|
|
1755
1762
|
path: `/api/v1/merchants/${encodePathParam("merchantId", merchantId)}/search`,
|
|
1756
1763
|
query: {
|
|
1764
|
+
currency,
|
|
1765
|
+
min_rating,
|
|
1766
|
+
min_review_count,
|
|
1767
|
+
added_after,
|
|
1768
|
+
variant_options,
|
|
1757
1769
|
q,
|
|
1758
1770
|
category,
|
|
1759
1771
|
brand,
|
|
@@ -2511,6 +2523,50 @@ var ProductsClient = class {
|
|
|
2511
2523
|
...mergeRequestOptions(requestOptions)
|
|
2512
2524
|
});
|
|
2513
2525
|
}
|
|
2526
|
+
/**
|
|
2527
|
+
* Compare Product Market Prices
|
|
2528
|
+
*
|
|
2529
|
+
* Research market offers for a batch of OmniCommerce simple product or variant UUIDs using the same BigGo API and Serper Shopping fallback as pricing strategy. Read-only; no prices are changed.
|
|
2530
|
+
|
|
2531
|
+
### Authorization
|
|
2532
|
+
|
|
2533
|
+
Requires catalog:read. API keys resolve organizationId from the credential; session callers must provide an authorized organizationId.
|
|
2534
|
+
|
|
2535
|
+
### Durable batches
|
|
2536
|
+
|
|
2537
|
+
Accepts 1–50 input entries, trimmed and deduplicated in first-requested order. Returns HTTP 202 and a durable jobId. Retrieve progress and results from GET /api/v1/products/compare-prices/jobs/{jobId} or await jobs.wait in the SDK with a suitable timeout. A client timeout does not cancel the job. Use variant IDs for products with variants. Each listing market has its own durable search step; searches use bounded concurrency and
|
|
2538
|
+
*
|
|
2539
|
+
* `POST /api/v1/products/compare-prices`
|
|
2540
|
+
*/
|
|
2541
|
+
comparePrices(request, requestOptions) {
|
|
2542
|
+
const { ...body } = request ?? {};
|
|
2543
|
+
return this._http.request({
|
|
2544
|
+
method: "POST",
|
|
2545
|
+
path: "/api/v1/products/compare-prices",
|
|
2546
|
+
query: void 0,
|
|
2547
|
+
body,
|
|
2548
|
+
...mergeRequestOptions(requestOptions)
|
|
2549
|
+
});
|
|
2550
|
+
}
|
|
2551
|
+
/**
|
|
2552
|
+
* Get Product Price Comparison
|
|
2553
|
+
*
|
|
2554
|
+
* Read durable batch progress and ordered per-product results. Requires catalog:read and the job's organization.
|
|
2555
|
+
|
|
2556
|
+
completed means every target was processed; inspect result.success, succeededCount, failedCount, and each result for partial failures. Session callers must supply organizationId.
|
|
2557
|
+
*
|
|
2558
|
+
* `GET /api/v1/products/compare-prices/jobs/{jobId}`
|
|
2559
|
+
*/
|
|
2560
|
+
getPriceComparison(request, requestOptions) {
|
|
2561
|
+
const { jobId, organizationId } = request ?? {};
|
|
2562
|
+
return this._http.request({
|
|
2563
|
+
method: "GET",
|
|
2564
|
+
path: `/api/v1/products/compare-prices/jobs/${encodePathParam("jobId", jobId)}`,
|
|
2565
|
+
query: { organizationId },
|
|
2566
|
+
body: void 0,
|
|
2567
|
+
...mergeRequestOptions(requestOptions)
|
|
2568
|
+
});
|
|
2569
|
+
}
|
|
2514
2570
|
/**
|
|
2515
2571
|
* Batch Update Product Cost
|
|
2516
2572
|
*
|
|
@@ -2911,6 +2967,11 @@ var SearchClient = class {
|
|
|
2911
2967
|
*/
|
|
2912
2968
|
list(request = {}, requestOptions) {
|
|
2913
2969
|
const {
|
|
2970
|
+
currency,
|
|
2971
|
+
min_rating,
|
|
2972
|
+
min_review_count,
|
|
2973
|
+
added_after,
|
|
2974
|
+
variant_options,
|
|
2914
2975
|
q,
|
|
2915
2976
|
category,
|
|
2916
2977
|
brand,
|
|
@@ -2930,6 +2991,11 @@ var SearchClient = class {
|
|
|
2930
2991
|
method: "GET",
|
|
2931
2992
|
path: "/api/v1/search",
|
|
2932
2993
|
query: {
|
|
2994
|
+
currency,
|
|
2995
|
+
min_rating,
|
|
2996
|
+
min_review_count,
|
|
2997
|
+
added_after,
|
|
2998
|
+
variant_options,
|
|
2933
2999
|
q,
|
|
2934
3000
|
category,
|
|
2935
3001
|
brand,
|
|
@@ -2958,6 +3024,11 @@ var SearchClient = class {
|
|
|
2958
3024
|
*/
|
|
2959
3025
|
query(request = {}, requestOptions) {
|
|
2960
3026
|
const {
|
|
3027
|
+
currency,
|
|
3028
|
+
min_rating,
|
|
3029
|
+
min_review_count,
|
|
3030
|
+
added_after,
|
|
3031
|
+
variant_options,
|
|
2961
3032
|
q,
|
|
2962
3033
|
category,
|
|
2963
3034
|
brand,
|
|
@@ -2978,6 +3049,11 @@ var SearchClient = class {
|
|
|
2978
3049
|
method: "POST",
|
|
2979
3050
|
path: "/api/v1/search",
|
|
2980
3051
|
query: {
|
|
3052
|
+
currency,
|
|
3053
|
+
min_rating,
|
|
3054
|
+
min_review_count,
|
|
3055
|
+
added_after,
|
|
3056
|
+
variant_options,
|
|
2981
3057
|
q,
|
|
2982
3058
|
category,
|
|
2983
3059
|
brand,
|