@omni-commerce/sdk 0.9.2 → 0.11.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 +8 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20655 -19157
- package/dist/index.d.ts +20655 -19157
- package/dist/index.js +8 -27
- 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.11.0";
|
|
37
37
|
var SDK_USER_AGENT = `omnicommerce-js/${SDK_VERSION}`;
|
|
38
38
|
|
|
39
39
|
// src/environments.ts
|
|
@@ -2501,7 +2501,7 @@ var ProductsClient = class {
|
|
|
2501
2501
|
### Input options
|
|
2502
2502
|
|
|
2503
2503
|
- Upload a CSV (2 MiB) or JSON products file (8 MiB) using `multipart/form-data`.
|
|
2504
|
-
- 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).
|
|
2505
2505
|
- Send JSON with inline `csvText`.
|
|
2506
2506
|
- Send JSON referencing a stored `documentId`.
|
|
2507
2507
|
|
|
@@ -2916,38 +2916,19 @@ var ReviewsClient = class {
|
|
|
2916
2916
|
});
|
|
2917
2917
|
}
|
|
2918
2918
|
/**
|
|
2919
|
-
*
|
|
2919
|
+
* Reply to Reviews
|
|
2920
2920
|
*
|
|
2921
|
-
*
|
|
2921
|
+
* Submit supplied seller reply text, or generate per-review replies with AI. Requires `reviews:write`. Pass 1–50 `reviewIds` with either `reply` or `generateWithAi: true`. `submit` defaults to true; set false with AI generation to return drafts only. Optional `instructions` guide AI writing. AI generation uses organization AI credits.
|
|
2922
2922
|
|
|
2923
|
-
|
|
2923
|
+
Read `data.results[].submitted` for confirmed marketplace submissions and `submittedCount` for the total. Partial failures remain explicit, with generated text retained when submission fails. Unsupported marketplaces return their capability limitation. Duplicate IDs are processed once in first-requested order. Amazon review requests are separate. Check review state before retrying an unconfirmed submission.
|
|
2924
2924
|
*
|
|
2925
|
-
* `POST /api/v1/reviews/
|
|
2925
|
+
* `POST /api/v1/reviews/reply`
|
|
2926
2926
|
*/
|
|
2927
|
-
|
|
2928
|
-
const { reviewId, organizationId, ...body } = request ?? {};
|
|
2929
|
-
return this._http.request({
|
|
2930
|
-
method: "POST",
|
|
2931
|
-
path: `/api/v1/reviews/${encodePathParam("reviewId", reviewId)}/draft-reply`,
|
|
2932
|
-
query: { organizationId },
|
|
2933
|
-
body,
|
|
2934
|
-
...mergeRequestOptions(requestOptions)
|
|
2935
|
-
});
|
|
2936
|
-
}
|
|
2937
|
-
/**
|
|
2938
|
-
* Act on Reviews
|
|
2939
|
-
*
|
|
2940
|
-
* Reply to up to 50 reviews, or send Amazon review requests for solicitation rows. Requires `reviews:write`.
|
|
2941
|
-
|
|
2942
|
-
Each target succeeds or fails on its own; read `data.results`. `ok` is true only when every target succeeds.
|
|
2943
|
-
*
|
|
2944
|
-
* `POST /api/v1/reviews/actions`
|
|
2945
|
-
*/
|
|
2946
|
-
actions(request, requestOptions) {
|
|
2927
|
+
reply(request, requestOptions) {
|
|
2947
2928
|
const { ...body } = request ?? {};
|
|
2948
2929
|
return this._http.request({
|
|
2949
2930
|
method: "POST",
|
|
2950
|
-
path: "/api/v1/reviews/
|
|
2931
|
+
path: "/api/v1/reviews/reply",
|
|
2951
2932
|
query: void 0,
|
|
2952
2933
|
body,
|
|
2953
2934
|
...mergeRequestOptions(requestOptions)
|