mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-17 10:55:12 +00:00
fix: console build (#194)
* grpc gen, headers * add auth headers * resolve build errors * lint * project grant changes * project detail * owned projects * fix undefined
This commit is contained in:
@@ -10,7 +10,9 @@ import {
|
||||
ApplicationSearchRequest,
|
||||
ApplicationSearchResponse,
|
||||
ApplicationUpdate,
|
||||
GrantedGrantID,
|
||||
GrantedProjectSearchQuery,
|
||||
GrantedProjectSearchRequest,
|
||||
GrantedProjectSearchResponse,
|
||||
OIDCApplicationCreate,
|
||||
OIDCConfig,
|
||||
OIDCConfigUpdate,
|
||||
@@ -38,9 +40,6 @@ import {
|
||||
ProjectRoleSearchQuery,
|
||||
ProjectRoleSearchRequest,
|
||||
ProjectRoleSearchResponse,
|
||||
ProjectSearchQuery,
|
||||
ProjectSearchRequest,
|
||||
ProjectSearchResponse,
|
||||
ProjectUpdateRequest,
|
||||
ProjectUserGrantSearchRequest,
|
||||
UserGrant,
|
||||
@@ -72,21 +71,36 @@ export class ProjectService {
|
||||
return responseMapper(response);
|
||||
}
|
||||
|
||||
public async SearchProjects(
|
||||
limit: number, offset: number, queryList?: ProjectSearchQuery[]): Promise<ProjectSearchResponse> {
|
||||
const req = new ProjectSearchRequest();
|
||||
public async SearchGrantedProjects(
|
||||
limit: number, offset: number, queryList?: GrantedProjectSearchQuery[]): Promise<GrantedProjectSearchResponse> {
|
||||
const req = new GrantedProjectSearchRequest();
|
||||
req.setLimit(limit);
|
||||
req.setOffset(offset);
|
||||
if (queryList) {
|
||||
req.setQueriesList(queryList);
|
||||
}
|
||||
return await this.request(
|
||||
c => c.searchProjects,
|
||||
c => c.searchGrantedProjects,
|
||||
req,
|
||||
f => f,
|
||||
);
|
||||
}
|
||||
|
||||
// public async SearchGrantedProjects(
|
||||
// limit: number, offset: number, queryList?: GrantedProjectSearchQuery[]): Promise<GrantedProjectSearchResponse> {
|
||||
// const req = new GrantedProjectSearchRequest();
|
||||
// req.setLimit(limit);
|
||||
// req.setOffset(offset);
|
||||
// if (queryList) {
|
||||
// req.setQueriesList(queryList);
|
||||
// }
|
||||
// return await this.request(
|
||||
// c => c.search,
|
||||
// req,
|
||||
// f => f,
|
||||
// );
|
||||
// }
|
||||
|
||||
public async GetProjectById(projectId: string): Promise<Project> {
|
||||
const req = new ProjectID();
|
||||
req.setId(projectId);
|
||||
@@ -97,6 +111,17 @@ export class ProjectService {
|
||||
);
|
||||
}
|
||||
|
||||
public async GetGrantedProjectGrantByID(projectId: string, id: string): Promise<ProjectGrant> {
|
||||
const req = new ProjectGrantID();
|
||||
req.setId(id);
|
||||
req.setProjectId(projectId);
|
||||
return await this.request(
|
||||
c => c.getGrantedProjectGrantByID,
|
||||
req,
|
||||
f => f,
|
||||
);
|
||||
}
|
||||
|
||||
public async CreateProject(project: ProjectCreateRequest.AsObject): Promise<Project> {
|
||||
const req = new ProjectCreateRequest();
|
||||
req.setName(project.name);
|
||||
@@ -368,17 +393,6 @@ export class ProjectService {
|
||||
);
|
||||
}
|
||||
|
||||
// NEW
|
||||
public async GetGrantedProjectGrantByID(id: string): Promise<ProjectGrant> {
|
||||
const req = new GrantedGrantID();
|
||||
req.setId(id);
|
||||
return await this.request(
|
||||
c => c.getGrantedProjectGrantByID,
|
||||
req,
|
||||
f => f,
|
||||
);
|
||||
}
|
||||
|
||||
public async GetProjectMemberRoles(): Promise<ProjectMemberRoles> {
|
||||
const req = new Empty();
|
||||
return await this.request(
|
||||
|
||||
Reference in New Issue
Block a user