@commercelayer/sdk 2.1.0-alpha.3 → 2.1.0-alpha.7

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