placementt-core 1.400.1221 → 1.400.1223
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/callables/events.d.ts +40 -3
- package/lib/callables/events.js +31 -3
- package/lib/callables/events.js.map +1 -1
- package/lib/callables/registry.d.ts +80 -6
- package/lib/typeDefinitions.d.ts +5 -0
- package/lib/typeDefinitions.js.map +1 -1
- package/package.json +1 -1
- package/src/callables/events.ts +31 -3
- package/src/typeDefinitions.ts +8 -0
|
@@ -119,16 +119,22 @@ export declare const eventsCallables: {
|
|
|
119
119
|
}>;
|
|
120
120
|
response: z.ZodObject<{
|
|
121
121
|
invited: z.ZodNumber;
|
|
122
|
+
linked: z.ZodNumber;
|
|
122
123
|
skipped: z.ZodNumber;
|
|
124
|
+
duplicates: z.ZodOptional<z.ZodNumber>;
|
|
123
125
|
remaining: z.ZodNumber;
|
|
124
126
|
}, "strip", z.ZodTypeAny, {
|
|
125
127
|
skipped: number;
|
|
128
|
+
linked: number;
|
|
126
129
|
invited: number;
|
|
127
130
|
remaining: number;
|
|
131
|
+
duplicates?: number | undefined;
|
|
128
132
|
}, {
|
|
129
133
|
skipped: number;
|
|
134
|
+
linked: number;
|
|
130
135
|
invited: number;
|
|
131
136
|
remaining: number;
|
|
137
|
+
duplicates?: number | undefined;
|
|
132
138
|
}>;
|
|
133
139
|
};
|
|
134
140
|
"events-getNonUserSchoolInvite": {
|
|
@@ -249,16 +255,47 @@ export declare const eventsCallables: {
|
|
|
249
255
|
students?: number | undefined;
|
|
250
256
|
}>]>;
|
|
251
257
|
response: z.ZodObject<{
|
|
252
|
-
code: z.ZodEnum<["updated", "emailed"]>;
|
|
258
|
+
code: z.ZodEnum<["updated", "emailed", "hasAccount", "alreadySignedUp"]>;
|
|
253
259
|
eventSchoolId: z.ZodOptional<z.ZodString>;
|
|
254
260
|
}, "strip", z.ZodTypeAny, {
|
|
255
|
-
code: "updated" | "emailed";
|
|
261
|
+
code: "updated" | "emailed" | "hasAccount" | "alreadySignedUp";
|
|
256
262
|
eventSchoolId?: string | undefined;
|
|
257
263
|
}, {
|
|
258
|
-
code: "updated" | "emailed";
|
|
264
|
+
code: "updated" | "emailed" | "hasAccount" | "alreadySignedUp";
|
|
259
265
|
eventSchoolId?: string | undefined;
|
|
260
266
|
}>;
|
|
261
267
|
};
|
|
268
|
+
"events-employerJoinEvent": {
|
|
269
|
+
request: z.ZodObject<{
|
|
270
|
+
eventId: z.ZodString;
|
|
271
|
+
externalEventAttendeeId: z.ZodOptional<z.ZodString>;
|
|
272
|
+
providerContactId: z.ZodOptional<z.ZodString>;
|
|
273
|
+
capacity: z.ZodOptional<z.ZodNumber>;
|
|
274
|
+
proposedDates: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
275
|
+
}, "strip", z.ZodTypeAny, {
|
|
276
|
+
eventId: string;
|
|
277
|
+
providerContactId?: string | undefined;
|
|
278
|
+
externalEventAttendeeId?: string | undefined;
|
|
279
|
+
capacity?: number | undefined;
|
|
280
|
+
proposedDates?: Record<string, unknown>[] | undefined;
|
|
281
|
+
}, {
|
|
282
|
+
eventId: string;
|
|
283
|
+
providerContactId?: string | undefined;
|
|
284
|
+
externalEventAttendeeId?: string | undefined;
|
|
285
|
+
capacity?: number | undefined;
|
|
286
|
+
proposedDates?: Record<string, unknown>[] | undefined;
|
|
287
|
+
}>;
|
|
288
|
+
response: z.ZodOptional<z.ZodObject<{
|
|
289
|
+
code: z.ZodEnum<["joined", "notFound", "notAccepting"]>;
|
|
290
|
+
externalEventAttendeeId: z.ZodOptional<z.ZodString>;
|
|
291
|
+
}, "strip", z.ZodTypeAny, {
|
|
292
|
+
code: "notFound" | "joined" | "notAccepting";
|
|
293
|
+
externalEventAttendeeId?: string | undefined;
|
|
294
|
+
}, {
|
|
295
|
+
code: "notFound" | "joined" | "notAccepting";
|
|
296
|
+
externalEventAttendeeId?: string | undefined;
|
|
297
|
+
}>>;
|
|
298
|
+
};
|
|
262
299
|
"events-removeEventSlotBooking": {
|
|
263
300
|
request: z.ZodObject<{
|
|
264
301
|
eventSchoolId: z.ZodString;
|
package/lib/callables/events.js
CHANGED
|
@@ -54,7 +54,9 @@ exports.eventsCallables = {
|
|
|
54
54
|
}),
|
|
55
55
|
},
|
|
56
56
|
// Hub staff only. Invites schools that aren't on the platform by email alone. Each event this is
|
|
57
|
-
// used on counts once per academic year against InstituteData.hubNonUserSchoolEvents.
|
|
57
|
+
// used on counts once per academic year against InstituteData.hubNonUserSchoolEvents. An address
|
|
58
|
+
// that belongs to a school already in the hub is invited through its account instead (linked),
|
|
59
|
+
// and doesn't use the allowance.
|
|
58
60
|
"events-inviteNonUserSchools": {
|
|
59
61
|
request: zod_1.z.object({
|
|
60
62
|
eventId: zod_1.z.string().min(1),
|
|
@@ -65,7 +67,11 @@ exports.eventsCallables = {
|
|
|
65
67
|
}),
|
|
66
68
|
response: zod_1.z.object({
|
|
67
69
|
invited: zod_1.z.number(),
|
|
70
|
+
linked: zod_1.z.number(),
|
|
68
71
|
skipped: zod_1.z.number(),
|
|
72
|
+
// Addresses left out because the same school is already on the event (by account,
|
|
73
|
+
// email domain or school name). Its existing invite is resent instead.
|
|
74
|
+
duplicates: zod_1.z.number().optional(),
|
|
69
75
|
remaining: zod_1.z.number(),
|
|
70
76
|
}),
|
|
71
77
|
},
|
|
@@ -95,7 +101,11 @@ exports.eventsCallables = {
|
|
|
95
101
|
}),
|
|
96
102
|
// Without eventSchoolId, a school signing itself up from the hub's shareable link: eventId
|
|
97
103
|
// and email are then required, and the response carries the new eventSchoolId, or
|
|
98
|
-
// "emailed" when that address already has an invite (its link is emailed, not returned)
|
|
104
|
+
// "emailed" when that address already has an invite (its link is emailed, not returned), or
|
|
105
|
+
// "hasAccount" when it belongs to a school already in the hub, which is invited through its
|
|
106
|
+
// account instead and accepts after logging in, or "alreadySignedUp" when the same school is
|
|
107
|
+
// already on the event under another address (matched by account, email domain or school
|
|
108
|
+
// name): no record is made and the link is emailed to whoever registered it.
|
|
99
109
|
zod_1.z.object({
|
|
100
110
|
action: zod_1.z.literal("accept"),
|
|
101
111
|
eventSchoolId: zod_1.z.string().min(1).optional(),
|
|
@@ -123,10 +133,28 @@ exports.eventsCallables = {
|
|
|
123
133
|
}),
|
|
124
134
|
]),
|
|
125
135
|
response: zod_1.z.object({
|
|
126
|
-
code: zod_1.z.enum(["updated", "emailed"]),
|
|
136
|
+
code: zod_1.z.enum(["updated", "emailed", "hasAccount", "alreadySignedUp"]),
|
|
127
137
|
eventSchoolId: zod_1.z.string().optional(),
|
|
128
138
|
}),
|
|
129
139
|
},
|
|
140
|
+
// Public: an employer joining an event. With externalEventAttendeeId it's the invited attendee
|
|
141
|
+
// from the email link (the id is the credential) accepting. Without, it's a self sign-up from
|
|
142
|
+
// the public event link for the providerContactId the employer just gave: the attendee is made
|
|
143
|
+
// "providerAvailable" and its id returned, so the page can show the invite tasks (forms,
|
|
144
|
+
// uploads, files to review) straight after. An employer already on the event gets its id back.
|
|
145
|
+
"events-employerJoinEvent": {
|
|
146
|
+
request: zod_1.z.object({
|
|
147
|
+
eventId: zod_1.z.string().min(1),
|
|
148
|
+
externalEventAttendeeId: zod_1.z.string().min(1).optional(),
|
|
149
|
+
providerContactId: zod_1.z.string().min(1).optional(),
|
|
150
|
+
capacity: zod_1.z.number().optional(),
|
|
151
|
+
proposedDates: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown())).optional(),
|
|
152
|
+
}),
|
|
153
|
+
response: zod_1.z.object({
|
|
154
|
+
code: zod_1.z.enum(["joined", "notFound", "notAccepting"]),
|
|
155
|
+
externalEventAttendeeId: zod_1.z.string().optional(),
|
|
156
|
+
}).optional(),
|
|
157
|
+
},
|
|
130
158
|
// Hub staff only. Frees the school's places in one slot.
|
|
131
159
|
"events-removeEventSlotBooking": {
|
|
132
160
|
request: zod_1.z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","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QACF,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;YACpD,uBAAuB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SACjD,CAAC,CAAC,QAAQ,EAAE;KAChB;IACD,yDAAyD;IACzD,+BAA+B,EAAE;QAC7B,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YACd,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YAChC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;SAC5B,CAAC;QACF,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC;SAC5B,CAAC;KACL;CACoB,CAAC"}
|
|
@@ -3317,16 +3317,22 @@ export declare const allCallables: {
|
|
|
3317
3317
|
}>;
|
|
3318
3318
|
response: z.ZodObject<{
|
|
3319
3319
|
invited: z.ZodNumber;
|
|
3320
|
+
linked: z.ZodNumber;
|
|
3320
3321
|
skipped: z.ZodNumber;
|
|
3322
|
+
duplicates: z.ZodOptional<z.ZodNumber>;
|
|
3321
3323
|
remaining: z.ZodNumber;
|
|
3322
3324
|
}, "strip", z.ZodTypeAny, {
|
|
3323
3325
|
skipped: number;
|
|
3326
|
+
linked: number;
|
|
3324
3327
|
invited: number;
|
|
3325
3328
|
remaining: number;
|
|
3329
|
+
duplicates?: number | undefined;
|
|
3326
3330
|
}, {
|
|
3327
3331
|
skipped: number;
|
|
3332
|
+
linked: number;
|
|
3328
3333
|
invited: number;
|
|
3329
3334
|
remaining: number;
|
|
3335
|
+
duplicates?: number | undefined;
|
|
3330
3336
|
}>;
|
|
3331
3337
|
};
|
|
3332
3338
|
"events-getNonUserSchoolInvite": {
|
|
@@ -3447,16 +3453,47 @@ export declare const allCallables: {
|
|
|
3447
3453
|
students?: number | undefined;
|
|
3448
3454
|
}>]>;
|
|
3449
3455
|
response: z.ZodObject<{
|
|
3450
|
-
code: z.ZodEnum<["updated", "emailed"]>;
|
|
3456
|
+
code: z.ZodEnum<["updated", "emailed", "hasAccount", "alreadySignedUp"]>;
|
|
3451
3457
|
eventSchoolId: z.ZodOptional<z.ZodString>;
|
|
3452
3458
|
}, "strip", z.ZodTypeAny, {
|
|
3453
|
-
code: "updated" | "emailed";
|
|
3459
|
+
code: "updated" | "emailed" | "hasAccount" | "alreadySignedUp";
|
|
3454
3460
|
eventSchoolId?: string | undefined;
|
|
3455
3461
|
}, {
|
|
3456
|
-
code: "updated" | "emailed";
|
|
3462
|
+
code: "updated" | "emailed" | "hasAccount" | "alreadySignedUp";
|
|
3457
3463
|
eventSchoolId?: string | undefined;
|
|
3458
3464
|
}>;
|
|
3459
3465
|
};
|
|
3466
|
+
"events-employerJoinEvent": {
|
|
3467
|
+
request: z.ZodObject<{
|
|
3468
|
+
eventId: z.ZodString;
|
|
3469
|
+
externalEventAttendeeId: z.ZodOptional<z.ZodString>;
|
|
3470
|
+
providerContactId: z.ZodOptional<z.ZodString>;
|
|
3471
|
+
capacity: z.ZodOptional<z.ZodNumber>;
|
|
3472
|
+
proposedDates: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
3473
|
+
}, "strip", z.ZodTypeAny, {
|
|
3474
|
+
eventId: string;
|
|
3475
|
+
providerContactId?: string | undefined;
|
|
3476
|
+
externalEventAttendeeId?: string | undefined;
|
|
3477
|
+
capacity?: number | undefined;
|
|
3478
|
+
proposedDates?: Record<string, unknown>[] | undefined;
|
|
3479
|
+
}, {
|
|
3480
|
+
eventId: string;
|
|
3481
|
+
providerContactId?: string | undefined;
|
|
3482
|
+
externalEventAttendeeId?: string | undefined;
|
|
3483
|
+
capacity?: number | undefined;
|
|
3484
|
+
proposedDates?: Record<string, unknown>[] | undefined;
|
|
3485
|
+
}>;
|
|
3486
|
+
response: z.ZodOptional<z.ZodObject<{
|
|
3487
|
+
code: z.ZodEnum<["joined", "notFound", "notAccepting"]>;
|
|
3488
|
+
externalEventAttendeeId: z.ZodOptional<z.ZodString>;
|
|
3489
|
+
}, "strip", z.ZodTypeAny, {
|
|
3490
|
+
code: "notFound" | "joined" | "notAccepting";
|
|
3491
|
+
externalEventAttendeeId?: string | undefined;
|
|
3492
|
+
}, {
|
|
3493
|
+
code: "notFound" | "joined" | "notAccepting";
|
|
3494
|
+
externalEventAttendeeId?: string | undefined;
|
|
3495
|
+
}>>;
|
|
3496
|
+
};
|
|
3460
3497
|
"events-removeEventSlotBooking": {
|
|
3461
3498
|
request: z.ZodObject<{
|
|
3462
3499
|
eventSchoolId: z.ZodString;
|
|
@@ -3706,16 +3743,22 @@ export declare const callableGroups: {
|
|
|
3706
3743
|
}>;
|
|
3707
3744
|
response: z.ZodObject<{
|
|
3708
3745
|
invited: z.ZodNumber;
|
|
3746
|
+
linked: z.ZodNumber;
|
|
3709
3747
|
skipped: z.ZodNumber;
|
|
3748
|
+
duplicates: z.ZodOptional<z.ZodNumber>;
|
|
3710
3749
|
remaining: z.ZodNumber;
|
|
3711
3750
|
}, "strip", z.ZodTypeAny, {
|
|
3712
3751
|
skipped: number;
|
|
3752
|
+
linked: number;
|
|
3713
3753
|
invited: number;
|
|
3714
3754
|
remaining: number;
|
|
3755
|
+
duplicates?: number | undefined;
|
|
3715
3756
|
}, {
|
|
3716
3757
|
skipped: number;
|
|
3758
|
+
linked: number;
|
|
3717
3759
|
invited: number;
|
|
3718
3760
|
remaining: number;
|
|
3761
|
+
duplicates?: number | undefined;
|
|
3719
3762
|
}>;
|
|
3720
3763
|
};
|
|
3721
3764
|
"events-getNonUserSchoolInvite": {
|
|
@@ -3836,16 +3879,47 @@ export declare const callableGroups: {
|
|
|
3836
3879
|
students?: number | undefined;
|
|
3837
3880
|
}>]>;
|
|
3838
3881
|
response: z.ZodObject<{
|
|
3839
|
-
code: z.ZodEnum<["updated", "emailed"]>;
|
|
3882
|
+
code: z.ZodEnum<["updated", "emailed", "hasAccount", "alreadySignedUp"]>;
|
|
3840
3883
|
eventSchoolId: z.ZodOptional<z.ZodString>;
|
|
3841
3884
|
}, "strip", z.ZodTypeAny, {
|
|
3842
|
-
code: "updated" | "emailed";
|
|
3885
|
+
code: "updated" | "emailed" | "hasAccount" | "alreadySignedUp";
|
|
3843
3886
|
eventSchoolId?: string | undefined;
|
|
3844
3887
|
}, {
|
|
3845
|
-
code: "updated" | "emailed";
|
|
3888
|
+
code: "updated" | "emailed" | "hasAccount" | "alreadySignedUp";
|
|
3846
3889
|
eventSchoolId?: string | undefined;
|
|
3847
3890
|
}>;
|
|
3848
3891
|
};
|
|
3892
|
+
"events-employerJoinEvent": {
|
|
3893
|
+
request: z.ZodObject<{
|
|
3894
|
+
eventId: z.ZodString;
|
|
3895
|
+
externalEventAttendeeId: z.ZodOptional<z.ZodString>;
|
|
3896
|
+
providerContactId: z.ZodOptional<z.ZodString>;
|
|
3897
|
+
capacity: z.ZodOptional<z.ZodNumber>;
|
|
3898
|
+
proposedDates: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
|
|
3899
|
+
}, "strip", z.ZodTypeAny, {
|
|
3900
|
+
eventId: string;
|
|
3901
|
+
providerContactId?: string | undefined;
|
|
3902
|
+
externalEventAttendeeId?: string | undefined;
|
|
3903
|
+
capacity?: number | undefined;
|
|
3904
|
+
proposedDates?: Record<string, unknown>[] | undefined;
|
|
3905
|
+
}, {
|
|
3906
|
+
eventId: string;
|
|
3907
|
+
providerContactId?: string | undefined;
|
|
3908
|
+
externalEventAttendeeId?: string | undefined;
|
|
3909
|
+
capacity?: number | undefined;
|
|
3910
|
+
proposedDates?: Record<string, unknown>[] | undefined;
|
|
3911
|
+
}>;
|
|
3912
|
+
response: z.ZodOptional<z.ZodObject<{
|
|
3913
|
+
code: z.ZodEnum<["joined", "notFound", "notAccepting"]>;
|
|
3914
|
+
externalEventAttendeeId: z.ZodOptional<z.ZodString>;
|
|
3915
|
+
}, "strip", z.ZodTypeAny, {
|
|
3916
|
+
code: "notFound" | "joined" | "notAccepting";
|
|
3917
|
+
externalEventAttendeeId?: string | undefined;
|
|
3918
|
+
}, {
|
|
3919
|
+
code: "notFound" | "joined" | "notAccepting";
|
|
3920
|
+
externalEventAttendeeId?: string | undefined;
|
|
3921
|
+
}>>;
|
|
3922
|
+
};
|
|
3849
3923
|
"events-removeEventSlotBooking": {
|
|
3850
3924
|
request: z.ZodObject<{
|
|
3851
3925
|
eventSchoolId: z.ZodString;
|
package/lib/typeDefinitions.d.ts
CHANGED
|
@@ -1467,6 +1467,9 @@ export type CustomFormSchemaField = {
|
|
|
1467
1467
|
max?: number;
|
|
1468
1468
|
minRows?: number;
|
|
1469
1469
|
options?: string[];
|
|
1470
|
+
multiple?: boolean;
|
|
1471
|
+
maxSelections?: number;
|
|
1472
|
+
inputType?: "email" | "tel";
|
|
1470
1473
|
levels?: number;
|
|
1471
1474
|
};
|
|
1472
1475
|
};
|
|
@@ -3385,6 +3388,7 @@ export type ExternalEventAttendee = {
|
|
|
3385
3388
|
schoolId?: string;
|
|
3386
3389
|
eventId: string;
|
|
3387
3390
|
providerContactId: string;
|
|
3391
|
+
source?: "link";
|
|
3388
3392
|
finished?: boolean;
|
|
3389
3393
|
students?: string[];
|
|
3390
3394
|
schools?: {
|
|
@@ -3486,6 +3490,7 @@ export type ExternalEventCareersSchool = {
|
|
|
3486
3490
|
schoolName?: string;
|
|
3487
3491
|
staffName?: string;
|
|
3488
3492
|
};
|
|
3493
|
+
source?: "link" | "email" | "hub";
|
|
3489
3494
|
eventId: string;
|
|
3490
3495
|
status: "invited" | "available" | "finalConfirmationSent" | "confirmed" | "feedbackSent" | "declined" | "removed" | "visibleTo" | "creator";
|
|
3491
3496
|
slots?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeDefinitions.js","sourceRoot":"","sources":["../src/typeDefinitions.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"typeDefinitions.js","sourceRoot":"","sources":["../src/typeDefinitions.ts"],"names":[],"mappings":";;;AAywIA,sDASC;AAeD,oDAKC;AAaD,0CAEC;AA3qED;;;;;kFAKkF;AACrE,QAAA,qBAAqB,GAAG,SAAS,CAAC;AAClC,QAAA,iBAAiB,GAAG,OAAO,CAAC;AAulEzC;yEACyE;AAC5D,QAAA,0BAA0B,GAA2C;IAC9E,gBAAgB,EAAE,2BAA2B;IAC7C,mBAAmB,EAAE,sBAAsB;IAC3C,cAAc,EAAE,iBAAiB;IACjC,kBAAkB,EAAE,qBAAqB;IACzC,UAAU,EAAE,oCAAoC;IAChD,aAAa,EAAE,yBAAyB;IACxC,aAAa,EAAE,wBAAwB;IACvC,KAAK,EAAE,OAAO;CACjB,CAAC;AAEW,QAAA,0BAA0B,GAA+C;IAClF,QAAQ,EAAE,WAAW;IACrB,KAAK,EAAE,YAAY;IACnB,KAAK,EAAE,OAAO;CACjB,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,SAAgB,qBAAqB,CAAC,SAAsC;IACxE,QAAQ,SAAS,EAAE,CAAC;QACpB,KAAK,MAAM,CAAC,CAAC,OAAO,OAAO,CAAC;QAC5B,KAAK,OAAO,CAAC,CAAC,OAAO,OAAO,CAAC;QAC7B,KAAK,WAAW,CAAC;QACjB,KAAK,OAAO,CAAC;QACb,KAAK,OAAO,CAAC;QACb,OAAO,CAAC,CAAC,OAAO,UAAU,CAAC;IAC3B,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,SAAgB,oBAAoB,CAChC,IAAwC,EACxC,MAA6C;IAE7C,OAAO,IAAI,EAAE,WAAW,IAAI,MAAM,EAAE,YAAY,IAAI,KAAK,CAAC;AAC9D,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,eAAe,CAAC,KAA6D;IACzF,OAAO,GAAG,KAAK,CAAC,cAAc,IAAI,EAAE,IAAI,KAAK,CAAC,aAAa,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC;AAC/E,CAAC"}
|
package/package.json
CHANGED
package/src/callables/events.ts
CHANGED
|
@@ -53,7 +53,9 @@ export const eventsCallables = {
|
|
|
53
53
|
}),
|
|
54
54
|
},
|
|
55
55
|
// Hub staff only. Invites schools that aren't on the platform by email alone. Each event this is
|
|
56
|
-
// used on counts once per academic year against InstituteData.hubNonUserSchoolEvents.
|
|
56
|
+
// used on counts once per academic year against InstituteData.hubNonUserSchoolEvents. An address
|
|
57
|
+
// that belongs to a school already in the hub is invited through its account instead (linked),
|
|
58
|
+
// and doesn't use the allowance.
|
|
57
59
|
"events-inviteNonUserSchools": {
|
|
58
60
|
request: z.object({
|
|
59
61
|
eventId: z.string().min(1),
|
|
@@ -64,7 +66,11 @@ export const eventsCallables = {
|
|
|
64
66
|
}),
|
|
65
67
|
response: z.object({
|
|
66
68
|
invited: z.number(),
|
|
69
|
+
linked: z.number(),
|
|
67
70
|
skipped: z.number(),
|
|
71
|
+
// Addresses left out because the same school is already on the event (by account,
|
|
72
|
+
// email domain or school name). Its existing invite is resent instead.
|
|
73
|
+
duplicates: z.number().optional(),
|
|
68
74
|
remaining: z.number(),
|
|
69
75
|
}),
|
|
70
76
|
},
|
|
@@ -94,7 +100,11 @@ export const eventsCallables = {
|
|
|
94
100
|
}),
|
|
95
101
|
// Without eventSchoolId, a school signing itself up from the hub's shareable link: eventId
|
|
96
102
|
// and email are then required, and the response carries the new eventSchoolId, or
|
|
97
|
-
// "emailed" when that address already has an invite (its link is emailed, not returned)
|
|
103
|
+
// "emailed" when that address already has an invite (its link is emailed, not returned), or
|
|
104
|
+
// "hasAccount" when it belongs to a school already in the hub, which is invited through its
|
|
105
|
+
// account instead and accepts after logging in, or "alreadySignedUp" when the same school is
|
|
106
|
+
// already on the event under another address (matched by account, email domain or school
|
|
107
|
+
// name): no record is made and the link is emailed to whoever registered it.
|
|
98
108
|
z.object({
|
|
99
109
|
action: z.literal("accept"),
|
|
100
110
|
eventSchoolId: z.string().min(1).optional(),
|
|
@@ -122,10 +132,28 @@ export const eventsCallables = {
|
|
|
122
132
|
}),
|
|
123
133
|
]),
|
|
124
134
|
response: z.object({
|
|
125
|
-
code: z.enum(["updated", "emailed"]),
|
|
135
|
+
code: z.enum(["updated", "emailed", "hasAccount", "alreadySignedUp"]),
|
|
126
136
|
eventSchoolId: z.string().optional(),
|
|
127
137
|
}),
|
|
128
138
|
},
|
|
139
|
+
// Public: an employer joining an event. With externalEventAttendeeId it's the invited attendee
|
|
140
|
+
// from the email link (the id is the credential) accepting. Without, it's a self sign-up from
|
|
141
|
+
// the public event link for the providerContactId the employer just gave: the attendee is made
|
|
142
|
+
// "providerAvailable" and its id returned, so the page can show the invite tasks (forms,
|
|
143
|
+
// uploads, files to review) straight after. An employer already on the event gets its id back.
|
|
144
|
+
"events-employerJoinEvent": {
|
|
145
|
+
request: z.object({
|
|
146
|
+
eventId: z.string().min(1),
|
|
147
|
+
externalEventAttendeeId: z.string().min(1).optional(),
|
|
148
|
+
providerContactId: z.string().min(1).optional(),
|
|
149
|
+
capacity: z.number().optional(),
|
|
150
|
+
proposedDates: z.array(z.record(z.string(), z.unknown())).optional(),
|
|
151
|
+
}),
|
|
152
|
+
response: z.object({
|
|
153
|
+
code: z.enum(["joined", "notFound", "notAccepting"]),
|
|
154
|
+
externalEventAttendeeId: z.string().optional(),
|
|
155
|
+
}).optional(),
|
|
156
|
+
},
|
|
129
157
|
// Hub staff only. Frees the school's places in one slot.
|
|
130
158
|
"events-removeEventSlotBooking": {
|
|
131
159
|
request: z.object({
|
package/src/typeDefinitions.ts
CHANGED
|
@@ -1494,6 +1494,9 @@ export type CustomFormSchemaField = {
|
|
|
1494
1494
|
max?: number /* type: number */
|
|
1495
1495
|
minRows?: number /* type: long */
|
|
1496
1496
|
options?: string[] // from dropdown only
|
|
1497
|
+
multiple?: boolean // type: dropdown. Pick any number of options; the answer is a string[].
|
|
1498
|
+
maxSelections?: number // type: dropdown with multiple. Most options that can be picked, e.g. "select up to 3".
|
|
1499
|
+
inputType?: "email"|"tel" // type: short. Validates and labels the answer as an email address or phone number.
|
|
1497
1500
|
levels?: number // For ratings, number of stars.
|
|
1498
1501
|
}
|
|
1499
1502
|
}
|
|
@@ -3389,6 +3392,7 @@ export type ExternalEventAttendee = {
|
|
|
3389
3392
|
schoolId?: string,
|
|
3390
3393
|
eventId: string,
|
|
3391
3394
|
providerContactId: string,
|
|
3395
|
+
source?: "link", // Set when the employer signed itself up from the event's public link. Unset when invited.
|
|
3392
3396
|
finished?: boolean,
|
|
3393
3397
|
students?: string[],
|
|
3394
3398
|
schools?: {[key: string]: number}, // NOTE ID with number of students
|
|
@@ -3478,6 +3482,10 @@ export type ExternalEventCareersSchool = {
|
|
|
3478
3482
|
schoolName?: string,
|
|
3479
3483
|
staffName?: string,
|
|
3480
3484
|
},
|
|
3485
|
+
// How the school was added: "link" when it signed itself up from the hub's shareable link,
|
|
3486
|
+
// "email" when the hub invited it by email address, "hub" when the hub invited its account.
|
|
3487
|
+
// Unset on older records, which are "email" with nonUserSchool and "hub" without.
|
|
3488
|
+
source?: "link"|"email"|"hub",
|
|
3481
3489
|
eventId: string,
|
|
3482
3490
|
status: "invited"|"available"|"finalConfirmationSent"|"confirmed"|"feedbackSent"|"declined"|"removed"|"visibleTo"|"creator", // "removed": taken off the event by the hub. Hidden from the school, kept for the hub.
|
|
3483
3491
|
slots?: {[slotId: string]: number}, // Timed slot bookings, with students per slot (1 when the event counts schools)
|