@gr4vy/sdk 2.0.46 → 2.0.48

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 (51) hide show
  1. package/README.md +2 -0
  2. package/funcs/digitalWalletsSessionsPaze.d.ts +19 -0
  3. package/funcs/digitalWalletsSessionsPaze.d.ts.map +1 -0
  4. package/funcs/digitalWalletsSessionsPaze.js +127 -0
  5. package/funcs/digitalWalletsSessionsPaze.js.map +1 -0
  6. package/jsr.json +1 -1
  7. package/lib/config.d.ts +3 -3
  8. package/lib/config.js +3 -3
  9. package/models/components/index.d.ts +3 -0
  10. package/models/components/index.d.ts.map +1 -1
  11. package/models/components/index.js +3 -0
  12. package/models/components/index.js.map +1 -1
  13. package/models/components/pazemobilesession.d.ts +29 -0
  14. package/models/components/pazemobilesession.d.ts.map +1 -0
  15. package/models/components/pazemobilesession.js +54 -0
  16. package/models/components/pazemobilesession.js.map +1 -0
  17. package/models/components/pazesessionrequest.d.ts +34 -0
  18. package/models/components/pazesessionrequest.d.ts.map +1 -0
  19. package/models/components/pazesessionrequest.js +65 -0
  20. package/models/components/pazesessionrequest.js.map +1 -0
  21. package/models/components/pazewebsession.d.ts +21 -0
  22. package/models/components/pazewebsession.d.ts.map +1 -0
  23. package/models/components/pazewebsession.js +52 -0
  24. package/models/components/pazewebsession.js.map +1 -0
  25. package/models/components/transactioncapture.d.ts +4 -0
  26. package/models/components/transactioncapture.d.ts.map +1 -1
  27. package/models/components/transactioncapture.js +2 -0
  28. package/models/components/transactioncapture.js.map +1 -1
  29. package/models/operations/createpazedigitalwalletsession.d.ts +30 -0
  30. package/models/operations/createpazedigitalwalletsession.d.ts.map +1 -0
  31. package/models/operations/createpazedigitalwalletsession.js +67 -0
  32. package/models/operations/createpazedigitalwalletsession.js.map +1 -0
  33. package/models/operations/index.d.ts +1 -0
  34. package/models/operations/index.d.ts.map +1 -1
  35. package/models/operations/index.js +1 -0
  36. package/models/operations/index.js.map +1 -1
  37. package/package.json +1 -1
  38. package/sdk/sessions.d.ts +8 -0
  39. package/sdk/sessions.d.ts.map +1 -1
  40. package/sdk/sessions.js +10 -0
  41. package/sdk/sessions.js.map +1 -1
  42. package/src/funcs/digitalWalletsSessionsPaze.ts +238 -0
  43. package/src/lib/config.ts +3 -3
  44. package/src/models/components/index.ts +3 -0
  45. package/src/models/components/pazemobilesession.ts +54 -0
  46. package/src/models/components/pazesessionrequest.ts +63 -0
  47. package/src/models/components/pazewebsession.ts +44 -0
  48. package/src/models/components/transactioncapture.ts +6 -0
  49. package/src/models/operations/createpazedigitalwalletsession.ts +85 -0
  50. package/src/models/operations/index.ts +1 -0
  51. package/src/sdk/sessions.ts +23 -0
@@ -40,6 +40,10 @@ export type TransactionCapture = {
40
40
  * The payment service's unique ID for the capture.
41
41
  */
42
42
  paymentServiceCaptureId?: string | null | undefined;
43
+ /**
44
+ * The external identifier for the capture.
45
+ */
46
+ externalIdentifier?: string | null | undefined;
43
47
  };
44
48
 
45
49
  /** @internal */
@@ -56,12 +60,14 @@ export const TransactionCapture$inboundSchema: z.ZodType<
56
60
  transaction: Transaction$inboundSchema,
57
61
  capture_id: z.nullable(z.string()).optional(),
58
62
  payment_service_capture_id: z.nullable(z.string()).optional(),
63
+ external_identifier: z.nullable(z.string()).optional(),
59
64
  }).transform((v) => {
60
65
  return remap$(v, {
61
66
  "raw_response_code": "rawResponseCode",
62
67
  "raw_response_description": "rawResponseDescription",
63
68
  "capture_id": "captureId",
64
69
  "payment_service_capture_id": "paymentServiceCaptureId",
70
+ "external_identifier": "externalIdentifier",
65
71
  });
66
72
  });
67
73
 
@@ -0,0 +1,85 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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 CreatePazeDigitalWalletSessionGlobals = {
13
+ merchantAccountId?: string | undefined;
14
+ };
15
+
16
+ export type CreatePazeDigitalWalletSessionRequest = {
17
+ /**
18
+ * The ID of the merchant account to use for this request.
19
+ */
20
+ merchantAccountId?: string | null | undefined;
21
+ pazeSessionRequest: components.PazeSessionRequest;
22
+ };
23
+
24
+ /**
25
+ * Successful Response
26
+ */
27
+ export type CreatePazeDigitalWalletSessionResponseCreatePazeDigitalWalletSession =
28
+ | components.PazeMobileSession
29
+ | components.PazeWebSession;
30
+
31
+ /** @internal */
32
+ export type CreatePazeDigitalWalletSessionRequest$Outbound = {
33
+ merchantAccountId?: string | null | undefined;
34
+ PazeSessionRequest: components.PazeSessionRequest$Outbound;
35
+ };
36
+
37
+ /** @internal */
38
+ export const CreatePazeDigitalWalletSessionRequest$outboundSchema: z.ZodType<
39
+ CreatePazeDigitalWalletSessionRequest$Outbound,
40
+ z.ZodTypeDef,
41
+ CreatePazeDigitalWalletSessionRequest
42
+ > = z.object({
43
+ merchantAccountId: z.nullable(z.string()).optional(),
44
+ pazeSessionRequest: components.PazeSessionRequest$outboundSchema,
45
+ }).transform((v) => {
46
+ return remap$(v, {
47
+ pazeSessionRequest: "PazeSessionRequest",
48
+ });
49
+ });
50
+
51
+ export function createPazeDigitalWalletSessionRequestToJSON(
52
+ createPazeDigitalWalletSessionRequest: CreatePazeDigitalWalletSessionRequest,
53
+ ): string {
54
+ return JSON.stringify(
55
+ CreatePazeDigitalWalletSessionRequest$outboundSchema.parse(
56
+ createPazeDigitalWalletSessionRequest,
57
+ ),
58
+ );
59
+ }
60
+
61
+ /** @internal */
62
+ export const CreatePazeDigitalWalletSessionResponseCreatePazeDigitalWalletSession$inboundSchema:
63
+ z.ZodType<
64
+ CreatePazeDigitalWalletSessionResponseCreatePazeDigitalWalletSession,
65
+ z.ZodTypeDef,
66
+ unknown
67
+ > = z.union([
68
+ components.PazeMobileSession$inboundSchema,
69
+ components.PazeWebSession$inboundSchema,
70
+ ]);
71
+
72
+ export function createPazeDigitalWalletSessionResponseCreatePazeDigitalWalletSessionFromJSON(
73
+ jsonString: string,
74
+ ): SafeParseResult<
75
+ CreatePazeDigitalWalletSessionResponseCreatePazeDigitalWalletSession,
76
+ SDKValidationError
77
+ > {
78
+ return safeParse(
79
+ jsonString,
80
+ (x) =>
81
+ CreatePazeDigitalWalletSessionResponseCreatePazeDigitalWalletSession$inboundSchema
82
+ .parse(JSON.parse(x)),
83
+ `Failed to parse 'CreatePazeDigitalWalletSessionResponseCreatePazeDigitalWalletSession' from JSON`,
84
+ );
85
+ }
@@ -23,6 +23,7 @@ export * from "./createpaymentservice.js";
23
23
  export * from "./createpaymentservicedefinitionsession.js";
24
24
  export * from "./createpaymentservicesession.js";
25
25
  export * from "./createpayout.js";
26
+ export * from "./createpazedigitalwalletsession.js";
26
27
  export * from "./createreportexecutionurl.js";
27
28
  export * from "./createthreedsconfiguration.js";
28
29
  export * from "./createthreedsscenario.js";
@@ -5,8 +5,10 @@
5
5
  import { digitalWalletsSessionsApplePay } from "../funcs/digitalWalletsSessionsApplePay.js";
6
6
  import { digitalWalletsSessionsClickToPay } from "../funcs/digitalWalletsSessionsClickToPay.js";
7
7
  import { digitalWalletsSessionsGooglePay } from "../funcs/digitalWalletsSessionsGooglePay.js";
8
+ import { digitalWalletsSessionsPaze } from "../funcs/digitalWalletsSessionsPaze.js";
8
9
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
9
10
  import * as components from "../models/components/index.js";
11
+ import * as operations from "../models/operations/index.js";
10
12
  import { unwrapAsync } from "../types/fp.js";
11
13
 
12
14
  export class Sessions extends ClientSDK {
@@ -48,6 +50,27 @@ export class Sessions extends ClientSDK {
48
50
  ));
49
51
  }
50
52
 
53
+ /**
54
+ * Create a Paze session
55
+ *
56
+ * @remarks
57
+ * Create a session for use with Paze.
58
+ */
59
+ async paze(
60
+ pazeSessionRequest: components.PazeSessionRequest,
61
+ merchantAccountId?: string | null | undefined,
62
+ options?: RequestOptions,
63
+ ): Promise<
64
+ operations.CreatePazeDigitalWalletSessionResponseCreatePazeDigitalWalletSession
65
+ > {
66
+ return unwrapAsync(digitalWalletsSessionsPaze(
67
+ this,
68
+ pazeSessionRequest,
69
+ merchantAccountId,
70
+ options,
71
+ ));
72
+ }
73
+
51
74
  /**
52
75
  * Create a Click to Pay session
53
76
  *