placementt-core 1.400.1165 → 1.400.1169

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.
@@ -66,4 +66,45 @@ export declare const eventsCallables: {
66
66
  code: "declined" | "notFound";
67
67
  }>;
68
68
  };
69
+ "events-bookEventSlots": {
70
+ request: z.ZodObject<{
71
+ eventSchoolId: z.ZodString;
72
+ slotIds: z.ZodArray<z.ZodString, "many">;
73
+ students: z.ZodOptional<z.ZodNumber>;
74
+ }, "strip", z.ZodTypeAny, {
75
+ eventSchoolId: string;
76
+ slotIds: string[];
77
+ students?: number | undefined;
78
+ }, {
79
+ eventSchoolId: string;
80
+ slotIds: string[];
81
+ students?: number | undefined;
82
+ }>;
83
+ response: z.ZodObject<{
84
+ code: z.ZodEnum<["booked"]>;
85
+ }, "strip", z.ZodTypeAny, {
86
+ code: "booked";
87
+ }, {
88
+ code: "booked";
89
+ }>;
90
+ };
91
+ "events-removeEventSlotBooking": {
92
+ request: z.ZodObject<{
93
+ eventSchoolId: z.ZodString;
94
+ slotId: z.ZodString;
95
+ }, "strip", z.ZodTypeAny, {
96
+ eventSchoolId: string;
97
+ slotId: string;
98
+ }, {
99
+ eventSchoolId: string;
100
+ slotId: string;
101
+ }>;
102
+ response: z.ZodObject<{
103
+ code: z.ZodEnum<["removed"]>;
104
+ }, "strip", z.ZodTypeAny, {
105
+ code: "removed";
106
+ }, {
107
+ code: "removed";
108
+ }>;
109
+ };
69
110
  };
@@ -36,5 +36,29 @@ exports.eventsCallables = {
36
36
  code: zod_1.z.enum(["declined", "notFound"]),
37
37
  }),
38
38
  },
39
+ // Books timed slots for a school (see ExternalEvent.timeSlots). The school's own
40
+ // staff can make one booking while sign-ups are open; hub staff can book or
41
+ // replace a school's slots at any time. students is ignored when the event
42
+ // counts schools.
43
+ "events-bookEventSlots": {
44
+ request: zod_1.z.object({
45
+ eventSchoolId: zod_1.z.string().min(1),
46
+ slotIds: zod_1.z.array(zod_1.z.string().min(1)).min(1),
47
+ students: zod_1.z.number().int().min(1).optional(),
48
+ }),
49
+ response: zod_1.z.object({
50
+ code: zod_1.z.enum(["booked"]),
51
+ }),
52
+ },
53
+ // Hub staff only. Frees the school's places in one slot.
54
+ "events-removeEventSlotBooking": {
55
+ request: zod_1.z.object({
56
+ eventSchoolId: zod_1.z.string().min(1),
57
+ slotId: zod_1.z.string().min(1),
58
+ }),
59
+ response: zod_1.z.object({
60
+ code: zod_1.z.enum(["removed"]),
61
+ }),
62
+ },
39
63
  };
40
64
  //# sourceMappingURL=events.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/callables/events.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAGtB;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC3B,qBAAqB,EAAE;QACnB,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YACd,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;YACf,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;SACpB,CAAC;QACF,qEAAqE;QACrE,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC;YACvB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;YACd,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC3B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC9B,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YACtC,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YACtC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAClC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC/B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SACjC,CAAC,CAAC;KACN;IACD,uEA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M,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"}
@@ -2403,6 +2403,47 @@ export declare const allCallables: {
2403
2403
  code: "declined" | "notFound";
2404
2404
  }>;
2405
2405
  };
2406
+ "events-bookEventSlots": {
2407
+ request: z.ZodObject<{
2408
+ eventSchoolId: z.ZodString;
2409
+ slotIds: z.ZodArray<z.ZodString, "many">;
2410
+ students: z.ZodOptional<z.ZodNumber>;
2411
+ }, "strip", z.ZodTypeAny, {
2412
+ eventSchoolId: string;
2413
+ slotIds: string[];
2414
+ students?: number | undefined;
2415
+ }, {
2416
+ eventSchoolId: string;
2417
+ slotIds: string[];
2418
+ students?: number | undefined;
2419
+ }>;
2420
+ response: z.ZodObject<{
2421
+ code: z.ZodEnum<["booked"]>;
2422
+ }, "strip", z.ZodTypeAny, {
2423
+ code: "booked";
2424
+ }, {
2425
+ code: "booked";
2426
+ }>;
2427
+ };
2428
+ "events-removeEventSlotBooking": {
2429
+ request: z.ZodObject<{
2430
+ eventSchoolId: z.ZodString;
2431
+ slotId: z.ZodString;
2432
+ }, "strip", z.ZodTypeAny, {
2433
+ eventSchoolId: string;
2434
+ slotId: string;
2435
+ }, {
2436
+ eventSchoolId: string;
2437
+ slotId: string;
2438
+ }>;
2439
+ response: z.ZodObject<{
2440
+ code: z.ZodEnum<["removed"]>;
2441
+ }, "strip", z.ZodTypeAny, {
2442
+ code: "removed";
2443
+ }, {
2444
+ code: "removed";
2445
+ }>;
2446
+ };
2406
2447
  "placement-propose": {
2407
2448
  request: z.ZodObject<{
2408
2449
  data: z.ZodAny;
@@ -2580,6 +2621,47 @@ export declare const callableGroups: {
2580
2621
  code: "declined" | "notFound";
2581
2622
  }>;
2582
2623
  };
2624
+ "events-bookEventSlots": {
2625
+ request: z.ZodObject<{
2626
+ eventSchoolId: z.ZodString;
2627
+ slotIds: z.ZodArray<z.ZodString, "many">;
2628
+ students: z.ZodOptional<z.ZodNumber>;
2629
+ }, "strip", z.ZodTypeAny, {
2630
+ eventSchoolId: string;
2631
+ slotIds: string[];
2632
+ students?: number | undefined;
2633
+ }, {
2634
+ eventSchoolId: string;
2635
+ slotIds: string[];
2636
+ students?: number | undefined;
2637
+ }>;
2638
+ response: z.ZodObject<{
2639
+ code: z.ZodEnum<["booked"]>;
2640
+ }, "strip", z.ZodTypeAny, {
2641
+ code: "booked";
2642
+ }, {
2643
+ code: "booked";
2644
+ }>;
2645
+ };
2646
+ "events-removeEventSlotBooking": {
2647
+ request: z.ZodObject<{
2648
+ eventSchoolId: z.ZodString;
2649
+ slotId: z.ZodString;
2650
+ }, "strip", z.ZodTypeAny, {
2651
+ eventSchoolId: string;
2652
+ slotId: string;
2653
+ }, {
2654
+ eventSchoolId: string;
2655
+ slotId: string;
2656
+ }>;
2657
+ response: z.ZodObject<{
2658
+ code: z.ZodEnum<["removed"]>;
2659
+ }, "strip", z.ZodTypeAny, {
2660
+ code: "removed";
2661
+ }, {
2662
+ code: "removed";
2663
+ }>;
2664
+ };
2583
2665
  };
2584
2666
  surveyCallables: {
2585
2667
  "surveys-createSurveyCycle": {
@@ -1067,7 +1067,7 @@ export type RiskAssessmentOptions = {
1067
1067
  export type EmployerField = {
1068
1068
  name: string;
1069
1069
  label?: string;
1070
- type: "text" | "dropdown";
1070
+ type: "text" | "dropdown" | "checkbox";
1071
1071
  items?: {
1072
1072
  value: string;
1073
1073
  label: string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "private": false,
3
3
  "name": "placementt-core",
4
4
  "author": "Placementt",
5
- "version": "1.400.1165",
5
+ "version": "1.400.1169",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
8
8
  "scripts": {
@@ -35,4 +35,28 @@ export const eventsCallables = {
35
35
  code: z.enum(["declined", "notFound"]),
36
36
  }),
37
37
  },
38
+ // Books timed slots for a school (see ExternalEvent.timeSlots). The school's own
39
+ // staff can make one booking while sign-ups are open; hub staff can book or
40
+ // replace a school's slots at any time. students is ignored when the event
41
+ // counts schools.
42
+ "events-bookEventSlots": {
43
+ request: z.object({
44
+ eventSchoolId: z.string().min(1),
45
+ slotIds: z.array(z.string().min(1)).min(1),
46
+ students: z.number().int().min(1).optional(),
47
+ }),
48
+ response: z.object({
49
+ code: z.enum(["booked"]),
50
+ }),
51
+ },
52
+ // Hub staff only. Frees the school's places in one slot.
53
+ "events-removeEventSlotBooking": {
54
+ request: z.object({
55
+ eventSchoolId: z.string().min(1),
56
+ slotId: z.string().min(1),
57
+ }),
58
+ response: z.object({
59
+ code: z.enum(["removed"]),
60
+ }),
61
+ },
38
62
  } satisfies CallableGroup;
@@ -1115,7 +1115,7 @@ export type RiskAssessmentOptions = {
1115
1115
  export type EmployerField = {
1116
1116
  name: string,
1117
1117
  label?: string,
1118
- type: "text" | "dropdown",
1118
+ type: "text" | "dropdown" | "checkbox",
1119
1119
  items?: {value: string, label: string}[],
1120
1120
  visible?: boolean,
1121
1121
  multiple?: boolean,