@gr4vy/sdk 2.3.14 → 2.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/README.md +14 -1
  2. package/funcs/apiKeyPairsCreate.d.ts +18 -0
  3. package/funcs/apiKeyPairsCreate.d.ts.map +1 -0
  4. package/funcs/apiKeyPairsCreate.js +119 -0
  5. package/funcs/apiKeyPairsCreate.js.map +1 -0
  6. package/funcs/apiKeyPairsDelete.d.ts +17 -0
  7. package/funcs/apiKeyPairsDelete.d.ts.map +1 -0
  8. package/funcs/apiKeyPairsDelete.js +128 -0
  9. package/funcs/apiKeyPairsDelete.js.map +1 -0
  10. package/funcs/apiKeyPairsGet.d.ts +18 -0
  11. package/funcs/apiKeyPairsGet.d.ts.map +1 -0
  12. package/funcs/apiKeyPairsGet.js +138 -0
  13. package/funcs/apiKeyPairsGet.js.map +1 -0
  14. package/funcs/apiKeyPairsList.d.ts +21 -0
  15. package/funcs/apiKeyPairsList.d.ts.map +1 -0
  16. package/funcs/apiKeyPairsList.js +160 -0
  17. package/funcs/apiKeyPairsList.js.map +1 -0
  18. package/funcs/apiKeyPairsUpdate.d.ts +18 -0
  19. package/funcs/apiKeyPairsUpdate.d.ts.map +1 -0
  20. package/funcs/apiKeyPairsUpdate.js +130 -0
  21. package/funcs/apiKeyPairsUpdate.js.map +1 -0
  22. package/jsr.json +1 -1
  23. package/lib/config.d.ts +3 -3
  24. package/lib/config.js +3 -3
  25. package/models/components/apicommonschemascreator.d.ts +12 -0
  26. package/models/components/apicommonschemascreator.d.ts.map +1 -0
  27. package/models/components/{creator.js → apicommonschemascreator.js} +6 -6
  28. package/models/components/apicommonschemascreator.js.map +1 -0
  29. package/models/components/apikeypair.d.ts +58 -0
  30. package/models/components/apikeypair.d.ts.map +1 -0
  31. package/models/components/apikeypair.js +75 -0
  32. package/models/components/apikeypair.js.map +1 -0
  33. package/models/components/apikeypaircreate.d.ts +38 -0
  34. package/models/components/apikeypaircreate.d.ts.map +1 -0
  35. package/models/components/apikeypaircreate.js +63 -0
  36. package/models/components/apikeypaircreate.js.map +1 -0
  37. package/models/components/apikeypairupdate.d.ts +27 -0
  38. package/models/components/apikeypairupdate.d.ts.map +1 -0
  39. package/models/components/apikeypairupdate.js +59 -0
  40. package/models/components/apikeypairupdate.js.map +1 -0
  41. package/models/components/apiroutersapikeypairsschemascreator.d.ts +25 -0
  42. package/models/components/apiroutersapikeypairsschemascreator.d.ts.map +1 -0
  43. package/models/components/apiroutersapikeypairsschemascreator.js +58 -0
  44. package/models/components/apiroutersapikeypairsschemascreator.js.map +1 -0
  45. package/models/components/certificatealgorithm.d.ts +12 -0
  46. package/models/components/certificatealgorithm.d.ts.map +1 -0
  47. package/models/components/certificatealgorithm.js +49 -0
  48. package/models/components/certificatealgorithm.js.map +1 -0
  49. package/models/components/collectionapikeypair.d.ts +26 -0
  50. package/models/components/collectionapikeypair.d.ts.map +1 -0
  51. package/models/components/collectionapikeypair.js +60 -0
  52. package/models/components/collectionapikeypair.js.map +1 -0
  53. package/models/components/giftcardserviceprovider.d.ts +1 -0
  54. package/models/components/giftcardserviceprovider.d.ts.map +1 -1
  55. package/models/components/giftcardserviceprovider.js +1 -0
  56. package/models/components/giftcardserviceprovider.js.map +1 -1
  57. package/models/components/index.d.ts +10 -1
  58. package/models/components/index.d.ts.map +1 -1
  59. package/models/components/index.js +10 -1
  60. package/models/components/index.js.map +1 -1
  61. package/models/components/merchantaccountsummary.d.ts +16 -0
  62. package/models/components/merchantaccountsummary.d.ts.map +1 -0
  63. package/models/components/merchantaccountsummary.js +65 -0
  64. package/models/components/merchantaccountsummary.js.map +1 -0
  65. package/models/components/permissionset.d.ts +10 -0
  66. package/models/components/permissionset.d.ts.map +1 -0
  67. package/models/components/permissionset.js +50 -0
  68. package/models/components/permissionset.js.map +1 -0
  69. package/models/components/refund.d.ts +2 -2
  70. package/models/components/refund.d.ts.map +1 -1
  71. package/models/components/refund.js +2 -2
  72. package/models/components/refund.js.map +1 -1
  73. package/models/components/role.d.ts +15 -0
  74. package/models/components/role.d.ts.map +1 -0
  75. package/models/components/role.js +56 -0
  76. package/models/components/role.js.map +1 -0
  77. package/models/operations/deleteapikeypair.d.ts +15 -0
  78. package/models/operations/deleteapikeypair.d.ts.map +1 -0
  79. package/models/operations/deleteapikeypair.js +54 -0
  80. package/models/operations/deleteapikeypair.js.map +1 -0
  81. package/models/operations/getapikeypair.d.ts +15 -0
  82. package/models/operations/getapikeypair.d.ts.map +1 -0
  83. package/models/operations/getapikeypair.js +54 -0
  84. package/models/operations/getapikeypair.js.map +1 -0
  85. package/models/operations/index.d.ts +4 -0
  86. package/models/operations/index.d.ts.map +1 -1
  87. package/models/operations/index.js +4 -0
  88. package/models/operations/index.js.map +1 -1
  89. package/models/operations/listapikeypairs.d.ts +29 -0
  90. package/models/operations/listapikeypairs.d.ts.map +1 -0
  91. package/models/operations/listapikeypairs.js +65 -0
  92. package/models/operations/listapikeypairs.js.map +1 -0
  93. package/models/operations/updateapikeypair.d.ts +18 -0
  94. package/models/operations/updateapikeypair.d.ts.map +1 -0
  95. package/models/operations/updateapikeypair.js +57 -0
  96. package/models/operations/updateapikeypair.js.map +1 -0
  97. package/package.json +1 -1
  98. package/sdk/apikeypairs.d.ts +44 -0
  99. package/sdk/apikeypairs.d.ts.map +1 -0
  100. package/sdk/apikeypairs.js +63 -0
  101. package/sdk/apikeypairs.js.map +1 -0
  102. package/sdk/sdk.d.ts +3 -0
  103. package/sdk/sdk.d.ts.map +1 -1
  104. package/sdk/sdk.js +4 -0
  105. package/sdk/sdk.js.map +1 -1
  106. package/src/funcs/apiKeyPairsCreate.ts +215 -0
  107. package/src/funcs/apiKeyPairsDelete.ts +225 -0
  108. package/src/funcs/apiKeyPairsGet.ts +235 -0
  109. package/src/funcs/apiKeyPairsList.ts +312 -0
  110. package/src/funcs/apiKeyPairsUpdate.ts +230 -0
  111. package/src/lib/config.ts +3 -3
  112. package/src/models/components/apicommonschemascreator.ts +40 -0
  113. package/src/models/components/apikeypair.ts +109 -0
  114. package/src/models/components/apikeypaircreate.ts +73 -0
  115. package/src/models/components/apikeypairupdate.ts +56 -0
  116. package/src/models/components/apiroutersapikeypairsschemascreator.ts +55 -0
  117. package/src/models/components/certificatealgorithm.ts +26 -0
  118. package/src/models/components/collectionapikeypair.ts +56 -0
  119. package/src/models/components/giftcardserviceprovider.ts +1 -0
  120. package/src/models/components/index.ts +10 -1
  121. package/src/models/components/merchantaccountsummary.ts +52 -0
  122. package/src/models/components/permissionset.ts +31 -0
  123. package/src/models/components/refund.ts +6 -3
  124. package/src/models/components/role.ts +37 -0
  125. package/src/models/operations/deleteapikeypair.ts +39 -0
  126. package/src/models/operations/getapikeypair.ts +39 -0
  127. package/src/models/operations/index.ts +4 -0
  128. package/src/models/operations/listapikeypairs.ts +72 -0
  129. package/src/models/operations/updateapikeypair.ts +44 -0
  130. package/src/sdk/apikeypairs.ts +107 -0
  131. package/src/sdk/sdk.ts +6 -0
  132. package/models/components/creator.d.ts +0 -12
  133. package/models/components/creator.d.ts.map +0 -1
  134. package/models/components/creator.js.map +0 -1
  135. package/src/models/components/creator.ts +0 -37
@@ -0,0 +1,225 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { Gr4vyCore } from "../core.js";
7
+ import { encodeSimple } from "../lib/encodings.js";
8
+ import { matchStatusCode } from "../lib/http.js";
9
+ import * as M from "../lib/matchers.js";
10
+ import { compactMap } from "../lib/primitives.js";
11
+ import { safeParse } from "../lib/schemas.js";
12
+ import { RequestOptions } from "../lib/sdks.js";
13
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
14
+ import { pathToFunc } from "../lib/url.js";
15
+ import { Gr4vyError } from "../models/errors/gr4vyerror.js";
16
+ import {
17
+ ConnectionError,
18
+ InvalidRequestError,
19
+ RequestAbortedError,
20
+ RequestTimeoutError,
21
+ UnexpectedClientError,
22
+ } from "../models/errors/httpclienterrors.js";
23
+ import * as errors from "../models/errors/index.js";
24
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
25
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
26
+ import * as operations from "../models/operations/index.js";
27
+ import { APICall, APIPromise } from "../types/async.js";
28
+ import { Result } from "../types/fp.js";
29
+
30
+ /**
31
+ * Delete an API key pair
32
+ *
33
+ * @remarks
34
+ * Permanently removes an API key pair.
35
+ */
36
+ export function apiKeyPairsDelete(
37
+ client: Gr4vyCore,
38
+ apiKeyPairId: string,
39
+ options?: RequestOptions,
40
+ ): APIPromise<
41
+ Result<
42
+ void,
43
+ | errors.Error400
44
+ | errors.Error401
45
+ | errors.Error403
46
+ | errors.Error404
47
+ | errors.Error405
48
+ | errors.Error409
49
+ | errors.HTTPValidationError
50
+ | errors.Error425
51
+ | errors.Error429
52
+ | errors.Error500
53
+ | errors.Error502
54
+ | errors.Error504
55
+ | Gr4vyError
56
+ | ResponseValidationError
57
+ | ConnectionError
58
+ | RequestAbortedError
59
+ | RequestTimeoutError
60
+ | InvalidRequestError
61
+ | UnexpectedClientError
62
+ | SDKValidationError
63
+ >
64
+ > {
65
+ return new APIPromise($do(
66
+ client,
67
+ apiKeyPairId,
68
+ options,
69
+ ));
70
+ }
71
+
72
+ async function $do(
73
+ client: Gr4vyCore,
74
+ apiKeyPairId: string,
75
+ options?: RequestOptions,
76
+ ): Promise<
77
+ [
78
+ Result<
79
+ void,
80
+ | errors.Error400
81
+ | errors.Error401
82
+ | errors.Error403
83
+ | errors.Error404
84
+ | errors.Error405
85
+ | errors.Error409
86
+ | errors.HTTPValidationError
87
+ | errors.Error425
88
+ | errors.Error429
89
+ | errors.Error500
90
+ | errors.Error502
91
+ | errors.Error504
92
+ | Gr4vyError
93
+ | ResponseValidationError
94
+ | ConnectionError
95
+ | RequestAbortedError
96
+ | RequestTimeoutError
97
+ | InvalidRequestError
98
+ | UnexpectedClientError
99
+ | SDKValidationError
100
+ >,
101
+ APICall,
102
+ ]
103
+ > {
104
+ const input: operations.DeleteApiKeyPairRequest = {
105
+ apiKeyPairId: apiKeyPairId,
106
+ };
107
+
108
+ const parsed = safeParse(
109
+ input,
110
+ (value) => operations.DeleteApiKeyPairRequest$outboundSchema.parse(value),
111
+ "Input validation failed",
112
+ );
113
+ if (!parsed.ok) {
114
+ return [parsed, { status: "invalid" }];
115
+ }
116
+ const payload = parsed.value;
117
+ const body = null;
118
+
119
+ const pathParams = {
120
+ api_key_pair_id: encodeSimple("api_key_pair_id", payload.api_key_pair_id, {
121
+ explode: false,
122
+ charEncoding: "percent",
123
+ }),
124
+ };
125
+ const path = pathToFunc("/api-key-pairs/{api_key_pair_id}")(pathParams);
126
+
127
+ const headers = new Headers(compactMap({
128
+ Accept: "application/json",
129
+ }));
130
+
131
+ const secConfig = await extractSecurity(client._options.bearerAuth);
132
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
133
+ const requestSecurity = resolveGlobalSecurity(securityInput);
134
+
135
+ const context = {
136
+ options: client._options,
137
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
138
+ operationID: "delete_api_key_pair",
139
+ oAuth2Scopes: null,
140
+
141
+ resolvedSecurity: requestSecurity,
142
+
143
+ securitySource: client._options.bearerAuth,
144
+ retryConfig: options?.retries
145
+ || client._options.retryConfig
146
+ || { strategy: "none" },
147
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
148
+ };
149
+
150
+ const requestRes = client._createRequest(context, {
151
+ security: requestSecurity,
152
+ method: "DELETE",
153
+ baseURL: options?.serverURL,
154
+ path: path,
155
+ headers: headers,
156
+ body: body,
157
+ userAgent: client._options.userAgent,
158
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
159
+ }, options);
160
+ if (!requestRes.ok) {
161
+ return [requestRes, { status: "invalid" }];
162
+ }
163
+ const req = requestRes.value;
164
+
165
+ const doResult = await client._do(req, {
166
+ context,
167
+ isErrorStatusCode: (statusCode: number) =>
168
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
169
+ retryConfig: context.retryConfig,
170
+ retryCodes: context.retryCodes,
171
+ });
172
+ if (!doResult.ok) {
173
+ return [doResult, { status: "request-error", request: req }];
174
+ }
175
+ const response = doResult.value;
176
+
177
+ const responseFields = {
178
+ HttpMeta: { Response: response, Request: req },
179
+ };
180
+
181
+ const [result] = await M.match<
182
+ void,
183
+ | errors.Error400
184
+ | errors.Error401
185
+ | errors.Error403
186
+ | errors.Error404
187
+ | errors.Error405
188
+ | errors.Error409
189
+ | errors.HTTPValidationError
190
+ | errors.Error425
191
+ | errors.Error429
192
+ | errors.Error500
193
+ | errors.Error502
194
+ | errors.Error504
195
+ | Gr4vyError
196
+ | ResponseValidationError
197
+ | ConnectionError
198
+ | RequestAbortedError
199
+ | RequestTimeoutError
200
+ | InvalidRequestError
201
+ | UnexpectedClientError
202
+ | SDKValidationError
203
+ >(
204
+ M.nil(204, z.void()),
205
+ M.jsonErr(400, errors.Error400$inboundSchema),
206
+ M.jsonErr(401, errors.Error401$inboundSchema),
207
+ M.jsonErr(403, errors.Error403$inboundSchema),
208
+ M.jsonErr(404, errors.Error404$inboundSchema),
209
+ M.jsonErr(405, errors.Error405$inboundSchema),
210
+ M.jsonErr(409, errors.Error409$inboundSchema),
211
+ M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
212
+ M.jsonErr(425, errors.Error425$inboundSchema),
213
+ M.jsonErr(429, errors.Error429$inboundSchema),
214
+ M.jsonErr(500, errors.Error500$inboundSchema),
215
+ M.jsonErr(502, errors.Error502$inboundSchema),
216
+ M.jsonErr(504, errors.Error504$inboundSchema),
217
+ M.fail("4XX"),
218
+ M.fail("5XX"),
219
+ )(response, req, { extraFields: responseFields });
220
+ if (!result.ok) {
221
+ return [result, { status: "complete", request: req, response }];
222
+ }
223
+
224
+ return [result, { status: "complete", request: req, response }];
225
+ }
@@ -0,0 +1,235 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { Gr4vyCore } from "../core.js";
6
+ import { encodeSimple } from "../lib/encodings.js";
7
+ import { matchStatusCode } from "../lib/http.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import * as components from "../models/components/index.js";
15
+ import { Gr4vyError } from "../models/errors/gr4vyerror.js";
16
+ import {
17
+ ConnectionError,
18
+ InvalidRequestError,
19
+ RequestAbortedError,
20
+ RequestTimeoutError,
21
+ UnexpectedClientError,
22
+ } from "../models/errors/httpclienterrors.js";
23
+ import * as errors from "../models/errors/index.js";
24
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
25
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
26
+ import * as operations from "../models/operations/index.js";
27
+ import { APICall, APIPromise } from "../types/async.js";
28
+ import { Result } from "../types/fp.js";
29
+
30
+ /**
31
+ * Get an API key pair
32
+ *
33
+ * @remarks
34
+ * Fetches an API key pair by its ID.
35
+ */
36
+ export function apiKeyPairsGet(
37
+ client: Gr4vyCore,
38
+ apiKeyPairId: string,
39
+ options?: RequestOptions,
40
+ ): APIPromise<
41
+ Result<
42
+ components.APIKeyPair,
43
+ | errors.Error400
44
+ | errors.Error401
45
+ | errors.Error403
46
+ | errors.Error404
47
+ | errors.Error405
48
+ | errors.Error409
49
+ | errors.HTTPValidationError
50
+ | errors.Error425
51
+ | errors.Error429
52
+ | errors.Error500
53
+ | errors.Error502
54
+ | errors.Error504
55
+ | Gr4vyError
56
+ | ResponseValidationError
57
+ | ConnectionError
58
+ | RequestAbortedError
59
+ | RequestTimeoutError
60
+ | InvalidRequestError
61
+ | UnexpectedClientError
62
+ | SDKValidationError
63
+ >
64
+ > {
65
+ return new APIPromise($do(
66
+ client,
67
+ apiKeyPairId,
68
+ options,
69
+ ));
70
+ }
71
+
72
+ async function $do(
73
+ client: Gr4vyCore,
74
+ apiKeyPairId: string,
75
+ options?: RequestOptions,
76
+ ): Promise<
77
+ [
78
+ Result<
79
+ components.APIKeyPair,
80
+ | errors.Error400
81
+ | errors.Error401
82
+ | errors.Error403
83
+ | errors.Error404
84
+ | errors.Error405
85
+ | errors.Error409
86
+ | errors.HTTPValidationError
87
+ | errors.Error425
88
+ | errors.Error429
89
+ | errors.Error500
90
+ | errors.Error502
91
+ | errors.Error504
92
+ | Gr4vyError
93
+ | ResponseValidationError
94
+ | ConnectionError
95
+ | RequestAbortedError
96
+ | RequestTimeoutError
97
+ | InvalidRequestError
98
+ | UnexpectedClientError
99
+ | SDKValidationError
100
+ >,
101
+ APICall,
102
+ ]
103
+ > {
104
+ const input: operations.GetApiKeyPairRequest = {
105
+ apiKeyPairId: apiKeyPairId,
106
+ };
107
+
108
+ const parsed = safeParse(
109
+ input,
110
+ (value) => operations.GetApiKeyPairRequest$outboundSchema.parse(value),
111
+ "Input validation failed",
112
+ );
113
+ if (!parsed.ok) {
114
+ return [parsed, { status: "invalid" }];
115
+ }
116
+ const payload = parsed.value;
117
+ const body = null;
118
+
119
+ const pathParams = {
120
+ api_key_pair_id: encodeSimple("api_key_pair_id", payload.api_key_pair_id, {
121
+ explode: false,
122
+ charEncoding: "percent",
123
+ }),
124
+ };
125
+ const path = pathToFunc("/api-key-pairs/{api_key_pair_id}")(pathParams);
126
+
127
+ const headers = new Headers(compactMap({
128
+ Accept: "application/json",
129
+ }));
130
+
131
+ const secConfig = await extractSecurity(client._options.bearerAuth);
132
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
133
+ const requestSecurity = resolveGlobalSecurity(securityInput);
134
+
135
+ const context = {
136
+ options: client._options,
137
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
138
+ operationID: "get_api_key_pair",
139
+ oAuth2Scopes: null,
140
+
141
+ resolvedSecurity: requestSecurity,
142
+
143
+ securitySource: client._options.bearerAuth,
144
+ retryConfig: options?.retries
145
+ || client._options.retryConfig
146
+ || {
147
+ strategy: "backoff",
148
+ backoff: {
149
+ initialInterval: 200,
150
+ maxInterval: 200,
151
+ exponent: 1,
152
+ maxElapsedTime: 1000,
153
+ },
154
+ retryConnectionErrors: true,
155
+ }
156
+ || { strategy: "none" },
157
+ retryCodes: options?.retryCodes || ["5XX"],
158
+ };
159
+
160
+ const requestRes = client._createRequest(context, {
161
+ security: requestSecurity,
162
+ method: "GET",
163
+ baseURL: options?.serverURL,
164
+ path: path,
165
+ headers: headers,
166
+ body: body,
167
+ userAgent: client._options.userAgent,
168
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
169
+ }, options);
170
+ if (!requestRes.ok) {
171
+ return [requestRes, { status: "invalid" }];
172
+ }
173
+ const req = requestRes.value;
174
+
175
+ const doResult = await client._do(req, {
176
+ context,
177
+ isErrorStatusCode: (statusCode: number) =>
178
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
179
+ retryConfig: context.retryConfig,
180
+ retryCodes: context.retryCodes,
181
+ });
182
+ if (!doResult.ok) {
183
+ return [doResult, { status: "request-error", request: req }];
184
+ }
185
+ const response = doResult.value;
186
+
187
+ const responseFields = {
188
+ HttpMeta: { Response: response, Request: req },
189
+ };
190
+
191
+ const [result] = await M.match<
192
+ components.APIKeyPair,
193
+ | errors.Error400
194
+ | errors.Error401
195
+ | errors.Error403
196
+ | errors.Error404
197
+ | errors.Error405
198
+ | errors.Error409
199
+ | errors.HTTPValidationError
200
+ | errors.Error425
201
+ | errors.Error429
202
+ | errors.Error500
203
+ | errors.Error502
204
+ | errors.Error504
205
+ | Gr4vyError
206
+ | ResponseValidationError
207
+ | ConnectionError
208
+ | RequestAbortedError
209
+ | RequestTimeoutError
210
+ | InvalidRequestError
211
+ | UnexpectedClientError
212
+ | SDKValidationError
213
+ >(
214
+ M.json(200, components.APIKeyPair$inboundSchema),
215
+ M.jsonErr(400, errors.Error400$inboundSchema),
216
+ M.jsonErr(401, errors.Error401$inboundSchema),
217
+ M.jsonErr(403, errors.Error403$inboundSchema),
218
+ M.jsonErr(404, errors.Error404$inboundSchema),
219
+ M.jsonErr(405, errors.Error405$inboundSchema),
220
+ M.jsonErr(409, errors.Error409$inboundSchema),
221
+ M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
222
+ M.jsonErr(425, errors.Error425$inboundSchema),
223
+ M.jsonErr(429, errors.Error429$inboundSchema),
224
+ M.jsonErr(500, errors.Error500$inboundSchema),
225
+ M.jsonErr(502, errors.Error502$inboundSchema),
226
+ M.jsonErr(504, errors.Error504$inboundSchema),
227
+ M.fail("4XX"),
228
+ M.fail("5XX"),
229
+ )(response, req, { extraFields: responseFields });
230
+ if (!result.ok) {
231
+ return [result, { status: "complete", request: req, response }];
232
+ }
233
+
234
+ return [result, { status: "complete", request: req, response }];
235
+ }