@develit-services/bank 5.9.1 → 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 +45 -4
- package/dist/base.d.cts +15 -15
- package/dist/base.d.mts +15 -15
- package/dist/base.d.ts +15 -15
- package/dist/base.mjs +45 -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/shared/{bank.D19D3a9C.d.mts → bank.CDB7SWNr.d.mts} +1 -1
- package/dist/shared/{bank.DZyrkXc_.d.cts → bank.CggHtT3y.d.cts} +1 -1
- package/dist/shared/{bank.CgiEbvJu.d.cts → bank.D3w3JIsQ.d.cts} +3 -3
- package/dist/shared/{bank.CgiEbvJu.d.mts → bank.D3w3JIsQ.d.mts} +3 -3
- package/dist/shared/{bank.CgiEbvJu.d.ts → bank.D3w3JIsQ.d.ts} +3 -3
- package/dist/shared/{bank.-8YAJoxw.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;
|
|
@@ -1078,8 +1083,44 @@ exports.BankServiceBase = class BankServiceBase extends backendSdk.develitWorker
|
|
|
1078
1083
|
{ successMessage: "Account sync workflow restarted" },
|
|
1079
1084
|
async ({ accountId }) => {
|
|
1080
1085
|
await this.setSyncEnabledOrThrow(accountId, true);
|
|
1081
|
-
|
|
1082
|
-
|
|
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
|
+
}
|
|
1083
1124
|
return {
|
|
1084
1125
|
instanceId: instance.id,
|
|
1085
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';
|
|
@@ -2699,9 +2699,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2699
2699
|
limit: z.ZodNumber;
|
|
2700
2700
|
sort: z.ZodObject<{
|
|
2701
2701
|
column: z.ZodEnum<{
|
|
2702
|
+
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2702
2703
|
createdAt: "createdAt";
|
|
2703
2704
|
updatedAt: "updatedAt";
|
|
2704
|
-
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2705
2705
|
}>;
|
|
2706
2706
|
direction: z.ZodEnum<{
|
|
2707
2707
|
asc: "asc";
|
|
@@ -2711,15 +2711,15 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2711
2711
|
filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
2712
2712
|
filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2713
2713
|
AUTHORIZED: "AUTHORIZED";
|
|
2714
|
-
COMPLETED: "COMPLETED";
|
|
2715
2714
|
PROCESSING: "PROCESSING";
|
|
2716
2715
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2716
|
+
COMPLETED: "COMPLETED";
|
|
2717
2717
|
FAILED: "FAILED";
|
|
2718
2718
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2719
2719
|
AUTHORIZED: "AUTHORIZED";
|
|
2720
|
-
COMPLETED: "COMPLETED";
|
|
2721
2720
|
PROCESSING: "PROCESSING";
|
|
2722
2721
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2722
|
+
COMPLETED: "COMPLETED";
|
|
2723
2723
|
FAILED: "FAILED";
|
|
2724
2724
|
}>>]>>;
|
|
2725
2725
|
}, z.core.$strip>;
|
|
@@ -2956,20 +2956,20 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2956
2956
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
2957
2957
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2958
2958
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2959
|
-
BOOKED: "BOOKED";
|
|
2960
|
-
REJECTED: "REJECTED";
|
|
2961
|
-
PENDING: "PENDING";
|
|
2962
2959
|
PROCESSING: "PROCESSING";
|
|
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
|
-
BOOKED: "BOOKED";
|
|
2969
|
-
REJECTED: "REJECTED";
|
|
2970
|
-
PENDING: "PENDING";
|
|
2971
2968
|
PROCESSING: "PROCESSING";
|
|
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";
|
|
@@ -3903,20 +3903,20 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3903
3903
|
}, z.core.$strip>;
|
|
3904
3904
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3905
3905
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3906
|
-
OPENED: "OPENED";
|
|
3907
3906
|
AUTHORIZED: "AUTHORIZED";
|
|
3908
3907
|
COMPLETED: "COMPLETED";
|
|
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
|
-
OPENED: "OPENED";
|
|
3915
3914
|
AUTHORIZED: "AUTHORIZED";
|
|
3916
3915
|
COMPLETED: "COMPLETED";
|
|
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';
|
|
@@ -2699,9 +2699,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2699
2699
|
limit: z.ZodNumber;
|
|
2700
2700
|
sort: z.ZodObject<{
|
|
2701
2701
|
column: z.ZodEnum<{
|
|
2702
|
+
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2702
2703
|
createdAt: "createdAt";
|
|
2703
2704
|
updatedAt: "updatedAt";
|
|
2704
|
-
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2705
2705
|
}>;
|
|
2706
2706
|
direction: z.ZodEnum<{
|
|
2707
2707
|
asc: "asc";
|
|
@@ -2711,15 +2711,15 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2711
2711
|
filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
2712
2712
|
filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2713
2713
|
AUTHORIZED: "AUTHORIZED";
|
|
2714
|
-
COMPLETED: "COMPLETED";
|
|
2715
2714
|
PROCESSING: "PROCESSING";
|
|
2716
2715
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2716
|
+
COMPLETED: "COMPLETED";
|
|
2717
2717
|
FAILED: "FAILED";
|
|
2718
2718
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2719
2719
|
AUTHORIZED: "AUTHORIZED";
|
|
2720
|
-
COMPLETED: "COMPLETED";
|
|
2721
2720
|
PROCESSING: "PROCESSING";
|
|
2722
2721
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2722
|
+
COMPLETED: "COMPLETED";
|
|
2723
2723
|
FAILED: "FAILED";
|
|
2724
2724
|
}>>]>>;
|
|
2725
2725
|
}, z.core.$strip>;
|
|
@@ -2956,20 +2956,20 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2956
2956
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
2957
2957
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2958
2958
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2959
|
-
BOOKED: "BOOKED";
|
|
2960
|
-
REJECTED: "REJECTED";
|
|
2961
|
-
PENDING: "PENDING";
|
|
2962
2959
|
PROCESSING: "PROCESSING";
|
|
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
|
-
BOOKED: "BOOKED";
|
|
2969
|
-
REJECTED: "REJECTED";
|
|
2970
|
-
PENDING: "PENDING";
|
|
2971
2968
|
PROCESSING: "PROCESSING";
|
|
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";
|
|
@@ -3903,20 +3903,20 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3903
3903
|
}, z.core.$strip>;
|
|
3904
3904
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3905
3905
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3906
|
-
OPENED: "OPENED";
|
|
3907
3906
|
AUTHORIZED: "AUTHORIZED";
|
|
3908
3907
|
COMPLETED: "COMPLETED";
|
|
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
|
-
OPENED: "OPENED";
|
|
3915
3914
|
AUTHORIZED: "AUTHORIZED";
|
|
3916
3915
|
COMPLETED: "COMPLETED";
|
|
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';
|
|
@@ -2699,9 +2699,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2699
2699
|
limit: z.ZodNumber;
|
|
2700
2700
|
sort: z.ZodObject<{
|
|
2701
2701
|
column: z.ZodEnum<{
|
|
2702
|
+
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2702
2703
|
createdAt: "createdAt";
|
|
2703
2704
|
updatedAt: "updatedAt";
|
|
2704
|
-
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
2705
2705
|
}>;
|
|
2706
2706
|
direction: z.ZodEnum<{
|
|
2707
2707
|
asc: "asc";
|
|
@@ -2711,15 +2711,15 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
2711
2711
|
filterBatchAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
2712
2712
|
filterBatchStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2713
2713
|
AUTHORIZED: "AUTHORIZED";
|
|
2714
|
-
COMPLETED: "COMPLETED";
|
|
2715
2714
|
PROCESSING: "PROCESSING";
|
|
2716
2715
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2716
|
+
COMPLETED: "COMPLETED";
|
|
2717
2717
|
FAILED: "FAILED";
|
|
2718
2718
|
}>, z.ZodArray<z.ZodEnum<{
|
|
2719
2719
|
AUTHORIZED: "AUTHORIZED";
|
|
2720
|
-
COMPLETED: "COMPLETED";
|
|
2721
2720
|
PROCESSING: "PROCESSING";
|
|
2722
2721
|
READY_TO_SIGN: "READY_TO_SIGN";
|
|
2722
|
+
COMPLETED: "COMPLETED";
|
|
2723
2723
|
FAILED: "FAILED";
|
|
2724
2724
|
}>>]>>;
|
|
2725
2725
|
}, z.core.$strip>;
|
|
@@ -2956,20 +2956,20 @@ declare const getPaymentsInputSchema: z.ZodObject<{
|
|
|
2956
2956
|
filterPaymentDateFrom: z.ZodOptional<z.ZodDate>;
|
|
2957
2957
|
filterPaymentDateTo: z.ZodOptional<z.ZodDate>;
|
|
2958
2958
|
filterPaymentStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
2959
|
-
BOOKED: "BOOKED";
|
|
2960
|
-
REJECTED: "REJECTED";
|
|
2961
|
-
PENDING: "PENDING";
|
|
2962
2959
|
PROCESSING: "PROCESSING";
|
|
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
|
-
BOOKED: "BOOKED";
|
|
2969
|
-
REJECTED: "REJECTED";
|
|
2970
|
-
PENDING: "PENDING";
|
|
2971
2968
|
PROCESSING: "PROCESSING";
|
|
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";
|
|
@@ -3903,20 +3903,20 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
|
|
|
3903
3903
|
}, z.core.$strip>;
|
|
3904
3904
|
filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
|
|
3905
3905
|
filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
3906
|
-
OPENED: "OPENED";
|
|
3907
3906
|
AUTHORIZED: "AUTHORIZED";
|
|
3908
3907
|
COMPLETED: "COMPLETED";
|
|
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
|
-
OPENED: "OPENED";
|
|
3915
3914
|
AUTHORIZED: "AUTHORIZED";
|
|
3916
3915
|
COMPLETED: "COMPLETED";
|
|
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
|
@@ -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;
|
|
@@ -1076,8 +1081,44 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
1076
1081
|
{ successMessage: "Account sync workflow restarted" },
|
|
1077
1082
|
async ({ accountId }) => {
|
|
1078
1083
|
await this.setSyncEnabledOrThrow(accountId, true);
|
|
1079
|
-
|
|
1080
|
-
|
|
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
|
+
}
|
|
1081
1122
|
return {
|
|
1082
1123
|
instanceId: instance.id,
|
|
1083
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}`;
|
|
@@ -3280,7 +3280,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3280
3280
|
name: string;
|
|
3281
3281
|
tableName: "batch";
|
|
3282
3282
|
dataType: "string enum";
|
|
3283
|
-
data: "AUTHORIZED" | "
|
|
3283
|
+
data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
|
|
3284
3284
|
driverParam: string;
|
|
3285
3285
|
notNull: false;
|
|
3286
3286
|
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: "
|
|
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: "
|
|
4163
|
+
data: "AUTHORIZED" | "COMPLETED" | "BOOKED" | "REJECTED" | "OPENED" | "SETTLED" | "CLOSED";
|
|
4164
4164
|
driverParam: string;
|
|
4165
4165
|
notNull: true;
|
|
4166
4166
|
hasDefault: false;
|
|
@@ -3280,7 +3280,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3280
3280
|
name: string;
|
|
3281
3281
|
tableName: "batch";
|
|
3282
3282
|
dataType: "string enum";
|
|
3283
|
-
data: "AUTHORIZED" | "
|
|
3283
|
+
data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
|
|
3284
3284
|
driverParam: string;
|
|
3285
3285
|
notNull: false;
|
|
3286
3286
|
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: "
|
|
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: "
|
|
4163
|
+
data: "AUTHORIZED" | "COMPLETED" | "BOOKED" | "REJECTED" | "OPENED" | "SETTLED" | "CLOSED";
|
|
4164
4164
|
driverParam: string;
|
|
4165
4165
|
notNull: true;
|
|
4166
4166
|
hasDefault: false;
|
|
@@ -3280,7 +3280,7 @@ declare const batch: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
|
3280
3280
|
name: string;
|
|
3281
3281
|
tableName: "batch";
|
|
3282
3282
|
dataType: "string enum";
|
|
3283
|
-
data: "AUTHORIZED" | "
|
|
3283
|
+
data: "AUTHORIZED" | "PROCESSING" | "READY_TO_SIGN" | "COMPLETED" | "FAILED";
|
|
3284
3284
|
driverParam: string;
|
|
3285
3285
|
notNull: false;
|
|
3286
3286
|
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: "
|
|
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: "
|
|
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';
|