@omni-commerce/sdk 0.30.0 → 0.31.1
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 +4 -0
- package/dist/index.cjs +165 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1104 -1
- package/dist/index.d.ts +1104 -1
- package/dist/index.js +165 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.31.1";
|
|
37
37
|
var SDK_USER_AGENT = `omnicommerce-js/${SDK_VERSION}`;
|
|
38
38
|
|
|
39
39
|
// src/environments.ts
|
|
@@ -4723,6 +4723,168 @@ var ReturnsClient = class {
|
|
|
4723
4723
|
});
|
|
4724
4724
|
}
|
|
4725
4725
|
};
|
|
4726
|
+
var ReviewQueueClient = class {
|
|
4727
|
+
constructor(_http) {
|
|
4728
|
+
__publicField(this, "_http", _http);
|
|
4729
|
+
}
|
|
4730
|
+
/**
|
|
4731
|
+
* List Review Queue Jobs
|
|
4732
|
+
*
|
|
4733
|
+
* Requires `catalog:read`.
|
|
4734
|
+
|
|
4735
|
+
Lists the same jobs as the Review queue, including outstanding bulk imports and updates before their product proposals exist. Use workflow, status, query, and date filters with limit and offset. Date-only bounds are inclusive calendar dates in timeZone (defaults to the session time zone or Asia/Singapore).
|
|
4736
|
+
*
|
|
4737
|
+
* `GET /api/v1/review-queue`
|
|
4738
|
+
*/
|
|
4739
|
+
list(request = {}, requestOptions) {
|
|
4740
|
+
const {
|
|
4741
|
+
organizationId,
|
|
4742
|
+
workflow,
|
|
4743
|
+
status,
|
|
4744
|
+
query,
|
|
4745
|
+
sortBy,
|
|
4746
|
+
limit,
|
|
4747
|
+
offset,
|
|
4748
|
+
enrichmentStatus,
|
|
4749
|
+
dateFrom,
|
|
4750
|
+
dateTo,
|
|
4751
|
+
timeZone
|
|
4752
|
+
} = request ?? {};
|
|
4753
|
+
return this._http.request({
|
|
4754
|
+
method: "GET",
|
|
4755
|
+
path: "/api/v1/review-queue",
|
|
4756
|
+
query: {
|
|
4757
|
+
organizationId,
|
|
4758
|
+
workflow,
|
|
4759
|
+
status,
|
|
4760
|
+
query,
|
|
4761
|
+
sortBy,
|
|
4762
|
+
limit,
|
|
4763
|
+
offset,
|
|
4764
|
+
enrichmentStatus,
|
|
4765
|
+
dateFrom,
|
|
4766
|
+
dateTo,
|
|
4767
|
+
timeZone
|
|
4768
|
+
},
|
|
4769
|
+
body: void 0,
|
|
4770
|
+
...mergeRequestOptions(requestOptions)
|
|
4771
|
+
});
|
|
4772
|
+
}
|
|
4773
|
+
/**
|
|
4774
|
+
* Get Review Queue Job
|
|
4775
|
+
*
|
|
4776
|
+
* Requires `catalog:read`.
|
|
4777
|
+
|
|
4778
|
+
Returns an AI product review job, including its linked review scopes. The queue parameter selects a product subset in queueSelection. Pass itemId to also read one saved proposal and its issues. Use the import workflow status API for entries with importJob.
|
|
4779
|
+
*
|
|
4780
|
+
* `GET /api/v1/review-queue/{batchId}`
|
|
4781
|
+
*/
|
|
4782
|
+
get(request, requestOptions) {
|
|
4783
|
+
const { batchId, organizationId, itemId, queue } = request ?? {};
|
|
4784
|
+
return this._http.request({
|
|
4785
|
+
method: "GET",
|
|
4786
|
+
path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}`,
|
|
4787
|
+
query: { organizationId, itemId, queue },
|
|
4788
|
+
body: void 0,
|
|
4789
|
+
...mergeRequestOptions(requestOptions)
|
|
4790
|
+
});
|
|
4791
|
+
}
|
|
4792
|
+
/**
|
|
4793
|
+
* Rename Review Queue Job
|
|
4794
|
+
*
|
|
4795
|
+
* Requires `catalog:write`.
|
|
4796
|
+
|
|
4797
|
+
Use an empty title to restore the default display title.
|
|
4798
|
+
*
|
|
4799
|
+
* `PATCH /api/v1/review-queue/{batchId}`
|
|
4800
|
+
*/
|
|
4801
|
+
update(request, requestOptions) {
|
|
4802
|
+
const { batchId, ...body } = request ?? {};
|
|
4803
|
+
return this._http.request({
|
|
4804
|
+
method: "PATCH",
|
|
4805
|
+
path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}`,
|
|
4806
|
+
query: void 0,
|
|
4807
|
+
body,
|
|
4808
|
+
...mergeRequestOptions(requestOptions)
|
|
4809
|
+
});
|
|
4810
|
+
}
|
|
4811
|
+
/**
|
|
4812
|
+
* Approve Review Queue Items
|
|
4813
|
+
*
|
|
4814
|
+
* Requires `catalog:write`.
|
|
4815
|
+
|
|
4816
|
+
Applies up to 100 explicitly selected review item IDs from the job and its linked batches. Approves the saved proposals through the catalog's normal stale-product and gallery checks. Set allowProductChangedOverride explicitly to approve despite an intervening product change. Already applied items are safe to resubmit. Call the publish endpoint separately to release approved changes.
|
|
4817
|
+
*
|
|
4818
|
+
* `POST /api/v1/review-queue/{batchId}/approve`
|
|
4819
|
+
*/
|
|
4820
|
+
approve(request, requestOptions) {
|
|
4821
|
+
const { batchId, ...body } = request ?? {};
|
|
4822
|
+
return this._http.request({
|
|
4823
|
+
method: "POST",
|
|
4824
|
+
path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}/approve`,
|
|
4825
|
+
query: void 0,
|
|
4826
|
+
body,
|
|
4827
|
+
...mergeRequestOptions(requestOptions)
|
|
4828
|
+
});
|
|
4829
|
+
}
|
|
4830
|
+
/**
|
|
4831
|
+
* Publish Review Queue Products
|
|
4832
|
+
*
|
|
4833
|
+
* Requires `catalog:sync`.
|
|
4834
|
+
|
|
4835
|
+
Specify productIds and visibility. Only products with all review scopes applied and outstanding releases to assigned marketplace stores are eligible. Optionally filter by marketplaces. Inspect every product and listing result for preparation failures. HTTP 202 confirms queue acceptance. Pass every returned correlation to POST /api/v1/commerce/jobs/await to check marketplace outcomes.
|
|
4836
|
+
*
|
|
4837
|
+
* `POST /api/v1/review-queue/{batchId}/publish`
|
|
4838
|
+
*/
|
|
4839
|
+
publish(request, requestOptions) {
|
|
4840
|
+
const { batchId, ...body } = request ?? {};
|
|
4841
|
+
return this._http.request({
|
|
4842
|
+
method: "POST",
|
|
4843
|
+
path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}/publish`,
|
|
4844
|
+
query: void 0,
|
|
4845
|
+
body,
|
|
4846
|
+
...mergeRequestOptions(requestOptions)
|
|
4847
|
+
});
|
|
4848
|
+
}
|
|
4849
|
+
/**
|
|
4850
|
+
* Get Review Queue Settings
|
|
4851
|
+
*
|
|
4852
|
+
* Requires catalog:review-settings for bearer credentials and company settings read permission for delegated users.
|
|
4853
|
+
|
|
4854
|
+
Returns the organization defaults for enrichment and taxonomy auto-apply confidence.
|
|
4855
|
+
*
|
|
4856
|
+
* `GET /api/v1/review-queue/settings`
|
|
4857
|
+
*/
|
|
4858
|
+
getSettings(request = {}, requestOptions) {
|
|
4859
|
+
const { organizationId } = request ?? {};
|
|
4860
|
+
return this._http.request({
|
|
4861
|
+
method: "GET",
|
|
4862
|
+
path: "/api/v1/review-queue/settings",
|
|
4863
|
+
query: { organizationId },
|
|
4864
|
+
body: void 0,
|
|
4865
|
+
...mergeRequestOptions(requestOptions)
|
|
4866
|
+
});
|
|
4867
|
+
}
|
|
4868
|
+
/**
|
|
4869
|
+
* Update Review Queue Settings
|
|
4870
|
+
*
|
|
4871
|
+
* Requires catalog:review-settings for bearer credentials and company settings write permission for delegated users.
|
|
4872
|
+
|
|
4873
|
+
Update either or both thresholds from 0.50 to 1.00. Existing review jobs retain their saved settings.
|
|
4874
|
+
*
|
|
4875
|
+
* `PATCH /api/v1/review-queue/settings`
|
|
4876
|
+
*/
|
|
4877
|
+
updateSettings(request, requestOptions) {
|
|
4878
|
+
const { ...body } = request ?? {};
|
|
4879
|
+
return this._http.request({
|
|
4880
|
+
method: "PATCH",
|
|
4881
|
+
path: "/api/v1/review-queue/settings",
|
|
4882
|
+
query: void 0,
|
|
4883
|
+
body,
|
|
4884
|
+
...mergeRequestOptions(requestOptions)
|
|
4885
|
+
});
|
|
4886
|
+
}
|
|
4887
|
+
};
|
|
4726
4888
|
var ReviewsClient = class {
|
|
4727
4889
|
constructor(_http) {
|
|
4728
4890
|
__publicField(this, "_http", _http);
|
|
@@ -5729,6 +5891,7 @@ var OmniGeneratedClient = class {
|
|
|
5729
5891
|
__publicField(this, "products");
|
|
5730
5892
|
__publicField(this, "promotions");
|
|
5731
5893
|
__publicField(this, "returns");
|
|
5894
|
+
__publicField(this, "reviewQueue");
|
|
5732
5895
|
__publicField(this, "reviews");
|
|
5733
5896
|
__publicField(this, "scripts");
|
|
5734
5897
|
__publicField(this, "search");
|
|
@@ -5773,6 +5936,7 @@ var OmniGeneratedClient = class {
|
|
|
5773
5936
|
this.products = new ProductsClient(this._http);
|
|
5774
5937
|
this.promotions = new PromotionsClient(this._http);
|
|
5775
5938
|
this.returns = new ReturnsClient(this._http);
|
|
5939
|
+
this.reviewQueue = new ReviewQueueClient(this._http);
|
|
5776
5940
|
this.reviews = new ReviewsClient(this._http);
|
|
5777
5941
|
this.scripts = new ScriptsClient(this._http);
|
|
5778
5942
|
this.search = new SearchClient(this._http);
|