@develit-services/bank 2.2.2 → 2.2.3
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/export/worker.cjs +1 -1
- package/dist/export/worker.mjs +1 -1
- package/dist/export/workflows.cjs +1 -1
- package/dist/export/workflows.mjs +1 -1
- package/dist/shared/{bank.BDJqvCeZ.cjs → bank.CQfKMyzc.cjs} +3 -0
- package/dist/shared/{bank.B9HFqAex.mjs → bank.CmgGdN-q.mjs} +3 -0
- package/dist/types.cjs +1 -1
- package/dist/types.mjs +1 -1
- package/package.json +1 -1
package/dist/export/worker.cjs
CHANGED
|
@@ -5,7 +5,7 @@ const database_schema = require('../shared/bank.CIWYI18z.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
|
-
const mock_connector = require('../shared/bank.
|
|
8
|
+
const mock_connector = require('../shared/bank.CQfKMyzc.cjs');
|
|
9
9
|
require('jose');
|
|
10
10
|
const zod = require('zod');
|
|
11
11
|
const generalCodes = require('@develit-io/general-codes');
|
package/dist/export/worker.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { v as tables, I as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, g as PAY
|
|
|
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
|
-
import { j as initiateConnector, g as toIncomingPayment, d as assignAccount, t as toBatchedPayment, h as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from '../shared/bank.
|
|
6
|
+
import { j as initiateConnector, g as toIncomingPayment, d as assignAccount, t as toBatchedPayment, h as toPaymentRequestInsert, a as FinbricksClient, F as FINBRICKS_ENDPOINTS } from '../shared/bank.CmgGdN-q.mjs';
|
|
7
7
|
import 'jose';
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
import { CURRENCY_CODES } from '@develit-io/general-codes';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
4
4
|
const database_schema = require('../shared/bank.CIWYI18z.cjs');
|
|
5
5
|
const batchLifecycle = require('../shared/bank.NF8bZBy0.cjs');
|
|
6
|
-
const mock_connector = require('../shared/bank.
|
|
6
|
+
const mock_connector = require('../shared/bank.CQfKMyzc.cjs');
|
|
7
7
|
const drizzleOrm = require('drizzle-orm');
|
|
8
8
|
const credentialsResolver = require('../shared/bank.B0EWZbAs.cjs');
|
|
9
9
|
const cloudflare_workers = require('cloudflare:workers');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { first, uuidv4, asNonEmpty } from '@develit-io/backend-sdk';
|
|
2
2
|
import { v as tables, o as isPaymentCompleted } from '../shared/bank.C7MA33AX.mjs';
|
|
3
3
|
import { i as isBatchAuthorized, b as isBatchFailed, d as isBatchProcessing } from '../shared/bank.XqSw509X.mjs';
|
|
4
|
-
import { e as toBatchedPaymentFromPaymentRequest, i as toPreparedPayment, j as initiateConnector } from '../shared/bank.
|
|
4
|
+
import { e as toBatchedPaymentFromPaymentRequest, i as toPreparedPayment, j as initiateConnector } from '../shared/bank.CmgGdN-q.mjs';
|
|
5
5
|
import { eq, and, inArray } from 'drizzle-orm';
|
|
6
6
|
import { g as getBatchByIdQuery, a as getPaymentRequestsByBatchIdQuery, c as checksum, u as upsertBatchCommand, b as getAccountByIdQuery, d as createCredentialsResolver, e as updatePaymentRequestStatusCommand, f as createPaymentCommand } from '../shared/bank.UBWdag5k.mjs';
|
|
7
7
|
import { WorkflowEntrypoint } from 'cloudflare:workers';
|
|
@@ -880,6 +880,8 @@ class FinbricksConnector extends IBankConnector {
|
|
|
880
880
|
);
|
|
881
881
|
const clientId = await this.getClientId(debtorAccount.id);
|
|
882
882
|
const creditorAddress = mapToFinbricksAddress(payment.creditor.address);
|
|
883
|
+
const message = payment.message?.trim() ?? "";
|
|
884
|
+
const unstructured = message.length >= 3 ? message.slice(0, 140) : "Platba";
|
|
883
885
|
const bankRefId = backendSdk.uuidv4();
|
|
884
886
|
const [response, error] = await backendSdk.useResult(
|
|
885
887
|
this.finbricks.request({
|
|
@@ -905,6 +907,7 @@ class FinbricksConnector extends IBankConnector {
|
|
|
905
907
|
creditorName: payment.creditor.holderName,
|
|
906
908
|
...creditorAddress && { postalAddress: creditorAddress }
|
|
907
909
|
},
|
|
910
|
+
remittanceInformation: { unstructured },
|
|
908
911
|
callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`
|
|
909
912
|
}
|
|
910
913
|
})
|
|
@@ -878,6 +878,8 @@ class FinbricksConnector extends IBankConnector {
|
|
|
878
878
|
);
|
|
879
879
|
const clientId = await this.getClientId(debtorAccount.id);
|
|
880
880
|
const creditorAddress = mapToFinbricksAddress(payment.creditor.address);
|
|
881
|
+
const message = payment.message?.trim() ?? "";
|
|
882
|
+
const unstructured = message.length >= 3 ? message.slice(0, 140) : "Platba";
|
|
881
883
|
const bankRefId = uuidv4();
|
|
882
884
|
const [response, error] = await useResult(
|
|
883
885
|
this.finbricks.request({
|
|
@@ -903,6 +905,7 @@ class FinbricksConnector extends IBankConnector {
|
|
|
903
905
|
creditorName: payment.creditor.holderName,
|
|
904
906
|
...creditorAddress && { postalAddress: creditorAddress }
|
|
905
907
|
},
|
|
908
|
+
remittanceInformation: { unstructured },
|
|
906
909
|
callbackUrl: `${this.finbricks.REDIRECT_URI}?type=paymentRequest&paymentRequestId=${payment.id}`
|
|
907
910
|
}
|
|
908
911
|
})
|
package/dist/types.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const mock_connector = require('./shared/bank.
|
|
3
|
+
const mock_connector = require('./shared/bank.CQfKMyzc.cjs');
|
|
4
4
|
const database_schema = require('./shared/bank.CIWYI18z.cjs');
|
|
5
5
|
const batchLifecycle = require('./shared/bank.NF8bZBy0.cjs');
|
|
6
6
|
const generalCodes = require('@develit-io/general-codes');
|
package/dist/types.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { 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 assignAccount, s as signFinbricksJws, t as toBatchedPayment, e as toBatchedPaymentFromPaymentRequest, f as toCompletedPayment, g as toIncomingPayment, h as toPaymentRequestInsert, i as toPreparedPayment, u as useFinbricksFetch } from './shared/bank.
|
|
1
|
+
export { 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 assignAccount, s as signFinbricksJws, t as toBatchedPayment, e as toBatchedPaymentFromPaymentRequest, f as toCompletedPayment, g as toIncomingPayment, h as toPaymentRequestInsert, i as toPreparedPayment, u as useFinbricksFetch } from './shared/bank.CmgGdN-q.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, h as accountCredentialsInsertSchema, i as accountCredentialsSelectSchema, j as accountCredentialsUpdateSchema, k as accountInsertSchema, l as accountSelectSchema, m as accountUpdateSchema, n as hasPaymentAccountAssigned, o as isPaymentCompleted, p as isPendingStatus, q as isProcessedStatus, r as isTerminalStatus, s as ottInsertSchema, t as ottSelectSchema, u as ottUpdateSchema } from './shared/bank.C7MA33AX.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';
|