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.cjs CHANGED
@@ -157,15 +157,16 @@ async function ensureCustomer(apiConfig) {
157
157
  if (tokens?.accessToken) return;
158
158
  }
159
159
  const response = await apiConfig.httpClient.post(
160
- `/v1/storefront/${apiConfig.businessId}/customer/initialize`,
160
+ `/v1/storefront/${apiConfig.businessId}/customers/initialize`,
161
161
  {
162
162
  userAgent: typeof navigator !== "undefined" ? navigator.userAgent : void 0
163
163
  }
164
164
  );
165
- const accessToken = response?.tokens?.accessToken;
166
- const refreshToken = response?.tokens?.refreshToken;
165
+ const accessToken = response?.accessToken;
166
+ const refreshToken = response?.refreshToken;
167
+ const accessExpiresAt = response?.accessExpiresAt;
167
168
  if (accessToken) {
168
- apiConfig.setToken?.({ accessToken, refreshToken });
169
+ apiConfig.setToken?.({ accessToken, refreshToken, accessExpiresAt });
169
170
  }
170
171
  }
171
172
  var createActivityApi = (apiConfig) => ({