@danielgenarog/shared-contracts 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/business/business.schema.d.ts +153 -0
- package/dist/core/business/business.schema.d.ts.map +1 -0
- package/dist/core/business/business.schema.js +41 -0
- package/dist/core/business/business.schema.js.map +1 -0
- package/dist/core/business/business.type.d.ts +2 -0
- package/dist/core/business/business.type.d.ts.map +1 -0
- package/dist/core/business/business.type.js +3 -0
- package/dist/core/business/business.type.js.map +1 -0
- package/dist/core/elements/elements.schema.d.ts +111 -0
- package/dist/core/elements/elements.schema.d.ts.map +1 -0
- package/dist/core/elements/elements.schema.js +37 -0
- package/dist/core/elements/elements.schema.js.map +1 -0
- package/dist/core/elements/elements.type.d.ts +2 -0
- package/dist/core/elements/elements.type.d.ts.map +1 -0
- package/dist/core/elements/elements.type.js +3 -0
- package/dist/core/elements/elements.type.js.map +1 -0
- package/dist/core/modules/modules.constants.d.ts +7 -0
- package/dist/core/modules/modules.constants.d.ts.map +1 -0
- package/dist/core/modules/modules.constants.js +25 -0
- package/dist/core/modules/modules.constants.js.map +1 -0
- package/dist/core/modules/modules.schema.d.ts +9 -0
- package/dist/core/modules/modules.schema.d.ts.map +1 -0
- package/dist/core/modules/modules.schema.js +14 -0
- package/dist/core/modules/modules.schema.js.map +1 -0
- package/dist/core/modules/modules.type.d.ts +4 -0
- package/dist/core/modules/modules.type.d.ts.map +1 -0
- package/dist/core/modules/modules.type.js +3 -0
- package/dist/core/modules/modules.type.js.map +1 -0
- package/dist/core/social-kind/social-kind.schema.d.ts +14 -0
- package/dist/core/social-kind/social-kind.schema.d.ts.map +1 -0
- package/dist/core/social-kind/social-kind.schema.js +19 -0
- package/dist/core/social-kind/social-kind.schema.js.map +1 -0
- package/dist/core/style/style.schema.d.ts +97 -0
- package/dist/core/style/style.schema.d.ts.map +1 -0
- package/dist/core/style/style.schema.js +34 -0
- package/dist/core/style/style.schema.js.map +1 -0
- package/dist/core/theme/theme.schema.d.ts +9 -0
- package/dist/core/theme/theme.schema.d.ts.map +1 -0
- package/dist/core/theme/theme.schema.js +15 -0
- package/dist/core/theme/theme.schema.js.map +1 -0
- package/dist/core/theme/theme.type.d.ts +4 -0
- package/dist/core/theme/theme.type.d.ts.map +1 -0
- package/dist/core/theme/theme.type.js +3 -0
- package/dist/core/theme/theme.type.js.map +1 -0
- package/dist/core/variants/variants.schema.d.ts +9 -0
- package/dist/core/variants/variants.schema.d.ts.map +1 -0
- package/dist/core/variants/variants.schema.js +9 -0
- package/dist/core/variants/variants.schema.js.map +1 -0
- package/dist/core/variants/variants.type.d.ts +2 -0
- package/dist/core/variants/variants.type.d.ts.map +1 -0
- package/dist/core/variants/variants.type.js +3 -0
- package/dist/core/variants/variants.type.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/scripts/generate-exports.d.ts +2 -0
- package/dist/scripts/generate-exports.d.ts.map +1 -0
- package/dist/scripts/generate-exports.js +30 -0
- package/dist/scripts/generate-exports.js.map +1 -0
- package/package.json +29 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const BusinessSchema: z.ZodObject<{
|
|
3
|
+
version: z.ZodNumber;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
description: z.ZodString;
|
|
6
|
+
cover_image: z.ZodString;
|
|
7
|
+
logo: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export type BusinessSchema = z.infer<typeof BusinessSchema>;
|
|
10
|
+
export declare const ResBusinessSchema: z.ZodObject<{
|
|
11
|
+
version: z.ZodNumber;
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
description: z.ZodString;
|
|
14
|
+
cover_image: z.ZodString;
|
|
15
|
+
logo: z.ZodString;
|
|
16
|
+
business_id: z.ZodString;
|
|
17
|
+
slug: z.ZodString;
|
|
18
|
+
elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
19
|
+
type: z.ZodEnum<{
|
|
20
|
+
link: "link";
|
|
21
|
+
info: "info";
|
|
22
|
+
}>;
|
|
23
|
+
order: z.ZodNumber;
|
|
24
|
+
visible: z.ZodBoolean;
|
|
25
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
26
|
+
label: z.ZodOptional<z.ZodString>;
|
|
27
|
+
href: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
30
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
31
|
+
whatsapp: "whatsapp";
|
|
32
|
+
instagram: "instagram";
|
|
33
|
+
menu: "menu";
|
|
34
|
+
maps: "maps";
|
|
35
|
+
website: "website";
|
|
36
|
+
phone: "phone";
|
|
37
|
+
appointments: "appointments";
|
|
38
|
+
reservations: "reservations";
|
|
39
|
+
orders: "orders";
|
|
40
|
+
}>>;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
43
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
44
|
+
default: "default";
|
|
45
|
+
surface: "surface";
|
|
46
|
+
outline: "outline";
|
|
47
|
+
noborder: "noborder";
|
|
48
|
+
}>>;
|
|
49
|
+
style: z.ZodOptional<z.ZodType<import("csstype").Properties<0 | (string & {}), string & {}>, unknown, z.core.$ZodTypeInternals<import("csstype").Properties<0 | (string & {}), string & {}>, unknown>>>;
|
|
50
|
+
className: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>>;
|
|
52
|
+
element_id: z.ZodString;
|
|
53
|
+
}, z.core.$strip>>>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
export type ResBusinessSchema = z.infer<typeof ResBusinessSchema>;
|
|
56
|
+
export declare const CreateBusinessSchema: z.ZodObject<{
|
|
57
|
+
version: z.ZodNumber;
|
|
58
|
+
name: z.ZodString;
|
|
59
|
+
description: z.ZodString;
|
|
60
|
+
cover_image: z.ZodString;
|
|
61
|
+
logo: z.ZodString;
|
|
62
|
+
theme: z.ZodEnum<{
|
|
63
|
+
default: "default";
|
|
64
|
+
minimalist: "minimalist";
|
|
65
|
+
borderless: "borderless";
|
|
66
|
+
light: "light";
|
|
67
|
+
dark: "dark";
|
|
68
|
+
}>;
|
|
69
|
+
elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
70
|
+
type: z.ZodEnum<{
|
|
71
|
+
link: "link";
|
|
72
|
+
info: "info";
|
|
73
|
+
}>;
|
|
74
|
+
order: z.ZodNumber;
|
|
75
|
+
visible: z.ZodBoolean;
|
|
76
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
77
|
+
label: z.ZodOptional<z.ZodString>;
|
|
78
|
+
href: z.ZodOptional<z.ZodString>;
|
|
79
|
+
}, z.core.$strip>>;
|
|
80
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
81
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
82
|
+
whatsapp: "whatsapp";
|
|
83
|
+
instagram: "instagram";
|
|
84
|
+
menu: "menu";
|
|
85
|
+
maps: "maps";
|
|
86
|
+
website: "website";
|
|
87
|
+
phone: "phone";
|
|
88
|
+
appointments: "appointments";
|
|
89
|
+
reservations: "reservations";
|
|
90
|
+
orders: "orders";
|
|
91
|
+
}>>;
|
|
92
|
+
}, z.core.$strip>>;
|
|
93
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
94
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
95
|
+
default: "default";
|
|
96
|
+
surface: "surface";
|
|
97
|
+
outline: "outline";
|
|
98
|
+
noborder: "noborder";
|
|
99
|
+
}>>;
|
|
100
|
+
style: z.ZodOptional<z.ZodType<import("csstype").Properties<0 | (string & {}), string & {}>, unknown, z.core.$ZodTypeInternals<import("csstype").Properties<0 | (string & {}), string & {}>, unknown>>>;
|
|
101
|
+
className: z.ZodOptional<z.ZodString>;
|
|
102
|
+
}, z.core.$strip>>;
|
|
103
|
+
}, z.core.$strip>>>;
|
|
104
|
+
style: z.ZodObject<{
|
|
105
|
+
style_id: z.ZodString;
|
|
106
|
+
style: z.ZodObject<{
|
|
107
|
+
theme: z.ZodEnum<{
|
|
108
|
+
default: "default";
|
|
109
|
+
minimalist: "minimalist";
|
|
110
|
+
borderless: "borderless";
|
|
111
|
+
light: "light";
|
|
112
|
+
dark: "dark";
|
|
113
|
+
}>;
|
|
114
|
+
name: z.ZodObject<{
|
|
115
|
+
color: z.ZodOptional<z.ZodString>;
|
|
116
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
117
|
+
noborder: z.ZodOptional<z.ZodBoolean>;
|
|
118
|
+
text_position: z.ZodOptional<z.ZodString>;
|
|
119
|
+
className: z.ZodOptional<z.ZodString>;
|
|
120
|
+
}, z.core.$strip>;
|
|
121
|
+
description: z.ZodObject<{
|
|
122
|
+
color: z.ZodOptional<z.ZodString>;
|
|
123
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
124
|
+
noborder: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
+
text_position: z.ZodOptional<z.ZodString>;
|
|
126
|
+
className: z.ZodOptional<z.ZodString>;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
logo: z.ZodObject<{
|
|
129
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
130
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
noborder: z.ZodOptional<z.ZodBoolean>;
|
|
132
|
+
centered: z.ZodOptional<z.ZodBoolean>;
|
|
133
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
134
|
+
default: "default";
|
|
135
|
+
surface: "surface";
|
|
136
|
+
outline: "outline";
|
|
137
|
+
noborder: "noborder";
|
|
138
|
+
}>>;
|
|
139
|
+
}, z.core.$strip>;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
}, z.core.$strip>;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
export declare const BusinessTypeSchema: z.ZodEnum<{
|
|
144
|
+
restaurant: "restaurant";
|
|
145
|
+
bar: "bar";
|
|
146
|
+
cafe: "cafe";
|
|
147
|
+
cloud: "cloud";
|
|
148
|
+
barbershop: "barbershop";
|
|
149
|
+
gym: "gym";
|
|
150
|
+
}>;
|
|
151
|
+
export type BusinessType = z.infer<typeof BusinessTypeSchema>;
|
|
152
|
+
export declare const DEFFAULT_LABELS: Record<BusinessType, string>;
|
|
153
|
+
//# sourceMappingURL=business.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.schema.d.ts","sourceRoot":"","sources":["../../../src/core/business/business.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,cAAc;;;;;;iBAMzB,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAE3D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI5B,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAI/B,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;;;;EAO7B,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,eAAO,MAAM,eAAe,EAAC,MAAM,CAAC,YAAY,EAAC,MAAM,CAOtD,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFFAULT_LABELS = exports.BusinessTypeSchema = exports.CreateBusinessSchema = exports.ResBusinessSchema = exports.BusinessSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const theme_schema_1 = require("../theme/theme.schema");
|
|
6
|
+
const elements_schema_1 = require("../elements/elements.schema");
|
|
7
|
+
const style_schema_1 = require("../style/style.schema");
|
|
8
|
+
exports.BusinessSchema = zod_1.z.object({
|
|
9
|
+
version: zod_1.z.number(),
|
|
10
|
+
name: zod_1.z.string(),
|
|
11
|
+
description: zod_1.z.string(),
|
|
12
|
+
cover_image: zod_1.z.string(),
|
|
13
|
+
logo: zod_1.z.string(),
|
|
14
|
+
});
|
|
15
|
+
exports.ResBusinessSchema = exports.BusinessSchema.extend({
|
|
16
|
+
business_id: zod_1.z.string(),
|
|
17
|
+
slug: zod_1.z.string(),
|
|
18
|
+
elements: zod_1.z.array(elements_schema_1.ResElementSchema).optional(),
|
|
19
|
+
});
|
|
20
|
+
exports.CreateBusinessSchema = exports.BusinessSchema.extend({
|
|
21
|
+
theme: theme_schema_1.ThemeOptionSchema,
|
|
22
|
+
elements: zod_1.z.array(elements_schema_1.ElementSchema).optional(),
|
|
23
|
+
style: style_schema_1.StyleSchema
|
|
24
|
+
});
|
|
25
|
+
exports.BusinessTypeSchema = zod_1.z.enum([
|
|
26
|
+
"restaurant",
|
|
27
|
+
"bar",
|
|
28
|
+
"cafe",
|
|
29
|
+
"cloud",
|
|
30
|
+
"barbershop",
|
|
31
|
+
"gym",
|
|
32
|
+
]);
|
|
33
|
+
exports.DEFFAULT_LABELS = {
|
|
34
|
+
restaurant: "Restaurante",
|
|
35
|
+
bar: "Bar",
|
|
36
|
+
barbershop: "Barbershop",
|
|
37
|
+
cafe: "Cafe",
|
|
38
|
+
gym: "Gimnasio",
|
|
39
|
+
cloud: "Cloud"
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=business.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.schema.js","sourceRoot":"","sources":["../../../src/core/business/business.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wDAA0D;AAC1D,iEAAuF;AACvF,wDAAoD;AAGvC,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAA;AAGW,QAAA,iBAAiB,GAAG,sBAAc,CAAC,MAAM,CAAC;IACnD,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,kCAAgB,CAAC,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAA;AAGW,QAAA,oBAAoB,GAAG,sBAAc,CAAC,MAAM,CAAC;IACtD,KAAK,EAAE,gCAAiB;IACxB,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,+BAAa,CAAC,CAAC,QAAQ,EAAE;IAC3C,KAAK,EAAE,0BAAW;CACrB,CAAC,CAAA;AAEW,QAAA,kBAAkB,GAAG,OAAC,CAAC,IAAI,CAAC;IACvC,YAAY;IACZ,KAAK;IACL,MAAM;IACN,OAAO;IACP,YAAY;IACZ,KAAK;CACN,CAAC,CAAA;AAIW,QAAA,eAAe,GAA+B;IACzD,UAAU,EAAC,aAAa;IACxB,GAAG,EAAC,KAAK;IACT,UAAU,EAAC,YAAY;IACvB,IAAI,EAAC,MAAM;IACX,GAAG,EAAC,UAAU;IACd,KAAK,EAAC,OAAO;CACd,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.type.d.ts","sourceRoot":"","sources":["../../../src/core/business/business.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.type.js","sourceRoot":"","sources":["../../../src/core/business/business.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import CSS from "csstype";
|
|
3
|
+
export declare const ElementTypeSchema: z.ZodEnum<{
|
|
4
|
+
link: "link";
|
|
5
|
+
info: "info";
|
|
6
|
+
}>;
|
|
7
|
+
export type ElementType = z.infer<typeof ElementTypeSchema>;
|
|
8
|
+
export declare const ElementOptionsSchema: z.ZodObject<{
|
|
9
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
10
|
+
default: "default";
|
|
11
|
+
surface: "surface";
|
|
12
|
+
outline: "outline";
|
|
13
|
+
noborder: "noborder";
|
|
14
|
+
}>>;
|
|
15
|
+
style: z.ZodOptional<z.ZodType<CSS.Properties<0 | (string & {}), string & {}>, unknown, z.core.$ZodTypeInternals<CSS.Properties<0 | (string & {}), string & {}>, unknown>>>;
|
|
16
|
+
className: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
export type ElementOptions = z.infer<typeof ElementOptionsSchema>;
|
|
19
|
+
export declare const ElementDataSchema: z.ZodObject<{
|
|
20
|
+
label: z.ZodOptional<z.ZodString>;
|
|
21
|
+
href: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export type ElementData = z.infer<typeof ElementDataSchema>;
|
|
24
|
+
export declare const ElementMetaSchema: z.ZodObject<{
|
|
25
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
26
|
+
whatsapp: "whatsapp";
|
|
27
|
+
instagram: "instagram";
|
|
28
|
+
menu: "menu";
|
|
29
|
+
maps: "maps";
|
|
30
|
+
website: "website";
|
|
31
|
+
phone: "phone";
|
|
32
|
+
appointments: "appointments";
|
|
33
|
+
reservations: "reservations";
|
|
34
|
+
orders: "orders";
|
|
35
|
+
}>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export type ElementMeta = z.infer<typeof ElementMetaSchema>;
|
|
38
|
+
export declare const ElementSchema: z.ZodObject<{
|
|
39
|
+
type: z.ZodEnum<{
|
|
40
|
+
link: "link";
|
|
41
|
+
info: "info";
|
|
42
|
+
}>;
|
|
43
|
+
order: z.ZodNumber;
|
|
44
|
+
visible: z.ZodBoolean;
|
|
45
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
46
|
+
label: z.ZodOptional<z.ZodString>;
|
|
47
|
+
href: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
50
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
51
|
+
whatsapp: "whatsapp";
|
|
52
|
+
instagram: "instagram";
|
|
53
|
+
menu: "menu";
|
|
54
|
+
maps: "maps";
|
|
55
|
+
website: "website";
|
|
56
|
+
phone: "phone";
|
|
57
|
+
appointments: "appointments";
|
|
58
|
+
reservations: "reservations";
|
|
59
|
+
orders: "orders";
|
|
60
|
+
}>>;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
63
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
64
|
+
default: "default";
|
|
65
|
+
surface: "surface";
|
|
66
|
+
outline: "outline";
|
|
67
|
+
noborder: "noborder";
|
|
68
|
+
}>>;
|
|
69
|
+
style: z.ZodOptional<z.ZodType<CSS.Properties<0 | (string & {}), string & {}>, unknown, z.core.$ZodTypeInternals<CSS.Properties<0 | (string & {}), string & {}>, unknown>>>;
|
|
70
|
+
className: z.ZodOptional<z.ZodString>;
|
|
71
|
+
}, z.core.$strip>>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
export type Element = z.infer<typeof ElementSchema>;
|
|
74
|
+
export declare const ResElementSchema: z.ZodObject<{
|
|
75
|
+
type: z.ZodEnum<{
|
|
76
|
+
link: "link";
|
|
77
|
+
info: "info";
|
|
78
|
+
}>;
|
|
79
|
+
order: z.ZodNumber;
|
|
80
|
+
visible: z.ZodBoolean;
|
|
81
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
82
|
+
label: z.ZodOptional<z.ZodString>;
|
|
83
|
+
href: z.ZodOptional<z.ZodString>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
87
|
+
whatsapp: "whatsapp";
|
|
88
|
+
instagram: "instagram";
|
|
89
|
+
menu: "menu";
|
|
90
|
+
maps: "maps";
|
|
91
|
+
website: "website";
|
|
92
|
+
phone: "phone";
|
|
93
|
+
appointments: "appointments";
|
|
94
|
+
reservations: "reservations";
|
|
95
|
+
orders: "orders";
|
|
96
|
+
}>>;
|
|
97
|
+
}, z.core.$strip>>;
|
|
98
|
+
options: z.ZodOptional<z.ZodObject<{
|
|
99
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
100
|
+
default: "default";
|
|
101
|
+
surface: "surface";
|
|
102
|
+
outline: "outline";
|
|
103
|
+
noborder: "noborder";
|
|
104
|
+
}>>;
|
|
105
|
+
style: z.ZodOptional<z.ZodType<CSS.Properties<0 | (string & {}), string & {}>, unknown, z.core.$ZodTypeInternals<CSS.Properties<0 | (string & {}), string & {}>, unknown>>>;
|
|
106
|
+
className: z.ZodOptional<z.ZodString>;
|
|
107
|
+
}, z.core.$strip>>;
|
|
108
|
+
element_id: z.ZodString;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
export type ResElement = z.infer<typeof ResElementSchema>;
|
|
111
|
+
//# sourceMappingURL=elements.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elements.schema.d.ts","sourceRoot":"","sources":["../../../src/core/elements/elements.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AACnB,OAAQ,GAAG,MAAO,SAAS,CAAC;AAI5B,eAAO,MAAM,iBAAiB;;;EAA2B,CAAA;AAEzD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAO3D,eAAO,MAAM,oBAAoB;;;;;;;;;iBAI/B,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEjE,eAAO,MAAM,iBAAiB;;;iBAG5B,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;iBAE5B,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAG3D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOxB,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AAEnD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE3B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ResElementSchema = exports.ElementSchema = exports.ElementMetaSchema = exports.ElementDataSchema = exports.ElementOptionsSchema = exports.ElementTypeSchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const variants_schema_1 = require("../variants/variants.schema");
|
|
9
|
+
const social_kind_schema_1 = require("../social-kind/social-kind.schema");
|
|
10
|
+
exports.ElementTypeSchema = zod_1.default.enum(["link", "info"]);
|
|
11
|
+
const styleSchema = zod_1.default
|
|
12
|
+
.object({})
|
|
13
|
+
.catchall(zod_1.default.any());
|
|
14
|
+
exports.ElementOptionsSchema = zod_1.default.object({
|
|
15
|
+
variant: variants_schema_1.Variant.optional(),
|
|
16
|
+
style: styleSchema.optional(),
|
|
17
|
+
className: zod_1.default.string().optional(),
|
|
18
|
+
});
|
|
19
|
+
exports.ElementDataSchema = zod_1.default.object({
|
|
20
|
+
label: zod_1.default.string().optional(),
|
|
21
|
+
href: zod_1.default.string().optional(),
|
|
22
|
+
});
|
|
23
|
+
exports.ElementMetaSchema = zod_1.default.object({
|
|
24
|
+
kind: social_kind_schema_1.socialKind.optional(),
|
|
25
|
+
});
|
|
26
|
+
exports.ElementSchema = zod_1.default.object({
|
|
27
|
+
type: exports.ElementTypeSchema,
|
|
28
|
+
order: zod_1.default.number(),
|
|
29
|
+
visible: zod_1.default.boolean(),
|
|
30
|
+
data: exports.ElementDataSchema.optional(),
|
|
31
|
+
meta: exports.ElementMetaSchema.optional(),
|
|
32
|
+
options: exports.ElementOptionsSchema.optional(),
|
|
33
|
+
});
|
|
34
|
+
exports.ResElementSchema = exports.ElementSchema.extend({
|
|
35
|
+
element_id: zod_1.default.string()
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=elements.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elements.schema.js","sourceRoot":"","sources":["../../../src/core/elements/elements.schema.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAmB;AAEnB,iEAAsD;AACtD,0EAA+D;AAElD,QAAA,iBAAiB,GAAG,aAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;AAIzD,MAAM,WAAW,GAA8B,aAAC;KAC7C,MAAM,CAAC,EAAE,CAAC;KACV,QAAQ,CAAC,aAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAGR,QAAA,oBAAoB,GAAG,aAAC,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,yBAAO,CAAC,QAAQ,EAAE;IAC3B,KAAK,EAAE,WAAW,CAAC,QAAQ,EAAE;IAC7B,SAAS,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAA;AAIW,QAAA,iBAAiB,GAAG,aAAC,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAA;AAIW,QAAA,iBAAiB,GAAG,aAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,+BAAU,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAA;AAKW,QAAA,aAAa,GAAG,aAAC,CAAC,MAAM,CAAC;IAClC,IAAI,EAAE,yBAAiB;IACvB,KAAK,EAAE,aAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,aAAC,CAAC,OAAO,EAAE;IACpB,IAAI,EAAE,yBAAiB,CAAC,QAAQ,EAAE;IAClC,IAAI,EAAE,yBAAiB,CAAC,QAAQ,EAAE;IAClC,OAAO,EAAE,4BAAoB,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAA;AAIW,QAAA,gBAAgB,GAAG,qBAAa,CAAC,MAAM,CAAC;IACjD,UAAU,EAAE,aAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elements.type.d.ts","sourceRoot":"","sources":["../../../src/core/elements/elements.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elements.type.js","sourceRoot":"","sources":["../../../src/core/elements/elements.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Module } from "./modules.schema";
|
|
2
|
+
import { DefaultModulesRecord } from "./modules.type";
|
|
3
|
+
export declare const DEFAULT_MODULES: DefaultModulesRecord;
|
|
4
|
+
export declare const MODULE_LABELS: Record<Module, string>;
|
|
5
|
+
export declare const MODULE_DESCRIPTIONS: Record<Module, string>;
|
|
6
|
+
export declare const MODULES: Module[];
|
|
7
|
+
//# sourceMappingURL=modules.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modules.constants.d.ts","sourceRoot":"","sources":["../../../src/core/modules/modules.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAErD,eAAO,MAAM,eAAe,EAAC,oBAO5B,CAAA;AAED,eAAO,MAAM,aAAa,EAAC,MAAM,CAAC,MAAM,EAAC,MAAM,CAK9C,CAAA;AACD,eAAO,MAAM,mBAAmB,EAAC,MAAM,CAAC,MAAM,EAAC,MAAM,CAKpD,CAAA;AACD,eAAO,MAAM,OAAO,EAAC,MAAM,EAAoD,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MODULES = exports.MODULE_DESCRIPTIONS = exports.MODULE_LABELS = exports.DEFAULT_MODULES = void 0;
|
|
4
|
+
exports.DEFAULT_MODULES = {
|
|
5
|
+
restaurant: ["menu", "reservations", "orders"],
|
|
6
|
+
bar: ["menu", "orders"],
|
|
7
|
+
barbershop: ["appointments"],
|
|
8
|
+
cafe: ["menu", "orders"],
|
|
9
|
+
gym: ["appointments"],
|
|
10
|
+
cloud: ["appointments"]
|
|
11
|
+
};
|
|
12
|
+
exports.MODULE_LABELS = {
|
|
13
|
+
appointments: "Citas",
|
|
14
|
+
reservations: "Reservas",
|
|
15
|
+
menu: "Menu",
|
|
16
|
+
orders: "Pedidos"
|
|
17
|
+
};
|
|
18
|
+
exports.MODULE_DESCRIPTIONS = {
|
|
19
|
+
appointments: "Sacar cita desde la web, a traves de un formulario",
|
|
20
|
+
reservations: "Reservas",
|
|
21
|
+
menu: "Menu",
|
|
22
|
+
orders: "Pedidos"
|
|
23
|
+
};
|
|
24
|
+
exports.MODULES = ["appointments", "reservations", "menu", "orders"];
|
|
25
|
+
//# sourceMappingURL=modules.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modules.constants.js","sourceRoot":"","sources":["../../../src/core/modules/modules.constants.ts"],"names":[],"mappings":";;;AAGa,QAAA,eAAe,GAAwB;IAClD,UAAU,EAAC,CAAC,MAAM,EAAC,cAAc,EAAC,QAAQ,CAAC;IAC3C,GAAG,EAAC,CAAC,MAAM,EAAC,QAAQ,CAAC;IACrB,UAAU,EAAC,CAAC,cAAc,CAAC;IAC3B,IAAI,EAAC,CAAC,MAAM,EAAC,QAAQ,CAAC;IACtB,GAAG,EAAC,CAAC,cAAc,CAAC;IACpB,KAAK,EAAC,CAAC,cAAc,CAAC;CACvB,CAAA;AAEY,QAAA,aAAa,GAAyB;IACjD,YAAY,EAAC,OAAO;IACpB,YAAY,EAAC,UAAU;IACvB,IAAI,EAAC,MAAM;IACX,MAAM,EAAC,SAAS;CACjB,CAAA;AACY,QAAA,mBAAmB,GAAyB;IACvD,YAAY,EAAC,oDAAoD;IACjE,YAAY,EAAC,UAAU;IACvB,IAAI,EAAC,MAAM;IACX,MAAM,EAAC,SAAS;CACjB,CAAA;AACY,QAAA,OAAO,GAAY,CAAC,cAAc,EAAC,cAAc,EAAC,MAAM,EAAC,QAAQ,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
export declare const ModuleSchema: z.ZodEnum<{
|
|
3
|
+
menu: "menu";
|
|
4
|
+
appointments: "appointments";
|
|
5
|
+
reservations: "reservations";
|
|
6
|
+
orders: "orders";
|
|
7
|
+
}>;
|
|
8
|
+
export type Module = z.infer<typeof ModuleSchema>;
|
|
9
|
+
//# sourceMappingURL=modules.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modules.schema.d.ts","sourceRoot":"","sources":["../../../src/core/modules/modules.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AAGnB,eAAO,MAAM,YAAY;;;;;EAKvB,CAAA;AACF,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ModuleSchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
exports.ModuleSchema = zod_1.default.enum([
|
|
9
|
+
"appointments",
|
|
10
|
+
"reservations",
|
|
11
|
+
"menu",
|
|
12
|
+
"orders"
|
|
13
|
+
]);
|
|
14
|
+
//# sourceMappingURL=modules.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modules.schema.js","sourceRoot":"","sources":["../../../src/core/modules/modules.schema.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAmB;AAGN,QAAA,YAAY,GAAG,aAAC,CAAC,IAAI,CAAC;IAC/B,cAAc;IACd,cAAc;IACd,MAAM;IACN,QAAQ;CACX,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modules.type.d.ts","sourceRoot":"","sources":["../../../src/core/modules/modules.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,EAAC,MAAM,EAAE,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modules.type.js","sourceRoot":"","sources":["../../../src/core/modules/modules.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
export declare const socialKind: z.ZodEnum<{
|
|
3
|
+
whatsapp: "whatsapp";
|
|
4
|
+
instagram: "instagram";
|
|
5
|
+
menu: "menu";
|
|
6
|
+
maps: "maps";
|
|
7
|
+
website: "website";
|
|
8
|
+
phone: "phone";
|
|
9
|
+
appointments: "appointments";
|
|
10
|
+
reservations: "reservations";
|
|
11
|
+
orders: "orders";
|
|
12
|
+
}>;
|
|
13
|
+
export type SocialKind = z.infer<typeof socialKind>;
|
|
14
|
+
//# sourceMappingURL=social-kind.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"social-kind.schema.d.ts","sourceRoot":"","sources":["../../../src/core/social-kind/social-kind.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,eAAO,MAAM,UAAU;;;;;;;;;;EAUrB,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.socialKind = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
exports.socialKind = zod_1.default.enum([
|
|
9
|
+
"whatsapp",
|
|
10
|
+
"instagram",
|
|
11
|
+
"menu",
|
|
12
|
+
"maps",
|
|
13
|
+
"website",
|
|
14
|
+
"phone",
|
|
15
|
+
"appointments",
|
|
16
|
+
"reservations",
|
|
17
|
+
"orders",
|
|
18
|
+
]);
|
|
19
|
+
//# sourceMappingURL=social-kind.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"social-kind.schema.js","sourceRoot":"","sources":["../../../src/core/social-kind/social-kind.schema.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AAEP,QAAA,UAAU,GAAG,aAAC,CAAC,IAAI,CAAC;IAC7B,UAAU;IACV,WAAW;IACX,MAAM;IACN,MAAM;IACN,SAAS;IACT,OAAO;IACP,cAAc;IACd,cAAc;IACd,QAAQ;CACX,CAAC,CAAA"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
export declare const textOptionsSchema: z.ZodObject<{
|
|
3
|
+
color: z.ZodOptional<z.ZodString>;
|
|
4
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
5
|
+
noborder: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
text_position: z.ZodOptional<z.ZodString>;
|
|
7
|
+
className: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export type textOptions = z.infer<typeof textOptionsSchema>;
|
|
10
|
+
export declare const StyleLogoSchema: z.ZodObject<{
|
|
11
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
12
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
noborder: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
+
centered: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
16
|
+
default: "default";
|
|
17
|
+
surface: "surface";
|
|
18
|
+
outline: "outline";
|
|
19
|
+
noborder: "noborder";
|
|
20
|
+
}>>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export declare const IStyle: z.ZodObject<{
|
|
23
|
+
theme: z.ZodEnum<{
|
|
24
|
+
default: "default";
|
|
25
|
+
minimalist: "minimalist";
|
|
26
|
+
borderless: "borderless";
|
|
27
|
+
light: "light";
|
|
28
|
+
dark: "dark";
|
|
29
|
+
}>;
|
|
30
|
+
name: z.ZodObject<{
|
|
31
|
+
color: z.ZodOptional<z.ZodString>;
|
|
32
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
33
|
+
noborder: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
text_position: z.ZodOptional<z.ZodString>;
|
|
35
|
+
className: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
description: z.ZodObject<{
|
|
38
|
+
color: z.ZodOptional<z.ZodString>;
|
|
39
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
40
|
+
noborder: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
+
text_position: z.ZodOptional<z.ZodString>;
|
|
42
|
+
className: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
logo: z.ZodObject<{
|
|
45
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
noborder: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
centered: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
50
|
+
default: "default";
|
|
51
|
+
surface: "surface";
|
|
52
|
+
outline: "outline";
|
|
53
|
+
noborder: "noborder";
|
|
54
|
+
}>>;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
export type IStyle = z.infer<typeof IStyle>;
|
|
58
|
+
export declare const StyleSchema: z.ZodObject<{
|
|
59
|
+
style_id: z.ZodString;
|
|
60
|
+
style: z.ZodObject<{
|
|
61
|
+
theme: z.ZodEnum<{
|
|
62
|
+
default: "default";
|
|
63
|
+
minimalist: "minimalist";
|
|
64
|
+
borderless: "borderless";
|
|
65
|
+
light: "light";
|
|
66
|
+
dark: "dark";
|
|
67
|
+
}>;
|
|
68
|
+
name: z.ZodObject<{
|
|
69
|
+
color: z.ZodOptional<z.ZodString>;
|
|
70
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
71
|
+
noborder: z.ZodOptional<z.ZodBoolean>;
|
|
72
|
+
text_position: z.ZodOptional<z.ZodString>;
|
|
73
|
+
className: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
description: z.ZodObject<{
|
|
76
|
+
color: z.ZodOptional<z.ZodString>;
|
|
77
|
+
backgroundColor: z.ZodOptional<z.ZodString>;
|
|
78
|
+
noborder: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
+
text_position: z.ZodOptional<z.ZodString>;
|
|
80
|
+
className: z.ZodOptional<z.ZodString>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
logo: z.ZodObject<{
|
|
83
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
noborder: z.ZodOptional<z.ZodBoolean>;
|
|
86
|
+
centered: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
+
variant: z.ZodOptional<z.ZodEnum<{
|
|
88
|
+
default: "default";
|
|
89
|
+
surface: "surface";
|
|
90
|
+
outline: "outline";
|
|
91
|
+
noborder: "noborder";
|
|
92
|
+
}>>;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
}, z.core.$strip>;
|
|
96
|
+
export type Style = z.infer<typeof StyleSchema>;
|
|
97
|
+
//# sourceMappingURL=style.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.schema.d.ts","sourceRoot":"","sources":["../../../src/core/style/style.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAIpB,eAAO,MAAM,iBAAiB;;;;;;iBAM5B,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAC3D,eAAO,MAAM,eAAe;;;;;;;;;;;iBAM1B,CAAA;AACF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKjB,CAAA;AACF,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAA;AAE3C,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGtB,CAAA;AACF,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.StyleSchema = exports.IStyle = exports.StyleLogoSchema = exports.textOptionsSchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
const theme_schema_1 = require("../theme/theme.schema");
|
|
9
|
+
const variants_schema_1 = require("../variants/variants.schema");
|
|
10
|
+
exports.textOptionsSchema = zod_1.default.object({
|
|
11
|
+
color: zod_1.default.string().optional(),
|
|
12
|
+
backgroundColor: zod_1.default.string().optional(),
|
|
13
|
+
noborder: zod_1.default.boolean().optional(),
|
|
14
|
+
text_position: zod_1.default.string().optional(),
|
|
15
|
+
className: zod_1.default.string().optional(),
|
|
16
|
+
});
|
|
17
|
+
exports.StyleLogoSchema = zod_1.default.object({
|
|
18
|
+
width: zod_1.default.number().optional(),
|
|
19
|
+
height: zod_1.default.number().optional(),
|
|
20
|
+
noborder: zod_1.default.boolean().optional(),
|
|
21
|
+
centered: zod_1.default.boolean().optional(),
|
|
22
|
+
variant: variants_schema_1.Variant.optional(),
|
|
23
|
+
});
|
|
24
|
+
exports.IStyle = zod_1.default.object({
|
|
25
|
+
theme: theme_schema_1.ThemeOptionSchema,
|
|
26
|
+
name: exports.textOptionsSchema,
|
|
27
|
+
description: exports.textOptionsSchema,
|
|
28
|
+
logo: exports.StyleLogoSchema
|
|
29
|
+
});
|
|
30
|
+
exports.StyleSchema = zod_1.default.object({
|
|
31
|
+
style_id: zod_1.default.string(),
|
|
32
|
+
style: exports.IStyle
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=style.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.schema.js","sourceRoot":"","sources":["../../../src/core/style/style.schema.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,wDAA0D;AAC1D,iEAAsD;AAEzC,QAAA,iBAAiB,GAAG,aAAC,CAAC,MAAM,CAAC;IACtC,KAAK,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,eAAe,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,QAAQ,EAAE,aAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,aAAa,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACpC,SAAS,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAA;AAEW,QAAA,eAAe,GAAG,aAAC,CAAC,MAAM,CAAC;IACpC,KAAK,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,MAAM,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,QAAQ,EAAE,aAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,QAAQ,EAAE,aAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,OAAO,EAAE,yBAAO,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAA;AACW,QAAA,MAAM,GAAG,aAAC,CAAC,MAAM,CAAC;IAC3B,KAAK,EAAE,gCAAiB;IACxB,IAAI,EAAE,yBAAiB;IACvB,WAAW,EAAE,yBAAiB;IAC9B,IAAI,EAAE,uBAAe;CACxB,CAAC,CAAA;AAGW,QAAA,WAAW,GAAG,aAAC,CAAC,MAAM,CAAC;IAChC,QAAQ,EAAE,aAAC,CAAC,MAAM,EAAE;IACpB,KAAK,EAAE,cAAM;CAChB,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.schema.d.ts","sourceRoot":"","sources":["../../../src/core/theme/theme.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AAEnB,eAAO,MAAM,iBAAiB;;;;;;EAM5B,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ThemeOptionSchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
exports.ThemeOptionSchema = zod_1.default.enum([
|
|
9
|
+
"default",
|
|
10
|
+
"minimalist",
|
|
11
|
+
"borderless",
|
|
12
|
+
"light",
|
|
13
|
+
"dark",
|
|
14
|
+
]);
|
|
15
|
+
//# sourceMappingURL=theme.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.schema.js","sourceRoot":"","sources":["../../../src/core/theme/theme.schema.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAmB;AAEN,QAAA,iBAAiB,GAAG,aAAC,CAAC,IAAI,CAAC;IACtC,SAAS;IACT,YAAY;IACZ,YAAY;IACZ,OAAO;IACP,MAAM;CACP,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.type.d.ts","sourceRoot":"","sources":["../../../src/core/theme/theme.type.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.type.js","sourceRoot":"","sources":["../../../src/core/theme/theme.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variants.schema.d.ts","sourceRoot":"","sources":["../../../src/core/variants/variants.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,eAAO,MAAM,OAAO;;;;;EAAwD,CAAC;AAE7E,MAAM,MAAM,OAAO,GAAE,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Variant = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
exports.Variant = zod_1.default.enum(["default", "surface", "outline", "noborder"]);
|
|
9
|
+
//# sourceMappingURL=variants.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variants.schema.js","sourceRoot":"","sources":["../../../src/core/variants/variants.schema.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AAGP,QAAA,OAAO,GAAG,aAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variants.type.d.ts","sourceRoot":"","sources":["../../../src/core/variants/variants.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variants.type.js","sourceRoot":"","sources":["../../../src/core/variants/variants.type.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./core/business/business.schema";
|
|
2
|
+
export * from "./core/modules/modules.constants";
|
|
3
|
+
export * from "./core/modules/modules.schema";
|
|
4
|
+
export * from "./core/social-kind/social-kind.schema";
|
|
5
|
+
export * from "./core/elements/elements.schema";
|
|
6
|
+
export * from "./core/style/style.schema";
|
|
7
|
+
export * from "./core/theme/theme.schema";
|
|
8
|
+
export * from "./core/variants/variants.schema";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uCAAuC,CAAC;AACtD,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./core/business/business.schema"), exports);
|
|
18
|
+
__exportStar(require("./core/modules/modules.constants"), exports);
|
|
19
|
+
__exportStar(require("./core/modules/modules.schema"), exports);
|
|
20
|
+
__exportStar(require("./core/social-kind/social-kind.schema"), exports);
|
|
21
|
+
__exportStar(require("./core/elements/elements.schema"), exports);
|
|
22
|
+
__exportStar(require("./core/style/style.schema"), exports);
|
|
23
|
+
__exportStar(require("./core/theme/theme.schema"), exports);
|
|
24
|
+
__exportStar(require("./core/variants/variants.schema"), exports);
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAChD,mEAAiD;AACjD,gEAA8C;AAC9C,wEAAsD;AACtD,kEAAgD;AAChD,4DAA0C;AAC1C,4DAA0C;AAC1C,kEAAgD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-exports.d.ts","sourceRoot":"","sources":["../../src/scripts/generate-exports.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
console.log("Script iniciado");
|
|
7
|
+
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
8
|
+
const fs_1 = __importDefault(require("fs"));
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
|
+
const outFile = path_1.default.resolve(__dirname, "../index.ts");
|
|
11
|
+
async function generateExports() {
|
|
12
|
+
// Busca todos los .schema.ts y .constants.ts en core y modules
|
|
13
|
+
const files = await (0, fast_glob_1.default)(["../core/**/*.schema.ts", "../core/**/*.constants.ts", "../modules/**/*.ts"], {
|
|
14
|
+
cwd: __dirname,
|
|
15
|
+
absolute: true
|
|
16
|
+
});
|
|
17
|
+
if (files.length === 0) {
|
|
18
|
+
console.log("No se encontraron archivos para exportar");
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const exports = files.map(file => {
|
|
22
|
+
const relative = "./" + path_1.default.relative(path_1.default.resolve(__dirname, "../"), file).replace(/\\/g, "/").replace(/\.ts$/, "");
|
|
23
|
+
return `export * from "${relative}";`;
|
|
24
|
+
});
|
|
25
|
+
fs_1.default.writeFileSync(outFile, exports.join("\n") + "\n");
|
|
26
|
+
console.log(`Index generado en ${outFile}`);
|
|
27
|
+
console.log(exports.join("\n"));
|
|
28
|
+
}
|
|
29
|
+
generateExports().catch(err => console.error(err));
|
|
30
|
+
//# sourceMappingURL=generate-exports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-exports.js","sourceRoot":"","sources":["../../src/scripts/generate-exports.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAC/B,0DAA2B;AAC3B,4CAAoB;AACpB,gDAAwB;AAExB,MAAM,OAAO,GAAG,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;AAEvD,KAAK,UAAU,eAAe;IAC5B,+DAA+D;IAC/D,MAAM,KAAK,GAAG,MAAM,IAAA,mBAAE,EAAC,CAAC,wBAAwB,EAAE,2BAA2B,EAAE,oBAAoB,CAAC,EAAE;QACpG,GAAG,EAAE,SAAS;QACd,QAAQ,EAAE,IAAI;KACf,CAAC,CAAC;IAEH,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,CAAC,GAAG,CAAC,0CAA0C,CAAC,CAAC;QACxD,OAAO;IACT,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QAC/B,MAAM,QAAQ,GAAG,IAAI,GAAG,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACrH,OAAO,kBAAkB,QAAQ,IAAI,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,YAAE,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;IACrD,OAAO,CAAC,GAAG,CAAC,qBAAqB,OAAO,EAAE,CAAC,CAAC;IAC5C,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAClC,CAAC;AAED,eAAe,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@danielgenarog/shared-contracts",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "commonjs",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": ["dist"],
|
|
8
|
+
"scripts": {
|
|
9
|
+
"clean": "rimraf dist",
|
|
10
|
+
"prebuild": "tsc --noEmit",
|
|
11
|
+
"build": "npm run clean && tsc"
|
|
12
|
+
},
|
|
13
|
+
"peerDependencies": {
|
|
14
|
+
"class-transformer": "^0.5.1",
|
|
15
|
+
"class-validator": "^0.15.1",
|
|
16
|
+
"csstype": "^3.2.3",
|
|
17
|
+
"reflect-metadata": "^0.2.2"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"zod": "^4.3.6"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/node": "^25.5.0",
|
|
24
|
+
"fast-glob": "^3.3.3",
|
|
25
|
+
"rimraf": "^6.1.3",
|
|
26
|
+
"tsup": "^8.5.1",
|
|
27
|
+
"typescript": "^6.0.2"
|
|
28
|
+
}
|
|
29
|
+
}
|