placementt-core 1.20.196 → 11.0.533
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/.eslintrc.js +40 -40
- package/.gitattributes +2 -2
- package/lib/config.d.ts +0 -1
- package/lib/constants.d.ts +5 -2
- package/lib/constants.js +130 -136
- package/lib/constants.js.map +1 -1
- package/lib/features/analytics/useAnalytics.d.ts +0 -1
- package/lib/features/analytics/useAnalytics.js +3 -4
- package/lib/features/analytics/useAnalytics.js.map +1 -1
- package/lib/features/config.d.ts +133 -133
- package/lib/features/config.js +35 -35
- package/lib/features/contacts/contacts.d.ts +75 -75
- package/lib/features/contacts/contacts.js +105 -105
- package/lib/features/contacts/contactsSlice.d.ts +5 -5
- package/lib/features/contacts/useContacts.js +1 -2
- package/lib/features/contacts/useContacts.js.map +1 -1
- package/lib/features/downtime/useDowntime.d.ts +11 -11
- package/lib/features/downtime/useDowntime.js +22 -22
- package/lib/features/dropdown/useDropdown.d.ts +2 -3
- package/lib/features/dropdown/useDropdown.js +1 -2
- package/lib/features/dropdown/useDropdown.js.map +1 -1
- package/lib/features/global/downtime/useDowntime.d.ts +0 -1
- package/lib/features/global/downtime/useDowntime.js +3 -2
- package/lib/features/global/downtime/useDowntime.js.map +1 -1
- package/lib/features/global/users/useUserFunctions.d.ts +0 -1
- package/lib/features/global/users/useUserFunctions.js +6 -7
- package/lib/features/global/users/useUserFunctions.js.map +1 -1
- package/lib/features/placements/studentPlacements/activePlacement.d.ts +1 -1
- package/lib/features/placements/studentPlacements/activePlacement.js +1 -1
- package/lib/features/placements/studentPlacements/activePlacement.js.map +1 -1
- package/lib/features/placements/studentPlacements/completedStudentPlacementsSlice.d.ts +4 -5
- package/lib/features/placements/studentPlacements/completedStudentPlacementsSlice.js +1 -4
- package/lib/features/placements/studentPlacements/completedStudentPlacementsSlice.js.map +1 -1
- package/lib/features/placements/studentPlacements/studentPlacementsSlice.d.ts +63 -63
- package/lib/features/placements/studentPlacements/studentPlacementsSlice.js +81 -81
- package/lib/features/placements/studentPlacements/upcomingStudentPlacementsSlice.d.ts +4 -4
- package/lib/features/placements/studentPlacements/upcomingStudentPlacementsSlice.js +1 -1
- package/lib/features/placements/studentPlacements/upcomingStudentPlacementsSlice.js.map +1 -1
- package/lib/features/placements/studentPlacements/useStudentPlacements.d.ts +0 -1
- package/lib/features/placements/studentPlacements/useStudentPlacements.js +1 -2
- package/lib/features/placements/studentPlacements/useStudentPlacements.js.map +1 -1
- package/lib/features/providerPlacements/providerPlacementsSlice.d.ts +19 -19
- package/lib/features/providerPlacements/providerPlacementsSlice.js +24 -24
- package/lib/features/referrals/useReferrals.d.ts +0 -1
- package/lib/features/referrals/useReferrals.js +1 -2
- package/lib/features/referrals/useReferrals.js.map +1 -1
- package/lib/features/studentPlacements/studentPlacementsSlice.d.ts +62 -62
- package/lib/features/studentPlacements/studentPlacementsSlice.js +87 -87
- package/lib/features/studentPlacements/useStudentPlacements.d.ts +6 -6
- package/lib/features/studentPlacements/useStudentPlacements.js +18 -18
- package/lib/features/updates/useUpdates.js +1 -2
- package/lib/features/updates/useUpdates.js.map +1 -1
- package/lib/features/userSlice.d.ts +26 -26
- package/lib/features/userSlice.js +23 -23
- package/lib/features/users/useUserFunctions.d.ts +25 -25
- package/lib/features/users/useUserFunctions.js +124 -124
- package/lib/features/users/userSlice.d.ts +46 -46
- package/lib/features/users/userSlice.js +48 -48
- package/lib/firebase/firebase.d.ts +1 -1
- package/lib/firebase/firebase.js +9 -4
- package/lib/firebase/firebase.js.map +1 -1
- package/lib/firebase/firebaseConfig.js +3 -0
- package/lib/firebase/firebaseConfig.js.map +1 -1
- package/lib/firebase/firebaseQuery.js +3 -0
- package/lib/firebase/firebaseQuery.js.map +1 -1
- package/lib/firebase/persistence.js +2 -2
- package/lib/firebase/persistence.js.map +1 -1
- package/lib/firebase/readDatabase.d.ts +9 -6
- package/lib/firebase/readDatabase.js +16 -6
- package/lib/firebase/readDatabase.js.map +1 -1
- package/lib/firebase/util.d.ts +3 -4
- package/lib/firebase/util.js +49 -4
- package/lib/firebase/util.js.map +1 -1
- package/lib/firebase/writeDatabase.d.ts +3 -3
- package/lib/firebase/writeDatabase.js +7 -1
- package/lib/firebase/writeDatabase.js.map +1 -1
- package/lib/hooks.d.ts +384 -23
- package/lib/hooks.js +1342 -223
- package/lib/hooks.js.map +1 -1
- package/lib/images/GatsbyBenchmarks.d.ts +0 -1
- package/lib/images/GatsbyBenchmarks.js +1 -1
- package/lib/images/GatsbyBenchmarks.js.map +1 -1
- package/lib/reduxHooks.d.ts +11 -20
- package/lib/reduxHooks.js +28 -18
- package/lib/reduxHooks.js.map +1 -1
- package/lib/tasksAndTips.d.ts +25 -5
- package/lib/tasksAndTips.js +346 -48
- package/lib/tasksAndTips.js.map +1 -1
- package/lib/typeDefinitions.d.ts +478 -53
- package/lib/util.d.ts +1 -0
- package/lib/util.js +78 -6
- package/lib/util.js.map +1 -1
- package/package.json +52 -49
- package/src/DatabaseDefinitions.ts +18 -18
- package/src/apiCalls.ts +128 -128
- package/src/config.ts +50 -50
- package/src/constants.ts +708 -707
- package/src/databaseTypes.ts +42 -42
- package/src/features/analytics/useAnalytics.tsx +55 -55
- package/src/features/contacts/contactsSlice.ts +147 -147
- package/src/features/contacts/useContacts.tsx +73 -73
- package/src/features/dropdown/useDropdown.tsx +52 -52
- package/src/features/global/downtime/useDowntime.tsx +19 -18
- package/src/features/global/users/useUserFunctions.tsx +132 -132
- package/src/features/jobs/jobsSlice.ts +65 -65
- package/src/features/placements/studentPlacements/activePlacement.ts +63 -63
- package/src/features/placements/studentPlacements/completedStudentPlacementsSlice.ts +94 -97
- package/src/features/placements/studentPlacements/upcomingStudentPlacementsSlice.ts +108 -108
- package/src/features/placements/studentPlacements/useStudentPlacements.tsx +33 -33
- package/src/features/placements/types.ts +10 -10
- package/src/features/referrals/useReferrals.tsx +56 -56
- package/src/features/updates/useUpdates.tsx +36 -36
- package/src/firebase/firebase.tsx +142 -138
- package/src/firebase/firebaseConfig.tsx +45 -42
- package/src/firebase/firebaseQuery.tsx +143 -140
- package/src/firebase/persistence.ts +84 -84
- package/src/firebase/readDatabase.tsx +208 -197
- package/src/firebase/util.tsx +352 -308
- package/src/firebase/writeDatabase.tsx +75 -68
- package/src/hooks.tsx +3395 -1943
- package/src/images/GatsbyBenchmarks.tsx +711 -711
- package/src/images/LogFuturePlacement.jsx +64 -64
- package/src/images/LogPreviousPlacement.jsx +228 -228
- package/src/images/gatsby_benchmarks.svg +466 -466
- package/src/images/log_future_placement.svg +114 -114
- package/src/images/log_previous_placement.svg +199 -199
- package/src/index.ts +34 -34
- package/src/readDatabase.tsx +3 -3
- package/src/reduxHooks.ts +183 -170
- package/src/tasksAndTips.ts +744 -410
- package/src/tutorialTips.ts +58 -58
- package/src/typeDefinitions.ts +899 -503
- package/src/util.ts +132 -47
- package/tsconfig.dev.json +5 -5
- package/tsconfig.json +21 -21
package/src/typeDefinitions.ts
CHANGED
|
@@ -1,503 +1,899 @@
|
|
|
1
|
-
import {DocumentData, DocumentReference, Timestamp} from "firebase/firestore";
|
|
2
|
-
import {Descendant} from "slate";
|
|
3
|
-
|
|
4
|
-
export type Products = "institutes"|"providers"|"students"|"admin";
|
|
5
|
-
|
|
6
|
-
export type StudentPlacementData = {
|
|
7
|
-
title: string,
|
|
8
|
-
reqUserType: "Students" | "Staff" | "Provider" | "Parent",
|
|
9
|
-
uid: string,
|
|
10
|
-
startDate: string,
|
|
11
|
-
endDate: string,
|
|
12
|
-
providerId?: string,
|
|
13
|
-
name: string,
|
|
14
|
-
parentKey: string,
|
|
15
|
-
parentEmail: string,
|
|
16
|
-
providerKey: string,
|
|
17
|
-
parentExpiry: string,
|
|
18
|
-
providerExpiry: string,
|
|
19
|
-
providerEmail: string,
|
|
20
|
-
providerEmailed: Timestamp,
|
|
21
|
-
parentEmailed: Timestamp,
|
|
22
|
-
providerPhone: string,
|
|
23
|
-
website?: string,
|
|
24
|
-
id:string,
|
|
25
|
-
providerCompleted: string[],
|
|
26
|
-
oId: string,
|
|
27
|
-
contactForename: string,
|
|
28
|
-
contactSurname: string,
|
|
29
|
-
status: number,
|
|
30
|
-
nextStatus: number,
|
|
31
|
-
["address-line1"]: string,
|
|
32
|
-
["address-line2"]: string,
|
|
33
|
-
locality: string,
|
|
34
|
-
postal_code: string,
|
|
35
|
-
country: string,
|
|
36
|
-
cohort?: string,
|
|
37
|
-
leadTimes: string[],
|
|
38
|
-
flags?: FlagCodes[],
|
|
39
|
-
mapConsent: true | "institute" | false,
|
|
40
|
-
mapConsentDate?: string,
|
|
41
|
-
placementId?: string,
|
|
42
|
-
addressId?: string,
|
|
43
|
-
geoHash?: string,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
"
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
[
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
1
|
+
import {DocumentData, DocumentReference, Timestamp} from "firebase/firestore";
|
|
2
|
+
import {Descendant} from "slate";
|
|
3
|
+
|
|
4
|
+
export type Products = "institutes"|"providers"|"students"|"admin";
|
|
5
|
+
|
|
6
|
+
export type StudentPlacementData = {
|
|
7
|
+
title: string,
|
|
8
|
+
reqUserType: "Students" | "Staff" | "Provider" | "Parent",
|
|
9
|
+
uid: string,
|
|
10
|
+
startDate: string,
|
|
11
|
+
endDate: string,
|
|
12
|
+
providerId?: string,
|
|
13
|
+
name: string,
|
|
14
|
+
parentKey: string,
|
|
15
|
+
parentEmail: string,
|
|
16
|
+
providerKey: string,
|
|
17
|
+
parentExpiry: string,
|
|
18
|
+
providerExpiry: string,
|
|
19
|
+
providerEmail: string,
|
|
20
|
+
providerEmailed: Timestamp,
|
|
21
|
+
parentEmailed: Timestamp,
|
|
22
|
+
providerPhone: string,
|
|
23
|
+
website?: string,
|
|
24
|
+
id:string,
|
|
25
|
+
providerCompleted: string[],
|
|
26
|
+
oId: string,
|
|
27
|
+
contactForename: string,
|
|
28
|
+
contactSurname: string,
|
|
29
|
+
status: number,
|
|
30
|
+
nextStatus: number,
|
|
31
|
+
["address-line1"]: string,
|
|
32
|
+
["address-line2"]: string,
|
|
33
|
+
locality: string,
|
|
34
|
+
postal_code: string,
|
|
35
|
+
country: string,
|
|
36
|
+
cohort?: string,
|
|
37
|
+
leadTimes: string[],
|
|
38
|
+
flags?: FlagCodes[],
|
|
39
|
+
mapConsent: true | "institute" | false,
|
|
40
|
+
mapConsentDate?: string,
|
|
41
|
+
placementId?: string,
|
|
42
|
+
addressId?: string,
|
|
43
|
+
geoHash?: string,
|
|
44
|
+
statusType: "draft"|"submitted"|"active"|"completed"|"withdrawn",
|
|
45
|
+
questions: PlacementQuestions,
|
|
46
|
+
staffRoles: string[],
|
|
47
|
+
sector: string,
|
|
48
|
+
subsector: string,
|
|
49
|
+
importedProviderForms?: boolean,
|
|
50
|
+
analytics: string[],
|
|
51
|
+
units: string,
|
|
52
|
+
active: boolean,
|
|
53
|
+
completed: boolean,
|
|
54
|
+
personalAnalytics?: string[],
|
|
55
|
+
completedStages?: number[],
|
|
56
|
+
contactId?: string
|
|
57
|
+
created: string,
|
|
58
|
+
inProgress: boolean,
|
|
59
|
+
draft: boolean,
|
|
60
|
+
activeDates: string[],
|
|
61
|
+
insurance: boolean|"awaitingReview",
|
|
62
|
+
riskAssessment?: boolean|"awaitingReview",
|
|
63
|
+
riskAssessmentType?: "file"|"form",
|
|
64
|
+
riskAssessmentData?: {[key:string]: unknown}[],
|
|
65
|
+
dbsCheck?: boolean|"awaitingReview",
|
|
66
|
+
dbsCheckType?: "file"|"form",
|
|
67
|
+
dbsCheckData?: {[key:string]: unknown}[],
|
|
68
|
+
contactType?: "email"|"website"|"phone"|"post",
|
|
69
|
+
webpage?: string,
|
|
70
|
+
providerLogs?: string[],
|
|
71
|
+
studentsLogs?: string[],
|
|
72
|
+
staffLogs?: [],
|
|
73
|
+
feedback: {
|
|
74
|
+
students: {
|
|
75
|
+
completed: boolean,
|
|
76
|
+
data?: {[key: string]: unknown}
|
|
77
|
+
},
|
|
78
|
+
provider: {
|
|
79
|
+
completed: boolean,
|
|
80
|
+
data?: {[key: string]: unknown}
|
|
81
|
+
},
|
|
82
|
+
staff: {
|
|
83
|
+
completed: boolean,
|
|
84
|
+
data?: {[key: string]: unknown}
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
onboarding: (OnboardingDocs&{
|
|
88
|
+
completed: {
|
|
89
|
+
submitted: string|false,
|
|
90
|
+
accepted?: boolean,
|
|
91
|
+
filesViewed?: string[],
|
|
92
|
+
formsCompleted?: {[key: string]: unknown},
|
|
93
|
+
filesUploaded?: {[key: number]: string[]},
|
|
94
|
+
}})|false,
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export type PlacementQuestions = {
|
|
98
|
+
title: string
|
|
99
|
+
description: string
|
|
100
|
+
dressCode: string
|
|
101
|
+
dressCodeText?: string
|
|
102
|
+
firstDayContact: string
|
|
103
|
+
firstAider?: string
|
|
104
|
+
equipment: string
|
|
105
|
+
responsibilities: string
|
|
106
|
+
experiencesGiven: string
|
|
107
|
+
experienceDesired: string
|
|
108
|
+
otherAdvice: string
|
|
109
|
+
carParking: boolean
|
|
110
|
+
bikeStorage: boolean
|
|
111
|
+
wheelchairFriendly: boolean
|
|
112
|
+
kitchen: boolean
|
|
113
|
+
lunchArrangements?: string
|
|
114
|
+
hours: any,
|
|
115
|
+
studentLevel: "gcse"|"college"|"undergraduate"|"postgraduate"|"over18",
|
|
116
|
+
studentSublevel: string[],
|
|
117
|
+
desiredLength: number,
|
|
118
|
+
desiredMinLength?: number,
|
|
119
|
+
desiredMaxLength?: number,
|
|
120
|
+
desiredLengthUnits: "days"|"weeks"|"months",
|
|
121
|
+
maximumStudents: number,
|
|
122
|
+
workingLocation: "inPerson"|"hybrid"|"remote",
|
|
123
|
+
pay?: number,
|
|
124
|
+
payFrequency: "total"|"hourly"|"daily"|"weekly"|"monthly"|"annually",
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export type SavedPlacement = {
|
|
128
|
+
placementId: string,
|
|
129
|
+
savedByProduct: Products,
|
|
130
|
+
savedByUserType: "Organisation"|"Student",
|
|
131
|
+
savedById: string,
|
|
132
|
+
status?: "Accepted" | "Blocked" | "providerReview";
|
|
133
|
+
listed: boolean,
|
|
134
|
+
concurrentPlacements?: number,
|
|
135
|
+
id: string
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export type PlacementListingStages = "basic"|"address"|"students"|"responsibilities"|"applications"|"onboarding"|"review"|"complete";
|
|
139
|
+
|
|
140
|
+
export type PlacementListing = {
|
|
141
|
+
title: string,
|
|
142
|
+
uid: string,
|
|
143
|
+
template?: string,
|
|
144
|
+
providerId?: string,
|
|
145
|
+
name: string,
|
|
146
|
+
providerEmail: string,
|
|
147
|
+
providerPhone: string,
|
|
148
|
+
id:string,
|
|
149
|
+
studentType: "secondary" | "higher" | "undergraduate" | "postgraduate"
|
|
150
|
+
contactForename: string,
|
|
151
|
+
contactSurname: string,
|
|
152
|
+
["address-line1"]: string,
|
|
153
|
+
["address-line2"]: string,
|
|
154
|
+
locality: string,
|
|
155
|
+
postal_code: string,
|
|
156
|
+
country: string,
|
|
157
|
+
addressId?: string,
|
|
158
|
+
geoHash?: string,
|
|
159
|
+
status: "listed"|"unlisted"|"deleted"|"draft",
|
|
160
|
+
questions: PlacementQuestions,
|
|
161
|
+
savedBy?: {[key:string]: {
|
|
162
|
+
exists: true,
|
|
163
|
+
providerConsent: boolean,
|
|
164
|
+
providerConsentDate?: Timestamp,
|
|
165
|
+
status: "uploaded"|"approved"|"rejected"|"blocked"}},
|
|
166
|
+
mapConsent?: boolean,
|
|
167
|
+
mapConsentData?: string,
|
|
168
|
+
uploadedBy: "student"|"institute"|"provider",
|
|
169
|
+
riskAssessmentType?: "file"|"form",
|
|
170
|
+
riskAssessmentData?: {[key:string]: unknown}[],
|
|
171
|
+
dbsCheckType?: "file"|"form",
|
|
172
|
+
dbsCheckData?: {[key:string]: unknown}[],
|
|
173
|
+
contactType?: "email"|"website"|"phone"|"post",
|
|
174
|
+
webpage?: string,
|
|
175
|
+
stage: PlacementListingStages,
|
|
176
|
+
placementDateType?: "any"|"range"|"defined",
|
|
177
|
+
placementDates?: {start: string, end: string}[],
|
|
178
|
+
applicationType?: "simple"|"complex",
|
|
179
|
+
applicantWorkflowId?: string,
|
|
180
|
+
applicantWorkflow?: ApplicantStage[],
|
|
181
|
+
onboarding: OnboardingDocs|false,
|
|
182
|
+
maxApplicants?: number,
|
|
183
|
+
maxStudents?: number,
|
|
184
|
+
primaryContactId: string,
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
export type OnboardingDocs = {
|
|
188
|
+
deadline?: string,
|
|
189
|
+
message?: string,
|
|
190
|
+
deadlineType?: "date"|"days"
|
|
191
|
+
forms?: string[],
|
|
192
|
+
files?: string[],
|
|
193
|
+
formDetails?: {[key: string]:
|
|
194
|
+
{
|
|
195
|
+
name: string,
|
|
196
|
+
id: string,
|
|
197
|
+
description?: string,
|
|
198
|
+
product: Products,
|
|
199
|
+
oId: string,
|
|
200
|
+
form: CustomFormSchema
|
|
201
|
+
}},
|
|
202
|
+
requiredFiles?: {fileName: string, fileType: string}[]
|
|
203
|
+
viewableFiles?: {[key: string]: FileItem},
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export type PlacementTemplate = PlacementListing&{templateName: string};
|
|
207
|
+
|
|
208
|
+
export type OrganisationAddressStages = "address"|"contacts"|"misc"|"review"|"complete";
|
|
209
|
+
|
|
210
|
+
export type OrganisationAddress = Address & {
|
|
211
|
+
name?: string,
|
|
212
|
+
savedBy?: string[],
|
|
213
|
+
product: Products,
|
|
214
|
+
oId: string,
|
|
215
|
+
stage: OrganisationAddressStages,
|
|
216
|
+
additionalQuestions?: {
|
|
217
|
+
bikeStorage?: boolean,
|
|
218
|
+
kitchen?: boolean,
|
|
219
|
+
parking?: boolean,
|
|
220
|
+
disabledAccess?: boolean,
|
|
221
|
+
},
|
|
222
|
+
contacts?: {
|
|
223
|
+
firstAid?: {
|
|
224
|
+
name?: string,
|
|
225
|
+
phone?: string,
|
|
226
|
+
email?: string,
|
|
227
|
+
location?: string
|
|
228
|
+
}[],
|
|
229
|
+
security?: {
|
|
230
|
+
name?: string,
|
|
231
|
+
phone?: string,
|
|
232
|
+
email?: string,
|
|
233
|
+
location?: string
|
|
234
|
+
}[],
|
|
235
|
+
reception?: {
|
|
236
|
+
name?: string,
|
|
237
|
+
phone?: string,
|
|
238
|
+
email?: string,
|
|
239
|
+
location?: string
|
|
240
|
+
}[],
|
|
241
|
+
},
|
|
242
|
+
primaryContactId?: string,
|
|
243
|
+
default?: boolean,
|
|
244
|
+
flags?: ("addressMissing" | "noPrimaryContact")[]
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
export type Address = {
|
|
248
|
+
id?: string,
|
|
249
|
+
["address-line1"]: string,
|
|
250
|
+
["address-line2"]: string,
|
|
251
|
+
locality: string,
|
|
252
|
+
postal_code: string,
|
|
253
|
+
country: string,
|
|
254
|
+
geoHash?: string
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
export type FlagCodes =
|
|
258
|
+
"inactive" |
|
|
259
|
+
"noParentEmailWarning" |
|
|
260
|
+
"noParentEmailError" |
|
|
261
|
+
"overdue" |
|
|
262
|
+
"noInsurance" |
|
|
263
|
+
"providerRejection" |
|
|
264
|
+
"nearingStart"|
|
|
265
|
+
"awaitingInsurance"|
|
|
266
|
+
"noRiskAssessment"|
|
|
267
|
+
"awaitingRiskAssessment"|
|
|
268
|
+
"parentEmailFailed"|
|
|
269
|
+
"providerEmailFailed"|
|
|
270
|
+
"userEmailFailed"|
|
|
271
|
+
"noDbsCheck"|
|
|
272
|
+
"awaitingDbsCheck"|
|
|
273
|
+
"completeOnboarding"|
|
|
274
|
+
"reviewOnboarding"|
|
|
275
|
+
"requestedVisibleAddresses"|
|
|
276
|
+
"requestedVisiblePlacementListings"
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
export type UserData = {
|
|
280
|
+
details: {
|
|
281
|
+
forename: string,
|
|
282
|
+
surname: string,
|
|
283
|
+
parentEmail?: string,
|
|
284
|
+
year?: string
|
|
285
|
+
},
|
|
286
|
+
renewalMonth: number,
|
|
287
|
+
placementCharged?: boolean,
|
|
288
|
+
algoliaKey: string,
|
|
289
|
+
email: string,
|
|
290
|
+
phone?: string,
|
|
291
|
+
status: "active" | "inactive" | "unclaimed",
|
|
292
|
+
favGuidance?: string[];
|
|
293
|
+
oId: string,
|
|
294
|
+
id: string,
|
|
295
|
+
resetExpiry?: {seconds: number},
|
|
296
|
+
product: Products,
|
|
297
|
+
userGroup?: string,
|
|
298
|
+
userType: "Staff"|"Students",
|
|
299
|
+
created: string,
|
|
300
|
+
activated: string,
|
|
301
|
+
groupData?: UserGroupData,
|
|
302
|
+
staffRoles: string[],
|
|
303
|
+
flags?: FlagCodes[],
|
|
304
|
+
cohortRequests: {[oId: string]: string[]},
|
|
305
|
+
cohorts: {[oId: string]: string[]},
|
|
306
|
+
analytics?: AnalyticsItem,
|
|
307
|
+
units?: string,
|
|
308
|
+
activationCode: number,
|
|
309
|
+
cohort?: string,
|
|
310
|
+
cohortData?: CohortData,
|
|
311
|
+
dismissedTasks?: string[],
|
|
312
|
+
dismissedTutorials?: string[],
|
|
313
|
+
dismissedTips?: string[],
|
|
314
|
+
viewCohorts?: "all"|"some"|"none",
|
|
315
|
+
viewUsers?: "all"|"some",
|
|
316
|
+
studentFilterValues?: string,
|
|
317
|
+
studentFilter?: string
|
|
318
|
+
visibleCohorts?: string,
|
|
319
|
+
readUpdates?: string[],
|
|
320
|
+
contactProviderConsent?: boolean,
|
|
321
|
+
contactProviderConsenDate?: boolean
|
|
322
|
+
referrals?: number,
|
|
323
|
+
shareNameWithReferralLeaderboardConsent?: boolean,
|
|
324
|
+
shareNameWithReferralLeaderboardConsentDate?: boolean,
|
|
325
|
+
referralCode?: string,
|
|
326
|
+
notificationFrequency?: "daily"|"weekly"|"fortnightly"|"never",
|
|
327
|
+
monthAdded?: number,
|
|
328
|
+
placementsCharged?: boolean,
|
|
329
|
+
visibleAddresses?: string[],
|
|
330
|
+
visibleListings?: string[],
|
|
331
|
+
requestedVisibleAddresses?: string[],
|
|
332
|
+
requestedVisibleListings?: string[]
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
export type AnalyticsItem = {
|
|
336
|
+
units?: "placements"|"weeks"|"days"|"hours",
|
|
337
|
+
name?: string
|
|
338
|
+
total?: number,
|
|
339
|
+
completion?: {
|
|
340
|
+
total?: number,
|
|
341
|
+
completed?: number
|
|
342
|
+
},
|
|
343
|
+
time?: {[key: string]: {date?:string, total?: number, completion?: {total?: number, completed?:number}}},
|
|
344
|
+
year?: {[key: string]: {year?: number, total?: number, completion?: {total?: number, completed?:number}}},
|
|
345
|
+
subtypes?: {[key:string]: AnalyticsItem}
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
export type UserGroupData = {
|
|
349
|
+
id: string,
|
|
350
|
+
default?: boolean,
|
|
351
|
+
name: string,
|
|
352
|
+
template: "Staff"|"Students",
|
|
353
|
+
oId: string,
|
|
354
|
+
product: Products,
|
|
355
|
+
viewStudents: "all"|"filter"|"none",
|
|
356
|
+
filterUsersBy?: string,
|
|
357
|
+
filterUsersValue?: string,
|
|
358
|
+
}&ProviderUserPermissions
|
|
359
|
+
|
|
360
|
+
export type StaffUserGroup = UserGroupData & StaffUserPermissions
|
|
361
|
+
export type ProviderUserGroup = UserGroupData & ProviderUserPermissions
|
|
362
|
+
|
|
363
|
+
export type StaffUserPermissions =
|
|
364
|
+
UserGroupData & {
|
|
365
|
+
viewStaff: boolean,
|
|
366
|
+
addStaff?: boolean,
|
|
367
|
+
activateStaff?: boolean,
|
|
368
|
+
editStaff?: boolean,
|
|
369
|
+
deleteStaff?: boolean,
|
|
370
|
+
addStaffGroups?: boolean,
|
|
371
|
+
editStaffGroups?: boolean,
|
|
372
|
+
deleteStaffGroups?: boolean,
|
|
373
|
+
addStudents?: boolean,
|
|
374
|
+
activateStudents?: boolean,
|
|
375
|
+
editStudents?: boolean,
|
|
376
|
+
deleteStudents?: boolean,
|
|
377
|
+
viewSetup?: boolean,
|
|
378
|
+
editInstitute?: boolean,
|
|
379
|
+
addForms?: boolean,
|
|
380
|
+
editForms?: boolean,
|
|
381
|
+
deleteForms?: boolean,
|
|
382
|
+
addFiles?: boolean,
|
|
383
|
+
deleteFiles?: boolean,
|
|
384
|
+
viewBilling?: boolean,
|
|
385
|
+
manageBilling?: boolean,
|
|
386
|
+
proposePlacements?: boolean,
|
|
387
|
+
createCohorts?: boolean,
|
|
388
|
+
viewPlacements?: boolean,
|
|
389
|
+
viewPlacementTasks?: boolean,
|
|
390
|
+
signOffPlacements?: boolean,
|
|
391
|
+
editPlacements?: boolean,
|
|
392
|
+
addPlacements?: boolean,
|
|
393
|
+
deletePlacements?: boolean,
|
|
394
|
+
verifyInsurance?: boolean,
|
|
395
|
+
verifyListings?: boolean
|
|
396
|
+
viewDatabase?: boolean,
|
|
397
|
+
addListings?: boolean,
|
|
398
|
+
deleteListings?: boolean,
|
|
399
|
+
verifyRiskAssessments?: boolean,
|
|
400
|
+
verifyDbsChecks?: boolean,
|
|
401
|
+
addCohorts?: boolean,
|
|
402
|
+
editCohorts?: boolean,
|
|
403
|
+
deleteCohorts?: boolean,
|
|
404
|
+
editRequests?: boolean,
|
|
405
|
+
deleteRequests?: boolean
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
export type ProviderUserPermissions = {
|
|
409
|
+
viewStaff: boolean,
|
|
410
|
+
addStaff?: boolean,
|
|
411
|
+
activateStaff?: boolean,
|
|
412
|
+
editStaff?: boolean,
|
|
413
|
+
deleteStaff?: boolean,
|
|
414
|
+
addUserGroups?: boolean,
|
|
415
|
+
editUserGroups?: boolean,
|
|
416
|
+
deleteUserGroups?: boolean,
|
|
417
|
+
addStudents?: boolean,
|
|
418
|
+
addForms?: boolean,
|
|
419
|
+
editForms?: boolean,
|
|
420
|
+
deleteForms?: boolean,
|
|
421
|
+
addFiles?: boolean,
|
|
422
|
+
deleteFiles?: boolean,
|
|
423
|
+
viewBilling?: boolean,
|
|
424
|
+
manageBilling?: boolean,
|
|
425
|
+
createPlacementListing?: "any"|"template"|"none",
|
|
426
|
+
createPlacementTemplate?: boolean,
|
|
427
|
+
viewPlacementListings?: "all"|"request"|"none",
|
|
428
|
+
viewPlacementGroups?: "all"|"request"|"none",
|
|
429
|
+
viewAddresses?: "all"|"request"|"none",
|
|
430
|
+
processApplicants?: boolean,
|
|
431
|
+
addAddresses?: boolean,
|
|
432
|
+
editAddresses?: boolean,
|
|
433
|
+
deleteAddresses?: boolean,
|
|
434
|
+
addApplicantWorkflows?: boolean,
|
|
435
|
+
editApplicantWorkflows?: boolean,
|
|
436
|
+
deleteApplicantWorkflows?: boolean,
|
|
437
|
+
editRequests?: boolean,
|
|
438
|
+
deleteRequests?: boolean,
|
|
439
|
+
manageAccessRequests?: boolean,
|
|
440
|
+
manageRegistrationRequests?: boolean,
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export type RegistrationRequest = {
|
|
444
|
+
forename: string,
|
|
445
|
+
surname: string,
|
|
446
|
+
email: string,
|
|
447
|
+
message: string,
|
|
448
|
+
created: string,
|
|
449
|
+
oId: string,
|
|
450
|
+
product: "providers"|"institutes"
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export type WorkflowStage = {
|
|
454
|
+
id: number,
|
|
455
|
+
name: string,
|
|
456
|
+
permanent?: boolean,
|
|
457
|
+
checkpoint?: boolean,
|
|
458
|
+
buttons?: {id: number, name: string|false, required: boolean}[],
|
|
459
|
+
pos?: { x: number, y: number },
|
|
460
|
+
userType?: "Students" | "Staff" | "Provider" | "Parent",
|
|
461
|
+
forms?: string[],
|
|
462
|
+
files?: string[],
|
|
463
|
+
deadline?: string,
|
|
464
|
+
deadlineType?: "date"|"days"
|
|
465
|
+
formDetails?: [{name: string}],
|
|
466
|
+
eli?: boolean,
|
|
467
|
+
riskAssessment?: boolean,
|
|
468
|
+
dbsCheck?: boolean,
|
|
469
|
+
defaultForms?: {
|
|
470
|
+
name: string,
|
|
471
|
+
description: string,
|
|
472
|
+
time: "during"|"post",
|
|
473
|
+
user: "staff"|"students"|"provider",
|
|
474
|
+
details: CustomFormSchema
|
|
475
|
+
}[],
|
|
476
|
+
requiredFiles?: {fileName: string, fileType: string}[]
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
export type ProviderPlacementData = {
|
|
480
|
+
title: string,
|
|
481
|
+
name: string,
|
|
482
|
+
providerPhone: string,
|
|
483
|
+
providerEmail: string,
|
|
484
|
+
contactForename: string,
|
|
485
|
+
contactSurname: string,
|
|
486
|
+
providerId: string,
|
|
487
|
+
addressId: string,
|
|
488
|
+
sector: string,
|
|
489
|
+
subsector: string,
|
|
490
|
+
id?: string
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
export type ProviderData = {
|
|
495
|
+
staff: number,
|
|
496
|
+
staffFields: string[],
|
|
497
|
+
staffActive: number,
|
|
498
|
+
admin: string,
|
|
499
|
+
name: string,
|
|
500
|
+
insurance: boolean,
|
|
501
|
+
regNumber?: string,
|
|
502
|
+
insuranceExpiry: string,
|
|
503
|
+
mapConsent?: boolean|"unlisted",
|
|
504
|
+
mapConsentDate?: string,
|
|
505
|
+
staffGuidance?: {[key:number]: string},
|
|
506
|
+
about?: string,
|
|
507
|
+
sector: string,
|
|
508
|
+
defAddress: string,
|
|
509
|
+
subsector: string,
|
|
510
|
+
website?: string,
|
|
511
|
+
savedBy?: {[key:string]: {
|
|
512
|
+
exists: true,
|
|
513
|
+
providerConsent: boolean,
|
|
514
|
+
providerConsentDate?: Timestamp,
|
|
515
|
+
status: "uploaded"|"approved"|"blocked"}},
|
|
516
|
+
onboarding?: {
|
|
517
|
+
hasStaff?: boolean,
|
|
518
|
+
multipleAddresses?: boolean,
|
|
519
|
+
}
|
|
520
|
+
registrationRequests?: boolean|string,
|
|
521
|
+
registrationRequestsDate?: string,
|
|
522
|
+
information: {
|
|
523
|
+
description?: string,
|
|
524
|
+
staff?: string,
|
|
525
|
+
locations?: number,
|
|
526
|
+
},
|
|
527
|
+
discount?: string,
|
|
528
|
+
package?: string,
|
|
529
|
+
splitBilling?: boolean,
|
|
530
|
+
adminBillingContactId: string,
|
|
531
|
+
addOnPackages?: string[],
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
export type InstituteData = {
|
|
535
|
+
students: number,
|
|
536
|
+
staff: number,
|
|
537
|
+
studentsFields: string[],
|
|
538
|
+
staffFields: string[],
|
|
539
|
+
studentsActive: number,
|
|
540
|
+
staffActive: number,
|
|
541
|
+
admin: string,
|
|
542
|
+
name: string
|
|
543
|
+
verifiedProviders?: string[],
|
|
544
|
+
awaitingProviderInsurance?: string[],
|
|
545
|
+
verifiedRiskAssessments?: string[],
|
|
546
|
+
awaitingPlacementRiskAssessments?: string[],
|
|
547
|
+
verifiedDbsChecks?: string[],
|
|
548
|
+
awaitingPlacementDbsChecks?: string[],
|
|
549
|
+
staffGuidance?: {[key:number]: string}
|
|
550
|
+
studentsGuidance?: {[key:number]: string},
|
|
551
|
+
cohortRequests: {[oId: string]: {[cohortId: string]: string[]}},
|
|
552
|
+
externalProviderUploads?: boolean,
|
|
553
|
+
discount?: string,
|
|
554
|
+
package?: string,
|
|
555
|
+
splitBilling?: boolean,
|
|
556
|
+
adminBillingContactId?: string,
|
|
557
|
+
addOnPackages?: string[]
|
|
558
|
+
}&Address;
|
|
559
|
+
|
|
560
|
+
export type NotificationObject = {
|
|
561
|
+
buttonURL: string,
|
|
562
|
+
created: Timestamp,
|
|
563
|
+
description: string,
|
|
564
|
+
title: string,
|
|
565
|
+
viewableBy: string[],
|
|
566
|
+
viewedBy: string[],
|
|
567
|
+
docPath: DocumentReference<DocumentData>
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
export type CustomFormSchemaField = {
|
|
571
|
+
id: number,
|
|
572
|
+
label: string,
|
|
573
|
+
required: boolean,
|
|
574
|
+
type: "short"|"long"|"number"|"date"|"dropdown"|"checkbox"|"rating" // If Microsoft forms has more, make a note and I'll add them
|
|
575
|
+
width: number, // 1-12 default 12
|
|
576
|
+
subtitle?: string,
|
|
577
|
+
extra: {
|
|
578
|
+
default?: boolean /* type: checkbox */ | string /* type: short, long, dropdown (inputted option) */ | number /* type:number */,
|
|
579
|
+
min?: number /* type: number */
|
|
580
|
+
max?: number /* type: number */
|
|
581
|
+
minRows?: number /* type: long */
|
|
582
|
+
options?: string[] // from dropdown only
|
|
583
|
+
levels?: number // For ratings, number of stars.
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
export type CustomFormSchemaSection =
|
|
588
|
+
{
|
|
589
|
+
id: number // random
|
|
590
|
+
title?: string,
|
|
591
|
+
description?: string,
|
|
592
|
+
fields: CustomFormSchemaField[]
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
export type CustomFormSchema = {
|
|
597
|
+
name?: string,
|
|
598
|
+
description?: string,
|
|
599
|
+
updated?: string,
|
|
600
|
+
id?: string,
|
|
601
|
+
form?: CustomFormSchemaSection[]}
|
|
602
|
+
|
|
603
|
+
export type StaffRoles = {
|
|
604
|
+
name: string,
|
|
605
|
+
filters: {
|
|
606
|
+
students: string[],
|
|
607
|
+
fields: {[key:string]: unknown},
|
|
608
|
+
},
|
|
609
|
+
staff: string[]
|
|
610
|
+
};
|
|
611
|
+
|
|
612
|
+
export type QueryObjectConstraint = [string, "=="|"<"|"<="|">="|">"|"!="|"array-contains"|"array-contains-any"|"in"|"not-in", string|boolean][]
|
|
613
|
+
|
|
614
|
+
export type QueryObject = {
|
|
615
|
+
path: string[],
|
|
616
|
+
where?: QueryObjectConstraint,
|
|
617
|
+
orderBy?: string
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
export type Note = {
|
|
621
|
+
title?: string,
|
|
622
|
+
body?: {
|
|
623
|
+
type: string;
|
|
624
|
+
children: {
|
|
625
|
+
text: string;
|
|
626
|
+
}[];
|
|
627
|
+
}[],
|
|
628
|
+
created: string,
|
|
629
|
+
updated: string
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
export type Referral = {
|
|
633
|
+
signUps: number,
|
|
634
|
+
volume: number,
|
|
635
|
+
product: Products,
|
|
636
|
+
expiry: Timestamp,
|
|
637
|
+
name: string
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
export type Contact = {
|
|
641
|
+
id: string,
|
|
642
|
+
contactForename: string,
|
|
643
|
+
contactSurname: string,
|
|
644
|
+
name: string,
|
|
645
|
+
providerEmail: string,
|
|
646
|
+
providerPhone: number,
|
|
647
|
+
"address-line1": string,
|
|
648
|
+
"address-line2": string,
|
|
649
|
+
locality: string,
|
|
650
|
+
postal_code: string,
|
|
651
|
+
country: string,
|
|
652
|
+
created: string,
|
|
653
|
+
docPath: unknown
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
export type CohortData = {
|
|
658
|
+
id?: string,
|
|
659
|
+
name: string,
|
|
660
|
+
placementType: "defined"|"continuous",
|
|
661
|
+
forms?: string[],
|
|
662
|
+
files?: string[],
|
|
663
|
+
startSubmission: string,
|
|
664
|
+
endSubmission: string,
|
|
665
|
+
startPlacements: string,
|
|
666
|
+
endPlacements: string,
|
|
667
|
+
stage: "info"|"name"|"placementType"|"students"|"workflow"|"review"|"created"|"archived",
|
|
668
|
+
workflow: WorkflowStage[]
|
|
669
|
+
customWorkflow?: boolean,
|
|
670
|
+
oId: string,
|
|
671
|
+
product: Products,
|
|
672
|
+
designatedStaff?: string,
|
|
673
|
+
logType?: "basic"|"custom",
|
|
674
|
+
logs?: {
|
|
675
|
+
students?: string,
|
|
676
|
+
staff?: string,
|
|
677
|
+
provider?: string,
|
|
678
|
+
}
|
|
679
|
+
feedback?: {
|
|
680
|
+
students?: string,
|
|
681
|
+
staff?: string,
|
|
682
|
+
provider?: string,
|
|
683
|
+
},
|
|
684
|
+
feedbackText?: {
|
|
685
|
+
students?: Descendant[],
|
|
686
|
+
staff?: Descendant[],
|
|
687
|
+
provider?: Descendant[],
|
|
688
|
+
},
|
|
689
|
+
providerFeedbackSent?: Timestamp,
|
|
690
|
+
studentsFeedbackSent?: Timestamp,
|
|
691
|
+
billingEmail?: string,
|
|
692
|
+
billingContactId?: string
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
export type ArrowObject = {
|
|
696
|
+
start: number|string,
|
|
697
|
+
end: number|string,
|
|
698
|
+
name: string|false,
|
|
699
|
+
required?: boolean,
|
|
700
|
+
screenX?: number,
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
export type PlacementReviewDetails = {
|
|
705
|
+
activeDates: string[],
|
|
706
|
+
studentForename: string,
|
|
707
|
+
studentSurname: string,
|
|
708
|
+
instituteName: string,
|
|
709
|
+
title: string,
|
|
710
|
+
product: string,
|
|
711
|
+
name: string,
|
|
712
|
+
startDate: string,
|
|
713
|
+
endDate: string,
|
|
714
|
+
providerEmail: string,
|
|
715
|
+
providerPhone: string,
|
|
716
|
+
contactForename: string,
|
|
717
|
+
contactSurname: string,
|
|
718
|
+
cohort: string,
|
|
719
|
+
cohortData?: CohortData,
|
|
720
|
+
providerKey: string,
|
|
721
|
+
status: number,
|
|
722
|
+
["address-line1"]: string,
|
|
723
|
+
["address-line2"]: string,
|
|
724
|
+
locality: string,
|
|
725
|
+
postal_code: string,
|
|
726
|
+
country: string,
|
|
727
|
+
key: string,
|
|
728
|
+
oId: string,
|
|
729
|
+
providerCompleted: string[],
|
|
730
|
+
providerId: string,
|
|
731
|
+
questions: PlacementQuestions,
|
|
732
|
+
mapConsent: boolean | "institute",
|
|
733
|
+
userType: string,
|
|
734
|
+
id: string,
|
|
735
|
+
uid: string,
|
|
736
|
+
leadTimes: string[],
|
|
737
|
+
requiredSections: string[],
|
|
738
|
+
existingPlacements?: {
|
|
739
|
+
[key: string]: {
|
|
740
|
+
mapConsent: boolean,
|
|
741
|
+
jobTitle: string,
|
|
742
|
+
questions: PlacementQuestions,
|
|
743
|
+
riskAssessment: boolean|"awaitingReview",
|
|
744
|
+
riskAssessmentType: "form"|"file",
|
|
745
|
+
riskAssessmentData?: {[key: string]: unknown},
|
|
746
|
+
dbsCheck: boolean|"awaitingReview",
|
|
747
|
+
dbsCheckType: "form"|"file",
|
|
748
|
+
dbsCheckData?: {[key: string]: unknown},
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
requireELI?: boolean,
|
|
752
|
+
requireRA?: boolean,
|
|
753
|
+
requireDBS?: boolean,
|
|
754
|
+
importedProviderForms: boolean,
|
|
755
|
+
currentStage: WorkflowStage,
|
|
756
|
+
placementId?: string,
|
|
757
|
+
incompleteItems: {[key: number]: string[]},
|
|
758
|
+
riskAssessmentData?: {[key: string]: unknown}[],
|
|
759
|
+
dbsCheckData?: {[key: string]: unknown}[],
|
|
760
|
+
feedbackText?: Descendant[],
|
|
761
|
+
feedback: CustomFormSchema,
|
|
762
|
+
providerFeedback?: {[key: string]: unknown}
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
export type BlogCategories = "students"|"providers"|"institutes"|"placementt"
|
|
766
|
+
|
|
767
|
+
export type Blog = {
|
|
768
|
+
title?: string,
|
|
769
|
+
summary?: string,
|
|
770
|
+
body?: Descendant[],
|
|
771
|
+
uploaded?: string,
|
|
772
|
+
category?: BlogCategories,
|
|
773
|
+
author?: string,
|
|
774
|
+
tags?: string
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
export type PlacementExportObject = {
|
|
778
|
+
cohortId: string,
|
|
779
|
+
startDate?: string,
|
|
780
|
+
endDate?: string,
|
|
781
|
+
allTime?: boolean,
|
|
782
|
+
includeStudentData?: boolean,
|
|
783
|
+
activePlacements?: boolean,
|
|
784
|
+
completedPlacements?: boolean,
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
export type ApplicantWorkflow = {
|
|
790
|
+
id?: string,
|
|
791
|
+
name: string,
|
|
792
|
+
forms?: string[],
|
|
793
|
+
files?: string[],
|
|
794
|
+
workflow: ApplicantStage[]
|
|
795
|
+
customWorkflow?: boolean,
|
|
796
|
+
oId: string,
|
|
797
|
+
product: Products,
|
|
798
|
+
type: "simple"|"complex"
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
export type ApplicantStage = {
|
|
802
|
+
id: number,
|
|
803
|
+
name: string,
|
|
804
|
+
message?: string,
|
|
805
|
+
userType?: "Students" | "Staff",
|
|
806
|
+
permanent?: boolean,
|
|
807
|
+
checkpoint?: boolean,
|
|
808
|
+
buttons?: {id: number, name: string|false, required: boolean}[],
|
|
809
|
+
pos?: { x: number, y: number },
|
|
810
|
+
forms?: string[],
|
|
811
|
+
files?: string[],
|
|
812
|
+
deadline?: string,
|
|
813
|
+
deadlineType?: "date"|"days"
|
|
814
|
+
formDetails?: {[key: string]: {
|
|
815
|
+
name: string,
|
|
816
|
+
id: string,
|
|
817
|
+
description?: string,
|
|
818
|
+
product: Products,
|
|
819
|
+
oId: string,
|
|
820
|
+
form: CustomFormSchema
|
|
821
|
+
}},
|
|
822
|
+
requiredFiles?: {fileName: string, fileType: string}[]
|
|
823
|
+
portfolio?: boolean,
|
|
824
|
+
viewableFiles?: {[key: string]: FileItem},
|
|
825
|
+
};
|
|
826
|
+
|
|
827
|
+
export type Application = {
|
|
828
|
+
id?: string,
|
|
829
|
+
uid: string,
|
|
830
|
+
applicantWorkflowId: string,
|
|
831
|
+
listingId: string,
|
|
832
|
+
providerId: string,
|
|
833
|
+
reqUserType: "Students"|"Staff",
|
|
834
|
+
completedSections: {[stage: number]: {
|
|
835
|
+
submitted?: string,
|
|
836
|
+
filesViewed?: string[],
|
|
837
|
+
formsCompleted?: {[key: string]: unknown},
|
|
838
|
+
filesUploaded?: {[key: number]: string[]},
|
|
839
|
+
}},
|
|
840
|
+
created: string,
|
|
841
|
+
submitted: string,
|
|
842
|
+
startDate: string,
|
|
843
|
+
endDate: string,
|
|
844
|
+
leadTimes?: string[],
|
|
845
|
+
stage: number, // This is what stage of the custom workflow.
|
|
846
|
+
outcomeMessage?: string,
|
|
847
|
+
status: "draft"|"submitted"|"approved"|"declined",
|
|
848
|
+
placementId?: string,
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
export type Report = {
|
|
852
|
+
added: string,
|
|
853
|
+
id: string,
|
|
854
|
+
oId: string,
|
|
855
|
+
product: Products,
|
|
856
|
+
pId: string,
|
|
857
|
+
reason: string,
|
|
858
|
+
uid: string,
|
|
859
|
+
status: "open"|"closed"
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
export type FileItem = {
|
|
864
|
+
product: Products,
|
|
865
|
+
oId: string,
|
|
866
|
+
added: string,
|
|
867
|
+
name: string,
|
|
868
|
+
fileName: string,
|
|
869
|
+
url?: string
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
export type Event = {
|
|
873
|
+
collection: "users"|"placements"|"placementListings",
|
|
874
|
+
documentId: string,
|
|
875
|
+
product: Products,
|
|
876
|
+
oId: string,
|
|
877
|
+
created: Timestamp,
|
|
878
|
+
title: string,
|
|
879
|
+
description?: string,
|
|
880
|
+
severity: string,
|
|
881
|
+
button?: {title: string, url: string}
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
export type BillingPackage = {
|
|
885
|
+
name: string,
|
|
886
|
+
staffUnitCost: number,
|
|
887
|
+
studentUnitCost: number,
|
|
888
|
+
placementUnitCost: number,
|
|
889
|
+
product: Products,
|
|
890
|
+
priority: number,
|
|
891
|
+
features: {[key: string]: number|boolean|string},
|
|
892
|
+
description: string
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
|