@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.
- package/README.md +14 -1
- package/funcs/apiKeyPairsCreate.d.ts +18 -0
- package/funcs/apiKeyPairsCreate.d.ts.map +1 -0
- package/funcs/apiKeyPairsCreate.js +119 -0
- package/funcs/apiKeyPairsCreate.js.map +1 -0
- package/funcs/apiKeyPairsDelete.d.ts +17 -0
- package/funcs/apiKeyPairsDelete.d.ts.map +1 -0
- package/funcs/apiKeyPairsDelete.js +128 -0
- package/funcs/apiKeyPairsDelete.js.map +1 -0
- package/funcs/apiKeyPairsGet.d.ts +18 -0
- package/funcs/apiKeyPairsGet.d.ts.map +1 -0
- package/funcs/apiKeyPairsGet.js +138 -0
- package/funcs/apiKeyPairsGet.js.map +1 -0
- package/funcs/apiKeyPairsList.d.ts +21 -0
- package/funcs/apiKeyPairsList.d.ts.map +1 -0
- package/funcs/apiKeyPairsList.js +160 -0
- package/funcs/apiKeyPairsList.js.map +1 -0
- package/funcs/apiKeyPairsUpdate.d.ts +18 -0
- package/funcs/apiKeyPairsUpdate.d.ts.map +1 -0
- package/funcs/apiKeyPairsUpdate.js +130 -0
- package/funcs/apiKeyPairsUpdate.js.map +1 -0
- package/funcs/merchantAccountsCreate.d.ts +1 -1
- package/funcs/merchantAccountsCreate.d.ts.map +1 -1
- package/funcs/merchantAccountsCreate.js +1 -1
- package/funcs/merchantAccountsCreate.js.map +1 -1
- package/funcs/merchantAccountsGet.d.ts +1 -1
- package/funcs/merchantAccountsGet.d.ts.map +1 -1
- package/funcs/merchantAccountsGet.js +1 -1
- package/funcs/merchantAccountsGet.js.map +1 -1
- package/funcs/merchantAccountsUpdate.d.ts +1 -1
- package/funcs/merchantAccountsUpdate.d.ts.map +1 -1
- package/funcs/merchantAccountsUpdate.js +1 -1
- package/funcs/merchantAccountsUpdate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/apicommonschemascreator.d.ts +12 -0
- package/models/components/apicommonschemascreator.d.ts.map +1 -0
- package/models/components/{creator.js → apicommonschemascreator.js} +6 -6
- package/models/components/apicommonschemascreator.js.map +1 -0
- package/models/components/apicommonschemasmerchantaccount.d.ts +16 -0
- package/models/components/apicommonschemasmerchantaccount.d.ts.map +1 -0
- package/models/components/apicommonschemasmerchantaccount.js +65 -0
- package/models/components/apicommonschemasmerchantaccount.js.map +1 -0
- package/models/components/apikeypair.d.ts +58 -0
- package/models/components/apikeypair.d.ts.map +1 -0
- package/models/components/apikeypair.js +76 -0
- package/models/components/apikeypair.js.map +1 -0
- package/models/components/apikeypaircreate.d.ts +38 -0
- package/models/components/apikeypaircreate.d.ts.map +1 -0
- package/models/components/apikeypaircreate.js +63 -0
- package/models/components/apikeypaircreate.js.map +1 -0
- package/models/components/apikeypairupdate.d.ts +27 -0
- package/models/components/apikeypairupdate.d.ts.map +1 -0
- package/models/components/apikeypairupdate.js +59 -0
- package/models/components/apikeypairupdate.js.map +1 -0
- package/models/components/apiroutersapikeypairsschemascreator.d.ts +25 -0
- package/models/components/apiroutersapikeypairsschemascreator.d.ts.map +1 -0
- package/models/components/apiroutersapikeypairsschemascreator.js +58 -0
- package/models/components/apiroutersapikeypairsschemascreator.js.map +1 -0
- package/models/components/{merchantaccount.d.ts → apiroutersmerchantaccountsschemasmerchantaccount.d.ts} +4 -4
- package/models/components/apiroutersmerchantaccountsschemasmerchantaccount.d.ts.map +1 -0
- package/models/components/{merchantaccount.js → apiroutersmerchantaccountsschemasmerchantaccount.js} +10 -8
- package/models/components/apiroutersmerchantaccountsschemasmerchantaccount.js.map +1 -0
- package/models/components/certificatealgorithm.d.ts +12 -0
- package/models/components/certificatealgorithm.d.ts.map +1 -0
- package/models/components/certificatealgorithm.js +49 -0
- package/models/components/certificatealgorithm.js.map +1 -0
- package/models/components/collectionapikeypair.d.ts +26 -0
- package/models/components/collectionapikeypair.d.ts.map +1 -0
- package/models/components/collectionapikeypair.js +60 -0
- package/models/components/collectionapikeypair.js.map +1 -0
- package/models/components/index.d.ts +11 -2
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +11 -2
- package/models/components/index.js.map +1 -1
- package/models/components/merchantaccounts.d.ts +2 -2
- package/models/components/merchantaccounts.d.ts.map +1 -1
- package/models/components/merchantaccounts.js +2 -2
- package/models/components/merchantaccounts.js.map +1 -1
- package/models/components/permissionset.d.ts +10 -0
- package/models/components/permissionset.d.ts.map +1 -0
- package/models/components/permissionset.js +50 -0
- package/models/components/permissionset.js.map +1 -0
- package/models/components/refund.d.ts +2 -2
- package/models/components/refund.d.ts.map +1 -1
- package/models/components/refund.js +2 -2
- package/models/components/refund.js.map +1 -1
- package/models/components/role.d.ts +15 -0
- package/models/components/role.d.ts.map +1 -0
- package/models/components/role.js +56 -0
- package/models/components/role.js.map +1 -0
- package/models/operations/deleteapikeypair.d.ts +15 -0
- package/models/operations/deleteapikeypair.d.ts.map +1 -0
- package/models/operations/deleteapikeypair.js +54 -0
- package/models/operations/deleteapikeypair.js.map +1 -0
- package/models/operations/getapikeypair.d.ts +15 -0
- package/models/operations/getapikeypair.d.ts.map +1 -0
- package/models/operations/getapikeypair.js +54 -0
- package/models/operations/getapikeypair.js.map +1 -0
- package/models/operations/index.d.ts +4 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +4 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listapikeypairs.d.ts +29 -0
- package/models/operations/listapikeypairs.d.ts.map +1 -0
- package/models/operations/listapikeypairs.js +65 -0
- package/models/operations/listapikeypairs.js.map +1 -0
- package/models/operations/updateapikeypair.d.ts +18 -0
- package/models/operations/updateapikeypair.d.ts.map +1 -0
- package/models/operations/updateapikeypair.js +57 -0
- package/models/operations/updateapikeypair.js.map +1 -0
- package/package.json +1 -1
- package/sdk/apikeypairs.d.ts +44 -0
- package/sdk/apikeypairs.d.ts.map +1 -0
- package/sdk/apikeypairs.js +63 -0
- package/sdk/apikeypairs.js.map +1 -0
- package/sdk/merchantaccounts.d.ts +3 -3
- package/sdk/merchantaccounts.d.ts.map +1 -1
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/apiKeyPairsCreate.ts +215 -0
- package/src/funcs/apiKeyPairsDelete.ts +225 -0
- package/src/funcs/apiKeyPairsGet.ts +235 -0
- package/src/funcs/apiKeyPairsList.ts +312 -0
- package/src/funcs/apiKeyPairsUpdate.ts +230 -0
- package/src/funcs/merchantAccountsCreate.ts +7 -4
- package/src/funcs/merchantAccountsGet.ts +7 -4
- package/src/funcs/merchantAccountsUpdate.ts +7 -4
- package/src/lib/config.ts +3 -3
- package/src/models/components/apicommonschemascreator.ts +40 -0
- package/src/models/components/apicommonschemasmerchantaccount.ts +52 -0
- package/src/models/components/apikeypair.ts +110 -0
- package/src/models/components/apikeypaircreate.ts +73 -0
- package/src/models/components/apikeypairupdate.ts +56 -0
- package/src/models/components/apiroutersapikeypairsschemascreator.ts +55 -0
- package/src/models/components/{merchantaccount.ts → apiroutersmerchantaccountsschemasmerchantaccount.ts} +79 -65
- package/src/models/components/certificatealgorithm.ts +26 -0
- package/src/models/components/collectionapikeypair.ts +56 -0
- package/src/models/components/index.ts +11 -2
- package/src/models/components/merchantaccounts.ts +7 -5
- package/src/models/components/permissionset.ts +31 -0
- package/src/models/components/refund.ts +6 -3
- package/src/models/components/role.ts +37 -0
- package/src/models/operations/deleteapikeypair.ts +39 -0
- package/src/models/operations/getapikeypair.ts +39 -0
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/listapikeypairs.ts +72 -0
- package/src/models/operations/updateapikeypair.ts +44 -0
- package/src/sdk/apikeypairs.ts +107 -0
- package/src/sdk/merchantaccounts.ts +3 -3
- package/src/sdk/sdk.ts +6 -0
- package/models/components/creator.d.ts +0 -12
- package/models/components/creator.d.ts.map +0 -1
- package/models/components/creator.js.map +0 -1
- package/models/components/merchantaccount.d.ts.map +0 -1
- package/models/components/merchantaccount.js.map +0 -1
- package/src/models/components/creator.ts +0 -37
|
@@ -0,0 +1,52 @@
|
|
|
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 ApiCommonSchemasMerchantAccount = {
|
|
12
|
+
type: "merchant-account";
|
|
13
|
+
id: string;
|
|
14
|
+
displayName: string;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
updatedAt: Date;
|
|
17
|
+
overCaptureAmount?: number | null | undefined;
|
|
18
|
+
overCapturePercentage?: number | null | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const ApiCommonSchemasMerchantAccount$inboundSchema: z.ZodType<
|
|
23
|
+
ApiCommonSchemasMerchantAccount,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
type: z.literal("merchant-account").default("merchant-account"),
|
|
28
|
+
id: z.string(),
|
|
29
|
+
display_name: z.string(),
|
|
30
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
31
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
32
|
+
over_capture_amount: z.nullable(z.number().int()).optional(),
|
|
33
|
+
over_capture_percentage: z.nullable(z.number().int()).optional(),
|
|
34
|
+
}).transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
"display_name": "displayName",
|
|
37
|
+
"created_at": "createdAt",
|
|
38
|
+
"updated_at": "updatedAt",
|
|
39
|
+
"over_capture_amount": "overCaptureAmount",
|
|
40
|
+
"over_capture_percentage": "overCapturePercentage",
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export function apiCommonSchemasMerchantAccountFromJSON(
|
|
45
|
+
jsonString: string,
|
|
46
|
+
): SafeParseResult<ApiCommonSchemasMerchantAccount, SDKValidationError> {
|
|
47
|
+
return safeParse(
|
|
48
|
+
jsonString,
|
|
49
|
+
(x) => ApiCommonSchemasMerchantAccount$inboundSchema.parse(JSON.parse(x)),
|
|
50
|
+
`Failed to parse 'ApiCommonSchemasMerchantAccount' from JSON`,
|
|
51
|
+
);
|
|
52
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
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
|
+
import {
|
|
11
|
+
ApiCommonSchemasMerchantAccount,
|
|
12
|
+
ApiCommonSchemasMerchantAccount$inboundSchema,
|
|
13
|
+
} from "./apicommonschemasmerchantaccount.js";
|
|
14
|
+
import {
|
|
15
|
+
ApiRoutersApiKeyPairsSchemasCreator,
|
|
16
|
+
ApiRoutersApiKeyPairsSchemasCreator$inboundSchema,
|
|
17
|
+
} from "./apiroutersapikeypairsschemascreator.js";
|
|
18
|
+
import {
|
|
19
|
+
CertificateAlgorithm,
|
|
20
|
+
CertificateAlgorithm$inboundSchema,
|
|
21
|
+
} from "./certificatealgorithm.js";
|
|
22
|
+
import { Role, Role$inboundSchema } from "./role.js";
|
|
23
|
+
|
|
24
|
+
export type APIKeyPair = {
|
|
25
|
+
/**
|
|
26
|
+
* The type of this resource.
|
|
27
|
+
*/
|
|
28
|
+
type: "api-key-pair";
|
|
29
|
+
/**
|
|
30
|
+
* The ID for the API key pair.
|
|
31
|
+
*/
|
|
32
|
+
id: string;
|
|
33
|
+
/**
|
|
34
|
+
* The unique thumbprint that identifies the API key pair.
|
|
35
|
+
*/
|
|
36
|
+
thumbprint: string;
|
|
37
|
+
/**
|
|
38
|
+
* The display name for the API key pair.
|
|
39
|
+
*/
|
|
40
|
+
displayName: string;
|
|
41
|
+
algorithm: CertificateAlgorithm;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the API key pair is active and can be used to authenticate.
|
|
44
|
+
*/
|
|
45
|
+
active: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* The PEM-encoded private key. Only returned once, in the response to creating the API key pair, and only when Gr4vy generated the key pair. Store it securely, as it cannot be retrieved later.
|
|
48
|
+
*/
|
|
49
|
+
privateKey?: string | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* The date and time when this API key pair was created.
|
|
52
|
+
*/
|
|
53
|
+
createdAt: Date;
|
|
54
|
+
/**
|
|
55
|
+
* The date and time when this API key pair was last updated.
|
|
56
|
+
*/
|
|
57
|
+
updatedAt: Date;
|
|
58
|
+
/**
|
|
59
|
+
* The user or API key pair that created this API key pair.
|
|
60
|
+
*/
|
|
61
|
+
creator?: ApiRoutersApiKeyPairsSchemasCreator | null | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* The merchant accounts this API key pair has access to. An empty list means it has access to all merchant accounts.
|
|
64
|
+
*/
|
|
65
|
+
merchantAccounts?: Array<ApiCommonSchemasMerchantAccount> | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* The roles assigned to this API key pair.
|
|
68
|
+
*/
|
|
69
|
+
roles?: Array<Role> | undefined;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export const APIKeyPair$inboundSchema: z.ZodType<
|
|
74
|
+
APIKeyPair,
|
|
75
|
+
z.ZodTypeDef,
|
|
76
|
+
unknown
|
|
77
|
+
> = z.object({
|
|
78
|
+
type: z.literal("api-key-pair").default("api-key-pair"),
|
|
79
|
+
id: z.string(),
|
|
80
|
+
thumbprint: z.string(),
|
|
81
|
+
display_name: z.string(),
|
|
82
|
+
algorithm: CertificateAlgorithm$inboundSchema,
|
|
83
|
+
active: z.boolean(),
|
|
84
|
+
private_key: z.nullable(z.string()).optional(),
|
|
85
|
+
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
86
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
87
|
+
creator: z.nullable(ApiRoutersApiKeyPairsSchemasCreator$inboundSchema)
|
|
88
|
+
.optional(),
|
|
89
|
+
merchant_accounts: z.array(ApiCommonSchemasMerchantAccount$inboundSchema)
|
|
90
|
+
.optional(),
|
|
91
|
+
roles: z.array(Role$inboundSchema).optional(),
|
|
92
|
+
}).transform((v) => {
|
|
93
|
+
return remap$(v, {
|
|
94
|
+
"display_name": "displayName",
|
|
95
|
+
"private_key": "privateKey",
|
|
96
|
+
"created_at": "createdAt",
|
|
97
|
+
"updated_at": "updatedAt",
|
|
98
|
+
"merchant_accounts": "merchantAccounts",
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
export function apiKeyPairFromJSON(
|
|
103
|
+
jsonString: string,
|
|
104
|
+
): SafeParseResult<APIKeyPair, SDKValidationError> {
|
|
105
|
+
return safeParse(
|
|
106
|
+
jsonString,
|
|
107
|
+
(x) => APIKeyPair$inboundSchema.parse(JSON.parse(x)),
|
|
108
|
+
`Failed to parse 'APIKeyPair' from JSON`,
|
|
109
|
+
);
|
|
110
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
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 {
|
|
8
|
+
CertificateAlgorithm,
|
|
9
|
+
CertificateAlgorithm$outboundSchema,
|
|
10
|
+
} from "./certificatealgorithm.js";
|
|
11
|
+
|
|
12
|
+
export type APIKeyPairCreate = {
|
|
13
|
+
/**
|
|
14
|
+
* The display name for the API key pair.
|
|
15
|
+
*/
|
|
16
|
+
displayName: string;
|
|
17
|
+
algorithm?: CertificateAlgorithm | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the API key pair should be active and usable once created.
|
|
20
|
+
*/
|
|
21
|
+
active?: boolean | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* The ID of the role to assign to the API key pair. Exactly one role is supported. The caller can only assign a role whose scopes are a subset of its own.
|
|
24
|
+
*/
|
|
25
|
+
roleIds: Array<string>;
|
|
26
|
+
/**
|
|
27
|
+
* The IDs of the merchant accounts to associate with the API key pair. An empty list grants access to all merchant accounts. The caller can only assign merchant accounts it has access to.
|
|
28
|
+
*/
|
|
29
|
+
merchantAccountIds?: Array<string> | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* A PEM-encoded ECDSA P-521 (ES512) public key. Provide this to register your own key pair (bring your own key); If omitted, Gr4vy will generate the key pair and return the private key.
|
|
32
|
+
*/
|
|
33
|
+
publicKey?: string | null | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export type APIKeyPairCreate$Outbound = {
|
|
38
|
+
display_name: string;
|
|
39
|
+
algorithm?: string | undefined;
|
|
40
|
+
active: boolean;
|
|
41
|
+
role_ids: Array<string>;
|
|
42
|
+
merchant_account_ids?: Array<string> | undefined;
|
|
43
|
+
public_key?: string | null | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const APIKeyPairCreate$outboundSchema: z.ZodType<
|
|
48
|
+
APIKeyPairCreate$Outbound,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
APIKeyPairCreate
|
|
51
|
+
> = z.object({
|
|
52
|
+
displayName: z.string(),
|
|
53
|
+
algorithm: CertificateAlgorithm$outboundSchema.optional(),
|
|
54
|
+
active: z.boolean().default(true),
|
|
55
|
+
roleIds: z.array(z.string()),
|
|
56
|
+
merchantAccountIds: z.array(z.string()).optional(),
|
|
57
|
+
publicKey: z.nullable(z.string()).optional(),
|
|
58
|
+
}).transform((v) => {
|
|
59
|
+
return remap$(v, {
|
|
60
|
+
displayName: "display_name",
|
|
61
|
+
roleIds: "role_ids",
|
|
62
|
+
merchantAccountIds: "merchant_account_ids",
|
|
63
|
+
publicKey: "public_key",
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
export function apiKeyPairCreateToJSON(
|
|
68
|
+
apiKeyPairCreate: APIKeyPairCreate,
|
|
69
|
+
): string {
|
|
70
|
+
return JSON.stringify(
|
|
71
|
+
APIKeyPairCreate$outboundSchema.parse(apiKeyPairCreate),
|
|
72
|
+
);
|
|
73
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 APIKeyPairUpdate = {
|
|
9
|
+
/**
|
|
10
|
+
* The display name for the API key pair.
|
|
11
|
+
*/
|
|
12
|
+
displayName?: string | null | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the API key pair is active and can be used to authenticate.
|
|
15
|
+
*/
|
|
16
|
+
active?: boolean | null | undefined;
|
|
17
|
+
roleIds?: Array<string> | null | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* The IDs of the merchant accounts to associate with the API key pair. The caller can only assign merchant accounts it has access to.
|
|
20
|
+
*/
|
|
21
|
+
merchantAccountIds?: Array<string> | null | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export type APIKeyPairUpdate$Outbound = {
|
|
26
|
+
display_name?: string | null | undefined;
|
|
27
|
+
active?: boolean | null | undefined;
|
|
28
|
+
role_ids?: Array<string> | null | undefined;
|
|
29
|
+
merchant_account_ids?: Array<string> | null | undefined;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const APIKeyPairUpdate$outboundSchema: z.ZodType<
|
|
34
|
+
APIKeyPairUpdate$Outbound,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
APIKeyPairUpdate
|
|
37
|
+
> = z.object({
|
|
38
|
+
displayName: z.nullable(z.string()).optional(),
|
|
39
|
+
active: z.nullable(z.boolean()).optional(),
|
|
40
|
+
roleIds: z.nullable(z.array(z.string())).optional(),
|
|
41
|
+
merchantAccountIds: z.nullable(z.array(z.string())).optional(),
|
|
42
|
+
}).transform((v) => {
|
|
43
|
+
return remap$(v, {
|
|
44
|
+
displayName: "display_name",
|
|
45
|
+
roleIds: "role_ids",
|
|
46
|
+
merchantAccountIds: "merchant_account_ids",
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
export function apiKeyPairUpdateToJSON(
|
|
51
|
+
apiKeyPairUpdate: APIKeyPairUpdate,
|
|
52
|
+
): string {
|
|
53
|
+
return JSON.stringify(
|
|
54
|
+
APIKeyPairUpdate$outboundSchema.parse(apiKeyPairUpdate),
|
|
55
|
+
);
|
|
56
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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 ApiRoutersApiKeyPairsSchemasCreator = {
|
|
12
|
+
/**
|
|
13
|
+
* The ID of the user or API key pair that created the API key pair.
|
|
14
|
+
*/
|
|
15
|
+
id: string;
|
|
16
|
+
/**
|
|
17
|
+
* The name of the user or API key pair that created the API key pair.
|
|
18
|
+
*/
|
|
19
|
+
name: string;
|
|
20
|
+
/**
|
|
21
|
+
* The email address of the user that created the API key pair, when it was created by a dashboard user.
|
|
22
|
+
*/
|
|
23
|
+
emailAddress?: string | null | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* The thumbprint of the API key pair that created the API key pair, when it was created by another API key.
|
|
26
|
+
*/
|
|
27
|
+
thumbprint?: string | null | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const ApiRoutersApiKeyPairsSchemasCreator$inboundSchema: z.ZodType<
|
|
32
|
+
ApiRoutersApiKeyPairsSchemasCreator,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
id: z.string(),
|
|
37
|
+
name: z.string(),
|
|
38
|
+
email_address: z.nullable(z.string()).optional(),
|
|
39
|
+
thumbprint: z.nullable(z.string()).optional(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"email_address": "emailAddress",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export function apiRoutersApiKeyPairsSchemasCreatorFromJSON(
|
|
47
|
+
jsonString: string,
|
|
48
|
+
): SafeParseResult<ApiRoutersApiKeyPairsSchemasCreator, SDKValidationError> {
|
|
49
|
+
return safeParse(
|
|
50
|
+
jsonString,
|
|
51
|
+
(x) =>
|
|
52
|
+
ApiRoutersApiKeyPairsSchemasCreator$inboundSchema.parse(JSON.parse(x)),
|
|
53
|
+
`Failed to parse 'ApiRoutersApiKeyPairsSchemasCreator' from JSON`,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -9,7 +9,7 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import { CardScheme, CardScheme$inboundSchema } from "./cardscheme.js";
|
|
11
11
|
|
|
12
|
-
export type
|
|
12
|
+
export type ApiRoutersMerchantAccountsSchemasMerchantAccount = {
|
|
13
13
|
/**
|
|
14
14
|
* Always `merchant-account`.
|
|
15
15
|
*/
|
|
@@ -109,74 +109,88 @@ export type MerchantAccount = {
|
|
|
109
109
|
};
|
|
110
110
|
|
|
111
111
|
/** @internal */
|
|
112
|
-
export const
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
"
|
|
152
|
-
|
|
153
|
-
"
|
|
154
|
-
|
|
155
|
-
"
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
"
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
112
|
+
export const ApiRoutersMerchantAccountsSchemasMerchantAccount$inboundSchema:
|
|
113
|
+
z.ZodType<
|
|
114
|
+
ApiRoutersMerchantAccountsSchemasMerchantAccount,
|
|
115
|
+
z.ZodTypeDef,
|
|
116
|
+
unknown
|
|
117
|
+
> = z.object({
|
|
118
|
+
type: z.literal("merchant-account").default("merchant-account"),
|
|
119
|
+
id: z.string(),
|
|
120
|
+
display_name: z.string(),
|
|
121
|
+
loon_client_key: z.nullable(z.string()).optional(),
|
|
122
|
+
loon_secret_key: z.nullable(z.string()).optional(),
|
|
123
|
+
loon_accepted_schemes: z.nullable(z.array(CardScheme$inboundSchema))
|
|
124
|
+
.optional(),
|
|
125
|
+
account_updater_request_encryption_key: z.nullable(z.string()).optional(),
|
|
126
|
+
account_updater_request_encryption_key_id: z.nullable(z.string())
|
|
127
|
+
.optional(),
|
|
128
|
+
account_updater_response_decryption_key: z.nullable(z.string()).optional(),
|
|
129
|
+
account_updater_response_decryption_key_id: z.nullable(z.string())
|
|
130
|
+
.optional(),
|
|
131
|
+
account_updater_enabled: z.boolean(),
|
|
132
|
+
over_capture_amount: z.nullable(z.number().int()).optional(),
|
|
133
|
+
over_capture_percentage: z.nullable(z.number().int()).optional(),
|
|
134
|
+
visa_network_tokens_requestor_id: z.nullable(z.string()).optional(),
|
|
135
|
+
visa_network_tokens_app_id: z.nullable(z.string()).optional(),
|
|
136
|
+
amex_network_tokens_requestor_id: z.nullable(z.string()).optional(),
|
|
137
|
+
amex_network_tokens_app_id: z.nullable(z.string()).optional(),
|
|
138
|
+
mastercard_network_tokens_requestor_id: z.nullable(z.string()).optional(),
|
|
139
|
+
mastercard_network_tokens_app_id: z.nullable(z.string()).optional(),
|
|
140
|
+
discover_network_tokens_requestor_id: z.nullable(z.string()).optional(),
|
|
141
|
+
discover_network_tokens_app_id: z.nullable(z.string()).optional(),
|
|
142
|
+
async_network_tokens_enabled: z.boolean().default(false),
|
|
143
|
+
created_at: z.string().datetime({ offset: true }).transform(v =>
|
|
144
|
+
new Date(v)
|
|
145
|
+
),
|
|
146
|
+
updated_at: z.string().datetime({ offset: true }).transform(v =>
|
|
147
|
+
new Date(v)
|
|
148
|
+
),
|
|
149
|
+
}).transform((v) => {
|
|
150
|
+
return remap$(v, {
|
|
151
|
+
"display_name": "displayName",
|
|
152
|
+
"loon_client_key": "loonClientKey",
|
|
153
|
+
"loon_secret_key": "loonSecretKey",
|
|
154
|
+
"loon_accepted_schemes": "loonAcceptedSchemes",
|
|
155
|
+
"account_updater_request_encryption_key":
|
|
156
|
+
"accountUpdaterRequestEncryptionKey",
|
|
157
|
+
"account_updater_request_encryption_key_id":
|
|
158
|
+
"accountUpdaterRequestEncryptionKeyId",
|
|
159
|
+
"account_updater_response_decryption_key":
|
|
160
|
+
"accountUpdaterResponseDecryptionKey",
|
|
161
|
+
"account_updater_response_decryption_key_id":
|
|
162
|
+
"accountUpdaterResponseDecryptionKeyId",
|
|
163
|
+
"account_updater_enabled": "accountUpdaterEnabled",
|
|
164
|
+
"over_capture_amount": "overCaptureAmount",
|
|
165
|
+
"over_capture_percentage": "overCapturePercentage",
|
|
166
|
+
"visa_network_tokens_requestor_id": "visaNetworkTokensRequestorId",
|
|
167
|
+
"visa_network_tokens_app_id": "visaNetworkTokensAppId",
|
|
168
|
+
"amex_network_tokens_requestor_id": "amexNetworkTokensRequestorId",
|
|
169
|
+
"amex_network_tokens_app_id": "amexNetworkTokensAppId",
|
|
170
|
+
"mastercard_network_tokens_requestor_id":
|
|
171
|
+
"mastercardNetworkTokensRequestorId",
|
|
172
|
+
"mastercard_network_tokens_app_id": "mastercardNetworkTokensAppId",
|
|
173
|
+
"discover_network_tokens_requestor_id":
|
|
174
|
+
"discoverNetworkTokensRequestorId",
|
|
175
|
+
"discover_network_tokens_app_id": "discoverNetworkTokensAppId",
|
|
176
|
+
"async_network_tokens_enabled": "asyncNetworkTokensEnabled",
|
|
177
|
+
"created_at": "createdAt",
|
|
178
|
+
"updated_at": "updatedAt",
|
|
179
|
+
});
|
|
171
180
|
});
|
|
172
|
-
});
|
|
173
181
|
|
|
174
|
-
export function
|
|
182
|
+
export function apiRoutersMerchantAccountsSchemasMerchantAccountFromJSON(
|
|
175
183
|
jsonString: string,
|
|
176
|
-
): SafeParseResult<
|
|
184
|
+
): SafeParseResult<
|
|
185
|
+
ApiRoutersMerchantAccountsSchemasMerchantAccount,
|
|
186
|
+
SDKValidationError
|
|
187
|
+
> {
|
|
177
188
|
return safeParse(
|
|
178
189
|
jsonString,
|
|
179
|
-
(x) =>
|
|
180
|
-
|
|
190
|
+
(x) =>
|
|
191
|
+
ApiRoutersMerchantAccountsSchemasMerchantAccount$inboundSchema.parse(
|
|
192
|
+
JSON.parse(x),
|
|
193
|
+
),
|
|
194
|
+
`Failed to parse 'ApiRoutersMerchantAccountsSchemasMerchantAccount' from JSON`,
|
|
181
195
|
);
|
|
182
196
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import * as openEnums from "../../types/enums.js";
|
|
7
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
8
|
+
|
|
9
|
+
export const CertificateAlgorithm = {
|
|
10
|
+
Ecdsa: "ECDSA",
|
|
11
|
+
Rsa: "RSA",
|
|
12
|
+
} as const;
|
|
13
|
+
export type CertificateAlgorithm = OpenEnum<typeof CertificateAlgorithm>;
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const CertificateAlgorithm$inboundSchema: z.ZodType<
|
|
17
|
+
CertificateAlgorithm,
|
|
18
|
+
z.ZodTypeDef,
|
|
19
|
+
unknown
|
|
20
|
+
> = openEnums.inboundSchema(CertificateAlgorithm);
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const CertificateAlgorithm$outboundSchema: z.ZodType<
|
|
23
|
+
string,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
CertificateAlgorithm
|
|
26
|
+
> = openEnums.outboundSchema(CertificateAlgorithm);
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
import { APIKeyPair, APIKeyPair$inboundSchema } from "./apikeypair.js";
|
|
11
|
+
|
|
12
|
+
export type CollectionAPIKeyPair = {
|
|
13
|
+
/**
|
|
14
|
+
* A list of items returned for this request.
|
|
15
|
+
*/
|
|
16
|
+
items: Array<APIKeyPair>;
|
|
17
|
+
/**
|
|
18
|
+
* The number of items for this page.
|
|
19
|
+
*/
|
|
20
|
+
limit: number;
|
|
21
|
+
/**
|
|
22
|
+
* The cursor pointing at the next page of items.
|
|
23
|
+
*/
|
|
24
|
+
nextCursor?: string | null | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The cursor pointing at the previous page of items.
|
|
27
|
+
*/
|
|
28
|
+
previousCursor?: string | null | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const CollectionAPIKeyPair$inboundSchema: z.ZodType<
|
|
33
|
+
CollectionAPIKeyPair,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
unknown
|
|
36
|
+
> = z.object({
|
|
37
|
+
items: z.array(APIKeyPair$inboundSchema),
|
|
38
|
+
limit: z.number().int().default(20),
|
|
39
|
+
next_cursor: z.nullable(z.string()).optional(),
|
|
40
|
+
previous_cursor: z.nullable(z.string()).optional(),
|
|
41
|
+
}).transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
"next_cursor": "nextCursor",
|
|
44
|
+
"previous_cursor": "previousCursor",
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export function collectionAPIKeyPairFromJSON(
|
|
49
|
+
jsonString: string,
|
|
50
|
+
): SafeParseResult<CollectionAPIKeyPair, SDKValidationError> {
|
|
51
|
+
return safeParse(
|
|
52
|
+
jsonString,
|
|
53
|
+
(x) => CollectionAPIKeyPair$inboundSchema.parse(JSON.parse(x)),
|
|
54
|
+
`Failed to parse 'CollectionAPIKeyPair' from JSON`,
|
|
55
|
+
);
|
|
56
|
+
}
|
|
@@ -25,6 +25,13 @@ export * from "./airline.js";
|
|
|
25
25
|
export * from "./airlineleg.js";
|
|
26
26
|
export * from "./airlinepassenger.js";
|
|
27
27
|
export * from "./antifrauddecision.js";
|
|
28
|
+
export * from "./apicommonschemascreator.js";
|
|
29
|
+
export * from "./apicommonschemasmerchantaccount.js";
|
|
30
|
+
export * from "./apikeypair.js";
|
|
31
|
+
export * from "./apikeypaircreate.js";
|
|
32
|
+
export * from "./apikeypairupdate.js";
|
|
33
|
+
export * from "./apiroutersapikeypairsschemascreator.js";
|
|
34
|
+
export * from "./apiroutersmerchantaccountsschemasmerchantaccount.js";
|
|
28
35
|
export * from "./apitypesdigitalwalletaddress.js";
|
|
29
36
|
export * from "./applepaypaymentmethodcreate.js";
|
|
30
37
|
export * from "./applepaysessionrequest.js";
|
|
@@ -57,6 +64,7 @@ export * from "./cardschemedefinitions.js";
|
|
|
57
64
|
export * from "./cardtype.js";
|
|
58
65
|
export * from "./cardwithurlpaymentmethodcreate.js";
|
|
59
66
|
export * from "./cartitem.js";
|
|
67
|
+
export * from "./certificatealgorithm.js";
|
|
60
68
|
export * from "./chaseoptions.js";
|
|
61
69
|
export * from "./checkoutpayoutoptions.js";
|
|
62
70
|
export * from "./checkoutsession.js";
|
|
@@ -69,9 +77,9 @@ export * from "./clicktopayfpanpaymentmethodcreate.js";
|
|
|
69
77
|
export * from "./clicktopaypaymentmethodcreate.js";
|
|
70
78
|
export * from "./clicktopaysession.js";
|
|
71
79
|
export * from "./clicktopaysessionrequest.js";
|
|
80
|
+
export * from "./collectionapikeypair.js";
|
|
72
81
|
export * from "./createsession.js";
|
|
73
82
|
export * from "./createsessionstatus.js";
|
|
74
|
-
export * from "./creator.js";
|
|
75
83
|
export * from "./cryptogram.js";
|
|
76
84
|
export * from "./cryptogramcreate.js";
|
|
77
85
|
export * from "./cvvresponsecode.js";
|
|
@@ -142,7 +150,6 @@ export * from "./instrumenttype.js";
|
|
|
142
150
|
export * from "./integrationclient.js";
|
|
143
151
|
export * from "./latitudeoptions.js";
|
|
144
152
|
export * from "./mattildatapioptions.js";
|
|
145
|
-
export * from "./merchantaccount.js";
|
|
146
153
|
export * from "./merchantaccountcreate.js";
|
|
147
154
|
export * from "./merchantaccounts.js";
|
|
148
155
|
export * from "./merchantaccountthreedsconfiguration.js";
|
|
@@ -237,6 +244,7 @@ export * from "./pazetransactionoptions.js";
|
|
|
237
244
|
export * from "./pazetransactionvalue.js";
|
|
238
245
|
export * from "./pazetraveldata.js";
|
|
239
246
|
export * from "./pazewebsession.js";
|
|
247
|
+
export * from "./permissionset.js";
|
|
240
248
|
export * from "./plaidpaymentmethodcreate.js";
|
|
241
249
|
export * from "./powertranzoptions.js";
|
|
242
250
|
export * from "./producttype.js";
|
|
@@ -265,6 +273,7 @@ export * from "./reportupdate.js";
|
|
|
265
273
|
export * from "./requiredcheckoutfields.js";
|
|
266
274
|
export * from "./riskifiedantifraudoptions.js";
|
|
267
275
|
export * from "./riskifiedantifraudoptionslineitem.js";
|
|
276
|
+
export * from "./role.js";
|
|
268
277
|
export * from "./security.js";
|
|
269
278
|
export * from "./sepabankpaymentmethodcreate.js";
|
|
270
279
|
export * from "./settlement.js";
|