@assemblis/contracts 0.1.2 → 0.1.3
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 -347
- package/dist/schemas/api.d.ts +1187 -2433
- package/dist/schemas/base.d.ts +162 -362
- package/dist/schemas/legacy.d.ts +582 -1255
- package/dist/schemas/utils.d.ts +1 -9
- package/dist/types/api.d.ts +19 -45
- package/dist/types/enums.d.ts +19 -19
- package/dist/types/types.d.ts +2 -1
- package/package.json +1 -1
- package/src/schemas/api.ts +11 -9
- package/src/types/api.ts +1 -9
package/dist/index.js
CHANGED
|
@@ -1,347 +1 @@
|
|
|
1
|
-
import e from
|
|
2
|
-
const t = e.iso.datetime(),
|
|
3
|
-
a = (e) => e.nullish().transform((e) => e ?? null),
|
|
4
|
-
r = e.object({
|
|
5
|
-
id: e.uuid(),
|
|
6
|
-
created_at: t,
|
|
7
|
-
updated_at: t,
|
|
8
|
-
uri: e.string(),
|
|
9
|
-
alt: e.string(),
|
|
10
|
-
src: e.string(),
|
|
11
|
-
sizes: e.string(),
|
|
12
|
-
srcset: e.string()
|
|
13
|
-
}),
|
|
14
|
-
n = e.object({ label: e.string(), value: e.coerce.number().int() }),
|
|
15
|
-
i = e.object({
|
|
16
|
-
published_at: a(t),
|
|
17
|
-
title: a(e.string()),
|
|
18
|
-
description: a(e.string()),
|
|
19
|
-
location: a(e.string()),
|
|
20
|
-
outputs: a(e.string().array()),
|
|
21
|
-
initiation_type: a(e.string()),
|
|
22
|
-
recruitment_method: a(e.string()),
|
|
23
|
-
recruitment_description: a(e.string()),
|
|
24
|
-
participant_count: a(e.int()),
|
|
25
|
-
organiser_reflections: a(e.string()),
|
|
26
|
-
organiser_report_url: a(e.string()),
|
|
27
|
-
location_details: a(e.string()),
|
|
28
|
-
date: a(e.string()),
|
|
29
|
-
duration: a(e.int()),
|
|
30
|
-
contact_information_url: a(e.string()),
|
|
31
|
-
cover_image_id: a(e.string())
|
|
32
|
-
}),
|
|
33
|
-
o = e.object({
|
|
34
|
-
id: e.uuid(),
|
|
35
|
-
created_at: t,
|
|
36
|
-
updated_at: t,
|
|
37
|
-
published_at: a(t),
|
|
38
|
-
viewer_password: e.string(),
|
|
39
|
-
draft_content: a(i),
|
|
40
|
-
published_content: a(i),
|
|
41
|
-
media: e.object({ images: r.array() })
|
|
42
|
-
});
|
|
43
|
-
e.object({
|
|
44
|
-
id: e.uuid(),
|
|
45
|
-
created_at: t,
|
|
46
|
-
updated_at: t,
|
|
47
|
-
sub: e.string(),
|
|
48
|
-
is_mutirao: e.boolean()
|
|
49
|
-
});
|
|
50
|
-
const s = { payload: e.never(), response: e.object({ reports: o.array() }) },
|
|
51
|
-
d = { payload: e.never(), response: o },
|
|
52
|
-
c = { payload: a(i.omit({ cover_image_id: !0 })), response: o },
|
|
53
|
-
p = { payload: i.omit({ cover_image_id: !0 }), response: o },
|
|
54
|
-
u = { payload: e.never(), response: a(o) },
|
|
55
|
-
_ = { payload: e.object({ published_at: t }), response: o },
|
|
56
|
-
l = { payload: e.never(), response: o },
|
|
57
|
-
b = { payload: r.pick({ alt: !0 }), response: o },
|
|
58
|
-
g = {
|
|
59
|
-
payload: e.object({
|
|
60
|
-
route: e.string(),
|
|
61
|
-
text: e.string(),
|
|
62
|
-
metadata: e.unknown()
|
|
63
|
-
}),
|
|
64
|
-
response: e.string()
|
|
65
|
-
},
|
|
66
|
-
m = {
|
|
67
|
-
payload: e.object({
|
|
68
|
-
message: e.string().optional(),
|
|
69
|
-
data: e.record(e.string(), e.string().optional()).optional(),
|
|
70
|
-
metadata: e.object({
|
|
71
|
-
origin: e.string(),
|
|
72
|
-
route: e.string(),
|
|
73
|
-
status: e.number()
|
|
74
|
-
})
|
|
75
|
-
}),
|
|
76
|
-
response: e.string()
|
|
77
|
-
},
|
|
78
|
-
y = {
|
|
79
|
-
payload: e.object({
|
|
80
|
-
type: e.literal('user.created'),
|
|
81
|
-
object: e.literal('event'),
|
|
82
|
-
data: e.object({
|
|
83
|
-
id: e.string(),
|
|
84
|
-
email_addresses: e.object({ email_address: e.string() }).array()
|
|
85
|
-
})
|
|
86
|
-
}),
|
|
87
|
-
response: e.string()
|
|
88
|
-
},
|
|
89
|
-
S = e.object({ id: e.uuid(), text: e.string() }),
|
|
90
|
-
f = {
|
|
91
|
-
payload: e.undefined(),
|
|
92
|
-
response: e.object({
|
|
93
|
-
id: e.uuid(),
|
|
94
|
-
created_at: t,
|
|
95
|
-
updated_at: t,
|
|
96
|
-
name: e.string(),
|
|
97
|
-
sections: e
|
|
98
|
-
.object({ primary: S, secondary: S.array(), options: n.array() })
|
|
99
|
-
.array()
|
|
100
|
-
})
|
|
101
|
-
},
|
|
102
|
-
j = {
|
|
103
|
-
payload: e.object({
|
|
104
|
-
answers: e
|
|
105
|
-
.object({
|
|
106
|
-
question_id: e.uuid(),
|
|
107
|
-
answer_value: e.coerce.number().int()
|
|
108
|
-
})
|
|
109
|
-
.array()
|
|
110
|
-
}),
|
|
111
|
-
response: e.object({ total: e.number().int() })
|
|
112
|
-
},
|
|
113
|
-
v = e.object({ visible_on_profile: e.boolean(), description: a(e.string()) }),
|
|
114
|
-
x = e.object({
|
|
115
|
-
text: e.string(),
|
|
116
|
-
agreed: a(e.coerce.number().int()),
|
|
117
|
-
against: a(e.coerce.number().int()),
|
|
118
|
-
abstained: a(e.coerce.number().int()),
|
|
119
|
-
include_in_action_plan: e.boolean().default(!0),
|
|
120
|
-
assembly_id: e.uuid()
|
|
121
|
-
}),
|
|
122
|
-
E = e.object({
|
|
123
|
-
text: e.string(),
|
|
124
|
-
complete: e.boolean().default(!1),
|
|
125
|
-
action_id: e.uuid(),
|
|
126
|
-
assembly_id: e.uuid()
|
|
127
|
-
}),
|
|
128
|
-
I = e.object({
|
|
129
|
-
published_at: a(t),
|
|
130
|
-
name: e.string(),
|
|
131
|
-
about: a(e.string()),
|
|
132
|
-
topics: e.string().array(),
|
|
133
|
-
country: a(e.string()),
|
|
134
|
-
hide: e.boolean().default(!1)
|
|
135
|
-
}),
|
|
136
|
-
O = {
|
|
137
|
-
payload: I,
|
|
138
|
-
response: I.extend({
|
|
139
|
-
id: e.uuid(),
|
|
140
|
-
created_at: t,
|
|
141
|
-
updated_at: t,
|
|
142
|
-
image_src: a(e.string()),
|
|
143
|
-
has_image: e.boolean().meta({ deprecated: !0 }),
|
|
144
|
-
user_id: e.uuid().meta({ deprecated: !0 })
|
|
145
|
-
})
|
|
146
|
-
},
|
|
147
|
-
T = {
|
|
148
|
-
payload: e.undefined(),
|
|
149
|
-
response: e.object({ assemblies: O.response.array() })
|
|
150
|
-
},
|
|
151
|
-
A = e.object({
|
|
152
|
-
visible_on_profile: e.boolean(),
|
|
153
|
-
name: a(e.string()),
|
|
154
|
-
description: a(e.string()),
|
|
155
|
-
type: a(e.string())
|
|
156
|
-
}),
|
|
157
|
-
h = e.object({
|
|
158
|
-
visible_on_profile: e.boolean(),
|
|
159
|
-
registration_link: a(e.string()),
|
|
160
|
-
start_date: a(t)
|
|
161
|
-
}),
|
|
162
|
-
P = e.object({ visible_on_profile: e.boolean(), background: a(e.string()) }),
|
|
163
|
-
k = e.object({
|
|
164
|
-
visible_on_profile: e.boolean(),
|
|
165
|
-
organisation_types: e.string().array(),
|
|
166
|
-
description: a(e.string())
|
|
167
|
-
}),
|
|
168
|
-
R = e.object({
|
|
169
|
-
visible_on_profile: e.boolean(),
|
|
170
|
-
organisation_types: e.string().array(),
|
|
171
|
-
description: a(e.string())
|
|
172
|
-
}),
|
|
173
|
-
w = e.object({
|
|
174
|
-
visible_on_profile: e.boolean(),
|
|
175
|
-
decision_method: a(e.string())
|
|
176
|
-
}),
|
|
177
|
-
M = e.object({
|
|
178
|
-
visible_on_profile: e.boolean(),
|
|
179
|
-
recruitment_method: a(e.string()),
|
|
180
|
-
community: a(e.string())
|
|
181
|
-
}),
|
|
182
|
-
N = e.object({
|
|
183
|
-
visible_on_profile: e.boolean(),
|
|
184
|
-
support_options: e.string().array()
|
|
185
|
-
}),
|
|
186
|
-
D = e.object({ visible_on_profile: e.boolean() }),
|
|
187
|
-
B = {
|
|
188
|
-
payload: O.payload.extend({
|
|
189
|
-
organisation: a(A.extend({ id: e.uuid().optional() })),
|
|
190
|
-
event_details: a(h),
|
|
191
|
-
story: a(P),
|
|
192
|
-
supporters: a(k),
|
|
193
|
-
funders: a(R),
|
|
194
|
-
facilitation: a(w),
|
|
195
|
-
participants: a(M),
|
|
196
|
-
support: a(N),
|
|
197
|
-
action_plan: a(
|
|
198
|
-
v.extend({
|
|
199
|
-
actions: x
|
|
200
|
-
.omit({ assembly_id: !0 })
|
|
201
|
-
.extend({
|
|
202
|
-
id: e.uuid().optional(),
|
|
203
|
-
tasks: E.omit({ action_id: !0, assembly_id: !0 })
|
|
204
|
-
.extend({ id: e.uuid().optional() })
|
|
205
|
-
.array(),
|
|
206
|
-
updates: e.unknown().array()
|
|
207
|
-
})
|
|
208
|
-
.array(),
|
|
209
|
-
updates: e.unknown().array()
|
|
210
|
-
})
|
|
211
|
-
),
|
|
212
|
-
surveys: a(D)
|
|
213
|
-
}),
|
|
214
|
-
response: O.response.omit({ user_id: !0 }).extend({
|
|
215
|
-
is_own: e.boolean(),
|
|
216
|
-
organisation: a(A.extend({ id: e.uuid(), created_at: t, updated_at: t })),
|
|
217
|
-
event_details: a(h.extend({ created_at: t, updated_at: t })),
|
|
218
|
-
story: a(P.extend({ created_at: t, updated_at: t })),
|
|
219
|
-
supporters: a(k.extend({ created_at: t, updated_at: t })),
|
|
220
|
-
funders: a(R.extend({ created_at: t, updated_at: t })),
|
|
221
|
-
facilitation: a(w.extend({ created_at: t, updated_at: t })),
|
|
222
|
-
participants: a(M.extend({ created_at: t, updated_at: t })),
|
|
223
|
-
support: a(N.extend({ created_at: t, updated_at: t })),
|
|
224
|
-
action_plan: a(
|
|
225
|
-
v
|
|
226
|
-
.extend({
|
|
227
|
-
actions: x
|
|
228
|
-
.omit({ assembly_id: !0 })
|
|
229
|
-
.extend({
|
|
230
|
-
id: e.uuid(),
|
|
231
|
-
created_at: t,
|
|
232
|
-
updated_at: e.coerce.date().transform((e) => e.toISOString()),
|
|
233
|
-
tasks: E.omit({ action_id: !0, assembly_id: !0 })
|
|
234
|
-
.extend({
|
|
235
|
-
id: e.uuid(),
|
|
236
|
-
created_at: e.coerce
|
|
237
|
-
.date()
|
|
238
|
-
.transform((e) => e.toISOString()),
|
|
239
|
-
updated_at: e.coerce
|
|
240
|
-
.date()
|
|
241
|
-
.transform((e) => e.toISOString())
|
|
242
|
-
})
|
|
243
|
-
.array(),
|
|
244
|
-
updates: e.unknown().array()
|
|
245
|
-
})
|
|
246
|
-
.extend({
|
|
247
|
-
created_at: e.coerce.date().transform((e) => e.toISOString()),
|
|
248
|
-
updated_at: e.coerce.date().transform((e) => e.toISOString())
|
|
249
|
-
})
|
|
250
|
-
.array(),
|
|
251
|
-
updates: e.unknown().array()
|
|
252
|
-
})
|
|
253
|
-
.and(
|
|
254
|
-
e.object({
|
|
255
|
-
created_at: e.coerce.date().transform((e) => e.toISOString()),
|
|
256
|
-
updated_at: e.coerce.date().transform((e) => e.toISOString())
|
|
257
|
-
})
|
|
258
|
-
)
|
|
259
|
-
),
|
|
260
|
-
surveys: a(
|
|
261
|
-
D.extend({
|
|
262
|
-
created_at: e.coerce.date().transform((e) => e.toISOString()),
|
|
263
|
-
updated_at: e.coerce.date().transform((e) => e.toISOString())
|
|
264
|
-
}).extend({
|
|
265
|
-
data: e.record(
|
|
266
|
-
e.string(),
|
|
267
|
-
e.object({
|
|
268
|
-
total: e.number().int(),
|
|
269
|
-
responses: e.record(e.string(), n.array())
|
|
270
|
-
})
|
|
271
|
-
)
|
|
272
|
-
})
|
|
273
|
-
)
|
|
274
|
-
})
|
|
275
|
-
},
|
|
276
|
-
C = {
|
|
277
|
-
payload: e.object({
|
|
278
|
-
country: e.string(),
|
|
279
|
-
email: e.string(),
|
|
280
|
-
text: a(e.string())
|
|
281
|
-
}),
|
|
282
|
-
response: e.object({
|
|
283
|
-
id: e.uuid(),
|
|
284
|
-
created_at: e.coerce.date().transform((e) => e.toISOString()),
|
|
285
|
-
updated_at: e.coerce.date().transform((e) => e.toISOString()),
|
|
286
|
-
country: e.string(),
|
|
287
|
-
text: a(e.string()),
|
|
288
|
-
hide: e.boolean(),
|
|
289
|
-
image_src: a(e.string()),
|
|
290
|
-
has_image: e.boolean().meta({ deprecated: !0 })
|
|
291
|
-
})
|
|
292
|
-
},
|
|
293
|
-
L = {
|
|
294
|
-
payload: e.undefined(),
|
|
295
|
-
response: e.object({
|
|
296
|
-
assemblies: O.response.array(),
|
|
297
|
-
pins: C.response.array()
|
|
298
|
-
})
|
|
299
|
-
};
|
|
300
|
-
var U, G, Y, H;
|
|
301
|
-
!(function (e) {
|
|
302
|
-
(e.GET = 'GET'), (e.POST = 'POST'), (e.PUT = 'PUT'), (e.PATCH = 'PATCH');
|
|
303
|
-
})(U || (U = {})),
|
|
304
|
-
(function (e) {
|
|
305
|
-
(e.ID = ':ID'), (e.NAME = ':NAME');
|
|
306
|
-
})(G || (G = {})),
|
|
307
|
-
(function (e) {
|
|
308
|
-
(e.ACCOUNT_REPORTS = '/account/reports'),
|
|
309
|
-
(e.ASSEMBLIES = '/assemblies'),
|
|
310
|
-
(e.FEEDBACK = '/feedback'),
|
|
311
|
-
(e.INTEREST_ASSEMBLIS = '/interest/assemblis'),
|
|
312
|
-
(e.INTEREST_MUTIRAO = '/interest/mutirao'),
|
|
313
|
-
(e.LOGS = '/logs'),
|
|
314
|
-
(e.PINS = '/pins'),
|
|
315
|
-
(e.SURVEYS = '/surveys'),
|
|
316
|
-
(e.SURVEY_RESPONSES = '/assemblies/:ID/survey-responses/:NAME');
|
|
317
|
-
})(Y || (Y = {})),
|
|
318
|
-
(function (e) {
|
|
319
|
-
(e.DELIBERATION = 'deliberation'),
|
|
320
|
-
(e.DEMOGRAPHIC_DATA = 'demographic-data'),
|
|
321
|
-
(e.PRE_ASSEMBLY = 'pre-assembly'),
|
|
322
|
-
(e.POST_ASSEMBLY = 'post-assembly');
|
|
323
|
-
})(H || (H = {}));
|
|
324
|
-
export {
|
|
325
|
-
Y as ApiEndpoint,
|
|
326
|
-
U as ApiRestMethod,
|
|
327
|
-
G as ApiRouteParameter,
|
|
328
|
-
T as AssembliesListSchema,
|
|
329
|
-
B as AssemblyDetailSchema,
|
|
330
|
-
O as AssemblyOverviewSchema,
|
|
331
|
-
g as FeedbackSchema,
|
|
332
|
-
d as GetAccountReportsIdSchema,
|
|
333
|
-
s as GetAccountReportsSchema,
|
|
334
|
-
m as LogSchema,
|
|
335
|
-
u as PatchAccountReportsIdDiscardSchema,
|
|
336
|
-
_ as PatchAccountReportsIdPublishSchema,
|
|
337
|
-
l as PatchAccountReportsIdUnpublishSchema,
|
|
338
|
-
L as PinListSchema,
|
|
339
|
-
C as PinSchema,
|
|
340
|
-
b as PostAccountReportsIdCoverImageSchema,
|
|
341
|
-
c as PostAccountReportsSchema,
|
|
342
|
-
p as PutAccountReportsIdContentSchema,
|
|
343
|
-
y as RegisterSchema,
|
|
344
|
-
H as SurveyName,
|
|
345
|
-
j as SurveyResponseSchema,
|
|
346
|
-
f as SurveySchema
|
|
347
|
-
};
|
|
1
|
+
import e from"zod";const t=e.iso.datetime(),a=e=>e.nullish().transform(e=>e??null),r=e.object({id:e.uuid(),created_at:t,updated_at:t,uri:e.string(),alt:e.string(),src:e.string(),sizes:e.string(),srcset:e.string()}),n=e.object({label:e.string(),value:e.coerce.number().int()}),o=e.object({published_at:a(t),title:a(e.string()),description:a(e.string()),location:a(e.string()),outputs:a(e.string().array()),initiation_type:a(e.string()),recruitment_method:a(e.string()),recruitment_description:a(e.string()),participant_count:a(e.int()),organiser_reflections:a(e.string()),organiser_report_url:a(e.string()),location_details:a(e.string()),date:a(e.string()),duration:a(e.int()),contact_information_url:a(e.string()),cover_image_id:a(e.string())}),i=e.object({id:e.uuid(),created_at:t,updated_at:t,published_at:a(t),viewer_password:e.string(),draft_content:a(o),published_content:a(o),media:e.object({images:r.array()})});var s,d,c,p;e.object({id:e.uuid(),created_at:t,updated_at:t,sub:e.string(),is_mutirao:e.boolean()}),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH"}(s||(s={})),function(e){e.ID=":ID",e.NAME=":NAME"}(d||(d={})),function(e){e.ACCOUNT_REPORTS="/account/reports",e.ASSEMBLIES="/assemblies",e.FEEDBACK="/feedback",e.INTEREST_ASSEMBLIS="/interest/assemblis",e.INTEREST_MUTIRAO="/interest/mutirao",e.LOGS="/logs",e.PINS="/pins",e.SURVEYS="/surveys",e.SURVEY_RESPONSES="/assemblies/:ID/survey-responses/:NAME"}(c||(c={})),function(e){e.DELIBERATION="deliberation",e.DEMOGRAPHIC_DATA="demographic-data",e.PRE_ASSEMBLY="pre-assembly",e.POST_ASSEMBLY="post-assembly"}(p||(p={}));const u={endpoint:()=>c.ACCOUNT_REPORTS,method:s.GET,payload:e.never(),response:e.object({reports:i.array()})},_={endpoint:e=>`${c.ACCOUNT_REPORTS}/${e}`,method:s.GET,payload:e.never(),response:i},l={endpoint:()=>c.ACCOUNT_REPORTS,method:s.POST,payload:a(o.omit({cover_image_id:!0})),response:i},b={endpoint:e=>`${c.ACCOUNT_REPORTS}/${e}/content`,method:s.PUT,payload:o.omit({cover_image_id:!0}),response:i},g={endpoint:e=>`${c.ACCOUNT_REPORTS}/${e}/discard`,method:s.PATCH,payload:e.never(),response:a(i)},m={endpoint:e=>`${c.ACCOUNT_REPORTS}/${e}/publish`,method:s.PATCH,payload:e.object({published_at:t}),response:i},y={endpoint:e=>`${c.ACCOUNT_REPORTS}/${e}/unpublish`,method:s.PATCH,payload:e.never(),response:i},S={endpoint:e=>`${c.ACCOUNT_REPORTS}/${e}/cover-image`,method:s.POST,payload:r.pick({alt:!0}),response:i},T={payload:e.object({route:e.string(),text:e.string(),metadata:e.unknown()}),response:e.string()},f={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()},j={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()},O=e.object({id:e.uuid(),text:e.string()}),E={payload:e.undefined(),response:e.object({id:e.uuid(),created_at:t,updated_at:t,name:e.string(),sections:e.object({primary:O,secondary:O.array(),options:n.array()}).array()})},v={payload:e.object({answers:e.object({question_id:e.uuid(),answer_value:e.coerce.number().int()}).array()}),response:e.object({total:e.number().int()})},x=e.object({visible_on_profile:e.boolean(),description:a(e.string())}),A=e.object({text:e.string(),agreed:a(e.coerce.number().int()),against:a(e.coerce.number().int()),abstained:a(e.coerce.number().int()),include_in_action_plan:e.boolean().default(!0),assembly_id:e.uuid()}),R=e.object({text:e.string(),complete:e.boolean().default(!1),action_id:e.uuid(),assembly_id:e.uuid()}),P=e.object({published_at:a(t),name:e.string(),about:a(e.string()),topics:e.string().array(),country:a(e.string()),hide:e.boolean().default(!1)}),C={payload:P,response:P.extend({id:e.uuid(),created_at:t,updated_at:t,image_src:a(e.string()),has_image:e.boolean().meta({deprecated:!0}),user_id:e.uuid().meta({deprecated:!0})})},h={payload:e.undefined(),response:e.object({assemblies:C.response.array()})},I=e.object({visible_on_profile:e.boolean(),name:a(e.string()),description:a(e.string()),type:a(e.string())}),N=e.object({visible_on_profile:e.boolean(),registration_link:a(e.string()),start_date:a(t)}),U=e.object({visible_on_profile:e.boolean(),background:a(e.string())}),$=e.object({visible_on_profile:e.boolean(),organisation_types:e.string().array(),description:a(e.string())}),k=e.object({visible_on_profile:e.boolean(),organisation_types:e.string().array(),description:a(e.string())}),w=e.object({visible_on_profile:e.boolean(),decision_method:a(e.string())}),M=e.object({visible_on_profile:e.boolean(),recruitment_method:a(e.string()),community:a(e.string())}),D=e.object({visible_on_profile:e.boolean(),support_options:e.string().array()}),B=e.object({visible_on_profile:e.boolean()}),G={payload:C.payload.extend({organisation:a(I.extend({id:e.uuid().optional()})),event_details:a(N),story:a(U),supporters:a($),funders:a(k),facilitation:a(w),participants:a(M),support:a(D),action_plan:a(x.extend({actions:A.omit({assembly_id:!0}).extend({id:e.uuid().optional(),tasks:R.omit({action_id:!0,assembly_id:!0}).extend({id:e.uuid().optional()}).array(),updates:e.unknown().array()}).array(),updates:e.unknown().array()})),surveys:a(B)}),response:C.response.omit({user_id:!0}).extend({is_own:e.boolean(),organisation:a(I.extend({id:e.uuid(),created_at:t,updated_at:t})),event_details:a(N.extend({created_at:t,updated_at:t})),story:a(U.extend({created_at:t,updated_at:t})),supporters:a($.extend({created_at:t,updated_at:t})),funders:a(k.extend({created_at:t,updated_at:t})),facilitation:a(w.extend({created_at:t,updated_at:t})),participants:a(M.extend({created_at:t,updated_at:t})),support:a(D.extend({created_at:t,updated_at:t})),action_plan:a(x.extend({actions:A.omit({assembly_id:!0}).extend({id:e.uuid(),created_at:t,updated_at:e.coerce.date().transform(e=>e.toISOString()),tasks:R.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:a(B.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(),n.array())}))}))})},H={payload:e.object({country:e.string(),email:e.string(),text:a(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:a(e.string()),hide:e.boolean(),image_src:a(e.string()),has_image:e.boolean().meta({deprecated:!0})})},L={payload:e.undefined(),response:e.object({assemblies:C.response.array(),pins:H.response.array()})};export{c as ApiEndpoint,s as ApiRestMethod,d as ApiRouteParameter,h as AssembliesListSchema,G as AssemblyDetailSchema,C as AssemblyOverviewSchema,T as FeedbackSchema,_ as GetAccountReportsIdSchema,u as GetAccountReportsSchema,f as LogSchema,g as PatchAccountReportsIdDiscardSchema,m as PatchAccountReportsIdPublishSchema,y as PatchAccountReportsIdUnpublishSchema,L as PinListSchema,H as PinSchema,S as PostAccountReportsIdCoverImageSchema,l as PostAccountReportsSchema,b as PutAccountReportsIdContentSchema,j as RegisterSchema,p as SurveyName,v as SurveyResponseSchema,E as SurveySchema};
|