@omni-commerce/sdk 0.10.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
- 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({ 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.10.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,20 +2918,20 @@ var ReviewsClient = class {
2918
2918
  });
2919
2919
  }
2920
2920
  /**
2921
- * Draft Review Reply
2921
+ * Reply to Review
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
+ * 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
- Nothing is posted; review and send the draft from the workspace Reviews page.
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/{reviewId}/draft-reply`
2927
+ * `POST /api/v1/reviews/{reviewId}/reply`
2928
2928
  */
2929
- draftReply(request, requestOptions) {
2930
- const { reviewId, organizationId, ...body } = request ?? {};
2929
+ reply(request, requestOptions) {
2930
+ const { reviewId, ...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/${encodePathParam("reviewId", reviewId)}/reply`,
2934
+ query: void 0,
2935
2935
  body,
2936
2936
  ...mergeRequestOptions(requestOptions)
2937
2937
  });