@wenex/sdk 0.0.7 → 0.0.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.
@@ -1,19 +1,19 @@
1
- import { AxiosInstance, AxiosPromise, AxiosRequestConfig } from 'axios';
2
- import { Dto as DtoInterface, Core, Data, Filter, Items, QueryFilter, Serializer, Total } from '../interfaces';
1
+ import { AxiosInstance, AxiosRequestConfig } from 'axios';
2
+ import { Dto as DtoInterface, Core, Filter, QueryFilter, Serializer } from '../interfaces';
3
3
  import { RequestService } from '../providers';
4
4
  export declare class RestfulService<T extends Core, Dto extends DtoInterface<Core>> extends RequestService {
5
5
  protected readonly name: string;
6
6
  protected readonly client: AxiosInstance;
7
7
  protected readonly url: (path: string) => string;
8
8
  constructor(name: string, client: AxiosInstance);
9
- count(filter: QueryFilter<T>, config?: AxiosRequestConfig): AxiosPromise<Total>;
10
- create(data: Dto, config?: AxiosRequestConfig): AxiosPromise<Serializer<T>>;
11
- createBulk(data: Dto[], config?: AxiosRequestConfig): AxiosPromise<Items<Serializer<T>>>;
12
- find(filter: Filter<T>, config?: AxiosRequestConfig): AxiosPromise<Items<Serializer<T>>>;
13
- findById(id: string, config?: AxiosRequestConfig): AxiosPromise<Data<Serializer<T>>>;
14
- deleteById(id: string, config?: AxiosRequestConfig): AxiosPromise<Data<Serializer<T>>>;
15
- restoreById(id: string, config?: AxiosRequestConfig): AxiosPromise<Data<Serializer<T>>>;
16
- destroyById(id: string, config?: AxiosRequestConfig): AxiosPromise<Data<Serializer<T>>>;
17
- updateById(id: string, data: Dto, config?: AxiosRequestConfig): AxiosPromise<Data<Serializer<T>>>;
18
- updateBulk(data: Dto, filter: QueryFilter<T>, config?: AxiosRequestConfig): AxiosPromise<Total>;
9
+ count(filter: QueryFilter<T>, config?: AxiosRequestConfig): Promise<number>;
10
+ create(data: Dto, config?: AxiosRequestConfig): Promise<Serializer<T>>;
11
+ createBulk(data: Dto[], config?: AxiosRequestConfig): Promise<Serializer<T>[]>;
12
+ find(filter: Filter<T>, config?: AxiosRequestConfig): Promise<Serializer<T>[]>;
13
+ findById(id: string, config?: AxiosRequestConfig): Promise<Serializer<T>>;
14
+ deleteById(id: string, config?: AxiosRequestConfig): Promise<Serializer<T>>;
15
+ restoreById(id: string, config?: AxiosRequestConfig): Promise<Serializer<T>>;
16
+ destroyById(id: string, config?: AxiosRequestConfig): Promise<Serializer<T>>;
17
+ updateById(id: string, data: Dto, config?: AxiosRequestConfig): Promise<Serializer<T>>;
18
+ updateBulk(data: Dto, filter: QueryFilter<T>, config?: AxiosRequestConfig): Promise<number>;
19
19
  }
@@ -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.RestfulService = void 0;
4
13
  const providers_1 = require("../providers");
@@ -10,37 +19,61 @@ class RestfulService extends providers_1.RequestService {
10
19
  this.url = (path) => `/${this.name}/${path}`;
11
20
  }
12
21
  count(filter, config) {
13
- const params = Object.assign({ filter }, config === null || config === void 0 ? void 0 : config.params);
14
- return this.get(this.url('/count'), Object.assign(Object.assign({}, config), { params }));
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const params = Object.assign({ filter }, config === null || config === void 0 ? void 0 : config.params);
24
+ return (yield this.get(this.url('/count'), Object.assign(Object.assign({}, config), { params }))).total;
25
+ });
15
26
  }
16
27
  create(data, config) {
17
- return this.post(this.url(''), data, config);
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ return this.post(this.url(''), data, config);
30
+ });
18
31
  }
19
32
  createBulk(data, config) {
20
- return this.post(this.url(''), data, config);
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ return (yield this.post(this.url(''), data, config))
35
+ .items;
36
+ });
21
37
  }
22
38
  find(filter, config) {
23
- const params = Object.assign({ filter }, config === null || config === void 0 ? void 0 : config.params);
24
- return this.get(this.url(''), Object.assign(Object.assign({}, config), { params }));
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ const params = Object.assign({ filter }, config === null || config === void 0 ? void 0 : config.params);
41
+ return (yield this.get(this.url(''), Object.assign(Object.assign({}, config), { params })))
42
+ .items;
43
+ });
25
44
  }
26
45
  findById(id, config) {
27
- return this.get(this.url(id), config);
46
+ return __awaiter(this, void 0, void 0, function* () {
47
+ return (yield this.get(this.url(id), config)).data;
48
+ });
28
49
  }
29
50
  deleteById(id, config) {
30
- return this.delete(this.url(id), config);
51
+ return __awaiter(this, void 0, void 0, function* () {
52
+ return (yield this.delete(this.url(id), config)).data;
53
+ });
31
54
  }
32
55
  restoreById(id, config) {
33
- return this.put(`${this.url(id)}/restore`, undefined, config);
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ return (yield this.put(`${this.url(id)}/restore`, undefined, config)).data;
58
+ });
34
59
  }
35
60
  destroyById(id, config) {
36
- return this.delete(`${this.url(id)}/destroy`, config);
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ return (yield this.delete(`${this.url(id)}/destroy`, config))
63
+ .data;
64
+ });
37
65
  }
38
66
  updateById(id, data, config) {
39
- return this.patch(`${this.url(id)}`, data, config);
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ return (yield this.patch(`${this.url(id)}`, data, config))
69
+ .data;
70
+ });
40
71
  }
41
72
  updateBulk(data, filter, config) {
42
- const params = Object.assign({ filter }, config === null || config === void 0 ? void 0 : config.params);
43
- return this.patch('/bulk', data, Object.assign(Object.assign({}, config), { params }));
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ const params = Object.assign({ filter }, config === null || config === void 0 ? void 0 : config.params);
75
+ return (yield this.patch('/bulk', data, Object.assign(Object.assign({}, config), { params }))).total;
76
+ });
44
77
  }
45
78
  }
46
79
  exports.RestfulService = RestfulService;
@@ -1 +1 @@
1
- {"version":3,"file":"restful.service.js","sourceRoot":"","sources":["../../src/common/classes/restful.service.ts"],"names":[],"mappings":";;;AAaA,4CAA8C;AAE9C,MAAa,cAGX,SAAQ,0BAAc;IAGtB,YACqB,IAAY,EACZ,MAAqB;QAExC,KAAK,CAAC,MAAM,CAAC,CAAC;QAHK,SAAI,GAAJ,IAAI,CAAQ;QACZ,WAAM,GAAN,MAAM,CAAe;QAJvB,QAAG,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC;IAOnE,CAAC;IAED,KAAK,CAAC,MAAsB,EAAE,MAA2B;QACvD,MAAM,MAAM,mBAAK,MAAM,IAAK,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,CAAE,CAAC;QAC7C,OAAO,IAAI,CAAC,GAAG,CAAQ,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,kCAAO,MAAM,KAAE,MAAM,IAAG,CAAC;IACpE,CAAC;IAED,MAAM,CAAC,IAAS,EAAE,MAA2B;QAC3C,OAAO,IAAI,CAAC,IAAI,CAAqB,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACnE,CAAC;IAED,UAAU,CACR,IAAW,EACX,MAA2B;QAE3B,OAAO,IAAI,CAAC,IAAI,CAA8B,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAC5E,CAAC;IAED,IAAI,CACF,MAAiB,EACjB,MAA2B;QAE3B,MAAM,MAAM,mBAAK,MAAM,IAAK,MAAM,aAAN,MAAM,uBAAN,MAAM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MAAM,IAAI,CAAC,KAAK,CAAa,OAAO,EAAE,IAAI,kCAAO,MAAM,KAAE,MAAM,IAAG,CAAC,CAAC,KAAK,CAAC;QACpF,CAAC;KAAA;CACF;AAzED,wCAyEC"}
@@ -1,10 +1,10 @@
1
- import { AxiosInstance, AxiosPromise, AxiosRequestConfig } from 'axios';
1
+ import { AxiosInstance, AxiosRequestConfig } from 'axios';
2
2
  export declare class RequestService {
3
3
  protected readonly client: AxiosInstance;
4
4
  constructor(client: AxiosInstance);
5
- get<T>(url: string, config?: AxiosRequestConfig): AxiosPromise<T>;
6
- post<T, D>(url: string, data?: D, config?: AxiosRequestConfig): AxiosPromise<T>;
7
- delete<T>(url: string, config?: AxiosRequestConfig): AxiosPromise<T>;
8
- put<T, D>(url: string, data?: D, config?: AxiosRequestConfig): AxiosPromise<T>;
9
- patch<T, D>(url: string, data: D, config?: AxiosRequestConfig): AxiosPromise<T>;
5
+ get<T>(url: string, config?: AxiosRequestConfig): Promise<T>;
6
+ post<T, D>(url: string, data?: D, config?: AxiosRequestConfig): Promise<T>;
7
+ delete<T>(url: string, config?: AxiosRequestConfig): Promise<T>;
8
+ put<T, D>(url: string, data?: D, config?: AxiosRequestConfig): Promise<T>;
9
+ patch<T, D>(url: string, data: D, config?: AxiosRequestConfig): Promise<T>;
10
10
  }
@@ -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.RequestService = void 0;
4
13
  class RequestService {
@@ -6,19 +15,29 @@ class RequestService {
6
15
  this.client = client;
7
16
  }
8
17
  get(url, config) {
9
- return this.client.get(url, config);
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ return (yield this.client.get(url, config)).data;
20
+ });
10
21
  }
11
22
  post(url, data, config) {
12
- return this.client.post(url, data, config);
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ return (yield this.client.post(url, data, config)).data;
25
+ });
13
26
  }
14
27
  delete(url, config) {
15
- return this.client.delete(url, config);
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ return (yield this.client.delete(url, config)).data;
30
+ });
16
31
  }
17
32
  put(url, data, config) {
18
- return this.client.put(url, data, config);
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ return (yield this.client.put(url, data, config)).data;
35
+ });
19
36
  }
20
37
  patch(url, data, config) {
21
- return this.client.patch(url, data, config);
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ return (yield this.client.patch(url, data, config)).data;
40
+ });
22
41
  }
23
42
  }
24
43
  exports.RequestService = RequestService;
@@ -1 +1 @@
1
- {"version":3,"file":"request.provider.js","sourceRoot":"","sources":["../../src/common/providers/request.provider.ts"],"names":[],"mappings":";;;AAEA,MAAa,cAAc;IACzB,YAA+B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAExD,GAAG,CAAI,GAAW,EAAE,MAA2B;QAC7C,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAI,GAAG,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,CAAO,GAAW,EAAE,IAAQ,EAAE,MAA2B;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAI,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CAAI,GAAW,EAAE,MAA2B;QAChD,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAI,GAAG,EAAE,MAAM,C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A;IAEK,KAAK,CAAO,GAAW,EAAE,IAAO,EAAE,MAA2B;;YACjE,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAI,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;QAC9D,CAAC;KAAA;CACF;AAtBD,wCAsBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenex/sdk",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "Wenex SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -37,10 +37,10 @@
37
37
  "devDependencies": {
38
38
  "@types/debug": "^4.1.12",
39
39
  "@types/jest": "^29.5.10",
40
- "@types/node": "^20.9.4",
41
- "@types/react": "^18.2.38",
42
- "@typescript-eslint/eslint-plugin": "^6.12.0",
43
- "@typescript-eslint/parser": "^6.12.0",
40
+ "@types/node": "^20.10.1",
41
+ "@types/react": "^18.2.39",
42
+ "@typescript-eslint/eslint-plugin": "^6.13.1",
43
+ "@typescript-eslint/parser": "^6.13.1",
44
44
  "dotenv": "^16.3.1",
45
45
  "eslint": "^8.54.0",
46
46
  "eslint-config-prettier": "^9.0.0",
@@ -53,7 +53,7 @@
53
53
  "ts-jest": "^29.1.1",
54
54
  "ts-node": "^10.9.1",
55
55
  "tsconfig-paths": "^4.2.0",
56
- "typedoc": "^0.25.3",
56
+ "typedoc": "^0.25.4",
57
57
  "typescript": "^5.3.2"
58
58
  },
59
59
  "files": [
@@ -5,8 +5,8 @@ export declare class Authentication {
5
5
  protected readonly request: RequestService;
6
6
  constructor(request: RequestService);
7
7
  protected readonly url: (path: string) => string;
8
- token(data: AuthenticationRequest, config?: AxiosRequestConfig): import("axios").AxiosPromise<AuthenticationResponse>;
9
- logout(data: Token, config?: AxiosRequestConfig): import("axios").AxiosPromise<Result>;
10
- verify(data: Token, config?: AxiosRequestConfig): import("axios").AxiosPromise<JwtToken>;
8
+ token(data: AuthenticationRequest, config?: AxiosRequestConfig): Promise<AuthenticationResponse>;
9
+ logout(data: Token, config?: AxiosRequestConfig): Promise<Result>;
10
+ verify(data: Token, config?: AxiosRequestConfig): Promise<JwtToken>;
11
11
  static build(client: AxiosInstance): Authentication;
12
12
  }
@@ -5,7 +5,7 @@ export declare class Authorization {
5
5
  protected readonly request: RequestService;
6
6
  constructor(request: RequestService);
7
7
  protected readonly url: (path: string) => string;
8
- can(data: AuthorizationCanRequest, config?: AxiosRequestConfig): import("axios").AxiosPromise<AuthorizationCanResponse>;
9
- policy(data: AuthorizationPolicyRequest, config?: AxiosRequestConfig): import("axios").AxiosPromise<AuthorizationPolicyResponse>;
8
+ can(data: AuthorizationCanRequest, config?: AxiosRequestConfig): Promise<AuthorizationCanResponse>;
9
+ policy(data: AuthorizationPolicyRequest, config?: AxiosRequestConfig): Promise<AuthorizationPolicyResponse>;
10
10
  static build(client: AxiosInstance): Authorization;
11
11
  }