@daocloud-proto/ghippo 0.1.0 → 0.1.2
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 +109 -0
- package/package.json +6 -6
- package/v1alpha1/about.pb.ts +63 -0
- package/v1alpha1/audit.pb.ts +103 -0
- package/v1alpha1/batchaudit.pb.ts +19 -0
- package/v1alpha1/client.pb.ts +79 -0
- package/v1alpha1/currentuser.pb.ts +273 -0
- package/v1alpha1/feature_gate.pb.ts +32 -0
- package/v1alpha1/gproduct.pb.ts +28 -0
- package/v1alpha1/gproductlicense.pb.ts +109 -0
- package/v1alpha1/group.pb.ts +187 -0
- package/v1alpha1/idp.pb.ts +131 -0
- package/v1alpha1/keycloakevent.pb.ts +37 -0
- package/v1alpha1/login.pb.ts +82 -0
- package/v1alpha1/loginpage.pb.ts +62 -0
- package/v1alpha1/message.pb.ts +114 -0
- package/v1alpha1/oauth2.pb.ts +76 -0
- package/v1alpha1/oidc.pb.ts +100 -0
- package/v1alpha1/openapi.pb.ts +48 -0
- package/{productnav.pb.ts → v1alpha1/productnav.pb.ts} +9 -4
- package/v1alpha1/publish.pb.ts +23 -0
- package/v1alpha1/recordfiling.pb.ts +58 -0
- package/v1alpha1/role.pb.ts +318 -0
- package/v1alpha1/securitypolicy.pb.ts +201 -0
- package/v1alpha1/sms.pb.ts +33 -0
- package/v1alpha1/smtpsetting.pb.ts +58 -0
- package/v1alpha1/theme.pb.ts +121 -0
- package/v1alpha1/topnav.pb.ts +42 -0
- package/v1alpha1/user.pb.ts +325 -0
- package/v1alpha1/webhook.pb.ts +180 -0
- package/v1alpha1/workspace.pb.ts +629 -0
- package/v1alpha2/audit.pb.ts +7 -0
- package/v1alpha2/auditv2.pb.ts +58 -0
- package/v1alpha2/ldap.pb.ts +253 -0
- package/v1alpha3/audit.pb.ts +225 -0
- package/topnav.pb.ts +0 -24
- package/workspace.pb.ts +0 -21
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
2
|
+
"name": "@daocloud-proto/ghippo",
|
|
3
|
+
"version":"0.1.2",
|
|
4
|
+
"description": "",
|
|
5
|
+
"author": "",
|
|
6
|
+
"license": "ISC"
|
|
7
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
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 ListDevelopersRequest = {
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type ListDevelopersResponse = {
|
|
12
|
+
items?: Developer[]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type Developer = {
|
|
16
|
+
name?: string
|
|
17
|
+
message?: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type ListOpenSourcesRequest = {
|
|
21
|
+
page?: number
|
|
22
|
+
pageSize?: number
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type ListOpenSourcesResponse = {
|
|
26
|
+
items?: OpenSource[]
|
|
27
|
+
pagination?: Pagination
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type OpenSource = {
|
|
31
|
+
name?: string
|
|
32
|
+
license?: string
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type Pagination = {
|
|
36
|
+
total?: number
|
|
37
|
+
page?: number
|
|
38
|
+
pageSize?: number
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export type ListGProductVersionsRequest = {
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type ListGProductVersionsResponse = {
|
|
45
|
+
items?: GProductVersion[]
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type GProductVersion = {
|
|
49
|
+
name?: string
|
|
50
|
+
version?: string
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export class About {
|
|
54
|
+
static ListDevelopers(req: ListDevelopersRequest, initReq?: fm.InitReq): Promise<ListDevelopersResponse> {
|
|
55
|
+
return fm.fetchReq<ListDevelopersRequest, ListDevelopersResponse>(`/apis/ghippo.io/v1alpha1/about/developers?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
56
|
+
}
|
|
57
|
+
static ListOpenSources(req: ListOpenSourcesRequest, initReq?: fm.InitReq): Promise<ListOpenSourcesResponse> {
|
|
58
|
+
return fm.fetchReq<ListOpenSourcesRequest, ListOpenSourcesResponse>(`/apis/ghippo.io/v1alpha1/about/opensources?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
59
|
+
}
|
|
60
|
+
static ListGProductVersions(req: ListGProductVersionsRequest, initReq?: fm.InitReq): Promise<ListGProductVersionsResponse> {
|
|
61
|
+
return fm.fetchReq<ListGProductVersionsRequest, ListGProductVersionsResponse>(`/apis/ghippo.io/v1alpha1/about/versions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
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 StatusType {
|
|
10
|
+
all = "all",
|
|
11
|
+
succeeded = "succeeded",
|
|
12
|
+
failed = "failed",
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export enum SearchType {
|
|
16
|
+
fuzzy = "fuzzy",
|
|
17
|
+
exact = "exact",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export enum ExternalType {
|
|
21
|
+
loginFailed = "loginFailed",
|
|
22
|
+
forgetPassword = "forgetPassword",
|
|
23
|
+
resetPassword = "resetPassword",
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type Pagination = {
|
|
27
|
+
total?: number
|
|
28
|
+
page?: number
|
|
29
|
+
pageSize?: number
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type GetAutoClearAuditTimeRequest = {
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type GetAutoClearAuditTimeResponse = {
|
|
36
|
+
kubeDays?: number
|
|
37
|
+
ghippoDays?: number
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export type GetLimitRangeTimeRequest = {
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export type GetLimitRangeTimeResponse = {
|
|
44
|
+
day?: number
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export type ExternalAuditRequest = {
|
|
48
|
+
externalType?: ExternalType
|
|
49
|
+
resourceName?: string
|
|
50
|
+
code?: number
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type ExternalAuditResponse = {
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type UserReport = {
|
|
57
|
+
userName?: string
|
|
58
|
+
totalCount?: number
|
|
59
|
+
successCount?: number
|
|
60
|
+
failedCount?: number
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type ResourceReport = {
|
|
64
|
+
resourceType?: string
|
|
65
|
+
eventName?: string
|
|
66
|
+
count?: number
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export type GetAuditUserReportRequest = {
|
|
70
|
+
start?: string
|
|
71
|
+
end?: string
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type GetAuditUserReportResponse = {
|
|
75
|
+
items?: UserReport[]
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type GetAuditResourceReportRequest = {
|
|
79
|
+
start?: string
|
|
80
|
+
end?: string
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export type GetAuditResourceReportResponse = {
|
|
84
|
+
items?: ResourceReport[]
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export class Audit {
|
|
88
|
+
static GetAutoClearAuditTime(req: GetAutoClearAuditTimeRequest, initReq?: fm.InitReq): Promise<GetAutoClearAuditTimeResponse> {
|
|
89
|
+
return fm.fetchReq<GetAutoClearAuditTimeRequest, GetAutoClearAuditTimeResponse>(`/apis/ghippo.io/v1alpha1/audits/clear?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
90
|
+
}
|
|
91
|
+
static GetLimitRangeTime(req: GetLimitRangeTimeRequest, initReq?: fm.InitReq): Promise<GetLimitRangeTimeResponse> {
|
|
92
|
+
return fm.fetchReq<GetLimitRangeTimeRequest, GetLimitRangeTimeResponse>(`/apis/ghippo.io/v1alpha1/audits/limit-range?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
93
|
+
}
|
|
94
|
+
static ExternalAudit(req: ExternalAuditRequest, initReq?: fm.InitReq): Promise<ExternalAuditResponse> {
|
|
95
|
+
return fm.fetchReq<ExternalAuditRequest, ExternalAuditResponse>(`/apis/ghippo.io/v1alpha1/audits/external?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
96
|
+
}
|
|
97
|
+
static GetAuditUserReport(req: GetAuditUserReportRequest, initReq?: fm.InitReq): Promise<GetAuditUserReportResponse> {
|
|
98
|
+
return fm.fetchReq<GetAuditUserReportRequest, GetAuditUserReportResponse>(`/apis/ghippo.io/v1alpha1/audits/reports/users?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
99
|
+
}
|
|
100
|
+
static GetAuditResourceReport(req: GetAuditResourceReportRequest, initReq?: fm.InitReq): Promise<GetAuditResourceReportResponse> {
|
|
101
|
+
return fm.fetchReq<GetAuditResourceReportRequest, GetAuditResourceReportResponse>(`/apis/ghippo.io/v1alpha1/audits/reports/resources?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 BatchInsertAuditsRequest = {
|
|
9
|
+
audits?: string
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type BatchInsertAuditsResponse = {
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export class BatchAudits {
|
|
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, fm.replacer)})
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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 ClientInfo = {
|
|
9
|
+
id?: string
|
|
10
|
+
clientId?: string
|
|
11
|
+
name?: string
|
|
12
|
+
secret?: string
|
|
13
|
+
baseUrl?: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type Pagination = {
|
|
17
|
+
total?: number
|
|
18
|
+
page?: number
|
|
19
|
+
pageSize?: number
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type CreateClientRequest = {
|
|
23
|
+
clientId?: string
|
|
24
|
+
baseUrl?: string
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export type CreateClientResponse = {
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type GetClientRequest = {
|
|
31
|
+
id?: string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type GetClientResponse = {
|
|
35
|
+
client?: ClientInfo
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type ListClientsRequest = {
|
|
39
|
+
clientId?: string
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type ListClientsResponse = {
|
|
43
|
+
items?: ClientInfo[]
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export type UpdateClientRequest = {
|
|
47
|
+
id?: string
|
|
48
|
+
clientId?: string
|
|
49
|
+
name?: string
|
|
50
|
+
baseUrl?: string
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type UpdateClientResponse = {
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type DeleteClientRequest = {
|
|
57
|
+
id?: string
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type DeleteClientResponse = {
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export class Client {
|
|
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, fm.replacer)})
|
|
66
|
+
}
|
|
67
|
+
static GetClient(req: GetClientRequest, initReq?: fm.InitReq): Promise<GetClientResponse> {
|
|
68
|
+
return fm.fetchReq<GetClientRequest, GetClientResponse>(`/apis/ghippo.io/v1alpha1/clients/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
|
|
69
|
+
}
|
|
70
|
+
static ListClients(req: ListClientsRequest, initReq?: fm.InitReq): Promise<ListClientsResponse> {
|
|
71
|
+
return fm.fetchReq<ListClientsRequest, ListClientsResponse>(`/apis/ghippo.io/v1alpha1/clients?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
72
|
+
}
|
|
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, fm.replacer)})
|
|
75
|
+
}
|
|
76
|
+
static DeleteClient(req: DeleteClientRequest, initReq?: fm.InitReq): Promise<DeleteClientResponse> {
|
|
77
|
+
return fm.fetchReq<DeleteClientRequest, DeleteClientResponse>(`/apis/ghippo.io/v1alpha1/clients/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,273 @@
|
|
|
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 GlobalPermission {
|
|
10
|
+
Unknown = "Unknown",
|
|
11
|
+
ListUser = "ListUser",
|
|
12
|
+
CreateUser = "CreateUser",
|
|
13
|
+
UpdateUser = "UpdateUser",
|
|
14
|
+
DeleteUser = "DeleteUser",
|
|
15
|
+
AuthorizeUser = "AuthorizeUser",
|
|
16
|
+
ListGroup = "ListGroup",
|
|
17
|
+
CreateGroup = "CreateGroup",
|
|
18
|
+
UpdateGroup = "UpdateGroup",
|
|
19
|
+
DeleteGroup = "DeleteGroup",
|
|
20
|
+
UpdateGroupUser = "UpdateGroupUser",
|
|
21
|
+
AuthorizeGroup = "AuthorizeGroup",
|
|
22
|
+
GetRole = "GetRole",
|
|
23
|
+
GetIdp = "GetIdp",
|
|
24
|
+
CreateIdp = "CreateIdp",
|
|
25
|
+
UpdateIdp = "UpdateIdp",
|
|
26
|
+
DeleteIdp = "DeleteIdp",
|
|
27
|
+
GetAudit = "GetAudit",
|
|
28
|
+
DeleteAudit = "DeleteAudit",
|
|
29
|
+
GetSecurityPolicy = "GetSecurityPolicy",
|
|
30
|
+
UpdateSecurityPolicy = "UpdateSecurityPolicy",
|
|
31
|
+
GetSMTP = "GetSMTP",
|
|
32
|
+
UpdateSMTP = "UpdateSMTP",
|
|
33
|
+
GetAppearance = "GetAppearance",
|
|
34
|
+
UpdateAppearance = "UpdateAppearance",
|
|
35
|
+
GetLicense = "GetLicense",
|
|
36
|
+
UpdateLicense = "UpdateLicense",
|
|
37
|
+
DeleteLicense = "DeleteLicense",
|
|
38
|
+
GetWorkspace = "GetWorkspace",
|
|
39
|
+
GetAboutPlatform = "GetAboutPlatform",
|
|
40
|
+
DeleteRole = "DeleteRole",
|
|
41
|
+
UpdateRole = "UpdateRole",
|
|
42
|
+
CreateRole = "CreateRole",
|
|
43
|
+
AccountingAndBilling = "AccountingAndBilling",
|
|
44
|
+
ReportManagement = "ReportManagement",
|
|
45
|
+
GetClient = "GetClient",
|
|
46
|
+
DeleteClient = "DeleteClient",
|
|
47
|
+
UpdateClient = "UpdateClient",
|
|
48
|
+
CreateClient = "CreateClient",
|
|
49
|
+
EditCluster = "EditCluster",
|
|
50
|
+
GetAccountingBilling = "GetAccountingBilling",
|
|
51
|
+
UpdateAccountingBilling = "UpdateAccountingBilling",
|
|
52
|
+
GetReportManagement = "GetReportManagement",
|
|
53
|
+
UpdateReportManagement = "UpdateReportManagement",
|
|
54
|
+
GetBillingSetting = "GetBillingSetting",
|
|
55
|
+
UpdateBillingSetting = "UpdateBillingSetting",
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export enum CertifyType {
|
|
59
|
+
AliPay = "AliPay",
|
|
60
|
+
WeChat = "WeChat",
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type UpdateEmailRequest = {
|
|
64
|
+
email?: string
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type UpdateEmailResponse = {
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export type UpdatePasswordRequest = {
|
|
71
|
+
password?: string
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type UpdatePasswordResponse = {
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export type UpdateLanguageRequest = {
|
|
78
|
+
locale?: string
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export type UpdateLanguageResponse = {
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export type GetUserRequest = {
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export type GetUserResponse = {
|
|
88
|
+
uid?: string
|
|
89
|
+
username?: string
|
|
90
|
+
email?: string
|
|
91
|
+
locale?: string
|
|
92
|
+
source?: string
|
|
93
|
+
phoneNumber?: string
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export type ListAccessTokensRequest = {
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export type ListAccessTokensResponse = {
|
|
100
|
+
items?: AccessToken[]
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export type AccessToken = {
|
|
104
|
+
id?: string
|
|
105
|
+
name?: string
|
|
106
|
+
updatedAt?: string
|
|
107
|
+
createdAt?: string
|
|
108
|
+
expiredAt?: string
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export type CreateAccessTokenRequest = {
|
|
112
|
+
name?: string
|
|
113
|
+
expiredAt?: string
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export type CreateAccessTokenResponse = {
|
|
117
|
+
id?: string
|
|
118
|
+
token?: string
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export type DeleteAccessTokenRequest = {
|
|
122
|
+
id?: string
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export type DeleteAccessTokenResponse = {
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export type PasswordDescriptionRequest = {
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export type PasswordDescriptionResponse = {
|
|
132
|
+
allowModify?: boolean
|
|
133
|
+
emptyPassword?: boolean
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export type SetCurrentUserPasswordRequest = {
|
|
137
|
+
oldPassword?: string
|
|
138
|
+
newPassword?: string
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export type SetCurrentUserPasswordResponse = {
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export type GetGlobalPermissionsRequest = {
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export type GetGlobalPermissionsResponse = {
|
|
148
|
+
permissions?: GlobalPermission[]
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export type CreateSSHKeyRequest = {
|
|
152
|
+
sshKeyName?: string
|
|
153
|
+
publicKey?: string
|
|
154
|
+
expiredAt?: string
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export type CreateSSHKeyResponse = {
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export type UpdateSSHKeyRequest = {
|
|
161
|
+
sshkeyId?: number
|
|
162
|
+
sshKeyName?: string
|
|
163
|
+
publicKey?: string
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export type UpdateSSHKeyResponse = {
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export type DeleteSSHKeyRequest = {
|
|
170
|
+
id?: string
|
|
171
|
+
sshkeyId?: number
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export type DeleteSSHKeyResponse = {
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export type ListSSHKeysRequest = {
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export type ListSSHKeysResponse = {
|
|
181
|
+
items?: SSHKey[]
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
export type SSHKey = {
|
|
185
|
+
id?: number
|
|
186
|
+
sshKeyName?: string
|
|
187
|
+
publicKey?: string
|
|
188
|
+
updatedAt?: string
|
|
189
|
+
createdAt?: string
|
|
190
|
+
expiredAt?: string
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export type GetCertifyInfoRequest = {
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export type GetCertifyInfoResponse = {
|
|
197
|
+
certName?: string
|
|
198
|
+
certNo?: string
|
|
199
|
+
certTime?: string
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export type CertifyInitRequest = {
|
|
203
|
+
certName?: string
|
|
204
|
+
certNo?: string
|
|
205
|
+
certType?: CertifyType
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export type CertifyInitResponse = {
|
|
209
|
+
certOrder?: string
|
|
210
|
+
qrCode?: string
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export type CertifyCheckRequest = {
|
|
214
|
+
certOrder?: string
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export type CertifyCheckResponse = {
|
|
218
|
+
passed?: boolean
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export class Account {
|
|
222
|
+
static UpdateEmail(req: UpdateEmailRequest, initReq?: fm.InitReq): Promise<UpdateEmailResponse> {
|
|
223
|
+
return fm.fetchReq<UpdateEmailRequest, UpdateEmailResponse>(`/apis/ghippo.io/v1alpha1/current-user/email`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
224
|
+
}
|
|
225
|
+
static UpdatePassword(req: UpdatePasswordRequest, initReq?: fm.InitReq): Promise<UpdatePasswordResponse> {
|
|
226
|
+
return fm.fetchReq<UpdatePasswordRequest, UpdatePasswordResponse>(`/apis/ghippo.io/v1alpha1/current-user/password`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
227
|
+
}
|
|
228
|
+
static UpdateLanguage(req: UpdateLanguageRequest, initReq?: fm.InitReq): Promise<UpdateLanguageResponse> {
|
|
229
|
+
return fm.fetchReq<UpdateLanguageRequest, UpdateLanguageResponse>(`/apis/ghippo.io/v1alpha1/current-user/language`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
230
|
+
}
|
|
231
|
+
static GetUser(req: GetUserRequest, initReq?: fm.InitReq): Promise<GetUserResponse> {
|
|
232
|
+
return fm.fetchReq<GetUserRequest, GetUserResponse>(`/apis/ghippo.io/v1alpha1/current-user?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
233
|
+
}
|
|
234
|
+
static ListAccessTokens(req: ListAccessTokensRequest, initReq?: fm.InitReq): Promise<ListAccessTokensResponse> {
|
|
235
|
+
return fm.fetchReq<ListAccessTokensRequest, ListAccessTokensResponse>(`/apis/ghippo.io/v1alpha1/current-user/accesstokens?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
236
|
+
}
|
|
237
|
+
static CreateAccessToken(req: CreateAccessTokenRequest, initReq?: fm.InitReq): Promise<CreateAccessTokenResponse> {
|
|
238
|
+
return fm.fetchReq<CreateAccessTokenRequest, CreateAccessTokenResponse>(`/apis/ghippo.io/v1alpha1/current-user/accesstoken`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
239
|
+
}
|
|
240
|
+
static DeleteAccessToken(req: DeleteAccessTokenRequest, initReq?: fm.InitReq): Promise<DeleteAccessTokenResponse> {
|
|
241
|
+
return fm.fetchReq<DeleteAccessTokenRequest, DeleteAccessTokenResponse>(`/apis/ghippo.io/v1alpha1/current-user/accesstokens/${req["id"]}`, {...initReq, method: "DELETE"})
|
|
242
|
+
}
|
|
243
|
+
static GetGlobalPermissions(req: GetGlobalPermissionsRequest, initReq?: fm.InitReq): Promise<GetGlobalPermissionsResponse> {
|
|
244
|
+
return fm.fetchReq<GetGlobalPermissionsRequest, GetGlobalPermissionsResponse>(`/apis/ghippo.io/v1alpha1/current-user/global-permissions?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
245
|
+
}
|
|
246
|
+
static PasswordDescription(req: PasswordDescriptionRequest, initReq?: fm.InitReq): Promise<PasswordDescriptionResponse> {
|
|
247
|
+
return fm.fetchReq<PasswordDescriptionRequest, PasswordDescriptionResponse>(`/apis/ghippo.io/v1alpha1/current-user/password-description?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
248
|
+
}
|
|
249
|
+
static SetCurrentUserPassword(req: SetCurrentUserPasswordRequest, initReq?: fm.InitReq): Promise<SetCurrentUserPasswordResponse> {
|
|
250
|
+
return fm.fetchReq<SetCurrentUserPasswordRequest, SetCurrentUserPasswordResponse>(`/apis/ghippo.io/v1alpha1/current-user/set-password`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
251
|
+
}
|
|
252
|
+
static CreateSSHKey(req: CreateSSHKeyRequest, initReq?: fm.InitReq): Promise<CreateSSHKeyResponse> {
|
|
253
|
+
return fm.fetchReq<CreateSSHKeyRequest, CreateSSHKeyResponse>(`/apis/ghippo.io/v1alpha1/current-user/sshkeys`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
254
|
+
}
|
|
255
|
+
static UpdateSSHKey(req: UpdateSSHKeyRequest, initReq?: fm.InitReq): Promise<UpdateSSHKeyResponse> {
|
|
256
|
+
return fm.fetchReq<UpdateSSHKeyRequest, UpdateSSHKeyResponse>(`/apis/ghippo.io/v1alpha1/current-user/sshkeys/${req["sshkeyId"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
|
|
257
|
+
}
|
|
258
|
+
static DeleteSSHKey(req: DeleteSSHKeyRequest, initReq?: fm.InitReq): Promise<DeleteSSHKeyResponse> {
|
|
259
|
+
return fm.fetchReq<DeleteSSHKeyRequest, DeleteSSHKeyResponse>(`/apis/ghippo.io/v1alpha1/current-user/sshkeys/${req["sshkeyId"]}`, {...initReq, method: "DELETE"})
|
|
260
|
+
}
|
|
261
|
+
static ListSSHKeys(req: ListSSHKeysRequest, initReq?: fm.InitReq): Promise<ListSSHKeysResponse> {
|
|
262
|
+
return fm.fetchReq<ListSSHKeysRequest, ListSSHKeysResponse>(`/apis/ghippo.io/v1alpha1/current-user/sshkeys?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
263
|
+
}
|
|
264
|
+
static GetCertifyInfo(req: GetCertifyInfoRequest, initReq?: fm.InitReq): Promise<GetCertifyInfoResponse> {
|
|
265
|
+
return fm.fetchReq<GetCertifyInfoRequest, GetCertifyInfoResponse>(`/apis/ghippo.io/v1alpha1/current-user/certify?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
266
|
+
}
|
|
267
|
+
static CertifyInit(req: CertifyInitRequest, initReq?: fm.InitReq): Promise<CertifyInitResponse> {
|
|
268
|
+
return fm.fetchReq<CertifyInitRequest, CertifyInitResponse>(`/apis/ghippo.io/v1alpha1/current-user/certify`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
269
|
+
}
|
|
270
|
+
static CertifyCheck(req: CertifyCheckRequest, initReq?: fm.InitReq): Promise<CertifyCheckResponse> {
|
|
271
|
+
return fm.fetchReq<CertifyCheckRequest, CertifyCheckResponse>(`/apis/ghippo.io/v1alpha1/current-user/certify/check`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
|
|
272
|
+
}
|
|
273
|
+
}
|