@stacksjs/commerce 0.70.37 → 0.70.43

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 (128) hide show
  1. package/dist/src/coupons/destroy.d.ts +17 -0
  2. package/dist/src/coupons/fetch.d.ts +59 -0
  3. package/dist/src/coupons/index.d.ts +25 -0
  4. package/dist/src/coupons/store.d.ts +9 -0
  5. package/dist/src/coupons/update.d.ts +10 -0
  6. package/dist/src/customers/destroy.d.ts +14 -0
  7. package/dist/src/customers/fetch.d.ts +9 -0
  8. package/dist/src/customers/index.d.ts +14 -0
  9. package/dist/src/customers/store.d.ts +9 -0
  10. package/dist/src/customers/update.d.ts +10 -0
  11. package/dist/src/devices/destroy.d.ts +14 -0
  12. package/dist/src/devices/export.d.ts +35 -0
  13. package/dist/src/devices/fetch.d.ts +38 -0
  14. package/dist/src/devices/index.d.ts +27 -0
  15. package/dist/src/devices/store.d.ts +16 -0
  16. package/dist/src/devices/update.d.ts +26 -0
  17. package/dist/src/errors/destroy.d.ts +12 -0
  18. package/dist/src/errors/fetch.d.ts +54 -0
  19. package/dist/src/errors/index.d.ts +25 -0
  20. package/dist/src/errors/update.d.ts +24 -0
  21. package/dist/src/gift-cards/destroy.d.ts +23 -0
  22. package/dist/src/gift-cards/fetch.d.ts +88 -0
  23. package/dist/src/gift-cards/index.d.ts +23 -0
  24. package/dist/src/gift-cards/store.d.ts +9 -0
  25. package/dist/src/gift-cards/update.d.ts +18 -0
  26. package/dist/src/index.d.ts +13 -13
  27. package/dist/src/orders/destroy.d.ts +28 -0
  28. package/dist/src/orders/export.d.ts +32 -0
  29. package/dist/src/orders/fetch.d.ts +76 -0
  30. package/dist/src/orders/index.d.ts +27 -0
  31. package/dist/src/orders/store.d.ts +9 -0
  32. package/dist/src/orders/update.d.ts +27 -0
  33. package/dist/src/payments/destroy.d.ts +14 -0
  34. package/dist/src/payments/fetch.d.ts +55 -0
  35. package/dist/src/payments/index.d.ts +13 -0
  36. package/dist/src/payments/store.d.ts +9 -0
  37. package/dist/src/payments/update.d.ts +18 -0
  38. package/dist/src/products/categories/destroy.d.ts +30 -0
  39. package/dist/src/products/categories/fetch.d.ts +49 -0
  40. package/dist/src/products/categories/index.d.ts +33 -0
  41. package/dist/src/products/categories/store.d.ts +21 -0
  42. package/dist/src/products/categories/update.d.ts +33 -0
  43. package/dist/src/products/index.d.ts +24 -0
  44. package/dist/src/products/items/destroy.d.ts +14 -0
  45. package/dist/src/products/items/fetch.d.ts +66 -0
  46. package/dist/src/products/items/index.d.ts +23 -0
  47. package/dist/src/products/items/store.d.ts +16 -0
  48. package/dist/src/products/items/update.d.ts +45 -0
  49. package/dist/src/products/manufacturers/destroy.d.ts +14 -0
  50. package/dist/src/products/manufacturers/fetch.d.ts +23 -0
  51. package/dist/src/products/manufacturers/index.d.ts +21 -0
  52. package/dist/src/products/manufacturers/store.d.ts +16 -0
  53. package/dist/src/products/manufacturers/update.d.ts +26 -0
  54. package/dist/src/products/reviews/destroy.d.ts +14 -0
  55. package/dist/src/products/reviews/fetch.d.ts +22 -0
  56. package/dist/src/products/reviews/index.d.ts +22 -0
  57. package/dist/src/products/reviews/store.d.ts +9 -0
  58. package/dist/src/products/reviews/update.d.ts +19 -0
  59. package/dist/src/products/units/destroy.d.ts +14 -0
  60. package/dist/src/products/units/fetch.d.ts +9 -0
  61. package/dist/src/products/units/index.d.ts +9 -0
  62. package/dist/src/products/units/store.d.ts +31 -0
  63. package/dist/src/products/units/update.d.ts +25 -0
  64. package/dist/src/products/variants/destroy.d.ts +14 -0
  65. package/dist/src/products/variants/fetch.d.ts +9 -0
  66. package/dist/src/products/variants/index.d.ts +18 -0
  67. package/dist/src/products/variants/store.d.ts +43 -0
  68. package/dist/src/products/variants/update.d.ts +25 -0
  69. package/dist/src/receipts/destroy.d.ts +14 -0
  70. package/dist/src/receipts/fetch.d.ts +80 -0
  71. package/dist/src/receipts/index.d.ts +21 -0
  72. package/dist/src/receipts/store.d.ts +16 -0
  73. package/dist/src/receipts/update.d.ts +28 -0
  74. package/dist/src/shippings/delivery-routes/destroy.d.ts +14 -0
  75. package/dist/src/shippings/delivery-routes/fetch.d.ts +17 -0
  76. package/dist/src/shippings/delivery-routes/index.d.ts +23 -0
  77. package/dist/src/shippings/delivery-routes/store.d.ts +16 -0
  78. package/dist/src/shippings/delivery-routes/update.d.ts +27 -0
  79. package/dist/src/shippings/digital-deliveries/destroy.d.ts +28 -0
  80. package/dist/src/shippings/digital-deliveries/fetch.d.ts +9 -0
  81. package/dist/src/shippings/digital-deliveries/index.d.ts +23 -0
  82. package/dist/src/shippings/digital-deliveries/store.d.ts +16 -0
  83. package/dist/src/shippings/digital-deliveries/update.d.ts +29 -0
  84. package/dist/src/shippings/drivers/destroy.d.ts +16 -0
  85. package/dist/src/shippings/drivers/fetch.d.ts +9 -0
  86. package/dist/src/shippings/drivers/index.d.ts +21 -0
  87. package/dist/src/shippings/drivers/store.d.ts +16 -0
  88. package/dist/src/shippings/drivers/update.d.ts +26 -0
  89. package/dist/src/shippings/index.d.ts +27 -0
  90. package/dist/src/shippings/license-keys/destroy.d.ts +28 -0
  91. package/dist/src/shippings/license-keys/fetch.d.ts +9 -0
  92. package/dist/src/shippings/license-keys/index.d.ts +23 -0
  93. package/dist/src/shippings/license-keys/store.d.ts +17 -0
  94. package/dist/src/shippings/license-keys/update.d.ts +26 -0
  95. package/dist/src/shippings/shipping-methods/destroy.d.ts +28 -0
  96. package/dist/src/shippings/shipping-methods/fetch.d.ts +9 -0
  97. package/dist/src/shippings/shipping-methods/index.d.ts +25 -0
  98. package/dist/src/shippings/shipping-methods/store.d.ts +28 -0
  99. package/dist/src/shippings/shipping-methods/update.d.ts +27 -0
  100. package/dist/src/shippings/shipping-rates/destroy.d.ts +28 -0
  101. package/dist/src/shippings/shipping-rates/fetch.d.ts +37 -0
  102. package/dist/src/shippings/shipping-rates/index.d.ts +27 -0
  103. package/dist/src/shippings/shipping-rates/store.d.ts +17 -0
  104. package/dist/src/shippings/shipping-rates/update.d.ts +36 -0
  105. package/dist/src/shippings/shipping-zones/destroy.d.ts +28 -0
  106. package/dist/src/shippings/shipping-zones/fetch.d.ts +28 -0
  107. package/dist/src/shippings/shipping-zones/index.d.ts +23 -0
  108. package/dist/src/shippings/shipping-zones/store.d.ts +17 -0
  109. package/dist/src/shippings/shipping-zones/update.d.ts +35 -0
  110. package/dist/src/tax/destroy.d.ts +14 -0
  111. package/dist/src/tax/fetch.d.ts +9 -0
  112. package/dist/src/tax/index.d.ts +21 -0
  113. package/dist/src/tax/store.d.ts +16 -0
  114. package/dist/src/tax/update.d.ts +26 -0
  115. package/dist/src/types.d.ts +265 -0
  116. package/dist/src/utils/typed-stats.d.ts +23 -0
  117. package/dist/src/waitlists/index.d.ts +12 -0
  118. package/dist/src/waitlists/products/destroy.d.ts +15 -0
  119. package/dist/src/waitlists/products/fetch.d.ts +100 -0
  120. package/dist/src/waitlists/products/index.d.ts +30 -0
  121. package/dist/src/waitlists/products/store.d.ts +16 -0
  122. package/dist/src/waitlists/products/update.d.ts +26 -0
  123. package/dist/src/waitlists/restaurant/destroy.d.ts +15 -0
  124. package/dist/src/waitlists/restaurant/fetch.d.ts +149 -0
  125. package/dist/src/waitlists/restaurant/index.d.ts +40 -0
  126. package/dist/src/waitlists/restaurant/store.d.ts +16 -0
  127. package/dist/src/waitlists/restaurant/update.d.ts +43 -0
  128. package/package.json +1 -1
@@ -0,0 +1,23 @@
1
+ // Functions from destroy.ts
2
+ export {
3
+ bulkDestroy,
4
+ destroy,
5
+ } from './destroy';
6
+ // Functions from fetch.ts
7
+ export {
8
+ fetchActive,
9
+ fetchAll,
10
+ fetchByDriver,
11
+ fetchById,
12
+ } from './fetch';
13
+ // Functions from store.ts
14
+ export {
15
+ store,
16
+ updateLastActive,
17
+ } from './store';
18
+ // Functions from update.ts
19
+ export {
20
+ update,
21
+ updateMetrics,
22
+ updateStops,
23
+ } from './update';
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Create a new delivery route
3
+ *
4
+ * @param data The delivery route data to store
5
+ * @returns The newly created delivery route record
6
+ */
7
+ export declare function store(data: NewDeliveryRoute): Promise<DeliveryRouteJsonResponse>;
8
+ /**
9
+ * Update a delivery route's last active timestamp
10
+ *
11
+ * @param id The ID of the delivery route to update
12
+ * @returns The updated delivery route record
13
+ */
14
+ export declare function updateLastActive(id: number): Promise<DeliveryRouteJsonResponse>;
15
+ declare type DeliveryRouteJsonResponse = ModelRow<typeof DeliveryRoute>;
16
+ declare type NewDeliveryRoute = NewModelData<typeof DeliveryRoute>;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Update a delivery route
3
+ *
4
+ * @param id The ID of the delivery route
5
+ * @param data The delivery route data to update
6
+ * @returns The updated delivery route record
7
+ */
8
+ export declare function update(id: number, data: DeliveryRouteUpdate): Promise<DeliveryRouteJsonResponse>;
9
+ /**
10
+ * Update a delivery route's stops count
11
+ *
12
+ * @param id The ID of the delivery route
13
+ * @param stops The new number of stops
14
+ * @returns The updated delivery route with the new stops count
15
+ */
16
+ export declare function updateStops(id: number, stops: number): Promise<DeliveryRouteJsonResponse>;
17
+ /**
18
+ * Update delivery metrics for a route
19
+ *
20
+ * @param id The ID of the delivery route
21
+ * @param delivery_time The updated delivery time
22
+ * @param total_distance The updated total distance
23
+ * @returns The updated delivery route
24
+ */
25
+ export declare function updateMetrics(id: number, delivery_time?: number, total_distance?: number): Promise<DeliveryRouteJsonResponse>;
26
+ declare type DeliveryRouteJsonResponse = ModelRow<typeof DeliveryRoute>;
27
+ declare type DeliveryRouteUpdate = UpdateModelData<typeof DeliveryRoute>;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Delete a digital delivery by ID
3
+ *
4
+ * @param id The ID of the digital delivery to delete
5
+ * @returns True if the digital delivery was deleted, false otherwise
6
+ */
7
+ export declare function destroy(id: number): Promise<boolean>;
8
+ /**
9
+ * Soft delete a digital delivery by ID (updates status to 'inactive')
10
+ *
11
+ * @param id The ID of the digital delivery to soft delete
12
+ * @returns True if the digital delivery was soft deleted, false otherwise
13
+ */
14
+ export declare function softDelete(id: number): Promise<boolean>;
15
+ /**
16
+ * Delete multiple digital deliveries by ID
17
+ *
18
+ * @param ids Array of digital delivery IDs to delete
19
+ * @returns Number of digital deliveries deleted
20
+ */
21
+ export declare function bulkDestroy(ids: number[]): Promise<number>;
22
+ /**
23
+ * Soft delete multiple digital deliveries by ID (updates status to 'inactive')
24
+ *
25
+ * @param ids Array of digital delivery IDs to soft delete
26
+ * @returns Number of digital deliveries soft deleted
27
+ */
28
+ export declare function bulkSoftDelete(ids: number[]): Promise<number>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Fetch a shipping method by ID
3
+ */
4
+ export declare function fetchById(id: number): Promise<DigitalDeliveryJsonResponse | undefined>;
5
+ /**
6
+ * Fetch all digital deliveries
7
+ */
8
+ export declare function fetchAll(): Promise<DigitalDeliveryJsonResponse[]>;
9
+ declare type DigitalDeliveryJsonResponse = ModelRow<typeof DigitalDelivery>;
@@ -0,0 +1,23 @@
1
+ // Functions from destroy.ts
2
+ export {
3
+ bulkDestroy,
4
+ bulkSoftDelete,
5
+ destroy,
6
+ softDelete,
7
+ } from './destroy';
8
+ // Functions from fetch.ts
9
+ export {
10
+ fetchAll,
11
+ fetchById,
12
+ } from './fetch';
13
+ // Functions from store.ts
14
+ export {
15
+ bulkStore,
16
+ store,
17
+ } from './store';
18
+ // Functions from update.ts
19
+ export {
20
+ update,
21
+ updateDeliverySettings,
22
+ updateStatus,
23
+ } from './update';
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Create a new digital delivery
3
+ *
4
+ * @param data The digital delivery data to store
5
+ * @returns The newly created digital delivery record
6
+ */
7
+ export declare function store(data: NewDigitalDelivery): Promise<DigitalDeliveryJsonResponse>;
8
+ /**
9
+ * Create multiple digital deliveries at once
10
+ *
11
+ * @param data Array of digital delivery data to store
12
+ * @returns Number of digital deliveries created
13
+ */
14
+ export declare function bulkStore(data: NewDigitalDelivery[]): Promise<number>;
15
+ declare type DigitalDeliveryJsonResponse = ModelRow<typeof DigitalDelivery>;
16
+ declare type NewDigitalDelivery = NewModelData<typeof DigitalDelivery>;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Update a digital delivery
3
+ *
4
+ * @param id The id of the digital delivery to update
5
+ * @param data The digital delivery data to update
6
+ * @returns The updated digital delivery record
7
+ */
8
+ export declare function update(id: number, data: DigitalDeliveryUpdate): Promise<DigitalDeliveryJsonResponse>;
9
+ /**
10
+ * Update a digital delivery's status
11
+ *
12
+ * @param id The ID of the digital delivery
13
+ * @param status The new status
14
+ * @returns The updated digital delivery with the new status
15
+ */
16
+ export declare function updateStatus(id: number, status: string | string[]): Promise<DigitalDeliveryJsonResponse>;
17
+ /**
18
+ * Update delivery settings for a digital delivery
19
+ *
20
+ * @param id The ID of the digital delivery
21
+ * @param download_limit Optional updated download limit
22
+ * @param expiry_days Optional updated expiry days
23
+ * @param requires_login Optional updated requires login flag
24
+ * @param automatic_delivery Optional updated automatic delivery flag
25
+ * @returns The updated digital delivery
26
+ */
27
+ export declare function updateDeliverySettings(id: number, download_limit?: number, expiry_days?: number, requires_login?: boolean, automatic_delivery?: boolean): Promise<DigitalDeliveryJsonResponse>;
28
+ declare type DigitalDeliveryJsonResponse = ModelRow<typeof DigitalDelivery>;
29
+ declare type DigitalDeliveryUpdate = UpdateModelData<typeof DigitalDelivery>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Delete a driver by ID
3
+ *
4
+ * @param id The ID of the driver to delete
5
+ * @returns The deleted driver record
6
+ */
7
+ export declare function destroy(id: number): Promise<DriverJsonResponse | undefined>;
8
+ /**
9
+ * Delete multiple drivers at once
10
+ *
11
+ * @param ids Array of driver IDs to delete
12
+ * @returns Number of drivers deleted
13
+ */
14
+ export declare function bulkDestroy(ids: number[]): Promise<number>;
15
+ // Import dependencies
16
+ declare type DriverJsonResponse = ModelRow<typeof Driver>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Fetch a driver by ID
3
+ */
4
+ export declare function fetchById(id: number): Promise<DriverJsonResponse | undefined>;
5
+ /**
6
+ * Fetch all drivers
7
+ */
8
+ export declare function fetchAll(): Promise<DriverJsonResponse[]>;
9
+ declare type DriverJsonResponse = ModelRow<typeof Driver>;
@@ -0,0 +1,21 @@
1
+ // Functions from destroy.ts
2
+ export {
3
+ bulkDestroy,
4
+ destroy,
5
+ } from './destroy';
6
+ // Functions from fetch.ts
7
+ export {
8
+ fetchAll,
9
+ fetchById,
10
+ } from './fetch';
11
+ // Functions from store.ts
12
+ export {
13
+ bulkStore,
14
+ store,
15
+ } from './store';
16
+ // Functions from update.ts
17
+ export {
18
+ update,
19
+ updateContact,
20
+ updateStatus,
21
+ } from './update';
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Create a new driver
3
+ *
4
+ * @param data The driver data to store
5
+ * @returns The newly created driver record
6
+ */
7
+ export declare function store(data: NewDriver): Promise<DriverJsonResponse>;
8
+ /**
9
+ * Create multiple drivers at once
10
+ *
11
+ * @param data Array of driver data to store
12
+ * @returns Number of drivers created
13
+ */
14
+ export declare function bulkStore(data: NewDriver[]): Promise<number>;
15
+ declare type DriverJsonResponse = ModelRow<typeof Driver>;
16
+ declare type NewDriver = NewModelData<typeof Driver>;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Update a driver
3
+ *
4
+ * @param id The id of the driver to update
5
+ * @param data The driver data to update
6
+ * @returns The updated driver record
7
+ */
8
+ export declare function update(id: number, data: DriverUpdate): Promise<DriverJsonResponse>;
9
+ /**
10
+ * Update a driver's status
11
+ *
12
+ * @param id The ID of the driver
13
+ * @param status The new status (active, on_delivery, on_break)
14
+ * @returns The updated driver with the new status
15
+ */
16
+ export declare function updateStatus(id: number, status: 'active' | 'on_delivery' | 'on_break'): Promise<DriverJsonResponse>;
17
+ /**
18
+ * Update driver's contact information
19
+ *
20
+ * @param id The ID of the driver
21
+ * @param phone The updated phone number
22
+ * @returns The updated driver
23
+ */
24
+ export declare function updateContact(id: number, phone?: string): Promise<DriverJsonResponse>;
25
+ declare type DriverJsonResponse = ModelRow<typeof Driver>;
26
+ declare type DriverUpdate = UpdateModelData<typeof Driver>;
@@ -0,0 +1,27 @@
1
+ import * as digital from './digital-deliveries/index';
2
+ import * as drivers from './drivers/index';
3
+ import * as licenses from './license-keys/index';
4
+ import * as methods from './shipping-methods/index';
5
+ import * as rates from './shipping-rates/index';
6
+ import * as routes from './delivery-routes/index';
7
+ import * as zones from './shipping-zones/index';
8
+ declare const shippings: ShippingsNamespace;
9
+ declare interface ShippingsNamespace {
10
+ digital: typeof digital
11
+ drivers: typeof drivers
12
+ licenses: typeof licenses
13
+ methods: typeof methods
14
+ rates: typeof rates
15
+ routes: typeof routes
16
+ zones: typeof zones
17
+ }
18
+ export {
19
+ digital,
20
+ drivers,
21
+ licenses,
22
+ methods,
23
+ rates,
24
+ routes,
25
+ zones,
26
+ };
27
+ export default shippings;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Delete a license key by ID
3
+ *
4
+ * @param id The ID of the license key to delete
5
+ * @returns True if the license key was deleted, false otherwise
6
+ */
7
+ export declare function destroy(id: number): Promise<boolean>;
8
+ /**
9
+ * Soft delete a license key by ID (updates status to 'inactive')
10
+ *
11
+ * @param id The ID of the license key to soft delete
12
+ * @returns True if the license key was soft deleted, false otherwise
13
+ */
14
+ export declare function softDelete(id: number): Promise<boolean>;
15
+ /**
16
+ * Delete multiple license keys by ID
17
+ *
18
+ * @param ids Array of license key IDs to delete
19
+ * @returns Number of license keys deleted
20
+ */
21
+ export declare function bulkDestroy(ids: number[]): Promise<number>;
22
+ /**
23
+ * Soft delete multiple license keys by ID (updates status to 'inactive')
24
+ *
25
+ * @param ids Array of license key IDs to soft delete
26
+ * @returns Number of license keys soft deleted
27
+ */
28
+ export declare function bulkSoftDelete(ids: number[]): Promise<number>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Fetch a shipping method by ID
3
+ */
4
+ export declare function fetchById(id: number): Promise<LicenseKeyJsonResponse | undefined>;
5
+ /**
6
+ * Fetch all digital deliveries
7
+ */
8
+ export declare function fetchAll(): Promise<LicenseKeyJsonResponse[]>;
9
+ declare type LicenseKeyJsonResponse = ModelRow<typeof LicenseKey>;
@@ -0,0 +1,23 @@
1
+ // Functions from destroy.ts
2
+ export {
3
+ bulkDestroy,
4
+ bulkSoftDelete,
5
+ destroy,
6
+ softDelete,
7
+ } from './destroy';
8
+ // Functions from fetch.ts
9
+ export {
10
+ fetchAll,
11
+ fetchById,
12
+ } from './fetch';
13
+ // Functions from store.ts
14
+ export {
15
+ bulkStore,
16
+ store,
17
+ } from './store';
18
+ // Functions from update.ts
19
+ export {
20
+ update,
21
+ updateExpiration,
22
+ updateStatus,
23
+ } from './update';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Create a new license key
3
+ *
4
+ * @param data The license key data to store
5
+ * @returns The newly created license key record
6
+ */
7
+ export declare function store(data: NewLicenseKey): Promise<LicenseKeyJsonResponse>;
8
+ /**
9
+ * Create multiple license keys at once
10
+ *
11
+ * @param data Array of license key data to store
12
+ * @returns Number of license keys created
13
+ */
14
+ export declare function bulkStore(data: NewLicenseKey[]): Promise<number>;
15
+ // Import dependencies
16
+ declare type LicenseKeyJsonResponse = ModelRow<typeof LicenseKey>;
17
+ declare type NewLicenseKey = NewModelData<typeof LicenseKey>;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Update a license key
3
+ *
4
+ * @param id The ID of the license key
5
+ * @param data The license key data to update
6
+ * @returns The updated license key record
7
+ */
8
+ export declare function update(id: number, data: LicenseKeyUpdate): Promise<LicenseKeyJsonResponse>;
9
+ /**
10
+ * Update a license key's status
11
+ *
12
+ * @param id The ID of the license key
13
+ * @param status The new status
14
+ * @returns The updated license key with the new status
15
+ */
16
+ export declare function updateStatus(id: number, status: string | string[]): Promise<LicenseKeyJsonResponse>;
17
+ /**
18
+ * Update expiration information for a license key
19
+ *
20
+ * @param id The ID of the license key
21
+ * @param expiryDate The updated expiry date
22
+ * @returns The updated license key
23
+ */
24
+ export declare function updateExpiration(id: number, expiryDate?: string | Date): Promise<LicenseKeyJsonResponse>;
25
+ declare type LicenseKeyJsonResponse = ModelRow<typeof LicenseKey>;
26
+ declare type LicenseKeyUpdate = UpdateModelData<typeof LicenseKey>;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Delete a shipping method by ID
3
+ *
4
+ * @param id The ID of the shipping method to delete
5
+ * @returns True if the shipping method was deleted, false otherwise
6
+ */
7
+ export declare function destroy(id: number): Promise<boolean>;
8
+ /**
9
+ * Soft delete a shipping method by ID (updates status to 'inactive')
10
+ *
11
+ * @param id The ID of the shipping method to soft delete
12
+ * @returns True if the shipping method was soft deleted, false otherwise
13
+ */
14
+ export declare function softDelete(id: number): Promise<boolean>;
15
+ /**
16
+ * Delete multiple shipping methods by ID
17
+ *
18
+ * @param ids Array of shipping method IDs to delete
19
+ * @returns Number of shipping methods deleted
20
+ */
21
+ export declare function bulkDestroy(ids: number[]): Promise<number>;
22
+ /**
23
+ * Soft delete multiple shipping methods by ID (updates status to 'inactive')
24
+ *
25
+ * @param ids Array of shipping method IDs to soft delete
26
+ * @returns Number of shipping methods soft deleted
27
+ */
28
+ export declare function bulkSoftDelete(ids: number[]): Promise<number>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Fetch a shipping method by ID
3
+ */
4
+ export declare function fetchById(id: number): Promise<ShippingMethodJsonResponse | undefined>;
5
+ /**
6
+ * Fetch all shipping methods with their shipping zones
7
+ */
8
+ export declare function fetchAll(): Promise<ShippingMethodJsonResponse[]>;
9
+ declare type ShippingMethodJsonResponse = ModelRow<typeof ShippingMethod>;
@@ -0,0 +1,25 @@
1
+ // Functions from destroy.ts
2
+ export {
3
+ bulkDestroy,
4
+ bulkSoftDelete,
5
+ destroy,
6
+ softDelete,
7
+ } from './destroy';
8
+ // Functions from fetch.ts
9
+ export {
10
+ fetchAll,
11
+ fetchById,
12
+ } from './fetch';
13
+ // Functions from store.ts
14
+ export {
15
+ bulkStore,
16
+ formatShippingOptions,
17
+ getActiveShippingMethods,
18
+ store,
19
+ } from './store';
20
+ // Functions from update.ts
21
+ export {
22
+ update,
23
+ updatePricing,
24
+ updateStatus,
25
+ } from './update';
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Create a new shipping method
3
+ *
4
+ * @param data The shipping method data to store
5
+ * @returns The newly created shipping method record
6
+ */
7
+ export declare function store(data: NewShippingMethod): Promise<ShippingMethodJsonResponse>;
8
+ /**
9
+ * Create multiple shipping methods at once
10
+ *
11
+ * @param data Array of shipping method data to store
12
+ * @returns Number of shipping methods created
13
+ */
14
+ export declare function bulkStore(data: NewShippingMethod[]): Promise<number>;
15
+ /**
16
+ * Format shipping method options for dropdown menus or selectors
17
+ *
18
+ * @returns Array of formatted shipping method options with id, name, and status
19
+ */
20
+ export declare function formatShippingOptions(): Promise<{ id: number, name: string, status: string | string[], base_rate: number }[]>;
21
+ /**
22
+ * Get active shipping methods
23
+ *
24
+ * @returns List of active shipping methods
25
+ */
26
+ export declare function getActiveShippingMethods(): Promise<ShippingMethodJsonResponse[]>;
27
+ declare type ShippingMethodJsonResponse = ModelRow<typeof ShippingMethod>;
28
+ declare type NewShippingMethod = NewModelData<typeof ShippingMethod>;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Update a shipping method
3
+ *
4
+ * @param id The ID of the shipping method
5
+ * @param data The shipping method data to update
6
+ * @returns The updated shipping method record
7
+ */
8
+ export declare function update(id: number, data: ShippingMethodUpdate): Promise<ShippingMethodJsonResponse>;
9
+ /**
10
+ * Update a shipping method's status
11
+ *
12
+ * @param id The ID of the shipping method
13
+ * @param status The new status
14
+ * @returns The updated shipping method with the new status
15
+ */
16
+ export declare function updateStatus(id: number, status: string | string[]): Promise<ShippingMethodJsonResponse>;
17
+ /**
18
+ * Update pricing information for a shipping method
19
+ *
20
+ * @param id The ID of the shipping method
21
+ * @param base_rate Optional updated base rate
22
+ * @param free_shipping Optional updated free shipping threshold
23
+ * @returns The updated shipping method
24
+ */
25
+ export declare function updatePricing(id: number, base_rate?: number, free_shipping?: number): Promise<ShippingMethodJsonResponse>;
26
+ declare type ShippingMethodJsonResponse = ModelRow<typeof ShippingMethod>;
27
+ declare type ShippingMethodUpdate = UpdateModelData<typeof ShippingMethod>;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Delete a shipping rate by ID
3
+ *
4
+ * @param id The ID of the shipping rate to delete
5
+ * @returns True if the shipping rate was deleted, false otherwise
6
+ */
7
+ export declare function destroy(id: number): Promise<boolean>;
8
+ /**
9
+ * Delete multiple shipping rates by ID
10
+ *
11
+ * @param ids Array of shipping rate IDs to delete
12
+ * @returns Number of shipping rates deleted
13
+ */
14
+ export declare function bulkDestroy(ids: number[]): Promise<number>;
15
+ /**
16
+ * Delete shipping rates by zone
17
+ *
18
+ * @param zone The zone to delete shipping rates for
19
+ * @returns Number of shipping rates deleted
20
+ */
21
+ export declare function destroyByZone(zone: string): Promise<number>;
22
+ /**
23
+ * Delete shipping rates by method
24
+ *
25
+ * @param method The shipping method to delete rates for
26
+ * @returns Number of shipping rates deleted
27
+ */
28
+ export declare function destroyByMethod(method: string): Promise<number>;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Fetch a shipping rate by ID
3
+ */
4
+ export declare function fetchById(id: number): Promise<ShippingRateJsonResponse | undefined>;
5
+ /**
6
+ * Fetch all shipping rates with their shipping zones and methods
7
+ */
8
+ export declare function fetchAll(): Promise<ShippingRateJsonResponse[]>;
9
+ /**
10
+ * Get shipping rates by zone
11
+ *
12
+ * @param zoneId Shipping zone identifier
13
+ * @returns List of shipping rates for the specified zone
14
+ */
15
+ export declare function getRatesByZone(zoneId: number): Promise<ShippingRateJsonResponse[]>;
16
+ /**
17
+ * Get shipping rate based on weight and zone
18
+ *
19
+ * @param weight Weight in the appropriate unit
20
+ * @param zoneId Shipping zone identifier
21
+ * @returns Matching shipping rate or undefined
22
+ */
23
+ export declare function getRateByWeightAndZone(weight: number, zoneId: number): Promise<ShippingRateJsonResponse | undefined>;
24
+ /**
25
+ * Format shipping rate options for dropdown menus or selectors
26
+ *
27
+ * @returns Array of formatted shipping rate options with id, method, zone, and rate
28
+ */
29
+ export declare function formatShippingRateOptions(): Promise<{ id: number, shipping_method_id: number, shipping_zone_id: number, rate: number }[]>;
30
+ /**
31
+ * Get shipping rates for a specific method
32
+ *
33
+ * @param methodId The shipping method to filter by
34
+ * @returns List of shipping rates for the specified method
35
+ */
36
+ export declare function getShippingRatesByMethod(methodId: number): Promise<ShippingRateJsonResponse[]>;
37
+ declare type ShippingRateJsonResponse = ModelRow<typeof ShippingRate>;
@@ -0,0 +1,27 @@
1
+ export {
2
+ bulkDestroy,
3
+ destroy,
4
+ destroyByMethod,
5
+ destroyByZone,
6
+ } from './destroy';
7
+ // Functions from fetch.ts
8
+ export {
9
+ fetchAll,
10
+ fetchById,
11
+ formatShippingRateOptions,
12
+ getRateByWeightAndZone,
13
+ getRatesByZone,
14
+ getShippingRatesByMethod,
15
+ } from './fetch';
16
+ // Functions from store.ts
17
+ export {
18
+ bulkStore,
19
+ store,
20
+ } from './store';
21
+ // Functions from update.ts
22
+ export {
23
+ bulkUpdate,
24
+ update,
25
+ updateByMethod,
26
+ updateByZone,
27
+ } from './update';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Create a new shipping rate
3
+ *
4
+ * @param data The shipping rate data to store
5
+ * @returns The newly created shipping rate record
6
+ */
7
+ export declare function store(data: NewShippingRate): Promise<ShippingRateJsonResponse>;
8
+ /**
9
+ * Create multiple shipping rates at once
10
+ *
11
+ * @param data Array of shipping rate data to store
12
+ * @returns Number of shipping rates created
13
+ */
14
+ export declare function bulkStore(data: NewShippingRate[]): Promise<number>;
15
+ // Import dependencies
16
+ declare type ShippingRateJsonResponse = ModelRow<typeof ShippingRate>;
17
+ declare type NewShippingRate = NewModelData<typeof ShippingRate>;