@assemblis/contracts 0.1.20 → 0.2.1

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 CHANGED
@@ -1 +1 @@
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="/interest",e.INTEREST_ASSEMBLIS="/interest/assemblis",e.LOGS="/logs",e.PINS="/pins",e.REPORTS="/reports",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({recaptcha_token:e.string(),email:e.email().toLowerCase().trim(),listIds:e.int().array(),firstname:e.string().nullish().transform(e=>e??void 0),lastname:e.string().nullish().transform(e=>e??void 0),country:e.string().nullish().transform(e=>e??void 0),organisation:e.string().nullish().transform(e=>e??void 0)}),p=e.object({label:e.string(),value:e.coerce.number().int()}),l=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(l),published_content:s(l),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()})},b={endpoint:e=>`${r.ACCOUNT_REPORTS}/${e}`,method:t.GET,payload:e.never(),response:s(u)},g={endpoint:()=>r.ACCOUNT_REPORTS,method:t.POST,payload:s(l.omit({cover_image_id:!0})),response:u},m={endpoint:e=>`${r.ACCOUNT_REPORTS}/${e}/content`,method:t.PUT,payload:l.omit({published_at:!0,cover_image_id:!0}),response:u},y={endpoint:e=>`${r.ACCOUNT_REPORTS}/${e}/discard`,method:t.PATCH,payload:e.nullish(e.object()),response:s(u)},S={endpoint:e=>`${r.ACCOUNT_REPORTS}/${e}/publish`,method:t.PATCH,payload:e.object({published_at:i}),response:u},E={endpoint:e=>`${r.ACCOUNT_REPORTS}/${e}/unpublish`,method:t.PATCH,payload:e.nullish(e.object()),response:u},T={endpoint:e=>`${r.ACCOUNT_REPORTS}/${e}/cover-image`,method:t.POST,payload:d.pick({alt:!0}),response:u},f={endpoint:()=>r.INTEREST,method:t.POST,payload:c,response:e.string()},j={endpoint:()=>r.REPORTS,method:t.GET,payload:e.never(),response:e.object({reports:u.array()})},O={endpoint:e=>`${r.REPORTS}/${e}`,method:t.GET,payload:e.never(),response:s(u)},R={payload:e.object({route:e.string(),text:e.string(),metadata:e.unknown()}),response:e.string()},h={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()},A={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()},v=e.object({id:e.uuid(),text:e.string()}),P={payload:e.undefined(),response:e.object({id:e.uuid(),created_at:i,updated_at:i,name:e.string(),sections:e.object({primary:v,secondary:v.array(),options:p.array()}).array()})},C={payload:e.object({answers:e.object({question_id:e.uuid(),answer_value:e.coerce.number().int()}).array()}),response:e.object({total:e.number().int()})},I=e.object({visible_on_profile:e.boolean(),description:s(e.string())}),x=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()}),D=e.object({text:e.string(),complete:e.boolean().default(!1),action_id:e.uuid(),assembly_id:e.uuid()}),N=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)}),U={payload:N,response:N.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})})},$={payload:e.undefined(),response:e.object({assemblies:U.response.array()})},k=e.object({visible_on_profile:e.boolean(),name:s(e.string()),description:s(e.string()),type:s(e.string())}),w=e.object({visible_on_profile:e.boolean(),registration_link:s(e.string()),start_date:s(i)}),H=e.object({visible_on_profile:e.boolean(),background:s(e.string())}),G=e.object({visible_on_profile:e.boolean(),organisation_types:e.string().array(),description:s(e.string())}),L=e.object({visible_on_profile:e.boolean(),organisation_types:e.string().array(),description:s(e.string())}),B=e.object({visible_on_profile:e.boolean(),decision_method:s(e.string())}),M=e.object({visible_on_profile:e.boolean(),recruitment_method:s(e.string()),community:s(e.string())}),F=e.object({visible_on_profile:e.boolean(),support_options:e.string().array()}),Y=e.object({visible_on_profile:e.boolean()}),V={payload:U.payload.extend({organisation:s(k.extend({id:e.uuid().optional()})),event_details:s(w),story:s(H),supporters:s(G),funders:s(L),facilitation:s(B),participants:s(M),support:s(F),action_plan:s(I.extend({actions:x.omit({assembly_id:!0}).extend({id:e.uuid().optional(),tasks:D.omit({action_id:!0,assembly_id:!0}).extend({id:e.uuid().optional()}).array(),updates:e.unknown().array()}).array(),updates:e.unknown().array()})),surveys:s(Y)}),response:U.response.omit({user_id:!0}).extend({is_own:e.boolean(),organisation:s(k.extend({id:e.uuid(),created_at:i,updated_at:i})),event_details:s(w.extend({created_at:i,updated_at:i})),story:s(H.extend({created_at:i,updated_at:i})),supporters:s(G.extend({created_at:i,updated_at:i})),funders:s(L.extend({created_at:i,updated_at:i})),facilitation:s(B.extend({created_at:i,updated_at:i})),participants:s(M.extend({created_at:i,updated_at:i})),support:s(F.extend({created_at:i,updated_at:i})),action_plan:s(I.extend({actions:x.omit({assembly_id:!0}).extend({id:e.uuid(),created_at:i,updated_at:e.coerce.date().transform(e=>e.toISOString()),tasks:D.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(Y.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(),p.array())}))}))})},q={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})})},z={payload:e.undefined(),response:e.object({assemblies:U.response.array(),pins:q.response.array()})};export{r as ApiEndpoint,t as ApiRestMethod,a as ApiRouteParameter,$ as AssembliesListSchema,V as AssemblyDetailSchema,U as AssemblyOverviewSchema,R as FeedbackSchema,b as GetAccountReportsIdSchema,_ as GetAccountReportsSchema,O as GetReportsIdSchema,j as GetReportsSchema,h as LogSchema,y as PatchAccountReportsIdDiscardSchema,S as PatchAccountReportsIdPublishSchema,E as PatchAccountReportsIdUnpublishSchema,z as PinListSchema,q as PinSchema,T as PostAccountReportsIdCoverImageSchema,g as PostAccountReportsSchema,f as PostInterestSchema,m as PutAccountReportsIdContentSchema,A as RegisterSchema,n as ReportState,o as SurveyName,C as SurveyResponseSchema,P as SurveySchema};
1
+ import t from"zod";var e,n,i,o,r;!function(t){t.GET="GET",t.POST="POST",t.PUT="PUT",t.PATCH="PATCH"}(e||(e={})),function(t){t.ID=":ID",t.NAME=":NAME"}(n||(n={})),function(t){t.ACCOUNT_REPORTS="/account/reports",t.ASSEMBLIES="/assemblies",t.FEEDBACK="/feedback",t.INTEREST="/interest",t.INTEREST_ASSEMBLIS="/interest/assemblis",t.LOGS="/logs",t.PINS="/pins",t.REPORTS="/reports",t.SURVEYS="/surveys",t.SURVEY_RESPONSES="/assemblies/:ID/survey-responses/:NAME"}(i||(i={})),function(t){t.DISCARDED="DISCARDED",t.DRAFTED="DRAFT",t.PUBLISHED="PUBLISHED",t.CHANGED="CHANGED"}(o||(o={})),function(t){t.DELIBERATION="deliberation",t.DEMOGRAPHIC_DATA="demographic-data",t.PRE_ASSEMBLY="pre-assembly",t.POST_ASSEMBLY="post-assembly"}(r||(r={}));const s=t.coerce.date().transform(t=>t.toISOString()),a=t=>t.nullish().transform(t=>t??null),d=t.object({id:t.uuid(),created_at:s,updated_at:s,alt:t.string(),srcset:t.string(),width:t.int(),height:t.int()}),p=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)});t.object({label:t.string(),value:t.coerce.number().int()});const l=t.object({published_at:a(s),title:a(t.string()),description:a(t.string()),location:a(t.string()),outputs:a(t.string().array()),initiation_type:a(t.string()),recruitment_method:a(t.string()),recruitment_description:a(t.string()),participant_count:a(t.int()),organiser_reflections:a(t.string()),organiser_report_url:a(t.string()),location_details:a(t.string()),date:a(t.string()),duration:a(t.int()),contact_information_url:a(t.string()),cover_image_id:a(t.string())}),c=t.object({id:t.uuid(),sequential_id:t.int(),created_at:s,updated_at:s,published_at:a(s),state:t.enum(["DISCARDED","DRAFTED","PUBLISHED","CHANGED"]),slug:a(t.string()),draft_content:a(l),published_content:a(l),media:t.object({images:d.array()})});t.object({id:t.uuid(),created_at:s,updated_at:s,sub:t.string(),is_mutirao:t.boolean()});const E={endpoint:()=>i.ACCOUNT_REPORTS,method:e.GET,payload:t.never(),response:t.object({reports:c.array(),total:t.int()})},T={endpoint:t=>`${i.ACCOUNT_REPORTS}/${t}`,method:e.GET,payload:t.never(),response:a(c)},u={endpoint:()=>i.ACCOUNT_REPORTS,method:e.POST,payload:t.object({sequential_id:t.int(),content:a(l.omit({cover_image_id:!0}))}),response:c},S={endpoint:t=>`${i.ACCOUNT_REPORTS}/${t}/content`,method:e.PUT,payload:l.omit({published_at:!0,cover_image_id:!0}),response:c},_={endpoint:t=>`${i.ACCOUNT_REPORTS}/${t}/discard`,method:e.PATCH,payload:t.nullish(t.object()),response:a(c)},m={endpoint:t=>`${i.ACCOUNT_REPORTS}/${t}/publish`,method:e.PATCH,payload:t.object({published_at:s}),response:c},R={endpoint:t=>`${i.ACCOUNT_REPORTS}/${t}/unpublish`,method:e.PATCH,payload:t.nullish(t.object()),response:c},g={endpoint:t=>`${i.ACCOUNT_REPORTS}/${t}/cover-image`,method:e.POST,payload:d.pick({alt:!0}),response:c},A={endpoint:()=>i.INTEREST,method:e.POST,payload:p,response:t.string()},P={endpoint:()=>i.REPORTS,method:e.GET,payload:t.never(),response:t.object({reports:c.array()})},C={endpoint:t=>`${i.REPORTS}/${t}`,method:e.GET,payload:t.never(),response:a(c)};export{i as ApiEndpoint,e as ApiRestMethod,n as ApiRouteParameter,T as GetAccountReportsIdSchema,E as GetAccountReportsSchema,C as GetReportsIdSchema,P as GetReportsSchema,_ as PatchAccountReportsIdDiscardSchema,m as PatchAccountReportsIdPublishSchema,R as PatchAccountReportsIdUnpublishSchema,g as PostAccountReportsIdCoverImageSchema,u as PostAccountReportsSchema,A as PostInterestSchema,S as PutAccountReportsIdContentSchema,o as ReportState,r as SurveyName};
@@ -8,6 +8,7 @@ export declare const GetAccountReportsSchema: {
8
8
  response: z.ZodObject<{
9
9
  reports: z.ZodArray<z.ZodObject<{
10
10
  id: z.ZodUUID;
11
+ sequential_id: z.ZodInt;
11
12
  created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
12
13
  updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
13
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>>;
@@ -17,7 +18,7 @@ export declare const GetAccountReportsSchema: {
17
18
  PUBLISHED: "PUBLISHED";
18
19
  CHANGED: "CHANGED";
19
20
  }>;
20
- viewer_password: z.ZodString;
21
+ slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
21
22
  draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
22
23
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
23
24
  title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -134,6 +135,7 @@ export declare const GetAccountReportsSchema: {
134
135
  }, z.core.$strip>>;
135
136
  }, z.core.$strip>;
136
137
  }, z.core.$strip>>;
138
+ total: z.ZodInt;
137
139
  }, z.core.$strip>;
138
140
  };
139
141
  export declare const GetAccountReportsIdSchema: {
@@ -142,6 +144,7 @@ export declare const GetAccountReportsIdSchema: {
142
144
  payload: z.ZodNever;
143
145
  response: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
144
146
  id: z.ZodUUID;
147
+ sequential_id: z.ZodInt;
145
148
  created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
146
149
  updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
147
150
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -151,7 +154,7 @@ export declare const GetAccountReportsIdSchema: {
151
154
  PUBLISHED: "PUBLISHED";
152
155
  CHANGED: "CHANGED";
153
156
  }>;
154
- viewer_password: z.ZodString;
157
+ slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
155
158
  draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
156
159
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
157
160
  title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -269,11 +272,12 @@ export declare const GetAccountReportsIdSchema: {
269
272
  }, z.core.$strip>;
270
273
  }, z.core.$strip>>>, z.ZodTransform<{
271
274
  id: string;
275
+ sequential_id: number;
272
276
  created_at: string;
273
277
  updated_at: string;
274
278
  published_at: string | null;
275
279
  state: "DISCARDED" | "DRAFTED" | "PUBLISHED" | "CHANGED";
276
- viewer_password: string;
280
+ slug: string | null;
277
281
  draft_content: {
278
282
  published_at: string | null;
279
283
  title: string | null;
@@ -323,11 +327,12 @@ export declare const GetAccountReportsIdSchema: {
323
327
  };
324
328
  } | null, {
325
329
  id: string;
330
+ sequential_id: number;
326
331
  created_at: string;
327
332
  updated_at: string;
328
333
  published_at: string | null;
329
334
  state: "DISCARDED" | "DRAFTED" | "PUBLISHED" | "CHANGED";
330
- viewer_password: string;
335
+ slug: string | null;
331
336
  draft_content: {
332
337
  published_at: string | null;
333
338
  title: string | null;
@@ -380,57 +385,61 @@ export declare const GetAccountReportsIdSchema: {
380
385
  export declare const PostAccountReportsSchema: {
381
386
  endpoint: () => AccountEndpoint;
382
387
  method: ApiRestMethod;
383
- payload: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
384
- date: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
385
- published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
386
- title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
387
- description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
388
- location: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
389
- outputs: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>, z.ZodTransform<string[] | null, string[] | null | undefined>>;
390
- initiation_type: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
391
- recruitment_method: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
392
- recruitment_description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
393
- participant_count: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodInt>>, z.ZodTransform<number | null, number | null | undefined>>;
394
- organiser_reflections: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
395
- organiser_report_url: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
396
- location_details: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
397
- duration: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodInt>>, z.ZodTransform<number | null, number | null | undefined>>;
398
- contact_information_url: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
399
- }, z.core.$strip>>>, z.ZodTransform<{
400
- date: string | null;
401
- published_at: string | null;
402
- title: string | null;
403
- description: string | null;
404
- location: string | null;
405
- outputs: string[] | null;
406
- initiation_type: string | null;
407
- recruitment_method: string | null;
408
- recruitment_description: string | null;
409
- participant_count: number | null;
410
- organiser_reflections: string | null;
411
- organiser_report_url: string | null;
412
- location_details: string | null;
413
- duration: number | null;
414
- contact_information_url: string | null;
415
- } | null, {
416
- date: string | null;
417
- published_at: string | null;
418
- title: string | null;
419
- description: string | null;
420
- location: string | null;
421
- outputs: string[] | null;
422
- initiation_type: string | null;
423
- recruitment_method: string | null;
424
- recruitment_description: string | null;
425
- participant_count: number | null;
426
- organiser_reflections: string | null;
427
- organiser_report_url: string | null;
428
- location_details: string | null;
429
- duration: number | null;
430
- contact_information_url: string | null;
431
- } | null | undefined>>;
388
+ payload: z.ZodObject<{
389
+ sequential_id: z.ZodInt;
390
+ content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
391
+ date: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
392
+ published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
393
+ title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
394
+ description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
395
+ location: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
396
+ outputs: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>, z.ZodTransform<string[] | null, string[] | null | undefined>>;
397
+ initiation_type: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
398
+ recruitment_method: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
399
+ recruitment_description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
400
+ participant_count: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodInt>>, z.ZodTransform<number | null, number | null | undefined>>;
401
+ organiser_reflections: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
402
+ organiser_report_url: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
403
+ location_details: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
404
+ duration: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodInt>>, z.ZodTransform<number | null, number | null | undefined>>;
405
+ contact_information_url: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
406
+ }, z.core.$strip>>>, z.ZodTransform<{
407
+ date: string | null;
408
+ published_at: string | null;
409
+ title: string | null;
410
+ description: string | null;
411
+ location: string | null;
412
+ outputs: string[] | null;
413
+ initiation_type: string | null;
414
+ recruitment_method: string | null;
415
+ recruitment_description: string | null;
416
+ participant_count: number | null;
417
+ organiser_reflections: string | null;
418
+ organiser_report_url: string | null;
419
+ location_details: string | null;
420
+ duration: number | null;
421
+ contact_information_url: string | null;
422
+ } | null, {
423
+ date: string | null;
424
+ published_at: string | null;
425
+ title: string | null;
426
+ description: string | null;
427
+ location: string | null;
428
+ outputs: string[] | null;
429
+ initiation_type: string | null;
430
+ recruitment_method: string | null;
431
+ recruitment_description: string | null;
432
+ participant_count: number | null;
433
+ organiser_reflections: string | null;
434
+ organiser_report_url: string | null;
435
+ location_details: string | null;
436
+ duration: number | null;
437
+ contact_information_url: string | null;
438
+ } | null | undefined>>;
439
+ }, z.core.$strip>;
432
440
  response: z.ZodObject<{
433
441
  id: z.ZodUUID;
442
+ sequential_id: z.ZodInt;
434
443
  created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
435
444
  updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
436
445
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -440,7 +449,7 @@ export declare const PostAccountReportsSchema: {
440
449
  PUBLISHED: "PUBLISHED";
441
450
  CHANGED: "CHANGED";
442
451
  }>;
443
- viewer_password: z.ZodString;
452
+ slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
444
453
  draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
445
454
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
446
455
  title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -579,6 +588,7 @@ export declare const PutAccountReportsIdContentSchema: {
579
588
  }, z.core.$strip>;
580
589
  response: z.ZodObject<{
581
590
  id: z.ZodUUID;
591
+ sequential_id: z.ZodInt;
582
592
  created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
583
593
  updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
584
594
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -588,7 +598,7 @@ export declare const PutAccountReportsIdContentSchema: {
588
598
  PUBLISHED: "PUBLISHED";
589
599
  CHANGED: "CHANGED";
590
600
  }>;
591
- viewer_password: z.ZodString;
601
+ slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
592
602
  draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
593
603
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
594
604
  title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -712,6 +722,7 @@ export declare const PatchAccountReportsIdDiscardSchema: {
712
722
  payload: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, z.core.$strip>>>;
713
723
  response: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
714
724
  id: z.ZodUUID;
725
+ sequential_id: z.ZodInt;
715
726
  created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
716
727
  updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
717
728
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -721,7 +732,7 @@ export declare const PatchAccountReportsIdDiscardSchema: {
721
732
  PUBLISHED: "PUBLISHED";
722
733
  CHANGED: "CHANGED";
723
734
  }>;
724
- viewer_password: z.ZodString;
735
+ slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
725
736
  draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
726
737
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
727
738
  title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -839,11 +850,12 @@ export declare const PatchAccountReportsIdDiscardSchema: {
839
850
  }, z.core.$strip>;
840
851
  }, z.core.$strip>>>, z.ZodTransform<{
841
852
  id: string;
853
+ sequential_id: number;
842
854
  created_at: string;
843
855
  updated_at: string;
844
856
  published_at: string | null;
845
857
  state: "DISCARDED" | "DRAFTED" | "PUBLISHED" | "CHANGED";
846
- viewer_password: string;
858
+ slug: string | null;
847
859
  draft_content: {
848
860
  published_at: string | null;
849
861
  title: string | null;
@@ -893,11 +905,12 @@ export declare const PatchAccountReportsIdDiscardSchema: {
893
905
  };
894
906
  } | null, {
895
907
  id: string;
908
+ sequential_id: number;
896
909
  created_at: string;
897
910
  updated_at: string;
898
911
  published_at: string | null;
899
912
  state: "DISCARDED" | "DRAFTED" | "PUBLISHED" | "CHANGED";
900
- viewer_password: string;
913
+ slug: string | null;
901
914
  draft_content: {
902
915
  published_at: string | null;
903
916
  title: string | null;
@@ -955,6 +968,7 @@ export declare const PatchAccountReportsIdPublishSchema: {
955
968
  }, z.core.$strip>;
956
969
  response: z.ZodObject<{
957
970
  id: z.ZodUUID;
971
+ sequential_id: z.ZodInt;
958
972
  created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
959
973
  updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
960
974
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -964,7 +978,7 @@ export declare const PatchAccountReportsIdPublishSchema: {
964
978
  PUBLISHED: "PUBLISHED";
965
979
  CHANGED: "CHANGED";
966
980
  }>;
967
- viewer_password: z.ZodString;
981
+ slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
968
982
  draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
969
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>>;
970
984
  title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -1088,6 +1102,7 @@ export declare const PatchAccountReportsIdUnpublishSchema: {
1088
1102
  payload: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, z.core.$strip>>>;
1089
1103
  response: z.ZodObject<{
1090
1104
  id: z.ZodUUID;
1105
+ sequential_id: z.ZodInt;
1091
1106
  created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1092
1107
  updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1093
1108
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -1097,7 +1112,7 @@ export declare const PatchAccountReportsIdUnpublishSchema: {
1097
1112
  PUBLISHED: "PUBLISHED";
1098
1113
  CHANGED: "CHANGED";
1099
1114
  }>;
1100
- viewer_password: z.ZodString;
1115
+ slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1101
1116
  draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
1102
1117
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
1103
1118
  title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -1223,6 +1238,7 @@ export declare const PostAccountReportsIdCoverImageSchema: {
1223
1238
  }, z.core.$strip>;
1224
1239
  response: z.ZodObject<{
1225
1240
  id: z.ZodUUID;
1241
+ sequential_id: z.ZodInt;
1226
1242
  created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1227
1243
  updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1228
1244
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -1232,7 +1248,7 @@ export declare const PostAccountReportsIdCoverImageSchema: {
1232
1248
  PUBLISHED: "PUBLISHED";
1233
1249
  CHANGED: "CHANGED";
1234
1250
  }>;
1235
- viewer_password: z.ZodString;
1251
+ slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1236
1252
  draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
1237
1253
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
1238
1254
  title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -1371,6 +1387,7 @@ export declare const GetReportsSchema: {
1371
1387
  response: z.ZodObject<{
1372
1388
  reports: z.ZodArray<z.ZodObject<{
1373
1389
  id: z.ZodUUID;
1390
+ sequential_id: z.ZodInt;
1374
1391
  created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1375
1392
  updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1376
1393
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -1380,7 +1397,7 @@ export declare const GetReportsSchema: {
1380
1397
  PUBLISHED: "PUBLISHED";
1381
1398
  CHANGED: "CHANGED";
1382
1399
  }>;
1383
- viewer_password: z.ZodString;
1400
+ slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1384
1401
  draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
1385
1402
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
1386
1403
  title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -1505,6 +1522,7 @@ export declare const GetReportsIdSchema: {
1505
1522
  payload: z.ZodNever;
1506
1523
  response: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
1507
1524
  id: z.ZodUUID;
1525
+ sequential_id: z.ZodInt;
1508
1526
  created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1509
1527
  updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1510
1528
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -1514,7 +1532,7 @@ export declare const GetReportsIdSchema: {
1514
1532
  PUBLISHED: "PUBLISHED";
1515
1533
  CHANGED: "CHANGED";
1516
1534
  }>;
1517
- viewer_password: z.ZodString;
1535
+ slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1518
1536
  draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
1519
1537
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
1520
1538
  title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -1632,11 +1650,12 @@ export declare const GetReportsIdSchema: {
1632
1650
  }, z.core.$strip>;
1633
1651
  }, z.core.$strip>>>, z.ZodTransform<{
1634
1652
  id: string;
1653
+ sequential_id: number;
1635
1654
  created_at: string;
1636
1655
  updated_at: string;
1637
1656
  published_at: string | null;
1638
1657
  state: "DISCARDED" | "DRAFTED" | "PUBLISHED" | "CHANGED";
1639
- viewer_password: string;
1658
+ slug: string | null;
1640
1659
  draft_content: {
1641
1660
  published_at: string | null;
1642
1661
  title: string | null;
@@ -1686,11 +1705,12 @@ export declare const GetReportsIdSchema: {
1686
1705
  };
1687
1706
  } | null, {
1688
1707
  id: string;
1708
+ sequential_id: number;
1689
1709
  created_at: string;
1690
1710
  updated_at: string;
1691
1711
  published_at: string | null;
1692
1712
  state: "DISCARDED" | "DRAFTED" | "PUBLISHED" | "CHANGED";
1693
- viewer_password: string;
1713
+ slug: string | null;
1694
1714
  draft_content: {
1695
1715
  published_at: string | null;
1696
1716
  title: string | null;
@@ -41,6 +41,7 @@ export declare const ReportContentSchema: z.ZodObject<{
41
41
  }, z.core.$strip>;
42
42
  export declare const ReportSchema: z.ZodObject<{
43
43
  id: z.ZodUUID;
44
+ sequential_id: z.ZodInt;
44
45
  created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
45
46
  updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
46
47
  published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -50,7 +51,7 @@ export declare const ReportSchema: z.ZodObject<{
50
51
  PUBLISHED: "PUBLISHED";
51
52
  CHANGED: "CHANGED";
52
53
  }>;
53
- viewer_password: z.ZodString;
54
+ slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
54
55
  draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
55
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>>;
56
57
  title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
@@ -1,2 +1 @@
1
1
  export * from './api';
2
- export * from './legacy';
@@ -282,14 +282,14 @@ export declare const AssemblyDetailSchema: {
282
282
  } | null | undefined>>;
283
283
  }, z.core.$strip>;
284
284
  response: z.ZodObject<{
285
- published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
286
- id: z.ZodUUID;
287
285
  created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
288
286
  updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
287
+ id: z.ZodUUID;
288
+ country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
289
+ published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
289
290
  name: z.ZodString;
290
291
  about: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
291
292
  topics: z.ZodArray<z.ZodString>;
292
- country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
293
293
  hide: z.ZodDefault<z.ZodBoolean>;
294
294
  image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
295
295
  has_image: z.ZodBoolean;
@@ -1,5 +1,6 @@
1
1
  import z from 'zod';
2
- import { AssembliesListSchema, AssemblyDetailSchema, AssemblyOverviewSchema, FeedbackSchema, LogSchema, PatchAccountReportsIdPublishSchema, PinListSchema, PinSchema, PostAccountReportsIdCoverImageSchema, PutAccountReportsIdContentSchema, RegisterSchema, SurveyResponseSchema, SurveySchema } from '../schemas';
2
+ import { PatchAccountReportsIdPublishSchema, PostAccountReportsIdCoverImageSchema, PutAccountReportsIdContentSchema } from '../schemas';
3
+ import { AssembliesListSchema, AssemblyDetailSchema, AssemblyOverviewSchema, FeedbackSchema, LogSchema, PinListSchema, PinSchema, RegisterSchema, SurveyResponseSchema, SurveySchema } from '../schemas/legacy';
3
4
  export type PutAccountReportsIdContentPayload = z.infer<(typeof PutAccountReportsIdContentSchema)['payload']>;
4
5
  export type PublishReportPayload = z.infer<(typeof PatchAccountReportsIdPublishSchema)['payload']>;
5
6
  export type ImageMetadataPayload = z.infer<(typeof PostAccountReportsIdCoverImageSchema)['payload']>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assemblis/contracts",
3
- "version": "0.1.20",
3
+ "version": "0.2.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -16,7 +16,7 @@ export const GetAccountReportsSchema = {
16
16
  endpoint: (): AccountEndpoint => ApiEndpoint.ACCOUNT_REPORTS,
17
17
  method: ApiRestMethod.GET,
18
18
  payload: z.never(),
19
- response: z.object({ reports: ReportSchema.array() })
19
+ response: z.object({ reports: ReportSchema.array(), total: z.int() })
20
20
  };
21
21
 
22
22
  export const GetAccountReportsIdSchema = {
@@ -30,7 +30,10 @@ export const GetAccountReportsIdSchema = {
30
30
  export const PostAccountReportsSchema = {
31
31
  endpoint: (): AccountEndpoint => ApiEndpoint.ACCOUNT_REPORTS,
32
32
  method: ApiRestMethod.POST,
33
- payload: maybe(ReportContentSchema.omit({ cover_image_id: true })),
33
+ payload: z.object({
34
+ sequential_id: z.int(),
35
+ content: maybe(ReportContentSchema.omit({ cover_image_id: true }))
36
+ }),
34
37
  response: ReportSchema
35
38
  };
36
39
 
@@ -61,11 +61,12 @@ export const ReportContentSchema = z.object({
61
61
 
62
62
  export const ReportSchema = z.object({
63
63
  id: z.uuid(),
64
+ sequential_id: z.int(),
64
65
  created_at: isoDateString,
65
66
  updated_at: isoDateString,
66
67
  published_at: maybe(isoDateString),
67
68
  state: z.enum(['DISCARDED', 'DRAFTED', 'PUBLISHED', 'CHANGED']),
68
- viewer_password: z.string(),
69
+ slug: maybe(z.string()),
69
70
  draft_content: maybe(ReportContentSchema),
70
71
  published_content: maybe(ReportContentSchema),
71
72
  media: z.object({ images: ImageSchema.array() })
@@ -1,2 +1 @@
1
1
  export * from './api';
2
- export * from './legacy';
package/src/types/api.ts CHANGED
@@ -1,19 +1,21 @@
1
1
  import z from 'zod';
2
+ import {
3
+ PatchAccountReportsIdPublishSchema,
4
+ PostAccountReportsIdCoverImageSchema,
5
+ PutAccountReportsIdContentSchema
6
+ } from '../schemas';
2
7
  import {
3
8
  AssembliesListSchema,
4
9
  AssemblyDetailSchema,
5
10
  AssemblyOverviewSchema,
6
11
  FeedbackSchema,
7
12
  LogSchema,
8
- PatchAccountReportsIdPublishSchema,
9
13
  PinListSchema,
10
14
  PinSchema,
11
- PostAccountReportsIdCoverImageSchema,
12
- PutAccountReportsIdContentSchema,
13
15
  RegisterSchema,
14
16
  SurveyResponseSchema,
15
17
  SurveySchema
16
- } from '../schemas';
18
+ } from '../schemas/legacy';
17
19
 
18
20
  export type PutAccountReportsIdContentPayload = z.infer<
19
21
  (typeof PutAccountReportsIdContentSchema)['payload']