@daocloud-proto/ghippo 0.17.0-dev-2 → 0.17.0-dev-4

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/fetch.pb.ts CHANGED
@@ -4,10 +4,119 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
+ /**
8
+ * base64 encoder and decoder
9
+ * Copied and adapted from https://github.com/protobufjs/protobuf.js/blob/master/lib/base64/index.js
10
+ */
11
+ // Base64 encoding table
12
+ const b64 = new Array(64);
13
+
14
+ // Base64 decoding table
15
+ const s64 = new Array(123);
16
+
17
+ // 65..90, 97..122, 48..57, 43, 47
18
+ for (let i = 0; i < 64;)
19
+ s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
20
+
21
+ export function b64Encode(buffer: Uint8Array, start: number, end: number): string {
22
+ let parts: string[] = null;
23
+ const chunk = [];
24
+ let i = 0, // output index
25
+ j = 0, // goto index
26
+ t; // temporary
27
+ while (start < end) {
28
+ const b = buffer[start++];
29
+ switch (j) {
30
+ case 0:
31
+ chunk[i++] = b64[b >> 2];
32
+ t = (b & 3) << 4;
33
+ j = 1;
34
+ break;
35
+ case 1:
36
+ chunk[i++] = b64[t | b >> 4];
37
+ t = (b & 15) << 2;
38
+ j = 2;
39
+ break;
40
+ case 2:
41
+ chunk[i++] = b64[t | b >> 6];
42
+ chunk[i++] = b64[b & 63];
43
+ j = 0;
44
+ break;
45
+ }
46
+ if (i > 8191) {
47
+ (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
48
+ i = 0;
49
+ }
50
+ }
51
+ if (j) {
52
+ chunk[i++] = b64[t];
53
+ chunk[i++] = 61;
54
+ if (j === 1)
55
+ chunk[i++] = 61;
56
+ }
57
+ if (parts) {
58
+ if (i)
59
+ parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
60
+ return parts.join("");
61
+ }
62
+ return String.fromCharCode.apply(String, chunk.slice(0, i));
63
+ }
64
+
65
+ const invalidEncoding = "invalid encoding";
66
+
67
+ export function b64Decode(s: string): Uint8Array {
68
+ const buffer = [];
69
+ let offset = 0;
70
+ let j = 0, // goto index
71
+ t; // temporary
72
+ for (let i = 0; i < s.length;) {
73
+ let c = s.charCodeAt(i++);
74
+ if (c === 61 && j > 1)
75
+ break;
76
+ if ((c = s64[c]) === undefined)
77
+ throw Error(invalidEncoding);
78
+ switch (j) {
79
+ case 0:
80
+ t = c;
81
+ j = 1;
82
+ break;
83
+ case 1:
84
+ buffer[offset++] = t << 2 | (c & 48) >> 4;
85
+ t = c;
86
+ j = 2;
87
+ break;
88
+ case 2:
89
+ buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
90
+ t = c;
91
+ j = 3;
92
+ break;
93
+ case 3:
94
+ buffer[offset++] = (t & 3) << 6 | c;
95
+ j = 0;
96
+ break;
97
+ }
98
+ }
99
+ if (j === 1)
100
+ throw Error(invalidEncoding);
101
+ return new Uint8Array(buffer);
102
+ }
103
+
104
+ function b64Test(s: string): boolean {
105
+ return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(s);
106
+ }
107
+
7
108
  export interface InitReq extends RequestInit {
8
109
  pathPrefix?: string
9
110
  }
10
111
 
112
+ export function replacer(key: any, value: any): any {
113
+ if(value && value.constructor === Uint8Array) {
114
+ return b64Encode(value, 0, value.length);
115
+ }
116
+
117
+ return value;
118
+ }
119
+
11
120
  export function fetchReq<I, O>(path: string, init?: InitReq): Promise<O> {
12
121
  const {pathPrefix, ...req} = init || {}
13
122
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/ghippo",
3
- "version":"0.17.0-dev-2",
3
+ "version":"0.17.0-dev-4",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "ISC"
@@ -14,6 +14,6 @@ export type BatchInsertAuditsResponse = {
14
14
 
15
15
  export class BatchAudits {
16
16
  static BatchInsertAudits(req: BatchInsertAuditsRequest, initReq?: fm.InitReq): Promise<BatchInsertAuditsResponse> {
17
- return fm.fetchReq<BatchInsertAuditsRequest, BatchInsertAuditsResponse>(`/apis/ghippo.io/v1alpha1/audits/batch`, {...initReq, method: "POST", body: JSON.stringify(req)})
17
+ return fm.fetchReq<BatchInsertAuditsRequest, BatchInsertAuditsResponse>(`/apis/ghippo.io/v1alpha1/audits/batch`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
18
18
  }
19
19
  }
@@ -62,7 +62,7 @@ export type DeleteClientResponse = {
62
62
 
63
63
  export class Client {
64
64
  static CreateClient(req: CreateClientRequest, initReq?: fm.InitReq): Promise<CreateClientResponse> {
65
- return fm.fetchReq<CreateClientRequest, CreateClientResponse>(`/apis/ghippo.io/v1alpha1/clients`, {...initReq, method: "POST", body: JSON.stringify(req)})
65
+ return fm.fetchReq<CreateClientRequest, CreateClientResponse>(`/apis/ghippo.io/v1alpha1/clients`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
66
66
  }
67
67
  static GetClient(req: GetClientRequest, initReq?: fm.InitReq): Promise<GetClientResponse> {
68
68
  return fm.fetchReq<GetClientRequest, GetClientResponse>(`/apis/ghippo.io/v1alpha1/clients/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
@@ -71,7 +71,7 @@ export class Client {
71
71
  return fm.fetchReq<ListClientsRequest, ListClientsResponse>(`/apis/ghippo.io/v1alpha1/clients?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
72
72
  }
73
73
  static UpdateClient(req: UpdateClientRequest, initReq?: fm.InitReq): Promise<UpdateClientResponse> {
74
- return fm.fetchReq<UpdateClientRequest, UpdateClientResponse>(`/apis/ghippo.io/v1alpha1/clients/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
74
+ return fm.fetchReq<UpdateClientRequest, UpdateClientResponse>(`/apis/ghippo.io/v1alpha1/clients/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
75
75
  }
76
76
  static DeleteClient(req: DeleteClientRequest, initReq?: fm.InitReq): Promise<DeleteClientResponse> {
77
77
  return fm.fetchReq<DeleteClientRequest, DeleteClientResponse>(`/apis/ghippo.io/v1alpha1/clients/${req["id"]}`, {...initReq, method: "DELETE"})
@@ -116,13 +116,13 @@ export type GetGlobalPermissionsResponse = {
116
116
 
117
117
  export class Account {
118
118
  static UpdateEmail(req: UpdateEmailRequest, initReq?: fm.InitReq): Promise<UpdateEmailResponse> {
119
- return fm.fetchReq<UpdateEmailRequest, UpdateEmailResponse>(`/apis/ghippo.io/v1alpha1/current-user/email`, {...initReq, method: "PUT", body: JSON.stringify(req)})
119
+ return fm.fetchReq<UpdateEmailRequest, UpdateEmailResponse>(`/apis/ghippo.io/v1alpha1/current-user/email`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
120
120
  }
121
121
  static UpdatePassword(req: UpdatePasswordRequest, initReq?: fm.InitReq): Promise<UpdatePasswordResponse> {
122
- return fm.fetchReq<UpdatePasswordRequest, UpdatePasswordResponse>(`/apis/ghippo.io/v1alpha1/current-user/password`, {...initReq, method: "PUT", body: JSON.stringify(req)})
122
+ return fm.fetchReq<UpdatePasswordRequest, UpdatePasswordResponse>(`/apis/ghippo.io/v1alpha1/current-user/password`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
123
123
  }
124
124
  static UpdateLanguage(req: UpdateLanguageRequest, initReq?: fm.InitReq): Promise<UpdateLanguageResponse> {
125
- return fm.fetchReq<UpdateLanguageRequest, UpdateLanguageResponse>(`/apis/ghippo.io/v1alpha1/current-user/language`, {...initReq, method: "PUT", body: JSON.stringify(req)})
125
+ return fm.fetchReq<UpdateLanguageRequest, UpdateLanguageResponse>(`/apis/ghippo.io/v1alpha1/current-user/language`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
126
126
  }
127
127
  static GetUser(req: GetUserRequest, initReq?: fm.InitReq): Promise<GetUserResponse> {
128
128
  return fm.fetchReq<GetUserRequest, GetUserResponse>(`/apis/ghippo.io/v1alpha1/current-user?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -131,7 +131,7 @@ export class Account {
131
131
  return fm.fetchReq<ListAccessTokensRequest, ListAccessTokensResponse>(`/apis/ghippo.io/v1alpha1/current-user/accesstokens?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
132
132
  }
133
133
  static CreateAccessToken(req: CreateAccessTokenRequest, initReq?: fm.InitReq): Promise<CreateAccessTokenResponse> {
134
- return fm.fetchReq<CreateAccessTokenRequest, CreateAccessTokenResponse>(`/apis/ghippo.io/v1alpha1/current-user/accesstoken`, {...initReq, method: "POST", body: JSON.stringify(req)})
134
+ return fm.fetchReq<CreateAccessTokenRequest, CreateAccessTokenResponse>(`/apis/ghippo.io/v1alpha1/current-user/accesstoken`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
135
135
  }
136
136
  static DeleteAccessToken(req: DeleteAccessTokenRequest, initReq?: fm.InitReq): Promise<DeleteAccessTokenResponse> {
137
137
  return fm.fetchReq<DeleteAccessTokenRequest, DeleteAccessTokenResponse>(`/apis/ghippo.io/v1alpha1/current-user/accesstokens/${req["id"]}`, {...initReq, method: "DELETE"})
@@ -89,7 +89,7 @@ export class GProductLicenses {
89
89
  return fm.fetchReq<GetGProductLicensesRequest, GetGProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
90
90
  }
91
91
  static UpdateGProductLicenses(req: UpdateGProductLicensesRequest, initReq?: fm.InitReq): Promise<UpdateGProductLicensesResponse> {
92
- return fm.fetchReq<UpdateGProductLicensesRequest, UpdateGProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses`, {...initReq, method: "PUT", body: JSON.stringify(req)})
92
+ return fm.fetchReq<UpdateGProductLicensesRequest, UpdateGProductLicensesResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
93
93
  }
94
94
  static GetGProductLicensesYaml(req: GetGProductLicenseYamlRequest, initReq?: fm.InitReq): Promise<GetGProductLicenseYamlResponse> {
95
95
  return fm.fetchReq<GetGProductLicenseYamlRequest, GetGProductLicenseYamlResponse>(`/apis/ghippo.io/v1alpha1/gproduct-licenses/yaml?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -152,7 +152,7 @@ export type RoleInfo = {
152
152
 
153
153
  export class Group {
154
154
  static CreateGroup(req: CreateGroupRequest, initReq?: fm.InitReq): Promise<CreateGroupResponse> {
155
- return fm.fetchReq<CreateGroupRequest, CreateGroupResponse>(`/apis/ghippo.io/v1alpha1/groups`, {...initReq, method: "POST", body: JSON.stringify(req)})
155
+ return fm.fetchReq<CreateGroupRequest, CreateGroupResponse>(`/apis/ghippo.io/v1alpha1/groups`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
156
156
  }
157
157
  static ListGroups(req: ListGroupsRequest, initReq?: fm.InitReq): Promise<ListGroupsResponse> {
158
158
  return fm.fetchReq<ListGroupsRequest, ListGroupsResponse>(`/apis/ghippo.io/v1alpha1/groups?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -164,7 +164,7 @@ export class Group {
164
164
  return fm.fetchReq<GroupRequest, DeleteGroupResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}`, {...initReq, method: "DELETE"})
165
165
  }
166
166
  static UpdateGroup(req: UpdateGroupRequest, initReq?: fm.InitReq): Promise<UpdateGroupResponse> {
167
- return fm.fetchReq<UpdateGroupRequest, UpdateGroupResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
167
+ return fm.fetchReq<UpdateGroupRequest, UpdateGroupResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
168
168
  }
169
169
  static GroupMembers(req: GroupMembersRequest, initReq?: fm.InitReq): Promise<GroupMembersResponse> {
170
170
  return fm.fetchReq<GroupMembersRequest, GroupMembersResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}/members?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
@@ -182,6 +182,6 @@ export class Group {
182
182
  return fm.fetchReq<ListGroupSubjectRequest, ListGroupSubjectResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}/subjects?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
183
183
  }
184
184
  static UpdateGroupRoles(req: UpdateGroupRolesRequest, initReq?: fm.InitReq): Promise<UpdateGroupRolesResponse> {
185
- return fm.fetchReq<UpdateGroupRolesRequest, UpdateGroupRolesResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}/roles`, {...initReq, method: "PUT", body: JSON.stringify(req)})
185
+ return fm.fetchReq<UpdateGroupRolesRequest, UpdateGroupRolesResponse>(`/apis/ghippo.io/v1alpha1/groups/${req["id"]}/roles`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
186
186
  }
187
187
  }
@@ -87,7 +87,7 @@ export type GetWellKnownUrlResponse = {
87
87
 
88
88
  export class IDP {
89
89
  static CreateIDP(req: CreateIDPRequest, initReq?: fm.InitReq): Promise<CreateIDPResponse> {
90
- return fm.fetchReq<CreateIDPRequest, CreateIDPResponse>(`/apis/ghippo.io/v1alpha1/idp`, {...initReq, method: "POST", body: JSON.stringify(req)})
90
+ return fm.fetchReq<CreateIDPRequest, CreateIDPResponse>(`/apis/ghippo.io/v1alpha1/idp`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
91
91
  }
92
92
  static GetIDP(req: GetIDPRequest, initReq?: fm.InitReq): Promise<GetIDPResponse> {
93
93
  return fm.fetchReq<GetIDPRequest, GetIDPResponse>(`/apis/ghippo.io/v1alpha1/idp?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -99,7 +99,7 @@ export class IDP {
99
99
  return fm.fetchReq<DeleteIDPRequest, DeleteIDPResponse>(`/apis/ghippo.io/v1alpha1/idp`, {...initReq, method: "DELETE"})
100
100
  }
101
101
  static UpdateIDP(req: UpdateIDPRequest, initReq?: fm.InitReq): Promise<UpdateIDPResponse> {
102
- return fm.fetchReq<UpdateIDPRequest, UpdateIDPResponse>(`/apis/ghippo.io/v1alpha1/idp`, {...initReq, method: "PUT", body: JSON.stringify(req)})
102
+ return fm.fetchReq<UpdateIDPRequest, UpdateIDPResponse>(`/apis/ghippo.io/v1alpha1/idp`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
103
103
  }
104
104
  static GetWellKnownUrl(req: GetWellKnownUrlRequest, initReq?: fm.InitReq): Promise<GetWellKnownUrlResponse> {
105
105
  return fm.fetchReq<GetWellKnownUrlRequest, GetWellKnownUrlResponse>(`/apis/ghippo.io/v1alpha1/idp/wellknown-url?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -186,16 +186,16 @@ export class Ldap {
186
186
  return fm.fetchReq<GetLdapRequest, GetLdapResponse>(`/apis/ghippo.io/v1alpha1/ldap?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
187
187
  }
188
188
  static CreateLdap(req: CreateLdapRequest, initReq?: fm.InitReq): Promise<CreateLdapResponse> {
189
- return fm.fetchReq<CreateLdapRequest, CreateLdapResponse>(`/apis/ghippo.io/v1alpha1/ldap`, {...initReq, method: "POST", body: JSON.stringify(req)})
189
+ return fm.fetchReq<CreateLdapRequest, CreateLdapResponse>(`/apis/ghippo.io/v1alpha1/ldap`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
190
190
  }
191
191
  static TestLdapConnection(req: TestLdapConnectionRequest, initReq?: fm.InitReq): Promise<TestLdapConnectionResponse> {
192
- return fm.fetchReq<TestLdapConnectionRequest, TestLdapConnectionResponse>(`/apis/ghippo.io/v1alpha1/testLdapConnection`, {...initReq, method: "POST", body: JSON.stringify(req)})
192
+ return fm.fetchReq<TestLdapConnectionRequest, TestLdapConnectionResponse>(`/apis/ghippo.io/v1alpha1/testLdapConnection`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
193
193
  }
194
194
  static TestLdapAuthentication(req: TestLdapAuthenticationRequest, initReq?: fm.InitReq): Promise<TestLdapAuthenticationResponse> {
195
- return fm.fetchReq<TestLdapAuthenticationRequest, TestLdapAuthenticationResponse>(`/apis/ghippo.io/v1alpha1/testLdapAuthentication`, {...initReq, method: "POST", body: JSON.stringify(req)})
195
+ return fm.fetchReq<TestLdapAuthenticationRequest, TestLdapAuthenticationResponse>(`/apis/ghippo.io/v1alpha1/testLdapAuthentication`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
196
196
  }
197
197
  static UpdateLdap(req: UpdateLdapRequest, initReq?: fm.InitReq): Promise<UpdateLdapResponse> {
198
- return fm.fetchReq<UpdateLdapRequest, UpdateLdapResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
198
+ return fm.fetchReq<UpdateLdapRequest, UpdateLdapResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
199
199
  }
200
200
  static SyncUsers(req: SyncUsersRequest, initReq?: fm.InitReq): Promise<SyncUsersResponse> {
201
201
  return fm.fetchReq<SyncUsersRequest, SyncUsersResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["id"]}/sync?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
@@ -207,10 +207,10 @@ export class Ldap {
207
207
  return fm.fetchReq<GetLdapGroupRequest, GetLdapGroupResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["id"]}/group?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
208
208
  }
209
209
  static CreateLdapGroup(req: CreateLdapGroupRequest, initReq?: fm.InitReq): Promise<CreateLdapGroupResponse> {
210
- return fm.fetchReq<CreateLdapGroupRequest, CreateLdapGroupResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["id"]}/group`, {...initReq, method: "POST", body: JSON.stringify(req)})
210
+ return fm.fetchReq<CreateLdapGroupRequest, CreateLdapGroupResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["id"]}/group`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
211
211
  }
212
212
  static UpdateLdapGroup(req: UpdateLdapGroupRequest, initReq?: fm.InitReq): Promise<UpdateLdapGroupResponse> {
213
- return fm.fetchReq<UpdateLdapGroupRequest, UpdateLdapGroupResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["ldapId"]}/group/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
213
+ return fm.fetchReq<UpdateLdapGroupRequest, UpdateLdapGroupResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["ldapId"]}/group/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
214
214
  }
215
215
  static DeleteLdapGroup(req: DeleteLdapGroupRequest, initReq?: fm.InitReq): Promise<DeleteLdapGroupResponse> {
216
216
  return fm.fetchReq<DeleteLdapGroupRequest, DeleteLdapGroupResponse>(`/apis/ghippo.io/v1alpha1/ldap/${req["ldapId"]}/group/${req["id"]}`, {...initReq, method: "DELETE"})
@@ -45,12 +45,12 @@ export class Login {
45
45
  return fm.fetchReq<LoginGetRequest, LoginGetResponse>(`/apis/ghippo.io/v1alpha1/login?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
46
46
  }
47
47
  static OIDCLogin(req: LoginPostRequest, initReq?: fm.InitReq): Promise<LoginPostResponse> {
48
- return fm.fetchReq<LoginPostRequest, LoginPostResponse>(`/apis/ghippo.io/v1alpha1/login`, {...initReq, method: "POST", body: JSON.stringify(req)})
48
+ return fm.fetchReq<LoginPostRequest, LoginPostResponse>(`/apis/ghippo.io/v1alpha1/login`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
49
49
  }
50
50
  static OIDCLogout(req: LogoutRequest, initReq?: fm.InitReq): Promise<LogoutResponse> {
51
51
  return fm.fetchReq<LogoutRequest, LogoutResponse>(`/apis/ghippo.io/v1alpha1/logout`, {...initReq, method: "DELETE"})
52
52
  }
53
53
  static RefreshToken(req: RefreshTokenRequest, initReq?: fm.InitReq): Promise<RefreshTokenResponse> {
54
- return fm.fetchReq<RefreshTokenRequest, RefreshTokenResponse>(`/apis/ghippo.io/v1alpha1/refresh-token`, {...initReq, method: "POST", body: JSON.stringify(req)})
54
+ return fm.fetchReq<RefreshTokenRequest, RefreshTokenResponse>(`/apis/ghippo.io/v1alpha1/refresh-token`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
55
55
  }
56
56
  }
@@ -52,7 +52,7 @@ export class LoginPage {
52
52
  return fm.fetchReq<GetLoginPageVersionRequest, GetLoginPageVersionResponse>(`/apis/ghippo.io/v1alpha1/login-page/version?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
53
53
  }
54
54
  static UpdateInfo(req: UpdateLoginPageInfoRequest, initReq?: fm.InitReq): Promise<UpdateLoginPageInfoResponse> {
55
- return fm.fetchReq<UpdateLoginPageInfoRequest, UpdateLoginPageInfoResponse>(`/apis/ghippo.io/v1alpha1/login-page/info`, {...initReq, method: "PUT", body: JSON.stringify(req)})
55
+ return fm.fetchReq<UpdateLoginPageInfoRequest, UpdateLoginPageInfoResponse>(`/apis/ghippo.io/v1alpha1/login-page/info`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
56
56
  }
57
57
  static ResetInfo(req: ResetLoginPageInfoRequest, initReq?: fm.InitReq): Promise<ResetLoginPageInfoResponse> {
58
58
  return fm.fetchReq<ResetLoginPageInfoRequest, ResetLoginPageInfoResponse>(`/apis/ghippo.io/v1alpha1/login-page/reset`, {...initReq, method: "POST"})
@@ -92,10 +92,10 @@ export class Message {
92
92
  return fm.fetchReq<ToggleUnreadMessageRequest, ToggleUnreadMessageResponse>(`/apis/ghippo.io/v1alpha1/messages/toggle-unread?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
93
93
  }
94
94
  static DeleteMessages(req: DeleteMessagesRequest, initReq?: fm.InitReq): Promise<DeleteMessagesResponse> {
95
- return fm.fetchReq<DeleteMessagesRequest, DeleteMessagesResponse>(`/apis/ghippo.io/v1alpha1/messages/delete`, {...initReq, method: "POST", body: JSON.stringify(req)})
95
+ return fm.fetchReq<DeleteMessagesRequest, DeleteMessagesResponse>(`/apis/ghippo.io/v1alpha1/messages/delete`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
96
96
  }
97
97
  static SetReadMessages(req: SetReadMessagesRequest, initReq?: fm.InitReq): Promise<SetReadMessagesResponse> {
98
- return fm.fetchReq<SetReadMessagesRequest, SetReadMessagesResponse>(`/apis/ghippo.io/v1alpha1/read-messages`, {...initReq, method: "POST", body: JSON.stringify(req)})
98
+ return fm.fetchReq<SetReadMessagesRequest, SetReadMessagesResponse>(`/apis/ghippo.io/v1alpha1/read-messages`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
99
99
  }
100
100
  static GetMessagesCount(req: GetMessagesCountRequest, initReq?: fm.InitReq): Promise<GetMessagesCountResponse> {
101
101
  return fm.fetchReq<GetMessagesCountRequest, GetMessagesCountResponse>(`/apis/ghippo.io/v1alpha1/messages/count?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -80,7 +80,7 @@ export type GhippoClientConfigResponse = {
80
80
 
81
81
  export class OIDC {
82
82
  static OIDCToken(req: OIDCTokenRequest, initReq?: fm.InitReq): Promise<OIDCTokenResponse> {
83
- return fm.fetchReq<OIDCTokenRequest, OIDCTokenResponse>(`/apis/ghippo.io/v1alpha1/oidc/token`, {...initReq, method: "POST", body: JSON.stringify(req)})
83
+ return fm.fetchReq<OIDCTokenRequest, OIDCTokenResponse>(`/apis/ghippo.io/v1alpha1/oidc/token`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
84
84
  }
85
85
  static WellKnown(req: WellKnownRequest, initReq?: fm.InitReq): Promise<WellKnownResponse> {
86
86
  return fm.fetchReq<WellKnownRequest, WellKnownResponse>(`/apis/ghippo.io/v1alpha1/.well-known/openid-configuration?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -18,6 +18,6 @@ export type PublishMessageResponse = {
18
18
 
19
19
  export class Publish {
20
20
  static PublishMessage(req: PublishMessageRequest, initReq?: fm.InitReq): Promise<PublishMessageResponse> {
21
- return fm.fetchReq<PublishMessageRequest, PublishMessageResponse>(`/apis/ghippo.io/v1alpha1/publish/messages`, {...initReq, method: "POST", body: JSON.stringify(req)})
21
+ return fm.fetchReq<PublishMessageRequest, PublishMessageResponse>(`/apis/ghippo.io/v1alpha1/publish/messages`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
22
22
  }
23
23
  }
@@ -50,7 +50,7 @@ export class RecordFiling {
50
50
  return fm.fetchReq<GetRecordFilingRequest, GetRecordFilingResponse>(`/apis/ghippo.io/v1alpha1/record_filing?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
51
51
  }
52
52
  static UpdateRecordFiling(req: UpdateRecordFilingRequest, initReq?: fm.InitReq): Promise<UpdateRecordFilingResponse> {
53
- return fm.fetchReq<UpdateRecordFilingRequest, UpdateRecordFilingResponse>(`/apis/ghippo.io/v1alpha1/record_filing`, {...initReq, method: "PUT", body: JSON.stringify(req)})
53
+ return fm.fetchReq<UpdateRecordFilingRequest, UpdateRecordFilingResponse>(`/apis/ghippo.io/v1alpha1/record_filing`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
54
54
  }
55
55
  static ResetRecordFiling(req: ResetRecordFilingRequest, initReq?: fm.InitReq): Promise<ResetRecordFilingResponse> {
56
56
  return fm.fetchReq<ResetRecordFilingRequest, ResetRecordFilingResponse>(`/apis/ghippo.io/v1alpha1/record_filing/reset`, {...initReq, method: "POST"})
@@ -379,10 +379,10 @@ export class Role {
379
379
  return fm.fetchReq<GetRoleRequest, GetRoleResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
380
380
  }
381
381
  static CreateRole(req: CreateRoleRequest, initReq?: fm.InitReq): Promise<CreateRoleResponse> {
382
- return fm.fetchReq<CreateRoleRequest, CreateRoleResponse>(`/apis/ghippo.io/v1alpha1/roles`, {...initReq, method: "POST", body: JSON.stringify(req)})
382
+ return fm.fetchReq<CreateRoleRequest, CreateRoleResponse>(`/apis/ghippo.io/v1alpha1/roles`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
383
383
  }
384
384
  static UpdateRole(req: UpdateRoleRequest, initReq?: fm.InitReq): Promise<UpdateRoleResponse> {
385
- return fm.fetchReq<UpdateRoleRequest, UpdateRoleResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
385
+ return fm.fetchReq<UpdateRoleRequest, UpdateRoleResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
386
386
  }
387
387
  static DeleteRole(req: DeleteRoleRequest, initReq?: fm.InitReq): Promise<DeleteRoleResponse> {
388
388
  return fm.fetchReq<DeleteRoleRequest, DeleteRoleResponse>(`/apis/ghippo.io/v1alpha1/roles/${req["name"]}`, {...initReq, method: "DELETE"})
@@ -90,24 +90,24 @@ export class SecurityPolicy {
90
90
  return fm.fetchReq<GetPasswordPolicyRequest, GetPasswordPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/password?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
91
91
  }
92
92
  static SetPasswordPolicy(req: SetPasswordPolicyRequest, initReq?: fm.InitReq): Promise<SetPasswordPolicyResponse> {
93
- return fm.fetchReq<SetPasswordPolicyRequest, SetPasswordPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/password`, {...initReq, method: "PUT", body: JSON.stringify(req)})
93
+ return fm.fetchReq<SetPasswordPolicyRequest, SetPasswordPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/password`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
94
94
  }
95
95
  static GetAccountLockoutPolicy(req: GetAccountLockoutPolicyRequest, initReq?: fm.InitReq): Promise<GetAccountLockoutPolicyResponse> {
96
96
  return fm.fetchReq<GetAccountLockoutPolicyRequest, GetAccountLockoutPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/accountlockout?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
97
97
  }
98
98
  static SetAccountLockoutPolicy(req: SetAccountLockoutPolicyRequest, initReq?: fm.InitReq): Promise<SetAccountLockoutPolicyResponse> {
99
- return fm.fetchReq<SetAccountLockoutPolicyRequest, SetAccountLockoutPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/accountlockout`, {...initReq, method: "PUT", body: JSON.stringify(req)})
99
+ return fm.fetchReq<SetAccountLockoutPolicyRequest, SetAccountLockoutPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/accountlockout`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
100
100
  }
101
101
  static GetLogoutPolicy(req: GetLogoutPolicyRequest, initReq?: fm.InitReq): Promise<GetLogoutPolicyResponse> {
102
102
  return fm.fetchReq<GetLogoutPolicyRequest, GetLogoutPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/logout?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
103
103
  }
104
104
  static SetLogoutPolicy(req: SetLogoutPolicyRequest, initReq?: fm.InitReq): Promise<SetLogoutPolicyResponse> {
105
- return fm.fetchReq<SetLogoutPolicyRequest, SetLogoutPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/logout`, {...initReq, method: "PUT", body: JSON.stringify(req)})
105
+ return fm.fetchReq<SetLogoutPolicyRequest, SetLogoutPolicyResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/logout`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
106
106
  }
107
107
  static GetSessionTimeout(req: GetSessionTimeoutRequest, initReq?: fm.InitReq): Promise<GetSessionTimeoutResponse> {
108
108
  return fm.fetchReq<GetSessionTimeoutRequest, GetSessionTimeoutResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/sessiontimeout?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
109
109
  }
110
110
  static SetSessionTimeout(req: SetSessionTimeoutRequest, initReq?: fm.InitReq): Promise<SetSessionTimeoutResponse> {
111
- return fm.fetchReq<SetSessionTimeoutRequest, SetSessionTimeoutResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/sessiontimeout`, {...initReq, method: "PUT", body: JSON.stringify(req)})
111
+ return fm.fetchReq<SetSessionTimeoutRequest, SetSessionTimeoutResponse>(`/apis/ghippo.io/v1alpha1/securitypolicy/sessiontimeout`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
112
112
  }
113
113
  }
@@ -47,12 +47,12 @@ export type SmtpConnTestResponse = {
47
47
 
48
48
  export class SmtpSetting {
49
49
  static SetSmtpServer(req: SetSmtpServerRequest, initReq?: fm.InitReq): Promise<SetSmtpServerResponse> {
50
- return fm.fetchReq<SetSmtpServerRequest, SetSmtpServerResponse>(`/apis/ghippo.io/v1alpha1/smtp-setting`, {...initReq, method: "PUT", body: JSON.stringify(req)})
50
+ return fm.fetchReq<SetSmtpServerRequest, SetSmtpServerResponse>(`/apis/ghippo.io/v1alpha1/smtp-setting`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
51
51
  }
52
52
  static GetSmtpServer(req: GetSmtpServerRequest, initReq?: fm.InitReq): Promise<GetSmtpServerResponse> {
53
53
  return fm.fetchReq<GetSmtpServerRequest, GetSmtpServerResponse>(`/apis/ghippo.io/v1alpha1/smtp-setting?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
54
54
  }
55
55
  static SmtpServerConnTest(req: SmtpConnTestRequest, initReq?: fm.InitReq): Promise<SmtpConnTestResponse> {
56
- return fm.fetchReq<SmtpConnTestRequest, SmtpConnTestResponse>(`/apis/ghippo.io/v1alpha1/smtp-setting/conn-test`, {...initReq, method: "POST", body: JSON.stringify(req)})
56
+ return fm.fetchReq<SmtpConnTestRequest, SmtpConnTestResponse>(`/apis/ghippo.io/v1alpha1/smtp-setting/conn-test`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
57
57
  }
58
58
  }
@@ -68,7 +68,7 @@ export class Theme {
68
68
  return fm.fetchReq<GetThemeConfigRequest, GetThemeConfigResponse>(`/apis/ghippo.io/v1alpha1/themes/theme?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
69
69
  }
70
70
  static SetThemeConfig(req: SetThemeConfigRequest, initReq?: fm.InitReq): Promise<SetThemeConfigResponse> {
71
- return fm.fetchReq<SetThemeConfigRequest, SetThemeConfigResponse>(`/apis/ghippo.io/v1alpha1/themes/theme`, {...initReq, method: "POST", body: JSON.stringify(req)})
71
+ return fm.fetchReq<SetThemeConfigRequest, SetThemeConfigResponse>(`/apis/ghippo.io/v1alpha1/themes/theme`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
72
72
  }
73
73
  static ResetThemeConfig(req: ResetThemeConfigRequest, initReq?: fm.InitReq): Promise<ResetThemeConfigResponse> {
74
74
  return fm.fetchReq<ResetThemeConfigRequest, ResetThemeConfigResponse>(`/apis/ghippo.io/v1alpha1/themes/theme/reset`, {...initReq, method: "POST"})
@@ -80,7 +80,7 @@ export class Theme {
80
80
  return fm.fetchReq<GetLoginThemeConfigRequest, GetLoginThemeConfigResponse>(`/apis/ghippo.io/v1alpha1/themes/login_page?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
81
81
  }
82
82
  static SetLoginThemeConfig(req: SetLoginThemeConfigRequest, initReq?: fm.InitReq): Promise<SetLoginThemeConfigResponse> {
83
- return fm.fetchReq<SetLoginThemeConfigRequest, SetLoginThemeConfigResponse>(`/apis/ghippo.io/v1alpha1/themes/login_page`, {...initReq, method: "POST", body: JSON.stringify(req)})
83
+ return fm.fetchReq<SetLoginThemeConfigRequest, SetLoginThemeConfigResponse>(`/apis/ghippo.io/v1alpha1/themes/login_page`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
84
84
  }
85
85
  static ResetLoginThemeConfig(req: ResetLoginThemeConfigRequest, initReq?: fm.InitReq): Promise<ResetLoginThemeConfigResponse> {
86
86
  return fm.fetchReq<ResetLoginThemeConfigRequest, ResetLoginThemeConfigResponse>(`/apis/ghippo.io/v1alpha1/themes/login_page/reset`, {...initReq, method: "POST"})
@@ -34,7 +34,7 @@ export class TopNavigator {
34
34
  return fm.fetchReq<TopNavRequest, TopNavResponse>(`/apis/ghippo.io/v1alpha1/top-nav/info?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
35
35
  }
36
36
  static SetTopNav(req: SetTopNavRequest, initReq?: fm.InitReq): Promise<SetTopNavResponse> {
37
- return fm.fetchReq<SetTopNavRequest, SetTopNavResponse>(`/apis/ghippo.io/v1alpha1/top-nav`, {...initReq, method: "POST", body: JSON.stringify(req)})
37
+ return fm.fetchReq<SetTopNavRequest, SetTopNavResponse>(`/apis/ghippo.io/v1alpha1/top-nav`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
38
38
  }
39
39
  static ResetTopNav(req: ResetTopNavRequest, initReq?: fm.InitReq): Promise<ResetTopNavResponse> {
40
40
  return fm.fetchReq<ResetTopNavRequest, ResetTopNavResponse>(`/apis/ghippo.io/v1alpha1/top-nav/reset`, {...initReq, method: "POST"})
@@ -27,7 +27,15 @@ export type CheckUserRequest = {
27
27
  }
28
28
 
29
29
  export type CheckUserResponse = {
30
- allow?: boolean
30
+ existed?: boolean
31
+ }
32
+
33
+ export type CheckUserEmailRequest = {
34
+ username?: string
35
+ }
36
+
37
+ export type CheckUserEmailResponse = {
38
+ existed?: boolean
31
39
  }
32
40
 
33
41
  export type GetUserRequest = {
@@ -198,20 +206,23 @@ export class Users {
198
206
  static CheckUser(req: CheckUserRequest, initReq?: fm.InitReq): Promise<CheckUserResponse> {
199
207
  return fm.fetchReq<CheckUserRequest, CheckUserResponse>(`/apis/ghippo.io/v1alpha1/users/check/${req["username"]}?${fm.renderURLSearchParams(req, ["username"])}`, {...initReq, method: "GET"})
200
208
  }
209
+ static CheckUserEmail(req: CheckUserEmailRequest, initReq?: fm.InitReq): Promise<CheckUserEmailResponse> {
210
+ return fm.fetchReq<CheckUserEmailRequest, CheckUserEmailResponse>(`/apis/ghippo.io/v1alpha1/users/check-user-email/${req["username"]}?${fm.renderURLSearchParams(req, ["username"])}`, {...initReq, method: "GET"})
211
+ }
201
212
  static GetUser(req: GetUserRequest, initReq?: fm.InitReq): Promise<GetUserResponse> {
202
213
  return fm.fetchReq<GetUserRequest, GetUserResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
203
214
  }
204
215
  static CreateUser(req: CreateUserRequest, initReq?: fm.InitReq): Promise<CreateUserResponse> {
205
- return fm.fetchReq<CreateUserRequest, CreateUserResponse>(`/apis/ghippo.io/v1alpha1/users`, {...initReq, method: "POST", body: JSON.stringify(req)})
216
+ return fm.fetchReq<CreateUserRequest, CreateUserResponse>(`/apis/ghippo.io/v1alpha1/users`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
206
217
  }
207
218
  static DeleteUser(req: DeleteUserRequest, initReq?: fm.InitReq): Promise<DeleteUserResponse> {
208
219
  return fm.fetchReq<DeleteUserRequest, DeleteUserResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}`, {...initReq, method: "DELETE"})
209
220
  }
210
221
  static UpdateUser(req: UpdateUserRequest, initReq?: fm.InitReq): Promise<UpdateUserResponse> {
211
- return fm.fetchReq<UpdateUserRequest, UpdateUserResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
222
+ return fm.fetchReq<UpdateUserRequest, UpdateUserResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
212
223
  }
213
224
  static SetUserPassword(req: SetUserPasswordRequest, initReq?: fm.InitReq): Promise<SetUserPasswordResponse> {
214
- return fm.fetchReq<SetUserPasswordRequest, SetUserPasswordResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/password`, {...initReq, method: "PUT", body: JSON.stringify(req)})
225
+ return fm.fetchReq<SetUserPasswordRequest, SetUserPasswordResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/password`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
215
226
  }
216
227
  static ListUserGroups(req: ListUserGroupsRequest, initReq?: fm.InitReq): Promise<ListUserGroupsResponse> {
217
228
  return fm.fetchReq<ListUserGroupsRequest, ListUserGroupsResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/groups?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
@@ -223,13 +234,13 @@ export class Users {
223
234
  return fm.fetchReq<ListUserSubjectRequest, ListUserSubjectResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/subjects?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
224
235
  }
225
236
  static UpdateUserRoles(req: UpdateUserRolesRequest, initReq?: fm.InitReq): Promise<UpdateUserRolesResponse> {
226
- return fm.fetchReq<UpdateUserRolesRequest, UpdateUserRolesResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/roles`, {...initReq, method: "PUT", body: JSON.stringify(req)})
237
+ return fm.fetchReq<UpdateUserRolesRequest, UpdateUserRolesResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/roles`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
227
238
  }
228
239
  static ListUserAccessTokens(req: ListUserAccessTokensRequest, initReq?: fm.InitReq): Promise<ListUserAccessTokensResponse> {
229
240
  return fm.fetchReq<ListUserAccessTokensRequest, ListUserAccessTokensResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/accesstokens?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
230
241
  }
231
242
  static CreateUserAccessToken(req: CreateUserAccessTokenRequest, initReq?: fm.InitReq): Promise<CreateUserAccessTokenResponse> {
232
- return fm.fetchReq<CreateUserAccessTokenRequest, CreateUserAccessTokenResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/accesstoken`, {...initReq, method: "POST", body: JSON.stringify(req)})
243
+ return fm.fetchReq<CreateUserAccessTokenRequest, CreateUserAccessTokenResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/accesstoken`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
233
244
  }
234
245
  static DeleteUserAccessToken(req: DeleteUserAccessTokenRequest, initReq?: fm.InitReq): Promise<DeleteUserAccessTokenResponse> {
235
246
  return fm.fetchReq<DeleteUserAccessTokenRequest, DeleteUserAccessTokenResponse>(`/apis/ghippo.io/v1alpha1/users/${req["id"]}/accesstokens/${req["aid"]}`, {...initReq, method: "DELETE"})
@@ -486,16 +486,16 @@ export class Workspace {
486
486
  return fm.fetchReq<ListAvailableSharedResourcesByWorkspaceRequest, ListAvailableSharedResourcesByWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/available-sharedresources?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
487
487
  }
488
488
  static BindExclusiveResourceToWorkspace(req: BindExclusiveResourceToWorkspaceRequest, initReq?: fm.InitReq): Promise<BindExclusiveResourceToWorkspaceResponse> {
489
- return fm.fetchReq<BindExclusiveResourceToWorkspaceRequest, BindExclusiveResourceToWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/bind-exclusiveresource`, {...initReq, method: "POST", body: JSON.stringify(req)})
489
+ return fm.fetchReq<BindExclusiveResourceToWorkspaceRequest, BindExclusiveResourceToWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/bind-exclusiveresource`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
490
490
  }
491
491
  static BindSharedResourceToWorkspace(req: BindSharedResourceToWorkspaceRequest, initReq?: fm.InitReq): Promise<BindSharedResourceToWorkspaceResponse> {
492
- return fm.fetchReq<BindSharedResourceToWorkspaceRequest, BindSharedResourceToWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/bind-sharedresource`, {...initReq, method: "POST", body: JSON.stringify(req)})
492
+ return fm.fetchReq<BindSharedResourceToWorkspaceRequest, BindSharedResourceToWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/bind-sharedresource`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
493
493
  }
494
494
  static UnbindResourceFromWorkspace(req: UnbindResourceFromWorkspaceRequest, initReq?: fm.InitReq): Promise<UnbindResourceFromWorkspaceResponse> {
495
- return fm.fetchReq<UnbindResourceFromWorkspaceRequest, UnbindResourceFromWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/unbind-resource`, {...initReq, method: "PUT", body: JSON.stringify(req)})
495
+ return fm.fetchReq<UnbindResourceFromWorkspaceRequest, UnbindResourceFromWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/unbind-resource`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
496
496
  }
497
497
  static CreateWorkspace(req: CreateWorkspaceRequest, initReq?: fm.InitReq): Promise<CreateWorkspaceResponse> {
498
- return fm.fetchReq<CreateWorkspaceRequest, CreateWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces`, {...initReq, method: "POST", body: JSON.stringify(req)})
498
+ return fm.fetchReq<CreateWorkspaceRequest, CreateWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
499
499
  }
500
500
  static GetWorkspace(req: GetWorkspaceRequest, initReq?: fm.InitReq): Promise<GetWorkspaceResponse> {
501
501
  return fm.fetchReq<GetWorkspaceRequest, GetWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}?${fm.renderURLSearchParams(req, ["workspaceId"])}`, {...initReq, method: "GET"})
@@ -513,7 +513,7 @@ export class Workspace {
513
513
  return fm.fetchReq<ListFolderTreeRequest, ListFolderTreeResponse>(`/apis/ghippo.io/v1alpha1/folders-tree?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
514
514
  }
515
515
  static CreateFolder(req: CreateFolderRequest, initReq?: fm.InitReq): Promise<CreateFolderResponse> {
516
- return fm.fetchReq<CreateFolderRequest, CreateFolderResponse>(`/apis/ghippo.io/v1alpha1/folders`, {...initReq, method: "POST", body: JSON.stringify(req)})
516
+ return fm.fetchReq<CreateFolderRequest, CreateFolderResponse>(`/apis/ghippo.io/v1alpha1/folders`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
517
517
  }
518
518
  static GetFolder(req: GetFolderRequest, initReq?: fm.InitReq): Promise<GetFolderResponse> {
519
519
  return fm.fetchReq<GetFolderRequest, GetFolderResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}?${fm.renderURLSearchParams(req, ["folderId"])}`, {...initReq, method: "GET"})
@@ -522,16 +522,16 @@ export class Workspace {
522
522
  return fm.fetchReq<DeleteFolderRequest, DeleteFolderResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}`, {...initReq, method: "DELETE"})
523
523
  }
524
524
  static UpdateFolder(req: UpdateFolderRequest, initReq?: fm.InitReq): Promise<UpdateFolderResponse> {
525
- return fm.fetchReq<UpdateFolderRequest, UpdateFolderResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
525
+ return fm.fetchReq<UpdateFolderRequest, UpdateFolderResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
526
526
  }
527
527
  static Authorize(req: AuthorizeRequest, initReq?: fm.InitReq): Promise<AuthorizeResponse> {
528
- return fm.fetchReq<AuthorizeRequest, AuthorizeResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}/authorize`, {...initReq, method: "POST", body: JSON.stringify(req)})
528
+ return fm.fetchReq<AuthorizeRequest, AuthorizeResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}/authorize`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
529
529
  }
530
530
  static Deauthorize(req: DeauthorizeRequest, initReq?: fm.InitReq): Promise<DeauthorizeResponse> {
531
- return fm.fetchReq<DeauthorizeRequest, DeauthorizeResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}/deauthorize`, {...initReq, method: "PUT", body: JSON.stringify(req)})
531
+ return fm.fetchReq<DeauthorizeRequest, DeauthorizeResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}/deauthorize`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
532
532
  }
533
533
  static Reauthorize(req: ReauthorizeRequest, initReq?: fm.InitReq): Promise<ReauthorizeResponse> {
534
- return fm.fetchReq<ReauthorizeRequest, ReauthorizeResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}/reauthorize`, {...initReq, method: "PUT", body: JSON.stringify(req)})
534
+ return fm.fetchReq<ReauthorizeRequest, ReauthorizeResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}/reauthorize`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
535
535
  }
536
536
  static ListMembersRolesByFolder(req: ListMembersRolesByFolderRequest, initReq?: fm.InitReq): Promise<ListMembersRolesByFolderResponse> {
537
537
  return fm.fetchReq<ListMembersRolesByFolderRequest, ListMembersRolesByFolderResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}/members-roles?${fm.renderURLSearchParams(req, ["folderId"])}`, {...initReq, method: "GET"})
@@ -543,10 +543,10 @@ export class Workspace {
543
543
  return fm.fetchReq<ListSharedResourceTypesRequest, ListSharedResourceTypesResponse>(`/apis/ghippo.io/v1alpha1/sharedresource-types?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
544
544
  }
545
545
  static BindSharedResourceAndSetQuotaHardToWorkspace(req: BindSharedResourceAndSetQuotaHardToWorkspaceRequest, initReq?: fm.InitReq): Promise<BindSharedResourceAndSetQuotaHardToWorkspaceResponse> {
546
- return fm.fetchReq<BindSharedResourceAndSetQuotaHardToWorkspaceRequest, BindSharedResourceAndSetQuotaHardToWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/bind-sharedresource-setquota`, {...initReq, method: "POST", body: JSON.stringify(req)})
546
+ return fm.fetchReq<BindSharedResourceAndSetQuotaHardToWorkspaceRequest, BindSharedResourceAndSetQuotaHardToWorkspaceResponse>(`/apis/ghippo.io/v1alpha1/workspaces/${req["workspaceId"]}/bind-sharedresource-setquota`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
547
547
  }
548
548
  static SetQuotaHardForWorkspaceSharedResource(req: SetQuotaHardForWorkspaceSharedResourceRequest, initReq?: fm.InitReq): Promise<SetQuotaHardForWorkspaceSharedResourceResponse> {
549
- return fm.fetchReq<SetQuotaHardForWorkspaceSharedResourceRequest, SetQuotaHardForWorkspaceSharedResourceResponse>(`/apis/ghippo.io/v1alpha1/workspace-sharedresource-quota-hard`, {...initReq, method: "PUT", body: JSON.stringify(req)})
549
+ return fm.fetchReq<SetQuotaHardForWorkspaceSharedResourceRequest, SetQuotaHardForWorkspaceSharedResourceResponse>(`/apis/ghippo.io/v1alpha1/workspace-sharedresource-quota-hard`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
550
550
  }
551
551
  static GetWorkspaceSharedResourceQuota(req: GetWorkspaceSharedResourceQuotaRequest, initReq?: fm.InitReq): Promise<GetWorkspaceSharedResourceQuotaResponse> {
552
552
  return fm.fetchReq<GetWorkspaceSharedResourceQuotaRequest, GetWorkspaceSharedResourceQuotaResponse>(`/apis/ghippo.io/v1alpha1/workspace-sharedresource-quota?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -555,7 +555,7 @@ export class Workspace {
555
555
  return fm.fetchReq<ListResourceQuotaTypesRequest, ListResourceQuotaTypesResponse>(`/apis/ghippo.io/v1alpha1/resourcequota-types?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
556
556
  }
557
557
  static UpdateQuotaCheck(req: UpdateQuotaCheckRequest, initReq?: fm.InitReq): Promise<UpdateQuotaCheckResponse> {
558
- return fm.fetchReq<UpdateQuotaCheckRequest, UpdateQuotaCheckResponse>(`/apis/ghippo.io/v1alpha1/update-quota-check`, {...initReq, method: "POST", body: JSON.stringify(req)})
558
+ return fm.fetchReq<UpdateQuotaCheckRequest, UpdateQuotaCheckResponse>(`/apis/ghippo.io/v1alpha1/update-quota-check`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
559
559
  }
560
560
  static FolderListUsers(req: FolderListUsersRequest, initReq?: fm.InitReq): Promise<FolderListUsersResponse> {
561
561
  return fm.fetchReq<FolderListUsersRequest, FolderListUsersResponse>(`/apis/ghippo.io/v1alpha1/folders/${req["folderId"]}/users?${fm.renderURLSearchParams(req, ["folderId"])}`, {...initReq, method: "GET"})
@@ -45,12 +45,12 @@ export type SetAutoClearAuditsRequest = {
45
45
  export type SetAutoClearAuditsResponse = {
46
46
  }
47
47
 
48
- export class AuditV1alpha2 {
48
+ export class Audit {
49
49
  static ClearAudits(req: ClearAuditsRequest, initReq?: fm.InitReq): Promise<ClearAuditsResponse> {
50
- return fm.fetchReq<ClearAuditsRequest, ClearAuditsResponse>(`/apis/ghippo.io/v1alpha2/audits/clear`, {...initReq, method: "POST", body: JSON.stringify(req)})
50
+ return fm.fetchReq<ClearAuditsRequest, ClearAuditsResponse>(`/apis/ghippo.io/v1alpha2/audits/clear`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
51
51
  }
52
52
  static SetAutoClearAudits(req: SetAutoClearAuditsRequest, initReq?: fm.InitReq): Promise<SetAutoClearAuditsResponse> {
53
- return fm.fetchReq<SetAutoClearAuditsRequest, SetAutoClearAuditsResponse>(`/apis/ghippo.io/v1alpha2/audits/clear`, {...initReq, method: "PUT", body: JSON.stringify(req)})
53
+ return fm.fetchReq<SetAutoClearAuditsRequest, SetAutoClearAuditsResponse>(`/apis/ghippo.io/v1alpha2/audits/clear`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
54
54
  }
55
55
  static ExportAudit(req: ExportAuditRequest, initReq?: fm.InitReq): Promise<GoogleApiHttpbody.HttpBody> {
56
56
  return fm.fetchReq<ExportAuditRequest, GoogleApiHttpbody.HttpBody>(`/apis/ghippo.io/v1alpha2/audits/export?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -184,7 +184,7 @@ export type GetExportURIResponse = {
184
184
  method?: RequestMethod
185
185
  }
186
186
 
187
- export class AuditV1alpha3 {
187
+ export class Audit {
188
188
  static ListAudits(req: ListAuditsRequest, initReq?: fm.InitReq): Promise<ListAuditsResponse> {
189
189
  return fm.fetchReq<ListAuditsRequest, ListAuditsResponse>(`/apis/ghippo.io/v1alpha3/audits?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
190
190
  }
@@ -204,16 +204,16 @@ export class AuditV1alpha3 {
204
204
  return fm.fetchReq<ExportAuditsRequest, GoogleApiHttpbody.HttpBody>(`/apis/ghippo.io/v1alpha3/audits/export?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
205
205
  }
206
206
  static ClearKubeAuditsNow(req: ClearKubeAuditsNowRequest, initReq?: fm.InitReq): Promise<ClearKubeAuditsNowResponse> {
207
- return fm.fetchReq<ClearKubeAuditsNowRequest, ClearKubeAuditsNowResponse>(`/apis/ghippo.io/v1alpha3/audits/kube/clear`, {...initReq, method: "POST", body: JSON.stringify(req)})
207
+ return fm.fetchReq<ClearKubeAuditsNowRequest, ClearKubeAuditsNowResponse>(`/apis/ghippo.io/v1alpha3/audits/kube/clear`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
208
208
  }
209
209
  static SetAutoClearKubeAuditSetting(req: SetAutoClearKubeAuditSettingRequest, initReq?: fm.InitReq): Promise<SetAutoClearKubeAuditSettingResponse> {
210
- return fm.fetchReq<SetAutoClearKubeAuditSettingRequest, SetAutoClearKubeAuditSettingResponse>(`/apis/ghippo.io/v1alpha3/audits/set-auto-clear/kube`, {...initReq, method: "PUT", body: JSON.stringify(req)})
210
+ return fm.fetchReq<SetAutoClearKubeAuditSettingRequest, SetAutoClearKubeAuditSettingResponse>(`/apis/ghippo.io/v1alpha3/audits/set-auto-clear/kube`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
211
211
  }
212
212
  static ClearAuditsNow(req: ClearAuditsNowRequest, initReq?: fm.InitReq): Promise<ClearAuditsNowResponse> {
213
- return fm.fetchReq<ClearAuditsNowRequest, ClearAuditsNowResponse>(`/apis/ghippo.io/v1alpha3/audits/clear`, {...initReq, method: "POST", body: JSON.stringify(req)})
213
+ return fm.fetchReq<ClearAuditsNowRequest, ClearAuditsNowResponse>(`/apis/ghippo.io/v1alpha3/audits/clear`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
214
214
  }
215
215
  static SetAutoClearAuditSetting(req: SetAutoClearAuditSettingRequest, initReq?: fm.InitReq): Promise<SetAutoClearAuditSettingResponse> {
216
- return fm.fetchReq<SetAutoClearAuditSettingRequest, SetAutoClearAuditSettingResponse>(`/apis/ghippo.io/v1alpha3/audits/set-auto-clear`, {...initReq, method: "PUT", body: JSON.stringify(req)})
216
+ return fm.fetchReq<SetAutoClearAuditSettingRequest, SetAutoClearAuditSettingResponse>(`/apis/ghippo.io/v1alpha3/audits/set-auto-clear`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
217
217
  }
218
218
  static GetExportURI(req: GetExportURIRequest, initReq?: fm.InitReq): Promise<GetExportURIResponse> {
219
219
  return fm.fetchReq<GetExportURIRequest, GetExportURIResponse>(`/apis/ghippo.io/v1alpha3/audits/export/uri?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})