@jsdev_ninja/core 0.13.33 → 0.13.48

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.
@@ -57,6 +57,7 @@ export declare const OrganizationSchema: z.ZodObject<{
57
57
  apartmentEnterNumber?: string | undefined;
58
58
  apartmentNumber?: string | undefined;
59
59
  }>>;
60
+ groupId: z.ZodOptional<z.ZodString>;
60
61
  }, "strip", z.ZodTypeAny, {
61
62
  id: string;
62
63
  name: string;
@@ -78,6 +79,7 @@ export declare const OrganizationSchema: z.ZodObject<{
78
79
  discountPercentage?: number | undefined;
79
80
  nameOnInvoice?: string | undefined;
80
81
  companyNumber?: string | undefined;
82
+ groupId?: string | undefined;
81
83
  }, {
82
84
  id: string;
83
85
  name: string;
@@ -99,6 +101,7 @@ export declare const OrganizationSchema: z.ZodObject<{
99
101
  discountPercentage?: number | undefined;
100
102
  nameOnInvoice?: string | undefined;
101
103
  companyNumber?: string | undefined;
104
+ groupId?: string | undefined;
102
105
  }>;
103
106
  export declare const NewOrganizationSchema: z.ZodObject<Omit<{
104
107
  id: z.ZodString;
@@ -145,6 +148,7 @@ export declare const NewOrganizationSchema: z.ZodObject<Omit<{
145
148
  apartmentEnterNumber?: string | undefined;
146
149
  apartmentNumber?: string | undefined;
147
150
  }>>;
151
+ groupId: z.ZodOptional<z.ZodString>;
148
152
  }, "id">, "strip", z.ZodTypeAny, {
149
153
  name: string;
150
154
  paymentType: "none" | "external" | "j5";
@@ -165,6 +169,7 @@ export declare const NewOrganizationSchema: z.ZodObject<Omit<{
165
169
  discountPercentage?: number | undefined;
166
170
  nameOnInvoice?: string | undefined;
167
171
  companyNumber?: string | undefined;
172
+ groupId?: string | undefined;
168
173
  }, {
169
174
  name: string;
170
175
  paymentType: "none" | "external" | "j5";
@@ -185,6 +190,7 @@ export declare const NewOrganizationSchema: z.ZodObject<Omit<{
185
190
  discountPercentage?: number | undefined;
186
191
  nameOnInvoice?: string | undefined;
187
192
  companyNumber?: string | undefined;
193
+ groupId?: string | undefined;
188
194
  }>;
189
195
  export type TBillingAccount = z.infer<typeof BillingAccountSchema>;
190
196
  export type TNewOrganization = z.infer<typeof NewOrganizationSchema>;
@@ -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;AAIxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAGH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS7B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAwC,CAAC;AAE3E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACnE,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"}
1
+ {"version":3,"file":"Organization.d.ts","sourceRoot":"","sources":["../../../lib/entities/Organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AAGH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU7B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAwC,CAAC;AAE3E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACnE,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"}
@@ -16,5 +16,6 @@ export const OrganizationSchema = z.object({
16
16
  paymentType: PaymentTypeSchema,
17
17
  companyNumber: z.string().optional(),
18
18
  address: AddressSchema.optional(),
19
+ groupId: z.string().optional(),
19
20
  });
20
21
  export const NewOrganizationSchema = OrganizationSchema.omit({ id: true });
@@ -0,0 +1,22 @@
1
+ import { z } from "zod";
2
+ export declare const OrganizationGroupSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ name: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ id: string;
7
+ name: string;
8
+ }, {
9
+ id: string;
10
+ name: string;
11
+ }>;
12
+ export declare const NewOrganizationGroupSchema: z.ZodObject<Omit<{
13
+ id: z.ZodString;
14
+ name: z.ZodString;
15
+ }, "id">, "strip", z.ZodTypeAny, {
16
+ name: string;
17
+ }, {
18
+ name: string;
19
+ }>;
20
+ export type TNewOrganizationGroup = z.infer<typeof NewOrganizationGroupSchema>;
21
+ export type TOrganizationGroup = z.infer<typeof OrganizationGroupSchema>;
22
+ //# sourceMappingURL=OrganizationGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrganizationGroup.d.ts","sourceRoot":"","sources":["../../../lib/entities/OrganizationGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,uBAAuB;;;;;;;;;EAGlC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;EAA6C,CAAC;AAErF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC/E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { z } from "zod";
2
+ // client organization for clients
3
+ export const OrganizationGroupSchema = z.object({
4
+ id: z.string(),
5
+ name: z.string(),
6
+ });
7
+ export const NewOrganizationGroupSchema = OrganizationGroupSchema.omit({ id: true });
@@ -0,0 +1,34 @@
1
+ import { z } from "zod";
2
+ export declare const SupplierSchema: z.ZodObject<{
3
+ type: z.ZodLiteral<"Supplier">;
4
+ id: z.ZodString;
5
+ name: z.ZodString;
6
+ code: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ code: string;
9
+ type: "Supplier";
10
+ id: string;
11
+ name: string;
12
+ }, {
13
+ code: string;
14
+ type: "Supplier";
15
+ id: string;
16
+ name: string;
17
+ }>;
18
+ export declare const NewSupplierSchema: z.ZodObject<Omit<{
19
+ type: z.ZodLiteral<"Supplier">;
20
+ id: z.ZodString;
21
+ name: z.ZodString;
22
+ code: z.ZodString;
23
+ }, "id">, "strip", z.ZodTypeAny, {
24
+ code: string;
25
+ type: "Supplier";
26
+ name: string;
27
+ }, {
28
+ code: string;
29
+ type: "Supplier";
30
+ name: string;
31
+ }>;
32
+ export type TNewSupplier = z.infer<typeof NewSupplierSchema>;
33
+ export type TSupplier = z.infer<typeof SupplierSchema>;
34
+ //# sourceMappingURL=Supplier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Supplier.d.ts","sourceRoot":"","sources":["../../../lib/entities/Supplier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAKzB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;EAAoC,CAAC;AAEnE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC7D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { z } from "zod";
2
+ export const SupplierSchema = z.object({
3
+ type: z.literal("Supplier"),
4
+ id: z.string(),
5
+ name: z.string(),
6
+ code: z.string(), // supplier code number
7
+ });
8
+ export const NewSupplierSchema = SupplierSchema.omit({ id: true });
@@ -0,0 +1,378 @@
1
+ import { z } from "zod";
2
+ export declare const SupplierInvoiceSchema: z.ZodObject<{
3
+ type: z.ZodLiteral<"SupplierInvoice">;
4
+ id: z.ZodString;
5
+ supplier: z.ZodObject<{
6
+ type: z.ZodLiteral<"Supplier">;
7
+ id: z.ZodString;
8
+ name: z.ZodString;
9
+ code: z.ZodString;
10
+ }, "strip", z.ZodTypeAny, {
11
+ code: string;
12
+ type: "Supplier";
13
+ id: string;
14
+ name: string;
15
+ }, {
16
+ code: string;
17
+ type: "Supplier";
18
+ id: string;
19
+ name: string;
20
+ }>;
21
+ invoiceNumber: z.ZodString;
22
+ date: z.ZodNumber;
23
+ rows: z.ZodArray<z.ZodObject<{
24
+ id: z.ZodString;
25
+ rowNumber: z.ZodNumber;
26
+ sku: z.ZodString;
27
+ itemName: z.ZodString;
28
+ quantity: z.ZodNumber;
29
+ purchasePrice: z.ZodNumber;
30
+ lineDiscount: z.ZodNumber;
31
+ profitPercentage: z.ZodNumber;
32
+ price: z.ZodNumber;
33
+ totalPurchasePrice: z.ZodNumber;
34
+ vat: z.ZodBoolean;
35
+ originalProduct: z.ZodOptional<z.ZodObject<{
36
+ purchasePrice: z.ZodNumber;
37
+ price: z.ZodNumber;
38
+ profitPercentage: z.ZodNumber;
39
+ }, "strip", z.ZodTypeAny, {
40
+ price: number;
41
+ purchasePrice: number;
42
+ profitPercentage: number;
43
+ }, {
44
+ price: number;
45
+ purchasePrice: number;
46
+ profitPercentage: number;
47
+ }>>;
48
+ }, "strip", z.ZodTypeAny, {
49
+ id: string;
50
+ sku: string;
51
+ vat: boolean;
52
+ price: number;
53
+ purchasePrice: number;
54
+ profitPercentage: number;
55
+ quantity: number;
56
+ rowNumber: number;
57
+ itemName: string;
58
+ lineDiscount: number;
59
+ totalPurchasePrice: number;
60
+ originalProduct?: {
61
+ price: number;
62
+ purchasePrice: number;
63
+ profitPercentage: number;
64
+ } | undefined;
65
+ }, {
66
+ id: string;
67
+ sku: string;
68
+ vat: boolean;
69
+ price: number;
70
+ purchasePrice: number;
71
+ profitPercentage: number;
72
+ quantity: number;
73
+ rowNumber: number;
74
+ itemName: string;
75
+ lineDiscount: number;
76
+ totalPurchasePrice: number;
77
+ originalProduct?: {
78
+ price: number;
79
+ purchasePrice: number;
80
+ profitPercentage: number;
81
+ } | undefined;
82
+ }>, "many">;
83
+ productsToUpdate: z.ZodArray<z.ZodObject<{
84
+ sku: z.ZodString;
85
+ itemName: z.ZodString;
86
+ oldPurchasePrice: z.ZodNumber;
87
+ newPurchasePrice: z.ZodNumber;
88
+ oldPrice: z.ZodNumber;
89
+ newPrice: z.ZodNumber;
90
+ oldProfitPercentage: z.ZodNumber;
91
+ newProfitPercentage: z.ZodNumber;
92
+ }, "strip", z.ZodTypeAny, {
93
+ sku: string;
94
+ itemName: string;
95
+ oldPurchasePrice: number;
96
+ newPurchasePrice: number;
97
+ oldPrice: number;
98
+ newPrice: number;
99
+ oldProfitPercentage: number;
100
+ newProfitPercentage: number;
101
+ }, {
102
+ sku: string;
103
+ itemName: string;
104
+ oldPurchasePrice: number;
105
+ newPurchasePrice: number;
106
+ oldPrice: number;
107
+ newPrice: number;
108
+ oldProfitPercentage: number;
109
+ newProfitPercentage: number;
110
+ }>, "many">;
111
+ }, "strip", z.ZodTypeAny, {
112
+ type: "SupplierInvoice";
113
+ id: string;
114
+ date: number;
115
+ supplier: {
116
+ code: string;
117
+ type: "Supplier";
118
+ id: string;
119
+ name: string;
120
+ };
121
+ invoiceNumber: string;
122
+ rows: {
123
+ id: string;
124
+ sku: string;
125
+ vat: boolean;
126
+ price: number;
127
+ purchasePrice: number;
128
+ profitPercentage: number;
129
+ quantity: number;
130
+ rowNumber: number;
131
+ itemName: string;
132
+ lineDiscount: number;
133
+ totalPurchasePrice: number;
134
+ originalProduct?: {
135
+ price: number;
136
+ purchasePrice: number;
137
+ profitPercentage: number;
138
+ } | undefined;
139
+ }[];
140
+ productsToUpdate: {
141
+ sku: string;
142
+ itemName: string;
143
+ oldPurchasePrice: number;
144
+ newPurchasePrice: number;
145
+ oldPrice: number;
146
+ newPrice: number;
147
+ oldProfitPercentage: number;
148
+ newProfitPercentage: number;
149
+ }[];
150
+ }, {
151
+ type: "SupplierInvoice";
152
+ id: string;
153
+ date: number;
154
+ supplier: {
155
+ code: string;
156
+ type: "Supplier";
157
+ id: string;
158
+ name: string;
159
+ };
160
+ invoiceNumber: string;
161
+ rows: {
162
+ id: string;
163
+ sku: string;
164
+ vat: boolean;
165
+ price: number;
166
+ purchasePrice: number;
167
+ profitPercentage: number;
168
+ quantity: number;
169
+ rowNumber: number;
170
+ itemName: string;
171
+ lineDiscount: number;
172
+ totalPurchasePrice: number;
173
+ originalProduct?: {
174
+ price: number;
175
+ purchasePrice: number;
176
+ profitPercentage: number;
177
+ } | undefined;
178
+ }[];
179
+ productsToUpdate: {
180
+ sku: string;
181
+ itemName: string;
182
+ oldPurchasePrice: number;
183
+ newPurchasePrice: number;
184
+ oldPrice: number;
185
+ newPrice: number;
186
+ oldProfitPercentage: number;
187
+ newProfitPercentage: number;
188
+ }[];
189
+ }>;
190
+ export declare const NewSupplierInvoiceSchema: z.ZodObject<Omit<{
191
+ type: z.ZodLiteral<"SupplierInvoice">;
192
+ id: z.ZodString;
193
+ supplier: z.ZodObject<{
194
+ type: z.ZodLiteral<"Supplier">;
195
+ id: z.ZodString;
196
+ name: z.ZodString;
197
+ code: z.ZodString;
198
+ }, "strip", z.ZodTypeAny, {
199
+ code: string;
200
+ type: "Supplier";
201
+ id: string;
202
+ name: string;
203
+ }, {
204
+ code: string;
205
+ type: "Supplier";
206
+ id: string;
207
+ name: string;
208
+ }>;
209
+ invoiceNumber: z.ZodString;
210
+ date: z.ZodNumber;
211
+ rows: z.ZodArray<z.ZodObject<{
212
+ id: z.ZodString;
213
+ rowNumber: z.ZodNumber;
214
+ sku: z.ZodString;
215
+ itemName: z.ZodString;
216
+ quantity: z.ZodNumber;
217
+ purchasePrice: z.ZodNumber;
218
+ lineDiscount: z.ZodNumber;
219
+ profitPercentage: z.ZodNumber;
220
+ price: z.ZodNumber;
221
+ totalPurchasePrice: z.ZodNumber;
222
+ vat: z.ZodBoolean;
223
+ originalProduct: z.ZodOptional<z.ZodObject<{
224
+ purchasePrice: z.ZodNumber;
225
+ price: z.ZodNumber;
226
+ profitPercentage: z.ZodNumber;
227
+ }, "strip", z.ZodTypeAny, {
228
+ price: number;
229
+ purchasePrice: number;
230
+ profitPercentage: number;
231
+ }, {
232
+ price: number;
233
+ purchasePrice: number;
234
+ profitPercentage: number;
235
+ }>>;
236
+ }, "strip", z.ZodTypeAny, {
237
+ id: string;
238
+ sku: string;
239
+ vat: boolean;
240
+ price: number;
241
+ purchasePrice: number;
242
+ profitPercentage: number;
243
+ quantity: number;
244
+ rowNumber: number;
245
+ itemName: string;
246
+ lineDiscount: number;
247
+ totalPurchasePrice: number;
248
+ originalProduct?: {
249
+ price: number;
250
+ purchasePrice: number;
251
+ profitPercentage: number;
252
+ } | undefined;
253
+ }, {
254
+ id: string;
255
+ sku: string;
256
+ vat: boolean;
257
+ price: number;
258
+ purchasePrice: number;
259
+ profitPercentage: number;
260
+ quantity: number;
261
+ rowNumber: number;
262
+ itemName: string;
263
+ lineDiscount: number;
264
+ totalPurchasePrice: number;
265
+ originalProduct?: {
266
+ price: number;
267
+ purchasePrice: number;
268
+ profitPercentage: number;
269
+ } | undefined;
270
+ }>, "many">;
271
+ productsToUpdate: z.ZodArray<z.ZodObject<{
272
+ sku: z.ZodString;
273
+ itemName: z.ZodString;
274
+ oldPurchasePrice: z.ZodNumber;
275
+ newPurchasePrice: z.ZodNumber;
276
+ oldPrice: z.ZodNumber;
277
+ newPrice: z.ZodNumber;
278
+ oldProfitPercentage: z.ZodNumber;
279
+ newProfitPercentage: z.ZodNumber;
280
+ }, "strip", z.ZodTypeAny, {
281
+ sku: string;
282
+ itemName: string;
283
+ oldPurchasePrice: number;
284
+ newPurchasePrice: number;
285
+ oldPrice: number;
286
+ newPrice: number;
287
+ oldProfitPercentage: number;
288
+ newProfitPercentage: number;
289
+ }, {
290
+ sku: string;
291
+ itemName: string;
292
+ oldPurchasePrice: number;
293
+ newPurchasePrice: number;
294
+ oldPrice: number;
295
+ newPrice: number;
296
+ oldProfitPercentage: number;
297
+ newProfitPercentage: number;
298
+ }>, "many">;
299
+ }, "id">, "strip", z.ZodTypeAny, {
300
+ type: "SupplierInvoice";
301
+ date: number;
302
+ supplier: {
303
+ code: string;
304
+ type: "Supplier";
305
+ id: string;
306
+ name: string;
307
+ };
308
+ invoiceNumber: string;
309
+ rows: {
310
+ id: string;
311
+ sku: string;
312
+ vat: boolean;
313
+ price: number;
314
+ purchasePrice: number;
315
+ profitPercentage: number;
316
+ quantity: number;
317
+ rowNumber: number;
318
+ itemName: string;
319
+ lineDiscount: number;
320
+ totalPurchasePrice: number;
321
+ originalProduct?: {
322
+ price: number;
323
+ purchasePrice: number;
324
+ profitPercentage: number;
325
+ } | undefined;
326
+ }[];
327
+ productsToUpdate: {
328
+ sku: string;
329
+ itemName: string;
330
+ oldPurchasePrice: number;
331
+ newPurchasePrice: number;
332
+ oldPrice: number;
333
+ newPrice: number;
334
+ oldProfitPercentage: number;
335
+ newProfitPercentage: number;
336
+ }[];
337
+ }, {
338
+ type: "SupplierInvoice";
339
+ date: number;
340
+ supplier: {
341
+ code: string;
342
+ type: "Supplier";
343
+ id: string;
344
+ name: string;
345
+ };
346
+ invoiceNumber: string;
347
+ rows: {
348
+ id: string;
349
+ sku: string;
350
+ vat: boolean;
351
+ price: number;
352
+ purchasePrice: number;
353
+ profitPercentage: number;
354
+ quantity: number;
355
+ rowNumber: number;
356
+ itemName: string;
357
+ lineDiscount: number;
358
+ totalPurchasePrice: number;
359
+ originalProduct?: {
360
+ price: number;
361
+ purchasePrice: number;
362
+ profitPercentage: number;
363
+ } | undefined;
364
+ }[];
365
+ productsToUpdate: {
366
+ sku: string;
367
+ itemName: string;
368
+ oldPurchasePrice: number;
369
+ newPurchasePrice: number;
370
+ oldPrice: number;
371
+ newPrice: number;
372
+ oldProfitPercentage: number;
373
+ newProfitPercentage: number;
374
+ }[];
375
+ }>;
376
+ export type TNewSupplierInvoice = z.infer<typeof NewSupplierInvoiceSchema>;
377
+ export type TSupplierInvoice = z.infer<typeof SupplierInvoiceSchema>;
378
+ //# sourceMappingURL=SupplierInvoice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SupplierInvoice.d.ts","sourceRoot":"","sources":["../../../lib/entities/SupplierInvoice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwChC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA2C,CAAC;AAEjF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC3E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { z } from "zod";
2
+ import { SupplierSchema } from "./Supplier";
3
+ export const SupplierInvoiceSchema = z.object({
4
+ type: z.literal("SupplierInvoice"),
5
+ id: z.string(),
6
+ supplier: SupplierSchema,
7
+ invoiceNumber: z.string(),
8
+ date: z.number(),
9
+ rows: z.array(z.object({
10
+ id: z.string(),
11
+ rowNumber: z.number(),
12
+ sku: z.string(),
13
+ itemName: z.string(),
14
+ quantity: z.number(),
15
+ purchasePrice: z.number(),
16
+ lineDiscount: z.number(),
17
+ profitPercentage: z.number(),
18
+ price: z.number(),
19
+ totalPurchasePrice: z.number(),
20
+ vat: z.boolean(),
21
+ originalProduct: z
22
+ .object({
23
+ purchasePrice: z.number(),
24
+ price: z.number(),
25
+ profitPercentage: z.number(),
26
+ })
27
+ .optional(),
28
+ })),
29
+ productsToUpdate: z.array(z.object({
30
+ sku: z.string(),
31
+ itemName: z.string(),
32
+ oldPurchasePrice: z.number(),
33
+ newPurchasePrice: z.number(),
34
+ oldPrice: z.number(),
35
+ newPrice: z.number(),
36
+ oldProfitPercentage: z.number(),
37
+ newProfitPercentage: z.number(),
38
+ })),
39
+ });
40
+ export const NewSupplierInvoiceSchema = SupplierInvoiceSchema.omit({ id: true });
@@ -11,6 +11,9 @@ export * from "./Profile";
11
11
  export * from "./Store";
12
12
  export * from "./Discount";
13
13
  export * from "./Organization";
14
+ export * from "./OrganizationGroup";
14
15
  export * from "./DeliveryNote";
15
16
  export * from "./Payment";
17
+ export * from "./Supplier";
18
+ export * from "./SupplierInvoice";
16
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC"}
@@ -11,5 +11,8 @@ export * from "./Profile";
11
11
  export * from "./Store";
12
12
  export * from "./Discount";
13
13
  export * from "./Organization";
14
+ export * from "./OrganizationGroup";
14
15
  export * from "./DeliveryNote";
15
16
  export * from "./Payment";
17
+ export * from "./Supplier";
18
+ export * from "./SupplierInvoice";
@@ -4,17 +4,20 @@ export declare const systemCollections: {
4
4
  };
5
5
  export declare const storeCollections: {
6
6
  readonly products: "products";
7
+ readonly "favorite-products": "favorite-products";
7
8
  readonly profiles: "profiles";
8
9
  readonly cart: "cart";
9
10
  readonly clients: "clients";
10
11
  readonly orders: "orders";
11
12
  readonly categories: "categories";
12
- readonly favorites: "favorites";
13
13
  readonly payments: "payments";
14
14
  readonly settings: "settings";
15
15
  readonly discounts: "discounts";
16
16
  readonly organizations: "organizations";
17
+ readonly organizationGroups: "organization-groups";
17
18
  readonly invoices: "invoices";
19
+ readonly suppliers: "suppliers";
20
+ readonly supplierInvoices: "supplier-invoices";
18
21
  };
19
22
  export declare const FirestoreApi: {
20
23
  systemCollections: {
@@ -23,17 +26,20 @@ export declare const FirestoreApi: {
23
26
  };
24
27
  storeCollections: {
25
28
  readonly products: "products";
29
+ readonly "favorite-products": "favorite-products";
26
30
  readonly profiles: "profiles";
27
31
  readonly cart: "cart";
28
32
  readonly clients: "clients";
29
33
  readonly orders: "orders";
30
34
  readonly categories: "categories";
31
- readonly favorites: "favorites";
32
35
  readonly payments: "payments";
33
36
  readonly settings: "settings";
34
37
  readonly discounts: "discounts";
35
38
  readonly organizations: "organizations";
39
+ readonly organizationGroups: "organization-groups";
36
40
  readonly invoices: "invoices";
41
+ readonly suppliers: "suppliers";
42
+ readonly supplierInvoices: "supplier-invoices";
37
43
  };
38
44
  getPath: ({ companyId, storeId, collectionName, id, }: {
39
45
  companyId: string;
@@ -51,17 +57,20 @@ export declare const FirebaseAPI: {
51
57
  };
52
58
  storeCollections: {
53
59
  readonly products: "products";
60
+ readonly "favorite-products": "favorite-products";
54
61
  readonly profiles: "profiles";
55
62
  readonly cart: "cart";
56
63
  readonly clients: "clients";
57
64
  readonly orders: "orders";
58
65
  readonly categories: "categories";
59
- readonly favorites: "favorites";
60
66
  readonly payments: "payments";
61
67
  readonly settings: "settings";
62
68
  readonly discounts: "discounts";
63
69
  readonly organizations: "organizations";
70
+ readonly organizationGroups: "organization-groups";
64
71
  readonly invoices: "invoices";
72
+ readonly suppliers: "suppliers";
73
+ readonly supplierInvoices: "supplier-invoices";
65
74
  };
66
75
  getPath: ({ companyId, storeId, collectionName, id, }: {
67
76
  companyId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/firebase-api/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;CAGpB,CAAC;AAEX,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;CAanB,CAAC;AAEX,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;2DASrB;QACF,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,cAAc,EAAE,MAAM,OAAO,gBAAgB,CAAC;QAC9C,EAAE,CAAC,EAAE,MAAM,CAAC;KACZ;iCAI4B,MAAM,OAAO,gBAAgB;CAG1D,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;+DAdpB;YACF,SAAS,EAAE,MAAM,CAAC;YAClB,OAAO,EAAE,MAAM,CAAC;YAChB,cAAc,EAAE,MAAM,OAAO,gBAAgB,CAAC;YAC9C,EAAE,CAAC,EAAE,MAAM,CAAC;SACZ;qCAI4B,MAAM,OAAO,gBAAgB;;CAO1D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/firebase-api/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;CAGpB,CAAC;AAEX,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;CAgBnB,CAAC;AAEX,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;2DASrB;QACF,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,cAAc,EAAE,MAAM,OAAO,gBAAgB,CAAC;QAC9C,EAAE,CAAC,EAAE,MAAM,CAAC;KACZ;iCAI4B,MAAM,OAAO,gBAAgB;CAG1D,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;+DAdpB;YACF,SAAS,EAAE,MAAM,CAAC;YAClB,OAAO,EAAE,MAAM,CAAC;YAChB,cAAc,EAAE,MAAM,OAAO,gBAAgB,CAAC;YAC9C,EAAE,CAAC,EAAE,MAAM,CAAC;SACZ;qCAI4B,MAAM,OAAO,gBAAgB;;CAO1D,CAAC"}
@@ -4,17 +4,20 @@ export const systemCollections = {
4
4
  };
5
5
  export const storeCollections = {
6
6
  products: "products",
7
+ "favorite-products": "favorite-products",
7
8
  profiles: "profiles",
8
9
  cart: "cart",
9
10
  clients: "clients",
10
11
  orders: "orders",
11
12
  categories: "categories",
12
- favorites: "favorites",
13
13
  payments: "payments",
14
14
  settings: "settings",
15
15
  discounts: "discounts",
16
16
  organizations: "organizations",
17
+ organizationGroups: "organization-groups",
17
18
  invoices: "invoices",
19
+ suppliers: "suppliers",
20
+ supplierInvoices: "supplier-invoices",
18
21
  };
19
22
  export const FirestoreApi = {
20
23
  systemCollections,