@vepler/sdk 2.164.0 → 2.167.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.
- package/README.md +2 -1
- package/dist/commonjs/funcs/titleDeedsPostV1TitleDeedsTitleNumberPurchase.d.ts +1 -1
- package/dist/commonjs/funcs/titleDeedsPostV1TitleDeedsTitleNumberPurchase.d.ts.map +1 -1
- package/dist/commonjs/funcs/titleDeedsPostV1TitleDeedsTitleNumberPurchase.js +2 -1
- package/dist/commonjs/funcs/titleDeedsPostV1TitleDeedsTitleNumberPurchase.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/sdk/models/errors/postv1titledeedstitlenumberpurchase.d.ts +65 -0
- package/dist/commonjs/sdk/models/errors/postv1titledeedstitlenumberpurchase.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/errors/postv1titledeedstitlenumberpurchase.js +55 -1
- package/dist/commonjs/sdk/models/errors/postv1titledeedstitlenumberpurchase.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/aggregationresult.d.ts +2 -1
- package/dist/commonjs/sdk/models/shared/aggregationresult.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/aggregationresult.js +2 -0
- package/dist/commonjs/sdk/models/shared/aggregationresult.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/histogrambucket.d.ts +7 -0
- package/dist/commonjs/sdk/models/shared/histogrambucket.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/histogrambucket.js +4 -2
- package/dist/commonjs/sdk/models/shared/histogrambucket.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/index.d.ts +1 -0
- package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/index.js +1 -0
- package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/nestedaggregationresult.d.ts +16 -0
- package/dist/commonjs/sdk/models/shared/nestedaggregationresult.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/nestedaggregationresult.js +55 -0
- package/dist/commonjs/sdk/models/shared/nestedaggregationresult.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/termsbucket.d.ts +3 -0
- package/dist/commonjs/sdk/models/shared/termsbucket.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/termsbucket.js +2 -2
- package/dist/commonjs/sdk/models/shared/termsbucket.js.map +1 -1
- package/dist/esm/funcs/titleDeedsPostV1TitleDeedsTitleNumberPurchase.d.ts +1 -1
- package/dist/esm/funcs/titleDeedsPostV1TitleDeedsTitleNumberPurchase.d.ts.map +1 -1
- package/dist/esm/funcs/titleDeedsPostV1TitleDeedsTitleNumberPurchase.js +2 -1
- package/dist/esm/funcs/titleDeedsPostV1TitleDeedsTitleNumberPurchase.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/sdk/models/errors/postv1titledeedstitlenumberpurchase.d.ts +65 -0
- package/dist/esm/sdk/models/errors/postv1titledeedstitlenumberpurchase.d.ts.map +1 -1
- package/dist/esm/sdk/models/errors/postv1titledeedstitlenumberpurchase.js +52 -0
- package/dist/esm/sdk/models/errors/postv1titledeedstitlenumberpurchase.js.map +1 -1
- package/dist/esm/sdk/models/shared/aggregationresult.d.ts +2 -1
- package/dist/esm/sdk/models/shared/aggregationresult.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/aggregationresult.js +2 -0
- package/dist/esm/sdk/models/shared/aggregationresult.js.map +1 -1
- package/dist/esm/sdk/models/shared/histogrambucket.d.ts +7 -0
- package/dist/esm/sdk/models/shared/histogrambucket.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/histogrambucket.js +5 -3
- package/dist/esm/sdk/models/shared/histogrambucket.js.map +1 -1
- package/dist/esm/sdk/models/shared/index.d.ts +1 -0
- package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/index.js +1 -0
- package/dist/esm/sdk/models/shared/index.js.map +1 -1
- package/dist/esm/sdk/models/shared/nestedaggregationresult.d.ts +16 -0
- package/dist/esm/sdk/models/shared/nestedaggregationresult.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/nestedaggregationresult.js +18 -0
- package/dist/esm/sdk/models/shared/nestedaggregationresult.js.map +1 -0
- package/dist/esm/sdk/models/shared/termsbucket.d.ts +3 -0
- package/dist/esm/sdk/models/shared/termsbucket.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/termsbucket.js +3 -3
- package/dist/esm/sdk/models/shared/termsbucket.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/titleDeedsPostV1TitleDeedsTitleNumberPurchase.ts +8 -0
- package/src/lib/config.ts +3 -3
- package/src/sdk/models/errors/postv1titledeedstitlenumberpurchase.ts +144 -0
- package/src/sdk/models/shared/aggregationresult.ts +7 -1
- package/src/sdk/models/shared/histogrambucket.ts +19 -5
- package/src/sdk/models/shared/index.ts +1 -0
- package/src/sdk/models/shared/nestedaggregationresult.ts +47 -0
- package/src/sdk/models/shared/termsbucket.ts +13 -5
|
@@ -14,6 +14,9 @@ export type TermsBucket = {
|
|
|
14
14
|
* Distinct value for this bucket
|
|
15
15
|
*/
|
|
16
16
|
key: string | number | boolean;
|
|
17
|
+
additionalProperties?: {
|
|
18
|
+
[k: string]: any;
|
|
19
|
+
} | undefined;
|
|
17
20
|
};
|
|
18
21
|
/** @internal */
|
|
19
22
|
export declare const Key$inboundSchema: z.ZodType<Key, z.ZodTypeDef, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"termsbucket.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/shared/termsbucket.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"termsbucket.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/shared/termsbucket.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAM5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE5C,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAC/B,oBAAoB,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,GAAG,SAAS,CAAC;CACzD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAEnE,CAAC;AAEF,wBAAgB,WAAW,CACzB,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAM1C;AAED,gBAAgB;AAChB,eAAO,MAAM,yBAAyB,EAAE,CAAC,CAAC,OAAO,CAC/C,WAAW,EACX,CAAC,CAAC,UAAU,EACZ,OAAO,CAYP,CAAC;AAEH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAMlD"}
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod/v3";
|
|
5
5
|
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
6
|
-
import { safeParse } from "../../../lib/schemas.js";
|
|
6
|
+
import { collectExtraKeys as collectExtraKeys$, safeParse, } from "../../../lib/schemas.js";
|
|
7
7
|
/** @internal */
|
|
8
8
|
export const Key$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
|
|
9
9
|
export function keyFromJSON(jsonString) {
|
|
10
10
|
return safeParse(jsonString, (x) => Key$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Key' from JSON`);
|
|
11
11
|
}
|
|
12
12
|
/** @internal */
|
|
13
|
-
export const TermsBucket$inboundSchema = z.object({
|
|
13
|
+
export const TermsBucket$inboundSchema = collectExtraKeys$(z.object({
|
|
14
14
|
doc_count: z.number(),
|
|
15
15
|
key: z.union([z.string(), z.number(), z.boolean()]),
|
|
16
|
-
}).transform((v) => {
|
|
16
|
+
}).catchall(z.any()), "additionalProperties", true).transform((v) => {
|
|
17
17
|
return remap$(v, {
|
|
18
18
|
"doc_count": "docCount",
|
|
19
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"termsbucket.js","sourceRoot":"","sources":["../../../../../src/sdk/models/shared/termsbucket.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,
|
|
1
|
+
{"version":3,"file":"termsbucket.js","sourceRoot":"","sources":["../../../../../src/sdk/models/shared/termsbucket.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EACL,gBAAgB,IAAI,iBAAiB,EACrC,SAAS,GACV,MAAM,yBAAyB,CAAC;AAqBjC,gBAAgB;AAChB,MAAM,CAAC,MAAM,iBAAiB,GAA0C,CAAC,CAAC,KAAK,CAC7E,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CACtC,CAAC;AAEF,MAAM,UAAU,WAAW,CACzB,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC7C,iCAAiC,CAClC,CAAC;AACJ,CAAC;AAED,gBAAgB;AAChB,MAAM,CAAC,MAAM,yBAAyB,GAIlC,iBAAiB,CACnB,CAAC,CAAC,MAAM,CAAC;IACP,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;CACpD,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,EACpB,sBAAsB,EACtB,IAAI,CACL,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IAChB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,WAAW,EAAE,UAAU;KACxB,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,mBAAmB,CACjC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,yBAAyB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACrD,yCAAyC,CAC1C,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -45,6 +45,7 @@ export function titleDeedsPostV1TitleDeedsTitleNumberPurchase(
|
|
|
45
45
|
| errors.InsufficientCreditsError
|
|
46
46
|
| errors.PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponseResponseBody
|
|
47
47
|
| errors.PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse500ResponseBody
|
|
48
|
+
| errors.PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502ResponseBody
|
|
48
49
|
| SDKBaseError
|
|
49
50
|
| ResponseValidationError
|
|
50
51
|
| ConnectionError
|
|
@@ -75,6 +76,7 @@ async function $do(
|
|
|
75
76
|
| errors.InsufficientCreditsError
|
|
76
77
|
| errors.PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponseResponseBody
|
|
77
78
|
| errors.PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse500ResponseBody
|
|
79
|
+
| errors.PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502ResponseBody
|
|
78
80
|
| SDKBaseError
|
|
79
81
|
| ResponseValidationError
|
|
80
82
|
| ConnectionError
|
|
@@ -169,6 +171,7 @@ async function $do(
|
|
|
169
171
|
| errors.InsufficientCreditsError
|
|
170
172
|
| errors.PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponseResponseBody
|
|
171
173
|
| errors.PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse500ResponseBody
|
|
174
|
+
| errors.PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502ResponseBody
|
|
172
175
|
| SDKBaseError
|
|
173
176
|
| ResponseValidationError
|
|
174
177
|
| ConnectionError
|
|
@@ -199,6 +202,11 @@ async function $do(
|
|
|
199
202
|
errors
|
|
200
203
|
.PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse500ResponseBody$inboundSchema,
|
|
201
204
|
),
|
|
205
|
+
M.jsonErr(
|
|
206
|
+
502,
|
|
207
|
+
errors
|
|
208
|
+
.PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502ResponseBody$inboundSchema,
|
|
209
|
+
),
|
|
202
210
|
M.fail("4XX"),
|
|
203
211
|
M.fail("5XX"),
|
|
204
212
|
)(response, req, { extraFields: responseFields });
|
package/src/lib/config.ts
CHANGED
|
@@ -60,8 +60,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
60
60
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
|
-
openapiDocVersion: "2.
|
|
63
|
+
openapiDocVersion: "2.167.0",
|
|
64
64
|
sdkVersion: "0.11.0",
|
|
65
|
-
genVersion: "2.
|
|
66
|
-
userAgent: "speakeasy-sdk/typescript 0.11.0 2.
|
|
65
|
+
genVersion: "2.913.3",
|
|
66
|
+
userAgent: "speakeasy-sdk/typescript 0.11.0 2.913.3 2.167.0 @vepler/sdk",
|
|
67
67
|
} as const;
|
|
@@ -11,6 +11,84 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
11
11
|
import { SDKBaseError } from "./sdkbaseerror.js";
|
|
12
12
|
import { SDKValidationError } from "./sdkvalidationerror.js";
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Error type category
|
|
16
|
+
*/
|
|
17
|
+
export const PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502Type = {
|
|
18
|
+
ApiError: "api_error",
|
|
19
|
+
InvalidRequestError: "invalid_request_error",
|
|
20
|
+
AuthenticationError: "authentication_error",
|
|
21
|
+
RateLimitError: "rate_limit_error",
|
|
22
|
+
} as const;
|
|
23
|
+
/**
|
|
24
|
+
* Error type category
|
|
25
|
+
*/
|
|
26
|
+
export type PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502Type =
|
|
27
|
+
OpenEnum<typeof PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502Type>;
|
|
28
|
+
|
|
29
|
+
export type PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502Error = {
|
|
30
|
+
/**
|
|
31
|
+
* Machine-readable error code
|
|
32
|
+
*/
|
|
33
|
+
code?: string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* URL to relevant documentation
|
|
36
|
+
*/
|
|
37
|
+
docUrl?: string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Human-readable error message
|
|
40
|
+
*/
|
|
41
|
+
message: string;
|
|
42
|
+
/**
|
|
43
|
+
* Parameter that caused the error
|
|
44
|
+
*/
|
|
45
|
+
param?: string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Suggested corrections (e.g. postcode typo suggestions)
|
|
48
|
+
*/
|
|
49
|
+
suggestions?: Array<string> | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Error type category
|
|
52
|
+
*/
|
|
53
|
+
type: PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502Type;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Error response
|
|
58
|
+
*/
|
|
59
|
+
export type PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502ResponseBodyData =
|
|
60
|
+
{
|
|
61
|
+
error: PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502Error;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Error response
|
|
66
|
+
*/
|
|
67
|
+
export class PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502ResponseBody
|
|
68
|
+
extends SDKBaseError
|
|
69
|
+
{
|
|
70
|
+
error: PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502Error;
|
|
71
|
+
|
|
72
|
+
/** The original data that was passed to this error instance. */
|
|
73
|
+
data$:
|
|
74
|
+
PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502ResponseBodyData;
|
|
75
|
+
|
|
76
|
+
constructor(
|
|
77
|
+
err:
|
|
78
|
+
PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502ResponseBodyData,
|
|
79
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
80
|
+
) {
|
|
81
|
+
const message = err.error?.message
|
|
82
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
83
|
+
super(message, httpMeta);
|
|
84
|
+
this.data$ = err;
|
|
85
|
+
this.error = err.error;
|
|
86
|
+
|
|
87
|
+
this.name =
|
|
88
|
+
"PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502ResponseBody";
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
14
92
|
/**
|
|
15
93
|
* Error type category
|
|
16
94
|
*/
|
|
@@ -315,6 +393,72 @@ export class PostV1TitleDeedsTitleNumberPurchaseResponseBody
|
|
|
315
393
|
}
|
|
316
394
|
}
|
|
317
395
|
|
|
396
|
+
/** @internal */
|
|
397
|
+
export const PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502Type$inboundSchema:
|
|
398
|
+
z.ZodType<
|
|
399
|
+
PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502Type,
|
|
400
|
+
z.ZodTypeDef,
|
|
401
|
+
unknown
|
|
402
|
+
> = openEnums.inboundSchema(
|
|
403
|
+
PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502Type,
|
|
404
|
+
);
|
|
405
|
+
|
|
406
|
+
/** @internal */
|
|
407
|
+
export const PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502Error$inboundSchema:
|
|
408
|
+
z.ZodType<
|
|
409
|
+
PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502Error,
|
|
410
|
+
z.ZodTypeDef,
|
|
411
|
+
unknown
|
|
412
|
+
> = z.object({
|
|
413
|
+
code: z.string().optional(),
|
|
414
|
+
doc_url: z.string().optional(),
|
|
415
|
+
message: z.string(),
|
|
416
|
+
param: z.string().optional(),
|
|
417
|
+
suggestions: z.array(z.string()).optional(),
|
|
418
|
+
type:
|
|
419
|
+
PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502Type$inboundSchema,
|
|
420
|
+
}).transform((v) => {
|
|
421
|
+
return remap$(v, {
|
|
422
|
+
"doc_url": "docUrl",
|
|
423
|
+
});
|
|
424
|
+
});
|
|
425
|
+
|
|
426
|
+
export function postV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502ErrorFromJSON(
|
|
427
|
+
jsonString: string,
|
|
428
|
+
): SafeParseResult<
|
|
429
|
+
PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502Error,
|
|
430
|
+
SDKValidationError
|
|
431
|
+
> {
|
|
432
|
+
return safeParse(
|
|
433
|
+
jsonString,
|
|
434
|
+
(x) =>
|
|
435
|
+
PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502Error$inboundSchema
|
|
436
|
+
.parse(JSON.parse(x)),
|
|
437
|
+
`Failed to parse 'PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502Error' from JSON`,
|
|
438
|
+
);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/** @internal */
|
|
442
|
+
export const PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502ResponseBody$inboundSchema:
|
|
443
|
+
z.ZodType<
|
|
444
|
+
PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502ResponseBody,
|
|
445
|
+
z.ZodTypeDef,
|
|
446
|
+
unknown
|
|
447
|
+
> = z.object({
|
|
448
|
+
error: z.lazy(() =>
|
|
449
|
+
PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502Error$inboundSchema
|
|
450
|
+
),
|
|
451
|
+
request$: z.instanceof(Request),
|
|
452
|
+
response$: z.instanceof(Response),
|
|
453
|
+
body$: z.string(),
|
|
454
|
+
})
|
|
455
|
+
.transform((v) => {
|
|
456
|
+
return new PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse502ResponseBody(
|
|
457
|
+
v,
|
|
458
|
+
{ request: v.request$, response: v.response$, body: v.body$ },
|
|
459
|
+
);
|
|
460
|
+
});
|
|
461
|
+
|
|
318
462
|
/** @internal */
|
|
319
463
|
export const PostV1TitleDeedsTitleNumberPurchaseTitleDeedsResponse500Type$inboundSchema:
|
|
320
464
|
z.ZodType<
|
|
@@ -14,6 +14,10 @@ import {
|
|
|
14
14
|
HistogramAggregationResult,
|
|
15
15
|
HistogramAggregationResult$inboundSchema,
|
|
16
16
|
} from "./histogramaggregationresult.js";
|
|
17
|
+
import {
|
|
18
|
+
NestedAggregationResult,
|
|
19
|
+
NestedAggregationResult$inboundSchema,
|
|
20
|
+
} from "./nestedaggregationresult.js";
|
|
17
21
|
import {
|
|
18
22
|
PercentilesAggregationResult,
|
|
19
23
|
PercentilesAggregationResult$inboundSchema,
|
|
@@ -37,7 +41,8 @@ export type AggregationResult =
|
|
|
37
41
|
| TermsAggregationResult
|
|
38
42
|
| HistogramAggregationResult
|
|
39
43
|
| PercentilesAggregationResult
|
|
40
|
-
| SingleValueAggregationResult
|
|
44
|
+
| SingleValueAggregationResult
|
|
45
|
+
| NestedAggregationResult;
|
|
41
46
|
|
|
42
47
|
/** @internal */
|
|
43
48
|
export const AggregationResult$inboundSchema: z.ZodType<
|
|
@@ -51,6 +56,7 @@ export const AggregationResult$inboundSchema: z.ZodType<
|
|
|
51
56
|
HistogramAggregationResult$inboundSchema,
|
|
52
57
|
PercentilesAggregationResult$inboundSchema,
|
|
53
58
|
SingleValueAggregationResult$inboundSchema,
|
|
59
|
+
NestedAggregationResult$inboundSchema,
|
|
54
60
|
]);
|
|
55
61
|
|
|
56
62
|
export function aggregationResultFromJSON(
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
collectExtraKeys as collectExtraKeys$,
|
|
9
|
+
safeParse,
|
|
10
|
+
} from "../../../lib/schemas.js";
|
|
8
11
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
12
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
13
|
|
|
@@ -17,6 +20,11 @@ export type HistogramBucket = {
|
|
|
17
20
|
* Lower bound of this bucket (inclusive). The bucket covers [key, key + interval).
|
|
18
21
|
*/
|
|
19
22
|
key: number;
|
|
23
|
+
/**
|
|
24
|
+
* Formatted bucket key, present for date_histogram when a `format` is supplied (e.g. '2024-06').
|
|
25
|
+
*/
|
|
26
|
+
keyAsString?: string | undefined;
|
|
27
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
20
28
|
};
|
|
21
29
|
|
|
22
30
|
/** @internal */
|
|
@@ -24,12 +32,18 @@ export const HistogramBucket$inboundSchema: z.ZodType<
|
|
|
24
32
|
HistogramBucket,
|
|
25
33
|
z.ZodTypeDef,
|
|
26
34
|
unknown
|
|
27
|
-
> =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
35
|
+
> = collectExtraKeys$(
|
|
36
|
+
z.object({
|
|
37
|
+
doc_count: z.number(),
|
|
38
|
+
key: z.number(),
|
|
39
|
+
key_as_string: z.string().optional(),
|
|
40
|
+
}).catchall(z.any()),
|
|
41
|
+
"additionalProperties",
|
|
42
|
+
true,
|
|
43
|
+
).transform((v) => {
|
|
31
44
|
return remap$(v, {
|
|
32
45
|
"doc_count": "docCount",
|
|
46
|
+
"key_as_string": "keyAsString",
|
|
33
47
|
});
|
|
34
48
|
});
|
|
35
49
|
|
|
@@ -246,6 +246,7 @@ export * from "./monthlycategorystats.js";
|
|
|
246
246
|
export * from "./monthlycategorystatslistresponse.js";
|
|
247
247
|
export * from "./nearestpostcodesresponse.js";
|
|
248
248
|
export * from "./nestedaggregation.js";
|
|
249
|
+
export * from "./nestedaggregationresult.js";
|
|
249
250
|
export * from "./officer.js";
|
|
250
251
|
export * from "./officerlistresponse.js";
|
|
251
252
|
export * from "./officerresponse.js";
|
|
@@ -0,0 +1,47 @@
|
|
|
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 {
|
|
8
|
+
collectExtraKeys as collectExtraKeys$,
|
|
9
|
+
safeParse,
|
|
10
|
+
} from "../../../lib/schemas.js";
|
|
11
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
12
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
13
|
+
|
|
14
|
+
export type NestedAggregationResult = {
|
|
15
|
+
/**
|
|
16
|
+
* Documents matched within the nested context (present on the outer wrapper).
|
|
17
|
+
*/
|
|
18
|
+
docCount?: number | undefined;
|
|
19
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const NestedAggregationResult$inboundSchema: z.ZodType<
|
|
24
|
+
NestedAggregationResult,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = collectExtraKeys$(
|
|
28
|
+
z.object({
|
|
29
|
+
doc_count: z.number().optional(),
|
|
30
|
+
}).catchall(z.any()),
|
|
31
|
+
"additionalProperties",
|
|
32
|
+
true,
|
|
33
|
+
).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
"doc_count": "docCount",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export function nestedAggregationResultFromJSON(
|
|
40
|
+
jsonString: string,
|
|
41
|
+
): SafeParseResult<NestedAggregationResult, SDKValidationError> {
|
|
42
|
+
return safeParse(
|
|
43
|
+
jsonString,
|
|
44
|
+
(x) => NestedAggregationResult$inboundSchema.parse(JSON.parse(x)),
|
|
45
|
+
`Failed to parse 'NestedAggregationResult' from JSON`,
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
7
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
collectExtraKeys as collectExtraKeys$,
|
|
9
|
+
safeParse,
|
|
10
|
+
} from "../../../lib/schemas.js";
|
|
8
11
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
12
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
13
|
|
|
@@ -22,6 +25,7 @@ export type TermsBucket = {
|
|
|
22
25
|
* Distinct value for this bucket
|
|
23
26
|
*/
|
|
24
27
|
key: string | number | boolean;
|
|
28
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
25
29
|
};
|
|
26
30
|
|
|
27
31
|
/** @internal */
|
|
@@ -44,10 +48,14 @@ export const TermsBucket$inboundSchema: z.ZodType<
|
|
|
44
48
|
TermsBucket,
|
|
45
49
|
z.ZodTypeDef,
|
|
46
50
|
unknown
|
|
47
|
-
> =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
> = collectExtraKeys$(
|
|
52
|
+
z.object({
|
|
53
|
+
doc_count: z.number(),
|
|
54
|
+
key: z.union([z.string(), z.number(), z.boolean()]),
|
|
55
|
+
}).catchall(z.any()),
|
|
56
|
+
"additionalProperties",
|
|
57
|
+
true,
|
|
58
|
+
).transform((v) => {
|
|
51
59
|
return remap$(v, {
|
|
52
60
|
"doc_count": "docCount",
|
|
53
61
|
});
|