tradly 1.0.28 → 1.0.32

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.
@@ -25,6 +25,8 @@ export const DEVICES = 'v1/devices';
25
25
  export const ADDRESS = '/v1/addresses'
26
26
  export const CURRENCY = 'v1/currencies';
27
27
  export const LANGUAGES = 'v1/languages';
28
+ export const COUNTRIES = 'v1/countries';
29
+ export const TENANTSCOUNTRIES = 'v1/tenants/countries';
28
30
 
29
31
  export const CATEGORY = 'v1/categories';
30
32
  export const ATTRIBUTE= 'v1/attributes';
package/Roots/App.js CHANGED
@@ -9,13 +9,25 @@ import {
9
9
  VALUES, TRANSACTIONS, EARNINGS, VARIANTTYPES,
10
10
  EPHERMERALKEY, PAYMENTINTENT, CONFIGLIST, STATUS,
11
11
  S3SIGNEDURL, STRIPECONNECTACCOUNT,
12
- CREATEACCOUNTLINK, CREATEEXPRESSLOGINLINK, SCHEDULE, SCHEDULEPERDAY,
12
+ CREATEACCOUNTLINK, CREATEEXPRESSLOGINLINK, SCHEDULE, SCHEDULEPERDAY, COUNTRIES, TENANTSCOUNTRIES,
13
13
  } from './../Constants/PathConstant.js'
14
14
  import serialization from "../Helper/Serialization.js";
15
15
  import { APPCONSTANT } from "../Constants/AppConstant.js";
16
16
  import { ImageConfig } from "../Helper/APIParam.js";
17
17
 
18
18
  class App {
19
+ async getCountries() {
20
+ try { const [error, responseJson] = await network.networkCall({path:COUNTRIES,method:Method.GET});
21
+ if (error) { return error }
22
+ else { return responseJson }
23
+ } catch (error) { return error }
24
+ }
25
+ async getTenantCountries(param = {authKey}) {
26
+ try { const [error, responseJson] = await network.networkCall({path:TENANTSCOUNTRIES,method:Method.GET,authKey:param.authKey});
27
+ if (error) { return error }
28
+ else { return responseJson }
29
+ } catch (error) { return error }
30
+ }
19
31
  async getConfigList(param = {paramBody,authKey}) {
20
32
  let url = `${CONFIGLIST}${param.paramBody}`
21
33
  try { const [error, responseJson] = await network.networkCall({path:url,method:Method.GET,authKey:param.authKey});
@@ -196,14 +208,14 @@ class App {
196
208
  }
197
209
  async addEditVariants(param={authKey,listingId,id,data}) {
198
210
  let method = param.id == undefined || param.id == '' ? Method.POST : Method.PUT
199
- let path = param.id == undefined || param.id == '' ? LISTINGS + `/${param.listingId}/` + VARIANTS : LISTINGS + `/${param.listingId}/` + VARIANTS + `/${param.id}`
211
+ let path = param.id == undefined || param.id == '' ? LISTINGS + `/${param.listingId}` + VARIANTS : LISTINGS + `/${param.listingId}` + VARIANTS + `/${param.id}`
200
212
  try { const [error, responseJson] = await network.networkCall({path:path,method:method,param:param.data,authKey:param.authKey});
201
213
  if (error) { return error }
202
214
  else { return responseJson }
203
215
  } catch (error) { return error }
204
216
  }
205
217
  async deleteVariant(param={id,listingId,authKey}) {
206
- let url = LISTINGS + `/${param.listingId}/` + VARIANTS + `/${param.id}`
218
+ let url = LISTINGS + `/${param.listingId}` + VARIANTS + `/${param.id}`
207
219
  try { const [error, responseJson] = await network.networkCall({path:url,method:Method.DELETE,authKey:param.authKey});
208
220
  if (error) { return error }
209
221
  else { return responseJson }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tradly",
3
- "version": "1.0.28",
3
+ "version": "1.0.32",
4
4
  "description": "Tradly JS SDK",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -11,21 +11,10 @@
11
11
  "esm": "^3.2.25",
12
12
  "typescript": "^4.4.4"
13
13
  },
14
- "author": {
15
- "email": "hi@tradly.app",
16
- "name": "tradly",
17
- "url": "https://tradly.app/"
18
- },
19
- "maintainers": [
20
- {
21
- "name": "tradly",
22
- "email": "hi@tradly.app",
23
- "url": "https://tradly.app/"
24
- }
25
- ],
14
+ "homepage": "https://tradly.app/",
26
15
  "repository": {
27
16
  "type": "git",
28
- "url": "https://github.com/TRADLY-PLATFORM/beluga"
17
+ "url": "https://github.com/TRADLY-PLATFORM"
29
18
  },
30
19
  "devDependencies": {},
31
20
  "keywords": [
@@ -37,5 +26,6 @@
37
26
  "marketplace",
38
27
  "mpos"
39
28
  ],
29
+ "author": "tradly",
40
30
  "license": "ISC"
41
31
  }