@etsoo/smarterp-core 1.1.53 → 1.1.54

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,7 @@
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";
4
5
  /**
5
6
  * Auth Code API
6
7
  * 验证码接口
@@ -18,12 +19,24 @@ export declare class AuthCodeApi extends BaseApi {
18
19
  * @param payload Payload
19
20
  * @returns Result
20
21
  */
21
- sendEmail(rq: SendEmailInputRQ, payload?: StringIdResultPayload): Promise<import("@etsoo/shared").IdActionResult<string> | undefined>;
22
+ sendEmail(rq: SendEmailInputRQ, payload?: IApiPayload<IActionResult<{
23
+ id: string;
24
+ email: string;
25
+ }>>): Promise<IActionResult<{
26
+ id: string;
27
+ email: string;
28
+ }> | undefined>;
22
29
  /**
23
- * Send email
30
+ * Send SMS
24
31
  * @param rq Request data
25
32
  * @param payload Payload
26
33
  * @returns Result
27
34
  */
28
- sendSMS(rq: SendSMSInputRQ, payload?: StringIdResultPayload): Promise<import("@etsoo/shared").IdActionResult<string> | undefined>;
35
+ sendSMS(rq: SendSMSInputRQ, payload?: IApiPayload<IActionResult<{
36
+ id: string;
37
+ mobile: string;
38
+ }>>): Promise<IActionResult<{
39
+ id: string;
40
+ mobile: string;
41
+ }> | undefined>;
29
42
  }
@@ -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,7 @@
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";
4
5
  /**
5
6
  * Auth Code API
6
7
  * 验证码接口
@@ -18,12 +19,24 @@ export declare class AuthCodeApi extends BaseApi {
18
19
  * @param payload Payload
19
20
  * @returns Result
20
21
  */
21
- sendEmail(rq: SendEmailInputRQ, payload?: StringIdResultPayload): Promise<import("@etsoo/shared").IdActionResult<string> | undefined>;
22
+ sendEmail(rq: SendEmailInputRQ, payload?: IApiPayload<IActionResult<{
23
+ id: string;
24
+ email: string;
25
+ }>>): Promise<IActionResult<{
26
+ id: string;
27
+ email: string;
28
+ }> | undefined>;
22
29
  /**
23
- * Send email
30
+ * Send SMS
24
31
  * @param rq Request data
25
32
  * @param payload Payload
26
33
  * @returns Result
27
34
  */
28
- sendSMS(rq: SendSMSInputRQ, payload?: StringIdResultPayload): Promise<import("@etsoo/shared").IdActionResult<string> | undefined>;
35
+ sendSMS(rq: SendSMSInputRQ, payload?: IApiPayload<IActionResult<{
36
+ id: string;
37
+ mobile: string;
38
+ }>>): Promise<IActionResult<{
39
+ id: string;
40
+ mobile: string;
41
+ }> | undefined>;
29
42
  }
@@ -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.54",
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,7 @@
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";
4
5
 
5
6
  /**
6
7
  * Auth Code API
@@ -22,7 +23,10 @@ export class AuthCodeApi extends BaseApi {
22
23
  * @param payload Payload
23
24
  * @returns Result
24
25
  */
25
- sendEmail(rq: SendEmailInputRQ, payload?: StringIdResultPayload) {
26
+ sendEmail(
27
+ rq: SendEmailInputRQ,
28
+ payload?: IApiPayload<IActionResult<{ id: string; email: string }>>
29
+ ) {
26
30
  const { deviceId, region } = this.app;
27
31
  const data: SendEmailRQ = {
28
32
  ...rq,
@@ -34,12 +38,15 @@ export class AuthCodeApi extends BaseApi {
34
38
  }
35
39
 
36
40
  /**
37
- * Send email
41
+ * Send SMS
38
42
  * @param rq Request data
39
43
  * @param payload Payload
40
44
  * @returns Result
41
45
  */
42
- sendSMS(rq: SendSMSInputRQ, payload?: StringIdResultPayload) {
46
+ sendSMS(
47
+ rq: SendSMSInputRQ,
48
+ payload?: IApiPayload<IActionResult<{ id: string; mobile: string }>>
49
+ ) {
43
50
  const { deviceId, region } = this.app;
44
51
  const data: SendSMSRQ = {
45
52
  ...rq,