@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/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# @omni-commerce/sdk
|
|
2
2
|
|
|
3
|
+
SDK 0.31.1 types both publish and inventory job correlations returned by Review queue publishing.
|
|
4
|
+
|
|
5
|
+
SDK 0.31.0 adds `client.reviewQueue` to inspect catalog proposals, approve selected items, queue marketplace publishing, and manage Review queue thresholds. See the [Review queue guide](https://docs.omnicommerce.sg/guides/review-queue).
|
|
6
|
+
|
|
3
7
|
SDK 0.27.0 adds `email.listAccounts`, `email.search`, `email.getMessage` and `email.createDraft` for your own connected Gmail or Outlook mailbox (`email:read`, drafts `email:write`). They need a credential that acts for you; nothing is sent.
|
|
4
8
|
|
|
5
9
|
SDK 0.26.0 adds normalized order attribution to `orders.list`, `orders.get`, and `analytics.getOrders`. Read `attribution.channels`, `creatorHandles`, and `storefront`; analytics includes creator/channel Net Revenue by exact store and currency.
|
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.
|
|
38
|
+
var SDK_VERSION = "0.31.1";
|
|
39
39
|
var SDK_USER_AGENT = `omnicommerce-js/${SDK_VERSION}`;
|
|
40
40
|
|
|
41
41
|
// src/environments.ts
|
|
@@ -4725,6 +4725,168 @@ var ReturnsClient = class {
|
|
|
4725
4725
|
});
|
|
4726
4726
|
}
|
|
4727
4727
|
};
|
|
4728
|
+
var ReviewQueueClient = class {
|
|
4729
|
+
constructor(_http) {
|
|
4730
|
+
__publicField(this, "_http", _http);
|
|
4731
|
+
}
|
|
4732
|
+
/**
|
|
4733
|
+
* List Review Queue Jobs
|
|
4734
|
+
*
|
|
4735
|
+
* Requires `catalog:read`.
|
|
4736
|
+
|
|
4737
|
+
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).
|
|
4738
|
+
*
|
|
4739
|
+
* `GET /api/v1/review-queue`
|
|
4740
|
+
*/
|
|
4741
|
+
list(request = {}, requestOptions) {
|
|
4742
|
+
const {
|
|
4743
|
+
organizationId,
|
|
4744
|
+
workflow,
|
|
4745
|
+
status,
|
|
4746
|
+
query,
|
|
4747
|
+
sortBy,
|
|
4748
|
+
limit,
|
|
4749
|
+
offset,
|
|
4750
|
+
enrichmentStatus,
|
|
4751
|
+
dateFrom,
|
|
4752
|
+
dateTo,
|
|
4753
|
+
timeZone
|
|
4754
|
+
} = request ?? {};
|
|
4755
|
+
return this._http.request({
|
|
4756
|
+
method: "GET",
|
|
4757
|
+
path: "/api/v1/review-queue",
|
|
4758
|
+
query: {
|
|
4759
|
+
organizationId,
|
|
4760
|
+
workflow,
|
|
4761
|
+
status,
|
|
4762
|
+
query,
|
|
4763
|
+
sortBy,
|
|
4764
|
+
limit,
|
|
4765
|
+
offset,
|
|
4766
|
+
enrichmentStatus,
|
|
4767
|
+
dateFrom,
|
|
4768
|
+
dateTo,
|
|
4769
|
+
timeZone
|
|
4770
|
+
},
|
|
4771
|
+
body: void 0,
|
|
4772
|
+
...mergeRequestOptions(requestOptions)
|
|
4773
|
+
});
|
|
4774
|
+
}
|
|
4775
|
+
/**
|
|
4776
|
+
* Get Review Queue Job
|
|
4777
|
+
*
|
|
4778
|
+
* Requires `catalog:read`.
|
|
4779
|
+
|
|
4780
|
+
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.
|
|
4781
|
+
*
|
|
4782
|
+
* `GET /api/v1/review-queue/{batchId}`
|
|
4783
|
+
*/
|
|
4784
|
+
get(request, requestOptions) {
|
|
4785
|
+
const { batchId, organizationId, itemId, queue } = request ?? {};
|
|
4786
|
+
return this._http.request({
|
|
4787
|
+
method: "GET",
|
|
4788
|
+
path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}`,
|
|
4789
|
+
query: { organizationId, itemId, queue },
|
|
4790
|
+
body: void 0,
|
|
4791
|
+
...mergeRequestOptions(requestOptions)
|
|
4792
|
+
});
|
|
4793
|
+
}
|
|
4794
|
+
/**
|
|
4795
|
+
* Rename Review Queue Job
|
|
4796
|
+
*
|
|
4797
|
+
* Requires `catalog:write`.
|
|
4798
|
+
|
|
4799
|
+
Use an empty title to restore the default display title.
|
|
4800
|
+
*
|
|
4801
|
+
* `PATCH /api/v1/review-queue/{batchId}`
|
|
4802
|
+
*/
|
|
4803
|
+
update(request, requestOptions) {
|
|
4804
|
+
const { batchId, ...body } = request ?? {};
|
|
4805
|
+
return this._http.request({
|
|
4806
|
+
method: "PATCH",
|
|
4807
|
+
path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}`,
|
|
4808
|
+
query: void 0,
|
|
4809
|
+
body,
|
|
4810
|
+
...mergeRequestOptions(requestOptions)
|
|
4811
|
+
});
|
|
4812
|
+
}
|
|
4813
|
+
/**
|
|
4814
|
+
* Approve Review Queue Items
|
|
4815
|
+
*
|
|
4816
|
+
* Requires `catalog:write`.
|
|
4817
|
+
|
|
4818
|
+
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.
|
|
4819
|
+
*
|
|
4820
|
+
* `POST /api/v1/review-queue/{batchId}/approve`
|
|
4821
|
+
*/
|
|
4822
|
+
approve(request, requestOptions) {
|
|
4823
|
+
const { batchId, ...body } = request ?? {};
|
|
4824
|
+
return this._http.request({
|
|
4825
|
+
method: "POST",
|
|
4826
|
+
path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}/approve`,
|
|
4827
|
+
query: void 0,
|
|
4828
|
+
body,
|
|
4829
|
+
...mergeRequestOptions(requestOptions)
|
|
4830
|
+
});
|
|
4831
|
+
}
|
|
4832
|
+
/**
|
|
4833
|
+
* Publish Review Queue Products
|
|
4834
|
+
*
|
|
4835
|
+
* Requires `catalog:sync`.
|
|
4836
|
+
|
|
4837
|
+
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.
|
|
4838
|
+
*
|
|
4839
|
+
* `POST /api/v1/review-queue/{batchId}/publish`
|
|
4840
|
+
*/
|
|
4841
|
+
publish(request, requestOptions) {
|
|
4842
|
+
const { batchId, ...body } = request ?? {};
|
|
4843
|
+
return this._http.request({
|
|
4844
|
+
method: "POST",
|
|
4845
|
+
path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}/publish`,
|
|
4846
|
+
query: void 0,
|
|
4847
|
+
body,
|
|
4848
|
+
...mergeRequestOptions(requestOptions)
|
|
4849
|
+
});
|
|
4850
|
+
}
|
|
4851
|
+
/**
|
|
4852
|
+
* Get Review Queue Settings
|
|
4853
|
+
*
|
|
4854
|
+
* Requires catalog:review-settings for bearer credentials and company settings read permission for delegated users.
|
|
4855
|
+
|
|
4856
|
+
Returns the organization defaults for enrichment and taxonomy auto-apply confidence.
|
|
4857
|
+
*
|
|
4858
|
+
* `GET /api/v1/review-queue/settings`
|
|
4859
|
+
*/
|
|
4860
|
+
getSettings(request = {}, requestOptions) {
|
|
4861
|
+
const { organizationId } = request ?? {};
|
|
4862
|
+
return this._http.request({
|
|
4863
|
+
method: "GET",
|
|
4864
|
+
path: "/api/v1/review-queue/settings",
|
|
4865
|
+
query: { organizationId },
|
|
4866
|
+
body: void 0,
|
|
4867
|
+
...mergeRequestOptions(requestOptions)
|
|
4868
|
+
});
|
|
4869
|
+
}
|
|
4870
|
+
/**
|
|
4871
|
+
* Update Review Queue Settings
|
|
4872
|
+
*
|
|
4873
|
+
* Requires catalog:review-settings for bearer credentials and company settings write permission for delegated users.
|
|
4874
|
+
|
|
4875
|
+
Update either or both thresholds from 0.50 to 1.00. Existing review jobs retain their saved settings.
|
|
4876
|
+
*
|
|
4877
|
+
* `PATCH /api/v1/review-queue/settings`
|
|
4878
|
+
*/
|
|
4879
|
+
updateSettings(request, requestOptions) {
|
|
4880
|
+
const { ...body } = request ?? {};
|
|
4881
|
+
return this._http.request({
|
|
4882
|
+
method: "PATCH",
|
|
4883
|
+
path: "/api/v1/review-queue/settings",
|
|
4884
|
+
query: void 0,
|
|
4885
|
+
body,
|
|
4886
|
+
...mergeRequestOptions(requestOptions)
|
|
4887
|
+
});
|
|
4888
|
+
}
|
|
4889
|
+
};
|
|
4728
4890
|
var ReviewsClient = class {
|
|
4729
4891
|
constructor(_http) {
|
|
4730
4892
|
__publicField(this, "_http", _http);
|
|
@@ -5731,6 +5893,7 @@ var OmniGeneratedClient = class {
|
|
|
5731
5893
|
__publicField(this, "products");
|
|
5732
5894
|
__publicField(this, "promotions");
|
|
5733
5895
|
__publicField(this, "returns");
|
|
5896
|
+
__publicField(this, "reviewQueue");
|
|
5734
5897
|
__publicField(this, "reviews");
|
|
5735
5898
|
__publicField(this, "scripts");
|
|
5736
5899
|
__publicField(this, "search");
|
|
@@ -5775,6 +5938,7 @@ var OmniGeneratedClient = class {
|
|
|
5775
5938
|
this.products = new ProductsClient(this._http);
|
|
5776
5939
|
this.promotions = new PromotionsClient(this._http);
|
|
5777
5940
|
this.returns = new ReturnsClient(this._http);
|
|
5941
|
+
this.reviewQueue = new ReviewQueueClient(this._http);
|
|
5778
5942
|
this.reviews = new ReviewsClient(this._http);
|
|
5779
5943
|
this.scripts = new ScriptsClient(this._http);
|
|
5780
5944
|
this.search = new SearchClient(this._http);
|