@assemblis/contracts 0.2.6 → 1.1.0

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