arky-sdk 0.9.12 → 0.9.16
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/README.md +16 -12
- package/dist/admin-C-ZTxvz3.d.ts +1544 -0
- package/dist/admin-Dm2WRN6q.d.cts +1544 -0
- package/dist/admin.cjs +980 -433
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.d.cts +3 -3
- package/dist/admin.d.ts +3 -3
- package/dist/admin.js +980 -433
- package/dist/admin.js.map +1 -1
- package/dist/{api-D4lMmvF0.d.cts → api-D37IpMSq.d.cts} +1415 -671
- package/dist/{api-D4lMmvF0.d.ts → api-D37IpMSq.d.ts} +1415 -671
- package/dist/index.cjs +1315 -547
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1315 -547
- package/dist/index.js.map +1 -1
- package/dist/{index-Be8suRwP.d.ts → inventory-DdN96PX3.d.cts} +6 -4
- package/dist/{index-BS2x278C.d.cts → inventory-Dh1RevEb.d.ts} +6 -4
- package/dist/storefront.cjs +1210 -658
- package/dist/storefront.cjs.map +1 -1
- package/dist/storefront.d.cts +88 -285
- package/dist/storefront.d.ts +88 -285
- package/dist/storefront.js +1207 -659
- package/dist/storefront.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils.cjs +198 -16
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +18 -2
- package/dist/utils.d.ts +18 -2
- package/dist/utils.js +191 -17
- package/dist/utils.js.map +1 -1
- package/package.json +4 -5
- package/dist/admin-D8HiRDCl.d.cts +0 -1536
- package/dist/admin-Dnnv18wN.d.ts +0 -1536
- package/scripts/contract-admin.mjs +0 -137
- package/scripts/contract-storefront.mjs +0 -296
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { O as OrderMoney, I as InventoryLevel } from './api-D37IpMSq.cjs';
|
|
2
2
|
|
|
3
|
-
type
|
|
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:
|
|
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 {
|
|
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 {
|
|
1
|
+
import { O as OrderMoney, I as InventoryLevel } from './api-D37IpMSq.js';
|
|
2
2
|
|
|
3
|
-
type
|
|
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:
|
|
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 {
|
|
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 };
|