@omni-commerce/sdk 0.27.0 → 0.28.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/dist/index.cjs +25 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +58 -254
- package/dist/index.d.ts +58 -254
- package/dist/index.js +25 -32
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.28.0";
|
|
39
39
|
var SDK_USER_AGENT = `omnicommerce-js/${SDK_VERSION}`;
|
|
40
40
|
|
|
41
41
|
// src/environments.ts
|
|
@@ -712,7 +712,13 @@ var AgentsGeneralClient = class {
|
|
|
712
712
|
*
|
|
713
713
|
* Run the general Omni agent and wait until it completes, pauses for approval, or fails. Requires `agents:invoke`.
|
|
714
714
|
|
|
715
|
-
|
|
715
|
+
### Waiting and approvals
|
|
716
|
+
|
|
717
|
+
A waiting call can take several minutes; raise the client timeout. Send `decisions` with the same `thread_id` to approve or reject a paused run.
|
|
718
|
+
|
|
719
|
+
### Messages and tools
|
|
720
|
+
|
|
721
|
+
Omit `config.enabled_tools` to use the organization's agent tools. Send only new messages on each turn; thread_id continues the conversation stored in Omni sessions and checkpoints. Omit thread_id for a new conversation. Optional message IDs use native LangGraph replacement semantics, not run idempotency. audience=customer restricts tools to public storefront access without establishing a verified customer identity. Attach images on the latest user message as `{ type: "image", url }`
|
|
716
722
|
*
|
|
717
723
|
* `POST /api/v1/agents/general/invoke`
|
|
718
724
|
*/
|
|
@@ -772,9 +778,13 @@ var AgentsClient = class {
|
|
|
772
778
|
*
|
|
773
779
|
* Invoke the exact built-in or custom agent in the URL using its saved configuration and Programmatic starting mode. Uses the same invocation request and run response as the general agent and MCP.
|
|
774
780
|
|
|
781
|
+
### Authorization
|
|
782
|
+
|
|
775
783
|
Requires agents:invoke and current organization membership and agent access. Organization-owned keys use their recorded creator; no alternate organization member is substituted. Session requests include organizationId.
|
|
776
784
|
|
|
777
|
-
|
|
785
|
+
### Messages and conversation history
|
|
786
|
+
|
|
787
|
+
Send one or more new messages (at most 50 and 100000 text characters) ending with a user message. Omit thread_id to create a conversation, or reuse the returned thread_id to continue its stored history. An initial batch can import external history, including human replies. Do not resend history on subsequent turns. Optional
|
|
778
788
|
*
|
|
779
789
|
* `POST /api/v1/agents/{agentId}/invoke`
|
|
780
790
|
*/
|
|
@@ -788,29 +798,6 @@ var AgentsClient = class {
|
|
|
788
798
|
...mergeRequestOptions(requestOptions)
|
|
789
799
|
});
|
|
790
800
|
}
|
|
791
|
-
/**
|
|
792
|
-
* Invoke a saved agent (alias)
|
|
793
|
-
*
|
|
794
|
-
* Alias of /agents/{agentId}/invoke with the identical request and response. Prefer /invoke.
|
|
795
|
-
|
|
796
|
-
Invoke the exact built-in or custom agent in the URL using its saved configuration and Programmatic starting mode. Uses the same invocation request and run response as the general agent and MCP.
|
|
797
|
-
|
|
798
|
-
Requires agents:invoke and current organization membership and agent access. Organization-owned keys use their recorded creator; no alternate organization member is substituted. Session requests include organizationId.
|
|
799
|
-
|
|
800
|
-
Send one or more new messages (at most 50 and 100000 text characters) ending with a user message. Omit thread_id to create a conversation, or reuse the returned thread_id to continue its stored history. An initial batch can import external history, including human replies. Do not resend hist
|
|
801
|
-
*
|
|
802
|
-
* `POST /api/v1/agents/{agentId}/messages`
|
|
803
|
-
*/
|
|
804
|
-
messages(request, requestOptions) {
|
|
805
|
-
const { agentId, ...body } = request ?? {};
|
|
806
|
-
return this._http.request({
|
|
807
|
-
method: "POST",
|
|
808
|
-
path: `/api/v1/agents/${encodePathParam("agentId", agentId)}/messages`,
|
|
809
|
-
query: void 0,
|
|
810
|
-
body,
|
|
811
|
-
...mergeRequestOptions(requestOptions)
|
|
812
|
-
});
|
|
813
|
-
}
|
|
814
801
|
/**
|
|
815
802
|
* Start a saved agent run
|
|
816
803
|
*
|
|
@@ -818,9 +805,13 @@ var AgentsClient = class {
|
|
|
818
805
|
|
|
819
806
|
Invoke the exact built-in or custom agent in the URL using its saved configuration and Programmatic starting mode. Uses the same invocation request and run response as the general agent and MCP.
|
|
820
807
|
|
|
808
|
+
### Authorization
|
|
809
|
+
|
|
821
810
|
Requires agents:invoke and current organization membership and agent access. Organization-owned keys use their recorded creator; no alternate organization member is substituted. Session requests include organizationId.
|
|
822
811
|
|
|
823
|
-
|
|
812
|
+
### Messages and conversation history
|
|
813
|
+
|
|
814
|
+
Send one or more new messages (at most 50 and 100000 text characters) ending with a user message. Omit thread_id to create a conversation, or reuse the returned thread_id to continue its stored history. An initial batch can
|
|
824
815
|
*
|
|
825
816
|
* `POST /api/v1/agents/{agentId}/runs`
|
|
826
817
|
*/
|
|
@@ -2959,7 +2950,8 @@ var OrdersClient = class {
|
|
|
2959
2950
|
dateFrom,
|
|
2960
2951
|
dateTo,
|
|
2961
2952
|
limit,
|
|
2962
|
-
offset
|
|
2953
|
+
offset,
|
|
2954
|
+
includeSummary
|
|
2963
2955
|
} = request ?? {};
|
|
2964
2956
|
return this._http.request({
|
|
2965
2957
|
method: "GET",
|
|
@@ -2976,7 +2968,8 @@ var OrdersClient = class {
|
|
|
2976
2968
|
dateFrom,
|
|
2977
2969
|
dateTo,
|
|
2978
2970
|
limit,
|
|
2979
|
-
offset
|
|
2971
|
+
offset,
|
|
2972
|
+
includeSummary
|
|
2980
2973
|
},
|
|
2981
2974
|
body: void 0,
|
|
2982
2975
|
...mergeRequestOptions(requestOptions)
|
|
@@ -2999,9 +2992,9 @@ var OrdersClient = class {
|
|
|
2999
2992
|
|
|
3000
2993
|
### Pricing and catalog defaults
|
|
3001
2994
|
|
|
3002
|
-
- Each line can provide `
|
|
2995
|
+
- Each line can provide `unitPrice`, `paidPrice`, and `costPrice`.
|
|
3003
2996
|
- When `productId` is provided, missing price or currency values may resolve from the product catalog.
|
|
3004
|
-
- An explicit `costPrice` updates `product_data.costPrice` and is
|
|
2997
|
+
- An explicit `costPrice` updates `product_data.costPrice` and is snapshotted on
|
|
3005
2998
|
*
|
|
3006
2999
|
* `POST /api/v1/orders`
|
|
3007
3000
|
*/
|
|
@@ -3737,7 +3730,7 @@ var ProductsClient = class {
|
|
|
3737
3730
|
|
|
3738
3731
|
Supply targetMarketplaces and marketplaceStoreSelections to prepare for specific connected stores. Set deferStoreSelection=true to choose marketplaces only and assign stores later with POST /api/v1/products/marketplace-stores. Omit marketplaceStoreSelections and leave workflow.publish off when deferring. Automatic publishing requires catalog:sync in addition to catalog:write.
|
|
3739
3732
|
|
|
3740
|
-
Supply explicit SKU options in each row's `variationAttributes` and native marketplace attributes in `marketplaceAttributes`.
|
|
3733
|
+
Supply explicit SKU options in each row's `variationAttributes` and native marketplace attributes in `marketplaceAttributes`. Taxonomy enrichment can propose missing required sale attributes in its existing attribute request when supported by product evidence. Supplied values take precedence. At Zalora publish time, a missing required
|
|
3741
3734
|
*
|
|
3742
3735
|
* `POST /api/v1/products/bulk-import`
|
|
3743
3736
|
*/
|