@assemblis/contracts 0.0.12 → 0.0.13
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.d.ts +106 -106
- package/package.json +1 -1
- package/src/schemas.ts +36 -36
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"zod";const t=e=>e.nullish().transform(e=>e??null),
|
|
1
|
+
import e from"zod";const t=e=>e.nullish().transform(e=>e??null),r=e.object({label:e.string(),value:e.coerce.number().int()}),a={payload:e.undefined(),response:e.object({id:e.uuid(),created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString()),sub:e.string(),is_mutirao:e.boolean()})},o=e.object({id:e.uuid(),text:e.string()}),n={payload:e.undefined(),response:e.object({id:e.uuid(),created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString()),name:e.string(),sections:e.object({primary:o,secondary:o.array(),options:r.array()}).array()})},i={payload:e.object({answers:e.object({question_id:e.uuid(),answer_value:e.coerce.number().int()}).array()}),response:e.object({total:e.number().int()})},s=e.object({visible_on_profile:e.boolean(),description:t(e.string())}),d=e.object({text:e.string(),agreed:t(e.coerce.number().int()),against:t(e.coerce.number().int()),abstained:t(e.coerce.number().int()),include_in_action_plan:e.boolean().default(!0),assembly_id:e.uuid()}),c=e.object({text:e.string(),complete:e.boolean().default(!1),action_id:e.uuid(),assembly_id:e.uuid()}),u=e.object({published_at:t(e.coerce.date().transform(e=>e.toISOString())),name:e.string(),about:t(e.string()),topics:e.string().array(),country:t(e.string()),hide:e.boolean().default(!1)}),p={payload:u,response:u.extend({id:e.uuid(),created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString()),image_src:t(e.string()),has_image:e.boolean().meta({deprecated:!0}),user_id:e.uuid().meta({deprecated:!0})})},l={payload:e.undefined(),response:e.object({assemblies:p.response.array()})},g=e.object({visible_on_profile:e.boolean(),name:t(e.string()),description:t(e.string()),type:t(e.string())}),_=e.object({visible_on_profile:e.boolean(),registration_link:t(e.string()),start_date:t(e.coerce.date().transform(e=>e.toISOString()))}),S=e.object({visible_on_profile:e.boolean(),background:t(e.string())}),b=e.object({visible_on_profile:e.boolean(),organisation_types:e.string().array(),description:t(e.string())}),m=e.object({visible_on_profile:e.boolean(),organisation_types:e.string().array(),description:t(e.string())}),f=e.object({visible_on_profile:e.boolean(),decision_method:t(e.string())}),y=e.object({visible_on_profile:e.boolean(),recruitment_method:t(e.string()),community:t(e.string())}),I=e.object({visible_on_profile:e.boolean(),support_options:e.string().array()}),O=e.object({visible_on_profile:e.boolean()}),j={payload:p.payload.extend({organisation:t(g.extend({id:e.uuid().optional()})),event_details:t(_),story:t(S),supporters:t(b),funders:t(m),facilitation:t(f),participants:t(y),support:t(I),action_plan:t(s.extend({actions:d.omit({assembly_id:!0}).extend({id:e.uuid().optional(),tasks:c.omit({action_id:!0,assembly_id:!0}).extend({id:e.uuid().optional()}).array(),updates:e.unknown().array()}).array(),updates:e.unknown().array()})),surveys:t(O)}),response:p.response.omit({user_id:!0}).extend({is_own:e.boolean(),organisation:t(g.extend({id:e.uuid(),created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString())})),event_details:t(_.extend({created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString())})),story:t(S.extend({created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString())})),supporters:t(b.extend({created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString())})),funders:t(m.extend({created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString())})),facilitation:t(f.extend({created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString())})),participants:t(y.extend({created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString())})),support:t(I.extend({created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString())})),action_plan:t(s.extend({actions:d.omit({assembly_id:!0}).extend({id:e.uuid(),created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString()),tasks:c.omit({action_id:!0,assembly_id:!0}).extend({id:e.uuid(),created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString())}).array(),updates:e.unknown().array()}).extend({created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString())}).array(),updates:e.unknown().array()}).and(e.object({created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString())}))),surveys:t(O.extend({created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString())}).extend({data:e.record(e.string(),e.object({total:e.number().int(),responses:e.record(e.string(),r.array())}))}))})},x={payload:e.object({route:e.string(),text:e.string(),metadata:e.unknown()}),response:e.string()},E={payload:e.object({message:e.string().optional(),data:e.record(e.string(),e.string().optional()).optional(),metadata:e.object({origin:e.string(),route:e.string(),status:e.number()})}),response:e.string()},v={payload:e.object({type:e.literal("user.created"),object:e.literal("event"),data:e.object({id:e.string(),email_addresses:e.object({email_address:e.string()}).array()})}),response:e.string()},T={payload:e.object({country:e.string(),email:e.string(),text:t(e.string())}),response:e.object({id:e.uuid(),created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString()),country:e.string(),text:t(e.string()),hide:e.boolean(),image_src:t(e.string()),has_image:e.boolean().meta({deprecated:!0})})},A={payload:e.undefined(),response:e.object({assemblies:p.response.array(),pins:T.response.array()})};var P,k,h,M;!function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH"}(P||(P={})),function(e){e.ID=":ID",e.NAME=":NAME"}(k||(k={})),function(e){e.ASSEMBLIES="/assemblies",e.FEEDBACK="/feedback",e.INTEREST_ASSEMBLIS="/interest/assemblis",e.INTEREST_MUTIRAO="/interest/mutirao",e.LOGS="/logs",e.PINS="/pins",e.SURVEYS="/surveys",e.SURVEY_RESPONSES="/assemblies/:ID/survey-responses/:NAME"}(h||(h={})),function(e){e.DELIBERATION="deliberation",e.DEMOGRAPHIC_DATA="demographic-data",e.PRE_ASSEMBLY="pre-assembly",e.POST_ASSEMBLY="post-assembly"}(M||(M={}));export{h as ApiEndpoint,P as ApiRestMethod,k as ApiRouteParameter,l as AssembliesListSchema,j as AssemblyDetailSchema,p as AssemblyOverviewSchema,x as FeedbackSchema,E as LogSchema,A as PinListSchema,T as PinSchema,v as RegisterSchema,M as SurveyName,i as SurveyResponseSchema,n as SurveySchema,a as UserSchema};
|
package/dist/schemas.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export declare const UserSchema: {
|
|
|
3
3
|
payload: z.ZodUndefined;
|
|
4
4
|
response: z.ZodObject<{
|
|
5
5
|
id: z.ZodUUID;
|
|
6
|
-
created_at: z.ZodCoercedDate<unknown
|
|
7
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
6
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
7
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
8
8
|
sub: z.ZodString;
|
|
9
9
|
is_mutirao: z.ZodBoolean;
|
|
10
10
|
}, z.core.$strip>;
|
|
@@ -13,8 +13,8 @@ export declare const SurveySchema: {
|
|
|
13
13
|
payload: z.ZodUndefined;
|
|
14
14
|
response: z.ZodObject<{
|
|
15
15
|
id: z.ZodUUID;
|
|
16
|
-
created_at: z.ZodCoercedDate<unknown
|
|
17
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
16
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
17
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
18
18
|
name: z.ZodString;
|
|
19
19
|
sections: z.ZodArray<z.ZodObject<{
|
|
20
20
|
primary: z.ZodObject<{
|
|
@@ -45,7 +45,7 @@ export declare const SurveyResponseSchema: {
|
|
|
45
45
|
};
|
|
46
46
|
export declare const AssemblyOverviewSchema: {
|
|
47
47
|
payload: z.ZodObject<{
|
|
48
|
-
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown
|
|
48
|
+
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
49
|
name: z.ZodString;
|
|
50
50
|
about: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
51
51
|
topics: z.ZodArray<z.ZodString>;
|
|
@@ -53,17 +53,17 @@ export declare const AssemblyOverviewSchema: {
|
|
|
53
53
|
hide: z.ZodDefault<z.ZodBoolean>;
|
|
54
54
|
}, z.core.$strip>;
|
|
55
55
|
response: z.ZodObject<{
|
|
56
|
-
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown
|
|
56
|
+
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
57
57
|
name: z.ZodString;
|
|
58
58
|
about: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
59
59
|
topics: z.ZodArray<z.ZodString>;
|
|
60
60
|
country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
61
61
|
hide: z.ZodDefault<z.ZodBoolean>;
|
|
62
62
|
id: z.ZodUUID;
|
|
63
|
-
created_at: z.ZodCoercedDate<unknown
|
|
64
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
65
|
-
has_image: z.ZodBoolean;
|
|
63
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
64
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
66
65
|
image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
66
|
+
has_image: z.ZodBoolean;
|
|
67
67
|
user_id: z.ZodUUID;
|
|
68
68
|
}, z.core.$strip>;
|
|
69
69
|
};
|
|
@@ -71,24 +71,24 @@ export declare const AssembliesListSchema: {
|
|
|
71
71
|
payload: z.ZodUndefined;
|
|
72
72
|
response: z.ZodObject<{
|
|
73
73
|
assemblies: z.ZodArray<z.ZodObject<{
|
|
74
|
-
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown
|
|
74
|
+
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
75
75
|
name: z.ZodString;
|
|
76
76
|
about: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
77
77
|
topics: z.ZodArray<z.ZodString>;
|
|
78
78
|
country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
79
79
|
hide: z.ZodDefault<z.ZodBoolean>;
|
|
80
80
|
id: z.ZodUUID;
|
|
81
|
-
created_at: z.ZodCoercedDate<unknown
|
|
82
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
83
|
-
has_image: z.ZodBoolean;
|
|
81
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
82
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
84
83
|
image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
84
|
+
has_image: z.ZodBoolean;
|
|
85
85
|
user_id: z.ZodUUID;
|
|
86
86
|
}, z.core.$strip>>;
|
|
87
87
|
}, z.core.$strip>;
|
|
88
88
|
};
|
|
89
89
|
export declare const AssemblyDetailSchema: {
|
|
90
90
|
payload: z.ZodObject<{
|
|
91
|
-
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown
|
|
91
|
+
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
92
92
|
name: z.ZodString;
|
|
93
93
|
about: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
94
94
|
topics: z.ZodArray<z.ZodString>;
|
|
@@ -116,15 +116,15 @@ export declare const AssemblyDetailSchema: {
|
|
|
116
116
|
event_details: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
117
117
|
visible_on_profile: z.ZodBoolean;
|
|
118
118
|
registration_link: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
119
|
-
start_date: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown
|
|
119
|
+
start_date: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
120
120
|
}, z.core.$strip>>>, z.ZodTransform<{
|
|
121
121
|
visible_on_profile: boolean;
|
|
122
122
|
registration_link: string | null;
|
|
123
|
-
start_date:
|
|
123
|
+
start_date: string | null;
|
|
124
124
|
} | null, {
|
|
125
125
|
visible_on_profile: boolean;
|
|
126
126
|
registration_link: string | null;
|
|
127
|
-
start_date:
|
|
127
|
+
start_date: string | null;
|
|
128
128
|
} | null | undefined>>;
|
|
129
129
|
story: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
130
130
|
visible_on_profile: z.ZodBoolean;
|
|
@@ -260,16 +260,16 @@ export declare const AssemblyDetailSchema: {
|
|
|
260
260
|
}, z.core.$strip>;
|
|
261
261
|
response: z.ZodObject<{
|
|
262
262
|
id: z.ZodUUID;
|
|
263
|
-
created_at: z.ZodCoercedDate<unknown
|
|
264
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
263
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
264
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
265
265
|
name: z.ZodString;
|
|
266
|
-
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown
|
|
266
|
+
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
267
267
|
about: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
268
268
|
topics: z.ZodArray<z.ZodString>;
|
|
269
269
|
country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
270
270
|
hide: z.ZodDefault<z.ZodBoolean>;
|
|
271
|
-
has_image: z.ZodBoolean;
|
|
272
271
|
image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
272
|
+
has_image: z.ZodBoolean;
|
|
273
273
|
is_own: z.ZodBoolean;
|
|
274
274
|
organisation: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
275
275
|
visible_on_profile: z.ZodBoolean;
|
|
@@ -277,148 +277,148 @@ export declare const AssemblyDetailSchema: {
|
|
|
277
277
|
description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
278
278
|
type: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
279
279
|
id: z.ZodUUID;
|
|
280
|
-
created_at: z.ZodCoercedDate<unknown
|
|
281
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
280
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
281
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
282
282
|
}, z.core.$strip>>>, z.ZodTransform<{
|
|
283
283
|
visible_on_profile: boolean;
|
|
284
284
|
name: string | null;
|
|
285
285
|
description: string | null;
|
|
286
286
|
type: string | null;
|
|
287
287
|
id: string;
|
|
288
|
-
created_at:
|
|
289
|
-
updated_at:
|
|
288
|
+
created_at: string;
|
|
289
|
+
updated_at: string;
|
|
290
290
|
} | null, {
|
|
291
291
|
visible_on_profile: boolean;
|
|
292
292
|
name: string | null;
|
|
293
293
|
description: string | null;
|
|
294
294
|
type: string | null;
|
|
295
295
|
id: string;
|
|
296
|
-
created_at:
|
|
297
|
-
updated_at:
|
|
296
|
+
created_at: string;
|
|
297
|
+
updated_at: string;
|
|
298
298
|
} | null | undefined>>;
|
|
299
299
|
event_details: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
300
300
|
visible_on_profile: z.ZodBoolean;
|
|
301
301
|
registration_link: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
302
|
-
start_date: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown
|
|
303
|
-
created_at: z.ZodCoercedDate<unknown
|
|
304
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
302
|
+
start_date: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
303
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
304
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
305
305
|
}, z.core.$strip>>>, z.ZodTransform<{
|
|
306
306
|
visible_on_profile: boolean;
|
|
307
307
|
registration_link: string | null;
|
|
308
|
-
start_date:
|
|
309
|
-
created_at:
|
|
310
|
-
updated_at:
|
|
308
|
+
start_date: string | null;
|
|
309
|
+
created_at: string;
|
|
310
|
+
updated_at: string;
|
|
311
311
|
} | null, {
|
|
312
312
|
visible_on_profile: boolean;
|
|
313
313
|
registration_link: string | null;
|
|
314
|
-
start_date:
|
|
315
|
-
created_at:
|
|
316
|
-
updated_at:
|
|
314
|
+
start_date: string | null;
|
|
315
|
+
created_at: string;
|
|
316
|
+
updated_at: string;
|
|
317
317
|
} | null | undefined>>;
|
|
318
318
|
story: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
319
319
|
visible_on_profile: z.ZodBoolean;
|
|
320
320
|
background: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
321
|
-
created_at: z.ZodCoercedDate<unknown
|
|
322
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
321
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
322
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
323
323
|
}, z.core.$strip>>>, z.ZodTransform<{
|
|
324
324
|
visible_on_profile: boolean;
|
|
325
325
|
background: string | null;
|
|
326
|
-
created_at:
|
|
327
|
-
updated_at:
|
|
326
|
+
created_at: string;
|
|
327
|
+
updated_at: string;
|
|
328
328
|
} | null, {
|
|
329
329
|
visible_on_profile: boolean;
|
|
330
330
|
background: string | null;
|
|
331
|
-
created_at:
|
|
332
|
-
updated_at:
|
|
331
|
+
created_at: string;
|
|
332
|
+
updated_at: string;
|
|
333
333
|
} | null | undefined>>;
|
|
334
334
|
supporters: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
335
335
|
visible_on_profile: z.ZodBoolean;
|
|
336
336
|
organisation_types: z.ZodArray<z.ZodString>;
|
|
337
337
|
description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
338
|
-
created_at: z.ZodCoercedDate<unknown
|
|
339
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
338
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
339
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
340
340
|
}, z.core.$strip>>>, z.ZodTransform<{
|
|
341
341
|
visible_on_profile: boolean;
|
|
342
342
|
organisation_types: string[];
|
|
343
343
|
description: string | null;
|
|
344
|
-
created_at:
|
|
345
|
-
updated_at:
|
|
344
|
+
created_at: string;
|
|
345
|
+
updated_at: string;
|
|
346
346
|
} | null, {
|
|
347
347
|
visible_on_profile: boolean;
|
|
348
348
|
organisation_types: string[];
|
|
349
349
|
description: string | null;
|
|
350
|
-
created_at:
|
|
351
|
-
updated_at:
|
|
350
|
+
created_at: string;
|
|
351
|
+
updated_at: string;
|
|
352
352
|
} | null | undefined>>;
|
|
353
353
|
funders: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
354
354
|
visible_on_profile: z.ZodBoolean;
|
|
355
355
|
organisation_types: z.ZodArray<z.ZodString>;
|
|
356
356
|
description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
357
|
-
created_at: z.ZodCoercedDate<unknown
|
|
358
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
357
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
358
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
359
359
|
}, z.core.$strip>>>, z.ZodTransform<{
|
|
360
360
|
visible_on_profile: boolean;
|
|
361
361
|
organisation_types: string[];
|
|
362
362
|
description: string | null;
|
|
363
|
-
created_at:
|
|
364
|
-
updated_at:
|
|
363
|
+
created_at: string;
|
|
364
|
+
updated_at: string;
|
|
365
365
|
} | null, {
|
|
366
366
|
visible_on_profile: boolean;
|
|
367
367
|
organisation_types: string[];
|
|
368
368
|
description: string | null;
|
|
369
|
-
created_at:
|
|
370
|
-
updated_at:
|
|
369
|
+
created_at: string;
|
|
370
|
+
updated_at: string;
|
|
371
371
|
} | null | undefined>>;
|
|
372
372
|
facilitation: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
373
373
|
visible_on_profile: z.ZodBoolean;
|
|
374
374
|
decision_method: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
375
|
-
created_at: z.ZodCoercedDate<unknown
|
|
376
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
375
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
376
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
377
377
|
}, z.core.$strip>>>, z.ZodTransform<{
|
|
378
378
|
visible_on_profile: boolean;
|
|
379
379
|
decision_method: string | null;
|
|
380
|
-
created_at:
|
|
381
|
-
updated_at:
|
|
380
|
+
created_at: string;
|
|
381
|
+
updated_at: string;
|
|
382
382
|
} | null, {
|
|
383
383
|
visible_on_profile: boolean;
|
|
384
384
|
decision_method: string | null;
|
|
385
|
-
created_at:
|
|
386
|
-
updated_at:
|
|
385
|
+
created_at: string;
|
|
386
|
+
updated_at: string;
|
|
387
387
|
} | null | undefined>>;
|
|
388
388
|
participants: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
389
389
|
visible_on_profile: z.ZodBoolean;
|
|
390
390
|
recruitment_method: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
391
391
|
community: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
392
|
-
created_at: z.ZodCoercedDate<unknown
|
|
393
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
392
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
393
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
394
394
|
}, z.core.$strip>>>, z.ZodTransform<{
|
|
395
395
|
visible_on_profile: boolean;
|
|
396
396
|
recruitment_method: string | null;
|
|
397
397
|
community: string | null;
|
|
398
|
-
created_at:
|
|
399
|
-
updated_at:
|
|
398
|
+
created_at: string;
|
|
399
|
+
updated_at: string;
|
|
400
400
|
} | null, {
|
|
401
401
|
visible_on_profile: boolean;
|
|
402
402
|
recruitment_method: string | null;
|
|
403
403
|
community: string | null;
|
|
404
|
-
created_at:
|
|
405
|
-
updated_at:
|
|
404
|
+
created_at: string;
|
|
405
|
+
updated_at: string;
|
|
406
406
|
} | null | undefined>>;
|
|
407
407
|
support: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
408
408
|
visible_on_profile: z.ZodBoolean;
|
|
409
409
|
support_options: z.ZodArray<z.ZodString>;
|
|
410
|
-
created_at: z.ZodCoercedDate<unknown
|
|
411
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
410
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
411
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
412
412
|
}, z.core.$strip>>>, z.ZodTransform<{
|
|
413
413
|
visible_on_profile: boolean;
|
|
414
414
|
support_options: string[];
|
|
415
|
-
created_at:
|
|
416
|
-
updated_at:
|
|
415
|
+
created_at: string;
|
|
416
|
+
updated_at: string;
|
|
417
417
|
} | null, {
|
|
418
418
|
visible_on_profile: boolean;
|
|
419
419
|
support_options: string[];
|
|
420
|
-
created_at:
|
|
421
|
-
updated_at:
|
|
420
|
+
created_at: string;
|
|
421
|
+
updated_at: string;
|
|
422
422
|
} | null | undefined>>;
|
|
423
423
|
action_plan: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodIntersection<z.ZodObject<{
|
|
424
424
|
visible_on_profile: z.ZodBoolean;
|
|
@@ -434,17 +434,17 @@ export declare const AssemblyDetailSchema: {
|
|
|
434
434
|
text: z.ZodString;
|
|
435
435
|
complete: z.ZodDefault<z.ZodBoolean>;
|
|
436
436
|
id: z.ZodUUID;
|
|
437
|
-
created_at: z.ZodCoercedDate<unknown
|
|
438
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
437
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
438
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
439
439
|
}, z.core.$strip>>;
|
|
440
440
|
updates: z.ZodArray<z.ZodUnknown>;
|
|
441
|
-
created_at: z.ZodCoercedDate<unknown
|
|
442
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
441
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
442
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
443
443
|
}, z.core.$strip>>;
|
|
444
444
|
updates: z.ZodArray<z.ZodUnknown>;
|
|
445
445
|
}, z.core.$strip>, z.ZodObject<{
|
|
446
|
-
created_at: z.ZodCoercedDate<unknown
|
|
447
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
446
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
447
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
448
448
|
}, z.core.$strip>>>>, z.ZodTransform<NonNullable<{
|
|
449
449
|
visible_on_profile: boolean;
|
|
450
450
|
description: string | null;
|
|
@@ -459,17 +459,17 @@ export declare const AssemblyDetailSchema: {
|
|
|
459
459
|
text: string;
|
|
460
460
|
complete: boolean;
|
|
461
461
|
id: string;
|
|
462
|
-
created_at:
|
|
463
|
-
updated_at:
|
|
462
|
+
created_at: string;
|
|
463
|
+
updated_at: string;
|
|
464
464
|
}[];
|
|
465
465
|
updates: unknown[];
|
|
466
|
-
created_at:
|
|
467
|
-
updated_at:
|
|
466
|
+
created_at: string;
|
|
467
|
+
updated_at: string;
|
|
468
468
|
}[];
|
|
469
469
|
updates: unknown[];
|
|
470
470
|
} & {
|
|
471
|
-
created_at:
|
|
472
|
-
updated_at:
|
|
471
|
+
created_at: string;
|
|
472
|
+
updated_at: string;
|
|
473
473
|
}> | null, ({
|
|
474
474
|
visible_on_profile: boolean;
|
|
475
475
|
description: string | null;
|
|
@@ -484,22 +484,22 @@ export declare const AssemblyDetailSchema: {
|
|
|
484
484
|
text: string;
|
|
485
485
|
complete: boolean;
|
|
486
486
|
id: string;
|
|
487
|
-
created_at:
|
|
488
|
-
updated_at:
|
|
487
|
+
created_at: string;
|
|
488
|
+
updated_at: string;
|
|
489
489
|
}[];
|
|
490
490
|
updates: unknown[];
|
|
491
|
-
created_at:
|
|
492
|
-
updated_at:
|
|
491
|
+
created_at: string;
|
|
492
|
+
updated_at: string;
|
|
493
493
|
}[];
|
|
494
494
|
updates: unknown[];
|
|
495
495
|
} & {
|
|
496
|
-
created_at:
|
|
497
|
-
updated_at:
|
|
496
|
+
created_at: string;
|
|
497
|
+
updated_at: string;
|
|
498
498
|
}) | null | undefined>>;
|
|
499
499
|
surveys: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
500
500
|
visible_on_profile: z.ZodBoolean;
|
|
501
|
-
created_at: z.ZodCoercedDate<unknown
|
|
502
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
501
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
502
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
503
503
|
data: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
504
504
|
total: z.ZodNumber;
|
|
505
505
|
responses: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
|
|
@@ -509,8 +509,8 @@ export declare const AssemblyDetailSchema: {
|
|
|
509
509
|
}, z.core.$strip>>;
|
|
510
510
|
}, z.core.$strip>>>, z.ZodTransform<{
|
|
511
511
|
visible_on_profile: boolean;
|
|
512
|
-
created_at:
|
|
513
|
-
updated_at:
|
|
512
|
+
created_at: string;
|
|
513
|
+
updated_at: string;
|
|
514
514
|
data: Record<string, {
|
|
515
515
|
total: number;
|
|
516
516
|
responses: Record<string, {
|
|
@@ -520,8 +520,8 @@ export declare const AssemblyDetailSchema: {
|
|
|
520
520
|
}>;
|
|
521
521
|
} | null, {
|
|
522
522
|
visible_on_profile: boolean;
|
|
523
|
-
created_at:
|
|
524
|
-
updated_at:
|
|
523
|
+
created_at: string;
|
|
524
|
+
updated_at: string;
|
|
525
525
|
data: Record<string, {
|
|
526
526
|
total: number;
|
|
527
527
|
responses: Record<string, {
|
|
@@ -573,41 +573,41 @@ export declare const PinSchema: {
|
|
|
573
573
|
}, z.core.$strip>;
|
|
574
574
|
response: z.ZodObject<{
|
|
575
575
|
id: z.ZodUUID;
|
|
576
|
-
created_at: z.ZodCoercedDate<unknown
|
|
577
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
576
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
577
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
578
578
|
country: z.ZodString;
|
|
579
579
|
text: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
580
580
|
hide: z.ZodBoolean;
|
|
581
|
-
has_image: z.ZodBoolean;
|
|
582
581
|
image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
582
|
+
has_image: z.ZodBoolean;
|
|
583
583
|
}, z.core.$strip>;
|
|
584
584
|
};
|
|
585
585
|
export declare const PinListSchema: {
|
|
586
586
|
payload: z.ZodUndefined;
|
|
587
587
|
response: z.ZodObject<{
|
|
588
588
|
assemblies: z.ZodArray<z.ZodObject<{
|
|
589
|
-
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodCoercedDate<unknown
|
|
589
|
+
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
590
590
|
name: z.ZodString;
|
|
591
591
|
about: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
592
592
|
topics: z.ZodArray<z.ZodString>;
|
|
593
593
|
country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
594
594
|
hide: z.ZodDefault<z.ZodBoolean>;
|
|
595
595
|
id: z.ZodUUID;
|
|
596
|
-
created_at: z.ZodCoercedDate<unknown
|
|
597
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
598
|
-
has_image: z.ZodBoolean;
|
|
596
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
597
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
599
598
|
image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
599
|
+
has_image: z.ZodBoolean;
|
|
600
600
|
user_id: z.ZodUUID;
|
|
601
601
|
}, z.core.$strip>>;
|
|
602
602
|
pins: z.ZodArray<z.ZodObject<{
|
|
603
603
|
id: z.ZodUUID;
|
|
604
|
-
created_at: z.ZodCoercedDate<unknown
|
|
605
|
-
updated_at: z.ZodCoercedDate<unknown
|
|
604
|
+
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
605
|
+
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
606
606
|
country: z.ZodString;
|
|
607
607
|
text: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
608
608
|
hide: z.ZodBoolean;
|
|
609
|
-
has_image: z.ZodBoolean;
|
|
610
609
|
image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
610
|
+
has_image: z.ZodBoolean;
|
|
611
611
|
}, z.core.$strip>>;
|
|
612
612
|
}, z.core.$strip>;
|
|
613
613
|
};
|
package/package.json
CHANGED
package/src/schemas.ts
CHANGED
|
@@ -12,8 +12,8 @@ export const UserSchema = {
|
|
|
12
12
|
payload: z.undefined(),
|
|
13
13
|
response: z.object({
|
|
14
14
|
id: z.uuid(),
|
|
15
|
-
created_at: z.coerce.date(),
|
|
16
|
-
updated_at: z.coerce.date(),
|
|
15
|
+
created_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
16
|
+
updated_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
17
17
|
sub: z.string(),
|
|
18
18
|
is_mutirao: z.boolean()
|
|
19
19
|
})
|
|
@@ -29,8 +29,8 @@ export const SurveySchema = {
|
|
|
29
29
|
payload: z.undefined(),
|
|
30
30
|
response: z.object({
|
|
31
31
|
id: z.uuid(),
|
|
32
|
-
created_at: z.coerce.date(),
|
|
33
|
-
updated_at: z.coerce.date(),
|
|
32
|
+
created_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
33
|
+
updated_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
34
34
|
name: z.string(),
|
|
35
35
|
sections: z
|
|
36
36
|
.object({
|
|
@@ -80,7 +80,7 @@ const TaskSchema = z.object({
|
|
|
80
80
|
|
|
81
81
|
// Assembly Overviews
|
|
82
82
|
const BaseAssemblyOverviewSchema = z.object({
|
|
83
|
-
published_at: maybe(z.coerce.date()),
|
|
83
|
+
published_at: maybe(z.coerce.date().transform((_) => _.toISOString())),
|
|
84
84
|
name: z.string(),
|
|
85
85
|
about: maybe(z.string()),
|
|
86
86
|
topics: z.string().array(),
|
|
@@ -91,8 +91,8 @@ export const AssemblyOverviewSchema = {
|
|
|
91
91
|
payload: BaseAssemblyOverviewSchema,
|
|
92
92
|
response: BaseAssemblyOverviewSchema.extend({
|
|
93
93
|
id: z.uuid(),
|
|
94
|
-
created_at: z.coerce.date(),
|
|
95
|
-
updated_at: z.coerce.date(),
|
|
94
|
+
created_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
95
|
+
updated_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
96
96
|
image_src: maybe(z.string()),
|
|
97
97
|
has_image: z.boolean().meta({ deprecated: true }),
|
|
98
98
|
user_id: z.uuid().meta({ deprecated: true })
|
|
@@ -115,7 +115,7 @@ const OrganisationSchema = z.object({
|
|
|
115
115
|
const EventDetailsSchema = z.object({
|
|
116
116
|
visible_on_profile: z.boolean(),
|
|
117
117
|
registration_link: maybe(z.string()),
|
|
118
|
-
start_date: maybe(z.coerce.date())
|
|
118
|
+
start_date: maybe(z.coerce.date().transform((_) => _.toISOString()))
|
|
119
119
|
});
|
|
120
120
|
const StorySchema = z.object({
|
|
121
121
|
visible_on_profile: z.boolean(),
|
|
@@ -187,50 +187,50 @@ export const AssemblyDetailSchema = {
|
|
|
187
187
|
organisation: maybe(
|
|
188
188
|
OrganisationSchema.extend({
|
|
189
189
|
id: z.uuid(),
|
|
190
|
-
created_at: z.coerce.date(),
|
|
191
|
-
updated_at: z.coerce.date()
|
|
190
|
+
created_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
191
|
+
updated_at: z.coerce.date().transform((_) => _.toISOString())
|
|
192
192
|
})
|
|
193
193
|
),
|
|
194
194
|
event_details: maybe(
|
|
195
195
|
EventDetailsSchema.extend({
|
|
196
|
-
created_at: z.coerce.date(),
|
|
197
|
-
updated_at: z.coerce.date()
|
|
196
|
+
created_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
197
|
+
updated_at: z.coerce.date().transform((_) => _.toISOString())
|
|
198
198
|
})
|
|
199
199
|
),
|
|
200
200
|
story: maybe(
|
|
201
201
|
StorySchema.extend({
|
|
202
|
-
created_at: z.coerce.date(),
|
|
203
|
-
updated_at: z.coerce.date()
|
|
202
|
+
created_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
203
|
+
updated_at: z.coerce.date().transform((_) => _.toISOString())
|
|
204
204
|
})
|
|
205
205
|
),
|
|
206
206
|
supporters: maybe(
|
|
207
207
|
SupportersSchema.extend({
|
|
208
|
-
created_at: z.coerce.date(),
|
|
209
|
-
updated_at: z.coerce.date()
|
|
208
|
+
created_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
209
|
+
updated_at: z.coerce.date().transform((_) => _.toISOString())
|
|
210
210
|
})
|
|
211
211
|
),
|
|
212
212
|
funders: maybe(
|
|
213
213
|
FundersSchema.extend({
|
|
214
|
-
created_at: z.coerce.date(),
|
|
215
|
-
updated_at: z.coerce.date()
|
|
214
|
+
created_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
215
|
+
updated_at: z.coerce.date().transform((_) => _.toISOString())
|
|
216
216
|
})
|
|
217
217
|
),
|
|
218
218
|
facilitation: maybe(
|
|
219
219
|
FacilitationSchema.extend({
|
|
220
|
-
created_at: z.coerce.date(),
|
|
221
|
-
updated_at: z.coerce.date()
|
|
220
|
+
created_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
221
|
+
updated_at: z.coerce.date().transform((_) => _.toISOString())
|
|
222
222
|
})
|
|
223
223
|
),
|
|
224
224
|
participants: maybe(
|
|
225
225
|
ParticipantsSchema.extend({
|
|
226
|
-
created_at: z.coerce.date(),
|
|
227
|
-
updated_at: z.coerce.date()
|
|
226
|
+
created_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
227
|
+
updated_at: z.coerce.date().transform((_) => _.toISOString())
|
|
228
228
|
})
|
|
229
229
|
),
|
|
230
230
|
support: maybe(
|
|
231
231
|
SupportSchema.extend({
|
|
232
|
-
created_at: z.coerce.date(),
|
|
233
|
-
updated_at: z.coerce.date()
|
|
232
|
+
created_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
233
|
+
updated_at: z.coerce.date().transform((_) => _.toISOString())
|
|
234
234
|
})
|
|
235
235
|
),
|
|
236
236
|
action_plan: maybe(
|
|
@@ -238,37 +238,37 @@ export const AssemblyDetailSchema = {
|
|
|
238
238
|
actions: ActionSchema.omit({ assembly_id: true })
|
|
239
239
|
.extend({
|
|
240
240
|
id: z.uuid(),
|
|
241
|
-
created_at: z.coerce.date(),
|
|
242
|
-
updated_at: z.coerce.date(),
|
|
241
|
+
created_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
242
|
+
updated_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
243
243
|
tasks: TaskSchema.omit({
|
|
244
244
|
action_id: true,
|
|
245
245
|
assembly_id: true
|
|
246
246
|
})
|
|
247
247
|
.extend({
|
|
248
248
|
id: z.uuid(),
|
|
249
|
-
created_at: z.coerce.date(),
|
|
250
|
-
updated_at: z.coerce.date()
|
|
249
|
+
created_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
250
|
+
updated_at: z.coerce.date().transform((_) => _.toISOString())
|
|
251
251
|
})
|
|
252
252
|
.array(),
|
|
253
253
|
updates: z.unknown().array()
|
|
254
254
|
})
|
|
255
255
|
.extend({
|
|
256
|
-
created_at: z.coerce.date(),
|
|
257
|
-
updated_at: z.coerce.date()
|
|
256
|
+
created_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
257
|
+
updated_at: z.coerce.date().transform((_) => _.toISOString())
|
|
258
258
|
})
|
|
259
259
|
.array(),
|
|
260
260
|
updates: z.unknown().array()
|
|
261
261
|
}).and(
|
|
262
262
|
z.object({
|
|
263
|
-
created_at: z.coerce.date(),
|
|
264
|
-
updated_at: z.coerce.date()
|
|
263
|
+
created_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
264
|
+
updated_at: z.coerce.date().transform((_) => _.toISOString())
|
|
265
265
|
})
|
|
266
266
|
)
|
|
267
267
|
),
|
|
268
268
|
surveys: maybe(
|
|
269
269
|
SurveyDetailsSchema.extend({
|
|
270
|
-
created_at: z.coerce.date(),
|
|
271
|
-
updated_at: z.coerce.date()
|
|
270
|
+
created_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
271
|
+
updated_at: z.coerce.date().transform((_) => _.toISOString())
|
|
272
272
|
}).extend({
|
|
273
273
|
data: z.record(
|
|
274
274
|
z.string(),
|
|
@@ -328,8 +328,8 @@ export const PinSchema = {
|
|
|
328
328
|
}),
|
|
329
329
|
response: z.object({
|
|
330
330
|
id: z.uuid(),
|
|
331
|
-
created_at: z.coerce.date(),
|
|
332
|
-
updated_at: z.coerce.date(),
|
|
331
|
+
created_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
332
|
+
updated_at: z.coerce.date().transform((_) => _.toISOString()),
|
|
333
333
|
country: z.string(),
|
|
334
334
|
text: maybe(z.string()),
|
|
335
335
|
hide: z.boolean(),
|