@assemblis/contracts 0.2.6 → 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/index.js +1 -1
- package/dist/schemas/api.d.ts +156 -30
- package/dist/schemas/base.d.ts +44 -5
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/utils.d.ts +2 -0
- package/dist/types/enums.d.ts +10 -22
- package/dist/types/index.d.ts +0 -1
- package/dist/types/types.d.ts +2 -1
- package/package.json +1 -1
- package/src/schemas/api.ts +83 -21
- package/src/schemas/base.ts +47 -5
- package/src/schemas/index.ts +1 -1
- package/src/schemas/utils.ts +17 -0
- package/src/types/enums.ts +11 -25
- package/src/types/index.ts +0 -1
- package/src/types/types.ts +6 -3
- package/src/schemas/legacy.ts +0 -328
- package/src/types/api.ts +0 -66
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from"zod";var e,n,i;!function(t){t.ACCOUNT="/account",t.ACCOUNT_REPORTS="/account/reports",t.INTEREST="/interest",t.LOGS="/logs",t.PING="/ping",t.PINS="/pins",t.REGISTER="/register",t.REPORTS="/reports"}(e||(e={})),function(t){t.GET="GET",t.POST="POST",t.PUT="PUT",t.PATCH="PATCH"}(n||(n={})),function(t){t.DISCARDED="DISCARDED",t.DRAFTED="DRAFT",t.PUBLISHED="PUBLISHED",t.CHANGED="CHANGED"}(i||(i={}));const o=t.coerce.date().transform(t=>t.toISOString()),r=t=>t.nullish().transform(t=>t??null);function a(t,e){return Object.keys(e).reduce((t,n)=>t.replace(`:${n}`,e[n]),t)}const s=t.object({id:t.uuid(),created_at:o,updated_at:o,alt:t.string(),srcset:t.string(),width:t.int(),height:t.int()}),d=t.object({recaptcha_token:t.string(),email:t.email().toLowerCase().trim(),listIds:t.int().array(),firstname:t.string().nullish().transform(t=>t??void 0),lastname:t.string().nullish().transform(t=>t??void 0),country:t.string().nullish().transform(t=>t??void 0),organisation:t.string().nullish().transform(t=>t??void 0)}),p=t.object({published_at:r(o),title:r(t.string()),description:r(t.string()),location:r(t.string()),outputs:r(t.string().array()),initiation_type:r(t.string()),recruitment_method:r(t.string()),recruitment_description:r(t.string()),participant_count:r(t.int()),organiser_reflections:r(t.string()),organiser_report_url:r(t.string()),location_details:r(t.string()),date:r(t.string()),duration:r(t.int()),contact_information_url:r(t.string()),cover_image_id:r(t.string())}),c=t.object({server_id:t.uuid(),client_id:t.uuid(),display_seq:t.int(),created_at:o,updated_at:o,published_at:r(o),state:t.enum(["DISCARDED","DRAFTED","PUBLISHED","CHANGED"]),slug:r(t.string()),draft_content:r(p),published_content:r(p),media:t.object({images:s.array()})});t.object({id:t.uuid(),created_at:o,updated_at:o,sub:t.string(),is_mutirao:t.boolean()});const l=t.object({id:t.uuid(),created_at:o,updated_at:o,image_src:r(t.string()),has_image:t.boolean().meta({deprecated:!0}),user_id:t.uuid().meta({deprecated:!0}),published_at:r(o),name:t.string(),about:r(t.string()),topics:t.string().array(),country:r(t.string()),hide:t.boolean().default(!1)}),u=t.object({id:t.uuid(),created_at:t.coerce.date().transform(t=>t.toISOString()),updated_at:t.coerce.date().transform(t=>t.toISOString()),country:t.string(),text:r(t.string()),hide:t.boolean(),image_src:r(t.string()),has_image:t.boolean().meta({deprecated:!0})}),g=t.object({message:t.string().optional(),data:t.record(t.string(),t.string().optional()).optional(),metadata:t.object({origin:t.string(),route:t.string(),status:t.number()})}),m=t.object({type:t.literal("user.created"),object:t.literal("event"),data:t.object({id:t.string(),email_addresses:t.object({email_address:t.string()}).array()})}),_={endpoint:e.ACCOUNT_REPORTS,method:n.GET,payload:t.never(),response:t.object({reports:c.array(),total:t.int()})},T={endpoint:`${e.ACCOUNT_REPORTS}/:client_id`,method:n.GET,payload:t.never(),response:r(c)},S={endpoint:e.ACCOUNT_REPORTS,method:n.POST,payload:t.object({client_id:t.uuid(),content:r(p.omit({cover_image_id:!0}))}),response:c},h={endpoint:`${e.ACCOUNT_REPORTS}/:client_id/content`,method:n.PUT,payload:p.omit({published_at:!0,cover_image_id:!0}),response:c},b={endpoint:`${e.ACCOUNT_REPORTS}/:client_id/discard`,method:n.PATCH,payload:t.nullish(t.object()),response:r(c)},E={endpoint:`${e.ACCOUNT_REPORTS}/:client_id/publish`,method:n.PATCH,payload:t.object({published_at:o}),response:c},P={endpoint:`${e.ACCOUNT_REPORTS}/:client_id/unpublish`,method:n.PATCH,payload:t.nullish(t.object()),response:c},O={endpoint:`${e.ACCOUNT_REPORTS}/:client_id/cover-image`,method:n.POST,payload:s.pick({alt:!0}),response:c},R={endpoint:e.INTEREST,method:n.POST,payload:d,response:t.string()},y={endpoint:`${e.INTEREST}/assemblis`,method:n.POST,payload:d.omit({listIds:!0}),response:t.string()},C={endpoint:e.REPORTS,method:n.GET,payload:t.never(),response:t.object({reports:c.array(),total:t.int()})},A={endpoint:`${e.REPORTS}/:slug`,method:n.GET,payload:t.never(),response:r(c)},j={endpoint:e.PINS,method:n.GET,payload:t.never(),response:t.object({assemblies:l.array(),pins:u.array()})},I={endpoint:e.PINS,method:n.POST,payload:t.object({country:t.string(),email:t.string(),text:r(t.string())}),response:u},N={endpoint:`${e.PINS}/:id/hide`,method:n.PATCH,payload:t.never(),response:u},D={endpoint:e.PING,method:n.GET,payload:t.never(),response:t.never()},f={endpoint:`${e.LOGS}/info`,method:n.POST,payload:g,response:t.string()},v={endpoint:`${e.LOGS}/error`,method:n.POST,payload:g,response:t.string()},G={endpoint:e.REGISTER,method:n.POST,payload:m,response:t.string()};export{e as ApiEndpoint,n as ApiRestMethod,T as GetAccountReportsIdSchema,_ as GetAccountReportsSchema,D as GetPingSchema,j as GetPinsSchema,C as GetReportsSchema,A as GetReportsSlugSchema,b as PatchAccountReportsIdDiscardSchema,E as PatchAccountReportsIdPublishSchema,P as PatchAccountReportsIdUnpublishSchema,N as PatchPinHideSchema,O as PostAccountReportsIdCoverImageSchema,S as PostAccountReportsSchema,y as PostInterestAssemblisSchema,R as PostInterestSchema,v as PostLogsErrorSchema,f as PostLogsInfoSchema,I as PostPinSchema,G as PostRegisterSchema,h as PutAccountReportsIdContentSchema,i as ReportState,a as resolvePath};
|
package/dist/schemas/api.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
2
|
import { ApiEndpoint, ApiRestMethod } from '../types';
|
|
3
|
-
type AccountEndpoint = `/account/${string}`;
|
|
4
3
|
export declare const GetAccountReportsSchema: {
|
|
5
|
-
endpoint:
|
|
4
|
+
endpoint: ApiEndpoint.ACCOUNT_REPORTS;
|
|
6
5
|
method: ApiRestMethod;
|
|
7
6
|
payload: z.ZodNever;
|
|
8
7
|
response: z.ZodObject<{
|
|
@@ -15,9 +14,9 @@ export declare const GetAccountReportsSchema: {
|
|
|
15
14
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
16
15
|
state: z.ZodEnum<{
|
|
17
16
|
DISCARDED: "DISCARDED";
|
|
18
|
-
DRAFTED: "DRAFTED";
|
|
19
17
|
PUBLISHED: "PUBLISHED";
|
|
20
18
|
CHANGED: "CHANGED";
|
|
19
|
+
DRAFTED: "DRAFTED";
|
|
21
20
|
}>;
|
|
22
21
|
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
23
22
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -140,7 +139,7 @@ export declare const GetAccountReportsSchema: {
|
|
|
140
139
|
}, z.core.$strip>;
|
|
141
140
|
};
|
|
142
141
|
export declare const GetAccountReportsIdSchema: {
|
|
143
|
-
endpoint:
|
|
142
|
+
endpoint: "/account/reports/:client_id";
|
|
144
143
|
method: ApiRestMethod;
|
|
145
144
|
payload: z.ZodNever;
|
|
146
145
|
response: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -152,9 +151,9 @@ export declare const GetAccountReportsIdSchema: {
|
|
|
152
151
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
153
152
|
state: z.ZodEnum<{
|
|
154
153
|
DISCARDED: "DISCARDED";
|
|
155
|
-
DRAFTED: "DRAFTED";
|
|
156
154
|
PUBLISHED: "PUBLISHED";
|
|
157
155
|
CHANGED: "CHANGED";
|
|
156
|
+
DRAFTED: "DRAFTED";
|
|
158
157
|
}>;
|
|
159
158
|
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
160
159
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -279,7 +278,7 @@ export declare const GetAccountReportsIdSchema: {
|
|
|
279
278
|
created_at: string;
|
|
280
279
|
updated_at: string;
|
|
281
280
|
published_at: string | null;
|
|
282
|
-
state: "DISCARDED" | "
|
|
281
|
+
state: "DISCARDED" | "PUBLISHED" | "CHANGED" | "DRAFTED";
|
|
283
282
|
slug: string | null;
|
|
284
283
|
draft_content: {
|
|
285
284
|
published_at: string | null;
|
|
@@ -335,7 +334,7 @@ export declare const GetAccountReportsIdSchema: {
|
|
|
335
334
|
created_at: string;
|
|
336
335
|
updated_at: string;
|
|
337
336
|
published_at: string | null;
|
|
338
|
-
state: "DISCARDED" | "
|
|
337
|
+
state: "DISCARDED" | "PUBLISHED" | "CHANGED" | "DRAFTED";
|
|
339
338
|
slug: string | null;
|
|
340
339
|
draft_content: {
|
|
341
340
|
published_at: string | null;
|
|
@@ -387,7 +386,7 @@ export declare const GetAccountReportsIdSchema: {
|
|
|
387
386
|
} | null | undefined>>;
|
|
388
387
|
};
|
|
389
388
|
export declare const PostAccountReportsSchema: {
|
|
390
|
-
endpoint:
|
|
389
|
+
endpoint: ApiEndpoint.ACCOUNT_REPORTS;
|
|
391
390
|
method: ApiRestMethod;
|
|
392
391
|
payload: z.ZodObject<{
|
|
393
392
|
client_id: z.ZodUUID;
|
|
@@ -450,9 +449,9 @@ export declare const PostAccountReportsSchema: {
|
|
|
450
449
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
451
450
|
state: z.ZodEnum<{
|
|
452
451
|
DISCARDED: "DISCARDED";
|
|
453
|
-
DRAFTED: "DRAFTED";
|
|
454
452
|
PUBLISHED: "PUBLISHED";
|
|
455
453
|
CHANGED: "CHANGED";
|
|
454
|
+
DRAFTED: "DRAFTED";
|
|
456
455
|
}>;
|
|
457
456
|
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
458
457
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -573,7 +572,7 @@ export declare const PostAccountReportsSchema: {
|
|
|
573
572
|
}, z.core.$strip>;
|
|
574
573
|
};
|
|
575
574
|
export declare const PutAccountReportsIdContentSchema: {
|
|
576
|
-
endpoint:
|
|
575
|
+
endpoint: "/account/reports/:client_id/content";
|
|
577
576
|
method: ApiRestMethod;
|
|
578
577
|
payload: z.ZodObject<{
|
|
579
578
|
date: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -600,9 +599,9 @@ export declare const PutAccountReportsIdContentSchema: {
|
|
|
600
599
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
601
600
|
state: z.ZodEnum<{
|
|
602
601
|
DISCARDED: "DISCARDED";
|
|
603
|
-
DRAFTED: "DRAFTED";
|
|
604
602
|
PUBLISHED: "PUBLISHED";
|
|
605
603
|
CHANGED: "CHANGED";
|
|
604
|
+
DRAFTED: "DRAFTED";
|
|
606
605
|
}>;
|
|
607
606
|
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
608
607
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -723,7 +722,7 @@ export declare const PutAccountReportsIdContentSchema: {
|
|
|
723
722
|
}, z.core.$strip>;
|
|
724
723
|
};
|
|
725
724
|
export declare const PatchAccountReportsIdDiscardSchema: {
|
|
726
|
-
endpoint:
|
|
725
|
+
endpoint: "/account/reports/:client_id/discard";
|
|
727
726
|
method: ApiRestMethod;
|
|
728
727
|
payload: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, z.core.$strip>>>;
|
|
729
728
|
response: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -735,9 +734,9 @@ export declare const PatchAccountReportsIdDiscardSchema: {
|
|
|
735
734
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
736
735
|
state: z.ZodEnum<{
|
|
737
736
|
DISCARDED: "DISCARDED";
|
|
738
|
-
DRAFTED: "DRAFTED";
|
|
739
737
|
PUBLISHED: "PUBLISHED";
|
|
740
738
|
CHANGED: "CHANGED";
|
|
739
|
+
DRAFTED: "DRAFTED";
|
|
741
740
|
}>;
|
|
742
741
|
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
743
742
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -862,7 +861,7 @@ export declare const PatchAccountReportsIdDiscardSchema: {
|
|
|
862
861
|
created_at: string;
|
|
863
862
|
updated_at: string;
|
|
864
863
|
published_at: string | null;
|
|
865
|
-
state: "DISCARDED" | "
|
|
864
|
+
state: "DISCARDED" | "PUBLISHED" | "CHANGED" | "DRAFTED";
|
|
866
865
|
slug: string | null;
|
|
867
866
|
draft_content: {
|
|
868
867
|
published_at: string | null;
|
|
@@ -918,7 +917,7 @@ export declare const PatchAccountReportsIdDiscardSchema: {
|
|
|
918
917
|
created_at: string;
|
|
919
918
|
updated_at: string;
|
|
920
919
|
published_at: string | null;
|
|
921
|
-
state: "DISCARDED" | "
|
|
920
|
+
state: "DISCARDED" | "PUBLISHED" | "CHANGED" | "DRAFTED";
|
|
922
921
|
slug: string | null;
|
|
923
922
|
draft_content: {
|
|
924
923
|
published_at: string | null;
|
|
@@ -970,7 +969,7 @@ export declare const PatchAccountReportsIdDiscardSchema: {
|
|
|
970
969
|
} | null | undefined>>;
|
|
971
970
|
};
|
|
972
971
|
export declare const PatchAccountReportsIdPublishSchema: {
|
|
973
|
-
endpoint:
|
|
972
|
+
endpoint: "/account/reports/:client_id/publish";
|
|
974
973
|
method: ApiRestMethod;
|
|
975
974
|
payload: z.ZodObject<{
|
|
976
975
|
published_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
@@ -984,9 +983,9 @@ export declare const PatchAccountReportsIdPublishSchema: {
|
|
|
984
983
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
985
984
|
state: z.ZodEnum<{
|
|
986
985
|
DISCARDED: "DISCARDED";
|
|
987
|
-
DRAFTED: "DRAFTED";
|
|
988
986
|
PUBLISHED: "PUBLISHED";
|
|
989
987
|
CHANGED: "CHANGED";
|
|
988
|
+
DRAFTED: "DRAFTED";
|
|
990
989
|
}>;
|
|
991
990
|
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
992
991
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -1107,7 +1106,7 @@ export declare const PatchAccountReportsIdPublishSchema: {
|
|
|
1107
1106
|
}, z.core.$strip>;
|
|
1108
1107
|
};
|
|
1109
1108
|
export declare const PatchAccountReportsIdUnpublishSchema: {
|
|
1110
|
-
endpoint:
|
|
1109
|
+
endpoint: "/account/reports/:client_id/unpublish";
|
|
1111
1110
|
method: ApiRestMethod;
|
|
1112
1111
|
payload: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, z.core.$strip>>>;
|
|
1113
1112
|
response: z.ZodObject<{
|
|
@@ -1119,9 +1118,9 @@ export declare const PatchAccountReportsIdUnpublishSchema: {
|
|
|
1119
1118
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1120
1119
|
state: z.ZodEnum<{
|
|
1121
1120
|
DISCARDED: "DISCARDED";
|
|
1122
|
-
DRAFTED: "DRAFTED";
|
|
1123
1121
|
PUBLISHED: "PUBLISHED";
|
|
1124
1122
|
CHANGED: "CHANGED";
|
|
1123
|
+
DRAFTED: "DRAFTED";
|
|
1125
1124
|
}>;
|
|
1126
1125
|
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1127
1126
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -1242,7 +1241,7 @@ export declare const PatchAccountReportsIdUnpublishSchema: {
|
|
|
1242
1241
|
}, z.core.$strip>;
|
|
1243
1242
|
};
|
|
1244
1243
|
export declare const PostAccountReportsIdCoverImageSchema: {
|
|
1245
|
-
endpoint:
|
|
1244
|
+
endpoint: "/account/reports/:client_id/cover-image";
|
|
1246
1245
|
method: ApiRestMethod;
|
|
1247
1246
|
payload: z.ZodObject<{
|
|
1248
1247
|
alt: z.ZodString;
|
|
@@ -1256,9 +1255,9 @@ export declare const PostAccountReportsIdCoverImageSchema: {
|
|
|
1256
1255
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1257
1256
|
state: z.ZodEnum<{
|
|
1258
1257
|
DISCARDED: "DISCARDED";
|
|
1259
|
-
DRAFTED: "DRAFTED";
|
|
1260
1258
|
PUBLISHED: "PUBLISHED";
|
|
1261
1259
|
CHANGED: "CHANGED";
|
|
1260
|
+
DRAFTED: "DRAFTED";
|
|
1262
1261
|
}>;
|
|
1263
1262
|
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1264
1263
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -1379,7 +1378,7 @@ export declare const PostAccountReportsIdCoverImageSchema: {
|
|
|
1379
1378
|
}, z.core.$strip>;
|
|
1380
1379
|
};
|
|
1381
1380
|
export declare const PostInterestSchema: {
|
|
1382
|
-
endpoint:
|
|
1381
|
+
endpoint: ApiEndpoint.INTEREST;
|
|
1383
1382
|
method: ApiRestMethod;
|
|
1384
1383
|
payload: z.ZodObject<{
|
|
1385
1384
|
recaptcha_token: z.ZodString;
|
|
@@ -1392,8 +1391,21 @@ export declare const PostInterestSchema: {
|
|
|
1392
1391
|
}, z.core.$strip>;
|
|
1393
1392
|
response: z.ZodString;
|
|
1394
1393
|
};
|
|
1394
|
+
export declare const PostInterestAssemblisSchema: {
|
|
1395
|
+
endpoint: "/interest/assemblis";
|
|
1396
|
+
method: ApiRestMethod;
|
|
1397
|
+
payload: z.ZodObject<{
|
|
1398
|
+
recaptcha_token: z.ZodString;
|
|
1399
|
+
email: z.ZodEmail;
|
|
1400
|
+
firstname: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | undefined, string | null | undefined>>;
|
|
1401
|
+
lastname: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | undefined, string | null | undefined>>;
|
|
1402
|
+
country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | undefined, string | null | undefined>>;
|
|
1403
|
+
organisation: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | undefined, string | null | undefined>>;
|
|
1404
|
+
}, z.core.$strip>;
|
|
1405
|
+
response: z.ZodString;
|
|
1406
|
+
};
|
|
1395
1407
|
export declare const GetReportsSchema: {
|
|
1396
|
-
endpoint:
|
|
1408
|
+
endpoint: ApiEndpoint.REPORTS;
|
|
1397
1409
|
method: ApiRestMethod;
|
|
1398
1410
|
payload: z.ZodNever;
|
|
1399
1411
|
response: z.ZodObject<{
|
|
@@ -1406,9 +1418,9 @@ export declare const GetReportsSchema: {
|
|
|
1406
1418
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1407
1419
|
state: z.ZodEnum<{
|
|
1408
1420
|
DISCARDED: "DISCARDED";
|
|
1409
|
-
DRAFTED: "DRAFTED";
|
|
1410
1421
|
PUBLISHED: "PUBLISHED";
|
|
1411
1422
|
CHANGED: "CHANGED";
|
|
1423
|
+
DRAFTED: "DRAFTED";
|
|
1412
1424
|
}>;
|
|
1413
1425
|
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1414
1426
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -1527,10 +1539,11 @@ export declare const GetReportsSchema: {
|
|
|
1527
1539
|
}, z.core.$strip>>;
|
|
1528
1540
|
}, z.core.$strip>;
|
|
1529
1541
|
}, z.core.$strip>>;
|
|
1542
|
+
total: z.ZodInt;
|
|
1530
1543
|
}, z.core.$strip>;
|
|
1531
1544
|
};
|
|
1532
|
-
export declare const
|
|
1533
|
-
endpoint:
|
|
1545
|
+
export declare const GetReportsSlugSchema: {
|
|
1546
|
+
endpoint: "/reports/:slug";
|
|
1534
1547
|
method: ApiRestMethod;
|
|
1535
1548
|
payload: z.ZodNever;
|
|
1536
1549
|
response: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -1542,9 +1555,9 @@ export declare const GetReportsIdSchema: {
|
|
|
1542
1555
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1543
1556
|
state: z.ZodEnum<{
|
|
1544
1557
|
DISCARDED: "DISCARDED";
|
|
1545
|
-
DRAFTED: "DRAFTED";
|
|
1546
1558
|
PUBLISHED: "PUBLISHED";
|
|
1547
1559
|
CHANGED: "CHANGED";
|
|
1560
|
+
DRAFTED: "DRAFTED";
|
|
1548
1561
|
}>;
|
|
1549
1562
|
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1550
1563
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -1669,7 +1682,7 @@ export declare const GetReportsIdSchema: {
|
|
|
1669
1682
|
created_at: string;
|
|
1670
1683
|
updated_at: string;
|
|
1671
1684
|
published_at: string | null;
|
|
1672
|
-
state: "DISCARDED" | "
|
|
1685
|
+
state: "DISCARDED" | "PUBLISHED" | "CHANGED" | "DRAFTED";
|
|
1673
1686
|
slug: string | null;
|
|
1674
1687
|
draft_content: {
|
|
1675
1688
|
published_at: string | null;
|
|
@@ -1725,7 +1738,7 @@ export declare const GetReportsIdSchema: {
|
|
|
1725
1738
|
created_at: string;
|
|
1726
1739
|
updated_at: string;
|
|
1727
1740
|
published_at: string | null;
|
|
1728
|
-
state: "DISCARDED" | "
|
|
1741
|
+
state: "DISCARDED" | "PUBLISHED" | "CHANGED" | "DRAFTED";
|
|
1729
1742
|
slug: string | null;
|
|
1730
1743
|
draft_content: {
|
|
1731
1744
|
published_at: string | null;
|
|
@@ -1776,4 +1789,117 @@ export declare const GetReportsIdSchema: {
|
|
|
1776
1789
|
};
|
|
1777
1790
|
} | null | undefined>>;
|
|
1778
1791
|
};
|
|
1779
|
-
export {
|
|
1792
|
+
export declare const GetPinsSchema: {
|
|
1793
|
+
endpoint: ApiEndpoint.PINS;
|
|
1794
|
+
method: ApiRestMethod;
|
|
1795
|
+
payload: z.ZodNever;
|
|
1796
|
+
response: z.ZodObject<{
|
|
1797
|
+
assemblies: z.ZodArray<z.ZodObject<{
|
|
1798
|
+
id: z.ZodUUID;
|
|
1799
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1800
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1801
|
+
image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1802
|
+
has_image: z.ZodBoolean;
|
|
1803
|
+
user_id: z.ZodUUID;
|
|
1804
|
+
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1805
|
+
name: z.ZodString;
|
|
1806
|
+
about: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1807
|
+
topics: z.ZodArray<z.ZodString>;
|
|
1808
|
+
country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1809
|
+
hide: z.ZodDefault<z.ZodBoolean>;
|
|
1810
|
+
}, z.core.$strip>>;
|
|
1811
|
+
pins: z.ZodArray<z.ZodObject<{
|
|
1812
|
+
id: z.ZodUUID;
|
|
1813
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1814
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1815
|
+
country: z.ZodString;
|
|
1816
|
+
text: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1817
|
+
hide: z.ZodBoolean;
|
|
1818
|
+
image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1819
|
+
has_image: z.ZodBoolean;
|
|
1820
|
+
}, z.core.$strip>>;
|
|
1821
|
+
}, z.core.$strip>;
|
|
1822
|
+
};
|
|
1823
|
+
export declare const PostPinSchema: {
|
|
1824
|
+
endpoint: ApiEndpoint.PINS;
|
|
1825
|
+
method: ApiRestMethod;
|
|
1826
|
+
payload: z.ZodObject<{
|
|
1827
|
+
country: z.ZodString;
|
|
1828
|
+
email: z.ZodString;
|
|
1829
|
+
text: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1830
|
+
}, z.core.$strip>;
|
|
1831
|
+
response: z.ZodObject<{
|
|
1832
|
+
id: z.ZodUUID;
|
|
1833
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1834
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1835
|
+
country: z.ZodString;
|
|
1836
|
+
text: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1837
|
+
hide: z.ZodBoolean;
|
|
1838
|
+
image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1839
|
+
has_image: z.ZodBoolean;
|
|
1840
|
+
}, z.core.$strip>;
|
|
1841
|
+
};
|
|
1842
|
+
export declare const PatchPinHideSchema: {
|
|
1843
|
+
endpoint: "/pins/:id/hide";
|
|
1844
|
+
method: ApiRestMethod;
|
|
1845
|
+
payload: z.ZodNever;
|
|
1846
|
+
response: z.ZodObject<{
|
|
1847
|
+
id: z.ZodUUID;
|
|
1848
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1849
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1850
|
+
country: z.ZodString;
|
|
1851
|
+
text: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1852
|
+
hide: z.ZodBoolean;
|
|
1853
|
+
image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1854
|
+
has_image: z.ZodBoolean;
|
|
1855
|
+
}, z.core.$strip>;
|
|
1856
|
+
};
|
|
1857
|
+
export declare const GetPingSchema: {
|
|
1858
|
+
endpoint: ApiEndpoint.PING;
|
|
1859
|
+
method: ApiRestMethod;
|
|
1860
|
+
payload: z.ZodNever;
|
|
1861
|
+
response: z.ZodNever;
|
|
1862
|
+
};
|
|
1863
|
+
export declare const PostLogsInfoSchema: {
|
|
1864
|
+
endpoint: "/logs/info";
|
|
1865
|
+
method: ApiRestMethod;
|
|
1866
|
+
payload: z.ZodObject<{
|
|
1867
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1868
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>;
|
|
1869
|
+
metadata: z.ZodObject<{
|
|
1870
|
+
origin: z.ZodString;
|
|
1871
|
+
route: z.ZodString;
|
|
1872
|
+
status: z.ZodNumber;
|
|
1873
|
+
}, z.core.$strip>;
|
|
1874
|
+
}, z.core.$strip>;
|
|
1875
|
+
response: z.ZodString;
|
|
1876
|
+
};
|
|
1877
|
+
export declare const PostLogsErrorSchema: {
|
|
1878
|
+
endpoint: "/logs/error";
|
|
1879
|
+
method: ApiRestMethod;
|
|
1880
|
+
payload: z.ZodObject<{
|
|
1881
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1882
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>;
|
|
1883
|
+
metadata: z.ZodObject<{
|
|
1884
|
+
origin: z.ZodString;
|
|
1885
|
+
route: z.ZodString;
|
|
1886
|
+
status: z.ZodNumber;
|
|
1887
|
+
}, z.core.$strip>;
|
|
1888
|
+
}, z.core.$strip>;
|
|
1889
|
+
response: z.ZodString;
|
|
1890
|
+
};
|
|
1891
|
+
export declare const PostRegisterSchema: {
|
|
1892
|
+
endpoint: ApiEndpoint.REGISTER;
|
|
1893
|
+
method: ApiRestMethod;
|
|
1894
|
+
payload: z.ZodObject<{
|
|
1895
|
+
type: z.ZodLiteral<"user.created">;
|
|
1896
|
+
object: z.ZodLiteral<"event">;
|
|
1897
|
+
data: z.ZodObject<{
|
|
1898
|
+
id: z.ZodString;
|
|
1899
|
+
email_addresses: z.ZodArray<z.ZodObject<{
|
|
1900
|
+
email_address: z.ZodString;
|
|
1901
|
+
}, z.core.$strip>>;
|
|
1902
|
+
}, z.core.$strip>;
|
|
1903
|
+
}, z.core.$strip>;
|
|
1904
|
+
response: z.ZodString;
|
|
1905
|
+
};
|
package/dist/schemas/base.d.ts
CHANGED
|
@@ -17,10 +17,6 @@ export declare const InterestSchema: z.ZodObject<{
|
|
|
17
17
|
country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | undefined, string | null | undefined>>;
|
|
18
18
|
organisation: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | undefined, string | null | undefined>>;
|
|
19
19
|
}, z.core.$strip>;
|
|
20
|
-
export declare const OptionSchema: z.ZodObject<{
|
|
21
|
-
label: z.ZodString;
|
|
22
|
-
value: z.ZodCoercedNumber<unknown>;
|
|
23
|
-
}, z.core.$strip>;
|
|
24
20
|
export declare const ReportContentSchema: z.ZodObject<{
|
|
25
21
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
26
22
|
title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -48,9 +44,9 @@ export declare const ReportSchema: z.ZodObject<{
|
|
|
48
44
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
49
45
|
state: z.ZodEnum<{
|
|
50
46
|
DISCARDED: "DISCARDED";
|
|
51
|
-
DRAFTED: "DRAFTED";
|
|
52
47
|
PUBLISHED: "PUBLISHED";
|
|
53
48
|
CHANGED: "CHANGED";
|
|
49
|
+
DRAFTED: "DRAFTED";
|
|
54
50
|
}>;
|
|
55
51
|
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
56
52
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
@@ -176,3 +172,46 @@ export declare const UserSchema: z.ZodObject<{
|
|
|
176
172
|
sub: z.ZodString;
|
|
177
173
|
is_mutirao: z.ZodBoolean;
|
|
178
174
|
}, z.core.$strip>;
|
|
175
|
+
export declare const AssemblySchema: z.ZodObject<{
|
|
176
|
+
id: z.ZodUUID;
|
|
177
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
178
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
179
|
+
image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
180
|
+
has_image: z.ZodBoolean;
|
|
181
|
+
user_id: z.ZodUUID;
|
|
182
|
+
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
183
|
+
name: z.ZodString;
|
|
184
|
+
about: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
185
|
+
topics: z.ZodArray<z.ZodString>;
|
|
186
|
+
country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
187
|
+
hide: z.ZodDefault<z.ZodBoolean>;
|
|
188
|
+
}, z.core.$strip>;
|
|
189
|
+
export declare const PinSchema: z.ZodObject<{
|
|
190
|
+
id: z.ZodUUID;
|
|
191
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
192
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
193
|
+
country: z.ZodString;
|
|
194
|
+
text: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
195
|
+
hide: z.ZodBoolean;
|
|
196
|
+
image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
197
|
+
has_image: z.ZodBoolean;
|
|
198
|
+
}, z.core.$strip>;
|
|
199
|
+
export declare const LogSchema: z.ZodObject<{
|
|
200
|
+
message: z.ZodOptional<z.ZodString>;
|
|
201
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>;
|
|
202
|
+
metadata: z.ZodObject<{
|
|
203
|
+
origin: z.ZodString;
|
|
204
|
+
route: z.ZodString;
|
|
205
|
+
status: z.ZodNumber;
|
|
206
|
+
}, z.core.$strip>;
|
|
207
|
+
}, z.core.$strip>;
|
|
208
|
+
export declare const RegisterSchema: z.ZodObject<{
|
|
209
|
+
type: z.ZodLiteral<"user.created">;
|
|
210
|
+
object: z.ZodLiteral<"event">;
|
|
211
|
+
data: z.ZodObject<{
|
|
212
|
+
id: z.ZodString;
|
|
213
|
+
email_addresses: z.ZodArray<z.ZodObject<{
|
|
214
|
+
email_address: z.ZodString;
|
|
215
|
+
}, z.core.$strip>>;
|
|
216
|
+
}, z.core.$strip>;
|
|
217
|
+
}, z.core.$strip>;
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './api';
|
|
2
|
-
export
|
|
2
|
+
export { resolvePath, type ExtractParams } from './utils';
|
package/dist/schemas/utils.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import z, { ZodType } from 'zod';
|
|
2
2
|
export declare const isoDateString: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
3
3
|
export declare const maybe: <T extends ZodType<unknown>>(_: T) => z.ZodPipe<z.ZodOptional<z.ZodNullable<T>>, z.ZodTransform<Awaited<NonNullable<z.core.output<T>>> | null, z.core.output<T> | null | undefined>>;
|
|
4
|
+
export type ExtractParams<T extends string> = T extends `${string}:${infer Param}/${infer Rest}` ? Param | ExtractParams<`/${Rest}`> : T extends `${string}:${infer Param}` ? Param : never;
|
|
5
|
+
export declare function resolvePath<T extends string>(template: T, params: Record<ExtractParams<T>, string>): string;
|
package/dist/types/enums.d.ts
CHANGED
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
export declare enum ApiRestMethod {
|
|
2
|
-
GET = "GET",
|
|
3
|
-
POST = "POST",
|
|
4
|
-
PUT = "PUT",
|
|
5
|
-
PATCH = "PATCH"
|
|
6
|
-
}
|
|
7
|
-
export declare enum ApiRouteParameter {
|
|
8
|
-
ID = ":ID",
|
|
9
|
-
NAME = ":NAME"
|
|
10
|
-
}
|
|
11
1
|
export declare enum ApiEndpoint {
|
|
2
|
+
ACCOUNT = "/account",
|
|
12
3
|
ACCOUNT_REPORTS = "/account/reports",
|
|
13
|
-
ASSEMBLIES = "/assemblies",
|
|
14
|
-
FEEDBACK = "/feedback",
|
|
15
4
|
INTEREST = "/interest",
|
|
16
|
-
INTEREST_ASSEMBLIS = "/interest/assemblis",
|
|
17
5
|
LOGS = "/logs",
|
|
6
|
+
PING = "/ping",
|
|
18
7
|
PINS = "/pins",
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
REGISTER = "/register",
|
|
9
|
+
REPORTS = "/reports"
|
|
10
|
+
}
|
|
11
|
+
export declare enum ApiRestMethod {
|
|
12
|
+
GET = "GET",
|
|
13
|
+
POST = "POST",
|
|
14
|
+
PUT = "PUT",
|
|
15
|
+
PATCH = "PATCH"
|
|
22
16
|
}
|
|
23
17
|
export declare enum ReportState {
|
|
24
18
|
DISCARDED = "DISCARDED",
|
|
@@ -26,9 +20,3 @@ export declare enum ReportState {
|
|
|
26
20
|
PUBLISHED = "PUBLISHED",
|
|
27
21
|
CHANGED = "CHANGED"
|
|
28
22
|
}
|
|
29
|
-
export declare enum SurveyName {
|
|
30
|
-
DELIBERATION = "deliberation",
|
|
31
|
-
DEMOGRAPHIC_DATA = "demographic-data",
|
|
32
|
-
PRE_ASSEMBLY = "pre-assembly",
|
|
33
|
-
POST_ASSEMBLY = "post-assembly"
|
|
34
|
-
}
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ImageSchema, PinSchema, ReportContentSchema, ReportSchema, UserSchema } from '../schemas/base';
|
|
3
3
|
export type Image = z.infer<typeof ImageSchema>;
|
|
4
|
+
export type Pin = z.infer<typeof PinSchema>;
|
|
4
5
|
export type Report = z.infer<typeof ReportSchema>;
|
|
5
6
|
export type ReportContent = z.infer<typeof ReportContentSchema>;
|
|
6
7
|
export type User = z.infer<typeof UserSchema>;
|