@jsdev_ninja/core 0.13.15 → 0.13.16
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/core.cjs.js +1 -1
- package/dist/core.cjs.js.map +1 -1
- package/dist/core.es.js +167 -159
- package/dist/core.es.js.map +1 -1
- package/dist/core.umd.js +1 -1
- package/dist/core.umd.js.map +1 -1
- package/dist/entities/Order.d.ts +137 -0
- package/dist/entities/Order.d.ts.map +1 -1
- package/dist/entities/Order.js +2 -0
- package/dist/entities/Organization.d.ts +46 -0
- package/dist/entities/Organization.d.ts.map +1 -1
- package/dist/entities/Organization.js +5 -0
- package/lib/entities/Organization.ts +7 -0
- package/package.json +1 -1
package/dist/entities/Order.d.ts
CHANGED
|
@@ -843,6 +843,97 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
843
843
|
}>;
|
|
844
844
|
nameOnInvoice: z.ZodOptional<z.ZodString>;
|
|
845
845
|
clientComment: z.ZodOptional<z.ZodString>;
|
|
846
|
+
deliveryNote: z.ZodOptional<z.ZodObject<{
|
|
847
|
+
doc_uuid: z.ZodString;
|
|
848
|
+
pdf_link: z.ZodString;
|
|
849
|
+
pdf_link_copy: z.ZodString;
|
|
850
|
+
doc_number: z.ZodString;
|
|
851
|
+
sent_mails: z.ZodArray<z.ZodString, "many">;
|
|
852
|
+
success: z.ZodBoolean;
|
|
853
|
+
ua_uuid: z.ZodString;
|
|
854
|
+
calculatedData: z.ZodObject<{
|
|
855
|
+
_COMMENT: z.ZodOptional<z.ZodString>;
|
|
856
|
+
transaction_id: z.ZodString;
|
|
857
|
+
date: z.ZodString;
|
|
858
|
+
currency: z.ZodString;
|
|
859
|
+
rate: z.ZodNumber;
|
|
860
|
+
vat: z.ZodString;
|
|
861
|
+
vat_price: z.ZodNumber;
|
|
862
|
+
price_discount: z.ZodNumber;
|
|
863
|
+
price_discount_in_currency: z.ZodNumber;
|
|
864
|
+
price_total: z.ZodString;
|
|
865
|
+
price_total_in_currency: z.ZodNumber;
|
|
866
|
+
}, "strip", z.ZodTypeAny, {
|
|
867
|
+
date: string;
|
|
868
|
+
vat: string;
|
|
869
|
+
currency: string;
|
|
870
|
+
transaction_id: string;
|
|
871
|
+
rate: number;
|
|
872
|
+
vat_price: number;
|
|
873
|
+
price_discount: number;
|
|
874
|
+
price_discount_in_currency: number;
|
|
875
|
+
price_total: string;
|
|
876
|
+
price_total_in_currency: number;
|
|
877
|
+
_COMMENT?: string | undefined;
|
|
878
|
+
}, {
|
|
879
|
+
date: string;
|
|
880
|
+
vat: string;
|
|
881
|
+
currency: string;
|
|
882
|
+
transaction_id: string;
|
|
883
|
+
rate: number;
|
|
884
|
+
vat_price: number;
|
|
885
|
+
price_discount: number;
|
|
886
|
+
price_discount_in_currency: number;
|
|
887
|
+
price_total: string;
|
|
888
|
+
price_total_in_currency: number;
|
|
889
|
+
_COMMENT?: string | undefined;
|
|
890
|
+
}>;
|
|
891
|
+
warning: z.ZodOptional<z.ZodString>;
|
|
892
|
+
}, "strip", z.ZodTypeAny, {
|
|
893
|
+
doc_uuid: string;
|
|
894
|
+
pdf_link: string;
|
|
895
|
+
pdf_link_copy: string;
|
|
896
|
+
doc_number: string;
|
|
897
|
+
sent_mails: string[];
|
|
898
|
+
success: boolean;
|
|
899
|
+
ua_uuid: string;
|
|
900
|
+
calculatedData: {
|
|
901
|
+
date: string;
|
|
902
|
+
vat: string;
|
|
903
|
+
currency: string;
|
|
904
|
+
transaction_id: string;
|
|
905
|
+
rate: number;
|
|
906
|
+
vat_price: number;
|
|
907
|
+
price_discount: number;
|
|
908
|
+
price_discount_in_currency: number;
|
|
909
|
+
price_total: string;
|
|
910
|
+
price_total_in_currency: number;
|
|
911
|
+
_COMMENT?: string | undefined;
|
|
912
|
+
};
|
|
913
|
+
warning?: string | undefined;
|
|
914
|
+
}, {
|
|
915
|
+
doc_uuid: string;
|
|
916
|
+
pdf_link: string;
|
|
917
|
+
pdf_link_copy: string;
|
|
918
|
+
doc_number: string;
|
|
919
|
+
sent_mails: string[];
|
|
920
|
+
success: boolean;
|
|
921
|
+
ua_uuid: string;
|
|
922
|
+
calculatedData: {
|
|
923
|
+
date: string;
|
|
924
|
+
vat: string;
|
|
925
|
+
currency: string;
|
|
926
|
+
transaction_id: string;
|
|
927
|
+
rate: number;
|
|
928
|
+
vat_price: number;
|
|
929
|
+
price_discount: number;
|
|
930
|
+
price_discount_in_currency: number;
|
|
931
|
+
price_total: string;
|
|
932
|
+
price_total_in_currency: number;
|
|
933
|
+
_COMMENT?: string | undefined;
|
|
934
|
+
};
|
|
935
|
+
warning?: string | undefined;
|
|
936
|
+
}>>;
|
|
846
937
|
}, "strip", z.ZodTypeAny, {
|
|
847
938
|
type: "Order";
|
|
848
939
|
status: "draft" | "completed" | "pending" | "processing" | "in_delivery" | "delivered" | "cancelled" | "refunded";
|
|
@@ -983,6 +1074,29 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
983
1074
|
actualAmount?: number | undefined;
|
|
984
1075
|
nameOnInvoice?: string | undefined;
|
|
985
1076
|
clientComment?: string | undefined;
|
|
1077
|
+
deliveryNote?: {
|
|
1078
|
+
doc_uuid: string;
|
|
1079
|
+
pdf_link: string;
|
|
1080
|
+
pdf_link_copy: string;
|
|
1081
|
+
doc_number: string;
|
|
1082
|
+
sent_mails: string[];
|
|
1083
|
+
success: boolean;
|
|
1084
|
+
ua_uuid: string;
|
|
1085
|
+
calculatedData: {
|
|
1086
|
+
date: string;
|
|
1087
|
+
vat: string;
|
|
1088
|
+
currency: string;
|
|
1089
|
+
transaction_id: string;
|
|
1090
|
+
rate: number;
|
|
1091
|
+
vat_price: number;
|
|
1092
|
+
price_discount: number;
|
|
1093
|
+
price_discount_in_currency: number;
|
|
1094
|
+
price_total: string;
|
|
1095
|
+
price_total_in_currency: number;
|
|
1096
|
+
_COMMENT?: string | undefined;
|
|
1097
|
+
};
|
|
1098
|
+
warning?: string | undefined;
|
|
1099
|
+
} | undefined;
|
|
986
1100
|
}, {
|
|
987
1101
|
type: "Order";
|
|
988
1102
|
status: "draft" | "completed" | "pending" | "processing" | "in_delivery" | "delivered" | "cancelled" | "refunded";
|
|
@@ -1123,6 +1237,29 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
1123
1237
|
actualAmount?: number | undefined;
|
|
1124
1238
|
nameOnInvoice?: string | undefined;
|
|
1125
1239
|
clientComment?: string | undefined;
|
|
1240
|
+
deliveryNote?: {
|
|
1241
|
+
doc_uuid: string;
|
|
1242
|
+
pdf_link: string;
|
|
1243
|
+
pdf_link_copy: string;
|
|
1244
|
+
doc_number: string;
|
|
1245
|
+
sent_mails: string[];
|
|
1246
|
+
success: boolean;
|
|
1247
|
+
ua_uuid: string;
|
|
1248
|
+
calculatedData: {
|
|
1249
|
+
date: string;
|
|
1250
|
+
vat: string;
|
|
1251
|
+
currency: string;
|
|
1252
|
+
transaction_id: string;
|
|
1253
|
+
rate: number;
|
|
1254
|
+
vat_price: number;
|
|
1255
|
+
price_discount: number;
|
|
1256
|
+
price_discount_in_currency: number;
|
|
1257
|
+
price_total: string;
|
|
1258
|
+
price_total_in_currency: number;
|
|
1259
|
+
_COMMENT?: string | undefined;
|
|
1260
|
+
};
|
|
1261
|
+
warning?: string | undefined;
|
|
1262
|
+
} | undefined;
|
|
1126
1263
|
}>;
|
|
1127
1264
|
export type TOrder = z.infer<typeof OrderSchema>;
|
|
1128
1265
|
//# sourceMappingURL=Order.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Order.d.ts","sourceRoot":"","sources":["../../lib/entities/Order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"Order.d.ts","sourceRoot":"","sources":["../../lib/entities/Order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCtB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
|
package/dist/entities/Order.js
CHANGED
|
@@ -2,6 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { ProfileSchema } from "./Profile";
|
|
3
3
|
import { notEmptyTextSchema } from "./Atoms";
|
|
4
4
|
import { CartItemProductSchema } from "./Cart";
|
|
5
|
+
import { DeliveryNoteSchema } from "./DeliveryNote";
|
|
5
6
|
// pending - order created / by user
|
|
6
7
|
// processing order accepted by store by admin
|
|
7
8
|
// delivered - order delivered by admin
|
|
@@ -40,4 +41,5 @@ export const OrderSchema = z.object({
|
|
|
40
41
|
client: ProfileSchema.required({}),
|
|
41
42
|
nameOnInvoice: z.string().optional(),
|
|
42
43
|
clientComment: z.string().optional(),
|
|
44
|
+
deliveryNote: DeliveryNoteSchema.optional(),
|
|
43
45
|
});
|
|
@@ -4,14 +4,37 @@ export declare const OrganizationSchema: z.ZodObject<{
|
|
|
4
4
|
name: z.ZodString;
|
|
5
5
|
discountPercentage: z.ZodOptional<z.ZodNumber>;
|
|
6
6
|
nameOnInvoice: z.ZodOptional<z.ZodString>;
|
|
7
|
+
billingAccounts: z.ZodArray<z.ZodObject<{
|
|
8
|
+
number: z.ZodString;
|
|
9
|
+
name: z.ZodString;
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
number: string;
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
}, {
|
|
16
|
+
number: string;
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
}>, "many">;
|
|
7
20
|
}, "strip", z.ZodTypeAny, {
|
|
8
21
|
id: string;
|
|
9
22
|
name: string;
|
|
23
|
+
billingAccounts: {
|
|
24
|
+
number: string;
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
}[];
|
|
10
28
|
nameOnInvoice?: string | undefined;
|
|
11
29
|
discountPercentage?: number | undefined;
|
|
12
30
|
}, {
|
|
13
31
|
id: string;
|
|
14
32
|
name: string;
|
|
33
|
+
billingAccounts: {
|
|
34
|
+
number: string;
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
}[];
|
|
15
38
|
nameOnInvoice?: string | undefined;
|
|
16
39
|
discountPercentage?: number | undefined;
|
|
17
40
|
}>;
|
|
@@ -20,12 +43,35 @@ export declare const NewOrganizationSchema: z.ZodObject<Omit<{
|
|
|
20
43
|
name: z.ZodString;
|
|
21
44
|
discountPercentage: z.ZodOptional<z.ZodNumber>;
|
|
22
45
|
nameOnInvoice: z.ZodOptional<z.ZodString>;
|
|
46
|
+
billingAccounts: z.ZodArray<z.ZodObject<{
|
|
47
|
+
number: z.ZodString;
|
|
48
|
+
name: z.ZodString;
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
number: string;
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
}, {
|
|
55
|
+
number: string;
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
}>, "many">;
|
|
23
59
|
}, "id">, "strip", z.ZodTypeAny, {
|
|
24
60
|
name: string;
|
|
61
|
+
billingAccounts: {
|
|
62
|
+
number: string;
|
|
63
|
+
id: string;
|
|
64
|
+
name: string;
|
|
65
|
+
}[];
|
|
25
66
|
nameOnInvoice?: string | undefined;
|
|
26
67
|
discountPercentage?: number | undefined;
|
|
27
68
|
}, {
|
|
28
69
|
name: string;
|
|
70
|
+
billingAccounts: {
|
|
71
|
+
number: string;
|
|
72
|
+
id: string;
|
|
73
|
+
name: string;
|
|
74
|
+
}[];
|
|
29
75
|
nameOnInvoice?: string | undefined;
|
|
30
76
|
discountPercentage?: number | undefined;
|
|
31
77
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Organization.d.ts","sourceRoot":"","sources":["../../lib/entities/Organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"Organization.d.ts","sourceRoot":"","sources":["../../lib/entities/Organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAY7B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAwC,CAAC;AAE3E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACrE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -5,5 +5,10 @@ export const OrganizationSchema = z.object({
|
|
|
5
5
|
name: z.string(),
|
|
6
6
|
discountPercentage: z.number().positive().min(0).max(100).optional(),
|
|
7
7
|
nameOnInvoice: z.string().optional(),
|
|
8
|
+
billingAccounts: z.array(z.object({
|
|
9
|
+
number: z.string(),
|
|
10
|
+
name: z.string(),
|
|
11
|
+
id: z.string(),
|
|
12
|
+
})),
|
|
8
13
|
});
|
|
9
14
|
export const NewOrganizationSchema = OrganizationSchema.omit({ id: true });
|
|
@@ -6,6 +6,13 @@ export const OrganizationSchema = z.object({
|
|
|
6
6
|
name: z.string(),
|
|
7
7
|
discountPercentage: z.number().positive().min(0).max(100).optional(),
|
|
8
8
|
nameOnInvoice: z.string().optional(),
|
|
9
|
+
billingAccounts: z.array(
|
|
10
|
+
z.object({
|
|
11
|
+
number: z.string(),
|
|
12
|
+
name: z.string(),
|
|
13
|
+
id: z.string(),
|
|
14
|
+
})
|
|
15
|
+
),
|
|
9
16
|
});
|
|
10
17
|
|
|
11
18
|
export const NewOrganizationSchema = OrganizationSchema.omit({ id: true });
|