@f-o-t/ofx 2.4.2 → 2.4.5
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/dist/extractors.d.ts +10 -0
- package/dist/extractors.d.ts.map +1 -0
- package/dist/generator.d.ts +147 -0
- package/dist/generator.d.ts.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1260 -0
- package/dist/index.js.map +15 -0
- package/dist/parser.d.ts +26 -0
- package/dist/parser.d.ts.map +1 -0
- package/dist/schemas.d.ts +1626 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/stream.d.ts +106 -0
- package/dist/stream.d.ts.map +1 -0
- package/dist/utils.d.ts +18 -0
- package/dist/utils.d.ts.map +1 -0
- package/package.json +34 -33
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { OFXBalance, OFXBankAccount, OFXCreditCardAccount, OFXDocument, OFXSignOnResponse, OFXTransaction } from "./schemas";
|
|
2
|
+
export interface BalanceInfo {
|
|
3
|
+
ledger?: OFXBalance;
|
|
4
|
+
available?: OFXBalance;
|
|
5
|
+
}
|
|
6
|
+
export declare function getTransactions(document: OFXDocument): OFXTransaction[];
|
|
7
|
+
export declare function getAccountInfo(document: OFXDocument): (OFXBankAccount | OFXCreditCardAccount)[];
|
|
8
|
+
export declare function getBalance(document: OFXDocument): BalanceInfo[];
|
|
9
|
+
export declare function getSignOnInfo(document: OFXDocument): OFXSignOnResponse;
|
|
10
|
+
//# sourceMappingURL=extractors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extractors.d.ts","sourceRoot":"","sources":["../src/extractors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACT,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,WAAW,EACX,iBAAiB,EACjB,cAAc,EAChB,MAAM,WAAW,CAAC;AAGnB,MAAM,WAAW,WAAW;IACzB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,SAAS,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,WAAW,GAAG,cAAc,EAAE,CAoBvE;AAED,wBAAgB,cAAc,CAC3B,QAAQ,EAAE,WAAW,GACrB,CAAC,cAAc,GAAG,oBAAoB,CAAC,EAAE,CAoB3C;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,WAAW,GAAG,WAAW,EAAE,CA4B/D;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,WAAW,GAAG,iBAAiB,CAEtE"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const generateHeaderOptionsSchema: z.ZodOptional<z.ZodObject<{
|
|
3
|
+
version: z.ZodOptional<z.ZodString>;
|
|
4
|
+
encoding: z.ZodOptional<z.ZodString>;
|
|
5
|
+
charset: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, z.core.$strip>>;
|
|
7
|
+
export type GenerateHeaderOptions = z.infer<typeof generateHeaderOptionsSchema>;
|
|
8
|
+
export declare function generateHeader(options?: GenerateHeaderOptions): string;
|
|
9
|
+
export declare const generateTransactionInputSchema: z.ZodObject<{
|
|
10
|
+
type: z.ZodEnum<{
|
|
11
|
+
CREDIT: "CREDIT";
|
|
12
|
+
DEBIT: "DEBIT";
|
|
13
|
+
INT: "INT";
|
|
14
|
+
DIV: "DIV";
|
|
15
|
+
FEE: "FEE";
|
|
16
|
+
SRVCHG: "SRVCHG";
|
|
17
|
+
DEP: "DEP";
|
|
18
|
+
ATM: "ATM";
|
|
19
|
+
POS: "POS";
|
|
20
|
+
XFER: "XFER";
|
|
21
|
+
CHECK: "CHECK";
|
|
22
|
+
PAYMENT: "PAYMENT";
|
|
23
|
+
CASH: "CASH";
|
|
24
|
+
DIRECTDEP: "DIRECTDEP";
|
|
25
|
+
DIRECTDEBIT: "DIRECTDEBIT";
|
|
26
|
+
REPEATPMT: "REPEATPMT";
|
|
27
|
+
HOLD: "HOLD";
|
|
28
|
+
OTHER: "OTHER";
|
|
29
|
+
}>;
|
|
30
|
+
datePosted: z.ZodDate;
|
|
31
|
+
amount: z.ZodNumber;
|
|
32
|
+
fitId: z.ZodString;
|
|
33
|
+
name: z.ZodOptional<z.ZodString>;
|
|
34
|
+
memo: z.ZodOptional<z.ZodString>;
|
|
35
|
+
checkNum: z.ZodOptional<z.ZodString>;
|
|
36
|
+
refNum: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export type GenerateTransactionInput = z.infer<typeof generateTransactionInputSchema>;
|
|
39
|
+
export declare const generateBankStatementOptionsSchema: z.ZodObject<{
|
|
40
|
+
bankId: z.ZodString;
|
|
41
|
+
accountId: z.ZodString;
|
|
42
|
+
accountType: z.ZodEnum<{
|
|
43
|
+
CHECKING: "CHECKING";
|
|
44
|
+
SAVINGS: "SAVINGS";
|
|
45
|
+
MONEYMRKT: "MONEYMRKT";
|
|
46
|
+
CREDITLINE: "CREDITLINE";
|
|
47
|
+
CD: "CD";
|
|
48
|
+
}>;
|
|
49
|
+
currency: z.ZodString;
|
|
50
|
+
startDate: z.ZodDate;
|
|
51
|
+
endDate: z.ZodDate;
|
|
52
|
+
transactions: z.ZodArray<z.ZodObject<{
|
|
53
|
+
type: z.ZodEnum<{
|
|
54
|
+
CREDIT: "CREDIT";
|
|
55
|
+
DEBIT: "DEBIT";
|
|
56
|
+
INT: "INT";
|
|
57
|
+
DIV: "DIV";
|
|
58
|
+
FEE: "FEE";
|
|
59
|
+
SRVCHG: "SRVCHG";
|
|
60
|
+
DEP: "DEP";
|
|
61
|
+
ATM: "ATM";
|
|
62
|
+
POS: "POS";
|
|
63
|
+
XFER: "XFER";
|
|
64
|
+
CHECK: "CHECK";
|
|
65
|
+
PAYMENT: "PAYMENT";
|
|
66
|
+
CASH: "CASH";
|
|
67
|
+
DIRECTDEP: "DIRECTDEP";
|
|
68
|
+
DIRECTDEBIT: "DIRECTDEBIT";
|
|
69
|
+
REPEATPMT: "REPEATPMT";
|
|
70
|
+
HOLD: "HOLD";
|
|
71
|
+
OTHER: "OTHER";
|
|
72
|
+
}>;
|
|
73
|
+
datePosted: z.ZodDate;
|
|
74
|
+
amount: z.ZodNumber;
|
|
75
|
+
fitId: z.ZodString;
|
|
76
|
+
name: z.ZodOptional<z.ZodString>;
|
|
77
|
+
memo: z.ZodOptional<z.ZodString>;
|
|
78
|
+
checkNum: z.ZodOptional<z.ZodString>;
|
|
79
|
+
refNum: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
ledgerBalance: z.ZodOptional<z.ZodObject<{
|
|
82
|
+
amount: z.ZodNumber;
|
|
83
|
+
asOfDate: z.ZodDate;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
availableBalance: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
amount: z.ZodNumber;
|
|
87
|
+
asOfDate: z.ZodDate;
|
|
88
|
+
}, z.core.$strip>>;
|
|
89
|
+
financialInstitution: z.ZodOptional<z.ZodObject<{
|
|
90
|
+
org: z.ZodOptional<z.ZodString>;
|
|
91
|
+
fid: z.ZodOptional<z.ZodString>;
|
|
92
|
+
}, z.core.$strip>>;
|
|
93
|
+
language: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
export type GenerateBankStatementOptions = z.infer<typeof generateBankStatementOptionsSchema>;
|
|
96
|
+
export declare function generateBankStatement(options: GenerateBankStatementOptions): string;
|
|
97
|
+
export declare const generateCreditCardStatementOptionsSchema: z.ZodObject<{
|
|
98
|
+
accountId: z.ZodString;
|
|
99
|
+
currency: z.ZodString;
|
|
100
|
+
startDate: z.ZodDate;
|
|
101
|
+
endDate: z.ZodDate;
|
|
102
|
+
transactions: z.ZodArray<z.ZodObject<{
|
|
103
|
+
type: z.ZodEnum<{
|
|
104
|
+
CREDIT: "CREDIT";
|
|
105
|
+
DEBIT: "DEBIT";
|
|
106
|
+
INT: "INT";
|
|
107
|
+
DIV: "DIV";
|
|
108
|
+
FEE: "FEE";
|
|
109
|
+
SRVCHG: "SRVCHG";
|
|
110
|
+
DEP: "DEP";
|
|
111
|
+
ATM: "ATM";
|
|
112
|
+
POS: "POS";
|
|
113
|
+
XFER: "XFER";
|
|
114
|
+
CHECK: "CHECK";
|
|
115
|
+
PAYMENT: "PAYMENT";
|
|
116
|
+
CASH: "CASH";
|
|
117
|
+
DIRECTDEP: "DIRECTDEP";
|
|
118
|
+
DIRECTDEBIT: "DIRECTDEBIT";
|
|
119
|
+
REPEATPMT: "REPEATPMT";
|
|
120
|
+
HOLD: "HOLD";
|
|
121
|
+
OTHER: "OTHER";
|
|
122
|
+
}>;
|
|
123
|
+
datePosted: z.ZodDate;
|
|
124
|
+
amount: z.ZodNumber;
|
|
125
|
+
fitId: z.ZodString;
|
|
126
|
+
name: z.ZodOptional<z.ZodString>;
|
|
127
|
+
memo: z.ZodOptional<z.ZodString>;
|
|
128
|
+
checkNum: z.ZodOptional<z.ZodString>;
|
|
129
|
+
refNum: z.ZodOptional<z.ZodString>;
|
|
130
|
+
}, z.core.$strip>>;
|
|
131
|
+
ledgerBalance: z.ZodOptional<z.ZodObject<{
|
|
132
|
+
amount: z.ZodNumber;
|
|
133
|
+
asOfDate: z.ZodDate;
|
|
134
|
+
}, z.core.$strip>>;
|
|
135
|
+
availableBalance: z.ZodOptional<z.ZodObject<{
|
|
136
|
+
amount: z.ZodNumber;
|
|
137
|
+
asOfDate: z.ZodDate;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
financialInstitution: z.ZodOptional<z.ZodObject<{
|
|
140
|
+
org: z.ZodOptional<z.ZodString>;
|
|
141
|
+
fid: z.ZodOptional<z.ZodString>;
|
|
142
|
+
}, z.core.$strip>>;
|
|
143
|
+
language: z.ZodOptional<z.ZodString>;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
export type GenerateCreditCardStatementOptions = z.infer<typeof generateCreditCardStatementOptionsSchema>;
|
|
146
|
+
export declare function generateCreditCardStatement(options: GenerateCreditCardStatementOptions): string;
|
|
147
|
+
//# sourceMappingURL=generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,2BAA2B;;;;kBAM1B,CAAC;AAEf,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,wBAAgB,cAAc,CAAC,OAAO,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAiBtE;AAED,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBASzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,8BAA8B,CACvC,CAAC;AAsCF,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAY7C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,kCAAkC,CAC3C,CAAC;AAEF,wBAAgB,qBAAqB,CAClC,OAAO,EAAE,4BAA4B,GACrC,MAAM,CAwER;AAED,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUnD,CAAC;AAEH,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,wCAAwC,CACjD,CAAC;AAEF,wBAAgB,2BAA2B,CACxC,OAAO,EAAE,kCAAkC,GAC3C,MAAM,CAsER"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { type BalanceInfo, getAccountInfo, getBalance, getSignOnInfo, getTransactions, } from "./extractors";
|
|
2
|
+
export { type GenerateBankStatementOptions, type GenerateCreditCardStatementOptions, type GenerateHeaderOptions, type GenerateTransactionInput, generateBankStatement, generateBankStatementOptionsSchema, generateCreditCardStatement, generateCreditCardStatementOptionsSchema, generateHeader, generateHeaderOptionsSchema, generateTransactionInputSchema, } from "./generator";
|
|
3
|
+
export { decodeOfxBuffer, getEncodingFromCharset, type ParseResult, parse, parseBuffer, parseBufferOrThrow, parseOrThrow, } from "./parser";
|
|
4
|
+
export type { OFXAccountType, OFXBalance, OFXBankAccount, OFXBankMessageSetResponse, OFXBankStatementResponse, OFXBankStatementTransactionResponse, OFXCreditCardAccount, OFXCreditCardMessageSetResponse, OFXCreditCardStatementResponse, OFXCreditCardStatementTransactionResponse, OFXDate, OFXDocument, OFXFinancialInstitution, OFXHeader, OFXResponse, OFXSignOnMessageSetResponse, OFXSignOnResponse, OFXStatus, OFXTransaction, OFXTransactionList, OFXTransactionType, } from "./schemas";
|
|
5
|
+
export { type BatchFileInput, type BatchParsedFile, type BatchStreamEvent, parseBatchStream, parseBatchStreamToArray, parseStream, parseStreamToArray, type StreamEvent, type StreamOptions, } from "./stream";
|
|
6
|
+
export { formatOfxDate } from "./utils";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACJ,KAAK,WAAW,EAChB,cAAc,EACd,UAAU,EACV,aAAa,EACb,eAAe,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EACJ,KAAK,4BAA4B,EACjC,KAAK,kCAAkC,EACvC,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,qBAAqB,EACrB,kCAAkC,EAClC,2BAA2B,EAC3B,wCAAwC,EACxC,cAAc,EACd,2BAA2B,EAC3B,8BAA8B,GAChC,MAAM,aAAa,CAAC;AACrB,OAAO,EACJ,eAAe,EACf,sBAAsB,EACtB,KAAK,WAAW,EAChB,KAAK,EACL,WAAW,EACX,kBAAkB,EAClB,YAAY,GACd,MAAM,UAAU,CAAC;AAClB,YAAY,EACT,cAAc,EACd,UAAU,EACV,cAAc,EACd,yBAAyB,EACzB,wBAAwB,EACxB,mCAAmC,EACnC,oBAAoB,EACpB,+BAA+B,EAC/B,8BAA8B,EAC9B,yCAAyC,EACzC,OAAO,EACP,WAAW,EACX,uBAAuB,EACvB,SAAS,EACT,WAAW,EACX,2BAA2B,EAC3B,iBAAiB,EACjB,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,kBAAkB,GACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EACJ,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,gBAAgB,EAChB,uBAAuB,EACvB,WAAW,EACX,kBAAkB,EAClB,KAAK,WAAW,EAChB,KAAK,aAAa,GACpB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
|