arky-sdk 0.9.13 → 0.9.17

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.
Files changed (40) hide show
  1. package/README.md +16 -12
  2. package/dist/admin-6xpHuyKc.d.cts +1544 -0
  3. package/dist/admin-DVFAgnHm.d.ts +1544 -0
  4. package/dist/admin.cjs +982 -425
  5. package/dist/admin.cjs.map +1 -1
  6. package/dist/admin.d.cts +3 -3
  7. package/dist/admin.d.ts +3 -3
  8. package/dist/admin.js +982 -425
  9. package/dist/admin.js.map +1 -1
  10. package/dist/{api-DvsFdOaF.d.cts → api-DJrUdQ1C.d.cts} +1425 -657
  11. package/dist/{api-DvsFdOaF.d.ts → api-DJrUdQ1C.d.ts} +1425 -657
  12. package/dist/index.cjs +1317 -539
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.d.cts +3 -3
  15. package/dist/index.d.ts +3 -3
  16. package/dist/index.js +1317 -539
  17. package/dist/index.js.map +1 -1
  18. package/dist/{index-CQd9b_7n.d.ts → inventory-DOwNF3D-.d.cts} +6 -4
  19. package/dist/{index-BC06yiuv.d.cts → inventory-GpWTZ2oe.d.ts} +6 -4
  20. package/dist/storefront.cjs +1210 -658
  21. package/dist/storefront.cjs.map +1 -1
  22. package/dist/storefront.d.cts +88 -285
  23. package/dist/storefront.d.ts +88 -285
  24. package/dist/storefront.js +1207 -659
  25. package/dist/storefront.js.map +1 -1
  26. package/dist/types.cjs.map +1 -1
  27. package/dist/types.d.cts +1 -1
  28. package/dist/types.d.ts +1 -1
  29. package/dist/types.js.map +1 -1
  30. package/dist/utils.cjs +198 -16
  31. package/dist/utils.cjs.map +1 -1
  32. package/dist/utils.d.cts +18 -2
  33. package/dist/utils.d.ts +18 -2
  34. package/dist/utils.js +191 -17
  35. package/dist/utils.js.map +1 -1
  36. package/package.json +4 -5
  37. package/dist/admin-Q9MBFwCb.d.cts +0 -1496
  38. package/dist/admin-ZLXD4_en.d.ts +0 -1496
  39. package/scripts/contract-admin.mjs +0 -120
  40. package/scripts/contract-storefront.mjs +0 -296
@@ -1,12 +1,14 @@
1
- import { fK as OrderPayment, fd as InventoryLevel } from './api-DvsFdOaF.js';
1
+ import { O as OrderMoney, I as InventoryLevel } from './api-DJrUdQ1C.cjs';
2
2
 
3
- type AnyPayment = Pick<OrderPayment, 'total' | 'currency'>;
3
+ type OrderTotal = Pick<OrderMoney, 'total' | 'currency'>;
4
+ declare const SUPPORTED_STORE_CURRENCIES: readonly ["USD", "EUR", "GBP", "JPY", "CNY", "CHF", "AUD", "CAD", "HKD", "SGD", "NZD", "KRW", "SEK", "NOK", "DKK", "INR", "MXN", "BRL", "ZAR", "RUB", "TRY", "PLN", "THB", "IDR", "MYR", "PHP", "CZK", "ILS", "AED", "SAR", "HUF", "RON", "BGN", "HRK", "BAM", "RSD", "MKD", "ALL"];
5
+ declare function getCurrencyMinorUnits(currency: string): number;
4
6
  declare function convertToMajor(minorAmount: number, currency: string): number;
5
7
  declare function convertToMinor(majorAmount: number, currency: string): number;
6
8
  declare function getCurrencySymbol(currency: string): string;
7
9
  declare function getCurrencyName(currency: string): string;
8
10
  declare function formatMinor(amountMinor: number, currency: string): string;
9
- declare function formatPayment(payment: AnyPayment): string;
11
+ declare function formatPayment(payment: OrderTotal): string;
10
12
 
11
13
  declare function isValidKey(key: string): boolean;
12
14
  declare function validateKey(key: string): {
@@ -25,4 +27,4 @@ declare function hasStock(variant: VariantWithInventory, quantity?: number): boo
25
27
  declare function getInventoryAt(variant: VariantWithInventory, locationId: string): InventoryLevel | undefined;
26
28
  declare function getFirstAvailableFCId(variant: VariantWithInventory, quantity?: number): string | undefined;
27
29
 
28
- export { formatMinor as a, getCurrencyName as b, getAvailableStock as c, getReservedStock as d, getInventoryAt as e, formatPayment as f, getCurrencySymbol as g, hasStock as h, isValidKey as i, getFirstAvailableFCId as j, convertToMajor as k, convertToMinor as l, nameToKey as n, toKey as t, validateKey as v };
30
+ export { SUPPORTED_STORE_CURRENCIES as S, getCurrencyName as a, convertToMinor as b, convertToMajor as c, getCurrencyMinorUnits as d, getAvailableStock as e, formatMinor as f, getCurrencySymbol as g, getReservedStock as h, isValidKey as i, hasStock as j, getInventoryAt as k, getFirstAvailableFCId as l, formatPayment as m, nameToKey as n, toKey as t, validateKey as v };
@@ -1,12 +1,14 @@
1
- import { fK as OrderPayment, fd as InventoryLevel } from './api-DvsFdOaF.cjs';
1
+ import { O as OrderMoney, I as InventoryLevel } from './api-DJrUdQ1C.js';
2
2
 
3
- type AnyPayment = Pick<OrderPayment, 'total' | 'currency'>;
3
+ type OrderTotal = Pick<OrderMoney, 'total' | 'currency'>;
4
+ declare const SUPPORTED_STORE_CURRENCIES: readonly ["USD", "EUR", "GBP", "JPY", "CNY", "CHF", "AUD", "CAD", "HKD", "SGD", "NZD", "KRW", "SEK", "NOK", "DKK", "INR", "MXN", "BRL", "ZAR", "RUB", "TRY", "PLN", "THB", "IDR", "MYR", "PHP", "CZK", "ILS", "AED", "SAR", "HUF", "RON", "BGN", "HRK", "BAM", "RSD", "MKD", "ALL"];
5
+ declare function getCurrencyMinorUnits(currency: string): number;
4
6
  declare function convertToMajor(minorAmount: number, currency: string): number;
5
7
  declare function convertToMinor(majorAmount: number, currency: string): number;
6
8
  declare function getCurrencySymbol(currency: string): string;
7
9
  declare function getCurrencyName(currency: string): string;
8
10
  declare function formatMinor(amountMinor: number, currency: string): string;
9
- declare function formatPayment(payment: AnyPayment): string;
11
+ declare function formatPayment(payment: OrderTotal): string;
10
12
 
11
13
  declare function isValidKey(key: string): boolean;
12
14
  declare function validateKey(key: string): {
@@ -25,4 +27,4 @@ declare function hasStock(variant: VariantWithInventory, quantity?: number): boo
25
27
  declare function getInventoryAt(variant: VariantWithInventory, locationId: string): InventoryLevel | undefined;
26
28
  declare function getFirstAvailableFCId(variant: VariantWithInventory, quantity?: number): string | undefined;
27
29
 
28
- export { formatMinor as a, getCurrencyName as b, getAvailableStock as c, getReservedStock as d, getInventoryAt as e, formatPayment as f, getCurrencySymbol as g, hasStock as h, isValidKey as i, getFirstAvailableFCId as j, convertToMajor as k, convertToMinor as l, nameToKey as n, toKey as t, validateKey as v };
30
+ export { SUPPORTED_STORE_CURRENCIES as S, getCurrencyName as a, convertToMinor as b, convertToMajor as c, getCurrencyMinorUnits as d, getAvailableStock as e, formatMinor as f, getCurrencySymbol as g, getReservedStock as h, isValidKey as i, hasStock as j, getInventoryAt as k, getFirstAvailableFCId as l, formatPayment as m, nameToKey as n, toKey as t, validateKey as v };