@wenex/sdk 0.2.7 → 0.2.8
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 +2 -2
- package/services/touch/index.d.ts +1 -1
- package/services/touch/index.js +1 -1
- package/services/touch/index.js.map +1 -1
- package/services/touch/mails.service.d.ts +2 -1
- package/services/touch/mails.service.js +14 -0
- package/services/touch/mails.service.js.map +1 -1
- package/services/touch/push/push.service.d.ts +3 -2
- package/services/touch/push/push.service.js +14 -0
- package/services/touch/push/push.service.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wenex/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Wenex SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/debug": "^4.1.12",
|
|
39
39
|
"@types/jest": "^29.5.11",
|
|
40
|
-
"@types/node": "^20.11.
|
|
40
|
+
"@types/node": "^20.11.1",
|
|
41
41
|
"@typescript-eslint/eslint-plugin": "^6.18.1",
|
|
42
42
|
"@typescript-eslint/parser": "^6.18.1",
|
|
43
43
|
"dotenv": "^16.3.1",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
2
|
import { MailsService } from './mails.service';
|
|
3
3
|
import { PushService } from './push';
|
|
4
|
+
export * from './push';
|
|
4
5
|
export * from './mails.service';
|
|
5
|
-
export * from './push/push.service';
|
|
6
6
|
export declare class TouchClient {
|
|
7
7
|
readonly axios: AxiosInstance;
|
|
8
8
|
private $push;
|
package/services/touch/index.js
CHANGED
|
@@ -17,8 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.TouchClient = void 0;
|
|
18
18
|
const mails_service_1 = require("./mails.service");
|
|
19
19
|
const push_1 = require("./push");
|
|
20
|
+
__exportStar(require("./push"), exports);
|
|
20
21
|
__exportStar(require("./mails.service"), exports);
|
|
21
|
-
__exportStar(require("./push/push.service"), exports);
|
|
22
22
|
class TouchClient {
|
|
23
23
|
constructor(axios) {
|
|
24
24
|
this.axios = axios;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/touch/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,mDAA+C;AAC/C,iCAAqC;AAErC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/touch/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,mDAA+C;AAC/C,iCAAqC;AAErC,yCAAuB;AACvB,kDAAgC;AAEhC,MAAa,WAAW;IAItB,YAAqB,KAAoB;QAApB,UAAK,GAAL,KAAK,CAAe;IAAG,CAAC;IAE7C,IAAI,KAAK;;QACP,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,MAAA,IAAI,CAAC,MAAM,mCAAI,IAAI,4BAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACrE,CAAC;IAED,IAAI,IAAI;;QACN,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,MAAA,IAAI,CAAC,KAAK,mCAAI,IAAI,kBAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAClE,CAAC;CACF;AAbD,kCAaC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AxiosInstance } from 'axios';
|
|
2
|
-
import { RestfulService } from '../../common/classes';
|
|
3
2
|
import { Mail, MailDto } from '../../common/interfaces';
|
|
3
|
+
import { RequestConfig, RestfulService } from '../../common/classes';
|
|
4
4
|
export declare class MailsService extends RestfulService<Mail, MailDto> {
|
|
5
5
|
protected axios: AxiosInstance;
|
|
6
6
|
constructor(axios: AxiosInstance);
|
|
7
|
+
send(data: MailDto, config?: RequestConfig<Mail>): Promise<Mail>;
|
|
7
8
|
}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.MailsService = void 0;
|
|
4
13
|
const classes_1 = require("../../common/classes");
|
|
@@ -7,6 +16,11 @@ class MailsService extends classes_1.RestfulService {
|
|
|
7
16
|
super('mails', axios);
|
|
8
17
|
this.axios = axios;
|
|
9
18
|
}
|
|
19
|
+
send(data, config) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
return yield this.post(this.url('send'), data, config);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
10
24
|
}
|
|
11
25
|
exports.MailsService = MailsService;
|
|
12
26
|
//# sourceMappingURL=mails.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mails.service.js","sourceRoot":"","sources":["../../src/services/touch/mails.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mails.service.js","sourceRoot":"","sources":["../../src/services/touch/mails.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,kDAAqE;AAErE,MAAa,YAAa,SAAQ,wBAA6B;IAC7D,YAAsB,KAAoB;QACxC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QADF,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAEK,IAAI,CAAC,IAAa,EAAE,MAA4B;;YACpD,OAAO,MAAM,IAAI,CAAC,IAAI,CAA4B,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACpF,CAAC;KAAA;CACF;AARD,oCAQC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { AxiosInstance } from 'axios';
|
|
2
2
|
import { PushHistoryService } from './history.service';
|
|
3
|
-
import { RestfulService } from '../../../common/classes';
|
|
4
|
-
import { Push, PushDto } from '../../../common/interfaces';
|
|
3
|
+
import { RequestConfig, RestfulService } from '../../../common/classes';
|
|
4
|
+
import { Push, PushDto, PushHistory, PushHistoryDto } from '../../../common/interfaces';
|
|
5
5
|
export declare class PushService extends RestfulService<Push, PushDto> {
|
|
6
6
|
protected axios: AxiosInstance;
|
|
7
7
|
private $histories;
|
|
8
8
|
constructor(axios: AxiosInstance);
|
|
9
9
|
get histories(): PushHistoryService;
|
|
10
|
+
send(data: PushHistoryDto, config?: RequestConfig<PushHistory>): Promise<PushHistory[]>;
|
|
10
11
|
}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
12
|
exports.PushService = void 0;
|
|
4
13
|
const history_service_1 = require("./history.service");
|
|
@@ -12,6 +21,11 @@ class PushService extends classes_1.RestfulService {
|
|
|
12
21
|
var _a;
|
|
13
22
|
return (this.$histories = (_a = this.$histories) !== null && _a !== void 0 ? _a : new history_service_1.PushHistoryService(this.axios));
|
|
14
23
|
}
|
|
24
|
+
send(data, config) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
return yield this.post(this.url('send'), data, config);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
15
29
|
}
|
|
16
30
|
exports.PushService = PushService;
|
|
17
31
|
//# sourceMappingURL=push.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push.service.js","sourceRoot":"","sources":["../../../src/services/touch/push/push.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"push.service.js","sourceRoot":"","sources":["../../../src/services/touch/push/push.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,uDAAuD;AACvD,qDAAwE;AAGxE,MAAa,WAAY,SAAQ,wBAA6B;IAG5D,YAAsB,KAAoB;QACxC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QADD,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAED,IAAI,SAAS;;QACX,OAAO,CAAC,IAAI,CAAC,UAAU,GAAG,MAAA,IAAI,CAAC,UAAU,mCAAI,IAAI,oCAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IACnF,CAAC;IAEK,IAAI,CACR,IAAoB,EACpB,MAAmC;;YAEnC,OAAO,MAAM,IAAI,CAAC,IAAI,CAAgC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACxF,CAAC;KAAA;CACF;AAjBD,kCAiBC"}
|