@assemblis/contracts 0.1.12 → 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 +24 -36
- 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>>;
|
|
@@ -262,11 +261,10 @@ 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
270
|
}, z.core.$strip>>>, z.ZodTransform<{
|
|
@@ -317,11 +315,10 @@ export declare const GetAccountReportsIdSchema: {
|
|
|
317
315
|
id: string;
|
|
318
316
|
created_at: string;
|
|
319
317
|
updated_at: string;
|
|
320
|
-
uri: string;
|
|
321
318
|
alt: string;
|
|
322
|
-
src: string;
|
|
323
|
-
sizes: string;
|
|
324
319
|
srcset: string;
|
|
320
|
+
width: number;
|
|
321
|
+
height: number;
|
|
325
322
|
}[];
|
|
326
323
|
};
|
|
327
324
|
} | null, {
|
|
@@ -372,11 +369,10 @@ export declare const GetAccountReportsIdSchema: {
|
|
|
372
369
|
id: string;
|
|
373
370
|
created_at: string;
|
|
374
371
|
updated_at: string;
|
|
375
|
-
uri: string;
|
|
376
372
|
alt: string;
|
|
377
|
-
src: string;
|
|
378
|
-
sizes: string;
|
|
379
373
|
srcset: string;
|
|
374
|
+
width: number;
|
|
375
|
+
height: number;
|
|
380
376
|
}[];
|
|
381
377
|
};
|
|
382
378
|
} | null | undefined>>;
|
|
@@ -554,11 +550,10 @@ export declare const PostAccountReportsSchema: {
|
|
|
554
550
|
id: z.ZodUUID;
|
|
555
551
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
556
552
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
557
|
-
uri: z.ZodString;
|
|
558
553
|
alt: z.ZodString;
|
|
559
|
-
src: z.ZodString;
|
|
560
|
-
sizes: z.ZodString;
|
|
561
554
|
srcset: z.ZodString;
|
|
555
|
+
width: z.ZodInt;
|
|
556
|
+
height: z.ZodInt;
|
|
562
557
|
}, z.core.$strip>>;
|
|
563
558
|
}, z.core.$strip>;
|
|
564
559
|
}, z.core.$strip>;
|
|
@@ -703,11 +698,10 @@ export declare const PutAccountReportsIdContentSchema: {
|
|
|
703
698
|
id: z.ZodUUID;
|
|
704
699
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
705
700
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
706
|
-
uri: z.ZodString;
|
|
707
701
|
alt: z.ZodString;
|
|
708
|
-
src: z.ZodString;
|
|
709
|
-
sizes: z.ZodString;
|
|
710
702
|
srcset: z.ZodString;
|
|
703
|
+
width: z.ZodInt;
|
|
704
|
+
height: z.ZodInt;
|
|
711
705
|
}, z.core.$strip>>;
|
|
712
706
|
}, z.core.$strip>;
|
|
713
707
|
}, z.core.$strip>;
|
|
@@ -837,11 +831,10 @@ export declare const PatchAccountReportsIdDiscardSchema: {
|
|
|
837
831
|
id: z.ZodUUID;
|
|
838
832
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
839
833
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
840
|
-
uri: z.ZodString;
|
|
841
834
|
alt: z.ZodString;
|
|
842
|
-
src: z.ZodString;
|
|
843
|
-
sizes: z.ZodString;
|
|
844
835
|
srcset: z.ZodString;
|
|
836
|
+
width: z.ZodInt;
|
|
837
|
+
height: z.ZodInt;
|
|
845
838
|
}, z.core.$strip>>;
|
|
846
839
|
}, z.core.$strip>;
|
|
847
840
|
}, z.core.$strip>>>, z.ZodTransform<{
|
|
@@ -892,11 +885,10 @@ export declare const PatchAccountReportsIdDiscardSchema: {
|
|
|
892
885
|
id: string;
|
|
893
886
|
created_at: string;
|
|
894
887
|
updated_at: string;
|
|
895
|
-
uri: string;
|
|
896
888
|
alt: string;
|
|
897
|
-
src: string;
|
|
898
|
-
sizes: string;
|
|
899
889
|
srcset: string;
|
|
890
|
+
width: number;
|
|
891
|
+
height: number;
|
|
900
892
|
}[];
|
|
901
893
|
};
|
|
902
894
|
} | null, {
|
|
@@ -947,11 +939,10 @@ export declare const PatchAccountReportsIdDiscardSchema: {
|
|
|
947
939
|
id: string;
|
|
948
940
|
created_at: string;
|
|
949
941
|
updated_at: string;
|
|
950
|
-
uri: string;
|
|
951
942
|
alt: string;
|
|
952
|
-
src: string;
|
|
953
|
-
sizes: string;
|
|
954
943
|
srcset: string;
|
|
944
|
+
width: number;
|
|
945
|
+
height: number;
|
|
955
946
|
}[];
|
|
956
947
|
};
|
|
957
948
|
} | null | undefined>>;
|
|
@@ -1083,11 +1074,10 @@ export declare const PatchAccountReportsIdPublishSchema: {
|
|
|
1083
1074
|
id: z.ZodUUID;
|
|
1084
1075
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1085
1076
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1086
|
-
uri: z.ZodString;
|
|
1087
1077
|
alt: z.ZodString;
|
|
1088
|
-
src: z.ZodString;
|
|
1089
|
-
sizes: z.ZodString;
|
|
1090
1078
|
srcset: z.ZodString;
|
|
1079
|
+
width: z.ZodInt;
|
|
1080
|
+
height: z.ZodInt;
|
|
1091
1081
|
}, z.core.$strip>>;
|
|
1092
1082
|
}, z.core.$strip>;
|
|
1093
1083
|
}, z.core.$strip>;
|
|
@@ -1217,11 +1207,10 @@ export declare const PatchAccountReportsIdUnpublishSchema: {
|
|
|
1217
1207
|
id: z.ZodUUID;
|
|
1218
1208
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1219
1209
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1220
|
-
uri: z.ZodString;
|
|
1221
1210
|
alt: z.ZodString;
|
|
1222
|
-
src: z.ZodString;
|
|
1223
|
-
sizes: z.ZodString;
|
|
1224
1211
|
srcset: z.ZodString;
|
|
1212
|
+
width: z.ZodInt;
|
|
1213
|
+
height: z.ZodInt;
|
|
1225
1214
|
}, z.core.$strip>>;
|
|
1226
1215
|
}, z.core.$strip>;
|
|
1227
1216
|
}, z.core.$strip>;
|
|
@@ -1353,11 +1342,10 @@ export declare const PostAccountReportsIdCoverImageSchema: {
|
|
|
1353
1342
|
id: z.ZodUUID;
|
|
1354
1343
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1355
1344
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1356
|
-
uri: z.ZodString;
|
|
1357
1345
|
alt: z.ZodString;
|
|
1358
|
-
src: z.ZodString;
|
|
1359
|
-
sizes: z.ZodString;
|
|
1360
1346
|
srcset: z.ZodString;
|
|
1347
|
+
width: z.ZodInt;
|
|
1348
|
+
height: z.ZodInt;
|
|
1361
1349
|
}, z.core.$strip>>;
|
|
1362
1350
|
}, z.core.$strip>;
|
|
1363
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',
|