@develit-services/bank 5.5.1 → 5.5.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 CHANGED
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  const backendSdk = require('@develit-io/backend-sdk');
4
- const paymentDirection = require('./shared/bank.DMrkshJa.cjs');
4
+ const paymentDirection = require('./shared/bank.ByTmh14X.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
- const bank = require('./shared/bank.B04qoHtD.cjs');
9
+ const bank = require('./shared/bank.DUlMOagc.cjs');
10
10
  const zod = require('zod');
11
11
  const database_schema = require('./shared/bank.9Yw4KHyl.cjs');
12
12
  const generalCodes = require('@develit-io/general-codes');
package/dist/base.d.cts CHANGED
@@ -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";
package/dist/base.d.mts CHANGED
@@ -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";
package/dist/base.d.ts CHANGED
@@ -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";
package/dist/base.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import { uuidv4, first, buildMultiFilterConditions as buildMultiFilterConditions$1, bankAccountMetadataSchema, structuredAddressSchema, workflowInstanceStatusSchema, develitWorker, createInternalError, action, service } from '@develit-io/backend-sdk';
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.D0iIfh-X.mjs';
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.CjaaypJo.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
- import { h as encrypt, d as createCredentialsResolver, i as initiateConnector, e as updatePaymentRequestStatusCommand, a as getPaymentRequestsByBatchIdQuery, g as getBatchByIdQuery, u as upsertBatchCommand, j as importAesKey, f as createPaymentCommand, b as getAccountByIdQuery } from './shared/bank._VynZSqn.mjs';
7
+ import { h as encrypt, d as createCredentialsResolver, i as initiateConnector, e as updatePaymentRequestStatusCommand, a as getPaymentRequestsByBatchIdQuery, g as getBatchByIdQuery, u as upsertBatchCommand, j as importAesKey, f as createPaymentCommand, b as getAccountByIdQuery } from './shared/bank.DDkXvGRH.mjs';
8
8
  import { z } from 'zod';
9
9
  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';
10
10
  import { CURRENCY_CODES } from '@develit-io/general-codes';
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  const backendSdk = require('@develit-io/backend-sdk');
4
- const paymentDirection = require('../shared/bank.DMrkshJa.cjs');
4
+ const paymentDirection = require('../shared/bank.ByTmh14X.cjs');
5
5
  const batchLifecycle = require('../shared/bank.NF8bZBy0.cjs');
6
6
  const drizzleOrm = require('drizzle-orm');
7
- const bank = require('../shared/bank.B04qoHtD.cjs');
7
+ const bank = require('../shared/bank.DUlMOagc.cjs');
8
8
  const cloudflare_workers = require('cloudflare:workers');
9
9
  const cloudflare_workflows = require('cloudflare:workflows');
10
10
  const d1 = require('drizzle-orm/d1');
@@ -1,8 +1,8 @@
1
1
  import { first, uuidv4, asNonEmpty } from '@develit-io/backend-sdk';
2
- import { G as tables, H as relations, v as toBatchedPaymentFromPaymentRequest, z as toPreparedPayment, m as isPaymentCompleted } from '../shared/bank.D0iIfh-X.mjs';
2
+ import { G as tables, H as relations, v as toBatchedPaymentFromPaymentRequest, z as toPreparedPayment, m as isPaymentCompleted } from '../shared/bank.CjaaypJo.mjs';
3
3
  import { i as isBatchAuthorized, b as isBatchFailed, d as isBatchProcessing } from '../shared/bank.XqSw509X.mjs';
4
4
  import { eq, and, inArray } from 'drizzle-orm';
5
- import { g as getBatchByIdQuery, a as getPaymentRequestsByBatchIdQuery, c as checksum, u as upsertBatchCommand, b as getAccountByIdQuery, d as createCredentialsResolver, i as initiateConnector, e as updatePaymentRequestStatusCommand, f as createPaymentCommand } from '../shared/bank._VynZSqn.mjs';
5
+ import { g as getBatchByIdQuery, a as getPaymentRequestsByBatchIdQuery, c as checksum, u as upsertBatchCommand, b as getAccountByIdQuery, d as createCredentialsResolver, i as initiateConnector, e as updatePaymentRequestStatusCommand, f as createPaymentCommand } from '../shared/bank.DDkXvGRH.mjs';
6
6
  import { WorkflowEntrypoint } from 'cloudflare:workers';
7
7
  import { NonRetryableError } from 'cloudflare:workflows';
8
8
  import { drizzle } from 'drizzle-orm/d1';
@@ -1046,7 +1046,7 @@ class FinbricksConnector extends IBankConnector {
1046
1046
  throw backendSdk.createInternalError(null, {
1047
1047
  message: `Batch for unauthorized client with iban: ${payments[0].debtor.iban}`
1048
1048
  });
1049
- const clientId = await this.getClientId(authorizedClient.id);
1049
+ await this.getClientId(authorizedClient.id);
1050
1050
  const [response, error] = await backendSdk.useResult(
1051
1051
  this.finbricks.request({
1052
1052
  endpoint: FINBRICKS_ENDPOINTS.TRANSACTION_BATCH_INIT,
@@ -1055,7 +1055,8 @@ class FinbricksConnector extends IBankConnector {
1055
1055
  batchPaymentIdentification: {
1056
1056
  merchantId: this.finbricks.MERCHANT_ID,
1057
1057
  debtorAccountIban: resolveCzechDomesticIban(payments[0].debtor),
1058
- clientId,
1058
+ // TEMP: clientId disabled per client request — do not send.
1059
+ // clientId,
1059
1060
  callbackUrl: `${this.finbricks.REDIRECT_URI}?type=batch&batchId=${batchId}`,
1060
1061
  merchantBatchId: batchId
1061
1062
  },
@@ -1097,7 +1098,7 @@ class FinbricksConnector extends IBankConnector {
1097
1098
  const debtorAccount = this.connectedAccounts.find(
1098
1099
  (acc) => acc.iban === payment.debtorIban
1099
1100
  );
1100
- const clientId = await this.getClientId(debtorAccount.id);
1101
+ await this.getClientId(debtorAccount.id);
1101
1102
  const creditorAddress = mapToFinbricksAddress(payment.creditor.address);
1102
1103
  const debtorAddress = mapToFinbricksAddress(payment.debtor.address);
1103
1104
  const debtorIdentification = resolveAccountIdentification(payment.debtor);
@@ -1125,8 +1126,9 @@ class FinbricksConnector extends IBankConnector {
1125
1126
  method: "POST",
1126
1127
  body: {
1127
1128
  merchantIdentification: {
1128
- merchantId: this.finbricks.MERCHANT_ID,
1129
- clientId
1129
+ merchantId: this.finbricks.MERCHANT_ID
1130
+ // TEMP: clientId disabled per client request — do not send.
1131
+ // clientId,
1130
1132
  },
1131
1133
  paymentIdentification: {
1132
1134
  merchantTransactionId: bankRefId
@@ -1177,7 +1179,7 @@ class FinbricksConnector extends IBankConnector {
1177
1179
  const debtorAccount = this.connectedAccounts.find(
1178
1180
  (acc) => acc.iban === payment.debtorIban
1179
1181
  );
1180
- const clientId = await this.getClientId(debtorAccount.id);
1182
+ await this.getClientId(debtorAccount.id);
1181
1183
  const creditorAddress = mapToFinbricksAddress(payment.creditor.address);
1182
1184
  const debtorAddress = mapToFinbricksAddress(payment.debtor.address);
1183
1185
  const message = payment.message?.trim() ?? "";
@@ -1194,8 +1196,9 @@ class FinbricksConnector extends IBankConnector {
1194
1196
  method: "POST",
1195
1197
  body: {
1196
1198
  merchantIdentification: {
1197
- merchantId: this.finbricks.MERCHANT_ID,
1198
- clientId
1199
+ merchantId: this.finbricks.MERCHANT_ID
1200
+ // TEMP: clientId disabled per client request — do not send.
1201
+ // clientId,
1199
1202
  },
1200
1203
  paymentIdentification: {
1201
1204
  merchantTransactionId: bankRefId,
@@ -1245,7 +1248,7 @@ class FinbricksConnector extends IBankConnector {
1245
1248
  const debtorAccount = this.connectedAccounts.find(
1246
1249
  (acc) => acc.iban === payment.debtor.iban
1247
1250
  );
1248
- const clientId = await this.getClientId(debtorAccount.id);
1251
+ await this.getClientId(debtorAccount.id);
1249
1252
  const [response, error] = await backendSdk.useResult(
1250
1253
  this.finbricks.request({
1251
1254
  endpoint: FINBRICKS_ENDPOINTS.TRANSACTION_INIT,
@@ -1264,7 +1267,8 @@ class FinbricksConnector extends IBankConnector {
1264
1267
  specificSymbol: payment.ss,
1265
1268
  constantSymbol: payment.ks,
1266
1269
  callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`,
1267
- clientId,
1270
+ // TEMP: clientId disabled per client request — do not send.
1271
+ // clientId,
1268
1272
  paymentProvider: this.PROVIDER,
1269
1273
  instructionPriority: payment.instructionPriority ?? "NORM"
1270
1274
  }
@@ -1044,7 +1044,7 @@ class FinbricksConnector extends IBankConnector {
1044
1044
  throw createInternalError(null, {
1045
1045
  message: `Batch for unauthorized client with iban: ${payments[0].debtor.iban}`
1046
1046
  });
1047
- const clientId = await this.getClientId(authorizedClient.id);
1047
+ await this.getClientId(authorizedClient.id);
1048
1048
  const [response, error] = await useResult(
1049
1049
  this.finbricks.request({
1050
1050
  endpoint: FINBRICKS_ENDPOINTS.TRANSACTION_BATCH_INIT,
@@ -1053,7 +1053,8 @@ class FinbricksConnector extends IBankConnector {
1053
1053
  batchPaymentIdentification: {
1054
1054
  merchantId: this.finbricks.MERCHANT_ID,
1055
1055
  debtorAccountIban: resolveCzechDomesticIban(payments[0].debtor),
1056
- clientId,
1056
+ // TEMP: clientId disabled per client request — do not send.
1057
+ // clientId,
1057
1058
  callbackUrl: `${this.finbricks.REDIRECT_URI}?type=batch&batchId=${batchId}`,
1058
1059
  merchantBatchId: batchId
1059
1060
  },
@@ -1095,7 +1096,7 @@ class FinbricksConnector extends IBankConnector {
1095
1096
  const debtorAccount = this.connectedAccounts.find(
1096
1097
  (acc) => acc.iban === payment.debtorIban
1097
1098
  );
1098
- const clientId = await this.getClientId(debtorAccount.id);
1099
+ await this.getClientId(debtorAccount.id);
1099
1100
  const creditorAddress = mapToFinbricksAddress(payment.creditor.address);
1100
1101
  const debtorAddress = mapToFinbricksAddress(payment.debtor.address);
1101
1102
  const debtorIdentification = resolveAccountIdentification(payment.debtor);
@@ -1123,8 +1124,9 @@ class FinbricksConnector extends IBankConnector {
1123
1124
  method: "POST",
1124
1125
  body: {
1125
1126
  merchantIdentification: {
1126
- merchantId: this.finbricks.MERCHANT_ID,
1127
- clientId
1127
+ merchantId: this.finbricks.MERCHANT_ID
1128
+ // TEMP: clientId disabled per client request — do not send.
1129
+ // clientId,
1128
1130
  },
1129
1131
  paymentIdentification: {
1130
1132
  merchantTransactionId: bankRefId
@@ -1175,7 +1177,7 @@ class FinbricksConnector extends IBankConnector {
1175
1177
  const debtorAccount = this.connectedAccounts.find(
1176
1178
  (acc) => acc.iban === payment.debtorIban
1177
1179
  );
1178
- const clientId = await this.getClientId(debtorAccount.id);
1180
+ await this.getClientId(debtorAccount.id);
1179
1181
  const creditorAddress = mapToFinbricksAddress(payment.creditor.address);
1180
1182
  const debtorAddress = mapToFinbricksAddress(payment.debtor.address);
1181
1183
  const message = payment.message?.trim() ?? "";
@@ -1192,8 +1194,9 @@ class FinbricksConnector extends IBankConnector {
1192
1194
  method: "POST",
1193
1195
  body: {
1194
1196
  merchantIdentification: {
1195
- merchantId: this.finbricks.MERCHANT_ID,
1196
- clientId
1197
+ merchantId: this.finbricks.MERCHANT_ID
1198
+ // TEMP: clientId disabled per client request — do not send.
1199
+ // clientId,
1197
1200
  },
1198
1201
  paymentIdentification: {
1199
1202
  merchantTransactionId: bankRefId,
@@ -1243,7 +1246,7 @@ class FinbricksConnector extends IBankConnector {
1243
1246
  const debtorAccount = this.connectedAccounts.find(
1244
1247
  (acc) => acc.iban === payment.debtor.iban
1245
1248
  );
1246
- const clientId = await this.getClientId(debtorAccount.id);
1249
+ await this.getClientId(debtorAccount.id);
1247
1250
  const [response, error] = await useResult(
1248
1251
  this.finbricks.request({
1249
1252
  endpoint: FINBRICKS_ENDPOINTS.TRANSACTION_INIT,
@@ -1262,7 +1265,8 @@ class FinbricksConnector extends IBankConnector {
1262
1265
  specificSymbol: payment.ss,
1263
1266
  constantSymbol: payment.ks,
1264
1267
  callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`,
1265
- clientId,
1268
+ // TEMP: clientId disabled per client request — do not send.
1269
+ // clientId,
1266
1270
  paymentProvider: this.PROVIDER,
1267
1271
  instructionPriority: payment.instructionPriority ?? "NORM"
1268
1272
  }
@@ -1,5 +1,5 @@
1
1
  import { sql, and, eq, isNull } from 'drizzle-orm';
2
- import { G as tables, b as FinbricksConnector, J as buildEndToEndId, c as MockConnector, D as DbuConnector, C as CsobConnector, K as KBConnector, M as MockCobsConnector, E as ErsteConnector } from './bank.D0iIfh-X.mjs';
2
+ import { G as tables, b as FinbricksConnector, J as buildEndToEndId, c as MockConnector, D as DbuConnector, C as CsobConnector, K as KBConnector, M as MockCobsConnector, E as ErsteConnector } from './bank.CjaaypJo.mjs';
3
3
  import { uuidv4 } from '@develit-io/backend-sdk';
4
4
  import './bank.BzDNLxB_.mjs';
5
5
  import 'date-fns';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const drizzleOrm = require('drizzle-orm');
4
- const paymentDirection = require('./bank.DMrkshJa.cjs');
4
+ const paymentDirection = require('./bank.ByTmh14X.cjs');
5
5
  const backendSdk = require('@develit-io/backend-sdk');
6
6
  require('./bank.9Yw4KHyl.cjs');
7
7
  require('date-fns');
package/dist/types.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const paymentDirection = require('./shared/bank.DMrkshJa.cjs');
3
+ const paymentDirection = require('./shared/bank.ByTmh14X.cjs');
4
4
  const database_schema = require('./shared/bank.9Yw4KHyl.cjs');
5
5
  const batchLifecycle = require('./shared/bank.NF8bZBy0.cjs');
6
6
  const generalCodes = require('@develit-io/general-codes');
package/dist/types.d.cts CHANGED
@@ -114,7 +114,7 @@ type FinbricksSupportedBanksQuery = {
114
114
  type FinbricksForeignPaymentBody = {
115
115
  merchantIdentification: {
116
116
  merchantId: string;
117
- clientId: string;
117
+ clientId?: string;
118
118
  initiatorName?: string;
119
119
  };
120
120
  paymentIdentification: {
package/dist/types.d.mts CHANGED
@@ -114,7 +114,7 @@ type FinbricksSupportedBanksQuery = {
114
114
  type FinbricksForeignPaymentBody = {
115
115
  merchantIdentification: {
116
116
  merchantId: string;
117
- clientId: string;
117
+ clientId?: string;
118
118
  initiatorName?: string;
119
119
  };
120
120
  paymentIdentification: {
package/dist/types.d.ts CHANGED
@@ -114,7 +114,7 @@ type FinbricksSupportedBanksQuery = {
114
114
  type FinbricksForeignPaymentBody = {
115
115
  merchantIdentification: {
116
116
  merchantId: string;
117
- clientId: string;
117
+ clientId?: string;
118
118
  initiatorName?: string;
119
119
  };
120
120
  paymentIdentification: {
package/dist/types.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { B as BASE_TERMINAL_STATUSES, C as CsobConnector, D as DbuConnector, E as ErsteConnector, F as FINBRICKS_ENDPOINTS, a as FinbricksClient, b as FinbricksConnector, I as IBankConnector, K as KBConnector, M as MockCobsConnector, c as MockConnector, d as accountCredentialsInsertSchema, e as accountCredentialsSelectSchema, f as accountCredentialsUpdateSchema, g as accountInsertSchema, h as accountSelectSchema, i as accountUpdateSchema, j as assignAccount, k as dbuAccountConfigSchema, l as hasPaymentAccountAssigned, m as isPaymentCompleted, n as isPendingStatus, o as isProcessedStatus, p as isTerminalStatus, q as ottInsertSchema, r as ottSelectSchema, s as ottUpdateSchema, t as signFinbricksJws, u as toBatchedPayment, v as toBatchedPaymentFromPaymentRequest, w as toCompletedPayment, x as toIncomingPayment, y as toPaymentRequestInsert, z as toPreparedPayment, A as useFinbricksFetch } from './shared/bank.D0iIfh-X.mjs';
1
+ export { B as BASE_TERMINAL_STATUSES, C as CsobConnector, D as DbuConnector, E as ErsteConnector, F as FINBRICKS_ENDPOINTS, a as FinbricksClient, b as FinbricksConnector, I as IBankConnector, K as KBConnector, M as MockCobsConnector, c as MockConnector, d as accountCredentialsInsertSchema, e as accountCredentialsSelectSchema, f as accountCredentialsUpdateSchema, g as accountInsertSchema, h as accountSelectSchema, i as accountUpdateSchema, j as assignAccount, k as dbuAccountConfigSchema, l as hasPaymentAccountAssigned, m as isPaymentCompleted, n as isPendingStatus, o as isProcessedStatus, p as isTerminalStatus, q as ottInsertSchema, r as ottSelectSchema, s as ottUpdateSchema, t as signFinbricksJws, u as toBatchedPayment, v as toBatchedPaymentFromPaymentRequest, w as toCompletedPayment, x as toIncomingPayment, y as toPaymentRequestInsert, z as toPreparedPayment, A as useFinbricksFetch } from './shared/bank.CjaaypJo.mjs';
2
2
  export { A as ACCOUNT_STATUSES, B as BATCH_MODES, a as BATCH_STATUES, a as BATCH_STATUSES, C as CHARGE_BEARERS, b as CONNECTOR_KEYS, c as COUNTRY_CODES, d as CREDENTIALS_TYPES, I as INSTRUCTION_PRIORITIES, P as PAYMENT_DIRECTIONS, e as PAYMENT_REQUEST_STATUSES, f as PAYMENT_STATUSES, g as PAYMENT_TYPES, T as TOKEN_TYPES } from './shared/bank.BzDNLxB_.mjs';
3
3
  export { i as isBatchAuthorized, a as isBatchCompleted, b as isBatchFailed, c as isBatchInitiated, d as isBatchProcessing, e as isBatchReadyToSign } from './shared/bank.XqSw509X.mjs';
4
4
  export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-services/bank",
3
- "version": "5.5.1",
3
+ "version": "5.5.2",
4
4
  "author": "Develit.io s.r.o.",
5
5
  "type": "module",
6
6
  "exports": {