@assemblis/contracts 1.5.0 → 1.7.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,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.ADMIN_USERS="/admin/users",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()),language:r(e.string().regex(/^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$/)),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()})}),c=l.extend({creator_id:e.uuid()});e.object({id:e.uuid(),created_at:i,updated_at:i,sub:e.string(),is_mutirao:e.boolean()});const u=e.object({id:e.uuid(),sub:e.string(),created_at:i,updated_at:i,report_count:e.int(),email:r(e.string())}),m=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)}),_=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})}),g=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()})}),T=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()})}),h={endpoint:t.ACCOUNT_REPORTS,method:n.GET,payload:e.never(),response:e.object({reports:l.array(),total:e.int()})},b={endpoint:`${t.ACCOUNT_REPORTS}/:client_id`,method:n.GET,payload:e.never(),response:r(l)},S={endpoint:t.ACCOUNT_REPORTS,method:n.POST,payload:e.object({client_id:e.uuid(),content:r(p.omit({cover_image_id:!0}))}),response:l},E={endpoint:`${t.ACCOUNT_REPORTS}/:client_id/content`,method:n.PUT,payload:p.omit({published_at:!0,cover_image_id:!0}),response:l},y={endpoint:`${t.ACCOUNT_REPORTS}/:client_id/discard`,method:n.PATCH,payload:e.nullish(e.object()),response:r(l)},P={endpoint:`${t.ACCOUNT_REPORTS}/:client_id/publish`,method:n.PATCH,payload:e.object({published_at:i}),response:l},R={endpoint:`${t.ACCOUNT_REPORTS}/:client_id/unpublish`,method:n.PATCH,payload:e.nullish(e.object()),response:l},O={endpoint:`${t.ACCOUNT_REPORTS}/:client_id/cover-image`,method:n.POST,payload:s.pick({alt:!0}),response:l},A={endpoint:t.INTEREST,method:n.POST,payload:d,response:e.string()},C={endpoint:`${t.INTEREST}/assemblis`,method:n.POST,payload:d.omit({listIds:!0}),response:e.string()},I={endpoint:t.REPORTS,method:n.GET,payload:e.never(),response:e.object({reports:l.array(),total:e.int()})},N={endpoint:`${t.REPORTS}/:slug`,method:n.GET,payload:e.never(),response:r(l)},D={endpoint:t.PINS,method:n.GET,payload:e.never(),response:e.object({assemblies:m.array(),pins:_.array()})},j={endpoint:t.PINS,method:n.POST,payload:e.object({country:e.string(),email:e.string(),text:r(e.string())}),response:_},v={endpoint:t.ADMIN_REPORTS,method:n.GET,payload:e.never(),response:e.object({reports:c.array(),total:e.int()})},G={endpoint:t.ADMIN_USERS,method:n.GET,payload:e.never(),response:e.object({users:u.array(),total:e.int()})},f={endpoint:t.ADMIN_PINS,method:n.GET,payload:e.never(),response:e.object({pins:_.array()})},H={endpoint:`${t.ADMIN_PINS}/:id/hide`,method:n.PATCH,payload:e.never(),response:_},U={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"])})})},$={endpoint:t.PING,method:n.GET,payload:e.never(),response:e.never()},M={endpoint:`${t.LOGS}/info`,method:n.POST,payload:g,response:e.string()},L={endpoint:`${t.LOGS}/error`,method:n.POST,payload:g,response:e.string()},k={endpoint:t.REGISTER,method:n.POST,payload:T,response:e.string()};export{t as ApiEndpoint,n as ApiRestMethod,b as GetAccountReportsIdSchema,h as GetAccountReportsSchema,U as GetAdminHealthcheckSchema,f as GetAdminPinsSchema,v as GetAdminReportsSchema,G as GetAdminUsersSchema,$ as GetPingSchema,D as GetPinsSchema,I as GetReportsSchema,N as GetReportsSlugSchema,y as PatchAccountReportsIdDiscardSchema,P as PatchAccountReportsIdPublishSchema,R as PatchAccountReportsIdUnpublishSchema,H as PatchAdminPinHideSchema,O as PostAccountReportsIdCoverImageSchema,S as PostAccountReportsSchema,C as PostInterestAssemblisSchema,A as PostInterestSchema,L as PostLogsErrorSchema,M as PostLogsInfoSchema,j as PostPinSchema,k as PostRegisterSchema,E as PutAccountReportsIdContentSchema,o as ReportState,a as resolvePath};
1
+ import e from"zod";var t,n,o;!function(e){e.ACCOUNT="/account",e.ACCOUNT_PROFILE="/account/profile",e.ACCOUNT_REPORTS="/account/reports",e.ADMIN="/admin",e.ADMIN_HEALTHCHECK="/admin/healthcheck",e.ADMIN_PINS="/admin/pins",e.ADMIN_REPORTS="/admin/reports",e.ADMIN_USERS="/admin/users",e.INTEREST="/interest",e.LOGS="/logs",e.PEOPLE="/people",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 r=e.coerce.date().transform(e=>e.toISOString()),i=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:r,updated_at:r,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:i(r),title:i(e.string()),description:i(e.string()),location:i(e.string()),outputs:i(e.string().array()),initiation_type:i(e.string()),recruitment_method:i(e.string()),recruitment_description:i(e.string()),participant_count:i(e.int()),organiser_reflections:i(e.string()),organiser_report_url:i(e.string()),location_details:i(e.string()),date:i(e.string()),duration:i(e.int()),contact_information_url:i(e.string()),language:i(e.string().regex(/^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$/)),cover_image_id:i(e.string())}),l=e.object({server_id:e.uuid(),client_id:e.uuid(),display_seq:e.int(),created_at:r,updated_at:r,published_at:i(r),state:e.enum(["DISCARDED","DRAFTED","PUBLISHED","CHANGED"]),slug:i(e.string()),draft_content:i(p),published_content:i(p),media:e.object({images:s.array()})}),c=l.extend({creator_id:e.uuid()}),u=e.object({url:e.url({protocol:/^https?$/}),title:i(e.string()),platform:i(e.string())}),m=e.object({name:i(e.string()),country:i(e.string()),introduction:i(e.string()),organization:i(e.string()),links:u.array().default([]),show_on_map:e.boolean().default(!1),avatar_image_id:i(e.string())}),_=e.object({server_id:e.uuid(),slug:e.string(),created_at:r,updated_at:r,content:m,media:e.object({images:s.array()})}),g=_.extend({joined_at:r});e.object({id:e.uuid(),created_at:r,updated_at:r,sub:e.string(),is_mutirao:e.boolean()});const T=e.object({id:e.uuid(),sub:e.string(),created_at:r,updated_at:r,report_count:e.int(),email:i(e.string()),profile:i(_)}),E=e.object({id:e.uuid(),created_at:r,updated_at:r,image_src:i(e.string()),has_image:e.boolean().meta({deprecated:!0}),user_id:e.uuid().meta({deprecated:!0}),published_at:i(r),name:e.string(),about:i(e.string()),topics:e.string().array(),country:i(e.string()),hide:e.boolean().default(!1)}),h=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:i(e.string()),hide:e.boolean(),image_src:i(e.string()),has_image:e.boolean().meta({deprecated:!0})}),b=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()})}),S=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()})}),P={endpoint:t.ACCOUNT_REPORTS,method:n.GET,payload:e.never(),response:e.object({reports:l.array(),total:e.int()})},y={endpoint:`${t.ACCOUNT_REPORTS}/:client_id`,method:n.GET,payload:e.never(),response:i(l)},O={endpoint:t.ACCOUNT_REPORTS,method:n.POST,payload:e.object({client_id:e.uuid(),content:i(p.omit({cover_image_id:!0}))}),response:l},R={endpoint:`${t.ACCOUNT_REPORTS}/:client_id/content`,method:n.PUT,payload:p.omit({published_at:!0,cover_image_id:!0}),response:l},C={endpoint:`${t.ACCOUNT_REPORTS}/:client_id/discard`,method:n.PATCH,payload:e.nullish(e.object()),response:i(l)},A={endpoint:`${t.ACCOUNT_REPORTS}/:client_id/publish`,method:n.PATCH,payload:e.object({published_at:r}),response:l},I={endpoint:`${t.ACCOUNT_REPORTS}/:client_id/unpublish`,method:n.PATCH,payload:e.nullish(e.object()),response:l},N={endpoint:`${t.ACCOUNT_REPORTS}/:client_id/cover-image`,method:n.POST,payload:s.pick({alt:!0}),response:l},j=10,D={endpoint:t.ACCOUNT_PROFILE,method:n.GET,payload:e.never(),response:i(_)},v={endpoint:t.ACCOUNT_PROFILE,method:n.PUT,payload:m.omit({avatar_image_id:!0}).extend({links:u.pick({url:!0}).array().max(10).default([])}),response:_},f={endpoint:`${t.ACCOUNT_PROFILE}/avatar`,method:n.POST,payload:s.pick({alt:!0}),response:_},G={endpoint:`${t.PEOPLE}/:slug`,method:n.GET,payload:e.never(),response:i(g)},U={endpoint:t.INTEREST,method:n.POST,payload:d,response:e.string()},H={endpoint:`${t.INTEREST}/assemblis`,method:n.POST,payload:d.omit({listIds:!0}),response:e.string()},$={endpoint:t.REPORTS,method:n.GET,payload:e.never(),response:e.object({reports:l.array(),total:e.int()})},L={endpoint:`${t.REPORTS}/:slug`,method:n.GET,payload:e.never(),response:i(l)},k={endpoint:t.PINS,method:n.GET,payload:e.never(),response:e.object({assemblies:E.array(),pins:h.array()})},M={endpoint:t.PINS,method:n.POST,payload:e.object({country:e.string(),email:e.string(),text:i(e.string())}),response:h},x={endpoint:t.ADMIN_REPORTS,method:n.GET,payload:e.never(),response:e.object({reports:c.array(),total:e.int()})},F={endpoint:t.ADMIN_USERS,method:n.GET,payload:e.never(),response:e.object({users:T.array(),total:e.int()})},z={endpoint:t.ADMIN_PINS,method:n.GET,payload:e.never(),response:e.object({pins:h.array()})},w={endpoint:`${t.ADMIN_PINS}/:id/hide`,method:n.PATCH,payload:e.never(),response:h},B={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"])})})},K={endpoint:t.PING,method:n.GET,payload:e.never(),response:e.never()},q={endpoint:`${t.LOGS}/info`,method:n.POST,payload:b,response:e.string()},Z={endpoint:`${t.LOGS}/error`,method:n.POST,payload:b,response:e.string()},J={endpoint:t.REGISTER,method:n.POST,payload:S,response:e.string()};export{t as ApiEndpoint,n as ApiRestMethod,D as GetAccountProfileSchema,y as GetAccountReportsIdSchema,P as GetAccountReportsSchema,B as GetAdminHealthcheckSchema,z as GetAdminPinsSchema,x as GetAdminReportsSchema,F as GetAdminUsersSchema,G as GetPeopleSlugSchema,K as GetPingSchema,k as GetPinsSchema,$ as GetReportsSchema,L as GetReportsSlugSchema,j as MAX_PROFILE_LINKS,C as PatchAccountReportsIdDiscardSchema,A as PatchAccountReportsIdPublishSchema,I as PatchAccountReportsIdUnpublishSchema,w as PatchAdminPinHideSchema,f as PostAccountProfileAvatarSchema,N as PostAccountReportsIdCoverImageSchema,O as PostAccountReportsSchema,H as PostInterestAssemblisSchema,U as PostInterestSchema,Z as PostLogsErrorSchema,q as PostLogsInfoSchema,M as PostPinSchema,J as PostRegisterSchema,v as PutAccountProfileSchema,R as PutAccountReportsIdContentSchema,o as ReportState,a as resolvePath};
@@ -1437,6 +1437,277 @@ export declare const PostAccountReportsIdCoverImageSchema: {
1437
1437
  }, z.core.$strip>;
1438
1438
  }, z.core.$strip>;
1439
1439
  };
1440
+ export declare const MAX_PROFILE_LINKS = 10;
1441
+ export declare const GetAccountProfileSchema: {
1442
+ endpoint: ApiEndpoint.ACCOUNT_PROFILE;
1443
+ method: ApiRestMethod;
1444
+ payload: z.ZodNever;
1445
+ response: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
1446
+ server_id: z.ZodUUID;
1447
+ slug: z.ZodString;
1448
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1449
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1450
+ content: z.ZodObject<{
1451
+ name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1452
+ country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1453
+ introduction: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1454
+ organization: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1455
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
1456
+ url: z.ZodURL;
1457
+ title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1458
+ platform: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1459
+ }, z.core.$strip>>>;
1460
+ show_on_map: z.ZodDefault<z.ZodBoolean>;
1461
+ avatar_image_id: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1462
+ }, z.core.$strip>;
1463
+ media: z.ZodObject<{
1464
+ images: z.ZodArray<z.ZodObject<{
1465
+ id: z.ZodUUID;
1466
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1467
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1468
+ alt: z.ZodString;
1469
+ srcset: z.ZodString;
1470
+ width: z.ZodInt;
1471
+ height: z.ZodInt;
1472
+ }, z.core.$strip>>;
1473
+ }, z.core.$strip>;
1474
+ }, z.core.$strip>>>, z.ZodTransform<{
1475
+ server_id: string;
1476
+ slug: string;
1477
+ created_at: string;
1478
+ updated_at: string;
1479
+ content: {
1480
+ name: string | null;
1481
+ country: string | null;
1482
+ introduction: string | null;
1483
+ organization: string | null;
1484
+ links: {
1485
+ url: string;
1486
+ title: string | null;
1487
+ platform: string | null;
1488
+ }[];
1489
+ show_on_map: boolean;
1490
+ avatar_image_id: string | null;
1491
+ };
1492
+ media: {
1493
+ images: {
1494
+ id: string;
1495
+ created_at: string;
1496
+ updated_at: string;
1497
+ alt: string;
1498
+ srcset: string;
1499
+ width: number;
1500
+ height: number;
1501
+ }[];
1502
+ };
1503
+ } | null, {
1504
+ server_id: string;
1505
+ slug: string;
1506
+ created_at: string;
1507
+ updated_at: string;
1508
+ content: {
1509
+ name: string | null;
1510
+ country: string | null;
1511
+ introduction: string | null;
1512
+ organization: string | null;
1513
+ links: {
1514
+ url: string;
1515
+ title: string | null;
1516
+ platform: string | null;
1517
+ }[];
1518
+ show_on_map: boolean;
1519
+ avatar_image_id: string | null;
1520
+ };
1521
+ media: {
1522
+ images: {
1523
+ id: string;
1524
+ created_at: string;
1525
+ updated_at: string;
1526
+ alt: string;
1527
+ srcset: string;
1528
+ width: number;
1529
+ height: number;
1530
+ }[];
1531
+ };
1532
+ } | null | undefined>>;
1533
+ };
1534
+ export declare const PutAccountProfileSchema: {
1535
+ endpoint: ApiEndpoint.ACCOUNT_PROFILE;
1536
+ method: ApiRestMethod;
1537
+ payload: z.ZodObject<{
1538
+ country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1539
+ name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1540
+ introduction: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1541
+ organization: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1542
+ show_on_map: z.ZodDefault<z.ZodBoolean>;
1543
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
1544
+ url: z.ZodURL;
1545
+ }, z.core.$strip>>>;
1546
+ }, z.core.$strip>;
1547
+ response: z.ZodObject<{
1548
+ server_id: z.ZodUUID;
1549
+ slug: z.ZodString;
1550
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1551
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1552
+ content: z.ZodObject<{
1553
+ name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1554
+ country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1555
+ introduction: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1556
+ organization: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1557
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
1558
+ url: z.ZodURL;
1559
+ title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1560
+ platform: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1561
+ }, z.core.$strip>>>;
1562
+ show_on_map: z.ZodDefault<z.ZodBoolean>;
1563
+ avatar_image_id: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1564
+ }, z.core.$strip>;
1565
+ media: z.ZodObject<{
1566
+ images: z.ZodArray<z.ZodObject<{
1567
+ id: z.ZodUUID;
1568
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1569
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1570
+ alt: z.ZodString;
1571
+ srcset: z.ZodString;
1572
+ width: z.ZodInt;
1573
+ height: z.ZodInt;
1574
+ }, z.core.$strip>>;
1575
+ }, z.core.$strip>;
1576
+ }, z.core.$strip>;
1577
+ };
1578
+ export declare const PostAccountProfileAvatarSchema: {
1579
+ endpoint: "/account/profile/avatar";
1580
+ method: ApiRestMethod;
1581
+ payload: z.ZodObject<{
1582
+ alt: z.ZodString;
1583
+ }, z.core.$strip>;
1584
+ response: z.ZodObject<{
1585
+ server_id: z.ZodUUID;
1586
+ slug: z.ZodString;
1587
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1588
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1589
+ content: z.ZodObject<{
1590
+ name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1591
+ country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1592
+ introduction: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1593
+ organization: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1594
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
1595
+ url: z.ZodURL;
1596
+ title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1597
+ platform: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1598
+ }, z.core.$strip>>>;
1599
+ show_on_map: z.ZodDefault<z.ZodBoolean>;
1600
+ avatar_image_id: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1601
+ }, z.core.$strip>;
1602
+ media: z.ZodObject<{
1603
+ images: z.ZodArray<z.ZodObject<{
1604
+ id: z.ZodUUID;
1605
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1606
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1607
+ alt: z.ZodString;
1608
+ srcset: z.ZodString;
1609
+ width: z.ZodInt;
1610
+ height: z.ZodInt;
1611
+ }, z.core.$strip>>;
1612
+ }, z.core.$strip>;
1613
+ }, z.core.$strip>;
1614
+ };
1615
+ export declare const GetPeopleSlugSchema: {
1616
+ endpoint: "/people/:slug";
1617
+ method: ApiRestMethod;
1618
+ payload: z.ZodNever;
1619
+ response: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
1620
+ server_id: z.ZodUUID;
1621
+ slug: z.ZodString;
1622
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1623
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1624
+ content: z.ZodObject<{
1625
+ name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1626
+ country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1627
+ introduction: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1628
+ organization: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1629
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
1630
+ url: z.ZodURL;
1631
+ title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1632
+ platform: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1633
+ }, z.core.$strip>>>;
1634
+ show_on_map: z.ZodDefault<z.ZodBoolean>;
1635
+ avatar_image_id: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
1636
+ }, z.core.$strip>;
1637
+ media: z.ZodObject<{
1638
+ images: z.ZodArray<z.ZodObject<{
1639
+ id: z.ZodUUID;
1640
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1641
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1642
+ alt: z.ZodString;
1643
+ srcset: z.ZodString;
1644
+ width: z.ZodInt;
1645
+ height: z.ZodInt;
1646
+ }, z.core.$strip>>;
1647
+ }, z.core.$strip>;
1648
+ joined_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
1649
+ }, z.core.$strip>>>, z.ZodTransform<{
1650
+ server_id: string;
1651
+ slug: string;
1652
+ created_at: string;
1653
+ updated_at: string;
1654
+ content: {
1655
+ name: string | null;
1656
+ country: string | null;
1657
+ introduction: string | null;
1658
+ organization: string | null;
1659
+ links: {
1660
+ url: string;
1661
+ title: string | null;
1662
+ platform: string | null;
1663
+ }[];
1664
+ show_on_map: boolean;
1665
+ avatar_image_id: string | null;
1666
+ };
1667
+ media: {
1668
+ images: {
1669
+ id: string;
1670
+ created_at: string;
1671
+ updated_at: string;
1672
+ alt: string;
1673
+ srcset: string;
1674
+ width: number;
1675
+ height: number;
1676
+ }[];
1677
+ };
1678
+ joined_at: string;
1679
+ } | null, {
1680
+ server_id: string;
1681
+ slug: string;
1682
+ created_at: string;
1683
+ updated_at: string;
1684
+ content: {
1685
+ name: string | null;
1686
+ country: string | null;
1687
+ introduction: string | null;
1688
+ organization: string | null;
1689
+ links: {
1690
+ url: string;
1691
+ title: string | null;
1692
+ platform: string | null;
1693
+ }[];
1694
+ show_on_map: boolean;
1695
+ avatar_image_id: string | null;
1696
+ };
1697
+ media: {
1698
+ images: {
1699
+ id: string;
1700
+ created_at: string;
1701
+ updated_at: string;
1702
+ alt: string;
1703
+ srcset: string;
1704
+ width: number;
1705
+ height: number;
1706
+ }[];
1707
+ };
1708
+ joined_at: string;
1709
+ } | null | undefined>>;
1710
+ };
1440
1711
  export declare const PostInterestSchema: {
1441
1712
  endpoint: ApiEndpoint.INTEREST;
1442
1713
  method: ApiRestMethod;
@@ -2074,6 +2345,94 @@ export declare const GetAdminUsersSchema: {
2074
2345
  updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
2075
2346
  report_count: z.ZodInt;
2076
2347
  email: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
2348
+ profile: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
2349
+ server_id: z.ZodUUID;
2350
+ slug: z.ZodString;
2351
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
2352
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
2353
+ content: z.ZodObject<{
2354
+ name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
2355
+ country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
2356
+ introduction: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
2357
+ organization: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
2358
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
2359
+ url: z.ZodURL;
2360
+ title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
2361
+ platform: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
2362
+ }, z.core.$strip>>>;
2363
+ show_on_map: z.ZodDefault<z.ZodBoolean>;
2364
+ avatar_image_id: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
2365
+ }, z.core.$strip>;
2366
+ media: z.ZodObject<{
2367
+ images: z.ZodArray<z.ZodObject<{
2368
+ id: z.ZodUUID;
2369
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
2370
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
2371
+ alt: z.ZodString;
2372
+ srcset: z.ZodString;
2373
+ width: z.ZodInt;
2374
+ height: z.ZodInt;
2375
+ }, z.core.$strip>>;
2376
+ }, z.core.$strip>;
2377
+ }, z.core.$strip>>>, z.ZodTransform<{
2378
+ server_id: string;
2379
+ slug: string;
2380
+ created_at: string;
2381
+ updated_at: string;
2382
+ content: {
2383
+ name: string | null;
2384
+ country: string | null;
2385
+ introduction: string | null;
2386
+ organization: string | null;
2387
+ links: {
2388
+ url: string;
2389
+ title: string | null;
2390
+ platform: string | null;
2391
+ }[];
2392
+ show_on_map: boolean;
2393
+ avatar_image_id: string | null;
2394
+ };
2395
+ media: {
2396
+ images: {
2397
+ id: string;
2398
+ created_at: string;
2399
+ updated_at: string;
2400
+ alt: string;
2401
+ srcset: string;
2402
+ width: number;
2403
+ height: number;
2404
+ }[];
2405
+ };
2406
+ } | null, {
2407
+ server_id: string;
2408
+ slug: string;
2409
+ created_at: string;
2410
+ updated_at: string;
2411
+ content: {
2412
+ name: string | null;
2413
+ country: string | null;
2414
+ introduction: string | null;
2415
+ organization: string | null;
2416
+ links: {
2417
+ url: string;
2418
+ title: string | null;
2419
+ platform: string | null;
2420
+ }[];
2421
+ show_on_map: boolean;
2422
+ avatar_image_id: string | null;
2423
+ };
2424
+ media: {
2425
+ images: {
2426
+ id: string;
2427
+ created_at: string;
2428
+ updated_at: string;
2429
+ alt: string;
2430
+ srcset: string;
2431
+ width: number;
2432
+ height: number;
2433
+ }[];
2434
+ };
2435
+ } | null | undefined>>;
2077
2436
  }, z.core.$strip>>;
2078
2437
  total: z.ZodInt;
2079
2438
  }, z.core.$strip>;
@@ -310,6 +310,85 @@ export declare const AdminReportSchema: z.ZodObject<{
310
310
  }, z.core.$strip>;
311
311
  creator_id: z.ZodUUID;
312
312
  }, z.core.$strip>;
313
+ export declare const ProfileLinkSchema: z.ZodObject<{
314
+ url: z.ZodURL;
315
+ title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
316
+ platform: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
317
+ }, z.core.$strip>;
318
+ export declare const ProfileContentSchema: z.ZodObject<{
319
+ name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
320
+ country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
321
+ introduction: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
322
+ organization: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
323
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
324
+ url: z.ZodURL;
325
+ title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
326
+ platform: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
327
+ }, z.core.$strip>>>;
328
+ show_on_map: z.ZodDefault<z.ZodBoolean>;
329
+ avatar_image_id: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
330
+ }, z.core.$strip>;
331
+ export declare const ProfileSchema: z.ZodObject<{
332
+ server_id: z.ZodUUID;
333
+ slug: z.ZodString;
334
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
335
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
336
+ content: z.ZodObject<{
337
+ name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
338
+ country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
339
+ introduction: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
340
+ organization: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
341
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
342
+ url: z.ZodURL;
343
+ title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
344
+ platform: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
345
+ }, z.core.$strip>>>;
346
+ show_on_map: z.ZodDefault<z.ZodBoolean>;
347
+ avatar_image_id: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
348
+ }, z.core.$strip>;
349
+ media: z.ZodObject<{
350
+ images: z.ZodArray<z.ZodObject<{
351
+ id: z.ZodUUID;
352
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
353
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
354
+ alt: z.ZodString;
355
+ srcset: z.ZodString;
356
+ width: z.ZodInt;
357
+ height: z.ZodInt;
358
+ }, z.core.$strip>>;
359
+ }, z.core.$strip>;
360
+ }, z.core.$strip>;
361
+ export declare const PublicProfileSchema: z.ZodObject<{
362
+ server_id: z.ZodUUID;
363
+ slug: z.ZodString;
364
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
365
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
366
+ content: z.ZodObject<{
367
+ name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
368
+ country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
369
+ introduction: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
370
+ organization: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
371
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
372
+ url: z.ZodURL;
373
+ title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
374
+ platform: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
375
+ }, z.core.$strip>>>;
376
+ show_on_map: z.ZodDefault<z.ZodBoolean>;
377
+ avatar_image_id: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
378
+ }, z.core.$strip>;
379
+ media: z.ZodObject<{
380
+ images: z.ZodArray<z.ZodObject<{
381
+ id: z.ZodUUID;
382
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
383
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
384
+ alt: z.ZodString;
385
+ srcset: z.ZodString;
386
+ width: z.ZodInt;
387
+ height: z.ZodInt;
388
+ }, z.core.$strip>>;
389
+ }, z.core.$strip>;
390
+ joined_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
391
+ }, z.core.$strip>;
313
392
  export declare const UserSchema: z.ZodObject<{
314
393
  id: z.ZodUUID;
315
394
  created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
@@ -324,6 +403,94 @@ export declare const AdminUserSchema: z.ZodObject<{
324
403
  updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
325
404
  report_count: z.ZodInt;
326
405
  email: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
406
+ profile: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
407
+ server_id: z.ZodUUID;
408
+ slug: z.ZodString;
409
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
410
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
411
+ content: z.ZodObject<{
412
+ name: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
413
+ country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
414
+ introduction: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
415
+ organization: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
416
+ links: z.ZodDefault<z.ZodArray<z.ZodObject<{
417
+ url: z.ZodURL;
418
+ title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
419
+ platform: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
420
+ }, z.core.$strip>>>;
421
+ show_on_map: z.ZodDefault<z.ZodBoolean>;
422
+ avatar_image_id: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
423
+ }, z.core.$strip>;
424
+ media: z.ZodObject<{
425
+ images: z.ZodArray<z.ZodObject<{
426
+ id: z.ZodUUID;
427
+ created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
428
+ updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
429
+ alt: z.ZodString;
430
+ srcset: z.ZodString;
431
+ width: z.ZodInt;
432
+ height: z.ZodInt;
433
+ }, z.core.$strip>>;
434
+ }, z.core.$strip>;
435
+ }, z.core.$strip>>>, z.ZodTransform<{
436
+ server_id: string;
437
+ slug: string;
438
+ created_at: string;
439
+ updated_at: string;
440
+ content: {
441
+ name: string | null;
442
+ country: string | null;
443
+ introduction: string | null;
444
+ organization: string | null;
445
+ links: {
446
+ url: string;
447
+ title: string | null;
448
+ platform: string | null;
449
+ }[];
450
+ show_on_map: boolean;
451
+ avatar_image_id: string | null;
452
+ };
453
+ media: {
454
+ images: {
455
+ id: string;
456
+ created_at: string;
457
+ updated_at: string;
458
+ alt: string;
459
+ srcset: string;
460
+ width: number;
461
+ height: number;
462
+ }[];
463
+ };
464
+ } | null, {
465
+ server_id: string;
466
+ slug: string;
467
+ created_at: string;
468
+ updated_at: string;
469
+ content: {
470
+ name: string | null;
471
+ country: string | null;
472
+ introduction: string | null;
473
+ organization: string | null;
474
+ links: {
475
+ url: string;
476
+ title: string | null;
477
+ platform: string | null;
478
+ }[];
479
+ show_on_map: boolean;
480
+ avatar_image_id: string | null;
481
+ };
482
+ media: {
483
+ images: {
484
+ id: string;
485
+ created_at: string;
486
+ updated_at: string;
487
+ alt: string;
488
+ srcset: string;
489
+ width: number;
490
+ height: number;
491
+ }[];
492
+ };
493
+ } | null | undefined>>;
327
494
  }, z.core.$strip>;
328
495
  export declare const AssemblySchema: z.ZodObject<{
329
496
  id: z.ZodUUID;
@@ -1,5 +1,6 @@
1
1
  export declare enum ApiEndpoint {
2
2
  ACCOUNT = "/account",
3
+ ACCOUNT_PROFILE = "/account/profile",
3
4
  ACCOUNT_REPORTS = "/account/reports",
4
5
  ADMIN = "/admin",
5
6
  ADMIN_HEALTHCHECK = "/admin/healthcheck",
@@ -8,6 +9,7 @@ export declare enum ApiEndpoint {
8
9
  ADMIN_USERS = "/admin/users",
9
10
  INTEREST = "/interest",
10
11
  LOGS = "/logs",
12
+ PEOPLE = "/people",
11
13
  PING = "/ping",
12
14
  PINS = "/pins",
13
15
  REGISTER = "/register",
@@ -1,9 +1,13 @@
1
1
  import z from 'zod';
2
- import { AdminReportSchema, AdminUserSchema, ImageSchema, PinSchema, ReportContentSchema, ReportSchema, UserSchema } from '../schemas/base';
2
+ import { AdminReportSchema, AdminUserSchema, ImageSchema, PinSchema, ProfileContentSchema, ProfileLinkSchema, ProfileSchema, PublicProfileSchema, ReportContentSchema, ReportSchema, UserSchema } from '../schemas/base';
3
3
  export type AdminReport = z.infer<typeof AdminReportSchema>;
4
4
  export type AdminUser = z.infer<typeof AdminUserSchema>;
5
5
  export type Image = z.infer<typeof ImageSchema>;
6
6
  export type Pin = z.infer<typeof PinSchema>;
7
+ export type Profile = z.infer<typeof ProfileSchema>;
8
+ export type ProfileContent = z.infer<typeof ProfileContentSchema>;
9
+ export type ProfileLink = z.infer<typeof ProfileLinkSchema>;
10
+ export type PublicProfile = z.infer<typeof PublicProfileSchema>;
7
11
  export type Report = z.infer<typeof ReportSchema>;
8
12
  export type ReportContent = z.infer<typeof ReportContentSchema>;
9
13
  export type User = z.infer<typeof UserSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assemblis/contracts",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -10,6 +10,10 @@ import {
10
10
  InterestSchema,
11
11
  LogSchema,
12
12
  PinSchema,
13
+ ProfileContentSchema,
14
+ ProfileLinkSchema,
15
+ ProfileSchema,
16
+ PublicProfileSchema,
13
17
  RegisterSchema,
14
18
  ReportContentSchema,
15
19
  ReportSchema
@@ -78,6 +82,41 @@ export const PostAccountReportsIdCoverImageSchema = {
78
82
  response: ReportSchema
79
83
  };
80
84
 
85
+ export const MAX_PROFILE_LINKS = 10;
86
+
87
+ export const GetAccountProfileSchema = {
88
+ endpoint: ApiEndpoint.ACCOUNT_PROFILE as const,
89
+ method: ApiRestMethod.GET,
90
+ payload: z.never(),
91
+ response: maybe(ProfileSchema)
92
+ };
93
+
94
+ export const PutAccountProfileSchema = {
95
+ endpoint: ApiEndpoint.ACCOUNT_PROFILE as const,
96
+ method: ApiRestMethod.PUT,
97
+ payload: ProfileContentSchema.omit({ avatar_image_id: true }).extend({
98
+ links: ProfileLinkSchema.pick({ url: true })
99
+ .array()
100
+ .max(MAX_PROFILE_LINKS)
101
+ .default([])
102
+ }),
103
+ response: ProfileSchema
104
+ };
105
+
106
+ export const PostAccountProfileAvatarSchema = {
107
+ endpoint: `${ApiEndpoint.ACCOUNT_PROFILE}/avatar` as const,
108
+ method: ApiRestMethod.POST,
109
+ payload: ImageSchema.pick({ alt: true }),
110
+ response: ProfileSchema
111
+ };
112
+
113
+ export const GetPeopleSlugSchema = {
114
+ endpoint: `${ApiEndpoint.PEOPLE}/:slug` as const,
115
+ method: ApiRestMethod.GET,
116
+ payload: z.never(),
117
+ response: maybe(PublicProfileSchema)
118
+ };
119
+
81
120
  export const PostInterestSchema = {
82
121
  endpoint: ApiEndpoint.INTEREST as const,
83
122
  method: ApiRestMethod.POST,
@@ -78,6 +78,35 @@ export const AdminReportSchema = ReportSchema.extend({
78
78
  creator_id: z.uuid()
79
79
  });
80
80
 
81
+ export const ProfileLinkSchema = z.object({
82
+ url: z.url({ protocol: /^https?$/ }),
83
+ title: maybe(z.string()),
84
+ platform: maybe(z.string())
85
+ });
86
+
87
+ export const ProfileContentSchema = z.object({
88
+ name: maybe(z.string()),
89
+ country: maybe(z.string()),
90
+ introduction: maybe(z.string()),
91
+ organization: maybe(z.string()),
92
+ links: ProfileLinkSchema.array().default([]),
93
+ show_on_map: z.boolean().default(false),
94
+ avatar_image_id: maybe(z.string())
95
+ });
96
+
97
+ export const ProfileSchema = z.object({
98
+ server_id: z.uuid(),
99
+ slug: z.string(),
100
+ created_at: isoDateString,
101
+ updated_at: isoDateString,
102
+ content: ProfileContentSchema,
103
+ media: z.object({ images: ImageSchema.array() })
104
+ });
105
+
106
+ export const PublicProfileSchema = ProfileSchema.extend({
107
+ joined_at: isoDateString
108
+ });
109
+
81
110
  export const UserSchema = z.object({
82
111
  id: z.uuid(),
83
112
  created_at: isoDateString,
@@ -92,7 +121,8 @@ export const AdminUserSchema = z.object({
92
121
  created_at: isoDateString,
93
122
  updated_at: isoDateString,
94
123
  report_count: z.int(),
95
- email: maybe(z.string())
124
+ email: maybe(z.string()),
125
+ profile: maybe(ProfileSchema)
96
126
  });
97
127
 
98
128
  // Pins
@@ -1,5 +1,6 @@
1
1
  export enum ApiEndpoint {
2
2
  ACCOUNT = '/account',
3
+ ACCOUNT_PROFILE = '/account/profile',
3
4
  ACCOUNT_REPORTS = '/account/reports',
4
5
  ADMIN = '/admin',
5
6
  ADMIN_HEALTHCHECK = '/admin/healthcheck',
@@ -8,6 +9,7 @@ export enum ApiEndpoint {
8
9
  ADMIN_USERS = '/admin/users',
9
10
  INTEREST = '/interest',
10
11
  LOGS = '/logs',
12
+ PEOPLE = '/people',
11
13
  PING = '/ping',
12
14
  PINS = '/pins',
13
15
  REGISTER = '/register',
@@ -5,6 +5,10 @@ import {
5
5
  AdminUserSchema,
6
6
  ImageSchema,
7
7
  PinSchema,
8
+ ProfileContentSchema,
9
+ ProfileLinkSchema,
10
+ ProfileSchema,
11
+ PublicProfileSchema,
8
12
  ReportContentSchema,
9
13
  ReportSchema,
10
14
  UserSchema
@@ -14,6 +18,10 @@ export type AdminReport = z.infer<typeof AdminReportSchema>;
14
18
  export type AdminUser = z.infer<typeof AdminUserSchema>;
15
19
  export type Image = z.infer<typeof ImageSchema>;
16
20
  export type Pin = z.infer<typeof PinSchema>;
21
+ export type Profile = z.infer<typeof ProfileSchema>;
22
+ export type ProfileContent = z.infer<typeof ProfileContentSchema>;
23
+ export type ProfileLink = z.infer<typeof ProfileLinkSchema>;
24
+ export type PublicProfile = z.infer<typeof PublicProfileSchema>;
17
25
  export type Report = z.infer<typeof ReportSchema>;
18
26
  export type ReportContent = z.infer<typeof ReportContentSchema>;
19
27
  export type User = z.infer<typeof UserSchema>;