@_henriquewilson/gabirubi-domain 1.3.53 → 1.3.55
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/model/journey.d.mts +8 -0
- package/dist/model/journey.d.ts +8 -0
- package/dist/model/journey.js +1 -0
- package/dist/model/journey.js.map +1 -1
- package/dist/model/journey.mjs +1 -0
- package/dist/model/journey.mjs.map +1 -1
- package/dist/model/subscription.model.d.mts +22 -22
- package/dist/model/subscription.model.d.ts +22 -22
- package/dist/model/subscription.model.js +1 -1
- package/dist/model/subscription.model.js.map +1 -1
- package/dist/model/subscription.model.mjs +1 -1
- package/dist/model/subscription.model.mjs.map +1 -1
- package/dist/test/activity.test.js +1 -0
- package/dist/test/activity.test.js.map +1 -1
- package/dist/test/activity.test.mjs +1 -0
- package/dist/test/activity.test.mjs.map +1 -1
- package/package.json +1 -1
package/dist/model/journey.d.mts
CHANGED
|
@@ -54,6 +54,7 @@ declare const PlanSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
54
54
|
price: z.ZodNumber;
|
|
55
55
|
period: z.ZodDefault<z.ZodEnum<["month", "year"]>>;
|
|
56
56
|
pixPrice: z.ZodNumber;
|
|
57
|
+
mode: z.ZodString;
|
|
57
58
|
stripePrice: z.ZodString;
|
|
58
59
|
}>, "strip", z.ZodTypeAny, {
|
|
59
60
|
id: string | number;
|
|
@@ -62,6 +63,7 @@ declare const PlanSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
62
63
|
price: number;
|
|
63
64
|
period: "month" | "year";
|
|
64
65
|
pixPrice: number;
|
|
66
|
+
mode: string;
|
|
65
67
|
stripePrice: string;
|
|
66
68
|
createdAt?: FirebaseFirestore.Timestamp | null | undefined;
|
|
67
69
|
updatedAt?: FirebaseFirestore.Timestamp | null | undefined;
|
|
@@ -71,6 +73,7 @@ declare const PlanSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
71
73
|
title: string;
|
|
72
74
|
price: number;
|
|
73
75
|
pixPrice: number;
|
|
76
|
+
mode: string;
|
|
74
77
|
stripePrice: string;
|
|
75
78
|
id?: unknown;
|
|
76
79
|
createdAt?: unknown;
|
|
@@ -340,6 +343,7 @@ declare const JourneySchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.e
|
|
|
340
343
|
price: z.ZodNumber;
|
|
341
344
|
period: z.ZodDefault<z.ZodEnum<["month", "year"]>>;
|
|
342
345
|
pixPrice: z.ZodNumber;
|
|
346
|
+
mode: z.ZodString;
|
|
343
347
|
stripePrice: z.ZodString;
|
|
344
348
|
}>, "strip", z.ZodTypeAny, {
|
|
345
349
|
id: string | number;
|
|
@@ -348,6 +352,7 @@ declare const JourneySchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.e
|
|
|
348
352
|
price: number;
|
|
349
353
|
period: "month" | "year";
|
|
350
354
|
pixPrice: number;
|
|
355
|
+
mode: string;
|
|
351
356
|
stripePrice: string;
|
|
352
357
|
createdAt?: FirebaseFirestore.Timestamp | null | undefined;
|
|
353
358
|
updatedAt?: FirebaseFirestore.Timestamp | null | undefined;
|
|
@@ -357,6 +362,7 @@ declare const JourneySchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.e
|
|
|
357
362
|
title: string;
|
|
358
363
|
price: number;
|
|
359
364
|
pixPrice: number;
|
|
365
|
+
mode: string;
|
|
360
366
|
stripePrice: string;
|
|
361
367
|
id?: unknown;
|
|
362
368
|
createdAt?: unknown;
|
|
@@ -446,6 +452,7 @@ declare const JourneySchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.e
|
|
|
446
452
|
price: number;
|
|
447
453
|
period: "month" | "year";
|
|
448
454
|
pixPrice: number;
|
|
455
|
+
mode: string;
|
|
449
456
|
stripePrice: string;
|
|
450
457
|
createdAt?: FirebaseFirestore.Timestamp | null | undefined;
|
|
451
458
|
updatedAt?: FirebaseFirestore.Timestamp | null | undefined;
|
|
@@ -520,6 +527,7 @@ declare const JourneySchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.e
|
|
|
520
527
|
title: string;
|
|
521
528
|
price: number;
|
|
522
529
|
pixPrice: number;
|
|
530
|
+
mode: string;
|
|
523
531
|
stripePrice: string;
|
|
524
532
|
id?: unknown;
|
|
525
533
|
createdAt?: unknown;
|
package/dist/model/journey.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ declare const PlanSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
54
54
|
price: z.ZodNumber;
|
|
55
55
|
period: z.ZodDefault<z.ZodEnum<["month", "year"]>>;
|
|
56
56
|
pixPrice: z.ZodNumber;
|
|
57
|
+
mode: z.ZodString;
|
|
57
58
|
stripePrice: z.ZodString;
|
|
58
59
|
}>, "strip", z.ZodTypeAny, {
|
|
59
60
|
id: string | number;
|
|
@@ -62,6 +63,7 @@ declare const PlanSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
62
63
|
price: number;
|
|
63
64
|
period: "month" | "year";
|
|
64
65
|
pixPrice: number;
|
|
66
|
+
mode: string;
|
|
65
67
|
stripePrice: string;
|
|
66
68
|
createdAt?: FirebaseFirestore.Timestamp | null | undefined;
|
|
67
69
|
updatedAt?: FirebaseFirestore.Timestamp | null | undefined;
|
|
@@ -71,6 +73,7 @@ declare const PlanSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
71
73
|
title: string;
|
|
72
74
|
price: number;
|
|
73
75
|
pixPrice: number;
|
|
76
|
+
mode: string;
|
|
74
77
|
stripePrice: string;
|
|
75
78
|
id?: unknown;
|
|
76
79
|
createdAt?: unknown;
|
|
@@ -340,6 +343,7 @@ declare const JourneySchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.e
|
|
|
340
343
|
price: z.ZodNumber;
|
|
341
344
|
period: z.ZodDefault<z.ZodEnum<["month", "year"]>>;
|
|
342
345
|
pixPrice: z.ZodNumber;
|
|
346
|
+
mode: z.ZodString;
|
|
343
347
|
stripePrice: z.ZodString;
|
|
344
348
|
}>, "strip", z.ZodTypeAny, {
|
|
345
349
|
id: string | number;
|
|
@@ -348,6 +352,7 @@ declare const JourneySchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.e
|
|
|
348
352
|
price: number;
|
|
349
353
|
period: "month" | "year";
|
|
350
354
|
pixPrice: number;
|
|
355
|
+
mode: string;
|
|
351
356
|
stripePrice: string;
|
|
352
357
|
createdAt?: FirebaseFirestore.Timestamp | null | undefined;
|
|
353
358
|
updatedAt?: FirebaseFirestore.Timestamp | null | undefined;
|
|
@@ -357,6 +362,7 @@ declare const JourneySchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.e
|
|
|
357
362
|
title: string;
|
|
358
363
|
price: number;
|
|
359
364
|
pixPrice: number;
|
|
365
|
+
mode: string;
|
|
360
366
|
stripePrice: string;
|
|
361
367
|
id?: unknown;
|
|
362
368
|
createdAt?: unknown;
|
|
@@ -446,6 +452,7 @@ declare const JourneySchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.e
|
|
|
446
452
|
price: number;
|
|
447
453
|
period: "month" | "year";
|
|
448
454
|
pixPrice: number;
|
|
455
|
+
mode: string;
|
|
449
456
|
stripePrice: string;
|
|
450
457
|
createdAt?: FirebaseFirestore.Timestamp | null | undefined;
|
|
451
458
|
updatedAt?: FirebaseFirestore.Timestamp | null | undefined;
|
|
@@ -520,6 +527,7 @@ declare const JourneySchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.e
|
|
|
520
527
|
title: string;
|
|
521
528
|
price: number;
|
|
522
529
|
pixPrice: number;
|
|
530
|
+
mode: string;
|
|
523
531
|
stripePrice: string;
|
|
524
532
|
id?: unknown;
|
|
525
533
|
createdAt?: unknown;
|
package/dist/model/journey.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/henriquewilson/Developer/Projects/gabirubi-domain/dist/model/journey.js","../../src/model/journey.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","journey_exports","ActivitySchema","JourneyButtonSchema","JourneyContentTypeSchema","JourneySchema","ModuleSchema","ModuleWithActivities","PlanSchema","PublishOnDate","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","publishOnDate","unpublishOnDate","published","import_zod3","default","type","enum","label","link","title","description","price","period","pixPrice","stripePrice","activitiesCounter","lastNewsDate","thumbnail","expirationDate","startDate","gridButton","tag","actionToUnlock","content","buttons","settings","info","chat","openingMessageDay","closingMessageNight","chatIsEnabled","chatURLs","stripeProductId","plans","merge","isPrivate","isExclusive","contentType","files","url","hideComments","showChat","reference","tagsStr","activities"],"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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,OAAOC,OAAO,GAAG;IACrBT,gBAAAA;IACAC,qBAAAA;IACAC,0BAAAA;IACAC,eAAAA;IACAC,cAAAA;IACAC,sBAAAA;IACAC,YAAAA;IACAC,eAAAA;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/journey.ts\nvar journey_exports = {};\n__export(journey_exports, {\n ActivitySchema: () => ActivitySchema,\n JourneyButtonSchema: () => JourneyButtonSchema,\n JourneyContentTypeSchema: () => JourneyContentTypeSchema,\n JourneySchema: () => JourneySchema,\n ModuleSchema: () => ModuleSchema,\n ModuleWithActivities: () => ModuleWithActivities,\n PlanSchema: () => PlanSchema,\n PublishOnDate: () => PublishOnDate\n});\nmodule.exports = __toCommonJS(journey_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/journey.ts\nvar import_zod3 = require(\"zod\");\nvar PublishOnDate = ModelSchema.extend({\n publishOnDate: TimestampOrNow,\n unpublishOnDate: TimestampOrNow,\n published: import_zod3.z.boolean().default(false)\n});\nvar JourneyButtonSchema = import_zod3.z.object({\n type: import_zod3.z.enum([\"primary\", \"warning\", \"normal\"]),\n label: import_zod3.z.string(),\n link: import_zod3.z.string(),\n target: import_zod3.z.enum([\"_blank\", \"_self\"]).default(\"_self\")\n});\nvar PlanSchema = ModelSchema.extend({\n title: import_zod3.z.string(),\n description: import_zod3.z.string().optional(),\n enabled: import_zod3.z.boolean().default(true),\n price: import_zod3.z.number(),\n period: import_zod3.z.enum([\"month\", \"year\"]).default(\"month\"),\n pixPrice: import_zod3.z.number(),\n stripePrice: import_zod3.z.string()\n});\nvar JourneySchema = ModelSchema.extend({\n activitiesCounter: import_zod3.z.number(),\n lastNewsDate: TimestampOrNow,\n title: import_zod3.z.string(),\n type: import_zod3.z.enum([\"simple\", \"modular\", \"free\"]),\n description: import_zod3.z.string().optional(),\n thumbnail: import_zod3.z.string().optional(),\n expirationDate: TimestampOrNow.optional(),\n startDate: TimestampOrNow.optional(),\n gridButton: JourneyButtonSchema.optional(),\n tag: import_zod3.z.string().optional(),\n actionToUnlock: import_zod3.z.object({\n type: import_zod3.z.enum([\"link\", \"message\"]),\n content: import_zod3.z.string(),\n buttons: import_zod3.z.array(JourneyButtonSchema).optional()\n }).optional(),\n settings: import_zod3.z.object({\n info: import_zod3.z.object({\n thumbnail: import_zod3.z.string().optional(),\n expirationDate: TimestampOrNow.optional(),\n startDate: TimestampOrNow.optional(),\n gridButton: JourneyButtonSchema.optional(),\n tag: import_zod3.z.string().optional(),\n actionToUnlock: import_zod3.z.object({\n type: import_zod3.z.enum([\"link\", \"message\"]),\n content: import_zod3.z.string(),\n buttons: import_zod3.z.array(JourneyButtonSchema).optional()\n }).optional()\n }).optional(),\n chat: import_zod3.z.object({\n openingMessageDay: import_zod3.z.string().optional(),\n // closingMessageDay: z.string().optional(),\n // openingMessageNight: z.string().optional(),\n closingMessageNight: import_zod3.z.string().optional(),\n chatIsEnabled: import_zod3.z.boolean().default(false),\n chatURLs: import_zod3.z.array(import_zod3.z.string()).optional()\n }).optional()\n }).optional(),\n stripeProductId: import_zod3.z.string().optional(),\n plans: import_zod3.z.array(PlanSchema).optional()\n}).merge(PublishOnDate);\nvar ModuleSchema = ModelSchema.extend({\n title: import_zod3.z.string(),\n isPrivate: import_zod3.z.boolean().default(true),\n isExclusive: import_zod3.z.boolean().nullish().optional()\n}).merge(PreviousSchema).merge(PublishOnDate);\nvar JourneyContentTypeSchema = import_zod3.z.enum([\"video\", \"document\", \"audio\", \"text\", \"soundcloud\", \"youtube\", \"form\", \"live\", \"file\"]);\nvar ActivitySchema = ModelSchema.extend({\n title: import_zod3.z.string(),\n description: import_zod3.z.string().optional(),\n contentType: JourneyContentTypeSchema,\n content: import_zod3.z.string(),\n files: import_zod3.z.array(import_zod3.z.object({\n label: import_zod3.z.string().optional(),\n url: import_zod3.z.string()\n })).optional(),\n hideComments: import_zod3.z.boolean().default(false),\n showChat: import_zod3.z.boolean().default(false),\n reference: import_zod3.z.string().optional(),\n tagsStr: import_zod3.z.string().optional()\n}).merge(PublishOnDate);\nvar ModuleWithActivities = ModuleSchema.extend({\n activities: ActivitySchema.array()\n});\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n ActivitySchema,\n JourneyButtonSchema,\n JourneyContentTypeSchema,\n JourneySchema,\n ModuleSchema,\n ModuleWithActivities,\n PlanSchema,\n PublishOnDate\n});\n","import {ModelSchema, PreviousSchema} from \"../model\";\nimport {z} from \"zod\";\nimport {TimestampOrNow} from \"./shared\";\n\nexport const PublishOnDate = ModelSchema.extend({\n publishOnDate: TimestampOrNow,\n unpublishOnDate: TimestampOrNow,\n published: z.boolean().default(false),\n})\n\nexport const JourneyButtonSchema = z.object({\n type: z.enum(['primary', 'warning', 'normal']),\n label: z.string(),\n link: z.string(),\n target: z.enum(['_blank', '_self']).default('_self'),\n})\n\nexport const PlanSchema = ModelSchema.extend({\n title: z.string(),\n description: z.string().optional(),\n enabled: z.boolean().default(true),\n price: z.number(),\n period: z.enum(['month', 'year']).default('month'),\n pixPrice: z.number(),\n stripePrice: z.string(),\n})\n\nexport const JourneySchema = ModelSchema.extend({\n activitiesCounter: z.number(),\n lastNewsDate: TimestampOrNow,\n title: z.string(),\n type: z.enum(['simple', 'modular', 'free']),\n description: z.string().optional(),\n thumbnail: z.string().optional(),\n expirationDate: TimestampOrNow.optional(),\n startDate: TimestampOrNow.optional(),\n gridButton: JourneyButtonSchema.optional(),\n tag: z.string().optional(),\n actionToUnlock: z.object({\n type: z.enum(['link', 'message']),\n content: z.string(),\n buttons: z.array(JourneyButtonSchema).optional()\n }).optional(),\n settings: z.object({\n info: z.object({\n thumbnail: z.string().optional(),\n expirationDate: TimestampOrNow.optional(),\n startDate: TimestampOrNow.optional(),\n gridButton: JourneyButtonSchema.optional(),\n tag: z.string().optional(),\n actionToUnlock: z.object({\n type: z.enum(['link', 'message']),\n content: z.string(),\n buttons: z.array(JourneyButtonSchema).optional()\n }).optional(),\n }).optional(),\n chat: z.object({\n openingMessageDay: z.string().optional(),\n // closingMessageDay: z.string().optional(),\n // openingMessageNight: z.string().optional(),\n closingMessageNight: z.string().optional(),\n chatIsEnabled: z.boolean().default(false),\n chatURLs: z.array(z.string()).optional(),\n }).optional()\n }).optional(),\n stripeProductId: z.string().optional(),\n plans: z.array(PlanSchema).optional(),\n}).merge(PublishOnDate)\n\n\nexport const ModuleSchema = ModelSchema.extend({\n title: z.string(),\n isPrivate: z.boolean().default(true),\n isExclusive: z.boolean().nullish().optional(),\n}).merge(PreviousSchema).merge(PublishOnDate)\n\nexport const JourneyContentTypeSchema = z.enum(['video', 'document', 'audio', 'text', 'soundcloud', 'youtube', 'form', 'live', 'file'])\n\nexport const ActivitySchema = ModelSchema.extend({\n title: z.string(),\n description: z.string().optional(),\n contentType: JourneyContentTypeSchema,\n content: z.string(),\n files: z.array(z.object({\n label: z.string().optional(),\n url: z.string()\n })).optional(),\n hideComments: z.boolean().default(false),\n showChat: z.boolean().default(false),\n reference: z.string().optional(),\n tagsStr: z.string().optional(),\n}).merge(PublishOnDate);\n\nexport const ModuleWithActivities = ModuleSchema.extend({\n activities: ActivitySchema.array()\n})\n\nexport type Module = z.infer<typeof ModuleSchema>\nexport type Journey = z.infer<typeof JourneySchema>\nexport type Plan = z.infer<typeof PlanSchema>\nexport type ModuleWithActivities = z.infer<typeof ModuleWithActivities>\nexport type Activity = z.infer<typeof ActivitySchema>\nexport type JourneyContentType = z.infer<typeof JourneyContentTypeSchema>\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/journey.js","../../src/model/journey.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","journey_exports","ActivitySchema","JourneyButtonSchema","JourneyContentTypeSchema","JourneySchema","ModuleSchema","ModuleWithActivities","PlanSchema","PublishOnDate","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","publishOnDate","unpublishOnDate","published","import_zod3","default","type","enum","label","link","title","description","price","period","pixPrice","mode","stripePrice","activitiesCounter","lastNewsDate","thumbnail","expirationDate","startDate","gridButton","tag","actionToUnlock","content","buttons","settings","info","chat","openingMessageDay","closingMessageNight","chatIsEnabled","chatURLs","stripeProductId","plans","merge","isPrivate","isExclusive","contentType","files","url","hideComments","showChat","reference","tagsStr","activities"],"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,iEA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AMrD,iBAAiBgC,YAAYQ,MAAA,CAAO;IAC/CgB,OAAON,YAAApC,CAAA,CAAEc,MAAA;IACT6B,aAAaP,YAAApC,CAAA,CAAEc,MAAA,GAASP,QAAA;IACxBgE,aAAanF;IACbqE,SAASrB,YAAApC,CAAA,CAAEc,MAAA;IACX0D,OAAOpC,YAAApC,CAAA,CAAE6B,KAAA,CAAMO,YAAApC,CAAA,CAAEmB,MAAA,CAAO;QACtBqB,OAAOJ,YAAApC,CAAA,CAAEc,MAAA,GAASP,QAAA;QAClBkE,KAAKrC,YAAApC,CAAA,CAAEc,MAAA;IACT,IAAIP,QAAA;IACJmE,cAActC,YAAApC,CAAA,CAAEgC,OAAA,GAAUK,OAAA,CAAQ;IAClCsC,UAAUvC,YAAApC,CAAA,CAAEgC,OAAA,GAAUK,OAAA,CAAQ;IAC9BuC,WAAWxC,YAAApC,CAAA,CAAEc,MAAA,GAASP,QAAA;IACtBsE,SAASzC,YAAApC,CAAA,CAAEc,MAAA,GAASP,QAAA;AACtB,GAAG6D,KAAA,CAAM3E;AAEF,IAAMF,uBAAuBD,aAAaoC,MAAA,CAAO;IACtDoD,YAAY5F,eAAe2C,KAAA;AAC7B;ADsEA,6DAA6D;AAC7D,KAAMnC,CAAAA,OAAOC,OAAO,GAAG;IACrBT,gBAAAA;IACAC,qBAAAA;IACAC,0BAAAA;IACAC,eAAAA;IACAC,cAAAA;IACAC,sBAAAA;IACAC,YAAAA;IACAC,eAAAA;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/journey.ts\nvar journey_exports = {};\n__export(journey_exports, {\n ActivitySchema: () => ActivitySchema,\n JourneyButtonSchema: () => JourneyButtonSchema,\n JourneyContentTypeSchema: () => JourneyContentTypeSchema,\n JourneySchema: () => JourneySchema,\n ModuleSchema: () => ModuleSchema,\n ModuleWithActivities: () => ModuleWithActivities,\n PlanSchema: () => PlanSchema,\n PublishOnDate: () => PublishOnDate\n});\nmodule.exports = __toCommonJS(journey_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/journey.ts\nvar import_zod3 = require(\"zod\");\nvar PublishOnDate = ModelSchema.extend({\n publishOnDate: TimestampOrNow,\n unpublishOnDate: TimestampOrNow,\n published: import_zod3.z.boolean().default(false)\n});\nvar JourneyButtonSchema = import_zod3.z.object({\n type: import_zod3.z.enum([\"primary\", \"warning\", \"normal\"]),\n label: import_zod3.z.string(),\n link: import_zod3.z.string(),\n target: import_zod3.z.enum([\"_blank\", \"_self\"]).default(\"_self\")\n});\nvar PlanSchema = ModelSchema.extend({\n title: import_zod3.z.string(),\n description: import_zod3.z.string().optional(),\n enabled: import_zod3.z.boolean().default(true),\n price: import_zod3.z.number(),\n period: import_zod3.z.enum([\"month\", \"year\"]).default(\"month\"),\n pixPrice: import_zod3.z.number(),\n mode: import_zod3.z.string(),\n stripePrice: import_zod3.z.string()\n});\nvar JourneySchema = ModelSchema.extend({\n activitiesCounter: import_zod3.z.number(),\n lastNewsDate: TimestampOrNow,\n title: import_zod3.z.string(),\n type: import_zod3.z.enum([\"simple\", \"modular\", \"free\"]),\n description: import_zod3.z.string().optional(),\n thumbnail: import_zod3.z.string().optional(),\n expirationDate: TimestampOrNow.optional(),\n startDate: TimestampOrNow.optional(),\n gridButton: JourneyButtonSchema.optional(),\n tag: import_zod3.z.string().optional(),\n actionToUnlock: import_zod3.z.object({\n type: import_zod3.z.enum([\"link\", \"message\"]),\n content: import_zod3.z.string(),\n buttons: import_zod3.z.array(JourneyButtonSchema).optional()\n }).optional(),\n settings: import_zod3.z.object({\n info: import_zod3.z.object({\n thumbnail: import_zod3.z.string().optional(),\n expirationDate: TimestampOrNow.optional(),\n startDate: TimestampOrNow.optional(),\n gridButton: JourneyButtonSchema.optional(),\n tag: import_zod3.z.string().optional(),\n actionToUnlock: import_zod3.z.object({\n type: import_zod3.z.enum([\"link\", \"message\"]),\n content: import_zod3.z.string(),\n buttons: import_zod3.z.array(JourneyButtonSchema).optional()\n }).optional()\n }).optional(),\n chat: import_zod3.z.object({\n openingMessageDay: import_zod3.z.string().optional(),\n // closingMessageDay: z.string().optional(),\n // openingMessageNight: z.string().optional(),\n closingMessageNight: import_zod3.z.string().optional(),\n chatIsEnabled: import_zod3.z.boolean().default(false),\n chatURLs: import_zod3.z.array(import_zod3.z.string()).optional()\n }).optional()\n }).optional(),\n stripeProductId: import_zod3.z.string().optional(),\n plans: import_zod3.z.array(PlanSchema).optional()\n}).merge(PublishOnDate);\nvar ModuleSchema = ModelSchema.extend({\n title: import_zod3.z.string(),\n isPrivate: import_zod3.z.boolean().default(true),\n isExclusive: import_zod3.z.boolean().nullish().optional()\n}).merge(PreviousSchema).merge(PublishOnDate);\nvar JourneyContentTypeSchema = import_zod3.z.enum([\"video\", \"document\", \"audio\", \"text\", \"soundcloud\", \"youtube\", \"form\", \"live\", \"file\"]);\nvar ActivitySchema = ModelSchema.extend({\n title: import_zod3.z.string(),\n description: import_zod3.z.string().optional(),\n contentType: JourneyContentTypeSchema,\n content: import_zod3.z.string(),\n files: import_zod3.z.array(import_zod3.z.object({\n label: import_zod3.z.string().optional(),\n url: import_zod3.z.string()\n })).optional(),\n hideComments: import_zod3.z.boolean().default(false),\n showChat: import_zod3.z.boolean().default(false),\n reference: import_zod3.z.string().optional(),\n tagsStr: import_zod3.z.string().optional()\n}).merge(PublishOnDate);\nvar ModuleWithActivities = ModuleSchema.extend({\n activities: ActivitySchema.array()\n});\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n ActivitySchema,\n JourneyButtonSchema,\n JourneyContentTypeSchema,\n JourneySchema,\n ModuleSchema,\n ModuleWithActivities,\n PlanSchema,\n PublishOnDate\n});\n","import {ModelSchema, PreviousSchema} from \"../model\";\nimport {z} from \"zod\";\nimport {TimestampOrNow} from \"./shared\";\n\nexport const PublishOnDate = ModelSchema.extend({\n publishOnDate: TimestampOrNow,\n unpublishOnDate: TimestampOrNow,\n published: z.boolean().default(false),\n})\n\nexport const JourneyButtonSchema = z.object({\n type: z.enum(['primary', 'warning', 'normal']),\n label: z.string(),\n link: z.string(),\n target: z.enum(['_blank', '_self']).default('_self'),\n})\n\nexport const PlanSchema = ModelSchema.extend({\n title: z.string(),\n description: z.string().optional(),\n enabled: z.boolean().default(true),\n price: z.number(),\n period: z.enum(['month', 'year']).default('month'),\n pixPrice: z.number(),\n mode: z.string(),\n stripePrice: z.string(),\n})\n\nexport const JourneySchema = ModelSchema.extend({\n activitiesCounter: z.number(),\n lastNewsDate: TimestampOrNow,\n title: z.string(),\n type: z.enum(['simple', 'modular', 'free']),\n description: z.string().optional(),\n thumbnail: z.string().optional(),\n expirationDate: TimestampOrNow.optional(),\n startDate: TimestampOrNow.optional(),\n gridButton: JourneyButtonSchema.optional(),\n tag: z.string().optional(),\n actionToUnlock: z.object({\n type: z.enum(['link', 'message']),\n content: z.string(),\n buttons: z.array(JourneyButtonSchema).optional()\n }).optional(),\n settings: z.object({\n info: z.object({\n thumbnail: z.string().optional(),\n expirationDate: TimestampOrNow.optional(),\n startDate: TimestampOrNow.optional(),\n gridButton: JourneyButtonSchema.optional(),\n tag: z.string().optional(),\n actionToUnlock: z.object({\n type: z.enum(['link', 'message']),\n content: z.string(),\n buttons: z.array(JourneyButtonSchema).optional()\n }).optional(),\n }).optional(),\n chat: z.object({\n openingMessageDay: z.string().optional(),\n // closingMessageDay: z.string().optional(),\n // openingMessageNight: z.string().optional(),\n closingMessageNight: z.string().optional(),\n chatIsEnabled: z.boolean().default(false),\n chatURLs: z.array(z.string()).optional(),\n }).optional()\n }).optional(),\n stripeProductId: z.string().optional(),\n plans: z.array(PlanSchema).optional(),\n}).merge(PublishOnDate)\n\n\nexport const ModuleSchema = ModelSchema.extend({\n title: z.string(),\n isPrivate: z.boolean().default(true),\n isExclusive: z.boolean().nullish().optional(),\n}).merge(PreviousSchema).merge(PublishOnDate)\n\nexport const JourneyContentTypeSchema = z.enum(['video', 'document', 'audio', 'text', 'soundcloud', 'youtube', 'form', 'live', 'file'])\n\nexport const ActivitySchema = ModelSchema.extend({\n title: z.string(),\n description: z.string().optional(),\n contentType: JourneyContentTypeSchema,\n content: z.string(),\n files: z.array(z.object({\n label: z.string().optional(),\n url: z.string()\n })).optional(),\n hideComments: z.boolean().default(false),\n showChat: z.boolean().default(false),\n reference: z.string().optional(),\n tagsStr: z.string().optional(),\n}).merge(PublishOnDate);\n\nexport const ModuleWithActivities = ModuleSchema.extend({\n activities: ActivitySchema.array()\n})\n\nexport type Module = z.infer<typeof ModuleSchema>\nexport type Journey = z.infer<typeof JourneySchema>\nexport type Plan = z.infer<typeof PlanSchema>\nexport type ModuleWithActivities = z.infer<typeof ModuleWithActivities>\nexport type Activity = z.infer<typeof ActivitySchema>\nexport type JourneyContentType = z.infer<typeof JourneyContentTypeSchema>\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"]}
|
package/dist/model/journey.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/henriquewilson/Developer/Projects/gabirubi-domain/dist/model/journey.mjs","../../src/model.ts","../../src/model/shared.ts","../../src/model/journey.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","PublishOnDate","publishOnDate","unpublishOnDate","published","default","JourneyButtonSchema","type","enum","label","link","target","PlanSchema","title","description","price","period","pixPrice","stripePrice","JourneySchema","activitiesCounter","lastNewsDate","thumbnail","expirationDate","startDate","gridButton","tag","actionToUnlock","content","buttons","settings","info","chat","openingMessageDay","closingMessageNight","chatIsEnabled","chatURLs","stripeProductId","plans","merge","ModuleSchema","isPrivate","isExclusive","JourneyContentTypeSchema","ActivitySchema","contentType","files","url","hideComments","showChat","reference","tagsStr","ModuleWithActivities","activities"],"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;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AACtB,GAAG8D,KAAA,CAAMtC;AAEF,IAAMmD,uBAAuBZ,aAAa9C,MAAA,CAAO;IACtD2D,YAAYT,eAAe/C,KAAA;AAC7B;AH2BA,SACE+C,cAAc,EACdtC,mBAAmB,EACnBqC,wBAAwB,EACxBxB,aAAa,EACbqB,YAAY,EACZY,oBAAoB,EACpBxC,UAAU,EACVX,aAAa,GACb","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/journey.ts\nimport { z as z3 } from \"zod\";\nvar PublishOnDate = ModelSchema.extend({\n publishOnDate: TimestampOrNow,\n unpublishOnDate: TimestampOrNow,\n published: z3.boolean().default(false)\n});\nvar JourneyButtonSchema = z3.object({\n type: z3.enum([\"primary\", \"warning\", \"normal\"]),\n label: z3.string(),\n link: z3.string(),\n target: z3.enum([\"_blank\", \"_self\"]).default(\"_self\")\n});\nvar PlanSchema = ModelSchema.extend({\n title: z3.string(),\n description: z3.string().optional(),\n enabled: z3.boolean().default(true),\n price: z3.number(),\n period: z3.enum([\"month\", \"year\"]).default(\"month\"),\n pixPrice: z3.number(),\n stripePrice: z3.string()\n});\nvar JourneySchema = ModelSchema.extend({\n activitiesCounter: z3.number(),\n lastNewsDate: TimestampOrNow,\n title: z3.string(),\n type: z3.enum([\"simple\", \"modular\", \"free\"]),\n description: z3.string().optional(),\n thumbnail: z3.string().optional(),\n expirationDate: TimestampOrNow.optional(),\n startDate: TimestampOrNow.optional(),\n gridButton: JourneyButtonSchema.optional(),\n tag: z3.string().optional(),\n actionToUnlock: z3.object({\n type: z3.enum([\"link\", \"message\"]),\n content: z3.string(),\n buttons: z3.array(JourneyButtonSchema).optional()\n }).optional(),\n settings: z3.object({\n info: z3.object({\n thumbnail: z3.string().optional(),\n expirationDate: TimestampOrNow.optional(),\n startDate: TimestampOrNow.optional(),\n gridButton: JourneyButtonSchema.optional(),\n tag: z3.string().optional(),\n actionToUnlock: z3.object({\n type: z3.enum([\"link\", \"message\"]),\n content: z3.string(),\n buttons: z3.array(JourneyButtonSchema).optional()\n }).optional()\n }).optional(),\n chat: z3.object({\n openingMessageDay: z3.string().optional(),\n // closingMessageDay: z.string().optional(),\n // openingMessageNight: z.string().optional(),\n closingMessageNight: z3.string().optional(),\n chatIsEnabled: z3.boolean().default(false),\n chatURLs: z3.array(z3.string()).optional()\n }).optional()\n }).optional(),\n stripeProductId: z3.string().optional(),\n plans: z3.array(PlanSchema).optional()\n}).merge(PublishOnDate);\nvar ModuleSchema = ModelSchema.extend({\n title: z3.string(),\n isPrivate: z3.boolean().default(true),\n isExclusive: z3.boolean().nullish().optional()\n}).merge(PreviousSchema).merge(PublishOnDate);\nvar JourneyContentTypeSchema = z3.enum([\"video\", \"document\", \"audio\", \"text\", \"soundcloud\", \"youtube\", \"form\", \"live\", \"file\"]);\nvar ActivitySchema = ModelSchema.extend({\n title: z3.string(),\n description: z3.string().optional(),\n contentType: JourneyContentTypeSchema,\n content: z3.string(),\n files: z3.array(z3.object({\n label: z3.string().optional(),\n url: z3.string()\n })).optional(),\n hideComments: z3.boolean().default(false),\n showChat: z3.boolean().default(false),\n reference: z3.string().optional(),\n tagsStr: z3.string().optional()\n}).merge(PublishOnDate);\nvar ModuleWithActivities = ModuleSchema.extend({\n activities: ActivitySchema.array()\n});\nexport {\n ActivitySchema,\n JourneyButtonSchema,\n JourneyContentTypeSchema,\n JourneySchema,\n ModuleSchema,\n ModuleWithActivities,\n PlanSchema,\n PublishOnDate\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, PreviousSchema} from \"../model\";\nimport {z} from \"zod\";\nimport {TimestampOrNow} from \"./shared\";\n\nexport const PublishOnDate = ModelSchema.extend({\n publishOnDate: TimestampOrNow,\n unpublishOnDate: TimestampOrNow,\n published: z.boolean().default(false),\n})\n\nexport const JourneyButtonSchema = z.object({\n type: z.enum(['primary', 'warning', 'normal']),\n label: z.string(),\n link: z.string(),\n target: z.enum(['_blank', '_self']).default('_self'),\n})\n\nexport const PlanSchema = ModelSchema.extend({\n title: z.string(),\n description: z.string().optional(),\n enabled: z.boolean().default(true),\n price: z.number(),\n period: z.enum(['month', 'year']).default('month'),\n pixPrice: z.number(),\n stripePrice: z.string(),\n})\n\nexport const JourneySchema = ModelSchema.extend({\n activitiesCounter: z.number(),\n lastNewsDate: TimestampOrNow,\n title: z.string(),\n type: z.enum(['simple', 'modular', 'free']),\n description: z.string().optional(),\n thumbnail: z.string().optional(),\n expirationDate: TimestampOrNow.optional(),\n startDate: TimestampOrNow.optional(),\n gridButton: JourneyButtonSchema.optional(),\n tag: z.string().optional(),\n actionToUnlock: z.object({\n type: z.enum(['link', 'message']),\n content: z.string(),\n buttons: z.array(JourneyButtonSchema).optional()\n }).optional(),\n settings: z.object({\n info: z.object({\n thumbnail: z.string().optional(),\n expirationDate: TimestampOrNow.optional(),\n startDate: TimestampOrNow.optional(),\n gridButton: JourneyButtonSchema.optional(),\n tag: z.string().optional(),\n actionToUnlock: z.object({\n type: z.enum(['link', 'message']),\n content: z.string(),\n buttons: z.array(JourneyButtonSchema).optional()\n }).optional(),\n }).optional(),\n chat: z.object({\n openingMessageDay: z.string().optional(),\n // closingMessageDay: z.string().optional(),\n // openingMessageNight: z.string().optional(),\n closingMessageNight: z.string().optional(),\n chatIsEnabled: z.boolean().default(false),\n chatURLs: z.array(z.string()).optional(),\n }).optional()\n }).optional(),\n stripeProductId: z.string().optional(),\n plans: z.array(PlanSchema).optional(),\n}).merge(PublishOnDate)\n\n\nexport const ModuleSchema = ModelSchema.extend({\n title: z.string(),\n isPrivate: z.boolean().default(true),\n isExclusive: z.boolean().nullish().optional(),\n}).merge(PreviousSchema).merge(PublishOnDate)\n\nexport const JourneyContentTypeSchema = z.enum(['video', 'document', 'audio', 'text', 'soundcloud', 'youtube', 'form', 'live', 'file'])\n\nexport const ActivitySchema = ModelSchema.extend({\n title: z.string(),\n description: z.string().optional(),\n contentType: JourneyContentTypeSchema,\n content: z.string(),\n files: z.array(z.object({\n label: z.string().optional(),\n url: z.string()\n })).optional(),\n hideComments: z.boolean().default(false),\n showChat: z.boolean().default(false),\n reference: z.string().optional(),\n tagsStr: z.string().optional(),\n}).merge(PublishOnDate);\n\nexport const ModuleWithActivities = ModuleSchema.extend({\n activities: ActivitySchema.array()\n})\n\nexport type Module = z.infer<typeof ModuleSchema>\nexport type Journey = z.infer<typeof JourneySchema>\nexport type Plan = z.infer<typeof PlanSchema>\nexport type ModuleWithActivities = z.infer<typeof ModuleWithActivities>\nexport type Activity = z.infer<typeof ActivitySchema>\nexport type JourneyContentType = z.infer<typeof JourneyContentTypeSchema>\n"]}
|
|
1
|
+
{"version":3,"sources":["/Users/henriquewilson/Developer/Projects/gabirubi-domain/dist/model/journey.mjs","../../src/model.ts","../../src/model/shared.ts","../../src/model/journey.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","PublishOnDate","publishOnDate","unpublishOnDate","published","default","JourneyButtonSchema","type","enum","label","link","target","PlanSchema","title","description","price","period","pixPrice","mode","stripePrice","JourneySchema","activitiesCounter","lastNewsDate","thumbnail","expirationDate","startDate","gridButton","tag","actionToUnlock","content","buttons","settings","info","chat","openingMessageDay","closingMessageNight","chatIsEnabled","chatURLs","stripeProductId","plans","merge","ModuleSchema","isPrivate","isExclusive","JourneyContentTypeSchema","ActivitySchema","contentType","files","url","hideComments","showChat","reference","tagsStr","ModuleWithActivities","activities"],"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,G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E,KAAK/E,GAAEa,MAAA;IACT,IAAIL,QAAA;IACJwE,cAAchF,GAAE+B,OAAA,GAAUK,OAAA,CAAQ;IAClC6C,UAAUjF,GAAE+B,OAAA,GAAUK,OAAA,CAAQ;IAC9B8C,WAAWlF,GAAEa,MAAA,GAASL,QAAA;IACtB2E,SAASnF,GAAEa,MAAA,GAASL,QAAA;AACtB,GAAG+D,KAAA,CAAMvC;AAEF,IAAMoD,uBAAuBZ,aAAa/C,MAAA,CAAO;IACtD4D,YAAYT,eAAehD,KAAA;AAC7B;AH2BA,SACEgD,cAAc,EACdvC,mBAAmB,EACnBsC,wBAAwB,EACxBxB,aAAa,EACbqB,YAAY,EACZY,oBAAoB,EACpBzC,UAAU,EACVX,aAAa,GACb","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/journey.ts\nimport { z as z3 } from \"zod\";\nvar PublishOnDate = ModelSchema.extend({\n publishOnDate: TimestampOrNow,\n unpublishOnDate: TimestampOrNow,\n published: z3.boolean().default(false)\n});\nvar JourneyButtonSchema = z3.object({\n type: z3.enum([\"primary\", \"warning\", \"normal\"]),\n label: z3.string(),\n link: z3.string(),\n target: z3.enum([\"_blank\", \"_self\"]).default(\"_self\")\n});\nvar PlanSchema = ModelSchema.extend({\n title: z3.string(),\n description: z3.string().optional(),\n enabled: z3.boolean().default(true),\n price: z3.number(),\n period: z3.enum([\"month\", \"year\"]).default(\"month\"),\n pixPrice: z3.number(),\n mode: z3.string(),\n stripePrice: z3.string()\n});\nvar JourneySchema = ModelSchema.extend({\n activitiesCounter: z3.number(),\n lastNewsDate: TimestampOrNow,\n title: z3.string(),\n type: z3.enum([\"simple\", \"modular\", \"free\"]),\n description: z3.string().optional(),\n thumbnail: z3.string().optional(),\n expirationDate: TimestampOrNow.optional(),\n startDate: TimestampOrNow.optional(),\n gridButton: JourneyButtonSchema.optional(),\n tag: z3.string().optional(),\n actionToUnlock: z3.object({\n type: z3.enum([\"link\", \"message\"]),\n content: z3.string(),\n buttons: z3.array(JourneyButtonSchema).optional()\n }).optional(),\n settings: z3.object({\n info: z3.object({\n thumbnail: z3.string().optional(),\n expirationDate: TimestampOrNow.optional(),\n startDate: TimestampOrNow.optional(),\n gridButton: JourneyButtonSchema.optional(),\n tag: z3.string().optional(),\n actionToUnlock: z3.object({\n type: z3.enum([\"link\", \"message\"]),\n content: z3.string(),\n buttons: z3.array(JourneyButtonSchema).optional()\n }).optional()\n }).optional(),\n chat: z3.object({\n openingMessageDay: z3.string().optional(),\n // closingMessageDay: z.string().optional(),\n // openingMessageNight: z.string().optional(),\n closingMessageNight: z3.string().optional(),\n chatIsEnabled: z3.boolean().default(false),\n chatURLs: z3.array(z3.string()).optional()\n }).optional()\n }).optional(),\n stripeProductId: z3.string().optional(),\n plans: z3.array(PlanSchema).optional()\n}).merge(PublishOnDate);\nvar ModuleSchema = ModelSchema.extend({\n title: z3.string(),\n isPrivate: z3.boolean().default(true),\n isExclusive: z3.boolean().nullish().optional()\n}).merge(PreviousSchema).merge(PublishOnDate);\nvar JourneyContentTypeSchema = z3.enum([\"video\", \"document\", \"audio\", \"text\", \"soundcloud\", \"youtube\", \"form\", \"live\", \"file\"]);\nvar ActivitySchema = ModelSchema.extend({\n title: z3.string(),\n description: z3.string().optional(),\n contentType: JourneyContentTypeSchema,\n content: z3.string(),\n files: z3.array(z3.object({\n label: z3.string().optional(),\n url: z3.string()\n })).optional(),\n hideComments: z3.boolean().default(false),\n showChat: z3.boolean().default(false),\n reference: z3.string().optional(),\n tagsStr: z3.string().optional()\n}).merge(PublishOnDate);\nvar ModuleWithActivities = ModuleSchema.extend({\n activities: ActivitySchema.array()\n});\nexport {\n ActivitySchema,\n JourneyButtonSchema,\n JourneyContentTypeSchema,\n JourneySchema,\n ModuleSchema,\n ModuleWithActivities,\n PlanSchema,\n PublishOnDate\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, PreviousSchema} from \"../model\";\nimport {z} from \"zod\";\nimport {TimestampOrNow} from \"./shared\";\n\nexport const PublishOnDate = ModelSchema.extend({\n publishOnDate: TimestampOrNow,\n unpublishOnDate: TimestampOrNow,\n published: z.boolean().default(false),\n})\n\nexport const JourneyButtonSchema = z.object({\n type: z.enum(['primary', 'warning', 'normal']),\n label: z.string(),\n link: z.string(),\n target: z.enum(['_blank', '_self']).default('_self'),\n})\n\nexport const PlanSchema = ModelSchema.extend({\n title: z.string(),\n description: z.string().optional(),\n enabled: z.boolean().default(true),\n price: z.number(),\n period: z.enum(['month', 'year']).default('month'),\n pixPrice: z.number(),\n mode: z.string(),\n stripePrice: z.string(),\n})\n\nexport const JourneySchema = ModelSchema.extend({\n activitiesCounter: z.number(),\n lastNewsDate: TimestampOrNow,\n title: z.string(),\n type: z.enum(['simple', 'modular', 'free']),\n description: z.string().optional(),\n thumbnail: z.string().optional(),\n expirationDate: TimestampOrNow.optional(),\n startDate: TimestampOrNow.optional(),\n gridButton: JourneyButtonSchema.optional(),\n tag: z.string().optional(),\n actionToUnlock: z.object({\n type: z.enum(['link', 'message']),\n content: z.string(),\n buttons: z.array(JourneyButtonSchema).optional()\n }).optional(),\n settings: z.object({\n info: z.object({\n thumbnail: z.string().optional(),\n expirationDate: TimestampOrNow.optional(),\n startDate: TimestampOrNow.optional(),\n gridButton: JourneyButtonSchema.optional(),\n tag: z.string().optional(),\n actionToUnlock: z.object({\n type: z.enum(['link', 'message']),\n content: z.string(),\n buttons: z.array(JourneyButtonSchema).optional()\n }).optional(),\n }).optional(),\n chat: z.object({\n openingMessageDay: z.string().optional(),\n // closingMessageDay: z.string().optional(),\n // openingMessageNight: z.string().optional(),\n closingMessageNight: z.string().optional(),\n chatIsEnabled: z.boolean().default(false),\n chatURLs: z.array(z.string()).optional(),\n }).optional()\n }).optional(),\n stripeProductId: z.string().optional(),\n plans: z.array(PlanSchema).optional(),\n}).merge(PublishOnDate)\n\n\nexport const ModuleSchema = ModelSchema.extend({\n title: z.string(),\n isPrivate: z.boolean().default(true),\n isExclusive: z.boolean().nullish().optional(),\n}).merge(PreviousSchema).merge(PublishOnDate)\n\nexport const JourneyContentTypeSchema = z.enum(['video', 'document', 'audio', 'text', 'soundcloud', 'youtube', 'form', 'live', 'file'])\n\nexport const ActivitySchema = ModelSchema.extend({\n title: z.string(),\n description: z.string().optional(),\n contentType: JourneyContentTypeSchema,\n content: z.string(),\n files: z.array(z.object({\n label: z.string().optional(),\n url: z.string()\n })).optional(),\n hideComments: z.boolean().default(false),\n showChat: z.boolean().default(false),\n reference: z.string().optional(),\n tagsStr: z.string().optional(),\n}).merge(PublishOnDate);\n\nexport const ModuleWithActivities = ModuleSchema.extend({\n activities: ActivitySchema.array()\n})\n\nexport type Module = z.infer<typeof ModuleSchema>\nexport type Journey = z.infer<typeof JourneySchema>\nexport type Plan = z.infer<typeof PlanSchema>\nexport type ModuleWithActivities = z.infer<typeof ModuleWithActivities>\nexport type Activity = z.infer<typeof ActivitySchema>\nexport type JourneyContentType = z.infer<typeof JourneyContentTypeSchema>\n"]}
|
|
@@ -25,7 +25,7 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
25
25
|
updatedAt: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>, Timestamp, unknown>>>>;
|
|
26
26
|
order: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
27
27
|
}, {
|
|
28
|
-
invoice: z.ZodObject<{
|
|
28
|
+
invoice: z.ZodOptional<z.ZodObject<{
|
|
29
29
|
id: z.ZodString;
|
|
30
30
|
due_date: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
31
31
|
currency: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
@@ -551,7 +551,7 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
551
551
|
}[] | null | undefined;
|
|
552
552
|
early_payment_discounts?: unknown[] | null | undefined;
|
|
553
553
|
split_rules?: string | null | undefined;
|
|
554
|
-
}
|
|
554
|
+
}>>;
|
|
555
555
|
invoices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
556
556
|
id: z.ZodString;
|
|
557
557
|
due_date: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
@@ -1712,7 +1712,7 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1712
1712
|
country?: string | null | undefined;
|
|
1713
1713
|
defaultPaymentMethod?: string | null | undefined;
|
|
1714
1714
|
};
|
|
1715
|
-
|
|
1715
|
+
invoices: {
|
|
1716
1716
|
id: string;
|
|
1717
1717
|
status?: "pending" | "paid" | "canceled" | "in_analysis" | "draft" | "partially_paid" | "refunded" | "expired" | "in_protest" | "chargeback" | "externally_paid" | "invited" | null | undefined;
|
|
1718
1718
|
email?: string | null | undefined;
|
|
@@ -1864,8 +1864,8 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1864
1864
|
}[] | null | undefined;
|
|
1865
1865
|
early_payment_discounts?: unknown[] | null | undefined;
|
|
1866
1866
|
split_rules?: string | null | undefined;
|
|
1867
|
-
};
|
|
1868
|
-
|
|
1867
|
+
}[];
|
|
1868
|
+
lastInvoice: {
|
|
1869
1869
|
id: string;
|
|
1870
1870
|
status?: "pending" | "paid" | "canceled" | "in_analysis" | "draft" | "partially_paid" | "refunded" | "expired" | "in_protest" | "chargeback" | "externally_paid" | "invited" | null | undefined;
|
|
1871
1871
|
email?: string | null | undefined;
|
|
@@ -2017,8 +2017,13 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
2017
2017
|
}[] | null | undefined;
|
|
2018
2018
|
early_payment_discounts?: unknown[] | null | undefined;
|
|
2019
2019
|
split_rules?: string | null | undefined;
|
|
2020
|
-
}
|
|
2021
|
-
|
|
2020
|
+
};
|
|
2021
|
+
status?: "ACTIVE" | "INACTIVE" | "CANCELED" | "EXPIRED" | "PENDING" | "INVITED" | undefined;
|
|
2022
|
+
createdAt?: Timestamp | null | undefined;
|
|
2023
|
+
updatedAt?: Timestamp | null | undefined;
|
|
2024
|
+
order?: number | null | undefined;
|
|
2025
|
+
modulesAllowed?: string[] | undefined;
|
|
2026
|
+
invoice?: {
|
|
2022
2027
|
id: string;
|
|
2023
2028
|
status?: "pending" | "paid" | "canceled" | "in_analysis" | "draft" | "partially_paid" | "refunded" | "expired" | "in_protest" | "chargeback" | "externally_paid" | "invited" | null | undefined;
|
|
2024
2029
|
email?: string | null | undefined;
|
|
@@ -2170,12 +2175,7 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
2170
2175
|
}[] | null | undefined;
|
|
2171
2176
|
early_payment_discounts?: unknown[] | null | undefined;
|
|
2172
2177
|
split_rules?: string | null | undefined;
|
|
2173
|
-
};
|
|
2174
|
-
status?: "ACTIVE" | "INACTIVE" | "CANCELED" | "EXPIRED" | "PENDING" | "INVITED" | undefined;
|
|
2175
|
-
createdAt?: Timestamp | null | undefined;
|
|
2176
|
-
updatedAt?: Timestamp | null | undefined;
|
|
2177
|
-
order?: number | null | undefined;
|
|
2178
|
-
modulesAllowed?: string[] | undefined;
|
|
2178
|
+
} | undefined;
|
|
2179
2179
|
nextCharge?: Timestamp | undefined;
|
|
2180
2180
|
payedWith?: "PIX" | "CREDIT_CARD" | "STRIPE" | null | undefined;
|
|
2181
2181
|
planId?: string | null | undefined;
|
|
@@ -2208,7 +2208,7 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
2208
2208
|
country?: string | null | undefined;
|
|
2209
2209
|
defaultPaymentMethod?: string | null | undefined;
|
|
2210
2210
|
};
|
|
2211
|
-
|
|
2211
|
+
lastInvoice: {
|
|
2212
2212
|
id: string;
|
|
2213
2213
|
status?: "pending" | "paid" | "canceled" | "in_analysis" | "draft" | "partially_paid" | "refunded" | "expired" | "in_protest" | "chargeback" | "externally_paid" | "invited" | null | undefined;
|
|
2214
2214
|
email?: string | null | undefined;
|
|
@@ -2361,7 +2361,13 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
2361
2361
|
early_payment_discounts?: unknown[] | null | undefined;
|
|
2362
2362
|
split_rules?: string | null | undefined;
|
|
2363
2363
|
};
|
|
2364
|
-
|
|
2364
|
+
status?: "ACTIVE" | "INACTIVE" | "CANCELED" | "EXPIRED" | "PENDING" | "INVITED" | undefined;
|
|
2365
|
+
id?: unknown;
|
|
2366
|
+
createdAt?: unknown;
|
|
2367
|
+
updatedAt?: unknown;
|
|
2368
|
+
order?: number | null | undefined;
|
|
2369
|
+
modulesAllowed?: string[] | undefined;
|
|
2370
|
+
invoice?: {
|
|
2365
2371
|
id: string;
|
|
2366
2372
|
status?: "pending" | "paid" | "canceled" | "in_analysis" | "draft" | "partially_paid" | "refunded" | "expired" | "in_protest" | "chargeback" | "externally_paid" | "invited" | null | undefined;
|
|
2367
2373
|
email?: string | null | undefined;
|
|
@@ -2513,13 +2519,7 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
2513
2519
|
}[] | null | undefined;
|
|
2514
2520
|
early_payment_discounts?: unknown[] | null | undefined;
|
|
2515
2521
|
split_rules?: string | null | undefined;
|
|
2516
|
-
};
|
|
2517
|
-
status?: "ACTIVE" | "INACTIVE" | "CANCELED" | "EXPIRED" | "PENDING" | "INVITED" | undefined;
|
|
2518
|
-
id?: unknown;
|
|
2519
|
-
createdAt?: unknown;
|
|
2520
|
-
updatedAt?: unknown;
|
|
2521
|
-
order?: number | null | undefined;
|
|
2522
|
-
modulesAllowed?: string[] | undefined;
|
|
2522
|
+
} | undefined;
|
|
2523
2523
|
invoices?: {
|
|
2524
2524
|
id: string;
|
|
2525
2525
|
status?: "pending" | "paid" | "canceled" | "in_analysis" | "draft" | "partially_paid" | "refunded" | "expired" | "in_protest" | "chargeback" | "externally_paid" | "invited" | null | undefined;
|
|
@@ -25,7 +25,7 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
25
25
|
updatedAt: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>, Timestamp, unknown>>>>;
|
|
26
26
|
order: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
|
|
27
27
|
}, {
|
|
28
|
-
invoice: z.ZodObject<{
|
|
28
|
+
invoice: z.ZodOptional<z.ZodObject<{
|
|
29
29
|
id: z.ZodString;
|
|
30
30
|
due_date: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
31
31
|
currency: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
@@ -551,7 +551,7 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
551
551
|
}[] | null | undefined;
|
|
552
552
|
early_payment_discounts?: unknown[] | null | undefined;
|
|
553
553
|
split_rules?: string | null | undefined;
|
|
554
|
-
}
|
|
554
|
+
}>>;
|
|
555
555
|
invoices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
556
556
|
id: z.ZodString;
|
|
557
557
|
due_date: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
@@ -1712,7 +1712,7 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1712
1712
|
country?: string | null | undefined;
|
|
1713
1713
|
defaultPaymentMethod?: string | null | undefined;
|
|
1714
1714
|
};
|
|
1715
|
-
|
|
1715
|
+
invoices: {
|
|
1716
1716
|
id: string;
|
|
1717
1717
|
status?: "pending" | "paid" | "canceled" | "in_analysis" | "draft" | "partially_paid" | "refunded" | "expired" | "in_protest" | "chargeback" | "externally_paid" | "invited" | null | undefined;
|
|
1718
1718
|
email?: string | null | undefined;
|
|
@@ -1864,8 +1864,8 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
1864
1864
|
}[] | null | undefined;
|
|
1865
1865
|
early_payment_discounts?: unknown[] | null | undefined;
|
|
1866
1866
|
split_rules?: string | null | undefined;
|
|
1867
|
-
};
|
|
1868
|
-
|
|
1867
|
+
}[];
|
|
1868
|
+
lastInvoice: {
|
|
1869
1869
|
id: string;
|
|
1870
1870
|
status?: "pending" | "paid" | "canceled" | "in_analysis" | "draft" | "partially_paid" | "refunded" | "expired" | "in_protest" | "chargeback" | "externally_paid" | "invited" | null | undefined;
|
|
1871
1871
|
email?: string | null | undefined;
|
|
@@ -2017,8 +2017,13 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
2017
2017
|
}[] | null | undefined;
|
|
2018
2018
|
early_payment_discounts?: unknown[] | null | undefined;
|
|
2019
2019
|
split_rules?: string | null | undefined;
|
|
2020
|
-
}
|
|
2021
|
-
|
|
2020
|
+
};
|
|
2021
|
+
status?: "ACTIVE" | "INACTIVE" | "CANCELED" | "EXPIRED" | "PENDING" | "INVITED" | undefined;
|
|
2022
|
+
createdAt?: Timestamp | null | undefined;
|
|
2023
|
+
updatedAt?: Timestamp | null | undefined;
|
|
2024
|
+
order?: number | null | undefined;
|
|
2025
|
+
modulesAllowed?: string[] | undefined;
|
|
2026
|
+
invoice?: {
|
|
2022
2027
|
id: string;
|
|
2023
2028
|
status?: "pending" | "paid" | "canceled" | "in_analysis" | "draft" | "partially_paid" | "refunded" | "expired" | "in_protest" | "chargeback" | "externally_paid" | "invited" | null | undefined;
|
|
2024
2029
|
email?: string | null | undefined;
|
|
@@ -2170,12 +2175,7 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
2170
2175
|
}[] | null | undefined;
|
|
2171
2176
|
early_payment_discounts?: unknown[] | null | undefined;
|
|
2172
2177
|
split_rules?: string | null | undefined;
|
|
2173
|
-
};
|
|
2174
|
-
status?: "ACTIVE" | "INACTIVE" | "CANCELED" | "EXPIRED" | "PENDING" | "INVITED" | undefined;
|
|
2175
|
-
createdAt?: Timestamp | null | undefined;
|
|
2176
|
-
updatedAt?: Timestamp | null | undefined;
|
|
2177
|
-
order?: number | null | undefined;
|
|
2178
|
-
modulesAllowed?: string[] | undefined;
|
|
2178
|
+
} | undefined;
|
|
2179
2179
|
nextCharge?: Timestamp | undefined;
|
|
2180
2180
|
payedWith?: "PIX" | "CREDIT_CARD" | "STRIPE" | null | undefined;
|
|
2181
2181
|
planId?: string | null | undefined;
|
|
@@ -2208,7 +2208,7 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
2208
2208
|
country?: string | null | undefined;
|
|
2209
2209
|
defaultPaymentMethod?: string | null | undefined;
|
|
2210
2210
|
};
|
|
2211
|
-
|
|
2211
|
+
lastInvoice: {
|
|
2212
2212
|
id: string;
|
|
2213
2213
|
status?: "pending" | "paid" | "canceled" | "in_analysis" | "draft" | "partially_paid" | "refunded" | "expired" | "in_protest" | "chargeback" | "externally_paid" | "invited" | null | undefined;
|
|
2214
2214
|
email?: string | null | undefined;
|
|
@@ -2361,7 +2361,13 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
2361
2361
|
early_payment_discounts?: unknown[] | null | undefined;
|
|
2362
2362
|
split_rules?: string | null | undefined;
|
|
2363
2363
|
};
|
|
2364
|
-
|
|
2364
|
+
status?: "ACTIVE" | "INACTIVE" | "CANCELED" | "EXPIRED" | "PENDING" | "INVITED" | undefined;
|
|
2365
|
+
id?: unknown;
|
|
2366
|
+
createdAt?: unknown;
|
|
2367
|
+
updatedAt?: unknown;
|
|
2368
|
+
order?: number | null | undefined;
|
|
2369
|
+
modulesAllowed?: string[] | undefined;
|
|
2370
|
+
invoice?: {
|
|
2365
2371
|
id: string;
|
|
2366
2372
|
status?: "pending" | "paid" | "canceled" | "in_analysis" | "draft" | "partially_paid" | "refunded" | "expired" | "in_protest" | "chargeback" | "externally_paid" | "invited" | null | undefined;
|
|
2367
2373
|
email?: string | null | undefined;
|
|
@@ -2513,13 +2519,7 @@ declare const SubscriptionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
2513
2519
|
}[] | null | undefined;
|
|
2514
2520
|
early_payment_discounts?: unknown[] | null | undefined;
|
|
2515
2521
|
split_rules?: string | null | undefined;
|
|
2516
|
-
};
|
|
2517
|
-
status?: "ACTIVE" | "INACTIVE" | "CANCELED" | "EXPIRED" | "PENDING" | "INVITED" | undefined;
|
|
2518
|
-
id?: unknown;
|
|
2519
|
-
createdAt?: unknown;
|
|
2520
|
-
updatedAt?: unknown;
|
|
2521
|
-
order?: number | null | undefined;
|
|
2522
|
-
modulesAllowed?: string[] | undefined;
|
|
2522
|
+
} | undefined;
|
|
2523
2523
|
invoices?: {
|
|
2524
2524
|
id: string;
|
|
2525
2525
|
status?: "pending" | "paid" | "canceled" | "in_analysis" | "draft" | "partially_paid" | "refunded" | "expired" | "in_protest" | "chargeback" | "externally_paid" | "invited" | null | undefined;
|
|
@@ -332,7 +332,7 @@ var JourneyIdsSchema = import_zod5.z.enum([
|
|
|
332
332
|
]);
|
|
333
333
|
var SubscriptionStatusSchema = import_zod5.z.nativeEnum(SubscriptionStatus);
|
|
334
334
|
var SubscriptionSchema = ModelSchema.extend({
|
|
335
|
-
invoice: IuguInvoiceSchema,
|
|
335
|
+
invoice: IuguInvoiceSchema.optional(),
|
|
336
336
|
invoices: IuguInvoiceSchema.array().default([]),
|
|
337
337
|
lastInvoice: IuguInvoiceSchema,
|
|
338
338
|
nextCharge: import_zod5.z.custom().optional(),
|