@vepler/sdk 2.18.12 → 2.20.2

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 (171) hide show
  1. package/README.md +7 -0
  2. package/dist/commonjs/funcs/councilsGet.d.ts +17 -0
  3. package/dist/commonjs/funcs/councilsGet.d.ts.map +1 -0
  4. package/dist/commonjs/funcs/councilsGet.js +119 -0
  5. package/dist/commonjs/funcs/councilsGet.js.map +1 -0
  6. package/dist/commonjs/funcs/councilsList.d.ts +17 -0
  7. package/dist/commonjs/funcs/councilsList.d.ts.map +1 -0
  8. package/dist/commonjs/funcs/councilsList.js +119 -0
  9. package/dist/commonjs/funcs/councilsList.js.map +1 -0
  10. package/dist/commonjs/lib/config.d.ts +3 -3
  11. package/dist/commonjs/lib/config.js +3 -3
  12. package/dist/commonjs/lib/config.js.map +1 -1
  13. package/dist/commonjs/sdk/councils.d.ts +19 -0
  14. package/dist/commonjs/sdk/councils.d.ts.map +1 -0
  15. package/dist/commonjs/sdk/councils.js +32 -0
  16. package/dist/commonjs/sdk/councils.js.map +1 -0
  17. package/dist/commonjs/sdk/models/operations/getcouncilbyproviderid.d.ts +19 -0
  18. package/dist/commonjs/sdk/models/operations/getcouncilbyproviderid.d.ts.map +1 -0
  19. package/dist/commonjs/sdk/models/operations/getcouncilbyproviderid.js +60 -0
  20. package/dist/commonjs/sdk/models/operations/getcouncilbyproviderid.js.map +1 -0
  21. package/dist/commonjs/sdk/models/operations/index.d.ts +2 -0
  22. package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
  23. package/dist/commonjs/sdk/models/operations/index.js +2 -0
  24. package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
  25. package/dist/commonjs/sdk/models/operations/listcouncils.d.ts +78 -0
  26. package/dist/commonjs/sdk/models/operations/listcouncils.d.ts.map +1 -0
  27. package/dist/commonjs/sdk/models/operations/listcouncils.js +96 -0
  28. package/dist/commonjs/sdk/models/operations/listcouncils.js.map +1 -0
  29. package/dist/commonjs/sdk/models/operations/resolveaddress.d.ts +115 -0
  30. package/dist/commonjs/sdk/models/operations/resolveaddress.d.ts.map +1 -1
  31. package/dist/commonjs/sdk/models/operations/resolveaddress.js +61 -1
  32. package/dist/commonjs/sdk/models/operations/resolveaddress.js.map +1 -1
  33. package/dist/commonjs/sdk/models/shared/council.d.ts +131 -0
  34. package/dist/commonjs/sdk/models/shared/council.d.ts.map +1 -0
  35. package/dist/commonjs/sdk/models/shared/council.js +115 -0
  36. package/dist/commonjs/sdk/models/shared/council.js.map +1 -0
  37. package/dist/commonjs/sdk/models/shared/councilbranding.d.ts +32 -0
  38. package/dist/commonjs/sdk/models/shared/councilbranding.d.ts.map +1 -0
  39. package/dist/commonjs/sdk/models/shared/councilbranding.js +65 -0
  40. package/dist/commonjs/sdk/models/shared/councilbranding.js.map +1 -0
  41. package/dist/commonjs/sdk/models/shared/councilcontactdetails.d.ts +47 -0
  42. package/dist/commonjs/sdk/models/shared/councilcontactdetails.d.ts.map +1 -0
  43. package/dist/commonjs/sdk/models/shared/councilcontactdetails.js +79 -0
  44. package/dist/commonjs/sdk/models/shared/councilcontactdetails.js.map +1 -0
  45. package/dist/commonjs/sdk/models/shared/councilerrorresponse.d.ts +29 -0
  46. package/dist/commonjs/sdk/models/shared/councilerrorresponse.d.ts.map +1 -0
  47. package/dist/commonjs/sdk/models/shared/councilerrorresponse.js +70 -0
  48. package/dist/commonjs/sdk/models/shared/councilerrorresponse.js.map +1 -0
  49. package/dist/commonjs/sdk/models/shared/councillistresponse.d.ts +43 -0
  50. package/dist/commonjs/sdk/models/shared/councillistresponse.d.ts.map +1 -0
  51. package/dist/commonjs/sdk/models/shared/councillistresponse.js +69 -0
  52. package/dist/commonjs/sdk/models/shared/councillistresponse.js.map +1 -0
  53. package/dist/commonjs/sdk/models/shared/councilmetadata.d.ts +34 -0
  54. package/dist/commonjs/sdk/models/shared/councilmetadata.d.ts.map +1 -0
  55. package/dist/commonjs/sdk/models/shared/councilmetadata.js +59 -0
  56. package/dist/commonjs/sdk/models/shared/councilmetadata.js.map +1 -0
  57. package/dist/commonjs/sdk/models/shared/councilserviceurls.d.ts +26 -0
  58. package/dist/commonjs/sdk/models/shared/councilserviceurls.d.ts.map +1 -0
  59. package/dist/commonjs/sdk/models/shared/councilserviceurls.js +60 -0
  60. package/dist/commonjs/sdk/models/shared/councilserviceurls.js.map +1 -0
  61. package/dist/commonjs/sdk/models/shared/index.d.ts +7 -0
  62. package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
  63. package/dist/commonjs/sdk/models/shared/index.js +7 -0
  64. package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
  65. package/dist/commonjs/sdk/models/shared/listing.d.ts +8 -8
  66. package/dist/commonjs/sdk/models/shared/listing.d.ts.map +1 -1
  67. package/dist/commonjs/sdk/models/shared/listing.js +8 -8
  68. package/dist/commonjs/sdk/models/shared/listing.js.map +1 -1
  69. package/dist/commonjs/sdk/models/shared/school.d.ts +8 -8
  70. package/dist/commonjs/sdk/models/shared/school.d.ts.map +1 -1
  71. package/dist/commonjs/sdk/models/shared/school.js +9 -10
  72. package/dist/commonjs/sdk/models/shared/school.js.map +1 -1
  73. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  74. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  75. package/dist/commonjs/sdk/sdk.js +4 -0
  76. package/dist/commonjs/sdk/sdk.js.map +1 -1
  77. package/dist/esm/funcs/councilsGet.d.ts +17 -0
  78. package/dist/esm/funcs/councilsGet.d.ts.map +1 -0
  79. package/dist/esm/funcs/councilsGet.js +83 -0
  80. package/dist/esm/funcs/councilsGet.js.map +1 -0
  81. package/dist/esm/funcs/councilsList.d.ts +17 -0
  82. package/dist/esm/funcs/councilsList.d.ts.map +1 -0
  83. package/dist/esm/funcs/councilsList.js +83 -0
  84. package/dist/esm/funcs/councilsList.js.map +1 -0
  85. package/dist/esm/lib/config.d.ts +3 -3
  86. package/dist/esm/lib/config.js +3 -3
  87. package/dist/esm/lib/config.js.map +1 -1
  88. package/dist/esm/sdk/councils.d.ts +19 -0
  89. package/dist/esm/sdk/councils.d.ts.map +1 -0
  90. package/dist/esm/sdk/councils.js +28 -0
  91. package/dist/esm/sdk/councils.js.map +1 -0
  92. package/dist/esm/sdk/models/operations/getcouncilbyproviderid.d.ts +19 -0
  93. package/dist/esm/sdk/models/operations/getcouncilbyproviderid.d.ts.map +1 -0
  94. package/dist/esm/sdk/models/operations/getcouncilbyproviderid.js +22 -0
  95. package/dist/esm/sdk/models/operations/getcouncilbyproviderid.js.map +1 -0
  96. package/dist/esm/sdk/models/operations/index.d.ts +2 -0
  97. package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
  98. package/dist/esm/sdk/models/operations/index.js +2 -0
  99. package/dist/esm/sdk/models/operations/index.js.map +1 -1
  100. package/dist/esm/sdk/models/operations/listcouncils.d.ts +78 -0
  101. package/dist/esm/sdk/models/operations/listcouncils.d.ts.map +1 -0
  102. package/dist/esm/sdk/models/operations/listcouncils.js +58 -0
  103. package/dist/esm/sdk/models/operations/listcouncils.js.map +1 -0
  104. package/dist/esm/sdk/models/operations/resolveaddress.d.ts +115 -0
  105. package/dist/esm/sdk/models/operations/resolveaddress.d.ts.map +1 -1
  106. package/dist/esm/sdk/models/operations/resolveaddress.js +57 -0
  107. package/dist/esm/sdk/models/operations/resolveaddress.js.map +1 -1
  108. package/dist/esm/sdk/models/shared/council.d.ts +131 -0
  109. package/dist/esm/sdk/models/shared/council.d.ts.map +1 -0
  110. package/dist/esm/sdk/models/shared/council.js +78 -0
  111. package/dist/esm/sdk/models/shared/council.js.map +1 -0
  112. package/dist/esm/sdk/models/shared/councilbranding.d.ts +32 -0
  113. package/dist/esm/sdk/models/shared/councilbranding.d.ts.map +1 -0
  114. package/dist/esm/sdk/models/shared/councilbranding.js +27 -0
  115. package/dist/esm/sdk/models/shared/councilbranding.js.map +1 -0
  116. package/dist/esm/sdk/models/shared/councilcontactdetails.d.ts +47 -0
  117. package/dist/esm/sdk/models/shared/councilcontactdetails.d.ts.map +1 -0
  118. package/dist/esm/sdk/models/shared/councilcontactdetails.js +40 -0
  119. package/dist/esm/sdk/models/shared/councilcontactdetails.js.map +1 -0
  120. package/dist/esm/sdk/models/shared/councilerrorresponse.d.ts +29 -0
  121. package/dist/esm/sdk/models/shared/councilerrorresponse.d.ts.map +1 -0
  122. package/dist/esm/sdk/models/shared/councilerrorresponse.js +32 -0
  123. package/dist/esm/sdk/models/shared/councilerrorresponse.js.map +1 -0
  124. package/dist/esm/sdk/models/shared/councillistresponse.d.ts +43 -0
  125. package/dist/esm/sdk/models/shared/councillistresponse.d.ts.map +1 -0
  126. package/dist/esm/sdk/models/shared/councillistresponse.js +32 -0
  127. package/dist/esm/sdk/models/shared/councillistresponse.js.map +1 -0
  128. package/dist/esm/sdk/models/shared/councilmetadata.d.ts +34 -0
  129. package/dist/esm/sdk/models/shared/councilmetadata.d.ts.map +1 -0
  130. package/dist/esm/sdk/models/shared/councilmetadata.js +22 -0
  131. package/dist/esm/sdk/models/shared/councilmetadata.js.map +1 -0
  132. package/dist/esm/sdk/models/shared/councilserviceurls.d.ts +26 -0
  133. package/dist/esm/sdk/models/shared/councilserviceurls.d.ts.map +1 -0
  134. package/dist/esm/sdk/models/shared/councilserviceurls.js +23 -0
  135. package/dist/esm/sdk/models/shared/councilserviceurls.js.map +1 -0
  136. package/dist/esm/sdk/models/shared/index.d.ts +7 -0
  137. package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
  138. package/dist/esm/sdk/models/shared/index.js +7 -0
  139. package/dist/esm/sdk/models/shared/index.js.map +1 -1
  140. package/dist/esm/sdk/models/shared/listing.d.ts +8 -8
  141. package/dist/esm/sdk/models/shared/listing.d.ts.map +1 -1
  142. package/dist/esm/sdk/models/shared/listing.js +7 -7
  143. package/dist/esm/sdk/models/shared/listing.js.map +1 -1
  144. package/dist/esm/sdk/models/shared/school.d.ts +8 -8
  145. package/dist/esm/sdk/models/shared/school.d.ts.map +1 -1
  146. package/dist/esm/sdk/models/shared/school.js +7 -8
  147. package/dist/esm/sdk/models/shared/school.js.map +1 -1
  148. package/dist/esm/sdk/sdk.d.ts +3 -0
  149. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  150. package/dist/esm/sdk/sdk.js +4 -0
  151. package/dist/esm/sdk/sdk.js.map +1 -1
  152. package/package.json +1 -1
  153. package/src/funcs/councilsGet.ts +167 -0
  154. package/src/funcs/councilsList.ts +167 -0
  155. package/src/lib/config.ts +3 -3
  156. package/src/sdk/councils.ts +45 -0
  157. package/src/sdk/models/operations/getcouncilbyproviderid.ts +61 -0
  158. package/src/sdk/models/operations/index.ts +2 -0
  159. package/src/sdk/models/operations/listcouncils.ts +131 -0
  160. package/src/sdk/models/operations/resolveaddress.ts +182 -0
  161. package/src/sdk/models/shared/council.ts +191 -0
  162. package/src/sdk/models/shared/councilbranding.ts +77 -0
  163. package/src/sdk/models/shared/councilcontactdetails.ts +112 -0
  164. package/src/sdk/models/shared/councilerrorresponse.ts +73 -0
  165. package/src/sdk/models/shared/councillistresponse.ts +80 -0
  166. package/src/sdk/models/shared/councilmetadata.ts +64 -0
  167. package/src/sdk/models/shared/councilserviceurls.ts +57 -0
  168. package/src/sdk/models/shared/index.ts +7 -0
  169. package/src/sdk/models/shared/listing.ts +13 -13
  170. package/src/sdk/models/shared/school.ts +24 -21
  171. package/src/sdk/sdk.ts +6 -0
@@ -0,0 +1,112 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ /**
11
+ * Physical address
12
+ */
13
+ export type Address = {
14
+ city?: string | undefined;
15
+ line1?: string | undefined;
16
+ line2?: string | undefined;
17
+ postcode?: string | undefined;
18
+ };
19
+
20
+ export type OpeningHours = {
21
+ friday?: string | undefined;
22
+ monday?: string | undefined;
23
+ saturday?: string | undefined;
24
+ sunday?: string | undefined;
25
+ thursday?: string | undefined;
26
+ tuesday?: string | undefined;
27
+ wednesday?: string | undefined;
28
+ };
29
+
30
+ export type CouncilContactDetails = {
31
+ /**
32
+ * Physical address
33
+ */
34
+ address?: Address | undefined;
35
+ /**
36
+ * Contact email address
37
+ */
38
+ email?: string | undefined;
39
+ emergencyContact?: string | undefined;
40
+ openingHours?: OpeningHours | undefined;
41
+ /**
42
+ * Contact phone number
43
+ */
44
+ phone?: string | undefined;
45
+ };
46
+
47
+ /** @internal */
48
+ export const Address$inboundSchema: z.ZodType<Address, z.ZodTypeDef, unknown> =
49
+ z.object({
50
+ city: z.string().optional(),
51
+ line1: z.string().optional(),
52
+ line2: z.string().optional(),
53
+ postcode: z.string().optional(),
54
+ });
55
+
56
+ export function addressFromJSON(
57
+ jsonString: string,
58
+ ): SafeParseResult<Address, SDKValidationError> {
59
+ return safeParse(
60
+ jsonString,
61
+ (x) => Address$inboundSchema.parse(JSON.parse(x)),
62
+ `Failed to parse 'Address' from JSON`,
63
+ );
64
+ }
65
+
66
+ /** @internal */
67
+ export const OpeningHours$inboundSchema: z.ZodType<
68
+ OpeningHours,
69
+ z.ZodTypeDef,
70
+ unknown
71
+ > = z.object({
72
+ friday: z.string().optional(),
73
+ monday: z.string().optional(),
74
+ saturday: z.string().optional(),
75
+ sunday: z.string().optional(),
76
+ thursday: z.string().optional(),
77
+ tuesday: z.string().optional(),
78
+ wednesday: z.string().optional(),
79
+ });
80
+
81
+ export function openingHoursFromJSON(
82
+ jsonString: string,
83
+ ): SafeParseResult<OpeningHours, SDKValidationError> {
84
+ return safeParse(
85
+ jsonString,
86
+ (x) => OpeningHours$inboundSchema.parse(JSON.parse(x)),
87
+ `Failed to parse 'OpeningHours' from JSON`,
88
+ );
89
+ }
90
+
91
+ /** @internal */
92
+ export const CouncilContactDetails$inboundSchema: z.ZodType<
93
+ CouncilContactDetails,
94
+ z.ZodTypeDef,
95
+ unknown
96
+ > = z.object({
97
+ address: z.lazy(() => Address$inboundSchema).optional(),
98
+ email: z.string().optional(),
99
+ emergencyContact: z.string().optional(),
100
+ openingHours: z.lazy(() => OpeningHours$inboundSchema).optional(),
101
+ phone: z.string().optional(),
102
+ });
103
+
104
+ export function councilContactDetailsFromJSON(
105
+ jsonString: string,
106
+ ): SafeParseResult<CouncilContactDetails, SDKValidationError> {
107
+ return safeParse(
108
+ jsonString,
109
+ (x) => CouncilContactDetails$inboundSchema.parse(JSON.parse(x)),
110
+ `Failed to parse 'CouncilContactDetails' from JSON`,
111
+ );
112
+ }
@@ -0,0 +1,73 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export const CouncilErrorResponseType = {
12
+ ApiError: "api_error",
13
+ InvalidRequestError: "invalid_request_error",
14
+ AuthenticationError: "authentication_error",
15
+ RateLimitError: "rate_limit_error",
16
+ } as const;
17
+ export type CouncilErrorResponseType = ClosedEnum<
18
+ typeof CouncilErrorResponseType
19
+ >;
20
+
21
+ export type ErrorT = {
22
+ code?: string | undefined;
23
+ message: string;
24
+ param?: string | undefined;
25
+ type: CouncilErrorResponseType;
26
+ };
27
+
28
+ export type CouncilErrorResponse = {
29
+ error: ErrorT;
30
+ };
31
+
32
+ /** @internal */
33
+ export const CouncilErrorResponseType$inboundSchema: z.ZodNativeEnum<
34
+ typeof CouncilErrorResponseType
35
+ > = z.nativeEnum(CouncilErrorResponseType);
36
+
37
+ /** @internal */
38
+ export const ErrorT$inboundSchema: z.ZodType<ErrorT, z.ZodTypeDef, unknown> = z
39
+ .object({
40
+ code: z.string().optional(),
41
+ message: z.string(),
42
+ param: z.string().optional(),
43
+ type: CouncilErrorResponseType$inboundSchema,
44
+ });
45
+
46
+ export function errorFromJSON(
47
+ jsonString: string,
48
+ ): SafeParseResult<ErrorT, SDKValidationError> {
49
+ return safeParse(
50
+ jsonString,
51
+ (x) => ErrorT$inboundSchema.parse(JSON.parse(x)),
52
+ `Failed to parse 'ErrorT' from JSON`,
53
+ );
54
+ }
55
+
56
+ /** @internal */
57
+ export const CouncilErrorResponse$inboundSchema: z.ZodType<
58
+ CouncilErrorResponse,
59
+ z.ZodTypeDef,
60
+ unknown
61
+ > = z.object({
62
+ error: z.lazy(() => ErrorT$inboundSchema),
63
+ });
64
+
65
+ export function councilErrorResponseFromJSON(
66
+ jsonString: string,
67
+ ): SafeParseResult<CouncilErrorResponse, SDKValidationError> {
68
+ return safeParse(
69
+ jsonString,
70
+ (x) => CouncilErrorResponse$inboundSchema.parse(JSON.parse(x)),
71
+ `Failed to parse 'CouncilErrorResponse' from JSON`,
72
+ );
73
+ }
@@ -0,0 +1,80 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import { Council, Council$inboundSchema } from "./council.js";
12
+
13
+ /**
14
+ * Object type identifier
15
+ */
16
+ export const CouncilListResponseObject = {
17
+ List: "list",
18
+ } as const;
19
+ /**
20
+ * Object type identifier
21
+ */
22
+ export type CouncilListResponseObject = ClosedEnum<
23
+ typeof CouncilListResponseObject
24
+ >;
25
+
26
+ export type CouncilListResponse = {
27
+ /**
28
+ * Array of council objects
29
+ */
30
+ data: Array<Council>;
31
+ /**
32
+ * Whether more results are available
33
+ */
34
+ hasMore: boolean;
35
+ /**
36
+ * Object type identifier
37
+ */
38
+ object: CouncilListResponseObject;
39
+ /**
40
+ * Total number of councils matching the query
41
+ */
42
+ totalCount?: number | undefined;
43
+ /**
44
+ * URL of the request
45
+ */
46
+ url: string;
47
+ };
48
+
49
+ /** @internal */
50
+ export const CouncilListResponseObject$inboundSchema: z.ZodNativeEnum<
51
+ typeof CouncilListResponseObject
52
+ > = z.nativeEnum(CouncilListResponseObject);
53
+
54
+ /** @internal */
55
+ export const CouncilListResponse$inboundSchema: z.ZodType<
56
+ CouncilListResponse,
57
+ z.ZodTypeDef,
58
+ unknown
59
+ > = z.object({
60
+ data: z.array(Council$inboundSchema),
61
+ has_more: z.boolean(),
62
+ object: CouncilListResponseObject$inboundSchema,
63
+ total_count: z.number().optional(),
64
+ url: z.string(),
65
+ }).transform((v) => {
66
+ return remap$(v, {
67
+ "has_more": "hasMore",
68
+ "total_count": "totalCount",
69
+ });
70
+ });
71
+
72
+ export function councilListResponseFromJSON(
73
+ jsonString: string,
74
+ ): SafeParseResult<CouncilListResponse, SDKValidationError> {
75
+ return safeParse(
76
+ jsonString,
77
+ (x) => CouncilListResponse$inboundSchema.parse(JSON.parse(x)),
78
+ `Failed to parse 'CouncilListResponse' from JSON`,
79
+ );
80
+ }
@@ -0,0 +1,64 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type CouncilMetadata = {
11
+ alternativeNames?: Array<string> | undefined;
12
+ /**
13
+ * Area in square kilometres
14
+ */
15
+ areaSquareKm?: number | undefined;
16
+ localAuthorityId?: number | undefined;
17
+ planningAuthorityAlternatives?: Array<string> | undefined;
18
+ planningAuthorityName?: string | undefined;
19
+ /**
20
+ * Estimated population
21
+ */
22
+ population?: number | undefined;
23
+ /**
24
+ * Geographic region
25
+ */
26
+ region?: string | undefined;
27
+ /**
28
+ * Tags for categorisation
29
+ */
30
+ tags?: Array<string> | undefined;
31
+ /**
32
+ * Council website URL
33
+ */
34
+ website?: string | undefined;
35
+ wikipediaUrl?: string | undefined;
36
+ };
37
+
38
+ /** @internal */
39
+ export const CouncilMetadata$inboundSchema: z.ZodType<
40
+ CouncilMetadata,
41
+ z.ZodTypeDef,
42
+ unknown
43
+ > = z.object({
44
+ alternativeNames: z.array(z.string()).optional(),
45
+ areaSquareKm: z.number().optional(),
46
+ localAuthorityId: z.number().optional(),
47
+ planningAuthorityAlternatives: z.array(z.string()).optional(),
48
+ planningAuthorityName: z.string().optional(),
49
+ population: z.number().optional(),
50
+ region: z.string().optional(),
51
+ tags: z.array(z.string()).optional(),
52
+ website: z.string().optional(),
53
+ wikipediaUrl: z.string().optional(),
54
+ });
55
+
56
+ export function councilMetadataFromJSON(
57
+ jsonString: string,
58
+ ): SafeParseResult<CouncilMetadata, SDKValidationError> {
59
+ return safeParse(
60
+ jsonString,
61
+ (x) => CouncilMetadata$inboundSchema.parse(JSON.parse(x)),
62
+ `Failed to parse 'CouncilMetadata' from JSON`,
63
+ );
64
+ }
@@ -0,0 +1,57 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type CouncilServiceUrls = {
11
+ benefits?: string | undefined;
12
+ buildingControl?: string | undefined;
13
+ councilTax?: string | undefined;
14
+ environmentalHealth?: string | undefined;
15
+ housing?: string | undefined;
16
+ licensing?: string | undefined;
17
+ parking?: string | undefined;
18
+ planningDocuments?: string | undefined;
19
+ /**
20
+ * URL to planning applications portal
21
+ */
22
+ planningPortal?: string | undefined;
23
+ /**
24
+ * URL to planning search page
25
+ */
26
+ planningSearch?: string | undefined;
27
+ waste?: string | undefined;
28
+ };
29
+
30
+ /** @internal */
31
+ export const CouncilServiceUrls$inboundSchema: z.ZodType<
32
+ CouncilServiceUrls,
33
+ z.ZodTypeDef,
34
+ unknown
35
+ > = z.object({
36
+ benefits: z.string().optional(),
37
+ buildingControl: z.string().optional(),
38
+ councilTax: z.string().optional(),
39
+ environmentalHealth: z.string().optional(),
40
+ housing: z.string().optional(),
41
+ licensing: z.string().optional(),
42
+ parking: z.string().optional(),
43
+ planningDocuments: z.string().optional(),
44
+ planningPortal: z.string().optional(),
45
+ planningSearch: z.string().optional(),
46
+ waste: z.string().optional(),
47
+ });
48
+
49
+ export function councilServiceUrlsFromJSON(
50
+ jsonString: string,
51
+ ): SafeParseResult<CouncilServiceUrls, SDKValidationError> {
52
+ return safeParse(
53
+ jsonString,
54
+ (x) => CouncilServiceUrls$inboundSchema.parse(JSON.parse(x)),
55
+ `Failed to parse 'CouncilServiceUrls' from JSON`,
56
+ );
57
+ }
@@ -11,6 +11,13 @@ export * from "./avmpricerating.js";
11
11
  export * from "./builddata.js";
12
12
  export * from "./chargeentry.js";
13
13
  export * from "./chargehistory.js";
14
+ export * from "./council.js";
15
+ export * from "./councilbranding.js";
16
+ export * from "./councilcontactdetails.js";
17
+ export * from "./councilerrorresponse.js";
18
+ export * from "./councillistresponse.js";
19
+ export * from "./councilmetadata.js";
20
+ export * from "./councilserviceurls.js";
14
21
  export * from "./counciltaxbanddetails.js";
15
22
  export * from "./counciltaxdata.js";
16
23
  export * from "./epcdata.js";
@@ -76,7 +76,7 @@ export type Seller = {
76
76
  /**
77
77
  * Listing status
78
78
  */
79
- export const Status = {
79
+ export const ListingStatus = {
80
80
  Live: "live",
81
81
  Unavailable: "unavailable",
82
82
  Removed: "removed",
@@ -88,19 +88,19 @@ export const Status = {
88
88
  /**
89
89
  * Listing status
90
90
  */
91
- export type Status = ClosedEnum<typeof Status>;
91
+ export type ListingStatus = ClosedEnum<typeof ListingStatus>;
92
92
 
93
93
  /**
94
94
  * Listing type
95
95
  */
96
- export const Type = {
96
+ export const ListingType = {
97
97
  Sale: "sale",
98
98
  Rent: "rent",
99
99
  } as const;
100
100
  /**
101
101
  * Listing type
102
102
  */
103
- export type Type = ClosedEnum<typeof Type>;
103
+ export type ListingType = ClosedEnum<typeof ListingType>;
104
104
 
105
105
  export type Listing = {
106
106
  /**
@@ -146,11 +146,11 @@ export type Listing = {
146
146
  /**
147
147
  * Listing status
148
148
  */
149
- status?: Status | undefined;
149
+ status?: ListingStatus | undefined;
150
150
  /**
151
151
  * Listing type
152
152
  */
153
- type?: Type | undefined;
153
+ type?: ListingType | undefined;
154
154
  };
155
155
 
156
156
  /** @internal */
@@ -232,13 +232,13 @@ export function sellerFromJSON(
232
232
  }
233
233
 
234
234
  /** @internal */
235
- export const Status$inboundSchema: z.ZodNativeEnum<typeof Status> = z
236
- .nativeEnum(Status);
235
+ export const ListingStatus$inboundSchema: z.ZodNativeEnum<
236
+ typeof ListingStatus
237
+ > = z.nativeEnum(ListingStatus);
237
238
 
238
239
  /** @internal */
239
- export const Type$inboundSchema: z.ZodNativeEnum<typeof Type> = z.nativeEnum(
240
- Type,
241
- );
240
+ export const ListingType$inboundSchema: z.ZodNativeEnum<typeof ListingType> = z
241
+ .nativeEnum(ListingType);
242
242
 
243
243
  /** @internal */
244
244
  export const Listing$inboundSchema: z.ZodType<Listing, z.ZodTypeDef, unknown> =
@@ -257,8 +257,8 @@ export const Listing$inboundSchema: z.ZodType<Listing, z.ZodTypeDef, unknown> =
257
257
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
258
258
  ).optional(),
259
259
  seller: z.lazy(() => Seller$inboundSchema).optional(),
260
- status: Status$inboundSchema.optional(),
261
- type: Type$inboundSchema.optional(),
260
+ status: ListingStatus$inboundSchema.optional(),
261
+ type: ListingType$inboundSchema.optional(),
262
262
  });
263
263
 
264
264
  export function listingFromJSON(
@@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
  /**
12
12
  * School address information
13
13
  */
14
- export type Address = {
14
+ export type SchoolAddress = {
15
15
  /**
16
16
  * County or region
17
17
  */
@@ -65,13 +65,13 @@ export type Location = {
65
65
  /**
66
66
  * Object type identifier
67
67
  */
68
- export const ObjectT = {
68
+ export const SchoolObject = {
69
69
  School: "school",
70
70
  } as const;
71
71
  /**
72
72
  * Object type identifier
73
73
  */
74
- export type ObjectT = ClosedEnum<typeof ObjectT>;
74
+ export type SchoolObject = ClosedEnum<typeof SchoolObject>;
75
75
 
76
76
  /**
77
77
  * Current operational status
@@ -109,7 +109,7 @@ export type School = {
109
109
  /**
110
110
  * School address information
111
111
  */
112
- address?: Address | undefined;
112
+ address?: SchoolAddress | undefined;
113
113
  /**
114
114
  * Admissions policy type
115
115
  */
@@ -189,7 +189,7 @@ export type School = {
189
189
  /**
190
190
  * Object type identifier
191
191
  */
192
- object: ObjectT;
192
+ object: SchoolObject;
193
193
  /**
194
194
  * Educational phase (e.g., Primary, Secondary, All-through)
195
195
  */
@@ -249,22 +249,25 @@ export type School = {
249
249
  };
250
250
 
251
251
  /** @internal */
252
- export const Address$inboundSchema: z.ZodType<Address, z.ZodTypeDef, unknown> =
253
- z.object({
254
- county: z.string().optional(),
255
- locality: z.string().optional(),
256
- postcode: z.string().optional(),
257
- street: z.string().optional(),
258
- town: z.string().optional(),
259
- });
252
+ export const SchoolAddress$inboundSchema: z.ZodType<
253
+ SchoolAddress,
254
+ z.ZodTypeDef,
255
+ unknown
256
+ > = z.object({
257
+ county: z.string().optional(),
258
+ locality: z.string().optional(),
259
+ postcode: z.string().optional(),
260
+ street: z.string().optional(),
261
+ town: z.string().optional(),
262
+ });
260
263
 
261
- export function addressFromJSON(
264
+ export function schoolAddressFromJSON(
262
265
  jsonString: string,
263
- ): SafeParseResult<Address, SDKValidationError> {
266
+ ): SafeParseResult<SchoolAddress, SDKValidationError> {
264
267
  return safeParse(
265
268
  jsonString,
266
- (x) => Address$inboundSchema.parse(JSON.parse(x)),
267
- `Failed to parse 'Address' from JSON`,
269
+ (x) => SchoolAddress$inboundSchema.parse(JSON.parse(x)),
270
+ `Failed to parse 'SchoolAddress' from JSON`,
268
271
  );
269
272
  }
270
273
 
@@ -294,8 +297,8 @@ export function locationFromJSON(
294
297
  }
295
298
 
296
299
  /** @internal */
297
- export const ObjectT$inboundSchema: z.ZodNativeEnum<typeof ObjectT> = z
298
- .nativeEnum(ObjectT);
300
+ export const SchoolObject$inboundSchema: z.ZodNativeEnum<typeof SchoolObject> =
301
+ z.nativeEnum(SchoolObject);
299
302
 
300
303
  /** @internal */
301
304
  export const SchoolStatus$inboundSchema: z.ZodNativeEnum<typeof SchoolStatus> =
@@ -308,7 +311,7 @@ export const SchoolType$inboundSchema: z.ZodNativeEnum<typeof SchoolType> = z
308
311
  /** @internal */
309
312
  export const School$inboundSchema: z.ZodType<School, z.ZodTypeDef, unknown> = z
310
313
  .object({
311
- address: z.lazy(() => Address$inboundSchema).optional(),
314
+ address: z.lazy(() => SchoolAddress$inboundSchema).optional(),
312
315
  admissionsPolicy: z.string().optional(),
313
316
  ageRange: z.string().optional(),
314
317
  capacity: z.number().optional(),
@@ -328,7 +331,7 @@ export const School$inboundSchema: z.ZodType<School, z.ZodTypeDef, unknown> = z
328
331
  lowerLevelGeographyCode: z.nullable(z.string()),
329
332
  name: z.string(),
330
333
  numberOfPupils: z.number().optional(),
331
- object: ObjectT$inboundSchema,
334
+ object: SchoolObject$inboundSchema,
332
335
  phase: z.string().optional(),
333
336
  religiousCharacter: z.string().optional(),
334
337
  slug: z.nullable(z.string()),
package/src/sdk/sdk.ts CHANGED
@@ -7,6 +7,7 @@ import { Address } from "./address.js";
7
7
  import { Areas } from "./areas.js";
8
8
  import { Avm } from "./avm.js";
9
9
  import { Connectivity } from "./connectivity.js";
10
+ import { Councils } from "./councils.js";
10
11
  import { Epc } from "./epc.js";
11
12
  import { Listings } from "./listings.js";
12
13
  import { Metrics } from "./metrics.js";
@@ -55,6 +56,11 @@ export class SDK extends ClientSDK {
55
56
  return (this._avm ??= new Avm(this._options));
56
57
  }
57
58
 
59
+ private _councils?: Councils;
60
+ get councils(): Councils {
61
+ return (this._councils ??= new Councils(this._options));
62
+ }
63
+
58
64
  private _epc?: Epc;
59
65
  get epc(): Epc {
60
66
  return (this._epc ??= new Epc(this._options));