placementt-core 1.400.1096 → 1.400.1097

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.
@@ -0,0 +1,39 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Contract for the Careers Hub impact report
4
+ * (`Placementt-Backend/functions/src/hubImpactReport.ts`).
5
+ *
6
+ * The school/trust impact report is scoped by cohort, because a school's year IS
7
+ * its cohort. A hub has no cohort, so this one is scoped by date instead, and by
8
+ * nothing else: everything in the report is derived from the hub's own links,
9
+ * employer network, events, opportunities and campaigns, so there is no filter
10
+ * the client could pass that the server should trust.
11
+ */
12
+ export declare const hubImpactReportCallables: {
13
+ "hubImpactReport-createHubImpactReport": {
14
+ request: z.ZodObject<{
15
+ /** The careers hub to report on. Omitted means the caller's own
16
+ * organisation; a different one is allowed only where the caller
17
+ * already has staff access to it. */
18
+ oId: z.ZodOptional<z.ZodString>;
19
+ /** Inclusive ISO start date. Both ends must be given, or the report
20
+ * falls back to the current academic year (1 September onwards) -
21
+ * which is the period a hub means by "this year" anyway. */
22
+ startDate: z.ZodOptional<z.ZodString>;
23
+ /** Inclusive ISO end date. */
24
+ endDate: z.ZodOptional<z.ZodString>;
25
+ }, "strip", z.ZodTypeAny, {
26
+ oId?: string | undefined;
27
+ startDate?: string | undefined;
28
+ endDate?: string | undefined;
29
+ }, {
30
+ oId?: string | undefined;
31
+ startDate?: string | undefined;
32
+ endDate?: string | undefined;
33
+ }>;
34
+ /** The Storage path of the generated PDF. The client resolves it with
35
+ * getDownloadURL, so the download is governed by the Storage rules
36
+ * rather than by a signed URL the functions runtime cannot mint. */
37
+ response: z.ZodString;
38
+ };
39
+ };
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hubImpactReportCallables = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Contract for the Careers Hub impact report
7
+ * (`Placementt-Backend/functions/src/hubImpactReport.ts`).
8
+ *
9
+ * The school/trust impact report is scoped by cohort, because a school's year IS
10
+ * its cohort. A hub has no cohort, so this one is scoped by date instead, and by
11
+ * nothing else: everything in the report is derived from the hub's own links,
12
+ * employer network, events, opportunities and campaigns, so there is no filter
13
+ * the client could pass that the server should trust.
14
+ */
15
+ exports.hubImpactReportCallables = {
16
+ "hubImpactReport-createHubImpactReport": {
17
+ request: zod_1.z.object({
18
+ /** The careers hub to report on. Omitted means the caller's own
19
+ * organisation; a different one is allowed only where the caller
20
+ * already has staff access to it. */
21
+ oId: zod_1.z.string().optional(),
22
+ /** Inclusive ISO start date. Both ends must be given, or the report
23
+ * falls back to the current academic year (1 September onwards) -
24
+ * which is the period a hub means by "this year" anyway. */
25
+ startDate: zod_1.z.string().optional(),
26
+ /** Inclusive ISO end date. */
27
+ endDate: zod_1.z.string().optional(),
28
+ }),
29
+ /** The Storage path of the generated PDF. The client resolves it with
30
+ * getDownloadURL, so the download is governed by the Storage rules
31
+ * rather than by a signed URL the functions runtime cannot mint. */
32
+ response: zod_1.z.string(),
33
+ },
34
+ };
35
+ //# sourceMappingURL=hubImpactReport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hubImpactReport.js","sourceRoot":"","sources":["../../src/callables/hubImpactReport.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAGtB;;;;;;;;;GASG;AACU,QAAA,wBAAwB,GAAG;IACpC,uCAAuC,EAAE;QACrC,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YACd;;iDAEqC;YACrC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC1B;;wEAE4D;YAC5D,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAChC,8BAA8B;YAC9B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SACjC,CAAC;QACF;;4EAEoE;QACpE,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;KACvB;CACoB,CAAC"}
@@ -8,3 +8,4 @@ export * from "./apprenticeships";
8
8
  export * from "./he";
9
9
  export * from "./activityLogging";
10
10
  export * from "./billing";
11
+ export * from "./hubImpactReport";
@@ -24,4 +24,5 @@ __exportStar(require("./apprenticeships"), exports);
24
24
  __exportStar(require("./he"), exports);
25
25
  __exportStar(require("./activityLogging"), exports);
26
26
  __exportStar(require("./billing"), exports);
27
+ __exportStar(require("./hubImpactReport"), exports);
27
28
  //# 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"}
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"}
@@ -11,6 +11,22 @@ import { z } from "zod";
11
11
  * equals the sum of the group key counts.
12
12
  */
13
13
  export declare const allCallables: {
14
+ "hubImpactReport-createHubImpactReport": {
15
+ request: z.ZodObject<{
16
+ oId: z.ZodOptional<z.ZodString>;
17
+ startDate: z.ZodOptional<z.ZodString>;
18
+ endDate: z.ZodOptional<z.ZodString>;
19
+ }, "strip", z.ZodTypeAny, {
20
+ oId?: string | undefined;
21
+ startDate?: string | undefined;
22
+ endDate?: string | undefined;
23
+ }, {
24
+ oId?: string | undefined;
25
+ startDate?: string | undefined;
26
+ endDate?: string | undefined;
27
+ }>;
28
+ response: z.ZodString;
29
+ };
14
30
  "jobRoles-getSchoolPopularity": {
15
31
  request: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
16
32
  response: z.ZodObject<{
@@ -2035,4 +2051,22 @@ export declare const callableGroups: {
2035
2051
  }>;
2036
2052
  };
2037
2053
  };
2054
+ hubImpactReportCallables: {
2055
+ "hubImpactReport-createHubImpactReport": {
2056
+ request: z.ZodObject<{
2057
+ oId: z.ZodOptional<z.ZodString>;
2058
+ startDate: z.ZodOptional<z.ZodString>;
2059
+ endDate: z.ZodOptional<z.ZodString>;
2060
+ }, "strip", z.ZodTypeAny, {
2061
+ oId?: string | undefined;
2062
+ startDate?: string | undefined;
2063
+ endDate?: string | undefined;
2064
+ }, {
2065
+ oId?: string | undefined;
2066
+ startDate?: string | undefined;
2067
+ endDate?: string | undefined;
2068
+ }>;
2069
+ response: z.ZodString;
2070
+ };
2071
+ };
2038
2072
  };
@@ -12,6 +12,7 @@ const he_1 = require("./he");
12
12
  const activityLogging_1 = require("./activityLogging");
13
13
  const billing_1 = require("./billing");
14
14
  const jobRoles_1 = require("./jobRoles");
15
+ const hubImpactReport_1 = require("./hubImpactReport");
15
16
  /**
16
17
  * The single source of truth for every typed callable. Add a feature group's
17
18
  * spread here and its callables are automatically covered by:
@@ -35,7 +36,8 @@ exports.allCallables = {
35
36
  ...activityLogging_1.activityLoggingCallables,
36
37
  ...billing_1.billingCallables,
37
38
  ...jobRoles_1.jobRolesCallables,
39
+ ...hubImpactReport_1.hubImpactReportCallables,
38
40
  };
39
41
  /** The per-group maps, exported so tests can assert no key collisions. */
40
- exports.callableGroups = { destinationsConfigCallables: destinationsConfig_1.destinationsConfigCallables, placementCallables: placement_1.placementCallables, eventsCallables: events_1.eventsCallables, surveyCallables: surveys_1.surveyCallables, checksCallables: checks_1.checksCallables, benchmarksCallables: benchmarks_1.benchmarksCallables, apprenticeshipsCallables: apprenticeships_1.apprenticeshipsCallables, heCallables: he_1.heCallables, activityLoggingCallables: activityLogging_1.activityLoggingCallables, billingCallables: billing_1.billingCallables, jobRolesCallables: jobRoles_1.jobRolesCallables };
42
+ exports.callableGroups = { destinationsConfigCallables: destinationsConfig_1.destinationsConfigCallables, placementCallables: placement_1.placementCallables, eventsCallables: events_1.eventsCallables, surveyCallables: surveys_1.surveyCallables, checksCallables: checks_1.checksCallables, benchmarksCallables: benchmarks_1.benchmarksCallables, apprenticeshipsCallables: apprenticeships_1.apprenticeshipsCallables, heCallables: he_1.heCallables, activityLoggingCallables: activityLogging_1.activityLoggingCallables, billingCallables: billing_1.billingCallables, jobRolesCallables: jobRoles_1.jobRolesCallables, hubImpactReportCallables: hubImpactReport_1.hubImpactReportCallables };
41
43
  //# sourceMappingURL=registry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/callables/registry.ts"],"names":[],"mappings":";;;AAEA,6DAAiE;AACjE,2CAA+C;AAC/C,qCAAyC;AACzC,uCAA0C;AAC1C,qCAAyC;AACzC,6CAAiD;AACjD,uDAA2D;AAC3D,6BAAiC;AACjC,uDAA2D;AAC3D,uCAA2C;AAC3C,yCAA6C;AAE7C;;;;;;;;;;GAUG;AACU,QAAA,YAAY,GAAG;IACxB,GAAG,gDAA2B;IAC9B,GAAG,8BAAkB;IACrB,GAAG,wBAAe;IAClB,GAAG,yBAAe;IAClB,GAAG,wBAAe;IAClB,GAAG,gCAAmB;IACtB,GAAG,0CAAwB;IAC3B,GAAG,gBAAW;IACd,GAAG,0CAAwB;IAC3B,GAAG,0BAAgB;IACnB,GAAG,4BAAiB;CACC,CAAC;AAiB1B,0EAA0E;AAC7D,QAAA,cAAc,GAAG,EAAC,2BAA2B,EAA3B,gDAA2B,EAAE,kBAAkB,EAAlB,8BAAkB,EAAE,eAAe,EAAf,wBAAe,EAAE,eAAe,EAAf,yBAAe,EAAE,eAAe,EAAf,wBAAe,EAAE,mBAAmB,EAAnB,gCAAmB,EAAE,wBAAwB,EAAxB,0CAAwB,EAAE,WAAW,EAAX,gBAAW,EAAE,wBAAwB,EAAxB,0CAAwB,EAAE,gBAAgB,EAAhB,0BAAgB,EAAE,iBAAiB,EAAjB,4BAAiB,EAAC,CAAC"}
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/callables/registry.ts"],"names":[],"mappings":";;;AAEA,6DAAiE;AACjE,2CAA+C;AAC/C,qCAAyC;AACzC,uCAA0C;AAC1C,qCAAyC;AACzC,6CAAiD;AACjD,uDAA2D;AAC3D,6BAAiC;AACjC,uDAA2D;AAC3D,uCAA2C;AAC3C,yCAA6C;AAC7C,uDAA2D;AAE3D;;;;;;;;;;GAUG;AACU,QAAA,YAAY,GAAG;IACxB,GAAG,gDAA2B;IAC9B,GAAG,8BAAkB;IACrB,GAAG,wBAAe;IAClB,GAAG,yBAAe;IAClB,GAAG,wBAAe;IAClB,GAAG,gCAAmB;IACtB,GAAG,0CAAwB;IAC3B,GAAG,gBAAW;IACd,GAAG,0CAAwB;IAC3B,GAAG,0BAAgB;IACnB,GAAG,4BAAiB;IACpB,GAAG,0CAAwB;CACN,CAAC;AAiB1B,0EAA0E;AAC7D,QAAA,cAAc,GAAG,EAAC,2BAA2B,EAA3B,gDAA2B,EAAE,kBAAkB,EAAlB,8BAAkB,EAAE,eAAe,EAAf,wBAAe,EAAE,eAAe,EAAf,yBAAe,EAAE,eAAe,EAAf,wBAAe,EAAE,mBAAmB,EAAnB,gCAAmB,EAAE,wBAAwB,EAAxB,0CAAwB,EAAE,WAAW,EAAX,gBAAW,EAAE,wBAAwB,EAAxB,0CAAwB,EAAE,gBAAgB,EAAhB,0BAAgB,EAAE,iBAAiB,EAAjB,4BAAiB,EAAE,wBAAwB,EAAxB,0CAAwB,EAAC,CAAC"}
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.1096",
5
+ "version": "1.400.1097",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
8
8
  "scripts": {
@@ -0,0 +1,33 @@
1
+ import {z} from "zod";
2
+ import {CallableGroup} from "./types";
3
+
4
+ /**
5
+ * Contract for the Careers Hub impact report
6
+ * (`Placementt-Backend/functions/src/hubImpactReport.ts`).
7
+ *
8
+ * The school/trust impact report is scoped by cohort, because a school's year IS
9
+ * its cohort. A hub has no cohort, so this one is scoped by date instead, and by
10
+ * nothing else: everything in the report is derived from the hub's own links,
11
+ * employer network, events, opportunities and campaigns, so there is no filter
12
+ * the client could pass that the server should trust.
13
+ */
14
+ export const hubImpactReportCallables = {
15
+ "hubImpactReport-createHubImpactReport": {
16
+ request: z.object({
17
+ /** The careers hub to report on. Omitted means the caller's own
18
+ * organisation; a different one is allowed only where the caller
19
+ * already has staff access to it. */
20
+ oId: z.string().optional(),
21
+ /** Inclusive ISO start date. Both ends must be given, or the report
22
+ * falls back to the current academic year (1 September onwards) -
23
+ * which is the period a hub means by "this year" anyway. */
24
+ startDate: z.string().optional(),
25
+ /** Inclusive ISO end date. */
26
+ endDate: z.string().optional(),
27
+ }),
28
+ /** The Storage path of the generated PDF. The client resolves it with
29
+ * getDownloadURL, so the download is governed by the Storage rules
30
+ * rather than by a signed URL the functions runtime cannot mint. */
31
+ response: z.string(),
32
+ },
33
+ } satisfies CallableGroup;
@@ -8,3 +8,4 @@ export * from "./apprenticeships";
8
8
  export * from "./he";
9
9
  export * from "./activityLogging";
10
10
  export * from "./billing";
11
+ export * from "./hubImpactReport";
@@ -11,6 +11,7 @@ import {heCallables} from "./he";
11
11
  import {activityLoggingCallables} from "./activityLogging";
12
12
  import {billingCallables} from "./billing";
13
13
  import {jobRolesCallables} from "./jobRoles";
14
+ import {hubImpactReportCallables} from "./hubImpactReport";
14
15
 
15
16
  /**
16
17
  * The single source of truth for every typed callable. Add a feature group's
@@ -35,6 +36,7 @@ export const allCallables = {
35
36
  ...activityLoggingCallables,
36
37
  ...billingCallables,
37
38
  ...jobRolesCallables,
39
+ ...hubImpactReportCallables,
38
40
  } satisfies CallableGroup;
39
41
 
40
42
  /** Every registered callable name. */
@@ -53,4 +55,4 @@ export type CallableContracts = {
53
55
  };
54
56
 
55
57
  /** The per-group maps, exported so tests can assert no key collisions. */
56
- export const callableGroups = {destinationsConfigCallables, placementCallables, eventsCallables, surveyCallables, checksCallables, benchmarksCallables, apprenticeshipsCallables, heCallables, activityLoggingCallables, billingCallables, jobRolesCallables};
58
+ export const callableGroups = {destinationsConfigCallables, placementCallables, eventsCallables, surveyCallables, checksCallables, benchmarksCallables, apprenticeshipsCallables, heCallables, activityLoggingCallables, billingCallables, jobRolesCallables, hubImpactReportCallables};