@deliverart/sdk-js-order-print-settings 0.0.0-dev-20260721002647
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 +1 -0
- package/dist/index.cjs +308 -0
- package/dist/index.d.cts +620 -0
- package/dist/index.d.ts +620 -0
- package/dist/index.js +257 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# @deliverart/sdk-js-order-print-settings
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
CreateOrderPrintSettings: () => CreateOrderPrintSettings,
|
|
24
|
+
DeleteOrderPrintSettings: () => DeleteOrderPrintSettings,
|
|
25
|
+
GetOrderPrintSettings: () => GetOrderPrintSettings,
|
|
26
|
+
GetOrderPrintSettingsDetails: () => GetOrderPrintSettingsDetails,
|
|
27
|
+
GetOrderPrintSettingsFromPointOfSale: () => GetOrderPrintSettingsFromPointOfSale,
|
|
28
|
+
GetOrderPrintSettingsFromPrinter: () => GetOrderPrintSettingsFromPrinter,
|
|
29
|
+
UpdateOrderPrintSettings: () => UpdateOrderPrintSettings,
|
|
30
|
+
createOrderPrintSettingsInputSchema: () => createOrderPrintSettingsInputSchema,
|
|
31
|
+
createOrderPrintSettingsResponseSchema: () => createOrderPrintSettingsResponseSchema,
|
|
32
|
+
deleteOrderPrintSettingsInputSchema: () => deleteOrderPrintSettingsInputSchema,
|
|
33
|
+
deleteOrderPrintSettingsResponseSchema: () => deleteOrderPrintSettingsResponseSchema,
|
|
34
|
+
getOrderPrintSettingsDetailsInputSchema: () => getOrderPrintSettingsDetailsInputSchema,
|
|
35
|
+
getOrderPrintSettingsDetailsResponseSchema: () => getOrderPrintSettingsDetailsResponseSchema,
|
|
36
|
+
getOrderPrintSettingsFromPointOfSaleInputSchema: () => getOrderPrintSettingsFromPointOfSaleInputSchema,
|
|
37
|
+
getOrderPrintSettingsFromPointOfSaleQuerySchema: () => getOrderPrintSettingsFromPointOfSaleQuerySchema,
|
|
38
|
+
getOrderPrintSettingsFromPointOfSaleResponseSchema: () => getOrderPrintSettingsFromPointOfSaleResponseSchema,
|
|
39
|
+
getOrderPrintSettingsFromPrinterInputSchema: () => getOrderPrintSettingsFromPrinterInputSchema,
|
|
40
|
+
getOrderPrintSettingsFromPrinterQuerySchema: () => getOrderPrintSettingsFromPrinterQuerySchema,
|
|
41
|
+
getOrderPrintSettingsFromPrinterResponseSchema: () => getOrderPrintSettingsFromPrinterResponseSchema,
|
|
42
|
+
getOrderPrintSettingsInputSchema: () => getOrderPrintSettingsInputSchema,
|
|
43
|
+
getOrderPrintSettingsQuerySchema: () => getOrderPrintSettingsQuerySchema,
|
|
44
|
+
getOrderPrintSettingsResponseSchema: () => getOrderPrintSettingsResponseSchema,
|
|
45
|
+
orderPrintSettingsIriSchema: () => orderPrintSettingsIriSchema,
|
|
46
|
+
orderPrintSettingsNullableIriSchema: () => orderPrintSettingsNullableIriSchema,
|
|
47
|
+
orderPrintSettingsQuerySchema: () => orderPrintSettingsQuerySchema,
|
|
48
|
+
orderPrintSettingsSchema: () => orderPrintSettingsSchema,
|
|
49
|
+
updateOrderPrintSettingsInputSchema: () => updateOrderPrintSettingsInputSchema,
|
|
50
|
+
updateOrderPrintSettingsResponseSchema: () => updateOrderPrintSettingsResponseSchema,
|
|
51
|
+
writableCreateOrderPrintSettingsSchema: () => writableCreateOrderPrintSettingsSchema,
|
|
52
|
+
writableOrderPrintSettingsSchema: () => writableOrderPrintSettingsSchema
|
|
53
|
+
});
|
|
54
|
+
module.exports = __toCommonJS(index_exports);
|
|
55
|
+
|
|
56
|
+
// src/models.ts
|
|
57
|
+
var import_sdk_js_global_types = require("@deliverart/sdk-js-global-types");
|
|
58
|
+
var import_sdk_js_point_of_sale = require("@deliverart/sdk-js-point-of-sale");
|
|
59
|
+
var import_sdk_js_printer = require("@deliverart/sdk-js-printer");
|
|
60
|
+
var import_sdk_js_receipt_template = require("@deliverart/sdk-js-receipt-template");
|
|
61
|
+
var import_zod = require("zod");
|
|
62
|
+
var orderPrintSettingsSchema = import_zod.z.object({
|
|
63
|
+
id: import_zod.z.string(),
|
|
64
|
+
pointOfSale: import_sdk_js_point_of_sale.pointOfSaleIriSchema,
|
|
65
|
+
printer: import_sdk_js_printer.printerIriSchema,
|
|
66
|
+
receiptTemplate: import_sdk_js_receipt_template.receiptTemplateIriSchema,
|
|
67
|
+
printLocale: import_zod.z.string().regex(/^[a-z]{2}_[A-Z]{2}$/),
|
|
68
|
+
title: import_zod.z.string(),
|
|
69
|
+
printTitle: import_zod.z.boolean(),
|
|
70
|
+
printLogo: import_zod.z.boolean(),
|
|
71
|
+
printCustomer: import_zod.z.boolean(),
|
|
72
|
+
printAddress: import_zod.z.boolean(),
|
|
73
|
+
printPrices: import_zod.z.boolean(),
|
|
74
|
+
createdAt: import_sdk_js_global_types.datetimeSchema,
|
|
75
|
+
updatedAt: import_sdk_js_global_types.datetimeSchema
|
|
76
|
+
});
|
|
77
|
+
var writableOrderPrintSettingsSchema = orderPrintSettingsSchema.pick({
|
|
78
|
+
printer: true,
|
|
79
|
+
receiptTemplate: true,
|
|
80
|
+
printLocale: true,
|
|
81
|
+
title: true,
|
|
82
|
+
printTitle: true,
|
|
83
|
+
printLogo: true,
|
|
84
|
+
printCustomer: true,
|
|
85
|
+
printAddress: true,
|
|
86
|
+
printPrices: true
|
|
87
|
+
});
|
|
88
|
+
var writableCreateOrderPrintSettingsSchema = orderPrintSettingsSchema.pick({
|
|
89
|
+
pointOfSale: true,
|
|
90
|
+
printer: true,
|
|
91
|
+
receiptTemplate: true,
|
|
92
|
+
printLocale: true,
|
|
93
|
+
title: true,
|
|
94
|
+
printTitle: true,
|
|
95
|
+
printLogo: true,
|
|
96
|
+
printCustomer: true,
|
|
97
|
+
printAddress: true,
|
|
98
|
+
printPrices: true
|
|
99
|
+
});
|
|
100
|
+
var orderPrintSettingsQuerySchema = import_zod.z.object({
|
|
101
|
+
id: import_zod.z.union([import_zod.z.string(), import_zod.z.array(import_zod.z.string())]).optional(),
|
|
102
|
+
printLogo: import_sdk_js_global_types.booleanSchema.optional(),
|
|
103
|
+
printCustomer: import_sdk_js_global_types.booleanSchema.optional(),
|
|
104
|
+
printAddress: import_sdk_js_global_types.booleanSchema.optional(),
|
|
105
|
+
printPrices: import_sdk_js_global_types.booleanSchema.optional(),
|
|
106
|
+
"order[createdAt]": import_sdk_js_global_types.sortDirSchema.optional(),
|
|
107
|
+
"order[updatedAt]": import_sdk_js_global_types.sortDirSchema.optional(),
|
|
108
|
+
page: import_zod.z.coerce.number().optional()
|
|
109
|
+
}).extend(import_sdk_js_global_types.timestampsFilterSchema.shape);
|
|
110
|
+
|
|
111
|
+
// src/requests/CreateOrderPrintSettings.ts
|
|
112
|
+
var import_sdk_js_core = require("@deliverart/sdk-js-core");
|
|
113
|
+
var createOrderPrintSettingsInputSchema = writableCreateOrderPrintSettingsSchema.required();
|
|
114
|
+
var createOrderPrintSettingsResponseSchema = orderPrintSettingsSchema;
|
|
115
|
+
var CreateOrderPrintSettings = class extends import_sdk_js_core.AbstractApiRequest {
|
|
116
|
+
constructor(input) {
|
|
117
|
+
super(input);
|
|
118
|
+
this.method = "POST";
|
|
119
|
+
this.contentType = "application/json";
|
|
120
|
+
this.accept = "application/json";
|
|
121
|
+
this.inputSchema = createOrderPrintSettingsInputSchema;
|
|
122
|
+
this.outputSchema = createOrderPrintSettingsResponseSchema;
|
|
123
|
+
this.querySchema = void 0;
|
|
124
|
+
this.headersSchema = void 0;
|
|
125
|
+
}
|
|
126
|
+
getPath() {
|
|
127
|
+
return "/order_print_settings";
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
// src/requests/DeleteOrderPrintSettings.ts
|
|
132
|
+
var import_sdk_js_core2 = require("@deliverart/sdk-js-core");
|
|
133
|
+
var import_sdk_js_global_types2 = require("@deliverart/sdk-js-global-types");
|
|
134
|
+
var import_zod2 = require("zod");
|
|
135
|
+
var deleteOrderPrintSettingsInputSchema = import_zod2.z.undefined();
|
|
136
|
+
var deleteOrderPrintSettingsResponseSchema = import_sdk_js_global_types2.emptyResponseSchema;
|
|
137
|
+
var DeleteOrderPrintSettings = class extends import_sdk_js_core2.AbstractApiRequest {
|
|
138
|
+
constructor(orderPrintSettingsId) {
|
|
139
|
+
super(void 0);
|
|
140
|
+
this.method = "DELETE";
|
|
141
|
+
this.contentType = "application/json";
|
|
142
|
+
this.accept = "application/json";
|
|
143
|
+
this.inputSchema = deleteOrderPrintSettingsInputSchema;
|
|
144
|
+
this.outputSchema = deleteOrderPrintSettingsResponseSchema;
|
|
145
|
+
this.querySchema = void 0;
|
|
146
|
+
this.headersSchema = void 0;
|
|
147
|
+
this.orderPrintSettingsId = orderPrintSettingsId;
|
|
148
|
+
}
|
|
149
|
+
getPath() {
|
|
150
|
+
return `/order_print_settings/${this.orderPrintSettingsId}`;
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
// src/requests/GetOrderPrintSettings.ts
|
|
155
|
+
var import_sdk_js_core3 = require("@deliverart/sdk-js-core");
|
|
156
|
+
var import_sdk_js_global_types3 = require("@deliverart/sdk-js-global-types");
|
|
157
|
+
var import_zod3 = require("zod");
|
|
158
|
+
var getOrderPrintSettingsQuerySchema = orderPrintSettingsQuerySchema;
|
|
159
|
+
var getOrderPrintSettingsInputSchema = import_zod3.z.undefined();
|
|
160
|
+
var getOrderPrintSettingsResponseSchema = (0, import_sdk_js_global_types3.createPaginatedSchema)(orderPrintSettingsSchema);
|
|
161
|
+
var GetOrderPrintSettings = class extends import_sdk_js_core3.AbstractApiRequest {
|
|
162
|
+
constructor(options) {
|
|
163
|
+
super(void 0, options);
|
|
164
|
+
this.method = "GET";
|
|
165
|
+
this.contentType = "application/json";
|
|
166
|
+
this.accept = "application/json";
|
|
167
|
+
this.inputSchema = getOrderPrintSettingsInputSchema;
|
|
168
|
+
this.outputSchema = getOrderPrintSettingsResponseSchema;
|
|
169
|
+
this.querySchema = getOrderPrintSettingsQuerySchema;
|
|
170
|
+
this.headersSchema = void 0;
|
|
171
|
+
this.listItemSchema = orderPrintSettingsSchema;
|
|
172
|
+
this.paginationDefaultEnabled = true;
|
|
173
|
+
}
|
|
174
|
+
getPath() {
|
|
175
|
+
return "/order_print_settings";
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
// src/requests/GetOrderPrintSettingsDetails.ts
|
|
180
|
+
var import_sdk_js_core4 = require("@deliverart/sdk-js-core");
|
|
181
|
+
var import_zod4 = require("zod");
|
|
182
|
+
var getOrderPrintSettingsDetailsInputSchema = import_zod4.z.undefined();
|
|
183
|
+
var getOrderPrintSettingsDetailsResponseSchema = orderPrintSettingsSchema;
|
|
184
|
+
var GetOrderPrintSettingsDetails = class extends import_sdk_js_core4.AbstractApiRequest {
|
|
185
|
+
constructor(orderPrintSettingsId) {
|
|
186
|
+
super(void 0);
|
|
187
|
+
this.method = "GET";
|
|
188
|
+
this.contentType = "application/json";
|
|
189
|
+
this.accept = "application/json";
|
|
190
|
+
this.inputSchema = getOrderPrintSettingsDetailsInputSchema;
|
|
191
|
+
this.outputSchema = getOrderPrintSettingsDetailsResponseSchema;
|
|
192
|
+
this.querySchema = void 0;
|
|
193
|
+
this.headersSchema = void 0;
|
|
194
|
+
this.orderPrintSettingsId = orderPrintSettingsId;
|
|
195
|
+
}
|
|
196
|
+
getPath() {
|
|
197
|
+
return `/order_print_settings/${this.orderPrintSettingsId}`;
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
// src/requests/GetOrderPrintSettingsFromPointOfSale.ts
|
|
202
|
+
var import_sdk_js_core5 = require("@deliverart/sdk-js-core");
|
|
203
|
+
var import_zod5 = require("zod");
|
|
204
|
+
var getOrderPrintSettingsFromPointOfSaleQuerySchema = orderPrintSettingsQuerySchema;
|
|
205
|
+
var getOrderPrintSettingsFromPointOfSaleInputSchema = import_zod5.z.undefined();
|
|
206
|
+
var getOrderPrintSettingsFromPointOfSaleResponseSchema = import_zod5.z.array(orderPrintSettingsSchema);
|
|
207
|
+
var GetOrderPrintSettingsFromPointOfSale = class extends import_sdk_js_core5.AbstractApiRequest {
|
|
208
|
+
constructor(pointOfSaleId, options) {
|
|
209
|
+
super(void 0, options);
|
|
210
|
+
this.method = "GET";
|
|
211
|
+
this.contentType = "application/json";
|
|
212
|
+
this.accept = "application/json";
|
|
213
|
+
this.inputSchema = getOrderPrintSettingsFromPointOfSaleInputSchema;
|
|
214
|
+
this.outputSchema = getOrderPrintSettingsFromPointOfSaleResponseSchema;
|
|
215
|
+
this.querySchema = getOrderPrintSettingsFromPointOfSaleQuerySchema;
|
|
216
|
+
this.headersSchema = void 0;
|
|
217
|
+
this.listItemSchema = orderPrintSettingsSchema;
|
|
218
|
+
this.paginationDefaultEnabled = false;
|
|
219
|
+
this.pointOfSaleId = pointOfSaleId;
|
|
220
|
+
}
|
|
221
|
+
getPath() {
|
|
222
|
+
return `/point_of_sales/${this.pointOfSaleId}/order_print_settings`;
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
// src/requests/GetOrderPrintSettingsFromPrinter.ts
|
|
227
|
+
var import_sdk_js_core6 = require("@deliverart/sdk-js-core");
|
|
228
|
+
var import_zod6 = require("zod");
|
|
229
|
+
var getOrderPrintSettingsFromPrinterQuerySchema = orderPrintSettingsQuerySchema;
|
|
230
|
+
var getOrderPrintSettingsFromPrinterInputSchema = import_zod6.z.undefined();
|
|
231
|
+
var getOrderPrintSettingsFromPrinterResponseSchema = import_zod6.z.array(orderPrintSettingsSchema);
|
|
232
|
+
var GetOrderPrintSettingsFromPrinter = class extends import_sdk_js_core6.AbstractApiRequest {
|
|
233
|
+
constructor(printerId, options) {
|
|
234
|
+
super(void 0, options);
|
|
235
|
+
this.method = "GET";
|
|
236
|
+
this.contentType = "application/json";
|
|
237
|
+
this.accept = "application/json";
|
|
238
|
+
this.inputSchema = getOrderPrintSettingsFromPrinterInputSchema;
|
|
239
|
+
this.outputSchema = getOrderPrintSettingsFromPrinterResponseSchema;
|
|
240
|
+
this.querySchema = getOrderPrintSettingsFromPrinterQuerySchema;
|
|
241
|
+
this.headersSchema = void 0;
|
|
242
|
+
this.listItemSchema = orderPrintSettingsSchema;
|
|
243
|
+
this.paginationDefaultEnabled = false;
|
|
244
|
+
this.printerId = printerId;
|
|
245
|
+
}
|
|
246
|
+
getPath() {
|
|
247
|
+
return `/printers/${this.printerId}/order_print_settings`;
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
// src/requests/UpdateOrderPrintSettings.ts
|
|
252
|
+
var import_sdk_js_core7 = require("@deliverart/sdk-js-core");
|
|
253
|
+
var updateOrderPrintSettingsInputSchema = writableOrderPrintSettingsSchema.partial();
|
|
254
|
+
var updateOrderPrintSettingsResponseSchema = orderPrintSettingsSchema;
|
|
255
|
+
var UpdateOrderPrintSettings = class extends import_sdk_js_core7.AbstractApiRequest {
|
|
256
|
+
constructor(orderPrintSettingsId, input) {
|
|
257
|
+
super(input);
|
|
258
|
+
this.method = "PATCH";
|
|
259
|
+
this.contentType = "application/merge-patch+json";
|
|
260
|
+
this.accept = "application/json";
|
|
261
|
+
this.inputSchema = updateOrderPrintSettingsInputSchema;
|
|
262
|
+
this.outputSchema = updateOrderPrintSettingsResponseSchema;
|
|
263
|
+
this.querySchema = void 0;
|
|
264
|
+
this.headersSchema = void 0;
|
|
265
|
+
this.orderPrintSettingsId = orderPrintSettingsId;
|
|
266
|
+
}
|
|
267
|
+
getPath() {
|
|
268
|
+
return `/order_print_settings/${this.orderPrintSettingsId}`;
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
// src/types.ts
|
|
273
|
+
var import_sdk_js_global_types4 = require("@deliverart/sdk-js-global-types");
|
|
274
|
+
var orderPrintSettingsIriSchema = (0, import_sdk_js_global_types4.iriSchema)("/order-print-settings/:id");
|
|
275
|
+
var orderPrintSettingsNullableIriSchema = (0, import_sdk_js_global_types4.iriNullableSchema)("/order-print-settings/:id");
|
|
276
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
277
|
+
0 && (module.exports = {
|
|
278
|
+
CreateOrderPrintSettings,
|
|
279
|
+
DeleteOrderPrintSettings,
|
|
280
|
+
GetOrderPrintSettings,
|
|
281
|
+
GetOrderPrintSettingsDetails,
|
|
282
|
+
GetOrderPrintSettingsFromPointOfSale,
|
|
283
|
+
GetOrderPrintSettingsFromPrinter,
|
|
284
|
+
UpdateOrderPrintSettings,
|
|
285
|
+
createOrderPrintSettingsInputSchema,
|
|
286
|
+
createOrderPrintSettingsResponseSchema,
|
|
287
|
+
deleteOrderPrintSettingsInputSchema,
|
|
288
|
+
deleteOrderPrintSettingsResponseSchema,
|
|
289
|
+
getOrderPrintSettingsDetailsInputSchema,
|
|
290
|
+
getOrderPrintSettingsDetailsResponseSchema,
|
|
291
|
+
getOrderPrintSettingsFromPointOfSaleInputSchema,
|
|
292
|
+
getOrderPrintSettingsFromPointOfSaleQuerySchema,
|
|
293
|
+
getOrderPrintSettingsFromPointOfSaleResponseSchema,
|
|
294
|
+
getOrderPrintSettingsFromPrinterInputSchema,
|
|
295
|
+
getOrderPrintSettingsFromPrinterQuerySchema,
|
|
296
|
+
getOrderPrintSettingsFromPrinterResponseSchema,
|
|
297
|
+
getOrderPrintSettingsInputSchema,
|
|
298
|
+
getOrderPrintSettingsQuerySchema,
|
|
299
|
+
getOrderPrintSettingsResponseSchema,
|
|
300
|
+
orderPrintSettingsIriSchema,
|
|
301
|
+
orderPrintSettingsNullableIriSchema,
|
|
302
|
+
orderPrintSettingsQuerySchema,
|
|
303
|
+
orderPrintSettingsSchema,
|
|
304
|
+
updateOrderPrintSettingsInputSchema,
|
|
305
|
+
updateOrderPrintSettingsResponseSchema,
|
|
306
|
+
writableCreateOrderPrintSettingsSchema,
|
|
307
|
+
writableOrderPrintSettingsSchema
|
|
308
|
+
});
|