@memberjunction/connector-bill-com 0.2.0

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.
@@ -0,0 +1,127 @@
1
+ import { type UserInfo } from '@memberjunction/core';
2
+ import type { MJCompanyIntegrationEntity, MJIntegrationObjectEntity } from '@memberjunction/core-entities';
3
+ import { BaseRESTIntegrationConnector, type ActionGeneratorConfig, type ConnectionTestResult, type IntegrationObjectInfo, type PaginationState, type PaginationType, type RateLimitPolicy, type RESTAuthContext, type RESTResponse } from '@memberjunction/integration-engine';
4
+ /**
5
+ * Bill.com (BILL) v3 Connect API connector — accounts receivable.
6
+ *
7
+ * Serves the AIDP AR use cases: create an invoice for an order, cancel an unpaid invoice, and detect
8
+ * received payments. Refunds are deliberately absent: v3 has no AR refund endpoint, `/v3/orders` does
9
+ * not exist, and negative invoices are unsupported. The sanctioned reversing document is a credit memo,
10
+ * which adjusts the ledger without moving money — see the catalog notes and bc-aidp-next-golive#51.
11
+ *
12
+ * Three vendor characteristics shape this class:
13
+ *
14
+ * 1. **Session auth, not OAuth or a static key.** `POST /login` returns an opaque `sessionId` carried
15
+ * on subsequent calls alongside `devKey`. Sessions die after 35 minutes idle with no refresh, and
16
+ * logins are capped at 200/hour — so the session is cached, re-used, and only re-acquired when
17
+ * genuinely stale or rejected.
18
+ * 2. **Concurrency capped at 3** per devKey per org. Declared via MaxConcurrencyHint.
19
+ * 3. **Opaque cursor pagination.** `nextPage` is a token, not a number, and its ABSENCE — not an empty
20
+ * page — is the termination signal.
21
+ *
22
+ * DUAL registration: the class-symbol key `BillComConnector` is the natural handle; the package-name key
23
+ * is what the Integrations repo's `validate-invariants` requires to be `@RegisterClass`-exported by the
24
+ * package's own src, and it must match `Integration.ClassName` in the catalog.
25
+ */
26
+ export declare class BillComConnector extends BaseRESTIntegrationConnector {
27
+ /** Cached session. Reused across requests; re-acquired on idle expiry or a 401. */
28
+ private cachedAuth;
29
+ /** Credentials retained so a mid-run re-login does not need another metadata round-trip. */
30
+ private cachedCredentials;
31
+ get IntegrationName(): string;
32
+ get SupportsCreate(): boolean;
33
+ get SupportsUpdate(): boolean;
34
+ get SupportsDelete(): boolean;
35
+ /**
36
+ * Bill.com exposes no describe-all endpoint, so a discovery pass that fails to see an object proves
37
+ * nothing about whether it exists. Absence must never deactivate a declared object.
38
+ */
39
+ get DiscoveryIsAuthoritative(): boolean;
40
+ get RateLimitPolicy(): RateLimitPolicy | null;
41
+ get MaxConcurrencyHint(): number | null;
42
+ /**
43
+ * Static object model for `ActionMetadataGenerator`. Returning `[]` — the base-class default — means
44
+ * NO Actions can be generated for this connector at all, which is precisely why Business Central
45
+ * ships none today.
46
+ *
47
+ * The list is generated by `scripts/extract-catalog.mjs` from the same OpenAPI extraction that
48
+ * produces the sync catalog, so the Action surface and the catalog cannot drift apart.
49
+ *
50
+ * The generator emits Get/Search/List for every object, plus write verbs only where
51
+ * `SupportsWrite` is true — so `receivable-payments` yields a Create ("charge a customer") but the
52
+ * read verbs carry the payment-detection path.
53
+ */
54
+ GetIntegrationObjects(): IntegrationObjectInfo[];
55
+ GetActionGeneratorConfig(): ActionGeneratorConfig | null;
56
+ /**
57
+ * Returns a live session, logging in only when necessary.
58
+ *
59
+ * Called once per FetchChanges, but a long sync can outlive the 35-minute idle window, so the
60
+ * staleness check lives here AND a 401 retry lives in MakeHTTPRequest. Both paths matter: this one
61
+ * avoids a predictable failure, that one recovers from an unpredictable one.
62
+ */
63
+ protected Authenticate(companyIntegration: MJCompanyIntegrationEntity, contextUser: UserInfo): Promise<RESTAuthContext>;
64
+ /** True when the session has been idle long enough that Bill.com may have expired it. */
65
+ private IsSessionStale;
66
+ /**
67
+ * `POST /login` → `{ sessionId, organizationId, userId }`.
68
+ *
69
+ * Throws rather than returning null: without a session nothing downstream can work, and a silent
70
+ * failure here would surface later as an inscrutable 401 on an unrelated object.
71
+ */
72
+ private Login;
73
+ /** Explicit `apiUrl` wins; otherwise environment selects a gateway, defaulting to sandbox. */
74
+ private ResolveBaseURL;
75
+ protected BuildHeaders(auth: RESTAuthContext): Record<string, string>;
76
+ protected GetBaseURL(companyIntegration: MJCompanyIntegrationEntity, auth: RESTAuthContext): string;
77
+ /**
78
+ * HTTP transport. Owns the wire boundary — tests subclass and stub this.
79
+ *
80
+ * Re-logins once on a 401 and replays the request. A 401 here means the session lapsed despite the
81
+ * idle check (clock skew, a server-side invalidation, a concurrent logout), and re-login is the only
82
+ * recovery Bill.com offers. Exactly one retry: a second 401 is a credential problem, not a stale
83
+ * session, and retrying would burn the 200/hour login budget.
84
+ */
85
+ protected MakeHTTPRequest(auth: RESTAuthContext, url: string, method: string, headers: Record<string, string>, body?: unknown): Promise<RESTResponse>;
86
+ /** Single request/response cycle with no retry semantics. */
87
+ private SendOnce;
88
+ /** Records activity so the idle-expiry window is measured from the last real request. */
89
+ private TouchSession;
90
+ /**
91
+ * List responses wrap rows in `results`; single-record reads return the object directly. The data key
92
+ * is metadata-driven (`ResponseDataKey`) with a `results` fallback so the catalog stays authoritative.
93
+ */
94
+ protected NormalizeResponse(rawBody: unknown, responseDataKey: string | null): Record<string, unknown>[];
95
+ /**
96
+ * Pagination is an opaque cursor. `nextPage` is a token — never a page number — and its **absence**
97
+ * is the termination signal. An empty `results` array with a `nextPage` present still means keep
98
+ * going; treating an empty page as the end would silently truncate a sync.
99
+ */
100
+ protected ExtractPaginationInfo(rawBody: unknown, _paginationType: PaginationType, _currentPage: number, _currentOffset: number, _pageSize: number): PaginationState;
101
+ /**
102
+ * Appends `max` and, when continuing, the opaque `page` cursor. `max` is always sent explicitly
103
+ * because the vendor docs disagree on the default (100 vs 20).
104
+ */
105
+ protected BuildPaginatedURL(basePath: string, obj: MJIntegrationObjectEntity, _page: number, _offset: number, cursor?: string, effectivePageSize?: number): string;
106
+ /** Bill.com reports failures as `{ message }` (sometimes `{ error }`) alongside a non-2xx status. */
107
+ protected ExtractErrorMessage(response: RESTResponse): string | undefined;
108
+ /**
109
+ * A successful `POST /login` is the connection test — it exercises every credential field
110
+ * (username, password, organizationId, devKey) and the chosen gateway in one call.
111
+ */
112
+ TestConnection(companyIntegration: MJCompanyIntegrationEntity, contextUser: UserInfo): Promise<ConnectionTestResult>;
113
+ /**
114
+ * Prefers the linked `MJ: Credentials` row; falls back to `CompanyIntegration.Configuration` so a
115
+ * connection can be stood up before the credential store is populated.
116
+ */
117
+ private LoadCredentials;
118
+ /** Loads a credential row and parses its Values JSON. */
119
+ private LoadFromCredentialEntity;
120
+ /**
121
+ * Extracts credentials from a JSON string, accepting both camelCase and PascalCase keys so a
122
+ * hand-authored Configuration blob and a schema-generated credential both resolve.
123
+ */
124
+ private ParseCredentialJson;
125
+ /** First non-empty string value among the candidate keys. */
126
+ private FirstString;
127
+ }
@@ -0,0 +1,414 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { RegisterClass } from '@memberjunction/global';
8
+ import { Metadata } from '@memberjunction/core';
9
+ import { BaseIntegrationConnector, BaseRESTIntegrationConnector, } from '@memberjunction/integration-engine';
10
+ import { BILLCOM_OBJECTS } from './generated/objects.js';
11
+ // ── Constants ────────────────────────────────────────────────────────
12
+ /** Sandbox gateway. Deliberately the default — a mis-provisioned connection must not reach production. */
13
+ const BILLCOM_SANDBOX_BASE = 'https://gateway.stage.bill.com/connect/v3';
14
+ /** Production gateway. Note `gateway.prod.bill.com`, NOT `gateway.bill.com`. */
15
+ const BILLCOM_PRODUCTION_BASE = 'https://gateway.prod.bill.com/connect/v3';
16
+ /** `max` ceiling on list endpoints. The concepts page says the default is 100 and the endpoint
17
+ * reference pages say 20 — so we always send it explicitly rather than trusting either. */
18
+ const BILLCOM_LIST_MAX_PAGE = 100;
19
+ /**
20
+ * Sessions expire after 35 minutes of INACTIVITY (sliding, not absolute) and there is no refresh
21
+ * mechanism — re-login is the only recovery. We proactively re-login at 25 minutes idle so a long
22
+ * sync never discovers expiry mid-batch. The 10-minute margin absorbs clock skew and a slow request.
23
+ */
24
+ const BILLCOM_SESSION_IDLE_MS = 25 * 60 * 1000;
25
+ /**
26
+ * 3 concurrent requests per developer key per organization (error `BDC_1322`). This is the binding
27
+ * constraint on sync design — far tighter than the 20,000/hour ceiling (`BDC_1144`), which no
28
+ * realistic sync approaches. The engine's token bucket enforces the rate; MaxConcurrencyHint
29
+ * enforces the parallelism.
30
+ */
31
+ const BILLCOM_MAX_CONCURRENCY = 3;
32
+ /** 20,000 requests/hour ≈ 5.5/sec sustained. Kept conservative; concurrency is the real limit. */
33
+ const BILLCOM_TOKENS_PER_SEC = 5;
34
+ /**
35
+ * Bill.com (BILL) v3 Connect API connector — accounts receivable.
36
+ *
37
+ * Serves the AIDP AR use cases: create an invoice for an order, cancel an unpaid invoice, and detect
38
+ * received payments. Refunds are deliberately absent: v3 has no AR refund endpoint, `/v3/orders` does
39
+ * not exist, and negative invoices are unsupported. The sanctioned reversing document is a credit memo,
40
+ * which adjusts the ledger without moving money — see the catalog notes and bc-aidp-next-golive#51.
41
+ *
42
+ * Three vendor characteristics shape this class:
43
+ *
44
+ * 1. **Session auth, not OAuth or a static key.** `POST /login` returns an opaque `sessionId` carried
45
+ * on subsequent calls alongside `devKey`. Sessions die after 35 minutes idle with no refresh, and
46
+ * logins are capped at 200/hour — so the session is cached, re-used, and only re-acquired when
47
+ * genuinely stale or rejected.
48
+ * 2. **Concurrency capped at 3** per devKey per org. Declared via MaxConcurrencyHint.
49
+ * 3. **Opaque cursor pagination.** `nextPage` is a token, not a number, and its ABSENCE — not an empty
50
+ * page — is the termination signal.
51
+ *
52
+ * DUAL registration: the class-symbol key `BillComConnector` is the natural handle; the package-name key
53
+ * is what the Integrations repo's `validate-invariants` requires to be `@RegisterClass`-exported by the
54
+ * package's own src, and it must match `Integration.ClassName` in the catalog.
55
+ */
56
+ let BillComConnector = class BillComConnector extends BaseRESTIntegrationConnector {
57
+ constructor() {
58
+ super(...arguments);
59
+ /** Cached session. Reused across requests; re-acquired on idle expiry or a 401. */
60
+ this.cachedAuth = null;
61
+ /** Credentials retained so a mid-run re-login does not need another metadata round-trip. */
62
+ this.cachedCredentials = null;
63
+ }
64
+ // ── Identity & capabilities ──────────────────────────────────────
65
+ get IntegrationName() {
66
+ return 'Bill.com';
67
+ }
68
+ get SupportsCreate() { return true; }
69
+ get SupportsUpdate() { return true; }
70
+ get SupportsDelete() { return false; }
71
+ /**
72
+ * Bill.com exposes no describe-all endpoint, so a discovery pass that fails to see an object proves
73
+ * nothing about whether it exists. Absence must never deactivate a declared object.
74
+ */
75
+ get DiscoveryIsAuthoritative() {
76
+ return false;
77
+ }
78
+ get RateLimitPolicy() {
79
+ return {
80
+ TokensPerSec: BILLCOM_TOKENS_PER_SEC,
81
+ Burst: BILLCOM_MAX_CONCURRENCY,
82
+ ThrottleBackoffFactor: 0.5,
83
+ };
84
+ }
85
+ get MaxConcurrencyHint() {
86
+ return BILLCOM_MAX_CONCURRENCY;
87
+ }
88
+ // ── Action generation ────────────────────────────────────────────
89
+ /**
90
+ * Static object model for `ActionMetadataGenerator`. Returning `[]` — the base-class default — means
91
+ * NO Actions can be generated for this connector at all, which is precisely why Business Central
92
+ * ships none today.
93
+ *
94
+ * The list is generated by `scripts/extract-catalog.mjs` from the same OpenAPI extraction that
95
+ * produces the sync catalog, so the Action surface and the catalog cannot drift apart.
96
+ *
97
+ * The generator emits Get/Search/List for every object, plus write verbs only where
98
+ * `SupportsWrite` is true — so `receivable-payments` yields a Create ("charge a customer") but the
99
+ * read verbs carry the payment-detection path.
100
+ */
101
+ GetIntegrationObjects() {
102
+ return BILLCOM_OBJECTS;
103
+ }
104
+ GetActionGeneratorConfig() {
105
+ return {
106
+ IntegrationName: this.IntegrationName,
107
+ CategoryName: 'Bill.com',
108
+ IconClass: 'fa-solid fa-file-invoice-dollar',
109
+ Objects: this.GetIntegrationObjects(),
110
+ };
111
+ }
112
+ // ── Auth ─────────────────────────────────────────────────────────
113
+ /**
114
+ * Returns a live session, logging in only when necessary.
115
+ *
116
+ * Called once per FetchChanges, but a long sync can outlive the 35-minute idle window, so the
117
+ * staleness check lives here AND a 401 retry lives in MakeHTTPRequest. Both paths matter: this one
118
+ * avoids a predictable failure, that one recovers from an unpredictable one.
119
+ */
120
+ async Authenticate(companyIntegration, contextUser) {
121
+ if (this.cachedAuth && !this.IsSessionStale(this.cachedAuth)) {
122
+ return this.cachedAuth;
123
+ }
124
+ const creds = await this.LoadCredentials(companyIntegration, contextUser);
125
+ this.cachedCredentials = creds;
126
+ this.cachedAuth = await this.Login(creds);
127
+ return this.cachedAuth;
128
+ }
129
+ /** True when the session has been idle long enough that Bill.com may have expired it. */
130
+ IsSessionStale(auth) {
131
+ return Date.now() - auth.LastUsedAt >= BILLCOM_SESSION_IDLE_MS;
132
+ }
133
+ /**
134
+ * `POST /login` → `{ sessionId, organizationId, userId }`.
135
+ *
136
+ * Throws rather than returning null: without a session nothing downstream can work, and a silent
137
+ * failure here would surface later as an inscrutable 401 on an unrelated object.
138
+ */
139
+ async Login(creds) {
140
+ const baseURL = this.ResolveBaseURL(creds);
141
+ const response = await fetch(`${baseURL}/login`, {
142
+ method: 'POST',
143
+ headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' },
144
+ body: JSON.stringify({
145
+ username: creds.Username,
146
+ password: creds.Password,
147
+ organizationId: creds.OrganizationID,
148
+ devKey: creds.DevKey,
149
+ }),
150
+ });
151
+ const bodyText = await response.text();
152
+ let parsed = {};
153
+ try {
154
+ parsed = bodyText.length > 0 ? JSON.parse(bodyText) : {};
155
+ }
156
+ catch {
157
+ throw new Error(`Bill.com login returned non-JSON (HTTP ${response.status}): ${bodyText.slice(0, 200)}`);
158
+ }
159
+ const sessionId = typeof parsed.sessionId === 'string' ? parsed.sessionId : '';
160
+ if (!response.ok || sessionId.length === 0) {
161
+ const message = typeof parsed.message === 'string' ? parsed.message : bodyText.slice(0, 200);
162
+ throw new Error(`Bill.com login failed (HTTP ${response.status}): ${message || 'no sessionId returned'}`);
163
+ }
164
+ return {
165
+ SessionID: sessionId,
166
+ DevKey: creds.DevKey,
167
+ BaseURL: baseURL,
168
+ LastUsedAt: Date.now(),
169
+ };
170
+ }
171
+ /** Explicit `apiUrl` wins; otherwise environment selects a gateway, defaulting to sandbox. */
172
+ ResolveBaseURL(creds) {
173
+ if (creds.ApiUrl && creds.ApiUrl.trim().length > 0) {
174
+ return creds.ApiUrl.trim().replace(/\/+$/, '');
175
+ }
176
+ return creds.Environment?.trim().toLowerCase() === 'production'
177
+ ? BILLCOM_PRODUCTION_BASE
178
+ : BILLCOM_SANDBOX_BASE;
179
+ }
180
+ BuildHeaders(auth) {
181
+ const ctx = auth;
182
+ return {
183
+ 'sessionId': ctx.SessionID,
184
+ 'devKey': ctx.DevKey,
185
+ 'Content-Type': 'application/json',
186
+ 'Accept': 'application/json',
187
+ };
188
+ }
189
+ GetBaseURL(companyIntegration, auth) {
190
+ const ctx = auth;
191
+ if (ctx?.BaseURL)
192
+ return ctx.BaseURL;
193
+ const cfg = companyIntegration?.Configuration;
194
+ if (cfg) {
195
+ try {
196
+ const parsed = JSON.parse(cfg);
197
+ const override = parsed.apiUrl ?? parsed.ApiUrl ?? parsed.BaseURL;
198
+ if (typeof override === 'string' && override.trim().length > 0) {
199
+ return override.trim().replace(/\/+$/, '');
200
+ }
201
+ }
202
+ catch {
203
+ /* Configuration is not JSON — fall through to the sandbox default */
204
+ }
205
+ }
206
+ return BILLCOM_SANDBOX_BASE;
207
+ }
208
+ // ── Transport ────────────────────────────────────────────────────
209
+ /**
210
+ * HTTP transport. Owns the wire boundary — tests subclass and stub this.
211
+ *
212
+ * Re-logins once on a 401 and replays the request. A 401 here means the session lapsed despite the
213
+ * idle check (clock skew, a server-side invalidation, a concurrent logout), and re-login is the only
214
+ * recovery Bill.com offers. Exactly one retry: a second 401 is a credential problem, not a stale
215
+ * session, and retrying would burn the 200/hour login budget.
216
+ */
217
+ async MakeHTTPRequest(auth, url, method, headers, body) {
218
+ const first = await this.SendOnce(url, method, headers, body);
219
+ if (first.Status !== 401) {
220
+ this.TouchSession(auth);
221
+ return first;
222
+ }
223
+ if (!this.cachedCredentials) {
224
+ // Nothing to re-login with — surface the 401 rather than pretend we can recover.
225
+ return first;
226
+ }
227
+ this.cachedAuth = await this.Login(this.cachedCredentials);
228
+ const retried = await this.SendOnce(url, method, this.BuildHeaders(this.cachedAuth), body);
229
+ this.TouchSession(this.cachedAuth);
230
+ return retried;
231
+ }
232
+ /** Single request/response cycle with no retry semantics. */
233
+ async SendOnce(url, method, headers, body) {
234
+ const init = { method, headers };
235
+ if (body !== undefined && body !== null && method.toUpperCase() !== 'GET') {
236
+ init.body = typeof body === 'string' ? body : JSON.stringify(body);
237
+ }
238
+ const response = await fetch(url, init);
239
+ const text = await response.text();
240
+ let parsedBody = null;
241
+ if (text.length > 0) {
242
+ try {
243
+ parsedBody = JSON.parse(text);
244
+ }
245
+ catch {
246
+ parsedBody = text;
247
+ }
248
+ }
249
+ const responseHeaders = {};
250
+ response.headers.forEach((value, key) => {
251
+ responseHeaders[key.toLowerCase()] = value;
252
+ });
253
+ return { Status: response.status, Body: parsedBody, Headers: responseHeaders };
254
+ }
255
+ /** Records activity so the idle-expiry window is measured from the last real request. */
256
+ TouchSession(auth) {
257
+ const ctx = auth;
258
+ if (typeof ctx.LastUsedAt === 'number')
259
+ ctx.LastUsedAt = Date.now();
260
+ }
261
+ // ── Response shape ───────────────────────────────────────────────
262
+ /**
263
+ * List responses wrap rows in `results`; single-record reads return the object directly. The data key
264
+ * is metadata-driven (`ResponseDataKey`) with a `results` fallback so the catalog stays authoritative.
265
+ */
266
+ NormalizeResponse(rawBody, responseDataKey) {
267
+ if (rawBody == null)
268
+ return [];
269
+ if (Array.isArray(rawBody))
270
+ return rawBody;
271
+ if (typeof rawBody === 'object') {
272
+ const body = rawBody;
273
+ const key = responseDataKey ?? 'results';
274
+ const arr = body[key];
275
+ if (Array.isArray(arr))
276
+ return arr;
277
+ // Single-record read, or a write acknowledgement: the body IS the record.
278
+ return [body];
279
+ }
280
+ return [];
281
+ }
282
+ /**
283
+ * Pagination is an opaque cursor. `nextPage` is a token — never a page number — and its **absence**
284
+ * is the termination signal. An empty `results` array with a `nextPage` present still means keep
285
+ * going; treating an empty page as the end would silently truncate a sync.
286
+ */
287
+ ExtractPaginationInfo(rawBody, _paginationType, _currentPage, _currentOffset, _pageSize) {
288
+ if (rawBody && typeof rawBody === 'object') {
289
+ const env = rawBody;
290
+ if (typeof env.nextPage === 'string' && env.nextPage.length > 0) {
291
+ return { HasMore: true, NextCursor: env.nextPage };
292
+ }
293
+ }
294
+ return { HasMore: false };
295
+ }
296
+ /**
297
+ * Appends `max` and, when continuing, the opaque `page` cursor. `max` is always sent explicitly
298
+ * because the vendor docs disagree on the default (100 vs 20).
299
+ */
300
+ BuildPaginatedURL(basePath, obj, _page, _offset, cursor, effectivePageSize) {
301
+ const pageSize = Math.min(effectivePageSize ?? obj.DefaultPageSize ?? BILLCOM_LIST_MAX_PAGE, BILLCOM_LIST_MAX_PAGE);
302
+ const separator = basePath.includes('?') ? '&' : '?';
303
+ const parts = [`max=${pageSize}`];
304
+ if (cursor)
305
+ parts.push(`page=${encodeURIComponent(cursor)}`);
306
+ return `${basePath}${separator}${parts.join('&')}`;
307
+ }
308
+ /** Bill.com reports failures as `{ message }` (sometimes `{ error }`) alongside a non-2xx status. */
309
+ ExtractErrorMessage(response) {
310
+ const body = response.Body;
311
+ if (body && typeof body === 'object') {
312
+ const rec = body;
313
+ for (const key of ['message', 'error', 'errorMessage', 'detail']) {
314
+ const val = rec[key];
315
+ if (typeof val === 'string' && val.length > 0)
316
+ return val;
317
+ }
318
+ }
319
+ if (typeof body === 'string' && body.length > 0)
320
+ return body.slice(0, 300);
321
+ return undefined;
322
+ }
323
+ // ── Connection test ──────────────────────────────────────────────
324
+ /**
325
+ * A successful `POST /login` is the connection test — it exercises every credential field
326
+ * (username, password, organizationId, devKey) and the chosen gateway in one call.
327
+ */
328
+ async TestConnection(companyIntegration, contextUser) {
329
+ try {
330
+ const creds = await this.LoadCredentials(companyIntegration, contextUser);
331
+ const auth = await this.Login(creds);
332
+ this.cachedCredentials = creds;
333
+ this.cachedAuth = auth;
334
+ return {
335
+ Success: true,
336
+ Message: `Connected to Bill.com at ${auth.BaseURL}`,
337
+ };
338
+ }
339
+ catch (error) {
340
+ const message = error instanceof Error ? error.message : String(error);
341
+ return { Success: false, Message: `Bill.com connection failed: ${message}` };
342
+ }
343
+ }
344
+ // ── Credentials ──────────────────────────────────────────────────
345
+ /**
346
+ * Prefers the linked `MJ: Credentials` row; falls back to `CompanyIntegration.Configuration` so a
347
+ * connection can be stood up before the credential store is populated.
348
+ */
349
+ async LoadCredentials(companyIntegration, contextUser, provider) {
350
+ const credentialID = companyIntegration.CredentialID;
351
+ if (credentialID) {
352
+ const fromStore = await this.LoadFromCredentialEntity(credentialID, contextUser, provider);
353
+ if (fromStore)
354
+ return fromStore;
355
+ }
356
+ const fromConfig = companyIntegration.Configuration
357
+ ? this.ParseCredentialJson(companyIntegration.Configuration)
358
+ : null;
359
+ if (fromConfig)
360
+ return fromConfig;
361
+ throw new Error('Bill.com credentials not found. Provide username, password, organizationId and devKey ' +
362
+ 'via a linked MJ: Credentials record or CompanyIntegration.Configuration.');
363
+ }
364
+ /** Loads a credential row and parses its Values JSON. */
365
+ async LoadFromCredentialEntity(credentialID, contextUser, provider) {
366
+ const md = provider ?? new Metadata();
367
+ const credential = await md.GetEntityObject('MJ: Credentials', contextUser);
368
+ const loaded = await credential.Load(credentialID);
369
+ if (!loaded || !credential.Values)
370
+ return null;
371
+ return this.ParseCredentialJson(credential.Values);
372
+ }
373
+ /**
374
+ * Extracts credentials from a JSON string, accepting both camelCase and PascalCase keys so a
375
+ * hand-authored Configuration blob and a schema-generated credential both resolve.
376
+ */
377
+ ParseCredentialJson(json) {
378
+ try {
379
+ const parsed = JSON.parse(json);
380
+ const username = this.FirstString(parsed, ['username', 'Username', 'userName', 'UserName']);
381
+ const password = this.FirstString(parsed, ['password', 'Password']);
382
+ const orgId = this.FirstString(parsed, ['organizationId', 'OrganizationId', 'OrganizationID', 'orgId']);
383
+ const devKey = this.FirstString(parsed, ['devKey', 'DevKey', 'developerKey']);
384
+ if (!username || !password || !orgId || !devKey)
385
+ return null;
386
+ return {
387
+ Username: username,
388
+ Password: password,
389
+ OrganizationID: orgId,
390
+ DevKey: devKey,
391
+ Environment: this.FirstString(parsed, ['environment', 'Environment']),
392
+ ApiUrl: this.FirstString(parsed, ['apiUrl', 'ApiUrl', 'ApiURL', 'baseUrl', 'BaseURL']),
393
+ };
394
+ }
395
+ catch {
396
+ return null;
397
+ }
398
+ }
399
+ /** First non-empty string value among the candidate keys. */
400
+ FirstString(source, keys) {
401
+ for (const key of keys) {
402
+ const val = source[key];
403
+ if (typeof val === 'string' && val.trim().length > 0)
404
+ return val.trim();
405
+ }
406
+ return undefined;
407
+ }
408
+ };
409
+ BillComConnector = __decorate([
410
+ RegisterClass(BaseIntegrationConnector, 'BillComConnector'),
411
+ RegisterClass(BaseIntegrationConnector, '@memberjunction/connector-bill-com')
412
+ ], BillComConnector);
413
+ export { BillComConnector };
414
+ //# sourceMappingURL=BillComConnector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BillComConnector.js","sourceRoot":"","sources":["../src/BillComConnector.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAyC,MAAM,sBAAsB,CAAC;AAMvF,OAAO,EACH,wBAAwB,EACxB,4BAA4B,GAS/B,MAAM,oCAAoC,C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,CAAC;QAChB,CAAC;IACL,CAAC;IAED,6DAA6D;IACrD,WAAW,CAAC,MAA+B,EAAE,IAAc;QAC/D,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACrB,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YACxB,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;gBAAE,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;QAC5E,CAAC;QACD,OAAO,SAAS,CAAC;IACrB,CAAC;CACJ,CAAA;AAjaY,gBAAgB;IAF5B,aAAa,CAAC,wBAAwB,EAAE,kBAAkB,CAAC;IAC3D,aAAa,CAAC,wBAAwB,EAAE,oCAAoC,CAAC;GACjE,gBAAgB,CAia5B"}
@@ -0,0 +1,2 @@
1
+ import type { IntegrationObjectInfo } from '@memberjunction/integration-engine';
2
+ export declare const BILLCOM_OBJECTS: IntegrationObjectInfo[];
@@ -0,0 +1,593 @@
1
+ // GENERATED by scripts/extract-catalog.mjs — DO NOT EDIT BY HAND.
2
+ // Regenerate with: node scripts/extract-catalog.mjs
3
+ //
4
+ // Source of truth for BOTH the sync catalog (metadata/integration/) and Action generation
5
+ // (GetIntegrationObjects -> ActionMetadataGenerator). Extracted from BILL's published OpenAPI.
6
+ export const BILLCOM_OBJECTS = [
7
+ {
8
+ "Name": "customers",
9
+ "DisplayName": "Customers",
10
+ "Description": "AR customers billed through BILL. ID prefix 0cu.",
11
+ "SupportsWrite": true,
12
+ "Fields": [
13
+ {
14
+ "Name": "id",
15
+ "DisplayName": "Id",
16
+ "Description": "BILL-generated ID of the customer. The value begins with `0cu`.",
17
+ "Type": "string",
18
+ "IsRequired": false,
19
+ "IsReadOnly": true,
20
+ "IsPrimaryKey": true
21
+ },
22
+ {
23
+ "Name": "archived",
24
+ "DisplayName": "Archived",
25
+ "Description": "Set as `true` if the customer is archived.",
26
+ "Type": "bit",
27
+ "IsRequired": false,
28
+ "IsReadOnly": false,
29
+ "IsPrimaryKey": false
30
+ },
31
+ {
32
+ "Name": "name",
33
+ "DisplayName": "Name",
34
+ "Description": "Customer name",
35
+ "Type": "string",
36
+ "IsRequired": true,
37
+ "IsReadOnly": false,
38
+ "IsPrimaryKey": false
39
+ },
40
+ {
41
+ "Name": "companyName",
42
+ "DisplayName": "Company Name",
43
+ "Description": "Customer company name. This field is overridden when you connect with a customer in the BILL network.",
44
+ "Type": "string",
45
+ "IsRequired": false,
46
+ "IsReadOnly": false,
47
+ "IsPrimaryKey": false
48
+ },
49
+ {
50
+ "Name": "contact",
51
+ "DisplayName": "Contact",
52
+ "Type": "json",
53
+ "IsRequired": false,
54
+ "IsReadOnly": false,
55
+ "IsPrimaryKey": false
56
+ },
57
+ {
58
+ "Name": "email",
59
+ "DisplayName": "Email",
60
+ "Description": "Customer email address",
61
+ "Type": "string",
62
+ "IsRequired": true,
63
+ "IsReadOnly": false,
64
+ "IsPrimaryKey": false
65
+ },
66
+ {
67
+ "Name": "phone",
68
+ "DisplayName": "Phone",
69
+ "Description": "Customer phone number. This field is overridden when you connect with a customer in the BILL network.",
70
+ "Type": "string",
71
+ "IsRequired": false,
72
+ "IsReadOnly": false,
73
+ "IsPrimaryKey": false
74
+ },
75
+ {
76
+ "Name": "fax",
77
+ "DisplayName": "Fax",
78
+ "Description": "Customer fax number",
79
+ "Type": "string",
80
+ "IsRequired": false,
81
+ "IsReadOnly": false,
82
+ "IsPrimaryKey": false
83
+ },
84
+ {
85
+ "Name": "description",
86
+ "DisplayName": "Description",
87
+ "Description": "Customer description",
88
+ "Type": "string",
89
+ "IsRequired": false,
90
+ "IsReadOnly": false,
91
+ "IsPrimaryKey": false
92
+ },
93
+ {
94
+ "Name": "invoiceCurrency",
95
+ "DisplayName": "Invoice Currency",
96
+ "Type": "json",
97
+ "IsRequired": false,
98
+ "IsReadOnly": false,
99
+ "IsPrimaryKey": false
100
+ },
101
+ {
102
+ "Name": "accountType",
103
+ "DisplayName": "Account Type",
104
+ "Type": "json",
105
+ "IsRequired": false,
106
+ "IsReadOnly": false,
107
+ "IsPrimaryKey": false
108
+ },
109
+ {
110
+ "Name": "paymentTermId",
111
+ "DisplayName": "Payment Term Id",
112
+ "Description": "BILL-generated ID of the payment term. Use payment terms to set the number of days the customer has to clear an invoice.",
113
+ "Type": "string",
114
+ "IsRequired": false,
115
+ "IsReadOnly": false,
116
+ "IsPrimaryKey": false
117
+ },
118
+ {
119
+ "Name": "accountNumber",
120
+ "DisplayName": "Account Number",
121
+ "Description": "Customer account number. The number appears in customer invoices.",
122
+ "Type": "string",
123
+ "IsRequired": false,
124
+ "IsReadOnly": false,
125
+ "IsPrimaryKey": false
126
+ },
127
+ {
128
+ "Name": "billingAddress",
129
+ "DisplayName": "Billing Address",
130
+ "Type": "json",
131
+ "IsRequired": false,
132
+ "IsReadOnly": false,
133
+ "IsPrimaryKey": false
134
+ },
135
+ {
136
+ "Name": "shippingAddress",
137
+ "DisplayName": "Shipping Address",
138
+ "Type": "json",
139
+ "IsRequired": false,
140
+ "IsReadOnly": false,
141
+ "IsPrimaryKey": false
142
+ },
143
+ {
144
+ "Name": "balance",
145
+ "DisplayName": "Balance",
146
+ "Type": "json",
147
+ "IsRequired": false,
148
+ "IsReadOnly": false,
149
+ "IsPrimaryKey": false
150
+ },
151
+ {
152
+ "Name": "hasBankAccount",
153
+ "DisplayName": "Has Bank Account",
154
+ "Description": "Set as `true` if the customer bank account is added",
155
+ "Type": "bit",
156
+ "IsRequired": false,
157
+ "IsReadOnly": false,
158
+ "IsPrimaryKey": false
159
+ },
160
+ {
161
+ "Name": "authorizedToCharge",
162
+ "DisplayName": "Authorized To Charge",
163
+ "Description": "Set as `true` if your organization is authorized to charge the customer for invoices",
164
+ "Type": "bit",
165
+ "IsRequired": false,
166
+ "IsReadOnly": false,
167
+ "IsPrimaryKey": false
168
+ },
169
+ {
170
+ "Name": "createdTime",
171
+ "DisplayName": "Created Time",
172
+ "Description": "Created date and time",
173
+ "Type": "datetime",
174
+ "IsRequired": false,
175
+ "IsReadOnly": true,
176
+ "IsPrimaryKey": false
177
+ },
178
+ {
179
+ "Name": "updatedTime",
180
+ "DisplayName": "Updated Time",
181
+ "Description": "Updated date and time",
182
+ "Type": "datetime",
183
+ "IsRequired": false,
184
+ "IsReadOnly": true,
185
+ "IsPrimaryKey": false
186
+ }
187
+ ]
188
+ },
189
+ {
190
+ "Name": "invoices",
191
+ "DisplayName": "Invoices",
192
+ "Description": "AR invoices issued to customers. ID prefix 00e. Cancellation is POST /v3/invoices/{id}/archive (idempotent, reversed by /restore) — InvoiceStatus has no VOID/CANCELED value, so cancellation is the separate `archived` boolean and must NOT be modelled as...",
193
+ "SupportsWrite": true,
194
+ "Fields": [
195
+ {
196
+ "Name": "id",
197
+ "DisplayName": "Id",
198
+ "Description": "BILL-generated ID of the invoice. The value begins with `00e`.",
199
+ "Type": "string",
200
+ "IsRequired": false,
201
+ "IsReadOnly": true,
202
+ "IsPrimaryKey": true
203
+ },
204
+ {
205
+ "Name": "archived",
206
+ "DisplayName": "Archived",
207
+ "Description": "Set as `true` if the invoice is archived",
208
+ "Type": "bit",
209
+ "IsRequired": false,
210
+ "IsReadOnly": false,
211
+ "IsPrimaryKey": false
212
+ },
213
+ {
214
+ "Name": "recordStatus",
215
+ "DisplayName": "Record Status",
216
+ "Type": "json",
217
+ "IsRequired": false,
218
+ "IsReadOnly": false,
219
+ "IsPrimaryKey": false
220
+ },
221
+ {
222
+ "Name": "invoiceNumber",
223
+ "DisplayName": "Invoice Number",
224
+ "Description": "User-generated invoice number. This value can be your chosen number scheme.\n\nIf you do not set this field, `invoiceNumber` is auto-generated.",
225
+ "Type": "string",
226
+ "IsRequired": false,
227
+ "IsReadOnly": false,
228
+ "IsPrimaryKey": false
229
+ },
230
+ {
231
+ "Name": "invoiceDate",
232
+ "DisplayName": "Invoice Date",
233
+ "Description": "Invoice creation date. This value is in the `yyyy-MM-dd` format.\n\nIf you do not set this field, `invoiceDate` is set as the date when the invoice is created.",
234
+ "Type": "date",
235
+ "IsRequired": false,
236
+ "IsReadOnly": false,
237
+ "IsPrimaryKey": false
238
+ },
239
+ {
240
+ "Name": "dueDate",
241
+ "DisplayName": "Due Date",
242
+ "Description": "Invoice due date. The value is in the `yyyy-MM-dd` format.\n\nIf you do not set this field, `dueDate` is set as the date when the invoice is created.",
243
+ "Type": "date",
244
+ "IsRequired": false,
245
+ "IsReadOnly": false,
246
+ "IsPrimaryKey": false
247
+ },
248
+ {
249
+ "Name": "paymentTermId",
250
+ "DisplayName": "Payment Term Id",
251
+ "Type": "string",
252
+ "IsRequired": false,
253
+ "IsReadOnly": false,
254
+ "IsPrimaryKey": false
255
+ },
256
+ {
257
+ "Name": "customerId",
258
+ "DisplayName": "Customer Id",
259
+ "Description": "BILL-generated ID of the customer. The value begins with `0cu`.",
260
+ "Type": "string",
261
+ "IsRequired": false,
262
+ "IsReadOnly": true,
263
+ "IsPrimaryKey": false
264
+ },
265
+ {
266
+ "Name": "totalAmount",
267
+ "DisplayName": "Total Amount",
268
+ "Description": "Invoice total amount",
269
+ "Type": "decimal",
270
+ "IsRequired": false,
271
+ "IsReadOnly": true,
272
+ "IsPrimaryKey": false
273
+ },
274
+ {
275
+ "Name": "dueAmount",
276
+ "DisplayName": "Due Amount",
277
+ "Description": "Invoice due amount. The value is calculated by subtracting any applied credits (`creditAmount`), scheduled payment (`scheduledAmount`), and cleared payment from `totalAmount`.",
278
+ "Type": "decimal",
279
+ "IsRequired": false,
280
+ "IsReadOnly": true,
281
+ "IsPrimaryKey": false
282
+ },
283
+ {
284
+ "Name": "scheduledAmount",
285
+ "DisplayName": "Scheduled Amount",
286
+ "Description": "Invoice scheduled amount. The value is set as the customer payment amount that is pending clearance.",
287
+ "Type": "decimal",
288
+ "IsRequired": false,
289
+ "IsReadOnly": false,
290
+ "IsPrimaryKey": false
291
+ },
292
+ {
293
+ "Name": "creditAmount",
294
+ "DisplayName": "Credit Amount",
295
+ "Description": "Credit amount applied to the invoice.\n\nWhen a credit amount is applied to an invoice, the invoice `status` is set as `PARTIAL_PAYMENT` or `PAID_IN_FULL` depending on the invoice `totalAmount`.",
296
+ "Type": "decimal",
297
+ "IsRequired": false,
298
+ "IsReadOnly": false,
299
+ "IsPrimaryKey": false
300
+ },
301
+ {
302
+ "Name": "status",
303
+ "DisplayName": "Status",
304
+ "Type": "json",
305
+ "IsRequired": false,
306
+ "IsReadOnly": false,
307
+ "IsPrimaryKey": false
308
+ },
309
+ {
310
+ "Name": "exchangeRate",
311
+ "DisplayName": "Exchange Rate",
312
+ "Description": "Invoice exchange rate",
313
+ "Type": "decimal",
314
+ "IsRequired": false,
315
+ "IsReadOnly": false,
316
+ "IsPrimaryKey": false
317
+ },
318
+ {
319
+ "Name": "createdBy",
320
+ "DisplayName": "Created By",
321
+ "Description": "BILL-generated ID of the user that created the invoice. The value begins with `006`.",
322
+ "Type": "string",
323
+ "IsRequired": false,
324
+ "IsReadOnly": false,
325
+ "IsPrimaryKey": false
326
+ },
327
+ {
328
+ "Name": "createdTime",
329
+ "DisplayName": "Created Time",
330
+ "Description": "Invoice created time",
331
+ "Type": "datetime",
332
+ "IsRequired": false,
333
+ "IsReadOnly": true,
334
+ "IsPrimaryKey": false
335
+ },
336
+ {
337
+ "Name": "updatedTime",
338
+ "DisplayName": "Updated Time",
339
+ "Description": "Invoice updated time",
340
+ "Type": "datetime",
341
+ "IsRequired": false,
342
+ "IsReadOnly": true,
343
+ "IsPrimaryKey": false
344
+ },
345
+ {
346
+ "Name": "invoiceLineItems",
347
+ "DisplayName": "Invoice Line Items",
348
+ "Description": "Invoice line item information",
349
+ "Type": "json",
350
+ "IsRequired": false,
351
+ "IsReadOnly": false,
352
+ "IsPrimaryKey": false
353
+ },
354
+ {
355
+ "Name": "payToChartOfAccountId",
356
+ "DisplayName": "Pay To Chart Of Account Id",
357
+ "Description": "BILL-generated ID of the chart of accounts for the invoice payment. The value begins with `0ca`.",
358
+ "Type": "string",
359
+ "IsRequired": false,
360
+ "IsReadOnly": false,
361
+ "IsPrimaryKey": false
362
+ },
363
+ {
364
+ "Name": "payments",
365
+ "DisplayName": "Payments",
366
+ "Description": "Invoice payments information",
367
+ "Type": "json",
368
+ "IsRequired": false,
369
+ "IsReadOnly": false,
370
+ "IsPrimaryKey": false
371
+ },
372
+ {
373
+ "Name": "classifications",
374
+ "DisplayName": "Classifications",
375
+ "Type": "json",
376
+ "IsRequired": false,
377
+ "IsReadOnly": false,
378
+ "IsPrimaryKey": false
379
+ },
380
+ {
381
+ "Name": "salesTaxItemId",
382
+ "DisplayName": "Sales Tax Item Id",
383
+ "Description": "BILL-generated ID of the `SALES_TAX` item. The value begins with `0ii`. The tax rate is applied to all the invoice line items set as taxable.",
384
+ "Type": "string",
385
+ "IsRequired": false,
386
+ "IsReadOnly": false,
387
+ "IsPrimaryKey": false
388
+ },
389
+ {
390
+ "Name": "salesTaxTotal",
391
+ "DisplayName": "Sales Tax Total",
392
+ "Description": "Invoice sales tax amount. The value is set based on `salesTaxItemId`.",
393
+ "Type": "decimal",
394
+ "IsRequired": false,
395
+ "IsReadOnly": false,
396
+ "IsPrimaryKey": false
397
+ },
398
+ {
399
+ "Name": "salesTaxPercentage",
400
+ "DisplayName": "Sales Tax Percentage",
401
+ "Description": "Invoice sales tax percentage. The value is set based on `salesTaxItemId`.",
402
+ "Type": "decimal",
403
+ "IsRequired": false,
404
+ "IsReadOnly": false,
405
+ "IsPrimaryKey": false
406
+ },
407
+ {
408
+ "Name": "enableCardPayment",
409
+ "DisplayName": "Enable Card Payment",
410
+ "Description": "Set as `true` if the card payment option is enabled for the invoice",
411
+ "Type": "bit",
412
+ "IsRequired": false,
413
+ "IsReadOnly": false,
414
+ "IsPrimaryKey": false
415
+ },
416
+ {
417
+ "Name": "convenienceFee",
418
+ "DisplayName": "Convenience Fee",
419
+ "Type": "json",
420
+ "IsRequired": false,
421
+ "IsReadOnly": false,
422
+ "IsPrimaryKey": false
423
+ },
424
+ {
425
+ "Name": "invoicePdfId",
426
+ "DisplayName": "Invoice Pdf Id",
427
+ "Description": "BILL-generated ID of the invoice PDF. The value begins with `att`.\n\nThe invoice PDF is sent as an email attachment when you send an invoice to a customer. The invoice PDF also appears when the customer clicks the invoice payment link to complete the in...",
428
+ "Type": "string",
429
+ "IsRequired": false,
430
+ "IsReadOnly": false,
431
+ "IsPrimaryKey": false
432
+ },
433
+ {
434
+ "Name": "customer",
435
+ "DisplayName": "Customer",
436
+ "Description": "Customer the invoice is issued to, as an InvoiceCustomer object — {\"id\":\"0cu…\"}, NOT a bare ID string. Write-only: BILL returns the same value flattened to `customerId` on read.",
437
+ "Type": "json",
438
+ "IsRequired": true,
439
+ "IsReadOnly": false,
440
+ "IsPrimaryKey": false
441
+ }
442
+ ]
443
+ },
444
+ {
445
+ "Name": "receivable-payments",
446
+ "DisplayName": "Receivable Payments",
447
+ "Description": "Payments received from customers. ID prefix 0rp — distinct from AP vendor payments (stp). invoicePayments[] links one payment to MANY invoices, so a consuming Payment record must model a collection, not a single invoice FK. No v3 endpoint transitions a...",
448
+ "SupportsWrite": true,
449
+ "Fields": [
450
+ {
451
+ "Name": "id",
452
+ "DisplayName": "Id",
453
+ "Description": "BILL-generated ID of the received payment. The value begins with `0rp`.",
454
+ "Type": "string",
455
+ "IsRequired": false,
456
+ "IsReadOnly": true,
457
+ "IsPrimaryKey": true
458
+ },
459
+ {
460
+ "Name": "customerId",
461
+ "DisplayName": "Customer Id",
462
+ "Description": "BILL-generated ID of the customer. The value begins with `0cu`.",
463
+ "Type": "string",
464
+ "IsRequired": false,
465
+ "IsReadOnly": false,
466
+ "IsPrimaryKey": false
467
+ },
468
+ {
469
+ "Name": "invoicePayments",
470
+ "DisplayName": "Invoice Payments",
471
+ "Description": "List of invoice payments",
472
+ "Type": "json",
473
+ "IsRequired": false,
474
+ "IsReadOnly": false,
475
+ "IsPrimaryKey": false
476
+ },
477
+ {
478
+ "Name": "description",
479
+ "DisplayName": "Description",
480
+ "Description": "Invoice payment description. This value is included in the check memo or in the bank descriptor for electronic payments.",
481
+ "Type": "string",
482
+ "IsRequired": false,
483
+ "IsReadOnly": false,
484
+ "IsPrimaryKey": false
485
+ },
486
+ {
487
+ "Name": "paymentDate",
488
+ "DisplayName": "Payment Date",
489
+ "Description": "Received payment date. Funds are withdrawn from the customer bank account on this date.",
490
+ "Type": "date",
491
+ "IsRequired": false,
492
+ "IsReadOnly": false,
493
+ "IsPrimaryKey": false
494
+ },
495
+ {
496
+ "Name": "fundingAccount",
497
+ "DisplayName": "Funding Account",
498
+ "Type": "json",
499
+ "IsRequired": false,
500
+ "IsReadOnly": false,
501
+ "IsPrimaryKey": false
502
+ },
503
+ {
504
+ "Name": "receivablesAccount",
505
+ "DisplayName": "Receivables Account",
506
+ "Type": "json",
507
+ "IsRequired": false,
508
+ "IsReadOnly": false,
509
+ "IsPrimaryKey": false
510
+ },
511
+ {
512
+ "Name": "amount",
513
+ "DisplayName": "Amount",
514
+ "Description": "Received payment amount. For a payment in an international currency (not USD), this value is in the local currency.",
515
+ "Type": "decimal",
516
+ "IsRequired": true,
517
+ "IsReadOnly": false,
518
+ "IsPrimaryKey": false
519
+ },
520
+ {
521
+ "Name": "unappliedAmount",
522
+ "DisplayName": "Unapplied Amount",
523
+ "Description": "Unapplied received payment amount. This value is available for an overpayment, double payment, or customer payment not currently linked to an invoice.",
524
+ "Type": "decimal",
525
+ "IsRequired": false,
526
+ "IsReadOnly": false,
527
+ "IsPrimaryKey": false
528
+ },
529
+ {
530
+ "Name": "convenienceFeeAmount",
531
+ "DisplayName": "Convenience Fee Amount",
532
+ "Description": "Convenience fee charged to the customer",
533
+ "Type": "decimal",
534
+ "IsRequired": false,
535
+ "IsReadOnly": false,
536
+ "IsPrimaryKey": false
537
+ },
538
+ {
539
+ "Name": "receivablesType",
540
+ "DisplayName": "Receivables Type",
541
+ "Type": "json",
542
+ "IsRequired": false,
543
+ "IsReadOnly": false,
544
+ "IsPrimaryKey": false
545
+ },
546
+ {
547
+ "Name": "status",
548
+ "DisplayName": "Status",
549
+ "Type": "json",
550
+ "IsRequired": false,
551
+ "IsReadOnly": false,
552
+ "IsPrimaryKey": false
553
+ },
554
+ {
555
+ "Name": "referenceNumber",
556
+ "DisplayName": "Reference Number",
557
+ "Description": "Received payment reference number",
558
+ "Type": "string",
559
+ "IsRequired": false,
560
+ "IsReadOnly": false,
561
+ "IsPrimaryKey": false
562
+ },
563
+ {
564
+ "Name": "onlinePayment",
565
+ "DisplayName": "Online Payment",
566
+ "Description": "Information about how the received payment is recorded.\n* `true`: The payment is received with BILL\n* `false`: The payment is received outside BILL, and then recorded in BILL",
567
+ "Type": "bit",
568
+ "IsRequired": false,
569
+ "IsReadOnly": false,
570
+ "IsPrimaryKey": false
571
+ },
572
+ {
573
+ "Name": "createdTime",
574
+ "DisplayName": "Created Time",
575
+ "Description": "Received payment created date and time",
576
+ "Type": "datetime",
577
+ "IsRequired": false,
578
+ "IsReadOnly": true,
579
+ "IsPrimaryKey": false
580
+ },
581
+ {
582
+ "Name": "updatedTime",
583
+ "DisplayName": "Updated Time",
584
+ "Description": "Received payment updated date and time",
585
+ "Type": "datetime",
586
+ "IsRequired": false,
587
+ "IsReadOnly": true,
588
+ "IsPrimaryKey": false
589
+ }
590
+ ]
591
+ }
592
+ ];
593
+ //# sourceMappingURL=objects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objects.js","sourceRoot":"","sources":["../../src/generated/objects.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,oDAAoD;AACpD,EAAE;AACF,0FAA0F;AAC1F,+FAA+F;AAI/F,MAAM,CAAC,MAAM,eAAe,GAA4B;IACpD;QACI,MAAM,EAAE,WAAW;QACnB,aAAa,EAAE,WAAW;QAC1B,aAAa,EAAE,kDAAkD;QACjE,eAAe,EAAE,IAAI;QACrB,QAAQ,EAAE;YACN;gBACI,MAAM,EAAE,IAAI;gBACZ,aAAa,EAAE,IAAI;gBACnB,aAAa,EAAE,iEAAiE;gBAChF,MAAM,EAAE,QAAQ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,EAAE,QAAQ;gBAChB,aAAa,EAAE,QAAQ;gBACvB,MAAM,EAAE,MAAM;gBACd,YAAY,EAAE,KAAK;gBACnB,YAAY,EAAE,KAAK;gBACnB,cAAc,EAAE,KAAK;aACxB;YACD;gBACI,MAAM,EAAE,iBAAiB;gBACzB,aAAa,EAAE,kBAAkB;gBACjC,aAAa,EAAE,mCAAmC;gBAClD,MAAM,EAAE,QAAQ;gBAChB,YAAY,EAAE,KAAK;gBACnB,YAAY,EAAE,KAAK;gBACnB,cAAc,EAAE,KAAK;aACxB;YACD;gBACI,MAAM,EAAE,eAAe;gBACvB,aAAa,EAAE,gBAAgB;gBAC/B,aAAa,EAAE,kLAAkL;gBACjM,MAAM,EAAE,KAAK;gBACb,YAAY,EAAE,KAAK;gBACnB,YAAY,EAAE,KAAK;gBACnB,cAAc,EAAE,KAAK;aACxB;YACD;gBACI,MAAM,EAAE,aAAa;gBACrB,aAAa,EAAE,cAAc;gBAC7B,aAAa,EAAE,wCAAwC;gBACvD,MAAM,EAAE,UAAU;gBAClB,YAAY,EAAE,KAAK;gBACnB,YAAY,EAAE,IAAI;gBAClB,cAAc,EAAE,KAAK;aACxB;YACD;gBACI,MAAM,EAAE,aAAa;gBACrB,aAAa,EAAE,cAAc;gBAC7B,aAAa,EAAE,wCAAwC;gBACvD,MAAM,EAAE,UAAU;gBAClB,YAAY,EAAE,KAAK;gBACnB,YAAY,EAAE,IAAI;gBAClB,cAAc,EAAE,KAAK;aACxB;SACJ;KACJ;CACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './BillComConnector.js';
2
+ /** Open App bootstrap entry: importing this module ran the connector's @RegisterClass decorator;
3
+ * this no-op satisfies the loader's required startupExport and forces the import at MJAPI boot. */
4
+ export declare function registerConnector(): void;
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export * from './BillComConnector.js';
2
+ /** Open App bootstrap entry: importing this module ran the connector's @RegisterClass decorator;
3
+ * this no-op satisfies the loader's required startupExport and forces the import at MJAPI boot. */
4
+ export function registerConnector() { }
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AAEtC;oGACoG;AACpG,MAAM,UAAU,iBAAiB,KAAiD,CAAC"}
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@memberjunction/connector-bill-com",
3
+ "version": "0.2.0",
4
+ "description": "MemberJunction BillCom connector.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "/dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "tsc && tsc-alias -f",
13
+ "test": "vitest run"
14
+ },
15
+ "author": "MemberJunction.com",
16
+ "license": "ISC",
17
+ "peerDependencies": {
18
+ "@memberjunction/core": ">=5.43.0 <6.0.0",
19
+ "@memberjunction/core-entities": ">=5.43.0 <6.0.0",
20
+ "@memberjunction/global": ">=5.43.0 <6.0.0",
21
+ "@memberjunction/integration-engine": ">=5.43.0 <6.0.0"
22
+ },
23
+ "dependencies": {
24
+ "zod": "~3.24.4"
25
+ },
26
+ "devDependencies": {
27
+ "@memberjunction/core": "^5.43.0",
28
+ "@memberjunction/core-entities": "^5.43.0",
29
+ "@memberjunction/global": "^5.43.0",
30
+ "@memberjunction/integration-engine": "^5.43.0",
31
+ "@types/node": "24.10.11",
32
+ "tsc-alias": "^1.8.16",
33
+ "typescript": "^5.9.3",
34
+ "vitest": "^4.0.18"
35
+ },
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "https://github.com/MemberJunction/Integrations"
39
+ }
40
+ }