@lumeo_hq/openbooks-gateways 0.1.1 → 0.2.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 +11 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/package.json +2 -2
- package/dist/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -5,5 +5,15 @@
|
|
|
5
5
|
`restricted: true`. Detection and proof happen in the Python engine; nothing is re-implemented here.
|
|
6
6
|
|
|
7
7
|
```ts
|
|
8
|
-
import { runFile
|
|
8
|
+
import { runFile } from "@lumeo_hq/openbooks-gateways";
|
|
9
|
+
|
|
10
|
+
const result = await runFile("stripe-balance.csv");
|
|
11
|
+
if (result.kind === "released") {
|
|
12
|
+
console.log(result.document.data.batches, result.document.assertions);
|
|
13
|
+
} else {
|
|
14
|
+
console.warn(result.code, result.message);
|
|
15
|
+
}
|
|
9
16
|
```
|
|
17
|
+
Install Python 3.11+ and `python -m pip install openbooks`. Use `runFiles` for a batch with shared settings or `runJobs` to set currency and date order per export. The gateway layouts include Stripe, Razorpay, PayPal and Wise. Review the payout assertion and use exact decimal values when reconciling with bank credits. PayPal and Wise layouts have synthetic test coverage.
|
|
18
|
+
|
|
19
|
+
[Settlement reconciliation workflow](https://openbooks.lumeo.co.in/docs/payment-settlements)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { type RunOptions, type RunResult } from "@lumeo_hq/openbooks-core";
|
|
2
|
-
export type { RunOptions, RunResult, Released, Refused } from "@lumeo_hq/openbooks-core";
|
|
1
|
+
import { type RunJob, type RunOptions, type RunResult } from "@lumeo_hq/openbooks-core";
|
|
2
|
+
export type { DocumentOptions, RunJob, RunOptions, RunResult, Released, Refused } from "@lumeo_hq/openbooks-core";
|
|
3
3
|
export { isReleased, EngineError } from "@lumeo_hq/openbooks-core";
|
|
4
4
|
/** The layouts this package reads. A file that proves out under any other layout comes back refused (UNKNOWN_LAYOUT). */
|
|
5
5
|
export declare const LAYOUTS: readonly ["stripe_balance.v1", "razorpay_settlement.v1", "paypal_activity.v1", "wise_statement.v1"];
|
|
6
6
|
/** Payment gateway exports: Stripe, Razorpay, PayPal, Wise. PayPal and Wise are experimental. */
|
|
7
7
|
export declare const runFile: (file: string, opts?: RunOptions) => Promise<RunResult>;
|
|
8
8
|
export declare const runFiles: (files: readonly string[], opts?: RunOptions) => Promise<RunResult[]>;
|
|
9
|
+
export declare const runJobs: (jobs: Iterable<RunJob> | AsyncIterable<RunJob>, opts?: RunOptions) => AsyncGenerator<RunResult>;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { runFile as coreRunFile, runFiles as coreRunFiles } from "@lumeo_hq/openbooks-core";
|
|
1
|
+
import { runFile as coreRunFile, runFiles as coreRunFiles, runJobs as coreRunJobs } from "@lumeo_hq/openbooks-core";
|
|
2
2
|
export { isReleased, EngineError } from "@lumeo_hq/openbooks-core";
|
|
3
3
|
/** The layouts this package reads. A file that proves out under any other layout comes back refused (UNKNOWN_LAYOUT). */
|
|
4
4
|
export const LAYOUTS = ["stripe_balance.v1", "razorpay_settlement.v1", "paypal_activity.v1", "wise_statement.v1"];
|
|
5
5
|
/** Payment gateway exports: Stripe, Razorpay, PayPal, Wise. PayPal and Wise are experimental. */
|
|
6
6
|
export const runFile = (file, opts = {}) => coreRunFile(file, { ...opts, accept: LAYOUTS });
|
|
7
7
|
export const runFiles = (files, opts = {}) => coreRunFiles(files, { ...opts, accept: LAYOUTS });
|
|
8
|
+
export const runJobs = (jobs, opts = {}) => (coreRunJobs(jobs, { ...opts, accept: LAYOUTS }));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumeo_hq/openbooks-gateways",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Open Books gateways wrapper: typed access to the Python engine, restricted to the gateways layouts",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
"node": ">=20"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@lumeo_hq/openbooks-core": "0.
|
|
23
|
+
"@lumeo_hq/openbooks-core": "0.2.1"
|
|
24
24
|
}
|
|
25
25
|
}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,QAAQ,IAAI,YAAY,EAAmC,MAAM,iBAAiB,CAAC;AAGpH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE1D,yHAAyH;AACzH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,mBAAmB,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,mBAAmB,CAAU,CAAC;AAE3H,iGAAiG;AACjG,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,OAAmB,EAAE,EAAsB,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AACpI,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAwB,EAAE,OAAmB,EAAE,EAAwB,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC"}
|