@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 +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +44 -34
- package/dist/index.d.ts +44 -34
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2082,7 +2082,7 @@ interface paths {
|
|
|
2082
2082
|
patch?: never;
|
|
2083
2083
|
trace?: never;
|
|
2084
2084
|
};
|
|
2085
|
-
"/api/v1/reviews/{reviewId}/
|
|
2085
|
+
"/api/v1/reviews/{reviewId}/reply": {
|
|
2086
2086
|
parameters: {
|
|
2087
2087
|
query?: never;
|
|
2088
2088
|
header?: never;
|
|
@@ -2092,12 +2092,12 @@ interface paths {
|
|
|
2092
2092
|
get?: never;
|
|
2093
2093
|
put?: never;
|
|
2094
2094
|
/**
|
|
2095
|
-
*
|
|
2096
|
-
* @description
|
|
2095
|
+
* Reply to Review
|
|
2096
|
+
* @description 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.
|
|
2097
2097
|
*
|
|
2098
|
-
*
|
|
2098
|
+
* 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.
|
|
2099
2099
|
*/
|
|
2100
|
-
post: operations["
|
|
2100
|
+
post: operations["post_v1_reviews_by_reviewid_reply"];
|
|
2101
2101
|
delete?: never;
|
|
2102
2102
|
options?: never;
|
|
2103
2103
|
head?: never;
|
|
@@ -18057,21 +18057,39 @@ interface operations {
|
|
|
18057
18057
|
};
|
|
18058
18058
|
};
|
|
18059
18059
|
};
|
|
18060
|
-
|
|
18060
|
+
post_v1_reviews_by_reviewid_reply: {
|
|
18061
18061
|
parameters: {
|
|
18062
|
-
query?:
|
|
18063
|
-
/** @description Required for session auth. API keys already belong to one organization. */
|
|
18064
|
-
organizationId?: string;
|
|
18065
|
-
};
|
|
18062
|
+
query?: never;
|
|
18066
18063
|
header?: never;
|
|
18067
18064
|
path: {
|
|
18068
18065
|
reviewId: string;
|
|
18069
18066
|
};
|
|
18070
18067
|
cookie?: never;
|
|
18071
18068
|
};
|
|
18072
|
-
requestBody
|
|
18069
|
+
requestBody: {
|
|
18070
|
+
content: {
|
|
18071
|
+
"application/json": {
|
|
18072
|
+
/** @description Seller reply to send to this review. Omit when generateWithAi is true. */
|
|
18073
|
+
reply?: string;
|
|
18074
|
+
/**
|
|
18075
|
+
* @description Generate a reply using the review context and organization brand voice. Uses AI credits.
|
|
18076
|
+
* @default false
|
|
18077
|
+
*/
|
|
18078
|
+
generateWithAi?: boolean;
|
|
18079
|
+
/**
|
|
18080
|
+
* @description true submits the reply to the marketplace. With generateWithAi, false returns a draft without submitting.
|
|
18081
|
+
* @default true
|
|
18082
|
+
*/
|
|
18083
|
+
submit?: boolean;
|
|
18084
|
+
/** @description Optional writing instructions for AI-generated replies. Requires generateWithAi. */
|
|
18085
|
+
instructions?: string;
|
|
18086
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
18087
|
+
organizationId?: string;
|
|
18088
|
+
};
|
|
18089
|
+
};
|
|
18090
|
+
};
|
|
18073
18091
|
responses: {
|
|
18074
|
-
/** @description The
|
|
18092
|
+
/** @description The reply or draft result for this review. */
|
|
18075
18093
|
200: {
|
|
18076
18094
|
headers: {
|
|
18077
18095
|
[name: string]: unknown;
|
|
@@ -18092,8 +18110,14 @@ interface operations {
|
|
|
18092
18110
|
[key: string]: string;
|
|
18093
18111
|
};
|
|
18094
18112
|
data: {
|
|
18095
|
-
|
|
18096
|
-
|
|
18113
|
+
success: boolean;
|
|
18114
|
+
reviewId: string;
|
|
18115
|
+
/** @description True only when the marketplace reply service confirms success. False for a draft or unconfirmed submission. */
|
|
18116
|
+
submitted: boolean;
|
|
18117
|
+
reply?: string;
|
|
18118
|
+
model?: string;
|
|
18119
|
+
error?: string;
|
|
18120
|
+
sellerCenterUrl?: string;
|
|
18097
18121
|
};
|
|
18098
18122
|
};
|
|
18099
18123
|
};
|
|
@@ -18119,13 +18143,6 @@ interface operations {
|
|
|
18119
18143
|
};
|
|
18120
18144
|
content?: never;
|
|
18121
18145
|
};
|
|
18122
|
-
/** @description Review not found */
|
|
18123
|
-
404: {
|
|
18124
|
-
headers: {
|
|
18125
|
-
[name: string]: unknown;
|
|
18126
|
-
};
|
|
18127
|
-
content?: never;
|
|
18128
|
-
};
|
|
18129
18146
|
/** @description Rate limit exceeded */
|
|
18130
18147
|
429: {
|
|
18131
18148
|
headers: {
|
|
@@ -18140,13 +18157,6 @@ interface operations {
|
|
|
18140
18157
|
};
|
|
18141
18158
|
content?: never;
|
|
18142
18159
|
};
|
|
18143
|
-
/** @description The AI draft failed */
|
|
18144
|
-
502: {
|
|
18145
|
-
headers: {
|
|
18146
|
-
[name: string]: unknown;
|
|
18147
|
-
};
|
|
18148
|
-
content?: never;
|
|
18149
|
-
};
|
|
18150
18160
|
};
|
|
18151
18161
|
};
|
|
18152
18162
|
get_v1_search: {
|
|
@@ -22243,15 +22253,15 @@ declare class ReviewsClient {
|
|
|
22243
22253
|
*/
|
|
22244
22254
|
get(request: OperationPath<operations["get_v1_reviews_by_reviewid"]> & OperationQuery<operations["get_v1_reviews_by_reviewid"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_reviews_by_reviewid"]>>;
|
|
22245
22255
|
/**
|
|
22246
|
-
*
|
|
22256
|
+
* Reply to Review
|
|
22247
22257
|
*
|
|
22248
|
-
*
|
|
22258
|
+
* 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.
|
|
22249
22259
|
|
|
22250
|
-
|
|
22260
|
+
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.
|
|
22251
22261
|
*
|
|
22252
|
-
* `POST /api/v1/reviews/{reviewId}/
|
|
22262
|
+
* `POST /api/v1/reviews/{reviewId}/reply`
|
|
22253
22263
|
*/
|
|
22254
|
-
|
|
22264
|
+
reply(request: OperationPath<operations["post_v1_reviews_by_reviewid_reply"]> & OperationBody<operations["post_v1_reviews_by_reviewid_reply"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_reviews_by_reviewid_reply"]>>;
|
|
22255
22265
|
}
|
|
22256
22266
|
declare class SearchClient {
|
|
22257
22267
|
protected readonly _http: OmniHttp;
|
|
@@ -22591,7 +22601,7 @@ declare function constructEvent(payload: string | Uint8Array, headers: WebhookHe
|
|
|
22591
22601
|
toleranceInSeconds?: number;
|
|
22592
22602
|
}): Promise<ConstructedWebhookEvent>;
|
|
22593
22603
|
|
|
22594
|
-
declare const SDK_VERSION = "0.
|
|
22604
|
+
declare const SDK_VERSION = "0.12.0";
|
|
22595
22605
|
|
|
22596
22606
|
type ProductCreatedWebhookEvent = components["schemas"]["ProductCreatedWebhookEvent"];
|
|
22597
22607
|
type ProductUpdatedWebhookEvent = components["schemas"]["ProductUpdatedWebhookEvent"];
|
package/dist/index.d.ts
CHANGED
|
@@ -2082,7 +2082,7 @@ interface paths {
|
|
|
2082
2082
|
patch?: never;
|
|
2083
2083
|
trace?: never;
|
|
2084
2084
|
};
|
|
2085
|
-
"/api/v1/reviews/{reviewId}/
|
|
2085
|
+
"/api/v1/reviews/{reviewId}/reply": {
|
|
2086
2086
|
parameters: {
|
|
2087
2087
|
query?: never;
|
|
2088
2088
|
header?: never;
|
|
@@ -2092,12 +2092,12 @@ interface paths {
|
|
|
2092
2092
|
get?: never;
|
|
2093
2093
|
put?: never;
|
|
2094
2094
|
/**
|
|
2095
|
-
*
|
|
2096
|
-
* @description
|
|
2095
|
+
* Reply to Review
|
|
2096
|
+
* @description 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.
|
|
2097
2097
|
*
|
|
2098
|
-
*
|
|
2098
|
+
* 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.
|
|
2099
2099
|
*/
|
|
2100
|
-
post: operations["
|
|
2100
|
+
post: operations["post_v1_reviews_by_reviewid_reply"];
|
|
2101
2101
|
delete?: never;
|
|
2102
2102
|
options?: never;
|
|
2103
2103
|
head?: never;
|
|
@@ -18057,21 +18057,39 @@ interface operations {
|
|
|
18057
18057
|
};
|
|
18058
18058
|
};
|
|
18059
18059
|
};
|
|
18060
|
-
|
|
18060
|
+
post_v1_reviews_by_reviewid_reply: {
|
|
18061
18061
|
parameters: {
|
|
18062
|
-
query?:
|
|
18063
|
-
/** @description Required for session auth. API keys already belong to one organization. */
|
|
18064
|
-
organizationId?: string;
|
|
18065
|
-
};
|
|
18062
|
+
query?: never;
|
|
18066
18063
|
header?: never;
|
|
18067
18064
|
path: {
|
|
18068
18065
|
reviewId: string;
|
|
18069
18066
|
};
|
|
18070
18067
|
cookie?: never;
|
|
18071
18068
|
};
|
|
18072
|
-
requestBody
|
|
18069
|
+
requestBody: {
|
|
18070
|
+
content: {
|
|
18071
|
+
"application/json": {
|
|
18072
|
+
/** @description Seller reply to send to this review. Omit when generateWithAi is true. */
|
|
18073
|
+
reply?: string;
|
|
18074
|
+
/**
|
|
18075
|
+
* @description Generate a reply using the review context and organization brand voice. Uses AI credits.
|
|
18076
|
+
* @default false
|
|
18077
|
+
*/
|
|
18078
|
+
generateWithAi?: boolean;
|
|
18079
|
+
/**
|
|
18080
|
+
* @description true submits the reply to the marketplace. With generateWithAi, false returns a draft without submitting.
|
|
18081
|
+
* @default true
|
|
18082
|
+
*/
|
|
18083
|
+
submit?: boolean;
|
|
18084
|
+
/** @description Optional writing instructions for AI-generated replies. Requires generateWithAi. */
|
|
18085
|
+
instructions?: string;
|
|
18086
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
18087
|
+
organizationId?: string;
|
|
18088
|
+
};
|
|
18089
|
+
};
|
|
18090
|
+
};
|
|
18073
18091
|
responses: {
|
|
18074
|
-
/** @description The
|
|
18092
|
+
/** @description The reply or draft result for this review. */
|
|
18075
18093
|
200: {
|
|
18076
18094
|
headers: {
|
|
18077
18095
|
[name: string]: unknown;
|
|
@@ -18092,8 +18110,14 @@ interface operations {
|
|
|
18092
18110
|
[key: string]: string;
|
|
18093
18111
|
};
|
|
18094
18112
|
data: {
|
|
18095
|
-
|
|
18096
|
-
|
|
18113
|
+
success: boolean;
|
|
18114
|
+
reviewId: string;
|
|
18115
|
+
/** @description True only when the marketplace reply service confirms success. False for a draft or unconfirmed submission. */
|
|
18116
|
+
submitted: boolean;
|
|
18117
|
+
reply?: string;
|
|
18118
|
+
model?: string;
|
|
18119
|
+
error?: string;
|
|
18120
|
+
sellerCenterUrl?: string;
|
|
18097
18121
|
};
|
|
18098
18122
|
};
|
|
18099
18123
|
};
|
|
@@ -18119,13 +18143,6 @@ interface operations {
|
|
|
18119
18143
|
};
|
|
18120
18144
|
content?: never;
|
|
18121
18145
|
};
|
|
18122
|
-
/** @description Review not found */
|
|
18123
|
-
404: {
|
|
18124
|
-
headers: {
|
|
18125
|
-
[name: string]: unknown;
|
|
18126
|
-
};
|
|
18127
|
-
content?: never;
|
|
18128
|
-
};
|
|
18129
18146
|
/** @description Rate limit exceeded */
|
|
18130
18147
|
429: {
|
|
18131
18148
|
headers: {
|
|
@@ -18140,13 +18157,6 @@ interface operations {
|
|
|
18140
18157
|
};
|
|
18141
18158
|
content?: never;
|
|
18142
18159
|
};
|
|
18143
|
-
/** @description The AI draft failed */
|
|
18144
|
-
502: {
|
|
18145
|
-
headers: {
|
|
18146
|
-
[name: string]: unknown;
|
|
18147
|
-
};
|
|
18148
|
-
content?: never;
|
|
18149
|
-
};
|
|
18150
18160
|
};
|
|
18151
18161
|
};
|
|
18152
18162
|
get_v1_search: {
|
|
@@ -22243,15 +22253,15 @@ declare class ReviewsClient {
|
|
|
22243
22253
|
*/
|
|
22244
22254
|
get(request: OperationPath<operations["get_v1_reviews_by_reviewid"]> & OperationQuery<operations["get_v1_reviews_by_reviewid"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_reviews_by_reviewid"]>>;
|
|
22245
22255
|
/**
|
|
22246
|
-
*
|
|
22256
|
+
* Reply to Review
|
|
22247
22257
|
*
|
|
22248
|
-
*
|
|
22258
|
+
* 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.
|
|
22249
22259
|
|
|
22250
|
-
|
|
22260
|
+
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.
|
|
22251
22261
|
*
|
|
22252
|
-
* `POST /api/v1/reviews/{reviewId}/
|
|
22262
|
+
* `POST /api/v1/reviews/{reviewId}/reply`
|
|
22253
22263
|
*/
|
|
22254
|
-
|
|
22264
|
+
reply(request: OperationPath<operations["post_v1_reviews_by_reviewid_reply"]> & OperationBody<operations["post_v1_reviews_by_reviewid_reply"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_reviews_by_reviewid_reply"]>>;
|
|
22255
22265
|
}
|
|
22256
22266
|
declare class SearchClient {
|
|
22257
22267
|
protected readonly _http: OmniHttp;
|
|
@@ -22591,7 +22601,7 @@ declare function constructEvent(payload: string | Uint8Array, headers: WebhookHe
|
|
|
22591
22601
|
toleranceInSeconds?: number;
|
|
22592
22602
|
}): Promise<ConstructedWebhookEvent>;
|
|
22593
22603
|
|
|
22594
|
-
declare const SDK_VERSION = "0.
|
|
22604
|
+
declare const SDK_VERSION = "0.12.0";
|
|
22595
22605
|
|
|
22596
22606
|
type ProductCreatedWebhookEvent = components["schemas"]["ProductCreatedWebhookEvent"];
|
|
22597
22607
|
type ProductUpdatedWebhookEvent = components["schemas"]["ProductUpdatedWebhookEvent"];
|
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.12.0";
|
|
37
37
|
var SDK_USER_AGENT = `omnicommerce-js/${SDK_VERSION}`;
|
|
38
38
|
|
|
39
39
|
// src/environments.ts
|
|
@@ -2916,20 +2916,20 @@ var ReviewsClient = class {
|
|
|
2916
2916
|
});
|
|
2917
2917
|
}
|
|
2918
2918
|
/**
|
|
2919
|
-
*
|
|
2919
|
+
* Reply to Review
|
|
2920
2920
|
*
|
|
2921
|
-
*
|
|
2921
|
+
* 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.
|
|
2922
2922
|
|
|
2923
|
-
|
|
2923
|
+
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.
|
|
2924
2924
|
*
|
|
2925
|
-
* `POST /api/v1/reviews/{reviewId}/
|
|
2925
|
+
* `POST /api/v1/reviews/{reviewId}/reply`
|
|
2926
2926
|
*/
|
|
2927
|
-
|
|
2928
|
-
const { reviewId,
|
|
2927
|
+
reply(request, requestOptions) {
|
|
2928
|
+
const { reviewId, ...body } = request ?? {};
|
|
2929
2929
|
return this._http.request({
|
|
2930
2930
|
method: "POST",
|
|
2931
|
-
path: `/api/v1/reviews/${encodePathParam("reviewId", reviewId)}/
|
|
2932
|
-
query:
|
|
2931
|
+
path: `/api/v1/reviews/${encodePathParam("reviewId", reviewId)}/reply`,
|
|
2932
|
+
query: void 0,
|
|
2933
2933
|
body,
|
|
2934
2934
|
...mergeRequestOptions(requestOptions)
|
|
2935
2935
|
});
|