@etsoo/appscript 1.3.74 → 1.3.76

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.
@@ -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 input Request data
91
+ * @param payload Payload
92
+ * @returns Result
93
+ */
94
+ parsePin(input: ParsePinRQ | string, 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
@@ -162,7 +162,18 @@ 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
- //product(id: number, culture?: string, ): Promise<PublicProductDto | undefined>;
165
+ /**
166
+ * Parse Pin data
167
+ * @param input Request data
168
+ * @param payload Payload
169
+ * @returns Result
170
+ */
171
+ parsePin(input, payload) {
172
+ var _a;
173
+ const rq = typeof input === 'string' ? { pin: input } : input;
174
+ (_a = rq.language) !== null && _a !== void 0 ? _a : (rq.language = this.app.culture);
175
+ return this.api.post('Public/ParsePin', rq, payload);
176
+ }
166
177
  /**
167
178
  * Get public and valid product data
168
179
  * @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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Parse PIN request data
3
+ * 解析证件号码请求数据
4
+ */
5
+ export type ParsePinRQ = {
6
+ /**
7
+ * Pin
8
+ */
9
+ pin: string;
10
+ /**
11
+ * Language
12
+ */
13
+ language?: string;
14
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -33,6 +33,7 @@ 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';
36
37
  export * from './erp/dto/PlaceParsedDto';
37
38
  export * from './erp/dto/PublicProductDto';
38
39
  export * from './erp/dto/ResultPayload';
@@ -41,6 +42,7 @@ export * from './erp/rq/LoginRQ';
41
42
  export * from './erp/rq/MemberListRQ';
42
43
  export * from './erp/rq/OrgListRQ';
43
44
  export * from './erp/rq/OrgQueryRQ';
45
+ export * from './erp/rq/ParsePinRQ';
44
46
  export * from './erp/rq/PlaceParseRQ';
45
47
  export * from './erp/rq/PlaceQueryRQ';
46
48
  export * from './erp/rq/QueryRQ';
package/lib/cjs/index.js CHANGED
@@ -56,6 +56,7 @@ __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);
59
60
  __exportStar(require("./erp/dto/PlaceParsedDto"), exports);
60
61
  __exportStar(require("./erp/dto/PublicProductDto"), exports);
61
62
  __exportStar(require("./erp/dto/ResultPayload"), exports);
@@ -65,6 +66,7 @@ __exportStar(require("./erp/rq/LoginRQ"), exports);
65
66
  __exportStar(require("./erp/rq/MemberListRQ"), exports);
66
67
  __exportStar(require("./erp/rq/OrgListRQ"), exports);
67
68
  __exportStar(require("./erp/rq/OrgQueryRQ"), exports);
69
+ __exportStar(require("./erp/rq/ParsePinRQ"), exports);
68
70
  __exportStar(require("./erp/rq/PlaceParseRQ"), exports);
69
71
  __exportStar(require("./erp/rq/PlaceQueryRQ"), exports);
70
72
  __exportStar(require("./erp/rq/QueryRQ"), exports);
@@ -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 input Request data
91
+ * @param payload Payload
92
+ * @returns Result
93
+ */
94
+ parsePin(input: ParsePinRQ | string, 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
@@ -159,7 +159,18 @@ 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
- //product(id: number, culture?: string, ): Promise<PublicProductDto | undefined>;
162
+ /**
163
+ * Parse Pin data
164
+ * @param input Request data
165
+ * @param payload Payload
166
+ * @returns Result
167
+ */
168
+ parsePin(input, payload) {
169
+ var _a;
170
+ const rq = typeof input === 'string' ? { pin: input } : input;
171
+ (_a = rq.language) !== null && _a !== void 0 ? _a : (rq.language = this.app.culture);
172
+ return this.api.post('Public/ParsePin', rq, payload);
173
+ }
163
174
  /**
164
175
  * Get public and valid product data
165
176
  * @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,14 @@
1
+ /**
2
+ * Parse PIN request data
3
+ * 解析证件号码请求数据
4
+ */
5
+ export type ParsePinRQ = {
6
+ /**
7
+ * Pin
8
+ */
9
+ pin: string;
10
+ /**
11
+ * Language
12
+ */
13
+ language?: string;
14
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -33,6 +33,7 @@ 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';
36
37
  export * from './erp/dto/PlaceParsedDto';
37
38
  export * from './erp/dto/PublicProductDto';
38
39
  export * from './erp/dto/ResultPayload';
@@ -41,6 +42,7 @@ export * from './erp/rq/LoginRQ';
41
42
  export * from './erp/rq/MemberListRQ';
42
43
  export * from './erp/rq/OrgListRQ';
43
44
  export * from './erp/rq/OrgQueryRQ';
45
+ export * from './erp/rq/ParsePinRQ';
44
46
  export * from './erp/rq/PlaceParseRQ';
45
47
  export * from './erp/rq/PlaceQueryRQ';
46
48
  export * from './erp/rq/QueryRQ';
package/lib/mjs/index.js CHANGED
@@ -39,6 +39,7 @@ 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';
42
43
  export * from './erp/dto/PlaceParsedDto';
43
44
  export * from './erp/dto/PublicProductDto';
44
45
  export * from './erp/dto/ResultPayload';
@@ -48,6 +49,7 @@ export * from './erp/rq/LoginRQ';
48
49
  export * from './erp/rq/MemberListRQ';
49
50
  export * from './erp/rq/OrgListRQ';
50
51
  export * from './erp/rq/OrgQueryRQ';
52
+ export * from './erp/rq/ParsePinRQ';
51
53
  export * from './erp/rq/PlaceParseRQ';
52
54
  export * from './erp/rq/PlaceQueryRQ';
53
55
  export * from './erp/rq/QueryRQ';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.3.74",
3
+ "version": "1.3.76",
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.0",
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.0",
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",
@@ -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,17 @@ export class PublicApi extends BaseApi {
201
203
  return this.api.post('Public/MobileQRCode', { id, host }, payload);
202
204
  }
203
205
 
204
- //product(id: number, culture?: string, ): Promise<PublicProductDto | undefined>;
206
+ /**
207
+ * Parse Pin data
208
+ * @param input Request data
209
+ * @param payload Payload
210
+ * @returns Result
211
+ */
212
+ parsePin(input: ParsePinRQ | string, payload?: IApiPayload<PinDto>) {
213
+ const rq = typeof input === 'string' ? { pin: input } : input;
214
+ rq.language ??= this.app.culture;
215
+ return this.api.post('Public/ParsePin', rq, payload);
216
+ }
205
217
 
206
218
  /**
207
219
  * 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,15 @@
1
+ /**
2
+ * Parse PIN request data
3
+ * 解析证件号码请求数据
4
+ */
5
+ export type ParsePinRQ = {
6
+ /**
7
+ * Pin
8
+ */
9
+ pin: string;
10
+
11
+ /**
12
+ * Language
13
+ */
14
+ language?: string;
15
+ };
package/src/index.ts CHANGED
@@ -44,6 +44,7 @@ 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';
47
48
  export * from './erp/dto/PlaceParsedDto';
48
49
  export * from './erp/dto/PublicProductDto';
49
50
  export * from './erp/dto/ResultPayload';
@@ -54,6 +55,7 @@ export * from './erp/rq/LoginRQ';
54
55
  export * from './erp/rq/MemberListRQ';
55
56
  export * from './erp/rq/OrgListRQ';
56
57
  export * from './erp/rq/OrgQueryRQ';
58
+ export * from './erp/rq/ParsePinRQ';
57
59
  export * from './erp/rq/PlaceParseRQ';
58
60
  export * from './erp/rq/PlaceQueryRQ';
59
61
  export * from './erp/rq/QueryRQ';