@develit-services/bank 0.3.51 → 0.3.53
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 +2 -2
- package/dist/export/worker.mjs +2 -2
- package/dist/export/workflows.cjs +2 -2
- package/dist/export/workflows.mjs +2 -2
- package/dist/shared/{bank.BrwlZUfo.mjs → bank.BjIZjQTE.mjs} +11 -2
- package/dist/shared/{bank.DIn77H1S.cjs → bank.C7CHJWIm.cjs} +11 -2
- package/dist/shared/{bank.DyoWDyOf.mjs → bank.C8f14no5.mjs} +1 -1
- package/dist/shared/{bank.tqnXqWCE.cjs → bank.sb-eNrid.cjs} +1 -1
- package/dist/types.cjs +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.mjs +1 -1
- package/package.json +1 -1
package/dist/export/worker.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
4
4
|
const cloudflare_workers = require('cloudflare:workers');
|
|
5
5
|
const d1 = require('drizzle-orm/d1');
|
|
6
|
-
const drizzle = require('../shared/bank.
|
|
6
|
+
const drizzle = require('../shared/bank.C7CHJWIm.cjs');
|
|
7
7
|
const zod = require('zod');
|
|
8
8
|
const database_schema = require('../shared/bank.DoHc7geB.cjs');
|
|
9
9
|
const generalCodes = require('@develit-io/general-codes');
|
|
@@ -11,7 +11,7 @@ require('date-fns');
|
|
|
11
11
|
const drizzleOrm = require('drizzle-orm');
|
|
12
12
|
require('jose');
|
|
13
13
|
require('node:crypto');
|
|
14
|
-
const encryption = require('../shared/bank.
|
|
14
|
+
const encryption = require('../shared/bank.sb-eNrid.cjs');
|
|
15
15
|
require('drizzle-orm/sqlite-core');
|
|
16
16
|
require('drizzle-orm/relations');
|
|
17
17
|
require('drizzle-zod');
|
package/dist/export/worker.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { uuidv4, first, bankAccountMetadataSchema, workflowInstanceStatusSchema, develitWorker, createInternalError, action, service } from '@develit-io/backend-sdk';
|
|
2
2
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
3
3
|
import { drizzle } from 'drizzle-orm/d1';
|
|
4
|
-
import { t as tables } from '../shared/bank.
|
|
4
|
+
import { t as tables } from '../shared/bank.BjIZjQTE.mjs';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { I as INSTRUCTION_PRIORITIES, C as CHARGE_BEARERS, P as PAYMENT_TYPES, d as CONNECTOR_KEYS, B as BATCH_STATUSES, a as PAYMENT_STATUSES, b as PAYMENT_DIRECTIONS, f as accountInsertSchema } from '../shared/bank.C1bHZDjr.mjs';
|
|
7
7
|
import { CURRENCY_CODES } from '@develit-io/general-codes';
|
|
@@ -9,7 +9,7 @@ import 'date-fns';
|
|
|
9
9
|
import { eq, sql, inArray, and, asc, desc, gte, lte } from 'drizzle-orm';
|
|
10
10
|
import 'jose';
|
|
11
11
|
import 'node:crypto';
|
|
12
|
-
import { f as encrypt, i as importAesKey, a as getCredentialsByAccountId, b as initiateConnector, u as upsertBatchCommand, d as getBatchByIdQuery, c as createPaymentCommand, g as getAccountByIdQuery } from '../shared/bank.
|
|
12
|
+
import { f as encrypt, i as importAesKey, a as getCredentialsByAccountId, b as initiateConnector, u as upsertBatchCommand, d as getBatchByIdQuery, c as createPaymentCommand, g as getAccountByIdQuery } from '../shared/bank.C8f14no5.mjs';
|
|
13
13
|
import 'drizzle-orm/sqlite-core';
|
|
14
14
|
import 'drizzle-orm/relations';
|
|
15
15
|
import 'drizzle-zod';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
const cloudflare_workers = require('cloudflare:workers');
|
|
4
4
|
const cloudflare_workflows = require('cloudflare:workflows');
|
|
5
5
|
const d1 = require('drizzle-orm/d1');
|
|
6
|
-
const drizzle = require('../shared/bank.
|
|
6
|
+
const drizzle = require('../shared/bank.C7CHJWIm.cjs');
|
|
7
7
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
8
|
-
const encryption = require('../shared/bank.
|
|
8
|
+
const encryption = require('../shared/bank.sb-eNrid.cjs');
|
|
9
9
|
const drizzleOrm = require('drizzle-orm');
|
|
10
10
|
require('date-fns');
|
|
11
11
|
require('../shared/bank.DoHc7geB.cjs');
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { WorkflowEntrypoint } from 'cloudflare:workers';
|
|
2
2
|
import { NonRetryableError } from 'cloudflare:workflows';
|
|
3
3
|
import { drizzle } from 'drizzle-orm/d1';
|
|
4
|
-
import { t as tables } from '../shared/bank.
|
|
4
|
+
import { t as tables } from '../shared/bank.BjIZjQTE.mjs';
|
|
5
5
|
import { asNonEmpty, first } from '@develit-io/backend-sdk';
|
|
6
|
-
import { g as getAccountByIdQuery, i as importAesKey, a as getCredentialsByAccountId, b as initiateConnector, c as createPaymentCommand, d as getBatchByIdQuery, e as checksum, u as upsertBatchCommand } from '../shared/bank.
|
|
6
|
+
import { g as getAccountByIdQuery, i as importAesKey, a as getCredentialsByAccountId, b as initiateConnector, c as createPaymentCommand, d as getBatchByIdQuery, e as checksum, u as upsertBatchCommand } from '../shared/bank.C8f14no5.mjs';
|
|
7
7
|
import { eq } from 'drizzle-orm';
|
|
8
8
|
import 'date-fns';
|
|
9
9
|
import '../shared/bank.C1bHZDjr.mjs';
|
|
@@ -464,7 +464,12 @@ class FinbricksConnector extends IBankConnector {
|
|
|
464
464
|
payments: payments.map((p) => ({
|
|
465
465
|
merchantTransactionId: p.bankRefId,
|
|
466
466
|
creditorAccountIban: p.creditorIban,
|
|
467
|
-
amount: p.amount
|
|
467
|
+
amount: p.amount,
|
|
468
|
+
variableSymbol: p.vs,
|
|
469
|
+
specificSymbol: p.ss,
|
|
470
|
+
constantSymbol: p.ks,
|
|
471
|
+
description: p.message
|
|
472
|
+
// instructionPriority: 'NORM', todo(kleinpetr): pass payment priority
|
|
468
473
|
}))
|
|
469
474
|
}
|
|
470
475
|
})
|
|
@@ -705,8 +710,12 @@ class FinbricksConnector extends IBankConnector {
|
|
|
705
710
|
message: "Finbricks: failed to fetch batch status"
|
|
706
711
|
});
|
|
707
712
|
}
|
|
713
|
+
const allAuthorized = response.payments.every(
|
|
714
|
+
(p) => p.resultCode === "AUTHORIZED" || p.resultCode === "BOOKED" || p.resultCode === "SETTLED" || p.resultCode === "COMPLETED"
|
|
715
|
+
);
|
|
716
|
+
const status = allAuthorized ? "SIGNED" : mapFinbricksBatchStatus(response.batchResultCode) ?? currentStatus;
|
|
708
717
|
return {
|
|
709
|
-
status
|
|
718
|
+
status,
|
|
710
719
|
apiResponse: response
|
|
711
720
|
};
|
|
712
721
|
}
|
|
@@ -466,7 +466,12 @@ class FinbricksConnector extends IBankConnector {
|
|
|
466
466
|
payments: payments.map((p) => ({
|
|
467
467
|
merchantTransactionId: p.bankRefId,
|
|
468
468
|
creditorAccountIban: p.creditorIban,
|
|
469
|
-
amount: p.amount
|
|
469
|
+
amount: p.amount,
|
|
470
|
+
variableSymbol: p.vs,
|
|
471
|
+
specificSymbol: p.ss,
|
|
472
|
+
constantSymbol: p.ks,
|
|
473
|
+
description: p.message
|
|
474
|
+
// instructionPriority: 'NORM', todo(kleinpetr): pass payment priority
|
|
470
475
|
}))
|
|
471
476
|
}
|
|
472
477
|
})
|
|
@@ -707,8 +712,12 @@ class FinbricksConnector extends IBankConnector {
|
|
|
707
712
|
message: "Finbricks: failed to fetch batch status"
|
|
708
713
|
});
|
|
709
714
|
}
|
|
715
|
+
const allAuthorized = response.payments.every(
|
|
716
|
+
(p) => p.resultCode === "AUTHORIZED" || p.resultCode === "BOOKED" || p.resultCode === "SETTLED" || p.resultCode === "COMPLETED"
|
|
717
|
+
);
|
|
718
|
+
const status = allAuthorized ? "SIGNED" : mapFinbricksBatchStatus(response.batchResultCode) ?? currentStatus;
|
|
710
719
|
return {
|
|
711
|
-
status
|
|
720
|
+
status,
|
|
712
721
|
apiResponse: response
|
|
713
722
|
};
|
|
714
723
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as tables, F as FinbricksConnector, M as MockConnector, a as MockCobsConnector, E as ErsteConnector } from './bank.
|
|
1
|
+
import { t as tables, F as FinbricksConnector, M as MockConnector, a as MockCobsConnector, E as ErsteConnector } from './bank.BjIZjQTE.mjs';
|
|
2
2
|
import { uuidv4 } from '@develit-io/backend-sdk';
|
|
3
3
|
import { eq } from 'drizzle-orm';
|
|
4
4
|
import 'date-fns';
|
package/dist/types.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const drizzle = require('./shared/bank.
|
|
3
|
+
const drizzle = require('./shared/bank.C7CHJWIm.cjs');
|
|
4
4
|
const database_schema = require('./shared/bank.DoHc7geB.cjs');
|
|
5
5
|
const generalCodes = require('@develit-io/general-codes');
|
|
6
6
|
require('@develit-io/backend-sdk');
|
package/dist/types.d.cts
CHANGED
package/dist/types.d.mts
CHANGED
package/dist/types.d.ts
CHANGED
package/dist/types.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { E as ErsteConnector, c as FINBRICKS_ENDPOINTS, b as FinbricksClient, F as FinbricksConnector, I as IBankConnector, a as MockCobsConnector, M as MockConnector, s as signFinbricksJws, u as useFinbricksFetch } from './shared/bank.
|
|
1
|
+
export { E as ErsteConnector, c as FINBRICKS_ENDPOINTS, b as FinbricksClient, F as FinbricksConnector, I as IBankConnector, a as MockCobsConnector, M as MockConnector, s as signFinbricksJws, u as useFinbricksFetch } from './shared/bank.BjIZjQTE.mjs';
|
|
2
2
|
export { A as ACCOUNT_STATUSES, B as BATCH_STATUES, B as BATCH_STATUSES, C as CHARGE_BEARERS, d as CONNECTOR_KEYS, c as COUNTRY_CODES, e as CREDENTIALS_TYPES, I as INSTRUCTION_PRIORITIES, b as PAYMENT_DIRECTIONS, a as PAYMENT_STATUSES, P as PAYMENT_TYPES, T as TOKEN_TYPES, i as accountCredentialsInsertSchema, k as accountCredentialsSelectSchema, j as accountCredentialsUpdateSchema, f as accountInsertSchema, h as accountSelectSchema, g as accountUpdateSchema, o as ottInsertSchema, m as ottSelectSchema, l as ottUpdateSchema } from './shared/bank.C1bHZDjr.mjs';
|
|
3
3
|
export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|
|
4
4
|
import '@develit-io/backend-sdk';
|