@vepler/sdk 2.149.0 → 2.151.0

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 (139) hide show
  1. package/dist/commonjs/funcs/schoolsGetSchoolById.js +4 -0
  2. package/dist/commonjs/funcs/schoolsGetSchoolById.js.map +1 -1
  3. package/dist/commonjs/funcs/schoolsGetSchoolBySource.js +4 -0
  4. package/dist/commonjs/funcs/schoolsGetSchoolBySource.js.map +1 -1
  5. package/dist/commonjs/lib/config.d.ts +2 -2
  6. package/dist/commonjs/lib/config.js +2 -2
  7. package/dist/commonjs/sdk/models/operations/getschoolbyid.d.ts +69 -0
  8. package/dist/commonjs/sdk/models/operations/getschoolbyid.d.ts.map +1 -1
  9. package/dist/commonjs/sdk/models/operations/getschoolbyid.js +35 -1
  10. package/dist/commonjs/sdk/models/operations/getschoolbyid.js.map +1 -1
  11. package/dist/commonjs/sdk/models/operations/getschoolbysource.d.ts +69 -0
  12. package/dist/commonjs/sdk/models/operations/getschoolbysource.d.ts.map +1 -1
  13. package/dist/commonjs/sdk/models/operations/getschoolbysource.js +35 -1
  14. package/dist/commonjs/sdk/models/operations/getschoolbysource.js.map +1 -1
  15. package/dist/commonjs/sdk/models/operations/queryschools.d.ts +78 -0
  16. package/dist/commonjs/sdk/models/operations/queryschools.d.ts.map +1 -1
  17. package/dist/commonjs/sdk/models/operations/queryschools.js +42 -1
  18. package/dist/commonjs/sdk/models/operations/queryschools.js.map +1 -1
  19. package/dist/commonjs/sdk/models/operations/queryschoolsbysource.d.ts +78 -0
  20. package/dist/commonjs/sdk/models/operations/queryschoolsbysource.d.ts.map +1 -1
  21. package/dist/commonjs/sdk/models/operations/queryschoolsbysource.js +41 -1
  22. package/dist/commonjs/sdk/models/operations/queryschoolsbysource.js.map +1 -1
  23. package/dist/commonjs/sdk/models/shared/chargeentry.d.ts +1 -1
  24. package/dist/commonjs/sdk/models/shared/chargehistory.d.ts +1 -1
  25. package/dist/commonjs/sdk/models/shared/index.d.ts +6 -0
  26. package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
  27. package/dist/commonjs/sdk/models/shared/index.js +6 -0
  28. package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
  29. package/dist/commonjs/sdk/models/shared/listing.d.ts +2 -2
  30. package/dist/commonjs/sdk/models/shared/listingpricechange.d.ts +2 -2
  31. package/dist/commonjs/sdk/models/shared/pricechange.d.ts +2 -2
  32. package/dist/commonjs/sdk/models/shared/pricingdata.d.ts +4 -4
  33. package/dist/commonjs/sdk/models/shared/salerecord.d.ts +1 -1
  34. package/dist/commonjs/sdk/models/shared/schoolinspectionevaluationarea.d.ts +17 -0
  35. package/dist/commonjs/sdk/models/shared/schoolinspectionevaluationarea.d.ts.map +1 -0
  36. package/dist/commonjs/sdk/models/shared/schoolinspectionevaluationarea.js +51 -0
  37. package/dist/commonjs/sdk/models/shared/schoolinspectionevaluationarea.js.map +1 -0
  38. package/dist/commonjs/sdk/models/shared/schoolinspectionevent.d.ts +103 -0
  39. package/dist/commonjs/sdk/models/shared/schoolinspectionevent.d.ts.map +1 -0
  40. package/dist/commonjs/sdk/models/shared/schoolinspectionevent.js +112 -0
  41. package/dist/commonjs/sdk/models/shared/schoolinspectionevent.js.map +1 -0
  42. package/dist/commonjs/sdk/models/shared/schoolinspectiongrade.d.ts +17 -0
  43. package/dist/commonjs/sdk/models/shared/schoolinspectiongrade.d.ts.map +1 -0
  44. package/dist/commonjs/sdk/models/shared/schoolinspectiongrade.js +51 -0
  45. package/dist/commonjs/sdk/models/shared/schoolinspectiongrade.js.map +1 -0
  46. package/dist/commonjs/sdk/models/shared/schoolinspectionpredecessor.d.ts +13 -0
  47. package/dist/commonjs/sdk/models/shared/schoolinspectionpredecessor.d.ts.map +1 -0
  48. package/dist/commonjs/sdk/models/shared/schoolinspectionpredecessor.js +53 -0
  49. package/dist/commonjs/sdk/models/shared/schoolinspectionpredecessor.js.map +1 -0
  50. package/dist/commonjs/sdk/models/shared/schoolinspectorbody.d.ts +19 -0
  51. package/dist/commonjs/sdk/models/shared/schoolinspectorbody.d.ts.map +1 -0
  52. package/dist/commonjs/sdk/models/shared/schoolinspectorbody.js +53 -0
  53. package/dist/commonjs/sdk/models/shared/schoolinspectorbody.js.map +1 -0
  54. package/dist/commonjs/sdk/models/shared/schooltrustmembership.d.ts +45 -0
  55. package/dist/commonjs/sdk/models/shared/schooltrustmembership.d.ts.map +1 -0
  56. package/dist/commonjs/sdk/models/shared/schooltrustmembership.js +58 -0
  57. package/dist/commonjs/sdk/models/shared/schooltrustmembership.js.map +1 -0
  58. package/dist/commonjs/sdk/models/shared/sitepropertystats.d.ts +2 -2
  59. package/dist/esm/funcs/schoolsGetSchoolById.js +5 -1
  60. package/dist/esm/funcs/schoolsGetSchoolById.js.map +1 -1
  61. package/dist/esm/funcs/schoolsGetSchoolBySource.js +5 -1
  62. package/dist/esm/funcs/schoolsGetSchoolBySource.js.map +1 -1
  63. package/dist/esm/lib/config.d.ts +2 -2
  64. package/dist/esm/lib/config.js +2 -2
  65. package/dist/esm/sdk/models/operations/getschoolbyid.d.ts +69 -0
  66. package/dist/esm/sdk/models/operations/getschoolbyid.d.ts.map +1 -1
  67. package/dist/esm/sdk/models/operations/getschoolbyid.js +31 -0
  68. package/dist/esm/sdk/models/operations/getschoolbyid.js.map +1 -1
  69. package/dist/esm/sdk/models/operations/getschoolbysource.d.ts +69 -0
  70. package/dist/esm/sdk/models/operations/getschoolbysource.d.ts.map +1 -1
  71. package/dist/esm/sdk/models/operations/getschoolbysource.js +31 -0
  72. package/dist/esm/sdk/models/operations/getschoolbysource.js.map +1 -1
  73. package/dist/esm/sdk/models/operations/queryschools.d.ts +78 -0
  74. package/dist/esm/sdk/models/operations/queryschools.d.ts.map +1 -1
  75. package/dist/esm/sdk/models/operations/queryschools.js +37 -0
  76. package/dist/esm/sdk/models/operations/queryschools.js.map +1 -1
  77. package/dist/esm/sdk/models/operations/queryschoolsbysource.d.ts +78 -0
  78. package/dist/esm/sdk/models/operations/queryschoolsbysource.d.ts.map +1 -1
  79. package/dist/esm/sdk/models/operations/queryschoolsbysource.js +36 -0
  80. package/dist/esm/sdk/models/operations/queryschoolsbysource.js.map +1 -1
  81. package/dist/esm/sdk/models/shared/chargeentry.d.ts +1 -1
  82. package/dist/esm/sdk/models/shared/chargehistory.d.ts +1 -1
  83. package/dist/esm/sdk/models/shared/index.d.ts +6 -0
  84. package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
  85. package/dist/esm/sdk/models/shared/index.js +6 -0
  86. package/dist/esm/sdk/models/shared/index.js.map +1 -1
  87. package/dist/esm/sdk/models/shared/listing.d.ts +2 -2
  88. package/dist/esm/sdk/models/shared/listingpricechange.d.ts +2 -2
  89. package/dist/esm/sdk/models/shared/pricechange.d.ts +2 -2
  90. package/dist/esm/sdk/models/shared/pricingdata.d.ts +4 -4
  91. package/dist/esm/sdk/models/shared/salerecord.d.ts +1 -1
  92. package/dist/esm/sdk/models/shared/schoolinspectionevaluationarea.d.ts +17 -0
  93. package/dist/esm/sdk/models/shared/schoolinspectionevaluationarea.d.ts.map +1 -0
  94. package/dist/esm/sdk/models/shared/schoolinspectionevaluationarea.js +14 -0
  95. package/dist/esm/sdk/models/shared/schoolinspectionevaluationarea.js.map +1 -0
  96. package/dist/esm/sdk/models/shared/schoolinspectionevent.d.ts +103 -0
  97. package/dist/esm/sdk/models/shared/schoolinspectionevent.d.ts.map +1 -0
  98. package/dist/esm/sdk/models/shared/schoolinspectionevent.js +74 -0
  99. package/dist/esm/sdk/models/shared/schoolinspectionevent.js.map +1 -0
  100. package/dist/esm/sdk/models/shared/schoolinspectiongrade.d.ts +17 -0
  101. package/dist/esm/sdk/models/shared/schoolinspectiongrade.d.ts.map +1 -0
  102. package/dist/esm/sdk/models/shared/schoolinspectiongrade.js +14 -0
  103. package/dist/esm/sdk/models/shared/schoolinspectiongrade.js.map +1 -0
  104. package/dist/esm/sdk/models/shared/schoolinspectionpredecessor.d.ts +13 -0
  105. package/dist/esm/sdk/models/shared/schoolinspectionpredecessor.d.ts.map +1 -0
  106. package/dist/esm/sdk/models/shared/schoolinspectionpredecessor.js +16 -0
  107. package/dist/esm/sdk/models/shared/schoolinspectionpredecessor.js.map +1 -0
  108. package/dist/esm/sdk/models/shared/schoolinspectorbody.d.ts +19 -0
  109. package/dist/esm/sdk/models/shared/schoolinspectorbody.d.ts.map +1 -0
  110. package/dist/esm/sdk/models/shared/schoolinspectorbody.js +17 -0
  111. package/dist/esm/sdk/models/shared/schoolinspectorbody.js.map +1 -0
  112. package/dist/esm/sdk/models/shared/schooltrustmembership.d.ts +45 -0
  113. package/dist/esm/sdk/models/shared/schooltrustmembership.d.ts.map +1 -0
  114. package/dist/esm/sdk/models/shared/schooltrustmembership.js +21 -0
  115. package/dist/esm/sdk/models/shared/schooltrustmembership.js.map +1 -0
  116. package/dist/esm/sdk/models/shared/sitepropertystats.d.ts +2 -2
  117. package/package.json +1 -1
  118. package/src/funcs/schoolsGetSchoolById.ts +6 -1
  119. package/src/funcs/schoolsGetSchoolBySource.ts +6 -1
  120. package/src/lib/config.ts +2 -2
  121. package/src/sdk/models/operations/getschoolbyid.ts +126 -0
  122. package/src/sdk/models/operations/getschoolbysource.ts +134 -0
  123. package/src/sdk/models/operations/queryschools.ts +154 -0
  124. package/src/sdk/models/operations/queryschoolsbysource.ts +153 -0
  125. package/src/sdk/models/shared/chargeentry.ts +1 -1
  126. package/src/sdk/models/shared/chargehistory.ts +1 -1
  127. package/src/sdk/models/shared/index.ts +6 -0
  128. package/src/sdk/models/shared/listing.ts +2 -2
  129. package/src/sdk/models/shared/listingpricechange.ts +2 -2
  130. package/src/sdk/models/shared/pricechange.ts +2 -2
  131. package/src/sdk/models/shared/pricingdata.ts +4 -4
  132. package/src/sdk/models/shared/salerecord.ts +1 -1
  133. package/src/sdk/models/shared/schoolinspectionevaluationarea.ts +39 -0
  134. package/src/sdk/models/shared/schoolinspectionevent.ts +184 -0
  135. package/src/sdk/models/shared/schoolinspectiongrade.ts +39 -0
  136. package/src/sdk/models/shared/schoolinspectionpredecessor.ts +37 -0
  137. package/src/sdk/models/shared/schoolinspectorbody.ts +29 -0
  138. package/src/sdk/models/shared/schooltrustmembership.ts +74 -0
  139. package/src/sdk/models/shared/sitepropertystats.ts +2 -2
@@ -11,6 +11,10 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
  import * as shared from "../shared/index.js";
12
12
 
13
13
  export type GetSchoolByIdRequest = {
14
+ /**
15
+ * Comma-separated fields/blocks to return. Default: the full flat record with no aggregate blocks. Aggregate blocks are opt-in: `inspections`. Performance/census/finance live on `/v1/schools/metrics`.
16
+ */
17
+ attributes?: string | undefined;
14
18
  /**
15
19
  * Internal school identifier
16
20
  */
@@ -72,6 +76,42 @@ export const CurrentRating = {
72
76
  */
73
77
  export type CurrentRating = OpenEnum<typeof CurrentRating>;
74
78
 
79
+ /**
80
+ * Cross-register identifiers. Present only when requested via `attributes=identifiers`.
81
+ */
82
+ export type Identifiers = {
83
+ /**
84
+ * Estyn provider id (Wales).
85
+ */
86
+ estynId?: string | null | undefined;
87
+ /**
88
+ * Ofsted provider id (England).
89
+ */
90
+ ofstedProviderId?: string | null | undefined;
91
+ /**
92
+ * Predecessor URNs this school was previously known by (re-identification lineage).
93
+ */
94
+ oldUrns?: Array<string> | undefined;
95
+ /**
96
+ * UK Provider Reference Number (UKPRN).
97
+ */
98
+ ukprn?: string | null | undefined;
99
+ };
100
+
101
+ /**
102
+ * Inspection history. Present only when requested via `attributes=inspections`.
103
+ */
104
+ export type Inspections = {
105
+ /**
106
+ * Most recent inspection event, or null if never inspected.
107
+ */
108
+ current: shared.SchoolInspectionEvent | null;
109
+ /**
110
+ * Every inspection event, newest first (includes `current`).
111
+ */
112
+ history?: Array<shared.SchoolInspectionEvent | null> | undefined;
113
+ };
114
+
75
115
  /**
76
116
  * Geographic coordinates of the school
77
117
  */
@@ -125,6 +165,16 @@ export const GetSchoolByIdStatus = {
125
165
  */
126
166
  export type GetSchoolByIdStatus = OpenEnum<typeof GetSchoolByIdStatus>;
127
167
 
168
+ /**
169
+ * Trust / organisation memberships. Present only when requested via `attributes=trust`.
170
+ */
171
+ export type Trust = {
172
+ /**
173
+ * Active organisation memberships, lead/trust roles first.
174
+ */
175
+ memberships?: Array<shared.SchoolTrustMembership> | undefined;
176
+ };
177
+
128
178
  /**
129
179
  * Educational institution type. 'nursery': early years. 'primary': key stages 1-2 / ISCED 1. 'secondary': key stages 3-4 / ISCED 2-3. 'all-through': combined primary + secondary. 'sixth-form': post-16. 'special': special educational needs. 'independent': fee-paying. 'academy': state-funded, independently run. 'other': alternative provision / pupil referral / unclassified.
130
180
  */
@@ -182,6 +232,14 @@ export type GetSchoolByIdResponseBody = {
182
232
  * System-generated identifier. Stable across updates.
183
233
  */
184
234
  id: number;
235
+ /**
236
+ * Cross-register identifiers. Present only when requested via `attributes=identifiers`.
237
+ */
238
+ identifiers?: Identifiers | null | undefined;
239
+ /**
240
+ * Inspection history. Present only when requested via `attributes=inspections`.
241
+ */
242
+ inspections?: Inspections | null | undefined;
185
243
  /**
186
244
  * Provider-scoped identifier. URN for `dfe`, SEED for `seed`, etc. Combined with `provider` this is a globally unique alternate key for the school.
187
245
  */
@@ -238,6 +296,10 @@ export type GetSchoolByIdResponseBody = {
238
296
  */
239
297
  subType?: string | undefined;
240
298
  telephone?: string | undefined;
299
+ /**
300
+ * Trust / organisation memberships. Present only when requested via `attributes=trust`.
301
+ */
302
+ trust?: Trust | null | undefined;
241
303
  trustId?: string | undefined;
242
304
  trustName?: string | undefined;
243
305
  /**
@@ -253,6 +315,7 @@ export type GetSchoolByIdResponseBody = {
253
315
 
254
316
  /** @internal */
255
317
  export type GetSchoolByIdRequest$Outbound = {
318
+ attributes?: string | undefined;
256
319
  id: string;
257
320
  };
258
321
 
@@ -262,6 +325,7 @@ export const GetSchoolByIdRequest$outboundSchema: z.ZodType<
262
325
  z.ZodTypeDef,
263
326
  GetSchoolByIdRequest
264
327
  > = z.object({
328
+ attributes: z.string().optional(),
265
329
  id: z.string(),
266
330
  });
267
331
 
@@ -303,6 +367,49 @@ export const CurrentRating$inboundSchema: z.ZodType<
303
367
  unknown
304
368
  > = openEnums.inboundSchema(CurrentRating);
305
369
 
370
+ /** @internal */
371
+ export const Identifiers$inboundSchema: z.ZodType<
372
+ Identifiers,
373
+ z.ZodTypeDef,
374
+ unknown
375
+ > = z.object({
376
+ estynId: z.nullable(z.string()).optional(),
377
+ ofstedProviderId: z.nullable(z.string()).optional(),
378
+ oldUrns: z.array(z.string()).optional(),
379
+ ukprn: z.nullable(z.string()).optional(),
380
+ });
381
+
382
+ export function identifiersFromJSON(
383
+ jsonString: string,
384
+ ): SafeParseResult<Identifiers, SDKValidationError> {
385
+ return safeParse(
386
+ jsonString,
387
+ (x) => Identifiers$inboundSchema.parse(JSON.parse(x)),
388
+ `Failed to parse 'Identifiers' from JSON`,
389
+ );
390
+ }
391
+
392
+ /** @internal */
393
+ export const Inspections$inboundSchema: z.ZodType<
394
+ Inspections,
395
+ z.ZodTypeDef,
396
+ unknown
397
+ > = z.object({
398
+ current: z.nullable(shared.SchoolInspectionEvent$inboundSchema),
399
+ history: z.array(z.nullable(shared.SchoolInspectionEvent$inboundSchema))
400
+ .optional(),
401
+ });
402
+
403
+ export function inspectionsFromJSON(
404
+ jsonString: string,
405
+ ): SafeParseResult<Inspections, SDKValidationError> {
406
+ return safeParse(
407
+ jsonString,
408
+ (x) => Inspections$inboundSchema.parse(JSON.parse(x)),
409
+ `Failed to parse 'Inspections' from JSON`,
410
+ );
411
+ }
412
+
306
413
  /** @internal */
307
414
  export const Location$inboundSchema: z.ZodType<
308
415
  Location,
@@ -342,6 +449,22 @@ export const GetSchoolByIdStatus$inboundSchema: z.ZodType<
342
449
  unknown
343
450
  > = openEnums.inboundSchema(GetSchoolByIdStatus);
344
451
 
452
+ /** @internal */
453
+ export const Trust$inboundSchema: z.ZodType<Trust, z.ZodTypeDef, unknown> = z
454
+ .object({
455
+ memberships: z.array(shared.SchoolTrustMembership$inboundSchema).optional(),
456
+ });
457
+
458
+ export function trustFromJSON(
459
+ jsonString: string,
460
+ ): SafeParseResult<Trust, SDKValidationError> {
461
+ return safeParse(
462
+ jsonString,
463
+ (x) => Trust$inboundSchema.parse(JSON.parse(x)),
464
+ `Failed to parse 'Trust' from JSON`,
465
+ );
466
+ }
467
+
345
468
  /** @internal */
346
469
  export const GetSchoolByIdType$inboundSchema: z.ZodType<
347
470
  GetSchoolByIdType,
@@ -368,6 +491,8 @@ export const GetSchoolByIdResponseBody$inboundSchema: z.ZodType<
368
491
  gender: z.string().optional(),
369
492
  headteacher: z.string().optional(),
370
493
  id: z.number().int(),
494
+ identifiers: z.nullable(z.lazy(() => Identifiers$inboundSchema)).optional(),
495
+ inspections: z.nullable(z.lazy(() => Inspections$inboundSchema)).optional(),
371
496
  key: z.string(),
372
497
  laCode: z.string().optional(),
373
498
  laName: z.string().optional(),
@@ -388,6 +513,7 @@ export const GetSchoolByIdResponseBody$inboundSchema: z.ZodType<
388
513
  status: GetSchoolByIdStatus$inboundSchema,
389
514
  subType: z.string().optional(),
390
515
  telephone: z.string().optional(),
516
+ trust: z.nullable(z.lazy(() => Trust$inboundSchema)).optional(),
391
517
  trustId: z.string().optional(),
392
518
  trustName: z.string().optional(),
393
519
  type: GetSchoolByIdType$inboundSchema,
@@ -26,6 +26,10 @@ export const PathParamProvider = {
26
26
  export type PathParamProvider = ClosedEnum<typeof PathParamProvider>;
27
27
 
28
28
  export type GetSchoolBySourceRequest = {
29
+ /**
30
+ * Comma-separated fields/blocks to return. Default: the full flat record with no aggregate blocks. Aggregate blocks are opt-in: `inspections`. Performance/census/finance live on `/v1/schools/metrics`.
31
+ */
32
+ attributes?: string | undefined;
29
33
  /**
30
34
  * Provider-scoped identifier (URN for dfe, SEED for seed, …)
31
35
  */
@@ -93,6 +97,42 @@ export type GetSchoolBySourceCurrentRating = OpenEnum<
93
97
  typeof GetSchoolBySourceCurrentRating
94
98
  >;
95
99
 
100
+ /**
101
+ * Cross-register identifiers. Present only when requested via `attributes=identifiers`.
102
+ */
103
+ export type GetSchoolBySourceIdentifiers = {
104
+ /**
105
+ * Estyn provider id (Wales).
106
+ */
107
+ estynId?: string | null | undefined;
108
+ /**
109
+ * Ofsted provider id (England).
110
+ */
111
+ ofstedProviderId?: string | null | undefined;
112
+ /**
113
+ * Predecessor URNs this school was previously known by (re-identification lineage).
114
+ */
115
+ oldUrns?: Array<string> | undefined;
116
+ /**
117
+ * UK Provider Reference Number (UKPRN).
118
+ */
119
+ ukprn?: string | null | undefined;
120
+ };
121
+
122
+ /**
123
+ * Inspection history. Present only when requested via `attributes=inspections`.
124
+ */
125
+ export type GetSchoolBySourceInspections = {
126
+ /**
127
+ * Most recent inspection event, or null if never inspected.
128
+ */
129
+ current: shared.SchoolInspectionEvent | null;
130
+ /**
131
+ * Every inspection event, newest first (includes `current`).
132
+ */
133
+ history?: Array<shared.SchoolInspectionEvent | null> | undefined;
134
+ };
135
+
96
136
  /**
97
137
  * Geographic coordinates of the school
98
138
  */
@@ -150,6 +190,16 @@ export const GetSchoolBySourceStatus = {
150
190
  */
151
191
  export type GetSchoolBySourceStatus = OpenEnum<typeof GetSchoolBySourceStatus>;
152
192
 
193
+ /**
194
+ * Trust / organisation memberships. Present only when requested via `attributes=trust`.
195
+ */
196
+ export type GetSchoolBySourceTrust = {
197
+ /**
198
+ * Active organisation memberships, lead/trust roles first.
199
+ */
200
+ memberships?: Array<shared.SchoolTrustMembership> | undefined;
201
+ };
202
+
153
203
  /**
154
204
  * Educational institution type. 'nursery': early years. 'primary': key stages 1-2 / ISCED 1. 'secondary': key stages 3-4 / ISCED 2-3. 'all-through': combined primary + secondary. 'sixth-form': post-16. 'special': special educational needs. 'independent': fee-paying. 'academy': state-funded, independently run. 'other': alternative provision / pupil referral / unclassified.
155
205
  */
@@ -207,6 +257,14 @@ export type GetSchoolBySourceResponseBody = {
207
257
  * System-generated identifier. Stable across updates.
208
258
  */
209
259
  id: number;
260
+ /**
261
+ * Cross-register identifiers. Present only when requested via `attributes=identifiers`.
262
+ */
263
+ identifiers?: GetSchoolBySourceIdentifiers | null | undefined;
264
+ /**
265
+ * Inspection history. Present only when requested via `attributes=inspections`.
266
+ */
267
+ inspections?: GetSchoolBySourceInspections | null | undefined;
210
268
  /**
211
269
  * Provider-scoped identifier. URN for `dfe`, SEED for `seed`, etc. Combined with `provider` this is a globally unique alternate key for the school.
212
270
  */
@@ -263,6 +321,10 @@ export type GetSchoolBySourceResponseBody = {
263
321
  */
264
322
  subType?: string | undefined;
265
323
  telephone?: string | undefined;
324
+ /**
325
+ * Trust / organisation memberships. Present only when requested via `attributes=trust`.
326
+ */
327
+ trust?: GetSchoolBySourceTrust | null | undefined;
266
328
  trustId?: string | undefined;
267
329
  trustName?: string | undefined;
268
330
  /**
@@ -283,6 +345,7 @@ export const PathParamProvider$outboundSchema: z.ZodNativeEnum<
283
345
 
284
346
  /** @internal */
285
347
  export type GetSchoolBySourceRequest$Outbound = {
348
+ attributes?: string | undefined;
286
349
  key: string;
287
350
  provider: string;
288
351
  };
@@ -293,6 +356,7 @@ export const GetSchoolBySourceRequest$outboundSchema: z.ZodType<
293
356
  z.ZodTypeDef,
294
357
  GetSchoolBySourceRequest
295
358
  > = z.object({
359
+ attributes: z.string().optional(),
296
360
  key: z.string(),
297
361
  provider: PathParamProvider$outboundSchema,
298
362
  });
@@ -335,6 +399,49 @@ export const GetSchoolBySourceCurrentRating$inboundSchema: z.ZodType<
335
399
  unknown
336
400
  > = openEnums.inboundSchema(GetSchoolBySourceCurrentRating);
337
401
 
402
+ /** @internal */
403
+ export const GetSchoolBySourceIdentifiers$inboundSchema: z.ZodType<
404
+ GetSchoolBySourceIdentifiers,
405
+ z.ZodTypeDef,
406
+ unknown
407
+ > = z.object({
408
+ estynId: z.nullable(z.string()).optional(),
409
+ ofstedProviderId: z.nullable(z.string()).optional(),
410
+ oldUrns: z.array(z.string()).optional(),
411
+ ukprn: z.nullable(z.string()).optional(),
412
+ });
413
+
414
+ export function getSchoolBySourceIdentifiersFromJSON(
415
+ jsonString: string,
416
+ ): SafeParseResult<GetSchoolBySourceIdentifiers, SDKValidationError> {
417
+ return safeParse(
418
+ jsonString,
419
+ (x) => GetSchoolBySourceIdentifiers$inboundSchema.parse(JSON.parse(x)),
420
+ `Failed to parse 'GetSchoolBySourceIdentifiers' from JSON`,
421
+ );
422
+ }
423
+
424
+ /** @internal */
425
+ export const GetSchoolBySourceInspections$inboundSchema: z.ZodType<
426
+ GetSchoolBySourceInspections,
427
+ z.ZodTypeDef,
428
+ unknown
429
+ > = z.object({
430
+ current: z.nullable(shared.SchoolInspectionEvent$inboundSchema),
431
+ history: z.array(z.nullable(shared.SchoolInspectionEvent$inboundSchema))
432
+ .optional(),
433
+ });
434
+
435
+ export function getSchoolBySourceInspectionsFromJSON(
436
+ jsonString: string,
437
+ ): SafeParseResult<GetSchoolBySourceInspections, SDKValidationError> {
438
+ return safeParse(
439
+ jsonString,
440
+ (x) => GetSchoolBySourceInspections$inboundSchema.parse(JSON.parse(x)),
441
+ `Failed to parse 'GetSchoolBySourceInspections' from JSON`,
442
+ );
443
+ }
444
+
338
445
  /** @internal */
339
446
  export const GetSchoolBySourceLocation$inboundSchema: z.ZodType<
340
447
  GetSchoolBySourceLocation,
@@ -374,6 +481,25 @@ export const GetSchoolBySourceStatus$inboundSchema: z.ZodType<
374
481
  unknown
375
482
  > = openEnums.inboundSchema(GetSchoolBySourceStatus);
376
483
 
484
+ /** @internal */
485
+ export const GetSchoolBySourceTrust$inboundSchema: z.ZodType<
486
+ GetSchoolBySourceTrust,
487
+ z.ZodTypeDef,
488
+ unknown
489
+ > = z.object({
490
+ memberships: z.array(shared.SchoolTrustMembership$inboundSchema).optional(),
491
+ });
492
+
493
+ export function getSchoolBySourceTrustFromJSON(
494
+ jsonString: string,
495
+ ): SafeParseResult<GetSchoolBySourceTrust, SDKValidationError> {
496
+ return safeParse(
497
+ jsonString,
498
+ (x) => GetSchoolBySourceTrust$inboundSchema.parse(JSON.parse(x)),
499
+ `Failed to parse 'GetSchoolBySourceTrust' from JSON`,
500
+ );
501
+ }
502
+
377
503
  /** @internal */
378
504
  export const GetSchoolBySourceType$inboundSchema: z.ZodType<
379
505
  GetSchoolBySourceType,
@@ -401,6 +527,12 @@ export const GetSchoolBySourceResponseBody$inboundSchema: z.ZodType<
401
527
  gender: z.string().optional(),
402
528
  headteacher: z.string().optional(),
403
529
  id: z.number().int(),
530
+ identifiers: z.nullable(
531
+ z.lazy(() => GetSchoolBySourceIdentifiers$inboundSchema),
532
+ ).optional(),
533
+ inspections: z.nullable(
534
+ z.lazy(() => GetSchoolBySourceInspections$inboundSchema),
535
+ ).optional(),
404
536
  key: z.string(),
405
537
  laCode: z.string().optional(),
406
538
  laName: z.string().optional(),
@@ -422,6 +554,8 @@ export const GetSchoolBySourceResponseBody$inboundSchema: z.ZodType<
422
554
  status: GetSchoolBySourceStatus$inboundSchema,
423
555
  subType: z.string().optional(),
424
556
  telephone: z.string().optional(),
557
+ trust: z.nullable(z.lazy(() => GetSchoolBySourceTrust$inboundSchema))
558
+ .optional(),
425
559
  trustId: z.string().optional(),
426
560
  trustName: z.string().optional(),
427
561
  type: GetSchoolBySourceType$inboundSchema,
@@ -11,6 +11,11 @@ import { Result as SafeParseResult } from "../../types/fp.js";
11
11
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
12
  import * as shared from "../shared/index.js";
13
13
 
14
+ /**
15
+ * Fields/blocks to return per school. Default: the full flat record with no aggregate blocks. Aggregate blocks are opt-in: `inspections`.
16
+ */
17
+ export type QuerySchoolsAttributes = string | Array<string>;
18
+
14
19
  /**
15
20
  * Radius search around a point. Adds `distance` field to each result. Mutually exclusive with `within`.
16
21
  */
@@ -197,6 +202,10 @@ export type Within = {
197
202
  * Flexible school query. Filter by country/region/provider, categorical fields, free-text, or geography (radius or bounding box). Pagination via limit/offset, ordering via orderBy/order.
198
203
  */
199
204
  export type QuerySchoolsRequestBody = {
205
+ /**
206
+ * Fields/blocks to return per school. Default: the full flat record with no aggregate blocks. Aggregate blocks are opt-in: `inspections`.
207
+ */
208
+ attributes?: string | Array<string> | undefined;
200
209
  /**
201
210
  * Filter by local authority name
202
211
  */
@@ -315,6 +324,42 @@ export type QuerySchoolsCurrentRating = OpenEnum<
315
324
  typeof QuerySchoolsCurrentRating
316
325
  >;
317
326
 
327
+ /**
328
+ * Cross-register identifiers. Present only when requested via `attributes=identifiers`.
329
+ */
330
+ export type QuerySchoolsIdentifiers = {
331
+ /**
332
+ * Estyn provider id (Wales).
333
+ */
334
+ estynId?: string | null | undefined;
335
+ /**
336
+ * Ofsted provider id (England).
337
+ */
338
+ ofstedProviderId?: string | null | undefined;
339
+ /**
340
+ * Predecessor URNs this school was previously known by (re-identification lineage).
341
+ */
342
+ oldUrns?: Array<string> | undefined;
343
+ /**
344
+ * UK Provider Reference Number (UKPRN).
345
+ */
346
+ ukprn?: string | null | undefined;
347
+ };
348
+
349
+ /**
350
+ * Inspection history. Present only when requested via `attributes=inspections`.
351
+ */
352
+ export type QuerySchoolsInspections = {
353
+ /**
354
+ * Most recent inspection event, or null if never inspected.
355
+ */
356
+ current: shared.SchoolInspectionEvent | null;
357
+ /**
358
+ * Every inspection event, newest first (includes `current`).
359
+ */
360
+ history?: Array<shared.SchoolInspectionEvent | null> | undefined;
361
+ };
362
+
318
363
  /**
319
364
  * Geographic coordinates of the school
320
365
  */
@@ -372,6 +417,16 @@ export type QuerySchoolsSchoolsStatus = OpenEnum<
372
417
  typeof QuerySchoolsSchoolsStatus
373
418
  >;
374
419
 
420
+ /**
421
+ * Trust / organisation memberships. Present only when requested via `attributes=trust`.
422
+ */
423
+ export type QuerySchoolsTrust = {
424
+ /**
425
+ * Active organisation memberships, lead/trust roles first.
426
+ */
427
+ memberships?: Array<shared.SchoolTrustMembership> | undefined;
428
+ };
429
+
375
430
  /**
376
431
  * Educational institution type. 'nursery': early years. 'primary': key stages 1-2 / ISCED 1. 'secondary': key stages 3-4 / ISCED 2-3. 'all-through': combined primary + secondary. 'sixth-form': post-16. 'special': special educational needs. 'independent': fee-paying. 'academy': state-funded, independently run. 'other': alternative provision / pupil referral / unclassified.
377
432
  */
@@ -429,6 +484,14 @@ export type QuerySchoolsData = {
429
484
  * System-generated identifier. Stable across updates.
430
485
  */
431
486
  id: number;
487
+ /**
488
+ * Cross-register identifiers. Present only when requested via `attributes=identifiers`.
489
+ */
490
+ identifiers?: QuerySchoolsIdentifiers | null | undefined;
491
+ /**
492
+ * Inspection history. Present only when requested via `attributes=inspections`.
493
+ */
494
+ inspections?: QuerySchoolsInspections | null | undefined;
432
495
  /**
433
496
  * Provider-scoped identifier. URN for `dfe`, SEED for `seed`, etc. Combined with `provider` this is a globally unique alternate key for the school.
434
497
  */
@@ -485,6 +548,10 @@ export type QuerySchoolsData = {
485
548
  */
486
549
  subType?: string | undefined;
487
550
  telephone?: string | undefined;
551
+ /**
552
+ * Trust / organisation memberships. Present only when requested via `attributes=trust`.
553
+ */
554
+ trust?: QuerySchoolsTrust | null | undefined;
488
555
  trustId?: string | undefined;
489
556
  trustName?: string | undefined;
490
557
  /**
@@ -543,6 +610,24 @@ export type QuerySchoolsResponseBody = {
543
610
  url: string;
544
611
  };
545
612
 
613
+ /** @internal */
614
+ export type QuerySchoolsAttributes$Outbound = string | Array<string>;
615
+
616
+ /** @internal */
617
+ export const QuerySchoolsAttributes$outboundSchema: z.ZodType<
618
+ QuerySchoolsAttributes$Outbound,
619
+ z.ZodTypeDef,
620
+ QuerySchoolsAttributes
621
+ > = z.union([z.string(), z.array(z.string())]);
622
+
623
+ export function querySchoolsAttributesToJSON(
624
+ querySchoolsAttributes: QuerySchoolsAttributes,
625
+ ): string {
626
+ return JSON.stringify(
627
+ QuerySchoolsAttributes$outboundSchema.parse(querySchoolsAttributes),
628
+ );
629
+ }
630
+
546
631
  /** @internal */
547
632
  export type Near$Outbound = {
548
633
  lat: number;
@@ -655,6 +740,7 @@ export function withinToJSON(within: Within): string {
655
740
 
656
741
  /** @internal */
657
742
  export type QuerySchoolsRequestBody$Outbound = {
743
+ attributes?: string | Array<string> | undefined;
658
744
  authority?: string | undefined;
659
745
  catchmentReference?: shared.CatchmentReference$Outbound | undefined;
660
746
  country?: string | undefined;
@@ -680,6 +766,7 @@ export const QuerySchoolsRequestBody$outboundSchema: z.ZodType<
680
766
  z.ZodTypeDef,
681
767
  QuerySchoolsRequestBody
682
768
  > = z.object({
769
+ attributes: z.union([z.string(), z.array(z.string())]).optional(),
683
770
  authority: z.string().optional(),
684
771
  catchmentReference: shared.CatchmentReference$outboundSchema.optional(),
685
772
  country: z.string().optional(),
@@ -740,6 +827,49 @@ export const QuerySchoolsCurrentRating$inboundSchema: z.ZodType<
740
827
  unknown
741
828
  > = openEnums.inboundSchema(QuerySchoolsCurrentRating);
742
829
 
830
+ /** @internal */
831
+ export const QuerySchoolsIdentifiers$inboundSchema: z.ZodType<
832
+ QuerySchoolsIdentifiers,
833
+ z.ZodTypeDef,
834
+ unknown
835
+ > = z.object({
836
+ estynId: z.nullable(z.string()).optional(),
837
+ ofstedProviderId: z.nullable(z.string()).optional(),
838
+ oldUrns: z.array(z.string()).optional(),
839
+ ukprn: z.nullable(z.string()).optional(),
840
+ });
841
+
842
+ export function querySchoolsIdentifiersFromJSON(
843
+ jsonString: string,
844
+ ): SafeParseResult<QuerySchoolsIdentifiers, SDKValidationError> {
845
+ return safeParse(
846
+ jsonString,
847
+ (x) => QuerySchoolsIdentifiers$inboundSchema.parse(JSON.parse(x)),
848
+ `Failed to parse 'QuerySchoolsIdentifiers' from JSON`,
849
+ );
850
+ }
851
+
852
+ /** @internal */
853
+ export const QuerySchoolsInspections$inboundSchema: z.ZodType<
854
+ QuerySchoolsInspections,
855
+ z.ZodTypeDef,
856
+ unknown
857
+ > = z.object({
858
+ current: z.nullable(shared.SchoolInspectionEvent$inboundSchema),
859
+ history: z.array(z.nullable(shared.SchoolInspectionEvent$inboundSchema))
860
+ .optional(),
861
+ });
862
+
863
+ export function querySchoolsInspectionsFromJSON(
864
+ jsonString: string,
865
+ ): SafeParseResult<QuerySchoolsInspections, SDKValidationError> {
866
+ return safeParse(
867
+ jsonString,
868
+ (x) => QuerySchoolsInspections$inboundSchema.parse(JSON.parse(x)),
869
+ `Failed to parse 'QuerySchoolsInspections' from JSON`,
870
+ );
871
+ }
872
+
743
873
  /** @internal */
744
874
  export const QuerySchoolsLocation$inboundSchema: z.ZodType<
745
875
  QuerySchoolsLocation,
@@ -779,6 +909,25 @@ export const QuerySchoolsSchoolsStatus$inboundSchema: z.ZodType<
779
909
  unknown
780
910
  > = openEnums.inboundSchema(QuerySchoolsSchoolsStatus);
781
911
 
912
+ /** @internal */
913
+ export const QuerySchoolsTrust$inboundSchema: z.ZodType<
914
+ QuerySchoolsTrust,
915
+ z.ZodTypeDef,
916
+ unknown
917
+ > = z.object({
918
+ memberships: z.array(shared.SchoolTrustMembership$inboundSchema).optional(),
919
+ });
920
+
921
+ export function querySchoolsTrustFromJSON(
922
+ jsonString: string,
923
+ ): SafeParseResult<QuerySchoolsTrust, SDKValidationError> {
924
+ return safeParse(
925
+ jsonString,
926
+ (x) => QuerySchoolsTrust$inboundSchema.parse(JSON.parse(x)),
927
+ `Failed to parse 'QuerySchoolsTrust' from JSON`,
928
+ );
929
+ }
930
+
782
931
  /** @internal */
783
932
  export const QuerySchoolsType$inboundSchema: z.ZodType<
784
933
  QuerySchoolsType,
@@ -805,6 +954,10 @@ export const QuerySchoolsData$inboundSchema: z.ZodType<
805
954
  gender: z.string().optional(),
806
955
  headteacher: z.string().optional(),
807
956
  id: z.number().int(),
957
+ identifiers: z.nullable(z.lazy(() => QuerySchoolsIdentifiers$inboundSchema))
958
+ .optional(),
959
+ inspections: z.nullable(z.lazy(() => QuerySchoolsInspections$inboundSchema))
960
+ .optional(),
808
961
  key: z.string(),
809
962
  laCode: z.string().optional(),
810
963
  laName: z.string().optional(),
@@ -826,6 +979,7 @@ export const QuerySchoolsData$inboundSchema: z.ZodType<
826
979
  status: QuerySchoolsSchoolsStatus$inboundSchema,
827
980
  subType: z.string().optional(),
828
981
  telephone: z.string().optional(),
982
+ trust: z.nullable(z.lazy(() => QuerySchoolsTrust$inboundSchema)).optional(),
829
983
  trustId: z.string().optional(),
830
984
  trustName: z.string().optional(),
831
985
  type: QuerySchoolsType$inboundSchema,