@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,179 @@
|
|
|
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/limits.d.ts
|
|
6
|
+
declare const listLimits: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
7
|
+
user_id: z.ZodOptional<z.ZodString>;
|
|
8
|
+
spend_program_id: z.ZodOptional<z.ZodString>;
|
|
9
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
10
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
11
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
13
|
+
data: z.ZodArray<z.ZodObject<{
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
16
|
+
state: z.ZodOptional<z.ZodString>;
|
|
17
|
+
spend_program_id: z.ZodOptional<z.ZodString>;
|
|
18
|
+
users: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
19
|
+
spending_restrictions: z.ZodOptional<z.ZodObject<{
|
|
20
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
22
|
+
interval: z.ZodOptional<z.ZodEnum<{
|
|
23
|
+
DAILY: "DAILY";
|
|
24
|
+
WEEKLY: "WEEKLY";
|
|
25
|
+
MONTHLY: "MONTHLY";
|
|
26
|
+
QUARTERLY: "QUARTERLY";
|
|
27
|
+
YEARLY: "YEARLY";
|
|
28
|
+
TOTAL: "TOTAL";
|
|
29
|
+
}>>;
|
|
30
|
+
transaction_amount_limit: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
}, z.core.$loose>>;
|
|
32
|
+
balance: z.ZodOptional<z.ZodObject<{
|
|
33
|
+
amountCents: z.ZodNumber;
|
|
34
|
+
currency: z.ZodString;
|
|
35
|
+
}, z.core.$strip>>;
|
|
36
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$loose>>;
|
|
38
|
+
page: z.ZodOptional<z.ZodObject<{
|
|
39
|
+
next: z.ZodOptional<z.ZodString>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
42
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
43
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
44
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
45
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
46
|
+
declare const getLimit: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
47
|
+
limitId: z.ZodString;
|
|
48
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
49
|
+
id: z.ZodString;
|
|
50
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
51
|
+
state: z.ZodOptional<z.ZodString>;
|
|
52
|
+
spend_program_id: z.ZodOptional<z.ZodString>;
|
|
53
|
+
users: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
54
|
+
spending_restrictions: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
57
|
+
interval: z.ZodOptional<z.ZodEnum<{
|
|
58
|
+
DAILY: "DAILY";
|
|
59
|
+
WEEKLY: "WEEKLY";
|
|
60
|
+
MONTHLY: "MONTHLY";
|
|
61
|
+
QUARTERLY: "QUARTERLY";
|
|
62
|
+
YEARLY: "YEARLY";
|
|
63
|
+
TOTAL: "TOTAL";
|
|
64
|
+
}>>;
|
|
65
|
+
transaction_amount_limit: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
}, z.core.$loose>>;
|
|
67
|
+
balance: z.ZodOptional<z.ZodObject<{
|
|
68
|
+
amountCents: z.ZodNumber;
|
|
69
|
+
currency: z.ZodString;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
72
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
73
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
74
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
75
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
76
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
77
|
+
declare const createLimit: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
78
|
+
display_name: z.ZodString;
|
|
79
|
+
user_ids: z.ZodArray<z.ZodString>;
|
|
80
|
+
spend_program_id: z.ZodOptional<z.ZodString>;
|
|
81
|
+
spending_restrictions: z.ZodObject<{
|
|
82
|
+
amount: z.ZodNumber;
|
|
83
|
+
currency: z.ZodString;
|
|
84
|
+
interval: z.ZodEnum<{
|
|
85
|
+
DAILY: "DAILY";
|
|
86
|
+
WEEKLY: "WEEKLY";
|
|
87
|
+
MONTHLY: "MONTHLY";
|
|
88
|
+
QUARTERLY: "QUARTERLY";
|
|
89
|
+
YEARLY: "YEARLY";
|
|
90
|
+
TOTAL: "TOTAL";
|
|
91
|
+
}>;
|
|
92
|
+
transaction_amount_limit: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
96
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
97
|
+
id: z.ZodString;
|
|
98
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
99
|
+
state: z.ZodOptional<z.ZodString>;
|
|
100
|
+
spend_program_id: z.ZodOptional<z.ZodString>;
|
|
101
|
+
users: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
102
|
+
spending_restrictions: z.ZodOptional<z.ZodObject<{
|
|
103
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
105
|
+
interval: z.ZodOptional<z.ZodEnum<{
|
|
106
|
+
DAILY: "DAILY";
|
|
107
|
+
WEEKLY: "WEEKLY";
|
|
108
|
+
MONTHLY: "MONTHLY";
|
|
109
|
+
QUARTERLY: "QUARTERLY";
|
|
110
|
+
YEARLY: "YEARLY";
|
|
111
|
+
TOTAL: "TOTAL";
|
|
112
|
+
}>>;
|
|
113
|
+
transaction_amount_limit: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
}, z.core.$loose>>;
|
|
115
|
+
balance: z.ZodOptional<z.ZodObject<{
|
|
116
|
+
amountCents: z.ZodNumber;
|
|
117
|
+
currency: z.ZodString;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
120
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
121
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
122
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
123
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
124
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
125
|
+
declare const updateLimit: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
126
|
+
limitId: z.ZodString;
|
|
127
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
128
|
+
spending_restrictions: z.ZodOptional<z.ZodObject<{
|
|
129
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
130
|
+
interval: z.ZodOptional<z.ZodEnum<{
|
|
131
|
+
DAILY: "DAILY";
|
|
132
|
+
WEEKLY: "WEEKLY";
|
|
133
|
+
MONTHLY: "MONTHLY";
|
|
134
|
+
QUARTERLY: "QUARTERLY";
|
|
135
|
+
YEARLY: "YEARLY";
|
|
136
|
+
TOTAL: "TOTAL";
|
|
137
|
+
}>>;
|
|
138
|
+
transaction_amount_limit: z.ZodOptional<z.ZodNumber>;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
141
|
+
id: z.ZodString;
|
|
142
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
143
|
+
state: z.ZodOptional<z.ZodString>;
|
|
144
|
+
spend_program_id: z.ZodOptional<z.ZodString>;
|
|
145
|
+
users: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
146
|
+
spending_restrictions: z.ZodOptional<z.ZodObject<{
|
|
147
|
+
amount: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
149
|
+
interval: z.ZodOptional<z.ZodEnum<{
|
|
150
|
+
DAILY: "DAILY";
|
|
151
|
+
WEEKLY: "WEEKLY";
|
|
152
|
+
MONTHLY: "MONTHLY";
|
|
153
|
+
QUARTERLY: "QUARTERLY";
|
|
154
|
+
YEARLY: "YEARLY";
|
|
155
|
+
TOTAL: "TOTAL";
|
|
156
|
+
}>>;
|
|
157
|
+
transaction_amount_limit: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
}, z.core.$loose>>;
|
|
159
|
+
balance: z.ZodOptional<z.ZodObject<{
|
|
160
|
+
amountCents: z.ZodNumber;
|
|
161
|
+
currency: z.ZodString;
|
|
162
|
+
}, z.core.$strip>>;
|
|
163
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
164
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
165
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
166
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
167
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
168
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
169
|
+
declare const deleteLimit: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
170
|
+
limitId: z.ZodString;
|
|
171
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
172
|
+
success: z.ZodBoolean;
|
|
173
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
174
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
175
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
176
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
177
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
178
|
+
//#endregion
|
|
179
|
+
export { createLimit, deleteLimit, getLimit, listLimits, updateLimit };
|
package/dist/limits.mjs
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { createRampClient } from "./client.mjs";
|
|
2
|
+
import { c as rampLimitCreateInputSchema, f as rampLimitListInputSchema, h as rampLimitUpdateInputSchema, l as rampLimitDeleteInputSchema, m as rampLimitSchema, p as rampLimitListSchema, u as rampLimitGetInputSchema } from "./organization-BSaEpvBn.mjs";
|
|
3
|
+
import { t as rampOperation } from "./factory-Da6YVHdL.mjs";
|
|
4
|
+
import { t as omitUndefined } from "./shared-CTTtP5gv.mjs";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
//#region src/limits.ts
|
|
8
|
+
const listLimits = rampOperation({
|
|
9
|
+
id: "list_limits",
|
|
10
|
+
name: "List Limits",
|
|
11
|
+
description: "List Ramp spending limits. Supports filtering by user, spend program, and entity.",
|
|
12
|
+
input: rampLimitListInputSchema,
|
|
13
|
+
output: rampLimitListSchema,
|
|
14
|
+
run: async (input, credentials) => {
|
|
15
|
+
const client = createRampClient(credentials);
|
|
16
|
+
return rampLimitListSchema.parse(await client.request("/limits", { query: omitUndefined({
|
|
17
|
+
user_id: input.user_id,
|
|
18
|
+
spend_program_id: input.spend_program_id,
|
|
19
|
+
entity_id: input.entity_id,
|
|
20
|
+
page_size: input.pageSize,
|
|
21
|
+
start: input.cursor
|
|
22
|
+
}) }));
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
const getLimit = rampOperation({
|
|
26
|
+
id: "get_limit",
|
|
27
|
+
name: "Get Limit",
|
|
28
|
+
description: "Fetch a Ramp limit by id.",
|
|
29
|
+
input: rampLimitGetInputSchema,
|
|
30
|
+
output: rampLimitSchema,
|
|
31
|
+
run: async (input, credentials) => {
|
|
32
|
+
const client = createRampClient(credentials);
|
|
33
|
+
return rampLimitSchema.parse(await client.request(`/limits/${encodeURIComponent(input.limitId)}`));
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
const createLimit = rampOperation({
|
|
37
|
+
id: "create_limit",
|
|
38
|
+
name: "Create Limit",
|
|
39
|
+
description: "Create a new Ramp spending limit for a set of users.",
|
|
40
|
+
input: rampLimitCreateInputSchema,
|
|
41
|
+
output: rampLimitSchema,
|
|
42
|
+
needsApproval: true,
|
|
43
|
+
run: async (input, credentials) => {
|
|
44
|
+
const client = createRampClient(credentials);
|
|
45
|
+
const { idempotency_key, ...body } = input;
|
|
46
|
+
return rampLimitSchema.parse(await client.request("/limits", {
|
|
47
|
+
method: "POST",
|
|
48
|
+
body,
|
|
49
|
+
...idempotency_key !== void 0 ? { idempotencyKey: idempotency_key } : {}
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
const updateLimit = rampOperation({
|
|
54
|
+
id: "update_limit",
|
|
55
|
+
name: "Update Limit",
|
|
56
|
+
description: "Update display name or spending restrictions on an existing Ramp limit.",
|
|
57
|
+
input: rampLimitUpdateInputSchema,
|
|
58
|
+
output: rampLimitSchema,
|
|
59
|
+
needsApproval: true,
|
|
60
|
+
run: async (input, credentials) => {
|
|
61
|
+
const client = createRampClient(credentials);
|
|
62
|
+
const { limitId, ...body } = input;
|
|
63
|
+
await client.request(`/limits/${encodeURIComponent(limitId)}`, {
|
|
64
|
+
method: "PATCH",
|
|
65
|
+
body: omitUndefined(body)
|
|
66
|
+
});
|
|
67
|
+
return rampLimitSchema.parse(await client.request(`/limits/${encodeURIComponent(limitId)}`));
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const deleteLimit = rampOperation({
|
|
71
|
+
id: "delete_limit",
|
|
72
|
+
name: "Delete Limit",
|
|
73
|
+
description: "Delete a Ramp spending limit by id.",
|
|
74
|
+
input: rampLimitDeleteInputSchema,
|
|
75
|
+
output: z.object({ success: z.boolean() }),
|
|
76
|
+
needsApproval: true,
|
|
77
|
+
run: async (input, credentials) => {
|
|
78
|
+
await createRampClient(credentials).request(`/limits/${encodeURIComponent(input.limitId)}`, { method: "DELETE" });
|
|
79
|
+
return { success: true };
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
//#endregion
|
|
84
|
+
export { createLimit, deleteLimit, getLimit, listLimits, updateLimit };
|
|
@@ -0,0 +1,69 @@
|
|
|
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/locations.d.ts
|
|
6
|
+
declare const listLocations: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
7
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
8
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
10
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
11
|
+
data: z.ZodArray<z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
name: z.ZodOptional<z.ZodString>;
|
|
14
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$loose>>;
|
|
16
|
+
page: z.ZodOptional<z.ZodObject<{
|
|
17
|
+
next: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
20
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
21
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
22
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
23
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
24
|
+
declare const getLocation: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
25
|
+
locationId: z.ZodString;
|
|
26
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
name: z.ZodOptional<z.ZodString>;
|
|
29
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
31
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
32
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
33
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
34
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
35
|
+
declare const createLocation: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
36
|
+
name: z.ZodString;
|
|
37
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
39
|
+
id: z.ZodString;
|
|
40
|
+
name: z.ZodOptional<z.ZodString>;
|
|
41
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
43
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
44
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
45
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
46
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
47
|
+
declare const updateLocation: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
48
|
+
locationId: z.ZodString;
|
|
49
|
+
name: z.ZodString;
|
|
50
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
51
|
+
id: z.ZodString;
|
|
52
|
+
name: z.ZodOptional<z.ZodString>;
|
|
53
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
54
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
55
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
56
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
57
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
58
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
59
|
+
declare const deleteLocation: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
60
|
+
locationId: z.ZodString;
|
|
61
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
62
|
+
success: z.ZodBoolean;
|
|
63
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
64
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
65
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
66
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
67
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
68
|
+
//#endregion
|
|
69
|
+
export { createLocation, deleteLocation, getLocation, listLocations, updateLocation };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { createRampClient } from "./client.mjs";
|
|
2
|
+
import { S as rampLocationUpdateInputSchema, _ as rampLocationDeleteInputSchema, b as rampLocationListSchema, g as rampLocationCreateInputSchema, v as rampLocationGetInputSchema, x as rampLocationSchema, y as rampLocationListInputSchema } from "./organization-BSaEpvBn.mjs";
|
|
3
|
+
import { t as rampOperation } from "./factory-Da6YVHdL.mjs";
|
|
4
|
+
import { t as omitUndefined } from "./shared-CTTtP5gv.mjs";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
//#region src/locations.ts
|
|
8
|
+
const listLocations = rampOperation({
|
|
9
|
+
id: "list_locations",
|
|
10
|
+
name: "List Locations",
|
|
11
|
+
description: "List locations configured in the Ramp business, optionally filtered by entity.",
|
|
12
|
+
input: rampLocationListInputSchema,
|
|
13
|
+
output: rampLocationListSchema,
|
|
14
|
+
run: async (input, credentials) => {
|
|
15
|
+
const client = createRampClient(credentials);
|
|
16
|
+
return rampLocationListSchema.parse(await client.request("/locations", { query: omitUndefined({
|
|
17
|
+
entity_id: input.entity_id,
|
|
18
|
+
page_size: input.pageSize,
|
|
19
|
+
start: input.cursor
|
|
20
|
+
}) }));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const getLocation = rampOperation({
|
|
24
|
+
id: "get_location",
|
|
25
|
+
name: "Get Location",
|
|
26
|
+
description: "Fetch a Ramp location by id.",
|
|
27
|
+
input: rampLocationGetInputSchema,
|
|
28
|
+
output: rampLocationSchema,
|
|
29
|
+
run: async (input, credentials) => {
|
|
30
|
+
const client = createRampClient(credentials);
|
|
31
|
+
return rampLocationSchema.parse(await client.request(`/locations/${encodeURIComponent(input.locationId)}`));
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const createLocation = rampOperation({
|
|
35
|
+
id: "create_location",
|
|
36
|
+
name: "Create Location",
|
|
37
|
+
description: "Create a new location in the Ramp business.",
|
|
38
|
+
input: rampLocationCreateInputSchema,
|
|
39
|
+
output: rampLocationSchema,
|
|
40
|
+
needsApproval: true,
|
|
41
|
+
run: async (input, credentials) => {
|
|
42
|
+
const client = createRampClient(credentials);
|
|
43
|
+
return rampLocationSchema.parse(await client.request("/locations", {
|
|
44
|
+
method: "POST",
|
|
45
|
+
body: input
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const updateLocation = rampOperation({
|
|
50
|
+
id: "update_location",
|
|
51
|
+
name: "Update Location",
|
|
52
|
+
description: "Rename an existing Ramp location.",
|
|
53
|
+
input: rampLocationUpdateInputSchema,
|
|
54
|
+
output: rampLocationSchema,
|
|
55
|
+
needsApproval: true,
|
|
56
|
+
run: async (input, credentials) => {
|
|
57
|
+
const client = createRampClient(credentials);
|
|
58
|
+
const { locationId, name } = input;
|
|
59
|
+
await client.request(`/locations/${encodeURIComponent(locationId)}`, {
|
|
60
|
+
method: "PATCH",
|
|
61
|
+
body: { name }
|
|
62
|
+
});
|
|
63
|
+
return rampLocationSchema.parse(await client.request(`/locations/${encodeURIComponent(locationId)}`));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
const deleteLocation = rampOperation({
|
|
67
|
+
id: "delete_location",
|
|
68
|
+
name: "Delete Location",
|
|
69
|
+
description: "Delete a Ramp location by id.",
|
|
70
|
+
input: rampLocationDeleteInputSchema,
|
|
71
|
+
output: z.object({ success: z.boolean() }),
|
|
72
|
+
needsApproval: true,
|
|
73
|
+
run: async (input, credentials) => {
|
|
74
|
+
await createRampClient(credentials).request(`/locations/${encodeURIComponent(input.locationId)}`, { method: "DELETE" });
|
|
75
|
+
return { success: true };
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
//#endregion
|
|
80
|
+
export { createLocation, deleteLocation, getLocation, listLocations, updateLocation };
|
package/dist/memos.d.mts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
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/memos.d.ts
|
|
7
|
+
declare const listMemos: _keystrokehq_core0.Operation<zod.ZodObject<{
|
|
8
|
+
transaction_id: zod.ZodOptional<zod.ZodString>;
|
|
9
|
+
user_id: zod.ZodOptional<zod.ZodString>;
|
|
10
|
+
pageSize: zod.ZodOptional<zod.ZodNumber>;
|
|
11
|
+
cursor: zod.ZodOptional<zod.ZodString>;
|
|
12
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
13
|
+
data: zod.ZodArray<zod.ZodObject<{
|
|
14
|
+
id: zod.ZodString;
|
|
15
|
+
transaction_id: zod.ZodOptional<zod.ZodString>;
|
|
16
|
+
user_id: zod.ZodOptional<zod.ZodString>;
|
|
17
|
+
body: zod.ZodOptional<zod.ZodString>;
|
|
18
|
+
created_at: zod.ZodOptional<zod.ZodString>;
|
|
19
|
+
}, zod_v4_core0.$loose>>;
|
|
20
|
+
page: zod.ZodOptional<zod.ZodObject<{
|
|
21
|
+
next: zod.ZodOptional<zod.ZodString>;
|
|
22
|
+
}, zod_v4_core0.$strip>>;
|
|
23
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"ramp", zod.ZodObject<{
|
|
24
|
+
RAMP_ACCESS_TOKEN: zod.ZodString;
|
|
25
|
+
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
26
|
+
RAMP_ACCESS_TOKEN: zod.ZodString;
|
|
27
|
+
}, zod_v4_core0.$strip>>[] | undefined>], undefined>;
|
|
28
|
+
declare const getMemo: _keystrokehq_core0.Operation<zod.ZodObject<{
|
|
29
|
+
memoId: zod.ZodString;
|
|
30
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
31
|
+
id: zod.ZodString;
|
|
32
|
+
transaction_id: zod.ZodOptional<zod.ZodString>;
|
|
33
|
+
user_id: zod.ZodOptional<zod.ZodString>;
|
|
34
|
+
body: zod.ZodOptional<zod.ZodString>;
|
|
35
|
+
created_at: zod.ZodOptional<zod.ZodString>;
|
|
36
|
+
}, zod_v4_core0.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", zod.ZodObject<{
|
|
37
|
+
RAMP_ACCESS_TOKEN: zod.ZodString;
|
|
38
|
+
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
39
|
+
RAMP_ACCESS_TOKEN: zod.ZodString;
|
|
40
|
+
}, zod_v4_core0.$strip>>[] | undefined>], undefined>;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { getMemo, listMemos };
|
package/dist/memos.mjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createRampClient } from "./client.mjs";
|
|
2
|
+
import { C as rampMemoGetInputSchema, E as rampMemoSchema, T as rampMemoListSchema, w as rampMemoListInputSchema } from "./organization-BSaEpvBn.mjs";
|
|
3
|
+
import { t as rampOperation } from "./factory-Da6YVHdL.mjs";
|
|
4
|
+
import { t as omitUndefined } from "./shared-CTTtP5gv.mjs";
|
|
5
|
+
|
|
6
|
+
//#region src/memos.ts
|
|
7
|
+
const listMemos = rampOperation({
|
|
8
|
+
id: "list_memos",
|
|
9
|
+
name: "List Memos",
|
|
10
|
+
description: "List Ramp memos attached to transactions or users.",
|
|
11
|
+
input: rampMemoListInputSchema,
|
|
12
|
+
output: rampMemoListSchema,
|
|
13
|
+
run: async (input, credentials) => {
|
|
14
|
+
const client = createRampClient(credentials);
|
|
15
|
+
return rampMemoListSchema.parse(await client.request("/memos", { query: omitUndefined({
|
|
16
|
+
transaction_id: input.transaction_id,
|
|
17
|
+
user_id: input.user_id,
|
|
18
|
+
page_size: input.pageSize,
|
|
19
|
+
start: input.cursor
|
|
20
|
+
}) }));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const getMemo = rampOperation({
|
|
24
|
+
id: "get_memo",
|
|
25
|
+
name: "Get Memo",
|
|
26
|
+
description: "Fetch a Ramp memo by id.",
|
|
27
|
+
input: rampMemoGetInputSchema,
|
|
28
|
+
output: rampMemoSchema,
|
|
29
|
+
run: async (input, credentials) => {
|
|
30
|
+
const client = createRampClient(credentials);
|
|
31
|
+
return rampMemoSchema.parse(await client.request(`/memos/${encodeURIComponent(input.memoId)}`));
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { getMemo, listMemos };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,77 @@
|
|
|
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/new-resources.ts
|
|
5
|
+
/**
|
|
6
|
+
* Newer Ramp resources documented after the original PLAN.md was written:
|
|
7
|
+
* `purchase_orders`, `applications`, and `unified_requests`. Shipping these
|
|
8
|
+
* unblocks the corresponding webhook triggers.
|
|
9
|
+
*/
|
|
10
|
+
const rampPurchaseOrderStatusSchema = z.enum([
|
|
11
|
+
"DRAFT",
|
|
12
|
+
"PENDING",
|
|
13
|
+
"APPROVED",
|
|
14
|
+
"DENIED",
|
|
15
|
+
"CANCELED",
|
|
16
|
+
"CLOSED"
|
|
17
|
+
]);
|
|
18
|
+
const rampPurchaseOrderSchema = z.object({
|
|
19
|
+
id: rampIdSchema,
|
|
20
|
+
number: z.string().optional(),
|
|
21
|
+
status: rampPurchaseOrderStatusSchema.optional(),
|
|
22
|
+
vendor_id: rampIdSchema.optional(),
|
|
23
|
+
amount: rampMoneySchema.optional(),
|
|
24
|
+
created_at: rampTimestampSchema.optional(),
|
|
25
|
+
description: z.string().optional(),
|
|
26
|
+
entity_id: rampIdSchema.optional()
|
|
27
|
+
}).passthrough();
|
|
28
|
+
const rampPurchaseOrderListInputSchema = z.object({
|
|
29
|
+
status: rampPurchaseOrderStatusSchema.optional(),
|
|
30
|
+
vendor_id: rampIdSchema.optional()
|
|
31
|
+
}).merge(rampListPaginationInputSchema);
|
|
32
|
+
const rampPurchaseOrderListSchema = rampListResponseSchema(rampPurchaseOrderSchema);
|
|
33
|
+
const rampPurchaseOrderGetInputSchema = z.object({ purchaseOrderId: rampIdSchema });
|
|
34
|
+
const rampApplicationStatusSchema = z.enum([
|
|
35
|
+
"PENDING",
|
|
36
|
+
"APPROVED",
|
|
37
|
+
"DENIED",
|
|
38
|
+
"CANCELED",
|
|
39
|
+
"DRAFT"
|
|
40
|
+
]);
|
|
41
|
+
const rampApplicationSchema = z.object({
|
|
42
|
+
id: rampIdSchema,
|
|
43
|
+
applicant_user_id: rampIdSchema.optional(),
|
|
44
|
+
status: rampApplicationStatusSchema.optional(),
|
|
45
|
+
created_at: rampTimestampSchema.optional(),
|
|
46
|
+
application_type: z.string().optional()
|
|
47
|
+
}).passthrough();
|
|
48
|
+
const rampApplicationListInputSchema = z.object({ status: rampApplicationStatusSchema.optional() }).merge(rampListPaginationInputSchema);
|
|
49
|
+
const rampApplicationListSchema = rampListResponseSchema(rampApplicationSchema);
|
|
50
|
+
const rampApplicationGetInputSchema = z.object({ applicationId: rampIdSchema });
|
|
51
|
+
const rampUnifiedRequestStatusSchema = z.enum([
|
|
52
|
+
"PENDING",
|
|
53
|
+
"APPROVED",
|
|
54
|
+
"DENIED",
|
|
55
|
+
"CANCELED",
|
|
56
|
+
"FULFILLED"
|
|
57
|
+
]);
|
|
58
|
+
const rampUnifiedRequestSchema = z.object({
|
|
59
|
+
id: rampIdSchema,
|
|
60
|
+
status: rampUnifiedRequestStatusSchema.optional(),
|
|
61
|
+
request_type: z.string().optional(),
|
|
62
|
+
user_id: rampIdSchema.optional(),
|
|
63
|
+
created_at: rampTimestampSchema.optional(),
|
|
64
|
+
updated_at: rampTimestampSchema.optional(),
|
|
65
|
+
resource_id: rampIdSchema.optional(),
|
|
66
|
+
resource_type: z.string().optional()
|
|
67
|
+
}).passthrough();
|
|
68
|
+
const rampUnifiedRequestListInputSchema = z.object({
|
|
69
|
+
status: rampUnifiedRequestStatusSchema.optional(),
|
|
70
|
+
request_type: z.string().optional(),
|
|
71
|
+
user_id: rampIdSchema.optional()
|
|
72
|
+
}).merge(rampListPaginationInputSchema);
|
|
73
|
+
const rampUnifiedRequestListSchema = rampListResponseSchema(rampUnifiedRequestSchema);
|
|
74
|
+
const rampUnifiedRequestGetInputSchema = z.object({ unifiedRequestId: rampIdSchema });
|
|
75
|
+
|
|
76
|
+
//#endregion
|
|
77
|
+
export { rampApplicationStatusSchema as a, rampPurchaseOrderListSchema as c, rampUnifiedRequestGetInputSchema as d, rampUnifiedRequestListInputSchema as f, rampUnifiedRequestStatusSchema as h, rampApplicationSchema as i, rampPurchaseOrderSchema as l, rampUnifiedRequestSchema as m, rampApplicationListInputSchema as n, rampPurchaseOrderGetInputSchema as o, rampUnifiedRequestListSchema as p, rampApplicationListSchema as r, rampPurchaseOrderListInputSchema as s, rampApplicationGetInputSchema as t, rampPurchaseOrderStatusSchema as u };
|
|
@@ -0,0 +1,103 @@
|
|
|
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/organization.ts
|
|
5
|
+
const rampDepartmentSchema = z.object({
|
|
6
|
+
id: rampIdSchema,
|
|
7
|
+
name: z.string().optional()
|
|
8
|
+
}).passthrough();
|
|
9
|
+
const rampDepartmentListInputSchema = rampListPaginationInputSchema;
|
|
10
|
+
const rampDepartmentListSchema = rampListResponseSchema(rampDepartmentSchema);
|
|
11
|
+
const rampDepartmentGetInputSchema = z.object({ departmentId: rampIdSchema });
|
|
12
|
+
const rampDepartmentCreateInputSchema = z.object({ name: z.string().trim().min(1) });
|
|
13
|
+
const rampDepartmentUpdateInputSchema = z.object({
|
|
14
|
+
departmentId: rampIdSchema,
|
|
15
|
+
name: z.string().trim().min(1)
|
|
16
|
+
});
|
|
17
|
+
const rampDepartmentDeleteInputSchema = z.object({ departmentId: rampIdSchema });
|
|
18
|
+
const rampLocationSchema = z.object({
|
|
19
|
+
id: rampIdSchema,
|
|
20
|
+
name: z.string().optional(),
|
|
21
|
+
entity_id: rampIdSchema.optional()
|
|
22
|
+
}).passthrough();
|
|
23
|
+
const rampLocationListInputSchema = z.object({ entity_id: rampIdSchema.optional() }).merge(rampListPaginationInputSchema);
|
|
24
|
+
const rampLocationListSchema = rampListResponseSchema(rampLocationSchema);
|
|
25
|
+
const rampLocationGetInputSchema = z.object({ locationId: rampIdSchema });
|
|
26
|
+
const rampLocationCreateInputSchema = z.object({
|
|
27
|
+
name: z.string().trim().min(1),
|
|
28
|
+
entity_id: rampIdSchema.optional()
|
|
29
|
+
});
|
|
30
|
+
const rampLocationUpdateInputSchema = z.object({
|
|
31
|
+
locationId: rampIdSchema,
|
|
32
|
+
name: z.string().trim().min(1)
|
|
33
|
+
});
|
|
34
|
+
const rampLocationDeleteInputSchema = z.object({ locationId: rampIdSchema });
|
|
35
|
+
const rampLimitIntervalSchema = z.enum([
|
|
36
|
+
"DAILY",
|
|
37
|
+
"WEEKLY",
|
|
38
|
+
"MONTHLY",
|
|
39
|
+
"QUARTERLY",
|
|
40
|
+
"YEARLY",
|
|
41
|
+
"TOTAL"
|
|
42
|
+
]);
|
|
43
|
+
const rampLimitSchema = z.object({
|
|
44
|
+
id: rampIdSchema,
|
|
45
|
+
display_name: z.string().optional(),
|
|
46
|
+
state: z.string().optional(),
|
|
47
|
+
spend_program_id: rampIdSchema.optional(),
|
|
48
|
+
users: z.array(rampIdSchema).optional(),
|
|
49
|
+
spending_restrictions: z.object({
|
|
50
|
+
amount: z.number().optional(),
|
|
51
|
+
currency: z.string().optional(),
|
|
52
|
+
interval: rampLimitIntervalSchema.optional(),
|
|
53
|
+
transaction_amount_limit: z.number().optional()
|
|
54
|
+
}).passthrough().optional(),
|
|
55
|
+
balance: rampMoneySchema.optional(),
|
|
56
|
+
created_at: rampTimestampSchema.optional()
|
|
57
|
+
}).passthrough();
|
|
58
|
+
const rampLimitListInputSchema = z.object({
|
|
59
|
+
user_id: rampIdSchema.optional(),
|
|
60
|
+
spend_program_id: rampIdSchema.optional(),
|
|
61
|
+
entity_id: rampIdSchema.optional()
|
|
62
|
+
}).merge(rampListPaginationInputSchema);
|
|
63
|
+
const rampLimitListSchema = rampListResponseSchema(rampLimitSchema);
|
|
64
|
+
const rampLimitGetInputSchema = z.object({ limitId: rampIdSchema });
|
|
65
|
+
const rampLimitCreateInputSchema = z.object({
|
|
66
|
+
display_name: z.string().trim().min(1),
|
|
67
|
+
user_ids: z.array(rampIdSchema).min(1),
|
|
68
|
+
spend_program_id: rampIdSchema.optional(),
|
|
69
|
+
spending_restrictions: z.object({
|
|
70
|
+
amount: z.number().int().nonnegative(),
|
|
71
|
+
currency: z.string().trim().length(3),
|
|
72
|
+
interval: rampLimitIntervalSchema,
|
|
73
|
+
transaction_amount_limit: z.number().int().nonnegative().optional(),
|
|
74
|
+
categories: z.array(z.string()).optional()
|
|
75
|
+
}),
|
|
76
|
+
idempotency_key: z.string().trim().min(1).optional()
|
|
77
|
+
});
|
|
78
|
+
const rampLimitUpdateInputSchema = z.object({
|
|
79
|
+
limitId: rampIdSchema,
|
|
80
|
+
display_name: z.string().optional(),
|
|
81
|
+
spending_restrictions: z.object({
|
|
82
|
+
amount: z.number().int().nonnegative().optional(),
|
|
83
|
+
interval: rampLimitIntervalSchema.optional(),
|
|
84
|
+
transaction_amount_limit: z.number().int().nonnegative().optional()
|
|
85
|
+
}).optional()
|
|
86
|
+
});
|
|
87
|
+
const rampLimitDeleteInputSchema = z.object({ limitId: rampIdSchema });
|
|
88
|
+
const rampMemoSchema = z.object({
|
|
89
|
+
id: rampIdSchema,
|
|
90
|
+
transaction_id: rampIdSchema.optional(),
|
|
91
|
+
user_id: rampIdSchema.optional(),
|
|
92
|
+
body: z.string().optional(),
|
|
93
|
+
created_at: rampTimestampSchema.optional()
|
|
94
|
+
}).passthrough();
|
|
95
|
+
const rampMemoListInputSchema = z.object({
|
|
96
|
+
transaction_id: rampIdSchema.optional(),
|
|
97
|
+
user_id: rampIdSchema.optional()
|
|
98
|
+
}).merge(rampListPaginationInputSchema);
|
|
99
|
+
const rampMemoListSchema = rampListResponseSchema(rampMemoSchema);
|
|
100
|
+
const rampMemoGetInputSchema = z.object({ memoId: rampIdSchema });
|
|
101
|
+
|
|
102
|
+
//#endregion
|
|
103
|
+
export { rampMemoGetInputSchema as C, rampMemoSchema as E, rampLocationUpdateInputSchema as S, rampMemoListSchema as T, rampLocationDeleteInputSchema as _, rampDepartmentListSchema as a, rampLocationListSchema as b, rampLimitCreateInputSchema as c, rampLimitIntervalSchema as d, rampLimitListInputSchema as f, rampLocationCreateInputSchema as g, rampLimitUpdateInputSchema as h, rampDepartmentListInputSchema as i, rampLimitDeleteInputSchema as l, rampLimitSchema as m, rampDepartmentDeleteInputSchema as n, rampDepartmentSchema as o, rampLimitListSchema as p, rampDepartmentGetInputSchema as r, rampDepartmentUpdateInputSchema as s, rampDepartmentCreateInputSchema as t, rampLimitGetInputSchema as u, rampLocationGetInputSchema as v, rampMemoListInputSchema as w, rampLocationSchema as x, rampLocationListInputSchema as y };
|