@smartsoft001/trans-shell-app-services 2.153.0 → 2.155.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartsoft001/trans-shell-app-services",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.155.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./src/index.d.ts",
|
|
@@ -22,12 +22,13 @@
|
|
|
22
22
|
"@nestjs/axios": "^4.0.1",
|
|
23
23
|
"@nestjs/common": "^11.1.5",
|
|
24
24
|
"@nestjs/core": "^11.2.1",
|
|
25
|
-
"@smartsoft001/domain-core": "2.
|
|
26
|
-
"@smartsoft001/paynow": "2.
|
|
27
|
-
"@smartsoft001/paypal": "2.
|
|
28
|
-
"@smartsoft001/payu": "2.
|
|
29
|
-
"@smartsoft001/revolut": "2.
|
|
30
|
-
"@smartsoft001/trans-domain": "2.
|
|
25
|
+
"@smartsoft001/domain-core": "2.155.0",
|
|
26
|
+
"@smartsoft001/paynow": "2.155.0",
|
|
27
|
+
"@smartsoft001/paypal": "2.155.0",
|
|
28
|
+
"@smartsoft001/payu": "2.155.0",
|
|
29
|
+
"@smartsoft001/revolut": "2.155.0",
|
|
30
|
+
"@smartsoft001/trans-domain": "2.155.0",
|
|
31
|
+
"rxjs": "^7.8.1"
|
|
31
32
|
},
|
|
32
33
|
"types": "./src/index.d.ts"
|
|
33
34
|
}
|
|
@@ -28,6 +28,7 @@ export declare class TransService {
|
|
|
28
28
|
}>;
|
|
29
29
|
refresh(transId: string, data?: {}): Promise<void>;
|
|
30
30
|
refund(transId: string, comment?: string): Promise<void>;
|
|
31
|
-
|
|
31
|
+
/** `null` when no transaction has that id; the caller decides what that means. */
|
|
32
|
+
getById(id: any): Promise<Trans<any> | null>;
|
|
32
33
|
private getInternalService;
|
|
33
34
|
}
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const axios_1 = require("@nestjs/axios");
|
|
6
6
|
const common_1 = require("@nestjs/common");
|
|
7
7
|
const core_1 = require("@nestjs/core");
|
|
8
|
+
const rxjs_1 = require("rxjs");
|
|
8
9
|
const domain_core_1 = require("@smartsoft001/domain-core");
|
|
9
10
|
const paynow_1 = require("@smartsoft001/paynow");
|
|
10
11
|
const paypal_1 = require("@smartsoft001/paypal");
|
|
@@ -39,10 +40,7 @@ let TransService = class TransService {
|
|
|
39
40
|
date: new Date(),
|
|
40
41
|
req: trans,
|
|
41
42
|
});
|
|
42
|
-
return this.httpService
|
|
43
|
-
.post(this.config.internalApiUrl, trans)
|
|
44
|
-
.toPromise()
|
|
45
|
-
.then((res) => res.data);
|
|
43
|
+
return (0, rxjs_1.firstValueFrom)(this.httpService.post(this.config.internalApiUrl, trans)).then((res) => res.data);
|
|
46
44
|
},
|
|
47
45
|
refresh: (trans) => {
|
|
48
46
|
if (!this.config.internalApiUrl)
|
|
@@ -51,10 +49,7 @@ let TransService = class TransService {
|
|
|
51
49
|
req: trans,
|
|
52
50
|
id: trans.id,
|
|
53
51
|
});
|
|
54
|
-
return this.httpService
|
|
55
|
-
.put(this.config.internalApiUrl + '/' + trans.id, trans)
|
|
56
|
-
.toPromise()
|
|
57
|
-
.then((res) => res.data);
|
|
52
|
+
return (0, rxjs_1.firstValueFrom)(this.httpService.put(this.config.internalApiUrl + '/' + trans.id, trans)).then((res) => res.data);
|
|
58
53
|
},
|
|
59
54
|
};
|
|
60
55
|
constructor(moduleRef, creatorService, refresherService, refundService, httpService, config, repository, payuService, paynowService, paypalService, revolutService) {
|
|
@@ -79,6 +74,7 @@ let TransService = class TransService {
|
|
|
79
74
|
async refund(transId, comment = 'Refund') {
|
|
80
75
|
await this.refundService.refund(transId, this.getInternalService(), this._paymentService, comment);
|
|
81
76
|
}
|
|
77
|
+
/** `null` when no transaction has that id; the caller decides what that means. */
|
|
82
78
|
async getById(id) {
|
|
83
79
|
return await this.repository.getById(id);
|
|
84
80
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trans.service.js","sourceRoot":"","sources":["../../../../../../../../../packages/trans/shell/app-services/src/lib/services/trans/trans.service.ts"],"names":[],"mappings":";;;;AAAA,yCAA4C;AAC5C,2CAAsD;AACtD,uCAAyC;
|
|
1
|
+
{"version":3,"file":"trans.service.js","sourceRoot":"","sources":["../../../../../../../../../packages/trans/shell/app-services/src/lib/services/trans/trans.service.ts"],"names":[],"mappings":";;;;AAAA,yCAA4C;AAC5C,2CAAsD;AACtD,uCAAyC;AACzC,+BAAsC;AAEtC,2DAA4D;AAC5D,iDAAqD;AACrD,iDAAqD;AACrD,6CAAiD;AACjD,mDAAuD;AACvD,6DASoC;AAEpC,mEAA4E;AAGrE,IAAM,YAAY,GAAlB,MAAM,YAAY;IA2Cb;IACA;IACA;IACA;IACA;IACA;IACA;IACY;IACA;IACA;IACA;IApDtB,IAAY,eAAe;QAGzB,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,WAAW;YACtB,MAAM,EAAE,IAAI,CAAC,aAAa;YAC1B,MAAM,EAAE,IAAI,CAAC,aAAa;YAC1B,OAAO,EAAE,IAAI,CAAC,cAAc;SAC7B,CAAC;IACJ,CAAC;IAEO,gBAAgB,GAAG;QACzB,MAAM,EAAE,CAAC,KAAiB,EAAE,EAAE;YAC5B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc;gBAC7B,OAAO,OAAO,CAAC,OAAO,CAAC;oBACrB,IAAI,EAAE,IAAI,IAAI,EAAE;oBAChB,GAAG,EAAE,KAAK;iBACX,CAAC,CAAC;YAEL,OAAO,IAAA,qBAAc,EACnB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,KAAK,CAAC,CACzD,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG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