placementt-core 1.300.1207 → 1.300.1209

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.
@@ -628,6 +628,90 @@ export declare const allCallables: {
628
628
  restored: number;
629
629
  }>;
630
630
  };
631
+ "userManagement-checkStudentActivation": {
632
+ request: z.ZodObject<{
633
+ users: z.ZodUnion<[z.ZodArray<z.ZodObject<{
634
+ path: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
635
+ where: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnknown, "many">, "many">>;
636
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
637
+ path: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
638
+ where: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnknown, "many">, "many">>;
639
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
640
+ path: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
641
+ where: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnknown, "many">, "many">>;
642
+ }, z.ZodTypeAny, "passthrough">>, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
643
+ filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
644
+ cohortId: z.ZodOptional<z.ZodString>;
645
+ }, "strip", z.ZodTypeAny, {
646
+ users: Record<string, unknown> | z.objectOutputType<{
647
+ path: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
648
+ where: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnknown, "many">, "many">>;
649
+ }, z.ZodTypeAny, "passthrough">[];
650
+ cohortId?: string | undefined;
651
+ filters?: Record<string, string | number | boolean> | undefined;
652
+ }, {
653
+ users: Record<string, unknown> | z.objectInputType<{
654
+ path: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
655
+ where: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnknown, "many">, "many">>;
656
+ }, z.ZodTypeAny, "passthrough">[];
657
+ cohortId?: string | undefined;
658
+ filters?: Record<string, string | number | boolean> | undefined;
659
+ }>;
660
+ response: z.ZodObject<{
661
+ total: z.ZodNumber;
662
+ counts: z.ZodRecord<z.ZodString, z.ZodNumber>;
663
+ blank: z.ZodNumber;
664
+ blankSample: z.ZodArray<z.ZodObject<{
665
+ uid: z.ZodString;
666
+ name: z.ZodString;
667
+ }, "strip", z.ZodTypeAny, {
668
+ name: string;
669
+ uid: string;
670
+ }, {
671
+ name: string;
672
+ uid: string;
673
+ }>, "many">;
674
+ cohortsMissingWorkflow: z.ZodArray<z.ZodObject<{
675
+ cohortId: z.ZodString;
676
+ name: z.ZodString;
677
+ students: z.ZodNumber;
678
+ }, "strip", z.ZodTypeAny, {
679
+ name: string;
680
+ students: number;
681
+ cohortId: string;
682
+ }, {
683
+ name: string;
684
+ students: number;
685
+ cohortId: string;
686
+ }>, "many">;
687
+ }, "strip", z.ZodTypeAny, {
688
+ total: number;
689
+ counts: Record<string, number>;
690
+ blank: number;
691
+ blankSample: {
692
+ name: string;
693
+ uid: string;
694
+ }[];
695
+ cohortsMissingWorkflow: {
696
+ name: string;
697
+ students: number;
698
+ cohortId: string;
699
+ }[];
700
+ }, {
701
+ total: number;
702
+ counts: Record<string, number>;
703
+ blank: number;
704
+ blankSample: {
705
+ name: string;
706
+ uid: string;
707
+ }[];
708
+ cohortsMissingWorkflow: {
709
+ name: string;
710
+ students: number;
711
+ cohortId: string;
712
+ }[];
713
+ }>;
714
+ };
631
715
  "misSync-saveConfig": {
632
716
  request: z.ZodObject<z.objectUtil.extendShape<{
633
717
  enabled: z.ZodBoolean;
@@ -4750,6 +4834,90 @@ export declare const callableGroups: {
4750
4834
  restored: number;
4751
4835
  }>;
4752
4836
  };
4837
+ "userManagement-checkStudentActivation": {
4838
+ request: z.ZodObject<{
4839
+ users: z.ZodUnion<[z.ZodArray<z.ZodObject<{
4840
+ path: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4841
+ where: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnknown, "many">, "many">>;
4842
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
4843
+ path: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4844
+ where: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnknown, "many">, "many">>;
4845
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
4846
+ path: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4847
+ where: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnknown, "many">, "many">>;
4848
+ }, z.ZodTypeAny, "passthrough">>, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
4849
+ filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
4850
+ cohortId: z.ZodOptional<z.ZodString>;
4851
+ }, "strip", z.ZodTypeAny, {
4852
+ users: Record<string, unknown> | z.objectOutputType<{
4853
+ path: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4854
+ where: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnknown, "many">, "many">>;
4855
+ }, z.ZodTypeAny, "passthrough">[];
4856
+ cohortId?: string | undefined;
4857
+ filters?: Record<string, string | number | boolean> | undefined;
4858
+ }, {
4859
+ users: Record<string, unknown> | z.objectInputType<{
4860
+ path: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4861
+ where: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnknown, "many">, "many">>;
4862
+ }, z.ZodTypeAny, "passthrough">[];
4863
+ cohortId?: string | undefined;
4864
+ filters?: Record<string, string | number | boolean> | undefined;
4865
+ }>;
4866
+ response: z.ZodObject<{
4867
+ total: z.ZodNumber;
4868
+ counts: z.ZodRecord<z.ZodString, z.ZodNumber>;
4869
+ blank: z.ZodNumber;
4870
+ blankSample: z.ZodArray<z.ZodObject<{
4871
+ uid: z.ZodString;
4872
+ name: z.ZodString;
4873
+ }, "strip", z.ZodTypeAny, {
4874
+ name: string;
4875
+ uid: string;
4876
+ }, {
4877
+ name: string;
4878
+ uid: string;
4879
+ }>, "many">;
4880
+ cohortsMissingWorkflow: z.ZodArray<z.ZodObject<{
4881
+ cohortId: z.ZodString;
4882
+ name: z.ZodString;
4883
+ students: z.ZodNumber;
4884
+ }, "strip", z.ZodTypeAny, {
4885
+ name: string;
4886
+ students: number;
4887
+ cohortId: string;
4888
+ }, {
4889
+ name: string;
4890
+ students: number;
4891
+ cohortId: string;
4892
+ }>, "many">;
4893
+ }, "strip", z.ZodTypeAny, {
4894
+ total: number;
4895
+ counts: Record<string, number>;
4896
+ blank: number;
4897
+ blankSample: {
4898
+ name: string;
4899
+ uid: string;
4900
+ }[];
4901
+ cohortsMissingWorkflow: {
4902
+ name: string;
4903
+ students: number;
4904
+ cohortId: string;
4905
+ }[];
4906
+ }, {
4907
+ total: number;
4908
+ counts: Record<string, number>;
4909
+ blank: number;
4910
+ blankSample: {
4911
+ name: string;
4912
+ uid: string;
4913
+ }[];
4914
+ cohortsMissingWorkflow: {
4915
+ name: string;
4916
+ students: number;
4917
+ cohortId: string;
4918
+ }[];
4919
+ }>;
4920
+ };
4753
4921
  };
4754
4922
  outreachCallables: {
4755
4923
  "outreach-upsertContacts": {
@@ -35,4 +35,100 @@ export declare const userManagementCallables: {
35
35
  restored: number;
36
36
  }>;
37
37
  };
38
+ /**
39
+ * Dry run before activating students: which of them would have something to
40
+ * use, and which would see an empty platform. Takes the same `users` and
41
+ * `filters` as `userManagement-activateUsers`. Writes nothing.
42
+ */
43
+ "userManagement-checkStudentActivation": {
44
+ request: z.ZodObject<{
45
+ /** Query objects for a filtered or "all" selection, or picked students keyed by uid. */
46
+ users: z.ZodUnion<[z.ZodArray<z.ZodObject<{
47
+ path: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
48
+ where: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnknown, "many">, "many">>;
49
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
50
+ path: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
51
+ where: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnknown, "many">, "many">>;
52
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
53
+ path: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
54
+ where: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnknown, "many">, "many">>;
55
+ }, z.ZodTypeAny, "passthrough">>, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>]>;
56
+ /** Equality filters from the student table. */
57
+ filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
58
+ cohortId: z.ZodOptional<z.ZodString>;
59
+ }, "strip", z.ZodTypeAny, {
60
+ users: Record<string, unknown> | z.objectOutputType<{
61
+ path: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
62
+ where: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnknown, "many">, "many">>;
63
+ }, z.ZodTypeAny, "passthrough">[];
64
+ cohortId?: string | undefined;
65
+ filters?: Record<string, string | number | boolean> | undefined;
66
+ }, {
67
+ users: Record<string, unknown> | z.objectInputType<{
68
+ path: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
69
+ where: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodUnknown, "many">, "many">>;
70
+ }, z.ZodTypeAny, "passthrough">[];
71
+ cohortId?: string | undefined;
72
+ filters?: Record<string, string | number | boolean> | undefined;
73
+ }>;
74
+ response: z.ZodObject<{
75
+ /** Students checked, excluding leavers and anyone already active. */
76
+ total: z.ZodNumber;
77
+ /** How many have each feature. */
78
+ counts: z.ZodRecord<z.ZodString, z.ZodNumber>;
79
+ /** How many would see an empty platform. */
80
+ blank: z.ZodNumber;
81
+ /** Up to 20 of them, by name. */
82
+ blankSample: z.ZodArray<z.ZodObject<{
83
+ uid: z.ZodString;
84
+ name: z.ZodString;
85
+ }, "strip", z.ZodTypeAny, {
86
+ name: string;
87
+ uid: string;
88
+ }, {
89
+ name: string;
90
+ uid: string;
91
+ }>, "many">;
92
+ /** Cohorts with students in this selection but no workflow set up. */
93
+ cohortsMissingWorkflow: z.ZodArray<z.ZodObject<{
94
+ cohortId: z.ZodString;
95
+ name: z.ZodString;
96
+ students: z.ZodNumber;
97
+ }, "strip", z.ZodTypeAny, {
98
+ name: string;
99
+ students: number;
100
+ cohortId: string;
101
+ }, {
102
+ name: string;
103
+ students: number;
104
+ cohortId: string;
105
+ }>, "many">;
106
+ }, "strip", z.ZodTypeAny, {
107
+ total: number;
108
+ counts: Record<string, number>;
109
+ blank: number;
110
+ blankSample: {
111
+ name: string;
112
+ uid: string;
113
+ }[];
114
+ cohortsMissingWorkflow: {
115
+ name: string;
116
+ students: number;
117
+ cohortId: string;
118
+ }[];
119
+ }, {
120
+ total: number;
121
+ counts: Record<string, number>;
122
+ blank: number;
123
+ blankSample: {
124
+ name: string;
125
+ uid: string;
126
+ }[];
127
+ cohortsMissingWorkflow: {
128
+ name: string;
129
+ students: number;
130
+ cohortId: string;
131
+ }[];
132
+ }>;
133
+ };
38
134
  };
@@ -24,5 +24,37 @@ exports.userManagementCallables = {
24
24
  skipped: zod_1.z.number(),
25
25
  }),
26
26
  },
27
+ /**
28
+ * Dry run before activating students: which of them would have something to
29
+ * use, and which would see an empty platform. Takes the same `users` and
30
+ * `filters` as `userManagement-activateUsers`. Writes nothing.
31
+ */
32
+ "userManagement-checkStudentActivation": {
33
+ request: zod_1.z.object({
34
+ /** Query objects for a filtered or "all" selection, or picked students keyed by uid. */
35
+ users: zod_1.z.union([
36
+ zod_1.z.array(zod_1.z.object({
37
+ path: zod_1.z.array(zod_1.z.string()).optional(),
38
+ where: zod_1.z.array(zod_1.z.array(zod_1.z.unknown())).optional(),
39
+ }).passthrough()).max(10),
40
+ zod_1.z.record(zod_1.z.string().min(1).max(128), zod_1.z.unknown()),
41
+ ]),
42
+ /** Equality filters from the student table. */
43
+ filters: zod_1.z.record(zod_1.z.string(), zod_1.z.union([zod_1.z.string(), zod_1.z.number(), zod_1.z.boolean()])).optional(),
44
+ cohortId: zod_1.z.string().max(128).optional(),
45
+ }),
46
+ response: zod_1.z.object({
47
+ /** Students checked, excluding leavers and anyone already active. */
48
+ total: zod_1.z.number(),
49
+ /** How many have each feature. */
50
+ counts: zod_1.z.record(zod_1.z.string(), zod_1.z.number()),
51
+ /** How many would see an empty platform. */
52
+ blank: zod_1.z.number(),
53
+ /** Up to 20 of them, by name. */
54
+ blankSample: zod_1.z.array(zod_1.z.object({ uid: zod_1.z.string(), name: zod_1.z.string() })),
55
+ /** Cohorts with students in this selection but no workflow set up. */
56
+ cohortsMissingWorkflow: zod_1.z.array(zod_1.z.object({ cohortId: zod_1.z.string(), name: zod_1.z.string(), students: zod_1.z.number() })),
57
+ }),
58
+ },
27
59
  };
28
60
  //# sourceMappingURL=userManagement.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"userManagement.js","sourceRoot":"","sources":["../../src/callables/userManagement.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAGtB;;;GAGG;AACU,QAAA,uBAAuB,GAAG;IACnC;;;OAGG;IACH,+BAA+B,EAAE;QAC7B,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YACd,wCAAwC;YACxC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;YAC/B,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YAC9D,oEAAoE;YACpE,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,KAA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AAiC;YACjC,WAAW,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,EAAC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,EAAC,CAAC,CAAC;YACnE,sEAAsE;YACtE,sBAAsB,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,CAAC,EAAC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,EAAC,CAAC,CAAC;SAC5G,CAAC;KACL;CACoB,CAAC"}
package/lib/constants.js CHANGED
@@ -1527,7 +1527,7 @@ exports.emailTemplates = {
1527
1527
  studentActivation: {
1528
1528
  product: "wex",
1529
1529
  description: "Sent to students in this cohort when their account is activated, and as a reminder if they haven't signed in. Schools using Microsoft sign-in get a Microsoft sign-in button instead.",
1530
- params: ["studentForename", "studentSurname", "studentEmail", "instituteName", "signInInstructions", "cohortContactForename", "cohortContactSurname", "cohortContactEmail"],
1530
+ params: ["studentForename", "studentSurname", "studentEmail", "instituteName", "signInInstructions", "platformFeatures", "cohortContactForename", "cohortContactSurname", "cohortContactEmail"],
1531
1531
  button: { text: "{{activationButtonText}}", link: "{{activationPath}}" },
1532
1532
  type: "workflow"
1533
1533
  },