@wenex/sdk 0.7.2 → 0.7.3

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.
@@ -0,0 +1,8 @@
1
+ export interface BoundaryAdministrative {
2
+ province: string;
3
+ county: string;
4
+ district: string;
5
+ city: string;
6
+ village?: string;
7
+ suburb?: string;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=boundary-administrative.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boundary-administrative.interface.js","sourceRoot":"","sources":["../../../../src/common/interfaces/logistic/location/boundary-administrative.interface.ts"],"names":[],"mappings":""}
@@ -1,2 +1,4 @@
1
1
  export * from './location.interface';
2
2
  export * from './geometry.interface';
3
+ export * from './lat-lng.interface';
4
+ export * from './boundary-administrative.interface';
@@ -16,4 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./location.interface"), exports);
18
18
  __exportStar(require("./geometry.interface"), exports);
19
+ __exportStar(require("./lat-lng.interface"), exports);
20
+ __exportStar(require("./boundary-administrative.interface"), exports);
19
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/interfaces/logistic/location/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,uDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/interfaces/logistic/location/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,uDAAqC;AAErC,sDAAoC;AACpC,sEAAoD"}
@@ -0,0 +1,5 @@
1
+ export interface LatLng {
2
+ lat: number;
3
+ lng: number;
4
+ }
5
+ export type LatLngDto = LatLng;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=lat-lng.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lat-lng.interface.js","sourceRoot":"","sources":["../../../../src/common/interfaces/logistic/location/lat-lng.interface.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenex/sdk",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "description": "Wenex SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,7 +1,8 @@
1
1
  import type { AxiosInstance } from 'axios';
2
- import { RestfulService } from '../../common/classes';
3
- import { Location, LocationDto } from '../../common/interfaces';
2
+ import { BoundaryAdministrative, LatLng, LatLngDto, Location, LocationDto } from '../../common/interfaces';
3
+ import { RequestConfig, RestfulService } from '../../common/classes';
4
4
  export declare class LocationsService extends RestfulService<Location, LocationDto> {
5
5
  protected axios: AxiosInstance;
6
6
  constructor(axios: AxiosInstance);
7
+ locationToAddress(data: LatLngDto, config?: RequestConfig<LatLng>): Promise<BoundaryAdministrative>;
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.LocationsService = void 0;
4
13
  const classes_1 = require("../../common/classes");
@@ -7,6 +16,11 @@ class LocationsService extends classes_1.RestfulService {
7
16
  super('locations', axios);
8
17
  this.axios = axios;
9
18
  }
19
+ locationToAddress(data, config) {
20
+ return __awaiter(this, void 0, void 0, function* () {
21
+ return this.post(this.url('location-to-address'), data, config);
22
+ });
23
+ }
10
24
  }
11
25
  exports.LocationsService = LocationsService;
12
26
  //# sourceMappingURL=locations.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"locations.service.js","sourceRoot":"","sources":["../../src/services/logistic/locations.service.ts"],"names":[],"mappings":";;;AAEA,kDAAsD;AAGtD,MAAa,gBAAiB,SAAQ,wBAAqC;IACzE,YAAsB,KAAoB;QACxC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QADN,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;CACF;AAJD,4CAIC"}
1
+ {"version":3,"file":"locations.service.js","sourceRoot":"","sources":["../../src/services/logistic/locations.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AASA,kDAAqE;AAErE,MAAa,gBAAiB,SAAQ,wBAAqC;IACzE,YAAsB,KAAoB;QACxC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QADN,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAEK,iBAAiB,CACrB,IAAe,EACf,MAA8B;;YAE9B,OAAO,IAAI,CAAC,IAAI,CACd,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,EAC/B,IAAI,EACJ,MAAM,CACP,CAAC;QACJ,CAAC;KAAA;CACF;AAfD,4CAeC"}
@@ -20,7 +20,7 @@ class FilesService extends classes_1.RestfulService {
20
20
  return __awaiter(this, arguments, void 0, function* (id, config = {}, responseType = 'blob') {
21
21
  config.responseType = responseType;
22
22
  const url = this.url(`download/${id}`);
23
- return yield this.get(url, config);
23
+ return this.get(url, config);
24
24
  });
25
25
  }
26
26
  upload(items_1, scope_1) {
@@ -33,7 +33,7 @@ class FilesService extends classes_1.RestfulService {
33
33
  },
34
34
  });
35
35
  const url = this.url(`upload/${scope}`);
36
- return yield this.post(url, form, config);
36
+ return this.post(url, form, config);
37
37
  });
38
38
  }
39
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"files.service.js","sourceRoot":"","sources":["../../src/services/special/files.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,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,QAAQ;6DACZ,EAAU,EACV,SAA8B,EAAE,EAChC,eAA6B,MAAM;YAEnC,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;YACnC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;YACvC,OAAO,MAAM,IAAI,CAAC,GAAG,CAAI,GAAG,EAAE,MAAM,CAAC,CAAC;QACxC,CAAC;KAAA;IAEK,MAAM;6DACV,KAA2C,EAC3C,KAA2B,EAC3B,SAA8B,EAAE;YAEhC,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;YAC5B,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAExE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;gBACpB,OAAO,EAAE;oBACP,cAAc,EAAE,qBAAqB;iBACtC;aACF,CAAC,CAAC;YAEH,MAAM,GAAG,GAAW,IAAI,CAAC,GAAG,CAAC,UAAU,KAAK,EAAE,CAAC,CAAC;YAChD,OAAO,MAAM,IAAI,CAAC,IAAI,CAA+B,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAC1E,CAAC;KAAA;CACF;AAhCD,oCAgCC"}
1
+ {"version":3,"file":"files.service.js","sourceRoot":"","sources":["../../src/services/special/files.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAIA,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,QAAQ;6DACZ,EAAU,EACV,SAA8B,EAAE,EAChC,eAA6B,MAAM;YAEnC,MAAM,CAAC,YAAY,GAAG,YAAY,CAAC;YACnC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;YACvC,OAAO,IAAI,CAAC,GAAG,CAAI,GAAG,EAAE,MAAM,CAAC,CAAC;QAClC,CAAC;KAAA;IAEK,MAAM;6DACV,KAA2C,EAC3C,KAA2B,EAC3B,SAA8B,EAAE;YAEhC,MAAM,IAAI,GAAG,IAAI,QAAQ,EAAE,CAAC;YAC5B,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAExE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;gBACpB,OAAO,EAAE;oBACP,cAAc,EAAE,qBAAqB;iBACtC;aACF,CAAC,CAAC;YAEH,MAAM,GAAG,GAAW,IAAI,CAAC,GAAG,CAAC,UAAU,KAAK,EAAE,CAAC,CAAC;YAChD,OAAO,IAAI,CAAC,IAAI,CAA+B,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QACpE,CAAC;KAAA;CACF;AAhCD,oCAgCC"}
@@ -18,7 +18,7 @@ class MailsService extends classes_1.RestfulService {
18
18
  }
19
19
  send(data, config) {
20
20
  return __awaiter(this, void 0, void 0, function* () {
21
- return yield this.post(this.url('send'), data, config);
21
+ return this.post(this.url('send'), data, config);
22
22
  });
23
23
  }
24
24
  }
@@ -1 +1 @@
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
+ {"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,IAAI,CAAC,IAAI,CAA4B,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAC9E,CAAC;KAAA;CACF;AARD,oCAQC"}