docta-package 1.2.103 → 1.2.104
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ISessionDocument, ISessionPayment } from "../../models";
|
|
1
|
+
import { ISessionDocument, ISessionPayment, ISessionRefund } from "../../models";
|
|
2
2
|
import { PeriodOutputDto } from "./period";
|
|
3
3
|
import { UserOutputDto } from "./user";
|
|
4
4
|
interface ISessionConfigOutput {
|
|
@@ -13,6 +13,7 @@ export declare class SessionOutputDto {
|
|
|
13
13
|
status: string;
|
|
14
14
|
doctorId: string | null;
|
|
15
15
|
patientId: string | null;
|
|
16
|
+
refund: ISessionRefund | null;
|
|
16
17
|
isDeleted: boolean;
|
|
17
18
|
createdAt: number;
|
|
18
19
|
updatedAt: number;
|
|
@@ -14,6 +14,7 @@ class SessionOutputDto {
|
|
|
14
14
|
((_d = ((_c = session.doctor.id) !== null && _c !== void 0 ? _c : session.doctor._id)) === null || _d === void 0 ? void 0 : _d.toString()) || null;
|
|
15
15
|
this.patientId =
|
|
16
16
|
((_f = ((_e = session.patient.id) !== null && _e !== void 0 ? _e : session.patient._id)) === null || _f === void 0 ? void 0 : _f.toString()) || null;
|
|
17
|
+
this.refund = session.refund || null;
|
|
17
18
|
this.isDeleted = session.isDeleted;
|
|
18
19
|
this.createdAt = session.createdAt;
|
|
19
20
|
this.updatedAt = session.updatedAt;
|
|
@@ -4,7 +4,7 @@ import { IPeriodDocument } from "./period";
|
|
|
4
4
|
import { IPatientDocument } from "./patient";
|
|
5
5
|
import { SessionStatus } from "../enums/session.status";
|
|
6
6
|
import { IDoctorDocument } from "./doctor";
|
|
7
|
-
import { EnumTranzakPaymentStatus, EnumTranzakCurrency } from "../enums/tranzak";
|
|
7
|
+
import { EnumTranzakPaymentStatus, EnumTranzakCurrency, EnumTranzakRefundStatus } from "../enums/tranzak";
|
|
8
8
|
/**
|
|
9
9
|
* Interface for session configuration percentages
|
|
10
10
|
*/
|
|
@@ -25,6 +25,18 @@ export interface ISessionPayment {
|
|
|
25
25
|
amount: number;
|
|
26
26
|
currency: EnumTranzakCurrency;
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Interface for embedded refund data
|
|
30
|
+
*/
|
|
31
|
+
export interface ISessionRefund {
|
|
32
|
+
webhookId: string;
|
|
33
|
+
webhookStatus: EnumTranzakRefundStatus;
|
|
34
|
+
refundId: string;
|
|
35
|
+
refundedTransactionId: string;
|
|
36
|
+
currency: EnumTranzakCurrency;
|
|
37
|
+
serviceId: string;
|
|
38
|
+
reason: string;
|
|
39
|
+
}
|
|
28
40
|
/**
|
|
29
41
|
* Session interface
|
|
30
42
|
*/
|
|
@@ -43,6 +55,7 @@ export interface ISession extends IBaseModel {
|
|
|
43
55
|
hasPlatformCollected: boolean;
|
|
44
56
|
meta: ISessionConfig;
|
|
45
57
|
payment?: ISessionPayment;
|
|
58
|
+
refund?: ISessionRefund;
|
|
46
59
|
}
|
|
47
60
|
/**
|
|
48
61
|
* Document + Model interfaces
|
package/build/models/session.js
CHANGED
|
@@ -53,6 +53,22 @@ const SessionSchema = new mongoose_1.Schema(Object.assign(Object.assign({}, base
|
|
|
53
53
|
enum: Object.values(tranzak_1.EnumTranzakCurrency),
|
|
54
54
|
required: false,
|
|
55
55
|
},
|
|
56
|
+
}, refund: {
|
|
57
|
+
webhookId: { type: String, required: false },
|
|
58
|
+
webhookStatus: {
|
|
59
|
+
type: String,
|
|
60
|
+
enum: Object.values(tranzak_1.EnumTranzakRefundStatus),
|
|
61
|
+
required: false,
|
|
62
|
+
},
|
|
63
|
+
refundId: { type: String, required: false },
|
|
64
|
+
refundedTransactionId: { type: String, required: false },
|
|
65
|
+
currency: {
|
|
66
|
+
type: String,
|
|
67
|
+
enum: Object.values(tranzak_1.EnumTranzakCurrency),
|
|
68
|
+
required: false,
|
|
69
|
+
},
|
|
70
|
+
serviceId: { type: String, required: false },
|
|
71
|
+
reason: { type: String, required: false },
|
|
56
72
|
} }));
|
|
57
73
|
SessionSchema.plugin(base_1.BaseSchemaPlugin);
|
|
58
74
|
exports.SessionModel = (0, mongoose_1.model)("Session", SessionSchema);
|
package/package.json
CHANGED