@omni-commerce/sdk 0.11.0 → 0.12.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 CHANGED
@@ -77,7 +77,7 @@ await client.orders.get(
77
77
 
78
78
  ## Review actions
79
79
 
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.
80
+ Use `client.reviews.reply({ reviewId, reply })` to submit supplied text. Set `generateWithAi: true` instead of `reply` for an AI-generated response; `submit: false` returns a draft, while `submit: true` sends it. Optional `instructions` guide the AI. The review ID goes in the URL; inspect `data.submitted` for confirmation. 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.11.0";
38
+ var SDK_VERSION = "0.12.0";
39
39
  var SDK_USER_AGENT = `omnicommerce-js/${SDK_VERSION}`;
40
40
 
41
41
  // src/environments.ts
@@ -2918,19 +2918,19 @@ var ReviewsClient = class {
2918
2918
  });
2919
2919
  }
2920
2920
  /**
2921
- * Reply to Reviews
2921
+ * Reply to Review
2922
2922
  *
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.
2923
+ * Reply to one review identified by its OmniCommerce UUID in the URL. Requires `reviews:write`. Supply `reply` or set `generateWithAi: true`. `submit` defaults to true; set false with AI generation to return a draft without posting. Optional `instructions` guide AI writing. AI generation uses organization AI credits.
2924
2924
 
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.
2925
+ Read `data.submitted` for confirmed marketplace submission. Generated text is retained when submission fails. Unsupported marketplaces return their capability limitation. Check review state before retrying an unconfirmed submission. Amazon review requests are separate.
2926
2926
  *
2927
- * `POST /api/v1/reviews/reply`
2927
+ * `POST /api/v1/reviews/{reviewId}/reply`
2928
2928
  */
2929
2929
  reply(request, requestOptions) {
2930
- const { ...body } = request ?? {};
2930
+ const { reviewId, ...body } = request ?? {};
2931
2931
  return this._http.request({
2932
2932
  method: "POST",
2933
- path: "/api/v1/reviews/reply",
2933
+ path: `/api/v1/reviews/${encodePathParam("reviewId", reviewId)}/reply`,
2934
2934
  query: void 0,
2935
2935
  body,
2936
2936
  ...mergeRequestOptions(requestOptions)