@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 +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -33
- package/dist/index.d.ts +26 -33
- package/dist/index.js +7 -7
- 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/reply": {
|
|
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
|
-
* Reply to
|
|
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
|
-
* Read `data.
|
|
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,27 +18057,27 @@ interface operations {
|
|
|
18057
18057
|
};
|
|
18058
18058
|
};
|
|
18059
18059
|
};
|
|
18060
|
-
|
|
18060
|
+
post_v1_reviews_by_reviewid_reply: {
|
|
18061
18061
|
parameters: {
|
|
18062
18062
|
query?: never;
|
|
18063
18063
|
header?: never;
|
|
18064
|
-
path
|
|
18064
|
+
path: {
|
|
18065
|
+
reviewId: string;
|
|
18066
|
+
};
|
|
18065
18067
|
cookie?: never;
|
|
18066
18068
|
};
|
|
18067
18069
|
requestBody: {
|
|
18068
18070
|
content: {
|
|
18069
18071
|
"application/json": {
|
|
18070
|
-
/** @description
|
|
18071
|
-
reviewIds: string[];
|
|
18072
|
-
/** @description Seller reply to send to every selected review. Omit when generateWithAi is true. */
|
|
18072
|
+
/** @description Seller reply to send to this review. Omit when generateWithAi is true. */
|
|
18073
18073
|
reply?: string;
|
|
18074
18074
|
/**
|
|
18075
|
-
* @description Generate a
|
|
18075
|
+
* @description Generate a reply using the review context and organization brand voice. Uses AI credits.
|
|
18076
18076
|
* @default false
|
|
18077
18077
|
*/
|
|
18078
18078
|
generateWithAi?: boolean;
|
|
18079
18079
|
/**
|
|
18080
|
-
* @description true submits
|
|
18080
|
+
* @description true submits the reply to the marketplace. With generateWithAi, false returns a draft without submitting.
|
|
18081
18081
|
* @default true
|
|
18082
18082
|
*/
|
|
18083
18083
|
submit?: boolean;
|
|
@@ -18089,7 +18089,7 @@ interface operations {
|
|
|
18089
18089
|
};
|
|
18090
18090
|
};
|
|
18091
18091
|
responses: {
|
|
18092
|
-
/** @description
|
|
18092
|
+
/** @description The reply or draft result for this review. */
|
|
18093
18093
|
200: {
|
|
18094
18094
|
headers: {
|
|
18095
18095
|
[name: string]: unknown;
|
|
@@ -18111,20 +18111,13 @@ interface operations {
|
|
|
18111
18111
|
};
|
|
18112
18112
|
data: {
|
|
18113
18113
|
success: boolean;
|
|
18114
|
-
|
|
18115
|
-
|
|
18116
|
-
|
|
18117
|
-
|
|
18118
|
-
|
|
18119
|
-
|
|
18120
|
-
|
|
18121
|
-
/** @description True only when the marketplace reply service confirms success. False for drafts and unconfirmed submissions. */
|
|
18122
|
-
submitted: boolean;
|
|
18123
|
-
reply?: string;
|
|
18124
|
-
model?: string;
|
|
18125
|
-
error?: string;
|
|
18126
|
-
sellerCenterUrl?: string;
|
|
18127
|
-
}[];
|
|
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;
|
|
18128
18121
|
};
|
|
18129
18122
|
};
|
|
18130
18123
|
};
|
|
@@ -22260,15 +22253,15 @@ declare class ReviewsClient {
|
|
|
22260
22253
|
*/
|
|
22261
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"]>>;
|
|
22262
22255
|
/**
|
|
22263
|
-
* Reply to
|
|
22256
|
+
* Reply to Review
|
|
22264
22257
|
*
|
|
22265
|
-
*
|
|
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.
|
|
22266
22259
|
|
|
22267
|
-
Read `data.
|
|
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.
|
|
22268
22261
|
*
|
|
22269
|
-
* `POST /api/v1/reviews/reply`
|
|
22262
|
+
* `POST /api/v1/reviews/{reviewId}/reply`
|
|
22270
22263
|
*/
|
|
22271
|
-
reply(request: OperationBody<operations["
|
|
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"]>>;
|
|
22272
22265
|
}
|
|
22273
22266
|
declare class SearchClient {
|
|
22274
22267
|
protected readonly _http: OmniHttp;
|
|
@@ -22608,7 +22601,7 @@ declare function constructEvent(payload: string | Uint8Array, headers: WebhookHe
|
|
|
22608
22601
|
toleranceInSeconds?: number;
|
|
22609
22602
|
}): Promise<ConstructedWebhookEvent>;
|
|
22610
22603
|
|
|
22611
|
-
declare const SDK_VERSION = "0.
|
|
22604
|
+
declare const SDK_VERSION = "0.12.0";
|
|
22612
22605
|
|
|
22613
22606
|
type ProductCreatedWebhookEvent = components["schemas"]["ProductCreatedWebhookEvent"];
|
|
22614
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/reply": {
|
|
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
|
-
* Reply to
|
|
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
|
-
* Read `data.
|
|
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,27 +18057,27 @@ interface operations {
|
|
|
18057
18057
|
};
|
|
18058
18058
|
};
|
|
18059
18059
|
};
|
|
18060
|
-
|
|
18060
|
+
post_v1_reviews_by_reviewid_reply: {
|
|
18061
18061
|
parameters: {
|
|
18062
18062
|
query?: never;
|
|
18063
18063
|
header?: never;
|
|
18064
|
-
path
|
|
18064
|
+
path: {
|
|
18065
|
+
reviewId: string;
|
|
18066
|
+
};
|
|
18065
18067
|
cookie?: never;
|
|
18066
18068
|
};
|
|
18067
18069
|
requestBody: {
|
|
18068
18070
|
content: {
|
|
18069
18071
|
"application/json": {
|
|
18070
|
-
/** @description
|
|
18071
|
-
reviewIds: string[];
|
|
18072
|
-
/** @description Seller reply to send to every selected review. Omit when generateWithAi is true. */
|
|
18072
|
+
/** @description Seller reply to send to this review. Omit when generateWithAi is true. */
|
|
18073
18073
|
reply?: string;
|
|
18074
18074
|
/**
|
|
18075
|
-
* @description Generate a
|
|
18075
|
+
* @description Generate a reply using the review context and organization brand voice. Uses AI credits.
|
|
18076
18076
|
* @default false
|
|
18077
18077
|
*/
|
|
18078
18078
|
generateWithAi?: boolean;
|
|
18079
18079
|
/**
|
|
18080
|
-
* @description true submits
|
|
18080
|
+
* @description true submits the reply to the marketplace. With generateWithAi, false returns a draft without submitting.
|
|
18081
18081
|
* @default true
|
|
18082
18082
|
*/
|
|
18083
18083
|
submit?: boolean;
|
|
@@ -18089,7 +18089,7 @@ interface operations {
|
|
|
18089
18089
|
};
|
|
18090
18090
|
};
|
|
18091
18091
|
responses: {
|
|
18092
|
-
/** @description
|
|
18092
|
+
/** @description The reply or draft result for this review. */
|
|
18093
18093
|
200: {
|
|
18094
18094
|
headers: {
|
|
18095
18095
|
[name: string]: unknown;
|
|
@@ -18111,20 +18111,13 @@ interface operations {
|
|
|
18111
18111
|
};
|
|
18112
18112
|
data: {
|
|
18113
18113
|
success: boolean;
|
|
18114
|
-
|
|
18115
|
-
|
|
18116
|
-
|
|
18117
|
-
|
|
18118
|
-
|
|
18119
|
-
|
|
18120
|
-
|
|
18121
|
-
/** @description True only when the marketplace reply service confirms success. False for drafts and unconfirmed submissions. */
|
|
18122
|
-
submitted: boolean;
|
|
18123
|
-
reply?: string;
|
|
18124
|
-
model?: string;
|
|
18125
|
-
error?: string;
|
|
18126
|
-
sellerCenterUrl?: string;
|
|
18127
|
-
}[];
|
|
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;
|
|
18128
18121
|
};
|
|
18129
18122
|
};
|
|
18130
18123
|
};
|
|
@@ -22260,15 +22253,15 @@ declare class ReviewsClient {
|
|
|
22260
22253
|
*/
|
|
22261
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"]>>;
|
|
22262
22255
|
/**
|
|
22263
|
-
* Reply to
|
|
22256
|
+
* Reply to Review
|
|
22264
22257
|
*
|
|
22265
|
-
*
|
|
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.
|
|
22266
22259
|
|
|
22267
|
-
Read `data.
|
|
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.
|
|
22268
22261
|
*
|
|
22269
|
-
* `POST /api/v1/reviews/reply`
|
|
22262
|
+
* `POST /api/v1/reviews/{reviewId}/reply`
|
|
22270
22263
|
*/
|
|
22271
|
-
reply(request: OperationBody<operations["
|
|
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"]>>;
|
|
22272
22265
|
}
|
|
22273
22266
|
declare class SearchClient {
|
|
22274
22267
|
protected readonly _http: OmniHttp;
|
|
@@ -22608,7 +22601,7 @@ declare function constructEvent(payload: string | Uint8Array, headers: WebhookHe
|
|
|
22608
22601
|
toleranceInSeconds?: number;
|
|
22609
22602
|
}): Promise<ConstructedWebhookEvent>;
|
|
22610
22603
|
|
|
22611
|
-
declare const SDK_VERSION = "0.
|
|
22604
|
+
declare const SDK_VERSION = "0.12.0";
|
|
22612
22605
|
|
|
22613
22606
|
type ProductCreatedWebhookEvent = components["schemas"]["ProductCreatedWebhookEvent"];
|
|
22614
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,19 +2916,19 @@ var ReviewsClient = class {
|
|
|
2916
2916
|
});
|
|
2917
2917
|
}
|
|
2918
2918
|
/**
|
|
2919
|
-
* Reply to
|
|
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
|
-
Read `data.
|
|
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/reply`
|
|
2925
|
+
* `POST /api/v1/reviews/{reviewId}/reply`
|
|
2926
2926
|
*/
|
|
2927
2927
|
reply(request, requestOptions) {
|
|
2928
|
-
const { ...body } = request ?? {};
|
|
2928
|
+
const { reviewId, ...body } = request ?? {};
|
|
2929
2929
|
return this._http.request({
|
|
2930
2930
|
method: "POST",
|
|
2931
|
-
path:
|
|
2931
|
+
path: `/api/v1/reviews/${encodePathParam("reviewId", reviewId)}/reply`,
|
|
2932
2932
|
query: void 0,
|
|
2933
2933
|
body,
|
|
2934
2934
|
...mergeRequestOptions(requestOptions)
|