@homespot-sdk/validators 0.0.623 → 0.0.625

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/index.js CHANGED
@@ -1,25 +1,29 @@
1
- import { makeApi, Zodios } from '@zodios/core';
2
- import { z } from 'zod';
3
- const SocialMediaRequest = z
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.api = exports.schemas = void 0;
4
+ exports.createApiClient = createApiClient;
5
+ const core_1 = require("@zodios/core");
6
+ const zod_1 = require("zod");
7
+ const SocialMediaRequest = zod_1.z
4
8
  .object({
5
- type: z.enum([
9
+ type: zod_1.z.enum([
6
10
  'FACEBOOK',
7
11
  'YOUTUBE',
8
12
  'INSTAGRAM',
9
13
  'TIKTOK',
10
14
  'LINKEDIN',
11
15
  ]),
12
- url: z.string().optional(),
16
+ url: zod_1.z.string().optional(),
13
17
  })
14
18
  .passthrough();
15
- const SocialMediasRequest = z
16
- .object({ data: z.array(SocialMediaRequest).min(1).max(5) })
19
+ const SocialMediasRequest = zod_1.z
20
+ .object({ data: zod_1.z.array(SocialMediaRequest).min(1).max(5) })
17
21
  .passthrough();
18
- const RolesRequest = z
22
+ const RolesRequest = zod_1.z
19
23
  .object({
20
- name: z.string().min(1),
21
- description: z.string().min(1),
22
- authorities: z.array(z.enum([
24
+ name: zod_1.z.string().min(1),
25
+ description: zod_1.z.string().min(1),
26
+ authorities: zod_1.z.array(zod_1.z.enum([
23
27
  'properties_read',
24
28
  'properties_write',
25
29
  'agents_read',
@@ -27,65 +31,65 @@ const RolesRequest = z
27
31
  ])),
28
32
  })
29
33
  .passthrough();
30
- const PhotoRequest = z
34
+ const PhotoRequest = zod_1.z
31
35
  .object({
32
- photo: z.string().min(0).max(255),
33
- type: z.enum(['JPEG', 'JPG', 'PNG', 'WEBP']),
34
- width: z.number().int().gte(10).lte(11000),
35
- height: z.number().int().gte(10).lte(11000).optional(),
36
+ photo: zod_1.z.string().min(0).max(255),
37
+ type: zod_1.z.enum(['JPEG', 'JPG', 'PNG', 'WEBP']),
38
+ width: zod_1.z.number().int().gte(10).lte(11000),
39
+ height: zod_1.z.number().int().gte(10).lte(11000).optional(),
36
40
  })
37
41
  .passthrough();
38
- const AddressRequest = z
42
+ const AddressRequest = zod_1.z
39
43
  .object({
40
- country: z.string().min(0).max(100),
41
- city: z.string().min(0).max(100),
42
- district: z.string().min(0).max(100),
43
- subdistrict: z.string().min(0).max(100),
44
- street: z.string().min(0).max(255),
44
+ country: zod_1.z.string().min(0).max(100),
45
+ city: zod_1.z.string().min(0).max(100),
46
+ district: zod_1.z.string().min(0).max(100),
47
+ subdistrict: zod_1.z.string().min(0).max(100),
48
+ street: zod_1.z.string().min(0).max(255),
45
49
  })
46
50
  .passthrough();
47
- const CreateAgencyRequest = z
51
+ const CreateAgencyRequest = zod_1.z
48
52
  .object({
49
- name: z.string().min(1),
50
- email: z.string().min(1).email(),
51
- seats: z.number().int(),
52
- subDomain: z.string().min(1),
53
- phone: z.string().min(1),
53
+ name: zod_1.z.string().min(1),
54
+ email: zod_1.z.string().min(1).email(),
55
+ seats: zod_1.z.number().int(),
56
+ subDomain: zod_1.z.string().min(1),
57
+ phone: zod_1.z.string().min(1),
54
58
  address: AddressRequest,
55
- yearSince: z.number().int(),
59
+ yearSince: zod_1.z.number().int(),
56
60
  })
57
61
  .passthrough();
58
- const InviteMemberRequest = z
59
- .object({ emails: z.array(z.string()).min(1) })
62
+ const InviteMemberRequest = zod_1.z
63
+ .object({ emails: zod_1.z.array(zod_1.z.string()).min(1) })
60
64
  .passthrough();
61
- const PresignedUrlResponse = z
62
- .object({ originalName: z.string(), key: z.string(), url: z.string() })
65
+ const PresignedUrlResponse = zod_1.z
66
+ .object({ originalName: zod_1.z.string(), key: zod_1.z.string(), url: zod_1.z.string() })
63
67
  .passthrough();
64
- const PresignedUrlsResponse = z
65
- .object({ data: z.array(PresignedUrlResponse) })
68
+ const PresignedUrlsResponse = zod_1.z
69
+ .object({ data: zod_1.z.array(PresignedUrlResponse) })
66
70
  .passthrough();
67
- const IdResponse = z.object({ id: z.string() }).passthrough();
68
- const UploadAcknowledgmentResponse = z
69
- .object({ success: z.array(z.string()), fail: z.array(z.string()) })
71
+ const IdResponse = zod_1.z.object({ id: zod_1.z.string() }).passthrough();
72
+ const UploadAcknowledgmentResponse = zod_1.z
73
+ .object({ success: zod_1.z.array(zod_1.z.string()), fail: zod_1.z.array(zod_1.z.string()) })
70
74
  .passthrough();
71
- const InvitationViewResponse = z
75
+ const InvitationViewResponse = zod_1.z
72
76
  .object({
73
- invitationId: z.string().uuid(),
74
- email: z.string(),
75
- status: z.enum([
77
+ invitationId: zod_1.z.string().uuid(),
78
+ email: zod_1.z.string(),
79
+ status: zod_1.z.enum([
76
80
  'PENDING',
77
81
  'ACCEPTED',
78
82
  'REJECTED',
79
83
  'CANCELLED',
80
84
  'EXPIRED',
81
85
  ]),
82
- createdAt: z.string().datetime({ offset: true }),
83
- expiresAt: z.string().datetime({ offset: true }),
84
- acceptedAt: z.string().datetime({ offset: true }).optional(),
85
- acceptedBy: z.string().optional(),
86
+ createdAt: zod_1.z.string().datetime({ offset: true }),
87
+ expiresAt: zod_1.z.string().datetime({ offset: true }),
88
+ acceptedAt: zod_1.z.string().datetime({ offset: true }).optional(),
89
+ acceptedBy: zod_1.z.string().optional(),
86
90
  })
87
91
  .passthrough();
88
- export const schemas = {
92
+ exports.schemas = {
89
93
  SocialMediaRequest,
90
94
  SocialMediasRequest,
91
95
  RolesRequest,
@@ -99,7 +103,7 @@ export const schemas = {
99
103
  UploadAcknowledgmentResponse,
100
104
  InvitationViewResponse,
101
105
  };
102
- const endpoints = makeApi([
106
+ const endpoints = (0, core_1.makeApi)([
103
107
  {
104
108
  method: 'post',
105
109
  path: '/agency',
@@ -112,7 +116,7 @@ const endpoints = makeApi([
112
116
  schema: CreateAgencyRequest,
113
117
  },
114
118
  ],
115
- response: z.void(),
119
+ response: zod_1.z.void(),
116
120
  },
117
121
  {
118
122
  method: 'get',
@@ -123,10 +127,10 @@ const endpoints = makeApi([
123
127
  {
124
128
  name: 'agencyId',
125
129
  type: 'Path',
126
- schema: z.string().uuid(),
130
+ schema: zod_1.z.string().uuid(),
127
131
  },
128
132
  ],
129
- response: z.void(),
133
+ response: zod_1.z.void(),
130
134
  },
131
135
  {
132
136
  method: 'post',
@@ -137,10 +141,10 @@ const endpoints = makeApi([
137
141
  {
138
142
  name: 'agencyId',
139
143
  type: 'Path',
140
- schema: z.string().uuid(),
144
+ schema: zod_1.z.string().uuid(),
141
145
  },
142
146
  ],
143
- response: z.void(),
147
+ response: zod_1.z.void(),
144
148
  },
145
149
  {
146
150
  method: 'get',
@@ -151,10 +155,10 @@ const endpoints = makeApi([
151
155
  {
152
156
  name: 'agencyId',
153
157
  type: 'Path',
154
- schema: z.string().uuid(),
158
+ schema: zod_1.z.string().uuid(),
155
159
  },
156
160
  ],
157
- response: z.void(),
161
+ response: zod_1.z.void(),
158
162
  },
159
163
  {
160
164
  method: 'post',
@@ -170,10 +174,10 @@ const endpoints = makeApi([
170
174
  {
171
175
  name: 'agencyId',
172
176
  type: 'Path',
173
- schema: z.string().uuid(),
177
+ schema: zod_1.z.string().uuid(),
174
178
  },
175
179
  ],
176
- response: z.void(),
180
+ response: zod_1.z.void(),
177
181
  },
178
182
  {
179
183
  method: 'post',
@@ -184,15 +188,15 @@ const endpoints = makeApi([
184
188
  {
185
189
  name: 'agencyId',
186
190
  type: 'Path',
187
- schema: z.string().uuid(),
191
+ schema: zod_1.z.string().uuid(),
188
192
  },
189
193
  {
190
194
  name: 'invitationId',
191
195
  type: 'Path',
192
- schema: z.string().uuid(),
196
+ schema: zod_1.z.string().uuid(),
193
197
  },
194
198
  ],
195
- response: z.void(),
199
+ response: zod_1.z.void(),
196
200
  },
197
201
  {
198
202
  method: 'put',
@@ -208,10 +212,10 @@ const endpoints = makeApi([
208
212
  {
209
213
  name: 'agencyId',
210
214
  type: 'Path',
211
- schema: z.string().uuid(),
215
+ schema: zod_1.z.string().uuid(),
212
216
  },
213
217
  ],
214
- response: z.void(),
218
+ response: zod_1.z.void(),
215
219
  },
216
220
  {
217
221
  method: 'post',
@@ -227,10 +231,10 @@ const endpoints = makeApi([
227
231
  {
228
232
  name: 'agencyId',
229
233
  type: 'Path',
230
- schema: z.string().uuid(),
234
+ schema: zod_1.z.string().uuid(),
231
235
  },
232
236
  ],
233
- response: z.void(),
237
+ response: zod_1.z.void(),
234
238
  },
235
239
  {
236
240
  method: 'post',
@@ -246,10 +250,10 @@ const endpoints = makeApi([
246
250
  {
247
251
  name: 'agencyId',
248
252
  type: 'Path',
249
- schema: z.string().uuid(),
253
+ schema: zod_1.z.string().uuid(),
250
254
  },
251
255
  ],
252
- response: z.void(),
256
+ response: zod_1.z.void(),
253
257
  },
254
258
  {
255
259
  method: 'post',
@@ -265,10 +269,10 @@ const endpoints = makeApi([
265
269
  {
266
270
  name: 'agencyId',
267
271
  type: 'Path',
268
- schema: z.string().uuid(),
272
+ schema: zod_1.z.string().uuid(),
269
273
  },
270
274
  ],
271
- response: z.void(),
275
+ response: zod_1.z.void(),
272
276
  },
273
277
  {
274
278
  method: 'put',
@@ -284,15 +288,15 @@ const endpoints = makeApi([
284
288
  {
285
289
  name: 'agencyId',
286
290
  type: 'Path',
287
- schema: z.string().uuid(),
291
+ schema: zod_1.z.string().uuid(),
288
292
  },
289
293
  {
290
294
  name: 'roleId',
291
295
  type: 'Path',
292
- schema: z.number().int(),
296
+ schema: zod_1.z.number().int(),
293
297
  },
294
298
  ],
295
- response: z.void(),
299
+ response: zod_1.z.void(),
296
300
  },
297
301
  {
298
302
  method: 'delete',
@@ -303,15 +307,15 @@ const endpoints = makeApi([
303
307
  {
304
308
  name: 'agencyId',
305
309
  type: 'Path',
306
- schema: z.string().uuid(),
310
+ schema: zod_1.z.string().uuid(),
307
311
  },
308
312
  {
309
313
  name: 'roleId',
310
314
  type: 'Path',
311
- schema: z.number().int(),
315
+ schema: zod_1.z.number().int(),
312
316
  },
313
317
  ],
314
- response: z.void(),
318
+ response: zod_1.z.void(),
315
319
  },
316
320
  {
317
321
  method: 'put',
@@ -327,13 +331,13 @@ const endpoints = makeApi([
327
331
  {
328
332
  name: 'agencyId',
329
333
  type: 'Path',
330
- schema: z.string().uuid(),
334
+ schema: zod_1.z.string().uuid(),
331
335
  },
332
336
  ],
333
- response: z.void(),
337
+ response: zod_1.z.void(),
334
338
  },
335
339
  ]);
336
- export const api = new Zodios(endpoints);
337
- export function createApiClient(baseUrl, options) {
338
- return new Zodios(baseUrl, endpoints, options);
340
+ exports.api = new core_1.Zodios(endpoints);
341
+ function createApiClient(baseUrl, options) {
342
+ return new core_1.Zodios(baseUrl, endpoints, options);
339
343
  }
package/package.json CHANGED
@@ -1,16 +1,12 @@
1
1
  {
2
2
  "name": "@homespot-sdk/validators",
3
- "version": "0.0.623",
4
- "type": "module",
3
+ "version": "0.0.625",
5
4
  "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "import": "./dist/index.js",
11
- "require": "./dist/index.js"
12
- }
13
- },
5
+ "types": "src/index.ts",
6
+ "files": [
7
+ "dist",
8
+ "src"
9
+ ],
14
10
  "scripts": {
15
11
  "build": "tsc"
16
12
  },
@@ -22,7 +18,6 @@
22
18
  "@zodios/core": "^10.9.6"
23
19
  },
24
20
  "devDependencies": {
25
- "typescript": "^5.0.0",
26
- "@types/node": "^20.0.0"
21
+ "typescript": "^5.0.0"
27
22
  }
28
23
  }
package/tsconfig.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ESNext",
4
- "module": "NodeNext",
5
- "moduleResolution": "NodeNext",
6
- "declaration": true,
7
- "outDir": "./dist",
8
- "strict": true,
9
- "noImplicitAny": true,
10
- "skipLibCheck": true,
11
- "esModuleInterop": true,
12
- "lib": ["ESNext", "DOM"]
13
- },
14
- "include": ["src"]
15
- }