@bringg/dashboard-sdk 2.9.2 → 2.10.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": "@bringg/dashboard-sdk",
3
- "version": "2.9.2",
3
+ "version": "2.10.0",
4
4
  "description": "Bringg dashboard SDK",
5
5
  "main": "dist/bringg-dashboard-sdk.js",
6
6
  "typings": "dist/index.d.ts",
@@ -1,15 +0,0 @@
1
- import { Route } from '../Services/Route';
2
- export declare const GET_COUNTRIES: Route;
3
- export interface CountryInfo {
4
- alpha2: string;
5
- alpha3: string;
6
- api_endpoint: string;
7
- bringg_region: string;
8
- country_code: string;
9
- iso_3166_2: string;
10
- name: string;
11
- region: string;
12
- }
13
- export default class Country {
14
- static getCountries(): Promise<CountryInfo[]>;
15
- }
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_COUNTRIES = void 0;
4
- var ServiceRequest_1 = require("../Services/ServiceRequest");
5
- var Enums_1 = require("../Core/Http/Enums");
6
- var BringgException_1 = require("../Core/BringgException");
7
- var ExceptionReason_1 = require("../Core/ExceptionReason");
8
- var BringgDashboardSDK_1 = require("../BringgDashboardSDK");
9
- var Route_1 = require("../Services/Route");
10
- var URLEndpoint_1 = require("../Core/Http/URLEndpoint");
11
- exports.GET_COUNTRIES = new Route_1.Route('/countries', 0 /* HttpMethod.GET */);
12
- var Country = /** @class */ (function () {
13
- function Country() {
14
- }
15
- Country.getCountries = function () {
16
- var configurationProvider = (0, BringgDashboardSDK_1.getConfigurationProvider)();
17
- return new ServiceRequest_1.AnonymousServiceRequest(configurationProvider.getClientId())
18
- .invoke(URLEndpoint_1.default.parse((0, BringgDashboardSDK_1.getConfigurationProvider)().getRegionDiscoveryEndpoint()), exports.GET_COUNTRIES, null, null)
19
- .handle(function (response) {
20
- var data = response.data, status = response.status;
21
- if (status !== Enums_1.HttpStatusCode.OK || !data.success) {
22
- (0, ServiceRequest_1.logErrorResponse)(response);
23
- throw new BringgException_1.BringgException(ExceptionReason_1.ExceptionReason.fromHttpStatusCode(Enums_1.HttpStatusCode.BAD_REQUEST), 'Unable to get countries');
24
- }
25
- return data.data;
26
- });
27
- };
28
- return Country;
29
- }());
30
- exports.default = Country;
31
- //# sourceMappingURL=Country.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Country.js","sourceRoot":"","sources":["../../src/Country/Country.ts"],"names":[],"mappings":";;;AAAA,6DAAuF;AAEvF,4CAAgE;AAChE,2DAA0D;AAC1D,2DAA0D;AAC1D,4DAAiE;AACjE,2CAA0C;AAC1C,wDAAmD;AAGtC,QAAA,aAAa,GAAG,IAAI,aAAK,CAAC,YAAY,yBAAiB,CAAC;AAarE;IAAA;IAwBA,CAAC;IAvBO,oBAAY,GAAnB;QACC,IAAM,qBAAqB,GAAG,IAAA,6CAAwB,GAAE,CAAC;QACzD,OAAO,IAAI,wCAAuB,CAAC,qBAAqB,CAAC,WAAW,EAAE,CAAC;aACrE,MAAM,CACN,qBAAW,CAAC,KAAK,CAAC,IAAA,6CAAwB,GAAE,CAAC,0BAA0B,EAAE,CAAC,EAC1E,qBAAa,EACb,IAAI,EACJ,IAAI,CACJ;aACA,MAAM,CAAC,UAAC,QAAuB;YACvB,IAAA,IAAI,GAAa,QAAQ,KAArB,EAAE,MAAM,GAAK,QAAQ,OAAb,CAAc;YAElC,IAAI,MAAM,KAAK,sBAAc,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;gBAClD,IAAA,iCAAgB,EAAC,QAAQ,CAAC,CAAC;gBAC3B,MAAM,IAAI,iCAAe,CACxB,iCAAe,CAAC,kBAAkB,CAAC,sBAAc,CAAC,WAAW,CAAC,EAC9D,yBAAyB,CACzB,CAAC;aACF;YAED,OAAO,IAAI,CAAC,IAAI,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC;IACF,cAAC;AAAD,CAAC,AAxBD,IAwBC"}