@happyvertical/accounting 0.74.8
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/AGENT.md +33 -0
- package/LICENSE +7 -0
- package/dist/chunks/OAuthClient-fC3cd77X.js +17475 -0
- package/dist/chunks/OAuthClient-fC3cd77X.js.map +1 -0
- package/dist/chunks/index-D0bqSiCo.js +893 -0
- package/dist/chunks/index-D0bqSiCo.js.map +1 -0
- package/dist/chunks/index-DO-cM79R.js +772 -0
- package/dist/chunks/index-DO-cM79R.js.map +1 -0
- package/dist/cli/claude-context.d.ts +3 -0
- package/dist/cli/claude-context.d.ts.map +1 -0
- package/dist/cli/claude-context.js +21 -0
- package/dist/cli/claude-context.js.map +1 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/quickbooks/index.d.ts +43 -0
- package/dist/providers/quickbooks/index.d.ts.map +1 -0
- package/dist/providers/stripe/index.d.ts +26 -0
- package/dist/providers/stripe/index.d.ts.map +1 -0
- package/dist/types.d.ts +670 -0
- package/dist/types.d.ts.map +1 -0
- package/metadata.json +30 -0
- package/package.json +58 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,670 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @happyvertical/accounting - Type definitions
|
|
3
|
+
*
|
|
4
|
+
* Core interfaces for accounting provider abstraction.
|
|
5
|
+
* These types define the contract between SMRT models and external providers.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Supported accounting provider types
|
|
9
|
+
*/
|
|
10
|
+
export type AccountingProviderType = 'quickbooks' | 'stripe' | 'paypal' | 'coinbase';
|
|
11
|
+
/**
|
|
12
|
+
* Base options for all providers
|
|
13
|
+
*/
|
|
14
|
+
export interface BaseAccountingOptions {
|
|
15
|
+
/** Provider type */
|
|
16
|
+
type: AccountingProviderType;
|
|
17
|
+
/** Request timeout in milliseconds */
|
|
18
|
+
timeout?: number;
|
|
19
|
+
/** Maximum retry attempts */
|
|
20
|
+
maxRetries?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* QuickBooks Online provider options
|
|
24
|
+
*/
|
|
25
|
+
export interface QuickBooksOptions extends BaseAccountingOptions {
|
|
26
|
+
type: 'quickbooks';
|
|
27
|
+
/** OAuth client ID */
|
|
28
|
+
clientId: string;
|
|
29
|
+
/** OAuth client secret */
|
|
30
|
+
clientSecret: string;
|
|
31
|
+
/** QBO company/realm ID */
|
|
32
|
+
realmId: string;
|
|
33
|
+
/** OAuth refresh token */
|
|
34
|
+
refreshToken: string;
|
|
35
|
+
/** Environment */
|
|
36
|
+
environment?: 'sandbox' | 'production';
|
|
37
|
+
/** OAuth redirect URI (must match app configuration in Intuit Developer Portal) */
|
|
38
|
+
redirectUri?: string;
|
|
39
|
+
/** Webhook verifier token for signature validation */
|
|
40
|
+
webhookVerifierToken?: string;
|
|
41
|
+
/** Callback when tokens are refreshed (persist to storage) */
|
|
42
|
+
onTokenRefresh?: (tokens: TokenSet) => Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Stripe provider options
|
|
46
|
+
*/
|
|
47
|
+
export interface StripeOptions extends BaseAccountingOptions {
|
|
48
|
+
type: 'stripe';
|
|
49
|
+
/** Stripe secret key */
|
|
50
|
+
secretKey: string;
|
|
51
|
+
/** Stripe API version sent on requests */
|
|
52
|
+
apiVersion?: string;
|
|
53
|
+
/** Stripe API base URL, primarily useful for tests */
|
|
54
|
+
apiBaseUrl?: string;
|
|
55
|
+
/** Stripe webhook endpoint secret */
|
|
56
|
+
webhookSecret?: string;
|
|
57
|
+
/** Maximum webhook signature age in seconds. Defaults to 300 seconds. */
|
|
58
|
+
webhookTolerance?: number;
|
|
59
|
+
/** Fetch implementation override, primarily useful for tests */
|
|
60
|
+
fetch?: typeof fetch;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* PayPal provider options (future)
|
|
64
|
+
*/
|
|
65
|
+
export interface PayPalOptions extends BaseAccountingOptions {
|
|
66
|
+
type: 'paypal';
|
|
67
|
+
/** PayPal client ID */
|
|
68
|
+
clientId: string;
|
|
69
|
+
/** PayPal client secret */
|
|
70
|
+
clientSecret: string;
|
|
71
|
+
/** Environment */
|
|
72
|
+
environment?: 'sandbox' | 'live';
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Coinbase Commerce provider options (future)
|
|
76
|
+
*/
|
|
77
|
+
export interface CoinbaseOptions extends BaseAccountingOptions {
|
|
78
|
+
type: 'coinbase';
|
|
79
|
+
/** Coinbase Commerce API key */
|
|
80
|
+
apiKey: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Union of all provider options
|
|
84
|
+
*/
|
|
85
|
+
export type AccountingOptions = QuickBooksOptions | StripeOptions | PayPalOptions | CoinbaseOptions;
|
|
86
|
+
/**
|
|
87
|
+
* OAuth token set returned from token refresh
|
|
88
|
+
*/
|
|
89
|
+
export interface TokenSet {
|
|
90
|
+
accessToken: string;
|
|
91
|
+
refreshToken: string;
|
|
92
|
+
expiresAt: Date;
|
|
93
|
+
tokenType?: string;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Address structure
|
|
97
|
+
*/
|
|
98
|
+
export interface Address {
|
|
99
|
+
street1?: string;
|
|
100
|
+
street2?: string;
|
|
101
|
+
city?: string;
|
|
102
|
+
state?: string;
|
|
103
|
+
postalCode?: string;
|
|
104
|
+
country?: string;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Customer input for sync operations
|
|
108
|
+
*/
|
|
109
|
+
export interface CustomerInput {
|
|
110
|
+
/** Local ID */
|
|
111
|
+
id: string;
|
|
112
|
+
/** External provider ID (if already synced) */
|
|
113
|
+
externalId?: string;
|
|
114
|
+
/** Customer name (individual or company) */
|
|
115
|
+
name: string;
|
|
116
|
+
/** Email address */
|
|
117
|
+
email?: string;
|
|
118
|
+
/** Phone number */
|
|
119
|
+
phone?: string;
|
|
120
|
+
/** Billing address */
|
|
121
|
+
billingAddress?: Address;
|
|
122
|
+
/** Shipping address */
|
|
123
|
+
shippingAddress?: Address;
|
|
124
|
+
/** Tax exempt status */
|
|
125
|
+
taxExempt?: boolean;
|
|
126
|
+
/** Payment terms (e.g., "Net 30") */
|
|
127
|
+
paymentTerms?: string;
|
|
128
|
+
/** Currency code (ISO 4217) */
|
|
129
|
+
currency?: string;
|
|
130
|
+
/** Additional metadata */
|
|
131
|
+
metadata?: Record<string, unknown>;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Invoice line item input
|
|
135
|
+
*/
|
|
136
|
+
export interface InvoiceLineItemInput {
|
|
137
|
+
/** Line item description */
|
|
138
|
+
description: string;
|
|
139
|
+
/** SKU or product code */
|
|
140
|
+
sku?: string;
|
|
141
|
+
/** Quantity */
|
|
142
|
+
quantity: number;
|
|
143
|
+
/** Unit price */
|
|
144
|
+
unitPrice: number;
|
|
145
|
+
/** Discount amount */
|
|
146
|
+
discount?: number;
|
|
147
|
+
/** Tax rate (decimal, e.g., 0.0825 for 8.25%) */
|
|
148
|
+
taxRate?: number;
|
|
149
|
+
/** Calculated line total */
|
|
150
|
+
amount?: number;
|
|
151
|
+
/** Service/product date range start */
|
|
152
|
+
periodStart?: Date;
|
|
153
|
+
/** Service/product date range end */
|
|
154
|
+
periodEnd?: Date;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Invoice input for sync operations
|
|
158
|
+
*/
|
|
159
|
+
export interface InvoiceInput {
|
|
160
|
+
/** Local ID */
|
|
161
|
+
id: string;
|
|
162
|
+
/** External provider ID (if already synced) */
|
|
163
|
+
externalId?: string;
|
|
164
|
+
/** Invoice number */
|
|
165
|
+
invoiceNumber: string;
|
|
166
|
+
/** Customer local ID */
|
|
167
|
+
customerId: string;
|
|
168
|
+
/** Customer external ID (if already synced) */
|
|
169
|
+
customerExternalId?: string;
|
|
170
|
+
/** Invoice issue date */
|
|
171
|
+
issueDate: Date;
|
|
172
|
+
/** Payment due date */
|
|
173
|
+
dueDate: Date;
|
|
174
|
+
/** Line items */
|
|
175
|
+
lineItems: InvoiceLineItemInput[];
|
|
176
|
+
/** Subtotal before tax */
|
|
177
|
+
subtotal: number;
|
|
178
|
+
/** Tax amount */
|
|
179
|
+
taxAmount: number;
|
|
180
|
+
/** Total amount */
|
|
181
|
+
totalAmount: number;
|
|
182
|
+
/** Currency code (ISO 4217) */
|
|
183
|
+
currency?: string;
|
|
184
|
+
/** External reference (e.g., PO number) */
|
|
185
|
+
reference?: string;
|
|
186
|
+
/** Invoice memo/notes */
|
|
187
|
+
memo?: string;
|
|
188
|
+
/** Additional metadata */
|
|
189
|
+
metadata?: Record<string, unknown>;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Vendor input for sync operations (AP side)
|
|
193
|
+
*/
|
|
194
|
+
export interface VendorInput {
|
|
195
|
+
/** Local ID */
|
|
196
|
+
id: string;
|
|
197
|
+
/** External provider ID (if already synced) */
|
|
198
|
+
externalId?: string;
|
|
199
|
+
/** Vendor/supplier name */
|
|
200
|
+
name: string;
|
|
201
|
+
/** Email address */
|
|
202
|
+
email?: string;
|
|
203
|
+
/** Phone number */
|
|
204
|
+
phone?: string;
|
|
205
|
+
/** Billing address */
|
|
206
|
+
address?: Address;
|
|
207
|
+
/** Tax ID / EIN */
|
|
208
|
+
taxId?: string;
|
|
209
|
+
/** Payment terms */
|
|
210
|
+
paymentTerms?: string;
|
|
211
|
+
/** Currency code (ISO 4217) */
|
|
212
|
+
currency?: string;
|
|
213
|
+
/** Additional metadata */
|
|
214
|
+
metadata?: Record<string, unknown>;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Bill line item input (AP)
|
|
218
|
+
*/
|
|
219
|
+
export interface BillLineItemInput {
|
|
220
|
+
/** Line item description */
|
|
221
|
+
description: string;
|
|
222
|
+
/** Account code/number for expense categorization */
|
|
223
|
+
accountCode?: string;
|
|
224
|
+
/** Quantity */
|
|
225
|
+
quantity: number;
|
|
226
|
+
/** Unit price */
|
|
227
|
+
unitPrice: number;
|
|
228
|
+
/** Tax rate */
|
|
229
|
+
taxRate?: number;
|
|
230
|
+
/** Calculated line total */
|
|
231
|
+
amount?: number;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Bill input for sync operations (AP side)
|
|
235
|
+
*/
|
|
236
|
+
export interface BillInput {
|
|
237
|
+
/** Local ID */
|
|
238
|
+
id: string;
|
|
239
|
+
/** External provider ID (if already synced) */
|
|
240
|
+
externalId?: string;
|
|
241
|
+
/** Bill/invoice number from vendor */
|
|
242
|
+
billNumber?: string;
|
|
243
|
+
/** Vendor local ID */
|
|
244
|
+
vendorId: string;
|
|
245
|
+
/** Vendor external ID (if already synced) */
|
|
246
|
+
vendorExternalId?: string;
|
|
247
|
+
/** Bill date */
|
|
248
|
+
billDate: Date;
|
|
249
|
+
/** Payment due date */
|
|
250
|
+
dueDate: Date;
|
|
251
|
+
/** Line items */
|
|
252
|
+
lineItems: BillLineItemInput[];
|
|
253
|
+
/** Subtotal before tax */
|
|
254
|
+
subtotal: number;
|
|
255
|
+
/** Tax amount */
|
|
256
|
+
taxAmount: number;
|
|
257
|
+
/** Total amount */
|
|
258
|
+
totalAmount: number;
|
|
259
|
+
/** Currency code (ISO 4217) */
|
|
260
|
+
currency?: string;
|
|
261
|
+
/** Reference/memo */
|
|
262
|
+
reference?: string;
|
|
263
|
+
/** Additional metadata */
|
|
264
|
+
metadata?: Record<string, unknown>;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Payment input for sync/audit operations
|
|
268
|
+
*/
|
|
269
|
+
export interface PaymentInput {
|
|
270
|
+
/** Local ID */
|
|
271
|
+
id: string;
|
|
272
|
+
/** External provider ID (if already synced) */
|
|
273
|
+
externalId?: string;
|
|
274
|
+
/** Payment amount */
|
|
275
|
+
amount: number;
|
|
276
|
+
/** Currency code (ISO 4217) */
|
|
277
|
+
currency?: string;
|
|
278
|
+
/** Payment date */
|
|
279
|
+
paidAt: Date;
|
|
280
|
+
/** Payment method */
|
|
281
|
+
method?: 'cash' | 'check' | 'credit_card' | 'bank_transfer' | 'crypto' | 'other';
|
|
282
|
+
/** External transaction ID (e.g., Stripe charge ID) */
|
|
283
|
+
transactionId?: string;
|
|
284
|
+
/** Associated invoice IDs */
|
|
285
|
+
invoiceIds?: string[];
|
|
286
|
+
/** Additional metadata */
|
|
287
|
+
metadata?: Record<string, unknown>;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* External record base (what provider returns)
|
|
291
|
+
*/
|
|
292
|
+
export interface ExternalRecord {
|
|
293
|
+
/** Provider's ID for this record */
|
|
294
|
+
externalId: string;
|
|
295
|
+
/** Provider type */
|
|
296
|
+
provider: AccountingProviderType;
|
|
297
|
+
/** Last sync timestamp */
|
|
298
|
+
syncedAt: Date;
|
|
299
|
+
/** Raw provider response (for debugging) */
|
|
300
|
+
raw?: unknown;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* External customer from provider
|
|
304
|
+
*/
|
|
305
|
+
export interface ExternalCustomer extends ExternalRecord {
|
|
306
|
+
name: string;
|
|
307
|
+
email?: string;
|
|
308
|
+
phone?: string;
|
|
309
|
+
billingAddress?: Address;
|
|
310
|
+
balance?: number;
|
|
311
|
+
currency?: string;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* External invoice from provider
|
|
315
|
+
*/
|
|
316
|
+
export interface ExternalInvoice extends ExternalRecord {
|
|
317
|
+
invoiceNumber: string;
|
|
318
|
+
customerExternalId: string;
|
|
319
|
+
issueDate: Date;
|
|
320
|
+
dueDate: Date;
|
|
321
|
+
subtotal: number;
|
|
322
|
+
taxAmount: number;
|
|
323
|
+
totalAmount: number;
|
|
324
|
+
amountPaid: number;
|
|
325
|
+
balance: number;
|
|
326
|
+
status: 'draft' | 'sent' | 'viewed' | 'paid' | 'overdue' | 'voided';
|
|
327
|
+
currency: string;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* External vendor from provider
|
|
331
|
+
*/
|
|
332
|
+
export interface ExternalVendor extends ExternalRecord {
|
|
333
|
+
name: string;
|
|
334
|
+
email?: string;
|
|
335
|
+
phone?: string;
|
|
336
|
+
address?: Address;
|
|
337
|
+
balance?: number;
|
|
338
|
+
currency?: string;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* External bill from provider
|
|
342
|
+
*/
|
|
343
|
+
export interface ExternalBill extends ExternalRecord {
|
|
344
|
+
billNumber?: string;
|
|
345
|
+
vendorExternalId: string;
|
|
346
|
+
billDate: Date;
|
|
347
|
+
dueDate: Date;
|
|
348
|
+
subtotal: number;
|
|
349
|
+
taxAmount: number;
|
|
350
|
+
totalAmount: number;
|
|
351
|
+
amountPaid: number;
|
|
352
|
+
balance: number;
|
|
353
|
+
status: 'draft' | 'pending' | 'paid' | 'overdue';
|
|
354
|
+
currency: string;
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* External payment from provider
|
|
358
|
+
*/
|
|
359
|
+
export interface ExternalPayment extends ExternalRecord {
|
|
360
|
+
amount: number;
|
|
361
|
+
currency: string;
|
|
362
|
+
paidAt: Date;
|
|
363
|
+
method?: string;
|
|
364
|
+
transactionId?: string;
|
|
365
|
+
invoiceExternalIds?: string[];
|
|
366
|
+
status: 'pending' | 'completed' | 'failed' | 'refunded';
|
|
367
|
+
}
|
|
368
|
+
export type StripeCheckoutMode = 'payment' | 'setup' | 'subscription';
|
|
369
|
+
export type StripeSubscriptionStatus = 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'paused' | 'trialing' | 'unpaid';
|
|
370
|
+
export interface StripeRecurringPriceData {
|
|
371
|
+
interval: 'day' | 'week' | 'month' | 'year';
|
|
372
|
+
intervalCount?: number;
|
|
373
|
+
}
|
|
374
|
+
export interface StripeCheckoutPriceData {
|
|
375
|
+
currency: string;
|
|
376
|
+
unitAmount: number;
|
|
377
|
+
product?: string;
|
|
378
|
+
productName?: string;
|
|
379
|
+
recurring?: StripeRecurringPriceData;
|
|
380
|
+
}
|
|
381
|
+
export interface StripeCheckoutLineItem {
|
|
382
|
+
price?: string;
|
|
383
|
+
priceData?: StripeCheckoutPriceData;
|
|
384
|
+
quantity?: number;
|
|
385
|
+
}
|
|
386
|
+
export interface StripeCheckoutSessionInput {
|
|
387
|
+
mode?: StripeCheckoutMode;
|
|
388
|
+
successUrl: string;
|
|
389
|
+
cancelUrl: string;
|
|
390
|
+
customerExternalId?: string;
|
|
391
|
+
customerEmail?: string;
|
|
392
|
+
clientReferenceId?: string;
|
|
393
|
+
lineItems: StripeCheckoutLineItem[];
|
|
394
|
+
metadata?: Record<string, string | number | boolean | null | undefined>;
|
|
395
|
+
allowPromotionCodes?: boolean;
|
|
396
|
+
}
|
|
397
|
+
export interface StripeCheckoutSession {
|
|
398
|
+
externalId: string;
|
|
399
|
+
url: string | null;
|
|
400
|
+
customerExternalId?: string;
|
|
401
|
+
subscriptionExternalId?: string;
|
|
402
|
+
paymentIntentExternalId?: string;
|
|
403
|
+
raw?: unknown;
|
|
404
|
+
}
|
|
405
|
+
export interface StripeCustomerPortalSessionInput {
|
|
406
|
+
customerExternalId: string;
|
|
407
|
+
returnUrl: string;
|
|
408
|
+
configurationExternalId?: string;
|
|
409
|
+
}
|
|
410
|
+
export interface StripeCustomerPortalSession {
|
|
411
|
+
externalId: string;
|
|
412
|
+
url: string;
|
|
413
|
+
raw?: unknown;
|
|
414
|
+
}
|
|
415
|
+
export interface StripeSubscriptionStatusResult {
|
|
416
|
+
externalId: string;
|
|
417
|
+
status: StripeSubscriptionStatus;
|
|
418
|
+
customerExternalId: string;
|
|
419
|
+
currentPeriodStart?: Date;
|
|
420
|
+
currentPeriodEnd?: Date;
|
|
421
|
+
cancelAtPeriodEnd: boolean;
|
|
422
|
+
canceledAt?: Date;
|
|
423
|
+
trialEnd?: Date;
|
|
424
|
+
raw?: unknown;
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Result of a sync operation
|
|
428
|
+
*/
|
|
429
|
+
export interface SyncResult {
|
|
430
|
+
/** Action taken */
|
|
431
|
+
action: 'created' | 'updated' | 'unchanged';
|
|
432
|
+
/** External provider ID */
|
|
433
|
+
externalId: string;
|
|
434
|
+
/** Sync timestamp */
|
|
435
|
+
syncedAt: Date;
|
|
436
|
+
/** Any warnings during sync */
|
|
437
|
+
warnings?: string[];
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Options for list operations
|
|
441
|
+
*/
|
|
442
|
+
export interface ListOptions {
|
|
443
|
+
/** Maximum records to return */
|
|
444
|
+
limit?: number;
|
|
445
|
+
/** Pagination offset or cursor */
|
|
446
|
+
offset?: number | string;
|
|
447
|
+
/** Date range filter - start */
|
|
448
|
+
startDate?: Date;
|
|
449
|
+
/** Date range filter - end */
|
|
450
|
+
endDate?: Date;
|
|
451
|
+
/** Status filter */
|
|
452
|
+
status?: string;
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Date range for filtering
|
|
456
|
+
*/
|
|
457
|
+
export interface DateRange {
|
|
458
|
+
start: Date;
|
|
459
|
+
end: Date;
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Matched record in audit
|
|
463
|
+
*/
|
|
464
|
+
export interface AuditMatch<T> {
|
|
465
|
+
/** Local record */
|
|
466
|
+
local: T;
|
|
467
|
+
/** External record from provider */
|
|
468
|
+
external: ExternalRecord;
|
|
469
|
+
/** Match status */
|
|
470
|
+
status: 'identical' | 'synced';
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* Field difference in audit
|
|
474
|
+
*/
|
|
475
|
+
export interface FieldDiff {
|
|
476
|
+
/** Field name */
|
|
477
|
+
field: string;
|
|
478
|
+
/** Local value */
|
|
479
|
+
localValue: unknown;
|
|
480
|
+
/** External value */
|
|
481
|
+
externalValue: unknown;
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Discrepancy found in audit
|
|
485
|
+
*/
|
|
486
|
+
export interface AuditDiscrepancy<T> {
|
|
487
|
+
/** Local record */
|
|
488
|
+
local: T;
|
|
489
|
+
/** External record from provider */
|
|
490
|
+
external: ExternalRecord;
|
|
491
|
+
/** Field differences */
|
|
492
|
+
differences: FieldDiff[];
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Audit report for reconciliation
|
|
496
|
+
*/
|
|
497
|
+
export interface AuditReport<T> {
|
|
498
|
+
/** Provider that was audited */
|
|
499
|
+
provider: AccountingProviderType;
|
|
500
|
+
/** Audit timestamp */
|
|
501
|
+
auditedAt: Date;
|
|
502
|
+
/** Records that match */
|
|
503
|
+
matched: AuditMatch<T>[];
|
|
504
|
+
/** Records only in local (not in provider) */
|
|
505
|
+
localOnly: T[];
|
|
506
|
+
/** Records only in provider (not in local) */
|
|
507
|
+
externalOnly: ExternalRecord[];
|
|
508
|
+
/** Records with differences */
|
|
509
|
+
discrepancies: AuditDiscrepancy<T>[];
|
|
510
|
+
/** Summary statistics */
|
|
511
|
+
summary: {
|
|
512
|
+
total: number;
|
|
513
|
+
matched: number;
|
|
514
|
+
localOnly: number;
|
|
515
|
+
externalOnly: number;
|
|
516
|
+
discrepancies: number;
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* Webhook event from provider
|
|
521
|
+
*/
|
|
522
|
+
export interface WebhookEvent {
|
|
523
|
+
/** Event type */
|
|
524
|
+
type: string;
|
|
525
|
+
/** Provider */
|
|
526
|
+
provider: AccountingProviderType;
|
|
527
|
+
/** Event timestamp */
|
|
528
|
+
timestamp: Date;
|
|
529
|
+
/** Event payload */
|
|
530
|
+
payload: unknown;
|
|
531
|
+
/** Associated resource type */
|
|
532
|
+
resourceType?: 'customer' | 'invoice' | 'payment' | 'vendor' | 'bill';
|
|
533
|
+
/** Associated resource external ID */
|
|
534
|
+
resourceId?: string;
|
|
535
|
+
}
|
|
536
|
+
/**
|
|
537
|
+
* Customer operations interface
|
|
538
|
+
*/
|
|
539
|
+
export interface CustomerOperations {
|
|
540
|
+
/** Push local customer to provider */
|
|
541
|
+
push(customer: CustomerInput): Promise<SyncResult>;
|
|
542
|
+
/** Pull customer from provider by external ID */
|
|
543
|
+
pull(externalId: string): Promise<ExternalCustomer>;
|
|
544
|
+
/** List customers from provider */
|
|
545
|
+
list(options?: ListOptions): Promise<ExternalCustomer[]>;
|
|
546
|
+
/** Sync customer (create or update) */
|
|
547
|
+
sync(customer: CustomerInput): Promise<SyncResult>;
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* Invoice operations interface
|
|
551
|
+
*/
|
|
552
|
+
export interface InvoiceOperations {
|
|
553
|
+
/** Push local invoice to provider */
|
|
554
|
+
push(invoice: InvoiceInput): Promise<SyncResult>;
|
|
555
|
+
/** Pull invoice from provider by external ID */
|
|
556
|
+
pull(externalId: string): Promise<ExternalInvoice>;
|
|
557
|
+
/** List invoices from provider */
|
|
558
|
+
list(options?: ListOptions): Promise<ExternalInvoice[]>;
|
|
559
|
+
/** Sync invoice (create or update) */
|
|
560
|
+
sync(invoice: InvoiceInput): Promise<SyncResult>;
|
|
561
|
+
/** Send invoice to customer */
|
|
562
|
+
send(externalId: string): Promise<void>;
|
|
563
|
+
/** Void/cancel invoice */
|
|
564
|
+
void(externalId: string): Promise<void>;
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* Vendor operations interface
|
|
568
|
+
*/
|
|
569
|
+
export interface VendorOperations {
|
|
570
|
+
/** Push local vendor to provider */
|
|
571
|
+
push(vendor: VendorInput): Promise<SyncResult>;
|
|
572
|
+
/** Pull vendor from provider by external ID */
|
|
573
|
+
pull(externalId: string): Promise<ExternalVendor>;
|
|
574
|
+
/** List vendors from provider */
|
|
575
|
+
list(options?: ListOptions): Promise<ExternalVendor[]>;
|
|
576
|
+
/** Sync vendor (create or update) */
|
|
577
|
+
sync(vendor: VendorInput): Promise<SyncResult>;
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* Bill operations interface (AP)
|
|
581
|
+
*/
|
|
582
|
+
export interface BillOperations {
|
|
583
|
+
/** Push local bill to provider */
|
|
584
|
+
push(bill: BillInput): Promise<SyncResult>;
|
|
585
|
+
/** Pull bill from provider by external ID */
|
|
586
|
+
pull(externalId: string): Promise<ExternalBill>;
|
|
587
|
+
/** List bills from provider */
|
|
588
|
+
list(options?: ListOptions): Promise<ExternalBill[]>;
|
|
589
|
+
/** Sync bill (create or update) */
|
|
590
|
+
sync(bill: BillInput): Promise<SyncResult>;
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* Payment operations interface
|
|
594
|
+
*/
|
|
595
|
+
export interface PaymentOperations {
|
|
596
|
+
/** Pull payment from provider by external ID */
|
|
597
|
+
pull(externalId: string): Promise<ExternalPayment>;
|
|
598
|
+
/** List payments from provider */
|
|
599
|
+
list(options?: ListOptions): Promise<ExternalPayment[]>;
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Stripe billing operations interface.
|
|
603
|
+
*
|
|
604
|
+
* These operations are Stripe-specific because billing portals and checkout
|
|
605
|
+
* sessions are payment-provider products rather than portable accounting
|
|
606
|
+
* concepts.
|
|
607
|
+
*/
|
|
608
|
+
export interface StripeBillingOperations {
|
|
609
|
+
/** Create a Stripe Checkout Session */
|
|
610
|
+
createCheckoutSession(input: StripeCheckoutSessionInput): Promise<StripeCheckoutSession>;
|
|
611
|
+
/** Create a Stripe Customer Portal Session */
|
|
612
|
+
createCustomerPortalSession(input: StripeCustomerPortalSessionInput): Promise<StripeCustomerPortalSession>;
|
|
613
|
+
/** Retrieve a Stripe subscription status summary */
|
|
614
|
+
retrieveSubscriptionStatus(subscriptionExternalId: string): Promise<StripeSubscriptionStatusResult>;
|
|
615
|
+
/** List Stripe subscription status summaries for a customer */
|
|
616
|
+
listCustomerSubscriptions(customerExternalId: string): Promise<StripeSubscriptionStatusResult[]>;
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Audit operations interface
|
|
620
|
+
*/
|
|
621
|
+
export interface AuditOperations {
|
|
622
|
+
/** Reconcile local customers against provider */
|
|
623
|
+
reconcileCustomers(locals: CustomerInput[]): Promise<AuditReport<CustomerInput>>;
|
|
624
|
+
/** Reconcile local invoices against provider */
|
|
625
|
+
reconcileInvoices(locals: InvoiceInput[], dateRange?: DateRange): Promise<AuditReport<InvoiceInput>>;
|
|
626
|
+
/** Reconcile local vendors against provider */
|
|
627
|
+
reconcileVendors(locals: VendorInput[]): Promise<AuditReport<VendorInput>>;
|
|
628
|
+
/** Reconcile local bills against provider */
|
|
629
|
+
reconcileBills(locals: BillInput[], dateRange?: DateRange): Promise<AuditReport<BillInput>>;
|
|
630
|
+
/** Reconcile local payments against provider */
|
|
631
|
+
reconcilePayments(locals: PaymentInput[], dateRange?: DateRange): Promise<AuditReport<PaymentInput>>;
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* Webhook operations interface
|
|
635
|
+
*/
|
|
636
|
+
export interface WebhookOperations {
|
|
637
|
+
/** Verify webhook signature */
|
|
638
|
+
verify(payload: string, signature: string, secret: string): boolean;
|
|
639
|
+
/** Parse webhook payload */
|
|
640
|
+
parse(payload: string): WebhookEvent;
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Main accounting provider interface
|
|
644
|
+
*/
|
|
645
|
+
export interface AccountingProvider {
|
|
646
|
+
/** Provider type */
|
|
647
|
+
readonly type: AccountingProviderType;
|
|
648
|
+
/** Customer operations */
|
|
649
|
+
customers: CustomerOperations;
|
|
650
|
+
/** Invoice operations */
|
|
651
|
+
invoices: InvoiceOperations;
|
|
652
|
+
/** Vendor operations */
|
|
653
|
+
vendors: VendorOperations;
|
|
654
|
+
/** Bill operations */
|
|
655
|
+
bills: BillOperations;
|
|
656
|
+
/** Payment operations */
|
|
657
|
+
payments: PaymentOperations;
|
|
658
|
+
/** Audit operations */
|
|
659
|
+
audit: AuditOperations;
|
|
660
|
+
/** Webhook operations */
|
|
661
|
+
webhooks: WebhookOperations;
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* Stripe provider interface with provider-specific billing operations.
|
|
665
|
+
*/
|
|
666
|
+
export interface StripeAccountingProvider extends AccountingProvider {
|
|
667
|
+
readonly type: 'stripe';
|
|
668
|
+
billing: StripeBillingOperations;
|
|
669
|
+
}
|
|
670
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAC9B,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,UAAU,CAAC;AAEf;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,oBAAoB;IACpB,IAAI,EAAE,sBAAsB,CAAC;IAC7B,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6BAA6B;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D,IAAI,EAAE,YAAY,CAAC;IACnB,sBAAsB;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,2BAA2B;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB;IAClB,WAAW,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;IACvC,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,8DAA8D;IAC9D,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACtD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