placementt-core 1.400.1224 → 1.400.1225
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/__tests__/events.test.js +18 -0
- package/lib/callables/__tests__/events.test.js.map +1 -1
- package/lib/callables/billing.d.ts +50 -26
- package/lib/callables/billing.js +5 -4
- package/lib/callables/billing.js.map +1 -1
- package/lib/callables/checks.d.ts +7 -7
- package/lib/callables/checks.js +4 -3
- package/lib/callables/checks.js.map +1 -1
- package/lib/callables/events.d.ts +13 -13
- package/lib/callables/events.js +8 -7
- package/lib/callables/events.js.map +1 -1
- package/lib/callables/misSync.d.ts +4 -4
- package/lib/callables/misSync.js +3 -2
- package/lib/callables/misSync.js.map +1 -1
- package/lib/callables/outreach.d.ts +6 -6
- package/lib/callables/outreach.js +3 -2
- package/lib/callables/outreach.js.map +1 -1
- package/lib/callables/registry.d.ts +166 -142
- package/lib/callables/surveys.d.ts +24 -24
- package/lib/callables/surveys.js +15 -14
- package/lib/callables/surveys.js.map +1 -1
- package/lib/callables/types.d.ts +7 -0
- package/lib/callables/types.js +9 -0
- package/lib/callables/types.js.map +1 -1
- package/lib/callables/userManagement.d.ts +2 -2
- package/lib/callables/userManagement.js +2 -1
- package/lib/callables/userManagement.js.map +1 -1
- package/package.json +1 -1
- package/src/callables/__tests__/events.test.ts +20 -0
- package/src/callables/billing.ts +5 -5
- package/src/callables/checks.ts +4 -4
- package/src/callables/events.ts +8 -8
- package/src/callables/misSync.ts +3 -3
- package/src/callables/outreach.ts +3 -3
- package/src/callables/surveys.ts +11 -11
- package/src/callables/types.ts +9 -0
- package/src/callables/userManagement.ts +2 -2
|
@@ -18,4 +18,22 @@ describe("events-employerJoinEvent request", () => {
|
|
|
18
18
|
expect(join.safeParse({ providerContactId: "contact" }).success).toBe(false);
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
|
+
// The same fields elsewhere that the web can leave undefined (and so send as null).
|
|
22
|
+
describe("optional request fields sent as null", () => {
|
|
23
|
+
it("reads null as missing", () => {
|
|
24
|
+
const parsed = join.parse({ eventId: "event", externalEventAttendeeId: null });
|
|
25
|
+
expect(parsed.externalEventAttendeeId).toBeUndefined();
|
|
26
|
+
});
|
|
27
|
+
it.each([
|
|
28
|
+
["events-bookEventSlots", { eventSchoolId: "s", slotIds: ["a"], studentsPerSlot: null }],
|
|
29
|
+
["events-inviteNonUserSchools", { eventId: "e", schools: [{ email: "a@b.co.uk", schoolName: null }] }],
|
|
30
|
+
["checks-completeGuidanceCheck", { checkId: "c", staffNotes: null, durationMins: null }],
|
|
31
|
+
["misSync-rejectRun", { runId: "r", reason: null }],
|
|
32
|
+
["surveys-deleteSurveyCycle", { cycleId: "c", jobId: null }],
|
|
33
|
+
])("%s", (name, payload) => {
|
|
34
|
+
const result = registry_1.allCallables[name].request.safeParse(payload);
|
|
35
|
+
const nullIssues = result.success ? [] : result.error.issues.filter((i) => i.message.includes("null"));
|
|
36
|
+
expect(nullIssues).toEqual([]);
|
|
37
|
+
});
|
|
38
|
+
});
|
|
21
39
|
//# sourceMappingURL=events.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.test.js","sourceRoot":"","sources":["../../../src/callables/__tests__/events.test.ts"],"names":[],"mappings":";;AAAA,0CAAyC;AAEzC,MAAM,IAAI,GAAG,uBAAY,CAAC,0BAA0B,CAAC,CAAC,OAAO,CAAC;AAE9D,QAAQ,CAAC,kCAAkC,EAAE,GAAG,EAAE;IAC9C,EAAE,CAAC,4DAA4D,EAAE,GAAG,EAAE;QAClE,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,EAAC,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,SAAS;YACzE,uBAAuB,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAC,CAAC,CAAC;QACzE,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,C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C,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAC,CAAC,EAAC,CAAC;QAClG,CAAC,8BAA8B,EAAE,EAAC,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAC,CAAC;QACtF,CAAC,mBAAmB,EAAE,EAAC,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAC,CAAC;QACjD,CAAC,2BAA2B,EAAE,EAAC,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAC,CAAC;KACpD,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QAChC,MAAM,MAAM,GAAG,uBAAY,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAC7D,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;QACvG,MAAM,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -5,7 +5,7 @@ export declare const invoiceDraftSchema: z.ZodObject<{
|
|
|
5
5
|
description: z.ZodString;
|
|
6
6
|
quantity: z.ZodNumber;
|
|
7
7
|
unitAmount: z.ZodNumber;
|
|
8
|
-
discount: z.ZodOptional<z.ZodObject<{
|
|
8
|
+
discount: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
9
9
|
type: z.ZodEnum<["percent", "amount"]>;
|
|
10
10
|
value: z.ZodNumber;
|
|
11
11
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -14,7 +14,13 @@ export declare const invoiceDraftSchema: z.ZodObject<{
|
|
|
14
14
|
}, {
|
|
15
15
|
type: "percent" | "amount";
|
|
16
16
|
value: number;
|
|
17
|
-
}
|
|
17
|
+
}>>>, {
|
|
18
|
+
type: "percent" | "amount";
|
|
19
|
+
value: number;
|
|
20
|
+
} | undefined, {
|
|
21
|
+
type: "percent" | "amount";
|
|
22
|
+
value: number;
|
|
23
|
+
} | null | undefined>;
|
|
18
24
|
}, "strip", z.ZodTypeAny, {
|
|
19
25
|
description: string;
|
|
20
26
|
quantity: number;
|
|
@@ -32,9 +38,9 @@ export declare const invoiceDraftSchema: z.ZodObject<{
|
|
|
32
38
|
discount?: {
|
|
33
39
|
type: "percent" | "amount";
|
|
34
40
|
value: number;
|
|
35
|
-
} | undefined;
|
|
41
|
+
} | null | undefined;
|
|
36
42
|
}>, "many">;
|
|
37
|
-
discount: z.ZodOptional<z.ZodObject<{
|
|
43
|
+
discount: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
38
44
|
type: z.ZodEnum<["percent", "amount"]>;
|
|
39
45
|
value: z.ZodNumber;
|
|
40
46
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -43,10 +49,16 @@ export declare const invoiceDraftSchema: z.ZodObject<{
|
|
|
43
49
|
}, {
|
|
44
50
|
type: "percent" | "amount";
|
|
45
51
|
value: number;
|
|
46
|
-
}
|
|
52
|
+
}>>>, {
|
|
53
|
+
type: "percent" | "amount";
|
|
54
|
+
value: number;
|
|
55
|
+
} | undefined, {
|
|
56
|
+
type: "percent" | "amount";
|
|
57
|
+
value: number;
|
|
58
|
+
} | null | undefined>;
|
|
47
59
|
reference: z.ZodOptional<z.ZodString>;
|
|
48
|
-
date: z.ZodOptional<z.ZodString>;
|
|
49
|
-
dueDate: z.ZodOptional<z.ZodString>;
|
|
60
|
+
date: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
61
|
+
dueDate: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
50
62
|
}, "strip", z.ZodTypeAny, {
|
|
51
63
|
lines: {
|
|
52
64
|
description: string;
|
|
@@ -74,14 +86,14 @@ export declare const invoiceDraftSchema: z.ZodObject<{
|
|
|
74
86
|
discount?: {
|
|
75
87
|
type: "percent" | "amount";
|
|
76
88
|
value: number;
|
|
77
|
-
} | undefined;
|
|
89
|
+
} | null | undefined;
|
|
78
90
|
}[];
|
|
79
|
-
date?: string | undefined;
|
|
91
|
+
date?: string | null | undefined;
|
|
80
92
|
discount?: {
|
|
81
93
|
type: "percent" | "amount";
|
|
82
94
|
value: number;
|
|
83
|
-
} | undefined;
|
|
84
|
-
dueDate?: string | undefined;
|
|
95
|
+
} | null | undefined;
|
|
96
|
+
dueDate?: string | null | undefined;
|
|
85
97
|
reference?: string | undefined;
|
|
86
98
|
}>;
|
|
87
99
|
export declare const billingCallables: {
|
|
@@ -95,7 +107,7 @@ export declare const billingCallables: {
|
|
|
95
107
|
description: z.ZodString;
|
|
96
108
|
quantity: z.ZodNumber;
|
|
97
109
|
unitAmount: z.ZodNumber;
|
|
98
|
-
discount: z.ZodOptional<z.ZodObject<{
|
|
110
|
+
discount: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
99
111
|
type: z.ZodEnum<["percent", "amount"]>;
|
|
100
112
|
value: z.ZodNumber;
|
|
101
113
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -104,7 +116,13 @@ export declare const billingCallables: {
|
|
|
104
116
|
}, {
|
|
105
117
|
type: "percent" | "amount";
|
|
106
118
|
value: number;
|
|
107
|
-
}
|
|
119
|
+
}>>>, {
|
|
120
|
+
type: "percent" | "amount";
|
|
121
|
+
value: number;
|
|
122
|
+
} | undefined, {
|
|
123
|
+
type: "percent" | "amount";
|
|
124
|
+
value: number;
|
|
125
|
+
} | null | undefined>;
|
|
108
126
|
}, "strip", z.ZodTypeAny, {
|
|
109
127
|
description: string;
|
|
110
128
|
quantity: number;
|
|
@@ -122,9 +140,9 @@ export declare const billingCallables: {
|
|
|
122
140
|
discount?: {
|
|
123
141
|
type: "percent" | "amount";
|
|
124
142
|
value: number;
|
|
125
|
-
} | undefined;
|
|
143
|
+
} | null | undefined;
|
|
126
144
|
}>, "many">;
|
|
127
|
-
discount: z.ZodOptional<z.ZodObject<{
|
|
145
|
+
discount: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
128
146
|
type: z.ZodEnum<["percent", "amount"]>;
|
|
129
147
|
value: z.ZodNumber;
|
|
130
148
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -133,10 +151,16 @@ export declare const billingCallables: {
|
|
|
133
151
|
}, {
|
|
134
152
|
type: "percent" | "amount";
|
|
135
153
|
value: number;
|
|
136
|
-
}
|
|
154
|
+
}>>>, {
|
|
155
|
+
type: "percent" | "amount";
|
|
156
|
+
value: number;
|
|
157
|
+
} | undefined, {
|
|
158
|
+
type: "percent" | "amount";
|
|
159
|
+
value: number;
|
|
160
|
+
} | null | undefined>;
|
|
137
161
|
reference: z.ZodOptional<z.ZodString>;
|
|
138
|
-
date: z.ZodOptional<z.ZodString>;
|
|
139
|
-
dueDate: z.ZodOptional<z.ZodString>;
|
|
162
|
+
date: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
163
|
+
dueDate: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
140
164
|
}, "strip", z.ZodTypeAny, {
|
|
141
165
|
lines: {
|
|
142
166
|
description: string;
|
|
@@ -164,14 +188,14 @@ export declare const billingCallables: {
|
|
|
164
188
|
discount?: {
|
|
165
189
|
type: "percent" | "amount";
|
|
166
190
|
value: number;
|
|
167
|
-
} | undefined;
|
|
191
|
+
} | null | undefined;
|
|
168
192
|
}[];
|
|
169
|
-
date?: string | undefined;
|
|
193
|
+
date?: string | null | undefined;
|
|
170
194
|
discount?: {
|
|
171
195
|
type: "percent" | "amount";
|
|
172
196
|
value: number;
|
|
173
|
-
} | undefined;
|
|
174
|
-
dueDate?: string | undefined;
|
|
197
|
+
} | null | undefined;
|
|
198
|
+
dueDate?: string | null | undefined;
|
|
175
199
|
reference?: string | undefined;
|
|
176
200
|
}>;
|
|
177
201
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -206,14 +230,14 @@ export declare const billingCallables: {
|
|
|
206
230
|
discount?: {
|
|
207
231
|
type: "percent" | "amount";
|
|
208
232
|
value: number;
|
|
209
|
-
} | undefined;
|
|
233
|
+
} | null | undefined;
|
|
210
234
|
}[];
|
|
211
|
-
date?: string | undefined;
|
|
235
|
+
date?: string | null | undefined;
|
|
212
236
|
discount?: {
|
|
213
237
|
type: "percent" | "amount";
|
|
214
238
|
value: number;
|
|
215
|
-
} | undefined;
|
|
216
|
-
dueDate?: string | undefined;
|
|
239
|
+
} | null | undefined;
|
|
240
|
+
dueDate?: string | null | undefined;
|
|
217
241
|
reference?: string | undefined;
|
|
218
242
|
};
|
|
219
243
|
}>;
|
package/lib/callables/billing.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.billingCallables = exports.invoiceDraftSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const types_1 = require("./types");
|
|
5
6
|
/**
|
|
6
7
|
* Contracts for invoicing (`Placementt-Backend/functions/src/billing.ts`).
|
|
7
8
|
*
|
|
@@ -20,14 +21,14 @@ const invoiceLineSchema = zod_1.z.object({
|
|
|
20
21
|
description: zod_1.z.string().min(1),
|
|
21
22
|
quantity: zod_1.z.number(),
|
|
22
23
|
unitAmount: zod_1.z.number(),
|
|
23
|
-
discount:
|
|
24
|
+
discount: (0, types_1.optionalField)(invoiceDiscountSchema),
|
|
24
25
|
});
|
|
25
26
|
exports.invoiceDraftSchema = zod_1.z.object({
|
|
26
27
|
lines: zod_1.z.array(invoiceLineSchema).min(1),
|
|
27
|
-
discount:
|
|
28
|
+
discount: (0, types_1.optionalField)(invoiceDiscountSchema),
|
|
28
29
|
reference: zod_1.z.string().optional(),
|
|
29
|
-
date: zod_1.z.string().regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
30
|
-
dueDate: zod_1.z.string().regex(/^\d{4}-\d{2}-\d{2}$/)
|
|
30
|
+
date: (0, types_1.optionalField)(zod_1.z.string().regex(/^\d{4}-\d{2}-\d{2}$/)),
|
|
31
|
+
dueDate: (0, types_1.optionalField)(zod_1.z.string().regex(/^\d{4}-\d{2}-\d{2}$/)),
|
|
31
32
|
});
|
|
32
33
|
exports.billingCallables = {
|
|
33
34
|
/** Create a DRAFT invoice in Xero for an institute and record it in `invoices`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.js","sourceRoot":"","sources":["../../src/callables/billing.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;
|
|
1
|
+
{"version":3,"file":"billing.js","sourceRoot":"","sources":["../../src/callables/billing.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,mCAAqD;AAErD;;;;;;GAMG;AAEH,MAAM,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACnC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC3B,CAAC,CAAC;AAEH,+DAA+D;AAC/D,MAAM,oBAAoB,GAAG,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC,CAAC;AAEnI,MAAM,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/B,GAAG,EAAE,oBAAoB,CAAC,QAAQ,EAAE;IACpC,WAAW,EAAE,OAAC,CA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M,CAAC;YACd,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC7B,CAAC;QACF,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;SACrB,CAAC;KACL;CACoB,CAAC"}
|
|
@@ -17,8 +17,8 @@ export declare const checksCallables: {
|
|
|
17
17
|
checkId: z.ZodString;
|
|
18
18
|
entryType: z.ZodString;
|
|
19
19
|
summary: z.ZodString;
|
|
20
|
-
staffNotes: z.ZodOptional<z.ZodString>;
|
|
21
|
-
durationMins: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
staffNotes: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
21
|
+
durationMins: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
|
|
22
22
|
mode: z.ZodOptional<z.ZodEnum<["inPerson", "video", "phone"]>>;
|
|
23
23
|
/** Only ever true for personalGuidance — the server writes false for
|
|
24
24
|
* every other type rather than trusting this. */
|
|
@@ -26,7 +26,7 @@ export declare const checksCallables: {
|
|
|
26
26
|
actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
27
27
|
label: z.ZodString;
|
|
28
28
|
owner: z.ZodOptional<z.ZodEnum<["student", "staff"]>>;
|
|
29
|
-
dueDate: z.ZodOptional<z.ZodString>;
|
|
29
|
+
dueDate: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
30
30
|
done: z.ZodOptional<z.ZodBoolean>;
|
|
31
31
|
}, "strip", z.ZodTypeAny, {
|
|
32
32
|
label: string;
|
|
@@ -37,7 +37,7 @@ export declare const checksCallables: {
|
|
|
37
37
|
label: string;
|
|
38
38
|
done?: boolean | undefined;
|
|
39
39
|
owner?: "student" | "staff" | undefined;
|
|
40
|
-
dueDate?: string | undefined;
|
|
40
|
+
dueDate?: string | null | undefined;
|
|
41
41
|
}>, "many">>;
|
|
42
42
|
concern: z.ZodOptional<z.ZodBoolean>;
|
|
43
43
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -64,10 +64,10 @@ export declare const checksCallables: {
|
|
|
64
64
|
label: string;
|
|
65
65
|
done?: boolean | undefined;
|
|
66
66
|
owner?: "student" | "staff" | undefined;
|
|
67
|
-
dueDate?: string | undefined;
|
|
67
|
+
dueDate?: string | null | undefined;
|
|
68
68
|
}[] | undefined;
|
|
69
|
-
staffNotes?: string | undefined;
|
|
70
|
-
durationMins?: number | undefined;
|
|
69
|
+
staffNotes?: string | null | undefined;
|
|
70
|
+
durationMins?: number | null | undefined;
|
|
71
71
|
adviserQualified?: boolean | undefined;
|
|
72
72
|
concern?: boolean | undefined;
|
|
73
73
|
}>;
|
package/lib/callables/checks.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.checksCallables = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const types_1 = require("./types");
|
|
5
6
|
/**
|
|
6
7
|
* Contracts for the scheduled-check engine
|
|
7
8
|
* (`Placementt-Backend/functions/src/checks.ts`).
|
|
@@ -20,8 +21,8 @@ exports.checksCallables = {
|
|
|
20
21
|
checkId: zod_1.z.string(),
|
|
21
22
|
entryType: zod_1.z.string(),
|
|
22
23
|
summary: zod_1.z.string(),
|
|
23
|
-
staffNotes: zod_1.z.string()
|
|
24
|
-
durationMins: zod_1.z.number()
|
|
24
|
+
staffNotes: (0, types_1.optionalField)(zod_1.z.string()),
|
|
25
|
+
durationMins: (0, types_1.optionalField)(zod_1.z.number()),
|
|
25
26
|
mode: zod_1.z.enum(["inPerson", "video", "phone"]).optional(),
|
|
26
27
|
/** Only ever true for personalGuidance — the server writes false for
|
|
27
28
|
* every other type rather than trusting this. */
|
|
@@ -29,7 +30,7 @@ exports.checksCallables = {
|
|
|
29
30
|
actions: zod_1.z.array(zod_1.z.object({
|
|
30
31
|
label: zod_1.z.string(),
|
|
31
32
|
owner: zod_1.z.enum(["student", "staff"]).optional(),
|
|
32
|
-
dueDate: zod_1.z.string()
|
|
33
|
+
dueDate: (0, types_1.optionalField)(zod_1.z.string()),
|
|
33
34
|
done: zod_1.z.boolean().optional(),
|
|
34
35
|
})).optional(),
|
|
35
36
|
concern: zod_1.z.boolean().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checks.js","sourceRoot":"","sources":["../../src/callables/checks.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;
|
|
1
|
+
{"version":3,"file":"checks.js","sourceRoot":"","sources":["../../src/callables/checks.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,mCAAqD;AAErD;;;;;;;;;;GAUG;AACU,QAAA,eAAe,GAAG;IAC3B,8BAA8B,EAAE;QAC5B,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YACd,4CAA4C;YAC5C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;YACnB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE;YACrB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;YACnB,UAAU,EAAE,IAAA,qBAAa,EAAC,OAAC,CAAC,MAAM,EAAE,CAAC;YACrC,YAAY,EAAE,IAAA,qBAAa,EAAC,OAAC,CAAC,MAAM,EAAE,CAAC;YACvC,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE;YACvD;6DACiD;YACjD,gBAAgB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;YACxC,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC;gBACtB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;gBACjB,KAAK,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE;gBAC9C,OAAO,EAAE,IAAA,qBAAa,EAAC,OAAC,CAAC,MAAM,EAAE,CAAC;gBAClC,IAAI,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;aAC/B,CAAC,CAAC,CAAC,QAAQ,EAAE;YACd,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;SAClC,CAAC;QACF,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,+CAA+C;YAC/C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;YACnB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;SACtB,CAAC;KACL;CACoB,CAAC"}
|
|
@@ -71,7 +71,7 @@ export declare const eventsCallables: {
|
|
|
71
71
|
eventSchoolId: z.ZodString;
|
|
72
72
|
slotIds: z.ZodArray<z.ZodString, "many">;
|
|
73
73
|
students: z.ZodOptional<z.ZodNumber>;
|
|
74
|
-
studentsPerSlot: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber
|
|
74
|
+
studentsPerSlot: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>>, Record<string, number> | undefined, Record<string, number> | null | undefined>;
|
|
75
75
|
}, "strip", z.ZodTypeAny, {
|
|
76
76
|
eventSchoolId: string;
|
|
77
77
|
slotIds: string[];
|
|
@@ -81,7 +81,7 @@ export declare const eventsCallables: {
|
|
|
81
81
|
eventSchoolId: string;
|
|
82
82
|
slotIds: string[];
|
|
83
83
|
students?: number | undefined;
|
|
84
|
-
studentsPerSlot?: Record<string, number> | undefined;
|
|
84
|
+
studentsPerSlot?: Record<string, number> | null | undefined;
|
|
85
85
|
}>;
|
|
86
86
|
response: z.ZodObject<{
|
|
87
87
|
code: z.ZodEnum<["booked"]>;
|
|
@@ -96,13 +96,13 @@ export declare const eventsCallables: {
|
|
|
96
96
|
eventId: z.ZodString;
|
|
97
97
|
schools: z.ZodArray<z.ZodObject<{
|
|
98
98
|
email: z.ZodString;
|
|
99
|
-
schoolName: z.ZodOptional<z.ZodString>;
|
|
99
|
+
schoolName: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
100
100
|
}, "strip", z.ZodTypeAny, {
|
|
101
101
|
email: string;
|
|
102
102
|
schoolName?: string | undefined;
|
|
103
103
|
}, {
|
|
104
104
|
email: string;
|
|
105
|
-
schoolName?: string | undefined;
|
|
105
|
+
schoolName?: string | null | undefined;
|
|
106
106
|
}>, "many">;
|
|
107
107
|
}, "strip", z.ZodTypeAny, {
|
|
108
108
|
schools: {
|
|
@@ -113,7 +113,7 @@ export declare const eventsCallables: {
|
|
|
113
113
|
}, {
|
|
114
114
|
schools: {
|
|
115
115
|
email: string;
|
|
116
|
-
schoolName?: string | undefined;
|
|
116
|
+
schoolName?: string | null | undefined;
|
|
117
117
|
}[];
|
|
118
118
|
eventId: string;
|
|
119
119
|
}>;
|
|
@@ -268,16 +268,16 @@ export declare const eventsCallables: {
|
|
|
268
268
|
"events-employerJoinEvent": {
|
|
269
269
|
request: z.ZodObject<{
|
|
270
270
|
eventId: z.ZodString;
|
|
271
|
-
externalEventAttendeeId: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
272
|
-
providerContactId: z.ZodOptional<z.ZodNullable<z.ZodString
|
|
273
|
-
capacity: z.ZodOptional<z.ZodNullable<z.ZodNumber
|
|
274
|
-
proposedDates: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many"
|
|
271
|
+
externalEventAttendeeId: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
272
|
+
providerContactId: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
273
|
+
capacity: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodNumber>>, number | undefined, number | null | undefined>;
|
|
274
|
+
proposedDates: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>>, Record<string, unknown>[] | undefined, Record<string, unknown>[] | null | undefined>;
|
|
275
275
|
}, "strip", z.ZodTypeAny, {
|
|
276
276
|
eventId: string;
|
|
277
|
-
providerContactId?: string |
|
|
278
|
-
externalEventAttendeeId?: string |
|
|
279
|
-
capacity?: number |
|
|
280
|
-
proposedDates?: Record<string, unknown>[] |
|
|
277
|
+
providerContactId?: string | undefined;
|
|
278
|
+
externalEventAttendeeId?: string | undefined;
|
|
279
|
+
capacity?: number | undefined;
|
|
280
|
+
proposedDates?: Record<string, unknown>[] | undefined;
|
|
281
281
|
}, {
|
|
282
282
|
eventId: string;
|
|
283
283
|
providerContactId?: string | null | undefined;
|
package/lib/callables/events.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.eventsCallables = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const types_1 = require("./types");
|
|
5
6
|
/**
|
|
6
7
|
* Contracts for the `events` backend module
|
|
7
8
|
* (`Placementt-Backend/functions/src/events.ts`).
|
|
@@ -47,7 +48,7 @@ exports.eventsCallables = {
|
|
|
47
48
|
slotIds: zod_1.z.array(zod_1.z.string().min(1)).min(1),
|
|
48
49
|
students: zod_1.z.number().int().min(1).optional(),
|
|
49
50
|
// Students per slot, when places are counted in students. Takes precedence over students.
|
|
50
|
-
studentsPerSlot: zod_1.z.record(zod_1.z.string(), zod_1.z.number().int().min(1))
|
|
51
|
+
studentsPerSlot: (0, types_1.optionalField)(zod_1.z.record(zod_1.z.string(), zod_1.z.number().int().min(1))),
|
|
51
52
|
}),
|
|
52
53
|
response: zod_1.z.object({
|
|
53
54
|
code: zod_1.z.enum(["booked"]),
|
|
@@ -62,7 +63,7 @@ exports.eventsCallables = {
|
|
|
62
63
|
eventId: zod_1.z.string().min(1),
|
|
63
64
|
schools: zod_1.z.array(zod_1.z.object({
|
|
64
65
|
email: zod_1.z.string().trim().email(),
|
|
65
|
-
schoolName: zod_1.z.string().trim()
|
|
66
|
+
schoolName: (0, types_1.optionalField)(zod_1.z.string().trim()),
|
|
66
67
|
})).min(1),
|
|
67
68
|
}),
|
|
68
69
|
response: zod_1.z.object({
|
|
@@ -147,11 +148,11 @@ exports.eventsCallables = {
|
|
|
147
148
|
"events-employerJoinEvent": {
|
|
148
149
|
request: zod_1.z.object({
|
|
149
150
|
eventId: zod_1.z.string().min(1),
|
|
150
|
-
//
|
|
151
|
-
externalEventAttendeeId: zod_1.z.string().min(1)
|
|
152
|
-
providerContactId: zod_1.z.string().min(1)
|
|
153
|
-
capacity: zod_1.z.number()
|
|
154
|
-
proposedDates: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()))
|
|
151
|
+
// A self sign-up sends externalEventAttendeeId as null.
|
|
152
|
+
externalEventAttendeeId: (0, types_1.optionalField)(zod_1.z.string().min(1)),
|
|
153
|
+
providerContactId: (0, types_1.optionalField)(zod_1.z.string().min(1)),
|
|
154
|
+
capacity: (0, types_1.optionalField)(zod_1.z.number()),
|
|
155
|
+
proposedDates: (0, types_1.optionalField)(zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()))),
|
|
155
156
|
}),
|
|
156
157
|
response: zod_1.z.object({
|
|
157
158
|
code: zod_1.z.enum(["joined", "notFound", "notAccepting"]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/callables/events.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/callables/events.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,mCAAqD;AAErD;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC3B,qBAAqB,EAAE;QACnB,OAAO,EAAE,OAAC,CAAC,MAA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G,CAAC,CAAC,CAAC,CAAC;YACnD,QAAQ,EAAE,IAAA,qBAAa,EAAC,OAAC,CAAC,MAAM,EAAE,CAAC;YACnC,aAAa,EAAE,IAAA,qBAAa,EAAC,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;SAC3E,CAAC;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"}
|
|
@@ -80,7 +80,7 @@ export declare const misSyncCallables: {
|
|
|
80
80
|
oId: z.ZodString;
|
|
81
81
|
label: z.ZodString;
|
|
82
82
|
/** Revoke this key in the same step, for a rotation. */
|
|
83
|
-
replacesKeyId: z.ZodOptional<z.ZodString>;
|
|
83
|
+
replacesKeyId: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
84
84
|
}, "strip", z.ZodTypeAny, {
|
|
85
85
|
label: string;
|
|
86
86
|
oId: string;
|
|
@@ -88,7 +88,7 @@ export declare const misSyncCallables: {
|
|
|
88
88
|
}, {
|
|
89
89
|
label: string;
|
|
90
90
|
oId: string;
|
|
91
|
-
replacesKeyId?: string | undefined;
|
|
91
|
+
replacesKeyId?: string | null | undefined;
|
|
92
92
|
}>;
|
|
93
93
|
response: z.ZodObject<{
|
|
94
94
|
keyId: z.ZodString;
|
|
@@ -148,7 +148,7 @@ export declare const misSyncCallables: {
|
|
|
148
148
|
request: z.ZodObject<{
|
|
149
149
|
oId: z.ZodString;
|
|
150
150
|
runId: z.ZodString;
|
|
151
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
151
|
+
reason: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
152
152
|
}, "strip", z.ZodTypeAny, {
|
|
153
153
|
oId: string;
|
|
154
154
|
runId: string;
|
|
@@ -156,7 +156,7 @@ export declare const misSyncCallables: {
|
|
|
156
156
|
}, {
|
|
157
157
|
oId: string;
|
|
158
158
|
runId: string;
|
|
159
|
-
reason?: string | undefined;
|
|
159
|
+
reason?: string | null | undefined;
|
|
160
160
|
}>;
|
|
161
161
|
response: z.ZodObject<{
|
|
162
162
|
status: z.ZodString;
|
package/lib/callables/misSync.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.misSyncCallables = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const types_1 = require("./types");
|
|
5
6
|
const misSync_1 = require("../misSync");
|
|
6
7
|
const oId = zod_1.z.string().min(1).max(128);
|
|
7
8
|
const runId = zod_1.z.string().min(1).max(128);
|
|
@@ -30,7 +31,7 @@ exports.misSyncCallables = {
|
|
|
30
31
|
oId,
|
|
31
32
|
label: zod_1.z.string().trim().min(1).max(80),
|
|
32
33
|
/** Revoke this key in the same step, for a rotation. */
|
|
33
|
-
replacesKeyId: zod_1.z.string().min(1).max(64)
|
|
34
|
+
replacesKeyId: (0, types_1.optionalField)(zod_1.z.string().min(1).max(64)),
|
|
34
35
|
}),
|
|
35
36
|
response: zod_1.z.object({
|
|
36
37
|
keyId: zod_1.z.string(),
|
|
@@ -55,7 +56,7 @@ exports.misSyncCallables = {
|
|
|
55
56
|
request: zod_1.z.object({
|
|
56
57
|
oId,
|
|
57
58
|
runId,
|
|
58
|
-
reason: zod_1.z.string().trim().max(500)
|
|
59
|
+
reason: (0, types_1.optionalField)(zod_1.z.string().trim().max(500)),
|
|
59
60
|
}),
|
|
60
61
|
response: zod_1.z.object({ status: zod_1.z.string() }),
|
|
61
62
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"misSync.js","sourceRoot":"","sources":["../../src/callables/misSync.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;
|
|
1
|
+
{"version":3,"file":"misSync.js","sourceRoot":"","sources":["../../src/callables/misSync.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,mCAAqD;AACrD,wCAAiD;AAEjD,MAAM,GAAG,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACvC,MAAM,KAAK,GAAG,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAEzC;;;;;;;GAOG;AACU,QAAA,gBAAgB,GAAG;IAC5B,oBAAoB,EAAE;QAClB,OAAO,EAAE,+BAAqB,CAAC,MAAM,CAAC,EAAC,GAAG,EAAC,CAAC;QAC5C,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,qDAAqD;YACrD,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;SAC7B,CAAC;KACL;IACD,8BAA8B,EAAE;QAC5B,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,EAAC,GAAG,EAAC,CAAC;QACxB,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,EAAC,cAAc,EAAE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,qBAAa,EAAC,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;SACpD,CAAC;QACF,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,EAAC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,EAAC,CAAC;KAC3C;CACoB,CAAC"}
|
|
@@ -160,8 +160,8 @@ export declare const outreachCallables: {
|
|
|
160
160
|
request: z.ZodObject<{
|
|
161
161
|
urn: z.ZodNumber;
|
|
162
162
|
lead: z.ZodObject<{
|
|
163
|
-
forename: z.ZodOptional<z.ZodString>;
|
|
164
|
-
surname: z.ZodOptional<z.ZodString>;
|
|
163
|
+
forename: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
164
|
+
surname: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
165
165
|
email: z.ZodString;
|
|
166
166
|
organisation: z.ZodString;
|
|
167
167
|
wex: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -187,8 +187,8 @@ export declare const outreachCallables: {
|
|
|
187
187
|
assignee: string;
|
|
188
188
|
events?: boolean | undefined;
|
|
189
189
|
wex?: boolean | undefined;
|
|
190
|
-
forename?: string | undefined;
|
|
191
|
-
surname?: string | undefined;
|
|
190
|
+
forename?: string | null | undefined;
|
|
191
|
+
surname?: string | null | undefined;
|
|
192
192
|
docCheck?: boolean | undefined;
|
|
193
193
|
personalNotes?: any[] | undefined;
|
|
194
194
|
generalNotes?: any[] | undefined;
|
|
@@ -215,8 +215,8 @@ export declare const outreachCallables: {
|
|
|
215
215
|
assignee: string;
|
|
216
216
|
events?: boolean | undefined;
|
|
217
217
|
wex?: boolean | undefined;
|
|
218
|
-
forename?: string | undefined;
|
|
219
|
-
surname?: string | undefined;
|
|
218
|
+
forename?: string | null | undefined;
|
|
219
|
+
surname?: string | null | undefined;
|
|
220
220
|
docCheck?: boolean | undefined;
|
|
221
221
|
personalNotes?: any[] | undefined;
|
|
222
222
|
generalNotes?: any[] | undefined;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.outreachCallables = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const types_1 = require("./types");
|
|
5
6
|
/**
|
|
6
7
|
* Contracts for the outreach pipeline (`Placementt-Backend/functions/src/outreach`).
|
|
7
8
|
*
|
|
@@ -81,8 +82,8 @@ exports.outreachCallables = {
|
|
|
81
82
|
request: zod_1.z.object({
|
|
82
83
|
urn: zod_1.z.number(),
|
|
83
84
|
lead: zod_1.z.object({
|
|
84
|
-
forename: zod_1.z.string()
|
|
85
|
-
surname: zod_1.z.string()
|
|
85
|
+
forename: (0, types_1.optionalField)(zod_1.z.string()),
|
|
86
|
+
surname: (0, types_1.optionalField)(zod_1.z.string()),
|
|
86
87
|
email: zod_1.z.string().email(),
|
|
87
88
|
organisation: zod_1.z.string(),
|
|
88
89
|
wex: zod_1.z.boolean().optional(),
|