@omni-commerce/sdk 0.12.0 → 0.13.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.d.cts CHANGED
@@ -1738,7 +1738,17 @@ interface paths {
1738
1738
  put?: never;
1739
1739
  /**
1740
1740
  * Publish Product
1741
- * @description Queue marketplace publish jobs for a product by productId. OmniCommerce publishes to the marketplaces already enabled on the product and uses the product's store selection or a single/default connected store.
1741
+ * @description ### Publishing
1742
+ *
1743
+ * Queue durable marketplace publish/update jobs for a product. Omit marketplaces to use every enabled or already listed marketplace, or name the marketplaces to target. Omit updateFields for a full publish with live/draft visibility. Set updateFields to update only saved values for those fields on existing listings with assigned stores; other fields and listing visibility stay unchanged. No new listing is created by a selected-field update.
1744
+ *
1745
+ * ### Marketplace capabilities
1746
+ *
1747
+ * SEO is Shopify-only; highlights support Lazada, TikTok and Amazon; attributes exclude WhatsApp. Category-only updates require a full publish on TikTok and Amazon. Unsupported combinations and missing listings/stores return explicit per-marketplace failures while valid targets continue.
1748
+ *
1749
+ * ### Completion
1750
+ *
1751
+ * Accepted means queued; inspect every result and await every jobId and inventory correlation with jobs.wait, then verify the listings.
1742
1752
  */
1743
1753
  post: operations["post_v1_products_by_productid_publish"];
1744
1754
  delete?: never;
@@ -2696,6 +2706,261 @@ interface components {
2696
2706
  | "za"
2697
2707
  | "zm"
2698
2708
  | "zw";
2709
+ /**
2710
+ * @description Country code or the global connection region for a Zalora Global Seller Center store. This exception applies only to marketplaces.zalora.country; targetCountries continues to require ISO country codes.
2711
+ * @enum {string}
2712
+ */
2713
+ ZaloraProductCountry:
2714
+ | "ad"
2715
+ | "ae"
2716
+ | "af"
2717
+ | "ag"
2718
+ | "ai"
2719
+ | "al"
2720
+ | "am"
2721
+ | "ao"
2722
+ | "aq"
2723
+ | "ar"
2724
+ | "as"
2725
+ | "at"
2726
+ | "au"
2727
+ | "aw"
2728
+ | "ax"
2729
+ | "az"
2730
+ | "ba"
2731
+ | "bb"
2732
+ | "bd"
2733
+ | "be"
2734
+ | "bf"
2735
+ | "bg"
2736
+ | "bh"
2737
+ | "bi"
2738
+ | "bj"
2739
+ | "bl"
2740
+ | "bm"
2741
+ | "bn"
2742
+ | "bo"
2743
+ | "bq"
2744
+ | "br"
2745
+ | "bs"
2746
+ | "bt"
2747
+ | "bv"
2748
+ | "bw"
2749
+ | "by"
2750
+ | "bz"
2751
+ | "ca"
2752
+ | "cc"
2753
+ | "cd"
2754
+ | "cf"
2755
+ | "cg"
2756
+ | "ch"
2757
+ | "ci"
2758
+ | "ck"
2759
+ | "cl"
2760
+ | "cm"
2761
+ | "cn"
2762
+ | "co"
2763
+ | "cr"
2764
+ | "cu"
2765
+ | "cv"
2766
+ | "cw"
2767
+ | "cx"
2768
+ | "cy"
2769
+ | "cz"
2770
+ | "de"
2771
+ | "dj"
2772
+ | "dk"
2773
+ | "dm"
2774
+ | "do"
2775
+ | "dz"
2776
+ | "ec"
2777
+ | "ee"
2778
+ | "eg"
2779
+ | "eh"
2780
+ | "er"
2781
+ | "es"
2782
+ | "et"
2783
+ | "fi"
2784
+ | "fj"
2785
+ | "fk"
2786
+ | "fm"
2787
+ | "fo"
2788
+ | "fr"
2789
+ | "ga"
2790
+ | "gb"
2791
+ | "gd"
2792
+ | "ge"
2793
+ | "gf"
2794
+ | "gg"
2795
+ | "gh"
2796
+ | "gi"
2797
+ | "gl"
2798
+ | "gm"
2799
+ | "gn"
2800
+ | "gp"
2801
+ | "gq"
2802
+ | "gr"
2803
+ | "gs"
2804
+ | "gt"
2805
+ | "gu"
2806
+ | "gw"
2807
+ | "gy"
2808
+ | "hk"
2809
+ | "hm"
2810
+ | "hn"
2811
+ | "hr"
2812
+ | "ht"
2813
+ | "hu"
2814
+ | "id"
2815
+ | "ie"
2816
+ | "il"
2817
+ | "im"
2818
+ | "in"
2819
+ | "io"
2820
+ | "iq"
2821
+ | "ir"
2822
+ | "is"
2823
+ | "it"
2824
+ | "je"
2825
+ | "jm"
2826
+ | "jo"
2827
+ | "jp"
2828
+ | "ke"
2829
+ | "kg"
2830
+ | "kh"
2831
+ | "ki"
2832
+ | "km"
2833
+ | "kn"
2834
+ | "kp"
2835
+ | "kr"
2836
+ | "kw"
2837
+ | "ky"
2838
+ | "kz"
2839
+ | "la"
2840
+ | "lb"
2841
+ | "lc"
2842
+ | "li"
2843
+ | "lk"
2844
+ | "lr"
2845
+ | "ls"
2846
+ | "lt"
2847
+ | "lu"
2848
+ | "lv"
2849
+ | "ly"
2850
+ | "ma"
2851
+ | "mc"
2852
+ | "md"
2853
+ | "me"
2854
+ | "mf"
2855
+ | "mg"
2856
+ | "mh"
2857
+ | "mk"
2858
+ | "ml"
2859
+ | "mm"
2860
+ | "mn"
2861
+ | "mo"
2862
+ | "mp"
2863
+ | "mq"
2864
+ | "mr"
2865
+ | "ms"
2866
+ | "mt"
2867
+ | "mu"
2868
+ | "mv"
2869
+ | "mw"
2870
+ | "mx"
2871
+ | "my"
2872
+ | "mz"
2873
+ | "na"
2874
+ | "nc"
2875
+ | "ne"
2876
+ | "nf"
2877
+ | "ng"
2878
+ | "ni"
2879
+ | "nl"
2880
+ | "no"
2881
+ | "np"
2882
+ | "nr"
2883
+ | "nu"
2884
+ | "nz"
2885
+ | "om"
2886
+ | "pa"
2887
+ | "pe"
2888
+ | "pf"
2889
+ | "pg"
2890
+ | "ph"
2891
+ | "pk"
2892
+ | "pl"
2893
+ | "pm"
2894
+ | "pn"
2895
+ | "pr"
2896
+ | "ps"
2897
+ | "pt"
2898
+ | "pw"
2899
+ | "py"
2900
+ | "qa"
2901
+ | "re"
2902
+ | "ro"
2903
+ | "rs"
2904
+ | "ru"
2905
+ | "rw"
2906
+ | "sa"
2907
+ | "sb"
2908
+ | "sc"
2909
+ | "sd"
2910
+ | "se"
2911
+ | "sg"
2912
+ | "sh"
2913
+ | "si"
2914
+ | "sj"
2915
+ | "sk"
2916
+ | "sl"
2917
+ | "sm"
2918
+ | "sn"
2919
+ | "so"
2920
+ | "sr"
2921
+ | "ss"
2922
+ | "st"
2923
+ | "sv"
2924
+ | "sx"
2925
+ | "sy"
2926
+ | "sz"
2927
+ | "tc"
2928
+ | "td"
2929
+ | "tf"
2930
+ | "tg"
2931
+ | "th"
2932
+ | "tj"
2933
+ | "tk"
2934
+ | "tl"
2935
+ | "tm"
2936
+ | "tn"
2937
+ | "to"
2938
+ | "tr"
2939
+ | "tt"
2940
+ | "tv"
2941
+ | "tw"
2942
+ | "tz"
2943
+ | "ua"
2944
+ | "ug"
2945
+ | "um"
2946
+ | "us"
2947
+ | "uy"
2948
+ | "uz"
2949
+ | "va"
2950
+ | "vc"
2951
+ | "ve"
2952
+ | "vg"
2953
+ | "vi"
2954
+ | "vn"
2955
+ | "vu"
2956
+ | "wf"
2957
+ | "ws"
2958
+ | "ye"
2959
+ | "yt"
2960
+ | "za"
2961
+ | "zm"
2962
+ | "zw"
2963
+ | "global";
2699
2964
  CampaignPlan: {
2700
2965
  brief: {
2701
2966
  name: string;
@@ -14171,11 +14436,11 @@ interface operations {
14171
14436
  /** @description Alias/source hint used for category name when present. */
14172
14437
  product_type?: string;
14173
14438
  /**
14174
- * @description Select connected stores with `product.marketplaces.<platform>.storeId` and set each store's `country`. This request supports one store and country per marketplace.
14439
+ * @description Select connected stores with `product.marketplaces.<platform>.storeId`. This request supports one store and country per marketplace.
14175
14440
  *
14176
14441
  * Get store IDs from `GET /api/v1/marketplaces/connected` ([List Connected Marketplaces](/api-reference/developer-platform/list-connected-marketplaces)). Copy `storeId` from the matching entry in `connectedMarketplaces`; use a store connected to the authenticated organization.
14177
14442
  *
14178
- * Use an ISO 3166-1 alpha-2 country code, such as `sg` or `my`. Codes are trimmed and normalized to lowercase. Country names such as `Singapore`, custom values, and `global` are rejected with HTTP 400. Country is not inferred from storeId.
14443
+ * Use an ISO 3166-1 alpha-2 country code, such as `sg` or `my`. For a Zalora Global Seller Center store, set `product.marketplaces.zalora.country` to `global`. Provided values are trimmed and normalized to lowercase. Country names such as `Singapore` and custom values are rejected with HTTP 400. When country is omitted, ingestion resolves it from the selected connected store.
14179
14444
  *
14180
14445
  * When top-level `targetMarketplaces` and `targetCountries` are omitted, targets are inferred from these entries. A marketplace's `country` takes precedence over the first top-level target country for its saved assignment.
14181
14446
  *
@@ -14238,7 +14503,7 @@ interface operations {
14238
14503
  zalora?: {
14239
14504
  /** @description Enable this marketplace on the product. On create, when top-level targetMarketplaces is omitted, entries with enabled set to true or omitted become targets. */
14240
14505
  enabled?: boolean;
14241
- country?: components["schemas"]["ProductCountryCode"];
14506
+ country?: components["schemas"]["ZaloraProductCountry"];
14242
14507
  /** @description Connected store ID. Copy connectedMarketplaces[].storeId from GET /api/v1/marketplaces/connected for this marketplace and country. */
14243
14508
  storeId?: string;
14244
14509
  } & {
@@ -14803,7 +15068,7 @@ interface operations {
14803
15068
  zalora?: {
14804
15069
  /** @description Enable this marketplace on the product. On create, when top-level targetMarketplaces is omitted, entries with enabled set to true or omitted become targets. */
14805
15070
  enabled?: boolean;
14806
- country?: components["schemas"]["ProductCountryCode"];
15071
+ country?: components["schemas"]["ZaloraProductCountry"];
14807
15072
  /** @description Connected store ID. Copy connectedMarketplaces[].storeId from GET /api/v1/marketplaces/connected for this marketplace and country. */
14808
15073
  storeId?: string;
14809
15074
  } & {
@@ -15716,12 +15981,43 @@ interface operations {
15716
15981
  content: {
15717
15982
  /**
15718
15983
  * @example {
15719
- * "visibility": "live"
15984
+ * "marketplaces": [
15985
+ * "shopee",
15986
+ * "lazada"
15987
+ * ],
15988
+ * "updateFields": [
15989
+ * "name",
15990
+ * "description",
15991
+ * "images"
15992
+ * ]
15720
15993
  * }
15721
15994
  */
15722
15995
  "application/json": {
15723
15996
  /** @description Optional for API-key requests; required for session-authenticated requests across multiple organizations. */
15724
15997
  organizationId?: string;
15998
+ /** @description Optional marketplaces to publish/update. Omit to target every enabled or already listed marketplace. Duplicates are removed in first-requested order. */
15999
+ marketplaces?: (
16000
+ | "lazada"
16001
+ | "shopee"
16002
+ | "tiktok"
16003
+ | "shopify"
16004
+ | "whatsapp"
16005
+ | "zalora"
16006
+ | "amazon"
16007
+ | "ebay"
16008
+ )[];
16009
+ /** @description Optional fields to publish from saved product data to existing listings only. Omit for all fields. Other fields and listing visibility remain unchanged. Empty/unknown fields are rejected; duplicates are removed. Platform capability limits appear in per-target results. */
16010
+ updateFields?: (
16011
+ | "name"
16012
+ | "description"
16013
+ | "images"
16014
+ | "category"
16015
+ | "attributes"
16016
+ | "highlights"
16017
+ | "seo"
16018
+ | "price"
16019
+ | "inventory"
16020
+ )[];
15725
16021
  /**
15726
16022
  * @description Publish visibility mode.
15727
16023
  * @default live
@@ -15749,9 +16045,67 @@ interface operations {
15749
16045
  jobId?: string;
15750
16046
  data?: {
15751
16047
  queued?: boolean;
15752
- results?: {
16048
+ jobBatchId?: string;
16049
+ results?: ({
16050
+ ok: boolean;
16051
+ queued?: boolean;
16052
+ productId: string;
16053
+ sourceProductId?: string;
16054
+ productName?: string;
16055
+ /** @enum {string} */
16056
+ marketplace?:
16057
+ | "lazada"
16058
+ | "shopee"
16059
+ | "tiktok"
16060
+ | "shopify"
16061
+ | "whatsapp"
16062
+ | "zalora"
16063
+ | "amazon"
16064
+ | "ebay";
16065
+ /** @enum {string} */
16066
+ action?: "created" | "updated";
16067
+ /**
16068
+ * @description Requested visibility; selected-field updates preserve existing listing visibility.
16069
+ * @enum {string}
16070
+ */
16071
+ visibility?: "live" | "draft";
16072
+ updateFields?: (
16073
+ | "name"
16074
+ | "description"
16075
+ | "images"
16076
+ | "category"
16077
+ | "attributes"
16078
+ | "highlights"
16079
+ | "seo"
16080
+ | "price"
16081
+ | "inventory"
16082
+ )[];
16083
+ /** @description Await this durable job with jobs.wait. */
16084
+ jobId?: string;
16085
+ error?: string;
16086
+ status?: number;
16087
+ message?: string;
16088
+ correlations?: {
16089
+ /** @enum {string} */
16090
+ kind: "inventory_job";
16091
+ /** @description Inventory job ID; await every returned correlation with jobs.wait. */
16092
+ id: string;
16093
+ /** @enum {string} */
16094
+ platform?:
16095
+ | "lazada"
16096
+ | "shopee"
16097
+ | "tiktok"
16098
+ | "shopify"
16099
+ | "whatsapp"
16100
+ | "zalora"
16101
+ | "amazon"
16102
+ | "ebay";
16103
+ storeId?: string;
16104
+ productId?: string;
16105
+ }[];
16106
+ } & {
15753
16107
  [key: string]: unknown;
15754
- }[];
16108
+ })[];
15755
16109
  };
15756
16110
  };
15757
16111
  };
@@ -22048,7 +22402,17 @@ declare class ProductsClient {
22048
22402
  /**
22049
22403
  * Publish Product
22050
22404
  *
22051
- * Queue marketplace publish jobs for a product by productId. OmniCommerce publishes to the marketplaces already enabled on the product and uses the product's store selection or a single/default connected store.
22405
+ * ### Publishing
22406
+
22407
+ Queue durable marketplace publish/update jobs for a product. Omit marketplaces to use every enabled or already listed marketplace, or name the marketplaces to target. Omit updateFields for a full publish with live/draft visibility. Set updateFields to update only saved values for those fields on existing listings with assigned stores; other fields and listing visibility stay unchanged. No new listing is created by a selected-field update.
22408
+
22409
+ ### Marketplace capabilities
22410
+
22411
+ SEO is Shopify-only; highlights support Lazada, TikTok and Amazon; attributes exclude WhatsApp. Category-only updates require a full publish on TikTok and Amazon. Unsupported combinations and missing listings/stores return explicit per-marketplace failures while valid targets continue.
22412
+
22413
+ ### Completion
22414
+
22415
+ Accept
22052
22416
  *
22053
22417
  * `POST /api/v1/products/{productId}/publish`
22054
22418
  */
@@ -22601,7 +22965,7 @@ declare function constructEvent(payload: string | Uint8Array, headers: WebhookHe
22601
22965
  toleranceInSeconds?: number;
22602
22966
  }): Promise<ConstructedWebhookEvent>;
22603
22967
 
22604
- declare const SDK_VERSION = "0.12.0";
22968
+ declare const SDK_VERSION = "0.13.0";
22605
22969
 
22606
22970
  type ProductCreatedWebhookEvent = components["schemas"]["ProductCreatedWebhookEvent"];
22607
22971
  type ProductUpdatedWebhookEvent = components["schemas"]["ProductUpdatedWebhookEvent"];