@commercelayer/sdk 2.1.0-alpha.0 → 2.1.0-alpha.4

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/lib/sdk.esm.js CHANGED
@@ -15737,460 +15737,23 @@ var WireTransfers = /*#__PURE__*/function (_ApiResource) {
15737
15737
  WireTransfers.TYPE = 'wire_transfers';
15738
15738
 
15739
15739
  // ##__API_RESOURCES_START__##
15740
- var resourcMap = {
15741
- // ##__API_RESOURCE_MAP_START__##
15742
- addresses: {
15743
- name: 'address',
15744
- type: 'addresses',
15745
- api: 'addresses'
15746
- },
15747
- adjustments: {
15748
- name: 'adjustment',
15749
- type: 'adjustments',
15750
- api: 'adjustments'
15751
- },
15752
- adyen_gateways: {
15753
- name: 'adyen_gateway',
15754
- type: 'adyen_gateways',
15755
- api: 'adyen_gateways'
15756
- },
15757
- adyen_payments: {
15758
- name: 'adyen_payment',
15759
- type: 'adyen_payments',
15760
- api: 'adyen_payments'
15761
- },
15762
- application: {
15763
- name: 'application',
15764
- type: 'application',
15765
- api: 'application'
15766
- },
15767
- attachments: {
15768
- name: 'attachment',
15769
- type: 'attachments',
15770
- api: 'attachments'
15771
- },
15772
- authorizations: {
15773
- name: 'authorization',
15774
- type: 'authorizations',
15775
- api: 'authorizations'
15776
- },
15777
- avalara_accounts: {
15778
- name: 'avalara_account',
15779
- type: 'avalara_accounts',
15780
- api: 'avalara_accounts'
15781
- },
15782
- billing_info_validation_rules: {
15783
- name: 'billing_info_validation_rule',
15784
- type: 'billing_info_validation_rules',
15785
- api: 'billing_info_validation_rules'
15786
- },
15787
- bing_geocoders: {
15788
- name: 'bing_geocoder',
15789
- type: 'bing_geocoders',
15790
- api: 'bing_geocoders'
15791
- },
15792
- braintree_gateways: {
15793
- name: 'braintree_gateway',
15794
- type: 'braintree_gateways',
15795
- api: 'braintree_gateways'
15796
- },
15797
- braintree_payments: {
15798
- name: 'braintree_payment',
15799
- type: 'braintree_payments',
15800
- api: 'braintree_payments'
15801
- },
15802
- bundles: {
15803
- name: 'bundle',
15804
- type: 'bundles',
15805
- api: 'bundles'
15806
- },
15807
- captures: {
15808
- name: 'capture',
15809
- type: 'captures',
15810
- api: 'captures'
15811
- },
15812
- carrier_accounts: {
15813
- name: 'carrier_account',
15814
- type: 'carrier_accounts',
15815
- api: 'carrier_accounts'
15816
- },
15817
- checkout_com_gateways: {
15818
- name: 'checkout_com_gateway',
15819
- type: 'checkout_com_gateways',
15820
- api: 'checkout_com_gateways'
15821
- },
15822
- checkout_com_payments: {
15823
- name: 'checkout_com_payment',
15824
- type: 'checkout_com_payments',
15825
- api: 'checkout_com_payments'
15826
- },
15827
- coupon_codes_promotion_rules: {
15828
- name: 'coupon_codes_promotion_rule',
15829
- type: 'coupon_codes_promotion_rules',
15830
- api: 'coupon_codes_promotion_rules'
15831
- },
15832
- coupons: {
15833
- name: 'coupon',
15834
- type: 'coupons',
15835
- api: 'coupons'
15836
- },
15837
- customer_addresses: {
15838
- name: 'customer_address',
15839
- type: 'customer_addresses',
15840
- api: 'customer_addresses'
15841
- },
15842
- customer_groups: {
15843
- name: 'customer_group',
15844
- type: 'customer_groups',
15845
- api: 'customer_groups'
15846
- },
15847
- customer_password_resets: {
15848
- name: 'customer_password_reset',
15849
- type: 'customer_password_resets',
15850
- api: 'customer_password_resets'
15851
- },
15852
- customer_payment_sources: {
15853
- name: 'customer_payment_source',
15854
- type: 'customer_payment_sources',
15855
- api: 'customer_payment_sources'
15856
- },
15857
- customer_subscriptions: {
15858
- name: 'customer_subscription',
15859
- type: 'customer_subscriptions',
15860
- api: 'customer_subscriptions'
15861
- },
15862
- customers: {
15863
- name: 'customer',
15864
- type: 'customers',
15865
- api: 'customers'
15866
- },
15867
- delivery_lead_times: {
15868
- name: 'delivery_lead_time',
15869
- type: 'delivery_lead_times',
15870
- api: 'delivery_lead_times'
15871
- },
15872
- external_gateways: {
15873
- name: 'external_gateway',
15874
- type: 'external_gateways',
15875
- api: 'external_gateways'
15876
- },
15877
- external_payments: {
15878
- name: 'external_payment',
15879
- type: 'external_payments',
15880
- api: 'external_payments'
15881
- },
15882
- external_promotions: {
15883
- name: 'external_promotion',
15884
- type: 'external_promotions',
15885
- api: 'external_promotions'
15886
- },
15887
- external_tax_calculators: {
15888
- name: 'external_tax_calculator',
15889
- type: 'external_tax_calculators',
15890
- api: 'external_tax_calculators'
15891
- },
15892
- fixed_amount_promotions: {
15893
- name: 'fixed_amount_promotion',
15894
- type: 'fixed_amount_promotions',
15895
- api: 'fixed_amount_promotions'
15896
- },
15897
- free_shipping_promotions: {
15898
- name: 'free_shipping_promotion',
15899
- type: 'free_shipping_promotions',
15900
- api: 'free_shipping_promotions'
15901
- },
15902
- geocoders: {
15903
- name: 'geocoder',
15904
- type: 'geocoders',
15905
- api: 'geocoders'
15906
- },
15907
- gift_card_recipients: {
15908
- name: 'gift_card_recipient',
15909
- type: 'gift_card_recipients',
15910
- api: 'gift_card_recipients'
15911
- },
15912
- gift_cards: {
15913
- name: 'gift_card',
15914
- type: 'gift_cards',
15915
- api: 'gift_cards'
15916
- },
15917
- google_geocoders: {
15918
- name: 'google_geocoder',
15919
- type: 'google_geocoders',
15920
- api: 'google_geocoders'
15921
- },
15922
- imports: {
15923
- name: 'import',
15924
- type: 'imports',
15925
- api: 'imports'
15926
- },
15927
- in_stock_subscriptions: {
15928
- name: 'in_stock_subscription',
15929
- type: 'in_stock_subscriptions',
15930
- api: 'in_stock_subscriptions'
15931
- },
15932
- inventory_models: {
15933
- name: 'inventory_model',
15934
- type: 'inventory_models',
15935
- api: 'inventory_models'
15936
- },
15937
- inventory_return_locations: {
15938
- name: 'inventory_return_location',
15939
- type: 'inventory_return_locations',
15940
- api: 'inventory_return_locations'
15941
- },
15942
- inventory_stock_locations: {
15943
- name: 'inventory_stock_location',
15944
- type: 'inventory_stock_locations',
15945
- api: 'inventory_stock_locations'
15946
- },
15947
- line_item_options: {
15948
- name: 'line_item_option',
15949
- type: 'line_item_options',
15950
- api: 'line_item_options'
15951
- },
15952
- line_items: {
15953
- name: 'line_item',
15954
- type: 'line_items',
15955
- api: 'line_items'
15956
- },
15957
- manual_gateways: {
15958
- name: 'manual_gateway',
15959
- type: 'manual_gateways',
15960
- api: 'manual_gateways'
15961
- },
15962
- manual_tax_calculators: {
15963
- name: 'manual_tax_calculator',
15964
- type: 'manual_tax_calculators',
15965
- api: 'manual_tax_calculators'
15966
- },
15967
- markets: {
15968
- name: 'market',
15969
- type: 'markets',
15970
- api: 'markets'
15971
- },
15972
- merchants: {
15973
- name: 'merchant',
15974
- type: 'merchants',
15975
- api: 'merchants'
15976
- },
15977
- order_amount_promotion_rules: {
15978
- name: 'order_amount_promotion_rule',
15979
- type: 'order_amount_promotion_rules',
15980
- api: 'order_amount_promotion_rules'
15981
- },
15982
- order_copies: {
15983
- name: 'order_copy',
15984
- type: 'order_copies',
15985
- api: 'order_copies'
15986
- },
15987
- order_subscriptions: {
15988
- name: 'order_subscription',
15989
- type: 'order_subscriptions',
15990
- api: 'order_subscriptions'
15991
- },
15992
- orders: {
15993
- name: 'order',
15994
- type: 'orders',
15995
- api: 'orders'
15996
- },
15997
- organization: {
15998
- name: 'organization',
15999
- type: 'organization',
16000
- api: 'organization'
16001
- },
16002
- packages: {
16003
- name: 'package',
16004
- type: 'packages',
16005
- api: 'packages'
16006
- },
16007
- parcel_line_items: {
16008
- name: 'parcel_line_item',
16009
- type: 'parcel_line_items',
16010
- api: 'parcel_line_items'
16011
- },
16012
- parcels: {
16013
- name: 'parcel',
16014
- type: 'parcels',
16015
- api: 'parcels'
16016
- },
16017
- payment_gateways: {
16018
- name: 'payment_gateway',
16019
- type: 'payment_gateways',
16020
- api: 'payment_gateways'
16021
- },
16022
- payment_methods: {
16023
- name: 'payment_method',
16024
- type: 'payment_methods',
16025
- api: 'payment_methods'
16026
- },
16027
- paypal_gateways: {
16028
- name: 'paypal_gateway',
16029
- type: 'paypal_gateways',
16030
- api: 'paypal_gateways'
16031
- },
16032
- paypal_payments: {
16033
- name: 'paypal_payment',
16034
- type: 'paypal_payments',
16035
- api: 'paypal_payments'
16036
- },
16037
- percentage_discount_promotions: {
16038
- name: 'percentage_discount_promotion',
16039
- type: 'percentage_discount_promotions',
16040
- api: 'percentage_discount_promotions'
16041
- },
16042
- price_lists: {
16043
- name: 'price_list',
16044
- type: 'price_lists',
16045
- api: 'price_lists'
16046
- },
16047
- prices: {
16048
- name: 'price',
16049
- type: 'prices',
16050
- api: 'prices'
16051
- },
16052
- promotion_rules: {
16053
- name: 'promotion_rule',
16054
- type: 'promotion_rules',
16055
- api: 'promotion_rules'
16056
- },
16057
- promotions: {
16058
- name: 'promotion',
16059
- type: 'promotions',
16060
- api: 'promotions'
16061
- },
16062
- refunds: {
16063
- name: 'refund',
16064
- type: 'refunds',
16065
- api: 'refunds'
16066
- },
16067
- return_line_items: {
16068
- name: 'return_line_item',
16069
- type: 'return_line_items',
16070
- api: 'return_line_items'
16071
- },
16072
- returns: {
16073
- name: 'return',
16074
- type: 'returns',
16075
- api: 'returns'
16076
- },
16077
- shipments: {
16078
- name: 'shipment',
16079
- type: 'shipments',
16080
- api: 'shipments'
16081
- },
16082
- shipping_categories: {
16083
- name: 'shipping_category',
16084
- type: 'shipping_categories',
16085
- api: 'shipping_categories'
16086
- },
16087
- shipping_methods: {
16088
- name: 'shipping_method',
16089
- type: 'shipping_methods',
16090
- api: 'shipping_methods'
16091
- },
16092
- shipping_zones: {
16093
- name: 'shipping_zone',
16094
- type: 'shipping_zones',
16095
- api: 'shipping_zones'
16096
- },
16097
- sku_list_items: {
16098
- name: 'sku_list_item',
16099
- type: 'sku_list_items',
16100
- api: 'sku_list_items'
16101
- },
16102
- sku_list_promotion_rules: {
16103
- name: 'sku_list_promotion_rule',
16104
- type: 'sku_list_promotion_rules',
16105
- api: 'sku_list_promotion_rules'
16106
- },
16107
- sku_lists: {
16108
- name: 'sku_list',
16109
- type: 'sku_lists',
16110
- api: 'sku_lists'
16111
- },
16112
- sku_options: {
16113
- name: 'sku_option',
16114
- type: 'sku_options',
16115
- api: 'sku_options'
16116
- },
16117
- skus: {
16118
- name: 'sku',
16119
- type: 'skus',
16120
- api: 'skus'
16121
- },
16122
- stock_items: {
16123
- name: 'stock_item',
16124
- type: 'stock_items',
16125
- api: 'stock_items'
16126
- },
16127
- stock_line_items: {
16128
- name: 'stock_line_item',
16129
- type: 'stock_line_items',
16130
- api: 'stock_line_items'
16131
- },
16132
- stock_locations: {
16133
- name: 'stock_location',
16134
- type: 'stock_locations',
16135
- api: 'stock_locations'
16136
- },
16137
- stock_transfers: {
16138
- name: 'stock_transfer',
16139
- type: 'stock_transfers',
16140
- api: 'stock_transfers'
16141
- },
16142
- stripe_gateways: {
16143
- name: 'stripe_gateway',
16144
- type: 'stripe_gateways',
16145
- api: 'stripe_gateways'
16146
- },
16147
- stripe_payments: {
16148
- name: 'stripe_payment',
16149
- type: 'stripe_payments',
16150
- api: 'stripe_payments'
16151
- },
16152
- tax_calculators: {
16153
- name: 'tax_calculator',
16154
- type: 'tax_calculators',
16155
- api: 'tax_calculators'
16156
- },
16157
- tax_categories: {
16158
- name: 'tax_category',
16159
- type: 'tax_categories',
16160
- api: 'tax_categories'
16161
- },
16162
- tax_rules: {
16163
- name: 'tax_rule',
16164
- type: 'tax_rules',
16165
- api: 'tax_rules'
16166
- },
16167
- taxjar_accounts: {
16168
- name: 'taxjar_account',
16169
- type: 'taxjar_accounts',
16170
- api: 'taxjar_accounts'
16171
- },
16172
- transactions: {
16173
- name: 'transaction',
16174
- type: 'transactions',
16175
- api: 'transactions'
16176
- },
16177
- voids: {
16178
- name: 'void',
16179
- type: 'voids',
16180
- api: 'voids'
16181
- },
16182
- webhooks: {
16183
- name: 'webhook',
16184
- type: 'webhooks',
16185
- api: 'webhooks'
16186
- },
16187
- wire_transfers: {
16188
- name: 'wire_transfer',
16189
- type: 'wire_transfers',
16190
- api: 'wire_transfers'
16191
- } // ##__API_RESOURCE_MAP_STOP__##
16192
15740
 
16193
- };
15741
+ var resourceList = [// ##__API_RESOURCE_LIST_START__##
15742
+ 'addresses', 'adjustments', 'adyen_gateways', 'adyen_payments', 'application', 'attachments', 'authorizations', 'avalara_accounts', 'billing_info_validation_rules', 'bing_geocoders', 'braintree_gateways', 'braintree_payments', 'bundles', 'captures', 'carrier_accounts', 'checkout_com_gateways', 'checkout_com_payments', 'coupon_codes_promotion_rules', 'coupons', 'customer_addresses', 'customer_groups', 'customer_password_resets', 'customer_payment_sources', 'customer_subscriptions', 'customers', 'delivery_lead_times', 'external_gateways', 'external_payments', 'external_promotions', 'external_tax_calculators', 'fixed_amount_promotions', 'free_shipping_promotions', 'geocoders', 'gift_card_recipients', 'gift_cards', 'google_geocoders', 'imports', 'in_stock_subscriptions', 'inventory_models', 'inventory_return_locations', 'inventory_stock_locations', 'line_item_options', 'line_items', 'manual_gateways', 'manual_tax_calculators', 'markets', 'merchants', 'order_amount_promotion_rules', 'order_copies', 'order_subscriptions', 'orders', 'organization', 'packages', 'parcel_line_items', 'parcels', 'payment_gateways', 'payment_methods', 'paypal_gateways', 'paypal_payments', 'percentage_discount_promotions', 'price_lists', 'prices', 'promotion_rules', 'promotions', 'refunds', 'return_line_items', 'returns', 'shipments', 'shipping_categories', 'shipping_methods', 'shipping_zones', 'sku_list_items', 'sku_list_promotion_rules', 'sku_lists', 'sku_options', 'skus', 'stock_items', 'stock_line_items', 'stock_locations', 'stock_transfers', 'stripe_gateways', 'stripe_payments', 'tax_calculators', 'tax_categories', 'tax_rules', 'taxjar_accounts', 'transactions', 'voids', 'webhooks', 'wire_transfers' // ##__API_RESOURCE_LIST_STOP__##
15743
+ ];
15744
+ /*
15745
+ type ResourceInfo = {
15746
+ name: string;
15747
+ type: string;
15748
+ api: string;
15749
+ }
15750
+
15751
+
15752
+ export const resourceMap: { [res: string]: ResourceInfo } = {
15753
+ // ##__API_RESOURCE_MAP_START__##
15754
+ // ##__API_RESOURCE_MAP_STOP__##
15755
+ } as const
15756
+ */
16194
15757
 
16195
15758
  var _adapter = /*#__PURE__*/_classPrivateFieldLooseKey("adapter");
16196
15759
 
@@ -16353,9 +15916,11 @@ var CommerceLayerClient = /*#__PURE__*/function () {
16353
15916
  var CommerceLayer = function CommerceLayer(config) {
16354
15917
  return new CommerceLayerClient(config);
16355
15918
  };
15919
+ /* Static functions */
15920
+
16356
15921
  var CommerceLayerStatic = {
16357
15922
  resources: function resources() {
16358
- return Object.keys(resourcMap);
15923
+ return resourceList;
16359
15924
  },
16360
15925
  // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
16361
15926
  isApiError: function isApiError(error) {