@assemblis/contracts 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/schemas/api.d.ts +64 -32
- package/dist/schemas/base.d.ts +4 -2
- package/package.json +1 -1
- package/src/schemas/base.ts +4 -2
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"zod";var t,a,n,r,o;!function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH"}(t||(t={})),function(e){e.ID=":ID",e.NAME=":NAME"}(a||(a={})),function(e){e.ACCOUNT_REPORTS="/account/reports",e.ASSEMBLIES="/assemblies",e.FEEDBACK="/feedback",e.INTEREST="/interest",e.INTEREST_ASSEMBLIS="/interest/assemblis",e.LOGS="/logs",e.PINS="/pins",e.REPORTS="/reports",e.SURVEYS="/surveys",e.SURVEY_RESPONSES="/assemblies/:ID/survey-responses/:NAME"}(n||(n={})),function(e){e.DISCARDED="DISCARDED",e.DRAFTED="DRAFT",e.PUBLISHED="PUBLISHED",e.CHANGED="CHANGED"}(r||(r={})),function(e){e.DELIBERATION="deliberation",e.DEMOGRAPHIC_DATA="demographic-data",e.PRE_ASSEMBLY="pre-assembly",e.POST_ASSEMBLY="post-assembly"}(o||(o={}));const i=e.coerce.date().transform(e=>e.toISOString()),s=e=>e.nullish().transform(e=>e??null),d=e.object({id:e.uuid(),created_at:i,updated_at:i,alt:e.string(),srcset:e.string(),width:e.int(),height:e.int()}),c=e.object({recaptcha_token:e.string(),email:e.email().toLowerCase().trim(),listIds:e.int().array(),firstname:e.string().nullish().transform(e=>e??void 0),lastname:e.string().nullish().transform(e=>e??void 0),country:e.string().nullish().transform(e=>e??void 0),organisation:e.string().nullish().transform(e=>e??void 0)}),p=e.object({label:e.string(),value:e.coerce.number().int()}),l=e.object({published_at:s(i),title:s(e.string()),description:s(e.string()),location:s(e.string()),outputs:s(e.string().array()),initiation_type:s(e.string()),recruitment_method:s(e.string()),recruitment_description:s(e.string()),participant_count:s(e.int()),organiser_reflections:s(e.string()),organiser_report_url:s(e.string()),location_details:s(e.string()),date:s(e.string()),duration:s(e.int()),contact_information_url:s(e.string()),cover_image_id:s(e.string())}),u=e.object({
|
|
1
|
+
import e from"zod";var t,a,n,r,o;!function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH"}(t||(t={})),function(e){e.ID=":ID",e.NAME=":NAME"}(a||(a={})),function(e){e.ACCOUNT_REPORTS="/account/reports",e.ASSEMBLIES="/assemblies",e.FEEDBACK="/feedback",e.INTEREST="/interest",e.INTEREST_ASSEMBLIS="/interest/assemblis",e.LOGS="/logs",e.PINS="/pins",e.REPORTS="/reports",e.SURVEYS="/surveys",e.SURVEY_RESPONSES="/assemblies/:ID/survey-responses/:NAME"}(n||(n={})),function(e){e.DISCARDED="DISCARDED",e.DRAFTED="DRAFT",e.PUBLISHED="PUBLISHED",e.CHANGED="CHANGED"}(r||(r={})),function(e){e.DELIBERATION="deliberation",e.DEMOGRAPHIC_DATA="demographic-data",e.PRE_ASSEMBLY="pre-assembly",e.POST_ASSEMBLY="post-assembly"}(o||(o={}));const i=e.coerce.date().transform(e=>e.toISOString()),s=e=>e.nullish().transform(e=>e??null),d=e.object({id:e.uuid(),created_at:i,updated_at:i,alt:e.string(),srcset:e.string(),width:e.int(),height:e.int()}),c=e.object({recaptcha_token:e.string(),email:e.email().toLowerCase().trim(),listIds:e.int().array(),firstname:e.string().nullish().transform(e=>e??void 0),lastname:e.string().nullish().transform(e=>e??void 0),country:e.string().nullish().transform(e=>e??void 0),organisation:e.string().nullish().transform(e=>e??void 0)}),p=e.object({label:e.string(),value:e.coerce.number().int()}),l=e.object({published_at:s(i),title:s(e.string()),description:s(e.string()),location:s(e.string()),outputs:s(e.string().array()),initiation_type:s(e.string()),recruitment_method:s(e.string()),recruitment_description:s(e.string()),participant_count:s(e.int()),organiser_reflections:s(e.string()),organiser_report_url:s(e.string()),location_details:s(e.string()),date:s(e.string()),duration:s(e.int()),contact_information_url:s(e.string()),cover_image_id:s(e.string())}),u=e.object({server_id:e.uuid(),client_id:e.uuid(),display_seq:e.int(),created_at:i,updated_at:i,published_at:s(i),state:e.enum(["DISCARDED","DRAFTED","PUBLISHED","CHANGED"]),slug:s(e.string()),draft_content:s(l),published_content:s(l),media:e.object({images:d.array()})});e.object({id:e.uuid(),created_at:i,updated_at:i,sub:e.string(),is_mutirao:e.boolean()});const _={endpoint:()=>n.ACCOUNT_REPORTS,method:t.GET,payload:e.never(),response:e.object({reports:u.array(),total:e.int()})},b={endpoint:e=>`${n.ACCOUNT_REPORTS}/${e}`,method:t.GET,payload:e.never(),response:s(u)},g={endpoint:()=>n.ACCOUNT_REPORTS,method:t.POST,payload:e.object({client_id:e.uuid(),content:s(l.omit({cover_image_id:!0}))}),response:u},m={endpoint:e=>`${n.ACCOUNT_REPORTS}/${e}/content`,method:t.PUT,payload:l.omit({published_at:!0,cover_image_id:!0}),response:u},y={endpoint:e=>`${n.ACCOUNT_REPORTS}/${e}/discard`,method:t.PATCH,payload:e.nullish(e.object()),response:s(u)},S={endpoint:e=>`${n.ACCOUNT_REPORTS}/${e}/publish`,method:t.PATCH,payload:e.object({published_at:i}),response:u},E={endpoint:e=>`${n.ACCOUNT_REPORTS}/${e}/unpublish`,method:t.PATCH,payload:e.nullish(e.object()),response:u},T={endpoint:e=>`${n.ACCOUNT_REPORTS}/${e}/cover-image`,method:t.POST,payload:d.pick({alt:!0}),response:u},f={endpoint:()=>n.INTEREST,method:t.POST,payload:c,response:e.string()},j={endpoint:()=>n.REPORTS,method:t.GET,payload:e.never(),response:e.object({reports:u.array()})},O={endpoint:e=>`${n.REPORTS}/${e}`,method:t.GET,payload:e.never(),response:s(u)},R={payload:e.object({route:e.string(),text:e.string(),metadata:e.unknown()}),response:e.string()},h={payload:e.object({message:e.string().optional(),data:e.record(e.string(),e.string().optional()).optional(),metadata:e.object({origin:e.string(),route:e.string(),status:e.number()})}),response:e.string()},A={payload:e.object({type:e.literal("user.created"),object:e.literal("event"),data:e.object({id:e.string(),email_addresses:e.object({email_address:e.string()}).array()})}),response:e.string()},v=e.object({id:e.uuid(),text:e.string()}),P={payload:e.undefined(),response:e.object({id:e.uuid(),created_at:i,updated_at:i,name:e.string(),sections:e.object({primary:v,secondary:v.array(),options:p.array()}).array()})},C={payload:e.object({answers:e.object({question_id:e.uuid(),answer_value:e.coerce.number().int()}).array()}),response:e.object({total:e.number().int()})},I=e.object({visible_on_profile:e.boolean(),description:s(e.string())}),x=e.object({text:e.string(),agreed:s(e.coerce.number().int()),against:s(e.coerce.number().int()),abstained:s(e.coerce.number().int()),include_in_action_plan:e.boolean().default(!0),assembly_id:e.uuid()}),D=e.object({text:e.string(),complete:e.boolean().default(!1),action_id:e.uuid(),assembly_id:e.uuid()}),N=e.object({published_at:s(i),name:e.string(),about:s(e.string()),topics:e.string().array(),country:s(e.string()),hide:e.boolean().default(!1)}),U={payload:N,response:N.extend({id:e.uuid(),created_at:i,updated_at:i,image_src:s(e.string()),has_image:e.boolean().meta({deprecated:!0}),user_id:e.uuid().meta({deprecated:!0})})},$={payload:e.undefined(),response:e.object({assemblies:U.response.array()})},k=e.object({visible_on_profile:e.boolean(),name:s(e.string()),description:s(e.string()),type:s(e.string())}),H=e.object({visible_on_profile:e.boolean(),registration_link:s(e.string()),start_date:s(i)}),G=e.object({visible_on_profile:e.boolean(),background:s(e.string())}),w=e.object({visible_on_profile:e.boolean(),organisation_types:e.string().array(),description:s(e.string())}),L=e.object({visible_on_profile:e.boolean(),organisation_types:e.string().array(),description:s(e.string())}),B=e.object({visible_on_profile:e.boolean(),decision_method:s(e.string())}),M=e.object({visible_on_profile:e.boolean(),recruitment_method:s(e.string()),community:s(e.string())}),F=e.object({visible_on_profile:e.boolean(),support_options:e.string().array()}),Y=e.object({visible_on_profile:e.boolean()}),q={payload:U.payload.extend({organisation:s(k.extend({id:e.uuid().optional()})),event_details:s(H),story:s(G),supporters:s(w),funders:s(L),facilitation:s(B),participants:s(M),support:s(F),action_plan:s(I.extend({actions:x.omit({assembly_id:!0}).extend({id:e.uuid().optional(),tasks:D.omit({action_id:!0,assembly_id:!0}).extend({id:e.uuid().optional()}).array(),updates:e.unknown().array()}).array(),updates:e.unknown().array()})),surveys:s(Y)}),response:U.response.omit({user_id:!0}).extend({is_own:e.boolean(),organisation:s(k.extend({id:e.uuid(),created_at:i,updated_at:i})),event_details:s(H.extend({created_at:i,updated_at:i})),story:s(G.extend({created_at:i,updated_at:i})),supporters:s(w.extend({created_at:i,updated_at:i})),funders:s(L.extend({created_at:i,updated_at:i})),facilitation:s(B.extend({created_at:i,updated_at:i})),participants:s(M.extend({created_at:i,updated_at:i})),support:s(F.extend({created_at:i,updated_at:i})),action_plan:s(I.extend({actions:x.omit({assembly_id:!0}).extend({id:e.uuid(),created_at:i,updated_at:e.coerce.date().transform(e=>e.toISOString()),tasks:D.omit({action_id:!0,assembly_id:!0}).extend({id:e.uuid(),created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString())}).array(),updates:e.unknown().array()}).extend({created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString())}).array(),updates:e.unknown().array()}).and(e.object({created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString())}))),surveys:s(Y.extend({created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString())}).extend({data:e.record(e.string(),e.object({total:e.number().int(),responses:e.record(e.string(),p.array())}))}))})},V={payload:e.object({country:e.string(),email:e.string(),text:s(e.string())}),response:e.object({id:e.uuid(),created_at:e.coerce.date().transform(e=>e.toISOString()),updated_at:e.coerce.date().transform(e=>e.toISOString()),country:e.string(),text:s(e.string()),hide:e.boolean(),image_src:s(e.string()),has_image:e.boolean().meta({deprecated:!0})})},z={payload:e.undefined(),response:e.object({assemblies:U.response.array(),pins:V.response.array()})};export{n as ApiEndpoint,t as ApiRestMethod,a as ApiRouteParameter,$ as AssembliesListSchema,q as AssemblyDetailSchema,U as AssemblyOverviewSchema,R as FeedbackSchema,b as GetAccountReportsIdSchema,_ as GetAccountReportsSchema,O as GetReportsIdSchema,j as GetReportsSchema,h as LogSchema,y as PatchAccountReportsIdDiscardSchema,S as PatchAccountReportsIdPublishSchema,E as PatchAccountReportsIdUnpublishSchema,z as PinListSchema,V as PinSchema,T as PostAccountReportsIdCoverImageSchema,g as PostAccountReportsSchema,f as PostInterestSchema,m as PutAccountReportsIdContentSchema,A as RegisterSchema,r as ReportState,o as SurveyName,C as SurveyResponseSchema,P as SurveySchema};
|
package/dist/schemas/api.d.ts
CHANGED
|
@@ -7,7 +7,9 @@ export declare const GetAccountReportsSchema: {
|
|
|
7
7
|
payload: z.ZodNever;
|
|
8
8
|
response: z.ZodObject<{
|
|
9
9
|
reports: z.ZodArray<z.ZodObject<{
|
|
10
|
-
|
|
10
|
+
server_id: z.ZodUUID;
|
|
11
|
+
client_id: z.ZodUUID;
|
|
12
|
+
display_seq: z.ZodInt;
|
|
11
13
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
12
14
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
13
15
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -17,7 +19,7 @@ export declare const GetAccountReportsSchema: {
|
|
|
17
19
|
PUBLISHED: "PUBLISHED";
|
|
18
20
|
CHANGED: "CHANGED";
|
|
19
21
|
}>;
|
|
20
|
-
|
|
22
|
+
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
21
23
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
22
24
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
23
25
|
title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -142,7 +144,9 @@ export declare const GetAccountReportsIdSchema: {
|
|
|
142
144
|
method: ApiRestMethod;
|
|
143
145
|
payload: z.ZodNever;
|
|
144
146
|
response: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
145
|
-
|
|
147
|
+
server_id: z.ZodUUID;
|
|
148
|
+
client_id: z.ZodUUID;
|
|
149
|
+
display_seq: z.ZodInt;
|
|
146
150
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
147
151
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
148
152
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -152,7 +156,7 @@ export declare const GetAccountReportsIdSchema: {
|
|
|
152
156
|
PUBLISHED: "PUBLISHED";
|
|
153
157
|
CHANGED: "CHANGED";
|
|
154
158
|
}>;
|
|
155
|
-
|
|
159
|
+
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
156
160
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
157
161
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
158
162
|
title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -269,12 +273,14 @@ export declare const GetAccountReportsIdSchema: {
|
|
|
269
273
|
}, z.core.$strip>>;
|
|
270
274
|
}, z.core.$strip>;
|
|
271
275
|
}, z.core.$strip>>>, z.ZodTransform<{
|
|
272
|
-
|
|
276
|
+
server_id: string;
|
|
277
|
+
client_id: string;
|
|
278
|
+
display_seq: number;
|
|
273
279
|
created_at: string;
|
|
274
280
|
updated_at: string;
|
|
275
281
|
published_at: string | null;
|
|
276
282
|
state: "DISCARDED" | "DRAFTED" | "PUBLISHED" | "CHANGED";
|
|
277
|
-
|
|
283
|
+
slug: string | null;
|
|
278
284
|
draft_content: {
|
|
279
285
|
published_at: string | null;
|
|
280
286
|
title: string | null;
|
|
@@ -323,12 +329,14 @@ export declare const GetAccountReportsIdSchema: {
|
|
|
323
329
|
}[];
|
|
324
330
|
};
|
|
325
331
|
} | null, {
|
|
326
|
-
|
|
332
|
+
server_id: string;
|
|
333
|
+
client_id: string;
|
|
334
|
+
display_seq: number;
|
|
327
335
|
created_at: string;
|
|
328
336
|
updated_at: string;
|
|
329
337
|
published_at: string | null;
|
|
330
338
|
state: "DISCARDED" | "DRAFTED" | "PUBLISHED" | "CHANGED";
|
|
331
|
-
|
|
339
|
+
slug: string | null;
|
|
332
340
|
draft_content: {
|
|
333
341
|
published_at: string | null;
|
|
334
342
|
title: string | null;
|
|
@@ -434,7 +442,9 @@ export declare const PostAccountReportsSchema: {
|
|
|
434
442
|
} | null | undefined>>;
|
|
435
443
|
}, z.core.$strip>;
|
|
436
444
|
response: z.ZodObject<{
|
|
437
|
-
|
|
445
|
+
server_id: z.ZodUUID;
|
|
446
|
+
client_id: z.ZodUUID;
|
|
447
|
+
display_seq: z.ZodInt;
|
|
438
448
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
439
449
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
440
450
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -444,7 +454,7 @@ export declare const PostAccountReportsSchema: {
|
|
|
444
454
|
PUBLISHED: "PUBLISHED";
|
|
445
455
|
CHANGED: "CHANGED";
|
|
446
456
|
}>;
|
|
447
|
-
|
|
457
|
+
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
448
458
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
449
459
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
450
460
|
title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -582,7 +592,9 @@ export declare const PutAccountReportsIdContentSchema: {
|
|
|
582
592
|
contact_information_url: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
583
593
|
}, z.core.$strip>;
|
|
584
594
|
response: z.ZodObject<{
|
|
585
|
-
|
|
595
|
+
server_id: z.ZodUUID;
|
|
596
|
+
client_id: z.ZodUUID;
|
|
597
|
+
display_seq: z.ZodInt;
|
|
586
598
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
587
599
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
588
600
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -592,7 +604,7 @@ export declare const PutAccountReportsIdContentSchema: {
|
|
|
592
604
|
PUBLISHED: "PUBLISHED";
|
|
593
605
|
CHANGED: "CHANGED";
|
|
594
606
|
}>;
|
|
595
|
-
|
|
607
|
+
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
596
608
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
597
609
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
598
610
|
title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -715,7 +727,9 @@ export declare const PatchAccountReportsIdDiscardSchema: {
|
|
|
715
727
|
method: ApiRestMethod;
|
|
716
728
|
payload: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, z.core.$strip>>>;
|
|
717
729
|
response: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
718
|
-
|
|
730
|
+
server_id: z.ZodUUID;
|
|
731
|
+
client_id: z.ZodUUID;
|
|
732
|
+
display_seq: z.ZodInt;
|
|
719
733
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
720
734
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
721
735
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -725,7 +739,7 @@ export declare const PatchAccountReportsIdDiscardSchema: {
|
|
|
725
739
|
PUBLISHED: "PUBLISHED";
|
|
726
740
|
CHANGED: "CHANGED";
|
|
727
741
|
}>;
|
|
728
|
-
|
|
742
|
+
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
729
743
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
730
744
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
731
745
|
title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -842,12 +856,14 @@ export declare const PatchAccountReportsIdDiscardSchema: {
|
|
|
842
856
|
}, z.core.$strip>>;
|
|
843
857
|
}, z.core.$strip>;
|
|
844
858
|
}, z.core.$strip>>>, z.ZodTransform<{
|
|
845
|
-
|
|
859
|
+
server_id: string;
|
|
860
|
+
client_id: string;
|
|
861
|
+
display_seq: number;
|
|
846
862
|
created_at: string;
|
|
847
863
|
updated_at: string;
|
|
848
864
|
published_at: string | null;
|
|
849
865
|
state: "DISCARDED" | "DRAFTED" | "PUBLISHED" | "CHANGED";
|
|
850
|
-
|
|
866
|
+
slug: string | null;
|
|
851
867
|
draft_content: {
|
|
852
868
|
published_at: string | null;
|
|
853
869
|
title: string | null;
|
|
@@ -896,12 +912,14 @@ export declare const PatchAccountReportsIdDiscardSchema: {
|
|
|
896
912
|
}[];
|
|
897
913
|
};
|
|
898
914
|
} | null, {
|
|
899
|
-
|
|
915
|
+
server_id: string;
|
|
916
|
+
client_id: string;
|
|
917
|
+
display_seq: number;
|
|
900
918
|
created_at: string;
|
|
901
919
|
updated_at: string;
|
|
902
920
|
published_at: string | null;
|
|
903
921
|
state: "DISCARDED" | "DRAFTED" | "PUBLISHED" | "CHANGED";
|
|
904
|
-
|
|
922
|
+
slug: string | null;
|
|
905
923
|
draft_content: {
|
|
906
924
|
published_at: string | null;
|
|
907
925
|
title: string | null;
|
|
@@ -958,7 +976,9 @@ export declare const PatchAccountReportsIdPublishSchema: {
|
|
|
958
976
|
published_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
959
977
|
}, z.core.$strip>;
|
|
960
978
|
response: z.ZodObject<{
|
|
961
|
-
|
|
979
|
+
server_id: z.ZodUUID;
|
|
980
|
+
client_id: z.ZodUUID;
|
|
981
|
+
display_seq: z.ZodInt;
|
|
962
982
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
963
983
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
964
984
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -968,7 +988,7 @@ export declare const PatchAccountReportsIdPublishSchema: {
|
|
|
968
988
|
PUBLISHED: "PUBLISHED";
|
|
969
989
|
CHANGED: "CHANGED";
|
|
970
990
|
}>;
|
|
971
|
-
|
|
991
|
+
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
972
992
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
973
993
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
974
994
|
title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -1091,7 +1111,9 @@ export declare const PatchAccountReportsIdUnpublishSchema: {
|
|
|
1091
1111
|
method: ApiRestMethod;
|
|
1092
1112
|
payload: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, z.core.$strip>>>;
|
|
1093
1113
|
response: z.ZodObject<{
|
|
1094
|
-
|
|
1114
|
+
server_id: z.ZodUUID;
|
|
1115
|
+
client_id: z.ZodUUID;
|
|
1116
|
+
display_seq: z.ZodInt;
|
|
1095
1117
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1096
1118
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1097
1119
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -1101,7 +1123,7 @@ export declare const PatchAccountReportsIdUnpublishSchema: {
|
|
|
1101
1123
|
PUBLISHED: "PUBLISHED";
|
|
1102
1124
|
CHANGED: "CHANGED";
|
|
1103
1125
|
}>;
|
|
1104
|
-
|
|
1126
|
+
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1105
1127
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1106
1128
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1107
1129
|
title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -1226,7 +1248,9 @@ export declare const PostAccountReportsIdCoverImageSchema: {
|
|
|
1226
1248
|
alt: z.ZodString;
|
|
1227
1249
|
}, z.core.$strip>;
|
|
1228
1250
|
response: z.ZodObject<{
|
|
1229
|
-
|
|
1251
|
+
server_id: z.ZodUUID;
|
|
1252
|
+
client_id: z.ZodUUID;
|
|
1253
|
+
display_seq: z.ZodInt;
|
|
1230
1254
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1231
1255
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1232
1256
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -1236,7 +1260,7 @@ export declare const PostAccountReportsIdCoverImageSchema: {
|
|
|
1236
1260
|
PUBLISHED: "PUBLISHED";
|
|
1237
1261
|
CHANGED: "CHANGED";
|
|
1238
1262
|
}>;
|
|
1239
|
-
|
|
1263
|
+
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1240
1264
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1241
1265
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1242
1266
|
title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -1374,7 +1398,9 @@ export declare const GetReportsSchema: {
|
|
|
1374
1398
|
payload: z.ZodNever;
|
|
1375
1399
|
response: z.ZodObject<{
|
|
1376
1400
|
reports: z.ZodArray<z.ZodObject<{
|
|
1377
|
-
|
|
1401
|
+
server_id: z.ZodUUID;
|
|
1402
|
+
client_id: z.ZodUUID;
|
|
1403
|
+
display_seq: z.ZodInt;
|
|
1378
1404
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1379
1405
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1380
1406
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -1384,7 +1410,7 @@ export declare const GetReportsSchema: {
|
|
|
1384
1410
|
PUBLISHED: "PUBLISHED";
|
|
1385
1411
|
CHANGED: "CHANGED";
|
|
1386
1412
|
}>;
|
|
1387
|
-
|
|
1413
|
+
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1388
1414
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1389
1415
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1390
1416
|
title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -1508,7 +1534,9 @@ export declare const GetReportsIdSchema: {
|
|
|
1508
1534
|
method: ApiRestMethod;
|
|
1509
1535
|
payload: z.ZodNever;
|
|
1510
1536
|
response: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1511
|
-
|
|
1537
|
+
server_id: z.ZodUUID;
|
|
1538
|
+
client_id: z.ZodUUID;
|
|
1539
|
+
display_seq: z.ZodInt;
|
|
1512
1540
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1513
1541
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
1514
1542
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -1518,7 +1546,7 @@ export declare const GetReportsIdSchema: {
|
|
|
1518
1546
|
PUBLISHED: "PUBLISHED";
|
|
1519
1547
|
CHANGED: "CHANGED";
|
|
1520
1548
|
}>;
|
|
1521
|
-
|
|
1549
|
+
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1522
1550
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1523
1551
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
1524
1552
|
title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -1635,12 +1663,14 @@ export declare const GetReportsIdSchema: {
|
|
|
1635
1663
|
}, z.core.$strip>>;
|
|
1636
1664
|
}, z.core.$strip>;
|
|
1637
1665
|
}, z.core.$strip>>>, z.ZodTransform<{
|
|
1638
|
-
|
|
1666
|
+
server_id: string;
|
|
1667
|
+
client_id: string;
|
|
1668
|
+
display_seq: number;
|
|
1639
1669
|
created_at: string;
|
|
1640
1670
|
updated_at: string;
|
|
1641
1671
|
published_at: string | null;
|
|
1642
1672
|
state: "DISCARDED" | "DRAFTED" | "PUBLISHED" | "CHANGED";
|
|
1643
|
-
|
|
1673
|
+
slug: string | null;
|
|
1644
1674
|
draft_content: {
|
|
1645
1675
|
published_at: string | null;
|
|
1646
1676
|
title: string | null;
|
|
@@ -1689,12 +1719,14 @@ export declare const GetReportsIdSchema: {
|
|
|
1689
1719
|
}[];
|
|
1690
1720
|
};
|
|
1691
1721
|
} | null, {
|
|
1692
|
-
|
|
1722
|
+
server_id: string;
|
|
1723
|
+
client_id: string;
|
|
1724
|
+
display_seq: number;
|
|
1693
1725
|
created_at: string;
|
|
1694
1726
|
updated_at: string;
|
|
1695
1727
|
published_at: string | null;
|
|
1696
1728
|
state: "DISCARDED" | "DRAFTED" | "PUBLISHED" | "CHANGED";
|
|
1697
|
-
|
|
1729
|
+
slug: string | null;
|
|
1698
1730
|
draft_content: {
|
|
1699
1731
|
published_at: string | null;
|
|
1700
1732
|
title: string | null;
|
package/dist/schemas/base.d.ts
CHANGED
|
@@ -40,7 +40,9 @@ export declare const ReportContentSchema: z.ZodObject<{
|
|
|
40
40
|
cover_image_id: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
41
41
|
}, z.core.$strip>;
|
|
42
42
|
export declare const ReportSchema: z.ZodObject<{
|
|
43
|
-
|
|
43
|
+
server_id: z.ZodUUID;
|
|
44
|
+
client_id: z.ZodUUID;
|
|
45
|
+
display_seq: z.ZodInt;
|
|
44
46
|
created_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
45
47
|
updated_at: z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>;
|
|
46
48
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
@@ -50,7 +52,7 @@ export declare const ReportSchema: z.ZodObject<{
|
|
|
50
52
|
PUBLISHED: "PUBLISHED";
|
|
51
53
|
CHANGED: "CHANGED";
|
|
52
54
|
}>;
|
|
53
|
-
|
|
55
|
+
slug: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
54
56
|
draft_content: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
55
57
|
published_at: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodCoercedDate<unknown>, z.ZodTransform<string, Date>>>>, z.ZodTransform<string | null, string | null | undefined>>;
|
|
56
58
|
title: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
|
package/package.json
CHANGED
package/src/schemas/base.ts
CHANGED
|
@@ -60,12 +60,14 @@ export const ReportContentSchema = z.object({
|
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
export const ReportSchema = z.object({
|
|
63
|
-
|
|
63
|
+
server_id: z.uuid(),
|
|
64
|
+
client_id: z.uuid(),
|
|
65
|
+
display_seq: z.int(),
|
|
64
66
|
created_at: isoDateString,
|
|
65
67
|
updated_at: isoDateString,
|
|
66
68
|
published_at: maybe(isoDateString),
|
|
67
69
|
state: z.enum(['DISCARDED', 'DRAFTED', 'PUBLISHED', 'CHANGED']),
|
|
68
|
-
|
|
70
|
+
slug: maybe(z.string()),
|
|
69
71
|
draft_content: maybe(ReportContentSchema),
|
|
70
72
|
published_content: maybe(ReportContentSchema),
|
|
71
73
|
media: z.object({ images: ImageSchema.array() })
|