@_henriquewilson/gabirubi-domain 1.3.2 → 1.3.3

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.
@@ -1,9 +1,23 @@
1
1
  import { Model } from '../model.mjs';
2
- import 'zod';
2
+ import { z } from 'zod';
3
3
 
4
+ declare const LogEntrySchema: z.ZodObject<{
5
+ createdAt: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodType<FirebaseFirestore.Timestamp, z.ZodTypeDef, FirebaseFirestore.Timestamp>, FirebaseFirestore.Timestamp, unknown>>>>;
6
+ method: z.ZodString;
7
+ params: z.ZodAny;
8
+ }, "strip", z.ZodTypeAny, {
9
+ method: string;
10
+ params?: any;
11
+ createdAt?: FirebaseFirestore.Timestamp | null | undefined;
12
+ }, {
13
+ method: string;
14
+ params?: any;
15
+ createdAt?: unknown;
16
+ }>;
17
+ type LogEntry = z.infer<typeof LogEntrySchema>;
4
18
  interface Log extends Model {
5
19
  params: [key: string];
6
20
  method: string;
7
21
  }
8
22
 
9
- export { Log };
23
+ export { Log, LogEntry, LogEntrySchema };
package/dist/log/log.d.ts CHANGED
@@ -1,9 +1,23 @@
1
1
  import { Model } from '../model.js';
2
- import 'zod';
2
+ import { z } from 'zod';
3
3
 
4
+ declare const LogEntrySchema: z.ZodObject<{
5
+ createdAt: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodType<FirebaseFirestore.Timestamp, z.ZodTypeDef, FirebaseFirestore.Timestamp>, FirebaseFirestore.Timestamp, unknown>>>>;
6
+ method: z.ZodString;
7
+ params: z.ZodAny;
8
+ }, "strip", z.ZodTypeAny, {
9
+ method: string;
10
+ params?: any;
11
+ createdAt?: FirebaseFirestore.Timestamp | null | undefined;
12
+ }, {
13
+ method: string;
14
+ params?: any;
15
+ createdAt?: unknown;
16
+ }>;
17
+ type LogEntry = z.infer<typeof LogEntrySchema>;
4
18
  interface Log extends Model {
5
19
  params: [key: string];
6
20
  method: string;
7
21
  }
8
22
 
9
- export { Log };
23
+ export { Log, LogEntry, LogEntrySchema };
package/dist/log/log.js CHANGED
@@ -3,6 +3,12 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = function(target, all) {
7
+ for(var name in all)__defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
11
+ };
6
12
  var __copyProps = function(to, from, except, desc) {
7
13
  if (from && typeof from === "object" || typeof from === "function") {
8
14
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
@@ -41,5 +47,27 @@ var __toCommonJS = function(mod) {
41
47
  };
42
48
  // src/log/log.ts
43
49
  var log_exports = {};
50
+ __export(log_exports, {
51
+ LogEntrySchema: function() {
52
+ return LogEntrySchema;
53
+ }
54
+ });
44
55
  module.exports = __toCommonJS(log_exports);
56
+ var import_zod2 = require("zod");
57
+ // src/model/shared.ts
58
+ var import_firestore = require("@google-cloud/firestore");
59
+ var import_zod = require("zod");
60
+ var TimestampOrNow = import_zod.z.preprocess(function(arg) {
61
+ return arg === void 0 ? import_firestore.Timestamp.now() : arg;
62
+ }, import_zod.z.custom()).nullish().optional();
63
+ // src/log/log.ts
64
+ var LogEntrySchema = import_zod2.z.object({
65
+ createdAt: TimestampOrNow,
66
+ method: import_zod2.z.string(),
67
+ params: import_zod2.z.any()
68
+ });
69
+ // Annotate the CommonJS export names for ESM import in node:
70
+ 0 && (module.exports = {
71
+ LogEntrySchema: LogEntrySchema
72
+ });
45
73
  //# sourceMappingURL=log.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/log/log.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA","sourcesContent":["import {Model} from \"../model\";\n\nexport interface Log extends Model {\n params: [key: string]\n method: string\n}\n\n"]}
1
+ {"version":3,"sources":["../../src/log/log.ts","../../src/model/shared.ts"],"names":["import_zod"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,IAAAA,cAAgB;;;ACDhB,uBAA0B;AAC1B,iBAAgB;AAET,IAAM,iBAAiB,aAC3B;AAAA,EACC,CAAC,QAAS,QAAQ,SAAY,2BAAU,IAAI,IAAI;AAAA,EAChD,aAAE,OAAkB;AACtB,EACC,QAAQ,EAAE,SAAS;;;ADJf,IAAM,iBAAiB,cAAE,OAAO;AAAA,EACnC,WAAW;AAAA,EACX,QAAQ,cAAE,OAAO;AAAA,EACjB,QAAQ,cAAE,IAAI;AAClB,CAAC","sourcesContent":["import {Model} from \"../model\";\nimport {z} from \"zod\";\nimport {TimestampOrNow} from \"../model/shared\";\n\nexport const LogEntrySchema = z.object({\n createdAt: TimestampOrNow,\n method: z.string(),\n params: z.any()\n});\n\n\nexport type LogEntry = z.infer<typeof LogEntrySchema>;\n\nexport interface Log extends Model {\n params: [key: string]\n method: string\n}\n\n","import { Timestamp } from '@google-cloud/firestore';\nimport {z} from \"zod\";\n\nexport const TimestampOrNow = z\n .preprocess(\n (arg) => (arg === undefined ? Timestamp.now() : arg),\n z.custom<Timestamp>(),\n )\n .nullish().optional();\n"]}
package/dist/log/log.mjs CHANGED
@@ -1 +1,21 @@
1
+ // src/log/log.ts
2
+ import { z as z2 } from "zod";
3
+
4
+ // src/model/shared.ts
5
+ import { Timestamp } from "@google-cloud/firestore";
6
+ import { z } from "zod";
7
+ var TimestampOrNow = z.preprocess(
8
+ (arg) => arg === void 0 ? Timestamp.now() : arg,
9
+ z.custom()
10
+ ).nullish().optional();
11
+
12
+ // src/log/log.ts
13
+ var LogEntrySchema = z2.object({
14
+ createdAt: TimestampOrNow,
15
+ method: z2.string(),
16
+ params: z2.any()
17
+ });
18
+ export {
19
+ LogEntrySchema
20
+ };
1
21
  //# sourceMappingURL=log.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
1
+ {"version":3,"sources":["../../src/log/log.ts","../../src/model/shared.ts"],"sourcesContent":["import {Model} from \"../model\";\nimport {z} from \"zod\";\nimport {TimestampOrNow} from \"../model/shared\";\n\nexport const LogEntrySchema = z.object({\n createdAt: TimestampOrNow,\n method: z.string(),\n params: z.any()\n});\n\n\nexport type LogEntry = z.infer<typeof LogEntrySchema>;\n\nexport interface Log extends Model {\n params: [key: string]\n method: string\n}\n\n","import { Timestamp } from '@google-cloud/firestore';\nimport {z} from \"zod\";\n\nexport const TimestampOrNow = z\n .preprocess(\n (arg) => (arg === undefined ? Timestamp.now() : arg),\n z.custom<Timestamp>(),\n )\n .nullish().optional();\n"],"mappings":";AACA,SAAQ,KAAAA,UAAQ;;;ACDhB,SAAS,iBAAiB;AAC1B,SAAQ,SAAQ;AAET,IAAM,iBAAiB,EAC3B;AAAA,EACC,CAAC,QAAS,QAAQ,SAAY,UAAU,IAAI,IAAI;AAAA,EAChD,EAAE,OAAkB;AACtB,EACC,QAAQ,EAAE,SAAS;;;ADJf,IAAM,iBAAiBC,GAAE,OAAO;AAAA,EACnC,WAAW;AAAA,EACX,QAAQA,GAAE,OAAO;AAAA,EACjB,QAAQA,GAAE,IAAI;AAClB,CAAC;","names":["z","z"]}
@@ -14,9 +14,9 @@ declare const CustomerOrderSchema: z.ZodObject<{
14
14
  telefone_principal: z.ZodString;
15
15
  }, "strip", z.ZodTypeAny, {
16
16
  id: number;
17
+ email: string;
17
18
  nome: string;
18
19
  cpf: string;
19
- email: string;
20
20
  resource_uri: string;
21
21
  sexo: string;
22
22
  telefone_celular: string;
@@ -26,9 +26,9 @@ declare const CustomerOrderSchema: z.ZodObject<{
26
26
  razao_social?: any;
27
27
  }, {
28
28
  id: number;
29
+ email: string;
29
30
  nome: string;
30
31
  cpf: string;
31
- email: string;
32
32
  resource_uri: string;
33
33
  sexo: string;
34
34
  telefone_celular: string;
@@ -525,9 +525,9 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
525
525
  telefone_principal: z.ZodString;
526
526
  }, "strip", z.ZodTypeAny, {
527
527
  id: number;
528
+ email: string;
528
529
  nome: string;
529
530
  cpf: string;
530
- email: string;
531
531
  resource_uri: string;
532
532
  sexo: string;
533
533
  telefone_celular: string;
@@ -537,9 +537,9 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
537
537
  razao_social?: any;
538
538
  }, {
539
539
  id: number;
540
+ email: string;
540
541
  nome: string;
541
542
  cpf: string;
542
- email: string;
543
543
  resource_uri: string;
544
544
  sexo: string;
545
545
  telefone_celular: string;
@@ -1405,7 +1405,6 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
1405
1405
  picture: string;
1406
1406
  }>;
1407
1407
  }, "strip", z.ZodTypeAny, {
1408
- currency: string;
1409
1408
  id: number;
1410
1409
  name: string;
1411
1410
  company: {
@@ -1416,6 +1415,7 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
1416
1415
  price: string;
1417
1416
  discount: string;
1418
1417
  custom_price: string;
1418
+ currency: string;
1419
1419
  delivery_time: number;
1420
1420
  delivery_range: {
1421
1421
  id: string | number;
@@ -1463,7 +1463,6 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
1463
1463
  };
1464
1464
  error?: string | undefined;
1465
1465
  }, {
1466
- currency: string;
1467
1466
  id: number;
1468
1467
  name: string;
1469
1468
  company: {
@@ -1474,6 +1473,7 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
1474
1473
  price: string;
1475
1474
  discount: string;
1476
1475
  custom_price: string;
1476
+ currency: string;
1477
1477
  delivery_time: number;
1478
1478
  delivery_range: {
1479
1479
  min: number;
@@ -1563,7 +1563,6 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
1563
1563
  service: string;
1564
1564
  deliveryTime: number;
1565
1565
  original: {
1566
- currency: string;
1567
1566
  id: number;
1568
1567
  name: string;
1569
1568
  company: {
@@ -1574,6 +1573,7 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
1574
1573
  price: string;
1575
1574
  discount: string;
1576
1575
  custom_price: string;
1576
+ currency: string;
1577
1577
  delivery_time: number;
1578
1578
  delivery_range: {
1579
1579
  id: string | number;
@@ -1709,7 +1709,6 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
1709
1709
  service: string;
1710
1710
  deliveryTime: number;
1711
1711
  original: {
1712
- currency: string;
1713
1712
  id: number;
1714
1713
  name: string;
1715
1714
  company: {
@@ -1720,6 +1719,7 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
1720
1719
  price: string;
1721
1720
  discount: string;
1722
1721
  custom_price: string;
1722
+ currency: string;
1723
1723
  delivery_time: number;
1724
1724
  delivery_range: {
1725
1725
  min: number;
@@ -2300,7 +2300,6 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
2300
2300
  picture: string;
2301
2301
  }>;
2302
2302
  }, "strip", z.ZodTypeAny, {
2303
- currency: string;
2304
2303
  id: number;
2305
2304
  name: string;
2306
2305
  company: {
@@ -2311,6 +2310,7 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
2311
2310
  price: string;
2312
2311
  discount: string;
2313
2312
  custom_price: string;
2313
+ currency: string;
2314
2314
  delivery_time: number;
2315
2315
  delivery_range: {
2316
2316
  id: string | number;
@@ -2358,7 +2358,6 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
2358
2358
  };
2359
2359
  error?: string | undefined;
2360
2360
  }, {
2361
- currency: string;
2362
2361
  id: number;
2363
2362
  name: string;
2364
2363
  company: {
@@ -2369,6 +2368,7 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
2369
2368
  price: string;
2370
2369
  discount: string;
2371
2370
  custom_price: string;
2371
+ currency: string;
2372
2372
  delivery_time: number;
2373
2373
  delivery_range: {
2374
2374
  min: number;
@@ -2458,7 +2458,6 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
2458
2458
  service: string;
2459
2459
  deliveryTime: number;
2460
2460
  original: {
2461
- currency: string;
2462
2461
  id: number;
2463
2462
  name: string;
2464
2463
  company: {
@@ -2469,6 +2468,7 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
2469
2468
  price: string;
2470
2469
  discount: string;
2471
2470
  custom_price: string;
2471
+ currency: string;
2472
2472
  delivery_time: number;
2473
2473
  delivery_range: {
2474
2474
  id: string | number;
@@ -2604,7 +2604,6 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
2604
2604
  service: string;
2605
2605
  deliveryTime: number;
2606
2606
  original: {
2607
- currency: string;
2608
2607
  id: number;
2609
2608
  name: string;
2610
2609
  company: {
@@ -2615,6 +2614,7 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
2615
2614
  price: string;
2616
2615
  discount: string;
2617
2616
  custom_price: string;
2617
+ currency: string;
2618
2618
  delivery_time: number;
2619
2619
  delivery_range: {
2620
2620
  min: number;
@@ -2780,9 +2780,9 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
2780
2780
  data_modificacao: string;
2781
2781
  cliente: {
2782
2782
  id: number;
2783
+ email: string;
2783
2784
  nome: string;
2784
2785
  cpf: string;
2785
- email: string;
2786
2786
  resource_uri: string;
2787
2787
  sexo: string;
2788
2788
  telefone_celular: string;
@@ -2880,6 +2880,8 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
2880
2880
  createdAt?: FirebaseFirestore.Timestamp | null | undefined;
2881
2881
  updatedAt?: FirebaseFirestore.Timestamp | null | undefined;
2882
2882
  order?: number | null | undefined;
2883
+ warning?: string | undefined;
2884
+ tags?: string[] | undefined;
2883
2885
  customShippingInfo?: {
2884
2886
  length: number;
2885
2887
  id: string | number;
@@ -2892,7 +2894,6 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
2892
2894
  name?: string | undefined;
2893
2895
  insurance?: number | undefined;
2894
2896
  } | undefined;
2895
- tags?: string[] | undefined;
2896
2897
  cliente_obs?: any;
2897
2898
  cupom_desconto?: any;
2898
2899
  id_anymarket?: any;
@@ -2907,7 +2908,6 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
2907
2908
  service: string;
2908
2909
  deliveryTime: number;
2909
2910
  original: {
2910
- currency: string;
2911
2911
  id: number;
2912
2912
  name: string;
2913
2913
  company: {
@@ -2918,6 +2918,7 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
2918
2918
  price: string;
2919
2919
  discount: string;
2920
2920
  custom_price: string;
2921
+ currency: string;
2921
2922
  delivery_time: number;
2922
2923
  delivery_range: {
2923
2924
  id: string | number;
@@ -3054,7 +3055,6 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
3054
3055
  service: string;
3055
3056
  deliveryTime: number;
3056
3057
  original: {
3057
- currency: string;
3058
3058
  id: number;
3059
3059
  name: string;
3060
3060
  company: {
@@ -3065,6 +3065,7 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
3065
3065
  price: string;
3066
3066
  discount: string;
3067
3067
  custom_price: string;
3068
+ currency: string;
3068
3069
  delivery_time: number;
3069
3070
  delivery_range: {
3070
3071
  id: string | number;
@@ -3194,7 +3195,6 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
3194
3195
  insurance?: number | undefined;
3195
3196
  } | undefined;
3196
3197
  }[] | undefined;
3197
- warning?: string | undefined;
3198
3198
  watching?: boolean | undefined;
3199
3199
  useInApp?: Record<string, string[]> | undefined;
3200
3200
  }, {
@@ -3229,9 +3229,9 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
3229
3229
  data_modificacao: string;
3230
3230
  cliente: {
3231
3231
  id: number;
3232
+ email: string;
3232
3233
  nome: string;
3233
3234
  cpf: string;
3234
- email: string;
3235
3235
  resource_uri: string;
3236
3236
  sexo: string;
3237
3237
  telefone_celular: string;
@@ -3330,6 +3330,8 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
3330
3330
  createdAt?: unknown;
3331
3331
  updatedAt?: unknown;
3332
3332
  order?: number | null | undefined;
3333
+ warning?: string | undefined;
3334
+ tags?: string[] | undefined;
3333
3335
  customShippingInfo?: {
3334
3336
  length: number;
3335
3337
  weight: number;
@@ -3342,7 +3344,6 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
3342
3344
  name?: string | undefined;
3343
3345
  insurance?: number | undefined;
3344
3346
  } | undefined;
3345
- tags?: string[] | undefined;
3346
3347
  cliente_obs?: any;
3347
3348
  cupom_desconto?: any;
3348
3349
  id_anymarket?: any;
@@ -3357,7 +3358,6 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
3357
3358
  service: string;
3358
3359
  deliveryTime: number;
3359
3360
  original: {
3360
- currency: string;
3361
3361
  id: number;
3362
3362
  name: string;
3363
3363
  company: {
@@ -3368,6 +3368,7 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
3368
3368
  price: string;
3369
3369
  discount: string;
3370
3370
  custom_price: string;
3371
+ currency: string;
3371
3372
  delivery_time: number;
3372
3373
  delivery_range: {
3373
3374
  min: number;
@@ -3504,7 +3505,6 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
3504
3505
  service: string;
3505
3506
  deliveryTime: number;
3506
3507
  original: {
3507
- currency: string;
3508
3508
  id: number;
3509
3509
  name: string;
3510
3510
  company: {
@@ -3515,6 +3515,7 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
3515
3515
  price: string;
3516
3516
  discount: string;
3517
3517
  custom_price: string;
3518
+ currency: string;
3518
3519
  delivery_time: number;
3519
3520
  delivery_range: {
3520
3521
  min: number;
@@ -3644,7 +3645,6 @@ declare const OrderSchema: z.ZodObject<z.objectUtil.extendShape<{
3644
3645
  insurance?: number | undefined;
3645
3646
  } | undefined;
3646
3647
  }[] | undefined;
3647
- warning?: string | undefined;
3648
3648
  watching?: boolean | undefined;
3649
3649
  useInApp?: Record<string, string[]> | undefined;
3650
3650
  }>;