accounting-tools 1.0.21 → 1.0.23
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/crud/AccountManager.d.ts +34 -34
- package/dist/crud/AccountManager.js +56 -56
- package/dist/crud/ContactManager.d.ts +53 -50
- package/dist/crud/ContactManager.js +56 -56
- package/dist/crud/ContactManager.js.map +1 -1
- package/dist/crud/StatusManager.d.ts +32 -32
- package/dist/crud/StatusManager.js +56 -56
- package/dist/crud/TransactionManager.d.ts +191 -164
- package/dist/crud/TransactionManager.js +56 -56
- package/dist/crud/TransactionManager.js.map +1 -1
- package/dist/crud/TypeManager.d.ts +32 -32
- package/dist/crud/TypeManager.js +56 -56
- package/dist/index.d.ts +6 -6
- package/dist/index.js +17 -16
- package/dist/index.js.map +1 -1
- package/dist/types/types.d.ts +125 -120
- package/dist/types/types.js +131 -125
- package/dist/types/types.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,164 +1,191 @@
|
|
|
1
|
-
import { AxiosRequestConfig } from "axios";
|
|
2
|
-
import { CrudServiceManager, StandardIdRequestDefinition } from "itrm-tools";
|
|
3
|
-
import { IContact } from "./ContactManager";
|
|
4
|
-
import { IStatus } from "./StatusManager";
|
|
5
|
-
import { IType } from "./TypeManager";
|
|
6
|
-
export interface ITransaction {
|
|
7
|
-
transactionId?: number;
|
|
8
|
-
userId?: string;
|
|
9
|
-
typeId?: number;
|
|
10
|
-
statusId?: number;
|
|
11
|
-
timestamp?: number;
|
|
12
|
-
fromDetails?: TransactionFromDetails;
|
|
13
|
-
toDetails?: TransactionToDetails;
|
|
14
|
-
isVerified?: boolean;
|
|
15
|
-
types?: IType;
|
|
16
|
-
status?: IStatus;
|
|
17
|
-
updatedAt?: string;
|
|
18
|
-
createdAt?: string;
|
|
19
|
-
config?: AxiosRequestConfig;
|
|
20
|
-
}
|
|
21
|
-
export type TransactionFromDetails = DispersionFrom | InnerTransferFrom | MonetizeFrom | PseRechargeFrom | WireTransferRechargeFrom;
|
|
22
|
-
export type TransactionToDetails = DispersionTo | InnerTransferTo | MonetizeTo | PseRechargeTo | WireTransferRechargeTo;
|
|
23
|
-
export interface DispersionFrom {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
export interface
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
other?: {
|
|
118
|
-
transactionId?: string;
|
|
119
|
-
reference?: string;
|
|
120
|
-
paymentMethod?: string;
|
|
121
|
-
gateway?: string;
|
|
122
|
-
amountUsdc?: string;
|
|
123
|
-
realRate?: string;
|
|
124
|
-
buyingRate?: string;
|
|
125
|
-
registeredPrice?: string;
|
|
126
|
-
fromTicker?: string;
|
|
127
|
-
toTicker?: string;
|
|
128
|
-
coltepayId?: string;
|
|
129
|
-
coltepayTrackId?: string;
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
export interface
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
1
|
+
import { AxiosRequestConfig } from "axios";
|
|
2
|
+
import { CrudServiceManager, StandardIdRequestDefinition } from "itrm-tools";
|
|
3
|
+
import { IContact } from "./ContactManager";
|
|
4
|
+
import { IStatus } from "./StatusManager";
|
|
5
|
+
import { IType } from "./TypeManager";
|
|
6
|
+
export interface ITransaction {
|
|
7
|
+
transactionId?: number;
|
|
8
|
+
userId?: string;
|
|
9
|
+
typeId?: number;
|
|
10
|
+
statusId?: number;
|
|
11
|
+
timestamp?: number;
|
|
12
|
+
fromDetails?: TransactionFromDetails;
|
|
13
|
+
toDetails?: TransactionToDetails;
|
|
14
|
+
isVerified?: boolean;
|
|
15
|
+
types?: IType;
|
|
16
|
+
status?: IStatus;
|
|
17
|
+
updatedAt?: string;
|
|
18
|
+
createdAt?: string;
|
|
19
|
+
config?: AxiosRequestConfig;
|
|
20
|
+
}
|
|
21
|
+
export type TransactionFromDetails = DispersionFrom | InnerTransferFrom | MonetizeFrom | PseRechargeFrom | WireTransferRechargeFrom;
|
|
22
|
+
export type TransactionToDetails = DispersionTo | InnerTransferTo | MonetizeTo | PseRechargeTo | WireTransferRechargeTo;
|
|
23
|
+
export interface DispersionFrom {
|
|
24
|
+
amount: string;
|
|
25
|
+
accountingAccount: string;
|
|
26
|
+
verifiedBy?: string;
|
|
27
|
+
isNull?: boolean;
|
|
28
|
+
nullFrom?: number;
|
|
29
|
+
error?: string;
|
|
30
|
+
other?: {
|
|
31
|
+
companyName?: string;
|
|
32
|
+
businessUnit?: string;
|
|
33
|
+
channel?: string;
|
|
34
|
+
currency?: string;
|
|
35
|
+
fundsOrigin?: string;
|
|
36
|
+
originBank?: string;
|
|
37
|
+
originAccountNumber?: number;
|
|
38
|
+
originAccountType?: string;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export interface DispersionTo {
|
|
42
|
+
destinationIdNumber: string;
|
|
43
|
+
accountingAccount: string;
|
|
44
|
+
contact?: Omit<IContact, "config">;
|
|
45
|
+
}
|
|
46
|
+
export interface InnerTransferFrom {
|
|
47
|
+
amount: string;
|
|
48
|
+
accountingAccount: string;
|
|
49
|
+
verifiedBy?: string;
|
|
50
|
+
isNull?: boolean;
|
|
51
|
+
nullFrom?: number;
|
|
52
|
+
error?: string;
|
|
53
|
+
other?: {
|
|
54
|
+
companyName?: string;
|
|
55
|
+
businessUnit?: string;
|
|
56
|
+
channel?: string;
|
|
57
|
+
currency?: string;
|
|
58
|
+
fundsOrigin?: string;
|
|
59
|
+
originBank?: string;
|
|
60
|
+
originAccountNumber?: number;
|
|
61
|
+
originAccountType?: string;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export interface InnerTransferTo {
|
|
65
|
+
destinationIdNumber: string;
|
|
66
|
+
accountingAccount: string;
|
|
67
|
+
contact?: Omit<IContact, "config">;
|
|
68
|
+
other?: {
|
|
69
|
+
destinationBank?: string;
|
|
70
|
+
destinationAccountType?: string;
|
|
71
|
+
destinationAccountNumber?: string;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
export interface MonetizeFrom {
|
|
75
|
+
originIdNumber: string;
|
|
76
|
+
form: string;
|
|
77
|
+
formNumber: string;
|
|
78
|
+
companyName: string;
|
|
79
|
+
amountUsd: string;
|
|
80
|
+
amountCop: string;
|
|
81
|
+
accountingAccount: string;
|
|
82
|
+
verifiedBy?: string;
|
|
83
|
+
isNull?: boolean;
|
|
84
|
+
nullFrom?: number;
|
|
85
|
+
error?: string;
|
|
86
|
+
other?: {
|
|
87
|
+
currency?: string;
|
|
88
|
+
operationType?: string;
|
|
89
|
+
companyId?: string;
|
|
90
|
+
usdCop?: string;
|
|
91
|
+
costs?: string;
|
|
92
|
+
subtotalCop?: string;
|
|
93
|
+
};
|
|
94
|
+
contact?: Omit<IContact, "config">;
|
|
95
|
+
}
|
|
96
|
+
export interface MonetizeTo {
|
|
97
|
+
destinationIdNumber: string;
|
|
98
|
+
destinationAccountHolderName: string;
|
|
99
|
+
accountingAccount: string;
|
|
100
|
+
other?: {
|
|
101
|
+
destinationBank?: string;
|
|
102
|
+
destinationAccountType?: string;
|
|
103
|
+
destinationAccountNumber?: string;
|
|
104
|
+
destinationAccountHolderIdType?: string;
|
|
105
|
+
validation?: string;
|
|
106
|
+
supportLink?: string;
|
|
107
|
+
imc?: string;
|
|
108
|
+
};
|
|
109
|
+
contact?: Omit<IContact, "config">;
|
|
110
|
+
}
|
|
111
|
+
export interface PseRechargeFrom {
|
|
112
|
+
amountCop: string;
|
|
113
|
+
verifiedBy?: string;
|
|
114
|
+
isNull?: boolean;
|
|
115
|
+
nullFrom?: number;
|
|
116
|
+
error?: string;
|
|
117
|
+
other?: {
|
|
118
|
+
transactionId?: string;
|
|
119
|
+
reference?: string;
|
|
120
|
+
paymentMethod?: string;
|
|
121
|
+
gateway?: string;
|
|
122
|
+
amountUsdc?: string;
|
|
123
|
+
realRate?: string;
|
|
124
|
+
buyingRate?: string;
|
|
125
|
+
registeredPrice?: string;
|
|
126
|
+
fromTicker?: string;
|
|
127
|
+
toTicker?: string;
|
|
128
|
+
coltepayId?: string;
|
|
129
|
+
coltepayTrackId?: string;
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
export interface PseRechargeTo {
|
|
133
|
+
accountingAccount: string;
|
|
134
|
+
destinationIdNumber: string;
|
|
135
|
+
contact?: Omit<IContact, "config">;
|
|
136
|
+
}
|
|
137
|
+
export interface WireTransferRechargeFrom {
|
|
138
|
+
amountCop: string;
|
|
139
|
+
verifiedBy?: string;
|
|
140
|
+
isNull?: boolean;
|
|
141
|
+
nullFrom?: number;
|
|
142
|
+
error?: string;
|
|
143
|
+
other?: {
|
|
144
|
+
transactionId?: string;
|
|
145
|
+
reference?: string;
|
|
146
|
+
paymentMethod?: string;
|
|
147
|
+
gateway?: string;
|
|
148
|
+
amountUsdc?: string;
|
|
149
|
+
realRate?: string;
|
|
150
|
+
buyingRate?: string;
|
|
151
|
+
registeredPrice?: string;
|
|
152
|
+
fromTicker?: string;
|
|
153
|
+
toTicker?: string;
|
|
154
|
+
coltepayId?: string;
|
|
155
|
+
coltepayTrackId?: string;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
export interface WireTransferRechargeTo {
|
|
159
|
+
accountingAccount: string;
|
|
160
|
+
destinationIdNumber: string;
|
|
161
|
+
contact?: Omit<IContact, "config">;
|
|
162
|
+
}
|
|
163
|
+
export interface ITransactionSearchDetails {
|
|
164
|
+
id?: string | number;
|
|
165
|
+
userId?: string;
|
|
166
|
+
typeId?: number;
|
|
167
|
+
statusId?: number;
|
|
168
|
+
timestamp?: number;
|
|
169
|
+
fromDetails?: TransactionFromDetails;
|
|
170
|
+
toDetails?: TransactionToDetails;
|
|
171
|
+
isVerified?: boolean;
|
|
172
|
+
type?: boolean;
|
|
173
|
+
status?: boolean;
|
|
174
|
+
values?: ITransaction[];
|
|
175
|
+
limit?: number;
|
|
176
|
+
offset?: number;
|
|
177
|
+
config?: AxiosRequestConfig;
|
|
178
|
+
}
|
|
179
|
+
export declare class TransactionManager extends CrudServiceManager<ITransactionSearchDetails, ITransaction> {
|
|
180
|
+
private readonly url;
|
|
181
|
+
constructor(url: string);
|
|
182
|
+
find(details: ITransactionSearchDetails): Promise<ITransaction | undefined>;
|
|
183
|
+
findById(details: StandardIdRequestDefinition): Promise<ITransaction | undefined>;
|
|
184
|
+
count(details: ITransactionSearchDetails): Promise<number>;
|
|
185
|
+
findAll(details: ITransactionSearchDetails): Promise<ITransaction[] | undefined>;
|
|
186
|
+
private buildRequestUrl;
|
|
187
|
+
create(details: ITransactionSearchDetails): Promise<ITransaction | undefined>;
|
|
188
|
+
createMany(details: ITransactionSearchDetails): Promise<ITransaction[] | undefined>;
|
|
189
|
+
modify(transaction: ITransaction): Promise<ITransaction | undefined>;
|
|
190
|
+
destroy(transaction: ITransaction): Promise<void | number>;
|
|
191
|
+
}
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TransactionManager = void 0;
|
|
4
|
-
const itrm_tools_1 = require("itrm-tools");
|
|
5
|
-
class TransactionManager extends itrm_tools_1.CrudServiceManager {
|
|
6
|
-
url;
|
|
7
|
-
constructor(url) {
|
|
8
|
-
super();
|
|
9
|
-
this.url = url;
|
|
10
|
-
}
|
|
11
|
-
find(details) {
|
|
12
|
-
return this.sendFinding(`${this.url}/transactions?userId=${details.userId}&typeId=${details.typeId}&statusId=${details.statusId}×tamp=${details.timestamp}`, details.config);
|
|
13
|
-
}
|
|
14
|
-
findById(details) {
|
|
15
|
-
return this.sendFinding(`${this.url}/transactions?id=${details.id}`, details.config);
|
|
16
|
-
}
|
|
17
|
-
async count(details) {
|
|
18
|
-
let url = this.buildRequestUrl(`${this.url}/transactions`, details);
|
|
19
|
-
return (await this.sendCounting(url, details.config)) ?? 0;
|
|
20
|
-
}
|
|
21
|
-
async findAll(details) {
|
|
22
|
-
let transactions = [];
|
|
23
|
-
let url = this.buildRequestUrl(`${this.url}/transactions`, details);
|
|
24
|
-
if (details.limit) {
|
|
25
|
-
transactions = (await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${details.limit}&offset=${details.offset}`, details.config)) ?? [];
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
let limit = 5000, offset = 0, isEmpty = false;
|
|
29
|
-
do {
|
|
30
|
-
let values = await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${limit}&offset=${offset}`, details.config);
|
|
31
|
-
if (values)
|
|
32
|
-
transactions = transactions.concat(values);
|
|
33
|
-
isEmpty = values == undefined || values.length == 0;
|
|
34
|
-
offset += limit;
|
|
35
|
-
} while (!isEmpty);
|
|
36
|
-
}
|
|
37
|
-
return transactions;
|
|
38
|
-
}
|
|
39
|
-
buildRequestUrl(url, details) {
|
|
40
|
-
let suffix = `${details.id ? `&id=${details.id}` : ""}${details.userId ? `&userId=${details.userId}` : ""}${details.typeId ? `&typeId=${details.typeId}` : ""}${details.statusId ? `&statusId=${details.statusId}` : ""}${details.timestamp ? `×tamp=${details.timestamp}` : ""}${details.isVerified ? `&isVerified=${details.isVerified}` : ""}${details.type ? `&type=true` : ""}${details.status ? `&status=true` : ""}`;
|
|
41
|
-
return `${url}?${suffix.substring(1)}`;
|
|
42
|
-
}
|
|
43
|
-
create(details) {
|
|
44
|
-
return this.sendCreation(`${this.url}/transactions`, { userId: details.userId, typeId: details.typeId, statusId: details.statusId, timestamp: details.timestamp, fromDetails: details.fromDetails, toDetails: details.toDetails, isVerified: details.isVerified }, details.config);
|
|
45
|
-
}
|
|
46
|
-
createMany(details) {
|
|
47
|
-
return this.sendCreationMany(`${this.url}/transactions`, details.values ?? [], details.config);
|
|
48
|
-
}
|
|
49
|
-
modify(transaction) {
|
|
50
|
-
return this.sendModification(`${this.url}/transactions/${transaction.transactionId}`, { userId: transaction.userId, typeId: transaction.typeId, statusId: transaction.statusId, timestamp: transaction.timestamp, fromDetails: transaction.fromDetails, toDetails: transaction.toDetails, isVerified: transaction.isVerified }, transaction.config);
|
|
51
|
-
}
|
|
52
|
-
destroy(transaction) {
|
|
53
|
-
return this.sendDestruction(`${this.url}/transactions/${transaction.transactionId}`, transaction.config);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.TransactionManager = TransactionManager;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionManager = void 0;
|
|
4
|
+
const itrm_tools_1 = require("itrm-tools");
|
|
5
|
+
class TransactionManager extends itrm_tools_1.CrudServiceManager {
|
|
6
|
+
url;
|
|
7
|
+
constructor(url) {
|
|
8
|
+
super();
|
|
9
|
+
this.url = url;
|
|
10
|
+
}
|
|
11
|
+
find(details) {
|
|
12
|
+
return this.sendFinding(`${this.url}/transactions?userId=${details.userId}&typeId=${details.typeId}&statusId=${details.statusId}×tamp=${details.timestamp}`, details.config);
|
|
13
|
+
}
|
|
14
|
+
findById(details) {
|
|
15
|
+
return this.sendFinding(`${this.url}/transactions?id=${details.id}`, details.config);
|
|
16
|
+
}
|
|
17
|
+
async count(details) {
|
|
18
|
+
let url = this.buildRequestUrl(`${this.url}/transactions`, details);
|
|
19
|
+
return (await this.sendCounting(url, details.config)) ?? 0;
|
|
20
|
+
}
|
|
21
|
+
async findAll(details) {
|
|
22
|
+
let transactions = [];
|
|
23
|
+
let url = this.buildRequestUrl(`${this.url}/transactions`, details);
|
|
24
|
+
if (details.limit) {
|
|
25
|
+
transactions = (await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${details.limit}&offset=${details.offset}`, details.config)) ?? [];
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
let limit = 5000, offset = 0, isEmpty = false;
|
|
29
|
+
do {
|
|
30
|
+
let values = await this.sendAllFinding(`${url}${url.indexOf('?') !== -1 ? '&' : '?'}limit=${limit}&offset=${offset}`, details.config);
|
|
31
|
+
if (values)
|
|
32
|
+
transactions = transactions.concat(values);
|
|
33
|
+
isEmpty = values == undefined || values.length == 0;
|
|
34
|
+
offset += limit;
|
|
35
|
+
} while (!isEmpty);
|
|
36
|
+
}
|
|
37
|
+
return transactions;
|
|
38
|
+
}
|
|
39
|
+
buildRequestUrl(url, details) {
|
|
40
|
+
let suffix = `${details.id ? `&id=${details.id}` : ""}${details.userId ? `&userId=${details.userId}` : ""}${details.typeId ? `&typeId=${details.typeId}` : ""}${details.statusId ? `&statusId=${details.statusId}` : ""}${details.timestamp ? `×tamp=${details.timestamp}` : ""}${details.isVerified ? `&isVerified=${details.isVerified}` : ""}${details.type ? `&type=true` : ""}${details.status ? `&status=true` : ""}`;
|
|
41
|
+
return `${url}?${suffix.substring(1)}`;
|
|
42
|
+
}
|
|
43
|
+
create(details) {
|
|
44
|
+
return this.sendCreation(`${this.url}/transactions`, { userId: details.userId, typeId: details.typeId, statusId: details.statusId, timestamp: details.timestamp, fromDetails: details.fromDetails, toDetails: details.toDetails, isVerified: details.isVerified }, details.config);
|
|
45
|
+
}
|
|
46
|
+
createMany(details) {
|
|
47
|
+
return this.sendCreationMany(`${this.url}/transactions`, details.values ?? [], details.config);
|
|
48
|
+
}
|
|
49
|
+
modify(transaction) {
|
|
50
|
+
return this.sendModification(`${this.url}/transactions/${transaction.transactionId}`, { userId: transaction.userId, typeId: transaction.typeId, statusId: transaction.statusId, timestamp: transaction.timestamp, fromDetails: transaction.fromDetails, toDetails: transaction.toDetails, isVerified: transaction.isVerified }, transaction.config);
|
|
51
|
+
}
|
|
52
|
+
destroy(transaction) {
|
|
53
|
+
return this.sendDestruction(`${this.url}/transactions/${transaction.transactionId}`, transaction.config);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.TransactionManager = TransactionManager;
|
|
57
57
|
//# sourceMappingURL=TransactionManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionManager.js","sourceRoot":"","sources":["../../src/crud/TransactionManager.ts"],"names":[],"mappings":";;;AACA,2CAA6E;
|
|
1
|
+
{"version":3,"file":"TransactionManager.js","sourceRoot":"","sources":["../../src/crud/TransactionManager.ts"],"names":[],"mappings":";;;AACA,2CAA6E;AA0M7E,MAAa,kBAAmB,SAAQ,+BAA2D;IAChF,GAAG,CAAS;IAE7B,YAAY,GAAW;QACrB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAEM,IAAI,CAAC,OAAkC;QAC5C,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,GAAG,wBAAwB,OAAO,CAAC,MAAM,WAAW,OAAO,CAAC,MAAM,aAAa,OAAO,CAAC,QAAQ,cAAc,OAAO,CAAC,SAAS,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACpL,CAAC;IAEM,QAAQ,CAAC,OAAoC;QAClD,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,GAAG,oBAAoB,OAAO,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACvF,CAAC;IAEM,KAAK,CAAC,KAAK,CAAC,OAAkC;QACnD,IAAI,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,GAAG,eAAe,EAAE,OAAO,CAAC,CAAC;QACpE,OAAO,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;IAC7D,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,OAAkC;QACrD,IAAI,YAAY,GAAmB,EAAE,CAAC;QACtC,IAAI,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,GAA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jG,CAAC;IAEM,MAAM,CAAC,WAAyB;QACrC,OAAO,IAAI,CAAC,gBAAgB,CAC1B,GAAG,IAAI,CAAC,GAAG,iBAAiB,WAAW,CAAC,aAAa,EAAE,EACvD,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,WAAW,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,CAAC,WAAW,EAAE,SAAS,EAAE,WAAW,CAAC,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,UAAU,EAAE,EACxO,WAAW,CAAC,MAAM,CACnB,CAAC;IACJ,CAAC;IAEM,OAAO,CAAC,WAAyB;QACtC,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,GAAG,iBAAiB,WAAW,CAAC,aAAa,EAAE,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3G,CAAC;CACF;AAnED,gDAmEC"}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { CrudServiceManager, StandardIdRequestDefinition } from "itrm-tools";
|
|
2
|
-
import { AxiosRequestConfig } from "axios";
|
|
3
|
-
export interface IType {
|
|
4
|
-
typeId?: number;
|
|
5
|
-
type?: string;
|
|
6
|
-
details?: Record<string, Record<string, any> | string>;
|
|
7
|
-
updatedAt?: string;
|
|
8
|
-
createdAt?: string;
|
|
9
|
-
config?: AxiosRequestConfig;
|
|
10
|
-
}
|
|
11
|
-
export interface ITypeSearchDetails {
|
|
12
|
-
id?: string | number;
|
|
13
|
-
type?: string;
|
|
14
|
-
details?: any;
|
|
15
|
-
values?: IType[];
|
|
16
|
-
limit?: number;
|
|
17
|
-
offset?: number;
|
|
18
|
-
config?: AxiosRequestConfig;
|
|
19
|
-
}
|
|
20
|
-
export declare class TypeManager extends CrudServiceManager<ITypeSearchDetails, IType> {
|
|
21
|
-
private readonly url;
|
|
22
|
-
constructor(url: string);
|
|
23
|
-
find(details: ITypeSearchDetails): Promise<IType | undefined>;
|
|
24
|
-
findById(details: StandardIdRequestDefinition): Promise<IType | undefined>;
|
|
25
|
-
count(details: ITypeSearchDetails): Promise<number>;
|
|
26
|
-
findAll(details: ITypeSearchDetails): Promise<IType[] | undefined>;
|
|
27
|
-
private buildRequestUrl;
|
|
28
|
-
create(details: ITypeSearchDetails): Promise<IType | undefined>;
|
|
29
|
-
createMany(details: ITypeSearchDetails): Promise<IType[] | undefined>;
|
|
30
|
-
modify(type: IType): Promise<IType | undefined>;
|
|
31
|
-
destroy(type: IType): Promise<void | number>;
|
|
32
|
-
}
|
|
1
|
+
import { CrudServiceManager, StandardIdRequestDefinition } from "itrm-tools";
|
|
2
|
+
import { AxiosRequestConfig } from "axios";
|
|
3
|
+
export interface IType {
|
|
4
|
+
typeId?: number;
|
|
5
|
+
type?: string;
|
|
6
|
+
details?: Record<string, Record<string, any> | string>;
|
|
7
|
+
updatedAt?: string;
|
|
8
|
+
createdAt?: string;
|
|
9
|
+
config?: AxiosRequestConfig;
|
|
10
|
+
}
|
|
11
|
+
export interface ITypeSearchDetails {
|
|
12
|
+
id?: string | number;
|
|
13
|
+
type?: string;
|
|
14
|
+
details?: any;
|
|
15
|
+
values?: IType[];
|
|
16
|
+
limit?: number;
|
|
17
|
+
offset?: number;
|
|
18
|
+
config?: AxiosRequestConfig;
|
|
19
|
+
}
|
|
20
|
+
export declare class TypeManager extends CrudServiceManager<ITypeSearchDetails, IType> {
|
|
21
|
+
private readonly url;
|
|
22
|
+
constructor(url: string);
|
|
23
|
+
find(details: ITypeSearchDetails): Promise<IType | undefined>;
|
|
24
|
+
findById(details: StandardIdRequestDefinition): Promise<IType | undefined>;
|
|
25
|
+
count(details: ITypeSearchDetails): Promise<number>;
|
|
26
|
+
findAll(details: ITypeSearchDetails): Promise<IType[] | undefined>;
|
|
27
|
+
private buildRequestUrl;
|
|
28
|
+
create(details: ITypeSearchDetails): Promise<IType | undefined>;
|
|
29
|
+
createMany(details: ITypeSearchDetails): Promise<IType[] | undefined>;
|
|
30
|
+
modify(type: IType): Promise<IType | undefined>;
|
|
31
|
+
destroy(type: IType): Promise<void | number>;
|
|
32
|
+
}
|