@commercengine/storefront-sdk 0.4.2 → 0.4.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/dist/index.js CHANGED
@@ -2178,6 +2178,16 @@ var CustomerClient = class extends StorefrontAPIClient {
2178
2178
  }
2179
2179
  };
2180
2180
 
2181
+ // src/lib/store-config.ts
2182
+ var StoreConfigClient = class extends StorefrontAPIClient {
2183
+ /**
2184
+ * Get store config
2185
+ */
2186
+ async getStoreConfig() {
2187
+ return this.executeRequest(() => this.client.GET("/store/config"));
2188
+ }
2189
+ };
2190
+
2181
2191
  // src/index.ts
2182
2192
  var StorefrontSDK = class {
2183
2193
  /**
@@ -2208,6 +2218,10 @@ var StorefrontSDK = class {
2208
2218
  * Client for order-related endpoints
2209
2219
  */
2210
2220
  order;
2221
+ /**
2222
+ * Client for store config-related endpoints
2223
+ */
2224
+ store;
2211
2225
  /**
2212
2226
  * Create a new StorefrontSDK instance
2213
2227
  *
@@ -2236,6 +2250,7 @@ var StorefrontSDK = class {
2236
2250
  this.helpers = new HelpersClient(config);
2237
2251
  this.shipping = new ShippingClient(config);
2238
2252
  this.order = new OrderClient(config);
2253
+ this.store = new StoreConfigClient(config);
2239
2254
  }
2240
2255
  /**
2241
2256
  * Set authentication tokens for all clients
@@ -2255,6 +2270,7 @@ var StorefrontSDK = class {
2255
2270
  await this.helpers.setTokens(accessToken, refreshToken);
2256
2271
  await this.shipping.setTokens(accessToken, refreshToken);
2257
2272
  await this.order.setTokens(accessToken, refreshToken);
2273
+ await this.store.setTokens(accessToken, refreshToken);
2258
2274
  }
2259
2275
  /**
2260
2276
  * Clear all authentication tokens from all clients
@@ -2271,6 +2287,7 @@ var StorefrontSDK = class {
2271
2287
  await this.helpers.clearTokens();
2272
2288
  await this.shipping.clearTokens();
2273
2289
  await this.order.clearTokens();
2290
+ await this.store.clearTokens();
2274
2291
  }
2275
2292
  /**
2276
2293
  * Set the API key for all clients
@@ -2285,6 +2302,7 @@ var StorefrontSDK = class {
2285
2302
  this.helpers.setApiKey(apiKey);
2286
2303
  this.shipping.setApiKey(apiKey);
2287
2304
  this.order.setApiKey(apiKey);
2305
+ this.store.setApiKey(apiKey);
2288
2306
  }
2289
2307
  /**
2290
2308
  * Clear the API key from all clients
@@ -2297,6 +2315,7 @@ var StorefrontSDK = class {
2297
2315
  this.helpers.clearApiKey();
2298
2316
  this.shipping.clearApiKey();
2299
2317
  this.order.clearApiKey();
2318
+ this.store.clearApiKey();
2300
2319
  }
2301
2320
  /**
2302
2321
  * Get the current access token if using token storage
@@ -2378,6 +2397,7 @@ var StorefrontSDK = class {
2378
2397
  this.helpers["config"] = newConfig;
2379
2398
  this.shipping["config"] = newConfig;
2380
2399
  this.order["config"] = newConfig;
2400
+ this.store["config"] = newConfig;
2381
2401
  }
2382
2402
  /**
2383
2403
  * Get current default headers
@@ -2402,6 +2422,7 @@ export {
2402
2422
  OrderClient,
2403
2423
  ResponseUtils,
2404
2424
  ShippingClient,
2425
+ StoreConfigClient,
2405
2426
  StorefrontAPIClient,
2406
2427
  StorefrontSDK,
2407
2428
  index_default as default