commerce-sdk-isomorphic 4.0.1-preview-shopper-test.0 → 4.1.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.
Files changed (74) hide show
  1. package/README.md +57 -0
  2. package/lib/clientConfig.cjs.d.ts +4 -2
  3. package/lib/clientConfig.cjs.js +1 -1
  4. package/lib/clientConfig.d.ts +4 -2
  5. package/lib/clientConfig.js +1 -1
  6. package/lib/helpers.cjs.d.ts +9 -9
  7. package/lib/helpers.cjs.js +1 -1
  8. package/lib/helpers.d.ts +9 -9
  9. package/lib/helpers.js +1 -1
  10. package/lib/index.cjs.d.ts +57 -24
  11. package/lib/index.cjs.js +1 -1
  12. package/lib/index.esm.d.ts +57 -24
  13. package/lib/index.esm.js +1 -1
  14. package/lib/shopperBaskets.cjs.d.ts +6 -1
  15. package/lib/shopperBaskets.cjs.js +1 -1
  16. package/lib/shopperBaskets.d.ts +6 -1
  17. package/lib/shopperBaskets.js +1 -1
  18. package/lib/shopperBasketsv2.cjs.d.ts +6 -1
  19. package/lib/shopperBasketsv2.cjs.js +1 -1
  20. package/lib/shopperBasketsv2.d.ts +6 -1
  21. package/lib/shopperBasketsv2.js +1 -1
  22. package/lib/shopperConsents.cjs.d.ts +6 -1
  23. package/lib/shopperConsents.cjs.js +1 -1
  24. package/lib/shopperConsents.d.ts +6 -1
  25. package/lib/shopperConsents.js +1 -1
  26. package/lib/shopperContext.cjs.d.ts +6 -1
  27. package/lib/shopperContext.cjs.js +1 -1
  28. package/lib/shopperContext.d.ts +6 -1
  29. package/lib/shopperContext.js +1 -1
  30. package/lib/shopperCustomers.cjs.d.ts +6 -1
  31. package/lib/shopperCustomers.cjs.js +1 -1
  32. package/lib/shopperCustomers.d.ts +6 -1
  33. package/lib/shopperCustomers.js +1 -1
  34. package/lib/shopperExperience.cjs.d.ts +6 -1
  35. package/lib/shopperExperience.cjs.js +1 -1
  36. package/lib/shopperExperience.d.ts +6 -1
  37. package/lib/shopperExperience.js +1 -1
  38. package/lib/shopperGiftCertificates.cjs.d.ts +6 -1
  39. package/lib/shopperGiftCertificates.cjs.js +1 -1
  40. package/lib/shopperGiftCertificates.d.ts +6 -1
  41. package/lib/shopperGiftCertificates.js +1 -1
  42. package/lib/shopperLogin.cjs.d.ts +6 -1
  43. package/lib/shopperLogin.cjs.js +1 -1
  44. package/lib/shopperLogin.d.ts +6 -1
  45. package/lib/shopperLogin.js +1 -1
  46. package/lib/shopperOrders.cjs.d.ts +6 -1
  47. package/lib/shopperOrders.cjs.js +1 -1
  48. package/lib/shopperOrders.d.ts +6 -1
  49. package/lib/shopperOrders.js +1 -1
  50. package/lib/shopperProducts.cjs.d.ts +6 -1
  51. package/lib/shopperProducts.cjs.js +1 -1
  52. package/lib/shopperProducts.d.ts +6 -1
  53. package/lib/shopperProducts.js +1 -1
  54. package/lib/shopperPromotions.cjs.d.ts +6 -1
  55. package/lib/shopperPromotions.cjs.js +1 -1
  56. package/lib/shopperPromotions.d.ts +6 -1
  57. package/lib/shopperPromotions.js +1 -1
  58. package/lib/shopperSearch.cjs.d.ts +6 -1
  59. package/lib/shopperSearch.cjs.js +1 -1
  60. package/lib/shopperSearch.d.ts +6 -1
  61. package/lib/shopperSearch.js +1 -1
  62. package/lib/shopperSeo.cjs.d.ts +6 -1
  63. package/lib/shopperSeo.cjs.js +1 -1
  64. package/lib/shopperSeo.d.ts +6 -1
  65. package/lib/shopperSeo.js +1 -1
  66. package/lib/shopperStores.cjs.d.ts +6 -1
  67. package/lib/shopperStores.cjs.js +1 -1
  68. package/lib/shopperStores.d.ts +6 -1
  69. package/lib/shopperStores.js +1 -1
  70. package/lib/version.cjs.d.ts +1 -1
  71. package/lib/version.cjs.js +1 -1
  72. package/lib/version.d.ts +1 -1
  73. package/lib/version.js +1 -1
  74. package/package.json +4 -4
@@ -77,6 +77,7 @@ type BrowserRequestInit = RequestInit;
77
77
  * Using the right properties in the right context is left to the user.
78
78
  */
79
79
  type FetchOptions = NodeRequestInit & BrowserRequestInit;
80
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
80
81
  /**
81
82
  * Base options that can be passed to the `ClientConfig` class.
82
83
  */
@@ -88,12 +89,12 @@ interface ClientConfigInit<Params extends BaseUriParameters> {
88
89
  };
89
90
  parameters: Params;
90
91
  fetchOptions?: FetchOptions;
92
+ fetch?: FetchFunction;
91
93
  transformRequest?: (data: unknown, headers: {
92
94
  [key: string]: string;
93
95
  }) => Required<FetchOptions>["body"];
94
96
  throwOnBadResponse?: boolean;
95
97
  }
96
- type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
97
98
  /**
98
99
  * Configuration parameters common to Commerce SDK clients
99
100
  */
@@ -105,6 +106,7 @@ declare class ClientConfig<Params extends BaseUriParameters> implements ClientCo
105
106
  };
106
107
  parameters: Params;
107
108
  fetchOptions: FetchOptions;
109
+ fetch?: FetchFunction;
108
110
  transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
109
111
  throwOnBadResponse: boolean;
110
112
  constructor(config: ClientConfigInit<Params>);
@@ -4569,6 +4571,7 @@ declare namespace ShopperBasketsApiTypes {
4569
4571
  * Using the right properties in the right context is left to the user.
4570
4572
  */
4571
4573
  type FetchOptions = NodeRequestInit & BrowserRequestInit;
4574
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
4572
4575
  /**
4573
4576
  * Base options that can be passed to the `ClientConfig` class.
4574
4577
  */
@@ -4580,12 +4583,12 @@ declare namespace ShopperBasketsApiTypes {
4580
4583
  };
4581
4584
  parameters: Params;
4582
4585
  fetchOptions?: FetchOptions;
4586
+ fetch?: FetchFunction;
4583
4587
  transformRequest?: (data: unknown, headers: {
4584
4588
  [key: string]: string;
4585
4589
  }) => Required<FetchOptions>["body"];
4586
4590
  throwOnBadResponse?: boolean;
4587
4591
  }
4588
- type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
4589
4592
  /**
4590
4593
  * Configuration parameters common to Commerce SDK clients
4591
4594
  */
@@ -4597,6 +4600,7 @@ declare namespace ShopperBasketsApiTypes {
4597
4600
  };
4598
4601
  parameters: Params;
4599
4602
  fetchOptions: FetchOptions;
4603
+ fetch?: FetchFunction;
4600
4604
  transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
4601
4605
  throwOnBadResponse: boolean;
4602
4606
  constructor(config: ClientConfigInit<Params>);
@@ -14787,6 +14791,7 @@ declare namespace ShopperBasketsV2ApiTypes {
14787
14791
  * Using the right properties in the right context is left to the user.
14788
14792
  */
14789
14793
  type FetchOptions = NodeRequestInit & BrowserRequestInit;
14794
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
14790
14795
  /**
14791
14796
  * Base options that can be passed to the `ClientConfig` class.
14792
14797
  */
@@ -14798,12 +14803,12 @@ declare namespace ShopperBasketsV2ApiTypes {
14798
14803
  };
14799
14804
  parameters: Params;
14800
14805
  fetchOptions?: FetchOptions;
14806
+ fetch?: FetchFunction;
14801
14807
  transformRequest?: (data: unknown, headers: {
14802
14808
  [key: string]: string;
14803
14809
  }) => Required<FetchOptions>["body"];
14804
14810
  throwOnBadResponse?: boolean;
14805
14811
  }
14806
- type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
14807
14812
  /**
14808
14813
  * Configuration parameters common to Commerce SDK clients
14809
14814
  */
@@ -14815,6 +14820,7 @@ declare namespace ShopperBasketsV2ApiTypes {
14815
14820
  };
14816
14821
  parameters: Params;
14817
14822
  fetchOptions: FetchOptions;
14823
+ fetch?: FetchFunction;
14818
14824
  transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
14819
14825
  throwOnBadResponse: boolean;
14820
14826
  constructor(config: ClientConfigInit<Params>);
@@ -21018,6 +21024,7 @@ declare namespace ShopperConsentsApiTypes {
21018
21024
  * Using the right properties in the right context is left to the user.
21019
21025
  */
21020
21026
  type FetchOptions = NodeRequestInit & BrowserRequestInit;
21027
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
21021
21028
  /**
21022
21029
  * Base options that can be passed to the `ClientConfig` class.
21023
21030
  */
@@ -21029,12 +21036,12 @@ declare namespace ShopperConsentsApiTypes {
21029
21036
  };
21030
21037
  parameters: Params;
21031
21038
  fetchOptions?: FetchOptions;
21039
+ fetch?: FetchFunction;
21032
21040
  transformRequest?: (data: unknown, headers: {
21033
21041
  [key: string]: string;
21034
21042
  }) => Required<FetchOptions>["body"];
21035
21043
  throwOnBadResponse?: boolean;
21036
21044
  }
21037
- type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
21038
21045
  /**
21039
21046
  * Configuration parameters common to Commerce SDK clients
21040
21047
  */
@@ -21046,6 +21053,7 @@ declare namespace ShopperConsentsApiTypes {
21046
21053
  };
21047
21054
  parameters: Params;
21048
21055
  fetchOptions: FetchOptions;
21056
+ fetch?: FetchFunction;
21049
21057
  transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
21050
21058
  throwOnBadResponse: boolean;
21051
21059
  constructor(config: ClientConfigInit<Params>);
@@ -22178,6 +22186,7 @@ declare namespace ShopperContextsApiTypes {
22178
22186
  * Using the right properties in the right context is left to the user.
22179
22187
  */
22180
22188
  type FetchOptions = NodeRequestInit & BrowserRequestInit;
22189
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
22181
22190
  /**
22182
22191
  * Base options that can be passed to the `ClientConfig` class.
22183
22192
  */
@@ -22189,12 +22198,12 @@ declare namespace ShopperContextsApiTypes {
22189
22198
  };
22190
22199
  parameters: Params;
22191
22200
  fetchOptions?: FetchOptions;
22201
+ fetch?: FetchFunction;
22192
22202
  transformRequest?: (data: unknown, headers: {
22193
22203
  [key: string]: string;
22194
22204
  }) => Required<FetchOptions>["body"];
22195
22205
  throwOnBadResponse?: boolean;
22196
22206
  }
22197
- type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
22198
22207
  /**
22199
22208
  * Configuration parameters common to Commerce SDK clients
22200
22209
  */
@@ -22206,6 +22215,7 @@ declare namespace ShopperContextsApiTypes {
22206
22215
  };
22207
22216
  parameters: Params;
22208
22217
  fetchOptions: FetchOptions;
22218
+ fetch?: FetchFunction;
22209
22219
  transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
22210
22220
  throwOnBadResponse: boolean;
22211
22221
  constructor(config: ClientConfigInit<Params>);
@@ -27560,6 +27570,7 @@ declare namespace ShopperCustomersApiTypes {
27560
27570
  * Using the right properties in the right context is left to the user.
27561
27571
  */
27562
27572
  type FetchOptions = NodeRequestInit & BrowserRequestInit;
27573
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
27563
27574
  /**
27564
27575
  * Base options that can be passed to the `ClientConfig` class.
27565
27576
  */
@@ -27571,12 +27582,12 @@ declare namespace ShopperCustomersApiTypes {
27571
27582
  };
27572
27583
  parameters: Params;
27573
27584
  fetchOptions?: FetchOptions;
27585
+ fetch?: FetchFunction;
27574
27586
  transformRequest?: (data: unknown, headers: {
27575
27587
  [key: string]: string;
27576
27588
  }) => Required<FetchOptions>["body"];
27577
27589
  throwOnBadResponse?: boolean;
27578
27590
  }
27579
- type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
27580
27591
  /**
27581
27592
  * Configuration parameters common to Commerce SDK clients
27582
27593
  */
@@ -27588,6 +27599,7 @@ declare namespace ShopperCustomersApiTypes {
27588
27599
  };
27589
27600
  parameters: Params;
27590
27601
  fetchOptions: FetchOptions;
27602
+ fetch?: FetchFunction;
27591
27603
  transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
27592
27604
  throwOnBadResponse: boolean;
27593
27605
  constructor(config: ClientConfigInit<Params>);
@@ -35349,6 +35361,7 @@ declare namespace ShopperExperienceApiTypes {
35349
35361
  * Using the right properties in the right context is left to the user.
35350
35362
  */
35351
35363
  type FetchOptions = NodeRequestInit & BrowserRequestInit;
35364
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
35352
35365
  /**
35353
35366
  * Base options that can be passed to the `ClientConfig` class.
35354
35367
  */
@@ -35360,12 +35373,12 @@ declare namespace ShopperExperienceApiTypes {
35360
35373
  };
35361
35374
  parameters: Params;
35362
35375
  fetchOptions?: FetchOptions;
35376
+ fetch?: FetchFunction;
35363
35377
  transformRequest?: (data: unknown, headers: {
35364
35378
  [key: string]: string;
35365
35379
  }) => Required<FetchOptions>["body"];
35366
35380
  throwOnBadResponse?: boolean;
35367
35381
  }
35368
- type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
35369
35382
  /**
35370
35383
  * Configuration parameters common to Commerce SDK clients
35371
35384
  */
@@ -35377,6 +35390,7 @@ declare namespace ShopperExperienceApiTypes {
35377
35390
  };
35378
35391
  parameters: Params;
35379
35392
  fetchOptions: FetchOptions;
35393
+ fetch?: FetchFunction;
35380
35394
  transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
35381
35395
  throwOnBadResponse: boolean;
35382
35396
  constructor(config: ClientConfigInit<Params>);
@@ -36207,6 +36221,7 @@ declare namespace ShopperGiftCertificatesApiTypes {
36207
36221
  * Using the right properties in the right context is left to the user.
36208
36222
  */
36209
36223
  type FetchOptions = NodeRequestInit & BrowserRequestInit;
36224
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
36210
36225
  /**
36211
36226
  * Base options that can be passed to the `ClientConfig` class.
36212
36227
  */
@@ -36218,12 +36233,12 @@ declare namespace ShopperGiftCertificatesApiTypes {
36218
36233
  };
36219
36234
  parameters: Params;
36220
36235
  fetchOptions?: FetchOptions;
36236
+ fetch?: FetchFunction;
36221
36237
  transformRequest?: (data: unknown, headers: {
36222
36238
  [key: string]: string;
36223
36239
  }) => Required<FetchOptions>["body"];
36224
36240
  throwOnBadResponse?: boolean;
36225
36241
  }
36226
- type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
36227
36242
  /**
36228
36243
  * Configuration parameters common to Commerce SDK clients
36229
36244
  */
@@ -36235,6 +36250,7 @@ declare namespace ShopperGiftCertificatesApiTypes {
36235
36250
  };
36236
36251
  parameters: Params;
36237
36252
  fetchOptions: FetchOptions;
36253
+ fetch?: FetchFunction;
36238
36254
  transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
36239
36255
  throwOnBadResponse: boolean;
36240
36256
  constructor(config: ClientConfigInit<Params>);
@@ -38329,6 +38345,7 @@ declare namespace ShopperLoginApiTypes {
38329
38345
  * Using the right properties in the right context is left to the user.
38330
38346
  */
38331
38347
  type FetchOptions = NodeRequestInit & BrowserRequestInit;
38348
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
38332
38349
  /**
38333
38350
  * Base options that can be passed to the `ClientConfig` class.
38334
38351
  */
@@ -38340,12 +38357,12 @@ declare namespace ShopperLoginApiTypes {
38340
38357
  };
38341
38358
  parameters: Params;
38342
38359
  fetchOptions?: FetchOptions;
38360
+ fetch?: FetchFunction;
38343
38361
  transformRequest?: (data: unknown, headers: {
38344
38362
  [key: string]: string;
38345
38363
  }) => Required<FetchOptions>["body"];
38346
38364
  throwOnBadResponse?: boolean;
38347
38365
  }
38348
- type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
38349
38366
  /**
38350
38367
  * Configuration parameters common to Commerce SDK clients
38351
38368
  */
@@ -38357,6 +38374,7 @@ declare namespace ShopperLoginApiTypes {
38357
38374
  };
38358
38375
  parameters: Params;
38359
38376
  fetchOptions: FetchOptions;
38377
+ fetch?: FetchFunction;
38360
38378
  transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
38361
38379
  throwOnBadResponse: boolean;
38362
38380
  constructor(config: ClientConfigInit<Params>);
@@ -42242,6 +42260,7 @@ declare namespace ShopperOrdersApiTypes {
42242
42260
  * Using the right properties in the right context is left to the user.
42243
42261
  */
42244
42262
  type FetchOptions = NodeRequestInit & BrowserRequestInit;
42263
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
42245
42264
  /**
42246
42265
  * Base options that can be passed to the `ClientConfig` class.
42247
42266
  */
@@ -42253,12 +42272,12 @@ declare namespace ShopperOrdersApiTypes {
42253
42272
  };
42254
42273
  parameters: Params;
42255
42274
  fetchOptions?: FetchOptions;
42275
+ fetch?: FetchFunction;
42256
42276
  transformRequest?: (data: unknown, headers: {
42257
42277
  [key: string]: string;
42258
42278
  }) => Required<FetchOptions>["body"];
42259
42279
  throwOnBadResponse?: boolean;
42260
42280
  }
42261
- type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
42262
42281
  /**
42263
42282
  * Configuration parameters common to Commerce SDK clients
42264
42283
  */
@@ -42270,6 +42289,7 @@ declare namespace ShopperOrdersApiTypes {
42270
42289
  };
42271
42290
  parameters: Params;
42272
42291
  fetchOptions: FetchOptions;
42292
+ fetch?: FetchFunction;
42273
42293
  transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
42274
42294
  throwOnBadResponse: boolean;
42275
42295
  constructor(config: ClientConfigInit<Params>);
@@ -46810,6 +46830,7 @@ declare namespace ShopperProductsApiTypes {
46810
46830
  * Using the right properties in the right context is left to the user.
46811
46831
  */
46812
46832
  type FetchOptions = NodeRequestInit & BrowserRequestInit;
46833
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
46813
46834
  /**
46814
46835
  * Base options that can be passed to the `ClientConfig` class.
46815
46836
  */
@@ -46821,12 +46842,12 @@ declare namespace ShopperProductsApiTypes {
46821
46842
  };
46822
46843
  parameters: Params;
46823
46844
  fetchOptions?: FetchOptions;
46845
+ fetch?: FetchFunction;
46824
46846
  transformRequest?: (data: unknown, headers: {
46825
46847
  [key: string]: string;
46826
46848
  }) => Required<FetchOptions>["body"];
46827
46849
  throwOnBadResponse?: boolean;
46828
46850
  }
46829
- type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
46830
46851
  /**
46831
46852
  * Configuration parameters common to Commerce SDK clients
46832
46853
  */
@@ -46838,6 +46859,7 @@ declare namespace ShopperProductsApiTypes {
46838
46859
  };
46839
46860
  parameters: Params;
46840
46861
  fetchOptions: FetchOptions;
46862
+ fetch?: FetchFunction;
46841
46863
  transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
46842
46864
  throwOnBadResponse: boolean;
46843
46865
  constructor(config: ClientConfigInit<Params>);
@@ -49246,6 +49268,7 @@ declare namespace ShopperPromotionsApiTypes {
49246
49268
  * Using the right properties in the right context is left to the user.
49247
49269
  */
49248
49270
  type FetchOptions = NodeRequestInit & BrowserRequestInit;
49271
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
49249
49272
  /**
49250
49273
  * Base options that can be passed to the `ClientConfig` class.
49251
49274
  */
@@ -49257,12 +49280,12 @@ declare namespace ShopperPromotionsApiTypes {
49257
49280
  };
49258
49281
  parameters: Params;
49259
49282
  fetchOptions?: FetchOptions;
49283
+ fetch?: FetchFunction;
49260
49284
  transformRequest?: (data: unknown, headers: {
49261
49285
  [key: string]: string;
49262
49286
  }) => Required<FetchOptions>["body"];
49263
49287
  throwOnBadResponse?: boolean;
49264
49288
  }
49265
- type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
49266
49289
  /**
49267
49290
  * Configuration parameters common to Commerce SDK clients
49268
49291
  */
@@ -49274,6 +49297,7 @@ declare namespace ShopperPromotionsApiTypes {
49274
49297
  };
49275
49298
  parameters: Params;
49276
49299
  fetchOptions: FetchOptions;
49300
+ fetch?: FetchFunction;
49277
49301
  transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
49278
49302
  throwOnBadResponse: boolean;
49279
49303
  constructor(config: ClientConfigInit<Params>);
@@ -50937,6 +50961,7 @@ declare namespace ShopperSearchApiTypes {
50937
50961
  * Using the right properties in the right context is left to the user.
50938
50962
  */
50939
50963
  type FetchOptions = NodeRequestInit & BrowserRequestInit;
50964
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
50940
50965
  /**
50941
50966
  * Base options that can be passed to the `ClientConfig` class.
50942
50967
  */
@@ -50948,12 +50973,12 @@ declare namespace ShopperSearchApiTypes {
50948
50973
  };
50949
50974
  parameters: Params;
50950
50975
  fetchOptions?: FetchOptions;
50976
+ fetch?: FetchFunction;
50951
50977
  transformRequest?: (data: unknown, headers: {
50952
50978
  [key: string]: string;
50953
50979
  }) => Required<FetchOptions>["body"];
50954
50980
  throwOnBadResponse?: boolean;
50955
50981
  }
50956
- type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
50957
50982
  /**
50958
50983
  * Configuration parameters common to Commerce SDK clients
50959
50984
  */
@@ -50965,6 +50990,7 @@ declare namespace ShopperSearchApiTypes {
50965
50990
  };
50966
50991
  parameters: Params;
50967
50992
  fetchOptions: FetchOptions;
50993
+ fetch?: FetchFunction;
50968
50994
  transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
50969
50995
  throwOnBadResponse: boolean;
50970
50996
  constructor(config: ClientConfigInit<Params>);
@@ -53227,6 +53253,7 @@ declare namespace ShopperSEOApiTypes {
53227
53253
  * Using the right properties in the right context is left to the user.
53228
53254
  */
53229
53255
  type FetchOptions = NodeRequestInit & BrowserRequestInit;
53256
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
53230
53257
  /**
53231
53258
  * Base options that can be passed to the `ClientConfig` class.
53232
53259
  */
@@ -53238,12 +53265,12 @@ declare namespace ShopperSEOApiTypes {
53238
53265
  };
53239
53266
  parameters: Params;
53240
53267
  fetchOptions?: FetchOptions;
53268
+ fetch?: FetchFunction;
53241
53269
  transformRequest?: (data: unknown, headers: {
53242
53270
  [key: string]: string;
53243
53271
  }) => Required<FetchOptions>["body"];
53244
53272
  throwOnBadResponse?: boolean;
53245
53273
  }
53246
- type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
53247
53274
  /**
53248
53275
  * Configuration parameters common to Commerce SDK clients
53249
53276
  */
@@ -53255,6 +53282,7 @@ declare namespace ShopperSEOApiTypes {
53255
53282
  };
53256
53283
  parameters: Params;
53257
53284
  fetchOptions: FetchOptions;
53285
+ fetch?: FetchFunction;
53258
53286
  transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
53259
53287
  throwOnBadResponse: boolean;
53260
53288
  constructor(config: ClientConfigInit<Params>);
@@ -54054,6 +54082,7 @@ declare namespace ShopperStoresApiTypes {
54054
54082
  * Using the right properties in the right context is left to the user.
54055
54083
  */
54056
54084
  type FetchOptions = NodeRequestInit & BrowserRequestInit;
54085
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
54057
54086
  /**
54058
54087
  * Base options that can be passed to the `ClientConfig` class.
54059
54088
  */
@@ -54065,12 +54094,12 @@ declare namespace ShopperStoresApiTypes {
54065
54094
  };
54066
54095
  parameters: Params;
54067
54096
  fetchOptions?: FetchOptions;
54097
+ fetch?: FetchFunction;
54068
54098
  transformRequest?: (data: unknown, headers: {
54069
54099
  [key: string]: string;
54070
54100
  }) => Required<FetchOptions>["body"];
54071
54101
  throwOnBadResponse?: boolean;
54072
54102
  }
54073
- type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
54074
54103
  /**
54075
54104
  * Configuration parameters common to Commerce SDK clients
54076
54105
  */
@@ -54082,6 +54111,7 @@ declare namespace ShopperStoresApiTypes {
54082
54111
  };
54083
54112
  parameters: Params;
54084
54113
  fetchOptions: FetchOptions;
54114
+ fetch?: FetchFunction;
54085
54115
  transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
54086
54116
  throwOnBadResponse: boolean;
54087
54117
  constructor(config: ClientConfigInit<Params>);
@@ -54843,6 +54873,7 @@ declare namespace helpers {
54843
54873
  * Using the right properties in the right context is left to the user.
54844
54874
  */
54845
54875
  type FetchOptions = NodeRequestInit & BrowserRequestInit;
54876
+ type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
54846
54877
  /**
54847
54878
  * Base options that can be passed to the `ClientConfig` class.
54848
54879
  */
@@ -54854,12 +54885,12 @@ declare namespace helpers {
54854
54885
  };
54855
54886
  parameters: Params;
54856
54887
  fetchOptions?: FetchOptions;
54888
+ fetch?: FetchFunction;
54857
54889
  transformRequest?: (data: unknown, headers: {
54858
54890
  [key: string]: string;
54859
54891
  }) => Required<FetchOptions>["body"];
54860
54892
  throwOnBadResponse?: boolean;
54861
54893
  }
54862
- type FetchFunction = (input: RequestInfo, init?: FetchOptions | undefined) => Promise<Response>;
54863
54894
  /**
54864
54895
  * Configuration parameters common to Commerce SDK clients
54865
54896
  */
@@ -54871,23 +54902,22 @@ declare namespace helpers {
54871
54902
  };
54872
54903
  parameters: Params;
54873
54904
  fetchOptions: FetchOptions;
54905
+ fetch?: FetchFunction;
54874
54906
  transformRequest: NonNullable<ClientConfigInit<Params>["transformRequest"]>;
54875
54907
  throwOnBadResponse: boolean;
54876
54908
  constructor(config: ClientConfigInit<Params>);
54877
54909
  static readonly defaults: Pick<Required<ClientConfigInit<never>>, "transformRequest">;
54878
54910
  }
54879
- /*
54880
- * Copyright (c) 2022, Salesforce, Inc.
54881
- * All rights reserved.
54882
- * SPDX-License-Identifier: BSD-3-Clause
54883
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
54884
- */
54885
54911
  const isBrowser: boolean;
54886
54912
  const isNode: boolean;
54887
54913
  const globalObject: typeof globalThis;
54888
54914
  const hasFetchAvailable: boolean;
54889
- // TODO: Remove this function in the next major version
54890
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
54915
+ // TODO: Adopt native fetch in the next major version.
54916
+ // Using the built-in fetch (Node 18+) caused downstream unit tests that rely on
54917
+ // `nock` to fail because `nock` hooks into the core HTTP/HTTPS modules, while
54918
+ // the native fetch implementation leverages undici instead. Until we can roll
54919
+ // out a coordinated breaking change, we continue to use the node-fetch
54920
+ // polyfill so existing tests keep passing.
54891
54921
  const fetch: FetchFunction;
54892
54922
  /**
54893
54923
  * Grant Type
@@ -57027,6 +57057,9 @@ declare const pkg: {
57027
57057
  ShopperSearch: typeof ShopperSearch;
57028
57058
  ShopperSEO: typeof ShopperSEO;
57029
57059
  ShopperStores: typeof ShopperStores;
57060
+ helpers: typeof helpers;
57061
+ ClientConfig: typeof ClientConfig;
57062
+ TemplateURL: typeof TemplateURL;
57030
57063
  };
57031
57064
  export { pkg as default, ShopperBaskets, ShopperBasketsV2, ShopperConsents, ShopperContexts, ShopperCustomers, ShopperExperience, ShopperGiftCertificates, ShopperLogin, ShopperOrders, ShopperProducts, ShopperPromotions, ShopperSearch, ShopperSEO, ShopperStores, ClientConfig, TemplateURL, helpers };
57032
57065
  export type { ShopperBasketsTypes, ShopperBasketsV2Types, ShopperConsentsTypes, ShopperContextsTypes, ShopperCustomersTypes, ShopperExperienceTypes, ShopperGiftCertificatesTypes, ShopperLoginTypes, ShopperOrdersTypes, ShopperProductsTypes, ShopperPromotionsTypes, ShopperSearchTypes, ShopperSEOTypes, ShopperStoresTypes, ClientConfigInit, FetchFunction, FetchOptions };