@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.
- package/lib/cjs/address/AddressContinent.js +1 -1
- package/lib/cjs/address/AddressRegion.js +1 -1
- package/lib/cjs/address/AddressUtils.js +1 -1
- package/lib/cjs/app/ExternalSettings.js +1 -1
- package/lib/cjs/app/UserRole.js +1 -1
- package/lib/cjs/bridges/BridgeUtils.js +1 -1
- package/lib/cjs/bridges/IBridgeHost.js +1 -1
- package/lib/cjs/business/ApiService.d.ts +9 -0
- package/lib/cjs/business/ApiService.js +13 -0
- package/lib/cjs/business/BusinessTax.js +1 -1
- package/lib/cjs/business/BusinessUtils.js +1 -1
- package/lib/cjs/business/DataPrivacy.js +1 -1
- package/lib/cjs/business/EntityStatus.js +1 -1
- package/lib/cjs/business/ProductUnit.js +2 -2
- package/lib/cjs/business/RepeatOption.js +1 -1
- package/lib/cjs/erp/OrgApi.d.ts +8 -0
- package/lib/cjs/erp/OrgApi.js +10 -0
- package/lib/cjs/erp/rq/PlaceQueryRQ.js +2 -2
- package/lib/cjs/i18n/en.json +1 -0
- package/lib/cjs/i18n/zh-Hans.json +1 -0
- package/lib/cjs/i18n/zh-Hant.json +1 -0
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +1 -0
- package/lib/mjs/address/AddressRegion.js +1 -2
- package/lib/mjs/business/ApiService.d.ts +9 -0
- package/lib/mjs/business/ApiService.js +10 -0
- package/lib/mjs/business/BusinessTax.js +1 -2
- package/lib/mjs/erp/OrgApi.d.ts +8 -0
- package/lib/mjs/erp/OrgApi.js +10 -0
- package/lib/mjs/i18n/en.json +1 -0
- package/lib/mjs/i18n/zh-Hans.json +1 -0
- package/lib/mjs/i18n/zh-Hant.json +1 -0
- package/lib/mjs/index.d.ts +1 -0
- package/lib/mjs/index.js +1 -0
- package/package.json +8 -8
- package/src/business/ApiService.ts +9 -0
- package/src/erp/OrgApi.ts +12 -0
- package/src/i18n/en.json +1 -0
- package/src/i18n/zh-Hans.json +1 -0
- package/src/i18n/zh-Hant.json +1 -0
- 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
|
|
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;
|
package/lib/cjs/app/UserRole.js
CHANGED
|
@@ -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
|
|
11
|
+
})(BridgeHostName || (exports.BridgeHostName = BridgeHostName = {}));
|
|
@@ -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;
|
|
@@ -18,7 +18,7 @@ var ProductBaseUnit;
|
|
|
18
18
|
* 套
|
|
19
19
|
*/
|
|
20
20
|
ProductBaseUnit[ProductBaseUnit["SET"] = 2] = "SET";
|
|
21
|
-
})(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
|
|
61
|
+
})(ProductWeightUnit || (exports.ProductWeightUnit = ProductWeightUnit = {}));
|
|
62
62
|
/**
|
|
63
63
|
* Product units enum
|
|
64
64
|
* Repeat options take range 10 - 39
|
package/lib/cjs/erp/OrgApi.d.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
|
* 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
|
package/lib/cjs/erp/OrgApi.js
CHANGED
|
@@ -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
|
|
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
|
|
21
|
+
})(PlaceQueryProvider || (exports.PlaceQueryProvider = PlaceQueryProvider = {}));
|
package/lib/cjs/i18n/en.json
CHANGED
package/lib/cjs/index.d.ts
CHANGED
|
@@ -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 };
|
|
@@ -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 };
|
package/lib/mjs/erp/OrgApi.d.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
|
* 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
|
package/lib/mjs/erp/OrgApi.js
CHANGED
|
@@ -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')
|
package/lib/mjs/i18n/en.json
CHANGED
package/lib/mjs/index.d.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
62
|
-
"@babel/core": "^7.22.
|
|
63
|
-
"@babel/plugin-transform-runtime": "^7.22.
|
|
64
|
-
"@babel/preset-env": "^7.22.
|
|
65
|
-
"@babel/runtime-corejs3": "^7.22.
|
|
66
|
-
"@types/jest": "^29.5.
|
|
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.
|
|
71
|
+
"typescript": "^5.1.3"
|
|
72
72
|
}
|
|
73
73
|
}
|
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
package/src/i18n/zh-Hans.json
CHANGED
package/src/i18n/zh-Hant.json
CHANGED
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';
|