@betterstore/sdk 0.5.2 → 0.5.3

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.d.mts CHANGED
@@ -534,12 +534,22 @@ declare class Discounts {
534
534
  retrieve(params: RetrieveDiscountParams): Promise<Discount | null>;
535
535
  }
536
536
 
537
+ type AutocompleteResult = {
538
+ line1: string;
539
+ line2: string;
540
+ city: string;
541
+ state: string;
542
+ countryCode: string;
543
+ zipCode: string;
544
+ };
545
+
537
546
  declare class Helpers {
538
547
  proxy?: string;
539
548
  constructor(proxy?: string);
540
549
  formatCurrency(currency: string): string;
541
550
  formatPrice(priceInCents: number, currency: string, exchangeRate?: number | null): string;
542
551
  getExchangeRate(baseCurrency: string, targetCurrency: string): Promise<number>;
552
+ getAutocompleteAddressResults(query: string, locale?: string): Promise<AutocompleteResult[]>;
543
553
  }
544
554
 
545
555
  declare class Products {
package/dist/index.d.ts CHANGED
@@ -534,12 +534,22 @@ declare class Discounts {
534
534
  retrieve(params: RetrieveDiscountParams): Promise<Discount | null>;
535
535
  }
536
536
 
537
+ type AutocompleteResult = {
538
+ line1: string;
539
+ line2: string;
540
+ city: string;
541
+ state: string;
542
+ countryCode: string;
543
+ zipCode: string;
544
+ };
545
+
537
546
  declare class Helpers {
538
547
  proxy?: string;
539
548
  constructor(proxy?: string);
540
549
  formatCurrency(currency: string): string;
541
550
  formatPrice(priceInCents: number, currency: string, exchangeRate?: number | null): string;
542
551
  getExchangeRate(baseCurrency: string, targetCurrency: string): Promise<number>;
552
+ getAutocompleteAddressResults(query: string, locale?: string): Promise<AutocompleteResult[]>;
543
553
  }
544
554
 
545
555
  declare class Products {
package/dist/index.js CHANGED
@@ -654,6 +654,18 @@ var Helpers = class {
654
654
  }
655
655
  return rate;
656
656
  }
657
+ async getAutocompleteAddressResults(query, locale) {
658
+ const apiClient = createApiClient("", this.proxy);
659
+ const { data } = await apiClient.get(
660
+ `/helpers/autocomplete-address/${query}`,
661
+ {
662
+ params: {
663
+ locale
664
+ }
665
+ }
666
+ );
667
+ return data;
668
+ }
657
669
  };
658
670
  var helpers_default = Helpers;
659
671
 
package/dist/index.mjs CHANGED
@@ -616,6 +616,18 @@ var Helpers = class {
616
616
  }
617
617
  return rate;
618
618
  }
619
+ async getAutocompleteAddressResults(query, locale) {
620
+ const apiClient = createApiClient("", this.proxy);
621
+ const { data } = await apiClient.get(
622
+ `/helpers/autocomplete-address/${query}`,
623
+ {
624
+ params: {
625
+ locale
626
+ }
627
+ }
628
+ );
629
+ return data;
630
+ }
619
631
  };
620
632
  var helpers_default = Helpers;
621
633
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/sdk",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",