@daocloud-proto/kangaroo 0.2.2-2 → 0.2.2-6

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.
@@ -7,8 +7,6 @@
7
7
  import * as fm from "../../../../fetch.pb"
8
8
  import * as GoogleProtobufEmpty from "../../../../google/protobuf/empty.pb"
9
9
  import * as KangarooIoApiHarborV1alpha1Harbor from "./harbor.pb"
10
- import * as KangarooIoApiHarborV1alpha1Project from "./project.pb"
11
- import * as KangarooIoApiHarborV1alpha1Repository from "./repository.pb"
12
10
  export class Harbor {
13
11
  static GetHarborParams(req: KangarooIoApiHarborV1alpha1Harbor.GetHarborParamsRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Harbor.GetHarborParamsResponse> {
14
12
  return fm.fetchReq<KangarooIoApiHarborV1alpha1Harbor.GetHarborParamsRequest, KangarooIoApiHarborV1alpha1Harbor.GetHarborParamsResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/harbors/default-params?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
@@ -34,23 +32,4 @@ export class Harbor {
34
32
  static GetStorageStatistic(req: KangarooIoApiHarborV1alpha1Harbor.GetStorageStatisticRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Harbor.GetStorageStatisticResponse> {
35
33
  return fm.fetchReq<KangarooIoApiHarborV1alpha1Harbor.GetStorageStatisticRequest, KangarooIoApiHarborV1alpha1Harbor.GetStorageStatisticResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["name"]}/storage_statistic?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
36
34
  }
37
- }
38
- export class HarborProject {
39
- static ListProject(req: KangarooIoApiHarborV1alpha1Project.ListProjectRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Project.ListProjectResponse> {
40
- return fm.fetchReq<KangarooIoApiHarborV1alpha1Project.ListProjectRequest, KangarooIoApiHarborV1alpha1Project.ListProjectResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["harbor"]}/projects?${fm.renderURLSearchParams(req, ["cluster", "namespace", "harbor"])}`, {...initReq, method: "GET"})
41
- }
42
- static DeleteProject(req: KangarooIoApiHarborV1alpha1Project.DeleteProjectRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
43
- return fm.fetchReq<KangarooIoApiHarborV1alpha1Project.DeleteProjectRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["harbor"]}/projects/${req["name"]}`, {...initReq, method: "DELETE"})
44
- }
45
- static CreateProject(req: KangarooIoApiHarborV1alpha1Project.CreateProjectRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Project.Project> {
46
- return fm.fetchReq<KangarooIoApiHarborV1alpha1Project.CreateProjectRequest, KangarooIoApiHarborV1alpha1Project.Project>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["harbor"]}/project`, {...initReq, method: "POST", body: JSON.stringify(req)})
47
- }
48
- }
49
- export class HarborRepository {
50
- static ListRepositories(req: KangarooIoApiHarborV1alpha1Repository.ListRepositoriesRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Repository.ListRepositoriesResponse> {
51
- return fm.fetchReq<KangarooIoApiHarborV1alpha1Repository.ListRepositoriesRequest, KangarooIoApiHarborV1alpha1Repository.ListRepositoriesResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["harbor"]}/projects/${req["project"]}/repositories?${fm.renderURLSearchParams(req, ["cluster", "namespace", "harbor", "project"])}`, {...initReq, method: "GET"})
52
- }
53
- static DeleteRepository(req: KangarooIoApiHarborV1alpha1Repository.DeleteRepositoryRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
54
- return fm.fetchReq<KangarooIoApiHarborV1alpha1Repository.DeleteRepositoryRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["harbor"]}/projects/${req["project"]}/repositories/${req["name"]}`, {...initReq, method: "DELETE"})
55
- }
56
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/kangaroo",
3
- "version":"0.2.2-2",
3
+ "version":"0.2.2-6",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,85 +0,0 @@
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 KangarooIoApiTypesPage from "../../types/page.pb"
8
-
9
- export enum ListProjectRequestSortBy {
10
- SORT_BY_UNSPECIFIED = "SORT_BY_UNSPECIFIED",
11
- field_name = "field_name",
12
- creation_time = "creation_time",
13
- }
14
-
15
- export type Project = {
16
- chartCount?: string
17
- creationTime?: string
18
- currentUserRoleID?: string
19
- currentUserRoleIds?: number[]
20
- cVEAllowList?: CVEAllowList
21
- deleted?: boolean
22
- metadata?: ProjectMetadata
23
- name?: string
24
- ownerID?: number
25
- ownerName?: string
26
- projectID?: number
27
- registryID?: string
28
- repoCount?: string
29
- togglable?: boolean
30
- updateTime?: string
31
- }
32
-
33
- export type CVEAllowList = {
34
- creationTime?: string
35
- expiresAt?: string
36
- id?: string
37
- items?: CVEAllowListItem[]
38
- projectID?: string
39
- updateTime?: string
40
- }
41
-
42
- export type CVEAllowListItem = {
43
- cVEID?: string
44
- }
45
-
46
- export type ProjectMetadata = {
47
- autoScan?: string
48
- enableContentTrust?: string
49
- enableContentTrustCosign?: string
50
- preventVul?: string
51
- public?: string
52
- retentionID?: string
53
- reuseSysCVEAllowList?: string
54
- severity?: string
55
- }
56
-
57
- export type ListProjectRequest = {
58
- cluster?: string
59
- namespace?: string
60
- harbor?: string
61
- page?: number
62
- pageSize?: number
63
- sortBy?: ListProjectRequestSortBy
64
- orderBy?: KangarooIoApiTypesPage.OrderBy
65
- }
66
-
67
- export type ListProjectResponse = {
68
- items?: Project[]
69
- pagination?: KangarooIoApiTypesPage.Page
70
- }
71
-
72
- export type DeleteProjectRequest = {
73
- cluster?: string
74
- namespace?: string
75
- harbor?: string
76
- name?: string
77
- }
78
-
79
- export type CreateProjectRequest = {
80
- cluster?: string
81
- namespace?: string
82
- harbor?: string
83
- name?: string
84
- public?: boolean
85
- }
@@ -1,48 +0,0 @@
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 KangarooIoApiTypesPage from "../../types/page.pb"
8
-
9
- export enum ListRepositoriesRequestSortBy {
10
- SORT_BY_UNSPECIFIED = "SORT_BY_UNSPECIFIED",
11
- name = "name",
12
- creation_time = "creation_time",
13
- }
14
-
15
- export type Repository = {
16
- artifactCount?: string
17
- creationTime?: string
18
- description?: string
19
- id?: string
20
- name?: string
21
- projectId?: string
22
- pullCount?: string
23
- updateTime?: string
24
- }
25
-
26
- export type ListRepositoriesRequest = {
27
- cluster?: string
28
- namespace?: string
29
- harbor?: string
30
- project?: string
31
- page?: number
32
- pageSize?: number
33
- sortBy?: ListRepositoriesRequestSortBy
34
- orderBy?: KangarooIoApiTypesPage.OrderBy
35
- }
36
-
37
- export type ListRepositoriesResponse = {
38
- items?: Repository[]
39
- pagination?: KangarooIoApiTypesPage.Page
40
- }
41
-
42
- export type DeleteRepositoryRequest = {
43
- cluster?: string
44
- namespace?: string
45
- harbor?: string
46
- project?: string
47
- name?: string
48
- }