@keystrokehq/ramp 0.0.1
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 +149 -0
- package/dist/_official/index.d.mts +3 -0
- package/dist/_official/index.mjs +3 -0
- package/dist/_runtime/index.d.mts +1 -0
- package/dist/_runtime/index.mjs +1 -0
- package/dist/accounting-fields.d.mts +116 -0
- package/dist/accounting-fields.mjs +108 -0
- package/dist/accounting-gl-accounts.d.mts +63 -0
- package/dist/accounting-gl-accounts.mjs +49 -0
- package/dist/accounting-i6txC-MI.mjs +116 -0
- package/dist/accounting-subsidiaries.d.mts +59 -0
- package/dist/accounting-subsidiaries.mjs +49 -0
- package/dist/accounting-sync.d.mts +57 -0
- package/dist/accounting-sync.mjs +51 -0
- package/dist/accounting-tracking-categories.d.mts +36 -0
- package/dist/accounting-tracking-categories.mjs +34 -0
- package/dist/accounting-vendors.d.mts +62 -0
- package/dist/accounting-vendors.mjs +49 -0
- package/dist/applications.d.mts +59 -0
- package/dist/applications.mjs +35 -0
- package/dist/bills-B8W9et3K.mjs +86 -0
- package/dist/bills.d.mts +381 -0
- package/dist/bills.mjs +134 -0
- package/dist/business-CztnWUvt.mjs +83 -0
- package/dist/business.d.mts +28 -0
- package/dist/business.mjs +20 -0
- package/dist/card-programs.d.mts +90 -0
- package/dist/card-programs.mjs +50 -0
- package/dist/cards-BfgPcR38.mjs +153 -0
- package/dist/cards.d.mts +287 -0
- package/dist/cards.mjs +166 -0
- package/dist/cashbacks.d.mts +46 -0
- package/dist/cashbacks.mjs +34 -0
- package/dist/client.d.mts +79 -0
- package/dist/client.mjs +248 -0
- package/dist/common-CUpmNYXw.mjs +64 -0
- package/dist/connection.d.mts +2 -0
- package/dist/connection.mjs +3 -0
- package/dist/departments.d.mts +63 -0
- package/dist/departments.mjs +79 -0
- package/dist/entities.d.mts +38 -0
- package/dist/entities.mjs +34 -0
- package/dist/errors-Sm92tugz.d.mts +42 -0
- package/dist/events.d.mts +30 -0
- package/dist/events.mjs +39 -0
- package/dist/factory-Da6YVHdL.mjs +15 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +1 -0
- package/dist/integration-BGliAxAS.mjs +124 -0
- package/dist/integration-Dd6tOtSy.d.mts +47 -0
- package/dist/limits.d.mts +179 -0
- package/dist/limits.mjs +84 -0
- package/dist/locations.d.mts +69 -0
- package/dist/locations.mjs +80 -0
- package/dist/memos.d.mts +42 -0
- package/dist/memos.mjs +36 -0
- package/dist/messaging.d.mts +1 -0
- package/dist/messaging.mjs +1 -0
- package/dist/new-resources-BBJsJEjT.mjs +77 -0
- package/dist/organization-BSaEpvBn.mjs +103 -0
- package/dist/provider-app-JO525h-N.d.mts +45 -0
- package/dist/purchase-orders.d.mts +75 -0
- package/dist/purchase-orders.mjs +36 -0
- package/dist/receipt-integrations.d.mts +31 -0
- package/dist/receipt-integrations.mjs +38 -0
- package/dist/receipts-STq41c2M.mjs +53 -0
- package/dist/receipts.d.mts +62 -0
- package/dist/receipts.mjs +61 -0
- package/dist/reimbursements-OknrZUMF.mjs +37 -0
- package/dist/reimbursements.d.mts +89 -0
- package/dist/reimbursements.mjs +39 -0
- package/dist/schemas/index.d.mts +887 -0
- package/dist/schemas/index.mjs +56 -0
- package/dist/shared-CTTtP5gv.mjs +24 -0
- package/dist/spend-programs.d.mts +48 -0
- package/dist/spend-programs.mjs +34 -0
- package/dist/spend-requests.d.mts +95 -0
- package/dist/spend-requests.mjs +53 -0
- package/dist/statements.d.mts +41 -0
- package/dist/statements.mjs +37 -0
- package/dist/transactions-Djd0oIGK.mjs +53 -0
- package/dist/transactions.d.mts +181 -0
- package/dist/transactions.mjs +81 -0
- package/dist/transfers-WBQZVdGP.mjs +40 -0
- package/dist/transfers.d.mts +72 -0
- package/dist/transfers.mjs +36 -0
- package/dist/triggers/index.d.mts +81 -0
- package/dist/triggers/index.mjs +199 -0
- package/dist/unified-requests.d.mts +67 -0
- package/dist/unified-requests.mjs +37 -0
- package/dist/users-ufcXrfNK.mjs +74 -0
- package/dist/users.d.mts +204 -0
- package/dist/users.mjs +101 -0
- package/dist/vendor-bank-accounts.d.mts +110 -0
- package/dist/vendor-bank-accounts.mjs +83 -0
- package/dist/vendors-B7DQrlAn.d.mts +1116 -0
- package/dist/vendors-Bx1cgXwC.mjs +83 -0
- package/dist/vendors.d.mts +116 -0
- package/dist/vendors.mjs +84 -0
- package/dist/verification.d.mts +22 -0
- package/dist/verification.mjs +38 -0
- package/dist/webhook-CsbvcgrC.mjs +61 -0
- package/dist/webhook-sde3Ui2N.d.mts +68 -0
- package/dist/webhooks-mgmt-d1xgVpWx.mjs +35 -0
- package/dist/webhooks.d.mts +83 -0
- package/dist/webhooks.mjs +81 -0
- package/package.json +222 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import * as zod from "zod";
|
|
2
|
+
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
|
+
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
5
|
+
|
|
6
|
+
//#region src/card-programs.d.ts
|
|
7
|
+
declare const listCardPrograms: _keystrokehq_core0.Operation<zod.ZodObject<{
|
|
8
|
+
pageSize: zod.ZodOptional<zod.ZodNumber>;
|
|
9
|
+
cursor: zod.ZodOptional<zod.ZodString>;
|
|
10
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
11
|
+
data: zod.ZodArray<zod.ZodObject<{
|
|
12
|
+
id: zod.ZodString;
|
|
13
|
+
display_name: zod.ZodOptional<zod.ZodString>;
|
|
14
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
15
|
+
is_default: zod.ZodOptional<zod.ZodBoolean>;
|
|
16
|
+
is_physical: zod.ZodOptional<zod.ZodBoolean>;
|
|
17
|
+
acting_user_id: zod.ZodOptional<zod.ZodString>;
|
|
18
|
+
icon: zod.ZodOptional<zod.ZodString>;
|
|
19
|
+
spending_restrictions: zod.ZodOptional<zod.ZodObject<{
|
|
20
|
+
amount: zod.ZodOptional<zod.ZodNumber>;
|
|
21
|
+
interval: zod.ZodOptional<zod.ZodString>;
|
|
22
|
+
currency: zod.ZodOptional<zod.ZodString>;
|
|
23
|
+
}, zod_v4_core0.$loose>>;
|
|
24
|
+
}, zod_v4_core0.$loose>>;
|
|
25
|
+
page: zod.ZodOptional<zod.ZodObject<{
|
|
26
|
+
next: zod.ZodOptional<zod.ZodString>;
|
|
27
|
+
}, zod_v4_core0.$strip>>;
|
|
28
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"ramp", zod.ZodObject<{
|
|
29
|
+
RAMP_ACCESS_TOKEN: zod.ZodString;
|
|
30
|
+
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
31
|
+
RAMP_ACCESS_TOKEN: zod.ZodString;
|
|
32
|
+
}, zod_v4_core0.$strip>>[] | undefined>], undefined>;
|
|
33
|
+
declare const getCardProgram: _keystrokehq_core0.Operation<zod.ZodObject<{
|
|
34
|
+
cardProgramId: zod.ZodString;
|
|
35
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
36
|
+
id: zod.ZodString;
|
|
37
|
+
display_name: zod.ZodOptional<zod.ZodString>;
|
|
38
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
39
|
+
is_default: zod.ZodOptional<zod.ZodBoolean>;
|
|
40
|
+
is_physical: zod.ZodOptional<zod.ZodBoolean>;
|
|
41
|
+
acting_user_id: zod.ZodOptional<zod.ZodString>;
|
|
42
|
+
icon: zod.ZodOptional<zod.ZodString>;
|
|
43
|
+
spending_restrictions: zod.ZodOptional<zod.ZodObject<{
|
|
44
|
+
amount: zod.ZodOptional<zod.ZodNumber>;
|
|
45
|
+
interval: zod.ZodOptional<zod.ZodString>;
|
|
46
|
+
currency: zod.ZodOptional<zod.ZodString>;
|
|
47
|
+
}, zod_v4_core0.$loose>>;
|
|
48
|
+
}, zod_v4_core0.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", zod.ZodObject<{
|
|
49
|
+
RAMP_ACCESS_TOKEN: zod.ZodString;
|
|
50
|
+
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
51
|
+
RAMP_ACCESS_TOKEN: zod.ZodString;
|
|
52
|
+
}, zod_v4_core0.$strip>>[] | undefined>], undefined>;
|
|
53
|
+
declare const createCardProgram: _keystrokehq_core0.Operation<zod.ZodObject<{
|
|
54
|
+
display_name: zod.ZodString;
|
|
55
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
56
|
+
is_default: zod.ZodOptional<zod.ZodBoolean>;
|
|
57
|
+
is_physical: zod.ZodOptional<zod.ZodBoolean>;
|
|
58
|
+
acting_user_id: zod.ZodOptional<zod.ZodString>;
|
|
59
|
+
spending_restrictions: zod.ZodOptional<zod.ZodObject<{
|
|
60
|
+
amount: zod.ZodNumber;
|
|
61
|
+
interval: zod.ZodEnum<{
|
|
62
|
+
DAILY: "DAILY";
|
|
63
|
+
WEEKLY: "WEEKLY";
|
|
64
|
+
MONTHLY: "MONTHLY";
|
|
65
|
+
YEARLY: "YEARLY";
|
|
66
|
+
TOTAL: "TOTAL";
|
|
67
|
+
}>;
|
|
68
|
+
currency: zod.ZodOptional<zod.ZodString>;
|
|
69
|
+
categories: zod.ZodOptional<zod.ZodArray<zod.ZodString>>;
|
|
70
|
+
}, zod_v4_core0.$strip>>;
|
|
71
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
72
|
+
id: zod.ZodString;
|
|
73
|
+
display_name: zod.ZodOptional<zod.ZodString>;
|
|
74
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
75
|
+
is_default: zod.ZodOptional<zod.ZodBoolean>;
|
|
76
|
+
is_physical: zod.ZodOptional<zod.ZodBoolean>;
|
|
77
|
+
acting_user_id: zod.ZodOptional<zod.ZodString>;
|
|
78
|
+
icon: zod.ZodOptional<zod.ZodString>;
|
|
79
|
+
spending_restrictions: zod.ZodOptional<zod.ZodObject<{
|
|
80
|
+
amount: zod.ZodOptional<zod.ZodNumber>;
|
|
81
|
+
interval: zod.ZodOptional<zod.ZodString>;
|
|
82
|
+
currency: zod.ZodOptional<zod.ZodString>;
|
|
83
|
+
}, zod_v4_core0.$loose>>;
|
|
84
|
+
}, zod_v4_core0.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", zod.ZodObject<{
|
|
85
|
+
RAMP_ACCESS_TOKEN: zod.ZodString;
|
|
86
|
+
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
87
|
+
RAMP_ACCESS_TOKEN: zod.ZodString;
|
|
88
|
+
}, zod_v4_core0.$strip>>[] | undefined>], undefined>;
|
|
89
|
+
//#endregion
|
|
90
|
+
export { createCardProgram, getCardProgram, listCardPrograms };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { createRampClient } from "./client.mjs";
|
|
2
|
+
import { c as rampCardProgramListInputSchema, l as rampCardProgramListSchema, o as rampCardProgramCreateInputSchema, s as rampCardProgramGetInputSchema, u as rampCardProgramSchema } from "./cards-BfgPcR38.mjs";
|
|
3
|
+
import { t as rampOperation } from "./factory-Da6YVHdL.mjs";
|
|
4
|
+
import { t as omitUndefined } from "./shared-CTTtP5gv.mjs";
|
|
5
|
+
|
|
6
|
+
//#region src/card-programs.ts
|
|
7
|
+
const listCardPrograms = rampOperation({
|
|
8
|
+
id: "list_card_programs",
|
|
9
|
+
name: "List Card Programs",
|
|
10
|
+
description: "List all Ramp card programs configured for the connected business.",
|
|
11
|
+
input: rampCardProgramListInputSchema,
|
|
12
|
+
output: rampCardProgramListSchema,
|
|
13
|
+
run: async (input, credentials) => {
|
|
14
|
+
const client = createRampClient(credentials);
|
|
15
|
+
const query = omitUndefined({
|
|
16
|
+
page_size: input.pageSize,
|
|
17
|
+
start: input.cursor
|
|
18
|
+
});
|
|
19
|
+
return rampCardProgramListSchema.parse(await client.request("/card-programs", { query }));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const getCardProgram = rampOperation({
|
|
23
|
+
id: "get_card_program",
|
|
24
|
+
name: "Get Card Program",
|
|
25
|
+
description: "Fetch a Ramp card program by id.",
|
|
26
|
+
input: rampCardProgramGetInputSchema,
|
|
27
|
+
output: rampCardProgramSchema,
|
|
28
|
+
run: async (input, credentials) => {
|
|
29
|
+
const client = createRampClient(credentials);
|
|
30
|
+
return rampCardProgramSchema.parse(await client.request(`/card-programs/${encodeURIComponent(input.cardProgramId)}`));
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
const createCardProgram = rampOperation({
|
|
34
|
+
id: "create_card_program",
|
|
35
|
+
name: "Create Card Program",
|
|
36
|
+
description: "Create a new Ramp card program with default spending controls.",
|
|
37
|
+
input: rampCardProgramCreateInputSchema,
|
|
38
|
+
output: rampCardProgramSchema,
|
|
39
|
+
needsApproval: true,
|
|
40
|
+
run: async (input, credentials) => {
|
|
41
|
+
const client = createRampClient(credentials);
|
|
42
|
+
return rampCardProgramSchema.parse(await client.request("/card-programs", {
|
|
43
|
+
method: "POST",
|
|
44
|
+
body: input
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { createCardProgram, getCardProgram, listCardPrograms };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { a as rampListPaginationInputSchema, c as rampMoneySchema, f as rampTimestampSchema, i as rampIdSchema, o as rampListResponseSchema } from "./common-CUpmNYXw.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/schemas/cards.ts
|
|
5
|
+
const rampCardStateSchema = z.enum([
|
|
6
|
+
"ACTIVE",
|
|
7
|
+
"CHIP_LOCKED",
|
|
8
|
+
"SUSPENDED",
|
|
9
|
+
"TERMINATED",
|
|
10
|
+
"UNACTIVATED"
|
|
11
|
+
]);
|
|
12
|
+
const rampCardFulfillmentSchema = z.enum([
|
|
13
|
+
"VIRTUAL",
|
|
14
|
+
"PHYSICAL_STANDARD",
|
|
15
|
+
"PHYSICAL_CUSTOM",
|
|
16
|
+
"PHYSICAL_METAL"
|
|
17
|
+
]);
|
|
18
|
+
const rampCardSchema = z.object({
|
|
19
|
+
id: rampIdSchema,
|
|
20
|
+
cardholder_id: rampIdSchema.optional(),
|
|
21
|
+
cardholder_name: z.string().optional(),
|
|
22
|
+
display_name: z.string().optional(),
|
|
23
|
+
last_four: z.string().optional(),
|
|
24
|
+
state: rampCardStateSchema.optional(),
|
|
25
|
+
fulfillment: z.object({ shipping: z.object({
|
|
26
|
+
method: rampCardFulfillmentSchema.optional(),
|
|
27
|
+
recipient_address: z.record(z.string(), z.string()).optional()
|
|
28
|
+
}).passthrough().optional() }).passthrough().optional(),
|
|
29
|
+
entity_id: rampIdSchema.optional(),
|
|
30
|
+
spending_restrictions: z.object({
|
|
31
|
+
amount: z.number().optional(),
|
|
32
|
+
currency: z.string().optional(),
|
|
33
|
+
interval: z.string().optional(),
|
|
34
|
+
categories: z.array(z.string()).optional(),
|
|
35
|
+
categories_blocked: z.array(z.string()).optional(),
|
|
36
|
+
transaction_amount_limit: z.number().optional(),
|
|
37
|
+
lock_date: rampTimestampSchema.optional()
|
|
38
|
+
}).passthrough().optional(),
|
|
39
|
+
has_program_overridden: z.boolean().optional()
|
|
40
|
+
}).passthrough();
|
|
41
|
+
const rampCardListInputSchema = z.object({
|
|
42
|
+
cardholder_id: rampIdSchema.optional(),
|
|
43
|
+
entity_id: rampIdSchema.optional(),
|
|
44
|
+
state: rampCardStateSchema.optional(),
|
|
45
|
+
card_program_id: rampIdSchema.optional()
|
|
46
|
+
}).merge(rampListPaginationInputSchema);
|
|
47
|
+
const rampCardListSchema = rampListResponseSchema(rampCardSchema);
|
|
48
|
+
const rampCardGetInputSchema = z.object({ cardId: rampIdSchema });
|
|
49
|
+
const rampCreateVirtualCardInputSchema = z.object({
|
|
50
|
+
display_name: z.string().trim().min(1),
|
|
51
|
+
user_id: rampIdSchema,
|
|
52
|
+
spending_restrictions: z.object({
|
|
53
|
+
amount: z.number().int().nonnegative(),
|
|
54
|
+
interval: z.enum([
|
|
55
|
+
"DAILY",
|
|
56
|
+
"WEEKLY",
|
|
57
|
+
"MONTHLY",
|
|
58
|
+
"YEARLY",
|
|
59
|
+
"TOTAL"
|
|
60
|
+
]),
|
|
61
|
+
currency: z.string().trim().min(3).max(3).optional(),
|
|
62
|
+
categories: z.array(z.string()).optional(),
|
|
63
|
+
transaction_amount_limit: z.number().int().nonnegative().optional(),
|
|
64
|
+
lock_date: rampTimestampSchema.optional()
|
|
65
|
+
}).optional(),
|
|
66
|
+
idempotency_key: z.string().trim().min(1).optional()
|
|
67
|
+
});
|
|
68
|
+
const rampCreatePhysicalCardInputSchema = z.object({
|
|
69
|
+
display_name: z.string().trim().min(1),
|
|
70
|
+
user_id: rampIdSchema,
|
|
71
|
+
fulfillment_type: rampCardFulfillmentSchema,
|
|
72
|
+
shipping_address: z.record(z.string(), z.string()),
|
|
73
|
+
spending_restrictions: z.object({
|
|
74
|
+
amount: z.number().int().nonnegative(),
|
|
75
|
+
interval: z.enum([
|
|
76
|
+
"DAILY",
|
|
77
|
+
"WEEKLY",
|
|
78
|
+
"MONTHLY",
|
|
79
|
+
"YEARLY",
|
|
80
|
+
"TOTAL"
|
|
81
|
+
]),
|
|
82
|
+
currency: z.string().trim().min(3).max(3).optional()
|
|
83
|
+
}).optional(),
|
|
84
|
+
idempotency_key: z.string().trim().min(1).optional()
|
|
85
|
+
});
|
|
86
|
+
const rampTerminateCardInputSchema = z.object({
|
|
87
|
+
cardId: rampIdSchema,
|
|
88
|
+
idempotency_key: z.string().trim().min(1).optional()
|
|
89
|
+
});
|
|
90
|
+
const rampSuspendCardInputSchema = z.object({ cardId: rampIdSchema });
|
|
91
|
+
const rampUnsuspendCardInputSchema = z.object({ cardId: rampIdSchema });
|
|
92
|
+
const rampCardUpdateInputSchema = z.object({
|
|
93
|
+
cardId: rampIdSchema,
|
|
94
|
+
display_name: z.string().trim().min(1).optional(),
|
|
95
|
+
spending_restrictions: z.object({
|
|
96
|
+
amount: z.number().int().nonnegative().optional(),
|
|
97
|
+
interval: z.enum([
|
|
98
|
+
"DAILY",
|
|
99
|
+
"WEEKLY",
|
|
100
|
+
"MONTHLY",
|
|
101
|
+
"YEARLY",
|
|
102
|
+
"TOTAL"
|
|
103
|
+
]).optional(),
|
|
104
|
+
categories: z.array(z.string()).optional()
|
|
105
|
+
}).optional()
|
|
106
|
+
});
|
|
107
|
+
const rampCardProgramSchema = z.object({
|
|
108
|
+
id: rampIdSchema,
|
|
109
|
+
display_name: z.string().optional(),
|
|
110
|
+
description: z.string().optional(),
|
|
111
|
+
is_default: z.boolean().optional(),
|
|
112
|
+
is_physical: z.boolean().optional(),
|
|
113
|
+
acting_user_id: rampIdSchema.optional(),
|
|
114
|
+
icon: z.string().optional(),
|
|
115
|
+
spending_restrictions: z.object({
|
|
116
|
+
amount: z.number().optional(),
|
|
117
|
+
interval: z.string().optional(),
|
|
118
|
+
currency: z.string().optional()
|
|
119
|
+
}).passthrough().optional()
|
|
120
|
+
}).passthrough();
|
|
121
|
+
const rampCardProgramListInputSchema = rampListPaginationInputSchema;
|
|
122
|
+
const rampCardProgramListSchema = rampListResponseSchema(rampCardProgramSchema);
|
|
123
|
+
const rampCardProgramGetInputSchema = z.object({ cardProgramId: rampIdSchema });
|
|
124
|
+
const rampCardProgramCreateInputSchema = z.object({
|
|
125
|
+
display_name: z.string().trim().min(1),
|
|
126
|
+
description: z.string().optional(),
|
|
127
|
+
is_default: z.boolean().optional(),
|
|
128
|
+
is_physical: z.boolean().optional(),
|
|
129
|
+
acting_user_id: rampIdSchema.optional(),
|
|
130
|
+
spending_restrictions: z.object({
|
|
131
|
+
amount: z.number().int().nonnegative(),
|
|
132
|
+
interval: z.enum([
|
|
133
|
+
"DAILY",
|
|
134
|
+
"WEEKLY",
|
|
135
|
+
"MONTHLY",
|
|
136
|
+
"YEARLY",
|
|
137
|
+
"TOTAL"
|
|
138
|
+
]),
|
|
139
|
+
currency: z.string().trim().min(3).max(3).optional(),
|
|
140
|
+
categories: z.array(z.string()).optional()
|
|
141
|
+
}).optional()
|
|
142
|
+
});
|
|
143
|
+
const rampCardFundTransferSchema = z.object({
|
|
144
|
+
id: rampIdSchema,
|
|
145
|
+
card_id: rampIdSchema.optional(),
|
|
146
|
+
amount: rampMoneySchema.optional(),
|
|
147
|
+
direction: z.string().optional(),
|
|
148
|
+
status: z.string().optional(),
|
|
149
|
+
created_at: rampTimestampSchema.optional()
|
|
150
|
+
}).passthrough();
|
|
151
|
+
|
|
152
|
+
//#endregion
|
|
153
|
+
export { rampTerminateCardInputSchema as _, rampCardListSchema as a, rampCardProgramListInputSchema as c, rampCardSchema as d, rampCardStateSchema as f, rampSuspendCardInputSchema as g, rampCreateVirtualCardInputSchema as h, rampCardListInputSchema as i, rampCardProgramListSchema as l, rampCreatePhysicalCardInputSchema as m, rampCardFundTransferSchema as n, rampCardProgramCreateInputSchema as o, rampCardUpdateInputSchema as p, rampCardGetInputSchema as r, rampCardProgramGetInputSchema as s, rampCardFulfillmentSchema as t, rampCardProgramSchema as u, rampUnsuspendCardInputSchema as v };
|
package/dist/cards.d.mts
ADDED
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
|
+
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
4
|
+
|
|
5
|
+
//#region src/cards.d.ts
|
|
6
|
+
declare const listCards: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
7
|
+
cardholder_id: z.ZodOptional<z.ZodString>;
|
|
8
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
9
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
10
|
+
ACTIVE: "ACTIVE";
|
|
11
|
+
CHIP_LOCKED: "CHIP_LOCKED";
|
|
12
|
+
SUSPENDED: "SUSPENDED";
|
|
13
|
+
TERMINATED: "TERMINATED";
|
|
14
|
+
UNACTIVATED: "UNACTIVATED";
|
|
15
|
+
}>>;
|
|
16
|
+
card_program_id: z.ZodOptional<z.ZodString>;
|
|
17
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
20
|
+
data: z.ZodArray<z.ZodObject<{
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
cardholder_id: z.ZodOptional<z.ZodString>;
|
|
23
|
+
cardholder_name: z.ZodOptional<z.ZodString>;
|
|
24
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
25
|
+
last_four: z.ZodOptional<z.ZodString>;
|
|
26
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
27
|
+
ACTIVE: "ACTIVE";
|
|
28
|
+
CHIP_LOCKED: "CHIP_LOCKED";
|
|
29
|
+
SUSPENDED: "SUSPENDED";
|
|
30
|
+
TERMINATED: "TERMINATED";
|
|
31
|
+
UNACTIVATED: "UNACTIVATED";
|
|
32
|
+
}>>;
|
|
33
|
+
fulfillment: z.ZodOptional<z.ZodObject<{
|
|
34
|
+
shipping: z.ZodOptional<z.ZodObject<{
|
|
35
|
+
method: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
VIRTUAL: "VIRTUAL";
|
|
37
|
+
PHYSICAL_STANDARD: "PHYSICAL_STANDARD";
|
|
38
|
+
PHYSICAL_CUSTOM: "PHYSICAL_CUSTOM";
|
|
39
|
+
PHYSICAL_METAL: "PHYSICAL_METAL";
|
|
40
|
+
}>>;
|
|
41
|
+
recipient_address: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
42
|
+
}, z.core.$loose>>;
|
|
43
|
+
}, z.core.$loose>>;
|
|
44
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
45
|
+
spending_restrictions: z.ZodOptional<z.ZodObject<{
|
|
46
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
48
|
+
interval: z.ZodOptional<z.ZodString>;
|
|
49
|
+
categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
50
|
+
categories_blocked: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
|
+
transaction_amount_limit: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
lock_date: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, z.core.$loose>>;
|
|
54
|
+
has_program_overridden: z.ZodOptional<z.ZodBoolean>;
|
|
55
|
+
}, z.core.$loose>>;
|
|
56
|
+
page: z.ZodOptional<z.ZodObject<{
|
|
57
|
+
next: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$strip>>;
|
|
59
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
60
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
61
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
62
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
63
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
64
|
+
declare const getCard: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
65
|
+
cardId: z.ZodString;
|
|
66
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
67
|
+
id: z.ZodString;
|
|
68
|
+
cardholder_id: z.ZodOptional<z.ZodString>;
|
|
69
|
+
cardholder_name: z.ZodOptional<z.ZodString>;
|
|
70
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
71
|
+
last_four: z.ZodOptional<z.ZodString>;
|
|
72
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
73
|
+
ACTIVE: "ACTIVE";
|
|
74
|
+
CHIP_LOCKED: "CHIP_LOCKED";
|
|
75
|
+
SUSPENDED: "SUSPENDED";
|
|
76
|
+
TERMINATED: "TERMINATED";
|
|
77
|
+
UNACTIVATED: "UNACTIVATED";
|
|
78
|
+
}>>;
|
|
79
|
+
fulfillment: z.ZodOptional<z.ZodObject<{
|
|
80
|
+
shipping: z.ZodOptional<z.ZodObject<{
|
|
81
|
+
method: z.ZodOptional<z.ZodEnum<{
|
|
82
|
+
VIRTUAL: "VIRTUAL";
|
|
83
|
+
PHYSICAL_STANDARD: "PHYSICAL_STANDARD";
|
|
84
|
+
PHYSICAL_CUSTOM: "PHYSICAL_CUSTOM";
|
|
85
|
+
PHYSICAL_METAL: "PHYSICAL_METAL";
|
|
86
|
+
}>>;
|
|
87
|
+
recipient_address: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
88
|
+
}, z.core.$loose>>;
|
|
89
|
+
}, z.core.$loose>>;
|
|
90
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
91
|
+
spending_restrictions: z.ZodOptional<z.ZodObject<{
|
|
92
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
94
|
+
interval: z.ZodOptional<z.ZodString>;
|
|
95
|
+
categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
96
|
+
categories_blocked: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
97
|
+
transaction_amount_limit: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
lock_date: z.ZodOptional<z.ZodString>;
|
|
99
|
+
}, z.core.$loose>>;
|
|
100
|
+
has_program_overridden: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
102
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
103
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
104
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
105
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
106
|
+
declare const createVirtualCard: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
107
|
+
display_name: z.ZodString;
|
|
108
|
+
user_id: z.ZodString;
|
|
109
|
+
spending_restrictions: z.ZodOptional<z.ZodObject<{
|
|
110
|
+
amount: z.ZodNumber;
|
|
111
|
+
interval: z.ZodEnum<{
|
|
112
|
+
DAILY: "DAILY";
|
|
113
|
+
WEEKLY: "WEEKLY";
|
|
114
|
+
MONTHLY: "MONTHLY";
|
|
115
|
+
YEARLY: "YEARLY";
|
|
116
|
+
TOTAL: "TOTAL";
|
|
117
|
+
}>;
|
|
118
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
119
|
+
categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
120
|
+
transaction_amount_limit: z.ZodOptional<z.ZodNumber>;
|
|
121
|
+
lock_date: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, z.core.$strip>>;
|
|
123
|
+
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
124
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
125
|
+
id: z.ZodString;
|
|
126
|
+
status: z.ZodOptional<z.ZodString>;
|
|
127
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
128
|
+
error: z.ZodOptional<z.ZodUnknown>;
|
|
129
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
130
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
131
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
132
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
133
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
134
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
135
|
+
declare const createPhysicalCard: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
136
|
+
display_name: z.ZodString;
|
|
137
|
+
user_id: z.ZodString;
|
|
138
|
+
fulfillment_type: z.ZodEnum<{
|
|
139
|
+
VIRTUAL: "VIRTUAL";
|
|
140
|
+
PHYSICAL_STANDARD: "PHYSICAL_STANDARD";
|
|
141
|
+
PHYSICAL_CUSTOM: "PHYSICAL_CUSTOM";
|
|
142
|
+
PHYSICAL_METAL: "PHYSICAL_METAL";
|
|
143
|
+
}>;
|
|
144
|
+
shipping_address: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
145
|
+
spending_restrictions: z.ZodOptional<z.ZodObject<{
|
|
146
|
+
amount: z.ZodNumber;
|
|
147
|
+
interval: z.ZodEnum<{
|
|
148
|
+
DAILY: "DAILY";
|
|
149
|
+
WEEKLY: "WEEKLY";
|
|
150
|
+
MONTHLY: "MONTHLY";
|
|
151
|
+
YEARLY: "YEARLY";
|
|
152
|
+
TOTAL: "TOTAL";
|
|
153
|
+
}>;
|
|
154
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
155
|
+
}, z.core.$strip>>;
|
|
156
|
+
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
157
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
158
|
+
id: z.ZodString;
|
|
159
|
+
status: z.ZodOptional<z.ZodString>;
|
|
160
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
161
|
+
error: z.ZodOptional<z.ZodUnknown>;
|
|
162
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
163
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
164
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
165
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
166
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
167
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
168
|
+
declare const updateCard: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
169
|
+
cardId: z.ZodString;
|
|
170
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
171
|
+
spending_restrictions: z.ZodOptional<z.ZodObject<{
|
|
172
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
173
|
+
interval: z.ZodOptional<z.ZodEnum<{
|
|
174
|
+
DAILY: "DAILY";
|
|
175
|
+
WEEKLY: "WEEKLY";
|
|
176
|
+
MONTHLY: "MONTHLY";
|
|
177
|
+
YEARLY: "YEARLY";
|
|
178
|
+
TOTAL: "TOTAL";
|
|
179
|
+
}>>;
|
|
180
|
+
categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
181
|
+
}, z.core.$strip>>;
|
|
182
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
183
|
+
id: z.ZodString;
|
|
184
|
+
cardholder_id: z.ZodOptional<z.ZodString>;
|
|
185
|
+
cardholder_name: z.ZodOptional<z.ZodString>;
|
|
186
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
187
|
+
last_four: z.ZodOptional<z.ZodString>;
|
|
188
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
189
|
+
ACTIVE: "ACTIVE";
|
|
190
|
+
CHIP_LOCKED: "CHIP_LOCKED";
|
|
191
|
+
SUSPENDED: "SUSPENDED";
|
|
192
|
+
TERMINATED: "TERMINATED";
|
|
193
|
+
UNACTIVATED: "UNACTIVATED";
|
|
194
|
+
}>>;
|
|
195
|
+
fulfillment: z.ZodOptional<z.ZodObject<{
|
|
196
|
+
shipping: z.ZodOptional<z.ZodObject<{
|
|
197
|
+
method: z.ZodOptional<z.ZodEnum<{
|
|
198
|
+
VIRTUAL: "VIRTUAL";
|
|
199
|
+
PHYSICAL_STANDARD: "PHYSICAL_STANDARD";
|
|
200
|
+
PHYSICAL_CUSTOM: "PHYSICAL_CUSTOM";
|
|
201
|
+
PHYSICAL_METAL: "PHYSICAL_METAL";
|
|
202
|
+
}>>;
|
|
203
|
+
recipient_address: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
204
|
+
}, z.core.$loose>>;
|
|
205
|
+
}, z.core.$loose>>;
|
|
206
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
207
|
+
spending_restrictions: z.ZodOptional<z.ZodObject<{
|
|
208
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
209
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
210
|
+
interval: z.ZodOptional<z.ZodString>;
|
|
211
|
+
categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
212
|
+
categories_blocked: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
213
|
+
transaction_amount_limit: z.ZodOptional<z.ZodNumber>;
|
|
214
|
+
lock_date: z.ZodOptional<z.ZodString>;
|
|
215
|
+
}, z.core.$loose>>;
|
|
216
|
+
has_program_overridden: z.ZodOptional<z.ZodBoolean>;
|
|
217
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
218
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
219
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
220
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
221
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
222
|
+
declare const suspendCard: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
223
|
+
cardId: z.ZodString;
|
|
224
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
225
|
+
id: z.ZodString;
|
|
226
|
+
status: z.ZodOptional<z.ZodString>;
|
|
227
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
228
|
+
error: z.ZodOptional<z.ZodUnknown>;
|
|
229
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
230
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
231
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
232
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
233
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
234
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
235
|
+
declare const unsuspendCard: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
236
|
+
cardId: z.ZodString;
|
|
237
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
238
|
+
id: z.ZodString;
|
|
239
|
+
status: z.ZodOptional<z.ZodString>;
|
|
240
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
241
|
+
error: z.ZodOptional<z.ZodUnknown>;
|
|
242
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
243
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
244
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
245
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
246
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
247
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
248
|
+
declare const terminateCard: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
249
|
+
cardId: z.ZodString;
|
|
250
|
+
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
251
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
252
|
+
id: z.ZodString;
|
|
253
|
+
status: z.ZodOptional<z.ZodString>;
|
|
254
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
255
|
+
error: z.ZodOptional<z.ZodUnknown>;
|
|
256
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
257
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
258
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
259
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
260
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
261
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
262
|
+
declare const listCardFundTransfers: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
263
|
+
card_id: z.ZodOptional<z.ZodString>;
|
|
264
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
265
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
266
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
267
|
+
data: z.ZodArray<z.ZodObject<{
|
|
268
|
+
id: z.ZodString;
|
|
269
|
+
card_id: z.ZodOptional<z.ZodString>;
|
|
270
|
+
amount: z.ZodOptional<z.ZodObject<{
|
|
271
|
+
amountCents: z.ZodNumber;
|
|
272
|
+
currency: z.ZodString;
|
|
273
|
+
}, z.core.$strip>>;
|
|
274
|
+
direction: z.ZodOptional<z.ZodString>;
|
|
275
|
+
status: z.ZodOptional<z.ZodString>;
|
|
276
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
277
|
+
}, z.core.$loose>>;
|
|
278
|
+
page: z.ZodOptional<z.ZodObject<{
|
|
279
|
+
next: z.ZodOptional<z.ZodString>;
|
|
280
|
+
}, z.core.$strip>>;
|
|
281
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
282
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
283
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
284
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
285
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
286
|
+
//#endregion
|
|
287
|
+
export { createPhysicalCard, createVirtualCard, getCard, listCardFundTransfers, listCards, suspendCard, terminateCard, unsuspendCard, updateCard };
|