@assemblis/contracts 1.0.0 → 1.2.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 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)}),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())}),c=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 l=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:c.array(),total:t.int()})},T={endpoint:`${e.ACCOUNT_REPORTS}/:client_id`,method:n.GET,payload:t.never(),response:r(c)},S={endpoint:e.ACCOUNT_REPORTS,method:n.POST,payload:t.object({client_id:t.uuid(),content:r(p.omit({cover_image_id:!0}))}),response:c},h={endpoint:`${e.ACCOUNT_REPORTS}/:client_id/content`,method:n.PUT,payload:p.omit({published_at:!0,cover_image_id:!0}),response:c},b={endpoint:`${e.ACCOUNT_REPORTS}/:client_id/discard`,method:n.PATCH,payload:t.nullish(t.object()),response:r(c)},E={endpoint:`${e.ACCOUNT_REPORTS}/:client_id/publish`,method:n.PATCH,payload:t.object({published_at:o}),response:c},P={endpoint:`${e.ACCOUNT_REPORTS}/:client_id/unpublish`,method:n.PATCH,payload:t.nullish(t.object()),response:c},O={endpoint:`${e.ACCOUNT_REPORTS}/:client_id/cover-image`,method:n.POST,payload:s.pick({alt:!0}),response:c},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:c.array(),total:t.int()})},A={endpoint:`${e.REPORTS}/:slug`,method:n.GET,payload:t.never(),response:r(c)},j={endpoint:e.PINS,method:n.GET,payload:t.never(),response:t.object({assemblies:l.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},D={endpoint:e.PING,method:n.GET,payload:t.never(),response:t.never()},f={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,D 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,S as PostAccountReportsSchema,y as PostInterestAssemblisSchema,R as PostInterestSchema,v as PostLogsErrorSchema,f as PostLogsInfoSchema,I as PostPinSchema,G as PostRegisterSchema,h as PutAccountReportsIdContentSchema,i as ReportState,a as resolvePath};
1
+ import e from"zod";var t,n,o;!function(e){e.ACCOUNT="/account",e.ACCOUNT_REPORTS="/account/reports",e.ADMIN="/admin",e.ADMIN_HEALTHCHECK="/admin/healthcheck",e.ADMIN_PINS="/admin/pins",e.ADMIN_REPORTS="/admin/reports",e.INTEREST="/interest",e.LOGS="/logs",e.PING="/ping",e.PINS="/pins",e.REGISTER="/register",e.REPORTS="/reports"}(t||(t={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH"}(n||(n={})),function(e){e.DISCARDED="DISCARDED",e.DRAFTED="DRAFT",e.PUBLISHED="PUBLISHED",e.CHANGED="CHANGED"}(o||(o={}));const i=e.coerce.date().transform(e=>e.toISOString()),r=e=>e.nullish().transform(e=>e??null);function a(e,t){return Object.keys(t).reduce((e,n)=>e.replace(`:${n}`,t[n]),e)}const s=e.object({id:e.uuid(),created_at:i,updated_at:i,alt:e.string(),srcset:e.string(),width:e.int(),height:e.int()}),d=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),has_assemblis_account:e.boolean().nullish().transform(e=>e??!1)}),p=e.object({published_at:r(i),title:r(e.string()),description:r(e.string()),location:r(e.string()),outputs:r(e.string().array()),initiation_type:r(e.string()),recruitment_method:r(e.string()),recruitment_description:r(e.string()),participant_count:r(e.int()),organiser_reflections:r(e.string()),organiser_report_url:r(e.string()),location_details:r(e.string()),date:r(e.string()),duration:r(e.int()),contact_information_url:r(e.string()),cover_image_id:r(e.string())}),l=e.object({server_id:e.uuid(),client_id:e.uuid(),display_seq:e.int(),created_at:i,updated_at:i,published_at:r(i),state:e.enum(["DISCARDED","DRAFTED","PUBLISHED","CHANGED"]),slug:r(e.string()),draft_content:r(p),published_content:r(p),media:e.object({images:s.array()})});e.object({id:e.uuid(),created_at:i,updated_at:i,sub:e.string(),is_mutirao:e.boolean()});const c=e.object({id:e.uuid(),created_at:i,updated_at:i,image_src:r(e.string()),has_image:e.boolean().meta({deprecated:!0}),user_id:e.uuid().meta({deprecated:!0}),published_at:r(i),name:e.string(),about:r(e.string()),topics:e.string().array(),country:r(e.string()),hide:e.boolean().default(!1)}),m=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:r(e.string()),hide:e.boolean(),image_src:r(e.string()),has_image:e.boolean().meta({deprecated:!0})}),u=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()})}),_=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()})}),g={endpoint:t.ACCOUNT_REPORTS,method:n.GET,payload:e.never(),response:e.object({reports:l.array(),total:e.int()})},T={endpoint:`${t.ACCOUNT_REPORTS}/:client_id`,method:n.GET,payload:e.never(),response:r(l)},h={endpoint:t.ACCOUNT_REPORTS,method:n.POST,payload:e.object({client_id:e.uuid(),content:r(p.omit({cover_image_id:!0}))}),response:l},b={endpoint:`${t.ACCOUNT_REPORTS}/:client_id/content`,method:n.PUT,payload:p.omit({published_at:!0,cover_image_id:!0}),response:l},E={endpoint:`${t.ACCOUNT_REPORTS}/:client_id/discard`,method:n.PATCH,payload:e.nullish(e.object()),response:r(l)},S={endpoint:`${t.ACCOUNT_REPORTS}/:client_id/publish`,method:n.PATCH,payload:e.object({published_at:i}),response:l},P={endpoint:`${t.ACCOUNT_REPORTS}/:client_id/unpublish`,method:n.PATCH,payload:e.nullish(e.object()),response:l},y={endpoint:`${t.ACCOUNT_REPORTS}/:client_id/cover-image`,method:n.POST,payload:s.pick({alt:!0}),response:l},O={endpoint:t.INTEREST,method:n.POST,payload:d,response:e.string()},R={endpoint:`${t.INTEREST}/assemblis`,method:n.POST,payload:d.omit({listIds:!0}),response:e.string()},C={endpoint:t.REPORTS,method:n.GET,payload:e.never(),response:e.object({reports:l.array(),total:e.int()})},A={endpoint:`${t.REPORTS}/:slug`,method:n.GET,payload:e.never(),response:r(l)},I={endpoint:t.PINS,method:n.GET,payload:e.never(),response:e.object({assemblies:c.array(),pins:m.array()})},N={endpoint:t.PINS,method:n.POST,payload:e.object({country:e.string(),email:e.string(),text:r(e.string())}),response:m},D={endpoint:t.ADMIN_REPORTS,method:n.GET,payload:e.never(),response:e.object({reports:l.array(),total:e.int()})},j={endpoint:t.ADMIN_PINS,method:n.GET,payload:e.never(),response:e.object({pins:m.array()})},v={endpoint:`${t.ADMIN_PINS}/:id/hide`,method:n.PATCH,payload:e.never(),response:m},G={endpoint:t.ADMIN_HEALTHCHECK,method:n.GET,payload:e.never(),response:e.object({commit_hash:e.string().nullable(),deployed_at:e.string().nullable(),uptime_ms:e.int().nullable(),checks:e.object({database:e.enum(["ok","error"]),clerk:e.enum(["ok","error"])})})},f={endpoint:t.PING,method:n.GET,payload:e.never(),response:e.never()},H={endpoint:`${t.LOGS}/info`,method:n.POST,payload:u,response:e.string()},U={endpoint:`${t.LOGS}/error`,method:n.POST,payload:u,response:e.string()},$={endpoint:t.REGISTER,method:n.POST,payload:_,response:e.string()};export{t as ApiEndpoint,n as ApiRestMethod,T as GetAccountReportsIdSchema,g as GetAccountReportsSchema,G as GetAdminHealthcheckSchema,j as GetAdminPinsSchema,D as GetAdminReportsSchema,f as GetPingSchema,I as GetPinsSchema,C as GetReportsSchema,A as GetReportsSlugSchema,E as PatchAccountReportsIdDiscardSchema,S as PatchAccountReportsIdPublishSchema,P as PatchAccountReportsIdUnpublishSchema,v as PatchAdminPinHideSchema,y as PostAccountReportsIdCoverImageSchema,h as PostAccountReportsSchema,R as PostInterestAssemblisSchema,O as PostInterestSchema,U as PostLogsErrorSchema,H as PostLogsInfoSchema,N as PostPinSchema,$ as PostRegisterSchema,b as PutAccountReportsIdContentSchema,o as ReportState,a as resolvePath};
@@ -1388,6 +1388,7 @@ export declare const PostInterestSchema: {
1388
1388
  lastname: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | undefined, string | null | undefined>>;
1389
1389
  country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | undefined, string | null | undefined>>;
1390
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>>;
1391
1392
  }, z.core.$strip>;
1392
1393
  response: z.ZodString;
1393
1394
  };
@@ -1401,6 +1402,7 @@ export declare const PostInterestAssemblisSchema: {
1401
1402
  lastname: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | undefined, string | null | undefined>>;
1402
1403
  country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | undefined, string | null | undefined>>;
1403
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>>;
1404
1406
  }, z.core.$strip>;
1405
1407
  response: z.ZodString;
1406
1408
  };
@@ -1839,8 +1841,163 @@ export declare const PostPinSchema: {
1839
1841
  has_image: z.ZodBoolean;
1840
1842
  }, z.core.$strip>;
1841
1843
  };
1842
- export declare const PatchPinHideSchema: {
1843
- endpoint: "/pins/:id/hide";
1844
+ export declare const GetAdminReportsSchema: {
1845
+ endpoint: ApiEndpoint.ADMIN_REPORTS;
1846
+ method: ApiRestMethod;
1847
+ payload: z.ZodNever;
1848
+ response: z.ZodObject<{
1849
+ reports: z.ZodArray<z.ZodObject<{
1850
+ server_id: z.ZodUUID;
1851
+ client_id: z.ZodUUID;
1852
+ display_seq: z.ZodInt;
1853
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1854
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1855
+ published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
1856
+ state: z.ZodEnum<{
1857
+ DISCARDED: "DISCARDED";
1858
+ PUBLISHED: "PUBLISHED";
1859
+ CHANGED: "CHANGED";
1860
+ DRAFTED: "DRAFTED";
1861
+ }>;
1862
+ slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1863
+ draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
1864
+ published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
1865
+ title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1866
+ description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1867
+ location: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1868
+ outputs: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>, z.ZodTransform<string[] | null, string[] | null | undefined>>;
1869
+ initiation_type: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1870
+ recruitment_method: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1871
+ recruitment_description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1872
+ participant_count: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodInt>>, z.ZodTransform<number | null, number | null | undefined>>;
1873
+ organiser_reflections: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1874
+ organiser_report_url: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1875
+ location_details: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1876
+ date: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1877
+ duration: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodInt>>, z.ZodTransform<number | null, number | null | undefined>>;
1878
+ contact_information_url: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1879
+ cover_image_id: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1880
+ }, z.core.$strip>>>, z.ZodTransform<{
1881
+ published_at: string | null;
1882
+ title: string | null;
1883
+ description: string | null;
1884
+ location: string | null;
1885
+ outputs: string[] | null;
1886
+ initiation_type: string | null;
1887
+ recruitment_method: string | null;
1888
+ recruitment_description: string | null;
1889
+ participant_count: number | null;
1890
+ organiser_reflections: string | null;
1891
+ organiser_report_url: string | null;
1892
+ location_details: string | null;
1893
+ date: string | null;
1894
+ duration: number | null;
1895
+ contact_information_url: string | null;
1896
+ cover_image_id: string | null;
1897
+ } | null, {
1898
+ published_at: string | null;
1899
+ title: string | null;
1900
+ description: string | null;
1901
+ location: string | null;
1902
+ outputs: string[] | null;
1903
+ initiation_type: string | null;
1904
+ recruitment_method: string | null;
1905
+ recruitment_description: string | null;
1906
+ participant_count: number | null;
1907
+ organiser_reflections: string | null;
1908
+ organiser_report_url: string | null;
1909
+ location_details: string | null;
1910
+ date: string | null;
1911
+ duration: number | null;
1912
+ contact_information_url: string | null;
1913
+ cover_image_id: string | null;
1914
+ } | null | undefined>>;
1915
+ published_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
1916
+ published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
1917
+ title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1918
+ description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1919
+ location: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1920
+ outputs: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>, z.ZodTransform<string[] | null, string[] | null | undefined>>;
1921
+ initiation_type: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1922
+ recruitment_method: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1923
+ recruitment_description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1924
+ participant_count: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodInt>>, z.ZodTransform<number | null, number | null | undefined>>;
1925
+ organiser_reflections: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1926
+ organiser_report_url: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1927
+ location_details: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1928
+ date: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1929
+ duration: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodInt>>, z.ZodTransform<number | null, number | null | undefined>>;
1930
+ contact_information_url: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1931
+ cover_image_id: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1932
+ }, z.core.$strip>>>, z.ZodTransform<{
1933
+ published_at: string | null;
1934
+ title: string | null;
1935
+ description: string | null;
1936
+ location: string | null;
1937
+ outputs: string[] | null;
1938
+ initiation_type: string | null;
1939
+ recruitment_method: string | null;
1940
+ recruitment_description: string | null;
1941
+ participant_count: number | null;
1942
+ organiser_reflections: string | null;
1943
+ organiser_report_url: string | null;
1944
+ location_details: string | null;
1945
+ date: string | null;
1946
+ duration: number | null;
1947
+ contact_information_url: string | null;
1948
+ cover_image_id: string | null;
1949
+ } | null, {
1950
+ published_at: string | null;
1951
+ title: string | null;
1952
+ description: string | null;
1953
+ location: string | null;
1954
+ outputs: string[] | null;
1955
+ initiation_type: string | null;
1956
+ recruitment_method: string | null;
1957
+ recruitment_description: string | null;
1958
+ participant_count: number | null;
1959
+ organiser_reflections: string | null;
1960
+ organiser_report_url: string | null;
1961
+ location_details: string | null;
1962
+ date: string | null;
1963
+ duration: number | null;
1964
+ contact_information_url: string | null;
1965
+ cover_image_id: string | null;
1966
+ } | null | undefined>>;
1967
+ media: z.ZodObject<{
1968
+ images: z.ZodArray<z.ZodObject<{
1969
+ id: z.ZodUUID;
1970
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1971
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1972
+ alt: z.ZodString;
1973
+ srcset: z.ZodString;
1974
+ width: z.ZodInt;
1975
+ height: z.ZodInt;
1976
+ }, z.core.$strip>>;
1977
+ }, z.core.$strip>;
1978
+ }, z.core.$strip>>;
1979
+ total: z.ZodInt;
1980
+ }, z.core.$strip>;
1981
+ };
1982
+ export declare const GetAdminPinsSchema: {
1983
+ endpoint: ApiEndpoint.ADMIN_PINS;
1984
+ method: ApiRestMethod;
1985
+ payload: z.ZodNever;
1986
+ response: z.ZodObject<{
1987
+ pins: z.ZodArray<z.ZodObject<{
1988
+ id: z.ZodUUID;
1989
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1990
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1991
+ country: z.ZodString;
1992
+ text: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1993
+ hide: z.ZodBoolean;
1994
+ image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1995
+ has_image: z.ZodBoolean;
1996
+ }, z.core.$strip>>;
1997
+ }, z.core.$strip>;
1998
+ };
1999
+ export declare const PatchAdminPinHideSchema: {
2000
+ endpoint: "/admin/pins/:id/hide";
1844
2001
  method: ApiRestMethod;
1845
2002
  payload: z.ZodNever;
1846
2003
  response: z.ZodObject<{
@@ -1854,6 +2011,26 @@ export declare const PatchPinHideSchema: {
1854
2011
  has_image: z.ZodBoolean;
1855
2012
  }, z.core.$strip>;
1856
2013
  };
2014
+ export declare const GetAdminHealthcheckSchema: {
2015
+ endpoint: ApiEndpoint.ADMIN_HEALTHCHECK;
2016
+ method: ApiRestMethod;
2017
+ payload: z.ZodNever;
2018
+ response: z.ZodObject<{
2019
+ commit_hash: z.ZodNullable<z.ZodString>;
2020
+ deployed_at: z.ZodNullable<z.ZodString>;
2021
+ uptime_ms: z.ZodNullable<z.ZodInt>;
2022
+ checks: z.ZodObject<{
2023
+ database: z.ZodEnum<{
2024
+ error: "error";
2025
+ ok: "ok";
2026
+ }>;
2027
+ clerk: z.ZodEnum<{
2028
+ error: "error";
2029
+ ok: "ok";
2030
+ }>;
2031
+ }, z.core.$strip>;
2032
+ }, z.core.$strip>;
2033
+ };
1857
2034
  export declare const GetPingSchema: {
1858
2035
  endpoint: ApiEndpoint.PING;
1859
2036
  method: ApiRestMethod;
@@ -16,6 +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
+ has_assemblis_account: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodBoolean>>, z.ZodTransform<boolean, boolean | null | undefined>>;
19
20
  }, z.core.$strip>;
20
21
  export declare const ReportContentSchema: z.ZodObject<{
21
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>>;
@@ -1,6 +1,10 @@
1
1
  export declare enum ApiEndpoint {
2
2
  ACCOUNT = "/account",
3
3
  ACCOUNT_REPORTS = "/account/reports",
4
+ ADMIN = "/admin",
5
+ ADMIN_HEALTHCHECK = "/admin/healthcheck",
6
+ ADMIN_PINS = "/admin/pins",
7
+ ADMIN_REPORTS = "/admin/reports",
4
8
  INTEREST = "/interest",
5
9
  LOGS = "/logs",
6
10
  PING = "/ping",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assemblis/contracts",
3
- "version": "1.0.0",
3
+ "version": "1.2.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -128,13 +128,47 @@ export const PostPinSchema = {
128
128
  response: PinSchema
129
129
  };
130
130
 
131
- export const PatchPinHideSchema = {
132
- endpoint: `${ApiEndpoint.PINS}/:id/hide` as const,
131
+ export const GetAdminReportsSchema = {
132
+ endpoint: ApiEndpoint.ADMIN_REPORTS as const,
133
+ method: ApiRestMethod.GET,
134
+ payload: z.never(),
135
+ response: z.object({
136
+ reports: ReportSchema.array(),
137
+ total: z.int()
138
+ })
139
+ };
140
+
141
+ export const GetAdminPinsSchema = {
142
+ endpoint: ApiEndpoint.ADMIN_PINS as const,
143
+ method: ApiRestMethod.GET,
144
+ payload: z.never(),
145
+ response: z.object({
146
+ pins: PinSchema.array()
147
+ })
148
+ };
149
+
150
+ export const PatchAdminPinHideSchema = {
151
+ endpoint: `${ApiEndpoint.ADMIN_PINS}/:id/hide` as const,
133
152
  method: ApiRestMethod.PATCH,
134
153
  payload: z.never(),
135
154
  response: PinSchema
136
155
  };
137
156
 
157
+ export const GetAdminHealthcheckSchema = {
158
+ endpoint: ApiEndpoint.ADMIN_HEALTHCHECK as const,
159
+ method: ApiRestMethod.GET,
160
+ payload: z.never(),
161
+ response: z.object({
162
+ commit_hash: z.string().nullable(),
163
+ deployed_at: z.string().nullable(),
164
+ uptime_ms: z.int().nullable(),
165
+ checks: z.object({
166
+ database: z.enum(['ok', 'error']),
167
+ clerk: z.enum(['ok', 'error'])
168
+ })
169
+ })
170
+ };
171
+
138
172
  export const GetPingSchema = {
139
173
  endpoint: ApiEndpoint.PING as const,
140
174
  method: ApiRestMethod.GET,
@@ -33,7 +33,11 @@ export const InterestSchema = z.object({
33
33
  organisation: z
34
34
  .string()
35
35
  .nullish()
36
- .transform((_) => _ ?? undefined)
36
+ .transform((_) => _ ?? undefined),
37
+ has_assemblis_account: z
38
+ .boolean()
39
+ .nullish()
40
+ .transform((_) => _ ?? false)
37
41
  });
38
42
 
39
43
  export const ReportContentSchema = z.object({
@@ -1,6 +1,10 @@
1
1
  export enum ApiEndpoint {
2
2
  ACCOUNT = '/account',
3
3
  ACCOUNT_REPORTS = '/account/reports',
4
+ ADMIN = '/admin',
5
+ ADMIN_HEALTHCHECK = '/admin/healthcheck',
6
+ ADMIN_PINS = '/admin/pins',
7
+ ADMIN_REPORTS = '/admin/reports',
4
8
  INTEREST = '/interest',
5
9
  LOGS = '/logs',
6
10
  PING = '/ping',
@@ -1,603 +0,0 @@
1
- import z from 'zod';
2
- export declare const FeedbackSchema: {
3
- payload: z.ZodObject<{
4
- route: z.ZodString;
5
- text: z.ZodString;
6
- metadata: z.ZodUnknown;
7
- }, z.core.$strip>;
8
- response: z.ZodString;
9
- };
10
- export declare const LogSchema: {
11
- payload: z.ZodObject<{
12
- message: z.ZodOptional<z.ZodString>;
13
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>;
14
- metadata: z.ZodObject<{
15
- origin: z.ZodString;
16
- route: z.ZodString;
17
- status: z.ZodNumber;
18
- }, z.core.$strip>;
19
- }, z.core.$strip>;
20
- response: z.ZodString;
21
- };
22
- export declare const RegisterSchema: {
23
- payload: z.ZodObject<{
24
- type: z.ZodLiteral<"user.created">;
25
- object: z.ZodLiteral<"event">;
26
- data: z.ZodObject<{
27
- id: z.ZodString;
28
- email_addresses: z.ZodArray<z.ZodObject<{
29
- email_address: z.ZodString;
30
- }, z.core.$strip>>;
31
- }, z.core.$strip>;
32
- }, z.core.$strip>;
33
- response: z.ZodString;
34
- };
35
- export declare const SurveySchema: {
36
- payload: z.ZodUndefined;
37
- response: z.ZodObject<{
38
- id: z.ZodUUID;
39
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
40
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
41
- name: z.ZodString;
42
- sections: z.ZodArray<z.ZodObject<{
43
- primary: z.ZodObject<{
44
- id: z.ZodUUID;
45
- text: z.ZodString;
46
- }, z.core.$strip>;
47
- secondary: z.ZodArray<z.ZodObject<{
48
- id: z.ZodUUID;
49
- text: z.ZodString;
50
- }, z.core.$strip>>;
51
- options: z.ZodArray<z.ZodObject<{
52
- label: z.ZodString;
53
- value: z.ZodCoercedNumber<unknown>;
54
- }, z.core.$strip>>;
55
- }, z.core.$strip>>;
56
- }, z.core.$strip>;
57
- };
58
- export declare const SurveyResponseSchema: {
59
- payload: z.ZodObject<{
60
- answers: z.ZodArray<z.ZodObject<{
61
- question_id: z.ZodUUID;
62
- answer_value: z.ZodCoercedNumber<unknown>;
63
- }, z.core.$strip>>;
64
- }, z.core.$strip>;
65
- response: z.ZodObject<{
66
- total: z.ZodNumber;
67
- }, z.core.$strip>;
68
- };
69
- export declare const AssemblyOverviewSchema: {
70
- payload: z.ZodObject<{
71
- published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
72
- name: z.ZodString;
73
- about: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
74
- topics: z.ZodArray<z.ZodString>;
75
- country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
76
- hide: z.ZodDefault<z.ZodBoolean>;
77
- }, z.core.$strip>;
78
- response: z.ZodObject<{
79
- published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
80
- name: z.ZodString;
81
- about: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
82
- topics: z.ZodArray<z.ZodString>;
83
- country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
84
- hide: z.ZodDefault<z.ZodBoolean>;
85
- id: z.ZodUUID;
86
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
87
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
88
- image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
89
- has_image: z.ZodBoolean;
90
- user_id: z.ZodUUID;
91
- }, z.core.$strip>;
92
- };
93
- export declare const AssembliesListSchema: {
94
- payload: z.ZodUndefined;
95
- response: z.ZodObject<{
96
- assemblies: z.ZodArray<z.ZodObject<{
97
- published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
98
- name: z.ZodString;
99
- about: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
100
- topics: z.ZodArray<z.ZodString>;
101
- country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
102
- hide: z.ZodDefault<z.ZodBoolean>;
103
- id: z.ZodUUID;
104
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
105
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
106
- image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
107
- has_image: z.ZodBoolean;
108
- user_id: z.ZodUUID;
109
- }, z.core.$strip>>;
110
- }, z.core.$strip>;
111
- };
112
- export declare const AssemblyDetailSchema: {
113
- payload: z.ZodObject<{
114
- published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
115
- name: z.ZodString;
116
- about: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
117
- topics: z.ZodArray<z.ZodString>;
118
- country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
119
- hide: z.ZodDefault<z.ZodBoolean>;
120
- organisation: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
121
- visible_on_profile: z.ZodBoolean;
122
- name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
123
- description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
124
- type: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
125
- id: z.ZodOptional<z.ZodUUID>;
126
- }, z.core.$strip>>>, z.ZodTransform<{
127
- visible_on_profile: boolean;
128
- name: string | null;
129
- description: string | null;
130
- type: string | null;
131
- id?: string | undefined;
132
- } | null, {
133
- visible_on_profile: boolean;
134
- name: string | null;
135
- description: string | null;
136
- type: string | null;
137
- id?: string | undefined;
138
- } | null | undefined>>;
139
- event_details: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
140
- visible_on_profile: z.ZodBoolean;
141
- registration_link: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
142
- start_date: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
143
- }, z.core.$strip>>>, z.ZodTransform<{
144
- visible_on_profile: boolean;
145
- registration_link: string | null;
146
- start_date: string | null;
147
- } | null, {
148
- visible_on_profile: boolean;
149
- registration_link: string | null;
150
- start_date: string | null;
151
- } | null | undefined>>;
152
- story: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
153
- visible_on_profile: z.ZodBoolean;
154
- background: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
155
- }, z.core.$strip>>>, z.ZodTransform<{
156
- visible_on_profile: boolean;
157
- background: string | null;
158
- } | null, {
159
- visible_on_profile: boolean;
160
- background: string | null;
161
- } | null | undefined>>;
162
- supporters: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
163
- visible_on_profile: z.ZodBoolean;
164
- organisation_types: z.ZodArray<z.ZodString>;
165
- description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
166
- }, z.core.$strip>>>, z.ZodTransform<{
167
- visible_on_profile: boolean;
168
- organisation_types: string[];
169
- description: string | null;
170
- } | null, {
171
- visible_on_profile: boolean;
172
- organisation_types: string[];
173
- description: string | null;
174
- } | null | undefined>>;
175
- funders: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
176
- visible_on_profile: z.ZodBoolean;
177
- organisation_types: z.ZodArray<z.ZodString>;
178
- description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
179
- }, z.core.$strip>>>, z.ZodTransform<{
180
- visible_on_profile: boolean;
181
- organisation_types: string[];
182
- description: string | null;
183
- } | null, {
184
- visible_on_profile: boolean;
185
- organisation_types: string[];
186
- description: string | null;
187
- } | null | undefined>>;
188
- facilitation: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
189
- visible_on_profile: z.ZodBoolean;
190
- decision_method: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
191
- }, z.core.$strip>>>, z.ZodTransform<{
192
- visible_on_profile: boolean;
193
- decision_method: string | null;
194
- } | null, {
195
- visible_on_profile: boolean;
196
- decision_method: string | null;
197
- } | null | undefined>>;
198
- participants: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
199
- visible_on_profile: z.ZodBoolean;
200
- recruitment_method: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
201
- community: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
202
- }, z.core.$strip>>>, z.ZodTransform<{
203
- visible_on_profile: boolean;
204
- recruitment_method: string | null;
205
- community: string | null;
206
- } | null, {
207
- visible_on_profile: boolean;
208
- recruitment_method: string | null;
209
- community: string | null;
210
- } | null | undefined>>;
211
- support: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
212
- visible_on_profile: z.ZodBoolean;
213
- support_options: z.ZodArray<z.ZodString>;
214
- }, z.core.$strip>>>, z.ZodTransform<{
215
- visible_on_profile: boolean;
216
- support_options: string[];
217
- } | null, {
218
- visible_on_profile: boolean;
219
- support_options: string[];
220
- } | null | undefined>>;
221
- action_plan: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
222
- visible_on_profile: z.ZodBoolean;
223
- description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
224
- actions: z.ZodArray<z.ZodObject<{
225
- text: z.ZodString;
226
- agreed: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>, z.ZodTransform<number | null, number | null | undefined>>;
227
- against: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>, z.ZodTransform<number | null, number | null | undefined>>;
228
- abstained: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>, z.ZodTransform<number | null, number | null | undefined>>;
229
- include_in_action_plan: z.ZodDefault<z.ZodBoolean>;
230
- id: z.ZodOptional<z.ZodUUID>;
231
- tasks: z.ZodArray<z.ZodObject<{
232
- text: z.ZodString;
233
- complete: z.ZodDefault<z.ZodBoolean>;
234
- id: z.ZodOptional<z.ZodUUID>;
235
- }, z.core.$strip>>;
236
- updates: z.ZodArray<z.ZodUnknown>;
237
- }, z.core.$strip>>;
238
- updates: z.ZodArray<z.ZodUnknown>;
239
- }, z.core.$strip>>>, z.ZodTransform<{
240
- visible_on_profile: boolean;
241
- description: string | null;
242
- actions: {
243
- text: string;
244
- agreed: number | null;
245
- against: number | null;
246
- abstained: number | null;
247
- include_in_action_plan: boolean;
248
- tasks: {
249
- text: string;
250
- complete: boolean;
251
- id?: string | undefined;
252
- }[];
253
- updates: unknown[];
254
- id?: string | undefined;
255
- }[];
256
- updates: unknown[];
257
- } | null, {
258
- visible_on_profile: boolean;
259
- description: string | null;
260
- actions: {
261
- text: string;
262
- agreed: number | null;
263
- against: number | null;
264
- abstained: number | null;
265
- include_in_action_plan: boolean;
266
- tasks: {
267
- text: string;
268
- complete: boolean;
269
- id?: string | undefined;
270
- }[];
271
- updates: unknown[];
272
- id?: string | undefined;
273
- }[];
274
- updates: unknown[];
275
- } | null | undefined>>;
276
- surveys: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
277
- visible_on_profile: z.ZodBoolean;
278
- }, z.core.$strip>>>, z.ZodTransform<{
279
- visible_on_profile: boolean;
280
- } | null, {
281
- visible_on_profile: boolean;
282
- } | null | undefined>>;
283
- }, z.core.$strip>;
284
- response: z.ZodObject<{
285
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
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>>;
290
- name: z.ZodString;
291
- about: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
292
- topics: z.ZodArray<z.ZodString>;
293
- hide: z.ZodDefault<z.ZodBoolean>;
294
- image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
295
- has_image: z.ZodBoolean;
296
- is_own: z.ZodBoolean;
297
- organisation: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
298
- visible_on_profile: z.ZodBoolean;
299
- name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
300
- description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
301
- type: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
302
- id: z.ZodUUID;
303
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
304
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
305
- }, z.core.$strip>>>, z.ZodTransform<{
306
- visible_on_profile: boolean;
307
- name: string | null;
308
- description: string | null;
309
- type: string | null;
310
- id: string;
311
- created_at: string;
312
- updated_at: string;
313
- } | null, {
314
- visible_on_profile: boolean;
315
- name: string | null;
316
- description: string | null;
317
- type: string | null;
318
- id: string;
319
- created_at: string;
320
- updated_at: string;
321
- } | null | undefined>>;
322
- event_details: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
323
- visible_on_profile: z.ZodBoolean;
324
- registration_link: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
325
- start_date: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
326
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
327
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
328
- }, z.core.$strip>>>, z.ZodTransform<{
329
- visible_on_profile: boolean;
330
- registration_link: string | null;
331
- start_date: string | null;
332
- created_at: string;
333
- updated_at: string;
334
- } | null, {
335
- visible_on_profile: boolean;
336
- registration_link: string | null;
337
- start_date: string | null;
338
- created_at: string;
339
- updated_at: string;
340
- } | null | undefined>>;
341
- story: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
342
- visible_on_profile: z.ZodBoolean;
343
- background: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
344
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
345
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
346
- }, z.core.$strip>>>, z.ZodTransform<{
347
- visible_on_profile: boolean;
348
- background: string | null;
349
- created_at: string;
350
- updated_at: string;
351
- } | null, {
352
- visible_on_profile: boolean;
353
- background: string | null;
354
- created_at: string;
355
- updated_at: string;
356
- } | null | undefined>>;
357
- supporters: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
358
- visible_on_profile: z.ZodBoolean;
359
- organisation_types: z.ZodArray<z.ZodString>;
360
- description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
361
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
362
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
363
- }, z.core.$strip>>>, z.ZodTransform<{
364
- visible_on_profile: boolean;
365
- organisation_types: string[];
366
- description: string | null;
367
- created_at: string;
368
- updated_at: string;
369
- } | null, {
370
- visible_on_profile: boolean;
371
- organisation_types: string[];
372
- description: string | null;
373
- created_at: string;
374
- updated_at: string;
375
- } | null | undefined>>;
376
- funders: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
377
- visible_on_profile: z.ZodBoolean;
378
- organisation_types: z.ZodArray<z.ZodString>;
379
- description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
380
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
381
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
382
- }, z.core.$strip>>>, z.ZodTransform<{
383
- visible_on_profile: boolean;
384
- organisation_types: string[];
385
- description: string | null;
386
- created_at: string;
387
- updated_at: string;
388
- } | null, {
389
- visible_on_profile: boolean;
390
- organisation_types: string[];
391
- description: string | null;
392
- created_at: string;
393
- updated_at: string;
394
- } | null | undefined>>;
395
- facilitation: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
396
- visible_on_profile: z.ZodBoolean;
397
- decision_method: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
398
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
399
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
400
- }, z.core.$strip>>>, z.ZodTransform<{
401
- visible_on_profile: boolean;
402
- decision_method: string | null;
403
- created_at: string;
404
- updated_at: string;
405
- } | null, {
406
- visible_on_profile: boolean;
407
- decision_method: string | null;
408
- created_at: string;
409
- updated_at: string;
410
- } | null | undefined>>;
411
- participants: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
412
- visible_on_profile: z.ZodBoolean;
413
- recruitment_method: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
414
- community: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
415
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
416
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
417
- }, z.core.$strip>>>, z.ZodTransform<{
418
- visible_on_profile: boolean;
419
- recruitment_method: string | null;
420
- community: string | null;
421
- created_at: string;
422
- updated_at: string;
423
- } | null, {
424
- visible_on_profile: boolean;
425
- recruitment_method: string | null;
426
- community: string | null;
427
- created_at: string;
428
- updated_at: string;
429
- } | null | undefined>>;
430
- support: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
431
- visible_on_profile: z.ZodBoolean;
432
- support_options: z.ZodArray<z.ZodString>;
433
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
434
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
435
- }, z.core.$strip>>>, z.ZodTransform<{
436
- visible_on_profile: boolean;
437
- support_options: string[];
438
- created_at: string;
439
- updated_at: string;
440
- } | null, {
441
- visible_on_profile: boolean;
442
- support_options: string[];
443
- created_at: string;
444
- updated_at: string;
445
- } | null | undefined>>;
446
- action_plan: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodIntersection<z.ZodObject<{
447
- visible_on_profile: z.ZodBoolean;
448
- description: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
449
- actions: z.ZodArray<z.ZodObject<{
450
- text: z.ZodString;
451
- agreed: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>, z.ZodTransform<number | null, number | null | undefined>>;
452
- against: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>, z.ZodTransform<number | null, number | null | undefined>>;
453
- abstained: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodCoercedNumber<unknown>>>, z.ZodTransform<number | null, number | null | undefined>>;
454
- include_in_action_plan: z.ZodDefault<z.ZodBoolean>;
455
- id: z.ZodUUID;
456
- tasks: z.ZodArray<z.ZodObject<{
457
- text: z.ZodString;
458
- complete: z.ZodDefault<z.ZodBoolean>;
459
- id: z.ZodUUID;
460
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
461
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
462
- }, z.core.$strip>>;
463
- updates: z.ZodArray<z.ZodUnknown>;
464
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
465
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
466
- }, z.core.$strip>>;
467
- updates: z.ZodArray<z.ZodUnknown>;
468
- }, z.core.$strip>, z.ZodObject<{
469
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
470
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
471
- }, z.core.$strip>>>>, z.ZodTransform<NonNullable<{
472
- visible_on_profile: boolean;
473
- description: string | null;
474
- actions: {
475
- text: string;
476
- agreed: number | null;
477
- against: number | null;
478
- abstained: number | null;
479
- include_in_action_plan: boolean;
480
- id: string;
481
- tasks: {
482
- text: string;
483
- complete: boolean;
484
- id: string;
485
- created_at: string;
486
- updated_at: string;
487
- }[];
488
- updates: unknown[];
489
- created_at: string;
490
- updated_at: string;
491
- }[];
492
- updates: unknown[];
493
- } & {
494
- created_at: string;
495
- updated_at: string;
496
- }> | null, ({
497
- visible_on_profile: boolean;
498
- description: string | null;
499
- actions: {
500
- text: string;
501
- agreed: number | null;
502
- against: number | null;
503
- abstained: number | null;
504
- include_in_action_plan: boolean;
505
- id: string;
506
- tasks: {
507
- text: string;
508
- complete: boolean;
509
- id: string;
510
- created_at: string;
511
- updated_at: string;
512
- }[];
513
- updates: unknown[];
514
- created_at: string;
515
- updated_at: string;
516
- }[];
517
- updates: unknown[];
518
- } & {
519
- created_at: string;
520
- updated_at: string;
521
- }) | null | undefined>>;
522
- surveys: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
523
- visible_on_profile: z.ZodBoolean;
524
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
525
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
526
- data: z.ZodRecord<z.ZodString, z.ZodObject<{
527
- total: z.ZodNumber;
528
- responses: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
529
- label: z.ZodString;
530
- value: z.ZodCoercedNumber<unknown>;
531
- }, z.core.$strip>>>;
532
- }, z.core.$strip>>;
533
- }, z.core.$strip>>>, z.ZodTransform<{
534
- visible_on_profile: boolean;
535
- created_at: string;
536
- updated_at: string;
537
- data: Record<string, {
538
- total: number;
539
- responses: Record<string, {
540
- label: string;
541
- value: number;
542
- }[]>;
543
- }>;
544
- } | null, {
545
- visible_on_profile: boolean;
546
- created_at: string;
547
- updated_at: string;
548
- data: Record<string, {
549
- total: number;
550
- responses: Record<string, {
551
- label: string;
552
- value: number;
553
- }[]>;
554
- }>;
555
- } | null | undefined>>;
556
- }, z.core.$strip>;
557
- };
558
- export declare const PinSchema: {
559
- payload: z.ZodObject<{
560
- country: z.ZodString;
561
- email: z.ZodString;
562
- text: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
563
- }, z.core.$strip>;
564
- response: z.ZodObject<{
565
- id: z.ZodUUID;
566
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
567
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
568
- country: z.ZodString;
569
- text: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
570
- hide: z.ZodBoolean;
571
- image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
572
- has_image: z.ZodBoolean;
573
- }, z.core.$strip>;
574
- };
575
- export declare const PinListSchema: {
576
- payload: z.ZodUndefined;
577
- response: z.ZodObject<{
578
- assemblies: z.ZodArray<z.ZodObject<{
579
- published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
580
- name: z.ZodString;
581
- about: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
582
- topics: z.ZodArray<z.ZodString>;
583
- country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
584
- hide: z.ZodDefault<z.ZodBoolean>;
585
- id: z.ZodUUID;
586
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
587
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
588
- image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
589
- has_image: z.ZodBoolean;
590
- user_id: z.ZodUUID;
591
- }, z.core.$strip>>;
592
- pins: z.ZodArray<z.ZodObject<{
593
- id: z.ZodUUID;
594
- created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
595
- updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
596
- country: z.ZodString;
597
- text: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
598
- hide: z.ZodBoolean;
599
- image_src: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
600
- has_image: z.ZodBoolean;
601
- }, z.core.$strip>>;
602
- }, z.core.$strip>;
603
- };
@@ -1,26 +0,0 @@
1
- import z from 'zod';
2
- import { PatchAccountReportsIdPublishSchema, PostAccountReportsIdCoverImageSchema, PutAccountReportsIdContentSchema, LogSchema, PinListSchema, PinSchema } from '../schemas';
3
- import { AssembliesListSchema, AssemblyDetailSchema, AssemblyOverviewSchema, FeedbackSchema, RegisterSchema, SurveyResponseSchema, SurveySchema } from '../schemas/legacy';
4
- export type PutAccountReportsIdContentPayload = z.infer<(typeof PutAccountReportsIdContentSchema)['payload']>;
5
- export type PublishReportPayload = z.infer<(typeof PatchAccountReportsIdPublishSchema)['payload']>;
6
- export type ImageMetadataPayload = z.infer<(typeof PostAccountReportsIdCoverImageSchema)['payload']>;
7
- export type AssemblyDetailPayload = z.infer<(typeof AssemblyDetailSchema)['payload']>;
8
- export type AssemblyOverviewPayload = z.infer<(typeof AssemblyOverviewSchema)['payload']>;
9
- export type AssembliesListPayload = z.infer<(typeof AssembliesListSchema)['payload']>;
10
- export type FeedbackPayload = z.infer<(typeof FeedbackSchema)['payload']>;
11
- export type LogPayload = z.infer<(typeof LogSchema)['payload']>;
12
- export type PinPayload = z.infer<(typeof PinSchema)['payload']>;
13
- export type PinListPayload = z.infer<(typeof PinListSchema)['payload']>;
14
- export type RegisterPayload = z.infer<(typeof RegisterSchema)['payload']>;
15
- export type SurveyPayload = z.infer<(typeof SurveySchema)['payload']>;
16
- export type SurveyResponsePayload = z.infer<(typeof SurveyResponseSchema)['payload']>;
17
- export type AssemblyDetailResponse = z.infer<(typeof AssemblyDetailSchema)['response']>;
18
- export type AssemblyOverviewResponse = z.infer<(typeof AssemblyOverviewSchema)['response']>;
19
- export type AssembliesListResponse = z.infer<(typeof AssembliesListSchema)['response']>;
20
- export type FeedbackResponse = z.infer<(typeof FeedbackSchema)['response']>;
21
- export type LogResponse = z.infer<(typeof LogSchema)['response']>;
22
- export type PinResponse = z.infer<(typeof PinSchema)['response']>;
23
- export type PinListResponse = z.infer<(typeof PinListSchema)['response']>;
24
- export type RegisterResponse = z.infer<(typeof RegisterSchema)['response']>;
25
- export type SurveyResponse = z.infer<(typeof SurveySchema)['response']>;
26
- export type SurveyResponseResponse = z.infer<(typeof SurveyResponseSchema)['response']>;