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