@etsoo/smarterp-core 1.1.54 → 1.1.55

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.
@@ -2,6 +2,14 @@ import { BaseApi, IApi, IApiPayload, IApp } from "@etsoo/appscript";
2
2
  import { SendEmailInputRQ } from "./rq/authCode/SendEmailRQ";
3
3
  import { SendSMSInputRQ } from "./rq/authCode/SendSMSRQ";
4
4
  import { IActionResult } from "@etsoo/shared";
5
+ /**
6
+ * Auth Code Send Result
7
+ * 验证码发送结果
8
+ */
9
+ export type AuthCodeSendResult = IActionResult<{
10
+ id: string;
11
+ recipient: string;
12
+ }>;
5
13
  /**
6
14
  * Auth Code API
7
15
  * 验证码接口
@@ -19,24 +27,12 @@ export declare class AuthCodeApi extends BaseApi {
19
27
  * @param payload Payload
20
28
  * @returns Result
21
29
  */
22
- sendEmail(rq: SendEmailInputRQ, payload?: IApiPayload<IActionResult<{
23
- id: string;
24
- email: string;
25
- }>>): Promise<IActionResult<{
26
- id: string;
27
- email: string;
28
- }> | undefined>;
30
+ sendEmail(rq: SendEmailInputRQ, payload?: IApiPayload<AuthCodeSendResult>): Promise<AuthCodeSendResult | undefined>;
29
31
  /**
30
32
  * Send SMS
31
33
  * @param rq Request data
32
34
  * @param payload Payload
33
35
  * @returns Result
34
36
  */
35
- sendSMS(rq: SendSMSInputRQ, payload?: IApiPayload<IActionResult<{
36
- id: string;
37
- mobile: string;
38
- }>>): Promise<IActionResult<{
39
- id: string;
40
- mobile: string;
41
- }> | undefined>;
37
+ sendSMS(rq: SendSMSInputRQ, payload?: IApiPayload<AuthCodeSendResult>): Promise<AuthCodeSendResult | undefined>;
42
38
  }
@@ -2,6 +2,14 @@ import { BaseApi, IApi, IApiPayload, IApp } from "@etsoo/appscript";
2
2
  import { SendEmailInputRQ } from "./rq/authCode/SendEmailRQ";
3
3
  import { SendSMSInputRQ } from "./rq/authCode/SendSMSRQ";
4
4
  import { IActionResult } from "@etsoo/shared";
5
+ /**
6
+ * Auth Code Send Result
7
+ * 验证码发送结果
8
+ */
9
+ export type AuthCodeSendResult = IActionResult<{
10
+ id: string;
11
+ recipient: string;
12
+ }>;
5
13
  /**
6
14
  * Auth Code API
7
15
  * 验证码接口
@@ -19,24 +27,12 @@ export declare class AuthCodeApi extends BaseApi {
19
27
  * @param payload Payload
20
28
  * @returns Result
21
29
  */
22
- sendEmail(rq: SendEmailInputRQ, payload?: IApiPayload<IActionResult<{
23
- id: string;
24
- email: string;
25
- }>>): Promise<IActionResult<{
26
- id: string;
27
- email: string;
28
- }> | undefined>;
30
+ sendEmail(rq: SendEmailInputRQ, payload?: IApiPayload<AuthCodeSendResult>): Promise<AuthCodeSendResult | undefined>;
29
31
  /**
30
32
  * Send SMS
31
33
  * @param rq Request data
32
34
  * @param payload Payload
33
35
  * @returns Result
34
36
  */
35
- sendSMS(rq: SendSMSInputRQ, payload?: IApiPayload<IActionResult<{
36
- id: string;
37
- mobile: string;
38
- }>>): Promise<IActionResult<{
39
- id: string;
40
- mobile: string;
41
- }> | undefined>;
37
+ sendSMS(rq: SendSMSInputRQ, payload?: IApiPayload<AuthCodeSendResult>): Promise<AuthCodeSendResult | undefined>;
42
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/smarterp-core",
3
- "version": "1.1.54",
3
+ "version": "1.1.55",
4
4
  "description": "TypeScript APIs for SmartERP Core",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -3,6 +3,15 @@ import { SendEmailInputRQ, SendEmailRQ } from "./rq/authCode/SendEmailRQ";
3
3
  import { SendSMSInputRQ, SendSMSRQ } from "./rq/authCode/SendSMSRQ";
4
4
  import { IActionResult } from "@etsoo/shared";
5
5
 
6
+ /**
7
+ * Auth Code Send Result
8
+ * 验证码发送结果
9
+ */
10
+ export type AuthCodeSendResult = IActionResult<{
11
+ id: string;
12
+ recipient: string;
13
+ }>;
14
+
6
15
  /**
7
16
  * Auth Code API
8
17
  * 验证码接口
@@ -23,10 +32,7 @@ export class AuthCodeApi extends BaseApi {
23
32
  * @param payload Payload
24
33
  * @returns Result
25
34
  */
26
- sendEmail(
27
- rq: SendEmailInputRQ,
28
- payload?: IApiPayload<IActionResult<{ id: string; email: string }>>
29
- ) {
35
+ sendEmail(rq: SendEmailInputRQ, payload?: IApiPayload<AuthCodeSendResult>) {
30
36
  const { deviceId, region } = this.app;
31
37
  const data: SendEmailRQ = {
32
38
  ...rq,
@@ -43,10 +49,7 @@ export class AuthCodeApi extends BaseApi {
43
49
  * @param payload Payload
44
50
  * @returns Result
45
51
  */
46
- sendSMS(
47
- rq: SendSMSInputRQ,
48
- payload?: IApiPayload<IActionResult<{ id: string; mobile: string }>>
49
- ) {
52
+ sendSMS(rq: SendSMSInputRQ, payload?: IApiPayload<AuthCodeSendResult>) {
50
53
  const { deviceId, region } = this.app;
51
54
  const data: SendSMSRQ = {
52
55
  ...rq,