@danielgenarog/shared-contracts 1.1.32 → 1.1.34

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.
@@ -0,0 +1,209 @@
1
+ import z from "zod";
2
+ declare const DayOfWeekSchema: z.ZodNumber;
3
+ type DayOfWeek = z.infer<typeof DayOfWeekSchema>;
4
+ declare const AvailabilitySchema: z.ZodObject<{
5
+ dayOfWeek: z.ZodNonOptional<z.ZodNumber>;
6
+ startTime: z.ZodString;
7
+ endTime: z.ZodString;
8
+ }, z.core.$strip>;
9
+ type Availability = z.infer<typeof AvailabilitySchema>;
10
+ declare const CreateAvailbilitySchema: z.ZodObject<{
11
+ dayOfWeek: z.ZodNonOptional<z.ZodNumber>;
12
+ startTime: z.ZodString;
13
+ endTime: z.ZodString;
14
+ staff_id: z.ZodString;
15
+ }, z.core.$strip>;
16
+ type CreateAvailbility = z.infer<typeof CreateAvailbilitySchema>;
17
+ declare const ResAvailabilitySchema: z.ZodObject<{
18
+ dayOfWeek: z.ZodNonOptional<z.ZodNumber>;
19
+ startTime: z.ZodString;
20
+ endTime: z.ZodString;
21
+ availability_id: z.ZodString;
22
+ business: z.ZodObject<{
23
+ version: z.ZodNumber;
24
+ type: z.ZodEnum<{
25
+ restaurant: "restaurant";
26
+ bar: "bar";
27
+ cafe: "cafe";
28
+ cloud: "cloud";
29
+ barbershop: "barbershop";
30
+ gym: "gym";
31
+ }>;
32
+ name: z.ZodString;
33
+ description: z.ZodString;
34
+ cover_image: z.ZodString;
35
+ logo: z.ZodString;
36
+ business_id: z.ZodString;
37
+ slug: z.ZodString;
38
+ elements: z.ZodOptional<z.ZodArray<z.ZodObject<{
39
+ type: z.ZodEnum<{
40
+ link: "link";
41
+ info: "info";
42
+ }>;
43
+ order: z.ZodNumber;
44
+ visible: z.ZodBoolean;
45
+ data: z.ZodObject<{
46
+ label: z.ZodOptional<z.ZodString>;
47
+ href: z.ZodOptional<z.ZodString>;
48
+ }, z.core.$strip>;
49
+ meta: z.ZodObject<{
50
+ kind: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
51
+ menu: "menu";
52
+ appointments: "appointments";
53
+ reservations: "reservations";
54
+ service: "service";
55
+ }>, z.ZodEnum<{
56
+ menu: "menu";
57
+ whatsapp: "whatsapp";
58
+ instagram: "instagram";
59
+ maps: "maps";
60
+ website: "website";
61
+ phone: "phone";
62
+ }>]>>;
63
+ }, z.core.$strip>;
64
+ options: z.ZodOptional<z.ZodObject<{
65
+ variant: z.ZodOptional<z.ZodEnum<{
66
+ default: "default";
67
+ surface: "surface";
68
+ outline: "outline";
69
+ noborder: "noborder";
70
+ }>>;
71
+ style: z.ZodOptional<z.ZodType<import("csstype").Properties<0 | (string & {}), string & {}>, unknown, z.core.$ZodTypeInternals<import("csstype").Properties<0 | (string & {}), string & {}>, unknown>>>;
72
+ className: z.ZodOptional<z.ZodString>;
73
+ }, z.core.$strip>>;
74
+ element_id: z.ZodString;
75
+ }, z.core.$strip>>>;
76
+ modules: z.ZodOptional<z.ZodArray<z.ZodObject<{
77
+ business_module_id: z.ZodString;
78
+ created_at: z.ZodDate;
79
+ updated_at: z.ZodDate;
80
+ enabled: z.ZodBoolean;
81
+ module: z.ZodObject<{
82
+ key: z.ZodEnum<{
83
+ menu: "menu";
84
+ appointments: "appointments";
85
+ reservations: "reservations";
86
+ service: "service";
87
+ orders: "orders";
88
+ staff: "staff";
89
+ availability: "availability";
90
+ }>;
91
+ description: z.ZodString;
92
+ name: z.ZodOptional<z.ZodString>;
93
+ module_id: z.ZodNumber;
94
+ businesses: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
95
+ as_dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
96
+ isOptional: z.ZodBoolean;
97
+ description: z.ZodOptional<z.ZodString>;
98
+ created_at: z.ZodDate;
99
+ updated_at: z.ZodDate;
100
+ module_dependency_id: z.ZodString;
101
+ module: z.ZodObject<{
102
+ key: z.ZodEnum<{
103
+ menu: "menu";
104
+ appointments: "appointments";
105
+ reservations: "reservations";
106
+ service: "service";
107
+ orders: "orders";
108
+ staff: "staff";
109
+ availability: "availability";
110
+ }>;
111
+ description: z.ZodString;
112
+ name: z.ZodOptional<z.ZodString>;
113
+ }, z.core.$strip>;
114
+ dependency: z.ZodObject<{
115
+ key: z.ZodEnum<{
116
+ menu: "menu";
117
+ appointments: "appointments";
118
+ reservations: "reservations";
119
+ service: "service";
120
+ orders: "orders";
121
+ staff: "staff";
122
+ availability: "availability";
123
+ }>;
124
+ description: z.ZodString;
125
+ name: z.ZodOptional<z.ZodString>;
126
+ }, z.core.$strip>;
127
+ }, z.core.$strip>>>;
128
+ depended_by: z.ZodOptional<z.ZodArray<z.ZodObject<{
129
+ isOptional: z.ZodBoolean;
130
+ description: z.ZodOptional<z.ZodString>;
131
+ created_at: z.ZodDate;
132
+ updated_at: z.ZodDate;
133
+ module_dependency_id: z.ZodString;
134
+ module: z.ZodObject<{
135
+ key: z.ZodEnum<{
136
+ menu: "menu";
137
+ appointments: "appointments";
138
+ reservations: "reservations";
139
+ service: "service";
140
+ orders: "orders";
141
+ staff: "staff";
142
+ availability: "availability";
143
+ }>;
144
+ description: z.ZodString;
145
+ name: z.ZodOptional<z.ZodString>;
146
+ }, z.core.$strip>;
147
+ dependency: z.ZodObject<{
148
+ key: z.ZodEnum<{
149
+ menu: "menu";
150
+ appointments: "appointments";
151
+ reservations: "reservations";
152
+ service: "service";
153
+ orders: "orders";
154
+ staff: "staff";
155
+ availability: "availability";
156
+ }>;
157
+ description: z.ZodString;
158
+ name: z.ZodOptional<z.ZodString>;
159
+ }, z.core.$strip>;
160
+ }, z.core.$strip>>>;
161
+ }, z.core.$strip>;
162
+ }, z.core.$strip>>>;
163
+ style: z.ZodObject<{
164
+ style: z.ZodObject<{
165
+ theme: z.ZodEnum<{
166
+ default: "default";
167
+ minimalist: "minimalist";
168
+ borderless: "borderless";
169
+ light: "light";
170
+ dark: "dark";
171
+ }>;
172
+ name: z.ZodObject<{
173
+ color: z.ZodOptional<z.ZodString>;
174
+ backgroundColor: z.ZodOptional<z.ZodString>;
175
+ noborder: z.ZodOptional<z.ZodBoolean>;
176
+ text_position: z.ZodOptional<z.ZodString>;
177
+ className: z.ZodOptional<z.ZodString>;
178
+ }, z.core.$strip>;
179
+ description: z.ZodObject<{
180
+ color: z.ZodOptional<z.ZodString>;
181
+ backgroundColor: z.ZodOptional<z.ZodString>;
182
+ noborder: z.ZodOptional<z.ZodBoolean>;
183
+ text_position: z.ZodOptional<z.ZodString>;
184
+ className: z.ZodOptional<z.ZodString>;
185
+ }, z.core.$strip>;
186
+ logo: z.ZodObject<{
187
+ width: z.ZodOptional<z.ZodNumber>;
188
+ height: z.ZodOptional<z.ZodNumber>;
189
+ noborder: z.ZodOptional<z.ZodBoolean>;
190
+ centered: z.ZodOptional<z.ZodBoolean>;
191
+ variant: z.ZodOptional<z.ZodEnum<{
192
+ default: "default";
193
+ surface: "surface";
194
+ outline: "outline";
195
+ noborder: "noborder";
196
+ }>>;
197
+ }, z.core.$strip>;
198
+ }, z.core.$strip>;
199
+ style_id: z.ZodString;
200
+ }, z.core.$strip>;
201
+ }, z.core.$strip>;
202
+ staff_id: z.ZodString;
203
+ appointment: z.ZodObject<{}, z.core.$strip>;
204
+ staff: z.ZodObject<{}, z.core.$strip>;
205
+ }, z.core.$strip>;
206
+ type ResAvailability = z.infer<typeof ResAvailabilitySchema>;
207
+ export { DayOfWeekSchema, AvailabilitySchema, CreateAvailbilitySchema, ResAvailabilitySchema };
208
+ export { DayOfWeek, Availability, CreateAvailbility, ResAvailability };
209
+ //# sourceMappingURL=availability.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"availability.schema.d.ts","sourceRoot":"","sources":["../../../src/modules/availability/availability.schema.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB,QAAA,MAAM,eAAe,aAA2B,CAAC;AACjD,KAAK,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAA;AAChD,QAAA,MAAM,kBAAkB;;;;iBAItB,CAAA;AACF,KAAK,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEtD,QAAA,MAAM,uBAAuB;;;;;iBAE3B,CAAA;AAEF,KAAK,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAEhE,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMzB,CAAA;AACF,KAAK,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAE5D,OAAO,EACH,eAAe,EACf,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACxB,CAAA;AACD,OAAO,EACH,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,eAAe,EAClB,CAAA"}
@@ -0,0 +1,29 @@
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.ResAvailabilitySchema = exports.CreateAvailbilitySchema = exports.AvailabilitySchema = exports.DayOfWeekSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const business_schema_1 = require("../../core/business/business/business.schema");
9
+ const DayOfWeekSchema = zod_1.default.number().min(0).max(6);
10
+ exports.DayOfWeekSchema = DayOfWeekSchema;
11
+ const AvailabilitySchema = zod_1.default.object({
12
+ dayOfWeek: DayOfWeekSchema.nonoptional(),
13
+ startTime: zod_1.default.string().nonempty(),
14
+ endTime: zod_1.default.string().nonempty(),
15
+ });
16
+ exports.AvailabilitySchema = AvailabilitySchema;
17
+ const CreateAvailbilitySchema = AvailabilitySchema.extend({
18
+ staff_id: zod_1.default.string().nonempty()
19
+ });
20
+ exports.CreateAvailbilitySchema = CreateAvailbilitySchema;
21
+ const ResAvailabilitySchema = CreateAvailbilitySchema.extend({
22
+ availability_id: zod_1.default.string(),
23
+ business: business_schema_1.ResBusinessSchema,
24
+ staff_id: zod_1.default.string(),
25
+ appointment: zod_1.default.object({}),
26
+ staff: zod_1.default.object({})
27
+ });
28
+ exports.ResAvailabilitySchema = ResAvailabilitySchema;
29
+ //# sourceMappingURL=availability.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"availability.schema.js","sourceRoot":"","sources":["../../../src/modules/availability/availability.schema.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAoB;AACpB,kFAAiG;AAEjG,MAAM,eAAe,GAAG,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAyB7C,0CAAe;AAvBnB,MAAM,kBAAkB,GAAG,aAAC,CAAC,MAAM,CAAC;IAChC,SAAS,EAAE,eAAe,CAAC,WAAW,EAAE;IACxC,SAAS,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,OAAO,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAA;AAoBE,gDAAkB;AAjBtB,MAAM,uBAAuB,GAAG,kBAAkB,CAAC,MAAM,CAAC;IACtD,QAAQ,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAClC,CAAC,CAAA;AAgBE,0DAAuB;AAZ3B,MAAM,qBAAqB,GAAG,uBAAuB,CAAC,MAAM,CAAC;IACzD,eAAe,EAAE,aAAC,CAAC,MAAM,EAAE;IAC3B,QAAQ,EAAC,mCAAiB;IAC1B,QAAQ,EAAE,aAAC,CAAC,MAAM,EAAE;IACpB,WAAW,EAAE,aAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACzB,KAAK,EAAE,aAAC,CAAC,MAAM,CAAC,EAAE,CAAC;CACtB,CAAC,CAAA;AAOE,sDAAqB"}