@daocloud-proto/ghippo 0.42.1 → 0.42.3-rc1
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/account.pb.ts +0 -3
- package/v1alpha1/sms.pb.ts +58 -0
package/package.json
CHANGED
package/v1alpha1/account.pb.ts
CHANGED
|
@@ -215,9 +215,6 @@ export class Accounts {
|
|
|
215
215
|
static CreateSubAccount(req: CreateSubAccountRequest, initReq?: fm.InitReq): Promise<CreateSubAccountResponse> {
|
|
216
216
|
return fm.fetchReq<CreateSubAccountRequest, CreateSubAccountResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
217
217
|
}
|
|
218
|
-
static DeleteSubAccount(req: DeleteSubAccountRequest, initReq?: fm.InitReq): Promise<DeleteSubAccountResponse> {
|
|
219
|
-
return fm.fetchReq<DeleteSubAccountRequest, DeleteSubAccountResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
220
|
-
}
|
|
221
218
|
static UpdateSubAccount(req: UpdateSubAccountRequest, initReq?: fm.InitReq): Promise<UpdateSubAccountResponse> {
|
|
222
219
|
return fm.fetchReq<UpdateSubAccountRequest, UpdateSubAccountResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
223
220
|
}
|
package/v1alpha1/sms.pb.ts
CHANGED
|
@@ -12,6 +12,11 @@ export enum Scene {
|
|
|
12
12
|
ChangePhone = "ChangePhone",
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
export enum SmsTemplateStatus {
|
|
16
|
+
StatusDisable = "StatusDisable",
|
|
17
|
+
StatusEnable = "StatusEnable",
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
export type SendVerificationCodeRequest = {
|
|
16
21
|
phone?: string
|
|
17
22
|
countryCode?: string
|
|
@@ -32,6 +37,50 @@ export type SendTemplateSmsRequest = {
|
|
|
32
37
|
export type SendTemplateSmsResponse = {
|
|
33
38
|
}
|
|
34
39
|
|
|
40
|
+
export type CreateSmsTemplateRequest = {
|
|
41
|
+
template?: string
|
|
42
|
+
domain?: string
|
|
43
|
+
channel?: string
|
|
44
|
+
channelTemplate?: string
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type CreateSmsTemplateResponse = {
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type ListSmsTemplateRequest = {
|
|
51
|
+
template?: string
|
|
52
|
+
domain?: string
|
|
53
|
+
channel?: string
|
|
54
|
+
channelTemplate?: string
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type SmsTemplate = {
|
|
58
|
+
id?: number
|
|
59
|
+
template?: string
|
|
60
|
+
domain?: string
|
|
61
|
+
channel?: string
|
|
62
|
+
channelTemplate?: string
|
|
63
|
+
enable?: SmsTemplateStatus
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type ListSmsTemplateResponse = {
|
|
67
|
+
items?: SmsTemplate[]
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export type BatchTemplate = {
|
|
71
|
+
template?: string
|
|
72
|
+
channelTemplate?: string
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export type BatchCreateSmsTemplatesByDomainRequest = {
|
|
76
|
+
templates?: BatchTemplate[]
|
|
77
|
+
domain?: string
|
|
78
|
+
channel?: string
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type BatchCreateSmsTemplatesByDomainResponse = {
|
|
82
|
+
}
|
|
83
|
+
|
|
35
84
|
export class Sms {
|
|
36
85
|
static SendVerificationCode(req: SendVerificationCodeRequest, initReq?: fm.InitReq): Promise<SendVerificationCodeResponse> {
|
|
37
86
|
return fm.fetchReq<SendVerificationCodeRequest, SendVerificationCodeResponse>(`/apis/ghippo.io/v1alpha1/sms/verification`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
@@ -39,4 +88,13 @@ export class Sms {
|
|
|
39
88
|
static SendTemplateSms(req: SendTemplateSmsRequest, initReq?: fm.InitReq): Promise<SendTemplateSmsResponse> {
|
|
40
89
|
return fm.fetchReq<SendTemplateSmsRequest, SendTemplateSmsResponse>(`/v1alpha1.sms.Sms/SendTemplateSms`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
41
90
|
}
|
|
91
|
+
static ListSmsTemplate(req: ListSmsTemplateRequest, initReq?: fm.InitReq): Promise<ListSmsTemplateResponse> {
|
|
92
|
+
return fm.fetchReq<ListSmsTemplateRequest, ListSmsTemplateResponse>(`/apis/ghippo.io/v1alpha1/sms/template?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
93
|
+
}
|
|
94
|
+
static CreateSmsTemplate(req: CreateSmsTemplateRequest, initReq?: fm.InitReq): Promise<CreateSmsTemplateResponse> {
|
|
95
|
+
return fm.fetchReq<CreateSmsTemplateRequest, CreateSmsTemplateResponse>(`/apis/ghippo.io/v1alpha1/sms/template`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
96
|
+
}
|
|
97
|
+
static BatchCreateSmsTemplatesByDomain(req: BatchCreateSmsTemplatesByDomainRequest, initReq?: fm.InitReq): Promise<BatchCreateSmsTemplatesByDomainResponse> {
|
|
98
|
+
return fm.fetchReq<BatchCreateSmsTemplatesByDomainRequest, BatchCreateSmsTemplatesByDomainResponse>(`/apis/ghippo.io/v1alpha1/sms/template/batch-by-domain`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
99
|
+
}
|
|
42
100
|
}
|