@signa-app/dto 0.1.0
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/README.md +36 -0
- package/dist/dto/auth.dto.d.ts +37 -0
- package/dist/dto/auth.dto.d.ts.map +1 -0
- package/dist/dto/auth.dto.js +213 -0
- package/dist/dto/auth.dto.js.map +1 -0
- package/dist/dto/box-offer.dto.d.ts +17 -0
- package/dist/dto/box-offer.dto.d.ts.map +1 -0
- package/dist/dto/box-offer.dto.js +86 -0
- package/dist/dto/box-offer.dto.js.map +1 -0
- package/dist/dto/box-slot.dto.d.ts +18 -0
- package/dist/dto/box-slot.dto.d.ts.map +1 -0
- package/dist/dto/box-slot.dto.js +89 -0
- package/dist/dto/box-slot.dto.js.map +1 -0
- package/dist/dto/box.dto.d.ts +23 -0
- package/dist/dto/box.dto.d.ts.map +1 -0
- package/dist/dto/box.dto.js +107 -0
- package/dist/dto/box.dto.js.map +1 -0
- package/dist/dto/chat.dto.d.ts +38 -0
- package/dist/dto/chat.dto.d.ts.map +1 -0
- package/dist/dto/chat.dto.js +181 -0
- package/dist/dto/chat.dto.js.map +1 -0
- package/dist/dto/message.dto.d.ts +41 -0
- package/dist/dto/message.dto.d.ts.map +1 -0
- package/dist/dto/message.dto.js +263 -0
- package/dist/dto/message.dto.js.map +1 -0
- package/dist/dto/payment.d.ts +60 -0
- package/dist/dto/payment.d.ts.map +1 -0
- package/dist/dto/payment.js +258 -0
- package/dist/dto/payment.js.map +1 -0
- package/dist/dto/user.dto.d.ts +18 -0
- package/dist/dto/user.dto.d.ts.map +1 -0
- package/dist/dto/user.dto.js +96 -0
- package/dist/dto/user.dto.js.map +1 -0
- package/dist/dto//321/201ommon.dto.d.ts +19 -0
- package/dist/dto//321/201ommon.dto.d.ts.map +1 -0
- package/dist/dto//321/201ommon.dto.js +53 -0
- package/dist/dto//321/201ommon.dto.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/types/query-parameters.d.ts +19 -0
- package/dist/types/query-parameters.d.ts.map +1 -0
- package/dist/types/query-parameters.js +3 -0
- package/dist/types/query-parameters.js.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { EChains, ECurrency, EPaymentStatus, EPaymentType, PaymentInvoiceEntity } from "@signa-app/entities";
|
|
2
|
+
import { GetUserDTO } from "./user.dto";
|
|
3
|
+
import { GetChatDTO } from "./chat.dto";
|
|
4
|
+
export declare enum ECalculationBase {
|
|
5
|
+
SENDER = "sender",
|
|
6
|
+
RECIPIENT = "recipient"
|
|
7
|
+
}
|
|
8
|
+
export declare class CreateInvoiceRequestDTO {
|
|
9
|
+
chatUuid: string;
|
|
10
|
+
chain: EChains;
|
|
11
|
+
type: EPaymentType;
|
|
12
|
+
currency: ECurrency;
|
|
13
|
+
senderAmount: string;
|
|
14
|
+
recipientAmount: string;
|
|
15
|
+
feeAmount: string;
|
|
16
|
+
calculationBase: ECalculationBase;
|
|
17
|
+
}
|
|
18
|
+
export declare class CreateInvoiceResponseDTO {
|
|
19
|
+
recipientAddress: string;
|
|
20
|
+
amountWei: string;
|
|
21
|
+
feeWei: string;
|
|
22
|
+
total: string;
|
|
23
|
+
invoiceUuid: string;
|
|
24
|
+
bytes32Id: string;
|
|
25
|
+
}
|
|
26
|
+
export declare class GetRatesDTO {
|
|
27
|
+
USDT: number;
|
|
28
|
+
ETH: number;
|
|
29
|
+
scale: number;
|
|
30
|
+
}
|
|
31
|
+
export declare class GetFeesDTO {
|
|
32
|
+
minEdge: string | null;
|
|
33
|
+
maxEdge: string | null;
|
|
34
|
+
percent: number | null;
|
|
35
|
+
fixed: string | null;
|
|
36
|
+
}
|
|
37
|
+
export declare class GetFeesResponseDTO {
|
|
38
|
+
USDT: GetFeesDTO[];
|
|
39
|
+
rates: GetRatesDTO;
|
|
40
|
+
}
|
|
41
|
+
export declare class SubmitInvoiceRequestDTO {
|
|
42
|
+
chain: EChains;
|
|
43
|
+
txHash: string;
|
|
44
|
+
}
|
|
45
|
+
export declare class GetPaymentHistoryDTO {
|
|
46
|
+
invoiceUuid: string;
|
|
47
|
+
sender: GetUserDTO;
|
|
48
|
+
recipient: GetUserDTO;
|
|
49
|
+
amount: string;
|
|
50
|
+
fee: string;
|
|
51
|
+
chain: EChains;
|
|
52
|
+
type: EPaymentType;
|
|
53
|
+
currency: ECurrency;
|
|
54
|
+
status: EPaymentStatus;
|
|
55
|
+
createdAt: Date;
|
|
56
|
+
txHash: string | null;
|
|
57
|
+
chat: GetChatDTO | null;
|
|
58
|
+
static fromEntity(entity: PaymentInvoiceEntity, currentUserUuid: string): GetPaymentHistoryDTO;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=payment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment.d.ts","sourceRoot":"","sources":["../../src/dto/payment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AAG3G,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AACtC,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AAEtC,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,qBAAa,uBAAuB;IAGlC,QAAQ,EAAE,MAAM,CAAC;IAIjB,KAAK,EAAE,OAAO,CAAC;IAOf,IAAI,EAAE,YAAY,CAAC;IAInB,QAAQ,EAAE,SAAS,CAAC;IAQpB,YAAY,EAAE,MAAM,CAAC;IAQrB,eAAe,EAAE,MAAM,CAAC;IAQxB,SAAS,EAAE,MAAM,CAAC;IAOlB,eAAe,EAAE,gBAAgB,CAAC;CACnC;AAED,qBAAa,wBAAwB;IAEnC,gBAAgB,EAAE,MAAM,CAAC;IAGzB,SAAS,EAA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) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GetPaymentHistoryDTO = exports.SubmitInvoiceRequestDTO = exports.GetFeesResponseDTO = exports.GetFeesDTO = exports.GetRatesDTO = exports.CreateInvoiceResponseDTO = exports.CreateInvoiceRequestDTO = exports.ECalculationBase = void 0;
|
|
13
|
+
const entities_1 = require("@signa-app/entities");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
const user_dto_1 = require("./user.dto");
|
|
17
|
+
const chat_dto_1 = require("./chat.dto");
|
|
18
|
+
var ECalculationBase;
|
|
19
|
+
(function (ECalculationBase) {
|
|
20
|
+
ECalculationBase["SENDER"] = "sender";
|
|
21
|
+
ECalculationBase["RECIPIENT"] = "recipient";
|
|
22
|
+
})(ECalculationBase || (exports.ECalculationBase = ECalculationBase = {}));
|
|
23
|
+
class CreateInvoiceRequestDTO {
|
|
24
|
+
}
|
|
25
|
+
exports.CreateInvoiceRequestDTO = CreateInvoiceRequestDTO;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, swagger_1.ApiProperty)({ description: "UUID чата, к которому относится платёж", format: "uuid" }),
|
|
28
|
+
(0, class_validator_1.IsUUID)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], CreateInvoiceRequestDTO.prototype, "chatUuid", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({ enum: entities_1.EChains, description: "Блокчейн-сеть" }),
|
|
33
|
+
(0, class_validator_1.IsEnum)(entities_1.EChains),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], CreateInvoiceRequestDTO.prototype, "chain", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, swagger_1.ApiProperty)({
|
|
38
|
+
enum: entities_1.EPaymentType,
|
|
39
|
+
description: "Тип платежа (например: USER_TO_USER_PAYMENT)",
|
|
40
|
+
}),
|
|
41
|
+
(0, class_validator_1.IsEnum)(entities_1.EPaymentType),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], CreateInvoiceRequestDTO.prototype, "type", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, swagger_1.ApiProperty)({ enum: entities_1.ECurrency, description: "Валюта платежа" }),
|
|
46
|
+
(0, class_validator_1.IsEnum)(entities_1.ECurrency),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], CreateInvoiceRequestDTO.prototype, "currency", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, swagger_1.ApiProperty)({
|
|
51
|
+
description: "Сколько платит отправитель",
|
|
52
|
+
example: "145600",
|
|
53
|
+
}),
|
|
54
|
+
(0, class_validator_1.IsString)(),
|
|
55
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], CreateInvoiceRequestDTO.prototype, "senderAmount", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, swagger_1.ApiProperty)({
|
|
60
|
+
description: "Сколько получит получатель",
|
|
61
|
+
example: "145600",
|
|
62
|
+
}),
|
|
63
|
+
(0, class_validator_1.IsString)(),
|
|
64
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], CreateInvoiceRequestDTO.prototype, "recipientAmount", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, swagger_1.ApiProperty)({
|
|
69
|
+
description: "Комиссия",
|
|
70
|
+
example: "1600",
|
|
71
|
+
}),
|
|
72
|
+
(0, class_validator_1.IsString)(),
|
|
73
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], CreateInvoiceRequestDTO.prototype, "feeAmount", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, swagger_1.ApiProperty)({
|
|
78
|
+
description: "Основание для расчета: юзер вводил в инпут получателя или отправителя (влияет на доли в комиссии)",
|
|
79
|
+
enum: ECalculationBase,
|
|
80
|
+
}),
|
|
81
|
+
(0, class_validator_1.IsEnum)(ECalculationBase),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], CreateInvoiceRequestDTO.prototype, "calculationBase", void 0);
|
|
84
|
+
class CreateInvoiceResponseDTO {
|
|
85
|
+
}
|
|
86
|
+
exports.CreateInvoiceResponseDTO = CreateInvoiceResponseDTO;
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, swagger_1.ApiProperty)({ description: "Recipient wallet address resolved from user" }),
|
|
89
|
+
__metadata("design:type", String)
|
|
90
|
+
], CreateInvoiceResponseDTO.prototype, "recipientAddress", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, swagger_1.ApiProperty)({ description: "Payment amount in Wei (string)" }),
|
|
93
|
+
__metadata("design:type", String)
|
|
94
|
+
], CreateInvoiceResponseDTO.prototype, "amountWei", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, swagger_1.ApiProperty)({ description: "Fee in Wei (string)" }),
|
|
97
|
+
__metadata("design:type", String)
|
|
98
|
+
], CreateInvoiceResponseDTO.prototype, "feeWei", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, swagger_1.ApiProperty)({ description: "Total amount (amount + fee) in Wei (string)" }),
|
|
101
|
+
__metadata("design:type", String)
|
|
102
|
+
], CreateInvoiceResponseDTO.prototype, "total", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, swagger_1.ApiProperty)({ description: "Invoice UUID", format: "uuid" }),
|
|
105
|
+
__metadata("design:type", String)
|
|
106
|
+
], CreateInvoiceResponseDTO.prototype, "invoiceUuid", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, swagger_1.ApiProperty)({
|
|
109
|
+
description: "Invoice ID encoded as bytes32 (for on-chain reference)",
|
|
110
|
+
}),
|
|
111
|
+
__metadata("design:type", String)
|
|
112
|
+
], CreateInvoiceResponseDTO.prototype, "bytes32Id", void 0);
|
|
113
|
+
class GetRatesDTO {
|
|
114
|
+
}
|
|
115
|
+
exports.GetRatesDTO = GetRatesDTO;
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, swagger_1.ApiProperty)({ description: "Exchange rate for USDT", example: 1.0 }),
|
|
118
|
+
__metadata("design:type", Number)
|
|
119
|
+
], GetRatesDTO.prototype, "USDT", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, swagger_1.ApiProperty)({ description: "Exchange rate for ETH", example: 1800.0 }),
|
|
122
|
+
__metadata("design:type", Number)
|
|
123
|
+
], GetRatesDTO.prototype, "ETH", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, swagger_1.ApiProperty)({
|
|
126
|
+
description: "Scale of conversion rates (multiplier for floating-point precision)",
|
|
127
|
+
example: 100, // Example of scaling factor (e.g., 1 ETH = 180000 at this scale)
|
|
128
|
+
}),
|
|
129
|
+
__metadata("design:type", Number)
|
|
130
|
+
], GetRatesDTO.prototype, "scale", void 0);
|
|
131
|
+
class GetFeesDTO {
|
|
132
|
+
}
|
|
133
|
+
exports.GetFeesDTO = GetFeesDTO;
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, swagger_1.ApiProperty)({ description: "Minimum edge (as string)", example: "0" }),
|
|
136
|
+
__metadata("design:type", Object)
|
|
137
|
+
], GetFeesDTO.prototype, "minEdge", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, swagger_1.ApiProperty)({ description: "Maximum edge (as string)", example: "1000" }),
|
|
140
|
+
__metadata("design:type", Object)
|
|
141
|
+
], GetFeesDTO.prototype, "maxEdge", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, swagger_1.ApiProperty)({ description: "Percentage fee", example: 1.5 }),
|
|
144
|
+
__metadata("design:type", Object)
|
|
145
|
+
], GetFeesDTO.prototype, "percent", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, swagger_1.ApiProperty)({ description: "Fixed fee (as string)", example: "10" }),
|
|
148
|
+
__metadata("design:type", Object)
|
|
149
|
+
], GetFeesDTO.prototype, "fixed", void 0);
|
|
150
|
+
class GetFeesResponseDTO {
|
|
151
|
+
}
|
|
152
|
+
exports.GetFeesResponseDTO = GetFeesResponseDTO;
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, swagger_1.ApiProperty)({ type: [GetFeesDTO], description: "Fees for USDT currency" }),
|
|
155
|
+
__metadata("design:type", Array)
|
|
156
|
+
], GetFeesResponseDTO.prototype, "USDT", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, swagger_1.ApiProperty)({
|
|
159
|
+
type: GetRatesDTO,
|
|
160
|
+
description: "Exchange rates for supported currencies",
|
|
161
|
+
}),
|
|
162
|
+
__metadata("design:type", GetRatesDTO)
|
|
163
|
+
], GetFeesResponseDTO.prototype, "rates", void 0);
|
|
164
|
+
class SubmitInvoiceRequestDTO {
|
|
165
|
+
}
|
|
166
|
+
exports.SubmitInvoiceRequestDTO = SubmitInvoiceRequestDTO;
|
|
167
|
+
__decorate([
|
|
168
|
+
(0, swagger_1.ApiProperty)({ enum: entities_1.EChains, description: "Блокчейн-сеть" }),
|
|
169
|
+
(0, class_validator_1.IsEnum)(entities_1.EChains),
|
|
170
|
+
__metadata("design:type", String)
|
|
171
|
+
], SubmitInvoiceRequestDTO.prototype, "chain", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
(0, swagger_1.ApiProperty)({ description: "Хэш транзакции", example: "0x..." }),
|
|
174
|
+
(0, class_validator_1.IsString)(),
|
|
175
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
176
|
+
__metadata("design:type", String)
|
|
177
|
+
], SubmitInvoiceRequestDTO.prototype, "txHash", void 0);
|
|
178
|
+
class GetPaymentHistoryDTO {
|
|
179
|
+
static fromEntity(entity, currentUserUuid) {
|
|
180
|
+
return {
|
|
181
|
+
invoiceUuid: entity.uuid,
|
|
182
|
+
sender: user_dto_1.GetUserDTO.fromEntity(entity.sender),
|
|
183
|
+
recipient: user_dto_1.GetUserDTO.fromEntity(entity.recipient),
|
|
184
|
+
amount: entity.amount,
|
|
185
|
+
fee: entity.fee,
|
|
186
|
+
chain: entity.chain,
|
|
187
|
+
type: entity.type,
|
|
188
|
+
currency: entity.currency,
|
|
189
|
+
status: entity.status,
|
|
190
|
+
createdAt: entity.createdAt,
|
|
191
|
+
txHash: entity.txHash ?? null,
|
|
192
|
+
chat: entity.chat ? chat_dto_1.GetChatDTO.fromEntity(entity.chat, currentUserUuid, null) : null,
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
exports.GetPaymentHistoryDTO = GetPaymentHistoryDTO;
|
|
197
|
+
__decorate([
|
|
198
|
+
(0, swagger_1.ApiProperty)({ description: "Invoice UUID", format: "uuid" }),
|
|
199
|
+
__metadata("design:type", String)
|
|
200
|
+
], GetPaymentHistoryDTO.prototype, "invoiceUuid", void 0);
|
|
201
|
+
__decorate([
|
|
202
|
+
(0, swagger_1.ApiProperty)({ description: "Sender user", type: user_dto_1.GetUserDTO }),
|
|
203
|
+
__metadata("design:type", user_dto_1.GetUserDTO)
|
|
204
|
+
], GetPaymentHistoryDTO.prototype, "sender", void 0);
|
|
205
|
+
__decorate([
|
|
206
|
+
(0, swagger_1.ApiProperty)({ description: "Recipient user", type: user_dto_1.GetUserDTO }),
|
|
207
|
+
__metadata("design:type", user_dto_1.GetUserDTO)
|
|
208
|
+
], GetPaymentHistoryDTO.prototype, "recipient", void 0);
|
|
209
|
+
__decorate([
|
|
210
|
+
(0, swagger_1.ApiProperty)({ description: "Payment amount", example: "145600" }),
|
|
211
|
+
__metadata("design:type", String)
|
|
212
|
+
], GetPaymentHistoryDTO.prototype, "amount", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
(0, swagger_1.ApiProperty)({ description: "Payment fee", example: "1600" }),
|
|
215
|
+
__metadata("design:type", String)
|
|
216
|
+
], GetPaymentHistoryDTO.prototype, "fee", void 0);
|
|
217
|
+
__decorate([
|
|
218
|
+
(0, swagger_1.ApiProperty)({ description: "Blockchain network", enum: entities_1.EChains }),
|
|
219
|
+
__metadata("design:type", String)
|
|
220
|
+
], GetPaymentHistoryDTO.prototype, "chain", void 0);
|
|
221
|
+
__decorate([
|
|
222
|
+
(0, swagger_1.ApiProperty)({ description: "Payment type", enum: entities_1.EPaymentType }),
|
|
223
|
+
__metadata("design:type", String)
|
|
224
|
+
], GetPaymentHistoryDTO.prototype, "type", void 0);
|
|
225
|
+
__decorate([
|
|
226
|
+
(0, swagger_1.ApiProperty)({ description: "Payment currency", enum: entities_1.ECurrency }),
|
|
227
|
+
__metadata("design:type", String)
|
|
228
|
+
], GetPaymentHistoryDTO.prototype, "currency", void 0);
|
|
229
|
+
__decorate([
|
|
230
|
+
(0, swagger_1.ApiProperty)({ description: "Payment status", enum: entities_1.EPaymentStatus }),
|
|
231
|
+
__metadata("design:type", String)
|
|
232
|
+
], GetPaymentHistoryDTO.prototype, "status", void 0);
|
|
233
|
+
__decorate([
|
|
234
|
+
(0, swagger_1.ApiProperty)({
|
|
235
|
+
description: "Creation date",
|
|
236
|
+
type: String,
|
|
237
|
+
format: "date-time",
|
|
238
|
+
}),
|
|
239
|
+
__metadata("design:type", Date)
|
|
240
|
+
], GetPaymentHistoryDTO.prototype, "createdAt", void 0);
|
|
241
|
+
__decorate([
|
|
242
|
+
(0, swagger_1.ApiProperty)({
|
|
243
|
+
description: "Transaction hash (nullable)",
|
|
244
|
+
example: "0x...",
|
|
245
|
+
nullable: true,
|
|
246
|
+
}),
|
|
247
|
+
__metadata("design:type", Object)
|
|
248
|
+
], GetPaymentHistoryDTO.prototype, "txHash", void 0);
|
|
249
|
+
__decorate([
|
|
250
|
+
(0, swagger_1.ApiProperty)({
|
|
251
|
+
description: "Чат, к которому относится платёж (nullable)",
|
|
252
|
+
type: () => chat_dto_1.GetChatDTO,
|
|
253
|
+
nullable: true,
|
|
254
|
+
required: false,
|
|
255
|
+
}),
|
|
256
|
+
__metadata("design:type", Object)
|
|
257
|
+
], GetPaymentHistoryDTO.prototype, "chat", void 0);
|
|
258
|
+
//# sourceMappingURL=payment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment.js","sourceRoot":"","sources":["../../src/dto/payment.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA2G;AAC3G,6CAA4C;AAC5C,qDAAqE;AACrE,yCAAsC;AACtC,yCAAsC;AAEtC,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,2CAAuB,CAAA;AACzB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAED,MAAa,uBAAuB;CAkDnC;AAlDD,0DAkDC;AA/CC;IAFC,IAAA,qBAAW,EAAC,EAAC,WAAW,EAAE,wCAAwC,EAAE,MAAM,EAAE,MAAM,EAAC,CAAC;IACpF,IAAA,wBAAM,GAAE;;yDACQ;AAIjB;IAFC,IAAA,qBAAW,EAAC,EAAC,IAAI,EAAE,kBAAO,EAAE,WAAW,EAAE,eAAe,EAAC,CAAC;IAC1D,IAAA,wBAAM,EAAC,kBAAO,CAAC;;sDACD;AAOf;IALC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,uBAAY;QAClB,WAAW,EAAE,8CAA8C;KAC5D,C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app/entities";
|
|
2
|
+
export declare class GetUserDTO {
|
|
3
|
+
uuid: string;
|
|
4
|
+
userName: string;
|
|
5
|
+
address: string;
|
|
6
|
+
chain: EChains;
|
|
7
|
+
hasCommonChat?: boolean;
|
|
8
|
+
static fromEntity(user: UserEntity): GetUserDTO;
|
|
9
|
+
static fromEntityWithCommonChatFlag(user: UserEntity & {
|
|
10
|
+
hasCommonChat: boolean;
|
|
11
|
+
}): GetUserDTO;
|
|
12
|
+
}
|
|
13
|
+
export declare class GetPaymentContactDTO {
|
|
14
|
+
name: string;
|
|
15
|
+
contactUuid: string;
|
|
16
|
+
type: EPaymentType;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=user.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.dto.d.ts","sourceRoot":"","sources":["../../src/dto/user.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAEtE,qBAAa,UAAU;IAKrB,IAAI,EAAE,MAAM,CAAC;IAMb,QAAQ,EAAE,MAAM,CAAC;IAMjB,OAAO,EAAE,MAAM,CAAC;IAOhB,KAAK,EAAE,OAAO,CAAC;IAMf,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU;IAS/C,MAAM,CAAC,4BAA4B,CAAC,IAAI,EAAE,UAAU,GAAG;QAAC,aAAa,EAAE,OAAO,CAAA;KAAC,GAAG,UAAU;CAS7F;AAED,qBAAa,oBAAoB;IAK/B,IAAI,EAAE,MAAM,CAAC;IAMb,WAAW,EAAE,MAAM,CAAC;IAOpB,IAAI,EAAE,YAAY,CAAC;CACpB"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GetPaymentContactDTO = exports.GetUserDTO = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const entities_1 = require("@signa-app/entities");
|
|
15
|
+
class GetUserDTO {
|
|
16
|
+
static fromEntity(user) {
|
|
17
|
+
return {
|
|
18
|
+
uuid: user.uuid,
|
|
19
|
+
userName: user?.displayName || user.userName,
|
|
20
|
+
address: user.address,
|
|
21
|
+
chain: user.chain,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
static fromEntityWithCommonChatFlag(user) {
|
|
25
|
+
return {
|
|
26
|
+
uuid: user.uuid,
|
|
27
|
+
userName: user?.displayName || user.userName,
|
|
28
|
+
address: user.address,
|
|
29
|
+
chain: user.chain,
|
|
30
|
+
hasCommonChat: user?.hasCommonChat,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.GetUserDTO = GetUserDTO;
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, swagger_1.ApiProperty)({
|
|
37
|
+
description: "User UUID",
|
|
38
|
+
example: "123e4567-e89b-12d3-a456-426614174000",
|
|
39
|
+
}),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], GetUserDTO.prototype, "uuid", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, swagger_1.ApiProperty)({
|
|
44
|
+
description: "User name",
|
|
45
|
+
example: "john_doe",
|
|
46
|
+
}),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], GetUserDTO.prototype, "userName", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, swagger_1.ApiProperty)({
|
|
51
|
+
description: "Wallet address",
|
|
52
|
+
example: "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
|
|
53
|
+
}),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], GetUserDTO.prototype, "address", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, swagger_1.ApiProperty)({
|
|
58
|
+
description: "Blockchain network",
|
|
59
|
+
enum: entities_1.EChains,
|
|
60
|
+
example: entities_1.EChains.ETH,
|
|
61
|
+
}),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], GetUserDTO.prototype, "chain", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, swagger_1.ApiProperty)({
|
|
66
|
+
description: "Is with user has chat with current user or not",
|
|
67
|
+
example: false,
|
|
68
|
+
}),
|
|
69
|
+
__metadata("design:type", Boolean)
|
|
70
|
+
], GetUserDTO.prototype, "hasCommonChat", void 0);
|
|
71
|
+
class GetPaymentContactDTO {
|
|
72
|
+
}
|
|
73
|
+
exports.GetPaymentContactDTO = GetPaymentContactDTO;
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, swagger_1.ApiProperty)({
|
|
76
|
+
description: "Contact display name (user/group/channel)",
|
|
77
|
+
example: "john_doe",
|
|
78
|
+
}),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], GetPaymentContactDTO.prototype, "name", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, swagger_1.ApiProperty)({
|
|
83
|
+
description: "Uuid of the contact (user/group owner/channel owner)",
|
|
84
|
+
example: "123e4567-e89b-12d3-a456-426614174000",
|
|
85
|
+
}),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], GetPaymentContactDTO.prototype, "contactUuid", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, swagger_1.ApiProperty)({
|
|
90
|
+
description: "Payment context/type",
|
|
91
|
+
enum: entities_1.EPaymentType,
|
|
92
|
+
example: entities_1.EPaymentType.USER_TO_USER_PAYMENT,
|
|
93
|
+
}),
|
|
94
|
+
__metadata("design:type", String)
|
|
95
|
+
], GetPaymentContactDTO.prototype, "type", void 0);
|
|
96
|
+
//# sourceMappingURL=user.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.dto.js","sourceRoot":"","sources":["../../src/dto/user.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4C;AAC5C,kDAAsE;AAEtE,MAAa,UAAU;IAgCrB,MAAM,CAAC,UAAU,CAAC,IAAgB;QAChC,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,EAAE,WAAW,IAAI,IAAI,CAAC,QAAQ;YAC5C,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,4BAA4B,CAAC,IAA2C;QAC7E,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,EAAE,WAAW,IAAI,IAAI,CAAC,QAAQ;YAC5C,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,aAAa,EAAE,IAAI,EAAE,aAAa;SACnC,CAAC;IACJ,CAAC;CACF;AAlDD,gCAkDC;AA7CC;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,WAAW;QACxB,OAAO,EAAE,sCAAsC;KAChD,CAAC;;wCACW;AAMb;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,WAAW;QACxB,OAAO,EAAE,UAAU;KACpB,CAAC;;4CACe;AAMjB;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,gBAAgB;QAC7B,OAAO,EAAE,4CAA4C;KACtD,CAAC;;2CACc;AAOhB;IALC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,kBAAO;QACb,OAAO,EAAE,kBAAO,CAAC,GAAG;KACrB,CAAC;;yCACa;AAMf;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,gDAAgD;QAC7D,OAAO,EAAE,KAAK;KACf,CAAC;;iDACsB;AAsB1B,MAAa,oBAAoB;CAmBhC;AAnBD,oDAmBC;AAdC;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,2CAA2C;QACxD,OAAO,EAAE,UAAU;KACpB,CAAC;;kDACW;AAMb;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,sDAAsD;QACnE,OAAO,EAAE,sCAAsC;KAChD,CAAC;;yDACkB;AAOpB;IALC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,sBAAsB;QACnC,IAAI,EAAE,uBAAY;QAClB,OAAO,EAAE,uBAAY,CAAC,oBAAoB;KAC3C,CAAC;;kDACiB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare enum EApiErrorCode {
|
|
2
|
+
USERNAME_REQUIRED = "USERNAME_REQUIRED",
|
|
3
|
+
USERNAME_MIN = "USERNAME_MIN",
|
|
4
|
+
USERNAME_FORMAT = "USERNAME_FORMAT",
|
|
5
|
+
USERNAME_UNIQUE = "USERNAME_UNIQUE",
|
|
6
|
+
ETH_ADDRESS_REQUIRED = "ETH_ADDRESS_REQUIRED",
|
|
7
|
+
ETH_ADDRESS_LENGTH = "ETH_ADDRESS_LENGTH",
|
|
8
|
+
ETH_ADDRESS_FORMAT = "ETH_ADDRESS_FORMAT",
|
|
9
|
+
INVALID_CHAIN = "INVALID_CHAIN"
|
|
10
|
+
}
|
|
11
|
+
export type ApiErrorCode = EApiErrorCode;
|
|
12
|
+
export declare class PaginatedResponseDTO<T> {
|
|
13
|
+
data: T[];
|
|
14
|
+
total: number;
|
|
15
|
+
page: number;
|
|
16
|
+
limit: number;
|
|
17
|
+
totalPages: number;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=%D1%81ommon.dto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"сommon.dto.d.ts","sourceRoot":"","sources":["../../src/dto/сommon.dto.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACvB,iBAAiB,sBAAsB;IACvC,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;IACnC,eAAe,oBAAoB;IACnC,oBAAoB,yBAAyB;IAC7C,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;IACzC,aAAa,kBAAkB;CAChC;AAED,MAAM,MAAM,YAAY,GAAG,aAAa,CAAC;AAIzC,qBAAa,oBAAoB,CAAC,CAAC;IAKjC,IAAI,EAAE,CAAC,EAAE,CAAC;IAGV,KAAK,EAAE,MAAM,CAAC;IAGd,IAAI,EAAE,MAAM,CAAC;IAKb,KAAK,EAAE,MAAM,CAAC;IAGd,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PaginatedResponseDTO = exports.EApiErrorCode = void 0;
|
|
13
|
+
var EApiErrorCode;
|
|
14
|
+
(function (EApiErrorCode) {
|
|
15
|
+
EApiErrorCode["USERNAME_REQUIRED"] = "USERNAME_REQUIRED";
|
|
16
|
+
EApiErrorCode["USERNAME_MIN"] = "USERNAME_MIN";
|
|
17
|
+
EApiErrorCode["USERNAME_FORMAT"] = "USERNAME_FORMAT";
|
|
18
|
+
EApiErrorCode["USERNAME_UNIQUE"] = "USERNAME_UNIQUE";
|
|
19
|
+
EApiErrorCode["ETH_ADDRESS_REQUIRED"] = "ETH_ADDRESS_REQUIRED";
|
|
20
|
+
EApiErrorCode["ETH_ADDRESS_LENGTH"] = "ETH_ADDRESS_LENGTH";
|
|
21
|
+
EApiErrorCode["ETH_ADDRESS_FORMAT"] = "ETH_ADDRESS_FORMAT";
|
|
22
|
+
EApiErrorCode["INVALID_CHAIN"] = "INVALID_CHAIN";
|
|
23
|
+
})(EApiErrorCode || (exports.EApiErrorCode = EApiErrorCode = {}));
|
|
24
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
25
|
+
class PaginatedResponseDTO {
|
|
26
|
+
}
|
|
27
|
+
exports.PaginatedResponseDTO = PaginatedResponseDTO;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, swagger_1.ApiProperty)({
|
|
30
|
+
description: "Array of data items for the current page",
|
|
31
|
+
isArray: true,
|
|
32
|
+
}),
|
|
33
|
+
__metadata("design:type", Array)
|
|
34
|
+
], PaginatedResponseDTO.prototype, "data", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, swagger_1.ApiProperty)({ description: "Total number of items across all pages" }),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], PaginatedResponseDTO.prototype, "total", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, swagger_1.ApiProperty)({ description: "Current page number (1-based)" }),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], PaginatedResponseDTO.prototype, "page", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, swagger_1.ApiProperty)({
|
|
45
|
+
description: "How many items to return per page",
|
|
46
|
+
}),
|
|
47
|
+
__metadata("design:type", Number)
|
|
48
|
+
], PaginatedResponseDTO.prototype, "limit", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, swagger_1.ApiProperty)({ description: "Total number of available pages" }),
|
|
51
|
+
__metadata("design:type", Number)
|
|
52
|
+
], PaginatedResponseDTO.prototype, "totalPages", void 0);
|
|
53
|
+
//# sourceMappingURL=%D1%81ommon.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"сommon.dto.js","sourceRoot":"","sources":["../../src/dto/сommon.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,IAAY,aASX;AATD,WAAY,aAAa;IACvB,wDAAuC,CAAA;IACvC,8CAA6B,CAAA;IAC7B,oDAAmC,CAAA;IACnC,oDAAmC,CAAA;IACnC,8DAA6C,CAAA;IAC7C,0DAAyC,CAAA;IACzC,0DAAyC,CAAA;IACzC,gDAA+B,CAAA;AACjC,CAAC,EATW,aAAa,6BAAb,aAAa,QASxB;AAID,6CAA4C;AAE5C,MAAa,oBAAoB;CAoBhC;AApBD,oDAoBC;AAfC;IAJC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,0CAA0C;QACvD,OAAO,EAAE,IAAI;KACd,CAAC;;kDACQ;AAGV;IADC,IAAA,qBAAW,EAAC,EAAC,WAAW,EAAE,wCAAwC,EAAC,CAAC;;mDACvD;AAGd;IADC,IAAA,qBAAW,EAAC,EAAC,WAAW,EAAE,+BAA+B,EAAC,CAAC;;kDAC/C;AAKb;IAHC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,mCAAmC;KACjD,CAAC;;mDACY;AAGd;IADC,IAAA,qBAAW,EAAC,EAAC,WAAW,EAAE,iCAAiC,EAAC,CAAC;;wDAC3C"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./dto/auth.dto";
|
|
2
|
+
export * from "./dto/box.dto";
|
|
3
|
+
export * from "./dto/box-offer.dto";
|
|
4
|
+
export * from "./dto/box-slot.dto";
|
|
5
|
+
export * from "./dto/chat.dto";
|
|
6
|
+
export * from "./dto/message.dto";
|
|
7
|
+
export * from "./dto/payment";
|
|
8
|
+
export * from "./dto/user.dto";
|
|
9
|
+
export * from "./dto/сommon.dto";
|
|
10
|
+
export * from "./types/query-parameters";
|
|
11
|
+
export { EAppSettingNames, EBoxType, EChains, EChatType, ECurrency, EMessageType, EPaymentStatus, EPaymentType, } from "@signa-app/entities";
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AAEzC,OAAO,EACL,gBAAgB,EAChB,QAAQ,EACR,OAAO,EACP,SAAS,EACT,SAAS,EACT,YAAY,EACZ,cAAc,EACd,YAAY,GACb,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.EPaymentType = exports.EPaymentStatus = exports.EMessageType = exports.ECurrency = exports.EChatType = exports.EChains = exports.EBoxType = exports.EAppSettingNames = void 0;
|
|
18
|
+
__exportStar(require("./dto/auth.dto"), exports);
|
|
19
|
+
__exportStar(require("./dto/box.dto"), exports);
|
|
20
|
+
__exportStar(require("./dto/box-offer.dto"), exports);
|
|
21
|
+
__exportStar(require("./dto/box-slot.dto"), exports);
|
|
22
|
+
__exportStar(require("./dto/chat.dto"), exports);
|
|
23
|
+
__exportStar(require("./dto/message.dto"), exports);
|
|
24
|
+
__exportStar(require("./dto/payment"), exports);
|
|
25
|
+
__exportStar(require("./dto/user.dto"), exports);
|
|
26
|
+
__exportStar(require("./dto/\u0441ommon.dto"), exports);
|
|
27
|
+
__exportStar(require("./types/query-parameters"), exports);
|
|
28
|
+
var entities_1 = require("@signa-app/entities");
|
|
29
|
+
Object.defineProperty(exports, "EAppSettingNames", { enumerable: true, get: function () { return entities_1.EAppSettingNames; } });
|
|
30
|
+
Object.defineProperty(exports, "EBoxType", { enumerable: true, get: function () { return entities_1.EBoxType; } });
|
|
31
|
+
Object.defineProperty(exports, "EChains", { enumerable: true, get: function () { return entities_1.EChains; } });
|
|
32
|
+
Object.defineProperty(exports, "EChatType", { enumerable: true, get: function () { return entities_1.EChatType; } });
|
|
33
|
+
Object.defineProperty(exports, "ECurrency", { enumerable: true, get: function () { return entities_1.ECurrency; } });
|
|
34
|
+
Object.defineProperty(exports, "EMessageType", { enumerable: true, get: function () { return entities_1.EMessageType; } });
|
|
35
|
+
Object.defineProperty(exports, "EPaymentStatus", { enumerable: true, get: function () { return entities_1.EPaymentStatus; } });
|
|
36
|
+
Object.defineProperty(exports, "EPaymentType", { enumerable: true, get: function () { return entities_1.EPaymentType; } });
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,gDAA8B;AAC9B,sDAAoC;AACpC,qDAAmC;AACnC,iDAA+B;AAC/B,oDAAkC;AAClC,gDAA8B;AAC9B,iDAA+B;AAC/B,wDAAiC;AACjC,2DAAyC;AAEzC,gDAS6B;AAR3B,4GAAA,gBAAgB,OAAA;AAChB,oGAAA,QAAQ,OAAA;AACR,mGAAA,OAAO,OAAA;AACP,qGAAA,SAAS,OAAA;AACT,qGAAA,SAAS,OAAA;AACT,wGAAA,YAAY,OAAA;AACZ,0GAAA,cAAc,OAAA;AACd,wGAAA,YAAY,OAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EPaymentStatus, EPaymentType } from "@signa-app/entities";
|
|
2
|
+
export type TPaymentHistoryQueryParams = {
|
|
3
|
+
limit: string;
|
|
4
|
+
offset: string;
|
|
5
|
+
fromContact?: string | null;
|
|
6
|
+
fromContactType?: "user" | "chat" | null;
|
|
7
|
+
toContact?: string | null;
|
|
8
|
+
toContactType?: "user" | "chat" | null;
|
|
9
|
+
amountFrom: string | null;
|
|
10
|
+
amountTo: string | null;
|
|
11
|
+
chain: string | null;
|
|
12
|
+
currency: string | null;
|
|
13
|
+
type: EPaymentType | null;
|
|
14
|
+
status: EPaymentStatus | null;
|
|
15
|
+
from: string | null;
|
|
16
|
+
to: string | null;
|
|
17
|
+
sort: "updated-asc" | "updated-desc" | "amount-asc" | "amount-desc";
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=query-parameters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-parameters.d.ts","sourceRoot":"","sources":["../../src/types/query-parameters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAE,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAEjE,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACvC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAElB,IAAI,EAAE,aAAa,GAAG,cAAc,GAAG,YAAY,GAAG,aAAa,CAAC;CACrE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-parameters.js","sourceRoot":"","sources":["../../src/types/query-parameters.ts"],"names":[],"mappings":""}
|