@etsoo/appscript 1.3.69 → 1.3.71

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 (56) hide show
  1. package/__tests__/app/CoreApp.ts +36 -1
  2. package/lib/cjs/address/AddressAutocomplete.d.ts +22 -0
  3. package/lib/cjs/address/AddressAutocomplete.js +2 -0
  4. package/lib/cjs/address/AddressCity.d.ts +17 -0
  5. package/lib/cjs/address/AddressCity.js +2 -0
  6. package/lib/cjs/address/AddressDistrict.d.ts +17 -0
  7. package/lib/cjs/address/AddressDistrict.js +2 -0
  8. package/lib/cjs/address/AddressLocation.d.ts +14 -0
  9. package/lib/cjs/address/AddressLocation.js +2 -0
  10. package/lib/cjs/address/AddressPlace.d.ts +28 -0
  11. package/lib/cjs/address/AddressPlace.js +2 -0
  12. package/lib/cjs/address/AddressPlaceBase.d.ts +37 -0
  13. package/lib/cjs/address/AddressPlaceBase.js +2 -0
  14. package/lib/cjs/erp/AddressApi.d.ts +49 -1
  15. package/lib/cjs/erp/AddressApi.js +71 -13
  16. package/lib/cjs/erp/rq/PlaceQueryRQ.d.ts +45 -0
  17. package/lib/cjs/erp/rq/PlaceQueryRQ.js +12 -0
  18. package/lib/cjs/i18n/en.json +3 -0
  19. package/lib/cjs/i18n/zh-Hans.json +3 -0
  20. package/lib/cjs/i18n/zh-Hant.json +3 -0
  21. package/lib/cjs/index.d.ts +7 -0
  22. package/lib/cjs/index.js +7 -0
  23. package/lib/mjs/address/AddressAutocomplete.d.ts +22 -0
  24. package/lib/mjs/address/AddressAutocomplete.js +1 -0
  25. package/lib/mjs/address/AddressCity.d.ts +17 -0
  26. package/lib/mjs/address/AddressCity.js +1 -0
  27. package/lib/mjs/address/AddressDistrict.d.ts +17 -0
  28. package/lib/mjs/address/AddressDistrict.js +1 -0
  29. package/lib/mjs/address/AddressLocation.d.ts +14 -0
  30. package/lib/mjs/address/AddressLocation.js +1 -0
  31. package/lib/mjs/address/AddressPlace.d.ts +28 -0
  32. package/lib/mjs/address/AddressPlace.js +1 -0
  33. package/lib/mjs/address/AddressPlaceBase.d.ts +37 -0
  34. package/lib/mjs/address/AddressPlaceBase.js +1 -0
  35. package/lib/mjs/erp/AddressApi.d.ts +49 -1
  36. package/lib/mjs/erp/AddressApi.js +72 -14
  37. package/lib/mjs/erp/rq/PlaceQueryRQ.d.ts +45 -0
  38. package/lib/mjs/erp/rq/PlaceQueryRQ.js +9 -0
  39. package/lib/mjs/i18n/en.json +3 -0
  40. package/lib/mjs/i18n/zh-Hans.json +3 -0
  41. package/lib/mjs/i18n/zh-Hant.json +3 -0
  42. package/lib/mjs/index.d.ts +7 -0
  43. package/lib/mjs/index.js +7 -0
  44. package/package.json +4 -4
  45. package/src/address/AddressAutocomplete.ts +25 -0
  46. package/src/address/AddressCity.ts +19 -0
  47. package/src/address/AddressDistrict.ts +19 -0
  48. package/src/address/AddressLocation.ts +15 -0
  49. package/src/address/AddressPlace.ts +32 -0
  50. package/src/address/AddressPlaceBase.ts +43 -0
  51. package/src/erp/AddressApi.ts +117 -13
  52. package/src/erp/rq/PlaceQueryRQ.ts +52 -0
  53. package/src/i18n/en.json +3 -0
  54. package/src/i18n/zh-Hans.json +3 -0
  55. package/src/i18n/zh-Hant.json +3 -0
  56. package/src/index.ts +7 -0
@@ -0,0 +1,28 @@
1
+ import { AddressLocation } from './AddressLocation';
2
+ import { AddressPlaceBase } from './AddressPlaceBase';
3
+ /**
4
+ * Address place
5
+ * 地点
6
+ */
7
+ export type AddressPlace = Omit<AddressPlaceBase, 'location'> & {
8
+ /**
9
+ * Place id
10
+ * 地点编号
11
+ */
12
+ placeId: string;
13
+ /**
14
+ * Name
15
+ * 名称
16
+ */
17
+ name: string;
18
+ /**
19
+ * Location
20
+ * 位置
21
+ */
22
+ location: AddressLocation;
23
+ /**
24
+ * Formatted address
25
+ * 格式化地址
26
+ */
27
+ formattedAddress: string;
28
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,37 @@
1
+ import { AddressLocation } from './AddressLocation';
2
+ /**
3
+ * Address place base
4
+ * 基础地点
5
+ */
6
+ export type AddressPlaceBase = {
7
+ /**
8
+ * Location
9
+ * 位置
10
+ */
11
+ location?: AddressLocation;
12
+ /**
13
+ * Region or country, like CN = China
14
+ * 地区或国家,比如 CN 表示中国
15
+ */
16
+ region?: string;
17
+ /**
18
+ * State or province
19
+ * 州 / 省
20
+ */
21
+ state?: string;
22
+ /**
23
+ * City
24
+ * 城市
25
+ */
26
+ city?: string;
27
+ /**
28
+ * District
29
+ * 区县
30
+ */
31
+ district?: string;
32
+ /**
33
+ * Postcode
34
+ * 邮编
35
+ */
36
+ postcode?: string;
37
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -5,10 +5,22 @@ import { IdLabelConditional } from './dto/IdLabelDto';
5
5
  import { BaseApi } from './BaseApi';
6
6
  import { IApiPayload } from '@etsoo/restclient';
7
7
  import { RegionsRQ } from './rq/RegionsRQ';
8
+ import { AddressCity } from '../address/AddressCity';
9
+ import { AddressDistrict } from '../address/AddressDistrict';
10
+ import { PlaceQueryRQ } from './rq/PlaceQueryRQ';
11
+ import { AddressAutocomplete } from '../address/AddressAutocomplete';
12
+ import { AddressPlace } from '../address/AddressPlace';
8
13
  /**
9
14
  * Address Api
10
15
  */
11
16
  export declare class AddressApi extends BaseApi {
17
+ /**
18
+ * Place autocomplete
19
+ * @param rq Request data
20
+ * @param payload Payload
21
+ * @returns Result
22
+ */
23
+ autocomplete(rq: PlaceQueryRQ, payload?: IApiPayload<AddressAutocomplete[]>): Promise<AddressAutocomplete[] | undefined>;
12
24
  /**
13
25
  * Get all continents
14
26
  * @param isNumberKey Is number key or key as id
@@ -63,8 +75,44 @@ export declare class AddressApi extends BaseApi {
63
75
  /**
64
76
  * Get state list
65
77
  * @param regionId Region id
78
+ * @param favoredIds Favored ids
79
+ * @param payload Payload
80
+ * @param culture Culture
81
+ * @returns Result
82
+ */
83
+ states(regionId: string, favoredIds?: string[], payload?: IApiPayload<AddressState[]>, culture?: string): Promise<AddressState[] | undefined>;
84
+ /**
85
+ * Get city list
86
+ * @param stateId State id
87
+ * @param favoredIds Favored ids
88
+ * @param payload Payload
89
+ * @param culture Culture
90
+ *
91
+ * @returns Result
92
+ */
93
+ cities(stateId: string, favoredIds?: number[], payload?: IApiPayload<AddressCity[]>, culture?: string): Promise<AddressCity[] | undefined>;
94
+ /**
95
+ * Get district list
96
+ * @param cityId City id
97
+ * @param favoredIds Favored ids
98
+ * @param payload Payload
99
+ * @param culture Culture
100
+ * @returns Result
101
+ */
102
+ districts(cityId: number, favoredIds?: number[], payload?: IApiPayload<AddressDistrict[]>, culture?: string): Promise<AddressDistrict[] | undefined>;
103
+ /**
104
+ * Get place details
105
+ * @param placeId Place id
106
+ * @param language Language
107
+ * @param payload Payload
108
+ * @returns Result
109
+ */
110
+ GetPlaceDetails(placeId: string, language?: string, payload?: IApiPayload<AddressPlace>): Promise<AddressPlace | undefined>;
111
+ /**
112
+ * Place autocomplete
113
+ * @param rq Request data
66
114
  * @param payload Payload
67
115
  * @returns Result
68
116
  */
69
- states(regionId: string, payload?: IApiPayload<AddressState[]>): Promise<AddressState[] | undefined>;
117
+ searchPlace(rq: PlaceQueryRQ, payload?: IApiPayload<AddressPlace[]>): Promise<AddressPlace[] | undefined>;
70
118
  }
@@ -1,4 +1,4 @@
1
- import { DataTypes } from '@etsoo/shared';
1
+ import { DataTypes, Utils } from '@etsoo/shared';
2
2
  import { AddressContinent } from '../address/AddressContinent';
3
3
  import { AddressRegion } from '../address/AddressRegion';
4
4
  import { BaseApi } from './BaseApi';
@@ -7,6 +7,15 @@ const cachedRegions = {};
7
7
  * Address Api
8
8
  */
9
9
  export class AddressApi extends BaseApi {
10
+ /**
11
+ * Place autocomplete
12
+ * @param rq Request data
13
+ * @param payload Payload
14
+ * @returns Result
15
+ */
16
+ autocomplete(rq, payload) {
17
+ return this.api.post('Address/Autocomplete', rq, payload);
18
+ }
10
19
  /**
11
20
  * Get all continents
12
21
  * @param isNumberKey Is number key or key as id
@@ -91,17 +100,7 @@ export class AddressApi extends BaseApi {
91
100
  });
92
101
  // Order by favoredIds
93
102
  if (favoredIds.length > 0) {
94
- regions = [...regions].sort((r1, r2) => {
95
- const n1 = favoredIds.indexOf(r1.id);
96
- const n2 = favoredIds.indexOf(r2.id);
97
- if (n1 === n2)
98
- return 0;
99
- if (n1 === -1)
100
- return 1;
101
- if (n2 === -1)
102
- return -1;
103
- return n1 - n2;
104
- });
103
+ regions = Utils.sortByFieldFavor([...regions], 'id', favoredIds);
105
104
  }
106
105
  // Return the top items
107
106
  return regions.slice(0, items);
@@ -140,11 +139,70 @@ export class AddressApi extends BaseApi {
140
139
  /**
141
140
  * Get state list
142
141
  * @param regionId Region id
142
+ * @param favoredIds Favored ids
143
+ * @param payload Payload
144
+ * @param culture Culture
145
+ * @returns Result
146
+ */
147
+ async states(regionId, favoredIds = [], payload, culture) {
148
+ payload !== null && payload !== void 0 ? payload : (payload = { defaultValue: [], showLoading: false });
149
+ culture !== null && culture !== void 0 ? culture : (culture = this.app.culture);
150
+ var items = await this.api.get(`Address/StateList?regionId=${regionId}&language=${culture}`, undefined, payload);
151
+ if (items == null || favoredIds.length === 0)
152
+ return items;
153
+ return Utils.sortByFieldFavor(items, 'id', favoredIds);
154
+ }
155
+ /**
156
+ * Get city list
157
+ * @param stateId State id
158
+ * @param favoredIds Favored ids
159
+ * @param payload Payload
160
+ * @param culture Culture
161
+ *
162
+ * @returns Result
163
+ */
164
+ async cities(stateId, favoredIds = [], payload, culture) {
165
+ payload !== null && payload !== void 0 ? payload : (payload = { defaultValue: [], showLoading: false });
166
+ culture !== null && culture !== void 0 ? culture : (culture = this.app.culture);
167
+ const items = await this.api.get(`Address/CityList?stateId=${stateId}&language=${culture}`, undefined, payload);
168
+ if (items == null || favoredIds.length === 0)
169
+ return items;
170
+ return Utils.sortByFieldFavor(items, 'id', favoredIds);
171
+ }
172
+ /**
173
+ * Get district list
174
+ * @param cityId City id
175
+ * @param favoredIds Favored ids
143
176
  * @param payload Payload
177
+ * @param culture Culture
144
178
  * @returns Result
145
179
  */
146
- states(regionId, payload) {
180
+ async districts(cityId, favoredIds = [], payload, culture) {
147
181
  payload !== null && payload !== void 0 ? payload : (payload = { defaultValue: [], showLoading: false });
148
- return this.api.get(`Address/StateList?regionId=${regionId}&language=${this.app.culture}`, undefined, payload);
182
+ culture !== null && culture !== void 0 ? culture : (culture = this.app.culture);
183
+ const items = await this.api.get(`Address/DistrictList?cityId=${cityId}&language=${culture}`, undefined, payload);
184
+ if (items == null || favoredIds.length === 0)
185
+ return items;
186
+ return Utils.sortByFieldFavor(items, 'id', favoredIds);
187
+ }
188
+ /**
189
+ * Get place details
190
+ * @param placeId Place id
191
+ * @param language Language
192
+ * @param payload Payload
193
+ * @returns Result
194
+ */
195
+ GetPlaceDetails(placeId, language, payload) {
196
+ const url = `Address/GetPlaceDetails/${placeId}/${language == null ? '' : language}`;
197
+ return this.api.get(url, undefined, payload);
198
+ }
199
+ /**
200
+ * Place autocomplete
201
+ * @param rq Request data
202
+ * @param payload Payload
203
+ * @returns Result
204
+ */
205
+ searchPlace(rq, payload) {
206
+ return this.api.post('Address/SearchPlace', rq, payload);
149
207
  }
150
208
  }
@@ -0,0 +1,45 @@
1
+ import { AddressLocation } from '../../address/AddressLocation';
2
+ /**
3
+ * Place query output type
4
+ * 地址查询输出类型
5
+ */
6
+ export declare enum PlaceQueryOutput {
7
+ JSON = 0,
8
+ XML = 1
9
+ }
10
+ /**
11
+ * Place query request data
12
+ * 地址查询请求数据
13
+ */
14
+ export type PlaceQueryRQ = {
15
+ /**
16
+ * Query address
17
+ * 查询地址
18
+ */
19
+ query: string;
20
+ /**
21
+ * Output type
22
+ * 输出类型
23
+ */
24
+ output?: PlaceQueryOutput;
25
+ /**
26
+ * Language
27
+ * 语言
28
+ */
29
+ language?: string;
30
+ /**
31
+ * Limited region / country id, like CN
32
+ * 限定的地区获国家编号
33
+ */
34
+ region?: string;
35
+ /**
36
+ * Center location
37
+ * 中心位置
38
+ */
39
+ location?: AddressLocation;
40
+ /**
41
+ * Circle radius
42
+ * 方圆半径
43
+ */
44
+ radius?: number;
45
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Place query output type
3
+ * 地址查询输出类型
4
+ */
5
+ export var PlaceQueryOutput;
6
+ (function (PlaceQueryOutput) {
7
+ PlaceQueryOutput[PlaceQueryOutput["JSON"] = 0] = "JSON";
8
+ PlaceQueryOutput[PlaceQueryOutput["XML"] = 1] = "XML";
9
+ })(PlaceQueryOutput || (PlaceQueryOutput = {}));
@@ -11,6 +11,7 @@
11
11
  "back": "Back",
12
12
  "cancel": "Cancel",
13
13
  "changePassword": "Change password",
14
+ "city": "City",
14
15
  "clear": "Clear",
15
16
  "close": "Close",
16
17
  "confirm": "Confirm",
@@ -50,6 +51,7 @@
50
51
  "delete": "Delete",
51
52
  "deleteConfirm": "Are you sure you want to permanently delete this {0}?",
52
53
  "description": "Description",
54
+ "district": "District/County",
53
55
  "done": "Done",
54
56
  "download": "Download",
55
57
  "dragIndicator": "Drag indicator",
@@ -162,6 +164,7 @@
162
164
  "signout": "Sign out",
163
165
  "smartERP": "SmartERP",
164
166
  "sortTip": "Drag and drop items to sort",
167
+ "state": "Province/State",
165
168
  "status": "Status",
166
169
  "statusApproved": "Approved",
167
170
  "statusArchived": "Archived",
@@ -11,6 +11,7 @@
11
11
  "back": "后退",
12
12
  "cancel": "取消",
13
13
  "changePassword": "修改密码",
14
+ "city": "城市",
14
15
  "clear": "清除",
15
16
  "close": "关闭",
16
17
  "confirm": "确认",
@@ -50,6 +51,7 @@
50
51
  "delete": "删除",
51
52
  "deleteConfirm": "确定要永久删除此{0}吗?",
52
53
  "description": "描述",
54
+ "district": "区/县",
53
55
  "done": "完成",
54
56
  "download": "下载",
55
57
  "dragIndicator": "拖动指示",
@@ -162,6 +164,7 @@
162
164
  "signout": "退出",
163
165
  "smartERP": "司友®云ERP",
164
166
  "sortTip": "拖拽项目进行排序",
167
+ "state": "省/州",
165
168
  "status": "状态",
166
169
  "statusApproved": "已批准",
167
170
  "statusArchived": "已归档",
@@ -11,6 +11,7 @@
11
11
  "back": "後退",
12
12
  "cancel": "取消",
13
13
  "changePassword": "修改密碼",
14
+ "city": "城市",
14
15
  "clear": "清除",
15
16
  "close": "關閉",
16
17
  "confirm": "確認",
@@ -50,6 +51,7 @@
50
51
  "delete": "刪除",
51
52
  "deleteConfirm": "確定要永久刪除此{0}嗎?",
52
53
  "description": "描述",
54
+ "district": "區/縣",
53
55
  "done": "完成",
54
56
  "download": "下載",
55
57
  "dragIndicator": "拖動指示",
@@ -162,6 +164,7 @@
162
164
  "signout": "退出",
163
165
  "smartERP": "司友®雲ERP",
164
166
  "sortTip": "拖拽項目進行排序",
167
+ "state": "省/州",
165
168
  "status": "狀態",
166
169
  "statusApproved": "已批准",
167
170
  "statusArchived": "已歸檔",
@@ -1,4 +1,10 @@
1
+ export * from './address/AddressAutocomplete';
2
+ export * from './address/AddressCity';
1
3
  export * from './address/AddressContinent';
4
+ export * from './address/AddressDistrict';
5
+ export * from './address/AddressLocation';
6
+ export * from './address/AddressPlace';
7
+ export * from './address/AddressPlaceBase';
2
8
  export * from './address/AddressRegion';
3
9
  export * from './address/AddressState';
4
10
  export * from './address/AddressUtils';
@@ -34,6 +40,7 @@ export * from './erp/rq/LoginRQ';
34
40
  export * from './erp/rq/MemberListRQ';
35
41
  export * from './erp/rq/OrgListRQ';
36
42
  export * from './erp/rq/OrgQueryRQ';
43
+ export * from './erp/rq/PlaceQueryRQ';
37
44
  export * from './erp/rq/QueryRQ';
38
45
  export * from './erp/rq/RefreshTokenRQ';
39
46
  export * from './erp/rq/RegionsRQ';
package/lib/mjs/index.js CHANGED
@@ -1,5 +1,11 @@
1
1
  // address
2
+ export * from './address/AddressAutocomplete';
3
+ export * from './address/AddressCity';
2
4
  export * from './address/AddressContinent';
5
+ export * from './address/AddressDistrict';
6
+ export * from './address/AddressLocation';
7
+ export * from './address/AddressPlace';
8
+ export * from './address/AddressPlaceBase';
3
9
  export * from './address/AddressRegion';
4
10
  export * from './address/AddressState';
5
11
  export * from './address/AddressUtils';
@@ -41,6 +47,7 @@ export * from './erp/rq/LoginRQ';
41
47
  export * from './erp/rq/MemberListRQ';
42
48
  export * from './erp/rq/OrgListRQ';
43
49
  export * from './erp/rq/OrgQueryRQ';
50
+ export * from './erp/rq/PlaceQueryRQ';
44
51
  export * from './erp/rq/QueryRQ';
45
52
  export * from './erp/rq/RefreshTokenRQ';
46
53
  export * from './erp/rq/RegionsRQ';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.3.69",
3
+ "version": "1.3.71",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -54,7 +54,7 @@
54
54
  "dependencies": {
55
55
  "@etsoo/notificationbase": "^1.1.24",
56
56
  "@etsoo/restclient": "^1.0.87",
57
- "@etsoo/shared": "^1.1.89",
57
+ "@etsoo/shared": "^1.1.90",
58
58
  "@types/crypto-js": "^4.1.1",
59
59
  "crypto-js": "^4.1.1"
60
60
  },
@@ -65,8 +65,8 @@
65
65
  "@babel/preset-env": "^7.20.2",
66
66
  "@babel/runtime-corejs3": "^7.21.0",
67
67
  "@types/jest": "^29.4.0",
68
- "jest": "^29.4.3",
69
- "jest-environment-jsdom": "^29.4.3",
68
+ "jest": "^29.5.0",
69
+ "jest-environment-jsdom": "^29.5.0",
70
70
  "ts-jest": "^29.0.5",
71
71
  "typescript": "^4.9.5"
72
72
  }
@@ -0,0 +1,25 @@
1
+ import { AddressPlaceBase } from './AddressPlaceBase';
2
+
3
+ /**
4
+ * Address autocomplete
5
+ * 地点自动填充
6
+ */
7
+ export type AddressAutocomplete = {
8
+ /**
9
+ * Place id
10
+ * 地点编号
11
+ */
12
+ placeId: string;
13
+
14
+ /**
15
+ * Name
16
+ * 名称
17
+ */
18
+ name: string;
19
+
20
+ /**
21
+ * Place data
22
+ * 地点数据
23
+ */
24
+ place?: AddressPlaceBase;
25
+ };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Address city
3
+ */
4
+ export type AddressCity = {
5
+ /**
6
+ * Id
7
+ */
8
+ id: number;
9
+
10
+ /**
11
+ * Number id
12
+ */
13
+ num?: string;
14
+
15
+ /**
16
+ * Name
17
+ */
18
+ label: string;
19
+ };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Address district
3
+ */
4
+ export type AddressDistrict = {
5
+ /**
6
+ * Id
7
+ */
8
+ id: number;
9
+
10
+ /**
11
+ * Number id
12
+ */
13
+ num?: string;
14
+
15
+ /**
16
+ * Name
17
+ */
18
+ label: string;
19
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Address location
3
+ * 地理位置
4
+ */
5
+ export type AddressLocation = {
6
+ /**
7
+ * Latitude, 纬度
8
+ */
9
+ lat: number;
10
+
11
+ /**
12
+ * Longitude, 经度
13
+ */
14
+ lng: number;
15
+ };
@@ -0,0 +1,32 @@
1
+ import { AddressLocation } from './AddressLocation';
2
+ import { AddressPlaceBase } from './AddressPlaceBase';
3
+
4
+ /**
5
+ * Address place
6
+ * 地点
7
+ */
8
+ export type AddressPlace = Omit<AddressPlaceBase, 'location'> & {
9
+ /**
10
+ * Place id
11
+ * 地点编号
12
+ */
13
+ placeId: string;
14
+
15
+ /**
16
+ * Name
17
+ * 名称
18
+ */
19
+ name: string;
20
+
21
+ /**
22
+ * Location
23
+ * 位置
24
+ */
25
+ location: AddressLocation;
26
+
27
+ /**
28
+ * Formatted address
29
+ * 格式化地址
30
+ */
31
+ formattedAddress: string;
32
+ };
@@ -0,0 +1,43 @@
1
+ import { AddressLocation } from './AddressLocation';
2
+
3
+ /**
4
+ * Address place base
5
+ * 基础地点
6
+ */
7
+ export type AddressPlaceBase = {
8
+ /**
9
+ * Location
10
+ * 位置
11
+ */
12
+ location?: AddressLocation;
13
+
14
+ /**
15
+ * Region or country, like CN = China
16
+ * 地区或国家,比如 CN 表示中国
17
+ */
18
+ region?: string;
19
+
20
+ /**
21
+ * State or province
22
+ * 州 / 省
23
+ */
24
+ state?: string;
25
+
26
+ /**
27
+ * City
28
+ * 城市
29
+ */
30
+ city?: string;
31
+
32
+ /**
33
+ * District
34
+ * 区县
35
+ */
36
+ district?: string;
37
+
38
+ /**
39
+ * Postcode
40
+ * 邮编
41
+ */
42
+ postcode?: string;
43
+ };