@homespot-sdk/validators 0.0.633 → 0.0.635
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.d.ts +293 -3
- package/dist/index.js +60 -7
- package/package.json +1 -1
- package/src/index.ts +62 -7
package/dist/index.d.ts
CHANGED
|
@@ -252,10 +252,288 @@ export declare const schemas: {
|
|
|
252
252
|
success: z.ZodArray<z.ZodString, "many">;
|
|
253
253
|
fail: z.ZodArray<z.ZodString, "many">;
|
|
254
254
|
}, z.ZodTypeAny, "passthrough">>;
|
|
255
|
+
OrganizationSummaryViewResponse: z.ZodObject<{
|
|
256
|
+
agencyId: z.ZodString;
|
|
257
|
+
isOwner: z.ZodBoolean;
|
|
258
|
+
agencyName: z.ZodString;
|
|
259
|
+
subDomain: z.ZodString;
|
|
260
|
+
roleId: z.ZodOptional<z.ZodNumber>;
|
|
261
|
+
memberId: z.ZodString;
|
|
262
|
+
roleName: z.ZodString;
|
|
263
|
+
authorities: z.ZodArray<z.ZodEnum<["properties_read", "properties_write", "agents_read", "agents_write"]>, "many">;
|
|
264
|
+
status: z.ZodEnum<["NEW", "ACTIVE", "PAYMENT_FAILED", "INACTIVE"]>;
|
|
265
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
266
|
+
agencyId: z.ZodString;
|
|
267
|
+
isOwner: z.ZodBoolean;
|
|
268
|
+
agencyName: z.ZodString;
|
|
269
|
+
subDomain: z.ZodString;
|
|
270
|
+
roleId: z.ZodOptional<z.ZodNumber>;
|
|
271
|
+
memberId: z.ZodString;
|
|
272
|
+
roleName: z.ZodString;
|
|
273
|
+
authorities: z.ZodArray<z.ZodEnum<["properties_read", "properties_write", "agents_read", "agents_write"]>, "many">;
|
|
274
|
+
status: z.ZodEnum<["NEW", "ACTIVE", "PAYMENT_FAILED", "INACTIVE"]>;
|
|
275
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
276
|
+
agencyId: z.ZodString;
|
|
277
|
+
isOwner: z.ZodBoolean;
|
|
278
|
+
agencyName: z.ZodString;
|
|
279
|
+
subDomain: z.ZodString;
|
|
280
|
+
roleId: z.ZodOptional<z.ZodNumber>;
|
|
281
|
+
memberId: z.ZodString;
|
|
282
|
+
roleName: z.ZodString;
|
|
283
|
+
authorities: z.ZodArray<z.ZodEnum<["properties_read", "properties_write", "agents_read", "agents_write"]>, "many">;
|
|
284
|
+
status: z.ZodEnum<["NEW", "ACTIVE", "PAYMENT_FAILED", "INACTIVE"]>;
|
|
285
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
286
|
+
UserSummaryViewResponse: z.ZodObject<{
|
|
287
|
+
email: z.ZodString;
|
|
288
|
+
firstName: z.ZodString;
|
|
289
|
+
lastName: z.ZodString;
|
|
290
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
291
|
+
email: z.ZodString;
|
|
292
|
+
firstName: z.ZodString;
|
|
293
|
+
lastName: z.ZodString;
|
|
294
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
295
|
+
email: z.ZodString;
|
|
296
|
+
firstName: z.ZodString;
|
|
297
|
+
lastName: z.ZodString;
|
|
298
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
299
|
+
UserContextViewResponse: z.ZodObject<{
|
|
300
|
+
user: z.ZodObject<{
|
|
301
|
+
email: z.ZodString;
|
|
302
|
+
firstName: z.ZodString;
|
|
303
|
+
lastName: z.ZodString;
|
|
304
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
305
|
+
email: z.ZodString;
|
|
306
|
+
firstName: z.ZodString;
|
|
307
|
+
lastName: z.ZodString;
|
|
308
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
309
|
+
email: z.ZodString;
|
|
310
|
+
firstName: z.ZodString;
|
|
311
|
+
lastName: z.ZodString;
|
|
312
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
313
|
+
organizations: z.ZodArray<z.ZodObject<{
|
|
314
|
+
agencyId: z.ZodString;
|
|
315
|
+
isOwner: z.ZodBoolean;
|
|
316
|
+
agencyName: z.ZodString;
|
|
317
|
+
subDomain: z.ZodString;
|
|
318
|
+
roleId: z.ZodOptional<z.ZodNumber>;
|
|
319
|
+
memberId: z.ZodString;
|
|
320
|
+
roleName: z.ZodString;
|
|
321
|
+
authorities: z.ZodArray<z.ZodEnum<["properties_read", "properties_write", "agents_read", "agents_write"]>, "many">;
|
|
322
|
+
status: z.ZodEnum<["NEW", "ACTIVE", "PAYMENT_FAILED", "INACTIVE"]>;
|
|
323
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
324
|
+
agencyId: z.ZodString;
|
|
325
|
+
isOwner: z.ZodBoolean;
|
|
326
|
+
agencyName: z.ZodString;
|
|
327
|
+
subDomain: z.ZodString;
|
|
328
|
+
roleId: z.ZodOptional<z.ZodNumber>;
|
|
329
|
+
memberId: z.ZodString;
|
|
330
|
+
roleName: z.ZodString;
|
|
331
|
+
authorities: z.ZodArray<z.ZodEnum<["properties_read", "properties_write", "agents_read", "agents_write"]>, "many">;
|
|
332
|
+
status: z.ZodEnum<["NEW", "ACTIVE", "PAYMENT_FAILED", "INACTIVE"]>;
|
|
333
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
334
|
+
agencyId: z.ZodString;
|
|
335
|
+
isOwner: z.ZodBoolean;
|
|
336
|
+
agencyName: z.ZodString;
|
|
337
|
+
subDomain: z.ZodString;
|
|
338
|
+
roleId: z.ZodOptional<z.ZodNumber>;
|
|
339
|
+
memberId: z.ZodString;
|
|
340
|
+
roleName: z.ZodString;
|
|
341
|
+
authorities: z.ZodArray<z.ZodEnum<["properties_read", "properties_write", "agents_read", "agents_write"]>, "many">;
|
|
342
|
+
status: z.ZodEnum<["NEW", "ACTIVE", "PAYMENT_FAILED", "INACTIVE"]>;
|
|
343
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
344
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
345
|
+
user: z.ZodObject<{
|
|
346
|
+
email: z.ZodString;
|
|
347
|
+
firstName: z.ZodString;
|
|
348
|
+
lastName: z.ZodString;
|
|
349
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
350
|
+
email: z.ZodString;
|
|
351
|
+
firstName: z.ZodString;
|
|
352
|
+
lastName: z.ZodString;
|
|
353
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
354
|
+
email: z.ZodString;
|
|
355
|
+
firstName: z.ZodString;
|
|
356
|
+
lastName: z.ZodString;
|
|
357
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
358
|
+
organizations: z.ZodArray<z.ZodObject<{
|
|
359
|
+
agencyId: z.ZodString;
|
|
360
|
+
isOwner: z.ZodBoolean;
|
|
361
|
+
agencyName: z.ZodString;
|
|
362
|
+
subDomain: z.ZodString;
|
|
363
|
+
roleId: z.ZodOptional<z.ZodNumber>;
|
|
364
|
+
memberId: z.ZodString;
|
|
365
|
+
roleName: z.ZodString;
|
|
366
|
+
authorities: z.ZodArray<z.ZodEnum<["properties_read", "properties_write", "agents_read", "agents_write"]>, "many">;
|
|
367
|
+
status: z.ZodEnum<["NEW", "ACTIVE", "PAYMENT_FAILED", "INACTIVE"]>;
|
|
368
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
369
|
+
agencyId: z.ZodString;
|
|
370
|
+
isOwner: z.ZodBoolean;
|
|
371
|
+
agencyName: z.ZodString;
|
|
372
|
+
subDomain: z.ZodString;
|
|
373
|
+
roleId: z.ZodOptional<z.ZodNumber>;
|
|
374
|
+
memberId: z.ZodString;
|
|
375
|
+
roleName: z.ZodString;
|
|
376
|
+
authorities: z.ZodArray<z.ZodEnum<["properties_read", "properties_write", "agents_read", "agents_write"]>, "many">;
|
|
377
|
+
status: z.ZodEnum<["NEW", "ACTIVE", "PAYMENT_FAILED", "INACTIVE"]>;
|
|
378
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
379
|
+
agencyId: z.ZodString;
|
|
380
|
+
isOwner: z.ZodBoolean;
|
|
381
|
+
agencyName: z.ZodString;
|
|
382
|
+
subDomain: z.ZodString;
|
|
383
|
+
roleId: z.ZodOptional<z.ZodNumber>;
|
|
384
|
+
memberId: z.ZodString;
|
|
385
|
+
roleName: z.ZodString;
|
|
386
|
+
authorities: z.ZodArray<z.ZodEnum<["properties_read", "properties_write", "agents_read", "agents_write"]>, "many">;
|
|
387
|
+
status: z.ZodEnum<["NEW", "ACTIVE", "PAYMENT_FAILED", "INACTIVE"]>;
|
|
388
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
389
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
390
|
+
user: z.ZodObject<{
|
|
391
|
+
email: z.ZodString;
|
|
392
|
+
firstName: z.ZodString;
|
|
393
|
+
lastName: z.ZodString;
|
|
394
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
395
|
+
email: z.ZodString;
|
|
396
|
+
firstName: z.ZodString;
|
|
397
|
+
lastName: z.ZodString;
|
|
398
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
399
|
+
email: z.ZodString;
|
|
400
|
+
firstName: z.ZodString;
|
|
401
|
+
lastName: z.ZodString;
|
|
402
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
403
|
+
organizations: z.ZodArray<z.ZodObject<{
|
|
404
|
+
agencyId: z.ZodString;
|
|
405
|
+
isOwner: z.ZodBoolean;
|
|
406
|
+
agencyName: z.ZodString;
|
|
407
|
+
subDomain: z.ZodString;
|
|
408
|
+
roleId: z.ZodOptional<z.ZodNumber>;
|
|
409
|
+
memberId: z.ZodString;
|
|
410
|
+
roleName: z.ZodString;
|
|
411
|
+
authorities: z.ZodArray<z.ZodEnum<["properties_read", "properties_write", "agents_read", "agents_write"]>, "many">;
|
|
412
|
+
status: z.ZodEnum<["NEW", "ACTIVE", "PAYMENT_FAILED", "INACTIVE"]>;
|
|
413
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
414
|
+
agencyId: z.ZodString;
|
|
415
|
+
isOwner: z.ZodBoolean;
|
|
416
|
+
agencyName: z.ZodString;
|
|
417
|
+
subDomain: z.ZodString;
|
|
418
|
+
roleId: z.ZodOptional<z.ZodNumber>;
|
|
419
|
+
memberId: z.ZodString;
|
|
420
|
+
roleName: z.ZodString;
|
|
421
|
+
authorities: z.ZodArray<z.ZodEnum<["properties_read", "properties_write", "agents_read", "agents_write"]>, "many">;
|
|
422
|
+
status: z.ZodEnum<["NEW", "ACTIVE", "PAYMENT_FAILED", "INACTIVE"]>;
|
|
423
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
424
|
+
agencyId: z.ZodString;
|
|
425
|
+
isOwner: z.ZodBoolean;
|
|
426
|
+
agencyName: z.ZodString;
|
|
427
|
+
subDomain: z.ZodString;
|
|
428
|
+
roleId: z.ZodOptional<z.ZodNumber>;
|
|
429
|
+
memberId: z.ZodString;
|
|
430
|
+
roleName: z.ZodString;
|
|
431
|
+
authorities: z.ZodArray<z.ZodEnum<["properties_read", "properties_write", "agents_read", "agents_write"]>, "many">;
|
|
432
|
+
status: z.ZodEnum<["NEW", "ACTIVE", "PAYMENT_FAILED", "INACTIVE"]>;
|
|
433
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
434
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
435
|
+
AddressViewResponse: z.ZodObject<{
|
|
436
|
+
country: z.ZodString;
|
|
437
|
+
city: z.ZodString;
|
|
438
|
+
district: z.ZodString;
|
|
439
|
+
subdistrict: z.ZodString;
|
|
440
|
+
street: z.ZodString;
|
|
441
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
442
|
+
country: z.ZodString;
|
|
443
|
+
city: z.ZodString;
|
|
444
|
+
district: z.ZodString;
|
|
445
|
+
subdistrict: z.ZodString;
|
|
446
|
+
street: z.ZodString;
|
|
447
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
448
|
+
country: z.ZodString;
|
|
449
|
+
city: z.ZodString;
|
|
450
|
+
district: z.ZodString;
|
|
451
|
+
subdistrict: z.ZodString;
|
|
452
|
+
street: z.ZodString;
|
|
453
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
454
|
+
AgencyViewResponse: z.ZodObject<{
|
|
455
|
+
name: z.ZodString;
|
|
456
|
+
email: z.ZodString;
|
|
457
|
+
seats: z.ZodNumber;
|
|
458
|
+
subDomain: z.ZodString;
|
|
459
|
+
phone: z.ZodString;
|
|
460
|
+
address: z.ZodObject<{
|
|
461
|
+
country: z.ZodString;
|
|
462
|
+
city: z.ZodString;
|
|
463
|
+
district: z.ZodString;
|
|
464
|
+
subdistrict: z.ZodString;
|
|
465
|
+
street: z.ZodString;
|
|
466
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
467
|
+
country: z.ZodString;
|
|
468
|
+
city: z.ZodString;
|
|
469
|
+
district: z.ZodString;
|
|
470
|
+
subdistrict: z.ZodString;
|
|
471
|
+
street: z.ZodString;
|
|
472
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
473
|
+
country: z.ZodString;
|
|
474
|
+
city: z.ZodString;
|
|
475
|
+
district: z.ZodString;
|
|
476
|
+
subdistrict: z.ZodString;
|
|
477
|
+
street: z.ZodString;
|
|
478
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
479
|
+
yearSince: z.ZodNumber;
|
|
480
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
481
|
+
name: z.ZodString;
|
|
482
|
+
email: z.ZodString;
|
|
483
|
+
seats: z.ZodNumber;
|
|
484
|
+
subDomain: z.ZodString;
|
|
485
|
+
phone: z.ZodString;
|
|
486
|
+
address: z.ZodObject<{
|
|
487
|
+
country: z.ZodString;
|
|
488
|
+
city: z.ZodString;
|
|
489
|
+
district: z.ZodString;
|
|
490
|
+
subdistrict: z.ZodString;
|
|
491
|
+
street: z.ZodString;
|
|
492
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
493
|
+
country: z.ZodString;
|
|
494
|
+
city: z.ZodString;
|
|
495
|
+
district: z.ZodString;
|
|
496
|
+
subdistrict: z.ZodString;
|
|
497
|
+
street: z.ZodString;
|
|
498
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
499
|
+
country: z.ZodString;
|
|
500
|
+
city: z.ZodString;
|
|
501
|
+
district: z.ZodString;
|
|
502
|
+
subdistrict: z.ZodString;
|
|
503
|
+
street: z.ZodString;
|
|
504
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
505
|
+
yearSince: z.ZodNumber;
|
|
506
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
507
|
+
name: z.ZodString;
|
|
508
|
+
email: z.ZodString;
|
|
509
|
+
seats: z.ZodNumber;
|
|
510
|
+
subDomain: z.ZodString;
|
|
511
|
+
phone: z.ZodString;
|
|
512
|
+
address: z.ZodObject<{
|
|
513
|
+
country: z.ZodString;
|
|
514
|
+
city: z.ZodString;
|
|
515
|
+
district: z.ZodString;
|
|
516
|
+
subdistrict: z.ZodString;
|
|
517
|
+
street: z.ZodString;
|
|
518
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
519
|
+
country: z.ZodString;
|
|
520
|
+
city: z.ZodString;
|
|
521
|
+
district: z.ZodString;
|
|
522
|
+
subdistrict: z.ZodString;
|
|
523
|
+
street: z.ZodString;
|
|
524
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
525
|
+
country: z.ZodString;
|
|
526
|
+
city: z.ZodString;
|
|
527
|
+
district: z.ZodString;
|
|
528
|
+
subdistrict: z.ZodString;
|
|
529
|
+
street: z.ZodString;
|
|
530
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
531
|
+
yearSince: z.ZodNumber;
|
|
532
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
255
533
|
InvitationViewResponse: z.ZodObject<{
|
|
256
534
|
invitationId: z.ZodString;
|
|
257
535
|
email: z.ZodString;
|
|
258
|
-
status: z.ZodEnum<["PENDING", "ACCEPTED", "
|
|
536
|
+
status: z.ZodEnum<["PENDING", "ACCEPTED", "CANCELLED", "EXPIRED"]>;
|
|
259
537
|
createdAt: z.ZodString;
|
|
260
538
|
expiresAt: z.ZodString;
|
|
261
539
|
acceptedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -263,7 +541,7 @@ export declare const schemas: {
|
|
|
263
541
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
264
542
|
invitationId: z.ZodString;
|
|
265
543
|
email: z.ZodString;
|
|
266
|
-
status: z.ZodEnum<["PENDING", "ACCEPTED", "
|
|
544
|
+
status: z.ZodEnum<["PENDING", "ACCEPTED", "CANCELLED", "EXPIRED"]>;
|
|
267
545
|
createdAt: z.ZodString;
|
|
268
546
|
expiresAt: z.ZodString;
|
|
269
547
|
acceptedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -271,7 +549,7 @@ export declare const schemas: {
|
|
|
271
549
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
272
550
|
invitationId: z.ZodString;
|
|
273
551
|
email: z.ZodString;
|
|
274
|
-
status: z.ZodEnum<["PENDING", "ACCEPTED", "
|
|
552
|
+
status: z.ZodEnum<["PENDING", "ACCEPTED", "CANCELLED", "EXPIRED"]>;
|
|
275
553
|
createdAt: z.ZodString;
|
|
276
554
|
expiresAt: z.ZodString;
|
|
277
555
|
acceptedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -740,6 +1018,12 @@ export declare const api: import("@zodios/core").ZodiosInstance<[{
|
|
|
740
1018
|
schema: z.ZodString;
|
|
741
1019
|
}];
|
|
742
1020
|
response: z.ZodVoid;
|
|
1021
|
+
}, {
|
|
1022
|
+
method: "get";
|
|
1023
|
+
path: "/user/me";
|
|
1024
|
+
alias: "getMe";
|
|
1025
|
+
requestFormat: "json";
|
|
1026
|
+
response: z.ZodVoid;
|
|
743
1027
|
}]>;
|
|
744
1028
|
export declare function createApiClient(baseUrl: string, options?: ZodiosOptions): import("@zodios/core").ZodiosInstance<[{
|
|
745
1029
|
method: "post";
|
|
@@ -1203,4 +1487,10 @@ export declare function createApiClient(baseUrl: string, options?: ZodiosOptions
|
|
|
1203
1487
|
schema: z.ZodString;
|
|
1204
1488
|
}];
|
|
1205
1489
|
response: z.ZodVoid;
|
|
1490
|
+
}, {
|
|
1491
|
+
method: "get";
|
|
1492
|
+
path: "/user/me";
|
|
1493
|
+
alias: "getMe";
|
|
1494
|
+
requestFormat: "json";
|
|
1495
|
+
response: z.ZodVoid;
|
|
1206
1496
|
}]>;
|
package/dist/index.js
CHANGED
|
@@ -72,17 +72,58 @@ const IdResponse = zod_1.z.object({ id: zod_1.z.string() }).passthrough();
|
|
|
72
72
|
const UploadAcknowledgmentResponse = zod_1.z
|
|
73
73
|
.object({ success: zod_1.z.array(zod_1.z.string()), fail: zod_1.z.array(zod_1.z.string()) })
|
|
74
74
|
.passthrough();
|
|
75
|
+
const OrganizationSummaryViewResponse = zod_1.z
|
|
76
|
+
.object({
|
|
77
|
+
agencyId: zod_1.z.string().uuid(),
|
|
78
|
+
isOwner: zod_1.z.boolean(),
|
|
79
|
+
agencyName: zod_1.z.string(),
|
|
80
|
+
subDomain: zod_1.z.string(),
|
|
81
|
+
roleId: zod_1.z.number().int().optional(),
|
|
82
|
+
memberId: zod_1.z.string().uuid(),
|
|
83
|
+
roleName: zod_1.z.string(),
|
|
84
|
+
authorities: zod_1.z.array(zod_1.z.enum([
|
|
85
|
+
'properties_read',
|
|
86
|
+
'properties_write',
|
|
87
|
+
'agents_read',
|
|
88
|
+
'agents_write',
|
|
89
|
+
])),
|
|
90
|
+
status: zod_1.z.enum(['NEW', 'ACTIVE', 'PAYMENT_FAILED', 'INACTIVE']),
|
|
91
|
+
})
|
|
92
|
+
.passthrough();
|
|
93
|
+
const UserSummaryViewResponse = zod_1.z
|
|
94
|
+
.object({ email: zod_1.z.string(), firstName: zod_1.z.string(), lastName: zod_1.z.string() })
|
|
95
|
+
.passthrough();
|
|
96
|
+
const UserContextViewResponse = zod_1.z
|
|
97
|
+
.object({
|
|
98
|
+
user: UserSummaryViewResponse,
|
|
99
|
+
organizations: zod_1.z.array(OrganizationSummaryViewResponse),
|
|
100
|
+
})
|
|
101
|
+
.passthrough();
|
|
102
|
+
const AddressViewResponse = zod_1.z
|
|
103
|
+
.object({
|
|
104
|
+
country: zod_1.z.string(),
|
|
105
|
+
city: zod_1.z.string(),
|
|
106
|
+
district: zod_1.z.string(),
|
|
107
|
+
subdistrict: zod_1.z.string(),
|
|
108
|
+
street: zod_1.z.string(),
|
|
109
|
+
})
|
|
110
|
+
.passthrough();
|
|
111
|
+
const AgencyViewResponse = zod_1.z
|
|
112
|
+
.object({
|
|
113
|
+
name: zod_1.z.string(),
|
|
114
|
+
email: zod_1.z.string(),
|
|
115
|
+
seats: zod_1.z.number().int(),
|
|
116
|
+
subDomain: zod_1.z.string(),
|
|
117
|
+
phone: zod_1.z.string(),
|
|
118
|
+
address: AddressViewResponse,
|
|
119
|
+
yearSince: zod_1.z.number().int(),
|
|
120
|
+
})
|
|
121
|
+
.passthrough();
|
|
75
122
|
const InvitationViewResponse = zod_1.z
|
|
76
123
|
.object({
|
|
77
124
|
invitationId: zod_1.z.string().uuid(),
|
|
78
125
|
email: zod_1.z.string(),
|
|
79
|
-
status: zod_1.z.enum([
|
|
80
|
-
'PENDING',
|
|
81
|
-
'ACCEPTED',
|
|
82
|
-
'REJECTED',
|
|
83
|
-
'CANCELLED',
|
|
84
|
-
'EXPIRED',
|
|
85
|
-
]),
|
|
126
|
+
status: zod_1.z.enum(['PENDING', 'ACCEPTED', 'CANCELLED', 'EXPIRED']),
|
|
86
127
|
createdAt: zod_1.z.string().datetime({ offset: true }),
|
|
87
128
|
expiresAt: zod_1.z.string().datetime({ offset: true }),
|
|
88
129
|
acceptedAt: zod_1.z.string().datetime({ offset: true }).optional(),
|
|
@@ -101,6 +142,11 @@ exports.schemas = {
|
|
|
101
142
|
PresignedUrlsResponse,
|
|
102
143
|
IdResponse,
|
|
103
144
|
UploadAcknowledgmentResponse,
|
|
145
|
+
OrganizationSummaryViewResponse,
|
|
146
|
+
UserSummaryViewResponse,
|
|
147
|
+
UserContextViewResponse,
|
|
148
|
+
AddressViewResponse,
|
|
149
|
+
AgencyViewResponse,
|
|
104
150
|
InvitationViewResponse,
|
|
105
151
|
};
|
|
106
152
|
const endpoints = (0, core_1.makeApi)([
|
|
@@ -355,6 +401,13 @@ const endpoints = (0, core_1.makeApi)([
|
|
|
355
401
|
],
|
|
356
402
|
response: zod_1.z.void(),
|
|
357
403
|
},
|
|
404
|
+
{
|
|
405
|
+
method: 'get',
|
|
406
|
+
path: '/user/me',
|
|
407
|
+
alias: 'getMe',
|
|
408
|
+
requestFormat: 'json',
|
|
409
|
+
response: zod_1.z.void(),
|
|
410
|
+
},
|
|
358
411
|
]);
|
|
359
412
|
exports.api = new core_1.Zodios(endpoints);
|
|
360
413
|
function createApiClient(baseUrl, options) {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -71,17 +71,60 @@ const IdResponse = z.object({ id: z.string() }).passthrough();
|
|
|
71
71
|
const UploadAcknowledgmentResponse = z
|
|
72
72
|
.object({ success: z.array(z.string()), fail: z.array(z.string()) })
|
|
73
73
|
.passthrough();
|
|
74
|
+
const OrganizationSummaryViewResponse = z
|
|
75
|
+
.object({
|
|
76
|
+
agencyId: z.string().uuid(),
|
|
77
|
+
isOwner: z.boolean(),
|
|
78
|
+
agencyName: z.string(),
|
|
79
|
+
subDomain: z.string(),
|
|
80
|
+
roleId: z.number().int().optional(),
|
|
81
|
+
memberId: z.string().uuid(),
|
|
82
|
+
roleName: z.string(),
|
|
83
|
+
authorities: z.array(
|
|
84
|
+
z.enum([
|
|
85
|
+
'properties_read',
|
|
86
|
+
'properties_write',
|
|
87
|
+
'agents_read',
|
|
88
|
+
'agents_write',
|
|
89
|
+
])
|
|
90
|
+
),
|
|
91
|
+
status: z.enum(['NEW', 'ACTIVE', 'PAYMENT_FAILED', 'INACTIVE']),
|
|
92
|
+
})
|
|
93
|
+
.passthrough();
|
|
94
|
+
const UserSummaryViewResponse = z
|
|
95
|
+
.object({ email: z.string(), firstName: z.string(), lastName: z.string() })
|
|
96
|
+
.passthrough();
|
|
97
|
+
const UserContextViewResponse = z
|
|
98
|
+
.object({
|
|
99
|
+
user: UserSummaryViewResponse,
|
|
100
|
+
organizations: z.array(OrganizationSummaryViewResponse),
|
|
101
|
+
})
|
|
102
|
+
.passthrough();
|
|
103
|
+
const AddressViewResponse = z
|
|
104
|
+
.object({
|
|
105
|
+
country: z.string(),
|
|
106
|
+
city: z.string(),
|
|
107
|
+
district: z.string(),
|
|
108
|
+
subdistrict: z.string(),
|
|
109
|
+
street: z.string(),
|
|
110
|
+
})
|
|
111
|
+
.passthrough();
|
|
112
|
+
const AgencyViewResponse = z
|
|
113
|
+
.object({
|
|
114
|
+
name: z.string(),
|
|
115
|
+
email: z.string(),
|
|
116
|
+
seats: z.number().int(),
|
|
117
|
+
subDomain: z.string(),
|
|
118
|
+
phone: z.string(),
|
|
119
|
+
address: AddressViewResponse,
|
|
120
|
+
yearSince: z.number().int(),
|
|
121
|
+
})
|
|
122
|
+
.passthrough();
|
|
74
123
|
const InvitationViewResponse = z
|
|
75
124
|
.object({
|
|
76
125
|
invitationId: z.string().uuid(),
|
|
77
126
|
email: z.string(),
|
|
78
|
-
status: z.enum([
|
|
79
|
-
'PENDING',
|
|
80
|
-
'ACCEPTED',
|
|
81
|
-
'REJECTED',
|
|
82
|
-
'CANCELLED',
|
|
83
|
-
'EXPIRED',
|
|
84
|
-
]),
|
|
127
|
+
status: z.enum(['PENDING', 'ACCEPTED', 'CANCELLED', 'EXPIRED']),
|
|
85
128
|
createdAt: z.string().datetime({ offset: true }),
|
|
86
129
|
expiresAt: z.string().datetime({ offset: true }),
|
|
87
130
|
acceptedAt: z.string().datetime({ offset: true }).optional(),
|
|
@@ -101,6 +144,11 @@ export const schemas = {
|
|
|
101
144
|
PresignedUrlsResponse,
|
|
102
145
|
IdResponse,
|
|
103
146
|
UploadAcknowledgmentResponse,
|
|
147
|
+
OrganizationSummaryViewResponse,
|
|
148
|
+
UserSummaryViewResponse,
|
|
149
|
+
UserContextViewResponse,
|
|
150
|
+
AddressViewResponse,
|
|
151
|
+
AgencyViewResponse,
|
|
104
152
|
InvitationViewResponse,
|
|
105
153
|
};
|
|
106
154
|
|
|
@@ -356,6 +404,13 @@ const endpoints = makeApi([
|
|
|
356
404
|
],
|
|
357
405
|
response: z.void(),
|
|
358
406
|
},
|
|
407
|
+
{
|
|
408
|
+
method: 'get',
|
|
409
|
+
path: '/user/me',
|
|
410
|
+
alias: 'getMe',
|
|
411
|
+
requestFormat: 'json',
|
|
412
|
+
response: z.void(),
|
|
413
|
+
},
|
|
359
414
|
]);
|
|
360
415
|
|
|
361
416
|
export const api = new Zodios(endpoints);
|