@omni-commerce/sdk 0.31.1 → 0.34.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 CHANGED
@@ -35,7 +35,7 @@ function normalizeClientOptions(options = {}) {
35
35
  }
36
36
 
37
37
  // src/version.ts
38
- var SDK_VERSION = "0.31.1";
38
+ var SDK_VERSION = "0.34.0";
39
39
  var SDK_USER_AGENT = `omnicommerce-js/${SDK_VERSION}`;
40
40
 
41
41
  // src/environments.ts
@@ -714,6 +714,235 @@ async function waitForJob(http, request, options) {
714
714
  }
715
715
 
716
716
  // src/generated/resources.ts
717
+ var AdsClient = class {
718
+ constructor(_http) {
719
+ __publicField(this, "_http", _http);
720
+ }
721
+ /**
722
+ * List Ads accounts and capabilities
723
+ *
724
+ * Requires ads:read. Every target is organization/store scoped. Partial failures are explicit in data.success and ordered results. Shopee and Lazada support only the formats returned by accounts. Other marketplaces report a concrete limitation. External campaign IDs differ from saved campaign group UUIDs.
725
+ *
726
+ * `GET /api/v1/ads/accounts`
727
+ */
728
+ listAccounts(request = {}, requestOptions) {
729
+ const { marketplaces, organizationId } = request ?? {};
730
+ return this._http.request({
731
+ method: "GET",
732
+ path: "/api/v1/ads/accounts",
733
+ query: { marketplaces, organizationId },
734
+ body: void 0,
735
+ ...mergeRequestOptions(requestOptions)
736
+ });
737
+ }
738
+ /**
739
+ * List saved and synced ads
740
+ *
741
+ * Requires ads:read. Every target is organization/store scoped. Partial failures are explicit in data.success and ordered results. Shopee and Lazada support only the formats returned by accounts. Other marketplaces report a concrete limitation. External campaign IDs differ from saved campaign group UUIDs.
742
+ *
743
+ * `GET /api/v1/ads/campaigns`
744
+ */
745
+ listCampaigns(request = {}, requestOptions) {
746
+ const { status, q, marketplace, store, offset, organizationId } = request ?? {};
747
+ return this._http.request({
748
+ method: "GET",
749
+ path: "/api/v1/ads/campaigns",
750
+ query: { status, q, marketplace, store, offset, organizationId },
751
+ body: void 0,
752
+ ...mergeRequestOptions(requestOptions)
753
+ });
754
+ }
755
+ /**
756
+ * Draft a multi-store Ads campaign
757
+ *
758
+ * Requires ads:write. Every target is organization/store scoped. Partial failures are explicit in data.success and ordered results. Shopee and Lazada support only the formats returned by accounts. Other marketplaces report a concrete limitation. External campaign IDs differ from saved campaign group UUIDs.
759
+ *
760
+ * `POST /api/v1/ads/campaigns`
761
+ */
762
+ createCampaign(request, requestOptions) {
763
+ const { ...body } = request ?? {};
764
+ return this._http.request({
765
+ method: "POST",
766
+ path: "/api/v1/ads/campaigns",
767
+ query: void 0,
768
+ body,
769
+ ...mergeRequestOptions(requestOptions)
770
+ });
771
+ }
772
+ /**
773
+ * Approve, stop or retry Ads campaign groups
774
+ *
775
+ * Requires ads:approve. Every target is organization/store scoped. Accepted work runs durably; inspect per-target outcomes and returned planIds/jobIds until verified. Approval uses saved immutable seller budgets and schedules. Shopee and Lazada support only the formats returned by accounts. Other marketplaces report a concrete limitation. External campaign IDs differ from saved campaign group UUIDs.
776
+ *
777
+ * `POST /api/v1/ads/campaigns/actions`
778
+ */
779
+ actOnCampaigns(request, requestOptions) {
780
+ const { ...body } = request ?? {};
781
+ return this._http.request({
782
+ method: "POST",
783
+ path: "/api/v1/ads/campaigns/actions",
784
+ query: void 0,
785
+ body,
786
+ ...mergeRequestOptions(requestOptions)
787
+ });
788
+ }
789
+ /**
790
+ * Read live marketplace campaigns
791
+ *
792
+ * Requires ads:read. Every target is organization/store scoped. Partial failures are explicit in data.success and ordered results. Shopee and Lazada support only the formats returned by accounts. Other marketplaces report a concrete limitation. External campaign IDs differ from saved campaign group UUIDs.
793
+ *
794
+ * `POST /api/v1/ads/campaigns/live`
795
+ */
796
+ getLiveCampaigns(request, requestOptions) {
797
+ const { ...body } = request ?? {};
798
+ return this._http.request({
799
+ method: "POST",
800
+ path: "/api/v1/ads/campaigns/live",
801
+ query: void 0,
802
+ body,
803
+ ...mergeRequestOptions(requestOptions)
804
+ });
805
+ }
806
+ /**
807
+ * Read saved Ads campaign groups
808
+ *
809
+ * Requires ads:read. Every target is organization/store scoped. Partial failures are explicit in data.success and ordered results. Shopee and Lazada support only the formats returned by accounts. Other marketplaces report a concrete limitation. External campaign IDs differ from saved campaign group UUIDs.
810
+ *
811
+ * `POST /api/v1/ads/campaigns/read`
812
+ */
813
+ getCampaigns(request, requestOptions) {
814
+ const { ...body } = request ?? {};
815
+ return this._http.request({
816
+ method: "POST",
817
+ path: "/api/v1/ads/campaigns/read",
818
+ query: void 0,
819
+ body,
820
+ ...mergeRequestOptions(requestOptions)
821
+ });
822
+ }
823
+ /**
824
+ * Read live Ads performance
825
+ *
826
+ * Requires ads:read. Every target is organization/store scoped. Partial failures are explicit in data.success and ordered results. Shopee and Lazada support only the formats returned by accounts. Other marketplaces report a concrete limitation. External campaign IDs differ from saved campaign group UUIDs.
827
+ *
828
+ * `POST /api/v1/ads/performance`
829
+ */
830
+ getPerformance(request, requestOptions) {
831
+ const { ...body } = request ?? {};
832
+ return this._http.request({
833
+ method: "POST",
834
+ path: "/api/v1/ads/performance",
835
+ query: void 0,
836
+ body,
837
+ ...mergeRequestOptions(requestOptions)
838
+ });
839
+ }
840
+ /**
841
+ * Approve, stop or retry legacy Ads plans
842
+ *
843
+ * Requires ads:approve. Every target is organization/store scoped. Accepted work runs durably; inspect per-target outcomes and returned planIds/jobIds until verified. Approval uses saved immutable seller budgets and schedules. Shopee and Lazada support only the formats returned by accounts. Other marketplaces report a concrete limitation. External campaign IDs differ from saved campaign group UUIDs.
844
+ *
845
+ * `POST /api/v1/ads/plans/actions`
846
+ */
847
+ actOnPlans(request, requestOptions) {
848
+ const { ...body } = request ?? {};
849
+ return this._http.request({
850
+ method: "POST",
851
+ path: "/api/v1/ads/plans/actions",
852
+ query: void 0,
853
+ body,
854
+ ...mergeRequestOptions(requestOptions)
855
+ });
856
+ }
857
+ /**
858
+ * Read delivery and verification evidence
859
+ *
860
+ * Requires ads:read. Every target is organization/store scoped. Partial failures are explicit in data.success and ordered results. Shopee and Lazada support only the formats returned by accounts. Other marketplaces report a concrete limitation. External campaign IDs differ from saved campaign group UUIDs.
861
+ *
862
+ * `POST /api/v1/ads/plans/status`
863
+ */
864
+ getPlans(request, requestOptions) {
865
+ const { ...body } = request ?? {};
866
+ return this._http.request({
867
+ method: "POST",
868
+ path: "/api/v1/ads/plans/status",
869
+ query: void 0,
870
+ body,
871
+ ...mergeRequestOptions(requestOptions)
872
+ });
873
+ }
874
+ /**
875
+ * Read persisted campaign reports
876
+ *
877
+ * Requires ads:read. Every target is organization/store scoped. Partial failures are explicit in data.success and ordered results. Shopee and Lazada support only the formats returned by accounts. Other marketplaces report a concrete limitation. External campaign IDs differ from saved campaign group UUIDs.
878
+ *
879
+ * `GET /api/v1/ads/reports`
880
+ */
881
+ getReports(request, requestOptions) {
882
+ const {
883
+ from,
884
+ to,
885
+ marketplace,
886
+ country,
887
+ store,
888
+ currency,
889
+ campaign,
890
+ offset,
891
+ organizationId
892
+ } = request ?? {};
893
+ return this._http.request({
894
+ method: "GET",
895
+ path: "/api/v1/ads/reports",
896
+ query: {
897
+ from,
898
+ to,
899
+ marketplace,
900
+ country,
901
+ store,
902
+ currency,
903
+ campaign,
904
+ offset,
905
+ organizationId
906
+ },
907
+ body: void 0,
908
+ ...mergeRequestOptions(requestOptions)
909
+ });
910
+ }
911
+ /**
912
+ * Queue Ads report imports
913
+ *
914
+ * Requires ads:read. Every target is organization/store scoped. Accepted work runs durably; inspect per-target outcomes and returned planIds/jobIds until verified. Approval uses saved immutable seller budgets and schedules. Shopee and Lazada support only the formats returned by accounts. Other marketplaces report a concrete limitation. External campaign IDs differ from saved campaign group UUIDs.
915
+ *
916
+ * `POST /api/v1/ads/sync`
917
+ */
918
+ syncReports(request, requestOptions) {
919
+ const { ...body } = request ?? {};
920
+ return this._http.request({
921
+ method: "POST",
922
+ path: "/api/v1/ads/sync",
923
+ query: void 0,
924
+ body,
925
+ ...mergeRequestOptions(requestOptions)
926
+ });
927
+ }
928
+ /**
929
+ * Read Ads import job status
930
+ *
931
+ * Requires ads:read. Every target is organization/store scoped. Partial failures are explicit in data.success and ordered results. Shopee and Lazada support only the formats returned by accounts. Other marketplaces report a concrete limitation. External campaign IDs differ from saved campaign group UUIDs.
932
+ *
933
+ * `POST /api/v1/ads/sync/status`
934
+ */
935
+ getSyncStatus(request, requestOptions) {
936
+ const { ...body } = request ?? {};
937
+ return this._http.request({
938
+ method: "POST",
939
+ path: "/api/v1/ads/sync/status",
940
+ query: void 0,
941
+ body,
942
+ ...mergeRequestOptions(requestOptions)
943
+ });
944
+ }
945
+ };
717
946
  var AgentsGeneralClient = class {
718
947
  constructor(_http) {
719
948
  __publicField(this, "_http", _http);
@@ -1448,6 +1677,136 @@ var ApiClient = class {
1448
1677
  });
1449
1678
  }
1450
1679
  };
1680
+ var BotsClient = class {
1681
+ constructor(_http) {
1682
+ __publicField(this, "_http", _http);
1683
+ }
1684
+ /**
1685
+ * List personal Bots
1686
+ *
1687
+ * Requires agents:invoke and assistant.use. Use a signed-in member session or a member's CLI token. Organization OAuth and Computer credentials cannot access personal Bots.
1688
+ *
1689
+ * `GET /api/v1/bots`
1690
+ */
1691
+ list(request = {}, requestOptions) {
1692
+ const { organizationId, q, page, status } = request ?? {};
1693
+ return this._http.request({
1694
+ method: "GET",
1695
+ path: "/api/v1/bots",
1696
+ query: { organizationId, q, page, status },
1697
+ body: void 0,
1698
+ ...mergeRequestOptions(requestOptions)
1699
+ });
1700
+ }
1701
+ /**
1702
+ * Create a personal Bot
1703
+ *
1704
+ * Requires agents:invoke and assistant.use. Use a signed-in member session or a member's CLI token. Organization OAuth and Computer credentials cannot access personal Bots.
1705
+ *
1706
+ * `POST /api/v1/bots`
1707
+ */
1708
+ create(request, requestOptions) {
1709
+ const { organizationId, ...body } = request ?? {};
1710
+ return this._http.request({
1711
+ method: "POST",
1712
+ path: "/api/v1/bots",
1713
+ query: { organizationId },
1714
+ body,
1715
+ ...mergeRequestOptions(requestOptions)
1716
+ });
1717
+ }
1718
+ /**
1719
+ * List a Bot's routines
1720
+ *
1721
+ * Requires agents:invoke and assistant.use. Use a signed-in member session or a member's CLI token. Organization OAuth and Computer credentials cannot access personal Bots.
1722
+ *
1723
+ * `GET /api/v1/bots/{botId}/routines`
1724
+ */
1725
+ listRoutines(request, requestOptions) {
1726
+ const { botId, organizationId } = request ?? {};
1727
+ return this._http.request({
1728
+ method: "GET",
1729
+ path: `/api/v1/bots/${encodePathParam("botId", botId)}/routines`,
1730
+ query: { organizationId },
1731
+ body: void 0,
1732
+ ...mergeRequestOptions(requestOptions)
1733
+ });
1734
+ }
1735
+ /**
1736
+ * Manage a Bot's routines
1737
+ *
1738
+ * Requires agents:invoke and assistant.use. Use a signed-in member session or a member's CLI token. Organization OAuth and Computer credentials cannot access personal Bots.
1739
+
1740
+ Create, edit, link, pause, resume, delete, test, or run a batch of routines. New personal routines start paused. Reuse the same requestId only when retrying the same request. Inspect every ordered result before retrying failed targets.
1741
+ *
1742
+ * `POST /api/v1/bots/{botId}/routines`
1743
+ */
1744
+ mutateRoutines(request, requestOptions) {
1745
+ const { botId, organizationId, ...body } = request ?? {};
1746
+ return this._http.request({
1747
+ method: "POST",
1748
+ path: `/api/v1/bots/${encodePathParam("botId", botId)}/routines`,
1749
+ query: { organizationId },
1750
+ body,
1751
+ ...mergeRequestOptions(requestOptions)
1752
+ });
1753
+ }
1754
+ /**
1755
+ * List a Bot's message runs
1756
+ *
1757
+ * Requires agents:invoke and assistant.use. Use a signed-in member session or a member's CLI token. Organization OAuth and Computer credentials cannot access personal Bots.
1758
+ *
1759
+ * `GET /api/v1/bots/{botId}/runs`
1760
+ */
1761
+ listRuns(request, requestOptions) {
1762
+ const { botId, organizationId } = request ?? {};
1763
+ return this._http.request({
1764
+ method: "GET",
1765
+ path: `/api/v1/bots/${encodePathParam("botId", botId)}/runs`,
1766
+ query: { organizationId },
1767
+ body: void 0,
1768
+ ...mergeRequestOptions(requestOptions)
1769
+ });
1770
+ }
1771
+ /**
1772
+ * Send a message to a Bot
1773
+ *
1774
+ * Requires agents:invoke and assistant.use. Use a signed-in member session or a member's CLI token. Organization OAuth and Computer credentials cannot access personal Bots.
1775
+
1776
+ Reuse the same requestId when retrying a submission. The response Location points to the run status.
1777
+ *
1778
+ * `POST /api/v1/bots/{botId}/runs`
1779
+ */
1780
+ sendMessage(request, requestOptions) {
1781
+ const { botId, organizationId, ...body } = request ?? {};
1782
+ return this._http.request({
1783
+ method: "POST",
1784
+ path: `/api/v1/bots/${encodePathParam("botId", botId)}/runs`,
1785
+ query: { organizationId },
1786
+ body,
1787
+ ...mergeRequestOptions(requestOptions)
1788
+ });
1789
+ }
1790
+ /**
1791
+ * Read a Bot message run
1792
+ *
1793
+ * Requires agents:invoke and assistant.use. Use a signed-in member session or a member's CLI token. Organization OAuth and Computer credentials cannot access personal Bots.
1794
+
1795
+ Returns the run's status, visible reply, and approval URL when available. Archived runs retain their status. Reopen their conversation to read the reply after the active run journal expires.
1796
+ *
1797
+ * `GET /api/v1/bots/{botId}/runs/{runId}`
1798
+ */
1799
+ getRun(request, requestOptions) {
1800
+ const { botId, runId, organizationId } = request ?? {};
1801
+ return this._http.request({
1802
+ method: "GET",
1803
+ path: `/api/v1/bots/${encodePathParam("botId", botId)}/runs/${encodePathParam("runId", runId)}`,
1804
+ query: { organizationId },
1805
+ body: void 0,
1806
+ ...mergeRequestOptions(requestOptions)
1807
+ });
1808
+ }
1809
+ };
1451
1810
  var BrandKitsClient = class {
1452
1811
  constructor(_http) {
1453
1812
  __publicField(this, "_http", _http);
@@ -1614,10 +1973,95 @@ var BulkClient = class {
1614
1973
  ...mergeRequestOptions(requestOptions)
1615
1974
  });
1616
1975
  }
1976
+ /**
1977
+ * Create Catalog Operation Plan
1978
+ *
1979
+ * Create a staged pricing, catalog record import, or reviewable enrichment plan for up to one million targets. Add enrichment options for listing copy, images, or store taxonomy, or importRecords for new catalog records. Set importRecords.update on a file plan to prepare exact-SKU price or warehouse stock updates for review. An optional selection filter prepares an enrichment plan server-side. Poll status until draft, review the total, and explicitly submit. Repeat the original create request after an interruption. If the selection exceeds the limit, narrow the filters and create a new plan. The initiating identity can upload ordered chunks and submit the plan when complete. Reusing the same idempotency key and options resumes that plan. Requires catalog:write and catalog:read. Enrichment al
1980
+ *
1981
+ * `POST /api/v1/catalog/operations/plan`
1982
+ */
1983
+ plan(request, requestOptions) {
1984
+ const { organizationId, ...body } = request ?? {};
1985
+ return this._http.request({
1986
+ method: "POST",
1987
+ path: "/api/v1/catalog/operations/plan",
1988
+ query: { organizationId },
1989
+ body,
1990
+ ...mergeRequestOptions(requestOptions)
1991
+ });
1992
+ }
1993
+ /**
1994
+ * Append Catalog Operation Chunk
1995
+ *
1996
+ * Upload up to 500 distinct targets at the next chunkIndex, starting at zero. Provide updates for pricing, productIds for enrichment, or products for record imports. Each product belongs to one chunk. Replaying the same chunk index and content is safe and returns the latest upload progress. Pricing captures product versions when targets are appended. Enrichment receipts identify the linked review and report when generation reaches review. Requires catalog:write.
1997
+ *
1998
+ * `POST /api/v1/catalog/operations/plan/append`
1999
+ */
2000
+ append(request, requestOptions) {
2001
+ const { organizationId, ...body } = request ?? {};
2002
+ return this._http.request({
2003
+ method: "POST",
2004
+ path: "/api/v1/catalog/operations/plan/append",
2005
+ query: { organizationId },
2006
+ body,
2007
+ ...mergeRequestOptions(requestOptions)
2008
+ });
2009
+ }
2010
+ /**
2011
+ * Complete Catalog File
2012
+ *
2013
+ * Queue validation and import after all file parts are uploaded. For importRecords.update, validation ends at ready_for_review. Read the ordered preview with bulk.results and submit explicitly with expectedProductCount. For create-only file imports, validation queues the import automatically. Then follow the same operation in bulk.status and bulk.results. Repeat this request after a retryable interruption. Requires catalog:read and catalog:write.
2014
+ *
2015
+ * `POST /api/v1/catalog/operations/plan/file-complete`
2016
+ */
2017
+ completeFile(request, requestOptions) {
2018
+ const { organizationId, ...body } = request ?? {};
2019
+ return this._http.request({
2020
+ method: "POST",
2021
+ path: "/api/v1/catalog/operations/plan/file-complete",
2022
+ query: { organizationId },
2023
+ body,
2024
+ ...mergeRequestOptions(requestOptions)
2025
+ });
2026
+ }
2027
+ /**
2028
+ * Prepare Catalog File Parts
2029
+ *
2030
+ * Request signed PUT URLs for up to eight file parts. Each is 8 MiB except the final part. Send the exact bytes and x-amz-checksum-sha256 header to the signed URL. Previously uploaded matching parts are skipped. Requires catalog:read and catalog:write.
2031
+ *
2032
+ * `POST /api/v1/catalog/operations/plan/file-parts`
2033
+ */
2034
+ fileParts(request, requestOptions) {
2035
+ const { organizationId, ...body } = request ?? {};
2036
+ return this._http.request({
2037
+ method: "POST",
2038
+ path: "/api/v1/catalog/operations/plan/file-parts",
2039
+ query: { organizationId },
2040
+ body,
2041
+ ...mergeRequestOptions(requestOptions)
2042
+ });
2043
+ }
2044
+ /**
2045
+ * Submit Catalog Operation Plan
2046
+ *
2047
+ * Seal and queue the uploaded plan if its product count matches expectedProductCount. Retry the same request if admission is interrupted. Use bulk.status and bulk.results for progress and receipts. Requires the same scopes as plan creation.
2048
+ *
2049
+ * `POST /api/v1/catalog/operations/plan/submit`
2050
+ */
2051
+ submit(request, requestOptions) {
2052
+ const { organizationId, ...body } = request ?? {};
2053
+ return this._http.request({
2054
+ method: "POST",
2055
+ path: "/api/v1/catalog/operations/plan/submit",
2056
+ query: { organizationId },
2057
+ body,
2058
+ ...mergeRequestOptions(requestOptions)
2059
+ });
2060
+ }
1617
2061
  /**
1618
2062
  * Get Catalog Operation Results
1619
2063
  *
1620
- * Read ordered per-product receipts and verification evidence for up to 50 operationIds. Filter status=failed to inspect failures directly. At most 100 rows across the requested operations per page. Requires catalog:read.
2064
+ * Read ordered per-product receipts and verification evidence for up to 50 operationIds. Filter status=failed to inspect failures directly. Pass nextPageKey as after on the next request, keeping the operation order and status filter the same. At most 100 rows per page. Requires catalog:read.
1621
2065
  *
1622
2066
  * `POST /api/v1/catalog/operations/results`
1623
2067
  */
@@ -1634,7 +2078,7 @@ var BulkClient = class {
1634
2078
  /**
1635
2079
  * Get Catalog Operation Status
1636
2080
  *
1637
- * Read compact progress for up to 50 operationIds in first-requested order. Pending is incomplete, and partial failures remain explicit. Requires catalog:read. Detailed receipts are returned only by the paginated report API.
2081
+ * Read compact progress for up to 50 operationIds in first-requested order. Draft plans are still accepting input. A file update at ready_for_review requires approval via bulk.submit. Pending is incomplete, and partial failures remain explicit. Requires catalog:read. Detailed receipts are returned by the paginated results API.
1638
2082
  *
1639
2083
  * `POST /api/v1/catalog/operations/status`
1640
2084
  */
@@ -2393,6 +2837,27 @@ var EmailClient = class {
2393
2837
  ...mergeRequestOptions(requestOptions)
2394
2838
  });
2395
2839
  }
2840
+ /**
2841
+ * Get Email Drafts
2842
+ *
2843
+ * Read exact unsent drafts in one connected mailbox. Pass one to twenty draft resource IDs, in request order. Duplicate IDs are read once. The result includes a per-draft outcome for every distinct ID.
2844
+
2845
+ ### Authorization
2846
+
2847
+ Requires `email:read` and the integration permission the matching chat tool needs, with a person's credential: a CLI login, a signed-in session, or the SDK key inside your own chat sandbox. Only your own connected mailboxes are reachable; another account's `connectionId` is refused.
2848
+ *
2849
+ * `POST /api/v1/email/drafts/query`
2850
+ */
2851
+ getDrafts(request, requestOptions) {
2852
+ const { ...body } = request ?? {};
2853
+ return this._http.request({
2854
+ method: "POST",
2855
+ path: "/api/v1/email/drafts/query",
2856
+ query: void 0,
2857
+ body,
2858
+ ...mergeRequestOptions(requestOptions)
2859
+ });
2860
+ }
2396
2861
  /**
2397
2862
  * Get Email Message
2398
2863
  *
@@ -2451,6 +2916,27 @@ var EmailClient = class {
2451
2916
  ...mergeRequestOptions(requestOptions)
2452
2917
  });
2453
2918
  }
2919
+ /**
2920
+ * Get Email Thread
2921
+ *
2922
+ * Read the Gmail or Outlook conversation for a `threadId` from Search Emails. Each message includes headers, up to 8,000 characters of plain text, and read and draft state.
2923
+
2924
+ ### Authorization
2925
+
2926
+ Requires `email:read` and the integration permission the matching chat tool needs, with a person's credential: a CLI login, a signed-in session, or the SDK key inside your own chat sandbox. Only your own connected mailboxes are reachable; another account's `connectionId` is refused.
2927
+ *
2928
+ * `GET /api/v1/email/threads/{threadId}`
2929
+ */
2930
+ getThread(request, requestOptions) {
2931
+ const { threadId, connectionId, organizationId } = request ?? {};
2932
+ return this._http.request({
2933
+ method: "GET",
2934
+ path: `/api/v1/email/threads/${encodePathParam("threadId", threadId)}`,
2935
+ query: { connectionId, organizationId },
2936
+ body: void 0,
2937
+ ...mergeRequestOptions(requestOptions)
2938
+ });
2939
+ }
2454
2940
  };
2455
2941
  var EvaluateClient = class {
2456
2942
  constructor(_http) {
@@ -4810,12 +5296,29 @@ var ReviewQueueClient = class {
4810
5296
  ...mergeRequestOptions(requestOptions)
4811
5297
  });
4812
5298
  }
5299
+ /**
5300
+ * Apply Review Queue Corrections
5301
+ *
5302
+ * Requires `catalog:write`. Apply up to 100 item corrections across this job's linked scopes using each workflow's existing proposal validation. editedProposal follows the saved workflow proposal shape returned by items; images select existing candidate IDs. Duplicate item corrections are rejected. Product version and gallery checks remain enforced. Once all scopes commit, saved auto-publish requests continue automatically. Use repair-products for corrections to already approved catalog data.
5303
+ *
5304
+ * `POST /api/v1/review-queue/{batchId}/apply`
5305
+ */
5306
+ apply(request, requestOptions) {
5307
+ const { batchId, ...body } = request ?? {};
5308
+ return this._http.request({
5309
+ method: "POST",
5310
+ path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}/apply`,
5311
+ query: void 0,
5312
+ body,
5313
+ ...mergeRequestOptions(requestOptions)
5314
+ });
5315
+ }
4813
5316
  /**
4814
5317
  * Approve Review Queue Items
4815
5318
  *
4816
5319
  * Requires `catalog:write`.
4817
5320
 
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.
5321
+ Applies up to 100 explicitly selected review item IDs from the job and its linked batches through the normal stale-product and gallery checks. Already applied items are safe to resubmit. Saved auto-publish requests continue after approval commits and all scopes for that product are applied. Otherwise use publish explicitly. Approval is not confirmation of marketplace publication.
4819
5322
  *
4820
5323
  * `POST /api/v1/review-queue/{batchId}/approve`
4821
5324
  */
@@ -4829,12 +5332,54 @@ var ReviewQueueClient = class {
4829
5332
  ...mergeRequestOptions(requestOptions)
4830
5333
  });
4831
5334
  }
5335
+ /**
5336
+ * Diagnose Review Product Publishing
5337
+ *
5338
+ * Requires `catalog:read`. Diagnose 1–25 exact review product or physical variant IDs. Returns current canonical shipping measurements (grams and cm), product facts and images, variant values, exact store/category fields, required/missing attributes, allowed options and the latest publish job's message, code and request ID. No raw provider request bodies or credentials are exposed. Store, variant and attribute-option pages have explicit continuation offsets. success means diagnosis completed; publishReady describes saved catalog validation and does not promise marketplace acceptance. Use product.updatedAt unchanged for repairs. Only targets belonging to this organization and review are accessible.
5339
+ *
5340
+ * `POST /api/v1/review-queue/{batchId}/diagnose`
5341
+ */
5342
+ diagnose(request, requestOptions) {
5343
+ const { batchId, ...body } = request ?? {};
5344
+ return this._http.request({
5345
+ method: "POST",
5346
+ path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}/diagnose`,
5347
+ query: void 0,
5348
+ body,
5349
+ ...mergeRequestOptions(requestOptions)
5350
+ });
5351
+ }
5352
+ /**
5353
+ * List Review Queue Item Details
5354
+ *
5355
+ * Requires `catalog:read`. Pages through saved proposals, issues, current/baseline/applied snapshots and publish receipts across every scope in this review job. Limit 1–50; follow nextOffset until hasMore is false. Repeat productIds to filter up to 50 products. Automation state reports each scope separately; fullyAutomatic describes configuration, not successful approval or publication.
5356
+ *
5357
+ * `GET /api/v1/review-queue/{batchId}/items`
5358
+ */
5359
+ listItems(request, requestOptions) {
5360
+ const {
5361
+ batchId,
5362
+ organizationId,
5363
+ limit,
5364
+ offset,
5365
+ status,
5366
+ workflow,
5367
+ productIds
5368
+ } = request ?? {};
5369
+ return this._http.request({
5370
+ method: "GET",
5371
+ path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}/items`,
5372
+ query: { organizationId, limit, offset, status, workflow, productIds },
5373
+ body: void 0,
5374
+ ...mergeRequestOptions(requestOptions)
5375
+ });
5376
+ }
4832
5377
  /**
4833
5378
  * Publish Review Queue Products
4834
5379
  *
4835
5380
  * Requires `catalog:sync`.
4836
5381
 
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.
5382
+ Specify productIds and visibility. Only products with all review scopes applied and outstanding releases to assigned marketplace stores are eligible. Optionally filter by marketplaces and exact storeTargets to publish only repaired or failed stores. 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 and verify marketplace state before reporting publication.
4838
5383
  *
4839
5384
  * `POST /api/v1/review-queue/{batchId}/publish`
4840
5385
  */
@@ -4848,12 +5393,63 @@ var ReviewQueueClient = class {
4848
5393
  ...mergeRequestOptions(requestOptions)
4849
5394
  });
4850
5395
  }
5396
+ /**
5397
+ * Repair Approved Review Products
5398
+ *
5399
+ * Requires `catalog:write`. Correct 1–25 already approved products with expectedUpdatedAt copied exactly from diagnosis. Patches only supplied weight (grams), complete package dimensions (cm) and exact assigned-store category attributes. Validates keys and fixed-choice values against current marketplace metadata. Records evidence URLs and the initiating actor in review history. Conflicting versions and pending review scopes fail explicitly; correct pending proposals through apply first. Shared category attributes belong to the parent; variant values use the variant API. Does not approve or publish implicitly. Reload diagnosis and publish exact repaired stores after success. Duplicate product corrections are rejected.
5400
+ *
5401
+ * `POST /api/v1/review-queue/{batchId}/repair-products`
5402
+ */
5403
+ repairProducts(request, requestOptions) {
5404
+ const { batchId, ...body } = request ?? {};
5405
+ return this._http.request({
5406
+ method: "POST",
5407
+ path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}/repair-products`,
5408
+ query: void 0,
5409
+ body,
5410
+ ...mergeRequestOptions(requestOptions)
5411
+ });
5412
+ }
5413
+ /**
5414
+ * Retry Review Queue Processing
5415
+ *
5416
+ * Requires `catalog:write`. Explicitly restart existing durable review processing. scope defaults to failed; unfinished also includes unapplied work; all may regenerate applied proposals. Optionally restrict workflow and use a supported review model. No polling schedule is created. Read items to observe processing; this does not confirm publication.
5417
+ *
5418
+ * `POST /api/v1/review-queue/{batchId}/retry`
5419
+ */
5420
+ retry(request, requestOptions) {
5421
+ const { batchId, ...body } = request ?? {};
5422
+ return this._http.request({
5423
+ method: "POST",
5424
+ path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}/retry`,
5425
+ query: void 0,
5426
+ body,
5427
+ ...mergeRequestOptions(requestOptions)
5428
+ });
5429
+ }
5430
+ /**
5431
+ * Enable Review Queue Automation
5432
+ *
5433
+ * Requires both `catalog:write` and `catalog:sync`. Enable auto approval for enrichment, taxonomy and images plus saved auto-publish requests on 1–100 existing root review jobs, through the same durable worker as the app. Applies eligible proposals and continues publishing after all scopes commit. Blocked or unverified facts remain visible for the bot to diagnose and correct. Read items.automation for per-scope configuration and publishing for actual outcomes. Inspect every batch result; acceptance does not mean the job is already fully automatic or published.
5434
+ *
5435
+ * `POST /api/v1/review-queue/automation`
5436
+ */
5437
+ enableAutomation(request, requestOptions) {
5438
+ const { ...body } = request ?? {};
5439
+ return this._http.request({
5440
+ method: "POST",
5441
+ path: "/api/v1/review-queue/automation",
5442
+ query: void 0,
5443
+ body,
5444
+ ...mergeRequestOptions(requestOptions)
5445
+ });
5446
+ }
4851
5447
  /**
4852
5448
  * Get Review Queue Settings
4853
5449
  *
4854
5450
  * Requires catalog:review-settings for bearer credentials and company settings read permission for delegated users.
4855
5451
 
4856
- Returns the organization defaults for enrichment and taxonomy auto-apply confidence.
5452
+ Returns the organization auto-apply switch and enrichment/taxonomy confidence defaults.
4857
5453
  *
4858
5454
  * `GET /api/v1/review-queue/settings`
4859
5455
  */
@@ -4872,7 +5468,7 @@ var ReviewQueueClient = class {
4872
5468
  *
4873
5469
  * Requires catalog:review-settings for bearer credentials and company settings write permission for delegated users.
4874
5470
 
4875
- Update either or both thresholds from 0.50 to 1.00. Existing review jobs retain their saved settings.
5471
+ Set autoApplyHighConfidence and/or confidence thresholds from 0.50 to 1.00. Existing review jobs retain their saved settings.
4876
5472
  *
4877
5473
  * `PATCH /api/v1/review-queue/settings`
4878
5474
  */
@@ -5860,10 +6456,12 @@ var ZaloraClient = class {
5860
6456
  var OmniGeneratedClient = class {
5861
6457
  constructor(_http) {
5862
6458
  __publicField(this, "_http", _http);
6459
+ __publicField(this, "ads");
5863
6460
  __publicField(this, "agents");
5864
6461
  __publicField(this, "analytics");
5865
6462
  __publicField(this, "aop");
5866
6463
  __publicField(this, "api");
6464
+ __publicField(this, "bots");
5867
6465
  __publicField(this, "brandKits");
5868
6466
  __publicField(this, "brandsgateway");
5869
6467
  __publicField(this, "bulk");
@@ -5905,10 +6503,12 @@ var OmniGeneratedClient = class {
5905
6503
  __publicField(this, "webhooks");
5906
6504
  __publicField(this, "wiki");
5907
6505
  __publicField(this, "zalora");
6506
+ this.ads = new AdsClient(this._http);
5908
6507
  this.agents = new AgentsClient(this._http);
5909
6508
  this.analytics = new AnalyticsClient(this._http);
5910
6509
  this.aop = new AopClient(this._http);
5911
6510
  this.api = new ApiClient(this._http);
6511
+ this.bots = new BotsClient(this._http);
5912
6512
  this.brandKits = new BrandKitsClient(this._http);
5913
6513
  this.brandsgateway = new BrandsgatewayClient(this._http);
5914
6514
  this.bulk = new BulkClient(this._http);
@@ -5963,6 +6563,211 @@ var OmniClient = class extends OmniGeneratedClient {
5963
6563
  }
5964
6564
  };
5965
6565
 
6566
+ // src/catalog-file.ts
6567
+ var partSize = 8 * 1024 * 1024;
6568
+ var maxFileSize = 512 * 1024 * 1024;
6569
+ var parallelParts = 4;
6570
+ async function submitCatalogFile(client, request, file, options) {
6571
+ if (!file.size || file.size > maxFileSize)
6572
+ throw new Error("Provide a catalog file between 1 byte and 512 MiB.");
6573
+ if (!options?.digest && !globalThis.crypto?.subtle)
6574
+ throw new Error(
6575
+ "Catalog file uploads require Web Crypto or a SHA-256 digest implementation."
6576
+ );
6577
+ const chunk = (index) => file.slice(index * partSize, (index + 1) * partSize);
6578
+ const hashes = [];
6579
+ const digest = options?.digest ?? ((bytes) => globalThis.crypto.subtle.digest("SHA-256", bytes));
6580
+ const api = options?.signal ? { ...options.api, abortSignal: options.signal } : options?.api;
6581
+ const base64 = (bytes) => btoa(String.fromCharCode(...bytes));
6582
+ const count = Math.ceil(file.size / partSize);
6583
+ const combined = new Uint8Array(count * 32);
6584
+ for (let index = 0; index < count; index++) {
6585
+ options?.signal?.throwIfAborted();
6586
+ const hash = new Uint8Array(
6587
+ await digest(await (await chunk(index)).arrayBuffer())
6588
+ );
6589
+ hashes.push(hash);
6590
+ combined.set(hash, index * 32);
6591
+ }
6592
+ const {
6593
+ organizationId,
6594
+ idempotencyKey,
6595
+ format,
6596
+ title,
6597
+ sessionId,
6598
+ columnMapping,
6599
+ update,
6600
+ syncToMarketplaces
6601
+ } = request;
6602
+ const { data: plan } = await client.bulk.plan(
6603
+ {
6604
+ organizationId,
6605
+ idempotencyKey,
6606
+ sessionId,
6607
+ syncToMarketplaces,
6608
+ importRecords: {
6609
+ title,
6610
+ update,
6611
+ file: {
6612
+ sizeBytes: file.size,
6613
+ format,
6614
+ columnMapping,
6615
+ sha256: base64(new Uint8Array(await digest(combined)))
6616
+ }
6617
+ }
6618
+ },
6619
+ api
6620
+ );
6621
+ if (!plan?.operationId)
6622
+ throw new Error("The server did not return a catalog operation ID.");
6623
+ const target = { organizationId, operationId: plan.operationId };
6624
+ for (let start = 0; start < count; start += parallelParts) {
6625
+ options?.signal?.throwIfAborted();
6626
+ const parts = hashes.slice(start, start + parallelParts).map((hash, index) => ({
6627
+ partNumber: start + index + 1,
6628
+ sha256: base64(hash)
6629
+ }));
6630
+ const { data } = await client.bulk.fileParts({ ...target, parts }, api);
6631
+ if (!data || data.partSizeBytes !== partSize)
6632
+ throw new Error("Invalid catalog upload response.");
6633
+ if (data.accepted) break;
6634
+ if (data.parts.length !== parts.length)
6635
+ throw new Error("The upload response omitted file parts.");
6636
+ const results = await Promise.allSettled(
6637
+ data.parts.map(async (part, index) => {
6638
+ const expected = parts[index];
6639
+ const size = Math.min(
6640
+ partSize,
6641
+ file.size - (expected.partNumber - 1) * partSize
6642
+ );
6643
+ if (part.partNumber !== expected.partNumber || part.sizeBytes !== size)
6644
+ throw new Error("The upload response changed a file part.");
6645
+ if (part.uploaded) return;
6646
+ if (!part.uploadUrl || new URL(part.uploadUrl).protocol !== "https:")
6647
+ throw new Error("The server did not return a secure upload URL.");
6648
+ const body = await chunk(expected.partNumber - 1);
6649
+ if (body.size !== size)
6650
+ throw new Error("The catalog file changed during upload.");
6651
+ const response = await (options?.fetch ?? fetch)(part.uploadUrl, {
6652
+ method: "PUT",
6653
+ body,
6654
+ headers: { "x-amz-checksum-sha256": expected.sha256 },
6655
+ credentials: "omit",
6656
+ redirect: "error",
6657
+ signal: options?.signal
6658
+ });
6659
+ if (!response.ok)
6660
+ throw new Error(
6661
+ `Upload part ${expected.partNumber} returned HTTP ${response.status}. Reuse the same file and key to resume.`
6662
+ );
6663
+ })
6664
+ );
6665
+ for (const result of results)
6666
+ if (result.status === "rejected") throw result.reason;
6667
+ }
6668
+ return client.bulk.completeFile(target, api);
6669
+ }
6670
+ async function* readCatalogFileFailures(client, request, options) {
6671
+ const { organizationId } = request;
6672
+ const operationId = request.operationId.trim().toLowerCase();
6673
+ let after;
6674
+ for (; ; ) {
6675
+ const { data } = await client.bulk.results(
6676
+ {
6677
+ operationIds: [operationId],
6678
+ organizationId,
6679
+ after,
6680
+ status: "failed",
6681
+ limit: 100,
6682
+ includeRequest: false
6683
+ },
6684
+ options
6685
+ );
6686
+ if (!data)
6687
+ throw new Error("The server did not return catalog file results.");
6688
+ yield* data.results;
6689
+ if (!data.hasMore) return;
6690
+ if (!data.nextPageKey || data.nextPageKey.operationId !== operationId || after && data.nextPageKey.ordinal <= after.ordinal)
6691
+ throw new Error(
6692
+ "The server did not advance the catalog file results cursor."
6693
+ );
6694
+ after = data.nextPageKey;
6695
+ }
6696
+ }
6697
+
6698
+ // src/catalog-pricing.ts
6699
+ var CHUNK_SIZE = 500;
6700
+ var CHUNK_BYTES = 7 * 1024 * 1024;
6701
+ async function submitCatalogTargets(client, request, source, appendBody, identity, options) {
6702
+ const { organizationId } = request;
6703
+ const { data: plan } = await client.bulk.plan(request, options);
6704
+ if (!plan?.operationId)
6705
+ throw new Error("The server did not return a catalog plan ID.");
6706
+ const { operationId } = plan;
6707
+ const encoder2 = new TextEncoder();
6708
+ let chunk = [];
6709
+ let chunkSize = 0;
6710
+ let chunkIndex = 0;
6711
+ let expectedProductCount = 0;
6712
+ const append = async () => {
6713
+ await client.bulk.append(
6714
+ { organizationId, operationId, chunkIndex, ...appendBody(chunk) },
6715
+ options
6716
+ );
6717
+ expectedProductCount += new Set(chunk.map(identity)).size;
6718
+ chunkIndex += 1;
6719
+ chunk = [];
6720
+ chunkSize = 0;
6721
+ };
6722
+ for await (const item of source) {
6723
+ const bytes = encoder2.encode(JSON.stringify(item)).byteLength + 1;
6724
+ if (bytes > CHUNK_BYTES)
6725
+ throw new Error("A catalog target exceeds the request size limit.");
6726
+ if (chunk.length && (chunk.length === CHUNK_SIZE || chunkSize + bytes > CHUNK_BYTES))
6727
+ await append();
6728
+ chunk.push(item);
6729
+ chunkSize += bytes;
6730
+ if (chunk.length === CHUNK_SIZE) await append();
6731
+ }
6732
+ if (chunk.length) await append();
6733
+ if (!expectedProductCount)
6734
+ throw new Error("Provide at least one catalog target.");
6735
+ return client.bulk.submit(
6736
+ { organizationId, operationId, expectedProductCount },
6737
+ options
6738
+ );
6739
+ }
6740
+ function submitCatalogPricing(client, request, updates, options) {
6741
+ return submitCatalogTargets(
6742
+ client,
6743
+ request,
6744
+ updates,
6745
+ (rows) => ({ updates: rows }),
6746
+ ({ productId }) => productId.trim().toLowerCase(),
6747
+ options
6748
+ );
6749
+ }
6750
+ function submitCatalogRecords(client, request, products, options) {
6751
+ return submitCatalogTargets(
6752
+ client,
6753
+ { ...request, importRecords: request.importRecords ?? {} },
6754
+ products,
6755
+ (rows) => ({ products: rows }),
6756
+ ({ sku }) => sku.trim(),
6757
+ options
6758
+ );
6759
+ }
6760
+ function submitCatalogEnrichment(client, request, productIds, options) {
6761
+ return submitCatalogTargets(
6762
+ client,
6763
+ request,
6764
+ productIds,
6765
+ (rows) => ({ productIds: rows }),
6766
+ (id) => id.trim().toLowerCase(),
6767
+ options
6768
+ );
6769
+ }
6770
+
5966
6771
  // src/webhooks.ts
5967
6772
  var encoder = new TextEncoder();
5968
6773
  var WEBHOOK_SIGNATURE_HEADER = "x-omni-signature";
@@ -6085,7 +6890,12 @@ exports.WEBHOOK_EVENT_TYPE_HEADER = WEBHOOK_EVENT_TYPE_HEADER;
6085
6890
  exports.WEBHOOK_SIGNATURE_HEADER = WEBHOOK_SIGNATURE_HEADER;
6086
6891
  exports.WEBHOOK_TIMESTAMP_HEADER = WEBHOOK_TIMESTAMP_HEADER;
6087
6892
  exports.constructEvent = constructEvent;
6893
+ exports.readCatalogFileFailures = readCatalogFileFailures;
6088
6894
  exports.signWebhookPayload = signWebhookPayload;
6895
+ exports.submitCatalogEnrichment = submitCatalogEnrichment;
6896
+ exports.submitCatalogFile = submitCatalogFile;
6897
+ exports.submitCatalogPricing = submitCatalogPricing;
6898
+ exports.submitCatalogRecords = submitCatalogRecords;
6089
6899
  exports.verifyWebhookSignature = verifyWebhookSignature;
6090
6900
  //# sourceMappingURL=index.cjs.map
6091
6901
  //# sourceMappingURL=index.cjs.map