@gr4vy/sdk 2.3.14 → 2.3.15

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 (160) 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/funcs/merchantAccountsCreate.d.ts +1 -1
  23. package/funcs/merchantAccountsCreate.d.ts.map +1 -1
  24. package/funcs/merchantAccountsCreate.js +1 -1
  25. package/funcs/merchantAccountsCreate.js.map +1 -1
  26. package/funcs/merchantAccountsGet.d.ts +1 -1
  27. package/funcs/merchantAccountsGet.d.ts.map +1 -1
  28. package/funcs/merchantAccountsGet.js +1 -1
  29. package/funcs/merchantAccountsGet.js.map +1 -1
  30. package/funcs/merchantAccountsUpdate.d.ts +1 -1
  31. package/funcs/merchantAccountsUpdate.d.ts.map +1 -1
  32. package/funcs/merchantAccountsUpdate.js +1 -1
  33. package/funcs/merchantAccountsUpdate.js.map +1 -1
  34. package/jsr.json +1 -1
  35. package/lib/config.d.ts +3 -3
  36. package/lib/config.js +3 -3
  37. package/models/components/apicommonschemascreator.d.ts +12 -0
  38. package/models/components/apicommonschemascreator.d.ts.map +1 -0
  39. package/models/components/{creator.js → apicommonschemascreator.js} +6 -6
  40. package/models/components/apicommonschemascreator.js.map +1 -0
  41. package/models/components/apicommonschemasmerchantaccount.d.ts +16 -0
  42. package/models/components/apicommonschemasmerchantaccount.d.ts.map +1 -0
  43. package/models/components/apicommonschemasmerchantaccount.js +65 -0
  44. package/models/components/apicommonschemasmerchantaccount.js.map +1 -0
  45. package/models/components/apikeypair.d.ts +58 -0
  46. package/models/components/apikeypair.d.ts.map +1 -0
  47. package/models/components/apikeypair.js +76 -0
  48. package/models/components/apikeypair.js.map +1 -0
  49. package/models/components/apikeypaircreate.d.ts +38 -0
  50. package/models/components/apikeypaircreate.d.ts.map +1 -0
  51. package/models/components/apikeypaircreate.js +63 -0
  52. package/models/components/apikeypaircreate.js.map +1 -0
  53. package/models/components/apikeypairupdate.d.ts +27 -0
  54. package/models/components/apikeypairupdate.d.ts.map +1 -0
  55. package/models/components/apikeypairupdate.js +59 -0
  56. package/models/components/apikeypairupdate.js.map +1 -0
  57. package/models/components/apiroutersapikeypairsschemascreator.d.ts +25 -0
  58. package/models/components/apiroutersapikeypairsschemascreator.d.ts.map +1 -0
  59. package/models/components/apiroutersapikeypairsschemascreator.js +58 -0
  60. package/models/components/apiroutersapikeypairsschemascreator.js.map +1 -0
  61. package/models/components/{merchantaccount.d.ts → apiroutersmerchantaccountsschemasmerchantaccount.d.ts} +4 -4
  62. package/models/components/apiroutersmerchantaccountsschemasmerchantaccount.d.ts.map +1 -0
  63. package/models/components/{merchantaccount.js → apiroutersmerchantaccountsschemasmerchantaccount.js} +10 -8
  64. package/models/components/apiroutersmerchantaccountsschemasmerchantaccount.js.map +1 -0
  65. package/models/components/certificatealgorithm.d.ts +12 -0
  66. package/models/components/certificatealgorithm.d.ts.map +1 -0
  67. package/models/components/certificatealgorithm.js +49 -0
  68. package/models/components/certificatealgorithm.js.map +1 -0
  69. package/models/components/collectionapikeypair.d.ts +26 -0
  70. package/models/components/collectionapikeypair.d.ts.map +1 -0
  71. package/models/components/collectionapikeypair.js +60 -0
  72. package/models/components/collectionapikeypair.js.map +1 -0
  73. package/models/components/index.d.ts +11 -2
  74. package/models/components/index.d.ts.map +1 -1
  75. package/models/components/index.js +11 -2
  76. package/models/components/index.js.map +1 -1
  77. package/models/components/merchantaccounts.d.ts +2 -2
  78. package/models/components/merchantaccounts.d.ts.map +1 -1
  79. package/models/components/merchantaccounts.js +2 -2
  80. package/models/components/merchantaccounts.js.map +1 -1
  81. package/models/components/permissionset.d.ts +10 -0
  82. package/models/components/permissionset.d.ts.map +1 -0
  83. package/models/components/permissionset.js +50 -0
  84. package/models/components/permissionset.js.map +1 -0
  85. package/models/components/refund.d.ts +2 -2
  86. package/models/components/refund.d.ts.map +1 -1
  87. package/models/components/refund.js +2 -2
  88. package/models/components/refund.js.map +1 -1
  89. package/models/components/role.d.ts +15 -0
  90. package/models/components/role.d.ts.map +1 -0
  91. package/models/components/role.js +56 -0
  92. package/models/components/role.js.map +1 -0
  93. package/models/operations/deleteapikeypair.d.ts +15 -0
  94. package/models/operations/deleteapikeypair.d.ts.map +1 -0
  95. package/models/operations/deleteapikeypair.js +54 -0
  96. package/models/operations/deleteapikeypair.js.map +1 -0
  97. package/models/operations/getapikeypair.d.ts +15 -0
  98. package/models/operations/getapikeypair.d.ts.map +1 -0
  99. package/models/operations/getapikeypair.js +54 -0
  100. package/models/operations/getapikeypair.js.map +1 -0
  101. package/models/operations/index.d.ts +4 -0
  102. package/models/operations/index.d.ts.map +1 -1
  103. package/models/operations/index.js +4 -0
  104. package/models/operations/index.js.map +1 -1
  105. package/models/operations/listapikeypairs.d.ts +29 -0
  106. package/models/operations/listapikeypairs.d.ts.map +1 -0
  107. package/models/operations/listapikeypairs.js +65 -0
  108. package/models/operations/listapikeypairs.js.map +1 -0
  109. package/models/operations/updateapikeypair.d.ts +18 -0
  110. package/models/operations/updateapikeypair.d.ts.map +1 -0
  111. package/models/operations/updateapikeypair.js +57 -0
  112. package/models/operations/updateapikeypair.js.map +1 -0
  113. package/package.json +1 -1
  114. package/sdk/apikeypairs.d.ts +44 -0
  115. package/sdk/apikeypairs.d.ts.map +1 -0
  116. package/sdk/apikeypairs.js +63 -0
  117. package/sdk/apikeypairs.js.map +1 -0
  118. package/sdk/merchantaccounts.d.ts +3 -3
  119. package/sdk/merchantaccounts.d.ts.map +1 -1
  120. package/sdk/sdk.d.ts +3 -0
  121. package/sdk/sdk.d.ts.map +1 -1
  122. package/sdk/sdk.js +4 -0
  123. package/sdk/sdk.js.map +1 -1
  124. package/src/funcs/apiKeyPairsCreate.ts +215 -0
  125. package/src/funcs/apiKeyPairsDelete.ts +225 -0
  126. package/src/funcs/apiKeyPairsGet.ts +235 -0
  127. package/src/funcs/apiKeyPairsList.ts +312 -0
  128. package/src/funcs/apiKeyPairsUpdate.ts +230 -0
  129. package/src/funcs/merchantAccountsCreate.ts +7 -4
  130. package/src/funcs/merchantAccountsGet.ts +7 -4
  131. package/src/funcs/merchantAccountsUpdate.ts +7 -4
  132. package/src/lib/config.ts +3 -3
  133. package/src/models/components/apicommonschemascreator.ts +40 -0
  134. package/src/models/components/apicommonschemasmerchantaccount.ts +52 -0
  135. package/src/models/components/apikeypair.ts +110 -0
  136. package/src/models/components/apikeypaircreate.ts +73 -0
  137. package/src/models/components/apikeypairupdate.ts +56 -0
  138. package/src/models/components/apiroutersapikeypairsschemascreator.ts +55 -0
  139. package/src/models/components/{merchantaccount.ts → apiroutersmerchantaccountsschemasmerchantaccount.ts} +79 -65
  140. package/src/models/components/certificatealgorithm.ts +26 -0
  141. package/src/models/components/collectionapikeypair.ts +56 -0
  142. package/src/models/components/index.ts +11 -2
  143. package/src/models/components/merchantaccounts.ts +7 -5
  144. package/src/models/components/permissionset.ts +31 -0
  145. package/src/models/components/refund.ts +6 -3
  146. package/src/models/components/role.ts +37 -0
  147. package/src/models/operations/deleteapikeypair.ts +39 -0
  148. package/src/models/operations/getapikeypair.ts +39 -0
  149. package/src/models/operations/index.ts +4 -0
  150. package/src/models/operations/listapikeypairs.ts +72 -0
  151. package/src/models/operations/updateapikeypair.ts +44 -0
  152. package/src/sdk/apikeypairs.ts +107 -0
  153. package/src/sdk/merchantaccounts.ts +3 -3
  154. package/src/sdk/sdk.ts +6 -0
  155. package/models/components/creator.d.ts +0 -12
  156. package/models/components/creator.d.ts.map +0 -1
  157. package/models/components/creator.js.map +0 -1
  158. package/models/components/merchantaccount.d.ts.map +0 -1
  159. package/models/components/merchantaccount.js.map +0 -1
  160. package/src/models/components/creator.ts +0 -37
@@ -8,15 +8,15 @@ import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
  import {
11
- MerchantAccount,
12
- MerchantAccount$inboundSchema,
13
- } from "./merchantaccount.js";
11
+ ApiRoutersMerchantAccountsSchemasMerchantAccount,
12
+ ApiRoutersMerchantAccountsSchemasMerchantAccount$inboundSchema,
13
+ } from "./apiroutersmerchantaccountsschemasmerchantaccount.js";
14
14
 
15
15
  export type MerchantAccounts = {
16
16
  /**
17
17
  * A list of items returned for this request.
18
18
  */
19
- items: Array<MerchantAccount>;
19
+ items: Array<ApiRoutersMerchantAccountsSchemasMerchantAccount>;
20
20
  /**
21
21
  * The number of items for this page.
22
22
  */
@@ -37,7 +37,9 @@ export const MerchantAccounts$inboundSchema: z.ZodType<
37
37
  z.ZodTypeDef,
38
38
  unknown
39
39
  > = z.object({
40
- items: z.array(MerchantAccount$inboundSchema),
40
+ items: z.array(
41
+ ApiRoutersMerchantAccountsSchemasMerchantAccount$inboundSchema,
42
+ ),
41
43
  limit: z.number().int().default(20),
42
44
  next_cursor: z.nullable(z.string()).optional(),
43
45
  previous_cursor: z.nullable(z.string()).optional(),
@@ -0,0 +1,31 @@
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 PermissionSet = {
11
+ allow: Array<string>;
12
+ };
13
+
14
+ /** @internal */
15
+ export const PermissionSet$inboundSchema: z.ZodType<
16
+ PermissionSet,
17
+ z.ZodTypeDef,
18
+ unknown
19
+ > = z.object({
20
+ allow: z.array(z.string()),
21
+ });
22
+
23
+ export function permissionSetFromJSON(
24
+ jsonString: string,
25
+ ): SafeParseResult<PermissionSet, SDKValidationError> {
26
+ return safeParse(
27
+ jsonString,
28
+ (x) => PermissionSet$inboundSchema.parse(JSON.parse(x)),
29
+ `Failed to parse 'PermissionSet' from JSON`,
30
+ );
31
+ }
@@ -7,7 +7,10 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import { Creator, Creator$inboundSchema } from "./creator.js";
10
+ import {
11
+ ApiCommonSchemasCreator,
12
+ ApiCommonSchemasCreator$inboundSchema,
13
+ } from "./apicommonschemascreator.js";
11
14
  import { RefundStatus, RefundStatus$inboundSchema } from "./refundstatus.js";
12
15
  import {
13
16
  RefundTargetType,
@@ -76,7 +79,7 @@ export type Refund = {
76
79
  /**
77
80
  * The user that created this resource
78
81
  */
79
- creator?: Creator | null | undefined;
82
+ creator?: ApiCommonSchemasCreator | null | undefined;
80
83
  /**
81
84
  * The standardized error code set by Gr4vy.
82
85
  */
@@ -126,7 +129,7 @@ export const Refund$inboundSchema: z.ZodType<Refund, z.ZodTypeDef, unknown> = z
126
129
  updated_at: z.string().datetime({ offset: true }).transform(v =>
127
130
  new Date(v)
128
131
  ),
129
- creator: z.nullable(Creator$inboundSchema).optional(),
132
+ creator: z.nullable(ApiCommonSchemasCreator$inboundSchema).optional(),
130
133
  error_code: z.nullable(z.string()).optional(),
131
134
  raw_response_code: z.nullable(z.string()).optional(),
132
135
  raw_response_description: z.nullable(z.string()).optional(),
@@ -0,0 +1,37 @@
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
+ import { PermissionSet, PermissionSet$inboundSchema } from "./permissionset.js";
10
+
11
+ export type Role = {
12
+ type: "role";
13
+ id: string;
14
+ name: string;
15
+ description: string;
16
+ permissions: PermissionSet;
17
+ };
18
+
19
+ /** @internal */
20
+ export const Role$inboundSchema: z.ZodType<Role, z.ZodTypeDef, unknown> = z
21
+ .object({
22
+ type: z.literal("role").default("role"),
23
+ id: z.string(),
24
+ name: z.string(),
25
+ description: z.string(),
26
+ permissions: PermissionSet$inboundSchema,
27
+ });
28
+
29
+ export function roleFromJSON(
30
+ jsonString: string,
31
+ ): SafeParseResult<Role, SDKValidationError> {
32
+ return safeParse(
33
+ jsonString,
34
+ (x) => Role$inboundSchema.parse(JSON.parse(x)),
35
+ `Failed to parse 'Role' from JSON`,
36
+ );
37
+ }
@@ -0,0 +1,39 @@
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
+
8
+ export type DeleteApiKeyPairRequest = {
9
+ /**
10
+ * The ID of the API key pair.
11
+ */
12
+ apiKeyPairId: string;
13
+ };
14
+
15
+ /** @internal */
16
+ export type DeleteApiKeyPairRequest$Outbound = {
17
+ api_key_pair_id: string;
18
+ };
19
+
20
+ /** @internal */
21
+ export const DeleteApiKeyPairRequest$outboundSchema: z.ZodType<
22
+ DeleteApiKeyPairRequest$Outbound,
23
+ z.ZodTypeDef,
24
+ DeleteApiKeyPairRequest
25
+ > = z.object({
26
+ apiKeyPairId: z.string(),
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ apiKeyPairId: "api_key_pair_id",
30
+ });
31
+ });
32
+
33
+ export function deleteApiKeyPairRequestToJSON(
34
+ deleteApiKeyPairRequest: DeleteApiKeyPairRequest,
35
+ ): string {
36
+ return JSON.stringify(
37
+ DeleteApiKeyPairRequest$outboundSchema.parse(deleteApiKeyPairRequest),
38
+ );
39
+ }
@@ -0,0 +1,39 @@
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
+
8
+ export type GetApiKeyPairRequest = {
9
+ /**
10
+ * The ID of the API key pair.
11
+ */
12
+ apiKeyPairId: string;
13
+ };
14
+
15
+ /** @internal */
16
+ export type GetApiKeyPairRequest$Outbound = {
17
+ api_key_pair_id: string;
18
+ };
19
+
20
+ /** @internal */
21
+ export const GetApiKeyPairRequest$outboundSchema: z.ZodType<
22
+ GetApiKeyPairRequest$Outbound,
23
+ z.ZodTypeDef,
24
+ GetApiKeyPairRequest
25
+ > = z.object({
26
+ apiKeyPairId: z.string(),
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ apiKeyPairId: "api_key_pair_id",
30
+ });
31
+ });
32
+
33
+ export function getApiKeyPairRequestToJSON(
34
+ getApiKeyPairRequest: GetApiKeyPairRequest,
35
+ ): string {
36
+ return JSON.stringify(
37
+ GetApiKeyPairRequest$outboundSchema.parse(getApiKeyPairRequest),
38
+ );
39
+ }
@@ -31,6 +31,7 @@ export * from "./createthreedsconfiguration.js";
31
31
  export * from "./createthreedsscenario.js";
32
32
  export * from "./createtransaction.js";
33
33
  export * from "./createtransactionrefund.js";
34
+ export * from "./deleteapikeypair.js";
34
35
  export * from "./deletebuyer.js";
35
36
  export * from "./deletebuyershippingdetails.js";
36
37
  export * from "./deletecheckoutsession.js";
@@ -44,6 +45,7 @@ export * from "./deletethreedsconfiguration.js";
44
45
  export * from "./deletethreedsscenario.js";
45
46
  export * from "./editthreedsconfiguration.js";
46
47
  export * from "./expirepaymentlink.js";
48
+ export * from "./getapikeypair.js";
47
49
  export * from "./getbuyer.js";
48
50
  export * from "./getbuyershippingdetails.js";
49
51
  export * from "./getcheckoutsession.js";
@@ -64,6 +66,7 @@ export * from "./gettransactioncapture.js";
64
66
  export * from "./gettransactionrefund.js";
65
67
  export * from "./gettransactionsettlement.js";
66
68
  export * from "./listallreportexecutions.js";
69
+ export * from "./listapikeypairs.js";
67
70
  export * from "./listauditlogs.js";
68
71
  export * from "./listbuyergiftcards.js";
69
72
  export * from "./listbuyerpaymentmethods.js";
@@ -97,6 +100,7 @@ export * from "./reviewpazemobilesession.js";
97
100
  export * from "./suspendpaymentmethodnetworktoken.js";
98
101
  export * from "./synctransaction.js";
99
102
  export * from "./unregisterdigitalwalletdomain.js";
103
+ export * from "./updateapikeypair.js";
100
104
  export * from "./updatebuyer.js";
101
105
  export * from "./updatebuyershippingdetails.js";
102
106
  export * from "./updatecheckoutsession.js";
@@ -0,0 +1,72 @@
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 ListApiKeyPairsRequest = {
13
+ /**
14
+ * A pointer to the page of results to return.
15
+ */
16
+ cursor?: string | null | undefined;
17
+ /**
18
+ * The maximum number of items that are returned.
19
+ */
20
+ limit?: number | undefined;
21
+ };
22
+
23
+ export type ListApiKeyPairsResponse = {
24
+ result: components.CollectionAPIKeyPair;
25
+ };
26
+
27
+ /** @internal */
28
+ export type ListApiKeyPairsRequest$Outbound = {
29
+ cursor?: string | null | undefined;
30
+ limit: number;
31
+ };
32
+
33
+ /** @internal */
34
+ export const ListApiKeyPairsRequest$outboundSchema: z.ZodType<
35
+ ListApiKeyPairsRequest$Outbound,
36
+ z.ZodTypeDef,
37
+ ListApiKeyPairsRequest
38
+ > = z.object({
39
+ cursor: z.nullable(z.string()).optional(),
40
+ limit: z.number().int().default(20),
41
+ });
42
+
43
+ export function listApiKeyPairsRequestToJSON(
44
+ listApiKeyPairsRequest: ListApiKeyPairsRequest,
45
+ ): string {
46
+ return JSON.stringify(
47
+ ListApiKeyPairsRequest$outboundSchema.parse(listApiKeyPairsRequest),
48
+ );
49
+ }
50
+
51
+ /** @internal */
52
+ export const ListApiKeyPairsResponse$inboundSchema: z.ZodType<
53
+ ListApiKeyPairsResponse,
54
+ z.ZodTypeDef,
55
+ unknown
56
+ > = z.object({
57
+ Result: components.CollectionAPIKeyPair$inboundSchema,
58
+ }).transform((v) => {
59
+ return remap$(v, {
60
+ "Result": "result",
61
+ });
62
+ });
63
+
64
+ export function listApiKeyPairsResponseFromJSON(
65
+ jsonString: string,
66
+ ): SafeParseResult<ListApiKeyPairsResponse, SDKValidationError> {
67
+ return safeParse(
68
+ jsonString,
69
+ (x) => ListApiKeyPairsResponse$inboundSchema.parse(JSON.parse(x)),
70
+ `Failed to parse 'ListApiKeyPairsResponse' from JSON`,
71
+ );
72
+ }
@@ -0,0 +1,44 @@
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 * as components from "../components/index.js";
8
+
9
+ export type UpdateApiKeyPairRequest = {
10
+ /**
11
+ * The ID of the API key pair.
12
+ */
13
+ apiKeyPairId: string;
14
+ apiKeyPairUpdate: components.APIKeyPairUpdate;
15
+ };
16
+
17
+ /** @internal */
18
+ export type UpdateApiKeyPairRequest$Outbound = {
19
+ api_key_pair_id: string;
20
+ APIKeyPairUpdate: components.APIKeyPairUpdate$Outbound;
21
+ };
22
+
23
+ /** @internal */
24
+ export const UpdateApiKeyPairRequest$outboundSchema: z.ZodType<
25
+ UpdateApiKeyPairRequest$Outbound,
26
+ z.ZodTypeDef,
27
+ UpdateApiKeyPairRequest
28
+ > = z.object({
29
+ apiKeyPairId: z.string(),
30
+ apiKeyPairUpdate: components.APIKeyPairUpdate$outboundSchema,
31
+ }).transform((v) => {
32
+ return remap$(v, {
33
+ apiKeyPairId: "api_key_pair_id",
34
+ apiKeyPairUpdate: "APIKeyPairUpdate",
35
+ });
36
+ });
37
+
38
+ export function updateApiKeyPairRequestToJSON(
39
+ updateApiKeyPairRequest: UpdateApiKeyPairRequest,
40
+ ): string {
41
+ return JSON.stringify(
42
+ UpdateApiKeyPairRequest$outboundSchema.parse(updateApiKeyPairRequest),
43
+ );
44
+ }
@@ -0,0 +1,107 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { apiKeyPairsCreate } from "../funcs/apiKeyPairsCreate.js";
6
+ import { apiKeyPairsDelete } from "../funcs/apiKeyPairsDelete.js";
7
+ import { apiKeyPairsGet } from "../funcs/apiKeyPairsGet.js";
8
+ import { apiKeyPairsList } from "../funcs/apiKeyPairsList.js";
9
+ import { apiKeyPairsUpdate } from "../funcs/apiKeyPairsUpdate.js";
10
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
11
+ import * as components from "../models/components/index.js";
12
+ import * as operations from "../models/operations/index.js";
13
+ import { unwrapAsync } from "../types/fp.js";
14
+ import { PageIterator, unwrapResultIterator } from "../types/operations.js";
15
+
16
+ export class ApiKeyPairs extends ClientSDK {
17
+ /**
18
+ * List all API key pairs
19
+ *
20
+ * @remarks
21
+ * List all API key pairs.
22
+ */
23
+ async list(
24
+ cursor?: string | null | undefined,
25
+ limit?: number | undefined,
26
+ options?: RequestOptions,
27
+ ): Promise<
28
+ PageIterator<operations.ListApiKeyPairsResponse, { cursor: string }>
29
+ > {
30
+ return unwrapResultIterator(apiKeyPairsList(
31
+ this,
32
+ cursor,
33
+ limit,
34
+ options,
35
+ ));
36
+ }
37
+
38
+ /**
39
+ * Create an API key pair
40
+ *
41
+ * @remarks
42
+ * Create a new API key pair.
43
+ */
44
+ async create(
45
+ request: components.APIKeyPairCreate,
46
+ options?: RequestOptions,
47
+ ): Promise<components.APIKeyPair> {
48
+ return unwrapAsync(apiKeyPairsCreate(
49
+ this,
50
+ request,
51
+ options,
52
+ ));
53
+ }
54
+
55
+ /**
56
+ * Get an API key pair
57
+ *
58
+ * @remarks
59
+ * Fetches an API key pair by its ID.
60
+ */
61
+ async get(
62
+ apiKeyPairId: string,
63
+ options?: RequestOptions,
64
+ ): Promise<components.APIKeyPair> {
65
+ return unwrapAsync(apiKeyPairsGet(
66
+ this,
67
+ apiKeyPairId,
68
+ options,
69
+ ));
70
+ }
71
+
72
+ /**
73
+ * Update an API key pair
74
+ *
75
+ * @remarks
76
+ * Updates an API key pair.
77
+ */
78
+ async update(
79
+ apiKeyPairUpdate: components.APIKeyPairUpdate,
80
+ apiKeyPairId: string,
81
+ options?: RequestOptions,
82
+ ): Promise<components.APIKeyPair> {
83
+ return unwrapAsync(apiKeyPairsUpdate(
84
+ this,
85
+ apiKeyPairUpdate,
86
+ apiKeyPairId,
87
+ options,
88
+ ));
89
+ }
90
+
91
+ /**
92
+ * Delete an API key pair
93
+ *
94
+ * @remarks
95
+ * Permanently removes an API key pair.
96
+ */
97
+ async delete(
98
+ apiKeyPairId: string,
99
+ options?: RequestOptions,
100
+ ): Promise<void> {
101
+ return unwrapAsync(apiKeyPairsDelete(
102
+ this,
103
+ apiKeyPairId,
104
+ options,
105
+ ));
106
+ }
107
+ }
@@ -53,7 +53,7 @@ export class MerchantAccounts extends ClientSDK {
53
53
  async create(
54
54
  request: components.MerchantAccountCreate,
55
55
  options?: RequestOptions,
56
- ): Promise<components.MerchantAccount> {
56
+ ): Promise<components.ApiRoutersMerchantAccountsSchemasMerchantAccount> {
57
57
  return unwrapAsync(merchantAccountsCreate(
58
58
  this,
59
59
  request,
@@ -70,7 +70,7 @@ export class MerchantAccounts extends ClientSDK {
70
70
  async get(
71
71
  merchantAccountId: string,
72
72
  options?: RequestOptions,
73
- ): Promise<components.MerchantAccount> {
73
+ ): Promise<components.ApiRoutersMerchantAccountsSchemasMerchantAccount> {
74
74
  return unwrapAsync(merchantAccountsGet(
75
75
  this,
76
76
  merchantAccountId,
@@ -88,7 +88,7 @@ export class MerchantAccounts extends ClientSDK {
88
88
  merchantAccountUpdate: components.MerchantAccountUpdate,
89
89
  merchantAccountId: string,
90
90
  options?: RequestOptions,
91
- ): Promise<components.MerchantAccount> {
91
+ ): Promise<components.ApiRoutersMerchantAccountsSchemasMerchantAccount> {
92
92
  return unwrapAsync(merchantAccountsUpdate(
93
93
  this,
94
94
  merchantAccountUpdate,
package/src/sdk/sdk.ts CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  import { ClientSDK } from "../lib/sdks.js";
6
6
  import { AccountUpdater } from "./accountupdater.js";
7
+ import { ApiKeyPairs } from "./apikeypairs.js";
7
8
  import { AuditLogs } from "./auditlogs.js";
8
9
  import { Buyers } from "./buyers.js";
9
10
  import { CardSchemeDefinitions } from "./cardschemedefinitions.js";
@@ -29,6 +30,11 @@ export class Gr4vy extends ClientSDK {
29
30
  return (this._accountUpdater ??= new AccountUpdater(this._options));
30
31
  }
31
32
 
33
+ private _apiKeyPairs?: ApiKeyPairs;
34
+ get apiKeyPairs(): ApiKeyPairs {
35
+ return (this._apiKeyPairs ??= new ApiKeyPairs(this._options));
36
+ }
37
+
32
38
  private _buyers?: Buyers;
33
39
  get buyers(): Buyers {
34
40
  return (this._buyers ??= new Buyers(this._options));
@@ -1,12 +0,0 @@
1
- import * as z from "zod/v3";
2
- import { Result as SafeParseResult } from "../../types/fp.js";
3
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
- export type Creator = {
5
- id: string;
6
- name: string;
7
- emailAddress: string;
8
- };
9
- /** @internal */
10
- export declare const Creator$inboundSchema: z.ZodType<Creator, z.ZodTypeDef, unknown>;
11
- export declare function creatorFromJSON(jsonString: string): SafeParseResult<Creator, SDKValidationError>;
12
- //# sourceMappingURL=creator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"creator.d.ts","sourceRoot":"","sources":["../../src/models/components/creator.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CASxE,CAAC;AAEL,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAM9C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"creator.js","sourceRoot":"","sources":["../../src/models/components/creator.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BH,0CAQC;AAhCD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAUjD,gBAAgB;AACH,QAAA,qBAAqB,GAChC,CAAC,CAAC,MAAM,CAAC;IACP,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,CAAC,CAAC,MA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CAC9C,CAAC;AACJ,CAAC"}
@@ -1,37 +0,0 @@
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
-
11
- export type Creator = {
12
- id: string;
13
- name: string;
14
- emailAddress: string;
15
- };
16
-
17
- /** @internal */
18
- export const Creator$inboundSchema: z.ZodType<Creator, z.ZodTypeDef, unknown> =
19
- z.object({
20
- id: z.string(),
21
- name: z.string(),
22
- email_address: z.string(),
23
- }).transform((v) => {
24
- return remap$(v, {
25
- "email_address": "emailAddress",
26
- });
27
- });
28
-
29
- export function creatorFromJSON(
30
- jsonString: string,
31
- ): SafeParseResult<Creator, SDKValidationError> {
32
- return safeParse(
33
- jsonString,
34
- (x) => Creator$inboundSchema.parse(JSON.parse(x)),
35
- `Failed to parse 'Creator' from JSON`,
36
- );
37
- }