@etsoo/appscript 1.4.14 → 1.4.16

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 (41) hide show
  1. package/lib/cjs/address/AddressContinent.js +1 -1
  2. package/lib/cjs/address/AddressRegion.js +1 -1
  3. package/lib/cjs/address/AddressUtils.js +1 -1
  4. package/lib/cjs/app/ExternalSettings.js +1 -1
  5. package/lib/cjs/app/UserRole.js +1 -1
  6. package/lib/cjs/bridges/BridgeUtils.js +1 -1
  7. package/lib/cjs/bridges/IBridgeHost.js +1 -1
  8. package/lib/cjs/business/ApiService.d.ts +9 -0
  9. package/lib/cjs/business/ApiService.js +13 -0
  10. package/lib/cjs/business/BusinessTax.js +1 -1
  11. package/lib/cjs/business/BusinessUtils.js +1 -1
  12. package/lib/cjs/business/DataPrivacy.js +1 -1
  13. package/lib/cjs/business/EntityStatus.js +1 -1
  14. package/lib/cjs/business/ProductUnit.js +2 -2
  15. package/lib/cjs/business/RepeatOption.js +1 -1
  16. package/lib/cjs/erp/OrgApi.d.ts +8 -0
  17. package/lib/cjs/erp/OrgApi.js +10 -0
  18. package/lib/cjs/erp/rq/PlaceQueryRQ.js +2 -2
  19. package/lib/cjs/i18n/en.json +1 -0
  20. package/lib/cjs/i18n/zh-Hans.json +1 -0
  21. package/lib/cjs/i18n/zh-Hant.json +1 -0
  22. package/lib/cjs/index.d.ts +1 -0
  23. package/lib/cjs/index.js +1 -0
  24. package/lib/mjs/address/AddressRegion.js +1 -2
  25. package/lib/mjs/business/ApiService.d.ts +9 -0
  26. package/lib/mjs/business/ApiService.js +10 -0
  27. package/lib/mjs/business/BusinessTax.js +1 -2
  28. package/lib/mjs/erp/OrgApi.d.ts +8 -0
  29. package/lib/mjs/erp/OrgApi.js +10 -0
  30. package/lib/mjs/i18n/en.json +1 -0
  31. package/lib/mjs/i18n/zh-Hans.json +1 -0
  32. package/lib/mjs/i18n/zh-Hant.json +1 -0
  33. package/lib/mjs/index.d.ts +1 -0
  34. package/lib/mjs/index.js +1 -0
  35. package/package.json +8 -8
  36. package/src/business/ApiService.ts +9 -0
  37. package/src/erp/OrgApi.ts +12 -0
  38. package/src/i18n/en.json +1 -0
  39. package/src/i18n/zh-Hans.json +1 -0
  40. package/src/i18n/zh-Hant.json +1 -0
  41. package/src/index.ts +1 -0
@@ -41,4 +41,4 @@ var AddressContinent;
41
41
  /// 南美洲
42
42
  /// </summary>
43
43
  AddressContinent[AddressContinent["SA"] = 7] = "SA";
44
- })(AddressContinent = exports.AddressContinent || (exports.AddressContinent = {}));
44
+ })(AddressContinent || (exports.AddressContinent = AddressContinent = {}));
@@ -28,6 +28,7 @@ class AddressRegion {
28
28
  this.continentId = AddressContinent_1.AddressContinent[continent];
29
29
  }
30
30
  }
31
+ exports.AddressRegion = AddressRegion;
31
32
  /**
32
33
  * CN - China
33
34
  */
@@ -104,4 +105,3 @@ AddressRegion.all = [
104
105
  AddressRegion.DE,
105
106
  AddressRegion.FR
106
107
  ];
107
- exports.AddressRegion = AddressRegion;
@@ -32,4 +32,4 @@ var AddressUtils;
32
32
  return AddressRegion_1.AddressRegion.getById(regions[0]);
33
33
  }
34
34
  AddressUtils.getRegion = getRegion;
35
- })(AddressUtils = exports.AddressUtils || (exports.AddressUtils = {}));
35
+ })(AddressUtils || (exports.AddressUtils = AddressUtils = {}));
@@ -39,4 +39,4 @@ var ExternalSettings;
39
39
  return settings;
40
40
  }
41
41
  ExternalSettings.format = format;
42
- })(ExternalSettings = exports.ExternalSettings || (exports.ExternalSettings = {}));
42
+ })(ExternalSettings || (exports.ExternalSettings = ExternalSettings = {}));
@@ -43,4 +43,4 @@ var UserRole;
43
43
  * Founder, takes all ownership
44
44
  */
45
45
  UserRole[UserRole["Founder"] = 16384] = "Founder";
46
- })(UserRole = exports.UserRole || (exports.UserRole = {}));
46
+ })(UserRole || (exports.UserRole = UserRole = {}));
@@ -16,4 +16,4 @@ var BridgeUtils;
16
16
  : typeof g.electron === 'object'
17
17
  ? g.electron
18
18
  : undefined;
19
- })(BridgeUtils = exports.BridgeUtils || (exports.BridgeUtils = {}));
19
+ })(BridgeUtils || (exports.BridgeUtils = BridgeUtils = {}));
@@ -8,4 +8,4 @@ var BridgeHostName;
8
8
  (function (BridgeHostName) {
9
9
  BridgeHostName[BridgeHostName["Electron"] = 0] = "Electron";
10
10
  BridgeHostName[BridgeHostName["Flutter"] = 1] = "Flutter";
11
- })(BridgeHostName = exports.BridgeHostName || (exports.BridgeHostName = {}));
11
+ })(BridgeHostName || (exports.BridgeHostName = BridgeHostName = {}));
@@ -0,0 +1,9 @@
1
+ /**
2
+ * API service enum
3
+ */
4
+ export declare enum ApiService {
5
+ /**
6
+ * Amazon SES
7
+ */
8
+ AmazonSES = 1
9
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApiService = void 0;
4
+ /**
5
+ * API service enum
6
+ */
7
+ var ApiService;
8
+ (function (ApiService) {
9
+ /**
10
+ * Amazon SES
11
+ */
12
+ ApiService[ApiService["AmazonSES"] = 1] = "AmazonSES";
13
+ })(ApiService || (exports.ApiService = ApiService = {}));
@@ -26,6 +26,7 @@ class BusinessTax {
26
26
  return 'tax' + this.id + this.name;
27
27
  }
28
28
  }
29
+ exports.BusinessTax = BusinessTax;
29
30
  /**
30
31
  * CN
31
32
  * Unified Social Credit Code (USCC) / 统一信用代码
@@ -58,4 +59,3 @@ BusinessTax.all = [
58
59
  BusinessTax.CA,
59
60
  BusinessTax.HK
60
61
  ];
61
- exports.BusinessTax = BusinessTax;
@@ -69,4 +69,4 @@ var BusinessUtils;
69
69
  item.sid = id;
70
70
  }
71
71
  BusinessUtils.setIdValue = setIdValue;
72
- })(BusinessUtils = exports.BusinessUtils || (exports.BusinessUtils = {}));
72
+ })(BusinessUtils || (exports.BusinessUtils = BusinessUtils = {}));
@@ -38,4 +38,4 @@ var DataPrivacy;
38
38
  /// 创建者私有
39
39
  /// </summary>
40
40
  DataPrivacy[DataPrivacy["Private"] = 100] = "Private";
41
- })(DataPrivacy = exports.DataPrivacy || (exports.DataPrivacy = {}));
41
+ })(DataPrivacy || (exports.DataPrivacy = DataPrivacy = {}));
@@ -44,4 +44,4 @@ var EntityStatus;
44
44
  * Deleted
45
45
  */
46
46
  EntityStatus[EntityStatus["Deleted"] = 255] = "Deleted";
47
- })(EntityStatus = exports.EntityStatus || (exports.EntityStatus = {}));
47
+ })(EntityStatus || (exports.EntityStatus = EntityStatus = {}));
@@ -18,7 +18,7 @@ var ProductBaseUnit;
18
18
  * 套
19
19
  */
20
20
  ProductBaseUnit[ProductBaseUnit["SET"] = 2] = "SET";
21
- })(ProductBaseUnit = exports.ProductBaseUnit || (exports.ProductBaseUnit = {}));
21
+ })(ProductBaseUnit || (exports.ProductBaseUnit = ProductBaseUnit = {}));
22
22
  var ProductAssetUnit;
23
23
  (function (ProductAssetUnit) {
24
24
  /**
@@ -58,7 +58,7 @@ var ProductWeightUnit;
58
58
  * 吨
59
59
  */
60
60
  ProductWeightUnit[ProductWeightUnit["TON"] = 49] = "TON";
61
- })(ProductWeightUnit = exports.ProductWeightUnit || (exports.ProductWeightUnit = {}));
61
+ })(ProductWeightUnit || (exports.ProductWeightUnit = ProductWeightUnit = {}));
62
62
  /**
63
63
  * Product units enum
64
64
  * Repeat options take range 10 - 39
@@ -58,4 +58,4 @@ var RepeatOption;
58
58
  * 半年
59
59
  */
60
60
  RepeatOption[RepeatOption["HALFYEAR"] = 36] = "HALFYEAR";
61
- })(RepeatOption = exports.RepeatOption || (exports.RepeatOption = {}));
61
+ })(RepeatOption || (exports.RepeatOption = RepeatOption = {}));
@@ -9,6 +9,7 @@ import { EntityApi } from './EntityApi';
9
9
  import { OrgListRQ } from './rq/OrgListRQ';
10
10
  import { OrgQueryRQ } from './rq/OrgQueryRQ';
11
11
  import { SendActionMessageRQ } from './rq/SendActionMessageRQ';
12
+ import { ApiService } from '../business/ApiService';
12
13
  /**
13
14
  * Organization API
14
15
  */
@@ -18,6 +19,13 @@ export declare class OrgApi extends EntityApi {
18
19
  * @param app Application
19
20
  */
20
21
  constructor(app: IApp);
22
+ /**
23
+ * Check API service's availability
24
+ * @param api API service id
25
+ * @param payload Payload
26
+ * @returns Result
27
+ */
28
+ checkApiService(api: ApiService, payload?: IApiPayload<boolean>): Promise<boolean | undefined>;
21
29
  /**
22
30
  * Get organization list
23
31
  * @param items Max items or request data
@@ -14,6 +14,16 @@ class OrgApi extends EntityApi_1.EntityApi {
14
14
  constructor(app) {
15
15
  super('Organization', app);
16
16
  }
17
+ /**
18
+ * Check API service's availability
19
+ * @param api API service id
20
+ * @param payload Payload
21
+ * @returns Result
22
+ */
23
+ checkApiService(api, payload) {
24
+ payload !== null && payload !== void 0 ? payload : (payload = { showLoading: false });
25
+ return this.api.get(`${this.flag}/CheckApiService`, { api }, payload);
26
+ }
17
27
  list(items, serviceId) {
18
28
  if (typeof items === 'object') {
19
29
  if (typeof serviceId === 'number')
@@ -9,7 +9,7 @@ var PlaceQueryOutput;
9
9
  (function (PlaceQueryOutput) {
10
10
  PlaceQueryOutput[PlaceQueryOutput["JSON"] = 0] = "JSON";
11
11
  PlaceQueryOutput[PlaceQueryOutput["XML"] = 1] = "XML";
12
- })(PlaceQueryOutput = exports.PlaceQueryOutput || (exports.PlaceQueryOutput = {}));
12
+ })(PlaceQueryOutput || (exports.PlaceQueryOutput = PlaceQueryOutput = {}));
13
13
  /**
14
14
  * Place query API provider
15
15
  * 地址查询接口供应商
@@ -18,4 +18,4 @@ var PlaceQueryProvider;
18
18
  (function (PlaceQueryProvider) {
19
19
  PlaceQueryProvider[PlaceQueryProvider["Google"] = 0] = "Google";
20
20
  PlaceQueryProvider[PlaceQueryProvider["Baidu"] = 1] = "Baidu";
21
- })(PlaceQueryProvider = exports.PlaceQueryProvider || (exports.PlaceQueryProvider = {}));
21
+ })(PlaceQueryProvider || (exports.PlaceQueryProvider = PlaceQueryProvider = {}));
@@ -79,6 +79,7 @@
79
79
  "keywords": "Keywords",
80
80
  "loading": "Loading...",
81
81
  "login": "Login",
82
+ "logo": "Logo",
82
83
  "me": "ME",
83
84
  "menuHome": "Home",
84
85
  "message": "Message",
@@ -79,6 +79,7 @@
79
79
  "keywords": "关键词",
80
80
  "loading": "正在加载...",
81
81
  "login": "登录",
82
+ "logo": "标志",
82
83
  "me": "我",
83
84
  "menuHome": "首页",
84
85
  "message": "留言",
@@ -79,6 +79,7 @@
79
79
  "keywords": "關鍵詞",
80
80
  "loading": "正在加載...",
81
81
  "login": "登錄",
82
+ "logo": "標誌",
82
83
  "me": "我",
83
84
  "menuHome": "首頁",
84
85
  "message": "留言",
@@ -15,6 +15,7 @@ export * from './app/IApp';
15
15
  export * from './app/UserRole';
16
16
  export * from './bridges/BridgeUtils';
17
17
  export * from './bridges/IBridgeHost';
18
+ export * from './business/ApiService';
18
19
  export * from './business/BusinessTax';
19
20
  export * from './business/BusinessUtils';
20
21
  export * from './business/Currency';
package/lib/cjs/index.js CHANGED
@@ -36,6 +36,7 @@ __exportStar(require("./app/UserRole"), exports);
36
36
  __exportStar(require("./bridges/BridgeUtils"), exports);
37
37
  __exportStar(require("./bridges/IBridgeHost"), exports);
38
38
  // business
39
+ __exportStar(require("./business/ApiService"), exports);
39
40
  __exportStar(require("./business/BusinessTax"), exports);
40
41
  __exportStar(require("./business/BusinessUtils"), exports);
41
42
  __exportStar(require("./business/Currency"), exports);
@@ -2,7 +2,7 @@ import { AddressContinent } from './AddressContinent';
2
2
  /**
3
3
  * Address or region
4
4
  */
5
- class AddressRegion {
5
+ export class AddressRegion {
6
6
  /**
7
7
  * Get country or region by id
8
8
  * @param id Country id
@@ -101,4 +101,3 @@ AddressRegion.all = [
101
101
  AddressRegion.DE,
102
102
  AddressRegion.FR
103
103
  ];
104
- export { AddressRegion };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * API service enum
3
+ */
4
+ export declare enum ApiService {
5
+ /**
6
+ * Amazon SES
7
+ */
8
+ AmazonSES = 1
9
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * API service enum
3
+ */
4
+ export var ApiService;
5
+ (function (ApiService) {
6
+ /**
7
+ * Amazon SES
8
+ */
9
+ ApiService[ApiService["AmazonSES"] = 1] = "AmazonSES";
10
+ })(ApiService || (ApiService = {}));
@@ -2,7 +2,7 @@
2
2
  * Business tax
3
3
  * https://imask.js.org/
4
4
  */
5
- class BusinessTax {
5
+ export class BusinessTax {
6
6
  /**
7
7
  * Get country or region by id
8
8
  * @param id Country id
@@ -55,4 +55,3 @@ BusinessTax.all = [
55
55
  BusinessTax.CA,
56
56
  BusinessTax.HK
57
57
  ];
58
- export { BusinessTax };
@@ -9,6 +9,7 @@ import { EntityApi } from './EntityApi';
9
9
  import { OrgListRQ } from './rq/OrgListRQ';
10
10
  import { OrgQueryRQ } from './rq/OrgQueryRQ';
11
11
  import { SendActionMessageRQ } from './rq/SendActionMessageRQ';
12
+ import { ApiService } from '../business/ApiService';
12
13
  /**
13
14
  * Organization API
14
15
  */
@@ -18,6 +19,13 @@ export declare class OrgApi extends EntityApi {
18
19
  * @param app Application
19
20
  */
20
21
  constructor(app: IApp);
22
+ /**
23
+ * Check API service's availability
24
+ * @param api API service id
25
+ * @param payload Payload
26
+ * @returns Result
27
+ */
28
+ checkApiService(api: ApiService, payload?: IApiPayload<boolean>): Promise<boolean | undefined>;
21
29
  /**
22
30
  * Get organization list
23
31
  * @param items Max items or request data
@@ -11,6 +11,16 @@ export class OrgApi extends EntityApi {
11
11
  constructor(app) {
12
12
  super('Organization', app);
13
13
  }
14
+ /**
15
+ * Check API service's availability
16
+ * @param api API service id
17
+ * @param payload Payload
18
+ * @returns Result
19
+ */
20
+ checkApiService(api, payload) {
21
+ payload !== null && payload !== void 0 ? payload : (payload = { showLoading: false });
22
+ return this.api.get(`${this.flag}/CheckApiService`, { api }, payload);
23
+ }
14
24
  list(items, serviceId) {
15
25
  if (typeof items === 'object') {
16
26
  if (typeof serviceId === 'number')
@@ -79,6 +79,7 @@
79
79
  "keywords": "Keywords",
80
80
  "loading": "Loading...",
81
81
  "login": "Login",
82
+ "logo": "Logo",
82
83
  "me": "ME",
83
84
  "menuHome": "Home",
84
85
  "message": "Message",
@@ -79,6 +79,7 @@
79
79
  "keywords": "关键词",
80
80
  "loading": "正在加载...",
81
81
  "login": "登录",
82
+ "logo": "标志",
82
83
  "me": "我",
83
84
  "menuHome": "首页",
84
85
  "message": "留言",
@@ -79,6 +79,7 @@
79
79
  "keywords": "關鍵詞",
80
80
  "loading": "正在加載...",
81
81
  "login": "登錄",
82
+ "logo": "標誌",
82
83
  "me": "我",
83
84
  "menuHome": "首頁",
84
85
  "message": "留言",
@@ -15,6 +15,7 @@ export * from './app/IApp';
15
15
  export * from './app/UserRole';
16
16
  export * from './bridges/BridgeUtils';
17
17
  export * from './bridges/IBridgeHost';
18
+ export * from './business/ApiService';
18
19
  export * from './business/BusinessTax';
19
20
  export * from './business/BusinessUtils';
20
21
  export * from './business/Currency';
package/lib/mjs/index.js CHANGED
@@ -19,6 +19,7 @@ export * from './app/UserRole';
19
19
  export * from './bridges/BridgeUtils';
20
20
  export * from './bridges/IBridgeHost';
21
21
  // business
22
+ export * from './business/ApiService';
22
23
  export * from './business/BusinessTax';
23
24
  export * from './business/BusinessUtils';
24
25
  export * from './business/Currency';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.4.14",
3
+ "version": "1.4.16",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -58,16 +58,16 @@
58
58
  "crypto-js": "^4.1.1"
59
59
  },
60
60
  "devDependencies": {
61
- "@babel/cli": "^7.21.5",
62
- "@babel/core": "^7.22.1",
63
- "@babel/plugin-transform-runtime": "^7.22.4",
64
- "@babel/preset-env": "^7.22.4",
65
- "@babel/runtime-corejs3": "^7.22.3",
66
- "@types/jest": "^29.5.1",
61
+ "@babel/cli": "^7.22.5",
62
+ "@babel/core": "^7.22.5",
63
+ "@babel/plugin-transform-runtime": "^7.22.5",
64
+ "@babel/preset-env": "^7.22.5",
65
+ "@babel/runtime-corejs3": "^7.22.5",
66
+ "@types/jest": "^29.5.2",
67
67
  "@types/crypto-js": "^4.1.1",
68
68
  "jest": "^29.5.0",
69
69
  "jest-environment-jsdom": "^29.5.0",
70
70
  "ts-jest": "^29.1.0",
71
- "typescript": "^5.0.4"
71
+ "typescript": "^5.1.3"
72
72
  }
73
73
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * API service enum
3
+ */
4
+ export enum ApiService {
5
+ /**
6
+ * Amazon SES
7
+ */
8
+ AmazonSES = 1
9
+ }
package/src/erp/OrgApi.ts CHANGED
@@ -9,6 +9,7 @@ import { EntityApi } from './EntityApi';
9
9
  import { OrgListRQ } from './rq/OrgListRQ';
10
10
  import { OrgQueryRQ } from './rq/OrgQueryRQ';
11
11
  import { SendActionMessageRQ } from './rq/SendActionMessageRQ';
12
+ import { ApiService } from '../business/ApiService';
12
13
 
13
14
  const cachedOrgs: { [P: number]: OrgViewDto | undefined | null } = {};
14
15
 
@@ -24,6 +25,17 @@ export class OrgApi extends EntityApi {
24
25
  super('Organization', app);
25
26
  }
26
27
 
28
+ /**
29
+ * Check API service's availability
30
+ * @param api API service id
31
+ * @param payload Payload
32
+ * @returns Result
33
+ */
34
+ checkApiService(api: ApiService, payload?: IApiPayload<boolean>) {
35
+ payload ??= { showLoading: false };
36
+ return this.api.get(`${this.flag}/CheckApiService`, { api }, payload);
37
+ }
38
+
27
39
  /**
28
40
  * Get organization list
29
41
  * @param items Max items or request data
package/src/i18n/en.json CHANGED
@@ -79,6 +79,7 @@
79
79
  "keywords": "Keywords",
80
80
  "loading": "Loading...",
81
81
  "login": "Login",
82
+ "logo": "Logo",
82
83
  "me": "ME",
83
84
  "menuHome": "Home",
84
85
  "message": "Message",
@@ -79,6 +79,7 @@
79
79
  "keywords": "关键词",
80
80
  "loading": "正在加载...",
81
81
  "login": "登录",
82
+ "logo": "标志",
82
83
  "me": "我",
83
84
  "menuHome": "首页",
84
85
  "message": "留言",
@@ -79,6 +79,7 @@
79
79
  "keywords": "關鍵詞",
80
80
  "loading": "正在加載...",
81
81
  "login": "登錄",
82
+ "logo": "標誌",
82
83
  "me": "我",
83
84
  "menuHome": "首頁",
84
85
  "message": "留言",
package/src/index.ts CHANGED
@@ -22,6 +22,7 @@ export * from './bridges/BridgeUtils';
22
22
  export * from './bridges/IBridgeHost';
23
23
 
24
24
  // business
25
+ export * from './business/ApiService';
25
26
  export * from './business/BusinessTax';
26
27
  export * from './business/BusinessUtils';
27
28
  export * from './business/Currency';