@_henriquewilson/gabirubi-domain 1.3.17 → 1.3.19

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.
@@ -7,30 +7,36 @@ declare const FileSchema: z.ZodObject<z.objectUtil.extendShape<{
7
7
  order: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
8
8
  }, {
9
9
  category: z.ZodOptional<z.ZodString>;
10
- description: z.ZodString;
10
+ description: z.ZodOptional<z.ZodString>;
11
11
  name: z.ZodString;
12
12
  url: z.ZodString;
13
13
  path: z.ZodString;
14
+ encodedPath: z.ZodString;
15
+ token: z.ZodString;
14
16
  }>, "strip", z.ZodTypeAny, {
15
17
  path: string;
16
18
  id: string | number;
17
- description: string;
18
19
  name: string;
19
20
  url: string;
21
+ encodedPath: string;
22
+ token: string;
20
23
  createdAt?: FirebaseFirestore.Timestamp | null | undefined;
21
24
  updatedAt?: FirebaseFirestore.Timestamp | null | undefined;
22
25
  order?: number | null | undefined;
23
26
  category?: string | undefined;
27
+ description?: string | undefined;
24
28
  }, {
25
29
  path: string;
26
- description: string;
27
30
  name: string;
28
31
  url: string;
32
+ encodedPath: string;
33
+ token: string;
29
34
  id?: unknown;
30
35
  createdAt?: unknown;
31
36
  updatedAt?: unknown;
32
37
  order?: number | null | undefined;
33
38
  category?: string | undefined;
39
+ description?: string | undefined;
34
40
  }>;
35
41
  type File = z.infer<typeof FileSchema>;
36
42
 
@@ -7,30 +7,36 @@ declare const FileSchema: z.ZodObject<z.objectUtil.extendShape<{
7
7
  order: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
8
8
  }, {
9
9
  category: z.ZodOptional<z.ZodString>;
10
- description: z.ZodString;
10
+ description: z.ZodOptional<z.ZodString>;
11
11
  name: z.ZodString;
12
12
  url: z.ZodString;
13
13
  path: z.ZodString;
14
+ encodedPath: z.ZodString;
15
+ token: z.ZodString;
14
16
  }>, "strip", z.ZodTypeAny, {
15
17
  path: string;
16
18
  id: string | number;
17
- description: string;
18
19
  name: string;
19
20
  url: string;
21
+ encodedPath: string;
22
+ token: string;
20
23
  createdAt?: FirebaseFirestore.Timestamp | null | undefined;
21
24
  updatedAt?: FirebaseFirestore.Timestamp | null | undefined;
22
25
  order?: number | null | undefined;
23
26
  category?: string | undefined;
27
+ description?: string | undefined;
24
28
  }, {
25
29
  path: string;
26
- description: string;
27
30
  name: string;
28
31
  url: string;
32
+ encodedPath: string;
33
+ token: string;
29
34
  id?: unknown;
30
35
  createdAt?: unknown;
31
36
  updatedAt?: unknown;
32
37
  order?: number | null | undefined;
33
38
  category?: string | undefined;
39
+ description?: string | undefined;
34
40
  }>;
35
41
  type File = z.infer<typeof FileSchema>;
36
42
 
@@ -106,10 +106,12 @@ var EnabledSchema = import_zod2.z.object({
106
106
  var import_zod3 = require("zod");
107
107
  var FileSchema = ModelSchema.extend({
108
108
  category: import_zod3.z.string().optional(),
109
- description: import_zod3.z.string(),
109
+ description: import_zod3.z.string().optional(),
110
110
  name: import_zod3.z.string(),
111
111
  url: import_zod3.z.string(),
112
- path: import_zod3.z.string()
112
+ path: import_zod3.z.string(),
113
+ encodedPath: import_zod3.z.string(),
114
+ token: import_zod3.z.string()
113
115
  });
114
116
  // Annotate the CommonJS export names for ESM import in node:
115
117
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/henriquewilson/Developer/Projects/gabirubi-domain/dist/model/storage/file.js","../../../src/model/storage/file.ts","../../../src/model.ts","../../../src/model/shared.ts"],"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","file_exports","FileSchema","module","exports","import_zod","require","import_firestore","TimestampOrNow","z","preprocess","arg","Timestamp","now","custom","nullish","optional","import_cuid","generateFirestoreId","cuid","IdModelSchema","import_zod2","union","string","number","IdModelProcess","val","ModelSchema","object","id","createdAt","updatedAt","order","coerce","PreviousSchema","extend","previous","lazy","array","EnabledSchema","enabled","boolean","category","import_zod3","description","url","path"],"mappings":"AAAA;AACA,IAAIA,WAAWC,OAAOC,MAAM;AAC5B,IAAIC,YAAYF,OAAOG,cAAc;AACrC,IAAIC,mBAAmBJ,OAAOK,wBAAwB;AACtD,IAAIC,oBAAoBN,OAAOO,mBAAmB;AAClD,IAAIC,eAAeR,OAAOS,cAAc;AACxC,IAAIC,eAAeV,OAAOW,SAAS,CAACC,cAAc;AAClD,IAAIC,WAAW,SAACC,QAAQC;IACtB,IAAK,IAAIC,QAAQD,IACfb,UAAUY,QAAQE,MAAM;QAAEC,KAAKF,GAAG,CAACC,KAAK;QAAEE,YAAY;IAAK;AAC/D;AACA,IAAIC,cAAc,SAACC,IAAIC,MAAMC,QAAQC;IACnC,IAAIF,QAAQ,OAAOA,SAAS,YAAY,OAAOA,SAAS,YAAY;YAC7D,kCAAA,2BAAA;;;gBAAA,IAAIG,MAAJ;gBACH,IAAI,CAACd,aAAae,IAAI,CAACL,IAAII,QAAQA,QAAQF,QACzCpB,UAAUkB,IAAII,KAAK;oBAAEP,KAAK;+BAAMI,IAAI,CAACG,IAAI;;oBAAEN,YAAY,CAAEK,CAAAA,OAAOnB,iBAAiBiB,MAAMG,IAAG,KAAMD,KAAKL,UAAU;gBAAC;;YAFpH,QAAK,YAAWZ,kBAAkBe,0BAA7B,SAAA,6BAAA,QAAA,yBAAA;;YAAA;YAAA;;;qBAAA,6BAAA;oBAAA;;;oBAAA;0BAAA;;;;IAGP;IACA,OAAOD;AACT;AACA,IAAIM,UAAU,SAACC,KAAKC,YAAYd;WAAYA,SAASa,OAAO,OAAO5B,SAASS,aAAamB,QAAQ,CAAC,GAAGR,YACnG,sEAAsE;IACtE,iEAAiE;IACjE,sEAAsE;IACtE,qEAAqE;IACrES,cAAc,CAAC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IAAMkB,iBAAiBP,YAAYQ,MAAA,CAAO;IAC/CC,UAAUf,YAAAZ,CAAA,CAAE4B,IAAA,CAAK;eAAMV,YAAYW,KAAA,GAAQtB,QAAA;;AAC7C;AAEO,IAAMuB,gBAAgBlB,YAAAZ,CAAA,CAAEmB,MAAA,CAAO;IACpCY,SAASnB,YAAAZ,CAAA,CAAEgC,OAAA,GAAUzB,QAAA;AACvB;AF0CA,4BAA4B;ACvE5B,IAAAX,cAAgBC,QAAA;AAET,IAAMJ,aAAayB,YAAYQ,MAAA,CAAO;IAC3CO,UAAUC,YAAAlC,CAAA,CAAEc,MAAA,GAASP,QAAA;IACrB4B,aAAaD,YAAAlC,CAAA,CAAEc,MAAA;IACftC,MAAM0D,YAAAlC,CAAA,CAAEc,MAAA;IACRsB,KAAKF,YAAAlC,CAAA,CAAEc,MAAA;IACPuB,MAAMH,YAAAlC,CAAA,CAAEc,MAAA;AACV;ADwEA,6DAA6D;AAC7D,KAAMpB,CAAAA,OAAOC,OAAO,GAAG;IACrBF,YAAAA;AACF,CAAA","sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/model/storage/file.ts\nvar file_exports = {};\n__export(file_exports, {\n FileSchema: () => FileSchema\n});\nmodule.exports = __toCommonJS(file_exports);\n\n// src/model.ts\nvar import_zod2 = require(\"zod\");\n\n// src/model/shared.ts\nvar import_firestore = require(\"@google-cloud/firestore\");\nvar import_zod = require(\"zod\");\nvar TimestampOrNow = import_zod.z.preprocess(\n (arg) => arg === void 0 ? import_firestore.Timestamp.now() : arg,\n import_zod.z.custom()\n).nullish().optional();\n\n// src/model.ts\nvar import_cuid = __toESM(require(\"cuid\"));\nvar generateFirestoreId = () => {\n return (0, import_cuid.default)();\n};\nvar IdModelSchema = import_zod2.z.union([import_zod2.z.string(), import_zod2.z.number()]);\nvar IdModelProcess = import_zod2.z.preprocess((val) => {\n if (val === void 0 || val === null) {\n return generateFirestoreId();\n }\n return val;\n}, IdModelSchema);\nvar ModelSchema = import_zod2.z.object({\n id: IdModelProcess,\n createdAt: TimestampOrNow,\n updatedAt: TimestampOrNow,\n order: import_zod2.z.coerce.number().nullish().optional()\n});\nvar PreviousSchema = ModelSchema.extend({\n previous: import_zod2.z.lazy(() => ModelSchema.array().optional())\n});\nvar EnabledSchema = import_zod2.z.object({\n enabled: import_zod2.z.boolean().optional()\n});\n\n// src/model/storage/file.ts\nvar import_zod3 = require(\"zod\");\nvar FileSchema = ModelSchema.extend({\n category: import_zod3.z.string().optional(),\n description: import_zod3.z.string(),\n name: import_zod3.z.string(),\n url: import_zod3.z.string(),\n path: import_zod3.z.string()\n});\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n FileSchema\n});\n","import {ModelSchema} from \"../../model\";\nimport {z} from \"zod\";\n\nexport const FileSchema = ModelSchema.extend({\n category: z.string().optional(),\n description: z.string(),\n name: z.string(),\n url: z.string(),\n path: z.string(),\n})\n\nexport type File = z.infer<typeof FileSchema>\n","import {z} from \"zod\";\nimport {TimestampOrNow} from \"./model/shared\";\nimport cuid from 'cuid';\n\nexport const generateFirestoreId = () => {\n return cuid();\n}\n\nexport const IdModelSchema = z.union([z.string(), z.number()])\n\nconst IdModelProcess = z.preprocess((val) => {\n if (val === undefined || val === null) {\n return generateFirestoreId();\n }\n return val;\n}, IdModelSchema);\n\nexport const ModelSchema = z.object({\n id: IdModelProcess,\n createdAt: TimestampOrNow,\n updatedAt: TimestampOrNow,\n order: z.coerce.number().nullish().optional()\n});\n\nexport const PreviousSchema = ModelSchema.extend({\n previous: z.lazy(() => ModelSchema.array().optional())\n})\n\nexport const EnabledSchema = z.object({\n enabled: z.boolean().optional()\n})\n\nexport type IdModel = z.infer<typeof IdModelSchema>;\nexport type Model = z.infer<typeof ModelSchema>;\nexport type Previous = z.infer<typeof PreviousSchema>;\nexport type Enabled = z.infer<typeof EnabledSchema>;\nexport type PartialWithId<T extends Model> = Partial<T> & {\n id: NonNullable<T['id']>\n}\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"]}
1
+ {"version":3,"sources":["/Users/henriquewilson/Developer/Projects/gabirubi-domain/dist/model/storage/file.js","../../../src/model/storage/file.ts","../../../src/model.ts","../../../src/model/shared.ts"],"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","file_exports","FileSchema","module","exports","import_zod","require","import_firestore","TimestampOrNow","z","preprocess","arg","Timestamp","now","custom","nullish","optional","import_cuid","generateFirestoreId","cuid","IdModelSchema","import_zod2","union","string","number","IdModelProcess","val","ModelSchema","object","id","createdAt","updatedAt","order","coerce","PreviousSchema","extend","previous","lazy","array","EnabledSchema","enabled","boolean","category","import_zod3","description","url","path","encodedPath","token"],"mappings":"AAAA;AACA,IAAIA,WAAWC,OAAOC,MAAM;AAC5B,IAAIC,YAAYF,OAAOG,cAAc;AACrC,IAAIC,mBAAmBJ,OAAOK,wBAAwB;AACtD,IAAIC,oBAAoBN,OAAOO,mBAAmB;AAClD,IAAIC,eAAeR,OAAOS,cAAc;AACxC,IAAIC,eAAeV,OAAOW,SAAS,CAACC,cAAc;AAClD,IAAIC,WAAW,SAACC,QAAQC;IACtB,IAAK,IAAIC,QAAQD,IACfb,UAAUY,QAAQE,MAAM;QAAEC,KAAKF,GAAG,CAACC,KAAK;QAAEE,YAAY;IAAK;AAC/D;AACA,IAAIC,cAAc,SAACC,IAAIC,MAAMC,QAAQC;IACnC,IAAIF,QAAQ,OAAOA,SAAS,YAAY,OAAOA,SAAS,YAAY;YAC7D,kCAAA,2BAAA;;;gBAAA,IAAIG,MAAJ;gBACH,IAAI,CAACd,aAAae,IAAI,CAACL,IAAII,QAAQA,QAAQF,QACzCpB,UAAUkB,IAAII,KAAK;oBAAEP,KAAK;+BAAMI,IAAI,CAACG,IAAI;;oBAAEN,YAAY,CAAEK,CAAAA,OAAOnB,iBAAiBiB,MAAMG,IAAG,KAAMD,KAAKL,UAAU;gBAAC;;YAFpH,QAAK,YAAWZ,kBAAkBe,0BAA7B,SAAA,6BAAA,QAAA,yBAAA;;YAAA;YAAA;;;qBAAA,6BAAA;oBAAA;;;oBAAA;0BAAA;;;;IAGP;IACA,OAAOD;AACT;AACA,IAAIM,UAAU,SAACC,KAAKC,YAAYd;WAAYA,SAASa,OAAO,OAAO5B,SAASS,aAAamB,QAAQ,CAAC,GAAGR,YACnG,sEAAsE;IACtE,iEAAiE;IACjE,sEAA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ST,OAAA,GAAUC,QAAA;AACrC;AAEO,IAAMkB,iBAAiBP,YAAYQ,MAAA,CAAO;IAC/CC,UAAUf,YAAAZ,CAAA,CAAE4B,IAAA,CAAK;eAAMV,YAAYW,KAAA,GAAQtB,QAAA;;AAC7C;AAEO,IAAMuB,gBAAgBlB,YAAAZ,CAAA,CAAEmB,MAAA,CAAO;IACpCY,SAASnB,YAAAZ,CAAA,CAAEgC,OAAA,GAAUzB,QAAA;AACvB;AF0CA,4BAA4B;ACvE5B,IAAAX,cAAgBC,QAAA;AAET,IAAMJ,aAAayB,YAAYQ,MAAA,CAAO;IAC3CO,UAAUC,YAAAlC,CAAA,CAAEc,MAAA,GAASP,QAAA;IACrB4B,aAAaD,YAAAlC,CAAA,CAAEc,MAAA,GAASP,QAAA;IACxB/B,MAAM0D,YAAAlC,CAAA,CAAEc,MAAA;IACRsB,KAAKF,YAAAlC,CAAA,CAAEc,MAAA;IACPuB,MAAMH,YAAAlC,CAAA,CAAEc,MAAA;IACRwB,aAAaJ,YAAAlC,CAAA,CAAEc,MAAA;IACfyB,OAAOL,YAAAlC,CAAA,CAAEc,MAAA;AACX;ADwEA,6DAA6D;AAC7D,KAAMpB,CAAAA,OAAOC,OAAO,GAAG;IACrBF,YAAAA;AACF,CAAA","sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/model/storage/file.ts\nvar file_exports = {};\n__export(file_exports, {\n FileSchema: () => FileSchema\n});\nmodule.exports = __toCommonJS(file_exports);\n\n// src/model.ts\nvar import_zod2 = require(\"zod\");\n\n// src/model/shared.ts\nvar import_firestore = require(\"@google-cloud/firestore\");\nvar import_zod = require(\"zod\");\nvar TimestampOrNow = import_zod.z.preprocess(\n (arg) => arg === void 0 ? import_firestore.Timestamp.now() : arg,\n import_zod.z.custom()\n).nullish().optional();\n\n// src/model.ts\nvar import_cuid = __toESM(require(\"cuid\"));\nvar generateFirestoreId = () => {\n return (0, import_cuid.default)();\n};\nvar IdModelSchema = import_zod2.z.union([import_zod2.z.string(), import_zod2.z.number()]);\nvar IdModelProcess = import_zod2.z.preprocess((val) => {\n if (val === void 0 || val === null) {\n return generateFirestoreId();\n }\n return val;\n}, IdModelSchema);\nvar ModelSchema = import_zod2.z.object({\n id: IdModelProcess,\n createdAt: TimestampOrNow,\n updatedAt: TimestampOrNow,\n order: import_zod2.z.coerce.number().nullish().optional()\n});\nvar PreviousSchema = ModelSchema.extend({\n previous: import_zod2.z.lazy(() => ModelSchema.array().optional())\n});\nvar EnabledSchema = import_zod2.z.object({\n enabled: import_zod2.z.boolean().optional()\n});\n\n// src/model/storage/file.ts\nvar import_zod3 = require(\"zod\");\nvar FileSchema = ModelSchema.extend({\n category: import_zod3.z.string().optional(),\n description: import_zod3.z.string().optional(),\n name: import_zod3.z.string(),\n url: import_zod3.z.string(),\n path: import_zod3.z.string(),\n encodedPath: import_zod3.z.string(),\n token: import_zod3.z.string()\n});\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n FileSchema\n});\n","import {ModelSchema} from \"../../model\";\nimport {z} from \"zod\";\n\nexport const FileSchema = ModelSchema.extend({\n category: z.string().optional(),\n description: z.string().optional(),\n name: z.string(),\n url: z.string(),\n path: z.string(),\n encodedPath: z.string(),\n token: z.string(),\n})\n\nexport type File = z.infer<typeof FileSchema>\n","import {z} from \"zod\";\nimport {TimestampOrNow} from \"./model/shared\";\nimport cuid from 'cuid';\n\nexport const generateFirestoreId = () => {\n return cuid();\n}\n\nexport const IdModelSchema = z.union([z.string(), z.number()])\n\nconst IdModelProcess = z.preprocess((val) => {\n if (val === undefined || val === null) {\n return generateFirestoreId();\n }\n return val;\n}, IdModelSchema);\n\nexport const ModelSchema = z.object({\n id: IdModelProcess,\n createdAt: TimestampOrNow,\n updatedAt: TimestampOrNow,\n order: z.coerce.number().nullish().optional()\n});\n\nexport const PreviousSchema = ModelSchema.extend({\n previous: z.lazy(() => ModelSchema.array().optional())\n})\n\nexport const EnabledSchema = z.object({\n enabled: z.boolean().optional()\n})\n\nexport type IdModel = z.infer<typeof IdModelSchema>;\nexport type Model = z.infer<typeof ModelSchema>;\nexport type Previous = z.infer<typeof PreviousSchema>;\nexport type Enabled = z.infer<typeof EnabledSchema>;\nexport type PartialWithId<T extends Model> = Partial<T> & {\n id: NonNullable<T['id']>\n}\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"]}
@@ -39,10 +39,12 @@ var EnabledSchema = z2.object({
39
39
  import { z as z3 } from "zod";
40
40
  var FileSchema = ModelSchema.extend({
41
41
  category: z3.string().optional(),
42
- description: z3.string(),
42
+ description: z3.string().optional(),
43
43
  name: z3.string(),
44
44
  url: z3.string(),
45
- path: z3.string()
45
+ path: z3.string(),
46
+ encodedPath: z3.string(),
47
+ token: z3.string()
46
48
  });
47
49
  export { FileSchema };
48
50
  //# sourceMappingURL=file.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/henriquewilson/Developer/Projects/gabirubi-domain/dist/model/storage/file.mjs","../../../src/model.ts","../../../src/model/shared.ts","../../../src/model/storage/file.ts"],"names":["z","Timestamp","TimestampOrNow","preprocess","arg","now","custom","nullish","optional","cuid","generateFirestoreId","IdModelSchema","union","string","number","IdModelProcess","val","ModelSchema","object","id","createdAt","updatedAt","order","coerce","PreviousSchema","extend","previous","lazy","array","EnabledSchema","enabled","boolean","FileSchema","category","description","name","url","path"],"mappings":"AAAA,eAAe;ACAf,SAAQA,KAAAA,EAAAA,QAAQ,MAAA;ADGhB,sBAAsB;AEHtB,SAASC,SAAA,QAAiB,0BAAA;AAC1B,SAAQD,CAAA,QAAQ,MAAA;AAET,IAAME,iBAAiBF,EAC3BG,UAAA,CACC,SAACC;WAASA,QAAQ,KAAA,IAAYH,UAAUI,GAAA,KAAQD;GAChDJ,EAAEM,MAAA,IAEHC,OAAA,GAAUC,QAAA;AFGb,eAAe;ACTf,OAAOC,UAAU,OAAA;AAEV,IAAMC,sBAAsB;IACjC,OAAOD;AACT;AAEO,IAAME,gBAAgBX,GAAEY,KAAA,CAAM;IAACZ,GAAEa,MAAA;IAAUb,GAAEc,MAAA;CAAS;AAE7D,IAAMC,iBAAiBf,GAAEG,UAAA,CAAW,SAACa;IACnC,IAAIA,QAAQ,KAAA,KAAaA,QAAQ,MAAM;QACrC,OAAON;IACT;IACA,OAAOM;AACT,GAAGL;AAEI,IAAMM,cAAcjB,GAAEkB,MAAA,CAAO;IAClCC,IAAIJ;IACJK,WAAWlB;IACXmB,WAAWnB;IACXoB,OAAOtB,GAAEuB,MAAA,CAAOT,MAAA,GAASP,OAAA,GAAUC,QAAA;AACrC;AAEO,IAAMgB,iBAAiBP,YAAYQ,MAAA,CAAO;IAC/CC,UAAU1B,GAAE2B,IAAA,CAAK;eAAMV,YAAYW,KAAA,GAAQpB,QAAA;;AAC7C;AAEO,IAAMqB,gBAAgB7B,GAAEkB,MAAA,CAAO;IACpCY,SAAS9B,GAAE+B,OAAA,GAAUvB,QAAA;AACvB;ADMA,4BAA4B;AGnC5B,SAAQR,KAAAA,EAAAA,QAAQ,MAAA;AAET,IAAMgC,aAAaf,YAAYQ,MAAA,CAAO;IAC3CQ,UAAUjC,GAAEa,MAAA,GAASL,QAAA;IACrB0B,aAAalC,GAAEa,MAAA;IACfsB,MAAMnC,GAAEa,MAAA;IACRuB,KAAKpC,GAAEa,MAAA;IACPwB,MAAMrC,GAAEa,MAAA;AACV;AHoCA,SACEmB,UAAU,GACV","sourcesContent":["// src/model.ts\nimport { z as z2 } from \"zod\";\n\n// src/model/shared.ts\nimport { Timestamp } from \"@google-cloud/firestore\";\nimport { z } from \"zod\";\nvar TimestampOrNow = z.preprocess(\n (arg) => arg === void 0 ? Timestamp.now() : arg,\n z.custom()\n).nullish().optional();\n\n// src/model.ts\nimport cuid from \"cuid\";\nvar generateFirestoreId = () => {\n return cuid();\n};\nvar IdModelSchema = z2.union([z2.string(), z2.number()]);\nvar IdModelProcess = z2.preprocess((val) => {\n if (val === void 0 || val === null) {\n return generateFirestoreId();\n }\n return val;\n}, IdModelSchema);\nvar ModelSchema = z2.object({\n id: IdModelProcess,\n createdAt: TimestampOrNow,\n updatedAt: TimestampOrNow,\n order: z2.coerce.number().nullish().optional()\n});\nvar PreviousSchema = ModelSchema.extend({\n previous: z2.lazy(() => ModelSchema.array().optional())\n});\nvar EnabledSchema = z2.object({\n enabled: z2.boolean().optional()\n});\n\n// src/model/storage/file.ts\nimport { z as z3 } from \"zod\";\nvar FileSchema = ModelSchema.extend({\n category: z3.string().optional(),\n description: z3.string(),\n name: z3.string(),\n url: z3.string(),\n path: z3.string()\n});\nexport {\n FileSchema\n};\n","import {z} from \"zod\";\nimport {TimestampOrNow} from \"./model/shared\";\nimport cuid from 'cuid';\n\nexport const generateFirestoreId = () => {\n return cuid();\n}\n\nexport const IdModelSchema = z.union([z.string(), z.number()])\n\nconst IdModelProcess = z.preprocess((val) => {\n if (val === undefined || val === null) {\n return generateFirestoreId();\n }\n return val;\n}, IdModelSchema);\n\nexport const ModelSchema = z.object({\n id: IdModelProcess,\n createdAt: TimestampOrNow,\n updatedAt: TimestampOrNow,\n order: z.coerce.number().nullish().optional()\n});\n\nexport const PreviousSchema = ModelSchema.extend({\n previous: z.lazy(() => ModelSchema.array().optional())\n})\n\nexport const EnabledSchema = z.object({\n enabled: z.boolean().optional()\n})\n\nexport type IdModel = z.infer<typeof IdModelSchema>;\nexport type Model = z.infer<typeof ModelSchema>;\nexport type Previous = z.infer<typeof PreviousSchema>;\nexport type Enabled = z.infer<typeof EnabledSchema>;\nexport type PartialWithId<T extends Model> = Partial<T> & {\n id: NonNullable<T['id']>\n}\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","import {ModelSchema} from \"../../model\";\nimport {z} from \"zod\";\n\nexport const FileSchema = ModelSchema.extend({\n category: z.string().optional(),\n description: z.string(),\n name: z.string(),\n url: z.string(),\n path: z.string(),\n})\n\nexport type File = z.infer<typeof FileSchema>\n"]}
1
+ {"version":3,"sources":["/Users/henriquewilson/Developer/Projects/gabirubi-domain/dist/model/storage/file.mjs","../../../src/model.ts","../../../src/model/shared.ts","../../../src/model/storage/file.ts"],"names":["z","Timestamp","TimestampOrNow","preprocess","arg","now","custom","nullish","optional","cuid","generateFirestoreId","IdModelSchema","union","string","number","IdModelProcess","val","ModelSchema","object","id","createdAt","updatedAt","order","coerce","PreviousSchema","extend","previous","lazy","array","EnabledSchema","enabled","boolean","FileSchema","category","description","name","url","path","encodedPath","token"],"mappings":"AAAA,eAAe;ACA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GAAEa,MAAA;IACf0B,OAAOvC,GAAEa,MAAA;AACX;AHoCA,SACEmB,UAAU,GACV","sourcesContent":["// src/model.ts\nimport { z as z2 } from \"zod\";\n\n// src/model/shared.ts\nimport { Timestamp } from \"@google-cloud/firestore\";\nimport { z } from \"zod\";\nvar TimestampOrNow = z.preprocess(\n (arg) => arg === void 0 ? Timestamp.now() : arg,\n z.custom()\n).nullish().optional();\n\n// src/model.ts\nimport cuid from \"cuid\";\nvar generateFirestoreId = () => {\n return cuid();\n};\nvar IdModelSchema = z2.union([z2.string(), z2.number()]);\nvar IdModelProcess = z2.preprocess((val) => {\n if (val === void 0 || val === null) {\n return generateFirestoreId();\n }\n return val;\n}, IdModelSchema);\nvar ModelSchema = z2.object({\n id: IdModelProcess,\n createdAt: TimestampOrNow,\n updatedAt: TimestampOrNow,\n order: z2.coerce.number().nullish().optional()\n});\nvar PreviousSchema = ModelSchema.extend({\n previous: z2.lazy(() => ModelSchema.array().optional())\n});\nvar EnabledSchema = z2.object({\n enabled: z2.boolean().optional()\n});\n\n// src/model/storage/file.ts\nimport { z as z3 } from \"zod\";\nvar FileSchema = ModelSchema.extend({\n category: z3.string().optional(),\n description: z3.string().optional(),\n name: z3.string(),\n url: z3.string(),\n path: z3.string(),\n encodedPath: z3.string(),\n token: z3.string()\n});\nexport {\n FileSchema\n};\n","import {z} from \"zod\";\nimport {TimestampOrNow} from \"./model/shared\";\nimport cuid from 'cuid';\n\nexport const generateFirestoreId = () => {\n return cuid();\n}\n\nexport const IdModelSchema = z.union([z.string(), z.number()])\n\nconst IdModelProcess = z.preprocess((val) => {\n if (val === undefined || val === null) {\n return generateFirestoreId();\n }\n return val;\n}, IdModelSchema);\n\nexport const ModelSchema = z.object({\n id: IdModelProcess,\n createdAt: TimestampOrNow,\n updatedAt: TimestampOrNow,\n order: z.coerce.number().nullish().optional()\n});\n\nexport const PreviousSchema = ModelSchema.extend({\n previous: z.lazy(() => ModelSchema.array().optional())\n})\n\nexport const EnabledSchema = z.object({\n enabled: z.boolean().optional()\n})\n\nexport type IdModel = z.infer<typeof IdModelSchema>;\nexport type Model = z.infer<typeof ModelSchema>;\nexport type Previous = z.infer<typeof PreviousSchema>;\nexport type Enabled = z.infer<typeof EnabledSchema>;\nexport type PartialWithId<T extends Model> = Partial<T> & {\n id: NonNullable<T['id']>\n}\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","import {ModelSchema} from \"../../model\";\nimport {z} from \"zod\";\n\nexport const FileSchema = ModelSchema.extend({\n category: z.string().optional(),\n description: z.string().optional(),\n name: z.string(),\n url: z.string(),\n path: z.string(),\n encodedPath: z.string(),\n token: z.string(),\n})\n\nexport type File = z.infer<typeof FileSchema>\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@_henriquewilson/gabirubi-domain",
3
- "version": "1.3.17",
3
+ "version": "1.3.19",
4
4
  "description": "gabirubi domain",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",