@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
package/README.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# @keystrokehq/ramp
|
|
2
|
+
|
|
3
|
+
Ramp corporate cards, spend management, bill pay, reimbursements, accounting syncs, and webhook helpers for Keystroke workflows.
|
|
4
|
+
|
|
5
|
+
This package is a single-mode official integration. The package root is intentionally non-canonical — use explicit subpaths instead:
|
|
6
|
+
|
|
7
|
+
Core modules:
|
|
8
|
+
|
|
9
|
+
- `@keystrokehq/ramp/connection`
|
|
10
|
+
- `@keystrokehq/ramp/client`
|
|
11
|
+
- `@keystrokehq/ramp/schemas`
|
|
12
|
+
- `@keystrokehq/ramp/events`
|
|
13
|
+
- `@keystrokehq/ramp/triggers`
|
|
14
|
+
- `@keystrokehq/ramp/verification`
|
|
15
|
+
- `@keystrokehq/ramp/messaging`
|
|
16
|
+
|
|
17
|
+
Resource operations (representative list — see `package.json` `exports` for the full set):
|
|
18
|
+
|
|
19
|
+
- `@keystrokehq/ramp/transactions`
|
|
20
|
+
- `@keystrokehq/ramp/users`
|
|
21
|
+
- `@keystrokehq/ramp/cards` & `@keystrokehq/ramp/card-programs`
|
|
22
|
+
- `@keystrokehq/ramp/bills`
|
|
23
|
+
- `@keystrokehq/ramp/vendors` & `@keystrokehq/ramp/vendor-bank-accounts`
|
|
24
|
+
- `@keystrokehq/ramp/reimbursements`
|
|
25
|
+
- `@keystrokehq/ramp/departments`, `@keystrokehq/ramp/locations`, `@keystrokehq/ramp/limits`, `@keystrokehq/ramp/memos`
|
|
26
|
+
- `@keystrokehq/ramp/receipts`, `@keystrokehq/ramp/receipt-integrations`, `@keystrokehq/ramp/statements`
|
|
27
|
+
- `@keystrokehq/ramp/business`, `@keystrokehq/ramp/entities`
|
|
28
|
+
- `@keystrokehq/ramp/spend-programs`, `@keystrokehq/ramp/spend-requests`
|
|
29
|
+
- `@keystrokehq/ramp/accounting-fields`, `@keystrokehq/ramp/accounting-gl-accounts`, `@keystrokehq/ramp/accounting-vendors`, `@keystrokehq/ramp/accounting-sync`, `@keystrokehq/ramp/accounting-subsidiaries`, `@keystrokehq/ramp/accounting-tracking-categories`
|
|
30
|
+
- `@keystrokehq/ramp/transfers`, `@keystrokehq/ramp/cashbacks`
|
|
31
|
+
- `@keystrokehq/ramp/webhooks` (management CRUD)
|
|
32
|
+
- `@keystrokehq/ramp/purchase-orders`, `@keystrokehq/ramp/applications`, `@keystrokehq/ramp/unified-requests`
|
|
33
|
+
|
|
34
|
+
## Connection
|
|
35
|
+
|
|
36
|
+
Use the public Ramp connection for connected-account workflow operations:
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import { ramp } from '@keystrokehq/ramp/connection';
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The package ships a hand-rolled fetch client in `@keystrokehq/ramp/client` (no third-party SDK) so that the OAuth token lifecycle, webhook signature verification, and Ramp's monetary-cents boundary stay aligned with the official integration model. Sandbox routing (`demo-api.ramp.com`) is available via `createRampClient({ environment: 'sandbox' })` for the rare case that a workflow needs to bypass the public OAuth connection.
|
|
43
|
+
|
|
44
|
+
The public OAuth surface uses the Authorization Code grant with refreshable access tokens. Ramp also supports Client Credentials for direct-to-API use cases; that grant is not currently wired into the public connection — use `createRampClient` with a pre-obtained bearer token if needed.
|
|
45
|
+
|
|
46
|
+
## Operations
|
|
47
|
+
|
|
48
|
+
All operations are bound to the `ramp` connection credential set and are exported from their resource-specific modules. A small sample:
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import { listTransactions, getTransaction } from '@keystrokehq/ramp/transactions';
|
|
52
|
+
import { listBills, approveBill } from '@keystrokehq/ramp/bills';
|
|
53
|
+
import { createVirtualCard } from '@keystrokehq/ramp/cards';
|
|
54
|
+
|
|
55
|
+
const { data } = await listTransactions.run({
|
|
56
|
+
state: 'CLEARED',
|
|
57
|
+
start: '2026-04-01T00:00:00Z',
|
|
58
|
+
end: '2026-04-17T00:00:00Z',
|
|
59
|
+
pageSize: 50,
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
const bill = await getTransaction.run({ transactionId: data[0]!.id });
|
|
63
|
+
|
|
64
|
+
const virtualCard = await createVirtualCard.run({
|
|
65
|
+
userId: 'ramp_user_123',
|
|
66
|
+
displayName: 'Marketing - April',
|
|
67
|
+
spendingRestrictions: {
|
|
68
|
+
amount: 100_000, // cents
|
|
69
|
+
currency: 'USD',
|
|
70
|
+
interval: 'MONTHLY',
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
All amounts on the Ramp wire are integer cents. The schemas in `@keystrokehq/ramp/schemas` surface these as `{ amountCents: number, currency: string }` tuples to avoid floating-point rounding on monetary math.
|
|
76
|
+
|
|
77
|
+
## Webhooks
|
|
78
|
+
|
|
79
|
+
Direct-binding helpers live under the `webhooks` namespace:
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
import { webhooks } from '@keystrokehq/ramp/triggers';
|
|
83
|
+
|
|
84
|
+
const cleared = webhooks.transactions.cleared({
|
|
85
|
+
name: 'Ramp Cleared Transaction',
|
|
86
|
+
transform: (event) => ({
|
|
87
|
+
transactionId: event.objectId,
|
|
88
|
+
businessId: event.businessId,
|
|
89
|
+
createdAt: event.createdAt,
|
|
90
|
+
}),
|
|
91
|
+
});
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Ramp signs every webhook delivery with HMAC-SHA256 over the raw body. The signature ships in the `X-Ramp-Signature` header (hex, no prefix, no signed timestamp). Ramp also runs a URL-validation handshake by posting `{ challenge: "<value>" }` to new webhook endpoints; the helper in `@keystrokehq/ramp/verification` exposes `buildRampWebhookChallengeResponse` so handlers can echo the challenge back in the canonical shape.
|
|
95
|
+
|
|
96
|
+
Supported webhook event families (currently 15 documented events):
|
|
97
|
+
|
|
98
|
+
- `transactions.authorized`, `transactions.cleared`, `transactions.declined`, `transactions.updated`
|
|
99
|
+
- `bills.created`, `bills.approved`, `bills.paid`, `bills.canceled`
|
|
100
|
+
- `purchase_orders.created`, `purchase_orders.approved`, `purchase_orders.denied`
|
|
101
|
+
- `spend_requests.comment_created`
|
|
102
|
+
- `applications.approved`, `applications.denied`
|
|
103
|
+
- `unified_requests.updated`
|
|
104
|
+
|
|
105
|
+
Each family also exposes an `any` binding that matches all events in the family. Older Ramp documentation sometimes references additional webhook names (`transfers.*`, `cards.*`, etc.); those are not currently published as webhooks and are instead covered by polling triggers (see below). If/when Ramp publishes more webhook event types, they will be added here rather than silently emitted by the `any` helpers.
|
|
106
|
+
|
|
107
|
+
## Polling Triggers
|
|
108
|
+
|
|
109
|
+
Polling triggers compensate for gaps in the webhook catalog:
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
import {
|
|
113
|
+
pollTransactions,
|
|
114
|
+
pollUsers,
|
|
115
|
+
pollBills,
|
|
116
|
+
pollVendors,
|
|
117
|
+
pollReimbursements,
|
|
118
|
+
pollSpendRequests,
|
|
119
|
+
pollPurchaseOrders,
|
|
120
|
+
pollApplications,
|
|
121
|
+
pollUnifiedRequests,
|
|
122
|
+
pollTransfers,
|
|
123
|
+
} from '@keystrokehq/ramp/triggers';
|
|
124
|
+
|
|
125
|
+
const transferPoll = pollTransfers({
|
|
126
|
+
name: 'Ramp Transfers Poller',
|
|
127
|
+
transform: (response) => response.data.map((t) => ({
|
|
128
|
+
transferId: t.id,
|
|
129
|
+
status: t.status,
|
|
130
|
+
})),
|
|
131
|
+
});
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Errors
|
|
135
|
+
|
|
136
|
+
The client throws two package-local error types:
|
|
137
|
+
|
|
138
|
+
- `RampApiError` — a discriminated error with `kind`, `status`, and parsed `body`. Kinds are: `network`, `timeout`, `auth_revoked`, `missing_scope`, `rate_limited`, `validation`, `not_found`, `conflict`, `server_error`, `unknown`.
|
|
139
|
+
- `RampMissingScopeError` — thrown by operations that require an OAuth scope that is not currently available on the connected app. Ramp has not published scope identifiers for every endpoint; where that is the case, Keystroke requests the documented scope superset and mutations gate on this error at runtime instead of guessing at scope names.
|
|
140
|
+
|
|
141
|
+
Auth revocation (`kind: 'auth_revoked'`) is translated to `CredentialRevokedError` from `@keystrokehq/core/errors` by the public `createRampClient` proxy so that the platform's reconnect flow can be triggered automatically.
|
|
142
|
+
|
|
143
|
+
## Caveats
|
|
144
|
+
|
|
145
|
+
- **Access token lifetime**: Ramp issues access tokens with a ~10-day lifetime; the platform OAuth machinery handles refresh transparently, and there is no user-surfaced expiry to worry about.
|
|
146
|
+
- **Monetary amounts**: Ramp always uses integer cents on the wire — never do floating-point math on `amount` fields. The `mapRampMoney`/`unmapRampMoney` helpers in `@keystrokehq/ramp/shared` handle the cents ↔ `{ amountCents, currency }` conversion.
|
|
147
|
+
- **Rate limits**: Ramp enforces a rolling 200 requests / 10 seconds window. The client retries `429` and `5xx` responses with exponential backoff, honoring `Retry-After` when present.
|
|
148
|
+
- **Pagination**: Every list response is cursor-based; the `next` cursor is `page.next`. Use the `paginate` async generator exposed by the client (and via `list*All*` operations such as `listAllTransactions`) for full-history sweeps.
|
|
149
|
+
- **Scope gating**: The OAuth connection only requests scopes that Ramp publishes. Operations that likely require un-documented scopes (e.g. some card-program writes) will surface a `RampMissingScopeError` at runtime rather than being fabricated client-side.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { a as rampBundle, i as ramp, o as rampOfficialIntegration } from "../integration-Dd6tOtSy.mjs";
|
|
2
|
+
import { n as rampAppCredentialSet, r as rampPlatformProviderSeed, t as RampAppCredentials } from "../provider-app-JO525h-N.mjs";
|
|
3
|
+
export { RampAppCredentials, ramp, rampAppCredentialSet, rampBundle, rampOfficialIntegration, rampPlatformProviderSeed };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,116 @@
|
|
|
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/accounting-fields.d.ts
|
|
6
|
+
declare const listAccountingFields: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
7
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
10
|
+
data: z.ZodArray<z.ZodObject<{
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
name: z.ZodOptional<z.ZodString>;
|
|
13
|
+
field_type: z.ZodOptional<z.ZodString>;
|
|
14
|
+
is_splittable: z.ZodOptional<z.ZodBoolean>;
|
|
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 getAccountingField: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
25
|
+
fieldId: z.ZodString;
|
|
26
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
name: z.ZodOptional<z.ZodString>;
|
|
29
|
+
field_type: z.ZodOptional<z.ZodString>;
|
|
30
|
+
is_splittable: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
32
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
33
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
34
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
35
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
36
|
+
declare const createAccountingField: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
37
|
+
name: z.ZodString;
|
|
38
|
+
field_type: z.ZodString;
|
|
39
|
+
ramp_id: z.ZodOptional<z.ZodString>;
|
|
40
|
+
is_splittable: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
42
|
+
id: z.ZodString;
|
|
43
|
+
name: z.ZodOptional<z.ZodString>;
|
|
44
|
+
field_type: z.ZodOptional<z.ZodString>;
|
|
45
|
+
is_splittable: z.ZodOptional<z.ZodBoolean>;
|
|
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 updateAccountingField: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
52
|
+
fieldId: z.ZodString;
|
|
53
|
+
name: z.ZodOptional<z.ZodString>;
|
|
54
|
+
is_splittable: z.ZodOptional<z.ZodBoolean>;
|
|
55
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
+
id: z.ZodString;
|
|
57
|
+
name: z.ZodOptional<z.ZodString>;
|
|
58
|
+
field_type: z.ZodOptional<z.ZodString>;
|
|
59
|
+
is_splittable: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
+
}, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
61
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
62
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
63
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
64
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
65
|
+
declare const deleteAccountingField: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
66
|
+
fieldId: z.ZodString;
|
|
67
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
68
|
+
success: z.ZodBoolean;
|
|
69
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
70
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
71
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
72
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
73
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
74
|
+
declare const listAccountingFieldOptions: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
75
|
+
field_id: z.ZodString;
|
|
76
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
78
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
79
|
+
data: z.ZodArray<z.ZodObject<{
|
|
80
|
+
id: z.ZodString;
|
|
81
|
+
ramp_id: z.ZodOptional<z.ZodString>;
|
|
82
|
+
name: z.ZodOptional<z.ZodString>;
|
|
83
|
+
parent_id: z.ZodOptional<z.ZodString>;
|
|
84
|
+
}, z.core.$loose>>;
|
|
85
|
+
page: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
next: z.ZodOptional<z.ZodString>;
|
|
87
|
+
}, z.core.$strip>>;
|
|
88
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
89
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
90
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
91
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
92
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
93
|
+
declare const uploadAccountingFieldOptions: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
94
|
+
field_id: z.ZodString;
|
|
95
|
+
options: z.ZodArray<z.ZodObject<{
|
|
96
|
+
name: z.ZodString;
|
|
97
|
+
ramp_id: z.ZodOptional<z.ZodString>;
|
|
98
|
+
parent_id: z.ZodOptional<z.ZodString>;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
101
|
+
data: z.ZodArray<z.ZodObject<{
|
|
102
|
+
id: z.ZodString;
|
|
103
|
+
ramp_id: z.ZodOptional<z.ZodString>;
|
|
104
|
+
name: z.ZodOptional<z.ZodString>;
|
|
105
|
+
parent_id: z.ZodOptional<z.ZodString>;
|
|
106
|
+
}, z.core.$loose>>;
|
|
107
|
+
page: z.ZodOptional<z.ZodObject<{
|
|
108
|
+
next: z.ZodOptional<z.ZodString>;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"ramp", z.ZodObject<{
|
|
111
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
112
|
+
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
113
|
+
RAMP_ACCESS_TOKEN: z.ZodString;
|
|
114
|
+
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
115
|
+
//#endregion
|
|
116
|
+
export { createAccountingField, deleteAccountingField, getAccountingField, listAccountingFieldOptions, listAccountingFields, updateAccountingField, uploadAccountingFieldOptions };
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { createRampClient } from "./client.mjs";
|
|
2
|
+
import { a as rampAccountingFieldListSchema, d as rampAccountingFieldUpdateInputSchema, i as rampAccountingFieldListInputSchema, l as rampAccountingFieldOptionUploadInputSchema, n as rampAccountingFieldDeleteInputSchema, o as rampAccountingFieldOptionListInputSchema, r as rampAccountingFieldGetInputSchema, s as rampAccountingFieldOptionListSchema, t as rampAccountingFieldCreateInputSchema, u as rampAccountingFieldSchema } from "./accounting-i6txC-MI.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/accounting-fields.ts
|
|
8
|
+
const listAccountingFields = rampOperation({
|
|
9
|
+
id: "list_accounting_fields",
|
|
10
|
+
name: "List Accounting Fields",
|
|
11
|
+
description: "List custom accounting fields defined on the Ramp business.",
|
|
12
|
+
input: rampAccountingFieldListInputSchema,
|
|
13
|
+
output: rampAccountingFieldListSchema,
|
|
14
|
+
run: async (input, credentials) => {
|
|
15
|
+
const client = createRampClient(credentials);
|
|
16
|
+
return rampAccountingFieldListSchema.parse(await client.request("/accounting/fields", { query: omitUndefined({
|
|
17
|
+
page_size: input.pageSize,
|
|
18
|
+
start: input.cursor
|
|
19
|
+
}) }));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const getAccountingField = rampOperation({
|
|
23
|
+
id: "get_accounting_field",
|
|
24
|
+
name: "Get Accounting Field",
|
|
25
|
+
description: "Fetch a Ramp accounting field by id.",
|
|
26
|
+
input: rampAccountingFieldGetInputSchema,
|
|
27
|
+
output: rampAccountingFieldSchema,
|
|
28
|
+
run: async (input, credentials) => {
|
|
29
|
+
const client = createRampClient(credentials);
|
|
30
|
+
return rampAccountingFieldSchema.parse(await client.request(`/accounting/fields/${encodeURIComponent(input.fieldId)}`));
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
const createAccountingField = rampOperation({
|
|
34
|
+
id: "create_accounting_field",
|
|
35
|
+
name: "Create Accounting Field",
|
|
36
|
+
description: "Create a new custom accounting field.",
|
|
37
|
+
input: rampAccountingFieldCreateInputSchema,
|
|
38
|
+
output: rampAccountingFieldSchema,
|
|
39
|
+
needsApproval: true,
|
|
40
|
+
run: async (input, credentials) => {
|
|
41
|
+
const client = createRampClient(credentials);
|
|
42
|
+
return rampAccountingFieldSchema.parse(await client.request("/accounting/fields", {
|
|
43
|
+
method: "POST",
|
|
44
|
+
body: input
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
const updateAccountingField = rampOperation({
|
|
49
|
+
id: "update_accounting_field",
|
|
50
|
+
name: "Update Accounting Field",
|
|
51
|
+
description: "Update an existing custom accounting field.",
|
|
52
|
+
input: rampAccountingFieldUpdateInputSchema,
|
|
53
|
+
output: rampAccountingFieldSchema,
|
|
54
|
+
needsApproval: true,
|
|
55
|
+
run: async (input, credentials) => {
|
|
56
|
+
const client = createRampClient(credentials);
|
|
57
|
+
const { fieldId, ...body } = input;
|
|
58
|
+
await client.request(`/accounting/fields/${encodeURIComponent(fieldId)}`, {
|
|
59
|
+
method: "PATCH",
|
|
60
|
+
body: omitUndefined(body)
|
|
61
|
+
});
|
|
62
|
+
return rampAccountingFieldSchema.parse(await client.request(`/accounting/fields/${encodeURIComponent(fieldId)}`));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
const deleteAccountingField = rampOperation({
|
|
66
|
+
id: "delete_accounting_field",
|
|
67
|
+
name: "Delete Accounting Field",
|
|
68
|
+
description: "Delete a custom accounting field by id.",
|
|
69
|
+
input: rampAccountingFieldDeleteInputSchema,
|
|
70
|
+
output: z.object({ success: z.boolean() }),
|
|
71
|
+
needsApproval: true,
|
|
72
|
+
run: async (input, credentials) => {
|
|
73
|
+
await createRampClient(credentials).request(`/accounting/fields/${encodeURIComponent(input.fieldId)}`, { method: "DELETE" });
|
|
74
|
+
return { success: true };
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
const listAccountingFieldOptions = rampOperation({
|
|
78
|
+
id: "list_accounting_field_options",
|
|
79
|
+
name: "List Accounting Field Options",
|
|
80
|
+
description: "List options configured on a custom accounting field.",
|
|
81
|
+
input: rampAccountingFieldOptionListInputSchema,
|
|
82
|
+
output: rampAccountingFieldOptionListSchema,
|
|
83
|
+
run: async (input, credentials) => {
|
|
84
|
+
const client = createRampClient(credentials);
|
|
85
|
+
return rampAccountingFieldOptionListSchema.parse(await client.request(`/accounting/fields/${encodeURIComponent(input.field_id)}/options`, { query: omitUndefined({
|
|
86
|
+
page_size: input.pageSize,
|
|
87
|
+
start: input.cursor
|
|
88
|
+
}) }));
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
const uploadAccountingFieldOptions = rampOperation({
|
|
92
|
+
id: "upload_accounting_field_options",
|
|
93
|
+
name: "Upload Accounting Field Options",
|
|
94
|
+
description: "Bulk upload options for a custom accounting field.",
|
|
95
|
+
input: rampAccountingFieldOptionUploadInputSchema,
|
|
96
|
+
output: rampAccountingFieldOptionListSchema,
|
|
97
|
+
needsApproval: true,
|
|
98
|
+
run: async (input, credentials) => {
|
|
99
|
+
const client = createRampClient(credentials);
|
|
100
|
+
return rampAccountingFieldOptionListSchema.parse(await client.request(`/accounting/fields/${encodeURIComponent(input.field_id)}/options`, {
|
|
101
|
+
method: "POST",
|
|
102
|
+
body: { options: input.options }
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
//#endregion
|
|
108
|
+
export { createAccountingField, deleteAccountingField, getAccountingField, listAccountingFieldOptions, listAccountingFields, updateAccountingField, uploadAccountingFieldOptions };
|
|
@@ -0,0 +1,63 @@
|
|
|
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/accounting-gl-accounts.d.ts
|
|
7
|
+
declare const listGlAccounts: _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
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
14
|
+
code: zod.ZodOptional<zod.ZodString>;
|
|
15
|
+
classification: zod.ZodOptional<zod.ZodString>;
|
|
16
|
+
active: zod.ZodOptional<zod.ZodBoolean>;
|
|
17
|
+
}, zod_v4_core0.$loose>>;
|
|
18
|
+
page: zod.ZodOptional<zod.ZodObject<{
|
|
19
|
+
next: zod.ZodOptional<zod.ZodString>;
|
|
20
|
+
}, zod_v4_core0.$strip>>;
|
|
21
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"ramp", zod.ZodObject<{
|
|
22
|
+
RAMP_ACCESS_TOKEN: zod.ZodString;
|
|
23
|
+
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
24
|
+
RAMP_ACCESS_TOKEN: zod.ZodString;
|
|
25
|
+
}, zod_v4_core0.$strip>>[] | undefined>], undefined>;
|
|
26
|
+
declare const getGlAccount: _keystrokehq_core0.Operation<zod.ZodObject<{
|
|
27
|
+
glAccountId: zod.ZodString;
|
|
28
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
29
|
+
id: zod.ZodString;
|
|
30
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
31
|
+
code: zod.ZodOptional<zod.ZodString>;
|
|
32
|
+
classification: zod.ZodOptional<zod.ZodString>;
|
|
33
|
+
active: zod.ZodOptional<zod.ZodBoolean>;
|
|
34
|
+
}, zod_v4_core0.$loose>, readonly [_keystrokehq_core0.CredentialSet<"ramp", zod.ZodObject<{
|
|
35
|
+
RAMP_ACCESS_TOKEN: zod.ZodString;
|
|
36
|
+
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
37
|
+
RAMP_ACCESS_TOKEN: zod.ZodString;
|
|
38
|
+
}, zod_v4_core0.$strip>>[] | undefined>], undefined>;
|
|
39
|
+
declare const uploadGlAccounts: _keystrokehq_core0.Operation<zod.ZodObject<{
|
|
40
|
+
gl_accounts: zod.ZodArray<zod.ZodObject<{
|
|
41
|
+
name: zod.ZodString;
|
|
42
|
+
code: zod.ZodOptional<zod.ZodString>;
|
|
43
|
+
classification: zod.ZodOptional<zod.ZodString>;
|
|
44
|
+
external_id: zod.ZodOptional<zod.ZodString>;
|
|
45
|
+
}, zod_v4_core0.$strip>>;
|
|
46
|
+
}, zod_v4_core0.$strip>, zod.ZodObject<{
|
|
47
|
+
data: zod.ZodArray<zod.ZodObject<{
|
|
48
|
+
id: zod.ZodString;
|
|
49
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
50
|
+
code: zod.ZodOptional<zod.ZodString>;
|
|
51
|
+
classification: zod.ZodOptional<zod.ZodString>;
|
|
52
|
+
active: zod.ZodOptional<zod.ZodBoolean>;
|
|
53
|
+
}, zod_v4_core0.$loose>>;
|
|
54
|
+
page: zod.ZodOptional<zod.ZodObject<{
|
|
55
|
+
next: zod.ZodOptional<zod.ZodString>;
|
|
56
|
+
}, zod_v4_core0.$strip>>;
|
|
57
|
+
}, zod_v4_core0.$strip>, readonly [_keystrokehq_core0.CredentialSet<"ramp", zod.ZodObject<{
|
|
58
|
+
RAMP_ACCESS_TOKEN: zod.ZodString;
|
|
59
|
+
}, zod_v4_core0.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<zod.ZodObject<{
|
|
60
|
+
RAMP_ACCESS_TOKEN: zod.ZodString;
|
|
61
|
+
}, zod_v4_core0.$strip>>[] | undefined>], undefined>;
|
|
62
|
+
//#endregion
|
|
63
|
+
export { getGlAccount, listGlAccounts, uploadGlAccounts };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { createRampClient } from "./client.mjs";
|
|
2
|
+
import { F as rampGlAccountUploadInputSchema, M as rampGlAccountListInputSchema, N as rampGlAccountListSchema, P as rampGlAccountSchema, j as rampGlAccountGetInputSchema } from "./accounting-i6txC-MI.mjs";
|
|
3
|
+
import { t as rampOperation } from "./factory-Da6YVHdL.mjs";
|
|
4
|
+
import { t as omitUndefined } from "./shared-CTTtP5gv.mjs";
|
|
5
|
+
|
|
6
|
+
//#region src/accounting-gl-accounts.ts
|
|
7
|
+
const listGlAccounts = rampOperation({
|
|
8
|
+
id: "list_gl_accounts",
|
|
9
|
+
name: "List GL Accounts",
|
|
10
|
+
description: "List general-ledger accounts synced from the connected accounting system.",
|
|
11
|
+
input: rampGlAccountListInputSchema,
|
|
12
|
+
output: rampGlAccountListSchema,
|
|
13
|
+
run: async (input, credentials) => {
|
|
14
|
+
const client = createRampClient(credentials);
|
|
15
|
+
return rampGlAccountListSchema.parse(await client.request("/accounting/gl-accounts", { query: omitUndefined({
|
|
16
|
+
page_size: input.pageSize,
|
|
17
|
+
start: input.cursor
|
|
18
|
+
}) }));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
const getGlAccount = rampOperation({
|
|
22
|
+
id: "get_gl_account",
|
|
23
|
+
name: "Get GL Account",
|
|
24
|
+
description: "Fetch a GL account by id.",
|
|
25
|
+
input: rampGlAccountGetInputSchema,
|
|
26
|
+
output: rampGlAccountSchema,
|
|
27
|
+
run: async (input, credentials) => {
|
|
28
|
+
const client = createRampClient(credentials);
|
|
29
|
+
return rampGlAccountSchema.parse(await client.request(`/accounting/gl-accounts/${encodeURIComponent(input.glAccountId)}`));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
const uploadGlAccounts = rampOperation({
|
|
33
|
+
id: "upload_gl_accounts",
|
|
34
|
+
name: "Upload GL Accounts",
|
|
35
|
+
description: "Bulk-upload GL accounts from the connected accounting system.",
|
|
36
|
+
input: rampGlAccountUploadInputSchema,
|
|
37
|
+
output: rampGlAccountListSchema,
|
|
38
|
+
needsApproval: true,
|
|
39
|
+
run: async (input, credentials) => {
|
|
40
|
+
const client = createRampClient(credentials);
|
|
41
|
+
return rampGlAccountListSchema.parse(await client.request("/accounting/gl-accounts", {
|
|
42
|
+
method: "POST",
|
|
43
|
+
body: input
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
export { getGlAccount, listGlAccounts, uploadGlAccounts };
|
|
@@ -0,0 +1,116 @@
|
|
|
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/accounting.ts
|
|
5
|
+
const rampAccountingFieldSchema = z.object({
|
|
6
|
+
id: rampIdSchema,
|
|
7
|
+
name: z.string().optional(),
|
|
8
|
+
field_type: z.string().optional(),
|
|
9
|
+
is_splittable: z.boolean().optional()
|
|
10
|
+
}).passthrough();
|
|
11
|
+
const rampAccountingFieldListInputSchema = rampListPaginationInputSchema;
|
|
12
|
+
const rampAccountingFieldListSchema = rampListResponseSchema(rampAccountingFieldSchema);
|
|
13
|
+
const rampAccountingFieldGetInputSchema = z.object({ fieldId: rampIdSchema });
|
|
14
|
+
const rampAccountingFieldCreateInputSchema = z.object({
|
|
15
|
+
name: z.string().trim().min(1),
|
|
16
|
+
field_type: z.string().trim().min(1),
|
|
17
|
+
ramp_id: z.string().trim().min(1).optional(),
|
|
18
|
+
is_splittable: z.boolean().optional()
|
|
19
|
+
});
|
|
20
|
+
const rampAccountingFieldUpdateInputSchema = z.object({
|
|
21
|
+
fieldId: rampIdSchema,
|
|
22
|
+
name: z.string().optional(),
|
|
23
|
+
is_splittable: z.boolean().optional()
|
|
24
|
+
});
|
|
25
|
+
const rampAccountingFieldDeleteInputSchema = z.object({ fieldId: rampIdSchema });
|
|
26
|
+
const rampAccountingFieldOptionSchema = z.object({
|
|
27
|
+
id: rampIdSchema,
|
|
28
|
+
ramp_id: z.string().optional(),
|
|
29
|
+
name: z.string().optional(),
|
|
30
|
+
parent_id: rampIdSchema.optional()
|
|
31
|
+
}).passthrough();
|
|
32
|
+
const rampAccountingFieldOptionListInputSchema = z.object({ field_id: rampIdSchema }).merge(rampListPaginationInputSchema);
|
|
33
|
+
const rampAccountingFieldOptionListSchema = rampListResponseSchema(rampAccountingFieldOptionSchema);
|
|
34
|
+
const rampAccountingFieldOptionUploadInputSchema = z.object({
|
|
35
|
+
field_id: rampIdSchema,
|
|
36
|
+
options: z.array(z.object({
|
|
37
|
+
name: z.string().trim().min(1),
|
|
38
|
+
ramp_id: z.string().trim().min(1).optional(),
|
|
39
|
+
parent_id: rampIdSchema.optional()
|
|
40
|
+
})).min(1)
|
|
41
|
+
});
|
|
42
|
+
const rampGlAccountSchema = z.object({
|
|
43
|
+
id: rampIdSchema,
|
|
44
|
+
name: z.string().optional(),
|
|
45
|
+
code: z.string().optional(),
|
|
46
|
+
classification: z.string().optional(),
|
|
47
|
+
active: z.boolean().optional()
|
|
48
|
+
}).passthrough();
|
|
49
|
+
const rampGlAccountListInputSchema = rampListPaginationInputSchema;
|
|
50
|
+
const rampGlAccountListSchema = rampListResponseSchema(rampGlAccountSchema);
|
|
51
|
+
const rampGlAccountGetInputSchema = z.object({ glAccountId: rampIdSchema });
|
|
52
|
+
const rampGlAccountUploadInputSchema = z.object({ gl_accounts: z.array(z.object({
|
|
53
|
+
name: z.string().trim().min(1),
|
|
54
|
+
code: z.string().trim().min(1).optional(),
|
|
55
|
+
classification: z.string().optional(),
|
|
56
|
+
external_id: z.string().optional()
|
|
57
|
+
})).min(1) });
|
|
58
|
+
const rampAccountingVendorSchema = z.object({
|
|
59
|
+
id: rampIdSchema,
|
|
60
|
+
name: z.string().optional(),
|
|
61
|
+
external_id: z.string().optional(),
|
|
62
|
+
ramp_vendor_id: rampIdSchema.optional(),
|
|
63
|
+
active: z.boolean().optional()
|
|
64
|
+
}).passthrough();
|
|
65
|
+
const rampAccountingVendorListInputSchema = rampListPaginationInputSchema;
|
|
66
|
+
const rampAccountingVendorListSchema = rampListResponseSchema(rampAccountingVendorSchema);
|
|
67
|
+
const rampAccountingVendorGetInputSchema = z.object({ accountingVendorId: rampIdSchema });
|
|
68
|
+
const rampAccountingVendorUploadInputSchema = z.object({ vendors: z.array(z.object({
|
|
69
|
+
name: z.string().trim().min(1),
|
|
70
|
+
external_id: z.string().trim().min(1).optional(),
|
|
71
|
+
ramp_vendor_id: rampIdSchema.optional()
|
|
72
|
+
})).min(1) });
|
|
73
|
+
const rampAccountingSyncSchema = z.object({
|
|
74
|
+
id: rampIdSchema,
|
|
75
|
+
status: z.string().optional(),
|
|
76
|
+
created_at: rampTimestampSchema.optional(),
|
|
77
|
+
completed_at: rampTimestampSchema.optional()
|
|
78
|
+
}).passthrough();
|
|
79
|
+
const rampAccountingSyncListInputSchema = rampListPaginationInputSchema;
|
|
80
|
+
const rampAccountingSyncListSchema = rampListResponseSchema(rampAccountingSyncSchema);
|
|
81
|
+
const rampAccountingSyncGetInputSchema = z.object({ syncId: rampIdSchema });
|
|
82
|
+
const rampAccountingSyncCreateInputSchema = z.object({
|
|
83
|
+
sync_type: z.enum([
|
|
84
|
+
"BILL",
|
|
85
|
+
"CARD_TRANSACTION",
|
|
86
|
+
"REIMBURSEMENT",
|
|
87
|
+
"TRANSFER",
|
|
88
|
+
"STATEMENT_CREDIT"
|
|
89
|
+
]),
|
|
90
|
+
idempotency_key: z.string().trim().min(1).optional()
|
|
91
|
+
});
|
|
92
|
+
const rampAccountingSubsidiarySchema = z.object({
|
|
93
|
+
id: rampIdSchema,
|
|
94
|
+
name: z.string().optional(),
|
|
95
|
+
external_id: z.string().optional(),
|
|
96
|
+
entity_id: rampIdSchema.optional()
|
|
97
|
+
}).passthrough();
|
|
98
|
+
const rampAccountingSubsidiaryListInputSchema = rampListPaginationInputSchema;
|
|
99
|
+
const rampAccountingSubsidiaryListSchema = rampListResponseSchema(rampAccountingSubsidiarySchema);
|
|
100
|
+
const rampAccountingSubsidiaryGetInputSchema = z.object({ subsidiaryId: rampIdSchema });
|
|
101
|
+
const rampAccountingSubsidiaryUploadInputSchema = z.object({ subsidiaries: z.array(z.object({
|
|
102
|
+
name: z.string().trim().min(1),
|
|
103
|
+
external_id: z.string().trim().min(1).optional(),
|
|
104
|
+
entity_id: rampIdSchema.optional()
|
|
105
|
+
})).min(1) });
|
|
106
|
+
const rampAccountingTrackingCategorySchema = z.object({
|
|
107
|
+
id: rampIdSchema,
|
|
108
|
+
name: z.string().optional(),
|
|
109
|
+
ramp_id: z.string().optional()
|
|
110
|
+
}).passthrough();
|
|
111
|
+
const rampAccountingTrackingCategoryListInputSchema = rampListPaginationInputSchema;
|
|
112
|
+
const rampAccountingTrackingCategoryListSchema = rampListResponseSchema(rampAccountingTrackingCategorySchema);
|
|
113
|
+
const rampAccountingTrackingCategoryGetInputSchema = z.object({ trackingCategoryId: rampIdSchema });
|
|
114
|
+
|
|
115
|
+
//#endregion
|
|
116
|
+
export { rampAccountingVendorUploadInputSchema as A, rampAccountingTrackingCategoryListInputSchema as C, rampAccountingVendorListInputSchema as D, rampAccountingVendorGetInputSchema as E, rampGlAccountUploadInputSchema as F, rampGlAccountListInputSchema as M, rampGlAccountListSchema as N, rampAccountingVendorListSchema as O, rampGlAccountSchema as P, rampAccountingTrackingCategoryGetInputSchema as S, rampAccountingTrackingCategorySchema as T, rampAccountingSyncCreateInputSchema as _, rampAccountingFieldListSchema as a, rampAccountingSyncListSchema as b, rampAccountingFieldOptionSchema as c, rampAccountingFieldUpdateInputSchema as d, rampAccountingSubsidiaryGetInputSchema as f, rampAccountingSubsidiaryUploadInputSchema as g, rampAccountingSubsidiarySchema as h, rampAccountingFieldListInputSchema as i, rampGlAccountGetInputSchema as j, rampAccountingVendorSchema as k, rampAccountingFieldOptionUploadInputSchema as l, rampAccountingSubsidiaryListSchema as m, rampAccountingFieldDeleteInputSchema as n, rampAccountingFieldOptionListInputSchema as o, rampAccountingSubsidiaryListInputSchema as p, rampAccountingFieldGetInputSchema as r, rampAccountingFieldOptionListSchema as s, rampAccountingFieldCreateInputSchema as t, rampAccountingFieldSchema as u, rampAccountingSyncGetInputSchema as v, rampAccountingTrackingCategoryListSchema as w, rampAccountingSyncSchema as x, rampAccountingSyncListInputSchema as y };
|