@stacksjs/commerce 0.75.519 → 0.75.522
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/carts/fetch.d.ts +1 -0
- package/dist/carts/store.d.ts +1 -0
- package/dist/carts/update.d.ts +1 -0
- package/dist/coupons/fetch.d.ts +1 -0
- package/dist/coupons/store.d.ts +1 -0
- package/dist/coupons/update.d.ts +1 -0
- package/dist/customers/fetch.d.ts +1 -0
- package/dist/customers/store.d.ts +1 -0
- package/dist/customers/update.d.ts +1 -0
- package/dist/devices/export.d.ts +1 -0
- package/dist/devices/fetch.d.ts +1 -0
- package/dist/devices/store.d.ts +1 -0
- package/dist/devices/update.d.ts +1 -0
- package/dist/dsfinvk.d.ts +8 -8
- package/dist/errors/fetch.d.ts +1 -0
- package/dist/gift-cards/fetch.d.ts +1 -0
- package/dist/gift-cards/store.d.ts +1 -0
- package/dist/gift-cards/update.d.ts +1 -0
- package/dist/imports/account-writer.d.ts +4 -0
- package/dist/imports/credentials.d.ts +4 -3
- package/dist/imports/shopify.d.ts +1 -2
- package/dist/imports/shopware-admin.d.ts +1 -0
- package/dist/imports/shopware.d.ts +0 -6
- package/dist/imports/woocommerce.d.ts +1 -1
- package/dist/kassensichv.d.ts +25 -25
- package/dist/orders/fetch.d.ts +1 -0
- package/dist/orders/place-order.d.ts +1 -0
- package/dist/orders/store.d.ts +1 -0
- package/dist/payments/fetch.d.ts +1 -0
- package/dist/payments/store.d.ts +1 -0
- package/dist/payments/update.d.ts +1 -0
- package/dist/products/categories/fetch.d.ts +1 -0
- package/dist/products/categories/store.d.ts +1 -0
- package/dist/products/categories/update.d.ts +1 -0
- package/dist/products/items/fetch.d.ts +1 -0
- package/dist/products/items/store.d.ts +1 -0
- package/dist/products/items/update.d.ts +1 -0
- package/dist/products/manufacturers/fetch.d.ts +1 -0
- package/dist/products/manufacturers/store.d.ts +1 -0
- package/dist/products/manufacturers/update.d.ts +1 -0
- package/dist/products/reviews/fetch.d.ts +1 -0
- package/dist/products/reviews/store.d.ts +1 -0
- package/dist/products/reviews/update.d.ts +1 -0
- package/dist/products/units/fetch.d.ts +1 -0
- package/dist/products/units/store.d.ts +1 -0
- package/dist/products/units/update.d.ts +1 -0
- package/dist/products/variants/fetch.d.ts +1 -0
- package/dist/products/variants/store.d.ts +1 -0
- package/dist/products/variants/update.d.ts +1 -0
- package/dist/receipts/fetch.d.ts +1 -0
- package/dist/receipts/printer.d.ts +1 -0
- package/dist/receipts/store.d.ts +1 -0
- package/dist/receipts/update.d.ts +1 -0
- package/dist/register.d.ts +1 -0
- package/dist/shippings/couriers/fetch.d.ts +1 -0
- package/dist/shippings/couriers/store.d.ts +1 -0
- package/dist/shippings/couriers/update.d.ts +1 -0
- package/dist/shippings/delivery-routes/fetch.d.ts +1 -0
- package/dist/shippings/delivery-routes/store.d.ts +1 -0
- package/dist/shippings/delivery-routes/update.d.ts +1 -0
- package/dist/shippings/delivery-routes/validate-write.d.ts +1 -0
- package/dist/shippings/digital-deliveries/fetch.d.ts +1 -0
- package/dist/shippings/digital-deliveries/store.d.ts +1 -0
- package/dist/shippings/digital-deliveries/update.d.ts +1 -0
- package/dist/shippings/license-keys/fetch.d.ts +1 -0
- package/dist/shippings/license-keys/store.d.ts +1 -0
- package/dist/shippings/license-keys/update.d.ts +1 -0
- package/dist/shippings/license-keys/validate-write.d.ts +1 -0
- package/dist/shippings/shipping-methods/fetch.d.ts +1 -0
- package/dist/shippings/shipping-methods/store.d.ts +1 -0
- package/dist/shippings/shipping-methods/update.d.ts +1 -0
- package/dist/shippings/shipping-rates/fetch.d.ts +1 -0
- package/dist/shippings/shipping-rates/store.d.ts +1 -0
- package/dist/shippings/shipping-rates/update.d.ts +1 -0
- package/dist/shippings/shipping-rates/validate-write.d.ts +1 -0
- package/dist/shippings/shipping-zones/fetch.d.ts +1 -0
- package/dist/shippings/shipping-zones/store.d.ts +1 -0
- package/dist/shippings/shipping-zones/update.d.ts +1 -0
- package/dist/shippings/write-data.d.ts +1 -0
- package/dist/tax/fetch.d.ts +1 -0
- package/dist/tax/store.d.ts +1 -0
- package/dist/tax/update.d.ts +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/utils/inventory-adjustment.d.ts +1 -0
- package/dist/waitlists/products/destroy.d.ts +1 -0
- package/dist/waitlists/products/export.d.ts +1 -0
- package/dist/waitlists/products/fetch.d.ts +1 -0
- package/dist/waitlists/products/store.d.ts +1 -0
- package/dist/waitlists/products/update.d.ts +1 -0
- package/dist/waitlists/restaurant/destroy.d.ts +1 -0
- package/dist/waitlists/restaurant/export.d.ts +1 -0
- package/dist/waitlists/restaurant/fetch.d.ts +1 -0
- package/dist/waitlists/restaurant/store.d.ts +1 -0
- package/dist/waitlists/restaurant/update.d.ts +1 -0
- package/package.json +14 -14
package/dist/carts/fetch.d.ts
CHANGED
package/dist/carts/store.d.ts
CHANGED
package/dist/carts/update.d.ts
CHANGED
|
@@ -16,3 +16,4 @@ export declare function update(id: number, data: Omit<CartUpdate, 'id'>): Promis
|
|
|
16
16
|
export declare function bulkUpdate(data: CartUpdate[]): Promise<number>;
|
|
17
17
|
declare type CartJsonResponse = ModelRow<typeof Cart>;
|
|
18
18
|
declare type CartUpdate = UpdateModelData<typeof Cart>;
|
|
19
|
+
export {};
|
package/dist/coupons/fetch.d.ts
CHANGED
package/dist/coupons/store.d.ts
CHANGED
|
@@ -8,3 +8,4 @@ import type { Coupon, ModelRow, NewModelData } from '@stacksjs/orm';
|
|
|
8
8
|
export declare function store(data: NewCoupon): Promise<CouponJsonResponse | undefined>;
|
|
9
9
|
declare type CouponJsonResponse = ModelRow<typeof Coupon>;
|
|
10
10
|
declare type NewCoupon = NewModelData<typeof Coupon>;
|
|
11
|
+
export {};
|
package/dist/coupons/update.d.ts
CHANGED
|
@@ -14,3 +14,4 @@ export declare function store(data: NewCustomer): Promise<CustomerJsonResponse>;
|
|
|
14
14
|
export declare const DEFAULT_CUSTOMER_AVATAR: 'https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?w=400&fit=crop&q=60';
|
|
15
15
|
declare type CustomerJsonResponse = ModelRow<typeof Customer>;
|
|
16
16
|
declare type NewCustomer = NewModelData<typeof Customer>;
|
|
17
|
+
export {};
|
|
@@ -9,3 +9,4 @@ import type { Customer, ModelRow, UpdateModelData } from '@stacksjs/orm';
|
|
|
9
9
|
export declare function update(id: number, data: Omit<CustomerUpdate, 'id'>): Promise<CustomerJsonResponse | undefined>;
|
|
10
10
|
declare type CustomerJsonResponse = ModelRow<typeof Customer>;
|
|
11
11
|
declare type CustomerUpdate = UpdateModelData<typeof Customer>;
|
|
12
|
+
export {};
|
package/dist/devices/export.d.ts
CHANGED
package/dist/devices/fetch.d.ts
CHANGED
|
@@ -37,3 +37,4 @@ export declare function calculatePrinterHealth(): Promise<number>;
|
|
|
37
37
|
export declare function getPrinterStatusCounts(): Promise<Record<string, number>>;
|
|
38
38
|
declare type PrintDeviceJsonResponse = ModelRow<typeof PrintDevice>;
|
|
39
39
|
declare type ReceiptJsonResponse = ModelRow<typeof Receipt>;
|
|
40
|
+
export {};
|
package/dist/devices/store.d.ts
CHANGED
|
@@ -15,3 +15,4 @@ export declare function store(data: NewPrintDevice): Promise<PrintDeviceJsonResp
|
|
|
15
15
|
export declare function bulkStore(data: NewPrintDevice[]): Promise<number>;
|
|
16
16
|
declare type PrintDeviceJsonResponse = ModelRow<typeof PrintDevice>;
|
|
17
17
|
declare type NewPrintDevice = NewModelData<typeof PrintDevice>;
|
|
18
|
+
export {};
|
package/dist/devices/update.d.ts
CHANGED
|
@@ -25,3 +25,4 @@ export declare function updateStatus(id: number, status: 'online' | 'offline' |
|
|
|
25
25
|
export declare function updatePrintCount(id: number, printCount?: number): Promise<PrintDeviceJsonResponse | undefined>;
|
|
26
26
|
declare type PrintDeviceJsonResponse = ModelRow<typeof PrintDevice>;
|
|
27
27
|
declare type PrintDeviceUpdate = UpdateModelData<typeof PrintDevice>;
|
|
28
|
+
export {};
|
package/dist/dsfinvk.d.ts
CHANGED
|
@@ -30,14 +30,14 @@ export declare const DSFINVK_TABLES: readonly DsfinvkTable[];
|
|
|
30
30
|
export declare const DSFINVK_MANDATORY: Readonly<Record<DsfinvkTableName, readonly string[]>>;
|
|
31
31
|
/** The values DSFinV-K allows in its closed lists. */
|
|
32
32
|
export declare const DSFINVK_ENUMS: {
|
|
33
|
-
BON_TYP: readonly ['Beleg', 'AVTransfer', 'AVBestellung', 'AVTraining', 'AVBelegstorno', 'AVBelegabbruch', 'AVSachbezug', 'AVRechnung', 'AVSonstige'];
|
|
34
|
-
GV_TYP: readonly ['Umsatz', 'Pfand', 'PfandRueckzahlung', 'Rabatt', 'Aufschlag', 'ZuschussEcht', 'ZuschussUnecht', 'TrinkgeldAG', 'TrinkgeldAN', 'EinzweckgutscheinKauf', 'EinzweckgutscheinEinloesung', 'MehrzweckgutscheinKauf', 'MehrzweckgutscheinEinloesung', 'Forderungsentstehung', 'Forderungsaufloesung', 'Anzahlungseinstellung', 'Anzahlungsaufloesung', 'Anfangsbestand', 'Privatentnahme', 'Privateinlage', 'Geldtransit', 'Lohnzahlung', 'Einzahlung', 'Auszahlung', 'DifferenzSollIst'];
|
|
35
|
-
ZAHLART_TYP: readonly ['Bar', 'Unbar', 'Keine', 'ECKarte', 'Kreditkarte', 'ElZahlungsdienstleister', 'Guthabenkarte'];
|
|
36
|
-
REF_TYP: readonly ['ExterneRechnung', 'ExternerLieferschein', 'Transaktion', 'ExterneSonstige'];
|
|
37
|
-
TSE_TA_VORGANGSART: readonly ['Kassenbeleg-V1', 'Bestellung-V1', 'SonstigerVorgang'];
|
|
38
|
-
TSE_ZEITFORMAT: readonly ['unixTime', 'utcTime', 'utcTimeWithSeconds', 'generalizedTime', 'generalizedTimeWithMilliseconds'];
|
|
39
|
-
TSE_PD_ENCODING: readonly ['UTF-8', 'ASCII'];
|
|
40
|
-
FLAG: readonly ['0', '1']
|
|
33
|
+
readonly BON_TYP: readonly ['Beleg', 'AVTransfer', 'AVBestellung', 'AVTraining', 'AVBelegstorno', 'AVBelegabbruch', 'AVSachbezug', 'AVRechnung', 'AVSonstige'];
|
|
34
|
+
readonly GV_TYP: readonly ['Umsatz', 'Pfand', 'PfandRueckzahlung', 'Rabatt', 'Aufschlag', 'ZuschussEcht', 'ZuschussUnecht', 'TrinkgeldAG', 'TrinkgeldAN', 'EinzweckgutscheinKauf', 'EinzweckgutscheinEinloesung', 'MehrzweckgutscheinKauf', 'MehrzweckgutscheinEinloesung', 'Forderungsentstehung', 'Forderungsaufloesung', 'Anzahlungseinstellung', 'Anzahlungsaufloesung', 'Anfangsbestand', 'Privatentnahme', 'Privateinlage', 'Geldtransit', 'Lohnzahlung', 'Einzahlung', 'Auszahlung', 'DifferenzSollIst'];
|
|
35
|
+
readonly ZAHLART_TYP: readonly ['Bar', 'Unbar', 'Keine', 'ECKarte', 'Kreditkarte', 'ElZahlungsdienstleister', 'Guthabenkarte'];
|
|
36
|
+
readonly REF_TYP: readonly ['ExterneRechnung', 'ExternerLieferschein', 'Transaktion', 'ExterneSonstige'];
|
|
37
|
+
readonly TSE_TA_VORGANGSART: readonly ['Kassenbeleg-V1', 'Bestellung-V1', 'SonstigerVorgang'];
|
|
38
|
+
readonly TSE_ZEITFORMAT: readonly ['unixTime', 'utcTime', 'utcTimeWithSeconds', 'generalizedTime', 'generalizedTimeWithMilliseconds'];
|
|
39
|
+
readonly TSE_PD_ENCODING: readonly ['UTF-8', 'ASCII'];
|
|
40
|
+
readonly FLAG: readonly ['0', '1']
|
|
41
41
|
};
|
|
42
42
|
/** The DFKA taxonomy version the closing data follows (TAXONOMIE_VERSION). */
|
|
43
43
|
export declare const DFKA_TAXONOMY_VERSION: '2.4';
|
package/dist/errors/fetch.d.ts
CHANGED
|
@@ -90,3 +90,4 @@ export type ErrorResolution = 'unresolved' | 'resolved' | 'ignored';
|
|
|
90
90
|
/** One group on a page: `GroupedError` without every occurrence's id. */
|
|
91
91
|
export type GroupedErrorSummary = Omit<GroupedError, 'error_ids'>;
|
|
92
92
|
declare type GroupingRow = Pick<ErrorRecord, 'id' | 'type' | 'message' | 'resolution' | 'created_at'>;
|
|
93
|
+
export {};
|
|
@@ -14,3 +14,4 @@ export declare function giftCardDates(data: Record<string, unknown>): Record<str
|
|
|
14
14
|
export declare function store(data: NewGiftCard): Promise<GiftCardJsonResponse | undefined>;
|
|
15
15
|
declare type GiftCardJsonResponse = ModelRow<typeof GiftCard>;
|
|
16
16
|
declare type NewGiftCard = NewModelData<typeof GiftCard>;
|
|
17
|
+
export {};
|
|
@@ -35,3 +35,4 @@ export declare function update(id: number, data: Omit<GiftCardUpdate, 'id'>): Pr
|
|
|
35
35
|
export declare function updateBalance(id: number, amount: number): Promise<GiftCardJsonResponse | undefined>;
|
|
36
36
|
declare type GiftCardJsonResponse = ModelRow<typeof GiftCard>;
|
|
37
37
|
declare type GiftCardUpdate = UpdateModelData<typeof GiftCard>;
|
|
38
|
+
export {};
|
|
@@ -229,9 +229,13 @@ export type CustomerUpdate = Partial<CustomerRow> & { updated_at: string }
|
|
|
229
229
|
* the next order for the same email finds them without a query.
|
|
230
230
|
*/
|
|
231
231
|
declare class CustomerIndex {
|
|
232
|
+
private byUuid;
|
|
233
|
+
private byEmail;
|
|
234
|
+
private uuidById;
|
|
232
235
|
load(repository: AccountRepository, keys: Array<{ uuid: string | null, email: string | null }>): Promise<void>;
|
|
233
236
|
remember(id: number, uuid: string | null, email: string | null): void;
|
|
234
237
|
find(uuid: string | null, email: string | null): { id: number, matchedBy: 'uuid' | 'email' } | null;
|
|
235
238
|
uuidOf(id: number): string | null;
|
|
236
239
|
emailTakenByOther(email: string, id: number): boolean;
|
|
237
240
|
}
|
|
241
|
+
export {};
|
|
@@ -22,9 +22,9 @@ export declare function redactSecrets(text: string, secrets: string[]): string;
|
|
|
22
22
|
* halfway through an import.
|
|
23
23
|
*/
|
|
24
24
|
export declare const ACCOUNT_CREDENTIAL_ENV: {
|
|
25
|
-
shopify: readonly ['SHOPIFY_ADMIN_TOKEN'];
|
|
26
|
-
woocommerce: readonly ['WOOCOMMERCE_CONSUMER_KEY', 'WOOCOMMERCE_CONSUMER_SECRET'];
|
|
27
|
-
shopware: readonly ['SHOPWARE_CLIENT_ID', 'SHOPWARE_CLIENT_SECRET']
|
|
25
|
+
readonly shopify: readonly ['SHOPIFY_ADMIN_TOKEN'];
|
|
26
|
+
readonly woocommerce: readonly ['WOOCOMMERCE_CONSUMER_KEY', 'WOOCOMMERCE_CONSUMER_SECRET'];
|
|
27
|
+
readonly shopware: readonly ['SHOPWARE_CLIENT_ID', 'SHOPWARE_CLIENT_SECRET']
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
30
|
* Where each platform issues the credentials, for every message that asks for them.
|
|
@@ -42,3 +42,4 @@ declare type Env = Record<string, string | undefined>;
|
|
|
42
42
|
export declare class MissingCredentialsError extends Error {
|
|
43
43
|
constructor(message: string);
|
|
44
44
|
}
|
|
45
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { CatalogAdapter, CatalogFetchOptions,
|
|
2
|
-
declare function price(value: unknown, exponent: number, label: string, externalId: string, warnings: CatalogWarning[]): number | null;
|
|
1
|
+
import type { CatalogAdapter, CatalogFetchOptions, MappedProduct } from './types';
|
|
3
2
|
/** One `products.json` entry as a normalized catalog product. Pure. */
|
|
4
3
|
export declare function mapShopifyProduct(raw: ShopifyProductPayload, context: ShopifyMapContext): MappedProduct;
|
|
5
4
|
/** The shop's currency from `/meta.json`, or null if the store will not say. */
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import type { CatalogAdapter, FetchLike, MappedProduct } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* `translated.<field>` (the value in the sales channel's language, with
|
|
4
|
-
* inheritance from the parent already applied), else the entity's own field.
|
|
5
|
-
* Shopware serializes an empty `translated` as `[]`, hence the object check.
|
|
6
|
-
*/
|
|
7
|
-
declare function translated(entity: object | null | undefined, field: string): string | null;
|
|
8
2
|
/** One Store API parent product, plus its children, as a catalog product. Pure. */
|
|
9
3
|
export declare function mapShopwareProduct(raw: ShopwareProductPayload, context: ShopwareMapContext): MappedProduct;
|
|
10
4
|
/**
|
|
@@ -7,7 +7,6 @@ import type { CatalogAdapter, MappedProduct } from './types';
|
|
|
7
7
|
* makes the regular price the compare-at price.
|
|
8
8
|
*/
|
|
9
9
|
export declare function wooPrices(prices: WooPricesPayload | null | undefined): Prices;
|
|
10
|
-
declare function terms(list: WooTermPayload[] | null | undefined): Array<{ name: string, slug: string }>;
|
|
11
10
|
/**
|
|
12
11
|
* A product slug as the shopper reads it. WordPress stores a non-ASCII slug
|
|
13
12
|
* percent-encoded (`sencha-%e7%b7%91%e8%8c%b6-100g`) and the Store API hands
|
|
@@ -65,3 +64,4 @@ declare interface Prices {
|
|
|
65
64
|
priceMinor: number | null
|
|
66
65
|
compareAtMinor: number | null
|
|
67
66
|
}
|
|
67
|
+
export {};
|
package/dist/kassensichv.d.ts
CHANGED
|
@@ -41,35 +41,35 @@ export declare function receiptVatLines(vat: readonly TseVatAmount[]): Array<{ k
|
|
|
41
41
|
* amounts of `processData` (general, reduced, § 24 Nr. 3, § 24 Nr. 1, 0%).
|
|
42
42
|
*/
|
|
43
43
|
export declare const DE_VAT_KEYS: {
|
|
44
|
-
1: {
|
|
45
|
-
rate: 19;
|
|
46
|
-
bucket: 0;
|
|
47
|
-
fiskaly: 'NORMAL';
|
|
48
|
-
description: 'Regelsteuersatz'
|
|
44
|
+
readonly 1: {
|
|
45
|
+
readonly rate: 19;
|
|
46
|
+
readonly bucket: 0;
|
|
47
|
+
readonly fiskaly: 'NORMAL';
|
|
48
|
+
readonly description: 'Regelsteuersatz'
|
|
49
49
|
};
|
|
50
|
-
2: {
|
|
51
|
-
rate: 7;
|
|
52
|
-
bucket: 1;
|
|
53
|
-
fiskaly: 'REDUCED_1';
|
|
54
|
-
description: 'Ermäßigter Steuersatz'
|
|
50
|
+
readonly 2: {
|
|
51
|
+
readonly rate: 7;
|
|
52
|
+
readonly bucket: 1;
|
|
53
|
+
readonly fiskaly: 'REDUCED_1';
|
|
54
|
+
readonly description: 'Ermäßigter Steuersatz'
|
|
55
55
|
};
|
|
56
|
-
5: {
|
|
57
|
-
rate: 0;
|
|
58
|
-
bucket: 4;
|
|
59
|
-
fiskaly: 'NULL';
|
|
60
|
-
description: 'Nicht Steuerbar'
|
|
56
|
+
readonly 5: {
|
|
57
|
+
readonly rate: 0;
|
|
58
|
+
readonly bucket: 4;
|
|
59
|
+
readonly fiskaly: 'NULL';
|
|
60
|
+
readonly description: 'Nicht Steuerbar'
|
|
61
61
|
};
|
|
62
|
-
6: {
|
|
63
|
-
rate: 0;
|
|
64
|
-
bucket: 4;
|
|
65
|
-
fiskaly: 'NULL';
|
|
66
|
-
description: 'Umsatzsteuerfrei'
|
|
62
|
+
readonly 6: {
|
|
63
|
+
readonly rate: 0;
|
|
64
|
+
readonly bucket: 4;
|
|
65
|
+
readonly fiskaly: 'NULL';
|
|
66
|
+
readonly description: 'Umsatzsteuerfrei'
|
|
67
67
|
};
|
|
68
|
-
7: {
|
|
69
|
-
rate: 0;
|
|
70
|
-
bucket: 4;
|
|
71
|
-
fiskaly: 'NULL';
|
|
72
|
-
description: 'UmsatzsteuerNichtErmittelbar'
|
|
68
|
+
readonly 7: {
|
|
69
|
+
readonly rate: 0;
|
|
70
|
+
readonly bucket: 4;
|
|
71
|
+
readonly fiskaly: 'NULL';
|
|
72
|
+
readonly description: 'UmsatzsteuerNichtErmittelbar'
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
/** What a receipt must say when the TSE failed (AEAO zu § 146a, Nr. 1.14.2): the failure, unmistakably. */
|
package/dist/orders/fetch.d.ts
CHANGED
|
@@ -26,3 +26,4 @@ declare type NewPayment = NewModelData<typeof Payment>;
|
|
|
26
26
|
*/
|
|
27
27
|
export type PlaceOrderResult = | { ok: true, order: OrderJsonResponse, items?: OrderItemJsonResponse[], payment?: PaymentJsonResponse }
|
|
28
28
|
| { ok: false, reason: 'out-of-stock' | 'duplicate-order' | 'duplicate-payment' | 'duplicate-idempotency-key' | 'unknown', failedAt?: string, error?: unknown }
|
|
29
|
+
export {};
|
package/dist/orders/store.d.ts
CHANGED
|
@@ -8,3 +8,4 @@ import type { ModelRow, NewModelData, Order } from '@stacksjs/orm';
|
|
|
8
8
|
export declare function store(data: NewOrder): Promise<OrderJsonResponse | undefined>;
|
|
9
9
|
declare type OrderJsonResponse = ModelRow<typeof Order>;
|
|
10
10
|
declare type NewOrder = NewModelData<typeof Order>;
|
|
11
|
+
export {};
|
package/dist/payments/fetch.d.ts
CHANGED
package/dist/payments/store.d.ts
CHANGED
|
@@ -8,3 +8,4 @@ import type { ModelRow, NewModelData, Payment } from '@stacksjs/orm';
|
|
|
8
8
|
export declare function store(data: NewPayment): Promise<PaymentJsonResponse | undefined>;
|
|
9
9
|
declare type PaymentJsonResponse = ModelRow<typeof Payment>;
|
|
10
10
|
declare type NewPayment = NewModelData<typeof Payment>;
|
|
11
|
+
export {};
|
|
@@ -32,3 +32,4 @@ export declare function update(id: number, data: Omit<PaymentUpdate, 'id'>): Pro
|
|
|
32
32
|
export declare function recordRefund(id: number, amount: number): Promise<PaymentJsonResponse>;
|
|
33
33
|
declare type PaymentJsonResponse = ModelRow<typeof Payment>;
|
|
34
34
|
declare type PaymentUpdate = UpdateModelData<typeof Payment>;
|
|
35
|
+
export {};
|
|
@@ -15,3 +15,4 @@ export declare function store(data: NewProduct): Promise<ProductJsonResponse>;
|
|
|
15
15
|
export declare function bulkStore(data: NewProduct[]): Promise<number>;
|
|
16
16
|
declare type ProductJsonResponse = ModelRow<typeof Product>;
|
|
17
17
|
declare type NewProduct = NewModelData<typeof Product>;
|
|
18
|
+
export {};
|
|
@@ -22,3 +22,4 @@ export declare function fetchByCountry(country: string, options?: FetchManufactu
|
|
|
22
22
|
*/
|
|
23
23
|
export declare function fetchWithProductCount(options?: FetchManufacturersOptions): Promise<ManufacturerJsonResponse[]>;
|
|
24
24
|
declare type ManufacturerJsonResponse = ModelRow<typeof Manufacturer>;
|
|
25
|
+
export {};
|
|
@@ -15,3 +15,4 @@ export declare function store(data: NewManufacturer): Promise<ManufacturerJsonRe
|
|
|
15
15
|
export declare function bulkStore(data: NewManufacturer[]): Promise<number>;
|
|
16
16
|
declare type ManufacturerJsonResponse = ModelRow<typeof Manufacturer>;
|
|
17
17
|
declare type NewManufacturer = NewModelData<typeof Manufacturer>;
|
|
18
|
+
export {};
|
|
@@ -25,3 +25,4 @@ export declare function updateFeaturedStatus(id: number, featured?: boolean): Pr
|
|
|
25
25
|
export declare function updateByUuid(uuid: string, data: Omit<ManufacturerUpdate, 'id'>): Promise<ManufacturerJsonResponse>;
|
|
26
26
|
declare type ManufacturerJsonResponse = ModelRow<typeof Manufacturer>;
|
|
27
27
|
declare type ManufacturerUpdate = UpdateModelData<typeof Manufacturer>;
|
|
28
|
+
export {};
|
|
@@ -21,3 +21,4 @@ export declare function fetchByUserId(userId: number): Promise<ReviewJsonRespons
|
|
|
21
21
|
export declare function fetchApprovedByProductId(productId: number): Promise<ReviewJsonResponse[]>;
|
|
22
22
|
export declare function fetchMostHelpfulByProductId(productId: number): Promise<ReviewJsonResponse[]>;
|
|
23
23
|
declare type ReviewJsonResponse = ModelRow<typeof Review>;
|
|
24
|
+
export {};
|
|
@@ -18,3 +18,4 @@ export declare function update(id: number, data: ReviewUpdate): Promise<ReviewJs
|
|
|
18
18
|
export declare function updateVotes(id: number, voteType: 'helpful' | 'unhelpful', increment?: boolean): Promise<ReviewJsonResponse>;
|
|
19
19
|
declare type ReviewJsonResponse = ModelRow<typeof Review>;
|
|
20
20
|
declare type ReviewUpdate = UpdateModelData<typeof Review>;
|
|
21
|
+
export {};
|
|
@@ -30,3 +30,4 @@ export declare function formatUnitOptions(type?: string): Promise<{ id: string,
|
|
|
30
30
|
export declare function getDefaultUnit(type: string): Promise<ProductUnitJsonResponse | undefined>;
|
|
31
31
|
// Import dependencies
|
|
32
32
|
declare type ProductUnitJsonResponse = ModelRow<typeof ProductUnit>;
|
|
33
|
+
export {};
|
|
@@ -25,3 +25,4 @@ export declare function bulkUpdate(data: ProductUnitUpdate[]): Promise<number>;
|
|
|
25
25
|
export declare function updateDefaultStatus(id: number, isDefault: boolean): Promise<boolean>;
|
|
26
26
|
declare type ProductUnitJsonResponse = ModelRow<typeof ProductUnit>;
|
|
27
27
|
declare type ProductUnitUpdate = UpdateModelData<typeof ProductUnit>;
|
|
28
|
+
export {};
|
|
@@ -42,3 +42,4 @@ export declare function formatVariantOptions(rawOptions: string[]): string;
|
|
|
42
42
|
export declare function generateVariantCombinations(optionSets: Record<string, string[]>): Record<string, string>[];
|
|
43
43
|
declare type ProductVariantJsonResponse = ModelRow<typeof ProductVariant>;
|
|
44
44
|
declare type NewProductVariant = NewModelData<typeof ProductVariant>;
|
|
45
|
+
export {};
|
|
@@ -24,3 +24,4 @@ export declare function bulkUpdate(data: ProductVariantUpdate[]): Promise<number
|
|
|
24
24
|
export declare function updateStatus(id: number, status: string): Promise<boolean>;
|
|
25
25
|
declare type ProductVariantJsonResponse = ModelRow<typeof ProductVariant>;
|
|
26
26
|
declare type ProductVariantUpdate = UpdateModelData<typeof ProductVariant>;
|
|
27
|
+
export {};
|
package/dist/receipts/fetch.d.ts
CHANGED
package/dist/receipts/store.d.ts
CHANGED
|
@@ -15,3 +15,4 @@ export declare function store(data: NewReceipt): Promise<ReceiptJsonResponse>;
|
|
|
15
15
|
export declare function bulkStore(data: NewReceipt[]): Promise<number>;
|
|
16
16
|
declare type ReceiptJsonResponse = ModelRow<typeof Receipt>;
|
|
17
17
|
declare type NewReceipt = NewModelData<typeof Receipt>;
|
|
18
|
+
export {};
|
|
@@ -27,3 +27,4 @@ export declare function updateStatus(id: number, status: 'success' | 'failed' |
|
|
|
27
27
|
export declare function updatePrintJob(id: number, size?: number, pages?: number, duration?: number): Promise<ReceiptJsonResponse>;
|
|
28
28
|
declare type ReceiptJsonResponse = ModelRow<typeof Receipt>;
|
|
29
29
|
declare type ReceiptUpdate = UpdateModelData<typeof Receipt>;
|
|
30
|
+
export {};
|
package/dist/register.d.ts
CHANGED
|
@@ -15,3 +15,4 @@ export declare function store(data: NewCourier): Promise<CourierJsonResponse>;
|
|
|
15
15
|
export declare function bulkStore(data: NewCourier[]): Promise<number>;
|
|
16
16
|
declare type CourierJsonResponse = ModelRow<typeof Courier>;
|
|
17
17
|
declare type NewCourier = NewModelData<typeof Courier>;
|
|
18
|
+
export {};
|
|
@@ -25,3 +25,4 @@ export declare function updateStatus(id: number, status: 'active' | 'on_delivery
|
|
|
25
25
|
export declare function updateContact(id: number, phone?: string): Promise<CourierJsonResponse>;
|
|
26
26
|
declare type CourierJsonResponse = ModelRow<typeof Courier>;
|
|
27
27
|
declare type CourierUpdate = UpdateModelData<typeof Courier>;
|
|
28
|
+
export {};
|
|
@@ -27,3 +27,4 @@ export declare function updateStops(id: number, stops: number): Promise<Delivery
|
|
|
27
27
|
export declare function updateMetrics(id: number, delivery_time?: number, total_distance?: number): Promise<DeliveryRouteJsonResponse>;
|
|
28
28
|
declare type DeliveryRouteJsonResponse = RowOf<'delivery_routes'>;
|
|
29
29
|
declare type DeliveryRouteUpdate = UpdateModelData<typeof DeliveryRoute>;
|
|
30
|
+
export {};
|
|
@@ -15,3 +15,4 @@ export declare function store(data: NewDigitalDelivery): Promise<DigitalDelivery
|
|
|
15
15
|
export declare function bulkStore(data: NewDigitalDelivery[]): Promise<number>;
|
|
16
16
|
declare type DigitalDeliveryJsonResponse = ModelRow<typeof DigitalDelivery>;
|
|
17
17
|
declare type NewDigitalDelivery = NewModelData<typeof DigitalDelivery>;
|
|
18
|
+
export {};
|
|
@@ -28,3 +28,4 @@ export declare function updateStatus(id: number, status: string | string[]): Pro
|
|
|
28
28
|
export declare function updateDeliverySettings(id: number, download_limit?: number, expiry_days?: number, requires_login?: boolean, automatic_delivery?: boolean): Promise<DigitalDeliveryJsonResponse>;
|
|
29
29
|
declare type DigitalDeliveryJsonResponse = ModelRow<typeof DigitalDelivery>;
|
|
30
30
|
declare type DigitalDeliveryUpdate = UpdateModelData<typeof DigitalDelivery>;
|
|
31
|
+
export {};
|
|
@@ -25,3 +25,4 @@ export declare function updateStatus(id: number, status: string | string[]): Pro
|
|
|
25
25
|
export declare function updateExpiration(id: number, expiryDate?: string | Date): Promise<LicenseKeyJsonResponse>;
|
|
26
26
|
declare type LicenseKeyJsonResponse = ModelRow<typeof LicenseKey>;
|
|
27
27
|
declare type LicenseKeyUpdate = UpdateModelData<typeof LicenseKey>;
|
|
28
|
+
export {};
|
|
@@ -27,3 +27,4 @@ export declare function formatShippingOptions(): Promise<{ id: number, name: str
|
|
|
27
27
|
export declare function getActiveShippingMethods(): Promise<ShippingMethodJsonResponse[]>;
|
|
28
28
|
declare type ShippingMethodJsonResponse = ModelRow<typeof ShippingMethod>;
|
|
29
29
|
declare type NewShippingMethod = NewModelData<typeof ShippingMethod>;
|
|
30
|
+
export {};
|
|
@@ -26,3 +26,4 @@ export declare function updateStatus(id: number, status: string | string[]): Pro
|
|
|
26
26
|
export declare function updatePricing(id: number, base_rate?: number, free_shipping?: number): Promise<ShippingMethodJsonResponse>;
|
|
27
27
|
declare type ShippingMethodJsonResponse = ModelRow<typeof ShippingMethod>;
|
|
28
28
|
declare type ShippingMethodUpdate = UpdateModelData<typeof ShippingMethod>;
|
|
29
|
+
export {};
|
|
@@ -35,3 +35,4 @@ export declare function updateByZone(zone: number, data: ShippingRateUpdate): Pr
|
|
|
35
35
|
export declare function updateByMethod(method: number, data: ShippingRateUpdate): Promise<number>;
|
|
36
36
|
declare type ShippingRateJsonResponse = ModelRow<typeof ShippingRate>;
|
|
37
37
|
declare type ShippingRateUpdate = UpdateModelData<typeof ShippingRate>;
|
|
38
|
+
export {};
|
|
@@ -27,3 +27,4 @@ export declare function getActiveShippingZones(): Promise<ShippingZoneJsonRespon
|
|
|
27
27
|
*/
|
|
28
28
|
export declare function getZonesByCountry(countryCode: string): Promise<ShippingZoneJsonResponse[]>;
|
|
29
29
|
declare type ShippingZoneJsonResponse = ModelRow<typeof ShippingZone>;
|
|
30
|
+
export {};
|
|
@@ -34,3 +34,4 @@ export declare function updateCountries(id: number, countries: string): Promise<
|
|
|
34
34
|
export declare function updateRegionsAndPostalCodes(id: number, regions?: string, postal_codes?: string): Promise<ShippingZoneJsonResponse>;
|
|
35
35
|
declare type ShippingZoneJsonResponse = ModelRow<typeof ShippingZone>;
|
|
36
36
|
declare type ShippingZoneUpdate = UpdateModelData<typeof ShippingZone>;
|
|
37
|
+
export {};
|
|
@@ -7,3 +7,4 @@ export declare function courierWriteData(input: ShippingWriteInput): Record<stri
|
|
|
7
7
|
export declare function deliveryRouteWriteData(input: ShippingWriteInput): Record<string, unknown>;
|
|
8
8
|
declare type ShippingWriteInput = Record<string, unknown>;
|
|
9
9
|
declare type ShippingColumnAliases = Readonly<Record<string, readonly string[]>>;
|
|
10
|
+
export {};
|
package/dist/tax/fetch.d.ts
CHANGED
package/dist/tax/store.d.ts
CHANGED
package/dist/tax/update.d.ts
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -266,3 +266,4 @@ declare type ManufacturerJsonResponse = ModelRow<typeof Manufacturer>;
|
|
|
266
266
|
declare type OrderJsonResponse = ModelRow<typeof Order>;
|
|
267
267
|
declare type OrderItemJsonResponse = ModelRow<typeof OrderItem>;
|
|
268
268
|
declare type ReviewJsonResponse = ModelRow<typeof Review>;
|
|
269
|
+
export {};
|
|
@@ -99,3 +99,4 @@ export declare function fetchCountBetweenDates(startDate: Date, endDate: Date):
|
|
|
99
99
|
*/
|
|
100
100
|
export declare function fetchCountByDateGrouped(startDate?: Date, _endDate?: Date): Promise<{ date: string, count: number }[]>;
|
|
101
101
|
declare type WaitlistProductJsonResponse = ModelRow<typeof WaitlistProduct>;
|
|
102
|
+
export {};
|
|
@@ -15,3 +15,4 @@ export declare function store(data: NewWaitlistProduct): Promise<WaitlistProduct
|
|
|
15
15
|
export declare function bulkStore(data: NewWaitlistProduct[]): Promise<number>;
|
|
16
16
|
declare type WaitlistProductJsonResponse = ModelRow<typeof WaitlistProduct>;
|
|
17
17
|
declare type NewWaitlistProduct = NewModelData<typeof WaitlistProduct>;
|
|
18
|
+
export {};
|
|
@@ -25,3 +25,4 @@ export declare function updateStatus(id: number, status: 'waiting' | 'purchased'
|
|
|
25
25
|
export declare function updatePartySize(id: number, partySize: number): Promise<WaitlistProductJsonResponse | undefined>;
|
|
26
26
|
declare type WaitlistProductJsonResponse = ModelRow<typeof WaitlistProduct>;
|
|
27
27
|
declare type WaitlistProductUpdate = UpdateModelData<typeof WaitlistProduct>;
|
|
28
|
+
export {};
|
|
@@ -15,3 +15,4 @@ export declare function store(data: NewWaitlistRestaurant): Promise<WaitlistRest
|
|
|
15
15
|
export declare function bulkStore(data: NewWaitlistRestaurant[]): Promise<number>;
|
|
16
16
|
declare type WaitlistRestaurantJsonResponse = ModelRow<typeof WaitlistRestaurant>;
|
|
17
17
|
declare type NewWaitlistRestaurant = NewModelData<typeof WaitlistRestaurant>;
|
|
18
|
+
export {};
|
|
@@ -42,3 +42,4 @@ export declare function updateWaitTimes(id: number, quotedWaitTime: number, actu
|
|
|
42
42
|
export declare function updateQueuePosition(id: number, queuePosition: number): Promise<WaitlistRestaurantJsonResponse | undefined>;
|
|
43
43
|
declare type WaitlistRestaurantJsonResponse = ModelRow<typeof WaitlistRestaurant>;
|
|
44
44
|
declare type WaitlistRestaurantUpdate = UpdateModelData<typeof WaitlistRestaurant>;
|
|
45
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/commerce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.75.
|
|
4
|
+
"version": "0.75.522",
|
|
5
5
|
"description": "Stacks commerce utilities.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"contributors": [
|
|
@@ -57,19 +57,19 @@
|
|
|
57
57
|
"prepublishOnly": "bun run build"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@stacksjs/cache": "0.75.
|
|
61
|
-
"@stacksjs/config": "0.75.
|
|
62
|
-
"@stacksjs/database": "0.75.
|
|
63
|
-
"@stacksjs/env": "0.75.
|
|
64
|
-
"@stacksjs/error-handling": "0.75.
|
|
65
|
-
"@stacksjs/events": "0.75.
|
|
66
|
-
"@stacksjs/logging": "0.75.
|
|
67
|
-
"@stacksjs/orm": "0.75.
|
|
68
|
-
"@stacksjs/payments": "0.75.
|
|
69
|
-
"@stacksjs/realtime": "0.75.
|
|
70
|
-
"@stacksjs/slug": "0.75.
|
|
71
|
-
"@stacksjs/strings": "0.75.
|
|
72
|
-
"@stacksjs/validation": "0.75.
|
|
60
|
+
"@stacksjs/cache": "0.75.522",
|
|
61
|
+
"@stacksjs/config": "0.75.522",
|
|
62
|
+
"@stacksjs/database": "0.75.522",
|
|
63
|
+
"@stacksjs/env": "0.75.522",
|
|
64
|
+
"@stacksjs/error-handling": "0.75.522",
|
|
65
|
+
"@stacksjs/events": "0.75.522",
|
|
66
|
+
"@stacksjs/logging": "0.75.522",
|
|
67
|
+
"@stacksjs/orm": "0.75.522",
|
|
68
|
+
"@stacksjs/payments": "0.75.522",
|
|
69
|
+
"@stacksjs/realtime": "0.75.522",
|
|
70
|
+
"@stacksjs/slug": "0.75.522",
|
|
71
|
+
"@stacksjs/strings": "0.75.522",
|
|
72
|
+
"@stacksjs/validation": "0.75.522",
|
|
73
73
|
"ts-spreadsheets": "^0.2.0"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|