@jsdev_ninja/core 0.16.0 → 0.17.0

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.
@@ -93,6 +93,7 @@ export declare const EzInvoiceSchema: z.ZodObject<{
93
93
  date?: number | undefined;
94
94
  warning?: string | undefined;
95
95
  }>;
96
+ export type TEzInvoice = z.infer<typeof EzInvoiceSchema>;
96
97
  export declare const InvoiceSchema: z.ZodObject<{
97
98
  id: z.ZodString;
98
99
  number: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"Invoice.d.ts","sourceRoot":"","sources":["../../../lib/entities/Invoice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW1B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCxB,CAAC"}
1
+ {"version":3,"file":"Invoice.d.ts","sourceRoot":"","sources":["../../../lib/entities/Invoice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAW1B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAEzD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmCxB,CAAC"}
@@ -2306,6 +2306,111 @@ export declare const OrderSchema: z.ZodObject<{
2306
2306
  date?: number | undefined;
2307
2307
  warning?: string | undefined;
2308
2308
  }>>;
2309
+ /**
2310
+ * Set when an admin records a full payment against o.invoice / o.ezInvoice.
2311
+ * Epoch millis. Absent means no payment has been recorded via the admin payment flow.
2312
+ * A row is "open" iff: invoice exists AND invoicePaidAt is unset AND ezReceipt is unset.
2313
+ */
2314
+ invoicePaidAt: z.ZodOptional<z.ZodNumber>;
2315
+ /**
2316
+ * EZcount receipt stored after recording payment.
2317
+ * Mirrors EzInvoiceSchema shape (doc_uuid, pdf_link, doc_number, …).
2318
+ * Present only after a successful recordInvoicePayment call.
2319
+ */
2320
+ ezReceipt: z.ZodOptional<z.ZodObject<{
2321
+ doc_uuid: z.ZodString;
2322
+ pdf_link: z.ZodString;
2323
+ pdf_link_copy: z.ZodString;
2324
+ doc_number: z.ZodString;
2325
+ sent_mails: z.ZodArray<z.ZodString, "many">;
2326
+ success: z.ZodBoolean;
2327
+ ua_uuid: z.ZodString;
2328
+ calculatedData: z.ZodObject<{
2329
+ _COMMENT: z.ZodOptional<z.ZodString>;
2330
+ transaction_id: z.ZodString;
2331
+ date: z.ZodString;
2332
+ currency: z.ZodString;
2333
+ rate: z.ZodNumber;
2334
+ vat: z.ZodString;
2335
+ vat_price: z.ZodNumber;
2336
+ price_discount: z.ZodNumber;
2337
+ price_discount_in_currency: z.ZodNumber;
2338
+ price_total: z.ZodString;
2339
+ price_total_in_currency: z.ZodNumber;
2340
+ }, "strip", z.ZodTypeAny, {
2341
+ date: string;
2342
+ vat: string;
2343
+ currency: string;
2344
+ transaction_id: string;
2345
+ rate: number;
2346
+ vat_price: number;
2347
+ price_discount: number;
2348
+ price_discount_in_currency: number;
2349
+ price_total: string;
2350
+ price_total_in_currency: number;
2351
+ _COMMENT?: string | undefined;
2352
+ }, {
2353
+ date: string;
2354
+ vat: string;
2355
+ currency: string;
2356
+ transaction_id: string;
2357
+ rate: number;
2358
+ vat_price: number;
2359
+ price_discount: number;
2360
+ price_discount_in_currency: number;
2361
+ price_total: string;
2362
+ price_total_in_currency: number;
2363
+ _COMMENT?: string | undefined;
2364
+ }>;
2365
+ warning: z.ZodOptional<z.ZodString>;
2366
+ date: z.ZodOptional<z.ZodNumber>;
2367
+ }, "strip", z.ZodTypeAny, {
2368
+ doc_uuid: string;
2369
+ pdf_link: string;
2370
+ pdf_link_copy: string;
2371
+ doc_number: string;
2372
+ sent_mails: string[];
2373
+ success: boolean;
2374
+ ua_uuid: string;
2375
+ calculatedData: {
2376
+ date: string;
2377
+ vat: string;
2378
+ currency: string;
2379
+ transaction_id: string;
2380
+ rate: number;
2381
+ vat_price: number;
2382
+ price_discount: number;
2383
+ price_discount_in_currency: number;
2384
+ price_total: string;
2385
+ price_total_in_currency: number;
2386
+ _COMMENT?: string | undefined;
2387
+ };
2388
+ date?: number | undefined;
2389
+ warning?: string | undefined;
2390
+ }, {
2391
+ doc_uuid: string;
2392
+ pdf_link: string;
2393
+ pdf_link_copy: string;
2394
+ doc_number: string;
2395
+ sent_mails: string[];
2396
+ success: boolean;
2397
+ ua_uuid: string;
2398
+ calculatedData: {
2399
+ date: string;
2400
+ vat: string;
2401
+ currency: string;
2402
+ transaction_id: string;
2403
+ rate: number;
2404
+ vat_price: number;
2405
+ price_discount: number;
2406
+ price_discount_in_currency: number;
2407
+ price_total: string;
2408
+ price_total_in_currency: number;
2409
+ _COMMENT?: string | undefined;
2410
+ };
2411
+ date?: number | undefined;
2412
+ warning?: string | undefined;
2413
+ }>>;
2309
2414
  updatedBy: z.ZodOptional<z.ZodString>;
2310
2415
  updatedAt: z.ZodOptional<z.ZodNumber>;
2311
2416
  }, "strip", z.ZodTypeAny, {
@@ -2687,6 +2792,31 @@ export declare const OrderSchema: z.ZodObject<{
2687
2792
  date?: number | undefined;
2688
2793
  warning?: string | undefined;
2689
2794
  } | undefined;
2795
+ invoicePaidAt?: number | undefined;
2796
+ ezReceipt?: {
2797
+ doc_uuid: string;
2798
+ pdf_link: string;
2799
+ pdf_link_copy: string;
2800
+ doc_number: string;
2801
+ sent_mails: string[];
2802
+ success: boolean;
2803
+ ua_uuid: string;
2804
+ calculatedData: {
2805
+ date: string;
2806
+ vat: string;
2807
+ currency: string;
2808
+ transaction_id: string;
2809
+ rate: number;
2810
+ vat_price: number;
2811
+ price_discount: number;
2812
+ price_discount_in_currency: number;
2813
+ price_total: string;
2814
+ price_total_in_currency: number;
2815
+ _COMMENT?: string | undefined;
2816
+ };
2817
+ date?: number | undefined;
2818
+ warning?: string | undefined;
2819
+ } | undefined;
2690
2820
  updatedBy?: string | undefined;
2691
2821
  updatedAt?: number | undefined;
2692
2822
  }, {
@@ -3068,6 +3198,31 @@ export declare const OrderSchema: z.ZodObject<{
3068
3198
  date?: number | undefined;
3069
3199
  warning?: string | undefined;
3070
3200
  } | undefined;
3201
+ invoicePaidAt?: number | undefined;
3202
+ ezReceipt?: {
3203
+ doc_uuid: string;
3204
+ pdf_link: string;
3205
+ pdf_link_copy: string;
3206
+ doc_number: string;
3207
+ sent_mails: string[];
3208
+ success: boolean;
3209
+ ua_uuid: string;
3210
+ calculatedData: {
3211
+ date: string;
3212
+ vat: string;
3213
+ currency: string;
3214
+ transaction_id: string;
3215
+ rate: number;
3216
+ vat_price: number;
3217
+ price_discount: number;
3218
+ price_discount_in_currency: number;
3219
+ price_total: string;
3220
+ price_total_in_currency: number;
3221
+ _COMMENT?: string | undefined;
3222
+ };
3223
+ date?: number | undefined;
3224
+ warning?: string | undefined;
3225
+ } | undefined;
3071
3226
  updatedBy?: string | undefined;
3072
3227
  updatedAt?: number | undefined;
3073
3228
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"Order.d.ts","sourceRoot":"","sources":["../../../lib/entities/Order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKF,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC"}
@@ -76,6 +76,18 @@ export const OrderSchema = z.object({
76
76
  invoice: InvoiceSchema.optional(),
77
77
  ezInvoice: EzInvoiceSchema.optional(),
78
78
  ezDeliveryNote: EzDeliveryNoteSchema.optional(),
79
+ /**
80
+ * Set when an admin records a full payment against o.invoice / o.ezInvoice.
81
+ * Epoch millis. Absent means no payment has been recorded via the admin payment flow.
82
+ * A row is "open" iff: invoice exists AND invoicePaidAt is unset AND ezReceipt is unset.
83
+ */
84
+ invoicePaidAt: z.number().int().positive().optional(),
85
+ /**
86
+ * EZcount receipt stored after recording payment.
87
+ * Mirrors EzInvoiceSchema shape (doc_uuid, pdf_link, doc_number, …).
88
+ * Present only after a successful recordInvoicePayment call.
89
+ */
90
+ ezReceipt: EzInvoiceSchema.optional(),
79
91
  // Audit: who last changed the order + when (epoch millis). Stamped by admin writes.
80
92
  updatedBy: z.string().optional(),
81
93
  updatedAt: z.number().optional(),
@@ -13,6 +13,7 @@ export * from "./Discount";
13
13
  export * from "./Organization";
14
14
  export * from "./OrganizationGroup";
15
15
  export * from "./DeliveryNote";
16
+ export * from "./Invoice";
16
17
  export * from "./Payment";
17
18
  export * from "./Supplier";
18
19
  export * from "./SupplierInvoice";
@@ -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,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,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,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC"}
@@ -13,6 +13,7 @@ export * from "./Discount";
13
13
  export * from "./Organization";
14
14
  export * from "./OrganizationGroup";
15
15
  export * from "./DeliveryNote";
16
+ export * from "./Invoice";
16
17
  export * from "./Payment";
17
18
  export * from "./Supplier";
18
19
  export * from "./SupplierInvoice";
package/dist/lib/index.js CHANGED
@@ -3,3 +3,4 @@ export * from "./utils";
3
3
  export { FirebaseAPI, storeCollections, systemCollections } from "./firebase-api";
4
4
  export * from "./utils/math/math";
5
5
  export * from "./utils/storeCalculator/storeCalculator";
6
+ //