placementt-core 1.400.1077 → 1.400.1079
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.
- package/lib/callables/apprenticeships.d.ts +102 -0
- package/lib/callables/apprenticeships.js +58 -0
- package/lib/callables/apprenticeships.js.map +1 -0
- package/lib/callables/he.d.ts +94 -0
- package/lib/callables/he.js +51 -0
- package/lib/callables/he.js.map +1 -0
- package/lib/callables/index.d.ts +2 -0
- package/lib/callables/index.js +2 -0
- package/lib/callables/index.js.map +1 -1
- package/lib/callables/registry.d.ts +358 -0
- package/lib/callables/registry.js +5 -1
- package/lib/callables/registry.js.map +1 -1
- package/lib/typeDefinitions.d.ts +431 -4
- package/lib/typeDefinitions.js.map +1 -1
- package/package.json +1 -1
- package/src/callables/apprenticeships.ts +59 -0
- package/src/callables/he.ts +51 -0
- package/src/callables/index.ts +2 -0
- package/src/callables/registry.ts +5 -1
- package/src/typeDefinitions.ts +407 -3
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const apprenticeshipsCallables: {
|
|
3
|
+
/** Run one crawl step now (about eight minutes of paced requests), starting
|
|
4
|
+
* a new run if none is open. */
|
|
5
|
+
"apprenticeships-syncStep": {
|
|
6
|
+
request: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
7
|
+
response: z.ZodObject<{
|
|
8
|
+
runId: z.ZodString;
|
|
9
|
+
/** True once every route has been crawled and the purge has run. */
|
|
10
|
+
complete: z.ZodBoolean;
|
|
11
|
+
cursor: z.ZodOptional<z.ZodObject<{
|
|
12
|
+
routeIndex: z.ZodNumber;
|
|
13
|
+
pageNumber: z.ZodNumber;
|
|
14
|
+
routeCount: z.ZodNumber;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
routeIndex: number;
|
|
17
|
+
pageNumber: number;
|
|
18
|
+
routeCount: number;
|
|
19
|
+
}, {
|
|
20
|
+
routeIndex: number;
|
|
21
|
+
pageNumber: number;
|
|
22
|
+
routeCount: number;
|
|
23
|
+
}>>;
|
|
24
|
+
totals: z.ZodObject<{
|
|
25
|
+
fetched: z.ZodNumber;
|
|
26
|
+
written: z.ZodNumber;
|
|
27
|
+
unchanged: z.ZodNumber;
|
|
28
|
+
deleted: z.ZodNumber;
|
|
29
|
+
requests: z.ZodNumber;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
deleted: number;
|
|
32
|
+
fetched: number;
|
|
33
|
+
written: number;
|
|
34
|
+
unchanged: number;
|
|
35
|
+
requests: number;
|
|
36
|
+
}, {
|
|
37
|
+
deleted: number;
|
|
38
|
+
fetched: number;
|
|
39
|
+
written: number;
|
|
40
|
+
unchanged: number;
|
|
41
|
+
requests: number;
|
|
42
|
+
}>;
|
|
43
|
+
/** Requests this step made, so an admin can see the pacing held. */
|
|
44
|
+
stepRequests: z.ZodNumber;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
complete: boolean;
|
|
47
|
+
runId: string;
|
|
48
|
+
totals: {
|
|
49
|
+
deleted: number;
|
|
50
|
+
fetched: number;
|
|
51
|
+
written: number;
|
|
52
|
+
unchanged: number;
|
|
53
|
+
requests: number;
|
|
54
|
+
};
|
|
55
|
+
stepRequests: number;
|
|
56
|
+
cursor?: {
|
|
57
|
+
routeIndex: number;
|
|
58
|
+
pageNumber: number;
|
|
59
|
+
routeCount: number;
|
|
60
|
+
} | undefined;
|
|
61
|
+
}, {
|
|
62
|
+
complete: boolean;
|
|
63
|
+
runId: string;
|
|
64
|
+
totals: {
|
|
65
|
+
deleted: number;
|
|
66
|
+
fetched: number;
|
|
67
|
+
written: number;
|
|
68
|
+
unchanged: number;
|
|
69
|
+
requests: number;
|
|
70
|
+
};
|
|
71
|
+
stepRequests: number;
|
|
72
|
+
cursor?: {
|
|
73
|
+
routeIndex: number;
|
|
74
|
+
pageNumber: number;
|
|
75
|
+
routeCount: number;
|
|
76
|
+
} | undefined;
|
|
77
|
+
}>;
|
|
78
|
+
};
|
|
79
|
+
/** Abandon the open run so the next step starts afresh. The mirror and its
|
|
80
|
+
* manifest are left alone. */
|
|
81
|
+
"apprenticeships-resetRun": {
|
|
82
|
+
request: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
83
|
+
response: z.ZodObject<{
|
|
84
|
+
ok: z.ZodLiteral<true>;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
ok: true;
|
|
87
|
+
}, {
|
|
88
|
+
ok: true;
|
|
89
|
+
}>;
|
|
90
|
+
};
|
|
91
|
+
/** Refetch the course route list into the config document. */
|
|
92
|
+
"apprenticeships-refreshRoutes": {
|
|
93
|
+
request: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
94
|
+
response: z.ZodObject<{
|
|
95
|
+
routes: z.ZodArray<z.ZodString, "many">;
|
|
96
|
+
}, "strip", z.ZodTypeAny, {
|
|
97
|
+
routes: string[];
|
|
98
|
+
}, {
|
|
99
|
+
routes: string[];
|
|
100
|
+
}>;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.apprenticeshipsCallables = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Contracts for the `apprenticeships` backend module
|
|
7
|
+
* (`Placementt-Backend/functions/src/apprenticeshipImport.ts`).
|
|
8
|
+
*
|
|
9
|
+
* Admin-only controls for the nightly mirror of DfE's Find an apprenticeship
|
|
10
|
+
* vacancies. All three take no payload; the status document
|
|
11
|
+
* (`apprenticeshipMeta/status`) is the source of truth the admin card reads
|
|
12
|
+
* live, so the responses only echo enough to confirm the call landed - a step
|
|
13
|
+
* can outlive the client's callable deadline and the card still resolves.
|
|
14
|
+
*/
|
|
15
|
+
const syncCursor = zod_1.z.object({
|
|
16
|
+
routeIndex: zod_1.z.number(),
|
|
17
|
+
pageNumber: zod_1.z.number(),
|
|
18
|
+
routeCount: zod_1.z.number(),
|
|
19
|
+
});
|
|
20
|
+
const syncTotals = zod_1.z.object({
|
|
21
|
+
fetched: zod_1.z.number(),
|
|
22
|
+
written: zod_1.z.number(),
|
|
23
|
+
unchanged: zod_1.z.number(),
|
|
24
|
+
deleted: zod_1.z.number(),
|
|
25
|
+
requests: zod_1.z.number(),
|
|
26
|
+
});
|
|
27
|
+
exports.apprenticeshipsCallables = {
|
|
28
|
+
/** Run one crawl step now (about eight minutes of paced requests), starting
|
|
29
|
+
* a new run if none is open. */
|
|
30
|
+
"apprenticeships-syncStep": {
|
|
31
|
+
request: zod_1.z.object({}),
|
|
32
|
+
response: zod_1.z.object({
|
|
33
|
+
runId: zod_1.z.string(),
|
|
34
|
+
/** True once every route has been crawled and the purge has run. */
|
|
35
|
+
complete: zod_1.z.boolean(),
|
|
36
|
+
cursor: syncCursor.optional(),
|
|
37
|
+
totals: syncTotals,
|
|
38
|
+
/** Requests this step made, so an admin can see the pacing held. */
|
|
39
|
+
stepRequests: zod_1.z.number(),
|
|
40
|
+
}),
|
|
41
|
+
},
|
|
42
|
+
/** Abandon the open run so the next step starts afresh. The mirror and its
|
|
43
|
+
* manifest are left alone. */
|
|
44
|
+
"apprenticeships-resetRun": {
|
|
45
|
+
request: zod_1.z.object({}),
|
|
46
|
+
response: zod_1.z.object({
|
|
47
|
+
ok: zod_1.z.literal(true),
|
|
48
|
+
}),
|
|
49
|
+
},
|
|
50
|
+
/** Refetch the course route list into the config document. */
|
|
51
|
+
"apprenticeships-refreshRoutes": {
|
|
52
|
+
request: zod_1.z.object({}),
|
|
53
|
+
response: zod_1.z.object({
|
|
54
|
+
routes: zod_1.z.array(zod_1.z.string()),
|
|
55
|
+
}),
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=apprenticeships.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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AC,CAAC,MAAM,CAAC,EAAE,CAAC;QACrB,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;SAC9B,CAAC;KACL;CACoB,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const heCallables: {
|
|
3
|
+
/** Run a full import now. `storagePath` names a zip already uploaded to
|
|
4
|
+
* Cloud Storage (`heImports/<file>.zip`) to use instead of the URL in
|
|
5
|
+
* the config; omitted, the config's `storagePath` is used if set, and
|
|
6
|
+
* the URL otherwise. */
|
|
7
|
+
"he-runImport": {
|
|
8
|
+
request: z.ZodObject<{
|
|
9
|
+
storagePath: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
storagePath?: string | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
storagePath?: string | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
response: z.ZodObject<{
|
|
16
|
+
runId: z.ZodString;
|
|
17
|
+
datasetVersion: z.ZodString;
|
|
18
|
+
source: z.ZodObject<{
|
|
19
|
+
kind: z.ZodEnum<["url", "storage"]>;
|
|
20
|
+
ref: z.ZodString;
|
|
21
|
+
}, "strip", z.ZodTypeAny, {
|
|
22
|
+
ref: string;
|
|
23
|
+
kind: "url" | "storage";
|
|
24
|
+
}, {
|
|
25
|
+
ref: string;
|
|
26
|
+
kind: "url" | "storage";
|
|
27
|
+
}>;
|
|
28
|
+
counts: z.ZodObject<{
|
|
29
|
+
coursesAssembled: z.ZodNumber;
|
|
30
|
+
coursesWritten: z.ZodNumber;
|
|
31
|
+
coursesUnchanged: z.ZodNumber;
|
|
32
|
+
coursesDeleted: z.ZodNumber;
|
|
33
|
+
providersWritten: z.ZodNumber;
|
|
34
|
+
providersUnchanged: z.ZodNumber;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
coursesAssembled: number;
|
|
37
|
+
coursesWritten: number;
|
|
38
|
+
coursesUnchanged: number;
|
|
39
|
+
coursesDeleted: number;
|
|
40
|
+
providersWritten: number;
|
|
41
|
+
providersUnchanged: number;
|
|
42
|
+
}, {
|
|
43
|
+
coursesAssembled: number;
|
|
44
|
+
coursesWritten: number;
|
|
45
|
+
coursesUnchanged: number;
|
|
46
|
+
coursesDeleted: number;
|
|
47
|
+
providersWritten: number;
|
|
48
|
+
providersUnchanged: number;
|
|
49
|
+
}>;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
source: {
|
|
52
|
+
ref: string;
|
|
53
|
+
kind: "url" | "storage";
|
|
54
|
+
};
|
|
55
|
+
runId: string;
|
|
56
|
+
datasetVersion: string;
|
|
57
|
+
counts: {
|
|
58
|
+
coursesAssembled: number;
|
|
59
|
+
coursesWritten: number;
|
|
60
|
+
coursesUnchanged: number;
|
|
61
|
+
coursesDeleted: number;
|
|
62
|
+
providersWritten: number;
|
|
63
|
+
providersUnchanged: number;
|
|
64
|
+
};
|
|
65
|
+
}, {
|
|
66
|
+
source: {
|
|
67
|
+
ref: string;
|
|
68
|
+
kind: "url" | "storage";
|
|
69
|
+
};
|
|
70
|
+
runId: string;
|
|
71
|
+
datasetVersion: string;
|
|
72
|
+
counts: {
|
|
73
|
+
coursesAssembled: number;
|
|
74
|
+
coursesWritten: number;
|
|
75
|
+
coursesUnchanged: number;
|
|
76
|
+
coursesDeleted: number;
|
|
77
|
+
providersWritten: number;
|
|
78
|
+
providersUnchanged: number;
|
|
79
|
+
};
|
|
80
|
+
}>;
|
|
81
|
+
};
|
|
82
|
+
/** Clear a stuck "running" state. The mirror and its manifest are left
|
|
83
|
+
* alone. */
|
|
84
|
+
"he-resetRun": {
|
|
85
|
+
request: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
86
|
+
response: z.ZodObject<{
|
|
87
|
+
ok: z.ZodLiteral<true>;
|
|
88
|
+
}, "strip", z.ZodTypeAny, {
|
|
89
|
+
ok: true;
|
|
90
|
+
}, {
|
|
91
|
+
ok: true;
|
|
92
|
+
}>;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.heCallables = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Contracts for the `he` backend module
|
|
7
|
+
* (`Placementt-Backend/functions/src/heImport.ts`).
|
|
8
|
+
*
|
|
9
|
+
* Admin-only controls for the weekly mirror of the HESA Discover Uni dataset
|
|
10
|
+
* into `heCourses` / `heProviders`. The status document (`heMeta/status`) is
|
|
11
|
+
* the source of truth the admin card reads live, so the responses only echo
|
|
12
|
+
* enough to confirm the call landed - an import can outlive the client's
|
|
13
|
+
* callable deadline and the card still resolves.
|
|
14
|
+
*/
|
|
15
|
+
const importCounts = zod_1.z.object({
|
|
16
|
+
coursesAssembled: zod_1.z.number(),
|
|
17
|
+
coursesWritten: zod_1.z.number(),
|
|
18
|
+
coursesUnchanged: zod_1.z.number(),
|
|
19
|
+
coursesDeleted: zod_1.z.number(),
|
|
20
|
+
providersWritten: zod_1.z.number(),
|
|
21
|
+
providersUnchanged: zod_1.z.number(),
|
|
22
|
+
});
|
|
23
|
+
exports.heCallables = {
|
|
24
|
+
/** Run a full import now. `storagePath` names a zip already uploaded to
|
|
25
|
+
* Cloud Storage (`heImports/<file>.zip`) to use instead of the URL in
|
|
26
|
+
* the config; omitted, the config's `storagePath` is used if set, and
|
|
27
|
+
* the URL otherwise. */
|
|
28
|
+
"he-runImport": {
|
|
29
|
+
request: zod_1.z.object({
|
|
30
|
+
storagePath: zod_1.z.string().optional(),
|
|
31
|
+
}),
|
|
32
|
+
response: zod_1.z.object({
|
|
33
|
+
runId: zod_1.z.string(),
|
|
34
|
+
datasetVersion: zod_1.z.string(),
|
|
35
|
+
source: zod_1.z.object({
|
|
36
|
+
kind: zod_1.z.enum(["url", "storage"]),
|
|
37
|
+
ref: zod_1.z.string(),
|
|
38
|
+
}),
|
|
39
|
+
counts: importCounts,
|
|
40
|
+
}),
|
|
41
|
+
},
|
|
42
|
+
/** Clear a stuck "running" state. The mirror and its manifest are left
|
|
43
|
+
* alone. */
|
|
44
|
+
"he-resetRun": {
|
|
45
|
+
request: zod_1.z.object({}),
|
|
46
|
+
response: zod_1.z.object({
|
|
47
|
+
ok: zod_1.z.literal(true),
|
|
48
|
+
}),
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=he.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"he.js","sourceRoot":"","sources":["../../src/callables/he.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAGtB;;;;;;;;;GASG;AAEH,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1B,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC5B,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC5B,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;IAC1B,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE;IAC5B,kBAAkB,EAAE,OAAC,CAAC,MAAM,EAAE;CACjC,CAAC,CAAC;AAEU,QAAA,WAAW,GAAG;IACvB;;;4BAGwB;IACxB,cAAc,EAAE;QACZ,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;YACd,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SACrC,CAAC;QACF,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;YACjB,cAAc,EAAE,OAAC,CAAC,MAAM,EAAE;YAC1B,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC;gBACb,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;gBAChC,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;aAClB,CAAC;YACF,MAAM,EAAE,YAAY;SACvB,CAAC;KACL;IACD;gBACY;IACZ,aAAa,EAAE;QACX,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QACrB,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC;YACf,EAAE,EAAE,OAAC,CAAC,OAAO,CAAC,IAAI,CAAC;SACtB,CAAC;KACL;CACoB,CAAC"}
|
package/lib/callables/index.d.ts
CHANGED
package/lib/callables/index.js
CHANGED
|
@@ -20,4 +20,6 @@ __exportStar(require("./destinationsConfig"), exports);
|
|
|
20
20
|
__exportStar(require("./placement"), exports);
|
|
21
21
|
__exportStar(require("./events"), exports);
|
|
22
22
|
__exportStar(require("./jobRoles"), exports);
|
|
23
|
+
__exportStar(require("./apprenticeships"), exports);
|
|
24
|
+
__exportStar(require("./he"), exports);
|
|
23
25
|
//# 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"}
|
|
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"}
|