@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.
package/lib/sdk.esm.js CHANGED
@@ -963,6 +963,12 @@ var ApiError = /*#__PURE__*/function (_Error) {
963
963
  return error && error.name === 'ApiError' && error.type === ErrorType.RESPONSE;
964
964
  };
965
965
 
966
+ var _proto = ApiError.prototype;
967
+
968
+ _proto.first = function first() {
969
+ return this.errors.length > 0 ? this.errors[0] : undefined;
970
+ };
971
+
966
972
  return ApiError;
967
973
  }( /*#__PURE__*/_wrapNativeSuper(Error));
968
974
 
@@ -1272,13 +1278,14 @@ var ResourceAdapter = /*#__PURE__*/function () {
1272
1278
 
1273
1279
 
1274
1280
  return;
1275
- };
1276
-
1281
+ }
1277
1282
  /*
1278
1283
  private isRawResponse(options?: ResourcesConfig): boolean {
1279
1284
  return (typeof options?.rawResponse !== 'undefined') ? (options?.rawResponse === true) : (this.#config.rawResponse === true)
1280
1285
  }
1281
1286
  */
1287
+ ;
1288
+
1282
1289
  _proto2.singleton =
1283
1290
  /*#__PURE__*/
1284
1291
  function () {
@@ -15741,459 +15748,120 @@ WireTransfers.TYPE = 'wire_transfers';
15741
15748
  var resourceList = [// ##__API_RESOURCE_LIST_START__##
15742
15749
  '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
15750
  ];
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__##
15751
+ /*
15752
+ type ResourceInfo = {
15753
+ name: string;
15754
+ type: string;
15755
+ api: string;
15756
+ }
15757
+
15758
+
15759
+ export const resourceMap: { [res: string]: ResourceInfo } = {
15760
+ // ##__API_RESOURCE_MAP_START__##
15761
+ addresses: { name: 'address', type: 'addresses', api: 'addresses' },
15762
+ adjustments: { name: 'adjustment', type: 'adjustments', api: 'adjustments' },
15763
+ adyen_gateways: { name: 'adyen_gateway', type: 'adyen_gateways', api: 'adyen_gateways' },
15764
+ adyen_payments: { name: 'adyen_payment', type: 'adyen_payments', api: 'adyen_payments' },
15765
+ application: { name: 'application', type: 'application', api: 'application' },
15766
+ attachments: { name: 'attachment', type: 'attachments', api: 'attachments' },
15767
+ authorizations: { name: 'authorization', type: 'authorizations', api: 'authorizations' },
15768
+ avalara_accounts: { name: 'avalara_account', type: 'avalara_accounts', api: 'avalara_accounts' },
15769
+ billing_info_validation_rules: { name: 'billing_info_validation_rule', type: 'billing_info_validation_rules', api: 'billing_info_validation_rules' },
15770
+ bing_geocoders: { name: 'bing_geocoder', type: 'bing_geocoders', api: 'bing_geocoders' },
15771
+ braintree_gateways: { name: 'braintree_gateway', type: 'braintree_gateways', api: 'braintree_gateways' },
15772
+ braintree_payments: { name: 'braintree_payment', type: 'braintree_payments', api: 'braintree_payments' },
15773
+ bundles: { name: 'bundle', type: 'bundles', api: 'bundles' },
15774
+ captures: { name: 'capture', type: 'captures', api: 'captures' },
15775
+ carrier_accounts: { name: 'carrier_account', type: 'carrier_accounts', api: 'carrier_accounts' },
15776
+ checkout_com_gateways: { name: 'checkout_com_gateway', type: 'checkout_com_gateways', api: 'checkout_com_gateways' },
15777
+ checkout_com_payments: { name: 'checkout_com_payment', type: 'checkout_com_payments', api: 'checkout_com_payments' },
15778
+ coupon_codes_promotion_rules: { name: 'coupon_codes_promotion_rule', type: 'coupon_codes_promotion_rules', api: 'coupon_codes_promotion_rules' },
15779
+ coupons: { name: 'coupon', type: 'coupons', api: 'coupons' },
15780
+ customer_addresses: { name: 'customer_address', type: 'customer_addresses', api: 'customer_addresses' },
15781
+ customer_groups: { name: 'customer_group', type: 'customer_groups', api: 'customer_groups' },
15782
+ customer_password_resets: { name: 'customer_password_reset', type: 'customer_password_resets', api: 'customer_password_resets' },
15783
+ customer_payment_sources: { name: 'customer_payment_source', type: 'customer_payment_sources', api: 'customer_payment_sources' },
15784
+ customer_subscriptions: { name: 'customer_subscription', type: 'customer_subscriptions', api: 'customer_subscriptions' },
15785
+ customers: { name: 'customer', type: 'customers', api: 'customers' },
15786
+ delivery_lead_times: { name: 'delivery_lead_time', type: 'delivery_lead_times', api: 'delivery_lead_times' },
15787
+ external_gateways: { name: 'external_gateway', type: 'external_gateways', api: 'external_gateways' },
15788
+ external_payments: { name: 'external_payment', type: 'external_payments', api: 'external_payments' },
15789
+ external_promotions: { name: 'external_promotion', type: 'external_promotions', api: 'external_promotions' },
15790
+ external_tax_calculators: { name: 'external_tax_calculator', type: 'external_tax_calculators', api: 'external_tax_calculators' },
15791
+ fixed_amount_promotions: { name: 'fixed_amount_promotion', type: 'fixed_amount_promotions', api: 'fixed_amount_promotions' },
15792
+ free_shipping_promotions: { name: 'free_shipping_promotion', type: 'free_shipping_promotions', api: 'free_shipping_promotions' },
15793
+ geocoders: { name: 'geocoder', type: 'geocoders', api: 'geocoders' },
15794
+ gift_card_recipients: { name: 'gift_card_recipient', type: 'gift_card_recipients', api: 'gift_card_recipients' },
15795
+ gift_cards: { name: 'gift_card', type: 'gift_cards', api: 'gift_cards' },
15796
+ google_geocoders: { name: 'google_geocoder', type: 'google_geocoders', api: 'google_geocoders' },
15797
+ imports: { name: 'import', type: 'imports', api: 'imports' },
15798
+ in_stock_subscriptions: { name: 'in_stock_subscription', type: 'in_stock_subscriptions', api: 'in_stock_subscriptions' },
15799
+ inventory_models: { name: 'inventory_model', type: 'inventory_models', api: 'inventory_models' },
15800
+ inventory_return_locations: { name: 'inventory_return_location', type: 'inventory_return_locations', api: 'inventory_return_locations' },
15801
+ inventory_stock_locations: { name: 'inventory_stock_location', type: 'inventory_stock_locations', api: 'inventory_stock_locations' },
15802
+ line_item_options: { name: 'line_item_option', type: 'line_item_options', api: 'line_item_options' },
15803
+ line_items: { name: 'line_item', type: 'line_items', api: 'line_items' },
15804
+ manual_gateways: { name: 'manual_gateway', type: 'manual_gateways', api: 'manual_gateways' },
15805
+ manual_tax_calculators: { name: 'manual_tax_calculator', type: 'manual_tax_calculators', api: 'manual_tax_calculators' },
15806
+ markets: { name: 'market', type: 'markets', api: 'markets' },
15807
+ merchants: { name: 'merchant', type: 'merchants', api: 'merchants' },
15808
+ order_amount_promotion_rules: { name: 'order_amount_promotion_rule', type: 'order_amount_promotion_rules', api: 'order_amount_promotion_rules' },
15809
+ order_copies: { name: 'order_copy', type: 'order_copies', api: 'order_copies' },
15810
+ order_subscriptions: { name: 'order_subscription', type: 'order_subscriptions', api: 'order_subscriptions' },
15811
+ orders: { name: 'order', type: 'orders', api: 'orders' },
15812
+ organization: { name: 'organization', type: 'organization', api: 'organization' },
15813
+ packages: { name: 'package', type: 'packages', api: 'packages' },
15814
+ parcel_line_items: { name: 'parcel_line_item', type: 'parcel_line_items', api: 'parcel_line_items' },
15815
+ parcels: { name: 'parcel', type: 'parcels', api: 'parcels' },
15816
+ payment_gateways: { name: 'payment_gateway', type: 'payment_gateways', api: 'payment_gateways' },
15817
+ payment_methods: { name: 'payment_method', type: 'payment_methods', api: 'payment_methods' },
15818
+ paypal_gateways: { name: 'paypal_gateway', type: 'paypal_gateways', api: 'paypal_gateways' },
15819
+ paypal_payments: { name: 'paypal_payment', type: 'paypal_payments', api: 'paypal_payments' },
15820
+ percentage_discount_promotions: { name: 'percentage_discount_promotion', type: 'percentage_discount_promotions', api: 'percentage_discount_promotions' },
15821
+ price_lists: { name: 'price_list', type: 'price_lists', api: 'price_lists' },
15822
+ prices: { name: 'price', type: 'prices', api: 'prices' },
15823
+ promotion_rules: { name: 'promotion_rule', type: 'promotion_rules', api: 'promotion_rules' },
15824
+ promotions: { name: 'promotion', type: 'promotions', api: 'promotions' },
15825
+ refunds: { name: 'refund', type: 'refunds', api: 'refunds' },
15826
+ return_line_items: { name: 'return_line_item', type: 'return_line_items', api: 'return_line_items' },
15827
+ returns: { name: 'return', type: 'returns', api: 'returns' },
15828
+ shipments: { name: 'shipment', type: 'shipments', api: 'shipments' },
15829
+ shipping_categories: { name: 'shipping_category', type: 'shipping_categories', api: 'shipping_categories' },
15830
+ shipping_methods: { name: 'shipping_method', type: 'shipping_methods', api: 'shipping_methods' },
15831
+ shipping_zones: { name: 'shipping_zone', type: 'shipping_zones', api: 'shipping_zones' },
15832
+ sku_list_items: { name: 'sku_list_item', type: 'sku_list_items', api: 'sku_list_items' },
15833
+ sku_list_promotion_rules: { name: 'sku_list_promotion_rule', type: 'sku_list_promotion_rules', api: 'sku_list_promotion_rules' },
15834
+ sku_lists: { name: 'sku_list', type: 'sku_lists', api: 'sku_lists' },
15835
+ sku_options: { name: 'sku_option', type: 'sku_options', api: 'sku_options' },
15836
+ skus: { name: 'sku', type: 'skus', api: 'skus' },
15837
+ stock_items: { name: 'stock_item', type: 'stock_items', api: 'stock_items' },
15838
+ stock_line_items: { name: 'stock_line_item', type: 'stock_line_items', api: 'stock_line_items' },
15839
+ stock_locations: { name: 'stock_location', type: 'stock_locations', api: 'stock_locations' },
15840
+ stock_transfers: { name: 'stock_transfer', type: 'stock_transfers', api: 'stock_transfers' },
15841
+ stripe_gateways: { name: 'stripe_gateway', type: 'stripe_gateways', api: 'stripe_gateways' },
15842
+ stripe_payments: { name: 'stripe_payment', type: 'stripe_payments', api: 'stripe_payments' },
15843
+ tax_calculators: { name: 'tax_calculator', type: 'tax_calculators', api: 'tax_calculators' },
15844
+ tax_categories: { name: 'tax_category', type: 'tax_categories', api: 'tax_categories' },
15845
+ tax_rules: { name: 'tax_rule', type: 'tax_rules', api: 'tax_rules' },
15846
+ taxjar_accounts: { name: 'taxjar_account', type: 'taxjar_accounts', api: 'taxjar_accounts' },
15847
+ transactions: { name: 'transaction', type: 'transactions', api: 'transactions' },
15848
+ voids: { name: 'void', type: 'voids', api: 'voids' },
15849
+ webhooks: { name: 'webhook', type: 'webhooks', api: 'webhooks' },
15850
+ wire_transfers: { name: 'wire_transfer', type: 'wire_transfers', api: 'wire_transfers' }
15851
+ // ##__API_RESOURCE_MAP_STOP__##
15852
+ } as const
15853
+ */
15854
+
15855
+ /* Static functions */
16196
15856
 
15857
+ var CommerceLayerStatic = {
15858
+ resources: function resources() {
15859
+ return resourceList;
15860
+ },
15861
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
15862
+ isApiError: function isApiError(error) {
15863
+ return ApiError.isApiError(error);
15864
+ }
16197
15865
  };
16198
15866
 
16199
15867
  var _adapter = /*#__PURE__*/_classPrivateFieldLooseKey("adapter");
@@ -16324,7 +15992,7 @@ var CommerceLayerClient = /*#__PURE__*/function () {
16324
15992
  ;
16325
15993
 
16326
15994
  _proto.resources = function resources() {
16327
- return CommerceLayerStatic.resourceList;
15995
+ return CommerceLayerStatic.resources();
16328
15996
  } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
16329
15997
  ;
16330
15998
 
@@ -16344,6 +16012,27 @@ var CommerceLayerClient = /*#__PURE__*/function () {
16344
16012
  return _classPrivateFieldLooseBase(this, _adapter)[_adapter].interceptors[type].eject(id);
16345
16013
  };
16346
16014
 
16015
+ _proto.addRawResponseReader = function addRawResponseReader() {
16016
+ var reader = {
16017
+ id: undefined,
16018
+ rawResponse: undefined
16019
+ };
16020
+
16021
+ function rawResponseInterceptor(response) {
16022
+ reader.rawResponse = response == null ? void 0 : response.data;
16023
+ return response;
16024
+ }
16025
+
16026
+ var interceptor = this.addResponseInterceptor(rawResponseInterceptor);
16027
+ reader.id = interceptor;
16028
+ return reader;
16029
+ };
16030
+
16031
+ _proto.removeRawResponseReader = function removeRawResponseReader(reader) {
16032
+ var id = typeof reader === 'number' ? reader : reader.id;
16033
+ if (id) return this.removeInterceptor('response', id);
16034
+ };
16035
+
16347
16036
  _createClass(CommerceLayerClient, [{
16348
16037
  key: "currentOrganization",
16349
16038
  get: function get() {
@@ -16357,14 +16046,6 @@ var CommerceLayerClient = /*#__PURE__*/function () {
16357
16046
  var CommerceLayer = function CommerceLayer(config) {
16358
16047
  return new CommerceLayerClient(config);
16359
16048
  };
16360
- var CommerceLayerStatic = {
16361
- resourceList: resourceList,
16362
- resourceMap: resourceMap,
16363
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
16364
- isApiError: function isApiError(error) {
16365
- return ApiError.isApiError(error);
16366
- }
16367
- };
16368
16049
 
16369
16050
  export default CommerceLayer;
16370
16051
  export { CommerceLayerStatic };