@develit-services/bank 0.3.52 → 0.3.54
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 +10 -5
- package/dist/export/worker.d.cts +2 -1
- package/dist/export/worker.d.mts +2 -1
- package/dist/export/worker.d.ts +2 -1
- package/dist/export/worker.mjs +10 -5
- package/dist/export/workflows.cjs +2 -2
- package/dist/export/workflows.mjs +2 -2
- package/dist/shared/{bank.BiHEgOL8.mjs → bank.BjIZjQTE.mjs} +6 -1
- package/dist/shared/{bank.DF_uKc1D.cjs → bank.C7CHJWIm.cjs} +6 -1
- package/dist/shared/{bank.BpLl-Z93.mjs → bank.C8f14no5.mjs} +1 -1
- package/dist/shared/{bank.DH-qLkp5.cjs → bank.sb-eNrid.cjs} +1 -1
- package/dist/types.cjs +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');
|
|
@@ -283,7 +283,8 @@ const authorizeAccountInputSchema = zod.z.object({
|
|
|
283
283
|
ott: zod.z.string(),
|
|
284
284
|
urlParams: zod.z.string(),
|
|
285
285
|
syncIntervalS: zod.z.number().int().positive().optional(),
|
|
286
|
-
startSync: zod.z.boolean().optional()
|
|
286
|
+
startSync: zod.z.boolean().optional(),
|
|
287
|
+
lastSyncAt: zod.z.date().optional()
|
|
287
288
|
});
|
|
288
289
|
|
|
289
290
|
const simulateDepositInputSchema = zod.z.object({
|
|
@@ -851,7 +852,7 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
851
852
|
return this.handleAction(
|
|
852
853
|
{ data: input, schema: authorizeAccountInputSchema },
|
|
853
854
|
{ successMessage: "Erste code saved." },
|
|
854
|
-
async ({ ott, urlParams, syncIntervalS, startSync }) => {
|
|
855
|
+
async ({ ott, urlParams, syncIntervalS, startSync, lastSyncAt }) => {
|
|
855
856
|
const ottRow = await getOttQuery(this.db, {
|
|
856
857
|
ott
|
|
857
858
|
});
|
|
@@ -881,7 +882,11 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
881
882
|
);
|
|
882
883
|
const upsertAccounts = accounts.map(
|
|
883
884
|
(acc) => upsertAccountCommand(this.db, {
|
|
884
|
-
account:
|
|
885
|
+
account: {
|
|
886
|
+
...acc,
|
|
887
|
+
syncIntervalS,
|
|
888
|
+
lastSyncAt
|
|
889
|
+
}
|
|
885
890
|
}).command
|
|
886
891
|
);
|
|
887
892
|
const deleteCredentials = alreadyExistingAccounts.map(
|
package/dist/export/worker.d.cts
CHANGED
|
@@ -774,6 +774,7 @@ declare const authorizeAccountInputSchema: z.ZodObject<{
|
|
|
774
774
|
urlParams: z.ZodString;
|
|
775
775
|
syncIntervalS: z.ZodOptional<z.ZodNumber>;
|
|
776
776
|
startSync: z.ZodOptional<z.ZodBoolean>;
|
|
777
|
+
lastSyncAt: z.ZodOptional<z.ZodDate>;
|
|
777
778
|
}, z.core.$strip>;
|
|
778
779
|
interface AuthorizeAccountInput extends z.infer<typeof authorizeAccountInputSchema> {
|
|
779
780
|
}
|
|
@@ -2515,9 +2516,9 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2515
2516
|
createdAt: Date | null;
|
|
2516
2517
|
updatedAt: Date | null;
|
|
2517
2518
|
deletedAt: Date | null;
|
|
2519
|
+
accountId: string | null;
|
|
2518
2520
|
batchPaymentInitiatedAt: Date | null;
|
|
2519
2521
|
authorizationUrls: string[] | null;
|
|
2520
|
-
accountId: string | null;
|
|
2521
2522
|
statusReason: string | null;
|
|
2522
2523
|
statusResponse: object | null;
|
|
2523
2524
|
payments: PaymentInsertType[];
|
package/dist/export/worker.d.mts
CHANGED
|
@@ -774,6 +774,7 @@ declare const authorizeAccountInputSchema: z.ZodObject<{
|
|
|
774
774
|
urlParams: z.ZodString;
|
|
775
775
|
syncIntervalS: z.ZodOptional<z.ZodNumber>;
|
|
776
776
|
startSync: z.ZodOptional<z.ZodBoolean>;
|
|
777
|
+
lastSyncAt: z.ZodOptional<z.ZodDate>;
|
|
777
778
|
}, z.core.$strip>;
|
|
778
779
|
interface AuthorizeAccountInput extends z.infer<typeof authorizeAccountInputSchema> {
|
|
779
780
|
}
|
|
@@ -2515,9 +2516,9 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2515
2516
|
createdAt: Date | null;
|
|
2516
2517
|
updatedAt: Date | null;
|
|
2517
2518
|
deletedAt: Date | null;
|
|
2519
|
+
accountId: string | null;
|
|
2518
2520
|
batchPaymentInitiatedAt: Date | null;
|
|
2519
2521
|
authorizationUrls: string[] | null;
|
|
2520
|
-
accountId: string | null;
|
|
2521
2522
|
statusReason: string | null;
|
|
2522
2523
|
statusResponse: object | null;
|
|
2523
2524
|
payments: PaymentInsertType[];
|
package/dist/export/worker.d.ts
CHANGED
|
@@ -774,6 +774,7 @@ declare const authorizeAccountInputSchema: z.ZodObject<{
|
|
|
774
774
|
urlParams: z.ZodString;
|
|
775
775
|
syncIntervalS: z.ZodOptional<z.ZodNumber>;
|
|
776
776
|
startSync: z.ZodOptional<z.ZodBoolean>;
|
|
777
|
+
lastSyncAt: z.ZodOptional<z.ZodDate>;
|
|
777
778
|
}, z.core.$strip>;
|
|
778
779
|
interface AuthorizeAccountInput extends z.infer<typeof authorizeAccountInputSchema> {
|
|
779
780
|
}
|
|
@@ -2515,9 +2516,9 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
2515
2516
|
createdAt: Date | null;
|
|
2516
2517
|
updatedAt: Date | null;
|
|
2517
2518
|
deletedAt: Date | null;
|
|
2519
|
+
accountId: string | null;
|
|
2518
2520
|
batchPaymentInitiatedAt: Date | null;
|
|
2519
2521
|
authorizationUrls: string[] | null;
|
|
2520
|
-
accountId: string | null;
|
|
2521
2522
|
statusReason: string | null;
|
|
2522
2523
|
statusResponse: object | null;
|
|
2523
2524
|
payments: PaymentInsertType[];
|
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';
|
|
@@ -281,7 +281,8 @@ const authorizeAccountInputSchema = z.object({
|
|
|
281
281
|
ott: z.string(),
|
|
282
282
|
urlParams: z.string(),
|
|
283
283
|
syncIntervalS: z.number().int().positive().optional(),
|
|
284
|
-
startSync: z.boolean().optional()
|
|
284
|
+
startSync: z.boolean().optional(),
|
|
285
|
+
lastSyncAt: z.date().optional()
|
|
285
286
|
});
|
|
286
287
|
|
|
287
288
|
const simulateDepositInputSchema = z.object({
|
|
@@ -849,7 +850,7 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
849
850
|
return this.handleAction(
|
|
850
851
|
{ data: input, schema: authorizeAccountInputSchema },
|
|
851
852
|
{ successMessage: "Erste code saved." },
|
|
852
|
-
async ({ ott, urlParams, syncIntervalS, startSync }) => {
|
|
853
|
+
async ({ ott, urlParams, syncIntervalS, startSync, lastSyncAt }) => {
|
|
853
854
|
const ottRow = await getOttQuery(this.db, {
|
|
854
855
|
ott
|
|
855
856
|
});
|
|
@@ -879,7 +880,11 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
879
880
|
);
|
|
880
881
|
const upsertAccounts = accounts.map(
|
|
881
882
|
(acc) => upsertAccountCommand(this.db, {
|
|
882
|
-
account:
|
|
883
|
+
account: {
|
|
884
|
+
...acc,
|
|
885
|
+
syncIntervalS,
|
|
886
|
+
lastSyncAt
|
|
887
|
+
}
|
|
883
888
|
}).command
|
|
884
889
|
);
|
|
885
890
|
const deleteCredentials = alreadyExistingAccounts.map(
|
|
@@ -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
|
})
|
|
@@ -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
|
})
|
|
@@ -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.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';
|