@novu/api 0.0.5 → 0.1.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 +105 -20
- package/docs/sdks/novu/README.md +0 -227
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/index.d.ts +0 -3
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +0 -3
- package/models/components/index.js.map +1 -1
- package/models/errors/index.d.ts +0 -1
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +0 -1
- package/models/errors/index.js.map +1 -1
- package/models/operations/index.d.ts +0 -3
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -3
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/sdk.d.ts +0 -3
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +0 -12
- package/sdk/sdk.js.map +1 -1
- package/sources/json-development.json +0 -1161
- package/src/lib/config.ts +2 -2
- package/src/models/components/index.ts +0 -3
- package/src/models/errors/index.ts +0 -1
- package/src/models/operations/index.ts +0 -3
- package/src/sdk/sdk.ts +0 -38
- package/funcs/generateRandomNumber.d.ts +0 -10
- package/funcs/generateRandomNumber.d.ts.map +0 -1
- package/funcs/generateRandomNumber.js +0 -126
- package/funcs/generateRandomNumber.js.map +0 -1
- package/funcs/healthControllerHealthCheck.d.ts +0 -10
- package/funcs/healthControllerHealthCheck.d.ts.map +0 -1
- package/funcs/healthControllerHealthCheck.js +0 -109
- package/funcs/healthControllerHealthCheck.js.map +0 -1
- package/funcs/testIdempotency.d.ts +0 -11
- package/funcs/testIdempotency.d.ts.map +0 -1
- package/funcs/testIdempotency.js +0 -129
- package/funcs/testIdempotency.js.map +0 -1
- package/models/components/idempotencetestingresponse.d.ts +0 -32
- package/models/components/idempotencetestingresponse.d.ts.map +0 -1
- package/models/components/idempotencetestingresponse.js +0 -59
- package/models/components/idempotencetestingresponse.js.map +0 -1
- package/models/components/idempotencybehaviorenum.d.ts +0 -37
- package/models/components/idempotencybehaviorenum.d.ts.map +0 -1
- package/models/components/idempotencybehaviorenum.js +0 -54
- package/models/components/idempotencybehaviorenum.js.map +0 -1
- package/models/components/idempotencytestingdto.d.ts +0 -33
- package/models/components/idempotencytestingdto.d.ts.map +0 -1
- package/models/components/idempotencytestingdto.js +0 -60
- package/models/components/idempotencytestingdto.js.map +0 -1
- package/models/errors/healthcontrollerhealthcheck.d.ts +0 -153
- package/models/errors/healthcontrollerhealthcheck.d.ts.map +0 -1
- package/models/errors/healthcontrollerhealthcheck.js +0 -190
- package/models/errors/healthcontrollerhealthcheck.js.map +0 -1
- package/models/operations/healthcontrollergeneraterandomnumber.d.ts +0 -64
- package/models/operations/healthcontrollergeneraterandomnumber.d.ts.map +0 -1
- package/models/operations/healthcontrollergeneraterandomnumber.js +0 -108
- package/models/operations/healthcontrollergeneraterandomnumber.js.map +0 -1
- package/models/operations/healthcontrollerhealthcheck.d.ts +0 -165
- package/models/operations/healthcontrollerhealthcheck.d.ts.map +0 -1
- package/models/operations/healthcontrollerhealthcheck.js +0 -206
- package/models/operations/healthcontrollerhealthcheck.js.map +0 -1
- package/models/operations/healthcontrollertestidempotency.d.ts +0 -66
- package/models/operations/healthcontrollertestidempotency.d.ts.map +0 -1
- package/models/operations/healthcontrollertestidempotency.js +0 -112
- package/models/operations/healthcontrollertestidempotency.js.map +0 -1
- package/src/funcs/generateRandomNumber.ts +0 -183
- package/src/funcs/healthControllerHealthCheck.ts +0 -153
- package/src/funcs/testIdempotency.ts +0 -190
- package/src/models/components/idempotencetestingresponse.ts +0 -69
- package/src/models/components/idempotencybehaviorenum.ts +0 -42
- package/src/models/components/idempotencytestingdto.ts +0 -74
- package/src/models/errors/healthcontrollerhealthcheck.ts +0 -291
- package/src/models/operations/healthcontrollergeneraterandomnumber.ts +0 -177
- package/src/models/operations/healthcontrollerhealthcheck.ts +0 -358
- package/src/models/operations/healthcontrollertestidempotency.ts +0 -174
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
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 IdempotenceTestingResponse = {
|
|
11
|
-
/**
|
|
12
|
-
* A unique number representing the idempotency response
|
|
13
|
-
*/
|
|
14
|
-
number: number;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/** @internal */
|
|
18
|
-
export const IdempotenceTestingResponse$inboundSchema: z.ZodType<
|
|
19
|
-
IdempotenceTestingResponse,
|
|
20
|
-
z.ZodTypeDef,
|
|
21
|
-
unknown
|
|
22
|
-
> = z.object({
|
|
23
|
-
number: z.number(),
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
/** @internal */
|
|
27
|
-
export type IdempotenceTestingResponse$Outbound = {
|
|
28
|
-
number: number;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
/** @internal */
|
|
32
|
-
export const IdempotenceTestingResponse$outboundSchema: z.ZodType<
|
|
33
|
-
IdempotenceTestingResponse$Outbound,
|
|
34
|
-
z.ZodTypeDef,
|
|
35
|
-
IdempotenceTestingResponse
|
|
36
|
-
> = z.object({
|
|
37
|
-
number: z.number(),
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @internal
|
|
42
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
|
-
*/
|
|
44
|
-
export namespace IdempotenceTestingResponse$ {
|
|
45
|
-
/** @deprecated use `IdempotenceTestingResponse$inboundSchema` instead. */
|
|
46
|
-
export const inboundSchema = IdempotenceTestingResponse$inboundSchema;
|
|
47
|
-
/** @deprecated use `IdempotenceTestingResponse$outboundSchema` instead. */
|
|
48
|
-
export const outboundSchema = IdempotenceTestingResponse$outboundSchema;
|
|
49
|
-
/** @deprecated use `IdempotenceTestingResponse$Outbound` instead. */
|
|
50
|
-
export type Outbound = IdempotenceTestingResponse$Outbound;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export function idempotenceTestingResponseToJSON(
|
|
54
|
-
idempotenceTestingResponse: IdempotenceTestingResponse,
|
|
55
|
-
): string {
|
|
56
|
-
return JSON.stringify(
|
|
57
|
-
IdempotenceTestingResponse$outboundSchema.parse(idempotenceTestingResponse),
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function idempotenceTestingResponseFromJSON(
|
|
62
|
-
jsonString: string,
|
|
63
|
-
): SafeParseResult<IdempotenceTestingResponse, SDKValidationError> {
|
|
64
|
-
return safeParse(
|
|
65
|
-
jsonString,
|
|
66
|
-
(x) => IdempotenceTestingResponse$inboundSchema.parse(JSON.parse(x)),
|
|
67
|
-
`Failed to parse 'IdempotenceTestingResponse' from JSON`,
|
|
68
|
-
);
|
|
69
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* The expected behavior of the idempotency request
|
|
10
|
-
*/
|
|
11
|
-
export const IdempotencyBehaviorEnum = {
|
|
12
|
-
ImmediateResponse: "IMMEDIATE_RESPONSE",
|
|
13
|
-
ImmediateException: "IMMEDIATE_EXCEPTION",
|
|
14
|
-
DelayedResponse: "DELAYED_RESPONSE",
|
|
15
|
-
} as const;
|
|
16
|
-
/**
|
|
17
|
-
* The expected behavior of the idempotency request
|
|
18
|
-
*/
|
|
19
|
-
export type IdempotencyBehaviorEnum = ClosedEnum<
|
|
20
|
-
typeof IdempotencyBehaviorEnum
|
|
21
|
-
>;
|
|
22
|
-
|
|
23
|
-
/** @internal */
|
|
24
|
-
export const IdempotencyBehaviorEnum$inboundSchema: z.ZodNativeEnum<
|
|
25
|
-
typeof IdempotencyBehaviorEnum
|
|
26
|
-
> = z.nativeEnum(IdempotencyBehaviorEnum);
|
|
27
|
-
|
|
28
|
-
/** @internal */
|
|
29
|
-
export const IdempotencyBehaviorEnum$outboundSchema: z.ZodNativeEnum<
|
|
30
|
-
typeof IdempotencyBehaviorEnum
|
|
31
|
-
> = IdempotencyBehaviorEnum$inboundSchema;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @internal
|
|
35
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
36
|
-
*/
|
|
37
|
-
export namespace IdempotencyBehaviorEnum$ {
|
|
38
|
-
/** @deprecated use `IdempotencyBehaviorEnum$inboundSchema` instead. */
|
|
39
|
-
export const inboundSchema = IdempotencyBehaviorEnum$inboundSchema;
|
|
40
|
-
/** @deprecated use `IdempotencyBehaviorEnum$outboundSchema` instead. */
|
|
41
|
-
export const outboundSchema = IdempotencyBehaviorEnum$outboundSchema;
|
|
42
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
-
import {
|
|
10
|
-
IdempotencyBehaviorEnum,
|
|
11
|
-
IdempotencyBehaviorEnum$inboundSchema,
|
|
12
|
-
IdempotencyBehaviorEnum$outboundSchema,
|
|
13
|
-
} from "./idempotencybehaviorenum.js";
|
|
14
|
-
|
|
15
|
-
export type IdempotencyTestingDto = {
|
|
16
|
-
/**
|
|
17
|
-
* The expected behavior of the idempotency request
|
|
18
|
-
*/
|
|
19
|
-
expectedBehavior: IdempotencyBehaviorEnum;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
/** @internal */
|
|
23
|
-
export const IdempotencyTestingDto$inboundSchema: z.ZodType<
|
|
24
|
-
IdempotencyTestingDto,
|
|
25
|
-
z.ZodTypeDef,
|
|
26
|
-
unknown
|
|
27
|
-
> = z.object({
|
|
28
|
-
expectedBehavior: IdempotencyBehaviorEnum$inboundSchema,
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
/** @internal */
|
|
32
|
-
export type IdempotencyTestingDto$Outbound = {
|
|
33
|
-
expectedBehavior: string;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/** @internal */
|
|
37
|
-
export const IdempotencyTestingDto$outboundSchema: z.ZodType<
|
|
38
|
-
IdempotencyTestingDto$Outbound,
|
|
39
|
-
z.ZodTypeDef,
|
|
40
|
-
IdempotencyTestingDto
|
|
41
|
-
> = z.object({
|
|
42
|
-
expectedBehavior: IdempotencyBehaviorEnum$outboundSchema,
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* @internal
|
|
47
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
48
|
-
*/
|
|
49
|
-
export namespace IdempotencyTestingDto$ {
|
|
50
|
-
/** @deprecated use `IdempotencyTestingDto$inboundSchema` instead. */
|
|
51
|
-
export const inboundSchema = IdempotencyTestingDto$inboundSchema;
|
|
52
|
-
/** @deprecated use `IdempotencyTestingDto$outboundSchema` instead. */
|
|
53
|
-
export const outboundSchema = IdempotencyTestingDto$outboundSchema;
|
|
54
|
-
/** @deprecated use `IdempotencyTestingDto$Outbound` instead. */
|
|
55
|
-
export type Outbound = IdempotencyTestingDto$Outbound;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export function idempotencyTestingDtoToJSON(
|
|
59
|
-
idempotencyTestingDto: IdempotencyTestingDto,
|
|
60
|
-
): string {
|
|
61
|
-
return JSON.stringify(
|
|
62
|
-
IdempotencyTestingDto$outboundSchema.parse(idempotencyTestingDto),
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export function idempotencyTestingDtoFromJSON(
|
|
67
|
-
jsonString: string,
|
|
68
|
-
): SafeParseResult<IdempotencyTestingDto, SDKValidationError> {
|
|
69
|
-
return safeParse(
|
|
70
|
-
jsonString,
|
|
71
|
-
(x) => IdempotencyTestingDto$inboundSchema.parse(JSON.parse(x)),
|
|
72
|
-
`Failed to parse 'IdempotencyTestingDto' from JSON`,
|
|
73
|
-
);
|
|
74
|
-
}
|
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
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 "./sdkvalidationerror.js";
|
|
13
|
-
|
|
14
|
-
export type Info = {
|
|
15
|
-
status: string;
|
|
16
|
-
additionalProperties: { [k: string]: any };
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export type ErrorT = {
|
|
20
|
-
status: string;
|
|
21
|
-
additionalProperties: { [k: string]: any };
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export type Details = {
|
|
25
|
-
status: string;
|
|
26
|
-
additionalProperties: { [k: string]: any };
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* The Health Check is not successful
|
|
31
|
-
*/
|
|
32
|
-
export type HealthControllerHealthCheckResponseBodyData = {
|
|
33
|
-
status?: string | undefined;
|
|
34
|
-
info?: { [k: string]: Info } | null | undefined;
|
|
35
|
-
error?: { [k: string]: ErrorT } | null | undefined;
|
|
36
|
-
details?: { [k: string]: Details } | undefined;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* The Health Check is not successful
|
|
41
|
-
*/
|
|
42
|
-
export class HealthControllerHealthCheckResponseBody extends Error {
|
|
43
|
-
status?: string | undefined;
|
|
44
|
-
info?: { [k: string]: Info } | null | undefined;
|
|
45
|
-
error?: { [k: string]: ErrorT } | null | undefined;
|
|
46
|
-
details?: { [k: string]: Details } | undefined;
|
|
47
|
-
|
|
48
|
-
/** The original data that was passed to this error instance. */
|
|
49
|
-
data$: HealthControllerHealthCheckResponseBodyData;
|
|
50
|
-
|
|
51
|
-
constructor(err: HealthControllerHealthCheckResponseBodyData) {
|
|
52
|
-
const message = "message" in err && typeof err.message === "string"
|
|
53
|
-
? err.message
|
|
54
|
-
: `API error occurred: ${JSON.stringify(err)}`;
|
|
55
|
-
super(message);
|
|
56
|
-
this.data$ = err;
|
|
57
|
-
|
|
58
|
-
if (err.status != null) this.status = err.status;
|
|
59
|
-
if (err.info != null) this.info = err.info;
|
|
60
|
-
if (err.error != null) this.error = err.error;
|
|
61
|
-
if (err.details != null) this.details = err.details;
|
|
62
|
-
|
|
63
|
-
this.name = "HealthControllerHealthCheckResponseBody";
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/** @internal */
|
|
68
|
-
export const Info$inboundSchema: z.ZodType<Info, z.ZodTypeDef, unknown> =
|
|
69
|
-
collectExtraKeys$(
|
|
70
|
-
z.object({
|
|
71
|
-
status: z.string(),
|
|
72
|
-
}).catchall(z.any()),
|
|
73
|
-
"additionalProperties",
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
/** @internal */
|
|
77
|
-
export type Info$Outbound = {
|
|
78
|
-
status: string;
|
|
79
|
-
[additionalProperties: string]: unknown;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
/** @internal */
|
|
83
|
-
export const Info$outboundSchema: z.ZodType<Info$Outbound, z.ZodTypeDef, Info> =
|
|
84
|
-
z.object({
|
|
85
|
-
status: z.string(),
|
|
86
|
-
additionalProperties: z.record(z.any()),
|
|
87
|
-
}).transform((v) => {
|
|
88
|
-
return {
|
|
89
|
-
...v.additionalProperties,
|
|
90
|
-
...remap$(v, {
|
|
91
|
-
additionalProperties: null,
|
|
92
|
-
}),
|
|
93
|
-
};
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* @internal
|
|
98
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
99
|
-
*/
|
|
100
|
-
export namespace Info$ {
|
|
101
|
-
/** @deprecated use `Info$inboundSchema` instead. */
|
|
102
|
-
export const inboundSchema = Info$inboundSchema;
|
|
103
|
-
/** @deprecated use `Info$outboundSchema` instead. */
|
|
104
|
-
export const outboundSchema = Info$outboundSchema;
|
|
105
|
-
/** @deprecated use `Info$Outbound` instead. */
|
|
106
|
-
export type Outbound = Info$Outbound;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export function infoToJSON(info: Info): string {
|
|
110
|
-
return JSON.stringify(Info$outboundSchema.parse(info));
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export function infoFromJSON(
|
|
114
|
-
jsonString: string,
|
|
115
|
-
): SafeParseResult<Info, SDKValidationError> {
|
|
116
|
-
return safeParse(
|
|
117
|
-
jsonString,
|
|
118
|
-
(x) => Info$inboundSchema.parse(JSON.parse(x)),
|
|
119
|
-
`Failed to parse 'Info' from JSON`,
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/** @internal */
|
|
124
|
-
export const ErrorT$inboundSchema: z.ZodType<ErrorT, z.ZodTypeDef, unknown> =
|
|
125
|
-
collectExtraKeys$(
|
|
126
|
-
z.object({
|
|
127
|
-
status: z.string(),
|
|
128
|
-
}).catchall(z.any()),
|
|
129
|
-
"additionalProperties",
|
|
130
|
-
);
|
|
131
|
-
|
|
132
|
-
/** @internal */
|
|
133
|
-
export type ErrorT$Outbound = {
|
|
134
|
-
status: string;
|
|
135
|
-
[additionalProperties: string]: unknown;
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
/** @internal */
|
|
139
|
-
export const ErrorT$outboundSchema: z.ZodType<
|
|
140
|
-
ErrorT$Outbound,
|
|
141
|
-
z.ZodTypeDef,
|
|
142
|
-
ErrorT
|
|
143
|
-
> = z.object({
|
|
144
|
-
status: z.string(),
|
|
145
|
-
additionalProperties: z.record(z.any()),
|
|
146
|
-
}).transform((v) => {
|
|
147
|
-
return {
|
|
148
|
-
...v.additionalProperties,
|
|
149
|
-
...remap$(v, {
|
|
150
|
-
additionalProperties: null,
|
|
151
|
-
}),
|
|
152
|
-
};
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* @internal
|
|
157
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
158
|
-
*/
|
|
159
|
-
export namespace ErrorT$ {
|
|
160
|
-
/** @deprecated use `ErrorT$inboundSchema` instead. */
|
|
161
|
-
export const inboundSchema = ErrorT$inboundSchema;
|
|
162
|
-
/** @deprecated use `ErrorT$outboundSchema` instead. */
|
|
163
|
-
export const outboundSchema = ErrorT$outboundSchema;
|
|
164
|
-
/** @deprecated use `ErrorT$Outbound` instead. */
|
|
165
|
-
export type Outbound = ErrorT$Outbound;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
export function errorToJSON(errorT: ErrorT): string {
|
|
169
|
-
return JSON.stringify(ErrorT$outboundSchema.parse(errorT));
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
export function errorFromJSON(
|
|
173
|
-
jsonString: string,
|
|
174
|
-
): SafeParseResult<ErrorT, SDKValidationError> {
|
|
175
|
-
return safeParse(
|
|
176
|
-
jsonString,
|
|
177
|
-
(x) => ErrorT$inboundSchema.parse(JSON.parse(x)),
|
|
178
|
-
`Failed to parse 'ErrorT' from JSON`,
|
|
179
|
-
);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
/** @internal */
|
|
183
|
-
export const Details$inboundSchema: z.ZodType<Details, z.ZodTypeDef, unknown> =
|
|
184
|
-
collectExtraKeys$(
|
|
185
|
-
z.object({
|
|
186
|
-
status: z.string(),
|
|
187
|
-
}).catchall(z.any()),
|
|
188
|
-
"additionalProperties",
|
|
189
|
-
);
|
|
190
|
-
|
|
191
|
-
/** @internal */
|
|
192
|
-
export type Details$Outbound = {
|
|
193
|
-
status: string;
|
|
194
|
-
[additionalProperties: string]: unknown;
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
/** @internal */
|
|
198
|
-
export const Details$outboundSchema: z.ZodType<
|
|
199
|
-
Details$Outbound,
|
|
200
|
-
z.ZodTypeDef,
|
|
201
|
-
Details
|
|
202
|
-
> = z.object({
|
|
203
|
-
status: z.string(),
|
|
204
|
-
additionalProperties: z.record(z.any()),
|
|
205
|
-
}).transform((v) => {
|
|
206
|
-
return {
|
|
207
|
-
...v.additionalProperties,
|
|
208
|
-
...remap$(v, {
|
|
209
|
-
additionalProperties: null,
|
|
210
|
-
}),
|
|
211
|
-
};
|
|
212
|
-
});
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* @internal
|
|
216
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
217
|
-
*/
|
|
218
|
-
export namespace Details$ {
|
|
219
|
-
/** @deprecated use `Details$inboundSchema` instead. */
|
|
220
|
-
export const inboundSchema = Details$inboundSchema;
|
|
221
|
-
/** @deprecated use `Details$outboundSchema` instead. */
|
|
222
|
-
export const outboundSchema = Details$outboundSchema;
|
|
223
|
-
/** @deprecated use `Details$Outbound` instead. */
|
|
224
|
-
export type Outbound = Details$Outbound;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
export function detailsToJSON(details: Details): string {
|
|
228
|
-
return JSON.stringify(Details$outboundSchema.parse(details));
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export function detailsFromJSON(
|
|
232
|
-
jsonString: string,
|
|
233
|
-
): SafeParseResult<Details, SDKValidationError> {
|
|
234
|
-
return safeParse(
|
|
235
|
-
jsonString,
|
|
236
|
-
(x) => Details$inboundSchema.parse(JSON.parse(x)),
|
|
237
|
-
`Failed to parse 'Details' from JSON`,
|
|
238
|
-
);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/** @internal */
|
|
242
|
-
export const HealthControllerHealthCheckResponseBody$inboundSchema: z.ZodType<
|
|
243
|
-
HealthControllerHealthCheckResponseBody,
|
|
244
|
-
z.ZodTypeDef,
|
|
245
|
-
unknown
|
|
246
|
-
> = z.object({
|
|
247
|
-
status: z.string().optional(),
|
|
248
|
-
info: z.nullable(z.record(z.lazy(() => Info$inboundSchema))).optional(),
|
|
249
|
-
error: z.nullable(z.record(z.lazy(() => ErrorT$inboundSchema))).optional(),
|
|
250
|
-
details: z.record(z.lazy(() => Details$inboundSchema)).optional(),
|
|
251
|
-
})
|
|
252
|
-
.transform((v) => {
|
|
253
|
-
return new HealthControllerHealthCheckResponseBody(v);
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
/** @internal */
|
|
257
|
-
export type HealthControllerHealthCheckResponseBody$Outbound = {
|
|
258
|
-
status?: string | undefined;
|
|
259
|
-
info?: { [k: string]: Info$Outbound } | null | undefined;
|
|
260
|
-
error?: { [k: string]: ErrorT$Outbound } | null | undefined;
|
|
261
|
-
details?: { [k: string]: Details$Outbound } | undefined;
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
/** @internal */
|
|
265
|
-
export const HealthControllerHealthCheckResponseBody$outboundSchema: z.ZodType<
|
|
266
|
-
HealthControllerHealthCheckResponseBody$Outbound,
|
|
267
|
-
z.ZodTypeDef,
|
|
268
|
-
HealthControllerHealthCheckResponseBody
|
|
269
|
-
> = z.instanceof(HealthControllerHealthCheckResponseBody)
|
|
270
|
-
.transform(v => v.data$)
|
|
271
|
-
.pipe(z.object({
|
|
272
|
-
status: z.string().optional(),
|
|
273
|
-
info: z.nullable(z.record(z.lazy(() => Info$outboundSchema))).optional(),
|
|
274
|
-
error: z.nullable(z.record(z.lazy(() => ErrorT$outboundSchema))).optional(),
|
|
275
|
-
details: z.record(z.lazy(() => Details$outboundSchema)).optional(),
|
|
276
|
-
}));
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* @internal
|
|
280
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
281
|
-
*/
|
|
282
|
-
export namespace HealthControllerHealthCheckResponseBody$ {
|
|
283
|
-
/** @deprecated use `HealthControllerHealthCheckResponseBody$inboundSchema` instead. */
|
|
284
|
-
export const inboundSchema =
|
|
285
|
-
HealthControllerHealthCheckResponseBody$inboundSchema;
|
|
286
|
-
/** @deprecated use `HealthControllerHealthCheckResponseBody$outboundSchema` instead. */
|
|
287
|
-
export const outboundSchema =
|
|
288
|
-
HealthControllerHealthCheckResponseBody$outboundSchema;
|
|
289
|
-
/** @deprecated use `HealthControllerHealthCheckResponseBody$Outbound` instead. */
|
|
290
|
-
export type Outbound = HealthControllerHealthCheckResponseBody$Outbound;
|
|
291
|
-
}
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
-
import * as components from "../components/index.js";
|
|
10
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
-
|
|
12
|
-
export type HealthControllerGenerateRandomNumberRequest = {
|
|
13
|
-
/**
|
|
14
|
-
* A header for idempotency purposes
|
|
15
|
-
*/
|
|
16
|
-
idempotencyKey?: string | undefined;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export type HealthControllerGenerateRandomNumberResponse = {
|
|
20
|
-
headers: { [k: string]: Array<string> };
|
|
21
|
-
result: components.IdempotenceTestingResponse;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
/** @internal */
|
|
25
|
-
export const HealthControllerGenerateRandomNumberRequest$inboundSchema:
|
|
26
|
-
z.ZodType<
|
|
27
|
-
HealthControllerGenerateRandomNumberRequest,
|
|
28
|
-
z.ZodTypeDef,
|
|
29
|
-
unknown
|
|
30
|
-
> = z.object({
|
|
31
|
-
"idempotency-key": z.string().optional(),
|
|
32
|
-
}).transform((v) => {
|
|
33
|
-
return remap$(v, {
|
|
34
|
-
"idempotency-key": "idempotencyKey",
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
/** @internal */
|
|
39
|
-
export type HealthControllerGenerateRandomNumberRequest$Outbound = {
|
|
40
|
-
"idempotency-key"?: string | undefined;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
/** @internal */
|
|
44
|
-
export const HealthControllerGenerateRandomNumberRequest$outboundSchema:
|
|
45
|
-
z.ZodType<
|
|
46
|
-
HealthControllerGenerateRandomNumberRequest$Outbound,
|
|
47
|
-
z.ZodTypeDef,
|
|
48
|
-
HealthControllerGenerateRandomNumberRequest
|
|
49
|
-
> = z.object({
|
|
50
|
-
idempotencyKey: z.string().optional(),
|
|
51
|
-
}).transform((v) => {
|
|
52
|
-
return remap$(v, {
|
|
53
|
-
idempotencyKey: "idempotency-key",
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* @internal
|
|
59
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
60
|
-
*/
|
|
61
|
-
export namespace HealthControllerGenerateRandomNumberRequest$ {
|
|
62
|
-
/** @deprecated use `HealthControllerGenerateRandomNumberRequest$inboundSchema` instead. */
|
|
63
|
-
export const inboundSchema =
|
|
64
|
-
HealthControllerGenerateRandomNumberRequest$inboundSchema;
|
|
65
|
-
/** @deprecated use `HealthControllerGenerateRandomNumberRequest$outboundSchema` instead. */
|
|
66
|
-
export const outboundSchema =
|
|
67
|
-
HealthControllerGenerateRandomNumberRequest$outboundSchema;
|
|
68
|
-
/** @deprecated use `HealthControllerGenerateRandomNumberRequest$Outbound` instead. */
|
|
69
|
-
export type Outbound = HealthControllerGenerateRandomNumberRequest$Outbound;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export function healthControllerGenerateRandomNumberRequestToJSON(
|
|
73
|
-
healthControllerGenerateRandomNumberRequest:
|
|
74
|
-
HealthControllerGenerateRandomNumberRequest,
|
|
75
|
-
): string {
|
|
76
|
-
return JSON.stringify(
|
|
77
|
-
HealthControllerGenerateRandomNumberRequest$outboundSchema.parse(
|
|
78
|
-
healthControllerGenerateRandomNumberRequest,
|
|
79
|
-
),
|
|
80
|
-
);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export function healthControllerGenerateRandomNumberRequestFromJSON(
|
|
84
|
-
jsonString: string,
|
|
85
|
-
): SafeParseResult<
|
|
86
|
-
HealthControllerGenerateRandomNumberRequest,
|
|
87
|
-
SDKValidationError
|
|
88
|
-
> {
|
|
89
|
-
return safeParse(
|
|
90
|
-
jsonString,
|
|
91
|
-
(x) =>
|
|
92
|
-
HealthControllerGenerateRandomNumberRequest$inboundSchema.parse(
|
|
93
|
-
JSON.parse(x),
|
|
94
|
-
),
|
|
95
|
-
`Failed to parse 'HealthControllerGenerateRandomNumberRequest' from JSON`,
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/** @internal */
|
|
100
|
-
export const HealthControllerGenerateRandomNumberResponse$inboundSchema:
|
|
101
|
-
z.ZodType<
|
|
102
|
-
HealthControllerGenerateRandomNumberResponse,
|
|
103
|
-
z.ZodTypeDef,
|
|
104
|
-
unknown
|
|
105
|
-
> = z.object({
|
|
106
|
-
Headers: z.record(z.array(z.string())),
|
|
107
|
-
Result: components.IdempotenceTestingResponse$inboundSchema,
|
|
108
|
-
}).transform((v) => {
|
|
109
|
-
return remap$(v, {
|
|
110
|
-
"Headers": "headers",
|
|
111
|
-
"Result": "result",
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
/** @internal */
|
|
116
|
-
export type HealthControllerGenerateRandomNumberResponse$Outbound = {
|
|
117
|
-
Headers: { [k: string]: Array<string> };
|
|
118
|
-
Result: components.IdempotenceTestingResponse$Outbound;
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
/** @internal */
|
|
122
|
-
export const HealthControllerGenerateRandomNumberResponse$outboundSchema:
|
|
123
|
-
z.ZodType<
|
|
124
|
-
HealthControllerGenerateRandomNumberResponse$Outbound,
|
|
125
|
-
z.ZodTypeDef,
|
|
126
|
-
HealthControllerGenerateRandomNumberResponse
|
|
127
|
-
> = z.object({
|
|
128
|
-
headers: z.record(z.array(z.string())),
|
|
129
|
-
result: components.IdempotenceTestingResponse$outboundSchema,
|
|
130
|
-
}).transform((v) => {
|
|
131
|
-
return remap$(v, {
|
|
132
|
-
headers: "Headers",
|
|
133
|
-
result: "Result",
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* @internal
|
|
139
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
140
|
-
*/
|
|
141
|
-
export namespace HealthControllerGenerateRandomNumberResponse$ {
|
|
142
|
-
/** @deprecated use `HealthControllerGenerateRandomNumberResponse$inboundSchema` instead. */
|
|
143
|
-
export const inboundSchema =
|
|
144
|
-
HealthControllerGenerateRandomNumberResponse$inboundSchema;
|
|
145
|
-
/** @deprecated use `HealthControllerGenerateRandomNumberResponse$outboundSchema` instead. */
|
|
146
|
-
export const outboundSchema =
|
|
147
|
-
HealthControllerGenerateRandomNumberResponse$outboundSchema;
|
|
148
|
-
/** @deprecated use `HealthControllerGenerateRandomNumberResponse$Outbound` instead. */
|
|
149
|
-
export type Outbound = HealthControllerGenerateRandomNumberResponse$Outbound;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export function healthControllerGenerateRandomNumberResponseToJSON(
|
|
153
|
-
healthControllerGenerateRandomNumberResponse:
|
|
154
|
-
HealthControllerGenerateRandomNumberResponse,
|
|
155
|
-
): string {
|
|
156
|
-
return JSON.stringify(
|
|
157
|
-
HealthControllerGenerateRandomNumberResponse$outboundSchema.parse(
|
|
158
|
-
healthControllerGenerateRandomNumberResponse,
|
|
159
|
-
),
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export function healthControllerGenerateRandomNumberResponseFromJSON(
|
|
164
|
-
jsonString: string,
|
|
165
|
-
): SafeParseResult<
|
|
166
|
-
HealthControllerGenerateRandomNumberResponse,
|
|
167
|
-
SDKValidationError
|
|
168
|
-
> {
|
|
169
|
-
return safeParse(
|
|
170
|
-
jsonString,
|
|
171
|
-
(x) =>
|
|
172
|
-
HealthControllerGenerateRandomNumberResponse$inboundSchema.parse(
|
|
173
|
-
JSON.parse(x),
|
|
174
|
-
),
|
|
175
|
-
`Failed to parse 'HealthControllerGenerateRandomNumberResponse' from JSON`,
|
|
176
|
-
);
|
|
177
|
-
}
|