arky-sdk 0.7.107 → 0.7.109

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 CHANGED
@@ -2102,6 +2102,14 @@ 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
+
2105
2113
  // src/index.ts
2106
2114
  function createUtilitySurface(apiConfig) {
2107
2115
  return {
@@ -2121,6 +2129,7 @@ function createUtilitySurface(apiConfig) {
2121
2129
  formatMinor,
2122
2130
  getCurrencySymbol,
2123
2131
  getCurrencyName,
2132
+ getPaymentConfig,
2124
2133
  validatePhoneNumber,
2125
2134
  tzGroups,
2126
2135
  findTimeZone,
@@ -2402,7 +2411,7 @@ function createAdmin(config) {
2402
2411
  apiConfig.locale = locale2;
2403
2412
  },
2404
2413
  getLocale: () => apiConfig.locale,
2405
- get currentSession() {
2414
+ get session() {
2406
2415
  if (config.apiToken) return null;
2407
2416
  return toPublic(readAdminSession());
2408
2417
  },