@daocloud-proto/ghippo 0.19.2 → 0.20.0-dev2

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.19.2",
3
+ "version":"0.20.0-dev2",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -28,12 +28,30 @@ export type CreateIDPRequest = {
28
28
  tokenUrl?: string
29
29
  logoutUrl?: string
30
30
  enableAutoLinkFlow?: boolean
31
+ alias?: string
32
+ enabled?: boolean
31
33
  }
32
34
 
33
35
  export type CreateIDPResponse = {
34
36
  }
35
37
 
38
+ export type IDPInfo = {
39
+ displayName?: string
40
+ clientId?: string
41
+ clientSecret?: string
42
+ clientAuthentications?: ClientAuthentications
43
+ providerId?: ProviderType
44
+ authorizationUrl?: string
45
+ userInfoUrl?: string
46
+ tokenUrl?: string
47
+ logoutUrl?: string
48
+ enableAutoLinkFlow?: boolean
49
+ alias?: string
50
+ enabled?: boolean
51
+ }
52
+
36
53
  export type GetIDPRequest = {
54
+ alias?: string
37
55
  }
38
56
 
39
57
  export type GetIDPResponse = {
@@ -47,9 +65,19 @@ export type GetIDPResponse = {
47
65
  tokenUrl?: string
48
66
  logoutUrl?: string
49
67
  enableAutoLinkFlow?: boolean
68
+ alias?: string
69
+ enabled?: boolean
70
+ }
71
+
72
+ export type ListIDPsRequest = {
73
+ }
74
+
75
+ export type ListIDPsResponse = {
76
+ items?: IDPInfo[]
50
77
  }
51
78
 
52
79
  export type GetRedirectUrlRequest = {
80
+ alias?: string
53
81
  }
54
82
 
55
83
  export type GetRedirectUrlResponse = {
@@ -57,6 +85,7 @@ export type GetRedirectUrlResponse = {
57
85
  }
58
86
 
59
87
  export type DeleteIDPRequest = {
88
+ alias?: string
60
89
  }
61
90
 
62
91
  export type DeleteIDPResponse = {
@@ -73,9 +102,12 @@ export type UpdateIDPRequest = {
73
102
  tokenUrl?: string
74
103
  logoutUrl?: string
75
104
  enableAutoLinkFlow?: boolean
105
+ alias?: string
106
+ enabled?: boolean
76
107
  }
77
108
 
78
109
  export type UpdateIDPResponse = {
110
+ alias?: string
79
111
  }
80
112
 
81
113
  export type GetWellKnownUrlRequest = {
@@ -92,6 +124,9 @@ export class IDP {
92
124
  static GetIDP(req: GetIDPRequest, initReq?: fm.InitReq): Promise<GetIDPResponse> {
93
125
  return fm.fetchReq<GetIDPRequest, GetIDPResponse>(`/apis/ghippo.io/v1alpha1/idp?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
94
126
  }
127
+ static ListIDPs(req: ListIDPsRequest, initReq?: fm.InitReq): Promise<ListIDPsResponse> {
128
+ return fm.fetchReq<ListIDPsRequest, ListIDPsResponse>(`/apis/ghippo.io/v1alpha1/idps?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
129
+ }
95
130
  static GetRedirectUrl(req: GetRedirectUrlRequest, initReq?: fm.InitReq): Promise<GetRedirectUrlResponse> {
96
131
  return fm.fetchReq<GetRedirectUrlRequest, GetRedirectUrlResponse>(`/apis/ghippo.io/v1alpha1/idp/redirect-url?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
97
132
  }
@@ -10,6 +10,13 @@ export enum ProviderType {
10
10
  wechatwork = "wechatwork",
11
11
  }
12
12
 
13
+ export type GetOauth2RedirectDomainRequest = {
14
+ }
15
+
16
+ export type GetOauth2RedirectDomainResponse = {
17
+ redirectDomain?: string
18
+ }
19
+
13
20
  export type GetOauth2Request = {
14
21
  }
15
22
 
@@ -51,6 +58,9 @@ export type DeleteOauth2Response = {
51
58
  }
52
59
 
53
60
  export class Oauth2 {
61
+ static GetOauth2RedirectDomain(req: GetOauth2RedirectDomainRequest, initReq?: fm.InitReq): Promise<GetOauth2RedirectDomainResponse> {
62
+ return fm.fetchReq<GetOauth2RedirectDomainRequest, GetOauth2RedirectDomainResponse>(`/apis/ghippo.io/v1alpha1/oauth2/redirect-domain?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
63
+ }
54
64
  static GetOauth2(req: GetOauth2Request, initReq?: fm.InitReq): Promise<GetOauth2Response> {
55
65
  return fm.fetchReq<GetOauth2Request, GetOauth2Response>(`/apis/ghippo.io/v1alpha1/oauth2?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
56
66
  }
@@ -0,0 +1,259 @@
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
+
9
+ export enum LdapVendor {
10
+ other = "other",
11
+ ad = "ad",
12
+ }
13
+
14
+ export type Pagination = {
15
+ page?: number
16
+ pageSize?: number
17
+ total?: number
18
+ }
19
+
20
+ export type ListLdapsRequest = {
21
+ pageSize?: number
22
+ page?: number
23
+ }
24
+
25
+ export type ListLdapsResponse = {
26
+ items?: ListLdap[]
27
+ pagination?: Pagination
28
+ }
29
+
30
+ export type ListLdap = {
31
+ id?: string
32
+ name?: string
33
+ vendor?: string
34
+ enabled?: boolean
35
+ }
36
+
37
+ export type GetLdapRequest = {
38
+ id?: string
39
+ }
40
+
41
+ export type GetLdapResponse = {
42
+ id?: string
43
+ name?: string
44
+ vendor?: LdapVendor
45
+ startTls?: string
46
+ ldapProtocol?: string
47
+ ldapHost?: string
48
+ usersDn?: string
49
+ bindDn?: string
50
+ bindCredential?: string
51
+ userObjectClasses?: string
52
+ usernameLdapAttribute?: string
53
+ fullSyncPeriod?: string
54
+ rdnLdapAttribute?: string
55
+ uuidLdapAttribute?: string
56
+ editMode?: string
57
+ readTimeout?: string
58
+ firstName?: string
59
+ lastName?: string
60
+ email?: string
61
+ enabled?: boolean
62
+ }
63
+
64
+ export type CreateLdapRequest = {
65
+ name?: string
66
+ vendor?: LdapVendor
67
+ startTls?: string
68
+ ldapProtocol?: string
69
+ ldapHost?: string
70
+ usersDn?: string
71
+ bindDn?: string
72
+ bindCredential?: string
73
+ userObjectClasses?: string
74
+ usernameLdapAttribute?: string
75
+ fullSyncPeriod?: string
76
+ rdnLdapAttribute?: string
77
+ uuidLdapAttribute?: string
78
+ editMode?: string
79
+ readTimeout?: string
80
+ firstName?: string
81
+ lastName?: string
82
+ email?: string
83
+ enabled?: boolean
84
+ }
85
+
86
+ export type CreateLdapResponse = {
87
+ id?: string
88
+ }
89
+
90
+ export type TestLdapConnectionRequest = {
91
+ connectionUrl?: string
92
+ bindDn?: string
93
+ bindCredential?: string
94
+ connectionTimeout?: string
95
+ action?: string
96
+ startTls?: string
97
+ useTruststoreSpi?: string
98
+ componentId?: string
99
+ }
100
+
101
+ export type TestLdapConnectionResponse = {
102
+ }
103
+
104
+ export type TestLdapAuthenticationRequest = {
105
+ bindDn?: string
106
+ bindCredential?: string
107
+ connectionUrl?: string
108
+ connectionTimeout?: string
109
+ action?: string
110
+ startTls?: string
111
+ useTruststoreSpi?: string
112
+ componentId?: string
113
+ }
114
+
115
+ export type TestLdapAuthenticationResponse = {
116
+ }
117
+
118
+ export type UpdateLdapRequest = {
119
+ id?: string
120
+ name?: string
121
+ vendor?: LdapVendor
122
+ startTls?: string
123
+ ldapProtocol?: string
124
+ ldapHost?: string
125
+ usersDn?: string
126
+ bindDn?: string
127
+ bindCredential?: string
128
+ userObjectClasses?: string
129
+ usernameLdapAttribute?: string
130
+ fullSyncPeriod?: string
131
+ rdnLdapAttribute?: string
132
+ uuidLdapAttribute?: string
133
+ editMode?: string
134
+ readTimeout?: string
135
+ firstName?: string
136
+ lastName?: string
137
+ email?: string
138
+ enabled?: boolean
139
+ }
140
+
141
+ export type UpdateLdapResponse = {
142
+ }
143
+
144
+ export type SyncUsersRequest = {
145
+ id?: string
146
+ }
147
+
148
+ export type SyncUsersResponse = {
149
+ ignored?: boolean
150
+ added?: number
151
+ updated?: number
152
+ removed?: number
153
+ failed?: number
154
+ status?: string
155
+ }
156
+
157
+ export type DeleteLdapRequest = {
158
+ id?: string
159
+ }
160
+
161
+ export type DeleteLdapResponse = {
162
+ }
163
+
164
+ export type GetLdapGroupRequest = {
165
+ id?: string
166
+ }
167
+
168
+ export type GetLdapGroupResponse = {
169
+ id?: string
170
+ groupDn?: string
171
+ groupObjectClasses?: string
172
+ groupNameLdapAttribute?: string
173
+ }
174
+
175
+ export type CreateLdapGroupRequest = {
176
+ id?: string
177
+ groupDn?: string
178
+ groupObjectClasses?: string
179
+ groupNameLdapAttribute?: string
180
+ }
181
+
182
+ export type CreateLdapGroupResponse = {
183
+ id?: string
184
+ }
185
+
186
+ export type UpdateLdapGroupRequest = {
187
+ ldapId?: string
188
+ id?: string
189
+ groupDn?: string
190
+ groupObjectClasses?: string
191
+ groupNameLdapAttribute?: string
192
+ }
193
+
194
+ export type UpdateLdapGroupResponse = {
195
+ }
196
+
197
+ export type DeleteLdapGroupRequest = {
198
+ ldapId?: string
199
+ id?: string
200
+ }
201
+
202
+ export type DeleteLdapGroupResponse = {
203
+ }
204
+
205
+ export type SyncLdapGroupsRequest = {
206
+ ldapId?: string
207
+ id?: string
208
+ }
209
+
210
+ export type SyncLdapGroupsResponse = {
211
+ ignored?: boolean
212
+ added?: number
213
+ updated?: number
214
+ removed?: number
215
+ failed?: number
216
+ status?: string
217
+ }
218
+
219
+ export class Ldap {
220
+ static ListLdaps(req: ListLdapsRequest, initReq?: fm.InitReq): Promise<ListLdapsResponse> {
221
+ return fm.fetchReq<ListLdapsRequest, ListLdapsResponse>(`/apis/ghippo.io/v1alpha2/ldaps?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
222
+ }
223
+ static GetLdap(req: GetLdapRequest, initReq?: fm.InitReq): Promise<GetLdapResponse> {
224
+ return fm.fetchReq<GetLdapRequest, GetLdapResponse>(`/apis/ghippo.io/v1alpha2/ldaps/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
225
+ }
226
+ static CreateLdap(req: CreateLdapRequest, initReq?: fm.InitReq): Promise<CreateLdapResponse> {
227
+ return fm.fetchReq<CreateLdapRequest, CreateLdapResponse>(`/apis/ghippo.io/v1alpha2/ldap`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
228
+ }
229
+ static TestLdapConnection(req: TestLdapConnectionRequest, initReq?: fm.InitReq): Promise<TestLdapConnectionResponse> {
230
+ return fm.fetchReq<TestLdapConnectionRequest, TestLdapConnectionResponse>(`/apis/ghippo.io/v1alpha2/testLdapConnection`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
231
+ }
232
+ static TestLdapAuthentication(req: TestLdapAuthenticationRequest, initReq?: fm.InitReq): Promise<TestLdapAuthenticationResponse> {
233
+ return fm.fetchReq<TestLdapAuthenticationRequest, TestLdapAuthenticationResponse>(`/apis/ghippo.io/v1alpha2/testLdapAuthentication`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
234
+ }
235
+ static UpdateLdap(req: UpdateLdapRequest, initReq?: fm.InitReq): Promise<UpdateLdapResponse> {
236
+ return fm.fetchReq<UpdateLdapRequest, UpdateLdapResponse>(`/apis/ghippo.io/v1alpha2/ldaps/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
237
+ }
238
+ static SyncUsers(req: SyncUsersRequest, initReq?: fm.InitReq): Promise<SyncUsersResponse> {
239
+ return fm.fetchReq<SyncUsersRequest, SyncUsersResponse>(`/apis/ghippo.io/v1alpha2/ldaps/${req["id"]}/sync?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
240
+ }
241
+ static DeleteLdap(req: DeleteLdapRequest, initReq?: fm.InitReq): Promise<DeleteLdapResponse> {
242
+ return fm.fetchReq<DeleteLdapRequest, DeleteLdapResponse>(`/apis/ghippo.io/v1alpha2/ldaps/${req["id"]}`, {...initReq, method: "DELETE"})
243
+ }
244
+ static GetLdapGroup(req: GetLdapGroupRequest, initReq?: fm.InitReq): Promise<GetLdapGroupResponse> {
245
+ return fm.fetchReq<GetLdapGroupRequest, GetLdapGroupResponse>(`/apis/ghippo.io/v1alpha2/ldaps/${req["id"]}/group?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
246
+ }
247
+ static CreateLdapGroup(req: CreateLdapGroupRequest, initReq?: fm.InitReq): Promise<CreateLdapGroupResponse> {
248
+ return fm.fetchReq<CreateLdapGroupRequest, CreateLdapGroupResponse>(`/apis/ghippo.io/v1alpha2/ldaps/${req["id"]}/group`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
249
+ }
250
+ static UpdateLdapGroup(req: UpdateLdapGroupRequest, initReq?: fm.InitReq): Promise<UpdateLdapGroupResponse> {
251
+ return fm.fetchReq<UpdateLdapGroupRequest, UpdateLdapGroupResponse>(`/apis/ghippo.io/v1alpha2/ldaps/${req["ldapId"]}/group/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
252
+ }
253
+ static DeleteLdapGroup(req: DeleteLdapGroupRequest, initReq?: fm.InitReq): Promise<DeleteLdapGroupResponse> {
254
+ return fm.fetchReq<DeleteLdapGroupRequest, DeleteLdapGroupResponse>(`/apis/ghippo.io/v1alpha2/ldaps/${req["ldapId"]}/group/${req["id"]}`, {...initReq, method: "DELETE"})
255
+ }
256
+ static SyncLdapGroups(req: SyncLdapGroupsRequest, initReq?: fm.InitReq): Promise<SyncLdapGroupsResponse> {
257
+ return fm.fetchReq<SyncLdapGroupsRequest, SyncLdapGroupsResponse>(`/apis/ghippo.io/v1alpha2/ldaps/${req["ldapId"]}/group/${req["id"]}/sync?${fm.renderURLSearchParams(req, ["ldapId", "id"])}`, {...initReq, method: "GET"})
258
+ }
259
+ }