@neuralinnovations/dataisland-sdk 0.5.8 → 0.6.1
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/package.json +1 -1
- package/dist/src/dto/acquiringResponse.d.ts +20 -0
- package/dist/src/dto/acquiringResponse.d.ts.map +1 -1
- package/dist/src/dto/acquiringResponse.js.map +1 -1
- package/dist/src/dto/chatResponse.d.ts +3 -0
- package/dist/src/dto/chatResponse.d.ts.map +1 -1
- package/dist/src/dto/chatResponse.js.map +1 -1
- package/dist/src/internal/app.impl.d.ts.map +1 -1
- package/dist/src/services/statistics.d.ts +6 -0
- package/dist/src/services/statistics.d.ts.map +1 -1
- package/dist/src/services/statistics.js +10 -0
- package/dist/src/services/statistics.js.map +1 -1
- package/dist/src/storages/administration/administration.d.ts +4 -0
- package/dist/src/storages/administration/administration.d.ts.map +1 -1
- package/dist/src/storages/administration/administration.js.map +1 -1
- package/dist/src/storages/administration/chats.administration.d.ts +7 -0
- package/dist/src/storages/administration/chats.administration.d.ts.map +1 -0
- package/dist/src/storages/administration/chats.administration.impl.d.ts +11 -0
- package/dist/src/storages/administration/chats.administration.impl.d.ts.map +1 -0
- package/dist/src/storages/administration/chats.administration.impl.js +79 -0
- package/dist/src/storages/administration/chats.administration.impl.js.map +1 -0
- package/dist/src/storages/administration/chats.administration.js +7 -0
- package/dist/src/storages/administration/chats.administration.js.map +1 -0
- package/dist/src/storages/administration/maib.administration.d.ts +6 -0
- package/dist/src/storages/administration/maib.administration.d.ts.map +1 -0
- package/dist/src/storages/administration/maib.administration.impl.d.ts +10 -0
- package/dist/src/storages/administration/maib.administration.impl.d.ts.map +1 -0
- package/dist/src/storages/administration/maib.administration.impl.js +54 -0
- package/dist/src/storages/administration/maib.administration.impl.js.map +1 -0
- package/dist/src/storages/administration/maib.administration.js +7 -0
- package/dist/src/storages/administration/maib.administration.js.map +1 -0
- package/package.json +1 -1
- package/src/dto/acquiringResponse.ts +23 -0
- package/src/dto/chatResponse.ts +4 -0
- package/src/services/statistics.ts +16 -0
- package/src/storages/administration/administration.ts +6 -0
- package/src/storages/administration/chats.administration.impl.ts +98 -0
- package/src/storages/administration/chats.administration.ts +20 -0
- package/src/storages/administration/maib.administration.impl.ts +67 -0
- package/src/storages/administration/maib.administration.ts +15 -0
package/dist/package.json
CHANGED
@@ -38,6 +38,26 @@ export interface AcquiringSegmentData {
|
|
38
38
|
key: string;
|
39
39
|
dayItems: SegmentItemData[];
|
40
40
|
}
|
41
|
+
export interface PaymentInfoResponse {
|
42
|
+
dateFrom: string;
|
43
|
+
dateTo: string;
|
44
|
+
info: PaymentInfo[];
|
45
|
+
}
|
46
|
+
export interface PaymentInfo {
|
47
|
+
userId: string;
|
48
|
+
userEmail: string;
|
49
|
+
lastPayment: string;
|
50
|
+
segmentKey: string;
|
51
|
+
price: number;
|
52
|
+
currency: string;
|
53
|
+
stateInfo: string;
|
54
|
+
payIds: string[];
|
55
|
+
}
|
56
|
+
export interface RefundResponse {
|
57
|
+
payId: string;
|
58
|
+
isSuccessful: boolean;
|
59
|
+
amount: number;
|
60
|
+
}
|
41
61
|
export declare enum OrderState {
|
42
62
|
Created = 0,
|
43
63
|
WaitingForPayment = 10,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acquiringResponse.d.ts","sourceRoot":"","sources":["../../../src/dto/acquiringResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAElD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,CAAA;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,OAAO,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,aAAa,CAAA;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,aAAa,EAAE,CAAA;IACtB,aAAa,EAAE,oBAAoB,EAAE,CAAA;CACtC;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,aAAa,CAAA;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,eAAe,EAAE,CAAA;CAC5B;AAED,oBAAY,UAAU;IACpB,OAAO,IAAI;IACX,iBAAiB,KAAK;IACtB,IAAI,KAAK;IACT,SAAS,KAAK;CACf"}
|
1
|
+
{"version":3,"file":"acquiringResponse.d.ts","sourceRoot":"","sources":["../../../src/dto/acquiringResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAElD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,CAAA;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,OAAO,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,U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
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acquiringResponse.js","sourceRoot":"","sources":["../../../src/dto/acquiringResponse.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"acquiringResponse.js","sourceRoot":"","sources":["../../../src/dto/acquiringResponse.ts"],"names":[],"mappings":";;;AAwEA,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,iDAAW,CAAA;IACX,sEAAsB,CAAA;IACtB,4CAAS,CAAA;IACT,sDAAc,CAAA;AAChB,CAAC,EALW,UAAU,0BAAV,UAAU,QAKrB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chatResponse.d.ts","sourceRoot":"","sources":["../../../src/dto/chatResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAA;AAErD,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,QAAQ,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,eAAe,CAAC;IAC3B,MAA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WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,WAAW,EAAE,SAAS,EAAE,CAAC;CAC1B;AAED,oBAAY,UAAU;IACpB,OAAO,IAAI;IACX,OAAO,IAAI;IACX,IAAI,IAAI;IACR,QAAQ,IAAI;CACb;AAED,oBAAY,QAAQ;IAClB,OAAO,IAAI;IACX,OAAO,IAAI;IACX,eAAe,IAAI;IACnB,eAAe,IAAI;IACnB,IAAI,KAAK;CACV;AAED,qBAAa,YAAY;WACT,SAAS,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO;WAUlC,UAAU,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO;CAOlD"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chatResponse.js","sourceRoot":"","sources":["../../../src/dto/chatResponse.ts"],"names":[],"mappings":";;;AA0CA,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB,uCAAQ,CAAA;IACR,uDAAgB,CAAA;IAChB,mDAAc,CAAA;IACd,uCAAQ,CAAA;IACR,+CAAa,CAAA;IACb,uEAAyB,CAAA;IACzB,mEAAuB,CAAA;IACvB,uDAAiB,CAAA;AAEnB,CAAC,EAVW,QAAQ,wBAAR,QAAQ,QAUnB;
|
1
|
+
{"version":3,"file":"chatResponse.js","sourceRoot":"","sources":["../../../src/dto/chatResponse.ts"],"names":[],"mappings":";;;AA0CA,IAAY,QAUX;AAVD,WAAY,QAAQ;IAClB,uCAAQ,CAAA;IACR,uDAAgB,CAAA;IAChB,mDAAc,CAAA;IACd,uCAAQ,CAAA;IACR,+CAAa,CAAA;IACb,uEAAyB,CAAA;IACzB,mEAAuB,CAAA;IACvB,uDAAiB,CAAA;AAEnB,CAAC,EAVW,QAAQ,wBAAR,QAAQ,Q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AAC,CAAC,GAAG,SAAS,GAC1D,OAAO,CAAC,IAAI,CAAC;CA0IjB"}
|
@@ -4,15 +4,21 @@ import { StatisticAdministrationImpl } from "../storages/administration/statisti
|
|
4
4
|
import { Administration } from "../storages/administration/administration";
|
5
5
|
import { UsersAdministrationImpl } from "../storages/administration/users.administration.impl";
|
6
6
|
import { CheatsAdministrationImpl } from "../storages/administration/cheats.administration.impl";
|
7
|
+
import { MaibAdministrationImpl } from "../storages/administration/maib.administration.impl";
|
8
|
+
import { ChatsAdministrationImpl } from "../storages/administration/chats.administration.impl";
|
7
9
|
export declare class AdministrationService extends Service implements Administration {
|
8
10
|
private readonly _libraries;
|
9
11
|
private readonly _statistic;
|
10
12
|
private readonly _users;
|
11
13
|
private readonly _cheats;
|
14
|
+
private readonly _maib;
|
15
|
+
private readonly _chats;
|
12
16
|
constructor(context: ServiceContext);
|
13
17
|
get libraries(): LibraryAdministration;
|
14
18
|
get statistic(): StatisticAdministrationImpl;
|
15
19
|
get users(): UsersAdministrationImpl;
|
16
20
|
get cheats(): CheatsAdministrationImpl;
|
21
|
+
get maib(): MaibAdministrationImpl;
|
22
|
+
get chats(): ChatsAdministrationImpl;
|
17
23
|
}
|
18
24
|
//# sourceMappingURL=statistics.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"statistics.d.ts","sourceRoot":"","sources":["../../../src/services/statistics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAInD,OAAO,EACL,qBAAqB,EACtB,MAAM,mDAAmD,CAAA;AAC1D,OAAO,EACL,2BAA2B,EAC5B,MAAM,2DAA2D,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAA;AAC1E,OAAO,EACL,uBAAuB,EACxB,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EACL,wBAAwB,EACzB,MAAM,uDAAuD,CAAA;
|
1
|
+
{"version":3,"file":"statistics.d.ts","sourceRoot":"","sources":["../../../src/services/statistics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAInD,OAAO,EACL,qBAAqB,EACtB,MAAM,mDAAmD,CAAA;AAC1D,OAAO,EACL,2BAA2B,EAC5B,MAAM,2DAA2D,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAA;AAC1E,OAAO,EACL,uBAAuB,EACxB,MAAM,sDAAsD,CAAA;AAC7D,OAAO,EACL,wBAAwB,EACzB,MAAM,uDAAuD,CAAA;AAC9D,OAAO,EACL,sBAAsB,EACvB,MAAM,qDAAqD,CAAA;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sDAAsD,CAAA;AAE9F,qBAAa,qBAAsB,SAAQ,OAAQ,YAAW,cAAc;IAC1E,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA2B;IACtD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA6B;IACxD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyB;IAChD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAClD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAwB;IAC9C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyB;gBAEpC,OAAO,EAAE,cAAc;IAWnC,IAAI,SAAS,IAAI,qBAAqB,CAErC;IAED,IAAI,SAAS,IAAI,2BAA2B,CAE3C;IAED,IAAI,KAAK,IAAI,uBAAuB,CAEnC;IAED,IAAI,MAAM,IAAI,wBAAwB,CAErC;IAED,IAAI,IAAI,IAAI,sBAAsB,CAEjC;IAED,IAAI,KAAK,IAAI,uBAAuB,CAEnC;CACF"}
|
@@ -6,6 +6,8 @@ const library_administration_impl_1 = require("../storages/administration/librar
|
|
6
6
|
const statistics_administration_impl_1 = require("../storages/administration/statistics.administration.impl");
|
7
7
|
const users_administration_impl_1 = require("../storages/administration/users.administration.impl");
|
8
8
|
const cheats_administration_impl_1 = require("../storages/administration/cheats.administration.impl");
|
9
|
+
const maib_administration_impl_1 = require("../storages/administration/maib.administration.impl");
|
10
|
+
const chats_administration_impl_1 = require("../storages/administration/chats.administration.impl");
|
9
11
|
class AdministrationService extends service_1.Service {
|
10
12
|
constructor(context) {
|
11
13
|
super(context);
|
@@ -13,6 +15,8 @@ class AdministrationService extends service_1.Service {
|
|
13
15
|
this._statistic = new statistics_administration_impl_1.StatisticAdministrationImpl(context.context);
|
14
16
|
this._users = new users_administration_impl_1.UsersAdministrationImpl(context.context);
|
15
17
|
this._cheats = new cheats_administration_impl_1.CheatsAdministrationImpl(context.context);
|
18
|
+
this._maib = new maib_administration_impl_1.MaibAdministrationImpl(context.context);
|
19
|
+
this._chats = new chats_administration_impl_1.ChatsAdministrationImpl(context.context);
|
16
20
|
}
|
17
21
|
get libraries() {
|
18
22
|
return this._libraries;
|
@@ -26,6 +30,12 @@ class AdministrationService extends service_1.Service {
|
|
26
30
|
get cheats() {
|
27
31
|
return this._cheats;
|
28
32
|
}
|
33
|
+
get maib() {
|
34
|
+
return this._maib;
|
35
|
+
}
|
36
|
+
get chats() {
|
37
|
+
return this._chats;
|
38
|
+
}
|
29
39
|
}
|
30
40
|
exports.AdministrationService = AdministrationService;
|
31
41
|
//# sourceMappingURL=statistics.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"statistics.js","sourceRoot":"","sources":["../../../src/services/statistics.ts"],"names":[],"mappings":";;;AAAA,uCAAmD;AACnD,wGAE+D;AAI/D,8GAEkE;AAElE,oGAE6D;AAC7D,sGAE8D;
|
1
|
+
{"version":3,"file":"statistics.js","sourceRoot":"","sources":["../../../src/services/statistics.ts"],"names":[],"mappings":";;;AAAA,uCAAmD;AACnD,wGAE+D;AAI/D,8GAEkE;AAElE,oGAE6D;AAC7D,sGAE8D;AAC9D,kGAE4D;AAC5D,oGAA8F;AAE9F,MAAa,qBAAsB,SAAQ,iBAAO;IAQhD,YAAY,OAAuB;QACjC,KAAK,CAAC,OAAO,CAAC,CAAA;QAEd,IAAI,CAAC,UAAU,GAAG,IAAI,uDAAyB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QAChE,IAAI,CAAC,UAAU,GAAG,IAAI,4DAA2B,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QAClE,IAAI,CAAC,MAAM,GAAG,IAAI,mDAAuB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QAC1D,IAAI,CAAC,OAAO,GAAG,IAAI,qDAAwB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QAC5D,IAAI,CAAC,KAAK,GAAG,IAAI,iDAAsB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QACxD,IAAI,CAAC,MAAM,GAAG,IAAI,mDAAuB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IAC5D,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAA;IACxB,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAA;IACxB,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;IAED,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;CACF;AA1CD,sDA0CC"}
|
@@ -2,10 +2,14 @@ import { LibraryAdministration } from "./library.administration";
|
|
2
2
|
import { StatisticAdministration } from "./statistics.administration";
|
3
3
|
import { UsersAdministration } from "./users.administration";
|
4
4
|
import { CheatsAdministration } from "./cheats.administration";
|
5
|
+
import { MaibAdministration } from "./maib.administration";
|
6
|
+
import { ChatsAdministration } from "./chats.administration";
|
5
7
|
export declare abstract class Administration {
|
6
8
|
abstract get libraries(): LibraryAdministration;
|
7
9
|
abstract get statistic(): StatisticAdministration;
|
8
10
|
abstract get users(): UsersAdministration;
|
9
11
|
abstract get cheats(): CheatsAdministration;
|
12
|
+
abstract get maib(): MaibAdministration;
|
13
|
+
abstract get chats(): ChatsAdministration;
|
10
14
|
}
|
11
15
|
//# sourceMappingURL=administration.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"administration.d.ts","sourceRoot":"","sources":["../../../../src/storages/administration/administration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAC,mBAAmB,EAAC,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAA;AAE5D,8BAAsB,cAAc;IAClC,QAAQ,KAAK,SAAS,IAAI,qBAAqB,CAAE;IAEjD,QAAQ,KAAK,SAAS,IAAI,uBAAuB,CAAC;IAElD,QAAQ,KAAK,KAAK,IAAI,mBAAmB,CAAC;IAE1C,QAAQ,KAAK,MAAM,IAAI,oBAAoB,CAAA;
|
1
|
+
{"version":3,"file":"administration.d.ts","sourceRoot":"","sources":["../../../../src/storages/administration/administration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAC,mBAAmB,EAAC,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAE5D,8BAAsB,cAAc;IAClC,QAAQ,KAAK,SAAS,IAAI,qBAAqB,CAAE;IAEjD,QAAQ,KAAK,SAAS,IAAI,uBAAuB,CAAC;IAElD,QAAQ,KAAK,KAAK,IAAI,mBAAmB,CAAC;IAE1C,QAAQ,KAAK,MAAM,IAAI,oBAAoB,CAAA;IAE3C,QAAQ,KAAK,IAAI,IAAI,kBAAkB,CAAA;IAEvC,QAAQ,KAAK,KAAK,IAAI,mBAAmB,CAAA;CAC1C"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"administration.js","sourceRoot":"","sources":["../../../../src/storages/administration/administration.ts"],"names":[],"mappings":";;;
|
1
|
+
{"version":3,"file":"administration.js","sourceRoot":"","sources":["../../../../src/storages/administration/administration.ts"],"names":[],"mappings":";;;AAOA,MAAsB,cAAc;CAYnC;AAZD,wCAYC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { ChatCount, ChatListResponse } from "../../dto/chatResponse";
|
2
|
+
export declare abstract class ChatsAdministration {
|
3
|
+
abstract userChats(chatId: string): Promise<ChatListResponse>;
|
4
|
+
abstract sendMessageToChat(chatId: string, message: string): Promise<void>;
|
5
|
+
abstract sendMessageToUsers(message: string, organizationIdFilter: string, platformFilter: number, activityInMinutesFilter: number, stageFilter: number): Promise<ChatCount>;
|
6
|
+
}
|
7
|
+
//# sourceMappingURL=chats.administration.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"chats.administration.d.ts","sourceRoot":"","sources":["../../../../src/storages/administration/chats.administration.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,SAAS,EAAE,gBAAgB,EAAC,MAAM,wBAAwB,CAAA;AAElE,8BAAsB,mBAAmB;IAKvC,QAAQ,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAK7D,QAAQ,CAAC,iBAAiB,CAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAK3E,QAAQ,CAAC,kBAAkB,CAAE,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAI,OAAO,CAAC,SAAS,CAAC;CAC/K"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { ChatCount, ChatListResponse } from "../../dto/chatResponse";
|
2
|
+
import { Context } from "../../context";
|
3
|
+
import { ChatsAdministration } from "./chats.administration";
|
4
|
+
export declare class ChatsAdministrationImpl extends ChatsAdministration {
|
5
|
+
private context;
|
6
|
+
constructor(context: Context);
|
7
|
+
userChats(userId: string): Promise<ChatListResponse>;
|
8
|
+
sendMessageToChat(chatId: string, message: string): Promise<void>;
|
9
|
+
sendMessageToUsers(message: string, organizationIdFilter: string, platformFilter?: number, activityInMinutesFilter?: number, stageFilter?: number): Promise<ChatCount>;
|
10
|
+
}
|
11
|
+
//# sourceMappingURL=chats.administration.impl.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"chats.administration.impl.d.ts","sourceRoot":"","sources":["../../../../src/storages/administration/chats.administration.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,gBAAgB,EAAC,MAAM,wBAAwB,CAAA;AAGlE,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAA;AACrC,OAAO,EAAC,mBAAmB,EAAC,MAAM,wBAAwB,CAAA;AAG1D,qBAAa,uBAAwB,SAAQ,mBAAmB;IAC9D,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,EAAE,OAAO;IAQtB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAsBpD,iBAAiB,CAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA6BlE,kBAAkB,CAAE,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,EAAE,cAAc,GAAE,MAAU,EAAE,uBAAuB,GAAE,MAAU,EAAE,WAAW,GAAE,MAAU,GAAG,OAAO,CAAC,SAAS,CAAC;CA4BvL"}
|
@@ -0,0 +1,79 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.ChatsAdministrationImpl = void 0;
|
4
|
+
const rpcService_1 = require("../../services/rpcService");
|
5
|
+
const responseUtils_1 = require("../../services/responseUtils");
|
6
|
+
const chats_administration_1 = require("./chats.administration");
|
7
|
+
class ChatsAdministrationImpl extends chats_administration_1.ChatsAdministration {
|
8
|
+
constructor(context) {
|
9
|
+
super();
|
10
|
+
this.context = context;
|
11
|
+
}
|
12
|
+
/*
|
13
|
+
Get user chats
|
14
|
+
*/
|
15
|
+
async userChats(userId) {
|
16
|
+
var _a;
|
17
|
+
if (userId === undefined || userId === null || userId.trim() === "") {
|
18
|
+
throw new Error("userId is required, must be not empty");
|
19
|
+
}
|
20
|
+
const response = await ((_a = this.context
|
21
|
+
.resolve(rpcService_1.RpcService)) === null || _a === void 0 ? void 0 : _a.requestBuilder("api/v1/management/chat/user").searchParam("userId", userId).sendGet());
|
22
|
+
// check response status
|
23
|
+
if (responseUtils_1.ResponseUtils.isFail(response)) {
|
24
|
+
await responseUtils_1.ResponseUtils.throwError("Failed to get user chats", response);
|
25
|
+
}
|
26
|
+
return await response.json();
|
27
|
+
}
|
28
|
+
/*
|
29
|
+
Send Message to chat
|
30
|
+
*/
|
31
|
+
async sendMessageToChat(chatId, message) {
|
32
|
+
var _a;
|
33
|
+
if (chatId === undefined || chatId === null || chatId.trim() === "") {
|
34
|
+
throw new Error("chatId is required, must be not empty");
|
35
|
+
}
|
36
|
+
if (message === undefined || message === null || message.trim() === "") {
|
37
|
+
throw new Error("payId is required, must be not empty");
|
38
|
+
}
|
39
|
+
// send create request to the server
|
40
|
+
const response = await ((_a = this.context
|
41
|
+
.resolve(rpcService_1.RpcService)) === null || _a === void 0 ? void 0 : _a.requestBuilder("api/v1/management/chat/message/chat").sendPostJson({
|
42
|
+
chatId: chatId,
|
43
|
+
message: message,
|
44
|
+
}));
|
45
|
+
// check response status
|
46
|
+
if (responseUtils_1.ResponseUtils.isFail(response)) {
|
47
|
+
await responseUtils_1.ResponseUtils.throwError(`Failed to send message: ${message} for chat id ${chatId}`, response);
|
48
|
+
}
|
49
|
+
return await response.json();
|
50
|
+
}
|
51
|
+
/*
|
52
|
+
Send Message to users
|
53
|
+
*/
|
54
|
+
async sendMessageToUsers(message, organizationIdFilter, platformFilter = 0, activityInMinutesFilter = 0, stageFilter = 0) {
|
55
|
+
var _a;
|
56
|
+
if (message === undefined || message === null || message.trim() === "") {
|
57
|
+
throw new Error("userId is required, must be not empty");
|
58
|
+
}
|
59
|
+
if (organizationIdFilter === undefined || organizationIdFilter === null || organizationIdFilter.trim() === "") {
|
60
|
+
throw new Error("organizationIdFilter is required, must be not empty");
|
61
|
+
}
|
62
|
+
// send create request to the server
|
63
|
+
const response = await ((_a = this.context
|
64
|
+
.resolve(rpcService_1.RpcService)) === null || _a === void 0 ? void 0 : _a.requestBuilder("api/v1/management/chat/message/users").sendPostJson({
|
65
|
+
message: message,
|
66
|
+
organizationIdFilter: organizationIdFilter,
|
67
|
+
platformFilter: platformFilter,
|
68
|
+
activityInMinutesFilter: activityInMinutesFilter,
|
69
|
+
stageFilter: stageFilter
|
70
|
+
}));
|
71
|
+
// check response status
|
72
|
+
if (responseUtils_1.ResponseUtils.isFail(response)) {
|
73
|
+
await responseUtils_1.ResponseUtils.throwError(`Failed to send message: ${message} for platformFilter ${platformFilter}`, response);
|
74
|
+
}
|
75
|
+
return await response.json();
|
76
|
+
}
|
77
|
+
}
|
78
|
+
exports.ChatsAdministrationImpl = ChatsAdministrationImpl;
|
79
|
+
//# sourceMappingURL=chats.administration.impl.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"chats.administration.impl.js","sourceRoot":"","sources":["../../../../src/storages/administration/chats.administration.impl.ts"],"names":[],"mappings":";;;AACA,0DAAoD;AACpD,gEAA0D;AAE1D,iEAA0D;AAG1D,MAAa,uBAAw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,CAAC,EAAE,CAAC;YACnC,MAAM,6BAAa,CAAC,UAAU,CAAC,2BAA2B,OAAO,uBAAuB,cAAc,EAAE,EAAE,QAAQ,CAAC,CAAA;QACrH,CAAC;QAED,OAAO,MAAM,QAAS,CAAC,IAAI,EAAe,CAAA;IAC5C,CAAC;CACF;AA1FD,0DA0FC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"chats.administration.js","sourceRoot":"","sources":["../../../../src/storages/administration/chats.administration.ts"],"names":[],"mappings":";;;AAGA,MAAsB,mBAAmB;CAgBxC;AAhBD,kDAgBC"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { PaymentInfoResponse, RefundResponse } from "../../dto/acquiringResponse";
|
2
|
+
export declare abstract class MaibAdministration {
|
3
|
+
abstract paymentInfo(): Promise<PaymentInfoResponse>;
|
4
|
+
abstract refund(userId: string, payId: string, refundAmount: number): Promise<RefundResponse>;
|
5
|
+
}
|
6
|
+
//# sourceMappingURL=maib.administration.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"maib.administration.d.ts","sourceRoot":"","sources":["../../../../src/storages/administration/maib.administration.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,mBAAmB,EAAE,cAAc,EAAC,MAAM,6BAA6B,CAAA;AAE/E,8BAAsB,kBAAkB;IAKtC,QAAQ,CAAC,WAAW,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAKpD,QAAQ,CAAC,MAAM,CAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;CAC/F"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { PaymentInfoResponse, RefundResponse } from "../../dto/acquiringResponse";
|
2
|
+
import { MaibAdministration } from "./maib.administration";
|
3
|
+
import { Context } from "../../context";
|
4
|
+
export declare class MaibAdministrationImpl extends MaibAdministration {
|
5
|
+
private context;
|
6
|
+
constructor(context: Context);
|
7
|
+
paymentInfo(): Promise<PaymentInfoResponse>;
|
8
|
+
refund(userId: string, payId: string, refundAmount: number): Promise<RefundResponse>;
|
9
|
+
}
|
10
|
+
//# sourceMappingURL=maib.administration.impl.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"maib.administration.impl.d.ts","sourceRoot":"","sources":["../../../../src/storages/administration/maib.administration.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAE,cAAc,EAAC,MAAM,6BAA6B,CAAA;AAC/E,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAA;AAGxD,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAA;AAGrC,qBAAa,sBAAuB,SAAQ,kBAAkB;IAC5D,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,EAAE,OAAO;IAStB,WAAW,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAiB3C,MAAM,CAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;CA8B5F"}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.MaibAdministrationImpl = void 0;
|
4
|
+
const maib_administration_1 = require("./maib.administration");
|
5
|
+
const rpcService_1 = require("../../services/rpcService");
|
6
|
+
const responseUtils_1 = require("../../services/responseUtils");
|
7
|
+
class MaibAdministrationImpl extends maib_administration_1.MaibAdministration {
|
8
|
+
constructor(context) {
|
9
|
+
super();
|
10
|
+
this.context = context;
|
11
|
+
}
|
12
|
+
/*
|
13
|
+
Get payment info
|
14
|
+
*/
|
15
|
+
async paymentInfo() {
|
16
|
+
var _a;
|
17
|
+
const response = await ((_a = this.context
|
18
|
+
.resolve(rpcService_1.RpcService)) === null || _a === void 0 ? void 0 : _a.requestBuilder("api/v1/management/acquiring/maib/payment/info").sendGet());
|
19
|
+
// check response status
|
20
|
+
if (responseUtils_1.ResponseUtils.isFail(response)) {
|
21
|
+
await responseUtils_1.ResponseUtils.throwError("Failed to get payment info", response);
|
22
|
+
}
|
23
|
+
return await response.json();
|
24
|
+
}
|
25
|
+
/*
|
26
|
+
Refund
|
27
|
+
*/
|
28
|
+
async refund(userId, payId, refundAmount) {
|
29
|
+
var _a;
|
30
|
+
if (userId === undefined || userId === null || userId.trim() === "") {
|
31
|
+
throw new Error("userId is required, must be not empty");
|
32
|
+
}
|
33
|
+
if (payId === undefined || payId === null || payId.trim() === "") {
|
34
|
+
throw new Error("payId is required, must be not empty");
|
35
|
+
}
|
36
|
+
if (refundAmount === undefined || refundAmount === null || refundAmount === 0) {
|
37
|
+
throw new Error("refundAmount is required, must be not empty and grater than 0");
|
38
|
+
}
|
39
|
+
// send create request to the server
|
40
|
+
const response = await ((_a = this.context
|
41
|
+
.resolve(rpcService_1.RpcService)) === null || _a === void 0 ? void 0 : _a.requestBuilder("api/v1/management/acquiring/maib/refund").sendPostJson({
|
42
|
+
userId: userId,
|
43
|
+
payId: payId,
|
44
|
+
refundAmount: refundAmount
|
45
|
+
}));
|
46
|
+
// check response status
|
47
|
+
if (responseUtils_1.ResponseUtils.isFail(response)) {
|
48
|
+
await responseUtils_1.ResponseUtils.throwError(`Failed to create refund for user ${userId} and payment ${payId}`, response);
|
49
|
+
}
|
50
|
+
return await response.json();
|
51
|
+
}
|
52
|
+
}
|
53
|
+
exports.MaibAdministrationImpl = MaibAdministrationImpl;
|
54
|
+
//# sourceMappingURL=maib.administration.impl.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"maib.administration.impl.js","sourceRoot":"","sources":["../../../../src/storages/administration/maib.administration.impl.ts"],"names":[],"mappings":";;;AACA,+DAAwD;AACxD,0DAAoD;AACpD,gEAA0D;AAI1D,MAAa,sBAAuB,SAAQ,wCAAkB;IAG5D,YAAY,OAAgB;QAC1B,KAAK,EAAE,CAAA;QACP,IAAI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EAAE,YAAY;SAC3B,CAAC,CAAA,CAAA;QAEJ,wBAAwB;QACxB,IAAI,6BAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YACnC,MAAM,6BAAa,CAAC,UAAU,CAAC,oCAAoC,MAAM,gBAAgB,KAAK,EAAE,EAAE,QAAQ,CAAC,CAAA;QAC7G,CAAC;QAED,OAAO,MAAM,QAAS,CAAC,IAAI,EAAoB,CAAA;IACjD,CAAC;CACF;AA3DD,wDA2DC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"maib.administration.js","sourceRoot":"","sources":["../../../../src/storages/administration/maib.administration.ts"],"names":[],"mappings":";;;AAGA,MAAsB,kBAAkB;CAWvC;AAXD,gDAWC"}
|
package/package.json
CHANGED
@@ -47,6 +47,29 @@ export interface AcquiringSegmentData {
|
|
47
47
|
dayItems: SegmentItemData[]
|
48
48
|
}
|
49
49
|
|
50
|
+
export interface PaymentInfoResponse {
|
51
|
+
dateFrom: string;
|
52
|
+
dateTo: string;
|
53
|
+
info: PaymentInfo[];
|
54
|
+
}
|
55
|
+
|
56
|
+
export interface PaymentInfo {
|
57
|
+
userId: string;
|
58
|
+
userEmail: string;
|
59
|
+
lastPayment: string;
|
60
|
+
segmentKey: string;
|
61
|
+
price: number;
|
62
|
+
currency: string;
|
63
|
+
stateInfo: string;
|
64
|
+
payIds: string[];
|
65
|
+
}
|
66
|
+
|
67
|
+
export interface RefundResponse{
|
68
|
+
payId: string;
|
69
|
+
isSuccessful: boolean;
|
70
|
+
amount: number;
|
71
|
+
}
|
72
|
+
|
50
73
|
export enum OrderState {
|
51
74
|
Created = 0,
|
52
75
|
WaitingForPayment = 10,
|
package/src/dto/chatResponse.ts
CHANGED
@@ -15,12 +15,18 @@ import {
|
|
15
15
|
import {
|
16
16
|
CheatsAdministrationImpl
|
17
17
|
} from "../storages/administration/cheats.administration.impl"
|
18
|
+
import {
|
19
|
+
MaibAdministrationImpl
|
20
|
+
} from "../storages/administration/maib.administration.impl"
|
21
|
+
import { ChatsAdministrationImpl } from "../storages/administration/chats.administration.impl"
|
18
22
|
|
19
23
|
export class AdministrationService extends Service implements Administration {
|
20
24
|
private readonly _libraries: LibraryAdministrationImpl
|
21
25
|
private readonly _statistic: StatisticAdministrationImpl
|
22
26
|
private readonly _users: UsersAdministrationImpl
|
23
27
|
private readonly _cheats: CheatsAdministrationImpl
|
28
|
+
private readonly _maib: MaibAdministrationImpl
|
29
|
+
private readonly _chats: ChatsAdministrationImpl
|
24
30
|
|
25
31
|
constructor(context: ServiceContext) {
|
26
32
|
super(context)
|
@@ -29,6 +35,8 @@ export class AdministrationService extends Service implements Administration {
|
|
29
35
|
this._statistic = new StatisticAdministrationImpl(context.context)
|
30
36
|
this._users = new UsersAdministrationImpl(context.context)
|
31
37
|
this._cheats = new CheatsAdministrationImpl(context.context)
|
38
|
+
this._maib = new MaibAdministrationImpl(context.context)
|
39
|
+
this._chats = new ChatsAdministrationImpl(context.context)
|
32
40
|
}
|
33
41
|
|
34
42
|
get libraries(): LibraryAdministration {
|
@@ -46,4 +54,12 @@ export class AdministrationService extends Service implements Administration {
|
|
46
54
|
get cheats(): CheatsAdministrationImpl {
|
47
55
|
return this._cheats
|
48
56
|
}
|
57
|
+
|
58
|
+
get maib(): MaibAdministrationImpl {
|
59
|
+
return this._maib
|
60
|
+
}
|
61
|
+
|
62
|
+
get chats(): ChatsAdministrationImpl {
|
63
|
+
return this._chats
|
64
|
+
}
|
49
65
|
}
|
@@ -2,6 +2,8 @@ import { LibraryAdministration } from "./library.administration"
|
|
2
2
|
import { StatisticAdministration } from "./statistics.administration"
|
3
3
|
import {UsersAdministration} from "./users.administration"
|
4
4
|
import {CheatsAdministration} from "./cheats.administration"
|
5
|
+
import {MaibAdministration} from "./maib.administration"
|
6
|
+
import { ChatsAdministration } from "./chats.administration"
|
5
7
|
|
6
8
|
export abstract class Administration {
|
7
9
|
abstract get libraries(): LibraryAdministration ;
|
@@ -11,4 +13,8 @@ export abstract class Administration {
|
|
11
13
|
abstract get users(): UsersAdministration;
|
12
14
|
|
13
15
|
abstract get cheats(): CheatsAdministration
|
16
|
+
|
17
|
+
abstract get maib(): MaibAdministration
|
18
|
+
|
19
|
+
abstract get chats(): ChatsAdministration
|
14
20
|
}
|
@@ -0,0 +1,98 @@
|
|
1
|
+
import {ChatCount, ChatListResponse} from "../../dto/chatResponse"
|
2
|
+
import {RpcService} from "../../services/rpcService"
|
3
|
+
import {ResponseUtils} from "../../services/responseUtils"
|
4
|
+
import {Context} from "../../context"
|
5
|
+
import {ChatsAdministration} from "./chats.administration"
|
6
|
+
|
7
|
+
|
8
|
+
export class ChatsAdministrationImpl extends ChatsAdministration {
|
9
|
+
private context: Context
|
10
|
+
|
11
|
+
constructor(context: Context) {
|
12
|
+
super()
|
13
|
+
this.context = context
|
14
|
+
}
|
15
|
+
|
16
|
+
/*
|
17
|
+
Get user chats
|
18
|
+
*/
|
19
|
+
async userChats(userId: string): Promise<ChatListResponse>{
|
20
|
+
if (userId === undefined || userId === null || userId.trim() === "") {
|
21
|
+
throw new Error("userId is required, must be not empty")
|
22
|
+
}
|
23
|
+
|
24
|
+
const response = await this.context
|
25
|
+
.resolve(RpcService)
|
26
|
+
?.requestBuilder("api/v1/management/chat/user")
|
27
|
+
.searchParam("userId", userId)
|
28
|
+
.sendGet()
|
29
|
+
|
30
|
+
// check response status
|
31
|
+
if (ResponseUtils.isFail(response)) {
|
32
|
+
await ResponseUtils.throwError("Failed to get user chats", response)
|
33
|
+
}
|
34
|
+
|
35
|
+
return await response!.json() as ChatListResponse
|
36
|
+
}
|
37
|
+
|
38
|
+
/*
|
39
|
+
Send Message to chat
|
40
|
+
*/
|
41
|
+
async sendMessageToChat( chatId: string, message: string): Promise<void>{
|
42
|
+
if (chatId === undefined || chatId === null || chatId.trim() === "") {
|
43
|
+
throw new Error("chatId is required, must be not empty")
|
44
|
+
}
|
45
|
+
|
46
|
+
if (message === undefined || message === null || message.trim() === "") {
|
47
|
+
throw new Error("payId is required, must be not empty")
|
48
|
+
}
|
49
|
+
|
50
|
+
// send create request to the server
|
51
|
+
const response = await this.context
|
52
|
+
.resolve(RpcService)
|
53
|
+
?.requestBuilder("api/v1/management/chat/message/chat")
|
54
|
+
.sendPostJson({
|
55
|
+
chatId: chatId,
|
56
|
+
message: message,
|
57
|
+
})
|
58
|
+
|
59
|
+
// check response status
|
60
|
+
if (ResponseUtils.isFail(response)) {
|
61
|
+
await ResponseUtils.throwError(`Failed to send message: ${message} for chat id ${chatId}`, response)
|
62
|
+
}
|
63
|
+
|
64
|
+
return await response!.json() as void
|
65
|
+
}
|
66
|
+
|
67
|
+
/*
|
68
|
+
Send Message to users
|
69
|
+
*/
|
70
|
+
async sendMessageToUsers( message: string, organizationIdFilter: string, platformFilter: number = 0, activityInMinutesFilter: number = 0, stageFilter: number = 0): Promise<ChatCount>{
|
71
|
+
if (message === undefined || message === null || message.trim() === "") {
|
72
|
+
throw new Error("userId is required, must be not empty")
|
73
|
+
}
|
74
|
+
|
75
|
+
if (organizationIdFilter === undefined || organizationIdFilter === null || organizationIdFilter.trim() === "") {
|
76
|
+
throw new Error("organizationIdFilter is required, must be not empty")
|
77
|
+
}
|
78
|
+
|
79
|
+
// send create request to the server
|
80
|
+
const response = await this.context
|
81
|
+
.resolve(RpcService)
|
82
|
+
?.requestBuilder("api/v1/management/chat/message/users")
|
83
|
+
.sendPostJson({
|
84
|
+
message: message,
|
85
|
+
organizationIdFilter: organizationIdFilter,
|
86
|
+
platformFilter: platformFilter,
|
87
|
+
activityInMinutesFilter: activityInMinutesFilter,
|
88
|
+
stageFilter: stageFilter
|
89
|
+
})
|
90
|
+
|
91
|
+
// check response status
|
92
|
+
if (ResponseUtils.isFail(response)) {
|
93
|
+
await ResponseUtils.throwError(`Failed to send message: ${message} for platformFilter ${platformFilter}`, response)
|
94
|
+
}
|
95
|
+
|
96
|
+
return await response!.json() as ChatCount
|
97
|
+
}
|
98
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
|
2
|
+
import {ChatCount, ChatListResponse} from "../../dto/chatResponse"
|
3
|
+
|
4
|
+
export abstract class ChatsAdministration {
|
5
|
+
|
6
|
+
/*
|
7
|
+
Get user chats
|
8
|
+
*/
|
9
|
+
abstract userChats(chatId: string): Promise<ChatListResponse>
|
10
|
+
|
11
|
+
/*
|
12
|
+
Send Message to chat
|
13
|
+
*/
|
14
|
+
abstract sendMessageToChat( chatId: string, message: string): Promise<void>
|
15
|
+
|
16
|
+
/*
|
17
|
+
Send Message to users
|
18
|
+
*/
|
19
|
+
abstract sendMessageToUsers( message: string, organizationIdFilter: string, platformFilter: number, activityInMinutesFilter: number, stageFilter: number ): Promise<ChatCount>
|
20
|
+
}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
import {PaymentInfoResponse, RefundResponse} from "../../dto/acquiringResponse"
|
2
|
+
import {MaibAdministration} from "./maib.administration"
|
3
|
+
import {RpcService} from "../../services/rpcService"
|
4
|
+
import {ResponseUtils} from "../../services/responseUtils"
|
5
|
+
import {Context} from "../../context"
|
6
|
+
|
7
|
+
|
8
|
+
export class MaibAdministrationImpl extends MaibAdministration {
|
9
|
+
private context: Context
|
10
|
+
|
11
|
+
constructor(context: Context) {
|
12
|
+
super()
|
13
|
+
this.context = context
|
14
|
+
}
|
15
|
+
|
16
|
+
|
17
|
+
/*
|
18
|
+
Get payment info
|
19
|
+
*/
|
20
|
+
async paymentInfo(): Promise<PaymentInfoResponse>{
|
21
|
+
const response = await this.context
|
22
|
+
.resolve(RpcService)
|
23
|
+
?.requestBuilder("api/v1/management/acquiring/maib/payment/info")
|
24
|
+
.sendGet()
|
25
|
+
|
26
|
+
// check response status
|
27
|
+
if (ResponseUtils.isFail(response)) {
|
28
|
+
await ResponseUtils.throwError("Failed to get payment info", response)
|
29
|
+
}
|
30
|
+
|
31
|
+
return await response!.json() as PaymentInfoResponse
|
32
|
+
}
|
33
|
+
|
34
|
+
/*
|
35
|
+
Refund
|
36
|
+
*/
|
37
|
+
async refund( userId: string, payId: string, refundAmount: number): Promise<RefundResponse>{
|
38
|
+
if (userId === undefined || userId === null || userId.trim() === "") {
|
39
|
+
throw new Error("userId is required, must be not empty")
|
40
|
+
}
|
41
|
+
|
42
|
+
if (payId === undefined || payId === null || payId.trim() === "") {
|
43
|
+
throw new Error("payId is required, must be not empty")
|
44
|
+
}
|
45
|
+
|
46
|
+
if (refundAmount === undefined || refundAmount === null || refundAmount === 0) {
|
47
|
+
throw new Error("refundAmount is required, must be not empty and grater than 0")
|
48
|
+
}
|
49
|
+
|
50
|
+
// send create request to the server
|
51
|
+
const response = await this.context
|
52
|
+
.resolve(RpcService)
|
53
|
+
?.requestBuilder("api/v1/management/acquiring/maib/refund")
|
54
|
+
.sendPostJson({
|
55
|
+
userId: userId,
|
56
|
+
payId: payId,
|
57
|
+
refundAmount: refundAmount
|
58
|
+
})
|
59
|
+
|
60
|
+
// check response status
|
61
|
+
if (ResponseUtils.isFail(response)) {
|
62
|
+
await ResponseUtils.throwError(`Failed to create refund for user ${userId} and payment ${payId}`, response)
|
63
|
+
}
|
64
|
+
|
65
|
+
return await response!.json() as RefundResponse
|
66
|
+
}
|
67
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
import {PaymentInfoResponse, RefundResponse} from "../../dto/acquiringResponse"
|
3
|
+
|
4
|
+
export abstract class MaibAdministration {
|
5
|
+
|
6
|
+
/*
|
7
|
+
Get payment info
|
8
|
+
*/
|
9
|
+
abstract paymentInfo(): Promise<PaymentInfoResponse>
|
10
|
+
|
11
|
+
/*
|
12
|
+
Refund
|
13
|
+
*/
|
14
|
+
abstract refund( userId: string, payId: string, refundAmount: number): Promise<RefundResponse>
|
15
|
+
}
|