placementt-core 1.20.211 → 11.10.151

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