@develit-services/bank 5.7.1 → 5.9.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.
Files changed (36) hide show
  1. package/dist/base.cjs +296 -32
  2. package/dist/base.d.cts +38 -11
  3. package/dist/base.d.mts +38 -11
  4. package/dist/base.d.ts +38 -11
  5. package/dist/base.mjs +296 -32
  6. package/dist/database/schema.cjs +1 -1
  7. package/dist/database/schema.d.cts +1 -1
  8. package/dist/database/schema.d.mts +1 -1
  9. package/dist/database/schema.d.ts +1 -1
  10. package/dist/database/schema.mjs +1 -1
  11. package/dist/export/workflows.cjs +213 -42
  12. package/dist/export/workflows.d.cts +1 -0
  13. package/dist/export/workflows.d.mts +1 -0
  14. package/dist/export/workflows.d.ts +1 -0
  15. package/dist/export/workflows.mjs +214 -43
  16. package/dist/service.d.cts +3 -0
  17. package/dist/service.d.mts +3 -0
  18. package/dist/service.d.ts +3 -0
  19. package/dist/shared/{bank.BzDNLxB_.mjs → bank.BT7HayCV.mjs} +4 -0
  20. package/dist/shared/{bank.BUzoc8p6.d.cts → bank.Bhh_O_5-.d.mts} +1 -1
  21. package/dist/shared/{bank.DZ3Ow4bP.d.mts → bank.BhyIbhvK.d.cts} +1 -1
  22. package/dist/shared/{bank.CBpXmaTL.d.ts → bank.Bnc_DoG4.d.ts} +1 -1
  23. package/dist/shared/{bank.CQjuudum.cjs → bank.BsWBG0gb.cjs} +1 -1
  24. package/dist/shared/{bank.9Yw4KHyl.cjs → bank.Ca3jzmIb.cjs} +4 -0
  25. package/dist/shared/{bank.DLU1sOBm.mjs → bank.DAjqsBQN.mjs} +30 -3
  26. package/dist/shared/{bank.B0DNtuUM.cjs → bank.DBTtRCcf.cjs} +33 -2
  27. package/dist/shared/{bank.BVXtqHnq.mjs → bank.kz-PKVi5.mjs} +1 -1
  28. package/dist/shared/{bank.BQwwtIR4.d.ts → bank.mkq4IlpC.d.cts} +68 -2
  29. package/dist/shared/{bank.BQwwtIR4.d.cts → bank.mkq4IlpC.d.mts} +68 -2
  30. package/dist/shared/{bank.BQwwtIR4.d.mts → bank.mkq4IlpC.d.ts} +68 -2
  31. package/dist/types.cjs +2 -2
  32. package/dist/types.d.cts +4 -4
  33. package/dist/types.d.mts +4 -4
  34. package/dist/types.d.ts +4 -4
  35. package/dist/types.mjs +2 -2
  36. package/package.json +1 -1
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.BQwwtIR4.mjs';
2
- import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.DZ3Ow4bP.mjs';
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.mkq4IlpC.mjs';
2
+ import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.Bhh_O_5-.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';
@@ -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
- PENDING: "PENDING";
2961
2960
  BOOKED: "BOOKED";
2962
- CANCELLED: "CANCELLED";
2963
2961
  REJECTED: "REJECTED";
2962
+ PENDING: "PENDING";
2963
+ CANCELLED: "CANCELLED";
2964
2964
  SCHEDULED: "SCHEDULED";
2965
2965
  HOLD: "HOLD";
2966
2966
  INFO: "INFO";
2967
2967
  }>, z.ZodArray<z.ZodEnum<{
2968
2968
  PROCESSING: "PROCESSING";
2969
- PENDING: "PENDING";
2970
2969
  BOOKED: "BOOKED";
2971
- CANCELLED: "CANCELLED";
2972
2970
  REJECTED: "REJECTED";
2971
+ PENDING: "PENDING";
2972
+ CANCELLED: "CANCELLED";
2973
2973
  SCHEDULED: "SCHEDULED";
2974
2974
  HOLD: "HOLD";
2975
2975
  INFO: "INFO";
@@ -3114,7 +3114,8 @@ declare const syncAccountTerminateInputSchema: z.ZodObject<{
3114
3114
  accountId: z.ZodUUID;
3115
3115
  }, z.core.$strip>;
3116
3116
  declare const syncAccountTerminateOutputSchema: z.ZodObject<{
3117
- instanceId: z.ZodString;
3117
+ terminated: z.ZodBoolean;
3118
+ instanceId: z.ZodNullable<z.ZodString>;
3118
3119
  }, z.core.$strip>;
3119
3120
  interface SyncAccountTerminateInput extends z.infer<typeof syncAccountTerminateInputSchema> {
3120
3121
  }
@@ -3266,6 +3267,22 @@ declare const updateAccountInputSchema: z.ZodObject<{
3266
3267
  identity: undefined;
3267
3268
  generated: undefined;
3268
3269
  }, {}>;
3270
+ syncEnabled: drizzle_orm_sqlite_core.SQLiteColumn<{
3271
+ name: string;
3272
+ tableName: "account";
3273
+ dataType: "boolean";
3274
+ data: boolean;
3275
+ driverParam: number;
3276
+ notNull: true;
3277
+ hasDefault: true;
3278
+ isPrimaryKey: false;
3279
+ isAutoincrement: false;
3280
+ hasRuntimeDefault: false;
3281
+ enumValues: undefined;
3282
+ baseColumn: never;
3283
+ identity: undefined;
3284
+ generated: undefined;
3285
+ }, {}>;
3269
3286
  syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
3270
3287
  name: string;
3271
3288
  tableName: "account";
@@ -3888,18 +3905,18 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3888
3905
  filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
3889
3906
  AUTHORIZED: "AUTHORIZED";
3890
3907
  COMPLETED: "COMPLETED";
3891
- BOOKED: "BOOKED";
3892
- REJECTED: "REJECTED";
3893
3908
  OPENED: "OPENED";
3909
+ BOOKED: "BOOKED";
3894
3910
  SETTLED: "SETTLED";
3911
+ REJECTED: "REJECTED";
3895
3912
  CLOSED: "CLOSED";
3896
3913
  }>, z.ZodArray<z.ZodEnum<{
3897
3914
  AUTHORIZED: "AUTHORIZED";
3898
3915
  COMPLETED: "COMPLETED";
3899
- BOOKED: "BOOKED";
3900
- REJECTED: "REJECTED";
3901
3916
  OPENED: "OPENED";
3917
+ BOOKED: "BOOKED";
3902
3918
  SETTLED: "SETTLED";
3919
+ REJECTED: "REJECTED";
3903
3920
  CLOSED: "CLOSED";
3904
3921
  }>>]>>;
3905
3922
  filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
@@ -4092,6 +4109,7 @@ declare class BankServiceBase extends BankServiceBase_base {
4092
4109
  status: "AUTHORIZED" | "DISABLED" | "EXPIRED";
4093
4110
  bankRefId: string;
4094
4111
  batchSizeLimit: number;
4112
+ syncEnabled: boolean;
4095
4113
  syncIntervalS: number;
4096
4114
  lastSyncAt: Date | null;
4097
4115
  lastSyncMetadata: LastSyncMetadata | null;
@@ -4127,6 +4145,7 @@ declare class BankServiceBase extends BankServiceBase_base {
4127
4145
  status: "AUTHORIZED" | "DISABLED" | "EXPIRED";
4128
4146
  bankRefId: string;
4129
4147
  batchSizeLimit: number;
4148
+ syncEnabled: boolean;
4130
4149
  syncIntervalS: number;
4131
4150
  lastSyncAt: Date | null;
4132
4151
  lastSyncMetadata: LastSyncMetadata | null;
@@ -4193,6 +4212,14 @@ declare class BankServiceBase extends BankServiceBase_base {
4193
4212
  statusChanged: number;
4194
4213
  }>>;
4195
4214
  scheduled(controller: ScheduledController): Promise<void>;
4215
+ /**
4216
+ * Lifecycle actions must target the instance that actually syncs the
4217
+ * account — under dispatch that is the windowed instance recorded with the
4218
+ * last sync write, not the legacy canonical id.
4219
+ */
4220
+ private setSyncEnabledOrThrow;
4221
+ private getCurrentSyncInstance;
4222
+ private dispatchSyncWorkflows;
4196
4223
  private heartbeatSyncWorkflows;
4197
4224
  handleAuthorizationCallback(input: HandleAuthorizationCallbackInput): Promise<IRPCResponse<HandleAuthorizationCallbackOutput>>;
4198
4225
  closePaymentRequest(input: ClosePaymentRequestInput): Promise<IRPCResponse<ClosePaymentRequestOutput>>;
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.BQwwtIR4.js';
2
- import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.CBpXmaTL.js';
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.mkq4IlpC.js';
2
+ import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.Bnc_DoG4.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';
@@ -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
- PENDING: "PENDING";
2961
2960
  BOOKED: "BOOKED";
2962
- CANCELLED: "CANCELLED";
2963
2961
  REJECTED: "REJECTED";
2962
+ PENDING: "PENDING";
2963
+ CANCELLED: "CANCELLED";
2964
2964
  SCHEDULED: "SCHEDULED";
2965
2965
  HOLD: "HOLD";
2966
2966
  INFO: "INFO";
2967
2967
  }>, z.ZodArray<z.ZodEnum<{
2968
2968
  PROCESSING: "PROCESSING";
2969
- PENDING: "PENDING";
2970
2969
  BOOKED: "BOOKED";
2971
- CANCELLED: "CANCELLED";
2972
2970
  REJECTED: "REJECTED";
2971
+ PENDING: "PENDING";
2972
+ CANCELLED: "CANCELLED";
2973
2973
  SCHEDULED: "SCHEDULED";
2974
2974
  HOLD: "HOLD";
2975
2975
  INFO: "INFO";
@@ -3114,7 +3114,8 @@ declare const syncAccountTerminateInputSchema: z.ZodObject<{
3114
3114
  accountId: z.ZodUUID;
3115
3115
  }, z.core.$strip>;
3116
3116
  declare const syncAccountTerminateOutputSchema: z.ZodObject<{
3117
- instanceId: z.ZodString;
3117
+ terminated: z.ZodBoolean;
3118
+ instanceId: z.ZodNullable<z.ZodString>;
3118
3119
  }, z.core.$strip>;
3119
3120
  interface SyncAccountTerminateInput extends z.infer<typeof syncAccountTerminateInputSchema> {
3120
3121
  }
@@ -3266,6 +3267,22 @@ declare const updateAccountInputSchema: z.ZodObject<{
3266
3267
  identity: undefined;
3267
3268
  generated: undefined;
3268
3269
  }, {}>;
3270
+ syncEnabled: drizzle_orm_sqlite_core.SQLiteColumn<{
3271
+ name: string;
3272
+ tableName: "account";
3273
+ dataType: "boolean";
3274
+ data: boolean;
3275
+ driverParam: number;
3276
+ notNull: true;
3277
+ hasDefault: true;
3278
+ isPrimaryKey: false;
3279
+ isAutoincrement: false;
3280
+ hasRuntimeDefault: false;
3281
+ enumValues: undefined;
3282
+ baseColumn: never;
3283
+ identity: undefined;
3284
+ generated: undefined;
3285
+ }, {}>;
3269
3286
  syncIntervalS: drizzle_orm_sqlite_core.SQLiteColumn<{
3270
3287
  name: string;
3271
3288
  tableName: "account";
@@ -3888,18 +3905,18 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3888
3905
  filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
3889
3906
  AUTHORIZED: "AUTHORIZED";
3890
3907
  COMPLETED: "COMPLETED";
3891
- BOOKED: "BOOKED";
3892
- REJECTED: "REJECTED";
3893
3908
  OPENED: "OPENED";
3909
+ BOOKED: "BOOKED";
3894
3910
  SETTLED: "SETTLED";
3911
+ REJECTED: "REJECTED";
3895
3912
  CLOSED: "CLOSED";
3896
3913
  }>, z.ZodArray<z.ZodEnum<{
3897
3914
  AUTHORIZED: "AUTHORIZED";
3898
3915
  COMPLETED: "COMPLETED";
3899
- BOOKED: "BOOKED";
3900
- REJECTED: "REJECTED";
3901
3916
  OPENED: "OPENED";
3917
+ BOOKED: "BOOKED";
3902
3918
  SETTLED: "SETTLED";
3919
+ REJECTED: "REJECTED";
3903
3920
  CLOSED: "CLOSED";
3904
3921
  }>>]>>;
3905
3922
  filterPaymentType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
@@ -4092,6 +4109,7 @@ declare class BankServiceBase extends BankServiceBase_base {
4092
4109
  status: "AUTHORIZED" | "DISABLED" | "EXPIRED";
4093
4110
  bankRefId: string;
4094
4111
  batchSizeLimit: number;
4112
+ syncEnabled: boolean;
4095
4113
  syncIntervalS: number;
4096
4114
  lastSyncAt: Date | null;
4097
4115
  lastSyncMetadata: LastSyncMetadata | null;
@@ -4127,6 +4145,7 @@ declare class BankServiceBase extends BankServiceBase_base {
4127
4145
  status: "AUTHORIZED" | "DISABLED" | "EXPIRED";
4128
4146
  bankRefId: string;
4129
4147
  batchSizeLimit: number;
4148
+ syncEnabled: boolean;
4130
4149
  syncIntervalS: number;
4131
4150
  lastSyncAt: Date | null;
4132
4151
  lastSyncMetadata: LastSyncMetadata | null;
@@ -4193,6 +4212,14 @@ declare class BankServiceBase extends BankServiceBase_base {
4193
4212
  statusChanged: number;
4194
4213
  }>>;
4195
4214
  scheduled(controller: ScheduledController): Promise<void>;
4215
+ /**
4216
+ * Lifecycle actions must target the instance that actually syncs the
4217
+ * account — under dispatch that is the windowed instance recorded with the
4218
+ * last sync write, not the legacy canonical id.
4219
+ */
4220
+ private setSyncEnabledOrThrow;
4221
+ private getCurrentSyncInstance;
4222
+ private dispatchSyncWorkflows;
4196
4223
  private heartbeatSyncWorkflows;
4197
4224
  handleAuthorizationCallback(input: HandleAuthorizationCallbackInput): Promise<IRPCResponse<HandleAuthorizationCallbackOutput>>;
4198
4225
  closePaymentRequest(input: ClosePaymentRequestInput): Promise<IRPCResponse<ClosePaymentRequestOutput>>;