@omni-commerce/sdk 0.8.1 → 0.10.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 +28 -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 +87 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +725 -161
- package/dist/index.d.ts +725 -161
- package/dist/index.js +87 -30
- 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.10.0";
|
|
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,
|
|
@@ -2489,7 +2501,7 @@ var ProductsClient = class {
|
|
|
2489
2501
|
### Input options
|
|
2490
2502
|
|
|
2491
2503
|
- Upload a CSV (2 MiB) or JSON products file (8 MiB) using `multipart/form-data`.
|
|
2492
|
-
- Send JSON with a `products` array of 1–
|
|
2504
|
+
- Send JSON with a `products` array of 1–5,000 flat product objects (8 MiB request maximum).
|
|
2493
2505
|
- Send JSON with inline `csvText`.
|
|
2494
2506
|
- Send JSON referencing a stored `documentId`.
|
|
2495
2507
|
|
|
@@ -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
|
*
|
|
@@ -2864,7 +2920,7 @@ var ReviewsClient = class {
|
|
|
2864
2920
|
*
|
|
2865
2921
|
* Draft a reply with AI from the review, the product, recent replies, and the brand kit. Uses AI credits. Requires `reviews:write`.
|
|
2866
2922
|
|
|
2867
|
-
Nothing is posted; send the
|
|
2923
|
+
Nothing is posted; review and send the draft from the workspace Reviews page.
|
|
2868
2924
|
*
|
|
2869
2925
|
* `POST /api/v1/reviews/{reviewId}/draft-reply`
|
|
2870
2926
|
*/
|
|
@@ -2878,25 +2934,6 @@ var ReviewsClient = class {
|
|
|
2878
2934
|
...mergeRequestOptions(requestOptions)
|
|
2879
2935
|
});
|
|
2880
2936
|
}
|
|
2881
|
-
/**
|
|
2882
|
-
* Act on Reviews
|
|
2883
|
-
*
|
|
2884
|
-
* Reply to up to 50 reviews, or send Amazon review requests for solicitation rows. Requires `reviews:write`.
|
|
2885
|
-
|
|
2886
|
-
Each target succeeds or fails on its own; read `data.results`. `ok` is true only when every target succeeds.
|
|
2887
|
-
*
|
|
2888
|
-
* `POST /api/v1/reviews/actions`
|
|
2889
|
-
*/
|
|
2890
|
-
actions(request, requestOptions) {
|
|
2891
|
-
const { ...body } = request ?? {};
|
|
2892
|
-
return this._http.request({
|
|
2893
|
-
method: "POST",
|
|
2894
|
-
path: "/api/v1/reviews/actions",
|
|
2895
|
-
query: void 0,
|
|
2896
|
-
body,
|
|
2897
|
-
...mergeRequestOptions(requestOptions)
|
|
2898
|
-
});
|
|
2899
|
-
}
|
|
2900
2937
|
};
|
|
2901
2938
|
var SearchClient = class {
|
|
2902
2939
|
constructor(_http) {
|
|
@@ -2911,6 +2948,11 @@ var SearchClient = class {
|
|
|
2911
2948
|
*/
|
|
2912
2949
|
list(request = {}, requestOptions) {
|
|
2913
2950
|
const {
|
|
2951
|
+
currency,
|
|
2952
|
+
min_rating,
|
|
2953
|
+
min_review_count,
|
|
2954
|
+
added_after,
|
|
2955
|
+
variant_options,
|
|
2914
2956
|
q,
|
|
2915
2957
|
category,
|
|
2916
2958
|
brand,
|
|
@@ -2930,6 +2972,11 @@ var SearchClient = class {
|
|
|
2930
2972
|
method: "GET",
|
|
2931
2973
|
path: "/api/v1/search",
|
|
2932
2974
|
query: {
|
|
2975
|
+
currency,
|
|
2976
|
+
min_rating,
|
|
2977
|
+
min_review_count,
|
|
2978
|
+
added_after,
|
|
2979
|
+
variant_options,
|
|
2933
2980
|
q,
|
|
2934
2981
|
category,
|
|
2935
2982
|
brand,
|
|
@@ -2958,6 +3005,11 @@ var SearchClient = class {
|
|
|
2958
3005
|
*/
|
|
2959
3006
|
query(request = {}, requestOptions) {
|
|
2960
3007
|
const {
|
|
3008
|
+
currency,
|
|
3009
|
+
min_rating,
|
|
3010
|
+
min_review_count,
|
|
3011
|
+
added_after,
|
|
3012
|
+
variant_options,
|
|
2961
3013
|
q,
|
|
2962
3014
|
category,
|
|
2963
3015
|
brand,
|
|
@@ -2978,6 +3030,11 @@ var SearchClient = class {
|
|
|
2978
3030
|
method: "POST",
|
|
2979
3031
|
path: "/api/v1/search",
|
|
2980
3032
|
query: {
|
|
3033
|
+
currency,
|
|
3034
|
+
min_rating,
|
|
3035
|
+
min_review_count,
|
|
3036
|
+
added_after,
|
|
3037
|
+
variant_options,
|
|
2981
3038
|
q,
|
|
2982
3039
|
category,
|
|
2983
3040
|
brand,
|