placementt-core 1.400.1101 → 1.400.1102

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.
@@ -5,67 +5,16 @@ import { z } from "zod";
5
5
  *
6
6
  * These were `aspirations-*` while they lived in the legacy survey backend. That
7
7
  * module is gone, but the config it happened to host is institute setup that the
8
- * survey engine READS and does not own, so the two callables moved rather than being
8
+ * survey engine READS and does not own, so the callables moved rather than being
9
9
  * deleted. The names moved with them: never rename a deployed function in place, so
10
10
  * the old `aspirations-saveDestinationsConfig` and `aspirations-provisionDestinationsNow`
11
11
  * must be deleted explicitly at deploy time.
12
+ *
13
+ * Saving the config itself is a plain write to the institute doc from the client
14
+ * (saveDestinationsConfig / saveGuidanceConfig in the web app), so the two
15
+ * `destinationsConfig-save*` callables are gone too and are deleted the same way.
12
16
  */
13
17
  export declare const destinationsConfigCallables: {
14
- "destinationsConfig-saveGuidanceConfig": {
15
- request: z.ZodObject<{
16
- oId: z.ZodString;
17
- /** The full GuidanceConfig from the setup wizard. Validated server side,
18
- * which is also where provenance fields are stamped. */
19
- config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
20
- }, "strip", z.ZodTypeAny, {
21
- config: Record<string, unknown>;
22
- oId: string;
23
- }, {
24
- config: Record<string, unknown>;
25
- oId: string;
26
- }>;
27
- response: z.ZodObject<{
28
- saved: z.ZodBoolean;
29
- }, "strip", z.ZodTypeAny, {
30
- saved: boolean;
31
- }, {
32
- saved: boolean;
33
- }>;
34
- };
35
- "destinationsConfig-saveDestinationsConfig": {
36
- request: z.ZodObject<{
37
- oId: z.ZodString;
38
- /** The full DestinationsConfig from the setup wizard. Validated server
39
- * side, which is also where provenance fields are stamped. */
40
- config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
41
- /** Trust-only: what this trust imposes on its schools, keyed by feature.
42
- * Merged into the institute's existing policies, and refused outright
43
- * from a school. Lives on the institute root, not inside config. */
44
- trustPolicies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
45
- }, "strip", z.ZodTypeAny, {
46
- config: Record<string, unknown>;
47
- oId: string;
48
- trustPolicies?: Record<string, unknown> | undefined;
49
- }, {
50
- config: Record<string, unknown>;
51
- oId: string;
52
- trustPolicies?: Record<string, unknown> | undefined;
53
- }>;
54
- response: z.ZodObject<{
55
- saved: z.ZodBoolean;
56
- /** True on a first save, which provisions the current year immediately. */
57
- provisioned: z.ZodBoolean;
58
- created: z.ZodOptional<z.ZodNumber>;
59
- }, "strip", z.ZodTypeAny, {
60
- saved: boolean;
61
- provisioned: boolean;
62
- created?: number | undefined;
63
- }, {
64
- saved: boolean;
65
- provisioned: boolean;
66
- created?: number | undefined;
67
- }>;
68
- };
69
18
  "destinationsConfig-provisionDestinationsNow": {
70
19
  request: z.ZodObject<{
71
20
  oId: z.ZodString;
@@ -8,42 +8,16 @@ const zod_1 = require("zod");
8
8
  *
9
9
  * These were `aspirations-*` while they lived in the legacy survey backend. That
10
10
  * module is gone, but the config it happened to host is institute setup that the
11
- * survey engine READS and does not own, so the two callables moved rather than being
11
+ * survey engine READS and does not own, so the callables moved rather than being
12
12
  * deleted. The names moved with them: never rename a deployed function in place, so
13
13
  * the old `aspirations-saveDestinationsConfig` and `aspirations-provisionDestinationsNow`
14
14
  * must be deleted explicitly at deploy time.
15
+ *
16
+ * Saving the config itself is a plain write to the institute doc from the client
17
+ * (saveDestinationsConfig / saveGuidanceConfig in the web app), so the two
18
+ * `destinationsConfig-save*` callables are gone too and are deleted the same way.
15
19
  */
16
20
  exports.destinationsConfigCallables = {
17
- // The 1:1 guidance programme's setup lives beside destinations' because it is the
18
- // same kind of thing — institute setup the survey engine reads and does not own —
19
- // and is saved by the same backend module.
20
- "destinationsConfig-saveGuidanceConfig": {
21
- request: zod_1.z.object({
22
- oId: zod_1.z.string(),
23
- /** The full GuidanceConfig from the setup wizard. Validated server side,
24
- * which is also where provenance fields are stamped. */
25
- config: zod_1.z.record(zod_1.z.unknown()),
26
- }),
27
- response: zod_1.z.object({ saved: zod_1.z.boolean() }),
28
- },
29
- "destinationsConfig-saveDestinationsConfig": {
30
- request: zod_1.z.object({
31
- oId: zod_1.z.string(),
32
- /** The full DestinationsConfig from the setup wizard. Validated server
33
- * side, which is also where provenance fields are stamped. */
34
- config: zod_1.z.record(zod_1.z.unknown()),
35
- /** Trust-only: what this trust imposes on its schools, keyed by feature.
36
- * Merged into the institute's existing policies, and refused outright
37
- * from a school. Lives on the institute root, not inside config. */
38
- trustPolicies: zod_1.z.record(zod_1.z.unknown()).optional(),
39
- }),
40
- response: zod_1.z.object({
41
- saved: zod_1.z.boolean(),
42
- /** True on a first save, which provisions the current year immediately. */
43
- provisioned: zod_1.z.boolean(),
44
- created: zod_1.z.number().optional(),
45
- }),
46
- },
47
21
  "destinationsConfig-provisionDestinationsNow": {
48
22
  request: zod_1.z.object({
49
23
  oId: zod_1.z.string(),
@@ -1 +1 @@
1
- {"version":3,"file":"destinationsConfig.js","sourceRoot":"","sources":["../../src/callables/destinationsConfig.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAGtB;;;;;;;;;;GAUG;AACU,QAAA,2BAA2B,GAAG;IACvC,kFAAkF;IAClF,kFAAkF;IAClF,2CAA2C;IAC3C,uCAAuC,EAAE;QACrC,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YACd,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;YACf;oEACwD;YACxD,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC;SAChC,CAAC;QACF,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,EAAC,KAAK,EAAE,OAAC,CAAC,OAAO,EAAE,EAAC,CAAC;KAC3C;IACD,2CAA2C,EAAE;QACzC,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YACd,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;YACf;0EAC8D;YAC9D,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CA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AAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;SACvD,CAAC;QACF,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,WAAW,EAAE,OAAC,CAAC,OAAO,EAAE;YACxB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;YACnB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;SAC3B,CAAC;KACL;CACoB,CAAC"}
@@ -799,12 +799,12 @@ export declare const allCallables: {
799
799
  updatedCycles: z.ZodNumber;
800
800
  invited: z.ZodNumber;
801
801
  }, "strip", z.ZodTypeAny, {
802
- saved: boolean;
803
802
  invited: number;
803
+ saved: boolean;
804
804
  updatedCycles: number;
805
805
  }, {
806
- saved: boolean;
807
806
  invited: number;
807
+ saved: boolean;
808
808
  updatedCycles: number;
809
809
  }>;
810
810
  };
@@ -945,53 +945,6 @@ export declare const allCallables: {
945
945
  }>;
946
946
  response: z.ZodAny;
947
947
  };
948
- "destinationsConfig-saveGuidanceConfig": {
949
- request: z.ZodObject<{
950
- oId: z.ZodString;
951
- config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
952
- }, "strip", z.ZodTypeAny, {
953
- config: Record<string, unknown>;
954
- oId: string;
955
- }, {
956
- config: Record<string, unknown>;
957
- oId: string;
958
- }>;
959
- response: z.ZodObject<{
960
- saved: z.ZodBoolean;
961
- }, "strip", z.ZodTypeAny, {
962
- saved: boolean;
963
- }, {
964
- saved: boolean;
965
- }>;
966
- };
967
- "destinationsConfig-saveDestinationsConfig": {
968
- request: z.ZodObject<{
969
- oId: z.ZodString;
970
- config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
971
- trustPolicies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
972
- }, "strip", z.ZodTypeAny, {
973
- config: Record<string, unknown>;
974
- oId: string;
975
- trustPolicies?: Record<string, unknown> | undefined;
976
- }, {
977
- config: Record<string, unknown>;
978
- oId: string;
979
- trustPolicies?: Record<string, unknown> | undefined;
980
- }>;
981
- response: z.ZodObject<{
982
- saved: z.ZodBoolean;
983
- provisioned: z.ZodBoolean;
984
- created: z.ZodOptional<z.ZodNumber>;
985
- }, "strip", z.ZodTypeAny, {
986
- saved: boolean;
987
- provisioned: boolean;
988
- created?: number | undefined;
989
- }, {
990
- saved: boolean;
991
- provisioned: boolean;
992
- created?: number | undefined;
993
- }>;
994
- };
995
948
  "destinationsConfig-provisionDestinationsNow": {
996
949
  request: z.ZodObject<{
997
950
  oId: z.ZodString;
@@ -1037,53 +990,6 @@ export type CallableContracts = {
1037
990
  /** The per-group maps, exported so tests can assert no key collisions. */
1038
991
  export declare const callableGroups: {
1039
992
  destinationsConfigCallables: {
1040
- "destinationsConfig-saveGuidanceConfig": {
1041
- request: z.ZodObject<{
1042
- oId: z.ZodString;
1043
- config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1044
- }, "strip", z.ZodTypeAny, {
1045
- config: Record<string, unknown>;
1046
- oId: string;
1047
- }, {
1048
- config: Record<string, unknown>;
1049
- oId: string;
1050
- }>;
1051
- response: z.ZodObject<{
1052
- saved: z.ZodBoolean;
1053
- }, "strip", z.ZodTypeAny, {
1054
- saved: boolean;
1055
- }, {
1056
- saved: boolean;
1057
- }>;
1058
- };
1059
- "destinationsConfig-saveDestinationsConfig": {
1060
- request: z.ZodObject<{
1061
- oId: z.ZodString;
1062
- config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1063
- trustPolicies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1064
- }, "strip", z.ZodTypeAny, {
1065
- config: Record<string, unknown>;
1066
- oId: string;
1067
- trustPolicies?: Record<string, unknown> | undefined;
1068
- }, {
1069
- config: Record<string, unknown>;
1070
- oId: string;
1071
- trustPolicies?: Record<string, unknown> | undefined;
1072
- }>;
1073
- response: z.ZodObject<{
1074
- saved: z.ZodBoolean;
1075
- provisioned: z.ZodBoolean;
1076
- created: z.ZodOptional<z.ZodNumber>;
1077
- }, "strip", z.ZodTypeAny, {
1078
- saved: boolean;
1079
- provisioned: boolean;
1080
- created?: number | undefined;
1081
- }, {
1082
- saved: boolean;
1083
- provisioned: boolean;
1084
- created?: number | undefined;
1085
- }>;
1086
- };
1087
993
  "destinationsConfig-provisionDestinationsNow": {
1088
994
  request: z.ZodObject<{
1089
995
  oId: z.ZodString;
@@ -1469,12 +1375,12 @@ export declare const callableGroups: {
1469
1375
  updatedCycles: z.ZodNumber;
1470
1376
  invited: z.ZodNumber;
1471
1377
  }, "strip", z.ZodTypeAny, {
1472
- saved: boolean;
1473
1378
  invited: number;
1379
+ saved: boolean;
1474
1380
  updatedCycles: number;
1475
1381
  }, {
1476
- saved: boolean;
1477
1382
  invited: number;
1383
+ saved: boolean;
1478
1384
  updatedCycles: number;
1479
1385
  }>;
1480
1386
  };
@@ -306,12 +306,12 @@ export declare const surveyCallables: {
306
306
  updatedCycles: z.ZodNumber;
307
307
  invited: z.ZodNumber;
308
308
  }, "strip", z.ZodTypeAny, {
309
- saved: boolean;
310
309
  invited: number;
310
+ saved: boolean;
311
311
  updatedCycles: number;
312
312
  }, {
313
- saved: boolean;
314
313
  invited: number;
314
+ saved: boolean;
315
315
  updatedCycles: number;
316
316
  }>;
317
317
  };
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.1101",
5
+ "version": "1.400.1102",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
8
8
  "scripts": {
@@ -7,42 +7,16 @@ import {CallableGroup} from "./types";
7
7
  *
8
8
  * These were `aspirations-*` while they lived in the legacy survey backend. That
9
9
  * module is gone, but the config it happened to host is institute setup that the
10
- * survey engine READS and does not own, so the two callables moved rather than being
10
+ * survey engine READS and does not own, so the callables moved rather than being
11
11
  * deleted. The names moved with them: never rename a deployed function in place, so
12
12
  * the old `aspirations-saveDestinationsConfig` and `aspirations-provisionDestinationsNow`
13
13
  * must be deleted explicitly at deploy time.
14
+ *
15
+ * Saving the config itself is a plain write to the institute doc from the client
16
+ * (saveDestinationsConfig / saveGuidanceConfig in the web app), so the two
17
+ * `destinationsConfig-save*` callables are gone too and are deleted the same way.
14
18
  */
15
19
  export const destinationsConfigCallables = {
16
- // The 1:1 guidance programme's setup lives beside destinations' because it is the
17
- // same kind of thing — institute setup the survey engine reads and does not own —
18
- // and is saved by the same backend module.
19
- "destinationsConfig-saveGuidanceConfig": {
20
- request: z.object({
21
- oId: z.string(),
22
- /** The full GuidanceConfig from the setup wizard. Validated server side,
23
- * which is also where provenance fields are stamped. */
24
- config: z.record(z.unknown()),
25
- }),
26
- response: z.object({saved: z.boolean()}),
27
- },
28
- "destinationsConfig-saveDestinationsConfig": {
29
- request: z.object({
30
- oId: z.string(),
31
- /** The full DestinationsConfig from the setup wizard. Validated server
32
- * side, which is also where provenance fields are stamped. */
33
- config: z.record(z.unknown()),
34
- /** Trust-only: what this trust imposes on its schools, keyed by feature.
35
- * Merged into the institute's existing policies, and refused outright
36
- * from a school. Lives on the institute root, not inside config. */
37
- trustPolicies: z.record(z.unknown()).optional(),
38
- }),
39
- response: z.object({
40
- saved: z.boolean(),
41
- /** True on a first save, which provisions the current year immediately. */
42
- provisioned: z.boolean(),
43
- created: z.number().optional(),
44
- }),
45
- },
46
20
  "destinationsConfig-provisionDestinationsNow": {
47
21
  request: z.object({
48
22
  oId: z.string(),
@@ -1246,7 +1246,7 @@ export type InstituteData = {
1246
1246
  closeAfterDays?: number, // default 21 — link validity window
1247
1247
  },
1248
1248
  // DESTINATIONS SETUP + ANNUAL AUTO-PROVISIONING (Form A + Form B + checkpoints)
1249
- // Written by the setup wizard (aspirations-saveDestinationsConfig); read by
1249
+ // Written by the setup wizard straight onto the doc; read by
1250
1250
  // destinationsProvisionCron each September to create that year's surveys/groups.
1251
1251
  destinationsConfig?: DestinationsConfig,
1252
1252
  /** 1:1 CAREERS GUIDANCE SETUP + ANNUAL AUTO-PROVISIONING.