@develit-services/bank 4.4.0 → 5.0.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.
- package/dist/{export/worker.cjs → base.cjs} +27 -27
- package/dist/{export/worker.d.ts → base.d.cts} +16 -16
- package/dist/{export/worker.d.mts → base.d.mts} +16 -16
- package/dist/{export/worker.d.cts → base.d.ts} +16 -16
- package/dist/{export/worker.mjs → base.mjs} +4 -4
- 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/service.cjs +40 -0
- package/dist/service.d.cts +222 -0
- package/dist/service.d.mts +222 -0
- package/dist/service.d.ts +222 -0
- package/dist/service.mjs +37 -0
- package/dist/shared/{bank.BnCJmT6k.d.mts → bank.C-edstpR.d.cts} +1 -1
- package/dist/shared/{bank.mHFTrKBv.d.cts → bank.C6BQDtpF.d.mts} +1 -1
- package/dist/shared/{bank.BCqBwSKC.d.cts → bank.Do1KUeDr.d.cts} +4 -4
- package/dist/shared/{bank.BCqBwSKC.d.mts → bank.Do1KUeDr.d.mts} +4 -4
- package/dist/shared/{bank.BCqBwSKC.d.ts → bank.Do1KUeDr.d.ts} +4 -4
- package/dist/shared/{bank.BmX_IG66.d.ts → bank.pZQAWlIB.d.ts} +1 -1
- package/dist/types.d.cts +4 -5
- package/dist/types.d.mts +4 -5
- package/dist/types.d.ts +4 -5
- package/package.json +13 -12
- package/dist/export/wrangler.cjs +0 -75
- package/dist/export/wrangler.d.cts +0 -80
- package/dist/export/wrangler.d.mts +0 -80
- package/dist/export/wrangler.d.ts +0 -80
- package/dist/export/wrangler.mjs +0 -73
- package/dist/shared/bank.DyZBd2qL.d.cts +0 -43
- package/dist/shared/bank.DyZBd2qL.d.mts +0 -43
- package/dist/shared/bank.DyZBd2qL.d.ts +0 -43
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
4
|
-
const ott_zod = require('
|
|
4
|
+
const ott_zod = require('./shared/bank.BSX82jhx.cjs');
|
|
5
5
|
const drizzleOrm = require('drizzle-orm');
|
|
6
6
|
const cloudflare_workers = require('cloudflare:workers');
|
|
7
7
|
const d1 = require('drizzle-orm/d1');
|
|
8
8
|
require('jose');
|
|
9
9
|
const zod = require('zod');
|
|
10
|
-
const database_schema = require('
|
|
10
|
+
const database_schema = require('./shared/bank.9Yw4KHyl.cjs');
|
|
11
11
|
const generalCodes = require('@develit-io/general-codes');
|
|
12
12
|
require('date-fns');
|
|
13
13
|
require('node:crypto');
|
|
14
|
-
const credentialsResolver = require('
|
|
14
|
+
const credentialsResolver = require('./shared/bank.CibQRM2D.cjs');
|
|
15
15
|
require('drizzle-orm/zod');
|
|
16
16
|
require('drizzle-orm/sqlite-core');
|
|
17
17
|
|
|
@@ -684,7 +684,7 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
684
684
|
if (kind && result) __defProp(target, key, result);
|
|
685
685
|
return result;
|
|
686
686
|
};
|
|
687
|
-
|
|
687
|
+
exports.BankServiceBase = class BankServiceBase extends backendSdk.develitWorker(cloudflare_workers.WorkerEntrypoint) {
|
|
688
688
|
constructor(ctx, env, config) {
|
|
689
689
|
super(ctx, env);
|
|
690
690
|
this.allowedProviders = [];
|
|
@@ -1997,71 +1997,71 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
1997
1997
|
};
|
|
1998
1998
|
__decorateClass([
|
|
1999
1999
|
backendSdk.action("get-payments")
|
|
2000
|
-
], BankServiceBase.prototype, "getPayments", 1);
|
|
2000
|
+
], exports.BankServiceBase.prototype, "getPayments", 1);
|
|
2001
2001
|
__decorateClass([
|
|
2002
2002
|
backendSdk.action("sync-account")
|
|
2003
|
-
], BankServiceBase.prototype, "syncAccount", 1);
|
|
2003
|
+
], exports.BankServiceBase.prototype, "syncAccount", 1);
|
|
2004
2004
|
__decorateClass([
|
|
2005
2005
|
backendSdk.action("synchronize-accounts")
|
|
2006
|
-
], BankServiceBase.prototype, "syncAccounts", 1);
|
|
2006
|
+
], exports.BankServiceBase.prototype, "syncAccounts", 1);
|
|
2007
2007
|
__decorateClass([
|
|
2008
2008
|
backendSdk.action("update-payment-request-statuses")
|
|
2009
|
-
], BankServiceBase.prototype, "updatePaymentRequestStatuses", 1);
|
|
2009
|
+
], exports.BankServiceBase.prototype, "updatePaymentRequestStatuses", 1);
|
|
2010
2010
|
__decorateClass([
|
|
2011
2011
|
backendSdk.action("scheduled")
|
|
2012
|
-
], BankServiceBase.prototype, "scheduled", 1);
|
|
2012
|
+
], exports.BankServiceBase.prototype, "scheduled", 1);
|
|
2013
2013
|
__decorateClass([
|
|
2014
2014
|
backendSdk.action("handle-authorization-callback")
|
|
2015
|
-
], BankServiceBase.prototype, "handleAuthorizationCallback", 1);
|
|
2015
|
+
], exports.BankServiceBase.prototype, "handleAuthorizationCallback", 1);
|
|
2016
2016
|
__decorateClass([
|
|
2017
2017
|
backendSdk.action("process-batch")
|
|
2018
|
-
], BankServiceBase.prototype, "processBatch", 1);
|
|
2018
|
+
], exports.BankServiceBase.prototype, "processBatch", 1);
|
|
2019
2019
|
__decorateClass([
|
|
2020
2020
|
backendSdk.action("get-auth-uri")
|
|
2021
|
-
], BankServiceBase.prototype, "getAuthUri", 1);
|
|
2021
|
+
], exports.BankServiceBase.prototype, "getAuthUri", 1);
|
|
2022
2022
|
__decorateClass([
|
|
2023
2023
|
backendSdk.action("authorize-account")
|
|
2024
|
-
], BankServiceBase.prototype, "authorizeAccount", 1);
|
|
2024
|
+
], exports.BankServiceBase.prototype, "authorizeAccount", 1);
|
|
2025
2025
|
__decorateClass([
|
|
2026
2026
|
backendSdk.action("simulate-deposit")
|
|
2027
|
-
], BankServiceBase.prototype, "simulateDeposit", 1);
|
|
2027
|
+
], exports.BankServiceBase.prototype, "simulateDeposit", 1);
|
|
2028
2028
|
__decorateClass([
|
|
2029
2029
|
backendSdk.action("send-payment")
|
|
2030
|
-
], BankServiceBase.prototype, "sendPayment", 1);
|
|
2030
|
+
], exports.BankServiceBase.prototype, "sendPayment", 1);
|
|
2031
2031
|
__decorateClass([
|
|
2032
2032
|
backendSdk.action("send-payment-sync")
|
|
2033
|
-
], BankServiceBase.prototype, "sendPaymentSync", 1);
|
|
2033
|
+
], exports.BankServiceBase.prototype, "sendPaymentSync", 1);
|
|
2034
2034
|
__decorateClass([
|
|
2035
2035
|
backendSdk.action("send-batch")
|
|
2036
|
-
], BankServiceBase.prototype, "sendBatch", 1);
|
|
2036
|
+
], exports.BankServiceBase.prototype, "sendBatch", 1);
|
|
2037
2037
|
__decorateClass([
|
|
2038
2038
|
backendSdk.action("get-bank-accounts")
|
|
2039
|
-
], BankServiceBase.prototype, "getBankAccounts", 1);
|
|
2039
|
+
], exports.BankServiceBase.prototype, "getBankAccounts", 1);
|
|
2040
2040
|
__decorateClass([
|
|
2041
2041
|
backendSdk.action("get-account-balance")
|
|
2042
|
-
], BankServiceBase.prototype, "getAccountBalance", 1);
|
|
2042
|
+
], exports.BankServiceBase.prototype, "getAccountBalance", 1);
|
|
2043
2043
|
__decorateClass([
|
|
2044
2044
|
backendSdk.action("update-account")
|
|
2045
|
-
], BankServiceBase.prototype, "updateAccount", 1);
|
|
2045
|
+
], exports.BankServiceBase.prototype, "updateAccount", 1);
|
|
2046
2046
|
__decorateClass([
|
|
2047
2047
|
backendSdk.action("disconnectAccount")
|
|
2048
|
-
], BankServiceBase.prototype, "disconnectAccount", 1);
|
|
2048
|
+
], exports.BankServiceBase.prototype, "disconnectAccount", 1);
|
|
2049
2049
|
__decorateClass([
|
|
2050
2050
|
backendSdk.action("getBatches")
|
|
2051
|
-
], BankServiceBase.prototype, "getBatches", 1);
|
|
2051
|
+
], exports.BankServiceBase.prototype, "getBatches", 1);
|
|
2052
2052
|
__decorateClass([
|
|
2053
2053
|
backendSdk.action("get-payment-requests")
|
|
2054
|
-
], BankServiceBase.prototype, "getPaymentRequests", 1);
|
|
2054
|
+
], exports.BankServiceBase.prototype, "getPaymentRequests", 1);
|
|
2055
2055
|
__decorateClass([
|
|
2056
2056
|
backendSdk.action("get-payment-request")
|
|
2057
|
-
], BankServiceBase.prototype, "getPaymentRequest", 1);
|
|
2058
|
-
BankServiceBase = __decorateClass([
|
|
2057
|
+
], exports.BankServiceBase.prototype, "getPaymentRequest", 1);
|
|
2058
|
+
exports.BankServiceBase = __decorateClass([
|
|
2059
2059
|
backendSdk.service("bank")
|
|
2060
|
-
], BankServiceBase);
|
|
2060
|
+
], exports.BankServiceBase);
|
|
2061
2061
|
function defineBankService({
|
|
2062
2062
|
config
|
|
2063
2063
|
}) {
|
|
2064
|
-
return class BankService extends BankServiceBase {
|
|
2064
|
+
return class BankService extends exports.BankServiceBase {
|
|
2065
2065
|
constructor(ctx, env) {
|
|
2066
2066
|
super(ctx, env, config);
|
|
2067
2067
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as drizzle_orm from 'drizzle-orm';
|
|
2
|
-
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig,
|
|
3
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '
|
|
2
|
+
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.Do1KUeDr.cjs';
|
|
3
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.C-edstpR.cjs';
|
|
4
4
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
5
5
|
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
6
6
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
@@ -2691,9 +2691,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2691
2691
|
limit: z.ZodNumber;
|
|
2692
2692
|
sort: z.ZodObject<{
|
|
2693
2693
|
column: z.ZodEnum<{
|
|
2694
|
+
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2694
2695
|
createdAt: "createdAt";
|
|
2695
2696
|
updatedAt: "updatedAt";
|
|
2696
|
-
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2697
2697
|
}>;
|
|
2698
2698
|
direction: z.ZodEnum<{
|
|
2699
2699
|
asc: "asc";
|
|
@@ -2703,15 +2703,15 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2703
2703
|
filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
2704
2704
|
filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2705
2705
|
AUTHORIZED: "AUTHORIZED";
|
|
2706
|
-
COMPLETED: "COMPLETED";
|
|
2707
2706
|
PROCESSING: "PROCESSING";
|
|
2708
2707
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2708
|
+
COMPLETED: "COMPLETED";
|
|
2709
2709
|
FAILED: "FAILED";
|
|
2710
2710
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2711
2711
|
AUTHORIZED: "AUTHORIZED";
|
|
2712
|
-
COMPLETED: "COMPLETED";
|
|
2713
2712
|
PROCESSING: "PROCESSING";
|
|
2714
2713
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2714
|
+
COMPLETED: "COMPLETED";
|
|
2715
2715
|
FAILED: "FAILED";
|
|
2716
2716
|
}>>]>>;
|
|
2717
2717
|
}, z.core.$strip>;
|
|
@@ -2948,20 +2948,20 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2948
2948
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
2949
2949
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2950
2950
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2951
|
-
BOOKED: "BOOKED";
|
|
2952
|
-
REJECTED: "REJECTED";
|
|
2953
|
-
PENDING: "PENDING";
|
|
2954
2951
|
PROCESSING: "PROCESSING";
|
|
2952
|
+
PENDING: "PENDING";
|
|
2953
|
+
BOOKED: "BOOKED";
|
|
2955
2954
|
CANCELLED: "CANCELLED";
|
|
2955
|
+
REJECTED: "REJECTED";
|
|
2956
2956
|
SCHEDULED: "SCHEDULED";
|
|
2957
2957
|
HOLD: "HOLD";
|
|
2958
2958
|
INFO: "INFO";
|
|
2959
2959
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2960
|
-
BOOKED: "BOOKED";
|
|
2961
|
-
REJECTED: "REJECTED";
|
|
2962
|
-
PENDING: "PENDING";
|
|
2963
2960
|
PROCESSING: "PROCESSING";
|
|
2961
|
+
PENDING: "PENDING";
|
|
2962
|
+
BOOKED: "BOOKED";
|
|
2964
2963
|
CANCELLED: "CANCELLED";
|
|
2964
|
+
REJECTED: "REJECTED";
|
|
2965
2965
|
SCHEDULED: "SCHEDULED";
|
|
2966
2966
|
HOLD: "HOLD";
|
|
2967
2967
|
INFO: "INFO";
|
|
@@ -3597,19 +3597,19 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3597
3597
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3598
3598
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3599
3599
|
AUTHORIZED: "AUTHORIZED";
|
|
3600
|
-
OPENED: "OPENED";
|
|
3601
3600
|
COMPLETED: "COMPLETED";
|
|
3602
3601
|
BOOKED: "BOOKED";
|
|
3603
|
-
SETTLED: "SETTLED";
|
|
3604
3602
|
REJECTED: "REJECTED";
|
|
3603
|
+
OPENED: "OPENED";
|
|
3604
|
+
SETTLED: "SETTLED";
|
|
3605
3605
|
CLOSED: "CLOSED";
|
|
3606
3606
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3607
3607
|
AUTHORIZED: "AUTHORIZED";
|
|
3608
|
-
OPENED: "OPENED";
|
|
3609
3608
|
COMPLETED: "COMPLETED";
|
|
3610
3609
|
BOOKED: "BOOKED";
|
|
3611
|
-
SETTLED: "SETTLED";
|
|
3612
3610
|
REJECTED: "REJECTED";
|
|
3611
|
+
OPENED: "OPENED";
|
|
3612
|
+
SETTLED: "SETTLED";
|
|
3613
3613
|
CLOSED: "CLOSED";
|
|
3614
3614
|
}>>]>>;
|
|
3615
3615
|
filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
@@ -3943,4 +3943,4 @@ declare function defineBankService({ config, }: {
|
|
|
3943
3943
|
config: ConfigEnvironmentBank;
|
|
3944
3944
|
}): typeof BankServiceBase;
|
|
3945
3945
|
|
|
3946
|
-
export { defineBankService };
|
|
3946
|
+
export { BankServiceBase, defineBankService };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as drizzle_orm from 'drizzle-orm';
|
|
2
|
-
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig,
|
|
3
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '
|
|
2
|
+
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.Do1KUeDr.mjs';
|
|
3
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.C6BQDtpF.mjs';
|
|
4
4
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
5
5
|
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
6
6
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
@@ -2691,9 +2691,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2691
2691
|
limit: z.ZodNumber;
|
|
2692
2692
|
sort: z.ZodObject<{
|
|
2693
2693
|
column: z.ZodEnum<{
|
|
2694
|
+
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2694
2695
|
createdAt: "createdAt";
|
|
2695
2696
|
updatedAt: "updatedAt";
|
|
2696
|
-
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2697
2697
|
}>;
|
|
2698
2698
|
direction: z.ZodEnum<{
|
|
2699
2699
|
asc: "asc";
|
|
@@ -2703,15 +2703,15 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2703
2703
|
filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
2704
2704
|
filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2705
2705
|
AUTHORIZED: "AUTHORIZED";
|
|
2706
|
-
COMPLETED: "COMPLETED";
|
|
2707
2706
|
PROCESSING: "PROCESSING";
|
|
2708
2707
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2708
|
+
COMPLETED: "COMPLETED";
|
|
2709
2709
|
FAILED: "FAILED";
|
|
2710
2710
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2711
2711
|
AUTHORIZED: "AUTHORIZED";
|
|
2712
|
-
COMPLETED: "COMPLETED";
|
|
2713
2712
|
PROCESSING: "PROCESSING";
|
|
2714
2713
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2714
|
+
COMPLETED: "COMPLETED";
|
|
2715
2715
|
FAILED: "FAILED";
|
|
2716
2716
|
}>>]>>;
|
|
2717
2717
|
}, z.core.$strip>;
|
|
@@ -2948,20 +2948,20 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2948
2948
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
2949
2949
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2950
2950
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2951
|
-
BOOKED: "BOOKED";
|
|
2952
|
-
REJECTED: "REJECTED";
|
|
2953
|
-
PENDING: "PENDING";
|
|
2954
2951
|
PROCESSING: "PROCESSING";
|
|
2952
|
+
PENDING: "PENDING";
|
|
2953
|
+
BOOKED: "BOOKED";
|
|
2955
2954
|
CANCELLED: "CANCELLED";
|
|
2955
|
+
REJECTED: "REJECTED";
|
|
2956
2956
|
SCHEDULED: "SCHEDULED";
|
|
2957
2957
|
HOLD: "HOLD";
|
|
2958
2958
|
INFO: "INFO";
|
|
2959
2959
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2960
|
-
BOOKED: "BOOKED";
|
|
2961
|
-
REJECTED: "REJECTED";
|
|
2962
|
-
PENDING: "PENDING";
|
|
2963
2960
|
PROCESSING: "PROCESSING";
|
|
2961
|
+
PENDING: "PENDING";
|
|
2962
|
+
BOOKED: "BOOKED";
|
|
2964
2963
|
CANCELLED: "CANCELLED";
|
|
2964
|
+
REJECTED: "REJECTED";
|
|
2965
2965
|
SCHEDULED: "SCHEDULED";
|
|
2966
2966
|
HOLD: "HOLD";
|
|
2967
2967
|
INFO: "INFO";
|
|
@@ -3597,19 +3597,19 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3597
3597
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3598
3598
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3599
3599
|
AUTHORIZED: "AUTHORIZED";
|
|
3600
|
-
OPENED: "OPENED";
|
|
3601
3600
|
COMPLETED: "COMPLETED";
|
|
3602
3601
|
BOOKED: "BOOKED";
|
|
3603
|
-
SETTLED: "SETTLED";
|
|
3604
3602
|
REJECTED: "REJECTED";
|
|
3603
|
+
OPENED: "OPENED";
|
|
3604
|
+
SETTLED: "SETTLED";
|
|
3605
3605
|
CLOSED: "CLOSED";
|
|
3606
3606
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3607
3607
|
AUTHORIZED: "AUTHORIZED";
|
|
3608
|
-
OPENED: "OPENED";
|
|
3609
3608
|
COMPLETED: "COMPLETED";
|
|
3610
3609
|
BOOKED: "BOOKED";
|
|
3611
|
-
SETTLED: "SETTLED";
|
|
3612
3610
|
REJECTED: "REJECTED";
|
|
3611
|
+
OPENED: "OPENED";
|
|
3612
|
+
SETTLED: "SETTLED";
|
|
3613
3613
|
CLOSED: "CLOSED";
|
|
3614
3614
|
}>>]>>;
|
|
3615
3615
|
filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
@@ -3943,4 +3943,4 @@ declare function defineBankService({ config, }: {
|
|
|
3943
3943
|
config: ConfigEnvironmentBank;
|
|
3944
3944
|
}): typeof BankServiceBase;
|
|
3945
3945
|
|
|
3946
|
-
export { defineBankService };
|
|
3946
|
+
export { BankServiceBase, defineBankService };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as drizzle_orm from 'drizzle-orm';
|
|
2
|
-
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig,
|
|
3
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '
|
|
2
|
+
import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.Do1KUeDr.js';
|
|
3
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.pZQAWlIB.js';
|
|
4
4
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
5
5
|
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
6
6
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
@@ -2691,9 +2691,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2691
2691
|
limit: z.ZodNumber;
|
|
2692
2692
|
sort: z.ZodObject<{
|
|
2693
2693
|
column: z.ZodEnum<{
|
|
2694
|
+
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2694
2695
|
createdAt: "createdAt";
|
|
2695
2696
|
updatedAt: "updatedAt";
|
|
2696
|
-
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2697
2697
|
}>;
|
|
2698
2698
|
direction: z.ZodEnum<{
|
|
2699
2699
|
asc: "asc";
|
|
@@ -2703,15 +2703,15 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2703
2703
|
filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
2704
2704
|
filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2705
2705
|
AUTHORIZED: "AUTHORIZED";
|
|
2706
|
-
COMPLETED: "COMPLETED";
|
|
2707
2706
|
PROCESSING: "PROCESSING";
|
|
2708
2707
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2708
|
+
COMPLETED: "COMPLETED";
|
|
2709
2709
|
FAILED: "FAILED";
|
|
2710
2710
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2711
2711
|
AUTHORIZED: "AUTHORIZED";
|
|
2712
|
-
COMPLETED: "COMPLETED";
|
|
2713
2712
|
PROCESSING: "PROCESSING";
|
|
2714
2713
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2714
|
+
COMPLETED: "COMPLETED";
|
|
2715
2715
|
FAILED: "FAILED";
|
|
2716
2716
|
}>>]>>;
|
|
2717
2717
|
}, z.core.$strip>;
|
|
@@ -2948,20 +2948,20 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2948
2948
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
2949
2949
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2950
2950
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2951
|
-
BOOKED: "BOOKED";
|
|
2952
|
-
REJECTED: "REJECTED";
|
|
2953
|
-
PENDING: "PENDING";
|
|
2954
2951
|
PROCESSING: "PROCESSING";
|
|
2952
|
+
PENDING: "PENDING";
|
|
2953
|
+
BOOKED: "BOOKED";
|
|
2955
2954
|
CANCELLED: "CANCELLED";
|
|
2955
|
+
REJECTED: "REJECTED";
|
|
2956
2956
|
SCHEDULED: "SCHEDULED";
|
|
2957
2957
|
HOLD: "HOLD";
|
|
2958
2958
|
INFO: "INFO";
|
|
2959
2959
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2960
|
-
BOOKED: "BOOKED";
|
|
2961
|
-
REJECTED: "REJECTED";
|
|
2962
|
-
PENDING: "PENDING";
|
|
2963
2960
|
PROCESSING: "PROCESSING";
|
|
2961
|
+
PENDING: "PENDING";
|
|
2962
|
+
BOOKED: "BOOKED";
|
|
2964
2963
|
CANCELLED: "CANCELLED";
|
|
2964
|
+
REJECTED: "REJECTED";
|
|
2965
2965
|
SCHEDULED: "SCHEDULED";
|
|
2966
2966
|
HOLD: "HOLD";
|
|
2967
2967
|
INFO: "INFO";
|
|
@@ -3597,19 +3597,19 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3597
3597
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3598
3598
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3599
3599
|
AUTHORIZED: "AUTHORIZED";
|
|
3600
|
-
OPENED: "OPENED";
|
|
3601
3600
|
COMPLETED: "COMPLETED";
|
|
3602
3601
|
BOOKED: "BOOKED";
|
|
3603
|
-
SETTLED: "SETTLED";
|
|
3604
3602
|
REJECTED: "REJECTED";
|
|
3603
|
+
OPENED: "OPENED";
|
|
3604
|
+
SETTLED: "SETTLED";
|
|
3605
3605
|
CLOSED: "CLOSED";
|
|
3606
3606
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3607
3607
|
AUTHORIZED: "AUTHORIZED";
|
|
3608
|
-
OPENED: "OPENED";
|
|
3609
3608
|
COMPLETED: "COMPLETED";
|
|
3610
3609
|
BOOKED: "BOOKED";
|
|
3611
|
-
SETTLED: "SETTLED";
|
|
3612
3610
|
REJECTED: "REJECTED";
|
|
3611
|
+
OPENED: "OPENED";
|
|
3612
|
+
SETTLED: "SETTLED";
|
|
3613
3613
|
CLOSED: "CLOSED";
|
|
3614
3614
|
}>>]>>;
|
|
3615
3615
|
filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
@@ -3943,4 +3943,4 @@ declare function defineBankService({ config, }: {
|
|
|
3943
3943
|
config: ConfigEnvironmentBank;
|
|
3944
3944
|
}): typeof BankServiceBase;
|
|
3945
3945
|
|
|
3946
|
-
export { defineBankService };
|
|
3946
|
+
export { BankServiceBase, defineBankService };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { bankAccountMetadataSchema, structuredAddressSchema, uuidv4, first, buildMultiFilterConditions as buildMultiFilterConditions$1, workflowInstanceStatusSchema, develitWorker, createInternalError, action, service } from '@develit-io/backend-sdk';
|
|
2
|
-
import { G as tables, g as accountInsertSchema, H as relations, J as initiateConnector, o as isProcessedStatus, p as isTerminalStatus, L as getNonTerminalPaymentRequestsQuery, x as toIncomingPayment, j as assignAccount, u as toBatchedPayment, y as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from '
|
|
2
|
+
import { G as tables, g as accountInsertSchema, H as relations, J as initiateConnector, o as isProcessedStatus, p as isTerminalStatus, L as getNonTerminalPaymentRequestsQuery, x as toIncomingPayment, j as assignAccount, u as toBatchedPayment, y as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from './shared/bank.CZ8MQDPa.mjs';
|
|
3
3
|
import { eq, sql, and, like, asc, desc, inArray, gte, lte, isNull, count } from 'drizzle-orm';
|
|
4
4
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
5
5
|
import { drizzle } from 'drizzle-orm/d1';
|
|
6
6
|
import 'jose';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { I as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, g as PAYMENT_TYPES, b as CONNECTOR_KEYS, a as BATCH_STATUSES, f as PAYMENT_STATUSES, P as PAYMENT_DIRECTIONS, e as PAYMENT_REQUEST_STATUSES } from '
|
|
8
|
+
import { I as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, g as PAYMENT_TYPES, b as CONNECTOR_KEYS, a as BATCH_STATUSES, f as PAYMENT_STATUSES, P as PAYMENT_DIRECTIONS, e as PAYMENT_REQUEST_STATUSES } from './shared/bank.BzDNLxB_.mjs';
|
|
9
9
|
import { CURRENCY_CODES } from '@develit-io/general-codes';
|
|
10
10
|
import 'date-fns';
|
|
11
11
|
import 'node:crypto';
|
|
12
|
-
import { h as encrypt, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, a as getPaymentRequestsByBatchIdQuery, g as getBatchByIdQuery, u as upsertBatchCommand, i as importAesKey, f as createPaymentCommand, b as getAccountByIdQuery } from '
|
|
12
|
+
import { h as encrypt, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, a as getPaymentRequestsByBatchIdQuery, g as getBatchByIdQuery, u as upsertBatchCommand, i as importAesKey, f as createPaymentCommand, b as getAccountByIdQuery } from './shared/bank.BdTj54NO.mjs';
|
|
13
13
|
import 'drizzle-orm/zod';
|
|
14
14
|
import 'drizzle-orm/sqlite-core';
|
|
15
15
|
|
|
@@ -2066,4 +2066,4 @@ function defineBankService({
|
|
|
2066
2066
|
};
|
|
2067
2067
|
}
|
|
2068
2068
|
|
|
2069
|
-
export { defineBankService };
|
|
2069
|
+
export { BankServiceBase, defineBankService };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.
|
|
1
|
+
export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.Do1KUeDr.cjs';
|
|
2
2
|
import 'drizzle-orm';
|
|
3
3
|
import 'drizzle-orm/sqlite-core';
|
|
4
4
|
import '@develit-io/general-codes';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.
|
|
1
|
+
export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.Do1KUeDr.mjs';
|
|
2
2
|
import 'drizzle-orm';
|
|
3
3
|
import 'drizzle-orm/sqlite-core';
|
|
4
4
|
import '@develit-io/general-codes';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.
|
|
1
|
+
export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.Do1KUeDr.js';
|
|
2
2
|
import 'drizzle-orm';
|
|
3
3
|
import 'drizzle-orm/sqlite-core';
|
|
4
4
|
import '@develit-io/general-codes';
|
package/dist/service.cjs
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const serviceConfig = require('@develit-io/platform-sdk/service-config');
|
|
4
|
+
|
|
5
|
+
const BANK_SERVICE_BINDINGS = {
|
|
6
|
+
SECRETS_STORE: { kind: "service", target: "secrets-store" },
|
|
7
|
+
BANK_KV: { kind: "kv", suffix: "bank" },
|
|
8
|
+
BANK_D1: { kind: "d1", suffix: "bank" },
|
|
9
|
+
QUEUE_BUS_QUEUE: { kind: "queueProducer", suffix: "queue-bus" },
|
|
10
|
+
NOTIFICATIONS_QUEUE: { kind: "queueProducer", suffix: "notifications" },
|
|
11
|
+
SYNC_ACCOUNT_PAYMENTS_WORKFLOW: {
|
|
12
|
+
kind: "workflow",
|
|
13
|
+
class: "BankSyncAccountPayments",
|
|
14
|
+
suffix: "bank-sync-account-payments",
|
|
15
|
+
limits: { steps: 25e3 }
|
|
16
|
+
},
|
|
17
|
+
PROCESS_BATCH_WORKFLOW: {
|
|
18
|
+
kind: "workflow",
|
|
19
|
+
class: "BankProcessBatch",
|
|
20
|
+
suffix: "bank-process-batch"
|
|
21
|
+
},
|
|
22
|
+
DBU_CBS_BACKOFFICE_DEV: {
|
|
23
|
+
kind: "vpc",
|
|
24
|
+
serviceId: "019c2962-172c-75a2-a000-b76e246d25d7"
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const baseBankServiceConfig = serviceConfig.createTypedServiceConfigFactory()(BANK_SERVICE_BINDINGS);
|
|
28
|
+
function bankServiceConfig(project, version, options) {
|
|
29
|
+
const config = baseBankServiceConfig(project, version, options);
|
|
30
|
+
const callable = (deployment, bindings) => ({
|
|
31
|
+
resourceName: "bank",
|
|
32
|
+
variables: config.vars[serviceConfig.configKeyFor(deployment.environment)],
|
|
33
|
+
bindings,
|
|
34
|
+
crons: config.triggers.crons[serviceConfig.configKeyFor(deployment.environment)]
|
|
35
|
+
});
|
|
36
|
+
return Object.assign(callable, config);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
exports.BANK_SERVICE_BINDINGS = BANK_SERVICE_BINDINGS;
|
|
40
|
+
exports.bankServiceConfig = bankServiceConfig;
|