jd_platform_sdk 0.1.0 → 0.1.1

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.
Files changed (30) hide show
  1. package/dist/index.js +28 -44
  2. package/dist/sdk/configs/jdConfig.js +1 -5
  3. package/dist/sdk/jdConnector.js +72 -63
  4. package/dist/sdk/jdSdk.js +1 -5
  5. package/dist/sdk/models/jdApplication.js +63 -71
  6. package/dist/sdk/models/jdResource.js +104 -91
  7. package/dist/sdk/models/modules/dashboard/jdDashboardCombinations.js +15 -31
  8. package/dist/sdk/models/modules/geolocation/jdCity.js +49 -55
  9. package/dist/sdk/models/modules/geolocation/jdCountry.js +47 -53
  10. package/dist/sdk/models/modules/geolocation/jdDistrict.js +49 -57
  11. package/dist/sdk/models/modules/geolocation/jdState.js +49 -55
  12. package/dist/sdk/models/modules/karaoke/jdKtvShop.js +82 -88
  13. package/dist/sdk/models/modules/music/jdAlbum.js +96 -102
  14. package/dist/sdk/models/modules/music/jdArtist.js +87 -89
  15. package/dist/sdk/models/modules/music/jdComposer.js +83 -87
  16. package/dist/sdk/models/modules/music/jdMusicCombinations.js +15 -31
  17. package/dist/sdk/models/modules/music/jdSong.js +105 -113
  18. package/dist/sdk/models/modules/radio_station/jdRadioStation.js +82 -88
  19. package/dist/sdk/models/modules/user/jdPermission.js +55 -63
  20. package/dist/sdk/models/modules/user/jdPermissionGroup.js +51 -57
  21. package/dist/sdk/models/modules/user/jdSessionUser.js +70 -72
  22. package/dist/sdk/models/modules/user/jdUser.js +73 -75
  23. package/dist/sdk/models/modules/user/jdUserRole.js +50 -54
  24. package/dist/sdk/utilities/browserUtils.js +31 -24
  25. package/dist/sdk/utilities/cryptoUtils.js +6 -13
  26. package/dist/sdk/utilities/dateUtils.js +1 -5
  27. package/dist/sdk/utilities/globalEventHandler.js +4 -5
  28. package/dist/sdk/utilities/stringUtils.js +2 -6
  29. package/dist/sdk/utilities/utils.js +19 -22
  30. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,52 +1,36 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./sdk/jdConnector"), exports);
18
- __exportStar(require("./sdk/jdSdk"), exports);
19
- __exportStar(require("./sdk/configs/jdConfig"), exports);
1
+ export * from "./sdk/jdConnector";
2
+ export * from "./sdk/jdSdk";
3
+ export * from "./sdk/configs/jdConfig";
20
4
  // export * from "./sdk/extensions/extensions";
21
- __exportStar(require("./sdk/utilities/browserUtils"), exports);
22
- __exportStar(require("./sdk/utilities/cryptoUtils"), exports);
23
- __exportStar(require("./sdk/utilities/dateUtils"), exports);
24
- __exportStar(require("./sdk/utilities/globalEventHandler"), exports);
25
- __exportStar(require("./sdk/utilities/stringUtils"), exports);
26
- __exportStar(require("./sdk/utilities/utils"), exports);
5
+ export * from "./sdk/utilities/browserUtils";
6
+ export * from "./sdk/utilities/cryptoUtils";
7
+ export * from "./sdk/utilities/dateUtils";
8
+ export * from "./sdk/utilities/globalEventHandler";
9
+ export * from "./sdk/utilities/stringUtils";
10
+ export * from "./sdk/utilities/utils";
27
11
  // Generic Models for different possible modules for all platforms
28
- __exportStar(require("./sdk/models/jdResource"), exports);
29
- __exportStar(require("./sdk/models/jdApplication"), exports);
12
+ export * from "./sdk/models/jdResource";
13
+ export * from "./sdk/models/jdApplication";
30
14
  //Dashboard
31
- __exportStar(require("./sdk/models/modules/dashboard/jdDashboardCombinations"), exports);
15
+ export * from "./sdk/models/modules/dashboard/jdDashboardCombinations";
32
16
  //User
33
- __exportStar(require("./sdk/models/modules/user/jdUser"), exports);
34
- __exportStar(require("./sdk/models/modules/user/jdUserRole"), exports);
35
- __exportStar(require("./sdk/models/modules/user/jdSessionUser"), exports);
36
- __exportStar(require("./sdk/models/modules/user/jdPermission"), exports);
37
- __exportStar(require("./sdk/models/modules/user/jdPermissionGroup"), exports);
17
+ export * from "./sdk/models/modules/user/jdUser";
18
+ export * from "./sdk/models/modules/user/jdUserRole";
19
+ export * from "./sdk/models/modules/user/jdSessionUser";
20
+ export * from "./sdk/models/modules/user/jdPermission";
21
+ export * from "./sdk/models/modules/user/jdPermissionGroup";
38
22
  //Karaoke
39
- __exportStar(require("./sdk/models/modules/karaoke/jdKtvShop"), exports);
23
+ export * from "./sdk/models/modules/karaoke/jdKtvShop";
40
24
  //Radio Station
41
- __exportStar(require("./sdk/models/modules/radio_station/jdRadioStation"), exports);
25
+ export * from "./sdk/models/modules/radio_station/jdRadioStation";
42
26
  //Music
43
- __exportStar(require("./sdk/models/modules/music/jdAlbum"), exports);
44
- __exportStar(require("./sdk/models/modules/music/jdSong"), exports);
45
- __exportStar(require("./sdk/models/modules/music/jdArtist"), exports);
46
- __exportStar(require("./sdk/models/modules/music/jdComposer"), exports);
47
- __exportStar(require("./sdk/models/modules/music/jdMusicCombinations"), exports);
27
+ export * from "./sdk/models/modules/music/jdAlbum";
28
+ export * from "./sdk/models/modules/music/jdSong";
29
+ export * from "./sdk/models/modules/music/jdArtist";
30
+ export * from "./sdk/models/modules/music/jdComposer";
31
+ export * from "./sdk/models/modules/music/jdMusicCombinations";
48
32
  //Geolocation
49
- __exportStar(require("./sdk/models/modules/geolocation/jdCountry"), exports);
50
- __exportStar(require("./sdk/models/modules/geolocation/jdState"), exports);
51
- __exportStar(require("./sdk/models/modules/geolocation/jdCity"), exports);
52
- __exportStar(require("./sdk/models/modules/geolocation/jdDistrict"), exports);
33
+ export * from "./sdk/models/modules/geolocation/jdCountry";
34
+ export * from "./sdk/models/modules/geolocation/jdState";
35
+ export * from "./sdk/models/modules/geolocation/jdCity";
36
+ export * from "./sdk/models/modules/geolocation/jdDistrict";
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
1
  // Singleton class to be able to call from everywhere with minified compatible
4
- class JDConfig {
5
- static _instance;
2
+ export default class JDConfig {
6
3
  //Singleton constructor shouldn't be called directly and use JDConfig.instance
7
4
  constructor() { }
8
5
  static get instance() {
@@ -39,4 +36,3 @@ class JDConfig {
39
36
  }
40
37
  }
41
38
  }
42
- exports.default = JDConfig;
@@ -1,15 +1,16 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
4
9
  };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.JDConnector = exports.SimpleResponse = void 0;
7
- const globalEventHandler_1 = require("./utilities/globalEventHandler");
8
- const utils_1 = require("./utilities/utils");
9
- const jdConfig_1 = __importDefault(require("./configs/jdConfig"));
10
- class SimpleResponse {
11
- body;
12
- statusCode;
10
+ import { globalEventEmitter } from "./utilities/globalEventHandler";
11
+ import { Utils } from "./utilities/utils";
12
+ import JDConfig from "./configs/jdConfig";
13
+ export class SimpleResponse {
13
14
  constructor(body, statusCode) {
14
15
  this.body = body;
15
16
  this.statusCode = statusCode;
@@ -18,59 +19,68 @@ class SimpleResponse {
18
19
  return this.body == '' || this.statusCode == -1;
19
20
  }
20
21
  }
21
- exports.SimpleResponse = SimpleResponse;
22
- class JDConnector {
23
- async httpGetDirectAsync(url, headers, params, bShowErrorMessage, bForceRefresh = true, bAutoHideBusyIndicator = true, overrideVersion = '') {
24
- return await this.httpASyncCallDirect(0 /* JDHttpType.GET */, url, params, headers, {}, bShowErrorMessage, true, false, bForceRefresh, bAutoHideBusyIndicator, overrideVersion);
22
+ export class JDConnector {
23
+ httpGetDirectAsync(url_1, headers_1, params_1, bShowErrorMessage_1) {
24
+ return __awaiter(this, arguments, void 0, function* (url, headers, params, bShowErrorMessage, bForceRefresh = true, bAutoHideBusyIndicator = true, overrideVersion = '') {
25
+ return yield this.httpASyncCallDirect(0 /* JDHttpType.GET */, url, params, headers, {}, bShowErrorMessage, true, false, bForceRefresh, bAutoHideBusyIndicator, overrideVersion);
26
+ });
25
27
  }
26
- async httpPostDirectAsync(url, headers, body, bShowErrorMessage, bAutoHideBusyIndicator = true, overrideVersion = '') {
27
- return await this.httpASyncCallDirect(1 /* JDHttpType.POST */, url, {}, headers, body, bShowErrorMessage, true, false, true, bAutoHideBusyIndicator, overrideVersion);
28
+ httpPostDirectAsync(url_1, headers_1, body_1, bShowErrorMessage_1) {
29
+ return __awaiter(this, arguments, void 0, function* (url, headers, body, bShowErrorMessage, bAutoHideBusyIndicator = true, overrideVersion = '') {
30
+ return yield this.httpASyncCallDirect(1 /* JDHttpType.POST */, url, {}, headers, body, bShowErrorMessage, true, false, true, bAutoHideBusyIndicator, overrideVersion);
31
+ });
28
32
  }
29
- async httpGetRelativeAsync(url, headers, params, bShowErrorMessage, bForceRefresh = false, bAutoHideBusyIndicator = true, overrideVersion = '') {
30
- return await this.httpASyncCallDirect(0 /* JDHttpType.GET */, url, params, headers, {}, bShowErrorMessage, false, true, bForceRefresh, bAutoHideBusyIndicator, overrideVersion);
33
+ httpGetRelativeAsync(url_1, headers_1, params_1, bShowErrorMessage_1) {
34
+ return __awaiter(this, arguments, void 0, function* (url, headers, params, bShowErrorMessage, bForceRefresh = false, bAutoHideBusyIndicator = true, overrideVersion = '') {
35
+ return yield this.httpASyncCallDirect(0 /* JDHttpType.GET */, url, params, headers, {}, bShowErrorMessage, false, true, bForceRefresh, bAutoHideBusyIndicator, overrideVersion);
36
+ });
31
37
  }
32
- async httpPostRelativeAsync(url, headers, body, bShowErrorMessage, bAutoHideBusyIndicator = true, overrideVersion = '') {
33
- return await this.httpASyncCallDirect(1 /* JDHttpType.POST */, url, {}, headers, body, bShowErrorMessage, false, true, false, bAutoHideBusyIndicator, overrideVersion);
38
+ httpPostRelativeAsync(url_1, headers_1, body_1, bShowErrorMessage_1) {
39
+ return __awaiter(this, arguments, void 0, function* (url, headers, body, bShowErrorMessage, bAutoHideBusyIndicator = true, overrideVersion = '') {
40
+ return yield this.httpASyncCallDirect(1 /* JDHttpType.POST */, url, {}, headers, body, bShowErrorMessage, false, true, false, bAutoHideBusyIndicator, overrideVersion);
41
+ });
34
42
  }
35
- async httpASyncCallDirect(httpType, url, params, headers, body, bShowErrorMessage, bBuildParams, bRelativeURL = true, bForceRefresh = true, bAutoHideBusyIndicator = true, overrideVersion = '') {
36
- const finalURL = this.buildURL(httpType, url, params, true, bRelativeURL);
37
- // console.log(bRelativeURL);
38
- // console.log(`Final URL: ${finalURL}`);
39
- //Only for debugging purposes only
40
- if (globalThis.bForceRefreshGetRequests) {
41
- bForceRefresh = true;
42
- }
43
- let finalResponse = new SimpleResponse('failed', 400);
44
- try {
45
- if (httpType == 1 /* JDHttpType.POST */) {
46
- const response = await fetch(finalURL, {
47
- method: 'POST',
48
- body: JSON.stringify(body), // string or object
49
- headers: headers
50
- });
51
- const responseText = await response.text();
52
- finalResponse = new SimpleResponse(responseText, response.status);
43
+ httpASyncCallDirect(httpType_1, url_1, params_1, headers_1, body_1, bShowErrorMessage_1, bBuildParams_1) {
44
+ return __awaiter(this, arguments, void 0, function* (httpType, url, params, headers, body, bShowErrorMessage, bBuildParams, bRelativeURL = true, bForceRefresh = true, bAutoHideBusyIndicator = true, overrideVersion = '') {
45
+ const finalURL = this.buildURL(httpType, url, params, true, bRelativeURL);
46
+ // console.log(bRelativeURL);
47
+ // console.log(`Final URL: ${finalURL}`);
48
+ //Only for debugging purposes only
49
+ if (globalThis.bForceRefreshGetRequests) {
50
+ bForceRefresh = true;
53
51
  }
54
- else {
55
- //Request with GET/HEAD method cannot have body.
56
- const response = await fetch(finalURL, {
57
- method: 'GET',
58
- headers: headers
59
- });
60
- const responseText = await response.text();
61
- finalResponse = new SimpleResponse(responseText, response.status);
52
+ let finalResponse = new SimpleResponse('failed', 400);
53
+ try {
54
+ if (httpType == 1 /* JDHttpType.POST */) {
55
+ const response = yield fetch(finalURL, {
56
+ method: 'POST',
57
+ body: JSON.stringify(body), // string or object
58
+ headers: headers
59
+ });
60
+ const responseText = yield response.text();
61
+ finalResponse = new SimpleResponse(responseText, response.status);
62
+ }
63
+ else {
64
+ //Request with GET/HEAD method cannot have body.
65
+ const response = yield fetch(finalURL, {
66
+ method: 'GET',
67
+ headers: headers
68
+ });
69
+ const responseText = yield response.text();
70
+ finalResponse = new SimpleResponse(responseText, response.status);
71
+ }
62
72
  }
63
- }
64
- catch (ex) {
65
- console.log(ex);
66
- finalResponse = new SimpleResponse(finalURL, 403);
67
- }
68
- if (bShowErrorMessage && finalResponse.statusCode != 200) {
69
- //Emit event so that the client can listen and show the actual dialog
70
- globalEventHandler_1.globalEventEmitter.emit("show_alert_dialog", { type: "error", message: finalResponse.body });
71
- }
72
- // console.log(finalResponse);
73
- return finalResponse;
73
+ catch (ex) {
74
+ console.log(ex);
75
+ finalResponse = new SimpleResponse(finalURL, 403);
76
+ }
77
+ if (bShowErrorMessage && finalResponse.statusCode != 200) {
78
+ //Emit event so that the client can listen and show the actual dialog
79
+ globalEventEmitter.emit("show_alert_dialog", { type: "error", message: finalResponse.body });
80
+ }
81
+ // console.log(finalResponse);
82
+ return finalResponse;
83
+ });
74
84
  }
75
85
  // ////////////////////////////////////////////////////////////////////////////////////////////////
76
86
  // ////////////////////////// Connector Utilities Functions //////////////////////////
@@ -81,7 +91,7 @@ class JDConnector {
81
91
  // Build a query parameters from a Map type to URL encoded string like ?event=test&type=001
82
92
  buildParams(params) {
83
93
  let finalParams = "";
84
- if (utils_1.Utils.isNotEmpty(params)) {
94
+ if (Utils.isNotEmpty(params)) {
85
95
  let index = 0;
86
96
  for (const key in params) {
87
97
  const val = params[key];
@@ -100,14 +110,14 @@ class JDConnector {
100
110
  //bBuildParams - Whether or not the parameters will be embedded in URL
101
111
  //TODO: version should be able to override
102
112
  buildURL(httpType, baseUrl, params, bBuildParams = false, bRelativeURL = true, overrideVersion = '') {
103
- const strHost = jdConfig_1.default.getAPIHost();
113
+ const strHost = JDConfig.getAPIHost();
104
114
  let url = strHost + baseUrl;
105
115
  if (!bRelativeURL) {
106
116
  url = baseUrl;
107
117
  }
108
118
  // //Add hashtable form values for GET request
109
119
  if (httpType == 0 /* JDHttpType.GET */) {
110
- if (utils_1.Utils.isNotEmpty(params) && bBuildParams) {
120
+ if (Utils.isNotEmpty(params) && bBuildParams) {
111
121
  url += this.buildParams(params);
112
122
  }
113
123
  }
@@ -121,7 +131,7 @@ class JDConnector {
121
131
  buildDirectURL(httpType, url, data) {
122
132
  //Add hashtable form values for GET request
123
133
  if (httpType == 0 /* JDHttpType.GET */) {
124
- if (utils_1.Utils.isNotEmpty(data))
134
+ if (Utils.isNotEmpty(data))
125
135
  url += this.buildParams(data);
126
136
  }
127
137
  // Replace all instances of "\r\n" with "\n"
@@ -131,4 +141,3 @@ class JDConnector {
131
141
  return url;
132
142
  }
133
143
  }
134
- exports.JDConnector = JDConnector;
package/dist/sdk/jdSdk.js CHANGED
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JDSdk = void 0;
4
- class JDSdk {
1
+ export class JDSdk {
5
2
  static initialiseApp(applicationId, appId, appKey, appSecret) {
6
3
  globalThis.applicationId = applicationId;
7
4
  globalThis.appId = appId;
@@ -20,4 +17,3 @@ class JDSdk {
20
17
  globalThis.userId = userId;
21
18
  }
22
19
  }
23
- exports.JDSdk = JDSdk;
@@ -1,84 +1,76 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
24
9
  };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.JDApplication = void 0;
27
- const utils_1 = require("../utilities/utils");
28
- const jdResource_1 = __importStar(require("./jdResource"));
29
- class JDApplication extends jdResource_1.default {
30
- appId = '';
31
- appKey = '';
32
- appSecret = '';
33
- storeLinks = {};
34
- urls = {};
35
- orientation = '';
36
- version = '';
37
- versionCode = 0;
38
- bundleCodeAndroid = 0;
39
- bundleCodeIos = 0;
40
- constructor(data = {}, connectorInfo = new jdResource_1.ConnectorInfo("", "")) {
10
+ import { Utils } from "../utilities/utils";
11
+ import JDResource, { ConnectorInfo } from "./jdResource";
12
+ export class JDApplication extends JDResource {
13
+ constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
41
14
  super(connectorInfo);
15
+ this.appId = '';
16
+ this.appKey = '';
17
+ this.appSecret = '';
18
+ this.storeLinks = {};
19
+ this.urls = {};
20
+ this.orientation = '';
21
+ this.version = '';
22
+ this.versionCode = 0;
23
+ this.bundleCodeAndroid = 0;
24
+ this.bundleCodeIos = 0;
42
25
  this.setData(data);
43
26
  }
44
27
  setData(data) {
45
28
  super.setData(data);
46
- this.appId = utils_1.Utils.getString(data, 'app_id');
47
- this.appKey = utils_1.Utils.getString(data, 'app_key');
48
- this.appSecret = utils_1.Utils.getString(data, 'app_secret');
49
- this.orientation = utils_1.Utils.getString(data, 'orientation');
50
- this.version = utils_1.Utils.getString(data, 'version');
51
- this.storeLinks = utils_1.Utils.getObject(data, 'store_links');
52
- this.urls = utils_1.Utils.getObject(data, 'urls');
53
- this.versionCode = utils_1.Utils.getInteger(data, 'version_code');
54
- this.bundleCodeAndroid = utils_1.Utils.getInteger(data, 'bundle_code_android');
55
- this.bundleCodeIos = utils_1.Utils.getInteger(data, 'bundle_code_ios');
29
+ this.appId = Utils.getString(data, 'app_id');
30
+ this.appKey = Utils.getString(data, 'app_key');
31
+ this.appSecret = Utils.getString(data, 'app_secret');
32
+ this.orientation = Utils.getString(data, 'orientation');
33
+ this.version = Utils.getString(data, 'version');
34
+ this.storeLinks = Utils.getObject(data, 'store_links');
35
+ this.urls = Utils.getObject(data, 'urls');
36
+ this.versionCode = Utils.getInteger(data, 'version_code');
37
+ this.bundleCodeAndroid = Utils.getInteger(data, 'bundle_code_android');
38
+ this.bundleCodeIos = Utils.getInteger(data, 'bundle_code_ios');
56
39
  }
57
- async getContents(params = {}) {
58
- const queryParams = this.getSortParameters(params);
59
- return await this.getRelative('/dashboard/applications', queryParams);
40
+ getContents() {
41
+ return __awaiter(this, arguments, void 0, function* (params = {}) {
42
+ const queryParams = this.getSortParameters(params);
43
+ return yield this.getRelative('/dashboard/applications', queryParams);
44
+ });
60
45
  }
61
- async paginateContents(params = {}) {
62
- const queryParams = this.getSortParameters(params);
63
- if (params.name)
64
- queryParams['name'] = params.name;
65
- if (params.sandbox)
66
- queryParams['sandbox'] = params.sandbox;
67
- if (params.featured)
68
- queryParams['featured'] = params.featured;
69
- return await this.getRelative('/dashboard/applications', queryParams);
46
+ paginateContents() {
47
+ return __awaiter(this, arguments, void 0, function* (params = {}) {
48
+ const queryParams = this.getSortParameters(params);
49
+ if (params.name)
50
+ queryParams['name'] = params.name;
51
+ if (params.sandbox)
52
+ queryParams['sandbox'] = params.sandbox;
53
+ if (params.featured)
54
+ queryParams['featured'] = params.featured;
55
+ return yield this.getRelative('/dashboard/applications', queryParams);
56
+ });
70
57
  }
71
- async findContents(params = {}) {
72
- const queryParams = this.getSortParameters(params);
73
- if (params.title)
74
- queryParams['name'] = params.title;
75
- return await this.getRelative('/dashboard/applications', queryParams);
58
+ findContents() {
59
+ return __awaiter(this, arguments, void 0, function* (params = {}) {
60
+ const queryParams = this.getSortParameters(params);
61
+ if (params.title)
62
+ queryParams['name'] = params.title;
63
+ return yield this.getRelative('/dashboard/applications', queryParams);
64
+ });
76
65
  }
77
- async getInfo(id) {
78
- return await this.getRelative(`/dashboard/applications/${id}`, {});
66
+ getInfo(id) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ return yield this.getRelative(`/dashboard/applications/${id}`, {});
69
+ });
79
70
  }
80
- async updateFields(id, body = {}) {
81
- return await this.postRelative(`/dashboard/applications/${id}/update/single_fields`, body);
71
+ updateFields(id_1) {
72
+ return __awaiter(this, arguments, void 0, function* (id, body = {}) {
73
+ return yield this.postRelative(`/dashboard/applications/${id}/update/single_fields`, body);
74
+ });
82
75
  }
83
76
  }
84
- exports.JDApplication = JDApplication;