@etsoo/appscript 1.3.73 → 1.3.75
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/__tests__/app/CoreApp.ts +5 -0
- package/lib/cjs/erp/AddressApi.d.ts +9 -0
- package/lib/cjs/erp/AddressApi.js +9 -0
- package/lib/cjs/erp/PublicApi.d.ts +9 -0
- package/lib/cjs/erp/PublicApi.js +11 -1
- package/lib/cjs/erp/dto/PinDto.d.ts +61 -0
- package/lib/cjs/erp/dto/PinDto.js +2 -0
- package/lib/cjs/erp/dto/PlaceParsedDto.d.ts +50 -0
- package/lib/cjs/erp/dto/PlaceParsedDto.js +2 -0
- package/lib/cjs/erp/rq/ParsePinRQ.d.ts +14 -0
- package/lib/cjs/erp/rq/ParsePinRQ.js +2 -0
- package/lib/cjs/erp/rq/PlaceParseRQ.d.ts +25 -0
- package/lib/cjs/erp/rq/PlaceParseRQ.js +2 -0
- package/lib/cjs/index.d.ts +4 -0
- package/lib/cjs/index.js +4 -0
- package/lib/mjs/erp/AddressApi.d.ts +9 -0
- package/lib/mjs/erp/AddressApi.js +9 -0
- package/lib/mjs/erp/PublicApi.d.ts +9 -0
- package/lib/mjs/erp/PublicApi.js +11 -1
- package/lib/mjs/erp/dto/PinDto.d.ts +61 -0
- package/lib/mjs/erp/dto/PinDto.js +1 -0
- package/lib/mjs/erp/dto/PlaceParsedDto.d.ts +50 -0
- package/lib/mjs/erp/dto/PlaceParsedDto.js +1 -0
- package/lib/mjs/erp/rq/ParsePinRQ.d.ts +14 -0
- package/lib/mjs/erp/rq/ParsePinRQ.js +1 -0
- package/lib/mjs/erp/rq/PlaceParseRQ.d.ts +25 -0
- package/lib/mjs/erp/rq/PlaceParseRQ.js +1 -0
- package/lib/mjs/index.d.ts +4 -0
- package/lib/mjs/index.js +4 -0
- package/package.json +3 -3
- package/src/erp/AddressApi.ts +12 -0
- package/src/erp/PublicApi.ts +12 -1
- package/src/erp/dto/PinDto.ts +71 -0
- package/src/erp/dto/PlaceParsedDto.ts +58 -0
- package/src/erp/rq/ParsePinRQ.ts +15 -0
- package/src/erp/rq/PlaceParseRQ.ts +28 -0
- package/src/index.ts +4 -0
package/__tests__/app/CoreApp.ts
CHANGED
|
@@ -245,6 +245,11 @@ test('Tests for addressApi', async () => {
|
|
|
245
245
|
language: 'zh-CN'
|
|
246
246
|
});
|
|
247
247
|
|
|
248
|
+
const result = await app.addressApi.parsePlace({
|
|
249
|
+
city: '青岛',
|
|
250
|
+
district: '市南'
|
|
251
|
+
});
|
|
252
|
+
|
|
248
253
|
const result = await app.addressApi.GetPlaceDetails(
|
|
249
254
|
'ChIJczySyo1qljUR1Jnq4Uqak2I',
|
|
250
255
|
'zh-CN'
|
|
@@ -10,6 +10,8 @@ import { AddressDistrict } from '../address/AddressDistrict';
|
|
|
10
10
|
import { PlaceQueryRQ } from './rq/PlaceQueryRQ';
|
|
11
11
|
import { AddressAutocomplete } from '../address/AddressAutocomplete';
|
|
12
12
|
import { AddressPlace } from '../address/AddressPlace';
|
|
13
|
+
import { PlaceParseRQ } from './rq/PlaceParseRQ';
|
|
14
|
+
import { PlaceParsedDto } from './dto/PlaceParsedDto';
|
|
13
15
|
/**
|
|
14
16
|
* Address Api
|
|
15
17
|
*/
|
|
@@ -108,6 +110,13 @@ export declare class AddressApi extends BaseApi {
|
|
|
108
110
|
* @returns Result
|
|
109
111
|
*/
|
|
110
112
|
GetPlaceDetails(placeId: string, language?: string, payload?: IApiPayload<AddressPlace>): Promise<AddressPlace | undefined>;
|
|
113
|
+
/**
|
|
114
|
+
* Parse place
|
|
115
|
+
* @param rq Request data
|
|
116
|
+
* @param payload Payload
|
|
117
|
+
* @returns Result
|
|
118
|
+
*/
|
|
119
|
+
parsePlace(rq: PlaceParseRQ, payload?: IApiPayload<PlaceParsedDto>): Promise<PlaceParsedDto | undefined>;
|
|
111
120
|
/**
|
|
112
121
|
* Place autocomplete
|
|
113
122
|
* @param rq Request data
|
|
@@ -212,6 +212,15 @@ class AddressApi extends BaseApi_1.BaseApi {
|
|
|
212
212
|
const url = `Address/GetPlaceDetails/${placeId}/${language}`;
|
|
213
213
|
return this.api.get(url, undefined, payload);
|
|
214
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Parse place
|
|
217
|
+
* @param rq Request data
|
|
218
|
+
* @param payload Payload
|
|
219
|
+
* @returns Result
|
|
220
|
+
*/
|
|
221
|
+
parsePlace(rq, payload) {
|
|
222
|
+
return this.api.post('Address/ParsePlace', rq, payload);
|
|
223
|
+
}
|
|
215
224
|
/**
|
|
216
225
|
* Place autocomplete
|
|
217
226
|
* @param rq Request data
|
|
@@ -6,7 +6,9 @@ import { BaseApi } from './BaseApi';
|
|
|
6
6
|
import { CurrencyDto } from './dto/CurrencyDto';
|
|
7
7
|
import { ExchangeRateDto } from './dto/ExchangeRateDto';
|
|
8
8
|
import { ExchangeRateHistoryDto } from './dto/ExchangeRateHistoryDto';
|
|
9
|
+
import { PinDto } from './dto/PinDto';
|
|
9
10
|
import { PublicOrgProductDto, PublicProductDto } from './dto/PublicProductDto';
|
|
11
|
+
import { ParsePinRQ } from './rq/ParsePinRQ';
|
|
10
12
|
/**
|
|
11
13
|
* Public API
|
|
12
14
|
*/
|
|
@@ -83,6 +85,13 @@ export declare class PublicApi extends BaseApi {
|
|
|
83
85
|
* @param payload Payload
|
|
84
86
|
*/
|
|
85
87
|
mobileQRCode(id?: string, host?: string, payload?: IApiPayload<string>): Promise<string | undefined>;
|
|
88
|
+
/**
|
|
89
|
+
* Parse Pin data
|
|
90
|
+
* @param rq Request data
|
|
91
|
+
* @param payload Payload
|
|
92
|
+
* @returns Result
|
|
93
|
+
*/
|
|
94
|
+
parsePin(rq: ParsePinRQ, payload?: IApiPayload<PinDto>): Promise<PinDto | undefined>;
|
|
86
95
|
/**
|
|
87
96
|
* Get public and valid product data
|
|
88
97
|
* @param id Product/Service Id or Uid
|
package/lib/cjs/erp/PublicApi.js
CHANGED
|
@@ -162,7 +162,17 @@ class PublicApi extends BaseApi_1.BaseApi {
|
|
|
162
162
|
mobileQRCode(id, host, payload) {
|
|
163
163
|
return this.api.post('Public/MobileQRCode', { id, host }, payload);
|
|
164
164
|
}
|
|
165
|
-
|
|
165
|
+
/**
|
|
166
|
+
* Parse Pin data
|
|
167
|
+
* @param rq Request data
|
|
168
|
+
* @param payload Payload
|
|
169
|
+
* @returns Result
|
|
170
|
+
*/
|
|
171
|
+
parsePin(rq, payload) {
|
|
172
|
+
var _a;
|
|
173
|
+
(_a = rq.language) !== null && _a !== void 0 ? _a : (rq.language = this.app.culture);
|
|
174
|
+
return this.api.post('Public/ParsePin', rq, payload);
|
|
175
|
+
}
|
|
166
176
|
/**
|
|
167
177
|
* Get public and valid product data
|
|
168
178
|
* @param id Product/Service Id or Uid
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pin data
|
|
3
|
+
* 身份证信息
|
|
4
|
+
*/
|
|
5
|
+
export type PinDto = {
|
|
6
|
+
/**
|
|
7
|
+
* Region id
|
|
8
|
+
* 地区编号
|
|
9
|
+
*/
|
|
10
|
+
regionId?: string;
|
|
11
|
+
/**
|
|
12
|
+
* State or province
|
|
13
|
+
* 州 / 省
|
|
14
|
+
*/
|
|
15
|
+
state?: string;
|
|
16
|
+
/**
|
|
17
|
+
* State or province id
|
|
18
|
+
* 州 / 省编号
|
|
19
|
+
*/
|
|
20
|
+
stateId?: string;
|
|
21
|
+
/**
|
|
22
|
+
* City
|
|
23
|
+
* 城市
|
|
24
|
+
*/
|
|
25
|
+
city?: string;
|
|
26
|
+
/**
|
|
27
|
+
* City id
|
|
28
|
+
* 城市编号
|
|
29
|
+
*/
|
|
30
|
+
cityId?: number;
|
|
31
|
+
/**
|
|
32
|
+
* District
|
|
33
|
+
* 区县
|
|
34
|
+
*/
|
|
35
|
+
district?: string;
|
|
36
|
+
/**
|
|
37
|
+
* District id
|
|
38
|
+
* 区县编号
|
|
39
|
+
*/
|
|
40
|
+
districtId?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Merged previous district
|
|
43
|
+
* 合并的原区县
|
|
44
|
+
*/
|
|
45
|
+
mergedDistrict?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Gender
|
|
48
|
+
* 性别
|
|
49
|
+
*/
|
|
50
|
+
gender?: 'F' | 'M';
|
|
51
|
+
/**
|
|
52
|
+
* Birthday
|
|
53
|
+
* 生日
|
|
54
|
+
*/
|
|
55
|
+
birthday?: string | Date;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the form is legal
|
|
58
|
+
* 是否形式合法
|
|
59
|
+
*/
|
|
60
|
+
valid: boolean;
|
|
61
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parsed place data
|
|
3
|
+
*/
|
|
4
|
+
export type PlaceParsedDto = {
|
|
5
|
+
/**
|
|
6
|
+
* Language
|
|
7
|
+
* 语言
|
|
8
|
+
*/
|
|
9
|
+
language: string;
|
|
10
|
+
/**
|
|
11
|
+
* Region or country name, like China
|
|
12
|
+
* 地区或国家名称,如中国
|
|
13
|
+
*/
|
|
14
|
+
region?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Region id
|
|
17
|
+
* 地区编号
|
|
18
|
+
*/
|
|
19
|
+
regionId?: string;
|
|
20
|
+
/**
|
|
21
|
+
* State or province
|
|
22
|
+
* 州 / 省
|
|
23
|
+
*/
|
|
24
|
+
state?: string;
|
|
25
|
+
/**
|
|
26
|
+
* State or province id
|
|
27
|
+
* 州 / 省编号
|
|
28
|
+
*/
|
|
29
|
+
stateId?: string;
|
|
30
|
+
/**
|
|
31
|
+
* City
|
|
32
|
+
* 城市
|
|
33
|
+
*/
|
|
34
|
+
city?: string;
|
|
35
|
+
/**
|
|
36
|
+
* City id
|
|
37
|
+
* 城市编号
|
|
38
|
+
*/
|
|
39
|
+
cityId?: number;
|
|
40
|
+
/**
|
|
41
|
+
* District
|
|
42
|
+
* 区县
|
|
43
|
+
*/
|
|
44
|
+
district?: string;
|
|
45
|
+
/**
|
|
46
|
+
* District id
|
|
47
|
+
* 区县编号
|
|
48
|
+
*/
|
|
49
|
+
districtId?: number;
|
|
50
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse place request data
|
|
3
|
+
*/
|
|
4
|
+
export type PlaceParseRQ = {
|
|
5
|
+
/**
|
|
6
|
+
* Region or country name, like China
|
|
7
|
+
* 地区或国家名称,如中国
|
|
8
|
+
*/
|
|
9
|
+
region?: string;
|
|
10
|
+
/**
|
|
11
|
+
* State or province
|
|
12
|
+
* 州 / 省
|
|
13
|
+
*/
|
|
14
|
+
state?: string;
|
|
15
|
+
/**
|
|
16
|
+
* City
|
|
17
|
+
* 城市
|
|
18
|
+
*/
|
|
19
|
+
city?: string;
|
|
20
|
+
/**
|
|
21
|
+
* District
|
|
22
|
+
* 区县
|
|
23
|
+
*/
|
|
24
|
+
district?: string;
|
|
25
|
+
};
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -33,6 +33,8 @@ export * from './erp/dto/InitCallDto';
|
|
|
33
33
|
export * from './erp/dto/OrgDto';
|
|
34
34
|
export * from './erp/dto/OrgQueryDto';
|
|
35
35
|
export * from './erp/dto/OrgViewDto';
|
|
36
|
+
export * from './erp/dto/PinDto';
|
|
37
|
+
export * from './erp/dto/PlaceParsedDto';
|
|
36
38
|
export * from './erp/dto/PublicProductDto';
|
|
37
39
|
export * from './erp/dto/ResultPayload';
|
|
38
40
|
export * from './erp/rq/LoginIdRQ';
|
|
@@ -40,6 +42,8 @@ export * from './erp/rq/LoginRQ';
|
|
|
40
42
|
export * from './erp/rq/MemberListRQ';
|
|
41
43
|
export * from './erp/rq/OrgListRQ';
|
|
42
44
|
export * from './erp/rq/OrgQueryRQ';
|
|
45
|
+
export * from './erp/rq/ParsePinRQ';
|
|
46
|
+
export * from './erp/rq/PlaceParseRQ';
|
|
43
47
|
export * from './erp/rq/PlaceQueryRQ';
|
|
44
48
|
export * from './erp/rq/QueryRQ';
|
|
45
49
|
export * from './erp/rq/RefreshTokenRQ';
|
package/lib/cjs/index.js
CHANGED
|
@@ -56,6 +56,8 @@ __exportStar(require("./erp/dto/InitCallDto"), exports);
|
|
|
56
56
|
__exportStar(require("./erp/dto/OrgDto"), exports);
|
|
57
57
|
__exportStar(require("./erp/dto/OrgQueryDto"), exports);
|
|
58
58
|
__exportStar(require("./erp/dto/OrgViewDto"), exports);
|
|
59
|
+
__exportStar(require("./erp/dto/PinDto"), exports);
|
|
60
|
+
__exportStar(require("./erp/dto/PlaceParsedDto"), exports);
|
|
59
61
|
__exportStar(require("./erp/dto/PublicProductDto"), exports);
|
|
60
62
|
__exportStar(require("./erp/dto/ResultPayload"), exports);
|
|
61
63
|
// erp rq
|
|
@@ -64,6 +66,8 @@ __exportStar(require("./erp/rq/LoginRQ"), exports);
|
|
|
64
66
|
__exportStar(require("./erp/rq/MemberListRQ"), exports);
|
|
65
67
|
__exportStar(require("./erp/rq/OrgListRQ"), exports);
|
|
66
68
|
__exportStar(require("./erp/rq/OrgQueryRQ"), exports);
|
|
69
|
+
__exportStar(require("./erp/rq/ParsePinRQ"), exports);
|
|
70
|
+
__exportStar(require("./erp/rq/PlaceParseRQ"), exports);
|
|
67
71
|
__exportStar(require("./erp/rq/PlaceQueryRQ"), exports);
|
|
68
72
|
__exportStar(require("./erp/rq/QueryRQ"), exports);
|
|
69
73
|
__exportStar(require("./erp/rq/RefreshTokenRQ"), exports);
|
|
@@ -10,6 +10,8 @@ import { AddressDistrict } from '../address/AddressDistrict';
|
|
|
10
10
|
import { PlaceQueryRQ } from './rq/PlaceQueryRQ';
|
|
11
11
|
import { AddressAutocomplete } from '../address/AddressAutocomplete';
|
|
12
12
|
import { AddressPlace } from '../address/AddressPlace';
|
|
13
|
+
import { PlaceParseRQ } from './rq/PlaceParseRQ';
|
|
14
|
+
import { PlaceParsedDto } from './dto/PlaceParsedDto';
|
|
13
15
|
/**
|
|
14
16
|
* Address Api
|
|
15
17
|
*/
|
|
@@ -108,6 +110,13 @@ export declare class AddressApi extends BaseApi {
|
|
|
108
110
|
* @returns Result
|
|
109
111
|
*/
|
|
110
112
|
GetPlaceDetails(placeId: string, language?: string, payload?: IApiPayload<AddressPlace>): Promise<AddressPlace | undefined>;
|
|
113
|
+
/**
|
|
114
|
+
* Parse place
|
|
115
|
+
* @param rq Request data
|
|
116
|
+
* @param payload Payload
|
|
117
|
+
* @returns Result
|
|
118
|
+
*/
|
|
119
|
+
parsePlace(rq: PlaceParseRQ, payload?: IApiPayload<PlaceParsedDto>): Promise<PlaceParsedDto | undefined>;
|
|
111
120
|
/**
|
|
112
121
|
* Place autocomplete
|
|
113
122
|
* @param rq Request data
|
|
@@ -209,6 +209,15 @@ export class AddressApi extends BaseApi {
|
|
|
209
209
|
const url = `Address/GetPlaceDetails/${placeId}/${language}`;
|
|
210
210
|
return this.api.get(url, undefined, payload);
|
|
211
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* Parse place
|
|
214
|
+
* @param rq Request data
|
|
215
|
+
* @param payload Payload
|
|
216
|
+
* @returns Result
|
|
217
|
+
*/
|
|
218
|
+
parsePlace(rq, payload) {
|
|
219
|
+
return this.api.post('Address/ParsePlace', rq, payload);
|
|
220
|
+
}
|
|
212
221
|
/**
|
|
213
222
|
* Place autocomplete
|
|
214
223
|
* @param rq Request data
|
|
@@ -6,7 +6,9 @@ import { BaseApi } from './BaseApi';
|
|
|
6
6
|
import { CurrencyDto } from './dto/CurrencyDto';
|
|
7
7
|
import { ExchangeRateDto } from './dto/ExchangeRateDto';
|
|
8
8
|
import { ExchangeRateHistoryDto } from './dto/ExchangeRateHistoryDto';
|
|
9
|
+
import { PinDto } from './dto/PinDto';
|
|
9
10
|
import { PublicOrgProductDto, PublicProductDto } from './dto/PublicProductDto';
|
|
11
|
+
import { ParsePinRQ } from './rq/ParsePinRQ';
|
|
10
12
|
/**
|
|
11
13
|
* Public API
|
|
12
14
|
*/
|
|
@@ -83,6 +85,13 @@ export declare class PublicApi extends BaseApi {
|
|
|
83
85
|
* @param payload Payload
|
|
84
86
|
*/
|
|
85
87
|
mobileQRCode(id?: string, host?: string, payload?: IApiPayload<string>): Promise<string | undefined>;
|
|
88
|
+
/**
|
|
89
|
+
* Parse Pin data
|
|
90
|
+
* @param rq Request data
|
|
91
|
+
* @param payload Payload
|
|
92
|
+
* @returns Result
|
|
93
|
+
*/
|
|
94
|
+
parsePin(rq: ParsePinRQ, payload?: IApiPayload<PinDto>): Promise<PinDto | undefined>;
|
|
86
95
|
/**
|
|
87
96
|
* Get public and valid product data
|
|
88
97
|
* @param id Product/Service Id or Uid
|
package/lib/mjs/erp/PublicApi.js
CHANGED
|
@@ -159,7 +159,17 @@ export class PublicApi extends BaseApi {
|
|
|
159
159
|
mobileQRCode(id, host, payload) {
|
|
160
160
|
return this.api.post('Public/MobileQRCode', { id, host }, payload);
|
|
161
161
|
}
|
|
162
|
-
|
|
162
|
+
/**
|
|
163
|
+
* Parse Pin data
|
|
164
|
+
* @param rq Request data
|
|
165
|
+
* @param payload Payload
|
|
166
|
+
* @returns Result
|
|
167
|
+
*/
|
|
168
|
+
parsePin(rq, payload) {
|
|
169
|
+
var _a;
|
|
170
|
+
(_a = rq.language) !== null && _a !== void 0 ? _a : (rq.language = this.app.culture);
|
|
171
|
+
return this.api.post('Public/ParsePin', rq, payload);
|
|
172
|
+
}
|
|
163
173
|
/**
|
|
164
174
|
* Get public and valid product data
|
|
165
175
|
* @param id Product/Service Id or Uid
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pin data
|
|
3
|
+
* 身份证信息
|
|
4
|
+
*/
|
|
5
|
+
export type PinDto = {
|
|
6
|
+
/**
|
|
7
|
+
* Region id
|
|
8
|
+
* 地区编号
|
|
9
|
+
*/
|
|
10
|
+
regionId?: string;
|
|
11
|
+
/**
|
|
12
|
+
* State or province
|
|
13
|
+
* 州 / 省
|
|
14
|
+
*/
|
|
15
|
+
state?: string;
|
|
16
|
+
/**
|
|
17
|
+
* State or province id
|
|
18
|
+
* 州 / 省编号
|
|
19
|
+
*/
|
|
20
|
+
stateId?: string;
|
|
21
|
+
/**
|
|
22
|
+
* City
|
|
23
|
+
* 城市
|
|
24
|
+
*/
|
|
25
|
+
city?: string;
|
|
26
|
+
/**
|
|
27
|
+
* City id
|
|
28
|
+
* 城市编号
|
|
29
|
+
*/
|
|
30
|
+
cityId?: number;
|
|
31
|
+
/**
|
|
32
|
+
* District
|
|
33
|
+
* 区县
|
|
34
|
+
*/
|
|
35
|
+
district?: string;
|
|
36
|
+
/**
|
|
37
|
+
* District id
|
|
38
|
+
* 区县编号
|
|
39
|
+
*/
|
|
40
|
+
districtId?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Merged previous district
|
|
43
|
+
* 合并的原区县
|
|
44
|
+
*/
|
|
45
|
+
mergedDistrict?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Gender
|
|
48
|
+
* 性别
|
|
49
|
+
*/
|
|
50
|
+
gender?: 'F' | 'M';
|
|
51
|
+
/**
|
|
52
|
+
* Birthday
|
|
53
|
+
* 生日
|
|
54
|
+
*/
|
|
55
|
+
birthday?: string | Date;
|
|
56
|
+
/**
|
|
57
|
+
* Whether the form is legal
|
|
58
|
+
* 是否形式合法
|
|
59
|
+
*/
|
|
60
|
+
valid: boolean;
|
|
61
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parsed place data
|
|
3
|
+
*/
|
|
4
|
+
export type PlaceParsedDto = {
|
|
5
|
+
/**
|
|
6
|
+
* Language
|
|
7
|
+
* 语言
|
|
8
|
+
*/
|
|
9
|
+
language: string;
|
|
10
|
+
/**
|
|
11
|
+
* Region or country name, like China
|
|
12
|
+
* 地区或国家名称,如中国
|
|
13
|
+
*/
|
|
14
|
+
region?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Region id
|
|
17
|
+
* 地区编号
|
|
18
|
+
*/
|
|
19
|
+
regionId?: string;
|
|
20
|
+
/**
|
|
21
|
+
* State or province
|
|
22
|
+
* 州 / 省
|
|
23
|
+
*/
|
|
24
|
+
state?: string;
|
|
25
|
+
/**
|
|
26
|
+
* State or province id
|
|
27
|
+
* 州 / 省编号
|
|
28
|
+
*/
|
|
29
|
+
stateId?: string;
|
|
30
|
+
/**
|
|
31
|
+
* City
|
|
32
|
+
* 城市
|
|
33
|
+
*/
|
|
34
|
+
city?: string;
|
|
35
|
+
/**
|
|
36
|
+
* City id
|
|
37
|
+
* 城市编号
|
|
38
|
+
*/
|
|
39
|
+
cityId?: number;
|
|
40
|
+
/**
|
|
41
|
+
* District
|
|
42
|
+
* 区县
|
|
43
|
+
*/
|
|
44
|
+
district?: string;
|
|
45
|
+
/**
|
|
46
|
+
* District id
|
|
47
|
+
* 区县编号
|
|
48
|
+
*/
|
|
49
|
+
districtId?: number;
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse place request data
|
|
3
|
+
*/
|
|
4
|
+
export type PlaceParseRQ = {
|
|
5
|
+
/**
|
|
6
|
+
* Region or country name, like China
|
|
7
|
+
* 地区或国家名称,如中国
|
|
8
|
+
*/
|
|
9
|
+
region?: string;
|
|
10
|
+
/**
|
|
11
|
+
* State or province
|
|
12
|
+
* 州 / 省
|
|
13
|
+
*/
|
|
14
|
+
state?: string;
|
|
15
|
+
/**
|
|
16
|
+
* City
|
|
17
|
+
* 城市
|
|
18
|
+
*/
|
|
19
|
+
city?: string;
|
|
20
|
+
/**
|
|
21
|
+
* District
|
|
22
|
+
* 区县
|
|
23
|
+
*/
|
|
24
|
+
district?: string;
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/mjs/index.d.ts
CHANGED
|
@@ -33,6 +33,8 @@ export * from './erp/dto/InitCallDto';
|
|
|
33
33
|
export * from './erp/dto/OrgDto';
|
|
34
34
|
export * from './erp/dto/OrgQueryDto';
|
|
35
35
|
export * from './erp/dto/OrgViewDto';
|
|
36
|
+
export * from './erp/dto/PinDto';
|
|
37
|
+
export * from './erp/dto/PlaceParsedDto';
|
|
36
38
|
export * from './erp/dto/PublicProductDto';
|
|
37
39
|
export * from './erp/dto/ResultPayload';
|
|
38
40
|
export * from './erp/rq/LoginIdRQ';
|
|
@@ -40,6 +42,8 @@ export * from './erp/rq/LoginRQ';
|
|
|
40
42
|
export * from './erp/rq/MemberListRQ';
|
|
41
43
|
export * from './erp/rq/OrgListRQ';
|
|
42
44
|
export * from './erp/rq/OrgQueryRQ';
|
|
45
|
+
export * from './erp/rq/ParsePinRQ';
|
|
46
|
+
export * from './erp/rq/PlaceParseRQ';
|
|
43
47
|
export * from './erp/rq/PlaceQueryRQ';
|
|
44
48
|
export * from './erp/rq/QueryRQ';
|
|
45
49
|
export * from './erp/rq/RefreshTokenRQ';
|
package/lib/mjs/index.js
CHANGED
|
@@ -39,6 +39,8 @@ export * from './erp/dto/InitCallDto';
|
|
|
39
39
|
export * from './erp/dto/OrgDto';
|
|
40
40
|
export * from './erp/dto/OrgQueryDto';
|
|
41
41
|
export * from './erp/dto/OrgViewDto';
|
|
42
|
+
export * from './erp/dto/PinDto';
|
|
43
|
+
export * from './erp/dto/PlaceParsedDto';
|
|
42
44
|
export * from './erp/dto/PublicProductDto';
|
|
43
45
|
export * from './erp/dto/ResultPayload';
|
|
44
46
|
// erp rq
|
|
@@ -47,6 +49,8 @@ export * from './erp/rq/LoginRQ';
|
|
|
47
49
|
export * from './erp/rq/MemberListRQ';
|
|
48
50
|
export * from './erp/rq/OrgListRQ';
|
|
49
51
|
export * from './erp/rq/OrgQueryRQ';
|
|
52
|
+
export * from './erp/rq/ParsePinRQ';
|
|
53
|
+
export * from './erp/rq/PlaceParseRQ';
|
|
50
54
|
export * from './erp/rq/PlaceQueryRQ';
|
|
51
55
|
export * from './erp/rq/QueryRQ';
|
|
52
56
|
export * from './erp/rq/RefreshTokenRQ';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/appscript",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.75",
|
|
4
4
|
"description": "Applications shared TypeScript framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@babel/cli": "^7.21.0",
|
|
63
|
-
"@babel/core": "^7.21.
|
|
63
|
+
"@babel/core": "^7.21.3",
|
|
64
64
|
"@babel/plugin-transform-runtime": "^7.21.0",
|
|
65
65
|
"@babel/preset-env": "^7.20.2",
|
|
66
66
|
"@babel/runtime-corejs3": "^7.21.0",
|
|
67
|
-
"@types/jest": "^29.4.
|
|
67
|
+
"@types/jest": "^29.4.1",
|
|
68
68
|
"jest": "^29.5.0",
|
|
69
69
|
"jest-environment-jsdom": "^29.5.0",
|
|
70
70
|
"ts-jest": "^29.0.5",
|
package/src/erp/AddressApi.ts
CHANGED
|
@@ -11,6 +11,8 @@ import { AddressDistrict } from '../address/AddressDistrict';
|
|
|
11
11
|
import { PlaceQueryRQ } from './rq/PlaceQueryRQ';
|
|
12
12
|
import { AddressAutocomplete } from '../address/AddressAutocomplete';
|
|
13
13
|
import { AddressPlace } from '../address/AddressPlace';
|
|
14
|
+
import { PlaceParseRQ } from './rq/PlaceParseRQ';
|
|
15
|
+
import { PlaceParsedDto } from './dto/PlaceParsedDto';
|
|
14
16
|
|
|
15
17
|
const cachedRegions: { [P: string]: AddressRegionDb[] | undefined | null } = {};
|
|
16
18
|
|
|
@@ -284,6 +286,16 @@ export class AddressApi extends BaseApi {
|
|
|
284
286
|
return this.api.get(url, undefined, payload);
|
|
285
287
|
}
|
|
286
288
|
|
|
289
|
+
/**
|
|
290
|
+
* Parse place
|
|
291
|
+
* @param rq Request data
|
|
292
|
+
* @param payload Payload
|
|
293
|
+
* @returns Result
|
|
294
|
+
*/
|
|
295
|
+
parsePlace(rq: PlaceParseRQ, payload?: IApiPayload<PlaceParsedDto>) {
|
|
296
|
+
return this.api.post('Address/ParsePlace', rq, payload);
|
|
297
|
+
}
|
|
298
|
+
|
|
287
299
|
/**
|
|
288
300
|
* Place autocomplete
|
|
289
301
|
* @param rq Request data
|
package/src/erp/PublicApi.ts
CHANGED
|
@@ -7,7 +7,9 @@ import { BaseApi } from './BaseApi';
|
|
|
7
7
|
import { CurrencyDto } from './dto/CurrencyDto';
|
|
8
8
|
import { ExchangeRateDto } from './dto/ExchangeRateDto';
|
|
9
9
|
import { ExchangeRateHistoryDto } from './dto/ExchangeRateHistoryDto';
|
|
10
|
+
import { PinDto } from './dto/PinDto';
|
|
10
11
|
import { PublicOrgProductDto, PublicProductDto } from './dto/PublicProductDto';
|
|
12
|
+
import { ParsePinRQ } from './rq/ParsePinRQ';
|
|
11
13
|
|
|
12
14
|
const cachedCurrencyRates: {
|
|
13
15
|
[P: Currency | string]: ExchangeRateDto | undefined | null;
|
|
@@ -201,7 +203,16 @@ export class PublicApi extends BaseApi {
|
|
|
201
203
|
return this.api.post('Public/MobileQRCode', { id, host }, payload);
|
|
202
204
|
}
|
|
203
205
|
|
|
204
|
-
|
|
206
|
+
/**
|
|
207
|
+
* Parse Pin data
|
|
208
|
+
* @param rq Request data
|
|
209
|
+
* @param payload Payload
|
|
210
|
+
* @returns Result
|
|
211
|
+
*/
|
|
212
|
+
parsePin(rq: ParsePinRQ, payload?: IApiPayload<PinDto>) {
|
|
213
|
+
rq.language ??= this.app.culture;
|
|
214
|
+
return this.api.post('Public/ParsePin', rq, payload);
|
|
215
|
+
}
|
|
205
216
|
|
|
206
217
|
/**
|
|
207
218
|
* Get public and valid product data
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pin data
|
|
3
|
+
* 身份证信息
|
|
4
|
+
*/
|
|
5
|
+
export type PinDto = {
|
|
6
|
+
/**
|
|
7
|
+
* Region id
|
|
8
|
+
* 地区编号
|
|
9
|
+
*/
|
|
10
|
+
regionId?: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* State or province
|
|
14
|
+
* 州 / 省
|
|
15
|
+
*/
|
|
16
|
+
state?: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* State or province id
|
|
20
|
+
* 州 / 省编号
|
|
21
|
+
*/
|
|
22
|
+
stateId?: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* City
|
|
26
|
+
* 城市
|
|
27
|
+
*/
|
|
28
|
+
city?: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* City id
|
|
32
|
+
* 城市编号
|
|
33
|
+
*/
|
|
34
|
+
cityId?: number;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* District
|
|
38
|
+
* 区县
|
|
39
|
+
*/
|
|
40
|
+
district?: string;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* District id
|
|
44
|
+
* 区县编号
|
|
45
|
+
*/
|
|
46
|
+
districtId?: number;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Merged previous district
|
|
50
|
+
* 合并的原区县
|
|
51
|
+
*/
|
|
52
|
+
mergedDistrict?: string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Gender
|
|
56
|
+
* 性别
|
|
57
|
+
*/
|
|
58
|
+
gender?: 'F' | 'M';
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Birthday
|
|
62
|
+
* 生日
|
|
63
|
+
*/
|
|
64
|
+
birthday?: string | Date;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Whether the form is legal
|
|
68
|
+
* 是否形式合法
|
|
69
|
+
*/
|
|
70
|
+
valid: boolean;
|
|
71
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parsed place data
|
|
3
|
+
*/
|
|
4
|
+
export type PlaceParsedDto = {
|
|
5
|
+
/**
|
|
6
|
+
* Language
|
|
7
|
+
* 语言
|
|
8
|
+
*/
|
|
9
|
+
language: string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Region or country name, like China
|
|
13
|
+
* 地区或国家名称,如中国
|
|
14
|
+
*/
|
|
15
|
+
region?: string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Region id
|
|
19
|
+
* 地区编号
|
|
20
|
+
*/
|
|
21
|
+
regionId?: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* State or province
|
|
25
|
+
* 州 / 省
|
|
26
|
+
*/
|
|
27
|
+
state?: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* State or province id
|
|
31
|
+
* 州 / 省编号
|
|
32
|
+
*/
|
|
33
|
+
stateId?: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* City
|
|
37
|
+
* 城市
|
|
38
|
+
*/
|
|
39
|
+
city?: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* City id
|
|
43
|
+
* 城市编号
|
|
44
|
+
*/
|
|
45
|
+
cityId?: number;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* District
|
|
49
|
+
* 区县
|
|
50
|
+
*/
|
|
51
|
+
district?: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* District id
|
|
55
|
+
* 区县编号
|
|
56
|
+
*/
|
|
57
|
+
districtId?: number;
|
|
58
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse place request data
|
|
3
|
+
*/
|
|
4
|
+
export type PlaceParseRQ = {
|
|
5
|
+
/**
|
|
6
|
+
* Region or country name, like China
|
|
7
|
+
* 地区或国家名称,如中国
|
|
8
|
+
*/
|
|
9
|
+
region?: string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* State or province
|
|
13
|
+
* 州 / 省
|
|
14
|
+
*/
|
|
15
|
+
state?: string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* City
|
|
19
|
+
* 城市
|
|
20
|
+
*/
|
|
21
|
+
city?: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* District
|
|
25
|
+
* 区县
|
|
26
|
+
*/
|
|
27
|
+
district?: string;
|
|
28
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -44,6 +44,8 @@ export * from './erp/dto/InitCallDto';
|
|
|
44
44
|
export * from './erp/dto/OrgDto';
|
|
45
45
|
export * from './erp/dto/OrgQueryDto';
|
|
46
46
|
export * from './erp/dto/OrgViewDto';
|
|
47
|
+
export * from './erp/dto/PinDto';
|
|
48
|
+
export * from './erp/dto/PlaceParsedDto';
|
|
47
49
|
export * from './erp/dto/PublicProductDto';
|
|
48
50
|
export * from './erp/dto/ResultPayload';
|
|
49
51
|
|
|
@@ -53,6 +55,8 @@ export * from './erp/rq/LoginRQ';
|
|
|
53
55
|
export * from './erp/rq/MemberListRQ';
|
|
54
56
|
export * from './erp/rq/OrgListRQ';
|
|
55
57
|
export * from './erp/rq/OrgQueryRQ';
|
|
58
|
+
export * from './erp/rq/ParsePinRQ';
|
|
59
|
+
export * from './erp/rq/PlaceParseRQ';
|
|
56
60
|
export * from './erp/rq/PlaceQueryRQ';
|
|
57
61
|
export * from './erp/rq/QueryRQ';
|
|
58
62
|
export * from './erp/rq/RefreshTokenRQ';
|