@daocloud-proto/ghippo 0.35.0-rc1 → 0.35.0-rc3
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.
- package/package.json +1 -1
- package/v1alpha1/sms.pb.ts +32 -0
- package/v1alpha1/user.pb.ts +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/*
|
|
4
|
+
* This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import * as fm from "../fetch.pb"
|
|
8
|
+
export type SendVerificationCodeRequest = {
|
|
9
|
+
phone?: string
|
|
10
|
+
countryCode?: string
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type SendVerificationCodeResponse = {
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type SendTemplateSmsRequest = {
|
|
17
|
+
userId?: string
|
|
18
|
+
templateCode?: string
|
|
19
|
+
templateVars?: {[key: string]: string}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type SendTemplateSmsResponse = {
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export class Sms {
|
|
26
|
+
static SendVerificationCode(req: SendVerificationCodeRequest, initReq?: fm.InitReq): Promise<SendVerificationCodeResponse> {
|
|
27
|
+
return fm.fetchReq<SendVerificationCodeRequest, SendVerificationCodeResponse>(`/apis/ghippo.io/v1alpha1/sms/verification`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
28
|
+
}
|
|
29
|
+
static SendTemplateSms(req: SendTemplateSmsRequest, initReq?: fm.InitReq): Promise<SendTemplateSmsResponse> {
|
|
30
|
+
return fm.fetchReq<SendTemplateSmsRequest, SendTemplateSmsResponse>(`/v1alpha1.sms.Sms/SendTemplateSms`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
31
|
+
}
|
|
32
|
+
}
|