@daocloud-proto/ghippo 0.42.1-rc1 → 0.43.0-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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/ghippo",
3
- "version":"0.42.1-rc1",
3
+ "version":"0.43.0-rc1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -5,6 +5,21 @@
5
5
  */
6
6
 
7
7
  import * as fm from "../fetch.pb"
8
+ export type ListCurrentMembersRequest = {
9
+ page?: number
10
+ pageSize?: number
11
+ }
12
+
13
+ export type ListCurrentMembersResponse = {
14
+ items?: AccountInfo[]
15
+ pagination?: Pagination
16
+ }
17
+
18
+ export type AccountInfo = {
19
+ id?: string
20
+ name?: string
21
+ }
22
+
8
23
  export type ListSubAccountsRequest = {
9
24
  search?: string
10
25
  pageSize?: number
@@ -248,4 +263,7 @@ export class Accounts {
248
263
  static ListSubAccountSSHKeys(req: ListSubAccountSSHKeysRequest, initReq?: fm.InitReq): Promise<ListSubAccountSSHKeysResponse> {
249
264
  return fm.fetchReq<ListSubAccountSSHKeysRequest, ListSubAccountSSHKeysResponse>(`/apis/ghippo.io/v1alpha1/sub-accounts/${req["id"]}/sshkeys?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
250
265
  }
266
+ static ListCurrentMembers(req: ListCurrentMembersRequest, initReq?: fm.InitReq): Promise<ListCurrentMembersResponse> {
267
+ return fm.fetchReq<ListCurrentMembersRequest, ListCurrentMembersResponse>(`/apis/ghippo.io/v1alpha1/accounts/current/members?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
268
+ }
251
269
  }
@@ -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,36 @@ 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
+
35
70
  export class Sms {
36
71
  static SendVerificationCode(req: SendVerificationCodeRequest, initReq?: fm.InitReq): Promise<SendVerificationCodeResponse> {
37
72
  return fm.fetchReq<SendVerificationCodeRequest, SendVerificationCodeResponse>(`/apis/ghippo.io/v1alpha1/sms/verification`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
@@ -39,4 +74,10 @@ export class Sms {
39
74
  static SendTemplateSms(req: SendTemplateSmsRequest, initReq?: fm.InitReq): Promise<SendTemplateSmsResponse> {
40
75
  return fm.fetchReq<SendTemplateSmsRequest, SendTemplateSmsResponse>(`/v1alpha1.sms.Sms/SendTemplateSms`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
41
76
  }
77
+ static ListSmsTemplate(req: ListSmsTemplateRequest, initReq?: fm.InitReq): Promise<ListSmsTemplateResponse> {
78
+ return fm.fetchReq<ListSmsTemplateRequest, ListSmsTemplateResponse>(`/apis/ghippo.io/v1alpha1/sms/template?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
79
+ }
80
+ static CreateSmsTemplate(req: CreateSmsTemplateRequest, initReq?: fm.InitReq): Promise<CreateSmsTemplateResponse> {
81
+ return fm.fetchReq<CreateSmsTemplateRequest, CreateSmsTemplateResponse>(`/apis/ghippo.io/v1alpha1/sms/template`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
82
+ }
42
83
  }