@develit-services/bank 5.9.0 → 5.9.2
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/base.cjs +46 -15
- package/dist/base.d.cts +12 -12
- package/dist/base.d.mts +12 -12
- package/dist/base.d.ts +12 -12
- package/dist/base.mjs +47 -16
- 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/shared/{bank.Bhh_O_5-.d.mts → bank.CDB7SWNr.d.mts} +1 -1
- package/dist/shared/{bank.BhyIbhvK.d.cts → bank.CggHtT3y.d.cts} +1 -1
- package/dist/shared/{bank.mkq4IlpC.d.mts → bank.D3w3JIsQ.d.cts} +2 -2
- package/dist/shared/{bank.mkq4IlpC.d.ts → bank.D3w3JIsQ.d.mts} +2 -2
- package/dist/shared/{bank.mkq4IlpC.d.cts → bank.D3w3JIsQ.d.ts} +2 -2
- package/dist/shared/{bank.Bnc_DoG4.d.ts → bank.DhMeQgpB.d.ts} +1 -1
- package/dist/types.d.cts +4 -4
- package/dist/types.d.mts +4 -4
- package/dist/types.d.ts +4 -4
- package/package.json +1 -1
package/dist/base.cjs
CHANGED
|
@@ -127,8 +127,13 @@ function buildDispatchCreateOptions(instanceId, accountId, maxIterations) {
|
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
function isAlreadyExists(err) {
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
return /already exists/i.test(extractMessage(err));
|
|
131
|
+
}
|
|
132
|
+
function isInstanceNotFound(err) {
|
|
133
|
+
return /instance.*not.?found|not.?found.*instance/i.test(extractMessage(err));
|
|
134
|
+
}
|
|
135
|
+
function extractMessage(err) {
|
|
136
|
+
return err instanceof Error ? err.message : typeof err === "object" && err !== null && "message" in err ? String(err.message) : "";
|
|
132
137
|
}
|
|
133
138
|
|
|
134
139
|
const DEFAULT_MIN_GRACE_MS = 3 * 60 * 1e3;
|
|
@@ -1022,17 +1027,7 @@ exports.BankServiceBase = class BankServiceBase extends backendSdk.develitWorker
|
|
|
1022
1027
|
{ data: input, schema: syncAccountInputSchema },
|
|
1023
1028
|
{ successMessage: "Account sync workflow started" },
|
|
1024
1029
|
async ({ accountId }) => {
|
|
1025
|
-
|
|
1026
|
-
if (!account) {
|
|
1027
|
-
throw accountNotFoundError();
|
|
1028
|
-
}
|
|
1029
|
-
if (!account.syncEnabled) {
|
|
1030
|
-
throw backendSdk.createInternalError(null, {
|
|
1031
|
-
message: `Account sync is disabled for ${accountId}. Enable it via restart-sync first.`,
|
|
1032
|
-
code: "VALID-B-018",
|
|
1033
|
-
status: 422
|
|
1034
|
-
});
|
|
1035
|
-
}
|
|
1030
|
+
await this.setSyncEnabledOrThrow(accountId, true);
|
|
1036
1031
|
if (isDispatchActive(
|
|
1037
1032
|
accountId,
|
|
1038
1033
|
this.env.SYNC_DISPATCH_ACCOUNT_IDS,
|
|
@@ -1088,8 +1083,44 @@ exports.BankServiceBase = class BankServiceBase extends backendSdk.develitWorker
|
|
|
1088
1083
|
{ successMessage: "Account sync workflow restarted" },
|
|
1089
1084
|
async ({ accountId }) => {
|
|
1090
1085
|
await this.setSyncEnabledOrThrow(accountId, true);
|
|
1091
|
-
|
|
1092
|
-
|
|
1086
|
+
if (isDispatchActive(
|
|
1087
|
+
accountId,
|
|
1088
|
+
this.env.SYNC_DISPATCH_ACCOUNT_IDS,
|
|
1089
|
+
this.env.CRON_SYNC_WORKFLOW_DISPATCH
|
|
1090
|
+
)) {
|
|
1091
|
+
const instanceId = buildDispatchInstanceId(accountId, Date.now());
|
|
1092
|
+
const maxIterations = bank.parseIterationBudgetParam(
|
|
1093
|
+
this.env.SYNC_WORKFLOW_MAX_ITERATIONS
|
|
1094
|
+
);
|
|
1095
|
+
let instance2;
|
|
1096
|
+
try {
|
|
1097
|
+
instance2 = await this.env.SYNC_ACCOUNT_PAYMENTS_WORKFLOW.create(
|
|
1098
|
+
buildDispatchCreateOptions(instanceId, accountId, maxIterations)
|
|
1099
|
+
);
|
|
1100
|
+
} catch (err) {
|
|
1101
|
+
if (!isAlreadyExists(err)) throw err;
|
|
1102
|
+
instance2 = await this.env.SYNC_ACCOUNT_PAYMENTS_WORKFLOW.get(instanceId);
|
|
1103
|
+
await instance2.restart();
|
|
1104
|
+
}
|
|
1105
|
+
return {
|
|
1106
|
+
instanceId: instance2.id,
|
|
1107
|
+
details: await instance2.status()
|
|
1108
|
+
};
|
|
1109
|
+
}
|
|
1110
|
+
let instance;
|
|
1111
|
+
try {
|
|
1112
|
+
const existing = await this.getCurrentSyncInstance(accountId);
|
|
1113
|
+
await existing.restart();
|
|
1114
|
+
instance = existing;
|
|
1115
|
+
} catch (err) {
|
|
1116
|
+
if (!isInstanceNotFound(err)) throw err;
|
|
1117
|
+
}
|
|
1118
|
+
if (!instance) {
|
|
1119
|
+
instance = await this.env.SYNC_ACCOUNT_PAYMENTS_WORKFLOW.create({
|
|
1120
|
+
id: accountId,
|
|
1121
|
+
params: { accountId }
|
|
1122
|
+
});
|
|
1123
|
+
}
|
|
1093
1124
|
return {
|
|
1094
1125
|
instanceId: instance.id,
|
|
1095
1126
|
details: await instance.status()
|
package/dist/base.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
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.
|
|
2
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.
|
|
1
|
+
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.D3w3JIsQ.cjs';
|
|
2
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.CggHtT3y.cjs';
|
|
3
3
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
4
4
|
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
5
5
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
@@ -2825,9 +2825,9 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2825
2825
|
limit: z.ZodNumber;
|
|
2826
2826
|
sort: z.ZodObject<{
|
|
2827
2827
|
column: z.ZodEnum<{
|
|
2828
|
+
amount: "amount";
|
|
2828
2829
|
createdAt: "createdAt";
|
|
2829
2830
|
updatedAt: "updatedAt";
|
|
2830
|
-
amount: "amount";
|
|
2831
2831
|
}>;
|
|
2832
2832
|
direction: z.ZodEnum<{
|
|
2833
2833
|
asc: "asc";
|
|
@@ -2957,19 +2957,19 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2957
2957
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2958
2958
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2959
2959
|
PROCESSING: "PROCESSING";
|
|
2960
|
-
BOOKED: "BOOKED";
|
|
2961
|
-
REJECTED: "REJECTED";
|
|
2962
2960
|
PENDING: "PENDING";
|
|
2961
|
+
BOOKED: "BOOKED";
|
|
2963
2962
|
CANCELLED: "CANCELLED";
|
|
2963
|
+
REJECTED: "REJECTED";
|
|
2964
2964
|
SCHEDULED: "SCHEDULED";
|
|
2965
2965
|
HOLD: "HOLD";
|
|
2966
2966
|
INFO: "INFO";
|
|
2967
2967
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2968
2968
|
PROCESSING: "PROCESSING";
|
|
2969
|
-
BOOKED: "BOOKED";
|
|
2970
|
-
REJECTED: "REJECTED";
|
|
2971
2969
|
PENDING: "PENDING";
|
|
2970
|
+
BOOKED: "BOOKED";
|
|
2972
2971
|
CANCELLED: "CANCELLED";
|
|
2972
|
+
REJECTED: "REJECTED";
|
|
2973
2973
|
SCHEDULED: "SCHEDULED";
|
|
2974
2974
|
HOLD: "HOLD";
|
|
2975
2975
|
INFO: "INFO";
|
|
@@ -3892,9 +3892,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3892
3892
|
limit: z.ZodNumber;
|
|
3893
3893
|
sort: z.ZodObject<{
|
|
3894
3894
|
column: z.ZodEnum<{
|
|
3895
|
+
amount: "amount";
|
|
3895
3896
|
createdAt: "createdAt";
|
|
3896
3897
|
updatedAt: "updatedAt";
|
|
3897
|
-
amount: "amount";
|
|
3898
3898
|
}>;
|
|
3899
3899
|
direction: z.ZodEnum<{
|
|
3900
3900
|
asc: "asc";
|
|
@@ -3905,18 +3905,18 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3905
3905
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3906
3906
|
AUTHORIZED: "AUTHORIZED";
|
|
3907
3907
|
COMPLETED: "COMPLETED";
|
|
3908
|
-
OPENED: "OPENED";
|
|
3909
3908
|
BOOKED: "BOOKED";
|
|
3910
|
-
SETTLED: "SETTLED";
|
|
3911
3909
|
REJECTED: "REJECTED";
|
|
3910
|
+
OPENED: "OPENED";
|
|
3911
|
+
SETTLED: "SETTLED";
|
|
3912
3912
|
CLOSED: "CLOSED";
|
|
3913
3913
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3914
3914
|
AUTHORIZED: "AUTHORIZED";
|
|
3915
3915
|
COMPLETED: "COMPLETED";
|
|
3916
|
-
OPENED: "OPENED";
|
|
3917
3916
|
BOOKED: "BOOKED";
|
|
3918
|
-
SETTLED: "SETTLED";
|
|
3919
3917
|
REJECTED: "REJECTED";
|
|
3918
|
+
OPENED: "OPENED";
|
|
3919
|
+
SETTLED: "SETTLED";
|
|
3920
3920
|
CLOSED: "CLOSED";
|
|
3921
3921
|
}>>]>>;
|
|
3922
3922
|
filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
package/dist/base.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
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.
|
|
2
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.
|
|
1
|
+
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.D3w3JIsQ.mjs';
|
|
2
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.CDB7SWNr.mjs';
|
|
3
3
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
4
4
|
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
5
5
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
@@ -2825,9 +2825,9 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2825
2825
|
limit: z.ZodNumber;
|
|
2826
2826
|
sort: z.ZodObject<{
|
|
2827
2827
|
column: z.ZodEnum<{
|
|
2828
|
+
amount: "amount";
|
|
2828
2829
|
createdAt: "createdAt";
|
|
2829
2830
|
updatedAt: "updatedAt";
|
|
2830
|
-
amount: "amount";
|
|
2831
2831
|
}>;
|
|
2832
2832
|
direction: z.ZodEnum<{
|
|
2833
2833
|
asc: "asc";
|
|
@@ -2957,19 +2957,19 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2957
2957
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2958
2958
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2959
2959
|
PROCESSING: "PROCESSING";
|
|
2960
|
-
BOOKED: "BOOKED";
|
|
2961
|
-
REJECTED: "REJECTED";
|
|
2962
2960
|
PENDING: "PENDING";
|
|
2961
|
+
BOOKED: "BOOKED";
|
|
2963
2962
|
CANCELLED: "CANCELLED";
|
|
2963
|
+
REJECTED: "REJECTED";
|
|
2964
2964
|
SCHEDULED: "SCHEDULED";
|
|
2965
2965
|
HOLD: "HOLD";
|
|
2966
2966
|
INFO: "INFO";
|
|
2967
2967
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2968
2968
|
PROCESSING: "PROCESSING";
|
|
2969
|
-
BOOKED: "BOOKED";
|
|
2970
|
-
REJECTED: "REJECTED";
|
|
2971
2969
|
PENDING: "PENDING";
|
|
2970
|
+
BOOKED: "BOOKED";
|
|
2972
2971
|
CANCELLED: "CANCELLED";
|
|
2972
|
+
REJECTED: "REJECTED";
|
|
2973
2973
|
SCHEDULED: "SCHEDULED";
|
|
2974
2974
|
HOLD: "HOLD";
|
|
2975
2975
|
INFO: "INFO";
|
|
@@ -3892,9 +3892,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3892
3892
|
limit: z.ZodNumber;
|
|
3893
3893
|
sort: z.ZodObject<{
|
|
3894
3894
|
column: z.ZodEnum<{
|
|
3895
|
+
amount: "amount";
|
|
3895
3896
|
createdAt: "createdAt";
|
|
3896
3897
|
updatedAt: "updatedAt";
|
|
3897
|
-
amount: "amount";
|
|
3898
3898
|
}>;
|
|
3899
3899
|
direction: z.ZodEnum<{
|
|
3900
3900
|
asc: "asc";
|
|
@@ -3905,18 +3905,18 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3905
3905
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3906
3906
|
AUTHORIZED: "AUTHORIZED";
|
|
3907
3907
|
COMPLETED: "COMPLETED";
|
|
3908
|
-
OPENED: "OPENED";
|
|
3909
3908
|
BOOKED: "BOOKED";
|
|
3910
|
-
SETTLED: "SETTLED";
|
|
3911
3909
|
REJECTED: "REJECTED";
|
|
3910
|
+
OPENED: "OPENED";
|
|
3911
|
+
SETTLED: "SETTLED";
|
|
3912
3912
|
CLOSED: "CLOSED";
|
|
3913
3913
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3914
3914
|
AUTHORIZED: "AUTHORIZED";
|
|
3915
3915
|
COMPLETED: "COMPLETED";
|
|
3916
|
-
OPENED: "OPENED";
|
|
3917
3916
|
BOOKED: "BOOKED";
|
|
3918
|
-
SETTLED: "SETTLED";
|
|
3919
3917
|
REJECTED: "REJECTED";
|
|
3918
|
+
OPENED: "OPENED";
|
|
3919
|
+
SETTLED: "SETTLED";
|
|
3920
3920
|
CLOSED: "CLOSED";
|
|
3921
3921
|
}>>]>>;
|
|
3922
3922
|
filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
package/dist/base.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
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.
|
|
2
|
-
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.
|
|
1
|
+
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.D3w3JIsQ.js';
|
|
2
|
+
import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.DhMeQgpB.js';
|
|
3
3
|
import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
|
|
4
4
|
import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
|
|
5
5
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
@@ -2825,9 +2825,9 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2825
2825
|
limit: z.ZodNumber;
|
|
2826
2826
|
sort: z.ZodObject<{
|
|
2827
2827
|
column: z.ZodEnum<{
|
|
2828
|
+
amount: "amount";
|
|
2828
2829
|
createdAt: "createdAt";
|
|
2829
2830
|
updatedAt: "updatedAt";
|
|
2830
|
-
amount: "amount";
|
|
2831
2831
|
}>;
|
|
2832
2832
|
direction: z.ZodEnum<{
|
|
2833
2833
|
asc: "asc";
|
|
@@ -2957,19 +2957,19 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2957
2957
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2958
2958
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2959
2959
|
PROCESSING: "PROCESSING";
|
|
2960
|
-
BOOKED: "BOOKED";
|
|
2961
|
-
REJECTED: "REJECTED";
|
|
2962
2960
|
PENDING: "PENDING";
|
|
2961
|
+
BOOKED: "BOOKED";
|
|
2963
2962
|
CANCELLED: "CANCELLED";
|
|
2963
|
+
REJECTED: "REJECTED";
|
|
2964
2964
|
SCHEDULED: "SCHEDULED";
|
|
2965
2965
|
HOLD: "HOLD";
|
|
2966
2966
|
INFO: "INFO";
|
|
2967
2967
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2968
2968
|
PROCESSING: "PROCESSING";
|
|
2969
|
-
BOOKED: "BOOKED";
|
|
2970
|
-
REJECTED: "REJECTED";
|
|
2971
2969
|
PENDING: "PENDING";
|
|
2970
|
+
BOOKED: "BOOKED";
|
|
2972
2971
|
CANCELLED: "CANCELLED";
|
|
2972
|
+
REJECTED: "REJECTED";
|
|
2973
2973
|
SCHEDULED: "SCHEDULED";
|
|
2974
2974
|
HOLD: "HOLD";
|
|
2975
2975
|
INFO: "INFO";
|
|
@@ -3892,9 +3892,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3892
3892
|
limit: z.ZodNumber;
|
|
3893
3893
|
sort: z.ZodObject<{
|
|
3894
3894
|
column: z.ZodEnum<{
|
|
3895
|
+
amount: "amount";
|
|
3895
3896
|
createdAt: "createdAt";
|
|
3896
3897
|
updatedAt: "updatedAt";
|
|
3897
|
-
amount: "amount";
|
|
3898
3898
|
}>;
|
|
3899
3899
|
direction: z.ZodEnum<{
|
|
3900
3900
|
asc: "asc";
|
|
@@ -3905,18 +3905,18 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3905
3905
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3906
3906
|
AUTHORIZED: "AUTHORIZED";
|
|
3907
3907
|
COMPLETED: "COMPLETED";
|
|
3908
|
-
OPENED: "OPENED";
|
|
3909
3908
|
BOOKED: "BOOKED";
|
|
3910
|
-
SETTLED: "SETTLED";
|
|
3911
3909
|
REJECTED: "REJECTED";
|
|
3910
|
+
OPENED: "OPENED";
|
|
3911
|
+
SETTLED: "SETTLED";
|
|
3912
3912
|
CLOSED: "CLOSED";
|
|
3913
3913
|
}>, z.ZodArray<z.ZodEnum<{
|
|
3914
3914
|
AUTHORIZED: "AUTHORIZED";
|
|
3915
3915
|
COMPLETED: "COMPLETED";
|
|
3916
|
-
OPENED: "OPENED";
|
|
3917
3916
|
BOOKED: "BOOKED";
|
|
3918
|
-
SETTLED: "SETTLED";
|
|
3919
3917
|
REJECTED: "REJECTED";
|
|
3918
|
+
OPENED: "OPENED";
|
|
3919
|
+
SETTLED: "SETTLED";
|
|
3920
3920
|
CLOSED: "CLOSED";
|
|
3921
3921
|
}>>]>>;
|
|
3922
3922
|
filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
package/dist/base.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { uuidv4, first, buildMultiFilterConditions as buildMultiFilterConditions$1, bankAccountMetadataSchema, structuredAddressSchema, workflowInstanceStatusSchema, develitWorker, createInternalError, action, service } from '@develit-io/backend-sdk';
|
|
2
2
|
import { G as tables, g as accountInsertSchema, H as relations, o as isProcessedStatus, p as isTerminalStatus, L as getNonTerminalPaymentRequestsQuery, x as toIncomingPayment, N as calculateCzechIban, j as assignAccount, u as toBatchedPayment, y as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from './shared/bank.kz-PKVi5.mjs';
|
|
3
|
-
import { j as encrypt, d as createCredentialsResolver, i as initiateConnector,
|
|
3
|
+
import { j as encrypt, d as createCredentialsResolver, i as initiateConnector, p as parseIterationBudgetParam, e as updatePaymentRequestStatusCommand, a as getPaymentRequestsByBatchIdQuery, g as getBatchByIdQuery, u as upsertBatchCommand, b as getAccountByIdQuery, k as resolveCurrentSyncInstanceId, l as importAesKey, h as createPaymentCommand } from './shared/bank.DAjqsBQN.mjs';
|
|
4
4
|
import { eq, sql, and, like, asc, desc, inArray, gte, lte, isNull, count } from 'drizzle-orm';
|
|
5
5
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
6
6
|
import { drizzle } from 'drizzle-orm/d1';
|
|
@@ -125,8 +125,13 @@ function buildDispatchCreateOptions(instanceId, accountId, maxIterations) {
|
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
function isAlreadyExists(err) {
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
return /already exists/i.test(extractMessage(err));
|
|
129
|
+
}
|
|
130
|
+
function isInstanceNotFound(err) {
|
|
131
|
+
return /instance.*not.?found|not.?found.*instance/i.test(extractMessage(err));
|
|
132
|
+
}
|
|
133
|
+
function extractMessage(err) {
|
|
134
|
+
return err instanceof Error ? err.message : typeof err === "object" && err !== null && "message" in err ? String(err.message) : "";
|
|
130
135
|
}
|
|
131
136
|
|
|
132
137
|
const DEFAULT_MIN_GRACE_MS = 3 * 60 * 1e3;
|
|
@@ -1020,17 +1025,7 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
1020
1025
|
{ data: input, schema: syncAccountInputSchema },
|
|
1021
1026
|
{ successMessage: "Account sync workflow started" },
|
|
1022
1027
|
async ({ accountId }) => {
|
|
1023
|
-
|
|
1024
|
-
if (!account) {
|
|
1025
|
-
throw accountNotFoundError();
|
|
1026
|
-
}
|
|
1027
|
-
if (!account.syncEnabled) {
|
|
1028
|
-
throw createInternalError(null, {
|
|
1029
|
-
message: `Account sync is disabled for ${accountId}. Enable it via restart-sync first.`,
|
|
1030
|
-
code: "VALID-B-018",
|
|
1031
|
-
status: 422
|
|
1032
|
-
});
|
|
1033
|
-
}
|
|
1028
|
+
await this.setSyncEnabledOrThrow(accountId, true);
|
|
1034
1029
|
if (isDispatchActive(
|
|
1035
1030
|
accountId,
|
|
1036
1031
|
this.env.SYNC_DISPATCH_ACCOUNT_IDS,
|
|
@@ -1086,8 +1081,44 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
1086
1081
|
{ successMessage: "Account sync workflow restarted" },
|
|
1087
1082
|
async ({ accountId }) => {
|
|
1088
1083
|
await this.setSyncEnabledOrThrow(accountId, true);
|
|
1089
|
-
|
|
1090
|
-
|
|
1084
|
+
if (isDispatchActive(
|
|
1085
|
+
accountId,
|
|
1086
|
+
this.env.SYNC_DISPATCH_ACCOUNT_IDS,
|
|
1087
|
+
this.env.CRON_SYNC_WORKFLOW_DISPATCH
|
|
1088
|
+
)) {
|
|
1089
|
+
const instanceId = buildDispatchInstanceId(accountId, Date.now());
|
|
1090
|
+
const maxIterations = parseIterationBudgetParam(
|
|
1091
|
+
this.env.SYNC_WORKFLOW_MAX_ITERATIONS
|
|
1092
|
+
);
|
|
1093
|
+
let instance2;
|
|
1094
|
+
try {
|
|
1095
|
+
instance2 = await this.env.SYNC_ACCOUNT_PAYMENTS_WORKFLOW.create(
|
|
1096
|
+
buildDispatchCreateOptions(instanceId, accountId, maxIterations)
|
|
1097
|
+
);
|
|
1098
|
+
} catch (err) {
|
|
1099
|
+
if (!isAlreadyExists(err)) throw err;
|
|
1100
|
+
instance2 = await this.env.SYNC_ACCOUNT_PAYMENTS_WORKFLOW.get(instanceId);
|
|
1101
|
+
await instance2.restart();
|
|
1102
|
+
}
|
|
1103
|
+
return {
|
|
1104
|
+
instanceId: instance2.id,
|
|
1105
|
+
details: await instance2.status()
|
|
1106
|
+
};
|
|
1107
|
+
}
|
|
1108
|
+
let instance;
|
|
1109
|
+
try {
|
|
1110
|
+
const existing = await this.getCurrentSyncInstance(accountId);
|
|
1111
|
+
await existing.restart();
|
|
1112
|
+
instance = existing;
|
|
1113
|
+
} catch (err) {
|
|
1114
|
+
if (!isInstanceNotFound(err)) throw err;
|
|
1115
|
+
}
|
|
1116
|
+
if (!instance) {
|
|
1117
|
+
instance = await this.env.SYNC_ACCOUNT_PAYMENTS_WORKFLOW.create({
|
|
1118
|
+
id: accountId,
|
|
1119
|
+
params: { accountId }
|
|
1120
|
+
});
|
|
1121
|
+
}
|
|
1091
1122
|
return {
|
|
1092
1123
|
instanceId: instance.id,
|
|
1093
1124
|
details: await instance.status()
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aC as account, aD as accountCredentials, aE as batch, aF as ott, aG as payment, aH as paymentRequest } from '../shared/bank.
|
|
1
|
+
export { aC as account, aD as accountCredentials, aE as batch, aF as ott, aG as payment, aH as paymentRequest } from '../shared/bank.D3w3JIsQ.cjs';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
3
|
import 'drizzle-orm';
|
|
4
4
|
import '@develit-io/general-codes';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aC as account, aD as accountCredentials, aE as batch, aF as ott, aG as payment, aH as paymentRequest } from '../shared/bank.
|
|
1
|
+
export { aC as account, aD as accountCredentials, aE as batch, aF as ott, aG as payment, aH as paymentRequest } from '../shared/bank.D3w3JIsQ.mjs';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
3
|
import 'drizzle-orm';
|
|
4
4
|
import '@develit-io/general-codes';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aC as account, aD as accountCredentials, aE as batch, aF as ott, aG as payment, aH as paymentRequest } from '../shared/bank.
|
|
1
|
+
export { aC as account, aD as accountCredentials, aE as batch, aF as ott, aG as payment, aH as paymentRequest } from '../shared/bank.D3w3JIsQ.js';
|
|
2
2
|
import 'drizzle-orm/sqlite-core';
|
|
3
3
|
import 'drizzle-orm';
|
|
4
4
|
import '@develit-io/general-codes';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as CurrencyCode, S as BankCode, a2 as CountryCode, P as PaymentRequestSelectType } from './bank.
|
|
1
|
+
import { e as CurrencyCode, S as BankCode, a2 as CountryCode, P as PaymentRequestSelectType } from './bank.D3w3JIsQ.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as CurrencyCode, S as BankCode, a2 as CountryCode, P as PaymentRequestSelectType } from './bank.
|
|
1
|
+
import { e as CurrencyCode, S as BankCode, a2 as CountryCode, P as PaymentRequestSelectType } from './bank.D3w3JIsQ.cjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
|
|
@@ -3656,7 +3656,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3656
3656
|
name: string;
|
|
3657
3657
|
tableName: "payment";
|
|
3658
3658
|
dataType: "string enum";
|
|
3659
|
-
data: "PROCESSING" | "
|
|
3659
|
+
data: "PROCESSING" | "PENDING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
3660
3660
|
driverParam: string;
|
|
3661
3661
|
notNull: true;
|
|
3662
3662
|
hasDefault: false;
|
|
@@ -4160,7 +4160,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
4160
4160
|
name: string;
|
|
4161
4161
|
tableName: "payment_request";
|
|
4162
4162
|
dataType: "string enum";
|
|
4163
|
-
data: "AUTHORIZED" | "COMPLETED" | "
|
|
4163
|
+
data: "AUTHORIZED" | "COMPLETED" | "BOOKED" | "REJECTED" | "OPENED" | "SETTLED" | "CLOSED";
|
|
4164
4164
|
driverParam: string;
|
|
4165
4165
|
notNull: true;
|
|
4166
4166
|
hasDefault: false;
|
|
@@ -3656,7 +3656,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3656
3656
|
name: string;
|
|
3657
3657
|
tableName: "payment";
|
|
3658
3658
|
dataType: "string enum";
|
|
3659
|
-
data: "PROCESSING" | "
|
|
3659
|
+
data: "PROCESSING" | "PENDING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
3660
3660
|
driverParam: string;
|
|
3661
3661
|
notNull: true;
|
|
3662
3662
|
hasDefault: false;
|
|
@@ -4160,7 +4160,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
4160
4160
|
name: string;
|
|
4161
4161
|
tableName: "payment_request";
|
|
4162
4162
|
dataType: "string enum";
|
|
4163
|
-
data: "AUTHORIZED" | "COMPLETED" | "
|
|
4163
|
+
data: "AUTHORIZED" | "COMPLETED" | "BOOKED" | "REJECTED" | "OPENED" | "SETTLED" | "CLOSED";
|
|
4164
4164
|
driverParam: string;
|
|
4165
4165
|
notNull: true;
|
|
4166
4166
|
hasDefault: false;
|
|
@@ -3656,7 +3656,7 @@ declare const payment: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3656
3656
|
name: string;
|
|
3657
3657
|
tableName: "payment";
|
|
3658
3658
|
dataType: "string enum";
|
|
3659
|
-
data: "PROCESSING" | "
|
|
3659
|
+
data: "PROCESSING" | "PENDING" | "BOOKED" | "CANCELLED" | "REJECTED" | "SCHEDULED" | "HOLD" | "INFO";
|
|
3660
3660
|
driverParam: string;
|
|
3661
3661
|
notNull: true;
|
|
3662
3662
|
hasDefault: false;
|
|
@@ -4160,7 +4160,7 @@ declare const paymentRequest: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
4160
4160
|
name: string;
|
|
4161
4161
|
tableName: "payment_request";
|
|
4162
4162
|
dataType: "string enum";
|
|
4163
|
-
data: "AUTHORIZED" | "COMPLETED" | "
|
|
4163
|
+
data: "AUTHORIZED" | "COMPLETED" | "BOOKED" | "REJECTED" | "OPENED" | "SETTLED" | "CLOSED";
|
|
4164
4164
|
driverParam: string;
|
|
4165
4165
|
notNull: true;
|
|
4166
4166
|
hasDefault: false;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as CurrencyCode, S as BankCode, a2 as CountryCode, P as PaymentRequestSelectType } from './bank.
|
|
1
|
+
import { e as CurrencyCode, S as BankCode, a2 as CountryCode, P as PaymentRequestSelectType } from './bank.D3w3JIsQ.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
type ReferenceType = `${'VS' | 'SS' | 'KS'}:${number}`;
|
package/dist/types.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, E as EndToEndIdPayment, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.
|
|
2
|
-
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, F as AccountCredentialsUpdateType, G as AccountPatchType, J as AccountStatus, K as AccountUpdateType, M as AuthorizedBatch, N as BASE_TERMINAL_STATUSES, O as BATCH_MODES, Q as BATCH_STATUES, Q as BATCH_STATUSES, R as BankAccountWithLastSync, S as BankCode, T as BatchInsertType, U as BatchLifecycle, V as BatchMode, W as BatchPayment, B as BatchSelectType, X as BatchStatus, Y as CHARGE_BEARERS, Z as CONNECTOR_KEYS, _ as COUNTRY_CODES, $ as CREDENTIALS_TYPES, a0 as ChargeBearer, a1 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a2 as CountryCode, a3 as CredentialsType, e as CurrencyCode, a4 as INSTRUCTION_PRIORITIES, a5 as InstructionPriority, L as LastSyncMetadata, a6 as PAYMENT_DIRECTIONS, a7 as PAYMENT_REQUEST_STATUSES, a8 as PAYMENT_STATUSES, a9 as PAYMENT_TYPES, aa as PaymentDirection, ab as PaymentFailedInsertType, ac as PaymentInsertType, ad as PaymentLifecycle, ae as PaymentPreparedInsertType, af as PaymentStatus, ag as ProcessingBatch, ah as ReadyToSignBatch, ai as ResolvedCredentials, aj as TOKEN_TYPES, ak as TokenType, al as accountCredentialsInsertSchema, am as accountCredentialsSelectSchema, an as accountCredentialsUpdateSchema, ao as accountInsertSchema, ap as accountSelectSchema, aq as accountUpdateSchema, ar as hasPaymentAccountAssigned, as as isBatchAuthorized, at as isBatchCompleted, au as isBatchFailed, av as isBatchInitiated, aw as isBatchProcessing, ax as isBatchReadyToSign, ay as isPaymentCompleted, az as isPendingStatus, aA as isProcessedStatus, aB as isTerminalStatus } from './shared/bank.
|
|
3
|
-
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.
|
|
4
|
-
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.
|
|
1
|
+
import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, E as EndToEndIdPayment, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.D3w3JIsQ.cjs';
|
|
2
|
+
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, F as AccountCredentialsUpdateType, G as AccountPatchType, J as AccountStatus, K as AccountUpdateType, M as AuthorizedBatch, N as BASE_TERMINAL_STATUSES, O as BATCH_MODES, Q as BATCH_STATUES, Q as BATCH_STATUSES, R as BankAccountWithLastSync, S as BankCode, T as BatchInsertType, U as BatchLifecycle, V as BatchMode, W as BatchPayment, B as BatchSelectType, X as BatchStatus, Y as CHARGE_BEARERS, Z as CONNECTOR_KEYS, _ as COUNTRY_CODES, $ as CREDENTIALS_TYPES, a0 as ChargeBearer, a1 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a2 as CountryCode, a3 as CredentialsType, e as CurrencyCode, a4 as INSTRUCTION_PRIORITIES, a5 as InstructionPriority, L as LastSyncMetadata, a6 as PAYMENT_DIRECTIONS, a7 as PAYMENT_REQUEST_STATUSES, a8 as PAYMENT_STATUSES, a9 as PAYMENT_TYPES, aa as PaymentDirection, ab as PaymentFailedInsertType, ac as PaymentInsertType, ad as PaymentLifecycle, ae as PaymentPreparedInsertType, af as PaymentStatus, ag as ProcessingBatch, ah as ReadyToSignBatch, ai as ResolvedCredentials, aj as TOKEN_TYPES, ak as TokenType, al as accountCredentialsInsertSchema, am as accountCredentialsSelectSchema, an as accountCredentialsUpdateSchema, ao as accountInsertSchema, ap as accountSelectSchema, aq as accountUpdateSchema, ar as hasPaymentAccountAssigned, as as isBatchAuthorized, at as isBatchCompleted, au as isBatchFailed, av as isBatchInitiated, aw as isBatchProcessing, ax as isBatchReadyToSign, ay as isPaymentCompleted, az as isPendingStatus, aA as isProcessedStatus, aB as isTerminalStatus } from './shared/bank.D3w3JIsQ.cjs';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.CggHtT3y.cjs';
|
|
4
|
+
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.CggHtT3y.cjs';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
7
7
|
import * as drizzle_orm_zod from 'drizzle-orm/zod';
|
package/dist/types.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, E as EndToEndIdPayment, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.
|
|
2
|
-
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, F as AccountCredentialsUpdateType, G as AccountPatchType, J as AccountStatus, K as AccountUpdateType, M as AuthorizedBatch, N as BASE_TERMINAL_STATUSES, O as BATCH_MODES, Q as BATCH_STATUES, Q as BATCH_STATUSES, R as BankAccountWithLastSync, S as BankCode, T as BatchInsertType, U as BatchLifecycle, V as BatchMode, W as BatchPayment, B as BatchSelectType, X as BatchStatus, Y as CHARGE_BEARERS, Z as CONNECTOR_KEYS, _ as COUNTRY_CODES, $ as CREDENTIALS_TYPES, a0 as ChargeBearer, a1 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a2 as CountryCode, a3 as CredentialsType, e as CurrencyCode, a4 as INSTRUCTION_PRIORITIES, a5 as InstructionPriority, L as LastSyncMetadata, a6 as PAYMENT_DIRECTIONS, a7 as PAYMENT_REQUEST_STATUSES, a8 as PAYMENT_STATUSES, a9 as PAYMENT_TYPES, aa as PaymentDirection, ab as PaymentFailedInsertType, ac as PaymentInsertType, ad as PaymentLifecycle, ae as PaymentPreparedInsertType, af as PaymentStatus, ag as ProcessingBatch, ah as ReadyToSignBatch, ai as ResolvedCredentials, aj as TOKEN_TYPES, ak as TokenType, al as accountCredentialsInsertSchema, am as accountCredentialsSelectSchema, an as accountCredentialsUpdateSchema, ao as accountInsertSchema, ap as accountSelectSchema, aq as accountUpdateSchema, ar as hasPaymentAccountAssigned, as as isBatchAuthorized, at as isBatchCompleted, au as isBatchFailed, av as isBatchInitiated, aw as isBatchProcessing, ax as isBatchReadyToSign, ay as isPaymentCompleted, az as isPendingStatus, aA as isProcessedStatus, aB as isTerminalStatus } from './shared/bank.
|
|
3
|
-
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.
|
|
4
|
-
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.
|
|
1
|
+
import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, E as EndToEndIdPayment, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.D3w3JIsQ.mjs';
|
|
2
|
+
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, F as AccountCredentialsUpdateType, G as AccountPatchType, J as AccountStatus, K as AccountUpdateType, M as AuthorizedBatch, N as BASE_TERMINAL_STATUSES, O as BATCH_MODES, Q as BATCH_STATUES, Q as BATCH_STATUSES, R as BankAccountWithLastSync, S as BankCode, T as BatchInsertType, U as BatchLifecycle, V as BatchMode, W as BatchPayment, B as BatchSelectType, X as BatchStatus, Y as CHARGE_BEARERS, Z as CONNECTOR_KEYS, _ as COUNTRY_CODES, $ as CREDENTIALS_TYPES, a0 as ChargeBearer, a1 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a2 as CountryCode, a3 as CredentialsType, e as CurrencyCode, a4 as INSTRUCTION_PRIORITIES, a5 as InstructionPriority, L as LastSyncMetadata, a6 as PAYMENT_DIRECTIONS, a7 as PAYMENT_REQUEST_STATUSES, a8 as PAYMENT_STATUSES, a9 as PAYMENT_TYPES, aa as PaymentDirection, ab as PaymentFailedInsertType, ac as PaymentInsertType, ad as PaymentLifecycle, ae as PaymentPreparedInsertType, af as PaymentStatus, ag as ProcessingBatch, ah as ReadyToSignBatch, ai as ResolvedCredentials, aj as TOKEN_TYPES, ak as TokenType, al as accountCredentialsInsertSchema, am as accountCredentialsSelectSchema, an as accountCredentialsUpdateSchema, ao as accountInsertSchema, ap as accountSelectSchema, aq as accountUpdateSchema, ar as hasPaymentAccountAssigned, as as isBatchAuthorized, at as isBatchCompleted, au as isBatchFailed, av as isBatchInitiated, aw as isBatchProcessing, ax as isBatchReadyToSign, ay as isPaymentCompleted, az as isPendingStatus, aA as isProcessedStatus, aB as isTerminalStatus } from './shared/bank.D3w3JIsQ.mjs';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.CDB7SWNr.mjs';
|
|
4
|
+
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.CDB7SWNr.mjs';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
7
7
|
import * as drizzle_orm_zod from 'drizzle-orm/zod';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, E as EndToEndIdPayment, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.
|
|
2
|
-
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, F as AccountCredentialsUpdateType, G as AccountPatchType, J as AccountStatus, K as AccountUpdateType, M as AuthorizedBatch, N as BASE_TERMINAL_STATUSES, O as BATCH_MODES, Q as BATCH_STATUES, Q as BATCH_STATUSES, R as BankAccountWithLastSync, S as BankCode, T as BatchInsertType, U as BatchLifecycle, V as BatchMode, W as BatchPayment, B as BatchSelectType, X as BatchStatus, Y as CHARGE_BEARERS, Z as CONNECTOR_KEYS, _ as COUNTRY_CODES, $ as CREDENTIALS_TYPES, a0 as ChargeBearer, a1 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a2 as CountryCode, a3 as CredentialsType, e as CurrencyCode, a4 as INSTRUCTION_PRIORITIES, a5 as InstructionPriority, L as LastSyncMetadata, a6 as PAYMENT_DIRECTIONS, a7 as PAYMENT_REQUEST_STATUSES, a8 as PAYMENT_STATUSES, a9 as PAYMENT_TYPES, aa as PaymentDirection, ab as PaymentFailedInsertType, ac as PaymentInsertType, ad as PaymentLifecycle, ae as PaymentPreparedInsertType, af as PaymentStatus, ag as ProcessingBatch, ah as ReadyToSignBatch, ai as ResolvedCredentials, aj as TOKEN_TYPES, ak as TokenType, al as accountCredentialsInsertSchema, am as accountCredentialsSelectSchema, an as accountCredentialsUpdateSchema, ao as accountInsertSchema, ap as accountSelectSchema, aq as accountUpdateSchema, ar as hasPaymentAccountAssigned, as as isBatchAuthorized, at as isBatchCompleted, au as isBatchFailed, av as isBatchInitiated, aw as isBatchProcessing, ax as isBatchReadyToSign, ay as isPaymentCompleted, az as isPendingStatus, aA as isProcessedStatus, aB as isTerminalStatus } from './shared/bank.
|
|
3
|
-
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.
|
|
4
|
-
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.
|
|
1
|
+
import { I as IBankConnector, b as ConnectorKey, g as ConnectedAccount, d as PaymentType, h as CredentialsResolver, i as AccountCredentialsInsertType, j as AccountInsertType, k as BatchedPayment, l as InitiatedBatch, E as EndToEndIdPayment, m as IncomingPayment, n as InitiatedPayment, A as AccountSelectType, o as ParsedBankPayment, p as PaymentRequestStatus, q as AuthorizationCallbackResult, r as BatchMetadata, s as Currency, a as PaymentSelectType, P as PaymentRequestSelectType, u as AccountAssignedPayment, v as PreparedPayment, w as CompletedPayment, x as PaymentRequestInsertType } from './shared/bank.D3w3JIsQ.js';
|
|
2
|
+
export { y as ACCOUNT_STATUSES, z as AccountCredentialsPatchType, D as AccountCredentialsSelectType, F as AccountCredentialsUpdateType, G as AccountPatchType, J as AccountStatus, K as AccountUpdateType, M as AuthorizedBatch, N as BASE_TERMINAL_STATUSES, O as BATCH_MODES, Q as BATCH_STATUES, Q as BATCH_STATUSES, R as BankAccountWithLastSync, S as BankCode, T as BatchInsertType, U as BatchLifecycle, V as BatchMode, W as BatchPayment, B as BatchSelectType, X as BatchStatus, Y as CHARGE_BEARERS, Z as CONNECTOR_KEYS, _ as COUNTRY_CODES, $ as CREDENTIALS_TYPES, a0 as ChargeBearer, a1 as CompletedBatch, c as ConfigEnvironmentBank, C as ConnectorConfig, a2 as CountryCode, a3 as CredentialsType, e as CurrencyCode, a4 as INSTRUCTION_PRIORITIES, a5 as InstructionPriority, L as LastSyncMetadata, a6 as PAYMENT_DIRECTIONS, a7 as PAYMENT_REQUEST_STATUSES, a8 as PAYMENT_STATUSES, a9 as PAYMENT_TYPES, aa as PaymentDirection, ab as PaymentFailedInsertType, ac as PaymentInsertType, ad as PaymentLifecycle, ae as PaymentPreparedInsertType, af as PaymentStatus, ag as ProcessingBatch, ah as ReadyToSignBatch, ai as ResolvedCredentials, aj as TOKEN_TYPES, ak as TokenType, al as accountCredentialsInsertSchema, am as accountCredentialsSelectSchema, an as accountCredentialsUpdateSchema, ao as accountInsertSchema, ap as accountSelectSchema, aq as accountUpdateSchema, ar as hasPaymentAccountAssigned, as as isBatchAuthorized, at as isBatchCompleted, au as isBatchFailed, av as isBatchInitiated, aw as isBatchProcessing, ax as isBatchReadyToSign, ay as isPaymentCompleted, az as isPendingStatus, aA as isProcessedStatus, aB as isTerminalStatus } from './shared/bank.D3w3JIsQ.js';
|
|
3
|
+
import { d as FinbricksAccount, R as ReferenceType, S as SendPaymentInput } from './shared/bank.DhMeQgpB.js';
|
|
4
|
+
export { e as FinbricksAccountTransactionsResponse, f as FinbricksAccountsListResponse, g as FinbricksAuthTokenResponse, h as FinbricksBatchResponse, i as FinbricksConnectAccountResponse, j as FinbricksPaymentResponse, k as FinbricksSupportedBank, F as FinbricksSupportedBanksResponse, b as SendPaymentSyncInput } from './shared/bank.DhMeQgpB.js';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { BaseEvent } from '@develit-io/backend-sdk';
|
|
7
7
|
import * as drizzle_orm_zod from 'drizzle-orm/zod';
|