@gr4vy/sdk 2.0.51 → 2.0.53

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 (121) hide show
  1. package/README.md +4 -0
  2. package/funcs/digitalWalletsSessionsPazeMobileSessionCreate.d.ts +18 -0
  3. package/funcs/digitalWalletsSessionsPazeMobileSessionCreate.d.ts.map +1 -0
  4. package/funcs/digitalWalletsSessionsPazeMobileSessionCreate.js +127 -0
  5. package/funcs/digitalWalletsSessionsPazeMobileSessionCreate.js.map +1 -0
  6. package/funcs/digitalWalletsSessionsPazeMobileSessionReview.d.ts +18 -0
  7. package/funcs/digitalWalletsSessionsPazeMobileSessionReview.d.ts.map +1 -0
  8. package/funcs/digitalWalletsSessionsPazeMobileSessionReview.js +127 -0
  9. package/funcs/digitalWalletsSessionsPazeMobileSessionReview.js.map +1 -0
  10. package/jsr.json +1 -1
  11. package/lib/config.d.ts +3 -3
  12. package/lib/config.js +3 -3
  13. package/lib/config.js.map +1 -1
  14. package/models/components/index.d.ts +15 -0
  15. package/models/components/index.d.ts.map +1 -1
  16. package/models/components/index.js +15 -0
  17. package/models/components/index.js.map +1 -1
  18. package/models/components/pazebillingaddress.d.ts +41 -0
  19. package/models/components/pazebillingaddress.d.ts.map +1 -0
  20. package/models/components/pazebillingaddress.js +57 -0
  21. package/models/components/pazebillingaddress.js.map +1 -0
  22. package/models/components/pazeclient.d.ts +25 -0
  23. package/models/components/pazeclient.d.ts.map +1 -0
  24. package/models/components/pazeclient.js +51 -0
  25. package/models/components/pazeclient.js.map +1 -0
  26. package/models/components/pazecobranditem.d.ts +20 -0
  27. package/models/components/pazecobranditem.d.ts.map +1 -0
  28. package/models/components/pazecobranditem.js +50 -0
  29. package/models/components/pazecobranditem.js.map +1 -0
  30. package/models/components/pazeconsumer.d.ts +35 -0
  31. package/models/components/pazeconsumer.d.ts.map +1 -0
  32. package/models/components/pazeconsumer.js +57 -0
  33. package/models/components/pazeconsumer.js.map +1 -0
  34. package/models/components/pazedeliverycontactdetails.d.ts +15 -0
  35. package/models/components/pazedeliverycontactdetails.d.ts.map +1 -0
  36. package/models/components/pazedeliverycontactdetails.js +52 -0
  37. package/models/components/pazedeliverycontactdetails.js.map +1 -0
  38. package/models/components/pazedigitalcarddata.d.ts +21 -0
  39. package/models/components/pazedigitalcarddata.d.ts.map +1 -0
  40. package/models/components/pazedigitalcarddata.js +52 -0
  41. package/models/components/pazedigitalcarddata.js.map +1 -0
  42. package/models/components/pazemaskedcard.d.ts +87 -0
  43. package/models/components/pazemaskedcard.d.ts.map +1 -0
  44. package/models/components/pazemaskedcard.js +91 -0
  45. package/models/components/pazemaskedcard.js.map +1 -0
  46. package/models/components/pazemobilenumber.d.ts +17 -0
  47. package/models/components/pazemobilenumber.d.ts.map +1 -0
  48. package/models/components/pazemobilenumber.js +51 -0
  49. package/models/components/pazemobilenumber.js.map +1 -0
  50. package/models/components/pazemobilesessioncreate.d.ts +25 -0
  51. package/models/components/pazemobilesessioncreate.d.ts.map +1 -0
  52. package/models/components/pazemobilesessioncreate.js +58 -0
  53. package/models/components/pazemobilesessioncreate.js.map +1 -0
  54. package/models/components/pazemobilesessioncreaterequest.d.ts +130 -0
  55. package/models/components/pazemobilesessioncreaterequest.d.ts.map +1 -0
  56. package/models/components/pazemobilesessioncreaterequest.js +103 -0
  57. package/models/components/pazemobilesessioncreaterequest.js.map +1 -0
  58. package/models/components/pazesessionreview.d.ts +21 -0
  59. package/models/components/pazesessionreview.d.ts.map +1 -0
  60. package/models/components/pazesessionreview.js +58 -0
  61. package/models/components/pazesessionreview.js.map +1 -0
  62. package/models/components/pazesessionreviewlinks.d.ts +17 -0
  63. package/models/components/pazesessionreviewlinks.d.ts.map +1 -0
  64. package/models/components/pazesessionreviewlinks.js +57 -0
  65. package/models/components/pazesessionreviewlinks.js.map +1 -0
  66. package/models/components/pazesessionreviewrequest.d.ts +25 -0
  67. package/models/components/pazesessionreviewrequest.d.ts.map +1 -0
  68. package/models/components/pazesessionreviewrequest.js +51 -0
  69. package/models/components/pazesessionreviewrequest.js.map +1 -0
  70. package/models/components/pazeshippingaddress.d.ts +39 -0
  71. package/models/components/pazeshippingaddress.d.ts.map +1 -0
  72. package/models/components/pazeshippingaddress.js +58 -0
  73. package/models/components/pazeshippingaddress.js.map +1 -0
  74. package/models/components/pazetransactionvalue.d.ts +20 -0
  75. package/models/components/pazetransactionvalue.d.ts.map +1 -0
  76. package/models/components/pazetransactionvalue.js +50 -0
  77. package/models/components/pazetransactionvalue.js.map +1 -0
  78. package/models/operations/createpazemobilesession.d.ts +21 -0
  79. package/models/operations/createpazemobilesession.d.ts.map +1 -0
  80. package/models/operations/createpazemobilesession.js +56 -0
  81. package/models/operations/createpazemobilesession.js.map +1 -0
  82. package/models/operations/index.d.ts +2 -0
  83. package/models/operations/index.d.ts.map +1 -1
  84. package/models/operations/index.js +2 -0
  85. package/models/operations/index.js.map +1 -1
  86. package/models/operations/reviewpazemobilesession.d.ts +21 -0
  87. package/models/operations/reviewpazemobilesession.d.ts.map +1 -0
  88. package/models/operations/reviewpazemobilesession.js +56 -0
  89. package/models/operations/reviewpazemobilesession.js.map +1 -0
  90. package/package.json +1 -1
  91. package/sdk/sessions.d.ts +14 -0
  92. package/sdk/sessions.d.ts.map +1 -1
  93. package/sdk/sessions.js +20 -0
  94. package/sdk/sessions.js.map +1 -1
  95. package/src/funcs/digitalWalletsSessionsPazeMobileSessionCreate.ts +232 -0
  96. package/src/funcs/digitalWalletsSessionsPazeMobileSessionReview.ts +232 -0
  97. package/src/lib/config.ts +3 -3
  98. package/src/models/components/index.ts +15 -0
  99. package/src/models/components/pazebillingaddress.ts +69 -0
  100. package/src/models/components/pazeclient.ts +42 -0
  101. package/src/models/components/pazecobranditem.ts +38 -0
  102. package/src/models/components/pazeconsumer.ts +65 -0
  103. package/src/models/components/pazedeliverycontactdetails.ts +40 -0
  104. package/src/models/components/pazedigitalcarddata.ts +44 -0
  105. package/src/models/components/pazemaskedcard.ts +142 -0
  106. package/src/models/components/pazemobilenumber.ts +39 -0
  107. package/src/models/components/pazemobilesessioncreate.ts +54 -0
  108. package/src/models/components/pazemobilesessioncreaterequest.ts +212 -0
  109. package/src/models/components/pazesessionreview.ts +55 -0
  110. package/src/models/components/pazesessionreviewlinks.ts +45 -0
  111. package/src/models/components/pazesessionreviewrequest.ts +46 -0
  112. package/src/models/components/pazeshippingaddress.ts +70 -0
  113. package/src/models/components/pazetransactionvalue.ts +40 -0
  114. package/src/models/operations/createpazemobilesession.ts +51 -0
  115. package/src/models/operations/index.ts +2 -0
  116. package/src/models/operations/reviewpazemobilesession.ts +49 -0
  117. package/src/sdk/sessions.ts +40 -0
  118. package/src/types/async.ts +8 -7
  119. package/types/async.d.ts.map +1 -1
  120. package/types/async.js +8 -7
  121. package/types/async.js.map +1 -1
@@ -0,0 +1,232 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { Gr4vyCore } from "../core.js";
6
+ import { encodeJSON, 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
+ * Create a Paze mobile session
32
+ *
33
+ * @remarks
34
+ * Create a mobile session for use with Paze.
35
+ */
36
+ export function digitalWalletsSessionsPazeMobileSessionCreate(
37
+ client: Gr4vyCore,
38
+ pazeMobileSessionCreateRequest: components.PazeMobileSessionCreateRequest,
39
+ merchantAccountId?: string | null | undefined,
40
+ options?: RequestOptions,
41
+ ): APIPromise<
42
+ Result<
43
+ components.PazeMobileSessionCreate,
44
+ | errors.Error400
45
+ | errors.Error401
46
+ | errors.Error403
47
+ | errors.Error404
48
+ | errors.Error405
49
+ | errors.Error409
50
+ | errors.HTTPValidationError
51
+ | errors.Error425
52
+ | errors.Error429
53
+ | errors.Error500
54
+ | errors.Error502
55
+ | errors.Error504
56
+ | Gr4vyError
57
+ | ResponseValidationError
58
+ | ConnectionError
59
+ | RequestAbortedError
60
+ | RequestTimeoutError
61
+ | InvalidRequestError
62
+ | UnexpectedClientError
63
+ | SDKValidationError
64
+ >
65
+ > {
66
+ return new APIPromise($do(
67
+ client,
68
+ pazeMobileSessionCreateRequest,
69
+ merchantAccountId,
70
+ options,
71
+ ));
72
+ }
73
+
74
+ async function $do(
75
+ client: Gr4vyCore,
76
+ pazeMobileSessionCreateRequest: components.PazeMobileSessionCreateRequest,
77
+ merchantAccountId?: string | null | undefined,
78
+ options?: RequestOptions,
79
+ ): Promise<
80
+ [
81
+ Result<
82
+ components.PazeMobileSessionCreate,
83
+ | errors.Error400
84
+ | errors.Error401
85
+ | errors.Error403
86
+ | errors.Error404
87
+ | errors.Error405
88
+ | errors.Error409
89
+ | errors.HTTPValidationError
90
+ | errors.Error425
91
+ | errors.Error429
92
+ | errors.Error500
93
+ | errors.Error502
94
+ | errors.Error504
95
+ | Gr4vyError
96
+ | ResponseValidationError
97
+ | ConnectionError
98
+ | RequestAbortedError
99
+ | RequestTimeoutError
100
+ | InvalidRequestError
101
+ | UnexpectedClientError
102
+ | SDKValidationError
103
+ >,
104
+ APICall,
105
+ ]
106
+ > {
107
+ const input: operations.CreatePazeMobileSessionRequest = {
108
+ pazeMobileSessionCreateRequest: pazeMobileSessionCreateRequest,
109
+ merchantAccountId: merchantAccountId,
110
+ };
111
+
112
+ const parsed = safeParse(
113
+ input,
114
+ (value) =>
115
+ operations.CreatePazeMobileSessionRequest$outboundSchema.parse(value),
116
+ "Input validation failed",
117
+ );
118
+ if (!parsed.ok) {
119
+ return [parsed, { status: "invalid" }];
120
+ }
121
+ const payload = parsed.value;
122
+ const body = encodeJSON("body", payload.PazeMobileSessionCreateRequest, {
123
+ explode: true,
124
+ });
125
+
126
+ const path = pathToFunc("/digital-wallets/paze/session/create")();
127
+
128
+ const headers = new Headers(compactMap({
129
+ "Content-Type": "application/json",
130
+ Accept: "application/json",
131
+ "x-gr4vy-merchant-account-id": encodeSimple(
132
+ "x-gr4vy-merchant-account-id",
133
+ payload.merchantAccountId ?? client._options.merchantAccountId,
134
+ { explode: false, charEncoding: "none" },
135
+ ),
136
+ }));
137
+
138
+ const secConfig = await extractSecurity(client._options.bearerAuth);
139
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
140
+ const requestSecurity = resolveGlobalSecurity(securityInput);
141
+
142
+ const context = {
143
+ options: client._options,
144
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
145
+ operationID: "create_paze_mobile_session",
146
+ oAuth2Scopes: null,
147
+
148
+ resolvedSecurity: requestSecurity,
149
+
150
+ securitySource: client._options.bearerAuth,
151
+ retryConfig: options?.retries
152
+ || client._options.retryConfig
153
+ || { strategy: "none" },
154
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
155
+ };
156
+
157
+ const requestRes = client._createRequest(context, {
158
+ security: requestSecurity,
159
+ method: "POST",
160
+ baseURL: options?.serverURL,
161
+ path: path,
162
+ headers: headers,
163
+ body: body,
164
+ userAgent: client._options.userAgent,
165
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
166
+ }, options);
167
+ if (!requestRes.ok) {
168
+ return [requestRes, { status: "invalid" }];
169
+ }
170
+ const req = requestRes.value;
171
+
172
+ const doResult = await client._do(req, {
173
+ context,
174
+ isErrorStatusCode: (statusCode: number) =>
175
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
176
+ retryConfig: context.retryConfig,
177
+ retryCodes: context.retryCodes,
178
+ });
179
+ if (!doResult.ok) {
180
+ return [doResult, { status: "request-error", request: req }];
181
+ }
182
+ const response = doResult.value;
183
+
184
+ const responseFields = {
185
+ HttpMeta: { Response: response, Request: req },
186
+ };
187
+
188
+ const [result] = await M.match<
189
+ components.PazeMobileSessionCreate,
190
+ | errors.Error400
191
+ | errors.Error401
192
+ | errors.Error403
193
+ | errors.Error404
194
+ | errors.Error405
195
+ | errors.Error409
196
+ | errors.HTTPValidationError
197
+ | errors.Error425
198
+ | errors.Error429
199
+ | errors.Error500
200
+ | errors.Error502
201
+ | errors.Error504
202
+ | Gr4vyError
203
+ | ResponseValidationError
204
+ | ConnectionError
205
+ | RequestAbortedError
206
+ | RequestTimeoutError
207
+ | InvalidRequestError
208
+ | UnexpectedClientError
209
+ | SDKValidationError
210
+ >(
211
+ M.json(200, components.PazeMobileSessionCreate$inboundSchema),
212
+ M.jsonErr(400, errors.Error400$inboundSchema),
213
+ M.jsonErr(401, errors.Error401$inboundSchema),
214
+ M.jsonErr(403, errors.Error403$inboundSchema),
215
+ M.jsonErr(404, errors.Error404$inboundSchema),
216
+ M.jsonErr(405, errors.Error405$inboundSchema),
217
+ M.jsonErr(409, errors.Error409$inboundSchema),
218
+ M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
219
+ M.jsonErr(425, errors.Error425$inboundSchema),
220
+ M.jsonErr(429, errors.Error429$inboundSchema),
221
+ M.jsonErr(500, errors.Error500$inboundSchema),
222
+ M.jsonErr(502, errors.Error502$inboundSchema),
223
+ M.jsonErr(504, errors.Error504$inboundSchema),
224
+ M.fail("4XX"),
225
+ M.fail("5XX"),
226
+ )(response, req, { extraFields: responseFields });
227
+ if (!result.ok) {
228
+ return [result, { status: "complete", request: req, response }];
229
+ }
230
+
231
+ return [result, { status: "complete", request: req, response }];
232
+ }
@@ -0,0 +1,232 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { Gr4vyCore } from "../core.js";
6
+ import { encodeJSON, 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
+ * Review a Paze session
32
+ *
33
+ * @remarks
34
+ * Review a Paze checkout session and retrieve the selected card, consumer, and shipping address details.
35
+ */
36
+ export function digitalWalletsSessionsPazeMobileSessionReview(
37
+ client: Gr4vyCore,
38
+ pazeSessionReviewRequest: components.PazeSessionReviewRequest,
39
+ merchantAccountId?: string | null | undefined,
40
+ options?: RequestOptions,
41
+ ): APIPromise<
42
+ Result<
43
+ components.PazeSessionReview,
44
+ | errors.Error400
45
+ | errors.Error401
46
+ | errors.Error403
47
+ | errors.Error404
48
+ | errors.Error405
49
+ | errors.Error409
50
+ | errors.HTTPValidationError
51
+ | errors.Error425
52
+ | errors.Error429
53
+ | errors.Error500
54
+ | errors.Error502
55
+ | errors.Error504
56
+ | Gr4vyError
57
+ | ResponseValidationError
58
+ | ConnectionError
59
+ | RequestAbortedError
60
+ | RequestTimeoutError
61
+ | InvalidRequestError
62
+ | UnexpectedClientError
63
+ | SDKValidationError
64
+ >
65
+ > {
66
+ return new APIPromise($do(
67
+ client,
68
+ pazeSessionReviewRequest,
69
+ merchantAccountId,
70
+ options,
71
+ ));
72
+ }
73
+
74
+ async function $do(
75
+ client: Gr4vyCore,
76
+ pazeSessionReviewRequest: components.PazeSessionReviewRequest,
77
+ merchantAccountId?: string | null | undefined,
78
+ options?: RequestOptions,
79
+ ): Promise<
80
+ [
81
+ Result<
82
+ components.PazeSessionReview,
83
+ | errors.Error400
84
+ | errors.Error401
85
+ | errors.Error403
86
+ | errors.Error404
87
+ | errors.Error405
88
+ | errors.Error409
89
+ | errors.HTTPValidationError
90
+ | errors.Error425
91
+ | errors.Error429
92
+ | errors.Error500
93
+ | errors.Error502
94
+ | errors.Error504
95
+ | Gr4vyError
96
+ | ResponseValidationError
97
+ | ConnectionError
98
+ | RequestAbortedError
99
+ | RequestTimeoutError
100
+ | InvalidRequestError
101
+ | UnexpectedClientError
102
+ | SDKValidationError
103
+ >,
104
+ APICall,
105
+ ]
106
+ > {
107
+ const input: operations.ReviewPazeMobileSessionRequest = {
108
+ pazeSessionReviewRequest: pazeSessionReviewRequest,
109
+ merchantAccountId: merchantAccountId,
110
+ };
111
+
112
+ const parsed = safeParse(
113
+ input,
114
+ (value) =>
115
+ operations.ReviewPazeMobileSessionRequest$outboundSchema.parse(value),
116
+ "Input validation failed",
117
+ );
118
+ if (!parsed.ok) {
119
+ return [parsed, { status: "invalid" }];
120
+ }
121
+ const payload = parsed.value;
122
+ const body = encodeJSON("body", payload.PazeSessionReviewRequest, {
123
+ explode: true,
124
+ });
125
+
126
+ const path = pathToFunc("/digital-wallets/paze/session/review")();
127
+
128
+ const headers = new Headers(compactMap({
129
+ "Content-Type": "application/json",
130
+ Accept: "application/json",
131
+ "x-gr4vy-merchant-account-id": encodeSimple(
132
+ "x-gr4vy-merchant-account-id",
133
+ payload.merchantAccountId ?? client._options.merchantAccountId,
134
+ { explode: false, charEncoding: "none" },
135
+ ),
136
+ }));
137
+
138
+ const secConfig = await extractSecurity(client._options.bearerAuth);
139
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
140
+ const requestSecurity = resolveGlobalSecurity(securityInput);
141
+
142
+ const context = {
143
+ options: client._options,
144
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
145
+ operationID: "review_paze_mobile_session",
146
+ oAuth2Scopes: null,
147
+
148
+ resolvedSecurity: requestSecurity,
149
+
150
+ securitySource: client._options.bearerAuth,
151
+ retryConfig: options?.retries
152
+ || client._options.retryConfig
153
+ || { strategy: "none" },
154
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
155
+ };
156
+
157
+ const requestRes = client._createRequest(context, {
158
+ security: requestSecurity,
159
+ method: "POST",
160
+ baseURL: options?.serverURL,
161
+ path: path,
162
+ headers: headers,
163
+ body: body,
164
+ userAgent: client._options.userAgent,
165
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
166
+ }, options);
167
+ if (!requestRes.ok) {
168
+ return [requestRes, { status: "invalid" }];
169
+ }
170
+ const req = requestRes.value;
171
+
172
+ const doResult = await client._do(req, {
173
+ context,
174
+ isErrorStatusCode: (statusCode: number) =>
175
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
176
+ retryConfig: context.retryConfig,
177
+ retryCodes: context.retryCodes,
178
+ });
179
+ if (!doResult.ok) {
180
+ return [doResult, { status: "request-error", request: req }];
181
+ }
182
+ const response = doResult.value;
183
+
184
+ const responseFields = {
185
+ HttpMeta: { Response: response, Request: req },
186
+ };
187
+
188
+ const [result] = await M.match<
189
+ components.PazeSessionReview,
190
+ | errors.Error400
191
+ | errors.Error401
192
+ | errors.Error403
193
+ | errors.Error404
194
+ | errors.Error405
195
+ | errors.Error409
196
+ | errors.HTTPValidationError
197
+ | errors.Error425
198
+ | errors.Error429
199
+ | errors.Error500
200
+ | errors.Error502
201
+ | errors.Error504
202
+ | Gr4vyError
203
+ | ResponseValidationError
204
+ | ConnectionError
205
+ | RequestAbortedError
206
+ | RequestTimeoutError
207
+ | InvalidRequestError
208
+ | UnexpectedClientError
209
+ | SDKValidationError
210
+ >(
211
+ M.json(200, components.PazeSessionReview$inboundSchema),
212
+ M.jsonErr(400, errors.Error400$inboundSchema),
213
+ M.jsonErr(401, errors.Error401$inboundSchema),
214
+ M.jsonErr(403, errors.Error403$inboundSchema),
215
+ M.jsonErr(404, errors.Error404$inboundSchema),
216
+ M.jsonErr(405, errors.Error405$inboundSchema),
217
+ M.jsonErr(409, errors.Error409$inboundSchema),
218
+ M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
219
+ M.jsonErr(425, errors.Error425$inboundSchema),
220
+ M.jsonErr(429, errors.Error429$inboundSchema),
221
+ M.jsonErr(500, errors.Error500$inboundSchema),
222
+ M.jsonErr(502, errors.Error502$inboundSchema),
223
+ M.jsonErr(504, errors.Error504$inboundSchema),
224
+ M.fail("4XX"),
225
+ M.fail("5XX"),
226
+ )(response, req, { extraFields: responseFields });
227
+ if (!result.ok) {
228
+ return [result, { status: "complete", request: req, response }];
229
+ }
230
+
231
+ return [result, { status: "complete", request: req, response }];
232
+ }
package/src/lib/config.ts CHANGED
@@ -77,7 +77,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
77
77
  export const SDK_METADATA = {
78
78
  language: "typescript",
79
79
  openapiDocVersion: "1.0.0",
80
- sdkVersion: "2.0.51",
81
- genVersion: "2.884.11",
82
- userAgent: "speakeasy-sdk/typescript 2.0.51 2.884.11 1.0.0 @gr4vy/sdk",
80
+ sdkVersion: "2.0.53",
81
+ genVersion: "2.885.1",
82
+ userAgent: "speakeasy-sdk/typescript 2.0.53 2.885.1 1.0.0 @gr4vy/sdk",
83
83
  } as const;
@@ -207,9 +207,24 @@ export * from "./paypaloptions.js";
207
207
  export * from "./paypalshippingoptions.js";
208
208
  export * from "./paypalshippingoptionsitem.js";
209
209
  export * from "./paypalshippingoptionsitemamount.js";
210
+ export * from "./pazebillingaddress.js";
211
+ export * from "./pazeclient.js";
212
+ export * from "./pazecobranditem.js";
213
+ export * from "./pazeconsumer.js";
214
+ export * from "./pazedeliverycontactdetails.js";
215
+ export * from "./pazedigitalcarddata.js";
216
+ export * from "./pazemaskedcard.js";
217
+ export * from "./pazemobilenumber.js";
210
218
  export * from "./pazemobilesession.js";
219
+ export * from "./pazemobilesessioncreate.js";
220
+ export * from "./pazemobilesessioncreaterequest.js";
211
221
  export * from "./pazepaymentmethodcreate.js";
212
222
  export * from "./pazesessionrequest.js";
223
+ export * from "./pazesessionreview.js";
224
+ export * from "./pazesessionreviewlinks.js";
225
+ export * from "./pazesessionreviewrequest.js";
226
+ export * from "./pazeshippingaddress.js";
227
+ export * from "./pazetransactionvalue.js";
213
228
  export * from "./pazewebsession.js";
214
229
  export * from "./plaidpaymentmethodcreate.js";
215
230
  export * from "./powertranzoptions.js";
@@ -0,0 +1,69 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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 PazeBillingAddress = {
11
+ /**
12
+ * Name of the organization or entity at the address.
13
+ */
14
+ name: string | null;
15
+ /**
16
+ * Line 1 of the address.
17
+ */
18
+ line1: string;
19
+ /**
20
+ * Line 2 of the address.
21
+ */
22
+ line2: string | null;
23
+ /**
24
+ * Line 3 of the address.
25
+ */
26
+ line3: string | null;
27
+ /**
28
+ * City.
29
+ */
30
+ city: string;
31
+ /**
32
+ * State or region.
33
+ */
34
+ state: string;
35
+ /**
36
+ * Postal code.
37
+ */
38
+ zip: string;
39
+ /**
40
+ * ISO 3166-1 alpha-2 country code.
41
+ */
42
+ countryCode: string | null;
43
+ };
44
+
45
+ /** @internal */
46
+ export const PazeBillingAddress$inboundSchema: z.ZodType<
47
+ PazeBillingAddress,
48
+ z.ZodTypeDef,
49
+ unknown
50
+ > = z.object({
51
+ name: z.nullable(z.string()),
52
+ line1: z.string(),
53
+ line2: z.nullable(z.string()),
54
+ line3: z.nullable(z.string()),
55
+ city: z.string(),
56
+ state: z.string(),
57
+ zip: z.string(),
58
+ countryCode: z.nullable(z.string()),
59
+ });
60
+
61
+ export function pazeBillingAddressFromJSON(
62
+ jsonString: string,
63
+ ): SafeParseResult<PazeBillingAddress, SDKValidationError> {
64
+ return safeParse(
65
+ jsonString,
66
+ (x) => PazeBillingAddress$inboundSchema.parse(JSON.parse(x)),
67
+ `Failed to parse 'PazeBillingAddress' from JSON`,
68
+ );
69
+ }
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+
7
+ export type PazeClient = {
8
+ /**
9
+ * Client identifier generated by Paze and shared during onboarding.
10
+ */
11
+ id: string;
12
+ /**
13
+ * Display name associated with the client for presentation purposes.
14
+ */
15
+ name?: string | null | undefined;
16
+ /**
17
+ * Client profile to use during checkout.
18
+ */
19
+ profileId?: string | null | undefined;
20
+ };
21
+
22
+ /** @internal */
23
+ export type PazeClient$Outbound = {
24
+ id: string;
25
+ name?: string | null | undefined;
26
+ profileId?: string | null | undefined;
27
+ };
28
+
29
+ /** @internal */
30
+ export const PazeClient$outboundSchema: z.ZodType<
31
+ PazeClient$Outbound,
32
+ z.ZodTypeDef,
33
+ PazeClient
34
+ > = z.object({
35
+ id: z.string(),
36
+ name: z.nullable(z.string()).optional(),
37
+ profileId: z.nullable(z.string()).optional(),
38
+ });
39
+
40
+ export function pazeClientToJSON(pazeClient: PazeClient): string {
41
+ return JSON.stringify(PazeClient$outboundSchema.parse(pazeClient));
42
+ }
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+
7
+ export type PazeCobrandItem = {
8
+ /**
9
+ * Product name of the cobrand card. Must match exactly with the card name from the network.
10
+ */
11
+ name: string;
12
+ /**
13
+ * Whether benefits are offered for this cobrand card.
14
+ */
15
+ benefitsOffered?: boolean | null | undefined;
16
+ };
17
+
18
+ /** @internal */
19
+ export type PazeCobrandItem$Outbound = {
20
+ name: string;
21
+ benefitsOffered?: boolean | null | undefined;
22
+ };
23
+
24
+ /** @internal */
25
+ export const PazeCobrandItem$outboundSchema: z.ZodType<
26
+ PazeCobrandItem$Outbound,
27
+ z.ZodTypeDef,
28
+ PazeCobrandItem
29
+ > = z.object({
30
+ name: z.string(),
31
+ benefitsOffered: z.nullable(z.boolean()).optional(),
32
+ });
33
+
34
+ export function pazeCobrandItemToJSON(
35
+ pazeCobrandItem: PazeCobrandItem,
36
+ ): string {
37
+ return JSON.stringify(PazeCobrandItem$outboundSchema.parse(pazeCobrandItem));
38
+ }