@develit-services/bank 0.0.44 → 0.1.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/dist/database/schema.cjs +1 -1
- package/dist/database/schema.d.cts +1 -1
- package/dist/database/schema.d.mts +1 -1
- package/dist/database/schema.d.ts +1 -1
- package/dist/database/schema.mjs +1 -1
- package/dist/export/worker.cjs +138 -569
- package/dist/export/worker.d.cts +96 -36
- package/dist/export/worker.d.mts +97 -35
- package/dist/export/worker.d.ts +96 -36
- package/dist/export/worker.mjs +130 -558
- package/dist/export/workflows.cjs +21 -0
- package/dist/export/workflows.d.cts +2 -0
- package/dist/export/workflows.d.mts +2 -0
- package/dist/export/workflows.d.ts +2 -0
- package/dist/export/workflows.mjs +15 -0
- package/dist/export/wrangler.cjs +7 -0
- package/dist/export/wrangler.d.cts +5 -0
- package/dist/export/wrangler.d.mts +5 -0
- package/dist/export/wrangler.d.ts +5 -0
- package/dist/export/wrangler.mjs +7 -0
- package/dist/shared/{bank.6WoCPIFy.mjs → bank.8lAQLFNI.mjs} +1 -1
- package/dist/shared/{bank.0KTS9nMz.d.ts → bank.BQSnGZ-3.d.cts} +33 -80
- package/dist/shared/bank.CH22Zrdv.d.cts +20 -0
- package/dist/shared/bank.CH22Zrdv.d.mts +20 -0
- package/dist/shared/bank.CH22Zrdv.d.ts +20 -0
- package/dist/shared/{bank.DmzkJQVU.d.cts → bank.CouYVuOf.d.ts} +33 -80
- package/dist/shared/{bank.BPcrbUBa.cjs → bank.DISsqBb6.cjs} +1 -1
- package/dist/shared/bank.DJ9d1yaR.mjs +269 -0
- package/dist/shared/bank.DOJ8gbXQ.cjs +278 -0
- package/dist/shared/{bank.NTyp2XAv.d.mts → bank.DW3cHO1u.d.mts} +33 -80
- package/dist/shared/{bank.BWcFhTu1.mjs → bank.RUV2HUFo.mjs} +11 -11
- package/dist/shared/{bank.BVzOzXdX.cjs → bank.UfRkUN2y.cjs} +11 -11
- package/dist/shared/{bank.CCilUVCi.d.ts → bank.mub5_S4r.d.cts} +4 -21
- package/dist/shared/{bank.CCilUVCi.d.cts → bank.mub5_S4r.d.mts} +4 -21
- package/dist/shared/{bank.CCilUVCi.d.mts → bank.mub5_S4r.d.ts} +4 -21
- package/dist/types.cjs +2 -2
- package/dist/types.d.cts +16 -9
- package/dist/types.d.mts +16 -9
- package/dist/types.d.ts +16 -9
- package/dist/types.mjs +2 -2
- package/package.json +6 -1
package/dist/export/worker.d.cts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
export { w as BankWorkflows } from '../shared/bank.CH22Zrdv.cjs';
|
|
1
2
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
|
-
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
+
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
4
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
5
|
-
import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.
|
|
6
|
-
import { A as AccountSelectType, C as ConfigEnvironmentBank, I as IBankConnector, a as ConnectorKey } from '../shared/bank.
|
|
6
|
+
import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.mub5_S4r.cjs';
|
|
7
|
+
import { A as AccountSelectType, C as ConfigEnvironmentBank, I as IBankConnector, a as ConnectorKey } from '../shared/bank.BQSnGZ-3.cjs';
|
|
7
8
|
import { z } from 'zod';
|
|
8
9
|
import * as drizzle_zod from 'drizzle-zod';
|
|
9
10
|
import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
@@ -1526,9 +1527,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
1526
1527
|
limit: z.ZodNumber;
|
|
1527
1528
|
sort: z.ZodObject<{
|
|
1528
1529
|
column: z.ZodEnum<{
|
|
1530
|
+
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
1529
1531
|
createdAt: "createdAt";
|
|
1530
1532
|
updatedAt: "updatedAt";
|
|
1531
|
-
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
1532
1533
|
}>;
|
|
1533
1534
|
direction: z.ZodEnum<{
|
|
1534
1535
|
asc: "asc";
|
|
@@ -1734,9 +1735,77 @@ type GetPaymentsOutput = {
|
|
|
1734
1735
|
declare const syncAccountInputSchema: z.ZodObject<{
|
|
1735
1736
|
accountId: z.ZodUUID;
|
|
1736
1737
|
}, z.core.$strip>;
|
|
1738
|
+
declare const syncAccountOutputSchema: z.ZodObject<{
|
|
1739
|
+
instanceId: z.ZodString;
|
|
1740
|
+
details: z.ZodObject<{
|
|
1741
|
+
status: z.ZodEnum<{
|
|
1742
|
+
unknown: "unknown";
|
|
1743
|
+
queued: "queued";
|
|
1744
|
+
running: "running";
|
|
1745
|
+
paused: "paused";
|
|
1746
|
+
errored: "errored";
|
|
1747
|
+
terminated: "terminated";
|
|
1748
|
+
complete: "complete";
|
|
1749
|
+
waiting: "waiting";
|
|
1750
|
+
waitingForPause: "waitingForPause";
|
|
1751
|
+
}>;
|
|
1752
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1753
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
1754
|
+
}, z.core.$strip>;
|
|
1755
|
+
}, z.core.$strip>;
|
|
1737
1756
|
interface SyncAccountInput extends z.infer<typeof syncAccountInputSchema> {
|
|
1738
1757
|
}
|
|
1739
|
-
type SyncAccountOutput =
|
|
1758
|
+
type SyncAccountOutput = z.infer<typeof syncAccountOutputSchema>;
|
|
1759
|
+
|
|
1760
|
+
declare const syncAccountStatusInputSchema: z.ZodObject<{
|
|
1761
|
+
accountId: z.ZodUUID;
|
|
1762
|
+
}, z.core.$strip>;
|
|
1763
|
+
declare const syncAccountStatusOutputSchema: z.ZodObject<{
|
|
1764
|
+
instanceId: z.ZodString;
|
|
1765
|
+
details: z.ZodObject<{
|
|
1766
|
+
status: z.ZodEnum<{
|
|
1767
|
+
unknown: "unknown";
|
|
1768
|
+
queued: "queued";
|
|
1769
|
+
running: "running";
|
|
1770
|
+
paused: "paused";
|
|
1771
|
+
errored: "errored";
|
|
1772
|
+
terminated: "terminated";
|
|
1773
|
+
complete: "complete";
|
|
1774
|
+
waiting: "waiting";
|
|
1775
|
+
waitingForPause: "waitingForPause";
|
|
1776
|
+
}>;
|
|
1777
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1778
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
1779
|
+
}, z.core.$strip>;
|
|
1780
|
+
}, z.core.$strip>;
|
|
1781
|
+
interface SyncAccountStatusInput extends z.infer<typeof syncAccountStatusInputSchema> {
|
|
1782
|
+
}
|
|
1783
|
+
type SyncAccountStatusOutput = z.infer<typeof syncAccountStatusOutputSchema>;
|
|
1784
|
+
|
|
1785
|
+
declare const syncAccountRestartInputSchema: z.ZodObject<{
|
|
1786
|
+
accountId: z.ZodUUID;
|
|
1787
|
+
}, z.core.$strip>;
|
|
1788
|
+
declare const syncAccountRestartOutputSchema: z.ZodObject<{
|
|
1789
|
+
instanceId: z.ZodString;
|
|
1790
|
+
details: z.ZodObject<{
|
|
1791
|
+
status: z.ZodEnum<{
|
|
1792
|
+
unknown: "unknown";
|
|
1793
|
+
queued: "queued";
|
|
1794
|
+
running: "running";
|
|
1795
|
+
paused: "paused";
|
|
1796
|
+
errored: "errored";
|
|
1797
|
+
terminated: "terminated";
|
|
1798
|
+
complete: "complete";
|
|
1799
|
+
waiting: "waiting";
|
|
1800
|
+
waitingForPause: "waitingForPause";
|
|
1801
|
+
}>;
|
|
1802
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1803
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
1804
|
+
}, z.core.$strip>;
|
|
1805
|
+
}, z.core.$strip>;
|
|
1806
|
+
interface SyncAccountRestartInput extends z.infer<typeof syncAccountRestartInputSchema> {
|
|
1807
|
+
}
|
|
1808
|
+
type SyncAccountRestartOutput = z.infer<typeof syncAccountRestartOutputSchema>;
|
|
1740
1809
|
|
|
1741
1810
|
declare const updateAccountInputSchema: z.ZodObject<{
|
|
1742
1811
|
account: drizzle_zod.BuildSchema<"insert", {
|
|
@@ -1816,32 +1885,15 @@ declare const updateAccountInputSchema: z.ZodObject<{
|
|
|
1816
1885
|
identity: undefined;
|
|
1817
1886
|
generated: undefined;
|
|
1818
1887
|
}, {}, {}>;
|
|
1819
|
-
|
|
1820
|
-
name: "
|
|
1821
|
-
tableName: "account";
|
|
1822
|
-
dataType: "boolean";
|
|
1823
|
-
columnType: "SQLiteBoolean";
|
|
1824
|
-
data: boolean;
|
|
1825
|
-
driverParam: number;
|
|
1826
|
-
notNull: true;
|
|
1827
|
-
hasDefault: true;
|
|
1828
|
-
isPrimaryKey: false;
|
|
1829
|
-
isAutoincrement: false;
|
|
1830
|
-
hasRuntimeDefault: false;
|
|
1831
|
-
enumValues: undefined;
|
|
1832
|
-
baseColumn: never;
|
|
1833
|
-
identity: undefined;
|
|
1834
|
-
generated: undefined;
|
|
1835
|
-
}, {}, {}>;
|
|
1836
|
-
syncPeriod: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1837
|
-
name: "sync_period";
|
|
1888
|
+
syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1889
|
+
name: "sync_interval_s";
|
|
1838
1890
|
tableName: "account";
|
|
1839
1891
|
dataType: "number";
|
|
1840
1892
|
columnType: "SQLiteInteger";
|
|
1841
1893
|
data: number;
|
|
1842
1894
|
driverParam: number;
|
|
1843
|
-
notNull:
|
|
1844
|
-
hasDefault:
|
|
1895
|
+
notNull: true;
|
|
1896
|
+
hasDefault: true;
|
|
1845
1897
|
isPrimaryKey: false;
|
|
1846
1898
|
isAutoincrement: false;
|
|
1847
1899
|
hasRuntimeDefault: false;
|
|
@@ -2208,6 +2260,17 @@ declare const updateAccountInputSchema: z.ZodObject<{
|
|
|
2208
2260
|
type UpdateAccountInput = z.infer<typeof updateAccountInputSchema>;
|
|
2209
2261
|
type UpdateAccountOutput = AccountSelectType;
|
|
2210
2262
|
|
|
2263
|
+
type AccountWithWorkflow = AccountSelectType & {
|
|
2264
|
+
workflow: {
|
|
2265
|
+
instanceId: string;
|
|
2266
|
+
details: WorkflowInstanceStatus;
|
|
2267
|
+
} | null;
|
|
2268
|
+
};
|
|
2269
|
+
type GetAccountsOutput = {
|
|
2270
|
+
accounts: AccountWithWorkflow[];
|
|
2271
|
+
totalCount: number;
|
|
2272
|
+
};
|
|
2273
|
+
|
|
2211
2274
|
declare const BankServiceBase_base: (abstract new (ctx: ExecutionContext, env: BankEnv) => WorkerEntrypoint<BankEnv, {}>) & (abstract new (...args: any[]) => _develit_io_backend_sdk.DevelitWorkerMethods);
|
|
2212
2275
|
declare class BankServiceBase extends BankServiceBase_base {
|
|
2213
2276
|
readonly db: DrizzleD1Database<typeof tables>;
|
|
@@ -2220,8 +2283,7 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2220
2283
|
status: "AUTHORIZED" | "DISABLED" | "EXPIRED";
|
|
2221
2284
|
bankRefId: string;
|
|
2222
2285
|
batchSizeLimit: number;
|
|
2223
|
-
|
|
2224
|
-
syncPeriod: number | null;
|
|
2286
|
+
syncIntervalS: number;
|
|
2225
2287
|
lastSyncedAt: Date | null;
|
|
2226
2288
|
holderName: string;
|
|
2227
2289
|
number: string | null;
|
|
@@ -2250,6 +2312,8 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2250
2312
|
_accountFetchInterval(connectorKey: ConnectorKey): number;
|
|
2251
2313
|
getPayments(input: GetPaymentsInput): Promise<IRPCResponse<GetPaymentsOutput>>;
|
|
2252
2314
|
syncAccount(input: SyncAccountInput): Promise<IRPCResponse<SyncAccountOutput>>;
|
|
2315
|
+
syncAccountStatus(input: SyncAccountStatusInput): Promise<IRPCResponse<SyncAccountStatusOutput>>;
|
|
2316
|
+
syncAccountRestart(input: SyncAccountRestartInput): Promise<IRPCResponse<SyncAccountRestartOutput>>;
|
|
2253
2317
|
syncAccounts(options?: {
|
|
2254
2318
|
accounts?: AccountSelectType[];
|
|
2255
2319
|
}): Promise<IRPCResponse<void>>;
|
|
@@ -2258,13 +2322,13 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2258
2322
|
addPaymentsToBatch({ paymentsToBatch, }: {
|
|
2259
2323
|
paymentsToBatch: SendPaymentInput[];
|
|
2260
2324
|
}): Promise<IRPCResponse<{
|
|
2325
|
+
batchPaymentInitiatedAt: Date | null;
|
|
2326
|
+
authorizationUrls: string | string[] | null;
|
|
2327
|
+
status: "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "WAITING_FOR_PROCESSING" | "PREPARED" | "COMPLETED" | "FAILED" | null;
|
|
2261
2328
|
id: string;
|
|
2262
2329
|
createdAt: Date | null;
|
|
2263
2330
|
updatedAt: Date | null;
|
|
2264
2331
|
deletedAt: Date | null;
|
|
2265
|
-
batchPaymentInitiatedAt: Date | null;
|
|
2266
|
-
authorizationUrls: string | string[] | null;
|
|
2267
|
-
status: "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "WAITING_FOR_PROCESSING" | "PREPARED" | "COMPLETED" | "FAILED" | null;
|
|
2268
2332
|
accountId: string | null;
|
|
2269
2333
|
payments: PaymentInsertType[];
|
|
2270
2334
|
metadata: object | null;
|
|
@@ -2276,7 +2340,7 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2276
2340
|
simulateDeposit(input: SimulateDepositInput): Promise<IRPCResponse<SimulateDepositOutput>>;
|
|
2277
2341
|
setLastSyncAt(input: SetLastSyncAtInput): Promise<IRPCResponse<SetLastSyncAtOutput>>;
|
|
2278
2342
|
sendPayment(input: SendPaymentInput): Promise<IRPCResponse<SendPaymentOutput>>;
|
|
2279
|
-
getBankAccounts(): Promise<IRPCResponse<
|
|
2343
|
+
getBankAccounts(): Promise<IRPCResponse<GetAccountsOutput>>;
|
|
2280
2344
|
updateAccount(input: UpdateAccountInput): Promise<IRPCResponse<UpdateAccountOutput>>;
|
|
2281
2345
|
getBatches(input: GetBatchesInput): Promise<IRPCResponse<GetBatchesOutput>>;
|
|
2282
2346
|
}
|
|
@@ -2284,8 +2348,4 @@ declare function defineBankService({ config, }: {
|
|
|
2284
2348
|
config: ConfigEnvironmentBank;
|
|
2285
2349
|
}): new (ctx: ExecutionContext, env: BankEnv) => BankServiceBase;
|
|
2286
2350
|
|
|
2287
|
-
declare const _default: new (ctx: ExecutionContext, env: BankEnv) => WorkerEntrypoint<BankEnv>;
|
|
2288
|
-
|
|
2289
|
-
// @ts-ignore
|
|
2290
|
-
export = _default;
|
|
2291
2351
|
export { defineBankService };
|
package/dist/export/worker.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
export { w as BankWorkflows } from '../shared/bank.CH22Zrdv.mjs';
|
|
1
2
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
|
-
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
+
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
4
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
5
|
-
import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.
|
|
6
|
-
import { A as AccountSelectType, C as ConfigEnvironmentBank, I as IBankConnector, a as ConnectorKey } from '../shared/bank.
|
|
6
|
+
import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.mub5_S4r.mjs';
|
|
7
|
+
import { A as AccountSelectType, C as ConfigEnvironmentBank, I as IBankConnector, a as ConnectorKey } from '../shared/bank.DW3cHO1u.mjs';
|
|
7
8
|
import { z } from 'zod';
|
|
8
9
|
import * as drizzle_zod from 'drizzle-zod';
|
|
9
10
|
import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
@@ -1526,9 +1527,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
1526
1527
|
limit: z.ZodNumber;
|
|
1527
1528
|
sort: z.ZodObject<{
|
|
1528
1529
|
column: z.ZodEnum<{
|
|
1530
|
+
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
1529
1531
|
createdAt: "createdAt";
|
|
1530
1532
|
updatedAt: "updatedAt";
|
|
1531
|
-
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
1532
1533
|
}>;
|
|
1533
1534
|
direction: z.ZodEnum<{
|
|
1534
1535
|
asc: "asc";
|
|
@@ -1734,9 +1735,77 @@ type GetPaymentsOutput = {
|
|
|
1734
1735
|
declare const syncAccountInputSchema: z.ZodObject<{
|
|
1735
1736
|
accountId: z.ZodUUID;
|
|
1736
1737
|
}, z.core.$strip>;
|
|
1738
|
+
declare const syncAccountOutputSchema: z.ZodObject<{
|
|
1739
|
+
instanceId: z.ZodString;
|
|
1740
|
+
details: z.ZodObject<{
|
|
1741
|
+
status: z.ZodEnum<{
|
|
1742
|
+
unknown: "unknown";
|
|
1743
|
+
queued: "queued";
|
|
1744
|
+
running: "running";
|
|
1745
|
+
paused: "paused";
|
|
1746
|
+
errored: "errored";
|
|
1747
|
+
terminated: "terminated";
|
|
1748
|
+
complete: "complete";
|
|
1749
|
+
waiting: "waiting";
|
|
1750
|
+
waitingForPause: "waitingForPause";
|
|
1751
|
+
}>;
|
|
1752
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1753
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
1754
|
+
}, z.core.$strip>;
|
|
1755
|
+
}, z.core.$strip>;
|
|
1737
1756
|
interface SyncAccountInput extends z.infer<typeof syncAccountInputSchema> {
|
|
1738
1757
|
}
|
|
1739
|
-
type SyncAccountOutput =
|
|
1758
|
+
type SyncAccountOutput = z.infer<typeof syncAccountOutputSchema>;
|
|
1759
|
+
|
|
1760
|
+
declare const syncAccountStatusInputSchema: z.ZodObject<{
|
|
1761
|
+
accountId: z.ZodUUID;
|
|
1762
|
+
}, z.core.$strip>;
|
|
1763
|
+
declare const syncAccountStatusOutputSchema: z.ZodObject<{
|
|
1764
|
+
instanceId: z.ZodString;
|
|
1765
|
+
details: z.ZodObject<{
|
|
1766
|
+
status: z.ZodEnum<{
|
|
1767
|
+
unknown: "unknown";
|
|
1768
|
+
queued: "queued";
|
|
1769
|
+
running: "running";
|
|
1770
|
+
paused: "paused";
|
|
1771
|
+
errored: "errored";
|
|
1772
|
+
terminated: "terminated";
|
|
1773
|
+
complete: "complete";
|
|
1774
|
+
waiting: "waiting";
|
|
1775
|
+
waitingForPause: "waitingForPause";
|
|
1776
|
+
}>;
|
|
1777
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1778
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
1779
|
+
}, z.core.$strip>;
|
|
1780
|
+
}, z.core.$strip>;
|
|
1781
|
+
interface SyncAccountStatusInput extends z.infer<typeof syncAccountStatusInputSchema> {
|
|
1782
|
+
}
|
|
1783
|
+
type SyncAccountStatusOutput = z.infer<typeof syncAccountStatusOutputSchema>;
|
|
1784
|
+
|
|
1785
|
+
declare const syncAccountRestartInputSchema: z.ZodObject<{
|
|
1786
|
+
accountId: z.ZodUUID;
|
|
1787
|
+
}, z.core.$strip>;
|
|
1788
|
+
declare const syncAccountRestartOutputSchema: z.ZodObject<{
|
|
1789
|
+
instanceId: z.ZodString;
|
|
1790
|
+
details: z.ZodObject<{
|
|
1791
|
+
status: z.ZodEnum<{
|
|
1792
|
+
unknown: "unknown";
|
|
1793
|
+
queued: "queued";
|
|
1794
|
+
running: "running";
|
|
1795
|
+
paused: "paused";
|
|
1796
|
+
errored: "errored";
|
|
1797
|
+
terminated: "terminated";
|
|
1798
|
+
complete: "complete";
|
|
1799
|
+
waiting: "waiting";
|
|
1800
|
+
waitingForPause: "waitingForPause";
|
|
1801
|
+
}>;
|
|
1802
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1803
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
1804
|
+
}, z.core.$strip>;
|
|
1805
|
+
}, z.core.$strip>;
|
|
1806
|
+
interface SyncAccountRestartInput extends z.infer<typeof syncAccountRestartInputSchema> {
|
|
1807
|
+
}
|
|
1808
|
+
type SyncAccountRestartOutput = z.infer<typeof syncAccountRestartOutputSchema>;
|
|
1740
1809
|
|
|
1741
1810
|
declare const updateAccountInputSchema: z.ZodObject<{
|
|
1742
1811
|
account: drizzle_zod.BuildSchema<"insert", {
|
|
@@ -1816,32 +1885,15 @@ declare const updateAccountInputSchema: z.ZodObject<{
|
|
|
1816
1885
|
identity: undefined;
|
|
1817
1886
|
generated: undefined;
|
|
1818
1887
|
}, {}, {}>;
|
|
1819
|
-
|
|
1820
|
-
name: "
|
|
1821
|
-
tableName: "account";
|
|
1822
|
-
dataType: "boolean";
|
|
1823
|
-
columnType: "SQLiteBoolean";
|
|
1824
|
-
data: boolean;
|
|
1825
|
-
driverParam: number;
|
|
1826
|
-
notNull: true;
|
|
1827
|
-
hasDefault: true;
|
|
1828
|
-
isPrimaryKey: false;
|
|
1829
|
-
isAutoincrement: false;
|
|
1830
|
-
hasRuntimeDefault: false;
|
|
1831
|
-
enumValues: undefined;
|
|
1832
|
-
baseColumn: never;
|
|
1833
|
-
identity: undefined;
|
|
1834
|
-
generated: undefined;
|
|
1835
|
-
}, {}, {}>;
|
|
1836
|
-
syncPeriod: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1837
|
-
name: "sync_period";
|
|
1888
|
+
syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1889
|
+
name: "sync_interval_s";
|
|
1838
1890
|
tableName: "account";
|
|
1839
1891
|
dataType: "number";
|
|
1840
1892
|
columnType: "SQLiteInteger";
|
|
1841
1893
|
data: number;
|
|
1842
1894
|
driverParam: number;
|
|
1843
|
-
notNull:
|
|
1844
|
-
hasDefault:
|
|
1895
|
+
notNull: true;
|
|
1896
|
+
hasDefault: true;
|
|
1845
1897
|
isPrimaryKey: false;
|
|
1846
1898
|
isAutoincrement: false;
|
|
1847
1899
|
hasRuntimeDefault: false;
|
|
@@ -2208,6 +2260,17 @@ declare const updateAccountInputSchema: z.ZodObject<{
|
|
|
2208
2260
|
type UpdateAccountInput = z.infer<typeof updateAccountInputSchema>;
|
|
2209
2261
|
type UpdateAccountOutput = AccountSelectType;
|
|
2210
2262
|
|
|
2263
|
+
type AccountWithWorkflow = AccountSelectType & {
|
|
2264
|
+
workflow: {
|
|
2265
|
+
instanceId: string;
|
|
2266
|
+
details: WorkflowInstanceStatus;
|
|
2267
|
+
} | null;
|
|
2268
|
+
};
|
|
2269
|
+
type GetAccountsOutput = {
|
|
2270
|
+
accounts: AccountWithWorkflow[];
|
|
2271
|
+
totalCount: number;
|
|
2272
|
+
};
|
|
2273
|
+
|
|
2211
2274
|
declare const BankServiceBase_base: (abstract new (ctx: ExecutionContext, env: BankEnv) => WorkerEntrypoint<BankEnv, {}>) & (abstract new (...args: any[]) => _develit_io_backend_sdk.DevelitWorkerMethods);
|
|
2212
2275
|
declare class BankServiceBase extends BankServiceBase_base {
|
|
2213
2276
|
readonly db: DrizzleD1Database<typeof tables>;
|
|
@@ -2220,8 +2283,7 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2220
2283
|
status: "AUTHORIZED" | "DISABLED" | "EXPIRED";
|
|
2221
2284
|
bankRefId: string;
|
|
2222
2285
|
batchSizeLimit: number;
|
|
2223
|
-
|
|
2224
|
-
syncPeriod: number | null;
|
|
2286
|
+
syncIntervalS: number;
|
|
2225
2287
|
lastSyncedAt: Date | null;
|
|
2226
2288
|
holderName: string;
|
|
2227
2289
|
number: string | null;
|
|
@@ -2250,6 +2312,8 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2250
2312
|
_accountFetchInterval(connectorKey: ConnectorKey): number;
|
|
2251
2313
|
getPayments(input: GetPaymentsInput): Promise<IRPCResponse<GetPaymentsOutput>>;
|
|
2252
2314
|
syncAccount(input: SyncAccountInput): Promise<IRPCResponse<SyncAccountOutput>>;
|
|
2315
|
+
syncAccountStatus(input: SyncAccountStatusInput): Promise<IRPCResponse<SyncAccountStatusOutput>>;
|
|
2316
|
+
syncAccountRestart(input: SyncAccountRestartInput): Promise<IRPCResponse<SyncAccountRestartOutput>>;
|
|
2253
2317
|
syncAccounts(options?: {
|
|
2254
2318
|
accounts?: AccountSelectType[];
|
|
2255
2319
|
}): Promise<IRPCResponse<void>>;
|
|
@@ -2258,13 +2322,13 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2258
2322
|
addPaymentsToBatch({ paymentsToBatch, }: {
|
|
2259
2323
|
paymentsToBatch: SendPaymentInput[];
|
|
2260
2324
|
}): Promise<IRPCResponse<{
|
|
2325
|
+
batchPaymentInitiatedAt: Date | null;
|
|
2326
|
+
authorizationUrls: string | string[] | null;
|
|
2327
|
+
status: "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "WAITING_FOR_PROCESSING" | "PREPARED" | "COMPLETED" | "FAILED" | null;
|
|
2261
2328
|
id: string;
|
|
2262
2329
|
createdAt: Date | null;
|
|
2263
2330
|
updatedAt: Date | null;
|
|
2264
2331
|
deletedAt: Date | null;
|
|
2265
|
-
batchPaymentInitiatedAt: Date | null;
|
|
2266
|
-
authorizationUrls: string | string[] | null;
|
|
2267
|
-
status: "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "WAITING_FOR_PROCESSING" | "PREPARED" | "COMPLETED" | "FAILED" | null;
|
|
2268
2332
|
accountId: string | null;
|
|
2269
2333
|
payments: PaymentInsertType[];
|
|
2270
2334
|
metadata: object | null;
|
|
@@ -2276,7 +2340,7 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2276
2340
|
simulateDeposit(input: SimulateDepositInput): Promise<IRPCResponse<SimulateDepositOutput>>;
|
|
2277
2341
|
setLastSyncAt(input: SetLastSyncAtInput): Promise<IRPCResponse<SetLastSyncAtOutput>>;
|
|
2278
2342
|
sendPayment(input: SendPaymentInput): Promise<IRPCResponse<SendPaymentOutput>>;
|
|
2279
|
-
getBankAccounts(): Promise<IRPCResponse<
|
|
2343
|
+
getBankAccounts(): Promise<IRPCResponse<GetAccountsOutput>>;
|
|
2280
2344
|
updateAccount(input: UpdateAccountInput): Promise<IRPCResponse<UpdateAccountOutput>>;
|
|
2281
2345
|
getBatches(input: GetBatchesInput): Promise<IRPCResponse<GetBatchesOutput>>;
|
|
2282
2346
|
}
|
|
@@ -2284,6 +2348,4 @@ declare function defineBankService({ config, }: {
|
|
|
2284
2348
|
config: ConfigEnvironmentBank;
|
|
2285
2349
|
}): new (ctx: ExecutionContext, env: BankEnv) => BankServiceBase;
|
|
2286
2350
|
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
export { _default as default, defineBankService };
|
|
2351
|
+
export { defineBankService };
|
package/dist/export/worker.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
export { w as BankWorkflows } from '../shared/bank.CH22Zrdv.js';
|
|
1
2
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
2
|
-
import { IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
|
+
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
3
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
4
5
|
import { DrizzleD1Database } from 'drizzle-orm/d1';
|
|
5
|
-
import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.
|
|
6
|
-
import { A as AccountSelectType, C as ConfigEnvironmentBank, I as IBankConnector, a as ConnectorKey } from '../shared/bank.
|
|
6
|
+
import { P as PaymentSelectType, B as BatchSelectType, t as tables, a as PaymentInsertType } from '../shared/bank.mub5_S4r.js';
|
|
7
|
+
import { A as AccountSelectType, C as ConfigEnvironmentBank, I as IBankConnector, a as ConnectorKey } from '../shared/bank.CouYVuOf.js';
|
|
7
8
|
import { z } from 'zod';
|
|
8
9
|
import * as drizzle_zod from 'drizzle-zod';
|
|
9
10
|
import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
@@ -1526,9 +1527,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
1526
1527
|
limit: z.ZodNumber;
|
|
1527
1528
|
sort: z.ZodObject<{
|
|
1528
1529
|
column: z.ZodEnum<{
|
|
1530
|
+
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
1529
1531
|
createdAt: "createdAt";
|
|
1530
1532
|
updatedAt: "updatedAt";
|
|
1531
|
-
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
1532
1533
|
}>;
|
|
1533
1534
|
direction: z.ZodEnum<{
|
|
1534
1535
|
asc: "asc";
|
|
@@ -1734,9 +1735,77 @@ type GetPaymentsOutput = {
|
|
|
1734
1735
|
declare const syncAccountInputSchema: z.ZodObject<{
|
|
1735
1736
|
accountId: z.ZodUUID;
|
|
1736
1737
|
}, z.core.$strip>;
|
|
1738
|
+
declare const syncAccountOutputSchema: z.ZodObject<{
|
|
1739
|
+
instanceId: z.ZodString;
|
|
1740
|
+
details: z.ZodObject<{
|
|
1741
|
+
status: z.ZodEnum<{
|
|
1742
|
+
unknown: "unknown";
|
|
1743
|
+
queued: "queued";
|
|
1744
|
+
running: "running";
|
|
1745
|
+
paused: "paused";
|
|
1746
|
+
errored: "errored";
|
|
1747
|
+
terminated: "terminated";
|
|
1748
|
+
complete: "complete";
|
|
1749
|
+
waiting: "waiting";
|
|
1750
|
+
waitingForPause: "waitingForPause";
|
|
1751
|
+
}>;
|
|
1752
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1753
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
1754
|
+
}, z.core.$strip>;
|
|
1755
|
+
}, z.core.$strip>;
|
|
1737
1756
|
interface SyncAccountInput extends z.infer<typeof syncAccountInputSchema> {
|
|
1738
1757
|
}
|
|
1739
|
-
type SyncAccountOutput =
|
|
1758
|
+
type SyncAccountOutput = z.infer<typeof syncAccountOutputSchema>;
|
|
1759
|
+
|
|
1760
|
+
declare const syncAccountStatusInputSchema: z.ZodObject<{
|
|
1761
|
+
accountId: z.ZodUUID;
|
|
1762
|
+
}, z.core.$strip>;
|
|
1763
|
+
declare const syncAccountStatusOutputSchema: z.ZodObject<{
|
|
1764
|
+
instanceId: z.ZodString;
|
|
1765
|
+
details: z.ZodObject<{
|
|
1766
|
+
status: z.ZodEnum<{
|
|
1767
|
+
unknown: "unknown";
|
|
1768
|
+
queued: "queued";
|
|
1769
|
+
running: "running";
|
|
1770
|
+
paused: "paused";
|
|
1771
|
+
errored: "errored";
|
|
1772
|
+
terminated: "terminated";
|
|
1773
|
+
complete: "complete";
|
|
1774
|
+
waiting: "waiting";
|
|
1775
|
+
waitingForPause: "waitingForPause";
|
|
1776
|
+
}>;
|
|
1777
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1778
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
1779
|
+
}, z.core.$strip>;
|
|
1780
|
+
}, z.core.$strip>;
|
|
1781
|
+
interface SyncAccountStatusInput extends z.infer<typeof syncAccountStatusInputSchema> {
|
|
1782
|
+
}
|
|
1783
|
+
type SyncAccountStatusOutput = z.infer<typeof syncAccountStatusOutputSchema>;
|
|
1784
|
+
|
|
1785
|
+
declare const syncAccountRestartInputSchema: z.ZodObject<{
|
|
1786
|
+
accountId: z.ZodUUID;
|
|
1787
|
+
}, z.core.$strip>;
|
|
1788
|
+
declare const syncAccountRestartOutputSchema: z.ZodObject<{
|
|
1789
|
+
instanceId: z.ZodString;
|
|
1790
|
+
details: z.ZodObject<{
|
|
1791
|
+
status: z.ZodEnum<{
|
|
1792
|
+
unknown: "unknown";
|
|
1793
|
+
queued: "queued";
|
|
1794
|
+
running: "running";
|
|
1795
|
+
paused: "paused";
|
|
1796
|
+
errored: "errored";
|
|
1797
|
+
terminated: "terminated";
|
|
1798
|
+
complete: "complete";
|
|
1799
|
+
waiting: "waiting";
|
|
1800
|
+
waitingForPause: "waitingForPause";
|
|
1801
|
+
}>;
|
|
1802
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1803
|
+
output: z.ZodOptional<z.ZodUnknown>;
|
|
1804
|
+
}, z.core.$strip>;
|
|
1805
|
+
}, z.core.$strip>;
|
|
1806
|
+
interface SyncAccountRestartInput extends z.infer<typeof syncAccountRestartInputSchema> {
|
|
1807
|
+
}
|
|
1808
|
+
type SyncAccountRestartOutput = z.infer<typeof syncAccountRestartOutputSchema>;
|
|
1740
1809
|
|
|
1741
1810
|
declare const updateAccountInputSchema: z.ZodObject<{
|
|
1742
1811
|
account: drizzle_zod.BuildSchema<"insert", {
|
|
@@ -1816,32 +1885,15 @@ declare const updateAccountInputSchema: z.ZodObject<{
|
|
|
1816
1885
|
identity: undefined;
|
|
1817
1886
|
generated: undefined;
|
|
1818
1887
|
}, {}, {}>;
|
|
1819
|
-
|
|
1820
|
-
name: "
|
|
1821
|
-
tableName: "account";
|
|
1822
|
-
dataType: "boolean";
|
|
1823
|
-
columnType: "SQLiteBoolean";
|
|
1824
|
-
data: boolean;
|
|
1825
|
-
driverParam: number;
|
|
1826
|
-
notNull: true;
|
|
1827
|
-
hasDefault: true;
|
|
1828
|
-
isPrimaryKey: false;
|
|
1829
|
-
isAutoincrement: false;
|
|
1830
|
-
hasRuntimeDefault: false;
|
|
1831
|
-
enumValues: undefined;
|
|
1832
|
-
baseColumn: never;
|
|
1833
|
-
identity: undefined;
|
|
1834
|
-
generated: undefined;
|
|
1835
|
-
}, {}, {}>;
|
|
1836
|
-
syncPeriod: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1837
|
-
name: "sync_period";
|
|
1888
|
+
syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1889
|
+
name: "sync_interval_s";
|
|
1838
1890
|
tableName: "account";
|
|
1839
1891
|
dataType: "number";
|
|
1840
1892
|
columnType: "SQLiteInteger";
|
|
1841
1893
|
data: number;
|
|
1842
1894
|
driverParam: number;
|
|
1843
|
-
notNull:
|
|
1844
|
-
hasDefault:
|
|
1895
|
+
notNull: true;
|
|
1896
|
+
hasDefault: true;
|
|
1845
1897
|
isPrimaryKey: false;
|
|
1846
1898
|
isAutoincrement: false;
|
|
1847
1899
|
hasRuntimeDefault: false;
|
|
@@ -2208,6 +2260,17 @@ declare const updateAccountInputSchema: z.ZodObject<{
|
|
|
2208
2260
|
type UpdateAccountInput = z.infer<typeof updateAccountInputSchema>;
|
|
2209
2261
|
type UpdateAccountOutput = AccountSelectType;
|
|
2210
2262
|
|
|
2263
|
+
type AccountWithWorkflow = AccountSelectType & {
|
|
2264
|
+
workflow: {
|
|
2265
|
+
instanceId: string;
|
|
2266
|
+
details: WorkflowInstanceStatus;
|
|
2267
|
+
} | null;
|
|
2268
|
+
};
|
|
2269
|
+
type GetAccountsOutput = {
|
|
2270
|
+
accounts: AccountWithWorkflow[];
|
|
2271
|
+
totalCount: number;
|
|
2272
|
+
};
|
|
2273
|
+
|
|
2211
2274
|
declare const BankServiceBase_base: (abstract new (ctx: ExecutionContext, env: BankEnv) => WorkerEntrypoint<BankEnv, {}>) & (abstract new (...args: any[]) => _develit_io_backend_sdk.DevelitWorkerMethods);
|
|
2212
2275
|
declare class BankServiceBase extends BankServiceBase_base {
|
|
2213
2276
|
readonly db: DrizzleD1Database<typeof tables>;
|
|
@@ -2220,8 +2283,7 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2220
2283
|
status: "AUTHORIZED" | "DISABLED" | "EXPIRED";
|
|
2221
2284
|
bankRefId: string;
|
|
2222
2285
|
batchSizeLimit: number;
|
|
2223
|
-
|
|
2224
|
-
syncPeriod: number | null;
|
|
2286
|
+
syncIntervalS: number;
|
|
2225
2287
|
lastSyncedAt: Date | null;
|
|
2226
2288
|
holderName: string;
|
|
2227
2289
|
number: string | null;
|
|
@@ -2250,6 +2312,8 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2250
2312
|
_accountFetchInterval(connectorKey: ConnectorKey): number;
|
|
2251
2313
|
getPayments(input: GetPaymentsInput): Promise<IRPCResponse<GetPaymentsOutput>>;
|
|
2252
2314
|
syncAccount(input: SyncAccountInput): Promise<IRPCResponse<SyncAccountOutput>>;
|
|
2315
|
+
syncAccountStatus(input: SyncAccountStatusInput): Promise<IRPCResponse<SyncAccountStatusOutput>>;
|
|
2316
|
+
syncAccountRestart(input: SyncAccountRestartInput): Promise<IRPCResponse<SyncAccountRestartOutput>>;
|
|
2253
2317
|
syncAccounts(options?: {
|
|
2254
2318
|
accounts?: AccountSelectType[];
|
|
2255
2319
|
}): Promise<IRPCResponse<void>>;
|
|
@@ -2258,13 +2322,13 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2258
2322
|
addPaymentsToBatch({ paymentsToBatch, }: {
|
|
2259
2323
|
paymentsToBatch: SendPaymentInput[];
|
|
2260
2324
|
}): Promise<IRPCResponse<{
|
|
2325
|
+
batchPaymentInitiatedAt: Date | null;
|
|
2326
|
+
authorizationUrls: string | string[] | null;
|
|
2327
|
+
status: "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "WAITING_FOR_PROCESSING" | "PREPARED" | "COMPLETED" | "FAILED" | null;
|
|
2261
2328
|
id: string;
|
|
2262
2329
|
createdAt: Date | null;
|
|
2263
2330
|
updatedAt: Date | null;
|
|
2264
2331
|
deletedAt: Date | null;
|
|
2265
|
-
batchPaymentInitiatedAt: Date | null;
|
|
2266
|
-
authorizationUrls: string | string[] | null;
|
|
2267
|
-
status: "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "WAITING_FOR_PROCESSING" | "PREPARED" | "COMPLETED" | "FAILED" | null;
|
|
2268
2332
|
accountId: string | null;
|
|
2269
2333
|
payments: PaymentInsertType[];
|
|
2270
2334
|
metadata: object | null;
|
|
@@ -2276,7 +2340,7 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2276
2340
|
simulateDeposit(input: SimulateDepositInput): Promise<IRPCResponse<SimulateDepositOutput>>;
|
|
2277
2341
|
setLastSyncAt(input: SetLastSyncAtInput): Promise<IRPCResponse<SetLastSyncAtOutput>>;
|
|
2278
2342
|
sendPayment(input: SendPaymentInput): Promise<IRPCResponse<SendPaymentOutput>>;
|
|
2279
|
-
getBankAccounts(): Promise<IRPCResponse<
|
|
2343
|
+
getBankAccounts(): Promise<IRPCResponse<GetAccountsOutput>>;
|
|
2280
2344
|
updateAccount(input: UpdateAccountInput): Promise<IRPCResponse<UpdateAccountOutput>>;
|
|
2281
2345
|
getBatches(input: GetBatchesInput): Promise<IRPCResponse<GetBatchesOutput>>;
|
|
2282
2346
|
}
|
|
@@ -2284,8 +2348,4 @@ declare function defineBankService({ config, }: {
|
|
|
2284
2348
|
config: ConfigEnvironmentBank;
|
|
2285
2349
|
}): new (ctx: ExecutionContext, env: BankEnv) => BankServiceBase;
|
|
2286
2350
|
|
|
2287
|
-
declare const _default: new (ctx: ExecutionContext, env: BankEnv) => WorkerEntrypoint<BankEnv>;
|
|
2288
|
-
|
|
2289
|
-
// @ts-ignore
|
|
2290
|
-
export = _default;
|
|
2291
2351
|
export { defineBankService };
|