washday-sdk 1.6.78 → 1.6.80
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/api/index.js +15 -0
- package/dist/api/invoiceModule/delete.js +24 -0
- package/dist/api/invoiceModule/get.js +133 -0
- package/dist/api/invoiceModule/index.js +3 -0
- package/dist/api/invoiceModule/post.js +66 -0
- package/dist/index.js +1 -0
- package/dist/interfaces/InvoiceModule.js +1 -0
- package/package.json +1 -1
- package/src/api/index.ts +17 -0
- package/src/api/invoiceModule/delete.ts +19 -0
- package/src/api/invoiceModule/get.ts +118 -0
- package/src/api/invoiceModule/index.ts +3 -0
- package/src/api/invoiceModule/post.ts +65 -0
- package/src/api/routes/get.ts +61 -0
- package/src/index.ts +1 -0
- package/src/interfaces/Api.ts +17 -0
- package/src/interfaces/Company.ts +27 -0
- package/src/interfaces/InvoiceModule.ts +135 -0
- package/src/interfaces/Product.ts +16 -0
- package/test/api/invoiceModule.test.ts +206 -0
- package/test/routes.multistore.test.ts +61 -1
- package/tsconfig.json +1 -1
- package/dist/interfaces/Company.garmentAttributeCatalogs.test.js +0 -21
- package/dist/interfaces/Product.description.test.js +0 -37
- package/dist/interfaces/Store.ticketStructurePresets.test.js +0 -73
- package/dist/interfaces/StoreReceptionValidation.contract.test.js +0 -62
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
var _a, _b, _c;
|
|
2
|
-
import { OrderStatusEnum } from "../index";
|
|
3
|
-
const updatePayload = {
|
|
4
|
-
notes: "Peso confirmado en sucursal",
|
|
5
|
-
updateMode: "store_reception_validation",
|
|
6
|
-
};
|
|
7
|
-
const order = {
|
|
8
|
-
status: OrderStatusEnum.PENDING_STORE_RECEPTION_VALIDATION,
|
|
9
|
-
storeReceptionValidation: {
|
|
10
|
-
validatedAt: "2026-06-01T18:00:00.000Z",
|
|
11
|
-
validatedBy: "user-1",
|
|
12
|
-
source: "store_reception",
|
|
13
|
-
notes: "Validado en mostrador",
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
const permission = {
|
|
17
|
-
validateStoreReception: {
|
|
18
|
-
canMutate: true,
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
const store = {
|
|
22
|
-
storeReceptionValidationConfig: {
|
|
23
|
-
enabled: true,
|
|
24
|
-
restrictCloseRouteUntilStoreValidation: false,
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
const preview = {
|
|
28
|
-
routeId: "route-1",
|
|
29
|
-
canClose: true,
|
|
30
|
-
summary: {
|
|
31
|
-
confirmed: 0,
|
|
32
|
-
failed: 0,
|
|
33
|
-
cancelled: 0,
|
|
34
|
-
pendingActive: 0,
|
|
35
|
-
},
|
|
36
|
-
pendingActiveOrders: [],
|
|
37
|
-
requiresExplicitConfirmation: false,
|
|
38
|
-
hasPendingStoreReceptionValidations: true,
|
|
39
|
-
pendingStoreReceptionValidationOrdersCount: 1,
|
|
40
|
-
restrictCloseRouteUntilStoreValidation: false,
|
|
41
|
-
warnings: [
|
|
42
|
-
"Esta ruta tiene pedidos pendientes de validar en sucursal.",
|
|
43
|
-
],
|
|
44
|
-
};
|
|
45
|
-
if (OrderStatusEnum.PENDING_STORE_RECEPTION_VALIDATION !== "pending_store_reception_validation") {
|
|
46
|
-
throw new Error("Pending store reception validation order status is not exported");
|
|
47
|
-
}
|
|
48
|
-
if (updatePayload.updateMode !== "store_reception_validation") {
|
|
49
|
-
throw new Error("Store reception validation update mode is not accepted");
|
|
50
|
-
}
|
|
51
|
-
if (((_a = order.storeReceptionValidation) === null || _a === void 0 ? void 0 : _a.source) !== "store_reception") {
|
|
52
|
-
throw new Error("Order store reception validation source was not preserved");
|
|
53
|
-
}
|
|
54
|
-
if (((_b = permission.validateStoreReception) === null || _b === void 0 ? void 0 : _b.canMutate) !== true) {
|
|
55
|
-
throw new Error("Validate store reception permission was not preserved");
|
|
56
|
-
}
|
|
57
|
-
if (((_c = store.storeReceptionValidationConfig) === null || _c === void 0 ? void 0 : _c.enabled) !== true) {
|
|
58
|
-
throw new Error("Store reception validation config was not preserved");
|
|
59
|
-
}
|
|
60
|
-
if (preview.pendingStoreReceptionValidationOrdersCount !== 1) {
|
|
61
|
-
throw new Error("Route close preview pending validation count was not preserved");
|
|
62
|
-
}
|