arky-sdk 0.2.0 → 0.3.0

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
@@ -1,9 +1,19 @@
1
- import { A as ArkyConfig } from './config-B7Oy_bdX.cjs';
2
- export { g as getGlobalConfig, s as setGlobalConfig } from './config-B7Oy_bdX.cjs';
3
1
  import { ApiResponse, Quote, PaginatedResponse, Newsletter, Payment } from './types.cjs';
4
2
  export { Block, Business, BusinessConfig, BusinessPaymentMethod, EshopCartItem, EshopStoreState, Location, Market, MarketConfigClient, PaymentMethod, PaymentProviderConfig, Price, PromoCodeValidation, QuoteLineItem, ReservationCartPart, ReservationStoreState, ShippingMethod, Zone } from './types.cjs';
5
3
  export { C as Collection, w as CollectionEntry, E as ERROR_CODES, u as ERROR_CONSTANTS, R as RequestError, S as ServerError, V as ValidationError, W as ValidationResult, m as categorify, H as convertServerErrorToRequestError, J as convertToMajor, K as convertToMinor, U as createPaymentForCheckout, I as errors, z as extractBlockValues, i as fetchSvgContent, o as findTimeZone, x as formatBlockValue, N as formatCurrencyAmount, n as formatDate, O as formatMinor, P as formatPayment, B as getBlockFromArray, g as getBlockLabel, A as getBlockObjectValues, d as getBlockTextValue, e as getBlockValue, f as getBlockValues, M as getCurrencyFromMarket, q as getErrorMessage, D as getGalleryThumbnail, h as getImageUrl, Q as getMarketPrice, T as getPriceAmount, j as getSvgContentForAstro, L as getSymbol, l as humanize, k as injectSvgIntoElement, r as isErrorCode, y as prepareBlocksForSubmission, s as slugify, t as thumbnailUrl, G as transformErrors, F as translateMap, p as tzGroups, a as validateEmail, v as validatePhoneNumber, c as validateRequired, b as validateVerificationCode } from './validation-C9UAYKke.cjs';
6
4
 
5
+ interface ArkyConfig {
6
+ apiUrl: string;
7
+ businessId: string;
8
+ storageUrl?: string;
9
+ auth?: {
10
+ type: 'guest' | 'api-token';
11
+ apiToken?: string;
12
+ };
13
+ }
14
+ declare function setGlobalConfig(config: ArkyConfig): void;
15
+ declare function getGlobalConfig(): ArkyConfig;
16
+
7
17
  /**
8
18
  * Query parameter builder utility that maintains exact backward compatibility
9
19
  * with existing API parameter encoding patterns
@@ -260,9 +270,9 @@ declare function getBusinessConfig(businessId: string): Promise<{
260
270
  data?: undefined;
261
271
  }>;
262
272
 
263
- declare const SDK_VERSION = "0.2.0";
273
+ declare const SDK_VERSION = "0.3.0";
264
274
  declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
265
275
 
266
276
  declare function initArky(config: ArkyConfig): ArkyConfig;
267
277
 
268
- export { ApiResponse, ArkyConfig, Newsletter, PaginatedResponse, Payment, Quote, SDK_VERSION, SUPPORTED_FRAMEWORKS, cmsApi, eshopApi, getBusinessConfig, getGuestToken, httpClient, initArky, newsletterApi, reservationApi, updateProfilePhone, verifyPhoneCode };
278
+ export { ApiResponse, type ArkyConfig, Newsletter, PaginatedResponse, Payment, Quote, SDK_VERSION, SUPPORTED_FRAMEWORKS, cmsApi, eshopApi, getBusinessConfig, getGlobalConfig, getGuestToken, httpClient, initArky, newsletterApi, reservationApi, setGlobalConfig, updateProfilePhone, verifyPhoneCode };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,19 @@
1
- import { A as ArkyConfig } from './config-B7Oy_bdX.js';
2
- export { g as getGlobalConfig, s as setGlobalConfig } from './config-B7Oy_bdX.js';
3
1
  import { ApiResponse, Quote, PaginatedResponse, Newsletter, Payment } from './types.js';
4
2
  export { Block, Business, BusinessConfig, BusinessPaymentMethod, EshopCartItem, EshopStoreState, Location, Market, MarketConfigClient, PaymentMethod, PaymentProviderConfig, Price, PromoCodeValidation, QuoteLineItem, ReservationCartPart, ReservationStoreState, ShippingMethod, Zone } from './types.js';
5
3
  export { C as Collection, w as CollectionEntry, E as ERROR_CODES, u as ERROR_CONSTANTS, R as RequestError, S as ServerError, V as ValidationError, W as ValidationResult, m as categorify, H as convertServerErrorToRequestError, J as convertToMajor, K as convertToMinor, U as createPaymentForCheckout, I as errors, z as extractBlockValues, i as fetchSvgContent, o as findTimeZone, x as formatBlockValue, N as formatCurrencyAmount, n as formatDate, O as formatMinor, P as formatPayment, B as getBlockFromArray, g as getBlockLabel, A as getBlockObjectValues, d as getBlockTextValue, e as getBlockValue, f as getBlockValues, M as getCurrencyFromMarket, q as getErrorMessage, D as getGalleryThumbnail, h as getImageUrl, Q as getMarketPrice, T as getPriceAmount, j as getSvgContentForAstro, L as getSymbol, l as humanize, k as injectSvgIntoElement, r as isErrorCode, y as prepareBlocksForSubmission, s as slugify, t as thumbnailUrl, G as transformErrors, F as translateMap, p as tzGroups, a as validateEmail, v as validatePhoneNumber, c as validateRequired, b as validateVerificationCode } from './validation-DIvAzYjG.js';
6
4
 
5
+ interface ArkyConfig {
6
+ apiUrl: string;
7
+ businessId: string;
8
+ storageUrl?: string;
9
+ auth?: {
10
+ type: 'guest' | 'api-token';
11
+ apiToken?: string;
12
+ };
13
+ }
14
+ declare function setGlobalConfig(config: ArkyConfig): void;
15
+ declare function getGlobalConfig(): ArkyConfig;
16
+
7
17
  /**
8
18
  * Query parameter builder utility that maintains exact backward compatibility
9
19
  * with existing API parameter encoding patterns
@@ -260,9 +270,9 @@ declare function getBusinessConfig(businessId: string): Promise<{
260
270
  data?: undefined;
261
271
  }>;
262
272
 
263
- declare const SDK_VERSION = "0.2.0";
273
+ declare const SDK_VERSION = "0.3.0";
264
274
  declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
265
275
 
266
276
  declare function initArky(config: ArkyConfig): ArkyConfig;
267
277
 
268
- export { ApiResponse, ArkyConfig, Newsletter, PaginatedResponse, Payment, Quote, SDK_VERSION, SUPPORTED_FRAMEWORKS, cmsApi, eshopApi, getBusinessConfig, getGuestToken, httpClient, initArky, newsletterApi, reservationApi, updateProfilePhone, verifyPhoneCode };
278
+ export { ApiResponse, type ArkyConfig, Newsletter, PaginatedResponse, Payment, Quote, SDK_VERSION, SUPPORTED_FRAMEWORKS, cmsApi, eshopApi, getBusinessConfig, getGlobalConfig, getGuestToken, httpClient, initArky, newsletterApi, reservationApi, setGlobalConfig, updateProfilePhone, verifyPhoneCode };
package/dist/index.js CHANGED
@@ -1418,7 +1418,7 @@ function validateRequired(value, fieldName = "This field") {
1418
1418
  }
1419
1419
 
1420
1420
  // src/index.ts
1421
- var SDK_VERSION = "0.2.0";
1421
+ var SDK_VERSION = "0.3.0";
1422
1422
  var SUPPORTED_FRAMEWORKS = ["astro", "react", "vue", "svelte", "vanilla"];
1423
1423
  function initArky(config) {
1424
1424
  if (!config.apiUrl) {