@assemblis/contracts 0.1.10 → 0.1.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/api.d.ts +130 -32
- package/dist/schemas/base.d.ts +4 -6
- package/dist/types/enums.d.ts +6 -0
- package/package.json +2 -1
- package/src/schemas/base.ts +3 -4
- package/src/types/enums.ts +7 -0
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"zod";var t,a,r,n;!function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH"}(t||(t={})),function(e){e.ID=":ID",e.NAME=":NAME"}(a||(a={})),function(e){e.ACCOUNT_REPORTS="/account/reports",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"}(r||(r={})),function(e){e.DELIBERATION="deliberation",e.DEMOGRAPHIC_DATA="demographic-data",e.PRE_ASSEMBLY="pre-assembly",e.POST_ASSEMBLY="post-assembly"}(
|
|
1
|
+
import e from"zod";var t,a,r,n,o;!function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH"}(t||(t={})),function(e){e.ID=":ID",e.NAME=":NAME"}(a||(a={})),function(e){e.ACCOUNT_REPORTS="/account/reports",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"}(r||(r={})),function(e){e.DISCARDED="DISCARDED",e.DRAFTED="DRAFT",e.PUBLISHED="PUBLISHED",e.CHANGED="CHANGED"}(n||(n={})),function(e){e.DELIBERATION="deliberation",e.DEMOGRAPHIC_DATA="demographic-data",e.PRE_ASSEMBLY="pre-assembly",e.POST_ASSEMBLY="post-assembly"}(o||(o={}));const i=e.coerce.date().transform(e=>e.toISOString()),s=e=>e.nullish().transform(e=>e??null),d=e.object({id:e.uuid(),created_at:i,updated_at:i,alt:e.string(),srcset:e.string(),width:e.int(),height:e.int()}),c=e.object({label:e.string(),value:e.coerce.number().int()}),p=e.object({published_at:s(i),title:s(e.string()),description:s(e.string()),location:s(e.string()),outputs:s(e.string().array()),initiation_type:s(e.string()),recruitment_method:s(e.string()),recruitment_description:s(e.string()),participant_count:s(e.int()),organiser_reflections:s(e.string()),organiser_report_url:s(e.string()),location_details:s(e.string()),date:s(e.string()),duration:s(e.int()),contact_information_url:s(e.string()),cover_image_id:s(e.string())}),u=e.object({id:e.uuid(),created_at:i,updated_at:i,published_at:s(i),state:e.enum(["DISCARDED","DRAFTED","PUBLISHED","CHANGED"]),viewer_password:e.string(),draft_content:s(p),published_content:s(p),media:e.object({images:d.array()})});e.object({id:e.uuid(),created_at:i,updated_at:i,sub:e.string(),is_mutirao:e.boolean()});const _={endpoint:()=>r.ACCOUNT_REPORTS,method:t.GET,payload:e.never(),response:e.object({reports:u.array()})},l={endpoint:e=>`${r.ACCOUNT_REPORTS}/${e}`,method:t.GET,payload:e.never(),response:s(u)},b={endpoint:()=>r.ACCOUNT_REPORTS,method:t.POST,payload:s(p.omit({cover_image_id:!0})),response:u},g={endpoint:e=>`${r.ACCOUNT_REPORTS}/${e}/content`,method:t.PUT,payload:p.omit({published_at:!0,cover_image_id:!0}),response:u},m={endpoint:e=>`${r.ACCOUNT_REPORTS}/${e}/discard`,method:t.PATCH,payload:e.nullish(e.object()),response:s(u)},y={endpoint:e=>`${r.ACCOUNT_REPORTS}/${e}/publish`,method:t.PATCH,payload:e.object({published_at:i}),response:u},S={endpoint:e=>`${r.ACCOUNT_REPORTS}/${e}/unpublish`,method:t.PATCH,payload:e.nullish(e.object()),response:u},E={endpoint:e=>`${r.ACCOUNT_REPORTS}/${e}/cover-image`,method:t.POST,payload:d.pick({alt:!0}),response:u},T={payload:e.object({route:e.string(),text:e.string(),metadata:e.unknown()}),response:e.string()},f={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()},j={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()},O=e.object({id:e.uuid(),text:e.string()}),A={payload:e.undefined(),response:e.object({id:e.uuid(),created_at:i,updated_at:i,name:e.string(),sections:e.object({primary:O,secondary:O.array(),options:c.array()}).array()})},R={payload:e.object({answers:e.object({question_id:e.uuid(),answer_value:e.coerce.number().int()}).array()}),response:e.object({total:e.number().int()})},C=e.object({visible_on_profile:e.boolean(),description:s(e.string())}),h=e.object({text:e.string(),agreed:s(e.coerce.number().int()),against:s(e.coerce.number().int()),abstained:s(e.coerce.number().int()),include_in_action_plan:e.boolean().default(!0),assembly_id:e.uuid()}),I=e.object({text:e.string(),complete:e.boolean().default(!1),action_id:e.uuid(),assembly_id:e.uuid()}),P=e.object({published_at:s(i),name:e.string(),about:s(e.string()),topics:e.string().array(),country:s(e.string()),hide:e.boolean().default(!1)}),x={payload:P,response:P.extend({id:e.uuid(),created_at:i,updated_at:i,image_src:s(e.string()),has_image:e.boolean().meta({deprecated:!0}),user_id:e.uuid().meta({deprecated:!0})})},v={payload:e.undefined(),response:e.object({assemblies:x.response.array()})},D=e.object({visible_on_profile:e.boolean(),name:s(e.string()),description:s(e.string()),type:s(e.string())}),N=e.object({visible_on_profile:e.boolean(),registration_link:s(e.string()),start_date:s(i)}),U=e.object({visible_on_profile:e.boolean(),background:s(e.string())}),H=e.object({visible_on_profile:e.boolean(),organisation_types:e.string().array(),description:s(e.string())}),$=e.object({visible_on_profile:e.boolean(),organisation_types:e.string().array(),description:s(e.string())}),k=e.object({visible_on_profile:e.boolean(),decision_method:s(e.string())}),w=e.object({visible_on_profile:e.boolean(),recruitment_method:s(e.string()),community:s(e.string())}),B=e.object({visible_on_profile:e.boolean(),support_options:e.string().array()}),G=e.object({visible_on_profile:e.boolean()}),L={payload:x.payload.extend({organisation:s(D.extend({id:e.uuid().optional()})),event_details:s(N),story:s(U),supporters:s(H),funders:s($),facilitation:s(k),participants:s(w),support:s(B),action_plan:s(C.extend({actions:h.omit({assembly_id:!0}).extend({id:e.uuid().optional(),tasks:I.omit({action_id:!0,assembly_id:!0}).extend({id:e.uuid().optional()}).array(),updates:e.unknown().array()}).array(),updates:e.unknown().array()})),surveys:s(G)}),response:x.response.omit({user_id:!0}).extend({is_own:e.boolean(),organisation:s(D.extend({id:e.uuid(),created_at:i,updated_at:i})),event_details:s(N.extend({created_at:i,updated_at:i})),story:s(U.extend({created_at:i,updated_at:i})),supporters:s(H.extend({created_at:i,updated_at:i})),funders:s($.extend({created_at:i,updated_at:i})),facilitation:s(k.extend({created_at:i,updated_at:i})),participants:s(w.extend({created_at:i,updated_at:i})),support:s(B.extend({created_at:i,updated_at:i})),action_plan:s(C.extend({actions:h.omit({assembly_id:!0}).extend({id:e.uuid(),created_at:i,updated_at:e.coerce.date().transform(e=>e.toISOString()),tasks:I.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:s(G.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(),c.array())}))}))})},M={payload:e.object({country:e.string(),email:e.string(),text:s(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:s(e.string()),hide:e.boolean(),image_src:s(e.string()),has_image:e.boolean().meta({deprecated:!0})})},F={payload:e.undefined(),response:e.object({assemblies:x.response.array(),pins:M.response.array()})};export{r as ApiEndpoint,t as ApiRestMethod,a as ApiRouteParameter,v as AssembliesListSchema,L as AssemblyDetailSchema,x as AssemblyOverviewSchema,T as FeedbackSchema,l as GetAccountReportsIdSchema,_ as GetAccountReportsSchema,f as LogSchema,m as PatchAccountReportsIdDiscardSchema,y as PatchAccountReportsIdPublishSchema,S as PatchAccountReportsIdUnpublishSchema,F as PinListSchema,M as PinSchema,E as PostAccountReportsIdCoverImageSchema,b as PostAccountReportsSchema,g as PutAccountReportsIdContentSchema,j as RegisterSchema,n as ReportState,o as SurveyName,R as SurveyResponseSchema,A as SurveySchema};
|
package/dist/schemas/api.d.ts
CHANGED
|
@@ -127,11 +127,10 @@ export declare const GetAccountReportsSchema: {
|
|
|
127
127
|
id: z.ZodUUID;
|
|
128
128
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
129
129
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
130
|
-
uri: z.ZodString;
|
|
131
130
|
alt: z.ZodString;
|
|
132
|
-
src: z.ZodString;
|
|
133
|
-
sizes: z.ZodString;
|
|
134
131
|
srcset: z.ZodString;
|
|
132
|
+
width: z.ZodInt;
|
|
133
|
+
height: z.ZodInt;
|
|
135
134
|
}, z.core.$strip>>;
|
|
136
135
|
}, z.core.$strip>;
|
|
137
136
|
}, z.core.$strip>>;
|
|
@@ -141,7 +140,7 @@ export declare const GetAccountReportsIdSchema: {
|
|
|
141
140
|
endpoint: (reportId: string) => AccountEndpoint;
|
|
142
141
|
method: ApiRestMethod;
|
|
143
142
|
payload: z.ZodNever;
|
|
144
|
-
response: z.ZodObject<{
|
|
143
|
+
response: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
145
144
|
id: z.ZodUUID;
|
|
146
145
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
147
146
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
@@ -262,14 +261,121 @@ export declare const GetAccountReportsIdSchema: {
|
|
|
262
261
|
id: z.ZodUUID;
|
|
263
262
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
264
263
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
265
|
-
uri: z.ZodString;
|
|
266
264
|
alt: z.ZodString;
|
|
267
|
-
src: z.ZodString;
|
|
268
|
-
sizes: z.ZodString;
|
|
269
265
|
srcset: z.ZodString;
|
|
266
|
+
width: z.ZodInt;
|
|
267
|
+
height: z.ZodInt;
|
|
270
268
|
}, z.core.$strip>>;
|
|
271
269
|
}, z.core.$strip>;
|
|
272
|
-
}, z.core.$strip
|
|
270
|
+
}, z.core.$strip>>>, z.ZodTransform<{
|
|
271
|
+
id: string;
|
|
272
|
+
created_at: string;
|
|
273
|
+
updated_at: string;
|
|
274
|
+
published_at: string | null;
|
|
275
|
+
state: "DISCARDED" | "DRAFTED" | "PUBLISHED" | "CHANGED";
|
|
276
|
+
viewer_password: string;
|
|
277
|
+
draft_content: {
|
|
278
|
+
published_at: string | null;
|
|
279
|
+
title: string | null;
|
|
280
|
+
description: string | null;
|
|
281
|
+
location: string | null;
|
|
282
|
+
outputs: string[] | null;
|
|
283
|
+
initiation_type: string | null;
|
|
284
|
+
recruitment_method: string | null;
|
|
285
|
+
recruitment_description: string | null;
|
|
286
|
+
participant_count: number | null;
|
|
287
|
+
organiser_reflections: string | null;
|
|
288
|
+
organiser_report_url: string | null;
|
|
289
|
+
location_details: string | null;
|
|
290
|
+
date: string | null;
|
|
291
|
+
duration: number | null;
|
|
292
|
+
contact_information_url: string | null;
|
|
293
|
+
cover_image_id: string | null;
|
|
294
|
+
} | null;
|
|
295
|
+
published_content: {
|
|
296
|
+
published_at: string | null;
|
|
297
|
+
title: string | null;
|
|
298
|
+
description: string | null;
|
|
299
|
+
location: string | null;
|
|
300
|
+
outputs: string[] | null;
|
|
301
|
+
initiation_type: string | null;
|
|
302
|
+
recruitment_method: string | null;
|
|
303
|
+
recruitment_description: string | null;
|
|
304
|
+
participant_count: number | null;
|
|
305
|
+
organiser_reflections: string | null;
|
|
306
|
+
organiser_report_url: string | null;
|
|
307
|
+
location_details: string | null;
|
|
308
|
+
date: string | null;
|
|
309
|
+
duration: number | null;
|
|
310
|
+
contact_information_url: string | null;
|
|
311
|
+
cover_image_id: string | null;
|
|
312
|
+
} | null;
|
|
313
|
+
media: {
|
|
314
|
+
images: {
|
|
315
|
+
id: string;
|
|
316
|
+
created_at: string;
|
|
317
|
+
updated_at: string;
|
|
318
|
+
alt: string;
|
|
319
|
+
srcset: string;
|
|
320
|
+
width: number;
|
|
321
|
+
height: number;
|
|
322
|
+
}[];
|
|
323
|
+
};
|
|
324
|
+
} | null, {
|
|
325
|
+
id: string;
|
|
326
|
+
created_at: string;
|
|
327
|
+
updated_at: string;
|
|
328
|
+
published_at: string | null;
|
|
329
|
+
state: "DISCARDED" | "DRAFTED" | "PUBLISHED" | "CHANGED";
|
|
330
|
+
viewer_password: string;
|
|
331
|
+
draft_content: {
|
|
332
|
+
published_at: string | null;
|
|
333
|
+
title: string | null;
|
|
334
|
+
description: string | null;
|
|
335
|
+
location: string | null;
|
|
336
|
+
outputs: string[] | null;
|
|
337
|
+
initiation_type: string | null;
|
|
338
|
+
recruitment_method: string | null;
|
|
339
|
+
recruitment_description: string | null;
|
|
340
|
+
participant_count: number | null;
|
|
341
|
+
organiser_reflections: string | null;
|
|
342
|
+
organiser_report_url: string | null;
|
|
343
|
+
location_details: string | null;
|
|
344
|
+
date: string | null;
|
|
345
|
+
duration: number | null;
|
|
346
|
+
contact_information_url: string | null;
|
|
347
|
+
cover_image_id: string | null;
|
|
348
|
+
} | null;
|
|
349
|
+
published_content: {
|
|
350
|
+
published_at: string | null;
|
|
351
|
+
title: string | null;
|
|
352
|
+
description: string | null;
|
|
353
|
+
location: string | null;
|
|
354
|
+
outputs: string[] | null;
|
|
355
|
+
initiation_type: string | null;
|
|
356
|
+
recruitment_method: string | null;
|
|
357
|
+
recruitment_description: string | null;
|
|
358
|
+
participant_count: number | null;
|
|
359
|
+
organiser_reflections: string | null;
|
|
360
|
+
organiser_report_url: string | null;
|
|
361
|
+
location_details: string | null;
|
|
362
|
+
date: string | null;
|
|
363
|
+
duration: number | null;
|
|
364
|
+
contact_information_url: string | null;
|
|
365
|
+
cover_image_id: string | null;
|
|
366
|
+
} | null;
|
|
367
|
+
media: {
|
|
368
|
+
images: {
|
|
369
|
+
id: string;
|
|
370
|
+
created_at: string;
|
|
371
|
+
updated_at: string;
|
|
372
|
+
alt: string;
|
|
373
|
+
srcset: string;
|
|
374
|
+
width: number;
|
|
375
|
+
height: number;
|
|
376
|
+
}[];
|
|
377
|
+
};
|
|
378
|
+
} | null | undefined>>;
|
|
273
379
|
};
|
|
274
380
|
export declare const PostAccountReportsSchema: {
|
|
275
381
|
endpoint: () => AccountEndpoint;
|
|
@@ -444,11 +550,10 @@ export declare const PostAccountReportsSchema: {
|
|
|
444
550
|
id: z.ZodUUID;
|
|
445
551
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
446
552
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
447
|
-
uri: z.ZodString;
|
|
448
553
|
alt: z.ZodString;
|
|
449
|
-
src: z.ZodString;
|
|
450
|
-
sizes: z.ZodString;
|
|
451
554
|
srcset: z.ZodString;
|
|
555
|
+
width: z.ZodInt;
|
|
556
|
+
height: z.ZodInt;
|
|
452
557
|
}, z.core.$strip>>;
|
|
453
558
|
}, z.core.$strip>;
|
|
454
559
|
}, z.core.$strip>;
|
|
@@ -593,11 +698,10 @@ export declare const PutAccountReportsIdContentSchema: {
|
|
|
593
698
|
id: z.ZodUUID;
|
|
594
699
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
595
700
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
596
|
-
uri: z.ZodString;
|
|
597
701
|
alt: z.ZodString;
|
|
598
|
-
src: z.ZodString;
|
|
599
|
-
sizes: z.ZodString;
|
|
600
702
|
srcset: z.ZodString;
|
|
703
|
+
width: z.ZodInt;
|
|
704
|
+
height: z.ZodInt;
|
|
601
705
|
}, z.core.$strip>>;
|
|
602
706
|
}, z.core.$strip>;
|
|
603
707
|
}, z.core.$strip>;
|
|
@@ -727,11 +831,10 @@ export declare const PatchAccountReportsIdDiscardSchema: {
|
|
|
727
831
|
id: z.ZodUUID;
|
|
728
832
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
729
833
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
730
|
-
uri: z.ZodString;
|
|
731
834
|
alt: z.ZodString;
|
|
732
|
-
src: z.ZodString;
|
|
733
|
-
sizes: z.ZodString;
|
|
734
835
|
srcset: z.ZodString;
|
|
836
|
+
width: z.ZodInt;
|
|
837
|
+
height: z.ZodInt;
|
|
735
838
|
}, z.core.$strip>>;
|
|
736
839
|
}, z.core.$strip>;
|
|
737
840
|
}, z.core.$strip>>>, z.ZodTransform<{
|
|
@@ -782,11 +885,10 @@ export declare const PatchAccountReportsIdDiscardSchema: {
|
|
|
782
885
|
id: string;
|
|
783
886
|
created_at: string;
|
|
784
887
|
updated_at: string;
|
|
785
|
-
uri: string;
|
|
786
888
|
alt: string;
|
|
787
|
-
src: string;
|
|
788
|
-
sizes: string;
|
|
789
889
|
srcset: string;
|
|
890
|
+
width: number;
|
|
891
|
+
height: number;
|
|
790
892
|
}[];
|
|
791
893
|
};
|
|
792
894
|
} | null, {
|
|
@@ -837,11 +939,10 @@ export declare const PatchAccountReportsIdDiscardSchema: {
|
|
|
837
939
|
id: string;
|
|
838
940
|
created_at: string;
|
|
839
941
|
updated_at: string;
|
|
840
|
-
uri: string;
|
|
841
942
|
alt: string;
|
|
842
|
-
src: string;
|
|
843
|
-
sizes: string;
|
|
844
943
|
srcset: string;
|
|
944
|
+
width: number;
|
|
945
|
+
height: number;
|
|
845
946
|
}[];
|
|
846
947
|
};
|
|
847
948
|
} | null | undefined>>;
|
|
@@ -973,11 +1074,10 @@ export declare const PatchAccountReportsIdPublishSchema: {
|
|
|
973
1074
|
id: z.ZodUUID;
|
|
974
1075
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
975
1076
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
976
|
-
uri: z.ZodString;
|
|
977
1077
|
alt: z.ZodString;
|
|
978
|
-
src: z.ZodString;
|
|
979
|
-
sizes: z.ZodString;
|
|
980
1078
|
srcset: z.ZodString;
|
|
1079
|
+
width: z.ZodInt;
|
|
1080
|
+
height: z.ZodInt;
|
|
981
1081
|
}, z.core.$strip>>;
|
|
982
1082
|
}, z.core.$strip>;
|
|
983
1083
|
}, z.core.$strip>;
|
|
@@ -1107,11 +1207,10 @@ export declare const PatchAccountReportsIdUnpublishSchema: {
|
|
|
1107
1207
|
id: z.ZodUUID;
|
|
1108
1208
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1109
1209
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1110
|
-
uri: z.ZodString;
|
|
1111
1210
|
alt: z.ZodString;
|
|
1112
|
-
src: z.ZodString;
|
|
1113
|
-
sizes: z.ZodString;
|
|
1114
1211
|
srcset: z.ZodString;
|
|
1212
|
+
width: z.ZodInt;
|
|
1213
|
+
height: z.ZodInt;
|
|
1115
1214
|
}, z.core.$strip>>;
|
|
1116
1215
|
}, z.core.$strip>;
|
|
1117
1216
|
}, z.core.$strip>;
|
|
@@ -1243,11 +1342,10 @@ export declare const PostAccountReportsIdCoverImageSchema: {
|
|
|
1243
1342
|
id: z.ZodUUID;
|
|
1244
1343
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1245
1344
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1246
|
-
uri: z.ZodString;
|
|
1247
1345
|
alt: z.ZodString;
|
|
1248
|
-
src: z.ZodString;
|
|
1249
|
-
sizes: z.ZodString;
|
|
1250
1346
|
srcset: z.ZodString;
|
|
1347
|
+
width: z.ZodInt;
|
|
1348
|
+
height: z.ZodInt;
|
|
1251
1349
|
}, z.core.$strip>>;
|
|
1252
1350
|
}, z.core.$strip>;
|
|
1253
1351
|
}, z.core.$strip>;
|
package/dist/schemas/base.d.ts
CHANGED
|
@@ -3,11 +3,10 @@ export declare const ImageSchema: z.ZodObject<{
|
|
|
3
3
|
id: z.ZodUUID;
|
|
4
4
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
5
5
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
6
|
-
uri: z.ZodString;
|
|
7
6
|
alt: z.ZodString;
|
|
8
|
-
src: z.ZodString;
|
|
9
|
-
sizes: z.ZodString;
|
|
10
7
|
srcset: z.ZodString;
|
|
8
|
+
width: z.ZodInt;
|
|
9
|
+
height: z.ZodInt;
|
|
11
10
|
}, z.core.$strip>;
|
|
12
11
|
export declare const OptionSchema: z.ZodObject<{
|
|
13
12
|
label: z.ZodString;
|
|
@@ -152,11 +151,10 @@ export declare const ReportSchema: z.ZodObject<{
|
|
|
152
151
|
id: z.ZodUUID;
|
|
153
152
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
154
153
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
155
|
-
uri: z.ZodString;
|
|
156
154
|
alt: z.ZodString;
|
|
157
|
-
src: z.ZodString;
|
|
158
|
-
sizes: z.ZodString;
|
|
159
155
|
srcset: z.ZodString;
|
|
156
|
+
width: z.ZodInt;
|
|
157
|
+
height: z.ZodInt;
|
|
160
158
|
}, z.core.$strip>>;
|
|
161
159
|
}, z.core.$strip>;
|
|
162
160
|
}, z.core.$strip>;
|
package/dist/types/enums.d.ts
CHANGED
|
@@ -19,6 +19,12 @@ export declare enum ApiEndpoint {
|
|
|
19
19
|
SURVEYS = "/surveys",
|
|
20
20
|
SURVEY_RESPONSES = "/assemblies/:ID/survey-responses/:NAME"
|
|
21
21
|
}
|
|
22
|
+
export declare enum ReportState {
|
|
23
|
+
DISCARDED = "DISCARDED",
|
|
24
|
+
DRAFTED = "DRAFT",
|
|
25
|
+
PUBLISHED = "PUBLISHED",
|
|
26
|
+
CHANGED = "CHANGED"
|
|
27
|
+
}
|
|
22
28
|
export declare enum SurveyName {
|
|
23
29
|
DELIBERATION = "deliberation",
|
|
24
30
|
DEMOGRAPHIC_DATA = "demographic-data",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assemblis/contracts",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"clean": "rm -rf ./dist",
|
|
20
20
|
"lint": "eslint .",
|
|
21
21
|
"format": "prettier --plugin-search-dir . --write .",
|
|
22
|
+
"pub": "yarn build && yarn publish",
|
|
22
23
|
"typecheck": "tsc --noEmit"
|
|
23
24
|
}
|
|
24
25
|
}
|
package/src/schemas/base.ts
CHANGED
|
@@ -7,11 +7,10 @@ export const ImageSchema = z.object({
|
|
|
7
7
|
id: z.uuid(),
|
|
8
8
|
created_at: isoDateString,
|
|
9
9
|
updated_at: isoDateString,
|
|
10
|
-
uri: z.string(),
|
|
11
10
|
alt: z.string(),
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
srcset: z.string(),
|
|
12
|
+
width: z.int(),
|
|
13
|
+
height: z.int()
|
|
15
14
|
});
|
|
16
15
|
|
|
17
16
|
export const OptionSchema = z.object({
|
package/src/types/enums.ts
CHANGED
|
@@ -22,6 +22,13 @@ export enum ApiEndpoint {
|
|
|
22
22
|
SURVEY_RESPONSES = '/assemblies/:ID/survey-responses/:NAME'
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
export enum ReportState {
|
|
26
|
+
DISCARDED = 'DISCARDED',
|
|
27
|
+
DRAFTED = 'DRAFT',
|
|
28
|
+
PUBLISHED = 'PUBLISHED',
|
|
29
|
+
CHANGED = 'CHANGED'
|
|
30
|
+
}
|
|
31
|
+
|
|
25
32
|
export enum SurveyName {
|
|
26
33
|
DELIBERATION = 'deliberation',
|
|
27
34
|
DEMOGRAPHIC_DATA = 'demographic-data',
|