@deliverart/sdk-js-order 2.48.0 → 3.0.0-dev.1
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 +53 -0
- package/dist/index.cjs +93 -27
- package/dist/index.d.cts +7041 -3561
- package/dist/index.d.ts +7041 -3561
- package/dist/index.js +75 -10
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -71,8 +71,21 @@ type OrderPlanningMode = 'PLANNED' | 'FORCED'
|
|
|
71
71
|
- `kitchen` does not accept delivery or collection scheduling fields
|
|
72
72
|
- all writable order inputs also accept `forceScheduling?: boolean` for internal operator-only retries that bypass slot/capacity validation
|
|
73
73
|
|
|
74
|
+
Ingredient removals remain catalog menu-item IRIs in public order drafts. Both
|
|
75
|
+
`CreateOrder` and `CalculateOrderFees` convert those selections into fresh owned
|
|
76
|
+
removal objects at the request boundary, including selections inside nested
|
|
77
|
+
modifiers. They preserve the original draft. Existing order-row IRIs cannot be
|
|
78
|
+
used to create items, modifiers, choices or removals in another order.
|
|
79
|
+
|
|
74
80
|
`UpdateOrderInput` keeps common editable fields and enforces mutually exclusive delivery / collection scheduling fields.
|
|
75
81
|
|
|
82
|
+
Order list and detail responses allow `address.city` and `address.postalCode` to be
|
|
83
|
+
`null`, because delivery partners can provide only an address label and geographic
|
|
84
|
+
coordinates. Missing locality values remain `null`; clients should omit them from
|
|
85
|
+
display text. Other address checks remain unchanged. `orderAddressSchema`, order
|
|
86
|
+
creation, updates, and fee calculation still require non-empty city and postal
|
|
87
|
+
code strings whenever an address object is supplied.
|
|
88
|
+
|
|
76
89
|
## Order Requests
|
|
77
90
|
|
|
78
91
|
### CreateOrder
|
|
@@ -1107,3 +1120,43 @@ provider numbering series can repeat. Tilby already exposes its numeric `sale_id
|
|
|
1107
1120
|
### Exact order selection
|
|
1108
1121
|
|
|
1109
1122
|
`GetPointOfSaleOrders` accepts `query.id` as one identifier or a non-empty array. Use this POS-scoped filter to load complete order cards for an authoritative dashboard cohort without broadening its membership. The client serializes arrays as `id[]`; empty arrays are rejected.
|
|
1123
|
+
|
|
1124
|
+
### Recorded operational pricing
|
|
1125
|
+
|
|
1126
|
+
Order collection and detail responses may expose read-only `recordedPricing` and
|
|
1127
|
+
`recordedCurrency`. Older responses may omit both fields. When recorded pricing
|
|
1128
|
+
is true, amounts retain source evidence and generic order PATCH is rejected with
|
|
1129
|
+
`order_recorded_pricing_locked`; use the permitted targeted operational actions.
|
|
1130
|
+
These fields are never writable inputs. Physical item `unitTaxRate` preserves
|
|
1131
|
+
`null` as unavailable, separately from an explicit zero rate. Export diagnostic
|
|
1132
|
+
`order_export_recorded_pricing_unsupported` requires compatible fiscal handling;
|
|
1133
|
+
a fresh retry cannot repair it. Read-only uncertain-outcome reconciliation remains
|
|
1134
|
+
available.
|
|
1135
|
+
|
|
1136
|
+
`OrderMenuItem.recordedVariations` optionally preserves flat imported choices.
|
|
1137
|
+
Each readonly entry carries `action` (`add`/`sub`), source `labels`,
|
|
1138
|
+
`labelEvidence` and nullable signed `ruleSorting`. Old API responses may omit
|
|
1139
|
+
this field. Labels retain their original locale and full text; unavailable labels
|
|
1140
|
+
remain explicit. These entries do not define modifier groups or catalog links,
|
|
1141
|
+
and their charges are already included in the physical item's amounts. They
|
|
1142
|
+
must never be submitted as additional writable modifiers or zero-priced items.
|
|
1143
|
+
|
|
1144
|
+
`OrderFeeDto.taxRate` is nullable: an unavailable source VAT rate remains `null`
|
|
1145
|
+
and is distinct from an explicit `0`. Signed amount/net/tax strings are retained
|
|
1146
|
+
without reclassification or recalculation. Ordinary known rates remain numeric.
|
|
1147
|
+
|
|
1148
|
+
`migrationQuarantined` is a required, read-only boolean on order list, detail and nested bundle reads. It is derived by the API from immutable migration receipts; `recordedPricing`, source, status and payment fields do not establish or clear quarantine. Missing or malformed flags fail response validation instead of defaulting to false. Create/PATCH schemas do not send this field. Clients must disable operational mutations and printing while it is true; no quarantine release operation is currently exposed.
|
|
1149
|
+
|
|
1150
|
+
|
|
1151
|
+
Roll out the API read contract before publishing or adopting this required-field
|
|
1152
|
+
SDK in clients. Older APIs that omit `migrationQuarantined` are intentionally
|
|
1153
|
+
incompatible with the new response schema. Coordinate Hub and other order SDK
|
|
1154
|
+
consumers with that API-first rollout; local builds do not publish a package or
|
|
1155
|
+
enable migration traffic.
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
## Strict TypeScript fixture and amendment-reference checks
|
|
1159
|
+
|
|
1160
|
+
The package TypeScript configuration resolves the checked-in JSON API fixtures during strict checks. No fixture is excluded, widened to `any`, or replaced by an ambient JSON-module declaration. Existing address-read matrices select each concrete schema before constructing their table, preserving every nullable-read and strict-write assertion.
|
|
1161
|
+
|
|
1162
|
+
Amendment references retain the string-or-IRI-object input and canonical string output. The normalized, strictly refined intermediate is annotated with `unknown` output solely to match the shared IRI parser's declared unknown-input boundary. The runtime pipeline still performs the original relative/path checks, then the common IRI/UUID parser, then returns its canonical wire string. No assertion cast, unchecked parse or bypass is used. RFC and historical UUID-shaped references remain accepted under the common contract; malformed, foreign and non-relative references remain rejected.
|
package/dist/index.cjs
CHANGED
|
@@ -207,8 +207,8 @@ __export(index_exports, {
|
|
|
207
207
|
getOrderSettlementTasksInputSchema: () => getOrderSettlementTasksInputSchema,
|
|
208
208
|
getOrderSettlementTasksQuerySchema: () => getOrderSettlementTasksQuerySchema,
|
|
209
209
|
getOrderSettlementTasksResponseSchema: () => getOrderSettlementTasksResponseSchema,
|
|
210
|
-
getOrderSubPartnerPresentation: () =>
|
|
211
|
-
getOrderSubPartners: () =>
|
|
210
|
+
getOrderSubPartnerPresentation: () => import_sdk_js_global_types32.getOrderSubPartnerPresentation,
|
|
211
|
+
getOrderSubPartners: () => import_sdk_js_global_types32.getOrderSubPartners,
|
|
212
212
|
getOrdersInputSchema: () => getOrdersInputSchema,
|
|
213
213
|
getOrdersQuerySchema: () => getOrdersQuerySchema,
|
|
214
214
|
getOrdersResponseSchema: () => getOrdersResponseSchema,
|
|
@@ -219,7 +219,7 @@ __export(index_exports, {
|
|
|
219
219
|
getPointOfSaleOrdersQuerySchema: () => getPointOfSaleOrdersQuerySchema,
|
|
220
220
|
getPointOfSaleOrdersResponseSchema: () => getPointOfSaleOrdersResponseSchema,
|
|
221
221
|
initialPaymentAllocationSchema: () => initialPaymentAllocationSchema,
|
|
222
|
-
isOrderSubPartnerAllowed: () =>
|
|
222
|
+
isOrderSubPartnerAllowed: () => import_sdk_js_global_types32.isOrderSubPartnerAllowed,
|
|
223
223
|
kitchenOrderDetailsSchema: () => kitchenOrderDetailsSchema,
|
|
224
224
|
kitchenOrderSchema: () => kitchenOrderSchema,
|
|
225
225
|
localeItemSchema: () => localeItemSchema,
|
|
@@ -227,7 +227,7 @@ __export(index_exports, {
|
|
|
227
227
|
markOrderAsCollectedResponseSchema: () => markOrderAsCollectedResponseSchema,
|
|
228
228
|
markOrderAsReadInputSchema: () => markOrderAsReadInputSchema,
|
|
229
229
|
markOrderAsReadResponseSchema: () => markOrderAsReadResponseSchema,
|
|
230
|
-
matchesOrderProvenance: () =>
|
|
230
|
+
matchesOrderProvenance: () => import_sdk_js_global_types32.matchesOrderProvenance,
|
|
231
231
|
orderAddressSchema: () => orderAddressSchema,
|
|
232
232
|
orderAmendmentActionAvailabilitySchema: () => orderAmendmentActionAvailabilitySchema,
|
|
233
233
|
orderAmendmentActionSchema: () => orderAmendmentActionSchema,
|
|
@@ -320,10 +320,10 @@ __export(index_exports, {
|
|
|
320
320
|
orderSources: () => import_sdk_js_global_types4.orderSources,
|
|
321
321
|
orderStatusSchema: () => import_sdk_js_global_types4.orderStatusSchema,
|
|
322
322
|
orderStatuses: () => import_sdk_js_global_types4.orderStatuses,
|
|
323
|
-
orderSubPartnerLabels: () =>
|
|
324
|
-
orderSubPartnerSchema: () =>
|
|
325
|
-
orderSubPartners: () =>
|
|
326
|
-
orderSubPartnersByPartner: () =>
|
|
323
|
+
orderSubPartnerLabels: () => import_sdk_js_global_types32.orderSubPartnerLabels,
|
|
324
|
+
orderSubPartnerSchema: () => import_sdk_js_global_types32.orderSubPartnerSchema,
|
|
325
|
+
orderSubPartners: () => import_sdk_js_global_types32.orderSubPartners,
|
|
326
|
+
orderSubPartnersByPartner: () => import_sdk_js_global_types32.orderSubPartnersByPartner,
|
|
327
327
|
orderTypeSchema: () => import_sdk_js_global_types4.orderTypeSchema,
|
|
328
328
|
orderTypes: () => import_sdk_js_global_types4.orderTypes,
|
|
329
329
|
ordersQuerySchema: () => ordersQuerySchema,
|
|
@@ -337,6 +337,7 @@ __export(index_exports, {
|
|
|
337
337
|
recordOrderOfflineSettlementResponseSchema: () => recordOrderOfflineSettlementResponseSchema,
|
|
338
338
|
recordOrderReceiptInputSchema: () => recordOrderReceiptInputSchema,
|
|
339
339
|
recordOrderReceiptResponseSchema: () => recordOrderReceiptResponseSchema,
|
|
340
|
+
recordedOrderVariationSchema: () => recordedOrderVariationSchema,
|
|
340
341
|
regularBundleDetailsSchema: () => regularBundleDetailsSchema,
|
|
341
342
|
regularBundleSchema: () => regularBundleSchema,
|
|
342
343
|
rejectOrderHeadersSchema: () => rejectOrderHeadersSchema,
|
|
@@ -384,10 +385,13 @@ var import_zod2 = require("zod");
|
|
|
384
385
|
// src/amendment-references.ts
|
|
385
386
|
var import_sdk_js_global_types = require("@deliverart/sdk-js-global-types");
|
|
386
387
|
var import_zod = require("zod");
|
|
387
|
-
var amendmentResourceIri = (pattern) =>
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
388
|
+
var amendmentResourceIri = (pattern) => {
|
|
389
|
+
const normalizedReference = import_zod.z.union([import_zod.z.string(), import_zod.z.object({ iri: import_zod.z.string() })]).transform((value) => typeof value === "string" ? value : value.iri).refine(
|
|
390
|
+
(value) => value.startsWith("/") && !value.startsWith("//") && !/[?#]/.test(value) && (0, import_sdk_js_global_types.matchesIriPattern)(value, pattern),
|
|
391
|
+
"A matching relative resource IRI is required."
|
|
392
|
+
);
|
|
393
|
+
return normalizedReference.pipe((0, import_sdk_js_global_types.iriSchema)(pattern)).transform((value) => value.iri);
|
|
394
|
+
};
|
|
391
395
|
function checkAmendmentReferenceAliases(value, context, fields) {
|
|
392
396
|
for (const field of fields) {
|
|
393
397
|
if (value[field] != null && value[`${field}Id`] != null)
|
|
@@ -804,7 +808,7 @@ var orderFeeDtoSchema = import_zod8.z.object({
|
|
|
804
808
|
amount: import_zod8.z.string(),
|
|
805
809
|
netAmount: import_zod8.z.string(),
|
|
806
810
|
taxAmount: import_zod8.z.string(),
|
|
807
|
-
taxRate: import_zod8.z.coerce.number()
|
|
811
|
+
taxRate: import_zod8.z.coerce.number().nullable()
|
|
808
812
|
});
|
|
809
813
|
var feeSimulationSchema = import_zod8.z.object({
|
|
810
814
|
fees: import_zod8.z.array(orderFeeDtoSchema).min(0),
|
|
@@ -831,6 +835,21 @@ var localeItemSchema = import_zod8.z.object({
|
|
|
831
835
|
locale: import_zod8.z.string().regex(/^[a-z]{2}(_[A-Z]{2})?$/),
|
|
832
836
|
text: import_zod8.z.string()
|
|
833
837
|
});
|
|
838
|
+
var recordedVariationLabelText = (limit) => import_zod8.z.string().refine((value) => Array.from(value).every((character) => {
|
|
839
|
+
const code = character.codePointAt(0);
|
|
840
|
+
return code >= 32 && code !== 127 || [9, 10, 13].includes(code);
|
|
841
|
+
}), "Source label contains control characters").refine((value) => !/\p{Cs}/u.test(value), "Source label contains invalid Unicode").refine((value) => Array.from(value).length <= limit, "Source label exceeds its character limit");
|
|
842
|
+
var recordedOrderVariationSchema = import_zod8.z.object({
|
|
843
|
+
action: import_zod8.z.enum(["add", "sub"]),
|
|
844
|
+
labels: import_zod8.z.array(
|
|
845
|
+
import_zod8.z.object({
|
|
846
|
+
locale: recordedVariationLabelText(30).refine((value) => value.length > 0),
|
|
847
|
+
text: recordedVariationLabelText(500)
|
|
848
|
+
}).strict()
|
|
849
|
+
).max(30),
|
|
850
|
+
labelEvidence: import_zod8.z.enum(["current_catalog_reference", "unavailable"]),
|
|
851
|
+
ruleSorting: import_zod8.z.number().int().min(-2147483648).max(2147483647).nullable()
|
|
852
|
+
}).strict();
|
|
834
853
|
var orderMenuItemSchema = import_zod8.z.object({
|
|
835
854
|
id: import_zod8.z.string(),
|
|
836
855
|
type: import_sdk_js_menu.menuItemTypeSchema,
|
|
@@ -838,13 +857,14 @@ var orderMenuItemSchema = import_zod8.z.object({
|
|
|
838
857
|
name: import_zod8.z.array(localeItemSchema).min(1),
|
|
839
858
|
description: import_zod8.z.array(localeItemSchema).min(0),
|
|
840
859
|
variantName: import_zod8.z.array(localeItemSchema).min(1).nullable(),
|
|
860
|
+
recordedVariations: import_zod8.z.array(recordedOrderVariationSchema).max(5e3).optional(),
|
|
841
861
|
countable: import_zod8.z.boolean(),
|
|
842
862
|
quantity: import_zod8.z.coerce.number().nonnegative().nullable(),
|
|
843
863
|
notes: import_zod8.z.string().nullable(),
|
|
844
864
|
unitPrice: import_zod8.z.string(),
|
|
845
865
|
unitNetPrice: import_zod8.z.string(),
|
|
846
866
|
unitTaxAmount: import_zod8.z.string(),
|
|
847
|
-
unitTaxRate: import_zod8.z.coerce.number(),
|
|
867
|
+
unitTaxRate: import_zod8.z.coerce.number().nullable(),
|
|
848
868
|
unitDiscount: import_zod8.z.string(),
|
|
849
869
|
finalUnitPrice: import_zod8.z.string(),
|
|
850
870
|
finalUnitNetPrice: import_zod8.z.string(),
|
|
@@ -909,6 +929,10 @@ var orderAddressSchema = import_sdk_js_global_types5.addressSchema.extend({
|
|
|
909
929
|
city: import_zod8.z.string().min(1, "address.city.required"),
|
|
910
930
|
postalCode: import_zod8.z.string().min(1, "address.postalCode.required")
|
|
911
931
|
});
|
|
932
|
+
var readableOrderAddressSchema = orderAddressSchema.extend({
|
|
933
|
+
city: orderAddressSchema.shape.city.nullable(),
|
|
934
|
+
postalCode: orderAddressSchema.shape.postalCode.nullable()
|
|
935
|
+
});
|
|
912
936
|
var EMPTY_ORDER_CUSTOMER_INFO = {
|
|
913
937
|
firstName: null,
|
|
914
938
|
lastName: null,
|
|
@@ -954,6 +978,11 @@ var orderPaymentSummarySchema = import_zod8.z.object({
|
|
|
954
978
|
});
|
|
955
979
|
var orderBaseSchema = import_zod8.z.object({
|
|
956
980
|
id: import_zod8.z.string(),
|
|
981
|
+
// Required server-derived mutation/printing lock; never infer a missing capability as false.
|
|
982
|
+
migrationQuarantined: import_zod8.z.boolean(),
|
|
983
|
+
// Read-only recorded pricing facts; older API responses may omit both fields.
|
|
984
|
+
recordedPricing: import_zod8.z.boolean().optional(),
|
|
985
|
+
recordedCurrency: import_zod8.z.string().regex(/^[A-Z]{3}$/).nullable().optional(),
|
|
957
986
|
payment: import_sdk_js_payment.paymentNullableIriSchema,
|
|
958
987
|
paymentSummary: orderPaymentSummarySchema,
|
|
959
988
|
paymentMethod: import_sdk_js_payment.paymentMethodSchema.nullable(),
|
|
@@ -1017,7 +1046,10 @@ var normalizeCollectionOrderType = (value) => {
|
|
|
1017
1046
|
};
|
|
1018
1047
|
var deliveryOrderFieldsSchema = import_zod8.z.object({
|
|
1019
1048
|
type: import_zod8.z.literal("delivery"),
|
|
1020
|
-
address: import_zod8.z.preprocess(
|
|
1049
|
+
address: import_zod8.z.preprocess(
|
|
1050
|
+
normalizeEmptyPhpJsonStructureToNull,
|
|
1051
|
+
readableOrderAddressSchema.nullable()
|
|
1052
|
+
),
|
|
1021
1053
|
location: import_zod8.z.preprocess(normalizeEmptyPhpJsonStructureToNull, import_sdk_js_global_types5.locationSchema.nullable()),
|
|
1022
1054
|
requestedDeliveryTime: import_sdk_js_global_types5.datetimeSchema.nullable(),
|
|
1023
1055
|
finalDeliveryTime: import_sdk_js_global_types5.datetimeSchema.nullable(),
|
|
@@ -1041,7 +1073,10 @@ var collectionOrderFieldsSchema = import_zod8.z.object({
|
|
|
1041
1073
|
});
|
|
1042
1074
|
var kitchenOrderFieldsSchema = import_zod8.z.object({
|
|
1043
1075
|
type: import_zod8.z.literal("kitchen"),
|
|
1044
|
-
address: import_zod8.z.preprocess(
|
|
1076
|
+
address: import_zod8.z.preprocess(
|
|
1077
|
+
normalizeEmptyPhpJsonStructureToNull,
|
|
1078
|
+
readableOrderAddressSchema.nullable()
|
|
1079
|
+
),
|
|
1045
1080
|
location: import_zod8.z.preprocess(normalizeEmptyPhpJsonStructureToNull, import_sdk_js_global_types5.locationSchema.nullable()),
|
|
1046
1081
|
requestedDeliveryTime: import_sdk_js_global_types5.datetimeSchema.nullable(),
|
|
1047
1082
|
finalDeliveryTime: import_sdk_js_global_types5.datetimeSchema.nullable(),
|
|
@@ -3695,6 +3730,36 @@ var AdvanceOrderPreparationStatus = class extends import_sdk_js_core53.AbstractA
|
|
|
3695
3730
|
|
|
3696
3731
|
// src/requests/orders/CalculateOrderFees.ts
|
|
3697
3732
|
var import_sdk_js_core54 = require("@deliverart/sdk-js-core");
|
|
3733
|
+
|
|
3734
|
+
// src/requests/orders/fresh-owned-order-input.ts
|
|
3735
|
+
var import_sdk_js_global_types27 = require("@deliverart/sdk-js-global-types");
|
|
3736
|
+
function freshOwnedItem(item) {
|
|
3737
|
+
return {
|
|
3738
|
+
...item,
|
|
3739
|
+
removals: item.removals.map((menuItem) => ({ menuItem })),
|
|
3740
|
+
modifiers: item.modifiers.map((modifier) => ({
|
|
3741
|
+
...modifier,
|
|
3742
|
+
items: modifier.items.map(freshOwnedItem)
|
|
3743
|
+
}))
|
|
3744
|
+
};
|
|
3745
|
+
}
|
|
3746
|
+
var freshOwnedOrderInputSchema = writableOrderSchema.superRefine((order, context) => {
|
|
3747
|
+
const visit = (item, path) => {
|
|
3748
|
+
item.removals.forEach((reference, index) => {
|
|
3749
|
+
if (!(0, import_sdk_js_global_types27.matchesIriPattern)(reference.iri, "/menu_items/:id") || reference.iri !== `/menu_items/${reference.params.id}`) {
|
|
3750
|
+
context.addIssue({
|
|
3751
|
+
code: "custom",
|
|
3752
|
+
message: "Order removal selections must reference catalog menu items.",
|
|
3753
|
+
path: [...path, "removals", index]
|
|
3754
|
+
});
|
|
3755
|
+
}
|
|
3756
|
+
});
|
|
3757
|
+
item.modifiers.forEach((modifier, groupIndex) => modifier.items.forEach((child, childIndex) => visit(child, [...path, "modifiers", groupIndex, "items", childIndex])));
|
|
3758
|
+
};
|
|
3759
|
+
order.items.forEach((item, index) => visit(item, ["items", index]));
|
|
3760
|
+
}).transform((order) => ({ ...order, items: order.items.map(freshOwnedItem) }));
|
|
3761
|
+
|
|
3762
|
+
// src/requests/orders/CalculateOrderFees.ts
|
|
3698
3763
|
var calculateOrderFeesInputSchema = writableOrderSchema;
|
|
3699
3764
|
var calculateOrderFeesResponseSchema = feeSimulationSchema;
|
|
3700
3765
|
var CalculateOrderFees = class extends import_sdk_js_core54.AbstractApiRequest {
|
|
@@ -3703,7 +3768,7 @@ var CalculateOrderFees = class extends import_sdk_js_core54.AbstractApiRequest {
|
|
|
3703
3768
|
this.method = "POST";
|
|
3704
3769
|
this.contentType = "application/json";
|
|
3705
3770
|
this.accept = "application/json";
|
|
3706
|
-
this.inputSchema =
|
|
3771
|
+
this.inputSchema = freshOwnedOrderInputSchema;
|
|
3707
3772
|
this.outputSchema = calculateOrderFeesResponseSchema;
|
|
3708
3773
|
this.querySchema = void 0;
|
|
3709
3774
|
this.headersSchema = void 0;
|
|
@@ -3746,7 +3811,7 @@ var CreateOrder = class extends import_sdk_js_core56.AbstractApiRequest {
|
|
|
3746
3811
|
this.method = "POST";
|
|
3747
3812
|
this.contentType = "application/json";
|
|
3748
3813
|
this.accept = "application/json";
|
|
3749
|
-
this.inputSchema =
|
|
3814
|
+
this.inputSchema = freshOwnedOrderInputSchema;
|
|
3750
3815
|
this.outputSchema = createOrderResponseSchema;
|
|
3751
3816
|
this.querySchema = void 0;
|
|
3752
3817
|
this.headersSchema = void 0;
|
|
@@ -3758,10 +3823,10 @@ var CreateOrder = class extends import_sdk_js_core56.AbstractApiRequest {
|
|
|
3758
3823
|
|
|
3759
3824
|
// src/requests/orders/DeleteOrder.ts
|
|
3760
3825
|
var import_sdk_js_core57 = require("@deliverart/sdk-js-core");
|
|
3761
|
-
var
|
|
3826
|
+
var import_sdk_js_global_types28 = require("@deliverart/sdk-js-global-types");
|
|
3762
3827
|
var import_zod60 = require("zod");
|
|
3763
3828
|
var deleteOrderInputSchema = import_zod60.z.undefined();
|
|
3764
|
-
var deleteOrderResponseSchema =
|
|
3829
|
+
var deleteOrderResponseSchema = import_sdk_js_global_types28.emptyResponseSchema;
|
|
3765
3830
|
var DeleteOrder = class extends import_sdk_js_core57.AbstractApiRequest {
|
|
3766
3831
|
constructor(orderId) {
|
|
3767
3832
|
super(void 0);
|
|
@@ -3803,13 +3868,13 @@ var GenerateOrderBundle = class extends import_sdk_js_core58.AbstractApiRequest
|
|
|
3803
3868
|
|
|
3804
3869
|
// src/requests/orders/GetCustomerOrders.ts
|
|
3805
3870
|
var import_sdk_js_core59 = require("@deliverart/sdk-js-core");
|
|
3806
|
-
var
|
|
3871
|
+
var import_sdk_js_global_types29 = require("@deliverart/sdk-js-global-types");
|
|
3807
3872
|
var import_zod62 = require("zod");
|
|
3808
3873
|
var getCustomerOrdersQuerySchema = ordersQuerySchema.extend({
|
|
3809
3874
|
view: import_zod62.z.literal("buyer").optional()
|
|
3810
3875
|
});
|
|
3811
3876
|
var getCustomerOrdersInputSchema = import_zod62.z.undefined();
|
|
3812
|
-
var getCustomerOrdersResponseSchema = (0,
|
|
3877
|
+
var getCustomerOrdersResponseSchema = (0, import_sdk_js_global_types29.createPaginatedSchema)(orderSchema);
|
|
3813
3878
|
var GetCustomerOrders = class extends import_sdk_js_core59.AbstractApiRequest {
|
|
3814
3879
|
constructor(customerId, options) {
|
|
3815
3880
|
super(void 0, options);
|
|
@@ -3876,11 +3941,11 @@ var GetOrderRescheduleOptions = class extends import_sdk_js_core61.AbstractApiRe
|
|
|
3876
3941
|
|
|
3877
3942
|
// src/requests/orders/GetOrders.ts
|
|
3878
3943
|
var import_sdk_js_core62 = require("@deliverart/sdk-js-core");
|
|
3879
|
-
var
|
|
3944
|
+
var import_sdk_js_global_types30 = require("@deliverart/sdk-js-global-types");
|
|
3880
3945
|
var import_zod65 = require("zod");
|
|
3881
3946
|
var getOrdersQuerySchema = ordersQuerySchema;
|
|
3882
3947
|
var getOrdersInputSchema = import_zod65.z.undefined();
|
|
3883
|
-
var getOrdersResponseSchema = (0,
|
|
3948
|
+
var getOrdersResponseSchema = (0, import_sdk_js_global_types30.createPaginatedSchema)(orderSchema);
|
|
3884
3949
|
var GetOrders = class extends import_sdk_js_core62.AbstractApiRequest {
|
|
3885
3950
|
constructor(options) {
|
|
3886
3951
|
super(void 0, options);
|
|
@@ -3901,11 +3966,11 @@ var GetOrders = class extends import_sdk_js_core62.AbstractApiRequest {
|
|
|
3901
3966
|
|
|
3902
3967
|
// src/requests/orders/GetPointOfSaleOrders.ts
|
|
3903
3968
|
var import_sdk_js_core63 = require("@deliverart/sdk-js-core");
|
|
3904
|
-
var
|
|
3969
|
+
var import_sdk_js_global_types31 = require("@deliverart/sdk-js-global-types");
|
|
3905
3970
|
var import_zod66 = require("zod");
|
|
3906
3971
|
var getPointOfSaleOrdersQuerySchema = ordersQuerySchema;
|
|
3907
3972
|
var getPointOfSaleOrdersInputSchema = import_zod66.z.undefined();
|
|
3908
|
-
var getPointOfSaleOrdersResponseSchema = (0,
|
|
3973
|
+
var getPointOfSaleOrdersResponseSchema = (0, import_sdk_js_global_types31.createPaginatedSchema)(orderSchema);
|
|
3909
3974
|
var GetPointOfSaleOrders = class extends import_sdk_js_core63.AbstractApiRequest {
|
|
3910
3975
|
constructor(pointOfSaleId, options) {
|
|
3911
3976
|
super(void 0, options);
|
|
@@ -4041,7 +4106,7 @@ var UpdateOrder = class extends import_sdk_js_core68.AbstractApiRequest {
|
|
|
4041
4106
|
};
|
|
4042
4107
|
|
|
4043
4108
|
// src/index.ts
|
|
4044
|
-
var
|
|
4109
|
+
var import_sdk_js_global_types32 = require("@deliverart/sdk-js-global-types");
|
|
4045
4110
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4046
4111
|
0 && (module.exports = {
|
|
4047
4112
|
AcknowledgeKitchenAmendments,
|
|
@@ -4361,6 +4426,7 @@ var import_sdk_js_global_types31 = require("@deliverart/sdk-js-global-types");
|
|
|
4361
4426
|
recordOrderOfflineSettlementResponseSchema,
|
|
4362
4427
|
recordOrderReceiptInputSchema,
|
|
4363
4428
|
recordOrderReceiptResponseSchema,
|
|
4429
|
+
recordedOrderVariationSchema,
|
|
4364
4430
|
regularBundleDetailsSchema,
|
|
4365
4431
|
regularBundleSchema,
|
|
4366
4432
|
rejectOrderHeadersSchema,
|