@liquidcommerce/elements-sdk 2.6.0-beta.13 → 2.6.0-beta.15

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.
@@ -21,22 +21,35 @@ export interface IApiResponse<T> {
21
21
  data: T;
22
22
  }
23
23
  export declare class AuthClientService {
24
+ private static readonly TOKEN_EXPIRATION_BUFFER_MS;
25
+ private static readonly MAX_RETRIES;
26
+ private static readonly RETRY_DELAY_MS;
24
27
  private readonly apiKey;
25
28
  private readonly baseUrl;
26
29
  private readonly env;
27
- private accessToken;
28
- private tokenExpiration;
29
- private isAuthenticating;
30
30
  private readonly httpClient;
31
31
  private readonly logger;
32
32
  private readonly clientConfig;
33
+ private accessToken;
34
+ private tokenExpiration;
35
+ private authPromise;
33
36
  private constructor();
34
37
  static getInstance(config: IAuthConfig): AuthClientService;
35
38
  authenticate(): Promise<boolean>;
36
- isTokenExpired(): boolean;
39
+ private performAuthentication;
40
+ private isTokenExpired;
37
41
  private request;
42
+ private handleSuccessResponse;
43
+ private handleAuthError;
44
+ private handleErrorResponse;
38
45
  private buildUrl;
46
+ private buildHeaders;
39
47
  private getProxyHeaders;
48
+ private isAuthError;
49
+ private clearToken;
50
+ private shouldRetryNonAuth;
51
+ private logNetworkError;
52
+ private createNetworkError;
40
53
  get<T = any>(path: string, options?: IHttpRequestOptions): Promise<T>;
41
54
  post<T = any>(path: string, options?: IHttpRequestOptions): Promise<T>;
42
55
  }
@@ -33,6 +33,7 @@ interface BaseItem {
33
33
  quantity?: number;
34
34
  item_type?: string;
35
35
  item_subtype?: string;
36
+ item_image?: string;
36
37
  upc?: string;
37
38
  grouping_id?: string;
38
39
  product_id?: string;
@@ -11,4 +11,5 @@ export declare class AddressCommands extends BaseCommand {
11
11
  setAddressManually(address: IAddressAddress, coordinates: IAddressCoordinates): Promise<void>;
12
12
  clearSelectedAddress(): Promise<void>;
13
13
  getDetails(): IAddressData | null;
14
+ private buildFormattedAddressString;
14
15
  }
@@ -3,19 +3,6 @@ export declare function formatCentToDollarText(cent: number, showZeroDecimals?:
3
3
  export declare function htmlStringToElement(htmlString: string): HTMLElement;
4
4
  export declare function format24TimeTo12(time24h: string): string;
5
5
  export declare function formatISODateToMMDDYYYY(isoDateString: string | null | undefined): string;
6
- export declare function validateMinimumAge(birthDate: string | Date | null | undefined, minimumAge?: number, minimumYear?: number): {
7
- isValid: boolean;
8
- age: number | null;
9
- error?: string;
10
- };
11
- export declare function buildFormattedAddressString(address: {
12
- one: string;
13
- two: string;
14
- city: string;
15
- state: string;
16
- zip: string;
17
- country?: string;
18
- }): string;
19
6
  export declare function capitalizeFirstLetter(text: string): string;
20
7
  export declare function splitCategoryPath(catPath?: string): {
21
8
  category: string;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "LiquidCommerce Elements SDK",
4
4
  "license": "UNLICENSED",
5
5
  "author": "LiquidCommerce Team",
6
- "version": "2.6.0-beta.13",
6
+ "version": "2.6.0-beta.15",
7
7
  "homepage": "https://docs.liquidcommerce.co/elements-sdk",
8
8
  "repository": {
9
9
  "type": "git",