@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 CHANGED
@@ -77,7 +77,7 @@ await client.orders.get(
77
77
 
78
78
  ## Review actions
79
79
 
80
- SDK 0.10.0 removes `reviews.actions`. Read reviews and draft replies through the SDK; review and send replies from the workspace Reviews page.
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.10.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
- * Draft Review Reply
2921
+ * Reply to Reviews
2922
2922
  *
2923
- * Draft a reply with AI from the review, the product, recent replies, and the brand kit. Uses AI credits. Requires `reviews:write`.
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
- Nothing is posted; review and send the draft from the workspace Reviews page.
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/{reviewId}/draft-reply`
2927
+ * `POST /api/v1/reviews/reply`
2928
2928
  */
2929
- draftReply(request, requestOptions) {
2930
- const { reviewId, organizationId, ...body } = request ?? {};
2929
+ reply(request, requestOptions) {
2930
+ const { ...body } = request ?? {};
2931
2931
  return this._http.request({
2932
2932
  method: "POST",
2933
- path: `/api/v1/reviews/${encodePathParam("reviewId", reviewId)}/draft-reply`,
2934
- query: { organizationId },
2933
+ path: "/api/v1/reviews/reply",
2934
+ query: void 0,
2935
2935
  body,
2936
2936
  ...mergeRequestOptions(requestOptions)
2937
2937
  });