@develit-services/bank 4.4.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
3
  const backendSdk = require('@develit-io/backend-sdk');
4
- const ott_zod = require('../shared/bank.BSX82jhx.cjs');
4
+ const ott_zod = require('./shared/bank.BSX82jhx.cjs');
5
5
  const drizzleOrm = require('drizzle-orm');
6
6
  const cloudflare_workers = require('cloudflare:workers');
7
7
  const d1 = require('drizzle-orm/d1');
8
8
  require('jose');
9
9
  const zod = require('zod');
10
- const database_schema = require('../shared/bank.9Yw4KHyl.cjs');
10
+ const database_schema = require('./shared/bank.9Yw4KHyl.cjs');
11
11
  const generalCodes = require('@develit-io/general-codes');
12
12
  require('date-fns');
13
13
  require('node:crypto');
14
- const credentialsResolver = require('../shared/bank.CibQRM2D.cjs');
14
+ const credentialsResolver = require('./shared/bank.CibQRM2D.cjs');
15
15
  require('drizzle-orm/zod');
16
16
  require('drizzle-orm/sqlite-core');
17
17
 
@@ -684,7 +684,7 @@ var __decorateClass = (decorators, target, key, kind) => {
684
684
  if (kind && result) __defProp(target, key, result);
685
685
  return result;
686
686
  };
687
- let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.WorkerEntrypoint) {
687
+ exports.BankServiceBase = class BankServiceBase extends backendSdk.develitWorker(cloudflare_workers.WorkerEntrypoint) {
688
688
  constructor(ctx, env, config) {
689
689
  super(ctx, env);
690
690
  this.allowedProviders = [];
@@ -1997,71 +1997,71 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
1997
1997
  };
1998
1998
  __decorateClass([
1999
1999
  backendSdk.action("get-payments")
2000
- ], BankServiceBase.prototype, "getPayments", 1);
2000
+ ], exports.BankServiceBase.prototype, "getPayments", 1);
2001
2001
  __decorateClass([
2002
2002
  backendSdk.action("sync-account")
2003
- ], BankServiceBase.prototype, "syncAccount", 1);
2003
+ ], exports.BankServiceBase.prototype, "syncAccount", 1);
2004
2004
  __decorateClass([
2005
2005
  backendSdk.action("synchronize-accounts")
2006
- ], BankServiceBase.prototype, "syncAccounts", 1);
2006
+ ], exports.BankServiceBase.prototype, "syncAccounts", 1);
2007
2007
  __decorateClass([
2008
2008
  backendSdk.action("update-payment-request-statuses")
2009
- ], BankServiceBase.prototype, "updatePaymentRequestStatuses", 1);
2009
+ ], exports.BankServiceBase.prototype, "updatePaymentRequestStatuses", 1);
2010
2010
  __decorateClass([
2011
2011
  backendSdk.action("scheduled")
2012
- ], BankServiceBase.prototype, "scheduled", 1);
2012
+ ], exports.BankServiceBase.prototype, "scheduled", 1);
2013
2013
  __decorateClass([
2014
2014
  backendSdk.action("handle-authorization-callback")
2015
- ], BankServiceBase.prototype, "handleAuthorizationCallback", 1);
2015
+ ], exports.BankServiceBase.prototype, "handleAuthorizationCallback", 1);
2016
2016
  __decorateClass([
2017
2017
  backendSdk.action("process-batch")
2018
- ], BankServiceBase.prototype, "processBatch", 1);
2018
+ ], exports.BankServiceBase.prototype, "processBatch", 1);
2019
2019
  __decorateClass([
2020
2020
  backendSdk.action("get-auth-uri")
2021
- ], BankServiceBase.prototype, "getAuthUri", 1);
2021
+ ], exports.BankServiceBase.prototype, "getAuthUri", 1);
2022
2022
  __decorateClass([
2023
2023
  backendSdk.action("authorize-account")
2024
- ], BankServiceBase.prototype, "authorizeAccount", 1);
2024
+ ], exports.BankServiceBase.prototype, "authorizeAccount", 1);
2025
2025
  __decorateClass([
2026
2026
  backendSdk.action("simulate-deposit")
2027
- ], BankServiceBase.prototype, "simulateDeposit", 1);
2027
+ ], exports.BankServiceBase.prototype, "simulateDeposit", 1);
2028
2028
  __decorateClass([
2029
2029
  backendSdk.action("send-payment")
2030
- ], BankServiceBase.prototype, "sendPayment", 1);
2030
+ ], exports.BankServiceBase.prototype, "sendPayment", 1);
2031
2031
  __decorateClass([
2032
2032
  backendSdk.action("send-payment-sync")
2033
- ], BankServiceBase.prototype, "sendPaymentSync", 1);
2033
+ ], exports.BankServiceBase.prototype, "sendPaymentSync", 1);
2034
2034
  __decorateClass([
2035
2035
  backendSdk.action("send-batch")
2036
- ], BankServiceBase.prototype, "sendBatch", 1);
2036
+ ], exports.BankServiceBase.prototype, "sendBatch", 1);
2037
2037
  __decorateClass([
2038
2038
  backendSdk.action("get-bank-accounts")
2039
- ], BankServiceBase.prototype, "getBankAccounts", 1);
2039
+ ], exports.BankServiceBase.prototype, "getBankAccounts", 1);
2040
2040
  __decorateClass([
2041
2041
  backendSdk.action("get-account-balance")
2042
- ], BankServiceBase.prototype, "getAccountBalance", 1);
2042
+ ], exports.BankServiceBase.prototype, "getAccountBalance", 1);
2043
2043
  __decorateClass([
2044
2044
  backendSdk.action("update-account")
2045
- ], BankServiceBase.prototype, "updateAccount", 1);
2045
+ ], exports.BankServiceBase.prototype, "updateAccount", 1);
2046
2046
  __decorateClass([
2047
2047
  backendSdk.action("disconnectAccount")
2048
- ], BankServiceBase.prototype, "disconnectAccount", 1);
2048
+ ], exports.BankServiceBase.prototype, "disconnectAccount", 1);
2049
2049
  __decorateClass([
2050
2050
  backendSdk.action("getBatches")
2051
- ], BankServiceBase.prototype, "getBatches", 1);
2051
+ ], exports.BankServiceBase.prototype, "getBatches", 1);
2052
2052
  __decorateClass([
2053
2053
  backendSdk.action("get-payment-requests")
2054
- ], BankServiceBase.prototype, "getPaymentRequests", 1);
2054
+ ], exports.BankServiceBase.prototype, "getPaymentRequests", 1);
2055
2055
  __decorateClass([
2056
2056
  backendSdk.action("get-payment-request")
2057
- ], BankServiceBase.prototype, "getPaymentRequest", 1);
2058
- BankServiceBase = __decorateClass([
2057
+ ], exports.BankServiceBase.prototype, "getPaymentRequest", 1);
2058
+ exports.BankServiceBase = __decorateClass([
2059
2059
  backendSdk.service("bank")
2060
- ], BankServiceBase);
2060
+ ], exports.BankServiceBase);
2061
2061
  function defineBankService({
2062
2062
  config
2063
2063
  }) {
2064
- return class BankService extends BankServiceBase {
2064
+ return class BankService extends exports.BankServiceBase {
2065
2065
  constructor(ctx, env) {
2066
2066
  super(ctx, env, config);
2067
2067
  }
@@ -1,6 +1,6 @@
1
1
  import * as drizzle_orm from 'drizzle-orm';
2
- import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, b as ConfigEnvironmentBank, t as tables, c as ConnectorKey, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from '../shared/bank.BCqBwSKC.js';
3
- import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.BmX_IG66.js';
2
+ import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.BJTq7Qw9.cjs';
3
+ import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.wFDtecu7.cjs';
4
4
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
5
5
  import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
6
6
  import { WorkerEntrypoint } from 'cloudflare:workers';
@@ -2691,9 +2691,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
2691
2691
  limit: z.ZodNumber;
2692
2692
  sort: z.ZodObject<{
2693
2693
  column: z.ZodEnum<{
2694
+ batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
2694
2695
  createdAt: "createdAt";
2695
2696
  updatedAt: "updatedAt";
2696
- batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
2697
2697
  }>;
2698
2698
  direction: z.ZodEnum<{
2699
2699
  asc: "asc";
@@ -2817,9 +2817,9 @@ declare const getPaymentsInputSchema: z.ZodObject<{
2817
2817
  limit: z.ZodNumber;
2818
2818
  sort: z.ZodObject<{
2819
2819
  column: z.ZodEnum<{
2820
+ amount: "amount";
2820
2821
  createdAt: "createdAt";
2821
2822
  updatedAt: "updatedAt";
2822
- amount: "amount";
2823
2823
  }>;
2824
2824
  direction: z.ZodEnum<{
2825
2825
  asc: "asc";
@@ -3585,9 +3585,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3585
3585
  limit: z.ZodNumber;
3586
3586
  sort: z.ZodObject<{
3587
3587
  column: z.ZodEnum<{
3588
+ amount: "amount";
3588
3589
  createdAt: "createdAt";
3589
3590
  updatedAt: "updatedAt";
3590
- amount: "amount";
3591
3591
  }>;
3592
3592
  direction: z.ZodEnum<{
3593
3593
  asc: "asc";
@@ -3596,16 +3596,16 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3596
3596
  }, z.core.$strip>;
3597
3597
  filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
3598
3598
  filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
3599
- AUTHORIZED: "AUTHORIZED";
3600
3599
  OPENED: "OPENED";
3600
+ AUTHORIZED: "AUTHORIZED";
3601
3601
  COMPLETED: "COMPLETED";
3602
3602
  BOOKED: "BOOKED";
3603
3603
  SETTLED: "SETTLED";
3604
3604
  REJECTED: "REJECTED";
3605
3605
  CLOSED: "CLOSED";
3606
3606
  }>, z.ZodArray<z.ZodEnum<{
3607
- AUTHORIZED: "AUTHORIZED";
3608
3607
  OPENED: "OPENED";
3608
+ AUTHORIZED: "AUTHORIZED";
3609
3609
  COMPLETED: "COMPLETED";
3610
3610
  BOOKED: "BOOKED";
3611
3611
  SETTLED: "SETTLED";
@@ -3943,4 +3943,4 @@ declare function defineBankService({ config, }: {
3943
3943
  config: ConfigEnvironmentBank;
3944
3944
  }): typeof BankServiceBase;
3945
3945
 
3946
- export { defineBankService };
3946
+ export { BankServiceBase, defineBankService };
@@ -1,6 +1,6 @@
1
1
  import * as drizzle_orm from 'drizzle-orm';
2
- import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, b as ConfigEnvironmentBank, t as tables, c as ConnectorKey, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from '../shared/bank.BCqBwSKC.mjs';
3
- import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.BnCJmT6k.mjs';
2
+ import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.BJTq7Qw9.mjs';
3
+ import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.DXU-wqnl.mjs';
4
4
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
5
5
  import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
6
6
  import { WorkerEntrypoint } from 'cloudflare:workers';
@@ -2691,9 +2691,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
2691
2691
  limit: z.ZodNumber;
2692
2692
  sort: z.ZodObject<{
2693
2693
  column: z.ZodEnum<{
2694
+ batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
2694
2695
  createdAt: "createdAt";
2695
2696
  updatedAt: "updatedAt";
2696
- batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
2697
2697
  }>;
2698
2698
  direction: z.ZodEnum<{
2699
2699
  asc: "asc";
@@ -2817,9 +2817,9 @@ declare const getPaymentsInputSchema: z.ZodObject<{
2817
2817
  limit: z.ZodNumber;
2818
2818
  sort: z.ZodObject<{
2819
2819
  column: z.ZodEnum<{
2820
+ amount: "amount";
2820
2821
  createdAt: "createdAt";
2821
2822
  updatedAt: "updatedAt";
2822
- amount: "amount";
2823
2823
  }>;
2824
2824
  direction: z.ZodEnum<{
2825
2825
  asc: "asc";
@@ -3585,9 +3585,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3585
3585
  limit: z.ZodNumber;
3586
3586
  sort: z.ZodObject<{
3587
3587
  column: z.ZodEnum<{
3588
+ amount: "amount";
3588
3589
  createdAt: "createdAt";
3589
3590
  updatedAt: "updatedAt";
3590
- amount: "amount";
3591
3591
  }>;
3592
3592
  direction: z.ZodEnum<{
3593
3593
  asc: "asc";
@@ -3596,16 +3596,16 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3596
3596
  }, z.core.$strip>;
3597
3597
  filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
3598
3598
  filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
3599
- AUTHORIZED: "AUTHORIZED";
3600
3599
  OPENED: "OPENED";
3600
+ AUTHORIZED: "AUTHORIZED";
3601
3601
  COMPLETED: "COMPLETED";
3602
3602
  BOOKED: "BOOKED";
3603
3603
  SETTLED: "SETTLED";
3604
3604
  REJECTED: "REJECTED";
3605
3605
  CLOSED: "CLOSED";
3606
3606
  }>, z.ZodArray<z.ZodEnum<{
3607
- AUTHORIZED: "AUTHORIZED";
3608
3607
  OPENED: "OPENED";
3608
+ AUTHORIZED: "AUTHORIZED";
3609
3609
  COMPLETED: "COMPLETED";
3610
3610
  BOOKED: "BOOKED";
3611
3611
  SETTLED: "SETTLED";
@@ -3943,4 +3943,4 @@ declare function defineBankService({ config, }: {
3943
3943
  config: ConfigEnvironmentBank;
3944
3944
  }): typeof BankServiceBase;
3945
3945
 
3946
- export { defineBankService };
3946
+ export { BankServiceBase, defineBankService };
@@ -1,6 +1,6 @@
1
1
  import * as drizzle_orm from 'drizzle-orm';
2
- import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, b as ConfigEnvironmentBank, t as tables, c as ConnectorKey, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from '../shared/bank.BCqBwSKC.cjs';
3
- import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from '../shared/bank.mHFTrKBv.cjs';
2
+ import { B as BatchSelectType, P as PaymentRequestSelectType, A as AccountSelectType, a as PaymentSelectType, L as LastSyncMetadata, C as ConnectorConfig, t as tables, b as ConnectorKey, c as ConfigEnvironmentBank, I as IBankConnector, d as PaymentType, e as CurrencyCode, H as HandleAuthorizationCallbackInput, f as HandleAuthorizationCallbackOutput } from './shared/bank.BJTq7Qw9.js';
3
+ import { S as SendPaymentInput, a as SendPaymentOutput, b as SendPaymentSyncInput, c as SendPaymentSyncOutput, F as FinbricksSupportedBanksResponse } from './shared/bank.JAN0kymF.js';
4
4
  import * as _develit_io_backend_sdk from '@develit-io/backend-sdk';
5
5
  import { WorkflowInstanceStatus, IRPCResponse } from '@develit-io/backend-sdk';
6
6
  import { WorkerEntrypoint } from 'cloudflare:workers';
@@ -2691,9 +2691,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
2691
2691
  limit: z.ZodNumber;
2692
2692
  sort: z.ZodObject<{
2693
2693
  column: z.ZodEnum<{
2694
+ batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
2694
2695
  createdAt: "createdAt";
2695
2696
  updatedAt: "updatedAt";
2696
- batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
2697
2697
  }>;
2698
2698
  direction: z.ZodEnum<{
2699
2699
  asc: "asc";
@@ -2817,9 +2817,9 @@ declare const getPaymentsInputSchema: z.ZodObject<{
2817
2817
  limit: z.ZodNumber;
2818
2818
  sort: z.ZodObject<{
2819
2819
  column: z.ZodEnum<{
2820
+ amount: "amount";
2820
2821
  createdAt: "createdAt";
2821
2822
  updatedAt: "updatedAt";
2822
- amount: "amount";
2823
2823
  }>;
2824
2824
  direction: z.ZodEnum<{
2825
2825
  asc: "asc";
@@ -3585,9 +3585,9 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3585
3585
  limit: z.ZodNumber;
3586
3586
  sort: z.ZodObject<{
3587
3587
  column: z.ZodEnum<{
3588
+ amount: "amount";
3588
3589
  createdAt: "createdAt";
3589
3590
  updatedAt: "updatedAt";
3590
- amount: "amount";
3591
3591
  }>;
3592
3592
  direction: z.ZodEnum<{
3593
3593
  asc: "asc";
@@ -3596,16 +3596,16 @@ declare const getPaymentRequestsInputSchema: z.ZodObject<{
3596
3596
  }, z.core.$strip>;
3597
3597
  filterAccountId: z.ZodOptional<z.ZodUnion<readonly [z.ZodUUID, z.ZodArray<z.ZodUUID>]>>;
3598
3598
  filterStatus: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
3599
- AUTHORIZED: "AUTHORIZED";
3600
3599
  OPENED: "OPENED";
3600
+ AUTHORIZED: "AUTHORIZED";
3601
3601
  COMPLETED: "COMPLETED";
3602
3602
  BOOKED: "BOOKED";
3603
3603
  SETTLED: "SETTLED";
3604
3604
  REJECTED: "REJECTED";
3605
3605
  CLOSED: "CLOSED";
3606
3606
  }>, z.ZodArray<z.ZodEnum<{
3607
- AUTHORIZED: "AUTHORIZED";
3608
3607
  OPENED: "OPENED";
3608
+ AUTHORIZED: "AUTHORIZED";
3609
3609
  COMPLETED: "COMPLETED";
3610
3610
  BOOKED: "BOOKED";
3611
3611
  SETTLED: "SETTLED";
@@ -3943,4 +3943,4 @@ declare function defineBankService({ config, }: {
3943
3943
  config: ConfigEnvironmentBank;
3944
3944
  }): typeof BankServiceBase;
3945
3945
 
3946
- export { defineBankService };
3946
+ export { BankServiceBase, defineBankService };
@@ -1,15 +1,15 @@
1
1
  import { bankAccountMetadataSchema, structuredAddressSchema, uuidv4, first, buildMultiFilterConditions as buildMultiFilterConditions$1, workflowInstanceStatusSchema, develitWorker, createInternalError, action, service } from '@develit-io/backend-sdk';
2
- import { G as tables, g as accountInsertSchema, H as relations, J as initiateConnector, o as isProcessedStatus, p as isTerminalStatus, L as getNonTerminalPaymentRequestsQuery, x as toIncomingPayment, j as assignAccount, u as toBatchedPayment, y as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from '../shared/bank.CZ8MQDPa.mjs';
2
+ import { G as tables, g as accountInsertSchema, H as relations, J as initiateConnector, o as isProcessedStatus, p as isTerminalStatus, L as getNonTerminalPaymentRequestsQuery, x as toIncomingPayment, j as assignAccount, u as toBatchedPayment, y as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from './shared/bank.CZ8MQDPa.mjs';
3
3
  import { eq, sql, and, like, asc, desc, inArray, gte, lte, isNull, count } from 'drizzle-orm';
4
4
  import { WorkerEntrypoint } from 'cloudflare:workers';
5
5
  import { drizzle } from 'drizzle-orm/d1';
6
6
  import 'jose';
7
7
  import { z } from 'zod';
8
- import { I as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, g as PAYMENT_TYPES, b as CONNECTOR_KEYS, a as BATCH_STATUSES, f as PAYMENT_STATUSES, P as PAYMENT_DIRECTIONS, e as PAYMENT_REQUEST_STATUSES } from '../shared/bank.BzDNLxB_.mjs';
8
+ import { I as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, g as PAYMENT_TYPES, b as CONNECTOR_KEYS, a as BATCH_STATUSES, f as PAYMENT_STATUSES, P as PAYMENT_DIRECTIONS, e as PAYMENT_REQUEST_STATUSES } from './shared/bank.BzDNLxB_.mjs';
9
9
  import { CURRENCY_CODES } from '@develit-io/general-codes';
10
10
  import 'date-fns';
11
11
  import 'node:crypto';
12
- import { h as encrypt, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, a as getPaymentRequestsByBatchIdQuery, g as getBatchByIdQuery, u as upsertBatchCommand, i as importAesKey, f as createPaymentCommand, b as getAccountByIdQuery } from '../shared/bank.BdTj54NO.mjs';
12
+ import { h as encrypt, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, a as getPaymentRequestsByBatchIdQuery, g as getBatchByIdQuery, u as upsertBatchCommand, i as importAesKey, f as createPaymentCommand, b as getAccountByIdQuery } from './shared/bank.BdTj54NO.mjs';
13
13
  import 'drizzle-orm/zod';
14
14
  import 'drizzle-orm/sqlite-core';
15
15
 
@@ -2066,4 +2066,4 @@ function defineBankService({
2066
2066
  };
2067
2067
  }
2068
2068
 
2069
- export { defineBankService };
2069
+ export { BankServiceBase, defineBankService };
@@ -1,4 +1,4 @@
1
- export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.BCqBwSKC.cjs';
1
+ export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.BJTq7Qw9.cjs';
2
2
  import 'drizzle-orm';
3
3
  import 'drizzle-orm/sqlite-core';
4
4
  import '@develit-io/general-codes';
@@ -1,4 +1,4 @@
1
- export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.BCqBwSKC.mjs';
1
+ export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.BJTq7Qw9.mjs';
2
2
  import 'drizzle-orm';
3
3
  import 'drizzle-orm/sqlite-core';
4
4
  import '@develit-io/general-codes';
@@ -1,4 +1,4 @@
1
- export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.BCqBwSKC.js';
1
+ export { aB as account, aC as accountCredentials, aD as batch, aE as ott, aF as payment, aG as paymentRequest } from '../shared/bank.BJTq7Qw9.js';
2
2
  import 'drizzle-orm';
3
3
  import 'drizzle-orm/sqlite-core';
4
4
  import '@develit-io/general-codes';
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ const serviceConfig = require('@develit-io/platform-sdk/service-config');
4
+
5
+ const BANK_SERVICE_BINDINGS = {
6
+ SECRETS_STORE: { kind: "service", target: "secrets-store", bare: true },
7
+ BANK_KV: { kind: "kv", suffix: "bank" },
8
+ BANK_D1: { kind: "d1", suffix: "bank" },
9
+ QUEUE_BUS_QUEUE: { kind: "queueProducer", suffix: "queue-bus" },
10
+ NOTIFICATIONS_QUEUE: { kind: "queueProducer", suffix: "notifications" },
11
+ SYNC_ACCOUNT_PAYMENTS_WORKFLOW: {
12
+ kind: "workflow",
13
+ class: "BankSyncAccountPayments",
14
+ suffix: "bank-sync-account-payments",
15
+ limits: { steps: 25e3 }
16
+ },
17
+ PROCESS_BATCH_WORKFLOW: {
18
+ kind: "workflow",
19
+ class: "BankProcessBatch",
20
+ suffix: "bank-process-batch"
21
+ },
22
+ DBU_CBS_BACKOFFICE_DEV: {
23
+ kind: "vpc",
24
+ serviceId: "019c2962-172c-75a2-a000-b76e246d25d7"
25
+ }
26
+ };
27
+ const baseBankServiceConfig = serviceConfig.createTypedServiceConfigFactory()(BANK_SERVICE_BINDINGS);
28
+ function bankServiceConfig(project, version, options) {
29
+ const config = baseBankServiceConfig(project, version, options);
30
+ const callable = (deployment, bindings) => ({
31
+ resourceName: "bank",
32
+ variables: config.vars[serviceConfig.configKeyFor(deployment.environment)],
33
+ bindings,
34
+ crons: config.triggers.crons[serviceConfig.configKeyFor(deployment.environment)]
35
+ });
36
+ return Object.assign(callable, config);
37
+ }
38
+
39
+ exports.BANK_SERVICE_BINDINGS = BANK_SERVICE_BINDINGS;
40
+ exports.bankServiceConfig = bankServiceConfig;
@@ -0,0 +1,227 @@
1
+ import * as _develit_io_platform_sdk from '@develit-io/platform-sdk';
2
+ import { Deployment } from '@develit-io/platform-sdk';
3
+ import { BindingsFromDescriptor } from '@develit-io/platform-sdk/service-config';
4
+
5
+ interface BankServiceVariables {
6
+ ERSTE_AUTH_URI: string;
7
+ ERSTE_PAYMENTS_URI: string;
8
+ ERSTE_ACCOUNTS_URI: string;
9
+ FINBRICKS_BASE_URI: string;
10
+ FINBRICKS_MERCHANT_ID: string;
11
+ CRON_PAYMENT_STATUSES: string;
12
+ CRON_SYNC_WORKFLOW_HEARTBEAT: string;
13
+ BANK_AUTH_RECIPIENT: string;
14
+ DBUCS_BASE_URI: string;
15
+ DBUCS_USERNAME: string;
16
+ DBUCS_APPLICATION_CODE: string;
17
+ DBUCS_TX_AUTH_URI: string;
18
+ REDIRECT_URI: string;
19
+ SYNC_WORKFLOW_RESET_AFTER_ITERATIONS: string;
20
+ [key: string]: string | number | boolean;
21
+ }
22
+ declare const BANK_SERVICE_BINDINGS: {
23
+ readonly SECRETS_STORE: {
24
+ readonly kind: "service";
25
+ readonly target: "secrets-store";
26
+ readonly bare: true;
27
+ };
28
+ readonly BANK_KV: {
29
+ readonly kind: "kv";
30
+ readonly suffix: "bank";
31
+ };
32
+ readonly BANK_D1: {
33
+ readonly kind: "d1";
34
+ readonly suffix: "bank";
35
+ };
36
+ readonly QUEUE_BUS_QUEUE: {
37
+ readonly kind: "queueProducer";
38
+ readonly suffix: "queue-bus";
39
+ };
40
+ readonly NOTIFICATIONS_QUEUE: {
41
+ readonly kind: "queueProducer";
42
+ readonly suffix: "notifications";
43
+ };
44
+ readonly SYNC_ACCOUNT_PAYMENTS_WORKFLOW: {
45
+ readonly kind: "workflow";
46
+ readonly class: "BankSyncAccountPayments";
47
+ readonly suffix: "bank-sync-account-payments";
48
+ readonly limits: {
49
+ readonly steps: 25000;
50
+ };
51
+ };
52
+ readonly PROCESS_BATCH_WORKFLOW: {
53
+ readonly kind: "workflow";
54
+ readonly class: "BankProcessBatch";
55
+ readonly suffix: "bank-process-batch";
56
+ };
57
+ readonly DBU_CBS_BACKOFFICE_DEV: {
58
+ readonly kind: "vpc";
59
+ readonly serviceId: "019c2962-172c-75a2-a000-b76e246d25d7";
60
+ };
61
+ };
62
+ declare const baseBankServiceConfig: (project: string, version: string, options?: _develit_io_platform_sdk.ServiceConfigOptions<BankServiceVariables, _develit_io_platform_sdk.MiniflareIds<{
63
+ readonly SECRETS_STORE: {
64
+ readonly kind: "service";
65
+ readonly target: "secrets-store";
66
+ readonly bare: true;
67
+ };
68
+ readonly BANK_KV: {
69
+ readonly kind: "kv";
70
+ readonly suffix: "bank";
71
+ };
72
+ readonly BANK_D1: {
73
+ readonly kind: "d1";
74
+ readonly suffix: "bank";
75
+ };
76
+ readonly QUEUE_BUS_QUEUE: {
77
+ readonly kind: "queueProducer";
78
+ readonly suffix: "queue-bus";
79
+ };
80
+ readonly NOTIFICATIONS_QUEUE: {
81
+ readonly kind: "queueProducer";
82
+ readonly suffix: "notifications";
83
+ };
84
+ readonly SYNC_ACCOUNT_PAYMENTS_WORKFLOW: {
85
+ readonly kind: "workflow";
86
+ readonly class: "BankSyncAccountPayments";
87
+ readonly suffix: "bank-sync-account-payments";
88
+ readonly limits: {
89
+ readonly steps: 25000;
90
+ };
91
+ };
92
+ readonly PROCESS_BATCH_WORKFLOW: {
93
+ readonly kind: "workflow";
94
+ readonly class: "BankProcessBatch";
95
+ readonly suffix: "bank-process-batch";
96
+ };
97
+ readonly DBU_CBS_BACKOFFICE_DEV: {
98
+ readonly kind: "vpc";
99
+ readonly serviceId: "019c2962-172c-75a2-a000-b76e246d25d7";
100
+ };
101
+ }>> | undefined) => _develit_io_platform_sdk.ServiceConfigWithBindings<BankServiceVariables, {
102
+ readonly SECRETS_STORE: {
103
+ readonly kind: "service";
104
+ readonly target: "secrets-store";
105
+ readonly bare: true;
106
+ };
107
+ readonly BANK_KV: {
108
+ readonly kind: "kv";
109
+ readonly suffix: "bank";
110
+ };
111
+ readonly BANK_D1: {
112
+ readonly kind: "d1";
113
+ readonly suffix: "bank";
114
+ };
115
+ readonly QUEUE_BUS_QUEUE: {
116
+ readonly kind: "queueProducer";
117
+ readonly suffix: "queue-bus";
118
+ };
119
+ readonly NOTIFICATIONS_QUEUE: {
120
+ readonly kind: "queueProducer";
121
+ readonly suffix: "notifications";
122
+ };
123
+ readonly SYNC_ACCOUNT_PAYMENTS_WORKFLOW: {
124
+ readonly kind: "workflow";
125
+ readonly class: "BankSyncAccountPayments";
126
+ readonly suffix: "bank-sync-account-payments";
127
+ readonly limits: {
128
+ readonly steps: 25000;
129
+ };
130
+ };
131
+ readonly PROCESS_BATCH_WORKFLOW: {
132
+ readonly kind: "workflow";
133
+ readonly class: "BankProcessBatch";
134
+ readonly suffix: "bank-process-batch";
135
+ };
136
+ readonly DBU_CBS_BACKOFFICE_DEV: {
137
+ readonly kind: "vpc";
138
+ readonly serviceId: "019c2962-172c-75a2-a000-b76e246d25d7";
139
+ };
140
+ }, readonly []>;
141
+ declare function bankServiceConfig(project: string, version: string, options?: Parameters<typeof baseBankServiceConfig>[2]): ((deployment: Deployment, bindings: BindingsFromDescriptor<typeof BANK_SERVICE_BINDINGS>) => {
142
+ resourceName: "bank";
143
+ variables: BankServiceVariables;
144
+ bindings: BindingsFromDescriptor<{
145
+ readonly SECRETS_STORE: {
146
+ readonly kind: "service";
147
+ readonly target: "secrets-store";
148
+ readonly bare: true;
149
+ };
150
+ readonly BANK_KV: {
151
+ readonly kind: "kv";
152
+ readonly suffix: "bank";
153
+ };
154
+ readonly BANK_D1: {
155
+ readonly kind: "d1";
156
+ readonly suffix: "bank";
157
+ };
158
+ readonly QUEUE_BUS_QUEUE: {
159
+ readonly kind: "queueProducer";
160
+ readonly suffix: "queue-bus";
161
+ };
162
+ readonly NOTIFICATIONS_QUEUE: {
163
+ readonly kind: "queueProducer";
164
+ readonly suffix: "notifications";
165
+ };
166
+ readonly SYNC_ACCOUNT_PAYMENTS_WORKFLOW: {
167
+ readonly kind: "workflow";
168
+ readonly class: "BankSyncAccountPayments";
169
+ readonly suffix: "bank-sync-account-payments";
170
+ readonly limits: {
171
+ readonly steps: 25000;
172
+ };
173
+ };
174
+ readonly PROCESS_BATCH_WORKFLOW: {
175
+ readonly kind: "workflow";
176
+ readonly class: "BankProcessBatch";
177
+ readonly suffix: "bank-process-batch";
178
+ };
179
+ readonly DBU_CBS_BACKOFFICE_DEV: {
180
+ readonly kind: "vpc";
181
+ readonly serviceId: "019c2962-172c-75a2-a000-b76e246d25d7";
182
+ };
183
+ }>;
184
+ crons: string[];
185
+ }) & _develit_io_platform_sdk.ServiceConfigWithBindings<BankServiceVariables, {
186
+ readonly SECRETS_STORE: {
187
+ readonly kind: "service";
188
+ readonly target: "secrets-store";
189
+ readonly bare: true;
190
+ };
191
+ readonly BANK_KV: {
192
+ readonly kind: "kv";
193
+ readonly suffix: "bank";
194
+ };
195
+ readonly BANK_D1: {
196
+ readonly kind: "d1";
197
+ readonly suffix: "bank";
198
+ };
199
+ readonly QUEUE_BUS_QUEUE: {
200
+ readonly kind: "queueProducer";
201
+ readonly suffix: "queue-bus";
202
+ };
203
+ readonly NOTIFICATIONS_QUEUE: {
204
+ readonly kind: "queueProducer";
205
+ readonly suffix: "notifications";
206
+ };
207
+ readonly SYNC_ACCOUNT_PAYMENTS_WORKFLOW: {
208
+ readonly kind: "workflow";
209
+ readonly class: "BankSyncAccountPayments";
210
+ readonly suffix: "bank-sync-account-payments";
211
+ readonly limits: {
212
+ readonly steps: 25000;
213
+ };
214
+ };
215
+ readonly PROCESS_BATCH_WORKFLOW: {
216
+ readonly kind: "workflow";
217
+ readonly class: "BankProcessBatch";
218
+ readonly suffix: "bank-process-batch";
219
+ };
220
+ readonly DBU_CBS_BACKOFFICE_DEV: {
221
+ readonly kind: "vpc";
222
+ readonly serviceId: "019c2962-172c-75a2-a000-b76e246d25d7";
223
+ };
224
+ }, readonly []>;
225
+
226
+ export { BANK_SERVICE_BINDINGS, bankServiceConfig };
227
+ export type { BankServiceVariables };