@omni-commerce/sdk 0.10.0 → 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 +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +54 -37
- package/dist/index.d.ts +54 -37
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -77,7 +77,7 @@ await client.orders.get(
|
|
|
77
77
|
|
|
78
78
|
## Review actions
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
Use `client.reviews.reply({ reviewIds, reply })` to submit supplied text. Set `generateWithAi: true` instead of `reply` for an AI-generated response; `submit: false` returns drafts, while `submit: true` sends them. Optional `instructions` guide the AI. Inspect each result's `submitted` flag. The separate `draftReply` and `actions` methods are removed.
|
|
81
81
|
|
|
82
82
|
## Batch market price comparison
|
|
83
83
|
|
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.
|
|
38
|
+
var SDK_VERSION = "0.11.0";
|
|
39
39
|
var SDK_USER_AGENT = `omnicommerce-js/${SDK_VERSION}`;
|
|
40
40
|
|
|
41
41
|
// src/environments.ts
|
|
@@ -2918,20 +2918,20 @@ var ReviewsClient = class {
|
|
|
2918
2918
|
});
|
|
2919
2919
|
}
|
|
2920
2920
|
/**
|
|
2921
|
-
*
|
|
2921
|
+
* Reply to Reviews
|
|
2922
2922
|
*
|
|
2923
|
-
*
|
|
2923
|
+
* 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.
|
|
2924
2924
|
|
|
2925
|
-
|
|
2925
|
+
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.
|
|
2926
2926
|
*
|
|
2927
|
-
* `POST /api/v1/reviews/
|
|
2927
|
+
* `POST /api/v1/reviews/reply`
|
|
2928
2928
|
*/
|
|
2929
|
-
|
|
2930
|
-
const {
|
|
2929
|
+
reply(request, requestOptions) {
|
|
2930
|
+
const { ...body } = request ?? {};
|
|
2931
2931
|
return this._http.request({
|
|
2932
2932
|
method: "POST",
|
|
2933
|
-
path:
|
|
2934
|
-
query:
|
|
2933
|
+
path: "/api/v1/reviews/reply",
|
|
2934
|
+
query: void 0,
|
|
2935
2935
|
body,
|
|
2936
2936
|
...mergeRequestOptions(requestOptions)
|
|
2937
2937
|
});
|