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