arky-sdk 0.7.109 → 0.7.111
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/admin.cjs +5 -14
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.js +5 -14
- package/dist/admin.js.map +1 -1
- package/dist/index.cjs +6 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -12
- package/dist/index.d.ts +4 -12
- package/dist/index.js +6 -31
- package/dist/index.js.map +1 -1
- package/dist/storefront.cjs +0 -25
- package/dist/storefront.cjs.map +1 -1
- package/dist/storefront.js +0 -25
- package/dist/storefront.js.map +1 -1
- package/dist/types.d.cts +2 -1
- package/dist/types.d.ts +2 -1
- package/package.json +1 -1
package/dist/admin.cjs
CHANGED
|
@@ -481,11 +481,11 @@ var createStoreApi = (apiConfig, updateSession) => {
|
|
|
481
481
|
payload,
|
|
482
482
|
options
|
|
483
483
|
);
|
|
484
|
-
if (params.action === "accept" && result?.access_token) {
|
|
484
|
+
if (params.action === "accept" && result?.auth?.access_token) {
|
|
485
485
|
updateSession(() => ({
|
|
486
|
-
access_token: result.access_token,
|
|
487
|
-
refresh_token: result.refresh_token,
|
|
488
|
-
access_expires_at: result.access_expires_at
|
|
486
|
+
access_token: result.auth.access_token,
|
|
487
|
+
refresh_token: result.auth.refresh_token,
|
|
488
|
+
access_expires_at: result.auth.access_expires_at
|
|
489
489
|
}));
|
|
490
490
|
}
|
|
491
491
|
return result;
|
|
@@ -493,7 +493,7 @@ var createStoreApi = (apiConfig, updateSession) => {
|
|
|
493
493
|
async testWebhook(params, options) {
|
|
494
494
|
return apiConfig.httpClient.post(
|
|
495
495
|
`/v1/stores/${apiConfig.storeId}/webhooks/test`,
|
|
496
|
-
params
|
|
496
|
+
params,
|
|
497
497
|
options
|
|
498
498
|
);
|
|
499
499
|
},
|
|
@@ -2102,14 +2102,6 @@ function getFirstAvailableFCId(variant, quantity = 1) {
|
|
|
2102
2102
|
return inv?.location_id;
|
|
2103
2103
|
}
|
|
2104
2104
|
|
|
2105
|
-
// src/utils/session.ts
|
|
2106
|
-
function getPaymentConfig(store, market) {
|
|
2107
|
-
const provider = store?.payment ?? null;
|
|
2108
|
-
const methods = market?.payment_methods || [];
|
|
2109
|
-
const hasCreditCard = methods.some((m) => m.id === "credit_card");
|
|
2110
|
-
return { provider, enabled: hasCreditCard && !!provider };
|
|
2111
|
-
}
|
|
2112
|
-
|
|
2113
2105
|
// src/index.ts
|
|
2114
2106
|
function createUtilitySurface(apiConfig) {
|
|
2115
2107
|
return {
|
|
@@ -2129,7 +2121,6 @@ function createUtilitySurface(apiConfig) {
|
|
|
2129
2121
|
formatMinor,
|
|
2130
2122
|
getCurrencySymbol,
|
|
2131
2123
|
getCurrencyName,
|
|
2132
|
-
getPaymentConfig,
|
|
2133
2124
|
validatePhoneNumber,
|
|
2134
2125
|
tzGroups,
|
|
2135
2126
|
findTimeZone,
|