@novu/api 0.0.1 → 0.0.3
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 -0
- package/docs/sdks/admin/README.md +75 -0
- package/funcs/adminGenerateRandomNumber.d.ts +10 -0
- package/funcs/adminGenerateRandomNumber.d.ts.map +1 -0
- package/funcs/adminGenerateRandomNumber.js +126 -0
- package/funcs/adminGenerateRandomNumber.js.map +1 -0
- package/funcs/adminTestIdempotency.d.ts +1 -1
- package/funcs/adminTestIdempotency.d.ts.map +1 -1
- package/funcs/adminTestIdempotency.js +1 -2
- package/funcs/adminTestIdempotency.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/idempotencetestingresponse.d.ts +32 -0
- package/models/components/idempotencetestingresponse.d.ts.map +1 -0
- package/models/components/idempotencetestingresponse.js +59 -0
- package/models/components/idempotencetestingresponse.js.map +1 -0
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/operations/healthcontrollergeneraterandomnumber.d.ts +64 -0
- package/models/operations/healthcontrollergeneraterandomnumber.d.ts.map +1 -0
- package/models/operations/healthcontrollergeneraterandomnumber.js +108 -0
- package/models/operations/healthcontrollergeneraterandomnumber.js.map +1 -0
- package/models/operations/healthcontrollertestidempotency.d.ts +2 -0
- package/models/operations/healthcontrollertestidempotency.d.ts.map +1 -1
- package/models/operations/healthcontrollertestidempotency.js +4 -0
- package/models/operations/healthcontrollertestidempotency.js.map +1 -1
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/admin.d.ts +2 -1
- package/sdk/admin.d.ts.map +1 -1
- package/sdk/admin.js +4 -0
- package/sdk/admin.js.map +1 -1
- package/sources/json-development.json +518 -0
- package/src/funcs/adminGenerateRandomNumber.ts +183 -0
- package/src/funcs/adminTestIdempotency.ts +7 -7
- package/src/lib/config.ts +2 -2
- package/src/models/components/idempotencetestingresponse.ts +69 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/operations/healthcontrollergeneraterandomnumber.ts +177 -0
- package/src/models/operations/healthcontrollertestidempotency.ts +6 -0
- package/src/models/operations/index.ts +1 -0
- package/src/sdk/admin.ts +13 -1
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { NovuCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
22
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
+
import * as operations from "../models/operations/index.js";
|
|
24
|
+
import { Result } from "../types/fp.js";
|
|
25
|
+
|
|
26
|
+
export async function adminGenerateRandomNumber(
|
|
27
|
+
client: NovuCore,
|
|
28
|
+
idempotencyKey?: string | undefined,
|
|
29
|
+
options?: RequestOptions,
|
|
30
|
+
): Promise<
|
|
31
|
+
Result<
|
|
32
|
+
operations.HealthControllerGenerateRandomNumberResponse,
|
|
33
|
+
| errors.ErrorDto
|
|
34
|
+
| errors.ErrorDto
|
|
35
|
+
| errors.ValidationErrorDto
|
|
36
|
+
| errors.ErrorDto
|
|
37
|
+
| SDKError
|
|
38
|
+
| SDKValidationError
|
|
39
|
+
| UnexpectedClientError
|
|
40
|
+
| InvalidRequestError
|
|
41
|
+
| RequestAbortedError
|
|
42
|
+
| RequestTimeoutError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
>
|
|
45
|
+
> {
|
|
46
|
+
const input: operations.HealthControllerGenerateRandomNumberRequest = {
|
|
47
|
+
idempotencyKey: idempotencyKey,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const parsed = safeParse(
|
|
51
|
+
input,
|
|
52
|
+
(value) =>
|
|
53
|
+
operations.HealthControllerGenerateRandomNumberRequest$outboundSchema
|
|
54
|
+
.parse(value),
|
|
55
|
+
"Input validation failed",
|
|
56
|
+
);
|
|
57
|
+
if (!parsed.ok) {
|
|
58
|
+
return parsed;
|
|
59
|
+
}
|
|
60
|
+
const payload = parsed.value;
|
|
61
|
+
const body = null;
|
|
62
|
+
|
|
63
|
+
const path = pathToFunc("/v1/health-check/test-idempotency")();
|
|
64
|
+
|
|
65
|
+
const headers = new Headers(compactMap({
|
|
66
|
+
Accept: "application/json",
|
|
67
|
+
"idempotency-key": encodeSimple(
|
|
68
|
+
"idempotency-key",
|
|
69
|
+
payload["idempotency-key"],
|
|
70
|
+
{ explode: false, charEncoding: "none" },
|
|
71
|
+
),
|
|
72
|
+
}));
|
|
73
|
+
|
|
74
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
75
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
76
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
77
|
+
|
|
78
|
+
const context = {
|
|
79
|
+
operationID: "HealthController_generateRandomNumber",
|
|
80
|
+
oAuth2Scopes: [],
|
|
81
|
+
|
|
82
|
+
resolvedSecurity: requestSecurity,
|
|
83
|
+
|
|
84
|
+
securitySource: client._options.apiKey,
|
|
85
|
+
retryConfig: options?.retries
|
|
86
|
+
|| client._options.retryConfig
|
|
87
|
+
|| {
|
|
88
|
+
strategy: "backoff",
|
|
89
|
+
backoff: {
|
|
90
|
+
initialInterval: 1000,
|
|
91
|
+
maxInterval: 30000,
|
|
92
|
+
exponent: 1.5,
|
|
93
|
+
maxElapsedTime: 3600000,
|
|
94
|
+
},
|
|
95
|
+
retryConnectionErrors: true,
|
|
96
|
+
}
|
|
97
|
+
|| { strategy: "none" },
|
|
98
|
+
retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"],
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
const requestRes = client._createRequest(context, {
|
|
102
|
+
security: requestSecurity,
|
|
103
|
+
method: "GET",
|
|
104
|
+
baseURL: options?.serverURL,
|
|
105
|
+
path: path,
|
|
106
|
+
headers: headers,
|
|
107
|
+
body: body,
|
|
108
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
109
|
+
}, options);
|
|
110
|
+
if (!requestRes.ok) {
|
|
111
|
+
return requestRes;
|
|
112
|
+
}
|
|
113
|
+
const req = requestRes.value;
|
|
114
|
+
|
|
115
|
+
const doResult = await client._do(req, {
|
|
116
|
+
context,
|
|
117
|
+
errorCodes: [
|
|
118
|
+
"400",
|
|
119
|
+
"401",
|
|
120
|
+
"403",
|
|
121
|
+
"404",
|
|
122
|
+
"405",
|
|
123
|
+
"409",
|
|
124
|
+
"413",
|
|
125
|
+
"414",
|
|
126
|
+
"415",
|
|
127
|
+
"422",
|
|
128
|
+
"429",
|
|
129
|
+
"4XX",
|
|
130
|
+
"500",
|
|
131
|
+
"503",
|
|
132
|
+
"5XX",
|
|
133
|
+
],
|
|
134
|
+
retryConfig: context.retryConfig,
|
|
135
|
+
retryCodes: context.retryCodes,
|
|
136
|
+
});
|
|
137
|
+
if (!doResult.ok) {
|
|
138
|
+
return doResult;
|
|
139
|
+
}
|
|
140
|
+
const response = doResult.value;
|
|
141
|
+
|
|
142
|
+
const responseFields = {
|
|
143
|
+
HttpMeta: { Response: response, Request: req },
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const [result] = await M.match<
|
|
147
|
+
operations.HealthControllerGenerateRandomNumberResponse,
|
|
148
|
+
| errors.ErrorDto
|
|
149
|
+
| errors.ErrorDto
|
|
150
|
+
| errors.ValidationErrorDto
|
|
151
|
+
| errors.ErrorDto
|
|
152
|
+
| SDKError
|
|
153
|
+
| SDKValidationError
|
|
154
|
+
| UnexpectedClientError
|
|
155
|
+
| InvalidRequestError
|
|
156
|
+
| RequestAbortedError
|
|
157
|
+
| RequestTimeoutError
|
|
158
|
+
| ConnectionError
|
|
159
|
+
>(
|
|
160
|
+
M.json(
|
|
161
|
+
201,
|
|
162
|
+
operations.HealthControllerGenerateRandomNumberResponse$inboundSchema,
|
|
163
|
+
{ hdrs: true, key: "Result" },
|
|
164
|
+
),
|
|
165
|
+
M.jsonErr(
|
|
166
|
+
[400, 401, 403, 404, 405, 409, 413, 415],
|
|
167
|
+
errors.ErrorDto$inboundSchema,
|
|
168
|
+
{ hdrs: true },
|
|
169
|
+
),
|
|
170
|
+
M.jsonErr(414, errors.ErrorDto$inboundSchema),
|
|
171
|
+
M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
|
|
172
|
+
M.fail(429),
|
|
173
|
+
M.jsonErr(500, errors.ErrorDto$inboundSchema, { hdrs: true }),
|
|
174
|
+
M.fail(503),
|
|
175
|
+
M.fail("4XX"),
|
|
176
|
+
M.fail("5XX"),
|
|
177
|
+
)(response, { extraFields: responseFields });
|
|
178
|
+
if (!result.ok) {
|
|
179
|
+
return result;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return result;
|
|
183
|
+
}
|
|
@@ -31,7 +31,7 @@ export async function adminTestIdempotency(
|
|
|
31
31
|
options?: RequestOptions,
|
|
32
32
|
): Promise<
|
|
33
33
|
Result<
|
|
34
|
-
operations.HealthControllerTestIdempotencyResponse
|
|
34
|
+
operations.HealthControllerTestIdempotencyResponse,
|
|
35
35
|
| errors.ErrorDto
|
|
36
36
|
| errors.ErrorDto
|
|
37
37
|
| errors.ValidationErrorDto
|
|
@@ -151,7 +151,7 @@ export async function adminTestIdempotency(
|
|
|
151
151
|
};
|
|
152
152
|
|
|
153
153
|
const [result] = await M.match<
|
|
154
|
-
operations.HealthControllerTestIdempotencyResponse
|
|
154
|
+
operations.HealthControllerTestIdempotencyResponse,
|
|
155
155
|
| errors.ErrorDto
|
|
156
156
|
| errors.ErrorDto
|
|
157
157
|
| errors.ValidationErrorDto
|
|
@@ -164,6 +164,11 @@ export async function adminTestIdempotency(
|
|
|
164
164
|
| RequestTimeoutError
|
|
165
165
|
| ConnectionError
|
|
166
166
|
>(
|
|
167
|
+
M.json(
|
|
168
|
+
201,
|
|
169
|
+
operations.HealthControllerTestIdempotencyResponse$inboundSchema,
|
|
170
|
+
{ hdrs: true, key: "Result" },
|
|
171
|
+
),
|
|
167
172
|
M.jsonErr(
|
|
168
173
|
[400, 401, 403, 404, 405, 409, 413, 415],
|
|
169
174
|
errors.ErrorDto$inboundSchema,
|
|
@@ -174,11 +179,6 @@ export async function adminTestIdempotency(
|
|
|
174
179
|
M.fail(429),
|
|
175
180
|
M.jsonErr(500, errors.ErrorDto$inboundSchema, { hdrs: true }),
|
|
176
181
|
M.fail(503),
|
|
177
|
-
M.nil(
|
|
178
|
-
"2XX",
|
|
179
|
-
operations.HealthControllerTestIdempotencyResponse$inboundSchema
|
|
180
|
-
.optional(),
|
|
181
|
-
),
|
|
182
182
|
M.fail("4XX"),
|
|
183
183
|
M.fail("5XX"),
|
|
184
184
|
)(response, { extraFields: responseFields });
|
package/src/lib/config.ts
CHANGED
|
@@ -55,7 +55,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
55
55
|
export const SDK_METADATA = {
|
|
56
56
|
language: "typescript",
|
|
57
57
|
openapiDocVersion: "1.0",
|
|
58
|
-
sdkVersion: "0.0.
|
|
58
|
+
sdkVersion: "0.0.3",
|
|
59
59
|
genVersion: "2.493.21",
|
|
60
|
-
userAgent: "speakeasy-sdk/typescript 0.0.
|
|
60
|
+
userAgent: "speakeasy-sdk/typescript 0.0.3 2.493.21 1.0 @novu/api",
|
|
61
61
|
} as const;
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
}
|
|
@@ -55,6 +55,7 @@ export * from "./fieldfilterpartdto.js";
|
|
|
55
55
|
export * from "./filtertopicsresponsedto.js";
|
|
56
56
|
export * from "./getsubscriberpreferencesresponsedto.js";
|
|
57
57
|
export * from "./gettopicresponsedto.js";
|
|
58
|
+
export * from "./idempotencetestingresponse.js";
|
|
58
59
|
export * from "./idempotencybehaviorenum.js";
|
|
59
60
|
export * from "./idempotencytestingdto.js";
|
|
60
61
|
export * from "./integrationresponsedto.js";
|
|
@@ -0,0 +1,177 @@
|
|
|
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
|
+
}
|
|
@@ -19,6 +19,7 @@ export type HealthControllerTestIdempotencyRequest = {
|
|
|
19
19
|
|
|
20
20
|
export type HealthControllerTestIdempotencyResponse = {
|
|
21
21
|
headers: { [k: string]: Array<string> };
|
|
22
|
+
result: components.IdempotenceTestingResponse;
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
/** @internal */
|
|
@@ -101,15 +102,18 @@ export const HealthControllerTestIdempotencyResponse$inboundSchema: z.ZodType<
|
|
|
101
102
|
unknown
|
|
102
103
|
> = z.object({
|
|
103
104
|
Headers: z.record(z.array(z.string())),
|
|
105
|
+
Result: components.IdempotenceTestingResponse$inboundSchema,
|
|
104
106
|
}).transform((v) => {
|
|
105
107
|
return remap$(v, {
|
|
106
108
|
"Headers": "headers",
|
|
109
|
+
"Result": "result",
|
|
107
110
|
});
|
|
108
111
|
});
|
|
109
112
|
|
|
110
113
|
/** @internal */
|
|
111
114
|
export type HealthControllerTestIdempotencyResponse$Outbound = {
|
|
112
115
|
Headers: { [k: string]: Array<string> };
|
|
116
|
+
Result: components.IdempotenceTestingResponse$Outbound;
|
|
113
117
|
};
|
|
114
118
|
|
|
115
119
|
/** @internal */
|
|
@@ -119,9 +123,11 @@ export const HealthControllerTestIdempotencyResponse$outboundSchema: z.ZodType<
|
|
|
119
123
|
HealthControllerTestIdempotencyResponse
|
|
120
124
|
> = z.object({
|
|
121
125
|
headers: z.record(z.array(z.string())),
|
|
126
|
+
result: components.IdempotenceTestingResponse$outboundSchema,
|
|
122
127
|
}).transform((v) => {
|
|
123
128
|
return remap$(v, {
|
|
124
129
|
headers: "Headers",
|
|
130
|
+
result: "Result",
|
|
125
131
|
});
|
|
126
132
|
});
|
|
127
133
|
|
|
@@ -6,6 +6,7 @@ export * from "./eventscontrollerbroadcasteventtoall.js";
|
|
|
6
6
|
export * from "./eventscontrollercancel.js";
|
|
7
7
|
export * from "./eventscontrollertrigger.js";
|
|
8
8
|
export * from "./eventscontrollertriggerbulk.js";
|
|
9
|
+
export * from "./healthcontrollergeneraterandomnumber.js";
|
|
9
10
|
export * from "./healthcontrollerhealthcheck.js";
|
|
10
11
|
export * from "./healthcontrollertestidempotency.js";
|
|
11
12
|
export * from "./integrationscontrollercreateintegration.js";
|
package/src/sdk/admin.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { adminGenerateRandomNumber } from "../funcs/adminGenerateRandomNumber.js";
|
|
5
6
|
import { adminHealthControllerHealthCheck } from "../funcs/adminHealthControllerHealthCheck.js";
|
|
6
7
|
import { adminTestIdempotency } from "../funcs/adminTestIdempotency.js";
|
|
7
8
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
@@ -25,7 +26,7 @@ export class Admin extends ClientSDK {
|
|
|
25
26
|
idempotencyTestingDto: components.IdempotencyTestingDto,
|
|
26
27
|
idempotencyKey?: string | undefined,
|
|
27
28
|
options?: RequestOptions,
|
|
28
|
-
): Promise<operations.HealthControllerTestIdempotencyResponse
|
|
29
|
+
): Promise<operations.HealthControllerTestIdempotencyResponse> {
|
|
29
30
|
return unwrapAsync(adminTestIdempotency(
|
|
30
31
|
this,
|
|
31
32
|
idempotencyTestingDto,
|
|
@@ -33,4 +34,15 @@ export class Admin extends ClientSDK {
|
|
|
33
34
|
options,
|
|
34
35
|
));
|
|
35
36
|
}
|
|
37
|
+
|
|
38
|
+
async generateRandomNumber(
|
|
39
|
+
idempotencyKey?: string | undefined,
|
|
40
|
+
options?: RequestOptions,
|
|
41
|
+
): Promise<operations.HealthControllerGenerateRandomNumberResponse> {
|
|
42
|
+
return unwrapAsync(adminGenerateRandomNumber(
|
|
43
|
+
this,
|
|
44
|
+
idempotencyKey,
|
|
45
|
+
options,
|
|
46
|
+
));
|
|
47
|
+
}
|
|
36
48
|
}
|