@develit-services/bank 0.0.39 → 0.0.40
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/database/schema.cjs +1 -1
- package/dist/database/schema.mjs +1 -1
- package/dist/export/worker.cjs +4 -3
- package/dist/export/worker.d.cts +3 -3
- package/dist/export/worker.d.mts +3 -3
- package/dist/export/worker.d.ts +3 -3
- package/dist/export/worker.mjs +4 -3
- package/dist/shared/{bank.ClhW343d.mjs → bank.Ceuz_VuD.mjs} +2 -3
- package/dist/shared/{bank.BCFCsGc4.cjs → bank.Cugt-fWW.cjs} +2 -3
- package/dist/shared/{bank.mZ26nAqL.cjs → bank.D1w0vdmc.cjs} +1 -1
- package/dist/shared/{bank.UaH89pIW.mjs → bank.wULhiPzr.mjs} +1 -1
- package/dist/types.cjs +2 -2
- package/dist/types.mjs +2 -2
- package/package.json +1 -1
package/dist/database/schema.cjs
CHANGED
package/dist/database/schema.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { y as account, z as accountCredentials, r as batch, x as ott, v as payment, w as paymentRelations } from '../shared/bank.
|
|
1
|
+
export { y as account, z as accountCredentials, r as batch, x as ott, v as payment, w as paymentRelations } from '../shared/bank.Ceuz_VuD.mjs';
|
|
2
2
|
import '@develit-io/backend-sdk';
|
|
3
3
|
import 'drizzle-orm/sqlite-core';
|
|
4
4
|
import 'drizzle-orm';
|
package/dist/export/worker.cjs
CHANGED
|
@@ -5,12 +5,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const backendSdk = require('@develit-io/backend-sdk');
|
|
6
6
|
const cloudflare_workers = require('cloudflare:workers');
|
|
7
7
|
const d1 = require('drizzle-orm/d1');
|
|
8
|
-
const database_schema = require('../shared/bank.
|
|
8
|
+
const database_schema = require('../shared/bank.Cugt-fWW.cjs');
|
|
9
9
|
require('jose');
|
|
10
10
|
const generalCodes = require('@develit-io/general-codes');
|
|
11
11
|
const zod = require('zod');
|
|
12
12
|
const drizzleOrm = require('drizzle-orm');
|
|
13
|
-
const mockCobs_connector = require('../shared/bank.
|
|
13
|
+
const mockCobs_connector = require('../shared/bank.D1w0vdmc.cjs');
|
|
14
14
|
require('drizzle-orm/sqlite-core');
|
|
15
15
|
require('drizzle-zod');
|
|
16
16
|
require('date-fns');
|
|
@@ -813,7 +813,8 @@ let BankServiceBase = class extends backendSdk.develitWorker(cloudflare_workers.
|
|
|
813
813
|
...preparedBatch.retriedPayments
|
|
814
814
|
]
|
|
815
815
|
});
|
|
816
|
-
|
|
816
|
+
console.log(authorizationUrls, "AUTH URIS FROM BANK");
|
|
817
|
+
if (!authorizationUrls.length) {
|
|
817
818
|
this.logError({ message: "Failed to retrieve signing URI" });
|
|
818
819
|
await upsertBatchCommand(this.db, {
|
|
819
820
|
batch: {
|
package/dist/export/worker.d.cts
CHANGED
|
@@ -225,9 +225,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
225
225
|
limit: z.ZodNumber;
|
|
226
226
|
sort: z.ZodObject<{
|
|
227
227
|
column: z.ZodEnum<{
|
|
228
|
-
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
229
228
|
createdAt: "createdAt";
|
|
230
229
|
updatedAt: "updatedAt";
|
|
230
|
+
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
231
231
|
}>;
|
|
232
232
|
direction: z.ZodEnum<{
|
|
233
233
|
asc: "asc";
|
|
@@ -479,14 +479,14 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
479
479
|
addPaymentsToBatch({ paymentsToBatch, }: {
|
|
480
480
|
paymentsToBatch: SendPaymentInput[];
|
|
481
481
|
}): Promise<IRPCResponse<{
|
|
482
|
-
batchPaymentInitiatedAt: Date | null;
|
|
483
|
-
authorizationUrls: string | string[] | null;
|
|
484
482
|
status: "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "WAITING_FOR_PROCESSING" | "PREPARED" | "COMPLETED" | "FAILED" | null;
|
|
485
483
|
id: string;
|
|
486
484
|
createdAt: Date | null;
|
|
487
485
|
updatedAt: Date | null;
|
|
488
486
|
deletedAt: Date | null;
|
|
489
487
|
accountId: string | null;
|
|
488
|
+
batchPaymentInitiatedAt: Date | null;
|
|
489
|
+
authorizationUrls: string | string[] | null;
|
|
490
490
|
payments: PaymentInsertType[];
|
|
491
491
|
metadata: object | null;
|
|
492
492
|
}[] | undefined>>;
|
package/dist/export/worker.d.mts
CHANGED
|
@@ -225,9 +225,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
225
225
|
limit: z.ZodNumber;
|
|
226
226
|
sort: z.ZodObject<{
|
|
227
227
|
column: z.ZodEnum<{
|
|
228
|
-
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
229
228
|
createdAt: "createdAt";
|
|
230
229
|
updatedAt: "updatedAt";
|
|
230
|
+
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
231
231
|
}>;
|
|
232
232
|
direction: z.ZodEnum<{
|
|
233
233
|
asc: "asc";
|
|
@@ -479,14 +479,14 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
479
479
|
addPaymentsToBatch({ paymentsToBatch, }: {
|
|
480
480
|
paymentsToBatch: SendPaymentInput[];
|
|
481
481
|
}): Promise<IRPCResponse<{
|
|
482
|
-
batchPaymentInitiatedAt: Date | null;
|
|
483
|
-
authorizationUrls: string | string[] | null;
|
|
484
482
|
status: "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "WAITING_FOR_PROCESSING" | "PREPARED" | "COMPLETED" | "FAILED" | null;
|
|
485
483
|
id: string;
|
|
486
484
|
createdAt: Date | null;
|
|
487
485
|
updatedAt: Date | null;
|
|
488
486
|
deletedAt: Date | null;
|
|
489
487
|
accountId: string | null;
|
|
488
|
+
batchPaymentInitiatedAt: Date | null;
|
|
489
|
+
authorizationUrls: string | string[] | null;
|
|
490
490
|
payments: PaymentInsertType[];
|
|
491
491
|
metadata: object | null;
|
|
492
492
|
}[] | undefined>>;
|
package/dist/export/worker.d.ts
CHANGED
|
@@ -225,9 +225,9 @@ declare const getBatchesInputSchema: z.ZodObject<{
|
|
|
225
225
|
limit: z.ZodNumber;
|
|
226
226
|
sort: z.ZodObject<{
|
|
227
227
|
column: z.ZodEnum<{
|
|
228
|
-
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
229
228
|
createdAt: "createdAt";
|
|
230
229
|
updatedAt: "updatedAt";
|
|
230
|
+
batchPaymentInitiatedAt: "batchPaymentInitiatedAt";
|
|
231
231
|
}>;
|
|
232
232
|
direction: z.ZodEnum<{
|
|
233
233
|
asc: "asc";
|
|
@@ -479,14 +479,14 @@ declare class BankServiceBase extends BankServiceBase_base {
|
|
|
479
479
|
addPaymentsToBatch({ paymentsToBatch, }: {
|
|
480
480
|
paymentsToBatch: SendPaymentInput[];
|
|
481
481
|
}): Promise<IRPCResponse<{
|
|
482
|
-
batchPaymentInitiatedAt: Date | null;
|
|
483
|
-
authorizationUrls: string | string[] | null;
|
|
484
482
|
status: "OPEN" | "PROCESSING" | "READY_TO_SIGN" | "WAITING_FOR_PROCESSING" | "PREPARED" | "COMPLETED" | "FAILED" | null;
|
|
485
483
|
id: string;
|
|
486
484
|
createdAt: Date | null;
|
|
487
485
|
updatedAt: Date | null;
|
|
488
486
|
deletedAt: Date | null;
|
|
489
487
|
accountId: string | null;
|
|
488
|
+
batchPaymentInitiatedAt: Date | null;
|
|
489
|
+
authorizationUrls: string | string[] | null;
|
|
490
490
|
payments: PaymentInsertType[];
|
|
491
491
|
metadata: object | null;
|
|
492
492
|
}[] | undefined>>;
|
package/dist/export/worker.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { uuidv4, develitWorker, createInternalError, first, RPCResponse, 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, F as FinbricksConnector, M as MockConnector, E as ErsteConnector, P as PAYMENT_TYPES, e as CONNECTOR_KEYS, B as BATCH_STATUSES, c as PAYMENT_STATUSES, d as PAYMENT_DIRECTIONS, q as getPaymentDirection } from '../shared/bank.
|
|
4
|
+
import { t as tables, F as FinbricksConnector, M as MockConnector, E as ErsteConnector, P as PAYMENT_TYPES, e as CONNECTOR_KEYS, B as BATCH_STATUSES, c as PAYMENT_STATUSES, d as PAYMENT_DIRECTIONS, q as getPaymentDirection } from '../shared/bank.Ceuz_VuD.mjs';
|
|
5
5
|
import 'jose';
|
|
6
6
|
import { CURRENCY_CODES } from '@develit-io/general-codes';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
import { eq, inArray, and, sql, asc, desc, gte, lte } from 'drizzle-orm';
|
|
9
|
-
import { M as MockCobsConnector } from '../shared/bank.
|
|
9
|
+
import { M as MockCobsConnector } from '../shared/bank.wULhiPzr.mjs';
|
|
10
10
|
import 'drizzle-orm/sqlite-core';
|
|
11
11
|
import 'drizzle-zod';
|
|
12
12
|
import 'date-fns';
|
|
@@ -809,7 +809,8 @@ let BankServiceBase = class extends develitWorker(WorkerEntrypoint) {
|
|
|
809
809
|
...preparedBatch.retriedPayments
|
|
810
810
|
]
|
|
811
811
|
});
|
|
812
|
-
|
|
812
|
+
console.log(authorizationUrls, "AUTH URIS FROM BANK");
|
|
813
|
+
if (!authorizationUrls.length) {
|
|
813
814
|
this.logError({ message: "Failed to retrieve signing URI" });
|
|
814
815
|
await upsertBatchCommand(this.db, {
|
|
815
816
|
batch: {
|
|
@@ -458,9 +458,8 @@ class FinbricksConnector extends IBankConnector {
|
|
|
458
458
|
})
|
|
459
459
|
);
|
|
460
460
|
if (error || !response) {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
});
|
|
461
|
+
console.error("FINBRICKS BATCH ERROR", error);
|
|
462
|
+
throw createInternalError(error);
|
|
464
463
|
}
|
|
465
464
|
return {
|
|
466
465
|
id: batchId,
|
|
@@ -460,9 +460,8 @@ class FinbricksConnector extends IBankConnector {
|
|
|
460
460
|
})
|
|
461
461
|
);
|
|
462
462
|
if (error || !response) {
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
});
|
|
463
|
+
console.error("FINBRICKS BATCH ERROR", error);
|
|
464
|
+
throw backendSdk.createInternalError(error);
|
|
466
465
|
}
|
|
467
466
|
return {
|
|
468
467
|
id: batchId,
|
package/dist/types.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const database_schema = require('./shared/bank.
|
|
4
|
-
const mockCobs_connector = require('./shared/bank.
|
|
3
|
+
const database_schema = require('./shared/bank.Cugt-fWW.cjs');
|
|
4
|
+
const mockCobs_connector = require('./shared/bank.D1w0vdmc.cjs');
|
|
5
5
|
const generalCodes = require('@develit-io/general-codes');
|
|
6
6
|
require('@develit-io/backend-sdk');
|
|
7
7
|
require('drizzle-orm/sqlite-core');
|
package/dist/types.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as ACCOUNT_STATUSES, B as BATCH_STATUES, B as BATCH_STATUSES, e as CONNECTOR_KEYS, C as COUNTRY_CODES, f as CREDENTIALS_TYPES, E as ErsteConnector, b as FINBRICKS_ENDPOINTS, a as FinbricksClient, F as FinbricksConnector, I as IBankConnector, M as MockConnector, d as PAYMENT_DIRECTIONS, c as PAYMENT_STATUSES, P as PAYMENT_TYPES, T as TOKEN_TYPES, j as accountCredentialsInsertSchema, l as accountCredentialsSelectSchema, k as accountCredentialsUpdateSchema, g as accountInsertSchema, i as accountSelectSchema, h as accountUpdateSchema, o as ottInsertSchema, n as ottSelectSchema, m as ottUpdateSchema, p as paymentInsertTypeZod, s as signFinbricksJws, u as useFinbricksFetch } from './shared/bank.
|
|
2
|
-
export { M as MockCobsConnector } from './shared/bank.
|
|
1
|
+
export { A as ACCOUNT_STATUSES, B as BATCH_STATUES, B as BATCH_STATUSES, e as CONNECTOR_KEYS, C as COUNTRY_CODES, f as CREDENTIALS_TYPES, E as ErsteConnector, b as FINBRICKS_ENDPOINTS, a as FinbricksClient, F as FinbricksConnector, I as IBankConnector, M as MockConnector, d as PAYMENT_DIRECTIONS, c as PAYMENT_STATUSES, P as PAYMENT_TYPES, T as TOKEN_TYPES, j as accountCredentialsInsertSchema, l as accountCredentialsSelectSchema, k as accountCredentialsUpdateSchema, g as accountInsertSchema, i as accountSelectSchema, h as accountUpdateSchema, o as ottInsertSchema, n as ottSelectSchema, m as ottUpdateSchema, p as paymentInsertTypeZod, s as signFinbricksJws, u as useFinbricksFetch } from './shared/bank.Ceuz_VuD.mjs';
|
|
2
|
+
export { M as MockCobsConnector } from './shared/bank.wULhiPzr.mjs';
|
|
3
3
|
export { BANK_CODES, CURRENCY_CODES } from '@develit-io/general-codes';
|
|
4
4
|
import '@develit-io/backend-sdk';
|
|
5
5
|
import 'drizzle-orm/sqlite-core';
|