arky-sdk 0.7.74 → 0.7.76

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.cts CHANGED
@@ -55,6 +55,12 @@ interface Activity {
55
55
  type: string;
56
56
  payload: Record<string, any>;
57
57
  createdAt: number;
58
+ countryCode?: string | null;
59
+ deviceType?: string | null;
60
+ browser?: string | null;
61
+ os?: string | null;
62
+ language?: string | null;
63
+ sessionIdx?: number | null;
58
64
  }
59
65
  interface TimelineParams {
60
66
  customerId: string;
package/dist/index.d.ts CHANGED
@@ -55,6 +55,12 @@ interface Activity {
55
55
  type: string;
56
56
  payload: Record<string, any>;
57
57
  createdAt: number;
58
+ countryCode?: string | null;
59
+ deviceType?: string | null;
60
+ browser?: string | null;
61
+ os?: string | null;
62
+ language?: string | null;
63
+ sessionIdx?: number | null;
58
64
  }
59
65
  interface TimelineParams {
60
66
  customerId: string;
package/dist/index.js CHANGED
@@ -155,15 +155,16 @@ async function ensureCustomer(apiConfig) {
155
155
  if (tokens?.accessToken) return;
156
156
  }
157
157
  const response = await apiConfig.httpClient.post(
158
- `/v1/storefront/${apiConfig.businessId}/customer/initialize`,
158
+ `/v1/storefront/${apiConfig.businessId}/customers/initialize`,
159
159
  {
160
160
  userAgent: typeof navigator !== "undefined" ? navigator.userAgent : void 0
161
161
  }
162
162
  );
163
- const accessToken = response?.tokens?.accessToken;
164
- const refreshToken = response?.tokens?.refreshToken;
163
+ const accessToken = response?.accessToken;
164
+ const refreshToken = response?.refreshToken;
165
+ const accessExpiresAt = response?.accessExpiresAt;
165
166
  if (accessToken) {
166
- apiConfig.setToken?.({ accessToken, refreshToken });
167
+ apiConfig.setToken?.({ accessToken, refreshToken, accessExpiresAt });
167
168
  }
168
169
  }
169
170
  var createActivityApi = (apiConfig) => ({