@wenex/sdk 1.0.54 → 1.0.55

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.
@@ -8,4 +8,8 @@ export interface Geometry {
8
8
  coordinates: GeoJsonCoordinates;
9
9
  bbox?: BBox;
10
10
  }
11
+ export type LatLong = {
12
+ lat: number;
13
+ lon: number;
14
+ };
11
15
  export {};
@@ -1,5 +1,6 @@
1
1
  import { PayType } from '../enums/financial';
2
2
  export type Flags = {
3
+ LOCATION: 'ADDRESS_LOOKUP' | 'GEOCODE_LOOKUP';
3
4
  FINANCIAL: `TO_${PayType}` | `FROM_${PayType}`;
4
5
  };
5
6
  export declare enum StatKey {
@@ -1 +1 @@
1
- {"version":3,"file":"stat.js","sourceRoot":"","sources":["../../src/common/core/stat.ts"],"names":[],"mappings":";;;AAMA,IAAY,OAiHX;AAjHD,WAAY,OAAO;IACjB,OAAO;IACP,kEAAuD,CAAA;IACvD,kEAAuD,CAAA;IACvD,kEAAuD,CAAA;IAEvD,UAAU;IACV,0EAA+D,CAAA;IAC/D,0EAA+D,CAAA;IAC/D,0EAA+D,CAAA;IAE/D,4EAAiE,CAAA;IACjE,4EAAiE,CAAA;IACjE,4EAAiE,CAAA;IAEjE,SAAS;IACT,kEAAuD,CAAA;IACvD,kEAAuD,CAAA;IACvD,kEAAuD,CAAA;IAEvD,wEAA6D,CAAA;IAC7D,wEAA6D,CAAA;IAC7D,wEAA6D,CAAA;IAE7D,YAAY;IACZ,0EAA+D,CAAA;IAC/D,0EAA+D,CAAA;IAC/D,0EAA+D,CAAA;IAC/D,sFAA2E,CAAA;IAC3E,sFAA2E,CAAA;IAC3E,sFAA2E,CAAA;IAE3E,YAAY;IACZ,8EAAmE,CAAA;IACnE,8EAAmE,CAAA;IACnE,8EAAmE,CAAA;IAEnE,gFAAqE,CAAA;IACrE,gFAAqE,CAAA;IACrE,gFAAqE,CAAA;IAErE,gFAAqE,CAAA;IACrE,gFAAqE,CAAA;I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AA;IAE7D,8EAAmE,CAAA;IACnE,8EAAmE,CAAA;IACnE,8EAAmE,CAAA;IAEnE,8EAAmE,CAAA;IACnE,8EAAmE,CAAA;IACnE,8EAAmE,CAAA;IAEnE,UAAU;IACV,oEAAyD,CAAA;IACzD,sEAA2D,CAAA;IAC3D,sEAA2D,CAAA;IAC3D,sEAA2D,CAAA;IAC3D,sEAA2D,CAAA;IAE3D,sEAA2D,CAAA;IAC3D,sEAA2D,CAAA;IAC3D,sEAA2D,CAAA;IAE3D,QAAQ;IACR,4DAAiD,CAAA;IACjD,gEAAqD,CAAA;IACrD,gEAAqD,CAAA;IACrD,gEAAqD,CAAA;IAErD,gEAAqD,CAAA;IACrD,oEAAyD,CAAA;IACzD,oEAAyD,CAAA;IACzD,oEAAyD,CAAA;IAEzD,oFAAyE,CAAA;IACzE,oFAAyE,CAAA;IACzE,oFAAyE,CAAA;IAEzE,gEAAqD,CAAA;IACrD,oEAAyD,CAAA;IACzD,oEAAyD,CAAA;IACzD,oEAAyD,CAAA;AAC3D,CAAC,EAjHW,OAAO,uBAAP,OAAO,QAiHlB"}
@@ -1,4 +1,4 @@
1
- export * from './lat-lng.interface';
1
+ export * from './nominatim.dto';
2
2
  export * from './geometry.interface';
3
3
  export * from './location.interface';
4
- export * from './boundary-administrative.interface';
4
+ export * from './nominatim.serializer';
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./lat-lng.interface"), exports);
17
+ __exportStar(require("./nominatim.dto"), exports);
18
18
  __exportStar(require("./geometry.interface"), exports);
19
19
  __exportStar(require("./location.interface"), exports);
20
- __exportStar(require("./boundary-administrative.interface"), exports);
20
+ __exportStar(require("./nominatim.serializer"), exports);
21
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/interfaces/logistic/locations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,uDAAqC;AACrC,uDAAqC;AACrC,sEAAoD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/interfaces/logistic/locations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,uDAAqC;AACrC,uDAAqC;AACrC,yDAAuC"}
@@ -0,0 +1,9 @@
1
+ export interface AddressLookupDto {
2
+ lat: number;
3
+ lon: number;
4
+ lang?: string;
5
+ }
6
+ export declare class GeocodeLookupDto {
7
+ query: string;
8
+ lang?: string;
9
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GeocodeLookupDto = void 0;
4
+ class GeocodeLookupDto {
5
+ }
6
+ exports.GeocodeLookupDto = GeocodeLookupDto;
7
+ //# sourceMappingURL=nominatim.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nominatim.dto.js","sourceRoot":"","sources":["../../../../src/common/interfaces/logistic/locations/nominatim.dto.ts"],"names":[],"mappings":";;;AAMA,MAAa,gBAAgB;CAG5B;AAHD,4CAGC"}
@@ -0,0 +1,23 @@
1
+ import type { BBox } from 'geojson';
2
+ export declare class NominatimPlaceAddress {
3
+ city: string;
4
+ county: string;
5
+ district: string;
6
+ country: string;
7
+ province?: string;
8
+ state?: string;
9
+ road?: string;
10
+ suburb?: string;
11
+ quarter?: string;
12
+ village?: string;
13
+ municipality?: string;
14
+ }
15
+ export declare class NominatimPlace {
16
+ name: string;
17
+ lat: number;
18
+ lon: number;
19
+ type: string;
20
+ category: string;
21
+ address?: NominatimPlaceAddress;
22
+ bbox: BBox;
23
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NominatimPlace = exports.NominatimPlaceAddress = void 0;
4
+ class NominatimPlaceAddress {
5
+ }
6
+ exports.NominatimPlaceAddress = NominatimPlaceAddress;
7
+ class NominatimPlace {
8
+ }
9
+ exports.NominatimPlace = NominatimPlace;
10
+ //# sourceMappingURL=nominatim.serializer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nominatim.serializer.js","sourceRoot":"","sources":["../../../../src/common/interfaces/logistic/locations/nominatim.serializer.ts"],"names":[],"mappings":";;;AAEA,MAAa,qBAAqB;CAYjC;AAZD,sDAYC;AAED,MAAa,cAAc;CAQ1B;AARD,wCAQC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenex/sdk",
3
- "version": "1.0.54",
3
+ "version": "1.0.55",
4
4
  "description": "Wenex SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,9 +1,10 @@
1
1
  import type { AxiosInstance } from 'axios';
2
2
  import { RequestConfig, RestfulService } from '../../common/core/classes';
3
- import { BoundaryAdministrative, LatLngDto, Location, LocationDto } from '../../common/interfaces/logistic';
3
+ import { AddressLookupDto, GeocodeLookupDto, Location, LocationDto, NominatimPlace } from '../../common/interfaces/logistic';
4
4
  export declare class LocationsService<Properties extends object = object> extends RestfulService<Location<Properties>, LocationDto<Properties>> {
5
5
  protected axios: AxiosInstance;
6
6
  constructor(axios: AxiosInstance);
7
7
  static build<Properties extends object = object>(axios: AxiosInstance): LocationsService<Properties>;
8
- addressLookup(data: LatLngDto, config?: RequestConfig<BoundaryAdministrative>): Promise<BoundaryAdministrative>;
8
+ addressLookup(data: AddressLookupDto, config?: RequestConfig<NominatimPlace>): Promise<NominatimPlace>;
9
+ geocodeLookup(data: GeocodeLookupDto, config?: RequestConfig<NominatimPlace>): Promise<NominatimPlace[]>;
9
10
  }
@@ -13,6 +13,9 @@ class LocationsService extends classes_1.RestfulService {
13
13
  async addressLookup(data, config) {
14
14
  return (await this.post(this.url('address-lookup'), data, config)).data;
15
15
  }
16
+ async geocodeLookup(data, config) {
17
+ return (await this.post(this.url('geocode-lookup'), data, config)).items;
18
+ }
16
19
  }
17
20
  exports.LocationsService = LocationsService;
18
21
  //# sourceMappingURL=locations.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"locations.service.js","sourceRoot":"","sources":["../../src/services/logistic/locations.service.ts"],"names":[],"mappings":";;;AAGA,uDAA0E;AAG1E,MAAa,gBAAqD,SAAQ,wBAGzE;IACC,YAAsB,KAAoB;QACxC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QADN,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,gBAAgB,CAAa,KAAK,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,IAAe,EAAE,MAA8C;QACjF,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAA0C,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACnH,CAAC;CACF;AAfD,4CAeC"}
1
+ {"version":3,"file":"locations.service.js","sourceRoot":"","sources":["../../src/services/logistic/locations.service.ts"],"names":[],"mappings":";;;AAGA,uDAA0E;AAG1E,MAAa,gBAAqD,SAAQ,wBAGzE;IACC,YAAsB,KAAoB;QACxC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;QADN,UAAK,GAAL,KAAK,CAAe;IAE1C,CAAC;IAED,MAAM,CAAC,KAAK,CAAqC,KAAoB;QACnE,OAAO,IAAI,gBAAgB,CAAa,KAAK,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,IAAsB,EAAE,MAAsC;QAChF,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAAyC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IAClH,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,IAAsB,EAAE,MAAsC;QAChF,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,CAA0C,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC;IACpH,CAAC;CACF;AAnBD,4CAmBC"}
@@ -1,8 +0,0 @@
1
- export interface BoundaryAdministrative {
2
- province: string;
3
- county: string;
4
- district: string;
5
- city: string;
6
- village?: string;
7
- suburb?: string;
8
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=boundary-administrative.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"boundary-administrative.interface.js","sourceRoot":"","sources":["../../../../src/common/interfaces/logistic/locations/boundary-administrative.interface.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- export interface LatLng {
2
- lat: number;
3
- lng: number;
4
- }
5
- export type LatLngDto = LatLng;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=lat-lng.interface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lat-lng.interface.js","sourceRoot":"","sources":["../../../../src/common/interfaces/logistic/locations/lat-lng.interface.ts"],"names":[],"mappings":""}