@stacksjs/commerce 0.70.22 → 0.70.23
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/device.test.d.ts +255 -0
- package/dist/export.d.ts +12 -17
- package/dist/fetch.d.ts +3 -2
- package/dist/index.d.ts +5 -3
- package/dist/index.js +868 -878
- package/dist/receipts.test.d.ts +142 -0
- package/dist/store.d.ts +3 -3
- package/dist/types.d.ts +2 -2
- package/dist/update.d.ts +4 -4
- package/package.json +2 -2
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
declare const requestData: {
|
|
2
|
+
name: 'Main Printer';
|
|
3
|
+
mac_address: '00:11:22:33:44:55';
|
|
4
|
+
location: 'Office 101';
|
|
5
|
+
terminal: 'TERM001';
|
|
6
|
+
status: 'online';
|
|
7
|
+
last_ping: unknown;
|
|
8
|
+
print_count: 0
|
|
9
|
+
};
|
|
10
|
+
declare const request: unknown;
|
|
11
|
+
declare const deviceId: undefined if (deviceId);
|
|
12
|
+
declare const minimalRequestData: {
|
|
13
|
+
name: 'Backup Printer';
|
|
14
|
+
mac_address: 'AA:BB:CC:DD:EE:FF';
|
|
15
|
+
location: 'Server Room';
|
|
16
|
+
terminal: 'TERM002';
|
|
17
|
+
status: 'offline';
|
|
18
|
+
last_ping: unknown;
|
|
19
|
+
print_count: 0
|
|
20
|
+
};
|
|
21
|
+
declare const request: unknown;
|
|
22
|
+
declare const requests: Array<unknown | unknown | unknown>;
|
|
23
|
+
declare const count: unknown;
|
|
24
|
+
declare const allDevices: unknown;
|
|
25
|
+
declare const count: unknown;
|
|
26
|
+
declare const requestData: {
|
|
27
|
+
name: 'Main Printer';
|
|
28
|
+
mac_address: '00:11:22:33:44:55';
|
|
29
|
+
location: 'Office 101';
|
|
30
|
+
terminal: 'TERM001';
|
|
31
|
+
status: 'online';
|
|
32
|
+
last_ping: unknown;
|
|
33
|
+
print_count: 0
|
|
34
|
+
};
|
|
35
|
+
declare const createRequest: undefined;
|
|
36
|
+
declare const updateData: {
|
|
37
|
+
name: 'Updated Printer';
|
|
38
|
+
mac_address: '00:11:22:33:44:66';
|
|
39
|
+
location: 'Office 102';
|
|
40
|
+
terminal: 'TERM002';
|
|
41
|
+
status: 'online';
|
|
42
|
+
last_ping: unknown;
|
|
43
|
+
print_count: 100
|
|
44
|
+
};
|
|
45
|
+
declare const updateRequest: unknown;
|
|
46
|
+
declare const requestData: {
|
|
47
|
+
name: 'Main Printer';
|
|
48
|
+
mac_address: '00:11:22:33:44:55';
|
|
49
|
+
location: 'Office 101';
|
|
50
|
+
terminal: 'TERM001';
|
|
51
|
+
status: 'online';
|
|
52
|
+
last_ping: unknown;
|
|
53
|
+
print_count: 0
|
|
54
|
+
};
|
|
55
|
+
declare const request: undefined;
|
|
56
|
+
declare const updatedDevice: unknown;
|
|
57
|
+
declare const warningDevice: unknown;
|
|
58
|
+
declare const requestData: {
|
|
59
|
+
name: 'Main Printer';
|
|
60
|
+
mac_address: '00:11:22:33:44:55';
|
|
61
|
+
location: 'Office 101';
|
|
62
|
+
terminal: 'TERM001';
|
|
63
|
+
status: 'online';
|
|
64
|
+
last_ping: unknown;
|
|
65
|
+
print_count: 0
|
|
66
|
+
};
|
|
67
|
+
declare const request: undefined;
|
|
68
|
+
declare const updatedDevice: unknown;
|
|
69
|
+
declare const requestData: {
|
|
70
|
+
name: 'Main Printer';
|
|
71
|
+
mac_address: '00:11:22:33:44:55';
|
|
72
|
+
location: 'Office 101';
|
|
73
|
+
terminal: 'TERM001';
|
|
74
|
+
status: 'online';
|
|
75
|
+
last_ping: unknown;
|
|
76
|
+
print_count: 0
|
|
77
|
+
};
|
|
78
|
+
declare const request: undefined;
|
|
79
|
+
declare const result: unknown;
|
|
80
|
+
declare let deviceIds: Array<((...args: any[]) => unknown)>;
|
|
81
|
+
declare const requestData: {
|
|
82
|
+
name: 'Main Printer';
|
|
83
|
+
mac_address: '00:11:22:33:44:55';
|
|
84
|
+
location: 'Office 101';
|
|
85
|
+
terminal: 'TERM001';
|
|
86
|
+
status: 'online';
|
|
87
|
+
last_ping: unknown;
|
|
88
|
+
print_count: 100
|
|
89
|
+
};
|
|
90
|
+
declare const request: unknown;
|
|
91
|
+
declare const spreadsheet: unknown;
|
|
92
|
+
declare const requestData: {
|
|
93
|
+
name: 'Main Printer';
|
|
94
|
+
mac_address: '00:11:22:33:44:55';
|
|
95
|
+
location: 'Office 101';
|
|
96
|
+
terminal: 'TERM001';
|
|
97
|
+
status: 'online';
|
|
98
|
+
last_ping: unknown;
|
|
99
|
+
print_count: 100
|
|
100
|
+
};
|
|
101
|
+
declare const request: unknown;
|
|
102
|
+
declare const spreadsheet: unknown;
|
|
103
|
+
declare const spreadsheet: unknown;
|
|
104
|
+
declare const requestData: {
|
|
105
|
+
name: 'Main Printer';
|
|
106
|
+
mac_address: '00:11:22:33:44:55';
|
|
107
|
+
location: 'Office 101';
|
|
108
|
+
terminal: 'TERM001';
|
|
109
|
+
status: 'online';
|
|
110
|
+
last_ping: unknown;
|
|
111
|
+
print_count: 0
|
|
112
|
+
};
|
|
113
|
+
declare const request: undefined;
|
|
114
|
+
declare const totalPrints: unknown;
|
|
115
|
+
declare const device1Data: {
|
|
116
|
+
name: 'Printer 1';
|
|
117
|
+
mac_address: '00:11:22:33:44:55';
|
|
118
|
+
location: 'Office 101';
|
|
119
|
+
terminal: 'TERM001';
|
|
120
|
+
status: 'online';
|
|
121
|
+
last_ping: unknown;
|
|
122
|
+
print_count: 0
|
|
123
|
+
};
|
|
124
|
+
declare const device2Data: {
|
|
125
|
+
name: 'Printer 2';
|
|
126
|
+
mac_address: 'AA:BB:CC:DD:EE:FF';
|
|
127
|
+
location: 'Office 102';
|
|
128
|
+
terminal: 'TERM002';
|
|
129
|
+
status: 'online';
|
|
130
|
+
last_ping: unknown;
|
|
131
|
+
print_count: 0
|
|
132
|
+
};
|
|
133
|
+
declare const device1: unknown;
|
|
134
|
+
declare const device1Id: undefined const device2Id;
|
|
135
|
+
declare const device1Prints: unknown;
|
|
136
|
+
declare const nonExistentDeviceId: unknown;
|
|
137
|
+
declare const errorRate: unknown;
|
|
138
|
+
declare const deviceData: {
|
|
139
|
+
name: 'Test Printer';
|
|
140
|
+
mac_address: '00:11:22:33:44:55';
|
|
141
|
+
location: 'Office 101';
|
|
142
|
+
terminal: 'TERM001';
|
|
143
|
+
status: 'online';
|
|
144
|
+
last_ping: unknown;
|
|
145
|
+
print_count: 0
|
|
146
|
+
};
|
|
147
|
+
declare const device: undefined;
|
|
148
|
+
declare const errorRate: unknown;
|
|
149
|
+
declare const deviceData: {
|
|
150
|
+
name: 'Test Printer';
|
|
151
|
+
mac_address: '00:11:22:33:44:55';
|
|
152
|
+
location: 'Office 101';
|
|
153
|
+
terminal: 'TERM001';
|
|
154
|
+
status: 'online';
|
|
155
|
+
last_ping: unknown;
|
|
156
|
+
print_count: 0
|
|
157
|
+
};
|
|
158
|
+
declare const device: undefined;
|
|
159
|
+
declare const errorRate: unknown;
|
|
160
|
+
declare const health: unknown;
|
|
161
|
+
declare const printers: Array<{
|
|
162
|
+
name: 'Printer 1';
|
|
163
|
+
mac_address: '00:11:22:33:44:55';
|
|
164
|
+
location: 'Office 101';
|
|
165
|
+
terminal: 'TERM001';
|
|
166
|
+
status: 'online';
|
|
167
|
+
last_ping: unknown;
|
|
168
|
+
print_count: 0
|
|
169
|
+
} | {
|
|
170
|
+
name: 'Printer 2';
|
|
171
|
+
mac_address: 'AA:BB:CC:DD:EE:FF';
|
|
172
|
+
location: 'Office 102';
|
|
173
|
+
terminal: 'TERM002';
|
|
174
|
+
status: 'online';
|
|
175
|
+
last_ping: unknown;
|
|
176
|
+
print_count: 0
|
|
177
|
+
} | {
|
|
178
|
+
name: 'Printer 3';
|
|
179
|
+
mac_address: '11:22:33:44:55:66';
|
|
180
|
+
location: 'Office 103';
|
|
181
|
+
terminal: 'TERM003';
|
|
182
|
+
status: 'online';
|
|
183
|
+
last_ping: unknown;
|
|
184
|
+
print_count: 0
|
|
185
|
+
}>;
|
|
186
|
+
declare const health: unknown;
|
|
187
|
+
declare const printers: Array<{
|
|
188
|
+
name: 'Online Printer';
|
|
189
|
+
mac_address: '00:11:22:33:44:55';
|
|
190
|
+
location: 'Office 101';
|
|
191
|
+
terminal: 'TERM001';
|
|
192
|
+
status: 'online';
|
|
193
|
+
last_ping: unknown;
|
|
194
|
+
print_count: 0
|
|
195
|
+
} | {
|
|
196
|
+
name: 'Offline Printer';
|
|
197
|
+
mac_address: 'AA:BB:CC:DD:EE:FF';
|
|
198
|
+
location: 'Office 102';
|
|
199
|
+
terminal: 'TERM002';
|
|
200
|
+
status: 'offline';
|
|
201
|
+
last_ping: unknown;
|
|
202
|
+
print_count: 0
|
|
203
|
+
} | {
|
|
204
|
+
name: 'Warning Printer';
|
|
205
|
+
mac_address: '11:22:33:44:55:66';
|
|
206
|
+
location: 'Office 103';
|
|
207
|
+
terminal: 'TERM003';
|
|
208
|
+
status: 'warning';
|
|
209
|
+
last_ping: unknown;
|
|
210
|
+
print_count: 0
|
|
211
|
+
} | {
|
|
212
|
+
name: 'Online Printer 2';
|
|
213
|
+
mac_address: '22:33:44:55:66:77';
|
|
214
|
+
location: 'Office 104';
|
|
215
|
+
terminal: 'TERM004';
|
|
216
|
+
status: 'online';
|
|
217
|
+
last_ping: unknown;
|
|
218
|
+
print_count: 0
|
|
219
|
+
}>;
|
|
220
|
+
declare const health: unknown;
|
|
221
|
+
declare const counts: unknown;
|
|
222
|
+
declare const printers: Array<{
|
|
223
|
+
name: 'Online Printer 1';
|
|
224
|
+
mac_address: '00:11:22:33:44:55';
|
|
225
|
+
location: 'Office 101';
|
|
226
|
+
terminal: 'TERM001';
|
|
227
|
+
status: 'online';
|
|
228
|
+
last_ping: unknown;
|
|
229
|
+
print_count: 0
|
|
230
|
+
} | {
|
|
231
|
+
name: 'Online Printer 2';
|
|
232
|
+
mac_address: 'AA:BB:CC:DD:EE:FF';
|
|
233
|
+
location: 'Office 102';
|
|
234
|
+
terminal: 'TERM002';
|
|
235
|
+
status: 'online';
|
|
236
|
+
last_ping: unknown;
|
|
237
|
+
print_count: 0
|
|
238
|
+
} | {
|
|
239
|
+
name: 'Offline Printer';
|
|
240
|
+
mac_address: '11:22:33:44:55:66';
|
|
241
|
+
location: 'Office 103';
|
|
242
|
+
terminal: 'TERM003';
|
|
243
|
+
status: 'offline';
|
|
244
|
+
last_ping: unknown;
|
|
245
|
+
print_count: 0
|
|
246
|
+
} | {
|
|
247
|
+
name: 'Warning Printer';
|
|
248
|
+
mac_address: '22:33:44:55:66:77';
|
|
249
|
+
location: 'Office 104';
|
|
250
|
+
terminal: 'TERM004';
|
|
251
|
+
status: 'warning';
|
|
252
|
+
last_ping: unknown;
|
|
253
|
+
print_count: 0
|
|
254
|
+
}>;
|
|
255
|
+
declare const counts: unknown;
|
package/dist/export.d.ts
CHANGED
|
@@ -1,22 +1,17 @@
|
|
|
1
|
+
import type { PrintDeviceJsonResponse } from '@stacksjs/orm';
|
|
1
2
|
import type { SpreadsheetWrapper } from 'ts-spreadsheets';
|
|
2
|
-
import type { WaitlistProductJsonResponse } from '@stacksjs/orm';
|
|
3
3
|
|
|
4
|
-
export declare interface
|
|
5
|
-
'ID': number
|
|
4
|
+
export declare interface ExportedPrintDevice {
|
|
5
|
+
'Device ID': number
|
|
6
6
|
'Name': string
|
|
7
|
-
'
|
|
8
|
-
'
|
|
9
|
-
'
|
|
10
|
-
'Notification Preference': string
|
|
11
|
-
'Source': string
|
|
7
|
+
'MAC Address': string
|
|
8
|
+
'Location': string
|
|
9
|
+
'Terminal': string
|
|
12
10
|
'Status': string
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'Purchased At': string
|
|
16
|
-
'Cancelled At': string
|
|
17
|
-
'Notes': string
|
|
11
|
+
'Last Ping': string
|
|
12
|
+
'Print Count': number
|
|
18
13
|
}
|
|
19
|
-
export declare function
|
|
20
|
-
declare function
|
|
21
|
-
export declare function
|
|
22
|
-
export declare function
|
|
14
|
+
export declare function exportPrintDevices(format: 'csv' | 'excel'): Promise<SpreadsheetWrapper>;
|
|
15
|
+
declare function prepareDevicesForExport(devices: PrintDeviceJsonResponse[]): void;
|
|
16
|
+
export declare function downloadPrintDevices(format: 'csv' | 'excel', filename?: string): Promise<Response>;
|
|
17
|
+
export declare function storePrintDevicesExport(format: 'csv' | 'excel', path?: string): Promise<void>;
|
package/dist/fetch.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export declare function fetchById(id: number): Promise<
|
|
2
|
-
export declare function fetchAll(): Promise<
|
|
1
|
+
export declare function fetchById(id: number): Promise<DeliveryRouteJsonResponse | undefined>;
|
|
2
|
+
export declare function fetchAll(): Promise<DeliveryRouteJsonResponse[]>;
|
|
3
|
+
export declare function fetchActive(): Promise<DeliveryRouteJsonResponse[]>;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,15 +3,17 @@ export {
|
|
|
3
3
|
destroy,
|
|
4
4
|
} from './destroy'
|
|
5
5
|
export {
|
|
6
|
+
fetchActive,
|
|
6
7
|
fetchAll,
|
|
8
|
+
fetchByDriver,
|
|
7
9
|
fetchById,
|
|
8
10
|
} from './fetch'
|
|
9
11
|
export {
|
|
10
|
-
bulkStore,
|
|
11
12
|
store,
|
|
13
|
+
updateLastActive,
|
|
12
14
|
} from './store'
|
|
13
15
|
export {
|
|
14
16
|
update,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
updateMetrics,
|
|
18
|
+
updateStops,
|
|
17
19
|
} from './update'
|