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