placementt-core 1.20.197 → 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.
Files changed (135) hide show
  1. package/.eslintrc.js +40 -40
  2. package/.gitattributes +2 -2
  3. package/lib/config.d.ts +0 -1
  4. package/lib/constants.d.ts +5 -2
  5. package/lib/constants.js +130 -136
  6. package/lib/constants.js.map +1 -1
  7. package/lib/features/analytics/useAnalytics.d.ts +0 -1
  8. package/lib/features/analytics/useAnalytics.js +3 -4
  9. package/lib/features/analytics/useAnalytics.js.map +1 -1
  10. package/lib/features/config.d.ts +133 -133
  11. package/lib/features/config.js +35 -35
  12. package/lib/features/contacts/contacts.d.ts +75 -75
  13. package/lib/features/contacts/contacts.js +105 -105
  14. package/lib/features/contacts/contactsSlice.d.ts +5 -5
  15. package/lib/features/contacts/useContacts.js +1 -2
  16. package/lib/features/contacts/useContacts.js.map +1 -1
  17. package/lib/features/downtime/useDowntime.d.ts +11 -11
  18. package/lib/features/downtime/useDowntime.js +22 -22
  19. package/lib/features/dropdown/useDropdown.d.ts +2 -3
  20. package/lib/features/dropdown/useDropdown.js +1 -2
  21. package/lib/features/dropdown/useDropdown.js.map +1 -1
  22. package/lib/features/global/downtime/useDowntime.d.ts +0 -1
  23. package/lib/features/global/downtime/useDowntime.js +3 -2
  24. package/lib/features/global/downtime/useDowntime.js.map +1 -1
  25. package/lib/features/global/users/useUserFunctions.d.ts +0 -1
  26. package/lib/features/global/users/useUserFunctions.js +6 -7
  27. package/lib/features/global/users/useUserFunctions.js.map +1 -1
  28. package/lib/features/placements/studentPlacements/activePlacement.d.ts +1 -1
  29. package/lib/features/placements/studentPlacements/activePlacement.js +1 -1
  30. package/lib/features/placements/studentPlacements/activePlacement.js.map +1 -1
  31. package/lib/features/placements/studentPlacements/completedStudentPlacementsSlice.d.ts +4 -5
  32. package/lib/features/placements/studentPlacements/completedStudentPlacementsSlice.js +1 -4
  33. package/lib/features/placements/studentPlacements/completedStudentPlacementsSlice.js.map +1 -1
  34. package/lib/features/placements/studentPlacements/studentPlacementsSlice.d.ts +63 -63
  35. package/lib/features/placements/studentPlacements/studentPlacementsSlice.js +81 -81
  36. package/lib/features/placements/studentPlacements/upcomingStudentPlacementsSlice.d.ts +4 -4
  37. package/lib/features/placements/studentPlacements/upcomingStudentPlacementsSlice.js +1 -1
  38. package/lib/features/placements/studentPlacements/upcomingStudentPlacementsSlice.js.map +1 -1
  39. package/lib/features/placements/studentPlacements/useStudentPlacements.d.ts +0 -1
  40. package/lib/features/placements/studentPlacements/useStudentPlacements.js +1 -2
  41. package/lib/features/placements/studentPlacements/useStudentPlacements.js.map +1 -1
  42. package/lib/features/providerPlacements/providerPlacementsSlice.d.ts +19 -19
  43. package/lib/features/providerPlacements/providerPlacementsSlice.js +24 -24
  44. package/lib/features/referrals/useReferrals.d.ts +0 -1
  45. package/lib/features/referrals/useReferrals.js +1 -2
  46. package/lib/features/referrals/useReferrals.js.map +1 -1
  47. package/lib/features/studentPlacements/studentPlacementsSlice.d.ts +62 -62
  48. package/lib/features/studentPlacements/studentPlacementsSlice.js +87 -87
  49. package/lib/features/studentPlacements/useStudentPlacements.d.ts +6 -6
  50. package/lib/features/studentPlacements/useStudentPlacements.js +18 -18
  51. package/lib/features/updates/useUpdates.js +1 -2
  52. package/lib/features/updates/useUpdates.js.map +1 -1
  53. package/lib/features/userSlice.d.ts +26 -26
  54. package/lib/features/userSlice.js +23 -23
  55. package/lib/features/users/useUserFunctions.d.ts +25 -25
  56. package/lib/features/users/useUserFunctions.js +124 -124
  57. package/lib/features/users/userSlice.d.ts +46 -46
  58. package/lib/features/users/userSlice.js +48 -48
  59. package/lib/firebase/firebase.d.ts +1 -1
  60. package/lib/firebase/firebase.js +9 -4
  61. package/lib/firebase/firebase.js.map +1 -1
  62. package/lib/firebase/firebaseConfig.js +3 -0
  63. package/lib/firebase/firebaseConfig.js.map +1 -1
  64. package/lib/firebase/firebaseQuery.js +3 -0
  65. package/lib/firebase/firebaseQuery.js.map +1 -1
  66. package/lib/firebase/persistence.js +2 -2
  67. package/lib/firebase/persistence.js.map +1 -1
  68. package/lib/firebase/readDatabase.d.ts +9 -6
  69. package/lib/firebase/readDatabase.js +16 -6
  70. package/lib/firebase/readDatabase.js.map +1 -1
  71. package/lib/firebase/util.d.ts +3 -4
  72. package/lib/firebase/util.js +49 -4
  73. package/lib/firebase/util.js.map +1 -1
  74. package/lib/firebase/writeDatabase.d.ts +3 -3
  75. package/lib/firebase/writeDatabase.js +7 -1
  76. package/lib/firebase/writeDatabase.js.map +1 -1
  77. package/lib/hooks.d.ts +384 -23
  78. package/lib/hooks.js +1342 -223
  79. package/lib/hooks.js.map +1 -1
  80. package/lib/images/GatsbyBenchmarks.d.ts +0 -1
  81. package/lib/images/GatsbyBenchmarks.js +1 -1
  82. package/lib/images/GatsbyBenchmarks.js.map +1 -1
  83. package/lib/reduxHooks.d.ts +11 -20
  84. package/lib/reduxHooks.js +28 -18
  85. package/lib/reduxHooks.js.map +1 -1
  86. package/lib/tasksAndTips.d.ts +25 -5
  87. package/lib/tasksAndTips.js +346 -48
  88. package/lib/tasksAndTips.js.map +1 -1
  89. package/lib/typeDefinitions.d.ts +478 -53
  90. package/lib/util.d.ts +1 -0
  91. package/lib/util.js +78 -6
  92. package/lib/util.js.map +1 -1
  93. package/package.json +52 -49
  94. package/src/DatabaseDefinitions.ts +18 -18
  95. package/src/apiCalls.ts +128 -128
  96. package/src/config.ts +50 -50
  97. package/src/constants.ts +708 -707
  98. package/src/databaseTypes.ts +42 -42
  99. package/src/features/analytics/useAnalytics.tsx +55 -55
  100. package/src/features/contacts/contactsSlice.ts +147 -147
  101. package/src/features/contacts/useContacts.tsx +73 -73
  102. package/src/features/dropdown/useDropdown.tsx +52 -52
  103. package/src/features/global/downtime/useDowntime.tsx +19 -18
  104. package/src/features/global/users/useUserFunctions.tsx +132 -132
  105. package/src/features/jobs/jobsSlice.ts +65 -65
  106. package/src/features/placements/studentPlacements/activePlacement.ts +63 -63
  107. package/src/features/placements/studentPlacements/completedStudentPlacementsSlice.ts +94 -97
  108. package/src/features/placements/studentPlacements/upcomingStudentPlacementsSlice.ts +108 -108
  109. package/src/features/placements/studentPlacements/useStudentPlacements.tsx +33 -33
  110. package/src/features/placements/types.ts +10 -10
  111. package/src/features/referrals/useReferrals.tsx +56 -56
  112. package/src/features/updates/useUpdates.tsx +36 -36
  113. package/src/firebase/firebase.tsx +142 -138
  114. package/src/firebase/firebaseConfig.tsx +45 -42
  115. package/src/firebase/firebaseQuery.tsx +143 -140
  116. package/src/firebase/persistence.ts +84 -84
  117. package/src/firebase/readDatabase.tsx +208 -197
  118. package/src/firebase/util.tsx +352 -308
  119. package/src/firebase/writeDatabase.tsx +75 -68
  120. package/src/hooks.tsx +3395 -1943
  121. package/src/images/GatsbyBenchmarks.tsx +711 -711
  122. package/src/images/LogFuturePlacement.jsx +64 -64
  123. package/src/images/LogPreviousPlacement.jsx +228 -228
  124. package/src/images/gatsby_benchmarks.svg +466 -466
  125. package/src/images/log_future_placement.svg +114 -114
  126. package/src/images/log_previous_placement.svg +199 -199
  127. package/src/index.ts +34 -34
  128. package/src/readDatabase.tsx +3 -3
  129. package/src/reduxHooks.ts +183 -170
  130. package/src/tasksAndTips.ts +744 -410
  131. package/src/tutorialTips.ts +58 -58
  132. package/src/typeDefinitions.ts +899 -503
  133. package/src/util.ts +132 -47
  134. package/tsconfig.dev.json +5 -5
  135. package/tsconfig.json +21 -21
@@ -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
- questions: PlacementQuestions
45
- staffRoles: string[],
46
- sector: string,
47
- subsector: string,
48
- importedProviderForms?: boolean,
49
- analytics: string[],
50
- units: string,
51
- active: boolean,
52
- completed: boolean,
53
- personalAnalytics?: string[],
54
- contactId?: string
55
- created: string,
56
- inProgress: boolean,
57
- draft: boolean,
58
- activeDates: string[],
59
- insurance: boolean|"awaitingReview",
60
- };
61
-
62
- export type PlacementQuestions = {
63
- title: string,
64
- description: string
65
- dressCode: string,
66
- dressCodeText?: string,
67
- firstDayContact: string
68
- equipment: string
69
- responsibilities: string
70
- experiencesGiven: string
71
- experienceDesired: string
72
- otherAdvice: string
73
- carParking: boolean
74
- bikeStorage: boolean
75
- wheelchairFriendly: boolean
76
- kitchen: boolean,
77
- studentLevel: "gcse"|"college"|"undergraduate"|"postgraduate",
78
- desiredLength: number,
79
- desiredLengthUnits: "days"|"weeks"|"months",
80
- maximumStudents: number,
81
- workingLocation: "inPerson"|"hybrid"|"remote"
82
- }
83
-
84
- export type PlacementListing = {
85
- title: string,
86
- uid: string,
87
- providerId?: string,
88
- name: string,
89
- providerEmail: string,
90
- providerPhone: string,
91
- id:string,
92
- studentType: "secondary" | "higher" | "undergraduate" | "postgraduate"
93
- contactForename: string,
94
- contactSurname: string,
95
- ["address-line1"]: string,
96
- ["address-line2"]: string,
97
- locality: string,
98
- postal_code: string,
99
- country: string,
100
- addressId?: string,
101
- geoHash?: string,
102
- status: "listed"|"unlisted"|"deleted",
103
- questions: PlacementQuestions,
104
- savedBy?: {[key:string]: {
105
- exists: true,
106
- providerConsent: boolean,
107
- providerConsentDate?: Timestamp,
108
- status: "uploaded"|"approved"|"rejected"|"blocked"}},
109
- mapConsent?: boolean,
110
- mapConsentData?: string,
111
- uploadedBy: "student"|"institute"|"provider"
112
- }
113
-
114
- export type OrganisationAddress = Address & {
115
- name?: string,
116
- savedBy?: string[],
117
- product: Products,
118
- oId: string
119
- };
120
-
121
- export type Address = {
122
- id?: string,
123
- ["address-line1"]: string,
124
- ["address-line2"]: string,
125
- locality: string,
126
- postal_code: string,
127
- country: string,
128
- geoHash?: string
129
- };
130
-
131
- export type FlagCodes =
132
- "inactive" |
133
- "noParentEmailWarning" |
134
- "noParentEmailError" |
135
- "overdue" |
136
- "noInsurance" |
137
- "nearingStart"|
138
- "awaitingInsurance"|
139
- "notVerified"|
140
- "needInformation"
141
-
142
-
143
- export type UserData = {
144
- details: {
145
- forename: string,
146
- surname: string,
147
- parentEmail: string,
148
- year?: string
149
- },
150
- email: string,
151
- phone?: string,
152
- status: "active" | "inactive" | "unclaimed",
153
- favGuidance?: string[];
154
- oId: string
155
- id: string,
156
- resetExpiry?: {seconds: number},
157
- product: Products,
158
- userGroup?: string,
159
- userType: "Staff"|"Students",
160
- created: string,
161
- activated: string,
162
- groupData?: UserGroupData,
163
- staffRoles: string[],
164
- flags?: FlagCodes[],
165
- cohortRequests: {[oId: string]: string[]},
166
- cohorts: {[oId: string]: string[]},
167
- analytics?: AnalyticsItem,
168
- units?: string,
169
- activationCode: number,
170
- cohort?: string,
171
- cohortData?: CohortData,
172
- dismissedTasks?: string[],
173
- dismissedTutorials?: string[],
174
- dismissedTips?: string[],
175
- viewCohorts?: "all"|"some"|"none",
176
- viewUsers?: "all"|"some",
177
- studentFilterValues?: string,
178
- studentFilter?: string
179
- visibleCohorts?: string,
180
- readUpdates?: string[],
181
- contactProviderConsent?: boolean,
182
- contactProviderConsenDate?: boolean
183
- referrals?: number,
184
- shareNameWithReferralLeaderboardConsent?: boolean,
185
- shareNameWithReferralLeaderboardConsentDate?: boolean,
186
- referralCode?: string
187
- };
188
-
189
- export type AnalyticsItem = {
190
- units?: "placements"|"weeks"|"days"|"hours",
191
- name?: string
192
- total?: number,
193
- completion?: {
194
- total?: number,
195
- completed?: number
196
- },
197
- time?: {[key: string]: {date?:string, total?: number, completion?: {total?: number, completed?:number}}},
198
- year?: {[key: string]: {year?: number, total?: number, completion?: {total?: number, completed?:number}}},
199
- subtypes?: {[key:string]: AnalyticsItem}
200
- }
201
-
202
- export type UserGroupData = {
203
- id: string,
204
- default?: boolean,
205
- name: string,
206
- template: "Staff"|"Students",
207
- oId: string,
208
- product: Products,
209
- viewStudents: "all"|"filter"|"none",
210
- filterUsersBy?: string,
211
- filterUsersValue?: string,
212
- }
213
-
214
- export type StaffUserGroup =
215
- UserGroupData & {
216
- viewStaff: boolean,
217
- viewCohorts: "all"|"some"|"none",
218
- cohorts?: string[],
219
- viewStudents: "all"|"filter"|"none",
220
- filterUsersBy?: string,
221
- filterUsersValue?: string,
222
- addStaff?: boolean,
223
- editStaff?: boolean,
224
- deleteStaff?: boolean,
225
- addStaffGroups?: boolean,
226
- editStaffGroups?: boolean,
227
- deleteStaffGroups?: boolean,
228
- addStudents?: boolean,
229
- editStudents?: boolean,
230
- deleteStudents?: boolean,
231
- viewSetup?: boolean,
232
- editInstitute?: boolean,
233
- addForms?: boolean,
234
- editForms?: boolean,
235
- deleteForms?: boolean,
236
- addFiles?: boolean,
237
- deleteFiles?: boolean,
238
- viewBilling?: boolean,
239
- manageBilling?: boolean,
240
- proposePlacements?: boolean,
241
- createCohorts?: boolean,
242
- }
243
-
244
- export type WorkflowStage = {
245
- id: number,
246
- name: string,
247
- permanent?: boolean,
248
- checkpoint?: boolean,
249
- buttons?: {id: number, name: string|false, required: boolean}[],
250
- pos?: { x: number, y: number },
251
- userType?: "Students" | "Staff" | "Provider" | "Parent",
252
- forms?: string[],
253
- files?: string[],
254
- deadline?: string,
255
- deadlineType?: "date"|"days"
256
- formDetails?: [{name: string}],
257
- eli?: boolean,
258
- defaultForms?: {
259
- name: string,
260
- description: string,
261
- time: "during"|"post",
262
- user: "staff"|"students"|"provider",
263
- details: CustomFormSchema
264
- }[]
265
- };
266
-
267
- export type ProviderPlacementData = {
268
- title: string,
269
- name: string,
270
- providerPhone: string,
271
- providerEmail: string,
272
- contactForename: string,
273
- contactSurname: string,
274
- providerId: string,
275
- addressId: string,
276
- sector: string,
277
- subsector: string,
278
- id?: string
279
- };
280
-
281
-
282
- export type ProviderData = {
283
- staff: number,
284
- staffFields: string[],
285
- staffActive: number,
286
- admin: string,
287
- name: string,
288
- insurance: boolean,
289
- regNumber?: string,
290
- insuranceExpiry: string,
291
- mapConsent?: boolean,
292
- mapConsentDate?: string,
293
- staffGuidance?: {[key:number]: string},
294
- sector: string,
295
- defAddress: string,
296
- subsector: string,
297
- website?: string,
298
- savedBy?: {[key:string]: {
299
- exists: true,
300
- providerConsent: boolean,
301
- providerConsentDate?: Timestamp,
302
- status: "uploaded"|"approved"|"blocked"}},
303
- }
304
-
305
- export type InstituteData = {
306
- students: number,
307
- staff: number,
308
- studentsFields: string[],
309
- staffFields: string[],
310
- studentsActive: number,
311
- staffActive: number,
312
- admin: string,
313
- name: string
314
- verifiedProviders?: string[],
315
- awaitingProviderInsurance?: string[],
316
- staffGuidance?: {[key:number]: string}
317
- studentsGuidance?: {[key:number]: string},
318
- cohortRequests: {[oId: string]: {[cohortId: string]: string[]}},
319
- packages?: {[key:string]:unknown},
320
- externalProviderUploads?: boolean,
321
- }&Address;
322
-
323
- export type NotificationObject = {
324
- buttonURL: string,
325
- created: Timestamp,
326
- description: string,
327
- title: string,
328
- viewableBy: string[],
329
- viewedBy: string[],
330
- docPath: DocumentReference<DocumentData>
331
- }
332
-
333
- export type CustomFormSchema = [
334
- {
335
- id: number // random
336
- title: string,
337
- fields: {
338
- id: number,
339
- label: string,
340
- required: boolean,
341
- type: "short"|"long"|"number"|"date"|"dropdown"|"checkbox"|"rating" // If Microsoft forms has more, make a note and I'll add them
342
- width: number, // 1-12 default 12
343
- subtitle?: string,
344
- extra: {
345
- default?: boolean /* type: checkbox */ | string /* type: short, long, dropdown (inputted option) */ | number /* type:number */,
346
- min?: number /* type: number */
347
- max?: number /* type: number */
348
- minRows?: number /* type: long */
349
- options?: string[] // from dropdown only
350
- levels?: number // For ratings, number of stars.
351
- }
352
- }[]
353
- }
354
- ]
355
-
356
- export type StaffRoles = {
357
- name: string,
358
- filters: {
359
- students: string[],
360
- fields: {[key:string]: unknown},
361
- },
362
- staff: string[]
363
- };
364
-
365
- export type QueryObjectConstraint = [string, "=="|"<"|"<="|">="|">"|"!="|"array-contains"|"array-contains-any"|"in"|"not-in", string|boolean][]
366
-
367
- export type QueryObject = {
368
- path: string[],
369
- where?: QueryObjectConstraint,
370
- orderBy?: string
371
- };
372
-
373
- export type AdmissionsCohort = {
374
- name: string,
375
- students: {
376
- [key:string]: {
377
- email: string,
378
- status: "Pending"|"Accepted"|"Rejected"|"In institute"|"Account removed",
379
- forename: string,
380
- surname: string
381
- }
382
- },
383
- permissions: {[key:string]: unknown},
384
- expiry: string
385
- };
386
-
387
- export type Note = {
388
- title?: string,
389
- body?: {
390
- type: string;
391
- children: {
392
- text: string;
393
- }[];
394
- }[],
395
- created: string,
396
- updated: string
397
- }
398
-
399
- export type Referral = {
400
- signUps: number,
401
- volume: number,
402
- product: Products,
403
- expiry: Timestamp,
404
- name: string
405
- }
406
-
407
- export type Contact = {
408
- id: string,
409
- contactForename: string,
410
- contactSurname: string,
411
- name: string,
412
- providerEmail: string,
413
- providerPhone: number,
414
- "address-line1": string,
415
- "address-line2": string,
416
- locality: string,
417
- postal_code: string,
418
- country: string,
419
- created: string,
420
- docPath: unknown
421
- }
422
-
423
-
424
- export type CohortData = {
425
- id?: string,
426
- name: string,
427
- placementType: "defined"|"continuous",
428
- startSubmission: string,
429
- endSubmission: string,
430
- startPlacements: string,
431
- endPlacements: string,
432
- stage: "name"|"placementType"|"students"|"workflow"|"review"|"created"|"archived",
433
- workflow: WorkflowStage[],
434
- oId: string,
435
- product: Products,
436
- designatedStaff?: string
437
- }
438
-
439
- export type ArrowObject = {
440
- start: number|string,
441
- end: number|string,
442
- name: string|false,
443
- required?: boolean,
444
- screenX?: number,
445
- }
446
-
447
-
448
- export type PlacementReviewDetails = {
449
- studentForename: string,
450
- studentSurname: string,
451
- instituteName: string,
452
- title: string,
453
- product: string,
454
- name: string,
455
- startDate: string,
456
- endDate: string,
457
- providerEmail: string,
458
- providerPhone: string,
459
- contactForename: string,
460
- contactSurname: string,
461
- cohort: string,
462
- providerKey: string,
463
- status: number,
464
- ["address-line1"]: string,
465
- ["address-line2"]: string,
466
- locality: string,
467
- postal_code: string,
468
- country: string,
469
- key: string,
470
- oId: string,
471
- providerCompleted: string[],
472
- providerId: string,
473
- questions: PlacementQuestions,
474
- mapConsent: boolean | "institute",
475
- userType: string,
476
- id: string,
477
- uid: string,
478
- leadTimes: string[],
479
- requiredSections: string[],
480
- existingPlacements?: {
481
- [key: string]: {
482
- mapConsent: boolean,
483
- jobTitle: string,
484
- questions: PlacementQuestions
485
- }
486
- },
487
- requireELI?: boolean,
488
- importedProviderForms: boolean,
489
- currentStage: WorkflowStage,
490
- placementId?: string
491
- }
492
-
493
- export type BlogCategories = "students"|"providers"|"institutes"|"placementt"
494
-
495
- export type Blog = {
496
- title?: string,
497
- summary?: string,
498
- body?: Descendant[],
499
- uploaded?: string,
500
- category?: BlogCategories,
501
- author?: string,
502
- tags?: string
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
+