placementt-core 1.400.1273 → 1.400.1275

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.
Files changed (97) hide show
  1. package/README.md +1 -1
  2. package/deploy-all.js +10 -34
  3. package/lib/callables/checks.d.ts +4 -4
  4. package/lib/callables/engagement.d.ts +8 -8
  5. package/lib/callables/index.d.ts +0 -1
  6. package/lib/callables/index.js +0 -1
  7. package/lib/callables/index.js.map +1 -1
  8. package/lib/callables/outreach.d.ts +4 -4
  9. package/lib/callables/registry.d.ts +56 -506
  10. package/lib/callables/registry.js +0 -3
  11. package/lib/callables/registry.js.map +1 -1
  12. package/lib/callables/surveys.d.ts +8 -8
  13. package/lib/callables/userManagement.d.ts +0 -45
  14. package/lib/callables/userManagement.js +0 -15
  15. package/lib/callables/userManagement.js.map +1 -1
  16. package/lib/callables/wonde.d.ts +6 -6
  17. package/lib/callables/wonde.js +2 -2
  18. package/lib/callables/wonde.js.map +1 -1
  19. package/lib/features/search/globalSearch.d.ts +5 -6
  20. package/lib/features/search/globalSearch.js +9 -8
  21. package/lib/features/search/globalSearch.js.map +1 -1
  22. package/lib/firebase/util.d.ts +19 -2
  23. package/lib/firebase/util.js +32 -2
  24. package/lib/firebase/util.js.map +1 -1
  25. package/lib/hooks.js +25 -32
  26. package/lib/hooks.js.map +1 -1
  27. package/lib/index.d.ts +2 -3
  28. package/lib/index.js +2 -3
  29. package/lib/index.js.map +1 -1
  30. package/lib/productFeatures.d.ts +3 -8
  31. package/lib/productFeatures.js +2 -10
  32. package/lib/productFeatures.js.map +1 -1
  33. package/lib/staffPermissions.d.ts +101 -0
  34. package/lib/staffPermissions.js +217 -0
  35. package/lib/staffPermissions.js.map +1 -0
  36. package/lib/staffPermissions.test.js +71 -0
  37. package/lib/staffPermissions.test.js.map +1 -0
  38. package/lib/studentFilters.d.ts +131 -0
  39. package/lib/studentFilters.js +168 -0
  40. package/lib/studentFilters.js.map +1 -0
  41. package/lib/studentFilters.test.js +82 -0
  42. package/lib/studentFilters.test.js.map +1 -0
  43. package/lib/surveys/schedule.d.ts +0 -27
  44. package/lib/surveys/schedule.js +1 -43
  45. package/lib/surveys/schedule.js.map +1 -1
  46. package/lib/surveys/schedule.test.js +59 -92
  47. package/lib/surveys/schedule.test.js.map +1 -1
  48. package/lib/typeDefinitions.d.ts +25 -18
  49. package/lib/typeDefinitions.js.map +1 -1
  50. package/lib/workflowBands.d.ts +1 -1
  51. package/package.json +1 -2
  52. package/src/callables/index.ts +0 -1
  53. package/src/callables/registry.ts +0 -3
  54. package/src/callables/userManagement.ts +0 -15
  55. package/src/callables/wonde.ts +2 -2
  56. package/src/features/search/globalSearch.ts +10 -10
  57. package/src/firebase/util.tsx +38 -3
  58. package/src/hooks.tsx +27 -38
  59. package/src/index.ts +2 -3
  60. package/src/productFeatures.ts +4 -12
  61. package/src/staffPermissions.test.ts +87 -0
  62. package/src/staffPermissions.ts +235 -0
  63. package/src/studentFilters.test.ts +90 -0
  64. package/src/studentFilters.ts +179 -0
  65. package/src/surveys/schedule.test.ts +0 -40
  66. package/src/surveys/schedule.ts +0 -41
  67. package/src/typeDefinitions.ts +22 -14
  68. package/.claude/settings.local.json +0 -12
  69. package/.github/workflows/deploy-dev.yaml +0 -39
  70. package/lib/callables/registration.d.ts +0 -211
  71. package/lib/callables/registration.js +0 -76
  72. package/lib/callables/registration.js.map +0 -1
  73. package/lib/onboardingV2.d.ts +0 -129
  74. package/lib/onboardingV2.js +0 -217
  75. package/lib/onboardingV2.js.map +0 -1
  76. package/lib/onboardingV2.steps.d.ts +0 -13
  77. package/lib/onboardingV2.steps.js +0 -17
  78. package/lib/onboardingV2.steps.js.map +0 -1
  79. package/lib/onboardingV2.test.js +0 -109
  80. package/lib/onboardingV2.test.js.map +0 -1
  81. package/lib/productFeatures.test.js +0 -31
  82. package/lib/productFeatures.test.js.map +0 -1
  83. package/lib/studentUpload.d.ts +0 -114
  84. package/lib/studentUpload.js +0 -189
  85. package/lib/studentUpload.js.map +0 -1
  86. package/lib/studentUpload.test.d.ts +0 -1
  87. package/lib/studentUpload.test.js +0 -83
  88. package/lib/studentUpload.test.js.map +0 -1
  89. package/src/callables/registration.ts +0 -75
  90. package/src/onboardingV2.steps.ts +0 -16
  91. package/src/onboardingV2.test.ts +0 -129
  92. package/src/onboardingV2.ts +0 -263
  93. package/src/productFeatures.test.ts +0 -31
  94. package/src/studentUpload.test.ts +0 -97
  95. package/src/studentUpload.ts +0 -218
  96. /package/lib/{onboardingV2.test.d.ts → staffPermissions.test.d.ts} +0 -0
  97. /package/lib/{productFeatures.test.d.ts → studentFilters.test.d.ts} +0 -0
package/README.md CHANGED
@@ -118,4 +118,4 @@ yarn test-local dev
118
118
  yarn core dev --restart
119
119
  ```
120
120
 
121
- Repeat step 1 + step 3 as you iterate. Once you're happy with the change, commit it here, bump the version, and publish for real (`yarn deploy` / `yarn deploy-all`; `yarn deploy-dev` publishes only the `dev` and `emu` tags from the current branch, leaves `prod` alone and commits nothing; publishing needs npm credentials, which only the GitHub trusted publisher has, so run it as the "Deploy dev" workflow from the Actions tab on your branch, or `gh workflow run deploy-dev.yaml --ref <branch>`) — then re-run `yarn core dev` (or `prod`) in the consuming repos without `--restart` to drop back to the real published version instead of the local link.
121
+ Repeat step 1 + step 3 as you iterate. Once you're happy with the change, commit it here, bump the version, and publish for real (`yarn deploy` / `yarn deploy-all`) — then re-run `yarn core dev` (or `prod`) in the consuming repos without `--restart` to drop back to the real published version instead of the local link.
package/deploy-all.js CHANGED
@@ -5,24 +5,11 @@ function run(cmd) {
5
5
  execSync(cmd, { stdio: 'inherit' });
6
6
  }
7
7
 
8
- // `yarn deploy-dev` runs this with --dev-only: the emulator and dev builds are
9
- // published from whatever branch is checked out, prod is not touched, and
10
- // nothing is committed or pushed, so a feature branch can be tried in the dev
11
- // web app and backend before it is merged.
12
- const devOnly = process.argv.includes('--dev-only');
13
-
14
- // Run through `yarn deploy-*`, npm inherits yarn's registry (registry.yarnpkg.com),
15
- // which has no login and refuses to publish. Always publish to npm itself.
16
- process.env.npm_config_registry = 'https://registry.npmjs.org/';
17
-
18
- console.log(devOnly ?
19
- "📦 Publishing dev and emulator builds only (prod untouched, nothing committed)..." :
20
- "📦 Starting automated deploy-all process...");
8
+ console.log("📦 Starting automated deploy-all process...");
21
9
 
22
10
  // ---- Read & bump version ----
23
11
  const packageJsonPath = 'package.json';
24
- const originalPackageJson = fs.readFileSync(packageJsonPath, 'utf8');
25
- const packageJson = JSON.parse(originalPackageJson);
12
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
26
13
 
27
14
  // package.json can lag the registry (a bump commit that failed to push, or a
28
15
  // manual edit), so take the highest patch from either source.
@@ -89,18 +76,16 @@ function toDevAlgoliaConfig(source) {
89
76
 
90
77
  const prodVersion = `1.1.${nextPatch}`;
91
78
 
92
- if (!devOnly) {
93
- // -------------------------------
94
- // 1️⃣ PROD VERSION (first, so a failing build or publish stops before dev/emu go out)
95
- // -------------------------------
96
- updateVersion(prodVersion);
79
+ // -------------------------------
80
+ // 1️⃣ PROD VERSION (first, so a failing build or publish stops before dev/emu go out)
81
+ // -------------------------------
82
+ updateVersion(prodVersion);
97
83
 
98
- console.log("🚀 Building (prod)...");
99
- run('yarn tsc');
84
+ console.log("🚀 Building (prod)...");
85
+ run('yarn tsc');
100
86
 
101
- console.log(`📤 Publishing ${prodVersion}`);
102
- publishWithTag(prodVersion, 'prod');
103
- }
87
+ console.log(`📤 Publishing ${prodVersion}`);
88
+ publishWithTag(prodVersion, 'prod');
104
89
 
105
90
  const devFirebaseConfig = originalFirebaseConfig.replace(
106
91
  /\(credentialsProd\)/g,
@@ -150,9 +135,6 @@ try {
150
135
  console.log("🧹 Resetting source files...");
151
136
  fs.writeFileSync(firebaseConfigPath, originalFirebaseConfig);
152
137
  fs.writeFileSync(algoliaConfigPath, originalAlgoliaConfig);
153
- // A dev-only publish leaves the version as it was: the next full deploy reads
154
- // the registry's tags and carries on from the patch this one used.
155
- if (devOnly) fs.writeFileSync(packageJsonPath, originalPackageJson);
156
138
  }
157
139
 
158
140
  // Rebuild so lib/ matches the prod source again rather than the dev build.
@@ -162,12 +144,6 @@ run('yarn tsc');
162
144
  // pinning re-points every tag at the version it was published with.
163
145
  pinDistTags();
164
146
 
165
- if (devOnly) {
166
- console.log(`🎉 Published emu ${publishedVersions.emu} and dev ${publishedVersions.dev}. Prod is unchanged. Nothing was committed.`);
167
- console.log(" In placementt-web or placementt-backend: yarn core dev (or yarn core em).");
168
- process.exit(0);
169
- }
170
-
171
147
  console.log("🎉 Deployment complete!");
172
148
 
173
149
  updateVersion(prodVersion);
@@ -31,12 +31,12 @@ export declare const checksCallables: {
31
31
  }, "strip", z.ZodTypeAny, {
32
32
  label: string;
33
33
  done?: boolean | undefined;
34
- owner?: "student" | "staff" | undefined;
34
+ owner?: "staff" | "student" | undefined;
35
35
  dueDate?: string | undefined;
36
36
  }, {
37
37
  label: string;
38
38
  done?: boolean | undefined;
39
- owner?: "student" | "staff" | undefined;
39
+ owner?: "staff" | "student" | undefined;
40
40
  dueDate?: string | null | undefined;
41
41
  }>, "many">>;
42
42
  concern: z.ZodOptional<z.ZodBoolean>;
@@ -48,7 +48,7 @@ export declare const checksCallables: {
48
48
  actions?: {
49
49
  label: string;
50
50
  done?: boolean | undefined;
51
- owner?: "student" | "staff" | undefined;
51
+ owner?: "staff" | "student" | undefined;
52
52
  dueDate?: string | undefined;
53
53
  }[] | undefined;
54
54
  staffNotes?: string | undefined;
@@ -63,7 +63,7 @@ export declare const checksCallables: {
63
63
  actions?: {
64
64
  label: string;
65
65
  done?: boolean | undefined;
66
- owner?: "student" | "staff" | undefined;
66
+ owner?: "staff" | "student" | undefined;
67
67
  dueDate?: string | null | undefined;
68
68
  }[] | undefined;
69
69
  staffNotes?: string | null | undefined;
@@ -55,8 +55,8 @@ export declare const engagementCallables: {
55
55
  }, "strip", z.ZodTypeAny, {
56
56
  name: string;
57
57
  oId: string;
58
- package: string;
59
58
  flags: ("noContacts" | "noRenewalDate" | "noQuote" | "noFinanceContact" | "sentRecently")[];
59
+ package: string;
60
60
  people: {
61
61
  name: string;
62
62
  email: string;
@@ -64,7 +64,7 @@ export declare const engagementCallables: {
64
64
  }[];
65
65
  contacts: number;
66
66
  params: Record<string, string>;
67
- products: ("network" | "events" | "employerEvents" | "wex" | "parents" | "skills" | "activities" | "destinations" | "alumni")[];
67
+ products: ("network" | "events" | "skills" | "destinations" | "wex" | "parents" | "activities" | "alumni" | "employerEvents")[];
68
68
  suggested: boolean;
69
69
  marketingContacts: number;
70
70
  reason?: string | undefined;
@@ -76,8 +76,8 @@ export declare const engagementCallables: {
76
76
  }, {
77
77
  name: string;
78
78
  oId: string;
79
- package: string;
80
79
  flags: ("noContacts" | "noRenewalDate" | "noQuote" | "noFinanceContact" | "sentRecently")[];
80
+ package: string;
81
81
  people: {
82
82
  name: string;
83
83
  email: string;
@@ -85,7 +85,7 @@ export declare const engagementCallables: {
85
85
  }[];
86
86
  contacts: number;
87
87
  params: Record<string, string>;
88
- products: ("network" | "events" | "employerEvents" | "wex" | "parents" | "skills" | "activities" | "destinations" | "alumni")[];
88
+ products: ("network" | "events" | "skills" | "destinations" | "wex" | "parents" | "activities" | "alumni" | "employerEvents")[];
89
89
  suggested: boolean;
90
90
  marketingContacts: number;
91
91
  reason?: string | undefined;
@@ -99,8 +99,8 @@ export declare const engagementCallables: {
99
99
  schools: {
100
100
  name: string;
101
101
  oId: string;
102
- package: string;
103
102
  flags: ("noContacts" | "noRenewalDate" | "noQuote" | "noFinanceContact" | "sentRecently")[];
103
+ package: string;
104
104
  people: {
105
105
  name: string;
106
106
  email: string;
@@ -108,7 +108,7 @@ export declare const engagementCallables: {
108
108
  }[];
109
109
  contacts: number;
110
110
  params: Record<string, string>;
111
- products: ("network" | "events" | "employerEvents" | "wex" | "parents" | "skills" | "activities" | "destinations" | "alumni")[];
111
+ products: ("network" | "events" | "skills" | "destinations" | "wex" | "parents" | "activities" | "alumni" | "employerEvents")[];
112
112
  suggested: boolean;
113
113
  marketingContacts: number;
114
114
  reason?: string | undefined;
@@ -122,8 +122,8 @@ export declare const engagementCallables: {
122
122
  schools: {
123
123
  name: string;
124
124
  oId: string;
125
- package: string;
126
125
  flags: ("noContacts" | "noRenewalDate" | "noQuote" | "noFinanceContact" | "sentRecently")[];
126
+ package: string;
127
127
  people: {
128
128
  name: string;
129
129
  email: string;
@@ -131,7 +131,7 @@ export declare const engagementCallables: {
131
131
  }[];
132
132
  contacts: number;
133
133
  params: Record<string, string>;
134
- products: ("network" | "events" | "employerEvents" | "wex" | "parents" | "skills" | "activities" | "destinations" | "alumni")[];
134
+ products: ("network" | "events" | "skills" | "destinations" | "wex" | "parents" | "activities" | "alumni" | "employerEvents")[];
135
135
  suggested: boolean;
136
136
  marketingContacts: number;
137
137
  reason?: string | undefined;
@@ -17,4 +17,3 @@ export * from "./outreach";
17
17
  export * from "./formImport";
18
18
  export * from "./activities";
19
19
  export * from "./engagement";
20
- export * from "./registration";
@@ -33,5 +33,4 @@ __exportStar(require("./outreach"), exports);
33
33
  __exportStar(require("./formImport"), exports);
34
34
  __exportStar(require("./activities"), exports);
35
35
  __exportStar(require("./engagement"), exports);
36
- __exportStar(require("./registration"), exports);
37
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/callables/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B;AAC3B,uDAAqC;AACrC,8CAA4B;AAC5B,2CAAyB;AACzB,6CAA2B;AAC3B,oDAAkC;AAClC,uCAAqB;AACrB,oDAAkC;AAClC,4CAA0B;AAC1B,oDAAkC;AAClC,wCAAsB;AACtB,0CAAwB;AACxB,4CAA0B;AAC1B,mDAAiC;AACjC,6CAA2B;AAC3B,+CAA6B;AAC7B,+CAA6B;AAC7B,+CAA6B;AAC7B,iDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/callables/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,6CAA2B;AAC3B,uDAAqC;AACrC,8CAA4B;AAC5B,2CAAyB;AACzB,6CAA2B;AAC3B,oDAAkC;AAClC,uCAAqB;AACrB,oDAAkC;AAClC,4CAA0B;AAC1B,oDAAkC;AAClC,wCAAsB;AACtB,0CAAwB;AACxB,4CAA0B;AAC1B,mDAAiC;AACjC,6CAA2B;AAC3B,+CAA6B;AAC7B,+CAA6B;AAC7B,+CAA6B"}
@@ -170,9 +170,9 @@ export declare const outreachCallables: {
170
170
  assignee: string;
171
171
  events?: boolean | undefined;
172
172
  wex?: boolean | undefined;
173
+ docCheck?: boolean | undefined;
173
174
  forename?: string | undefined;
174
175
  surname?: string | undefined;
175
- docCheck?: boolean | undefined;
176
176
  personalNotes?: any[] | undefined;
177
177
  generalNotes?: any[] | undefined;
178
178
  }, {
@@ -181,9 +181,9 @@ export declare const outreachCallables: {
181
181
  assignee: string;
182
182
  events?: boolean | undefined;
183
183
  wex?: boolean | undefined;
184
+ docCheck?: boolean | undefined;
184
185
  forename?: string | null | undefined;
185
186
  surname?: string | null | undefined;
186
- docCheck?: boolean | undefined;
187
187
  personalNotes?: any[] | undefined;
188
188
  generalNotes?: any[] | undefined;
189
189
  }>;
@@ -195,9 +195,9 @@ export declare const outreachCallables: {
195
195
  assignee: string;
196
196
  events?: boolean | undefined;
197
197
  wex?: boolean | undefined;
198
+ docCheck?: boolean | undefined;
198
199
  forename?: string | undefined;
199
200
  surname?: string | undefined;
200
- docCheck?: boolean | undefined;
201
201
  personalNotes?: any[] | undefined;
202
202
  generalNotes?: any[] | undefined;
203
203
  };
@@ -209,9 +209,9 @@ export declare const outreachCallables: {
209
209
  assignee: string;
210
210
  events?: boolean | undefined;
211
211
  wex?: boolean | undefined;
212
+ docCheck?: boolean | undefined;
212
213
  forename?: string | null | undefined;
213
214
  surname?: string | null | undefined;
214
- docCheck?: boolean | undefined;
215
215
  personalNotes?: any[] | undefined;
216
216
  generalNotes?: any[] | undefined;
217
217
  };