@etsoo/appscript 1.5.63 → 1.5.65

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 (196) hide show
  1. package/.github/workflows/main.yml +6 -5
  2. package/README.md +97 -71
  3. package/__tests__/app/CoreApp.ts +141 -143
  4. package/__tests__/app/Culture.ts +23 -23
  5. package/__tests__/app/TestApp.ts +107 -105
  6. package/__tests__/business/BusinessUtils.ts +37 -37
  7. package/__tests__/result/ActionResult.ts +14 -14
  8. package/__tests__/tsconfig.json +16 -16
  9. package/babel.config.json +8 -8
  10. package/lib/cjs/address/AddressAutocomplete.d.ts +1 -1
  11. package/lib/cjs/address/AddressPlace.d.ts +3 -3
  12. package/lib/cjs/address/AddressPlaceBase.d.ts +1 -1
  13. package/lib/cjs/address/AddressRegion.d.ts +2 -2
  14. package/lib/cjs/address/AddressRegion.js +12 -12
  15. package/lib/cjs/address/AddressUtils.d.ts +1 -1
  16. package/lib/cjs/api/AuthApi.d.ts +14 -14
  17. package/lib/cjs/api/AuthApi.js +17 -17
  18. package/lib/cjs/api/BaseApi.d.ts +1 -1
  19. package/lib/cjs/api/EntityApi.d.ts +8 -8
  20. package/lib/cjs/api/EntityApi.js +4 -4
  21. package/lib/cjs/api/dto/AuditLineDto.d.ts +24 -0
  22. package/lib/cjs/api/dto/AuditLineDto.js +2 -0
  23. package/lib/cjs/api/dto/IdLabelDto.d.ts +1 -1
  24. package/lib/cjs/api/dto/IdLabelPrimaryDto.d.ts +1 -1
  25. package/lib/cjs/api/dto/PinDto.d.ts +61 -0
  26. package/lib/cjs/api/dto/PinDto.js +2 -0
  27. package/lib/cjs/api/dto/ResultPayload.d.ts +2 -2
  28. package/lib/cjs/api/rq/AuthRequest.d.ts +1 -1
  29. package/lib/cjs/api/rq/LoginRQ.d.ts +2 -2
  30. package/lib/cjs/api/rq/MergeRQ.d.ts +1 -1
  31. package/lib/cjs/api/rq/QueryRQ.d.ts +2 -2
  32. package/lib/cjs/api/rq/StatusQueryRQ.d.ts +3 -3
  33. package/lib/cjs/api/rq/UpdateModel.d.ts +2 -2
  34. package/lib/cjs/api/rq/UpdateStatusRQ.d.ts +2 -2
  35. package/lib/cjs/app/AppSettings.d.ts +3 -3
  36. package/lib/cjs/bridges/FlutterHost.d.ts +2 -2
  37. package/lib/cjs/bridges/FlutterHost.js +11 -11
  38. package/lib/cjs/business/BusinessTax.js +6 -6
  39. package/lib/cjs/business/BusinessUtils.d.ts +2 -2
  40. package/lib/cjs/business/BusinessUtils.js +5 -5
  41. package/lib/cjs/business/Currency.d.ts +1 -1
  42. package/lib/cjs/business/Currency.js +10 -10
  43. package/lib/cjs/business/ProductUnit.d.ts +1 -1
  44. package/lib/cjs/business/ShoppingCart.d.ts +9 -9
  45. package/lib/cjs/business/ShoppingCart.js +11 -11
  46. package/lib/cjs/custom/CustomField.d.ts +1 -1
  47. package/lib/cjs/custom/CustomFieldData.d.ts +2 -2
  48. package/lib/cjs/i18n/Culture.d.ts +31 -0
  49. package/lib/cjs/i18n/Culture.js +51 -0
  50. package/lib/cjs/index.d.ts +3 -4
  51. package/lib/cjs/index.js +3 -4
  52. package/lib/cjs/result/ActionResult.d.ts +1 -1
  53. package/lib/cjs/result/ActionResultError.d.ts +1 -1
  54. package/lib/cjs/result/ActionResultError.js +3 -3
  55. package/lib/cjs/result/InitCallResult.d.ts +1 -1
  56. package/lib/cjs/state/Culture.d.ts +2 -2
  57. package/lib/cjs/state/User.d.ts +1 -1
  58. package/lib/mjs/address/AddressAutocomplete.d.ts +1 -1
  59. package/lib/mjs/address/AddressPlace.d.ts +3 -3
  60. package/lib/mjs/address/AddressPlaceBase.d.ts +1 -1
  61. package/lib/mjs/address/AddressRegion.d.ts +2 -2
  62. package/lib/mjs/address/AddressRegion.js +13 -13
  63. package/lib/mjs/address/AddressUtils.d.ts +1 -1
  64. package/lib/mjs/address/AddressUtils.js +1 -1
  65. package/lib/mjs/api/AuthApi.d.ts +14 -14
  66. package/lib/mjs/api/AuthApi.js +19 -19
  67. package/lib/mjs/api/BaseApi.d.ts +1 -1
  68. package/lib/mjs/api/EntityApi.d.ts +8 -8
  69. package/lib/mjs/api/EntityApi.js +5 -5
  70. package/lib/mjs/api/dto/AuditLineDto.d.ts +24 -0
  71. package/lib/mjs/api/dto/AuditLineDto.js +1 -0
  72. package/lib/mjs/api/dto/IdLabelDto.d.ts +1 -1
  73. package/lib/mjs/api/dto/IdLabelPrimaryDto.d.ts +1 -1
  74. package/lib/mjs/api/dto/PinDto.d.ts +61 -0
  75. package/lib/mjs/api/dto/PinDto.js +1 -0
  76. package/lib/mjs/api/dto/ResultPayload.d.ts +2 -2
  77. package/lib/mjs/api/rq/AuthRequest.d.ts +1 -1
  78. package/lib/mjs/api/rq/LoginRQ.d.ts +2 -2
  79. package/lib/mjs/api/rq/MergeRQ.d.ts +1 -1
  80. package/lib/mjs/api/rq/QueryRQ.d.ts +2 -2
  81. package/lib/mjs/api/rq/StatusQueryRQ.d.ts +3 -3
  82. package/lib/mjs/api/rq/UpdateModel.d.ts +2 -2
  83. package/lib/mjs/api/rq/UpdateStatusRQ.d.ts +2 -2
  84. package/lib/mjs/app/AppSettings.d.ts +3 -3
  85. package/lib/mjs/bridges/FlutterHost.d.ts +2 -2
  86. package/lib/mjs/bridges/FlutterHost.js +13 -13
  87. package/lib/mjs/business/BusinessTax.js +6 -6
  88. package/lib/mjs/business/BusinessUtils.d.ts +2 -2
  89. package/lib/mjs/business/BusinessUtils.js +5 -5
  90. package/lib/mjs/business/Currency.d.ts +1 -1
  91. package/lib/mjs/business/Currency.js +10 -10
  92. package/lib/mjs/business/ProductUnit.d.ts +1 -1
  93. package/lib/mjs/business/ProductUnit.js +1 -1
  94. package/lib/mjs/business/ShoppingCart.d.ts +9 -9
  95. package/lib/mjs/business/ShoppingCart.js +12 -12
  96. package/lib/mjs/custom/CustomField.d.ts +1 -1
  97. package/lib/mjs/custom/CustomFieldData.d.ts +2 -2
  98. package/lib/mjs/i18n/Culture.d.ts +31 -0
  99. package/lib/mjs/i18n/Culture.js +48 -0
  100. package/lib/mjs/index.d.ts +3 -4
  101. package/lib/mjs/index.js +3 -4
  102. package/lib/mjs/result/ActionResult.d.ts +1 -1
  103. package/lib/mjs/result/ActionResult.js +1 -1
  104. package/lib/mjs/result/ActionResultError.d.ts +1 -1
  105. package/lib/mjs/result/ActionResultError.js +3 -3
  106. package/lib/mjs/result/InitCallResult.d.ts +1 -1
  107. package/lib/mjs/state/Culture.d.ts +2 -2
  108. package/lib/mjs/state/User.d.ts +1 -1
  109. package/package.json +1 -1
  110. package/src/address/AddressAutocomplete.ts +16 -16
  111. package/src/address/AddressCity.ts +12 -12
  112. package/src/address/AddressContinent.ts +35 -35
  113. package/src/address/AddressDistrict.ts +12 -12
  114. package/src/address/AddressLocation.ts +8 -8
  115. package/src/address/AddressPlace.ts +23 -23
  116. package/src/address/AddressPlaceBase.ts +31 -31
  117. package/src/address/AddressRegion.ts +286 -286
  118. package/src/address/AddressState.ts +12 -12
  119. package/src/address/AddressUtils.ts +27 -27
  120. package/src/api/AuthApi.ts +194 -194
  121. package/src/api/BaseApi.ts +13 -13
  122. package/src/api/EntityApi.ts +181 -194
  123. package/src/api/dto/AntiforgeryRequestToken.ts +15 -15
  124. package/src/api/dto/ApiRefreshTokenDto.ts +16 -16
  125. package/src/api/dto/AuditLineDto.ts +27 -0
  126. package/src/api/dto/IdLabelDto.ts +3 -3
  127. package/src/api/dto/IdLabelPrimaryDto.ts +7 -7
  128. package/src/api/dto/InitCallDto.ts +12 -12
  129. package/src/api/dto/PinDto.ts +71 -0
  130. package/src/api/dto/ResultPayload.ts +6 -6
  131. package/src/api/rq/ApiRefreshTokenRQ.ts +8 -8
  132. package/src/api/rq/AuthRequest.ts +40 -40
  133. package/src/api/rq/GetLogInUrlRQ.ts +8 -8
  134. package/src/api/rq/LoginIdRQ.ts +12 -12
  135. package/src/api/rq/LoginRQ.ts +18 -18
  136. package/src/api/rq/MergeRQ.ts +13 -13
  137. package/src/api/rq/QueryPagingData.ts +16 -16
  138. package/src/api/rq/QueryRQ.ts +22 -22
  139. package/src/api/rq/RefreshTokenRQ.ts +4 -4
  140. package/src/api/rq/ResetPasswordRQ.ts +20 -20
  141. package/src/api/rq/SignoutRQ.ts +8 -8
  142. package/src/api/rq/StatusQueryRQ.ts +11 -11
  143. package/src/api/rq/SwitchOrgRQ.ts +8 -8
  144. package/src/api/rq/TokenRQ.ts +4 -4
  145. package/src/api/rq/UpdateModel.ts +12 -12
  146. package/src/api/rq/UpdateStatusRQ.ts +10 -10
  147. package/src/app/AppSettings.ts +27 -27
  148. package/src/app/UserRole.ts +44 -44
  149. package/src/bridges/FlutterHost.ts +92 -97
  150. package/src/bridges/IBridgeHost.ts +49 -51
  151. package/src/business/ApiService.ts +25 -25
  152. package/src/business/BusinessTax.ts +63 -63
  153. package/src/business/BusinessUtils.ts +75 -75
  154. package/src/business/CultureItem.ts +43 -43
  155. package/src/business/Currency.ts +11 -11
  156. package/src/business/DataPrivacy.ts +35 -35
  157. package/src/business/EntityStatus.ts +44 -44
  158. package/src/business/ProductUnit.ts +58 -58
  159. package/src/business/RepeatOption.ts +50 -50
  160. package/src/business/ShoppingCart.ts +696 -706
  161. package/src/custom/CustomField.ts +20 -20
  162. package/src/custom/CustomFieldData.ts +43 -43
  163. package/src/def/ListItem.ts +12 -12
  164. package/src/i18n/Culture.ts +60 -0
  165. package/src/i18n/en.json +244 -244
  166. package/src/i18n/zh-Hans.json +244 -244
  167. package/src/i18n/zh-Hant.json +244 -244
  168. package/src/index.ts +3 -4
  169. package/src/result/ActionResult.ts +19 -19
  170. package/src/result/ActionResultError.ts +30 -30
  171. package/src/result/InitCallResult.ts +21 -21
  172. package/src/state/Culture.ts +3 -3
  173. package/src/state/State.ts +5 -5
  174. package/src/state/User.ts +92 -92
  175. package/tsconfig.cjs.json +17 -17
  176. package/tsconfig.json +17 -17
  177. package/lib/cjs/i18n/CultureUtils.d.ts +0 -13
  178. package/lib/cjs/i18n/CultureUtils.js +0 -32
  179. package/lib/cjs/i18n/en.d.ts +0 -6
  180. package/lib/cjs/i18n/en.js +0 -12
  181. package/lib/cjs/i18n/zhHans.d.ts +0 -6
  182. package/lib/cjs/i18n/zhHans.js +0 -12
  183. package/lib/cjs/i18n/zhHant.d.ts +0 -6
  184. package/lib/cjs/i18n/zhHant.js +0 -12
  185. package/lib/mjs/i18n/CultureUtils.d.ts +0 -13
  186. package/lib/mjs/i18n/CultureUtils.js +0 -29
  187. package/lib/mjs/i18n/en.d.ts +0 -6
  188. package/lib/mjs/i18n/en.js +0 -8
  189. package/lib/mjs/i18n/zhHans.d.ts +0 -6
  190. package/lib/mjs/i18n/zhHans.js +0 -8
  191. package/lib/mjs/i18n/zhHant.d.ts +0 -6
  192. package/lib/mjs/i18n/zhHant.js +0 -8
  193. package/src/i18n/CultureUtils.ts +0 -36
  194. package/src/i18n/en.ts +0 -10
  195. package/src/i18n/zhHans.ts +0 -10
  196. package/src/i18n/zhHant.ts +0 -10
@@ -0,0 +1,31 @@
1
+ import { DataTypes, DomUtils } from "@etsoo/shared";
2
+ /**
3
+ * Culture namespace
4
+ */
5
+ export declare namespace Culture {
6
+ /**
7
+ * Make culture
8
+ * @param cultureMaker Culture maker
9
+ * @param resources Resources
10
+ * @returns Culture
11
+ */
12
+ function make(cultureMaker: typeof DomUtils.zhHans, ...resources: (object | (() => Promise<object>))[]): DataTypes.CultureDefinition<DataTypes.StringRecord>;
13
+ /**
14
+ * Get en neutral culture
15
+ * @param localResources Local resources
16
+ * @returns Full culture
17
+ */
18
+ const en: (...resources: (object | (() => Promise<object>))[]) => DataTypes.CultureDefinition<DataTypes.StringRecord>;
19
+ /**
20
+ * Get zh-Hans neutral cultrue
21
+ * @param localResources Local resources
22
+ * @returns Full culture
23
+ */
24
+ const zhHans: (...resources: (object | (() => Promise<object>))[]) => DataTypes.CultureDefinition<DataTypes.StringRecord>;
25
+ /**
26
+ * Get zh-Hant neutral cultrue
27
+ * @param localResources Local resources
28
+ * @returns Full culture
29
+ */
30
+ const zhHant: (...resources: (object | (() => Promise<object>))[]) => DataTypes.CultureDefinition<DataTypes.StringRecord>;
31
+ }
@@ -0,0 +1,48 @@
1
+ import { DomUtils } from "@etsoo/shared";
2
+ /**
3
+ * Culture namespace
4
+ */
5
+ export var Culture;
6
+ (function (Culture) {
7
+ /**
8
+ * Make culture
9
+ * @param cultureMaker Culture maker
10
+ * @param resources Resources
11
+ * @returns Culture
12
+ */
13
+ function make(cultureMaker, ...resources) {
14
+ return cultureMaker(async () => {
15
+ const rs = await Promise.all(resources.map((resource) => new Promise((resolve) => {
16
+ if (typeof resource === "object") {
17
+ resolve(resource);
18
+ }
19
+ else {
20
+ resource().then((result) => resolve(result));
21
+ }
22
+ })));
23
+ return rs.reduce((prev, curr) => ({
24
+ ...prev,
25
+ ...curr
26
+ }));
27
+ });
28
+ }
29
+ Culture.make = make;
30
+ /**
31
+ * Get en neutral culture
32
+ * @param localResources Local resources
33
+ * @returns Full culture
34
+ */
35
+ Culture.en = (...resources) => make(DomUtils.en, import("./en.json"), ...resources);
36
+ /**
37
+ * Get zh-Hans neutral cultrue
38
+ * @param localResources Local resources
39
+ * @returns Full culture
40
+ */
41
+ Culture.zhHans = (...resources) => make(DomUtils.zhHans, import("./zh-Hans.json"), ...resources);
42
+ /**
43
+ * Get zh-Hant neutral cultrue
44
+ * @param localResources Local resources
45
+ * @returns Full culture
46
+ */
47
+ Culture.zhHant = (...resources) => make(DomUtils.zhHant, import("./zh-Hant.json"), ...resources);
48
+ })(Culture || (Culture = {}));
@@ -10,9 +10,11 @@ export * from "./address/AddressState";
10
10
  export * from "./address/AddressUtils";
11
11
  export * from "./api/dto/AntiforgeryRequestToken";
12
12
  export * from "./api/dto/ApiRefreshTokenDto";
13
+ export * from "./api/dto/AuditLineDto";
13
14
  export * from "./api/dto/IdLabelDto";
14
15
  export * from "./api/dto/IdLabelPrimaryDto";
15
16
  export * from "./api/dto/InitCallDto";
17
+ export * from "./api/dto/PinDto";
16
18
  export * from "./api/dto/ResultPayload";
17
19
  export * from "./api/rq/ApiRefreshTokenRQ";
18
20
  export * from "./api/rq/AuthRequest";
@@ -53,10 +55,7 @@ export * from "./business/ShoppingCart";
53
55
  export * from "./custom/CustomField";
54
56
  export * from "./custom/CustomFieldData";
55
57
  export * from "./def/ListItem";
56
- export * from "./i18n/CultureUtils";
57
- export * from "./i18n/en";
58
- export * from "./i18n/zhHans";
59
- export * from "./i18n/zhHant";
58
+ export * from "./i18n/Culture";
60
59
  export { ApiAuthorizationScheme, ApiDataError, ApiMethod, ApiResponseType, createClient, createClientAsync } from "@etsoo/restclient";
61
60
  export type { IApi, IApiPayload } from "@etsoo/restclient";
62
61
  export * from "./result/ActionResult";
package/lib/mjs/index.js CHANGED
@@ -12,9 +12,11 @@ export * from "./address/AddressUtils";
12
12
  // api
13
13
  export * from "./api/dto/AntiforgeryRequestToken";
14
14
  export * from "./api/dto/ApiRefreshTokenDto";
15
+ export * from "./api/dto/AuditLineDto";
15
16
  export * from "./api/dto/IdLabelDto";
16
17
  export * from "./api/dto/IdLabelPrimaryDto";
17
18
  export * from "./api/dto/InitCallDto";
19
+ export * from "./api/dto/PinDto";
18
20
  export * from "./api/dto/ResultPayload";
19
21
  export * from "./api/rq/ApiRefreshTokenRQ";
20
22
  export * from "./api/rq/AuthRequest";
@@ -61,10 +63,7 @@ export * from "./custom/CustomFieldData";
61
63
  // def
62
64
  export * from "./def/ListItem";
63
65
  // i18n
64
- export * from "./i18n/CultureUtils";
65
- export * from "./i18n/en";
66
- export * from "./i18n/zhHans";
67
- export * from "./i18n/zhHant";
66
+ export * from "./i18n/Culture";
68
67
  // @etsoo/restclient
69
68
  export { ApiAuthorizationScheme, ApiDataError, ApiMethod, ApiResponseType, createClient, createClientAsync } from "@etsoo/restclient";
70
69
  // result
@@ -1,4 +1,4 @@
1
- import { IActionResult } from '@etsoo/shared';
1
+ import { IActionResult } from "@etsoo/shared";
2
2
  /**
3
3
  * Action result
4
4
  */
@@ -1,4 +1,4 @@
1
- import { ApiError } from '@etsoo/restclient';
1
+ import { ApiError } from "@etsoo/restclient";
2
2
  /**
3
3
  * Action result
4
4
  */
@@ -1,4 +1,4 @@
1
- import { IActionResult } from '@etsoo/shared';
1
+ import { IActionResult } from "@etsoo/shared";
2
2
  /**
3
3
  * Action result error
4
4
  */
@@ -15,8 +15,8 @@ export class ActionResultError extends Error {
15
15
  addtions.push(result.type);
16
16
  if (result.field)
17
17
  addtions.push(result.field);
18
- const add = addtions.length > 0 ? ` (${addtions.join(', ')})` : '';
19
- return `${result.title || 'Error'}${add}`;
18
+ const add = addtions.length > 0 ? ` (${addtions.join(", ")})` : "";
19
+ return `${result.title || "Error"}${add}`;
20
20
  }
21
21
  /**
22
22
  * Constructor
@@ -26,7 +26,7 @@ export class ActionResultError extends Error {
26
26
  // Super
27
27
  super(ActionResultError.format(result));
28
28
  // Name
29
- this.name = 'ActionResultError';
29
+ this.name = "ActionResultError";
30
30
  // Hold the result
31
31
  this.result = result;
32
32
  }
@@ -1,4 +1,4 @@
1
- import { IActionResult } from '@etsoo/shared';
1
+ import { IActionResult } from "@etsoo/shared";
2
2
  /**
3
3
  * Init call result data
4
4
  */
@@ -1,5 +1,5 @@
1
- import { DataTypes } from '@etsoo/shared';
2
- import { IState } from './State';
1
+ import { DataTypes } from "@etsoo/shared";
2
+ import { IState } from "./State";
3
3
  /**
4
4
  * Culture resources state, simple i18n solution
5
5
  * For premium solution: https://www.i18next.com/
@@ -1,4 +1,4 @@
1
- import { IState } from './State';
1
+ import { IState } from "./State";
2
2
  /**
3
3
  * User data interface
4
4
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.5.63",
3
+ "version": "1.5.65",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -1,25 +1,25 @@
1
- import { AddressPlaceBase } from './AddressPlaceBase';
1
+ import { AddressPlaceBase } from "./AddressPlaceBase";
2
2
 
3
3
  /**
4
4
  * Address autocomplete
5
5
  * 地点自动填充
6
6
  */
7
7
  export type AddressAutocomplete = {
8
- /**
9
- * Place id
10
- * 地点编号
11
- */
12
- placeId: string;
8
+ /**
9
+ * Place id
10
+ * 地点编号
11
+ */
12
+ placeId: string;
13
13
 
14
- /**
15
- * Name
16
- * 名称
17
- */
18
- name: string;
14
+ /**
15
+ * Name
16
+ * 名称
17
+ */
18
+ name: string;
19
19
 
20
- /**
21
- * Place data
22
- * 地点数据
23
- */
24
- place?: AddressPlaceBase;
20
+ /**
21
+ * Place data
22
+ * 地点数据
23
+ */
24
+ place?: AddressPlaceBase;
25
25
  };
@@ -2,18 +2,18 @@
2
2
  * Address city
3
3
  */
4
4
  export type AddressCity = {
5
- /**
6
- * Id
7
- */
8
- id: number;
5
+ /**
6
+ * Id
7
+ */
8
+ id: number;
9
9
 
10
- /**
11
- * Number id
12
- */
13
- num?: string;
10
+ /**
11
+ * Number id
12
+ */
13
+ num?: string;
14
14
 
15
- /**
16
- * Name
17
- */
18
- label: string;
15
+ /**
16
+ * Name
17
+ */
18
+ label: string;
19
19
  };
@@ -2,47 +2,47 @@
2
2
  * Address continent
3
3
  */
4
4
  export enum AddressContinent {
5
- /// <summary>
6
- /// Africa
7
- /// 非洲
8
- /// </summary>
9
- AF = 1,
5
+ /// <summary>
6
+ /// Africa
7
+ /// 非洲
8
+ /// </summary>
9
+ AF = 1,
10
10
 
11
- /// <summary>
12
- /// Antarctica
13
- /// 南极洲
14
- /// </summary>
15
- AN = 2,
11
+ /// <summary>
12
+ /// Antarctica
13
+ /// 南极洲
14
+ /// </summary>
15
+ AN = 2,
16
16
 
17
- /// <summary>
18
- /// Asia
19
- /// 亚洲
20
- /// </summary>
21
- AS = 3,
17
+ /// <summary>
18
+ /// Asia
19
+ /// 亚洲
20
+ /// </summary>
21
+ AS = 3,
22
22
 
23
- /// <summary>
24
- /// Europe
25
- /// 欧洲
26
- /// </summary>
27
- EU = 4,
23
+ /// <summary>
24
+ /// Europe
25
+ /// 欧洲
26
+ /// </summary>
27
+ EU = 4,
28
28
 
29
- /// <summary>
30
- /// North America
31
- /// 北美洲
32
- /// </summary>
33
- NA = 5,
29
+ /// <summary>
30
+ /// North America
31
+ /// 北美洲
32
+ /// </summary>
33
+ NA = 5,
34
34
 
35
- /// <summary>
36
- /// Oceania
37
- /// 大洋洲
38
- /// </summary>
39
- OC = 6,
35
+ /// <summary>
36
+ /// Oceania
37
+ /// 大洋洲
38
+ /// </summary>
39
+ OC = 6,
40
40
 
41
- /// <summary>
42
- /// South America
43
- /// 南美洲
44
- /// </summary>
45
- SA = 7
41
+ /// <summary>
42
+ /// South America
43
+ /// 南美洲
44
+ /// </summary>
45
+ SA = 7
46
46
  }
47
47
 
48
48
  /**
@@ -2,18 +2,18 @@
2
2
  * Address district
3
3
  */
4
4
  export type AddressDistrict = {
5
- /**
6
- * Id
7
- */
8
- id: number;
5
+ /**
6
+ * Id
7
+ */
8
+ id: number;
9
9
 
10
- /**
11
- * Number id
12
- */
13
- num?: string;
10
+ /**
11
+ * Number id
12
+ */
13
+ num?: string;
14
14
 
15
- /**
16
- * Name
17
- */
18
- label: string;
15
+ /**
16
+ * Name
17
+ */
18
+ label: string;
19
19
  };
@@ -3,13 +3,13 @@
3
3
  * 地理位置
4
4
  */
5
5
  export type AddressLocation = {
6
- /**
7
- * Latitude, 纬度
8
- */
9
- lat: number;
6
+ /**
7
+ * Latitude, 纬度
8
+ */
9
+ lat: number;
10
10
 
11
- /**
12
- * Longitude, 经度
13
- */
14
- lng: number;
11
+ /**
12
+ * Longitude, 经度
13
+ */
14
+ lng: number;
15
15
  };
@@ -1,32 +1,32 @@
1
- import { AddressLocation } from './AddressLocation';
2
- import { AddressPlaceBase } from './AddressPlaceBase';
1
+ import { AddressLocation } from "./AddressLocation";
2
+ import { AddressPlaceBase } from "./AddressPlaceBase";
3
3
 
4
4
  /**
5
5
  * Address place
6
6
  * 地点
7
7
  */
8
- export type AddressPlace = Omit<AddressPlaceBase, 'location'> & {
9
- /**
10
- * Place id
11
- * 地点编号
12
- */
13
- placeId: string;
8
+ export type AddressPlace = Omit<AddressPlaceBase, "location"> & {
9
+ /**
10
+ * Place id
11
+ * 地点编号
12
+ */
13
+ placeId: string;
14
14
 
15
- /**
16
- * Name
17
- * 名称
18
- */
19
- name: string;
15
+ /**
16
+ * Name
17
+ * 名称
18
+ */
19
+ name: string;
20
20
 
21
- /**
22
- * Location
23
- * 位置
24
- */
25
- location: AddressLocation;
21
+ /**
22
+ * Location
23
+ * 位置
24
+ */
25
+ location: AddressLocation;
26
26
 
27
- /**
28
- * Formatted address
29
- * 格式化地址
30
- */
31
- formattedAddress: string;
27
+ /**
28
+ * Formatted address
29
+ * 格式化地址
30
+ */
31
+ formattedAddress: string;
32
32
  };
@@ -1,43 +1,43 @@
1
- import { AddressLocation } from './AddressLocation';
1
+ import { AddressLocation } from "./AddressLocation";
2
2
 
3
3
  /**
4
4
  * Address place base
5
5
  * 基础地点
6
6
  */
7
7
  export type AddressPlaceBase = {
8
- /**
9
- * Location
10
- * 位置
11
- */
12
- location?: AddressLocation;
8
+ /**
9
+ * Location
10
+ * 位置
11
+ */
12
+ location?: AddressLocation;
13
13
 
14
- /**
15
- * Region or country, like CN = China
16
- * 地区或国家,比如 CN 表示中国
17
- */
18
- region?: string;
14
+ /**
15
+ * Region or country, like CN = China
16
+ * 地区或国家,比如 CN 表示中国
17
+ */
18
+ region?: string;
19
19
 
20
- /**
21
- * State or province
22
- * 州 / 省
23
- */
24
- state?: string;
20
+ /**
21
+ * State or province
22
+ * 州 / 省
23
+ */
24
+ state?: string;
25
25
 
26
- /**
27
- * City
28
- * 城市
29
- */
30
- city?: string;
26
+ /**
27
+ * City
28
+ * 城市
29
+ */
30
+ city?: string;
31
31
 
32
- /**
33
- * District
34
- * 区县
35
- */
36
- district?: string;
32
+ /**
33
+ * District
34
+ * 区县
35
+ */
36
+ district?: string;
37
37
 
38
- /**
39
- * Postcode
40
- * 邮编
41
- */
42
- postcode?: string;
38
+ /**
39
+ * Postcode
40
+ * 邮编
41
+ */
42
+ postcode?: string;
43
43
  };