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