@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,74 @@
|
|
|
1
|
+
import { a as rampListPaginationInputSchema, f as rampTimestampSchema, i as rampIdSchema, o as rampListResponseSchema } from "./common-CUpmNYXw.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/schemas/users.ts
|
|
5
|
+
const rampUserRoleSchema = z.enum([
|
|
6
|
+
"BUSINESS_OWNER",
|
|
7
|
+
"BUSINESS_ADMIN",
|
|
8
|
+
"BUSINESS_USER",
|
|
9
|
+
"IT_ADMIN",
|
|
10
|
+
"GUEST_USER",
|
|
11
|
+
"VENDOR_NETWORK_ADMIN",
|
|
12
|
+
"AUDITOR",
|
|
13
|
+
"DEVELOPER_ADMIN"
|
|
14
|
+
]);
|
|
15
|
+
const rampUserStatusSchema = z.enum([
|
|
16
|
+
"INVITE_PENDING",
|
|
17
|
+
"USER_ACTIVE",
|
|
18
|
+
"USER_INACTIVE",
|
|
19
|
+
"USER_SUSPENDED"
|
|
20
|
+
]);
|
|
21
|
+
const rampUserSchema = z.object({
|
|
22
|
+
id: rampIdSchema,
|
|
23
|
+
email: z.string().trim().min(1),
|
|
24
|
+
first_name: z.string().optional(),
|
|
25
|
+
last_name: z.string().optional(),
|
|
26
|
+
business_id: rampIdSchema.optional(),
|
|
27
|
+
department_id: rampIdSchema.optional(),
|
|
28
|
+
location_id: rampIdSchema.optional(),
|
|
29
|
+
entity_id: rampIdSchema.optional(),
|
|
30
|
+
employee_id: z.string().optional(),
|
|
31
|
+
manager_id: rampIdSchema.optional(),
|
|
32
|
+
role: rampUserRoleSchema.optional(),
|
|
33
|
+
status: rampUserStatusSchema.optional(),
|
|
34
|
+
is_manager: z.boolean().optional(),
|
|
35
|
+
phone: z.string().optional()
|
|
36
|
+
}).passthrough();
|
|
37
|
+
const rampUserListInputSchema = z.object({
|
|
38
|
+
department_id: rampIdSchema.optional(),
|
|
39
|
+
location_id: rampIdSchema.optional(),
|
|
40
|
+
entity_id: rampIdSchema.optional(),
|
|
41
|
+
role: rampUserRoleSchema.optional(),
|
|
42
|
+
email: z.string().trim().min(1).optional()
|
|
43
|
+
}).merge(rampListPaginationInputSchema);
|
|
44
|
+
const rampUserListSchema = rampListResponseSchema(rampUserSchema);
|
|
45
|
+
const rampUserGetInputSchema = z.object({ userId: rampIdSchema });
|
|
46
|
+
const rampUserInviteInputSchema = z.object({
|
|
47
|
+
email: z.string().trim().min(1),
|
|
48
|
+
first_name: z.string().trim().min(1),
|
|
49
|
+
last_name: z.string().trim().min(1),
|
|
50
|
+
role: rampUserRoleSchema,
|
|
51
|
+
department_id: rampIdSchema.optional(),
|
|
52
|
+
location_id: rampIdSchema.optional(),
|
|
53
|
+
direct_manager_id: rampIdSchema.optional(),
|
|
54
|
+
idempotency_key: z.string().trim().min(1).optional()
|
|
55
|
+
});
|
|
56
|
+
const rampUserUpdateInputSchema = z.object({
|
|
57
|
+
userId: rampIdSchema,
|
|
58
|
+
department_id: rampIdSchema.optional(),
|
|
59
|
+
location_id: rampIdSchema.optional(),
|
|
60
|
+
direct_manager_id: rampIdSchema.optional(),
|
|
61
|
+
role: rampUserRoleSchema.optional(),
|
|
62
|
+
is_manager: z.boolean().optional()
|
|
63
|
+
});
|
|
64
|
+
const rampUserDeactivateInputSchema = z.object({ userId: rampIdSchema });
|
|
65
|
+
const rampDeferredTaskSchema = z.object({
|
|
66
|
+
id: rampIdSchema,
|
|
67
|
+
status: z.string().optional(),
|
|
68
|
+
data: z.unknown().optional(),
|
|
69
|
+
error: z.unknown().optional(),
|
|
70
|
+
created_at: rampTimestampSchema.optional()
|
|
71
|
+
}).passthrough();
|
|
72
|
+
|
|
73
|
+
//#endregion
|
|
74
|
+
export { rampUserListInputSchema as a, rampUserSchema as c, rampUserInviteInputSchema as i, rampUserStatusSchema as l, rampUserDeactivateInputSchema as n, rampUserListSchema as o, rampUserGetInputSchema as r, rampUserRoleSchema as s, rampDeferredTaskSchema as t, rampUserUpdateInputSchema as u };
|
package/dist/users.d.mts
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
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/users.d.ts
|
|
6
|
+
declare const listUsers: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
7
|
+
department_id: z.ZodOptional<z.ZodString>;
|
|
8
|
+
location_id: z.ZodOptional<z.ZodString>;
|
|
9
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
10
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
11
|
+
BUSINESS_OWNER: "BUSINESS_OWNER";
|
|
12
|
+
BUSINESS_ADMIN: "BUSINESS_ADMIN";
|
|
13
|
+
BUSINESS_USER: "BUSINESS_USER";
|
|
14
|
+
IT_ADMIN: "IT_ADMIN";
|
|
15
|
+
GUEST_USER: "GUEST_USER";
|
|
16
|
+
VENDOR_NETWORK_ADMIN: "VENDOR_NETWORK_ADMIN";
|
|
17
|
+
AUDITOR: "AUDITOR";
|
|
18
|
+
DEVELOPER_ADMIN: "DEVELOPER_ADMIN";
|
|
19
|
+
}>>;
|
|
20
|
+
email: z.ZodOptional<z.ZodString>;
|
|
21
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
24
|
+
data: z.ZodArray<z.ZodObject<{
|
|
25
|
+
id: z.ZodString;
|
|
26
|
+
email: z.ZodString;
|
|
27
|
+
first_name: z.ZodOptional<z.ZodString>;
|
|
28
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
29
|
+
business_id: z.ZodOptional<z.ZodString>;
|
|
30
|
+
department_id: z.ZodOptional<z.ZodString>;
|
|
31
|
+
location_id: z.ZodOptional<z.ZodString>;
|
|
32
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
33
|
+
employee_id: z.ZodOptional<z.ZodString>;
|
|
34
|
+
manager_id: z.ZodOptional<z.ZodString>;
|
|
35
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
BUSINESS_OWNER: "BUSINESS_OWNER";
|
|
37
|
+
BUSINESS_ADMIN: "BUSINESS_ADMIN";
|
|
38
|
+
BUSINESS_USER: "BUSINESS_USER";
|
|
39
|
+
IT_ADMIN: "IT_ADMIN";
|
|
40
|
+
GUEST_USER: "GUEST_USER";
|
|
41
|
+
VENDOR_NETWORK_ADMIN: "VENDOR_NETWORK_ADMIN";
|
|
42
|
+
AUDITOR: "AUDITOR";
|
|
43
|
+
DEVELOPER_ADMIN: "DEVELOPER_ADMIN";
|
|
44
|
+
}>>;
|
|
45
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
46
|
+
INVITE_PENDING: "INVITE_PENDING";
|
|
47
|
+
USER_ACTIVE: "USER_ACTIVE";
|
|
48
|
+
USER_INACTIVE: "USER_INACTIVE";
|
|
49
|
+
USER_SUSPENDED: "USER_SUSPENDED";
|
|
50
|
+
}>>;
|
|
51
|
+
is_manager: z.ZodOptional<z.ZodBoolean>;
|
|
52
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, z.core.$loose>>;
|
|
54
|
+
page: z.ZodOptional<z.ZodObject<{
|
|
55
|
+
next: z.ZodOptional<z.ZodString>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
58
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
59
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
60
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
61
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
62
|
+
declare const getUser: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
63
|
+
userId: z.ZodString;
|
|
64
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
65
|
+
id: z.ZodString;
|
|
66
|
+
email: z.ZodString;
|
|
67
|
+
first_name: z.ZodOptional<z.ZodString>;
|
|
68
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
69
|
+
business_id: z.ZodOptional<z.ZodString>;
|
|
70
|
+
department_id: z.ZodOptional<z.ZodString>;
|
|
71
|
+
location_id: z.ZodOptional<z.ZodString>;
|
|
72
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
73
|
+
employee_id: z.ZodOptional<z.ZodString>;
|
|
74
|
+
manager_id: z.ZodOptional<z.ZodString>;
|
|
75
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
76
|
+
BUSINESS_OWNER: "BUSINESS_OWNER";
|
|
77
|
+
BUSINESS_ADMIN: "BUSINESS_ADMIN";
|
|
78
|
+
BUSINESS_USER: "BUSINESS_USER";
|
|
79
|
+
IT_ADMIN: "IT_ADMIN";
|
|
80
|
+
GUEST_USER: "GUEST_USER";
|
|
81
|
+
VENDOR_NETWORK_ADMIN: "VENDOR_NETWORK_ADMIN";
|
|
82
|
+
AUDITOR: "AUDITOR";
|
|
83
|
+
DEVELOPER_ADMIN: "DEVELOPER_ADMIN";
|
|
84
|
+
}>>;
|
|
85
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
86
|
+
INVITE_PENDING: "INVITE_PENDING";
|
|
87
|
+
USER_ACTIVE: "USER_ACTIVE";
|
|
88
|
+
USER_INACTIVE: "USER_INACTIVE";
|
|
89
|
+
USER_SUSPENDED: "USER_SUSPENDED";
|
|
90
|
+
}>>;
|
|
91
|
+
is_manager: z.ZodOptional<z.ZodBoolean>;
|
|
92
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
93
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
94
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
95
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
96
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
97
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
98
|
+
declare const inviteUser: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
99
|
+
email: z.ZodString;
|
|
100
|
+
first_name: z.ZodString;
|
|
101
|
+
last_name: z.ZodString;
|
|
102
|
+
role: z.ZodEnum<{
|
|
103
|
+
BUSINESS_OWNER: "BUSINESS_OWNER";
|
|
104
|
+
BUSINESS_ADMIN: "BUSINESS_ADMIN";
|
|
105
|
+
BUSINESS_USER: "BUSINESS_USER";
|
|
106
|
+
IT_ADMIN: "IT_ADMIN";
|
|
107
|
+
GUEST_USER: "GUEST_USER";
|
|
108
|
+
VENDOR_NETWORK_ADMIN: "VENDOR_NETWORK_ADMIN";
|
|
109
|
+
AUDITOR: "AUDITOR";
|
|
110
|
+
DEVELOPER_ADMIN: "DEVELOPER_ADMIN";
|
|
111
|
+
}>;
|
|
112
|
+
department_id: z.ZodOptional<z.ZodString>;
|
|
113
|
+
location_id: z.ZodOptional<z.ZodString>;
|
|
114
|
+
direct_manager_id: z.ZodOptional<z.ZodString>;
|
|
115
|
+
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
116
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
117
|
+
id: z.ZodString;
|
|
118
|
+
status: z.ZodOptional<z.ZodString>;
|
|
119
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
120
|
+
error: z.ZodOptional<z.ZodUnknown>;
|
|
121
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
123
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
124
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
125
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
126
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
127
|
+
declare const updateUser: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
128
|
+
userId: z.ZodString;
|
|
129
|
+
department_id: z.ZodOptional<z.ZodString>;
|
|
130
|
+
location_id: z.ZodOptional<z.ZodString>;
|
|
131
|
+
direct_manager_id: z.ZodOptional<z.ZodString>;
|
|
132
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
133
|
+
BUSINESS_OWNER: "BUSINESS_OWNER";
|
|
134
|
+
BUSINESS_ADMIN: "BUSINESS_ADMIN";
|
|
135
|
+
BUSINESS_USER: "BUSINESS_USER";
|
|
136
|
+
IT_ADMIN: "IT_ADMIN";
|
|
137
|
+
GUEST_USER: "GUEST_USER";
|
|
138
|
+
VENDOR_NETWORK_ADMIN: "VENDOR_NETWORK_ADMIN";
|
|
139
|
+
AUDITOR: "AUDITOR";
|
|
140
|
+
DEVELOPER_ADMIN: "DEVELOPER_ADMIN";
|
|
141
|
+
}>>;
|
|
142
|
+
is_manager: z.ZodOptional<z.ZodBoolean>;
|
|
143
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
144
|
+
id: z.ZodString;
|
|
145
|
+
email: z.ZodString;
|
|
146
|
+
first_name: z.ZodOptional<z.ZodString>;
|
|
147
|
+
last_name: z.ZodOptional<z.ZodString>;
|
|
148
|
+
business_id: z.ZodOptional<z.ZodString>;
|
|
149
|
+
department_id: z.ZodOptional<z.ZodString>;
|
|
150
|
+
location_id: z.ZodOptional<z.ZodString>;
|
|
151
|
+
entity_id: z.ZodOptional<z.ZodString>;
|
|
152
|
+
employee_id: z.ZodOptional<z.ZodString>;
|
|
153
|
+
manager_id: z.ZodOptional<z.ZodString>;
|
|
154
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
155
|
+
BUSINESS_OWNER: "BUSINESS_OWNER";
|
|
156
|
+
BUSINESS_ADMIN: "BUSINESS_ADMIN";
|
|
157
|
+
BUSINESS_USER: "BUSINESS_USER";
|
|
158
|
+
IT_ADMIN: "IT_ADMIN";
|
|
159
|
+
GUEST_USER: "GUEST_USER";
|
|
160
|
+
VENDOR_NETWORK_ADMIN: "VENDOR_NETWORK_ADMIN";
|
|
161
|
+
AUDITOR: "AUDITOR";
|
|
162
|
+
DEVELOPER_ADMIN: "DEVELOPER_ADMIN";
|
|
163
|
+
}>>;
|
|
164
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
165
|
+
INVITE_PENDING: "INVITE_PENDING";
|
|
166
|
+
USER_ACTIVE: "USER_ACTIVE";
|
|
167
|
+
USER_INACTIVE: "USER_INACTIVE";
|
|
168
|
+
USER_SUSPENDED: "USER_SUSPENDED";
|
|
169
|
+
}>>;
|
|
170
|
+
is_manager: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
172
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
173
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
174
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
175
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
176
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
177
|
+
declare const deactivateUser: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
178
|
+
userId: z.ZodString;
|
|
179
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
180
|
+
id: z.ZodString;
|
|
181
|
+
status: z.ZodOptional<z.ZodString>;
|
|
182
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
183
|
+
error: z.ZodOptional<z.ZodUnknown>;
|
|
184
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
185
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
186
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
187
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
188
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
189
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
190
|
+
declare const getDeferredTask: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
191
|
+
taskId: z.ZodString;
|
|
192
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
193
|
+
id: z.ZodString;
|
|
194
|
+
status: z.ZodOptional<z.ZodString>;
|
|
195
|
+
data: z.ZodOptional<z.ZodUnknown>;
|
|
196
|
+
error: z.ZodOptional<z.ZodUnknown>;
|
|
197
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
198
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
199
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
200
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
201
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
202
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
203
|
+
//#endregion
|
|
204
|
+
export { deactivateUser, getDeferredTask, getUser, inviteUser, listUsers, updateUser };
|
package/dist/users.mjs
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { createRampClient } from "./client.mjs";
|
|
2
|
+
import { a as rampUserListInputSchema, c as rampUserSchema, i as rampUserInviteInputSchema, n as rampUserDeactivateInputSchema, o as rampUserListSchema, r as rampUserGetInputSchema, t as rampDeferredTaskSchema, u as rampUserUpdateInputSchema } from "./users-ufcXrfNK.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/users.ts
|
|
8
|
+
const listUsers = rampOperation({
|
|
9
|
+
id: "list_users",
|
|
10
|
+
name: "List Users",
|
|
11
|
+
description: "List Ramp users visible to the connected credential. Supports filtering by department, location, entity, role, and email.",
|
|
12
|
+
input: rampUserListInputSchema,
|
|
13
|
+
output: rampUserListSchema,
|
|
14
|
+
run: async (input, credentials) => {
|
|
15
|
+
const client = createRampClient(credentials);
|
|
16
|
+
const query = omitUndefined({
|
|
17
|
+
department_id: input.department_id,
|
|
18
|
+
location_id: input.location_id,
|
|
19
|
+
entity_id: input.entity_id,
|
|
20
|
+
role: input.role,
|
|
21
|
+
email: input.email,
|
|
22
|
+
page_size: input.pageSize,
|
|
23
|
+
start: input.cursor
|
|
24
|
+
});
|
|
25
|
+
return rampUserListSchema.parse(await client.request("/users", { query }));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const getUser = rampOperation({
|
|
29
|
+
id: "get_user",
|
|
30
|
+
name: "Get User",
|
|
31
|
+
description: "Fetch a Ramp user by id.",
|
|
32
|
+
input: rampUserGetInputSchema,
|
|
33
|
+
output: rampUserSchema,
|
|
34
|
+
run: async (input, credentials) => {
|
|
35
|
+
const client = createRampClient(credentials);
|
|
36
|
+
return rampUserSchema.parse(await client.request(`/users/${encodeURIComponent(input.userId)}`));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
const inviteUser = rampOperation({
|
|
40
|
+
id: "invite_user",
|
|
41
|
+
name: "Invite User",
|
|
42
|
+
description: "Invite a new user to the Ramp business via a deferred task.",
|
|
43
|
+
input: rampUserInviteInputSchema,
|
|
44
|
+
output: rampDeferredTaskSchema,
|
|
45
|
+
needsApproval: true,
|
|
46
|
+
run: async (input, credentials) => {
|
|
47
|
+
const client = createRampClient(credentials);
|
|
48
|
+
const { idempotency_key, ...body } = input;
|
|
49
|
+
return rampDeferredTaskSchema.parse(await client.request("/users/deferred", {
|
|
50
|
+
method: "POST",
|
|
51
|
+
body,
|
|
52
|
+
...idempotency_key !== void 0 ? { idempotencyKey: idempotency_key } : {}
|
|
53
|
+
}));
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
const updateUser = rampOperation({
|
|
57
|
+
id: "update_user",
|
|
58
|
+
name: "Update User",
|
|
59
|
+
description: "Update assignable fields on a Ramp user (department, location, manager, role, is_manager).",
|
|
60
|
+
input: rampUserUpdateInputSchema,
|
|
61
|
+
output: rampUserSchema,
|
|
62
|
+
needsApproval: true,
|
|
63
|
+
run: async (input, credentials) => {
|
|
64
|
+
const client = createRampClient(credentials);
|
|
65
|
+
const { userId, ...body } = input;
|
|
66
|
+
await client.request(`/users/${encodeURIComponent(userId)}`, {
|
|
67
|
+
method: "PATCH",
|
|
68
|
+
body: omitUndefined(body)
|
|
69
|
+
});
|
|
70
|
+
return rampUserSchema.parse(await client.request(`/users/${encodeURIComponent(userId)}`));
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
const deactivateUser = rampOperation({
|
|
74
|
+
id: "deactivate_user",
|
|
75
|
+
name: "Deactivate User",
|
|
76
|
+
description: "Deactivate a Ramp user by id. Returns the deferred task tracking the change.",
|
|
77
|
+
input: rampUserDeactivateInputSchema,
|
|
78
|
+
output: rampDeferredTaskSchema,
|
|
79
|
+
needsApproval: true,
|
|
80
|
+
run: async (input, credentials) => {
|
|
81
|
+
const client = createRampClient(credentials);
|
|
82
|
+
return rampDeferredTaskSchema.parse(await client.request(`/users/${encodeURIComponent(input.userId)}/deferred/termination`, {
|
|
83
|
+
method: "POST",
|
|
84
|
+
body: {}
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
const getDeferredTask = rampOperation({
|
|
89
|
+
id: "get_deferred_task",
|
|
90
|
+
name: "Get Deferred Task",
|
|
91
|
+
description: "Poll the status of a deferred Ramp task (invite, termination, etc.).",
|
|
92
|
+
input: z.object({ taskId: z.string().trim().min(1) }),
|
|
93
|
+
output: rampDeferredTaskSchema,
|
|
94
|
+
run: async (input, credentials) => {
|
|
95
|
+
const client = createRampClient(credentials);
|
|
96
|
+
return rampDeferredTaskSchema.parse(await client.request(`/users/deferred/status/${encodeURIComponent(input.taskId)}`));
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
//#endregion
|
|
101
|
+
export { deactivateUser, getDeferredTask, getUser, inviteUser, listUsers, updateUser };
|
|
@@ -0,0 +1,110 @@
|
|
|
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/vendor-bank-accounts.d.ts
|
|
6
|
+
declare const listVendorBankAccounts: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
7
|
+
vendor_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
|
+
vendor_id: z.ZodOptional<z.ZodString>;
|
|
14
|
+
account_name: z.ZodOptional<z.ZodString>;
|
|
15
|
+
account_type: z.ZodOptional<z.ZodString>;
|
|
16
|
+
country_code: z.ZodOptional<z.ZodString>;
|
|
17
|
+
bank_name: z.ZodOptional<z.ZodString>;
|
|
18
|
+
account_number_last_four: z.ZodOptional<z.ZodString>;
|
|
19
|
+
routing_number_last_four: z.ZodOptional<z.ZodString>;
|
|
20
|
+
currency_code: z.ZodOptional<z.ZodString>;
|
|
21
|
+
is_default: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$loose>>;
|
|
24
|
+
page: z.ZodOptional<z.ZodObject<{
|
|
25
|
+
next: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
28
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
29
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
30
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
31
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
32
|
+
declare const getVendorBankAccount: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
33
|
+
vendorBankAccountId: z.ZodString;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
+
id: z.ZodString;
|
|
36
|
+
vendor_id: z.ZodOptional<z.ZodString>;
|
|
37
|
+
account_name: z.ZodOptional<z.ZodString>;
|
|
38
|
+
account_type: z.ZodOptional<z.ZodString>;
|
|
39
|
+
country_code: z.ZodOptional<z.ZodString>;
|
|
40
|
+
bank_name: z.ZodOptional<z.ZodString>;
|
|
41
|
+
account_number_last_four: z.ZodOptional<z.ZodString>;
|
|
42
|
+
routing_number_last_four: z.ZodOptional<z.ZodString>;
|
|
43
|
+
currency_code: z.ZodOptional<z.ZodString>;
|
|
44
|
+
is_default: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
47
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
48
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
49
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
50
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
51
|
+
declare const createVendorBankAccount: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
52
|
+
vendor_id: z.ZodString;
|
|
53
|
+
account_name: z.ZodString;
|
|
54
|
+
account_type: z.ZodString;
|
|
55
|
+
country_code: z.ZodString;
|
|
56
|
+
bank_name: z.ZodOptional<z.ZodString>;
|
|
57
|
+
account_number: z.ZodString;
|
|
58
|
+
routing_number: z.ZodOptional<z.ZodString>;
|
|
59
|
+
currency_code: z.ZodOptional<z.ZodString>;
|
|
60
|
+
is_default: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
+
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
62
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
vendor_id: z.ZodOptional<z.ZodString>;
|
|
65
|
+
account_name: z.ZodOptional<z.ZodString>;
|
|
66
|
+
account_type: z.ZodOptional<z.ZodString>;
|
|
67
|
+
country_code: z.ZodOptional<z.ZodString>;
|
|
68
|
+
bank_name: z.ZodOptional<z.ZodString>;
|
|
69
|
+
account_number_last_four: z.ZodOptional<z.ZodString>;
|
|
70
|
+
routing_number_last_four: z.ZodOptional<z.ZodString>;
|
|
71
|
+
currency_code: z.ZodOptional<z.ZodString>;
|
|
72
|
+
is_default: z.ZodOptional<z.ZodBoolean>;
|
|
73
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
75
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
76
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
77
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
78
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
79
|
+
declare const updateVendorBankAccount: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
80
|
+
vendorBankAccountId: z.ZodString;
|
|
81
|
+
account_name: z.ZodOptional<z.ZodString>;
|
|
82
|
+
is_default: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
84
|
+
id: z.ZodString;
|
|
85
|
+
vendor_id: z.ZodOptional<z.ZodString>;
|
|
86
|
+
account_name: z.ZodOptional<z.ZodString>;
|
|
87
|
+
account_type: z.ZodOptional<z.ZodString>;
|
|
88
|
+
country_code: z.ZodOptional<z.ZodString>;
|
|
89
|
+
bank_name: z.ZodOptional<z.ZodString>;
|
|
90
|
+
account_number_last_four: z.ZodOptional<z.ZodString>;
|
|
91
|
+
routing_number_last_four: z.ZodOptional<z.ZodString>;
|
|
92
|
+
currency_code: z.ZodOptional<z.ZodString>;
|
|
93
|
+
is_default: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
95
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
96
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
97
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
98
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
99
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
100
|
+
declare const deleteVendorBankAccount: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
101
|
+
vendorBankAccountId: z.ZodString;
|
|
102
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
103
|
+
success: z.ZodBoolean;
|
|
104
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
105
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
106
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
107
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
108
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
109
|
+
//#endregion
|
|
110
|
+
export { createVendorBankAccount, deleteVendorBankAccount, getVendorBankAccount, listVendorBankAccounts, updateVendorBankAccount };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { createRampClient } from "./client.mjs";
|
|
2
|
+
import { a as rampVendorBankAccountListSchema, i as rampVendorBankAccountListInputSchema, n as rampVendorBankAccountDeleteInputSchema, o as rampVendorBankAccountSchema, r as rampVendorBankAccountGetInputSchema, s as rampVendorBankAccountUpdateInputSchema, t as rampVendorBankAccountCreateInputSchema } from "./vendors-Bx1cgXwC.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/vendor-bank-accounts.ts
|
|
8
|
+
const listVendorBankAccounts = rampOperation({
|
|
9
|
+
id: "list_vendor_bank_accounts",
|
|
10
|
+
name: "List Vendor Bank Accounts",
|
|
11
|
+
description: "List bank accounts linked to Ramp vendors, optionally filtered by vendor.",
|
|
12
|
+
input: rampVendorBankAccountListInputSchema,
|
|
13
|
+
output: rampVendorBankAccountListSchema,
|
|
14
|
+
run: async (input, credentials) => {
|
|
15
|
+
const client = createRampClient(credentials);
|
|
16
|
+
const query = omitUndefined({
|
|
17
|
+
vendor_id: input.vendor_id,
|
|
18
|
+
page_size: input.pageSize,
|
|
19
|
+
start: input.cursor
|
|
20
|
+
});
|
|
21
|
+
return rampVendorBankAccountListSchema.parse(await client.request("/vendor-bank-accounts", { query }));
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
const getVendorBankAccount = rampOperation({
|
|
25
|
+
id: "get_vendor_bank_account",
|
|
26
|
+
name: "Get Vendor Bank Account",
|
|
27
|
+
description: "Fetch a vendor bank account by id.",
|
|
28
|
+
input: rampVendorBankAccountGetInputSchema,
|
|
29
|
+
output: rampVendorBankAccountSchema,
|
|
30
|
+
run: async (input, credentials) => {
|
|
31
|
+
const client = createRampClient(credentials);
|
|
32
|
+
return rampVendorBankAccountSchema.parse(await client.request(`/vendor-bank-accounts/${encodeURIComponent(input.vendorBankAccountId)}`));
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const createVendorBankAccount = rampOperation({
|
|
36
|
+
id: "create_vendor_bank_account",
|
|
37
|
+
name: "Create Vendor Bank Account",
|
|
38
|
+
description: "Register a new bank account for an existing Ramp vendor.",
|
|
39
|
+
input: rampVendorBankAccountCreateInputSchema,
|
|
40
|
+
output: rampVendorBankAccountSchema,
|
|
41
|
+
needsApproval: true,
|
|
42
|
+
run: async (input, credentials) => {
|
|
43
|
+
const client = createRampClient(credentials);
|
|
44
|
+
const { idempotency_key, ...body } = input;
|
|
45
|
+
return rampVendorBankAccountSchema.parse(await client.request("/vendor-bank-accounts", {
|
|
46
|
+
method: "POST",
|
|
47
|
+
body,
|
|
48
|
+
...idempotency_key !== void 0 ? { idempotencyKey: idempotency_key } : {}
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
const updateVendorBankAccount = rampOperation({
|
|
53
|
+
id: "update_vendor_bank_account",
|
|
54
|
+
name: "Update Vendor Bank Account",
|
|
55
|
+
description: "Update editable metadata on a vendor bank account.",
|
|
56
|
+
input: rampVendorBankAccountUpdateInputSchema,
|
|
57
|
+
output: rampVendorBankAccountSchema,
|
|
58
|
+
needsApproval: true,
|
|
59
|
+
run: async (input, credentials) => {
|
|
60
|
+
const client = createRampClient(credentials);
|
|
61
|
+
const { vendorBankAccountId, ...body } = input;
|
|
62
|
+
await client.request(`/vendor-bank-accounts/${encodeURIComponent(vendorBankAccountId)}`, {
|
|
63
|
+
method: "PATCH",
|
|
64
|
+
body: omitUndefined(body)
|
|
65
|
+
});
|
|
66
|
+
return rampVendorBankAccountSchema.parse(await client.request(`/vendor-bank-accounts/${encodeURIComponent(vendorBankAccountId)}`));
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
const deleteVendorBankAccount = rampOperation({
|
|
70
|
+
id: "delete_vendor_bank_account",
|
|
71
|
+
name: "Delete Vendor Bank Account",
|
|
72
|
+
description: "Delete a vendor bank account by id.",
|
|
73
|
+
input: rampVendorBankAccountDeleteInputSchema,
|
|
74
|
+
output: z.object({ success: z.boolean() }),
|
|
75
|
+
needsApproval: true,
|
|
76
|
+
run: async (input, credentials) => {
|
|
77
|
+
await createRampClient(credentials).request(`/vendor-bank-accounts/${encodeURIComponent(input.vendorBankAccountId)}`, { method: "DELETE" });
|
|
78
|
+
return { success: true };
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
//#endregion
|
|
83
|
+
export { createVendorBankAccount, deleteVendorBankAccount, getVendorBankAccount, listVendorBankAccounts, updateVendorBankAccount };
|