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:
Max Peintner 2020-06-09 17:12:35 +02:00 committed by GitHub
parent 25b97b1bcc
commit ef9b03cc84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 8916 additions and 3729 deletions

View File

@ -16,6 +16,7 @@ export class AuthGuard implements CanActivate {
state: RouterStateSnapshot, state: RouterStateSnapshot,
): Observable<boolean> | Promise<boolean> | boolean { ): Observable<boolean> | Promise<boolean> | boolean {
if (!this.auth.authenticated) { if (!this.auth.authenticated) {
console.log('authenticate');
return this.auth.authenticate(); return this.auth.authenticate();
} }
return this.auth.authenticated; return this.auth.authenticated;

View File

@ -5,7 +5,12 @@ import { MatAutocomplete, MatAutocompleteSelectedEvent } from '@angular/material
import { MatChipInputEvent } from '@angular/material/chips'; import { MatChipInputEvent } from '@angular/material/chips';
import { from } from 'rxjs'; import { from } from 'rxjs';
import { debounceTime, switchMap, tap } from 'rxjs/operators'; import { debounceTime, switchMap, tap } from 'rxjs/operators';
import { Project, ProjectSearchKey, ProjectSearchQuery, SearchMethod } from 'src/app/proto/generated/management_pb'; import {
GrantedProjectSearchKey,
GrantedProjectSearchQuery,
Project,
SearchMethod,
} from 'src/app/proto/generated/management_pb';
import { ProjectService } from 'src/app/services/project.service'; import { ProjectService } from 'src/app/services/project.service';
import { ToastService } from 'src/app/services/toast.service'; import { ToastService } from 'src/app/services/toast.service';
@ -34,11 +39,11 @@ export class SearchProjectAutocompleteComponent {
debounceTime(200), debounceTime(200),
tap(() => this.isLoading = true), tap(() => this.isLoading = true),
switchMap(value => { switchMap(value => {
const query = new ProjectSearchQuery(); const query = new GrantedProjectSearchQuery();
query.setKey(ProjectSearchKey.PROJECTSEARCHKEY_PROJECT_NAME); query.setKey(GrantedProjectSearchKey.PROJECTSEARCHKEY_PROJECT_NAME);
query.setValue(value); query.setValue(value);
query.setMethod(SearchMethod.SEARCHMETHOD_CONTAINS); query.setMethod(SearchMethod.SEARCHMETHOD_CONTAINS);
return from(this.projectService.SearchProjects(10, 0, [query])); return from(this.projectService.SearchGrantedProjects(10, 0, [query]));
}), }),
// finalize(() => this.isLoading = false), // finalize(() => this.isLoading = false),
).subscribe((projects) => { ).subscribe((projects) => {

View File

@ -3,7 +3,7 @@ import { Location } from '@angular/common';
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { CreateOrgRequest, Gender, OrgSetUpResponse, RegisterUserRequest } from 'src/app/proto/generated/admin_pb'; import { CreateOrgRequest, CreateUserRequest, Gender, OrgSetUpResponse } from 'src/app/proto/generated/admin_pb';
import { AdminService } from 'src/app/services/admin.service'; import { AdminService } from 'src/app/services/admin.service';
import { ToastService } from 'src/app/services/toast.service'; import { ToastService } from 'src/app/services/toast.service';
@ -77,7 +77,7 @@ export class OrgCreateComponent {
createOrgRequest.setName(this.name?.value); createOrgRequest.setName(this.name?.value);
createOrgRequest.setDomain(this.domain?.value); createOrgRequest.setDomain(this.domain?.value);
const registerUserRequest: RegisterUserRequest = new RegisterUserRequest(); const registerUserRequest: CreateUserRequest = new CreateUserRequest();
registerUserRequest.setEmail(this.email?.value); registerUserRequest.setEmail(this.email?.value);
registerUserRequest.setFirstName(this.firstName?.value); registerUserRequest.setFirstName(this.firstName?.value);
registerUserRequest.setLastName(this.lastName?.value); registerUserRequest.setLastName(this.lastName?.value);

View File

@ -5,7 +5,7 @@ import { BehaviorSubject, from, of } from 'rxjs';
import { catchError, finalize, map } from 'rxjs/operators'; import { catchError, finalize, map } from 'rxjs/operators';
import { User } from 'src/app/proto/generated/auth_pb'; import { User } from 'src/app/proto/generated/auth_pb';
import { import {
Project, GrantedProject,
ProjectMember, ProjectMember,
ProjectMemberSearchResponse, ProjectMemberSearchResponse,
ProjectState, ProjectState,
@ -25,7 +25,7 @@ import {
styleUrls: ['./project-contributors.component.scss'], styleUrls: ['./project-contributors.component.scss'],
}) })
export class ProjectContributorsComponent implements OnInit { export class ProjectContributorsComponent implements OnInit {
@Input() public project!: Project.AsObject; @Input() public project!: GrantedProject.AsObject;
@Input() public disabled: boolean = false; @Input() public disabled: boolean = false;
public totalResult: number = 0; public totalResult: number = 0;
@ -40,7 +40,7 @@ export class ProjectContributorsComponent implements OnInit {
public ngOnInit(): void { public ngOnInit(): void {
const promise: Promise<ProjectMemberSearchResponse> | undefined = const promise: Promise<ProjectMemberSearchResponse> | undefined =
this.project.type === ProjectType.PROJECTTYPE_SELF ? this.project.type === ProjectType.PROJECTTYPE_OWNED ?
this.projectService.SearchProjectMembers(this.project.id, 100, 0) : this.projectService.SearchProjectMembers(this.project.id, 100, 0) :
this.project.type === ProjectType.PROJECTTYPE_GRANTED ? this.project.type === ProjectType.PROJECTTYPE_GRANTED ?
this.projectService.SearchProjectGrantMembers(this.project.id, this.project.grantId, 100, 0) : undefined; this.projectService.SearchProjectGrantMembers(this.project.id, this.project.grantId, 100, 0) : undefined;
@ -64,7 +64,7 @@ export class ProjectContributorsComponent implements OnInit {
data: { data: {
creationType: this.project.type === creationType: this.project.type ===
ProjectType.PROJECTTYPE_GRANTED ? CreationType.PROJECT_GRANTED : ProjectType.PROJECTTYPE_GRANTED ? CreationType.PROJECT_GRANTED :
ProjectType.PROJECTTYPE_SELF ? CreationType.PROJECT_OWNED : undefined, ProjectType.PROJECTTYPE_OWNED ? CreationType.PROJECT_OWNED : undefined,
projectId: this.project.id, projectId: this.project.id,
}, },
width: '400px', width: '400px',

View File

@ -6,11 +6,11 @@
</a> </a>
<h1>{{ 'PROJECT.PAGES.TITLE' | translate }} {{project?.name}}</h1> <h1>{{ 'PROJECT.PAGES.TITLE' | translate }} {{project?.name}}</h1>
<ng-template appHasRole [appHasRole]="['project.write:'+projectId, 'project.write']"> <ng-template appHasRole [appHasRole]="['project.write:'+projectId, 'project.write']">
<button *ngIf="project?.type == ProjectType.PROJECTTYPE_SELF" mat-icon-button <!-- <button *ngIf="project?.type == ProjectType.PROJECTTYPE_OWNED" mat-icon-button
(click)="editstate = !editstate" aria-label="Edit project name"> (click)="editstate = !editstate" aria-label="Edit project name">
<mat-icon *ngIf="!editstate">edit</mat-icon> <mat-icon *ngIf="!editstate">edit</mat-icon>
<mat-icon *ngIf="editstate">close</mat-icon> <mat-icon *ngIf="editstate">close</mat-icon>
</button> </button> -->
</ng-template> </ng-template>
<div class="full-width"> <div class="full-width">
@ -35,7 +35,7 @@
</div> </div>
<!-- show only on owned projects--> <!-- show only on owned projects-->
<ng-container *ngIf="project?.type === ProjectType.PROJECTTYPE_SELF; else granteddetail"> <ng-container *ngIf="project && projectType == ProjectType.PROJECTTYPE_OWNED; else granteddetail">
<ng-template appHasRole [appHasRole]="['project.app.read:' + project.id, 'project.app.read']"> <ng-template appHasRole [appHasRole]="['project.app.read:' + project.id, 'project.app.read']">
<app-project-application-grid *ngIf="grid" <app-project-application-grid *ngIf="grid"
[disabled]="project?.state !== ProjectState.PROJECTSTATE_ACTIVE" (changeView)="grid = false" [disabled]="project?.state !== ProjectState.PROJECTSTATE_ACTIVE" (changeView)="grid = false"
@ -65,7 +65,7 @@
<app-card title="{{ 'PROJECT.ROLE.TITLE' | translate }}" <app-card title="{{ 'PROJECT.ROLE.TITLE' | translate }}"
description="{{ 'PROJECT.ROLE.DESCRIPTION' | translate }}"> description="{{ 'PROJECT.ROLE.DESCRIPTION' | translate }}">
<app-project-roles [disabled]="project?.state !== ProjectState.PROJECTSTATE_ACTIVE" <app-project-roles [disabled]="project?.state !== ProjectState.PROJECTSTATE_ACTIVE"
[actionsVisible]="project?.type == ProjectType.PROJECTTYPE_SELF" [projectId]="projectId"> [actionsVisible]="true" [projectId]="projectId">
</app-project-roles> </app-project-roles>
</app-card> </app-card>
</ng-template> </ng-template>
@ -85,7 +85,7 @@
<div class="details"> <div class="details">
<div class="row"> <div class="row">
<span class="first">{{'PROJECT.TYPE.TITLE' | translate}}:</span> <span class="first">{{'PROJECT.TYPE.TITLE' | translate}}:</span>
<span class="second" *ngIf="project?.type">{{'PROJECT.TYPE.'+ project.type | translate}}</span> <span class="second" *ngIf="projectType">{{'PROJECT.TYPE.'+ projectType | translate}}</span>
</div> </div>
<div class="row"> <div class="row">
<span class="first">{{'PROJECT.STATE.TITLE' | translate}}:</span> <span class="first">{{'PROJECT.STATE.TITLE' | translate}}:</span>
@ -94,7 +94,7 @@
</div> </div>
</div> </div>
<ng-container *ngIf="project?.type === ProjectType.PROJECTTYPE_SELF; else grantedmeta"> <ng-container *ngIf="projectType === ProjectType.PROJECTTYPE_OWNED; else grantedmeta">
<mat-tab-group mat-stretch-tabs class="tab-group" disablePagination="true"> <mat-tab-group mat-stretch-tabs class="tab-group" disablePagination="true">
<mat-tab label="Details"> <mat-tab label="Details">
<app-project-contributors *ngIf="project" <app-project-contributors *ngIf="project"

View File

@ -29,7 +29,9 @@ import { ToastService } from 'src/app/services/toast.service';
}) })
export class ProjectDetailComponent implements OnInit, OnDestroy { export class ProjectDetailComponent implements OnInit, OnDestroy {
public projectId: string = ''; public projectId: string = '';
public project!: Project.AsObject; public grantId: string = '';
public project!: Project.AsObject; // ProjectGrant.AsObject;
public projectType: ProjectType = ProjectType.PROJECTTYPE_OWNED;
public pageSizeRoles: number = 10; public pageSizeRoles: number = 10;
public roleDataSource: MatTableDataSource<ProjectRole.AsObject> = new MatTableDataSource<ProjectRole.AsObject>(); public roleDataSource: MatTableDataSource<ProjectRole.AsObject> = new MatTableDataSource<ProjectRole.AsObject>();
@ -75,26 +77,40 @@ export class ProjectDetailComponent implements OnInit, OnDestroy {
this.subscription?.unsubscribe(); this.subscription?.unsubscribe();
} }
private async getData({ id }: Params): Promise<void> { private async getData({ id, grantId }: Params): Promise<void> {
this.projectId = id; this.projectId = id;
this.projectService.GetProjectById(id).then(proj => { this.grantId = grantId;
this.project = proj.toObject();
if (this.project.type !== ProjectType.PROJECTTYPE_SELF ||
this.project.state === ProjectState.PROJECTSTATE_INACTIVE ||
this.project.state === ProjectState.PROJECTSTATE_UNSPECIFIED) {
}
this.isZitadel$ = from(this.projectService.SearchApplications(this.project.id, 100, 0).then(appsResp => { if (grantId) {
const ret = appsResp.toObject().resultList // this.projectService.GetGrantedProjectGrantByID(id, this.grantId).then(proj => {
.filter(app => app.oidcConfig?.clientId === this.grpcService.clientid).length > 0; // this.projectGrant = proj.toObject();
return ret; // this.isZitadel$ = from(this.projectService.SearchApplications(this.project.id, 100, 0).then(appsResp => {
})); // TODO: replace with prettier thing // const ret = appsResp.toObject().resultList
}).catch(error => { // .filter(app => app.oidcConfig?.clientId === this.grpcService.clientid).length > 0;
this.toast.showError(error.message); // return ret;
}); // })); // TODO: replace with prettier thing
// }).catch(error => {
// this.toast.showError(error.message);
// });
} else {
this.projectService.GetProjectById(id).then(proj => {
this.project = proj.toObject();
// if (this.project.type !== ProjectType.PROJECTTYPE_SELF ||
// this.project.state === ProjectState.PROJECTSTATE_INACTIVE ||
// this.project.state === ProjectState.PROJECTSTATE_UNSPECIFIED) {
// }
this.isZitadel$ = from(this.projectService.SearchApplications(this.project.id, 100, 0).then(appsResp => {
const ret = appsResp.toObject().resultList
.filter(app => app.oidcConfig?.clientId === this.grpcService.clientid).length > 0;
return ret;
})); // TODO: replace with prettier thing
}).catch(error => {
this.toast.showError(error.message);
});
}
} }
public changeState(newState: ProjectState): void { public changeState(newState: ProjectState): void {
if (newState === ProjectState.PROJECTSTATE_ACTIVE) { if (newState === ProjectState.PROJECTSTATE_ACTIVE) {
this.projectService.ReactivateProject(this.projectId).then(() => { this.projectService.ReactivateProject(this.projectId).then(() => {

View File

@ -1,7 +1,7 @@
import { DataSource } from '@angular/cdk/collections'; import { DataSource } from '@angular/cdk/collections';
import { BehaviorSubject, from, Observable, of } from 'rxjs'; import { BehaviorSubject, from, Observable, of } from 'rxjs';
import { catchError, finalize, map } from 'rxjs/operators'; import { catchError, finalize, map } from 'rxjs/operators';
import { Project, ProjectMember } from 'src/app/proto/generated/management_pb'; import { GrantedProject, ProjectMember } from 'src/app/proto/generated/management_pb';
import { ProjectService } from 'src/app/services/project.service'; import { ProjectService } from 'src/app/services/project.service';
/** /**
@ -19,7 +19,7 @@ export class ProjectGrantMembersDataSource extends DataSource<ProjectMember.AsOb
super(); super();
} }
public loadMembers(project: Project.AsObject, pageIndex: number, pageSize: number, sortDirection?: string): void { public loadMembers(project: GrantedProject.AsObject, pageIndex: number, pageSize: number, sortDirection?: string): void {
const offset = pageIndex * pageSize; const offset = pageIndex * pageSize;
this.loadingSubject.next(true); this.loadingSubject.next(true);

View File

@ -5,7 +5,7 @@ import { MatPaginator } from '@angular/material/paginator';
import { MatTable } from '@angular/material/table'; import { MatTable } from '@angular/material/table';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { tap } from 'rxjs/operators'; import { tap } from 'rxjs/operators';
import { Project, ProjectMember, User } from 'src/app/proto/generated/management_pb'; import { GrantedProject, ProjectMember, User } from 'src/app/proto/generated/management_pb';
import { ProjectService } from 'src/app/services/project.service'; import { ProjectService } from 'src/app/services/project.service';
import { ToastService } from 'src/app/services/toast.service'; import { ToastService } from 'src/app/services/toast.service';
@ -21,7 +21,7 @@ import { ProjectGrantMembersDataSource } from './project-grant-members-datasourc
styleUrls: ['./project-grant-members.component.scss'], styleUrls: ['./project-grant-members.component.scss'],
}) })
export class ProjectGrantMembersComponent implements AfterViewInit, OnInit { export class ProjectGrantMembersComponent implements AfterViewInit, OnInit {
@Input() public project!: Project.AsObject; @Input() public project!: GrantedProject.AsObject;
public disabled: boolean = false; public disabled: boolean = false;
@ViewChild(MatPaginator) public paginator!: MatPaginator; @ViewChild(MatPaginator) public paginator!: MatPaginator;
@ViewChild(MatTable) public table!: MatTable<ProjectMember.AsObject>; @ViewChild(MatTable) public table!: MatTable<ProjectMember.AsObject>;

View File

@ -23,16 +23,14 @@
<mat-icon matTooltip="select item" (click)="selection.toggle(item)" class="selection-icon"> <mat-icon matTooltip="select item" (click)="selection.toggle(item)" class="selection-icon">
check_circle</mat-icon> check_circle</mat-icon>
<div class="text-part"> <div class="text-part">
<!-- <span *ngIf="item?.creationDate"
class="top">{{item?.creationDate?.toDate() | date: 'dd. MMM, HH:mm'}}</span> -->
<span *ngIf="item.changeDate" class="top">last modified on <span *ngIf="item.changeDate" class="top">last modified on
{{ {{
dateFromTimestamp(item.changeDate) | date: 'EEE dd. MMM, HH:mm' dateFromTimestamp(item.changeDate) | date: 'EEE dd. MMM, HH:mm'
}}</span> }}</span>
<span class="name" *ngIf="item.name">{{ item.name }}</span> <span class="name" *ngIf="item.name">{{ item.name }}</span>
<span class="description" *ngIf="item.state">{{'PROJECT.STATE.'+item.state | translate}}</span> <span class="description" *ngIf="item.state">{{'PROJECT.STATE.'+item.state | translate}}</span>
<span class="description" *ngIf="item.type">{{'PROJECT.TYPE.TITLE' | translate}}: <!-- <span class="description" *ngIf="item.type">{{'PROJECT.TYPE.TITLE' | translate}}:
{{'PROJECT.TYPE.'+item.type | translate}}</span> {{'PROJECT.TYPE.'+item.type | translate}}</span> -->
<span *ngIf="item.changeDate" class="created">created on <span *ngIf="item.changeDate" class="created">created on
{{ {{
dateFromTimestamp(item.creationDate) | date: 'EEE dd. MMM, HH:mm' dateFromTimestamp(item.creationDate) | date: 'EEE dd. MMM, HH:mm'

View File

@ -3,7 +3,7 @@ import { SelectionModel } from '@angular/cdk/collections';
import { Component, EventEmitter, Input, Output } from '@angular/core'; import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb'; import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb';
import { Project, ProjectState } from 'src/app/proto/generated/management_pb'; import { GrantedProject, Project, ProjectState } from 'src/app/proto/generated/management_pb';
import { ProjectService } from 'src/app/services/project.service'; import { ProjectService } from 'src/app/services/project.service';
import { ToastService } from 'src/app/services/toast.service'; import { ToastService } from 'src/app/services/toast.service';
@ -45,9 +45,13 @@ export class ProjectGridComponent {
constructor(private router: Router, private projectService: ProjectService, private toast: ToastService) { } constructor(private router: Router, private projectService: ProjectService, private toast: ToastService) { }
public selectItem(item: Project.AsObject, event?: any): void { public selectItem(item: GrantedProject.AsObject, event?: any): void {
if (event && !event.target.classList.contains('mat-icon')) { if (event && !event.target.classList.contains('mat-icon')) {
this.router.navigate(['/projects', item.id]); if (item.grantId) {
this.router.navigate(['/project-grant', `${item.id}:${item.grantId}`]);
} else {
this.router.navigate(['/projects', item.id]);
}
} else if (!event) { } else if (!event) {
this.router.navigate(['/projects', item.id]); this.router.navigate(['/projects', item.id]);
} }

View File

@ -7,7 +7,7 @@ import { ActivatedRoute, Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core';
import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb'; import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb';
import { BehaviorSubject, Observable, Subscription } from 'rxjs'; import { BehaviorSubject, Observable, Subscription } from 'rxjs';
import { Project } from 'src/app/proto/generated/management_pb'; import { GrantedProject, Project } from 'src/app/proto/generated/management_pb';
import { ProjectService } from 'src/app/services/project.service'; import { ProjectService } from 'src/app/services/project.service';
import { ToastService } from 'src/app/services/toast.service'; import { ToastService } from 'src/app/services/toast.service';
@ -37,8 +37,8 @@ import { ToastService } from 'src/app/services/toast.service';
}) })
export class ProjectListComponent implements OnInit { export class ProjectListComponent implements OnInit {
public totalResult: number = 0; public totalResult: number = 0;
public dataSource: MatTableDataSource<Project.AsObject> = new MatTableDataSource<Project.AsObject>(); public dataSource: MatTableDataSource<GrantedProject.AsObject> = new MatTableDataSource<GrantedProject.AsObject>();
public projectList: Project.AsObject[] = []; public projectList: GrantedProject.AsObject[] = [];
public displayedColumns: string[] = ['select', 'name', 'orgName', 'orgDomain', 'type', 'state', 'creationDate', 'changeDate']; public displayedColumns: string[] = ['select', 'name', 'orgName', 'orgDomain', 'type', 'state', 'creationDate', 'changeDate'];
public selection: SelectionModel<Project.AsObject> = new SelectionModel<Project.AsObject>(true, []); public selection: SelectionModel<Project.AsObject> = new SelectionModel<Project.AsObject>(true, []);
private loadingSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false); private loadingSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
@ -79,13 +79,16 @@ export class ProjectListComponent implements OnInit {
} }
private async getData(limit: number, offset: number): Promise<void> { private async getData(limit: number, offset: number): Promise<void> {
console.log('getprojects');
this.loadingSubject.next(true); this.loadingSubject.next(true);
this.projectService.SearchProjects(limit, offset).then(res => { this.projectService.SearchGrantedProjects(limit, offset).then(res => {
this.projectList = res.toObject().resultList; this.projectList = res.toObject().resultList;
this.totalResult = res.toObject().totalResult; this.totalResult = res.toObject().totalResult;
this.dataSource.data = this.projectList; this.dataSource.data = this.projectList;
this.loadingSubject.next(false); this.loadingSubject.next(false);
console.log(this.projectList);
}).catch(error => { }).catch(error => {
console.error(error);
this.toast.showError(error.message); this.toast.showError(error.message);
this.loadingSubject.next(false); this.loadingSubject.next(false);
}); });

View File

@ -1,7 +1,6 @@
import { DataSource } from '@angular/cdk/collections'; import { DataSource } from '@angular/cdk/collections';
import { BehaviorSubject, from, Observable, of } from 'rxjs'; import { BehaviorSubject, Observable } from 'rxjs';
import { catchError, finalize, map } from 'rxjs/operators'; import { Project, ProjectMember } from 'src/app/proto/generated/management_pb';
import { Project, ProjectMember, ProjectMemberSearchResponse, ProjectType } from 'src/app/proto/generated/management_pb';
import { ProjectService } from 'src/app/services/project.service'; import { ProjectService } from 'src/app/services/project.service';
/** /**
@ -23,24 +22,25 @@ export class ProjectMembersDataSource extends DataSource<ProjectMember.AsObject>
const offset = pageIndex * pageSize; const offset = pageIndex * pageSize;
this.loadingSubject.next(true); this.loadingSubject.next(true);
// TODO
const promise: Promise<ProjectMemberSearchResponse> | undefined = // const promise: Promise<ProjectMemberSearchResponse> | undefined =
project.type === ProjectType.PROJECTTYPE_SELF ? // project.type === ProjectType.PROJECTTYPE_OWNED ?
this.projectService.SearchProjectMembers(project.id, pageSize, offset) : // this.projectService.SearchProjectMembers(project.id, pageSize, offset) :
project.type === ProjectType.PROJECTTYPE_GRANTED ? // project.type === ProjectType.PROJECTTYPE_GRANTED ?
this.projectService.SearchProjectGrantMembers(project.id, project.grantId, pageSize, offset) : undefined; // this.projectService.SearchProjectGrantMembers(project.id,
if (promise) { // project.grantId, pageSize, offset) : undefined;
from(promise).pipe( // if (promise) {
map(resp => { // from(promise).pipe(
this.totalResult = resp.toObject().totalResult; // map(resp => {
return resp.toObject().resultList; // this.totalResult = resp.toObject().totalResult;
}), // return resp.toObject().resultList;
catchError(() => of([])), // }),
finalize(() => this.loadingSubject.next(false)), // catchError(() => of([])),
).subscribe(members => { // finalize(() => this.loadingSubject.next(false)),
this.membersSubject.next(members); // ).subscribe(members => {
}); // this.membersSubject.next(members);
} // });
// }
} }

View File

@ -5,14 +5,10 @@ import { MatPaginator } from '@angular/material/paginator';
import { MatTable } from '@angular/material/table'; import { MatTable } from '@angular/material/table';
import { ActivatedRoute } from '@angular/router'; import { ActivatedRoute } from '@angular/router';
import { tap } from 'rxjs/operators'; import { tap } from 'rxjs/operators';
import { Project, ProjectMember, ProjectType, User } from 'src/app/proto/generated/management_pb'; import { Project, ProjectMember } from 'src/app/proto/generated/management_pb';
import { ProjectService } from 'src/app/services/project.service'; import { ProjectService } from 'src/app/services/project.service';
import { ToastService } from 'src/app/services/toast.service'; import { ToastService } from 'src/app/services/toast.service';
import {
CreationType,
ProjectMemberCreateDialogComponent,
} from '../../../modules/add-member-dialog/project-member-create-dialog.component';
import { ProjectMembersDataSource } from './project-members-datasource'; import { ProjectMembersDataSource } from './project-members-datasource';
@Component({ @Component({
@ -92,31 +88,33 @@ export class ProjectMembersComponent implements AfterViewInit {
} }
public openAddMember(): void { public openAddMember(): void {
const dialogRef = this.dialog.open(ProjectMemberCreateDialogComponent, {
data: {
creationType: this.project.type ===
ProjectType.PROJECTTYPE_GRANTED ? CreationType.PROJECT_GRANTED :
ProjectType.PROJECTTYPE_SELF ? CreationType.PROJECT_OWNED : undefined,
projectId: this.project.id,
},
width: '400px',
});
dialogRef.afterClosed().subscribe(resp => { // TODO
if (resp) { // const dialogRef = this.dialog.open(ProjectMemberCreateDialogComponent, {
const users: User.AsObject[] = resp.users; // data: {
const roles: string[] = resp.roles; // creationType: this.project.type ===
// ProjectType.PROJECTTYPE_GRANTED ? CreationType.PROJECT_GRANTED :
// ProjectType.PROJECTTYPE_OWNED ? CreationType.PROJECT_OWNED : undefined,
// projectId: this.project.id,
// },
// width: '400px',
// });
if (users && users.length && roles && roles.length) { // dialogRef.afterClosed().subscribe(resp => {
Promise.all(users.map(user => { // if (resp) {
return this.projectService.AddProjectMember(this.project.id, user.id, roles); // const users: User.AsObject[] = resp.users;
})).then(() => { // const roles: string[] = resp.roles;
this.toast.showError('members added');
}).catch(error => { // if (users && users.length && roles && roles.length) {
this.toast.showError(error.message); // Promise.all(users.map(user => {
}); // return this.projectService.AddProjectMember(this.project.id, user.id, roles);
} // })).then(() => {
} // this.toast.showError('members added');
}); // }).catch(error => {
// this.toast.showError(error.message);
// });
// }
// }
// });
} }
} }

View File

@ -14,6 +14,11 @@ const routes: Routes = [
path: 'create', path: 'create',
loadChildren: () => import('../project-create/project-create.module').then(m => m.ProjectCreateModule), loadChildren: () => import('../project-create/project-create.module').then(m => m.ProjectCreateModule),
}, },
{
path: ':id/grant/:grantId',
component: ProjectDetailComponent,
data: { animation: 'HomePage' },
},
{ {
path: ':id', path: ':id',
component: ProjectDetailComponent, component: ProjectDetailComponent,

View File

@ -125,9 +125,11 @@ export class AuthUserDetailComponent implements OnDestroy {
} }
public setPassword(): void { public setPassword(): void {
if (this.passwordForm.valid && this.newPassword && this.newPassword.value && this.newPassword.valid) { if (this.passwordForm.valid && this.currentPassword &&
this.currentPassword.value &&
this.newPassword && this.newPassword.value && this.newPassword.valid) {
this.userService this.userService
.SetMyPassword(this.newPassword.value).then((data: any) => { .ChangeMyPassword(this.currentPassword.value, this.newPassword.value).then((data: any) => {
this.toast.showInfo('Password Set'); this.toast.showInfo('Password Set');
this.email = data.toObject(); this.email = data.toObject();
}).catch(data => { }).catch(data => {

View File

@ -1,5 +1,5 @@
/** /**
* @fileoverview gRPC-Web generated client stub for zitadel.admin.api.v1 * @fileoverview gRPC-Web generated client stub for caos.zitadel.admin.api.v1
* @enhanceable * @enhanceable
* @public * @public
*/ */
@ -26,10 +26,11 @@ var protoc$gen$swagger_options_annotations_pb = require('./protoc-gen-swagger/op
var authoption_options_pb = require('./authoption/options_pb.js') var authoption_options_pb = require('./authoption/options_pb.js')
const proto = {}; const proto = {};
proto.zitadel = {}; proto.caos = {};
proto.zitadel.admin = {}; proto.caos.zitadel = {};
proto.zitadel.admin.api = {}; proto.caos.zitadel.admin = {};
proto.zitadel.admin.api.v1 = require('./admin_pb.js'); proto.caos.zitadel.admin.api = {};
proto.caos.zitadel.admin.api.v1 = require('./admin_pb.js');
/** /**
* @param {string} hostname * @param {string} hostname
@ -39,7 +40,7 @@ proto.zitadel.admin.api.v1 = require('./admin_pb.js');
* @struct * @struct
* @final * @final
*/ */
proto.zitadel.admin.api.v1.AdminServiceClient = proto.caos.zitadel.admin.api.v1.AdminServiceClient =
function(hostname, credentials, options) { function(hostname, credentials, options) {
if (!options) options = {}; if (!options) options = {};
options['format'] = 'binary'; options['format'] = 'binary';
@ -65,7 +66,7 @@ proto.zitadel.admin.api.v1.AdminServiceClient =
* @struct * @struct
* @final * @final
*/ */
proto.zitadel.admin.api.v1.AdminServicePromiseClient = proto.caos.zitadel.admin.api.v1.AdminServicePromiseClient =
function(hostname, credentials, options) { function(hostname, credentials, options) {
if (!options) options = {}; if (!options) options = {};
options['format'] = 'binary'; options['format'] = 'binary';
@ -90,7 +91,7 @@ proto.zitadel.admin.api.v1.AdminServicePromiseClient =
* !proto.google.protobuf.Empty>} * !proto.google.protobuf.Empty>}
*/ */
const methodDescriptor_AdminService_Healthz = new grpc.web.MethodDescriptor( const methodDescriptor_AdminService_Healthz = new grpc.web.MethodDescriptor(
'/zitadel.admin.api.v1.AdminService/Healthz', '/caos.zitadel.admin.api.v1.AdminService/Healthz',
grpc.web.MethodType.UNARY, grpc.web.MethodType.UNARY,
google_protobuf_empty_pb.Empty, google_protobuf_empty_pb.Empty,
google_protobuf_empty_pb.Empty, google_protobuf_empty_pb.Empty,
@ -134,10 +135,10 @@ const methodInfo_AdminService_Healthz = new grpc.web.AbstractClientBase.MethodIn
* @return {!grpc.web.ClientReadableStream<!proto.google.protobuf.Empty>|undefined} * @return {!grpc.web.ClientReadableStream<!proto.google.protobuf.Empty>|undefined}
* The XHR Node Readable Stream * The XHR Node Readable Stream
*/ */
proto.zitadel.admin.api.v1.AdminServiceClient.prototype.healthz = proto.caos.zitadel.admin.api.v1.AdminServiceClient.prototype.healthz =
function(request, metadata, callback) { function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ + return this.client_.rpcCall(this.hostname_ +
'/zitadel.admin.api.v1.AdminService/Healthz', '/caos.zitadel.admin.api.v1.AdminService/Healthz',
request, request,
metadata || {}, metadata || {},
methodDescriptor_AdminService_Healthz, methodDescriptor_AdminService_Healthz,
@ -153,10 +154,10 @@ proto.zitadel.admin.api.v1.AdminServiceClient.prototype.healthz =
* @return {!Promise<!proto.google.protobuf.Empty>} * @return {!Promise<!proto.google.protobuf.Empty>}
* A native promise that resolves to the response * A native promise that resolves to the response
*/ */
proto.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.healthz = proto.caos.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.healthz =
function(request, metadata) { function(request, metadata) {
return this.client_.unaryCall(this.hostname_ + return this.client_.unaryCall(this.hostname_ +
'/zitadel.admin.api.v1.AdminService/Healthz', '/caos.zitadel.admin.api.v1.AdminService/Healthz',
request, request,
metadata || {}, metadata || {},
methodDescriptor_AdminService_Healthz); methodDescriptor_AdminService_Healthz);
@ -170,7 +171,7 @@ proto.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.healthz =
* !proto.google.protobuf.Empty>} * !proto.google.protobuf.Empty>}
*/ */
const methodDescriptor_AdminService_Ready = new grpc.web.MethodDescriptor( const methodDescriptor_AdminService_Ready = new grpc.web.MethodDescriptor(
'/zitadel.admin.api.v1.AdminService/Ready', '/caos.zitadel.admin.api.v1.AdminService/Ready',
grpc.web.MethodType.UNARY, grpc.web.MethodType.UNARY,
google_protobuf_empty_pb.Empty, google_protobuf_empty_pb.Empty,
google_protobuf_empty_pb.Empty, google_protobuf_empty_pb.Empty,
@ -214,10 +215,10 @@ const methodInfo_AdminService_Ready = new grpc.web.AbstractClientBase.MethodInfo
* @return {!grpc.web.ClientReadableStream<!proto.google.protobuf.Empty>|undefined} * @return {!grpc.web.ClientReadableStream<!proto.google.protobuf.Empty>|undefined}
* The XHR Node Readable Stream * The XHR Node Readable Stream
*/ */
proto.zitadel.admin.api.v1.AdminServiceClient.prototype.ready = proto.caos.zitadel.admin.api.v1.AdminServiceClient.prototype.ready =
function(request, metadata, callback) { function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ + return this.client_.rpcCall(this.hostname_ +
'/zitadel.admin.api.v1.AdminService/Ready', '/caos.zitadel.admin.api.v1.AdminService/Ready',
request, request,
metadata || {}, metadata || {},
methodDescriptor_AdminService_Ready, methodDescriptor_AdminService_Ready,
@ -233,10 +234,10 @@ proto.zitadel.admin.api.v1.AdminServiceClient.prototype.ready =
* @return {!Promise<!proto.google.protobuf.Empty>} * @return {!Promise<!proto.google.protobuf.Empty>}
* A native promise that resolves to the response * A native promise that resolves to the response
*/ */
proto.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.ready = proto.caos.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.ready =
function(request, metadata) { function(request, metadata) {
return this.client_.unaryCall(this.hostname_ + return this.client_.unaryCall(this.hostname_ +
'/zitadel.admin.api.v1.AdminService/Ready', '/caos.zitadel.admin.api.v1.AdminService/Ready',
request, request,
metadata || {}, metadata || {},
methodDescriptor_AdminService_Ready); methodDescriptor_AdminService_Ready);
@ -250,7 +251,7 @@ proto.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.ready =
* !proto.google.protobuf.Struct>} * !proto.google.protobuf.Struct>}
*/ */
const methodDescriptor_AdminService_Validate = new grpc.web.MethodDescriptor( const methodDescriptor_AdminService_Validate = new grpc.web.MethodDescriptor(
'/zitadel.admin.api.v1.AdminService/Validate', '/caos.zitadel.admin.api.v1.AdminService/Validate',
grpc.web.MethodType.UNARY, grpc.web.MethodType.UNARY,
google_protobuf_empty_pb.Empty, google_protobuf_empty_pb.Empty,
google_protobuf_struct_pb.Struct, google_protobuf_struct_pb.Struct,
@ -294,10 +295,10 @@ const methodInfo_AdminService_Validate = new grpc.web.AbstractClientBase.MethodI
* @return {!grpc.web.ClientReadableStream<!proto.google.protobuf.Struct>|undefined} * @return {!grpc.web.ClientReadableStream<!proto.google.protobuf.Struct>|undefined}
* The XHR Node Readable Stream * The XHR Node Readable Stream
*/ */
proto.zitadel.admin.api.v1.AdminServiceClient.prototype.validate = proto.caos.zitadel.admin.api.v1.AdminServiceClient.prototype.validate =
function(request, metadata, callback) { function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ + return this.client_.rpcCall(this.hostname_ +
'/zitadel.admin.api.v1.AdminService/Validate', '/caos.zitadel.admin.api.v1.AdminService/Validate',
request, request,
metadata || {}, metadata || {},
methodDescriptor_AdminService_Validate, methodDescriptor_AdminService_Validate,
@ -313,10 +314,10 @@ proto.zitadel.admin.api.v1.AdminServiceClient.prototype.validate =
* @return {!Promise<!proto.google.protobuf.Struct>} * @return {!Promise<!proto.google.protobuf.Struct>}
* A native promise that resolves to the response * A native promise that resolves to the response
*/ */
proto.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.validate = proto.caos.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.validate =
function(request, metadata) { function(request, metadata) {
return this.client_.unaryCall(this.hostname_ + return this.client_.unaryCall(this.hostname_ +
'/zitadel.admin.api.v1.AdminService/Validate', '/caos.zitadel.admin.api.v1.AdminService/Validate',
request, request,
metadata || {}, metadata || {},
methodDescriptor_AdminService_Validate); methodDescriptor_AdminService_Validate);
@ -326,58 +327,58 @@ proto.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.validate =
/** /**
* @const * @const
* @type {!grpc.web.MethodDescriptor< * @type {!grpc.web.MethodDescriptor<
* !proto.zitadel.admin.api.v1.UniqueOrgRequest, * !proto.caos.zitadel.admin.api.v1.UniqueOrgRequest,
* !proto.zitadel.admin.api.v1.UniqueOrgResponse>} * !proto.caos.zitadel.admin.api.v1.UniqueOrgResponse>}
*/ */
const methodDescriptor_AdminService_IsOrgUnique = new grpc.web.MethodDescriptor( const methodDescriptor_AdminService_IsOrgUnique = new grpc.web.MethodDescriptor(
'/zitadel.admin.api.v1.AdminService/IsOrgUnique', '/caos.zitadel.admin.api.v1.AdminService/IsOrgUnique',
grpc.web.MethodType.UNARY, grpc.web.MethodType.UNARY,
proto.zitadel.admin.api.v1.UniqueOrgRequest, proto.caos.zitadel.admin.api.v1.UniqueOrgRequest,
proto.zitadel.admin.api.v1.UniqueOrgResponse, proto.caos.zitadel.admin.api.v1.UniqueOrgResponse,
/** /**
* @param {!proto.zitadel.admin.api.v1.UniqueOrgRequest} request * @param {!proto.caos.zitadel.admin.api.v1.UniqueOrgRequest} request
* @return {!Uint8Array} * @return {!Uint8Array}
*/ */
function(request) { function(request) {
return request.serializeBinary(); return request.serializeBinary();
}, },
proto.zitadel.admin.api.v1.UniqueOrgResponse.deserializeBinary proto.caos.zitadel.admin.api.v1.UniqueOrgResponse.deserializeBinary
); );
/** /**
* @const * @const
* @type {!grpc.web.AbstractClientBase.MethodInfo< * @type {!grpc.web.AbstractClientBase.MethodInfo<
* !proto.zitadel.admin.api.v1.UniqueOrgRequest, * !proto.caos.zitadel.admin.api.v1.UniqueOrgRequest,
* !proto.zitadel.admin.api.v1.UniqueOrgResponse>} * !proto.caos.zitadel.admin.api.v1.UniqueOrgResponse>}
*/ */
const methodInfo_AdminService_IsOrgUnique = new grpc.web.AbstractClientBase.MethodInfo( const methodInfo_AdminService_IsOrgUnique = new grpc.web.AbstractClientBase.MethodInfo(
proto.zitadel.admin.api.v1.UniqueOrgResponse, proto.caos.zitadel.admin.api.v1.UniqueOrgResponse,
/** /**
* @param {!proto.zitadel.admin.api.v1.UniqueOrgRequest} request * @param {!proto.caos.zitadel.admin.api.v1.UniqueOrgRequest} request
* @return {!Uint8Array} * @return {!Uint8Array}
*/ */
function(request) { function(request) {
return request.serializeBinary(); return request.serializeBinary();
}, },
proto.zitadel.admin.api.v1.UniqueOrgResponse.deserializeBinary proto.caos.zitadel.admin.api.v1.UniqueOrgResponse.deserializeBinary
); );
/** /**
* @param {!proto.zitadel.admin.api.v1.UniqueOrgRequest} request The * @param {!proto.caos.zitadel.admin.api.v1.UniqueOrgRequest} request The
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata
* @param {function(?grpc.web.Error, ?proto.zitadel.admin.api.v1.UniqueOrgResponse)} * @param {function(?grpc.web.Error, ?proto.caos.zitadel.admin.api.v1.UniqueOrgResponse)}
* callback The callback function(error, response) * callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.zitadel.admin.api.v1.UniqueOrgResponse>|undefined} * @return {!grpc.web.ClientReadableStream<!proto.caos.zitadel.admin.api.v1.UniqueOrgResponse>|undefined}
* The XHR Node Readable Stream * The XHR Node Readable Stream
*/ */
proto.zitadel.admin.api.v1.AdminServiceClient.prototype.isOrgUnique = proto.caos.zitadel.admin.api.v1.AdminServiceClient.prototype.isOrgUnique =
function(request, metadata, callback) { function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ + return this.client_.rpcCall(this.hostname_ +
'/zitadel.admin.api.v1.AdminService/IsOrgUnique', '/caos.zitadel.admin.api.v1.AdminService/IsOrgUnique',
request, request,
metadata || {}, metadata || {},
methodDescriptor_AdminService_IsOrgUnique, methodDescriptor_AdminService_IsOrgUnique,
@ -386,17 +387,17 @@ proto.zitadel.admin.api.v1.AdminServiceClient.prototype.isOrgUnique =
/** /**
* @param {!proto.zitadel.admin.api.v1.UniqueOrgRequest} request The * @param {!proto.caos.zitadel.admin.api.v1.UniqueOrgRequest} request The
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata
* @return {!Promise<!proto.zitadel.admin.api.v1.UniqueOrgResponse>} * @return {!Promise<!proto.caos.zitadel.admin.api.v1.UniqueOrgResponse>}
* A native promise that resolves to the response * A native promise that resolves to the response
*/ */
proto.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.isOrgUnique = proto.caos.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.isOrgUnique =
function(request, metadata) { function(request, metadata) {
return this.client_.unaryCall(this.hostname_ + return this.client_.unaryCall(this.hostname_ +
'/zitadel.admin.api.v1.AdminService/IsOrgUnique', '/caos.zitadel.admin.api.v1.AdminService/IsOrgUnique',
request, request,
metadata || {}, metadata || {},
methodDescriptor_AdminService_IsOrgUnique); methodDescriptor_AdminService_IsOrgUnique);
@ -406,58 +407,58 @@ proto.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.isOrgUnique =
/** /**
* @const * @const
* @type {!grpc.web.MethodDescriptor< * @type {!grpc.web.MethodDescriptor<
* !proto.zitadel.admin.api.v1.OrgID, * !proto.caos.zitadel.admin.api.v1.OrgID,
* !proto.zitadel.admin.api.v1.Org>} * !proto.caos.zitadel.admin.api.v1.Org>}
*/ */
const methodDescriptor_AdminService_GetOrgByID = new grpc.web.MethodDescriptor( const methodDescriptor_AdminService_GetOrgByID = new grpc.web.MethodDescriptor(
'/zitadel.admin.api.v1.AdminService/GetOrgByID', '/caos.zitadel.admin.api.v1.AdminService/GetOrgByID',
grpc.web.MethodType.UNARY, grpc.web.MethodType.UNARY,
proto.zitadel.admin.api.v1.OrgID, proto.caos.zitadel.admin.api.v1.OrgID,
proto.zitadel.admin.api.v1.Org, proto.caos.zitadel.admin.api.v1.Org,
/** /**
* @param {!proto.zitadel.admin.api.v1.OrgID} request * @param {!proto.caos.zitadel.admin.api.v1.OrgID} request
* @return {!Uint8Array} * @return {!Uint8Array}
*/ */
function(request) { function(request) {
return request.serializeBinary(); return request.serializeBinary();
}, },
proto.zitadel.admin.api.v1.Org.deserializeBinary proto.caos.zitadel.admin.api.v1.Org.deserializeBinary
); );
/** /**
* @const * @const
* @type {!grpc.web.AbstractClientBase.MethodInfo< * @type {!grpc.web.AbstractClientBase.MethodInfo<
* !proto.zitadel.admin.api.v1.OrgID, * !proto.caos.zitadel.admin.api.v1.OrgID,
* !proto.zitadel.admin.api.v1.Org>} * !proto.caos.zitadel.admin.api.v1.Org>}
*/ */
const methodInfo_AdminService_GetOrgByID = new grpc.web.AbstractClientBase.MethodInfo( const methodInfo_AdminService_GetOrgByID = new grpc.web.AbstractClientBase.MethodInfo(
proto.zitadel.admin.api.v1.Org, proto.caos.zitadel.admin.api.v1.Org,
/** /**
* @param {!proto.zitadel.admin.api.v1.OrgID} request * @param {!proto.caos.zitadel.admin.api.v1.OrgID} request
* @return {!Uint8Array} * @return {!Uint8Array}
*/ */
function(request) { function(request) {
return request.serializeBinary(); return request.serializeBinary();
}, },
proto.zitadel.admin.api.v1.Org.deserializeBinary proto.caos.zitadel.admin.api.v1.Org.deserializeBinary
); );
/** /**
* @param {!proto.zitadel.admin.api.v1.OrgID} request The * @param {!proto.caos.zitadel.admin.api.v1.OrgID} request The
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata
* @param {function(?grpc.web.Error, ?proto.zitadel.admin.api.v1.Org)} * @param {function(?grpc.web.Error, ?proto.caos.zitadel.admin.api.v1.Org)}
* callback The callback function(error, response) * callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.zitadel.admin.api.v1.Org>|undefined} * @return {!grpc.web.ClientReadableStream<!proto.caos.zitadel.admin.api.v1.Org>|undefined}
* The XHR Node Readable Stream * The XHR Node Readable Stream
*/ */
proto.zitadel.admin.api.v1.AdminServiceClient.prototype.getOrgByID = proto.caos.zitadel.admin.api.v1.AdminServiceClient.prototype.getOrgByID =
function(request, metadata, callback) { function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ + return this.client_.rpcCall(this.hostname_ +
'/zitadel.admin.api.v1.AdminService/GetOrgByID', '/caos.zitadel.admin.api.v1.AdminService/GetOrgByID',
request, request,
metadata || {}, metadata || {},
methodDescriptor_AdminService_GetOrgByID, methodDescriptor_AdminService_GetOrgByID,
@ -466,17 +467,17 @@ proto.zitadel.admin.api.v1.AdminServiceClient.prototype.getOrgByID =
/** /**
* @param {!proto.zitadel.admin.api.v1.OrgID} request The * @param {!proto.caos.zitadel.admin.api.v1.OrgID} request The
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata
* @return {!Promise<!proto.zitadel.admin.api.v1.Org>} * @return {!Promise<!proto.caos.zitadel.admin.api.v1.Org>}
* A native promise that resolves to the response * A native promise that resolves to the response
*/ */
proto.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.getOrgByID = proto.caos.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.getOrgByID =
function(request, metadata) { function(request, metadata) {
return this.client_.unaryCall(this.hostname_ + return this.client_.unaryCall(this.hostname_ +
'/zitadel.admin.api.v1.AdminService/GetOrgByID', '/caos.zitadel.admin.api.v1.AdminService/GetOrgByID',
request, request,
metadata || {}, metadata || {},
methodDescriptor_AdminService_GetOrgByID); methodDescriptor_AdminService_GetOrgByID);
@ -486,58 +487,58 @@ proto.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.getOrgByID =
/** /**
* @const * @const
* @type {!grpc.web.MethodDescriptor< * @type {!grpc.web.MethodDescriptor<
* !proto.zitadel.admin.api.v1.OrgSearchRequest, * !proto.caos.zitadel.admin.api.v1.OrgSearchRequest,
* !proto.zitadel.admin.api.v1.OrgSearchResponse>} * !proto.caos.zitadel.admin.api.v1.OrgSearchResponse>}
*/ */
const methodDescriptor_AdminService_SearchOrgs = new grpc.web.MethodDescriptor( const methodDescriptor_AdminService_SearchOrgs = new grpc.web.MethodDescriptor(
'/zitadel.admin.api.v1.AdminService/SearchOrgs', '/caos.zitadel.admin.api.v1.AdminService/SearchOrgs',
grpc.web.MethodType.UNARY, grpc.web.MethodType.UNARY,
proto.zitadel.admin.api.v1.OrgSearchRequest, proto.caos.zitadel.admin.api.v1.OrgSearchRequest,
proto.zitadel.admin.api.v1.OrgSearchResponse, proto.caos.zitadel.admin.api.v1.OrgSearchResponse,
/** /**
* @param {!proto.zitadel.admin.api.v1.OrgSearchRequest} request * @param {!proto.caos.zitadel.admin.api.v1.OrgSearchRequest} request
* @return {!Uint8Array} * @return {!Uint8Array}
*/ */
function(request) { function(request) {
return request.serializeBinary(); return request.serializeBinary();
}, },
proto.zitadel.admin.api.v1.OrgSearchResponse.deserializeBinary proto.caos.zitadel.admin.api.v1.OrgSearchResponse.deserializeBinary
); );
/** /**
* @const * @const
* @type {!grpc.web.AbstractClientBase.MethodInfo< * @type {!grpc.web.AbstractClientBase.MethodInfo<
* !proto.zitadel.admin.api.v1.OrgSearchRequest, * !proto.caos.zitadel.admin.api.v1.OrgSearchRequest,
* !proto.zitadel.admin.api.v1.OrgSearchResponse>} * !proto.caos.zitadel.admin.api.v1.OrgSearchResponse>}
*/ */
const methodInfo_AdminService_SearchOrgs = new grpc.web.AbstractClientBase.MethodInfo( const methodInfo_AdminService_SearchOrgs = new grpc.web.AbstractClientBase.MethodInfo(
proto.zitadel.admin.api.v1.OrgSearchResponse, proto.caos.zitadel.admin.api.v1.OrgSearchResponse,
/** /**
* @param {!proto.zitadel.admin.api.v1.OrgSearchRequest} request * @param {!proto.caos.zitadel.admin.api.v1.OrgSearchRequest} request
* @return {!Uint8Array} * @return {!Uint8Array}
*/ */
function(request) { function(request) {
return request.serializeBinary(); return request.serializeBinary();
}, },
proto.zitadel.admin.api.v1.OrgSearchResponse.deserializeBinary proto.caos.zitadel.admin.api.v1.OrgSearchResponse.deserializeBinary
); );
/** /**
* @param {!proto.zitadel.admin.api.v1.OrgSearchRequest} request The * @param {!proto.caos.zitadel.admin.api.v1.OrgSearchRequest} request The
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata
* @param {function(?grpc.web.Error, ?proto.zitadel.admin.api.v1.OrgSearchResponse)} * @param {function(?grpc.web.Error, ?proto.caos.zitadel.admin.api.v1.OrgSearchResponse)}
* callback The callback function(error, response) * callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.zitadel.admin.api.v1.OrgSearchResponse>|undefined} * @return {!grpc.web.ClientReadableStream<!proto.caos.zitadel.admin.api.v1.OrgSearchResponse>|undefined}
* The XHR Node Readable Stream * The XHR Node Readable Stream
*/ */
proto.zitadel.admin.api.v1.AdminServiceClient.prototype.searchOrgs = proto.caos.zitadel.admin.api.v1.AdminServiceClient.prototype.searchOrgs =
function(request, metadata, callback) { function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ + return this.client_.rpcCall(this.hostname_ +
'/zitadel.admin.api.v1.AdminService/SearchOrgs', '/caos.zitadel.admin.api.v1.AdminService/SearchOrgs',
request, request,
metadata || {}, metadata || {},
methodDescriptor_AdminService_SearchOrgs, methodDescriptor_AdminService_SearchOrgs,
@ -546,17 +547,17 @@ proto.zitadel.admin.api.v1.AdminServiceClient.prototype.searchOrgs =
/** /**
* @param {!proto.zitadel.admin.api.v1.OrgSearchRequest} request The * @param {!proto.caos.zitadel.admin.api.v1.OrgSearchRequest} request The
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata
* @return {!Promise<!proto.zitadel.admin.api.v1.OrgSearchResponse>} * @return {!Promise<!proto.caos.zitadel.admin.api.v1.OrgSearchResponse>}
* A native promise that resolves to the response * A native promise that resolves to the response
*/ */
proto.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.searchOrgs = proto.caos.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.searchOrgs =
function(request, metadata) { function(request, metadata) {
return this.client_.unaryCall(this.hostname_ + return this.client_.unaryCall(this.hostname_ +
'/zitadel.admin.api.v1.AdminService/SearchOrgs', '/caos.zitadel.admin.api.v1.AdminService/SearchOrgs',
request, request,
metadata || {}, metadata || {},
methodDescriptor_AdminService_SearchOrgs); methodDescriptor_AdminService_SearchOrgs);
@ -566,58 +567,58 @@ proto.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.searchOrgs =
/** /**
* @const * @const
* @type {!grpc.web.MethodDescriptor< * @type {!grpc.web.MethodDescriptor<
* !proto.zitadel.admin.api.v1.OrgSetUpRequest, * !proto.caos.zitadel.admin.api.v1.OrgSetUpRequest,
* !proto.zitadel.admin.api.v1.OrgSetUpResponse>} * !proto.caos.zitadel.admin.api.v1.OrgSetUpResponse>}
*/ */
const methodDescriptor_AdminService_SetUpOrg = new grpc.web.MethodDescriptor( const methodDescriptor_AdminService_SetUpOrg = new grpc.web.MethodDescriptor(
'/zitadel.admin.api.v1.AdminService/SetUpOrg', '/caos.zitadel.admin.api.v1.AdminService/SetUpOrg',
grpc.web.MethodType.UNARY, grpc.web.MethodType.UNARY,
proto.zitadel.admin.api.v1.OrgSetUpRequest, proto.caos.zitadel.admin.api.v1.OrgSetUpRequest,
proto.zitadel.admin.api.v1.OrgSetUpResponse, proto.caos.zitadel.admin.api.v1.OrgSetUpResponse,
/** /**
* @param {!proto.zitadel.admin.api.v1.OrgSetUpRequest} request * @param {!proto.caos.zitadel.admin.api.v1.OrgSetUpRequest} request
* @return {!Uint8Array} * @return {!Uint8Array}
*/ */
function(request) { function(request) {
return request.serializeBinary(); return request.serializeBinary();
}, },
proto.zitadel.admin.api.v1.OrgSetUpResponse.deserializeBinary proto.caos.zitadel.admin.api.v1.OrgSetUpResponse.deserializeBinary
); );
/** /**
* @const * @const
* @type {!grpc.web.AbstractClientBase.MethodInfo< * @type {!grpc.web.AbstractClientBase.MethodInfo<
* !proto.zitadel.admin.api.v1.OrgSetUpRequest, * !proto.caos.zitadel.admin.api.v1.OrgSetUpRequest,
* !proto.zitadel.admin.api.v1.OrgSetUpResponse>} * !proto.caos.zitadel.admin.api.v1.OrgSetUpResponse>}
*/ */
const methodInfo_AdminService_SetUpOrg = new grpc.web.AbstractClientBase.MethodInfo( const methodInfo_AdminService_SetUpOrg = new grpc.web.AbstractClientBase.MethodInfo(
proto.zitadel.admin.api.v1.OrgSetUpResponse, proto.caos.zitadel.admin.api.v1.OrgSetUpResponse,
/** /**
* @param {!proto.zitadel.admin.api.v1.OrgSetUpRequest} request * @param {!proto.caos.zitadel.admin.api.v1.OrgSetUpRequest} request
* @return {!Uint8Array} * @return {!Uint8Array}
*/ */
function(request) { function(request) {
return request.serializeBinary(); return request.serializeBinary();
}, },
proto.zitadel.admin.api.v1.OrgSetUpResponse.deserializeBinary proto.caos.zitadel.admin.api.v1.OrgSetUpResponse.deserializeBinary
); );
/** /**
* @param {!proto.zitadel.admin.api.v1.OrgSetUpRequest} request The * @param {!proto.caos.zitadel.admin.api.v1.OrgSetUpRequest} request The
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata
* @param {function(?grpc.web.Error, ?proto.zitadel.admin.api.v1.OrgSetUpResponse)} * @param {function(?grpc.web.Error, ?proto.caos.zitadel.admin.api.v1.OrgSetUpResponse)}
* callback The callback function(error, response) * callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.zitadel.admin.api.v1.OrgSetUpResponse>|undefined} * @return {!grpc.web.ClientReadableStream<!proto.caos.zitadel.admin.api.v1.OrgSetUpResponse>|undefined}
* The XHR Node Readable Stream * The XHR Node Readable Stream
*/ */
proto.zitadel.admin.api.v1.AdminServiceClient.prototype.setUpOrg = proto.caos.zitadel.admin.api.v1.AdminServiceClient.prototype.setUpOrg =
function(request, metadata, callback) { function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ + return this.client_.rpcCall(this.hostname_ +
'/zitadel.admin.api.v1.AdminService/SetUpOrg', '/caos.zitadel.admin.api.v1.AdminService/SetUpOrg',
request, request,
metadata || {}, metadata || {},
methodDescriptor_AdminService_SetUpOrg, methodDescriptor_AdminService_SetUpOrg,
@ -626,22 +627,22 @@ proto.zitadel.admin.api.v1.AdminServiceClient.prototype.setUpOrg =
/** /**
* @param {!proto.zitadel.admin.api.v1.OrgSetUpRequest} request The * @param {!proto.caos.zitadel.admin.api.v1.OrgSetUpRequest} request The
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata
* @return {!Promise<!proto.zitadel.admin.api.v1.OrgSetUpResponse>} * @return {!Promise<!proto.caos.zitadel.admin.api.v1.OrgSetUpResponse>}
* A native promise that resolves to the response * A native promise that resolves to the response
*/ */
proto.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.setUpOrg = proto.caos.zitadel.admin.api.v1.AdminServicePromiseClient.prototype.setUpOrg =
function(request, metadata) { function(request, metadata) {
return this.client_.unaryCall(this.hostname_ + return this.client_.unaryCall(this.hostname_ +
'/zitadel.admin.api.v1.AdminService/SetUpOrg', '/caos.zitadel.admin.api.v1.AdminService/SetUpOrg',
request, request,
metadata || {}, metadata || {},
methodDescriptor_AdminService_SetUpOrg); methodDescriptor_AdminService_SetUpOrg);
}; };
module.exports = proto.zitadel.admin.api.v1; module.exports = proto.caos.zitadel.admin.api.v1;

View File

@ -208,8 +208,8 @@ export class OrgSetUpRequest extends jspb.Message {
hasOrg(): boolean; hasOrg(): boolean;
clearOrg(): void; clearOrg(): void;
getUser(): RegisterUserRequest | undefined; getUser(): CreateUserRequest | undefined;
setUser(value?: RegisterUserRequest): void; setUser(value?: CreateUserRequest): void;
hasUser(): boolean; hasUser(): boolean;
clearUser(): void; clearUser(): void;
@ -224,7 +224,7 @@ export class OrgSetUpRequest extends jspb.Message {
export namespace OrgSetUpRequest { export namespace OrgSetUpRequest {
export type AsObject = { export type AsObject = {
org?: CreateOrgRequest.AsObject, org?: CreateOrgRequest.AsObject,
user?: RegisterUserRequest.AsObject, user?: CreateUserRequest.AsObject,
} }
} }
@ -254,9 +254,9 @@ export namespace OrgSetUpResponse {
} }
} }
export class RegisterUserRequest extends jspb.Message { export class CreateUserRequest extends jspb.Message {
getEmail(): string; getUserName(): string;
setEmail(value: string): void; setUserName(value: string): void;
getFirstName(): string; getFirstName(): string;
setFirstName(value: string): void; setFirstName(value: string): void;
@ -276,31 +276,63 @@ export class RegisterUserRequest extends jspb.Message {
getGender(): Gender; getGender(): Gender;
setGender(value: Gender): void; setGender(value: Gender): void;
getEmail(): string;
setEmail(value: string): void;
getIsEmailVerified(): boolean;
setIsEmailVerified(value: boolean): void;
getPhone(): string;
setPhone(value: string): void;
getIsPhoneVerified(): boolean;
setIsPhoneVerified(value: boolean): void;
getCountry(): string;
setCountry(value: string): void;
getLocality(): string;
setLocality(value: string): void;
getPostalCode(): string;
setPostalCode(value: string): void;
getRegion(): string;
setRegion(value: string): void;
getStreetAddress(): string;
setStreetAddress(value: string): void;
getPassword(): string; getPassword(): string;
setPassword(value: string): void; setPassword(value: string): void;
getOrgId(): string;
setOrgId(value: string): void;
serializeBinary(): Uint8Array; serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): RegisterUserRequest.AsObject; toObject(includeInstance?: boolean): CreateUserRequest.AsObject;
static toObject(includeInstance: boolean, msg: RegisterUserRequest): RegisterUserRequest.AsObject; static toObject(includeInstance: boolean, msg: CreateUserRequest): CreateUserRequest.AsObject;
static serializeBinaryToWriter(message: RegisterUserRequest, writer: jspb.BinaryWriter): void; static serializeBinaryToWriter(message: CreateUserRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): RegisterUserRequest; static deserializeBinary(bytes: Uint8Array): CreateUserRequest;
static deserializeBinaryFromReader(message: RegisterUserRequest, reader: jspb.BinaryReader): RegisterUserRequest; static deserializeBinaryFromReader(message: CreateUserRequest, reader: jspb.BinaryReader): CreateUserRequest;
} }
export namespace RegisterUserRequest { export namespace CreateUserRequest {
export type AsObject = { export type AsObject = {
email: string, userName: string,
firstName: string, firstName: string,
lastName: string, lastName: string,
nickName: string, nickName: string,
displayName: string, displayName: string,
preferredLanguage: string, preferredLanguage: string,
gender: Gender, gender: Gender,
email: string,
isEmailVerified: boolean,
phone: string,
isPhoneVerified: boolean,
country: string,
locality: string,
postalCode: string,
region: string,
streetAddress: string,
password: string, password: string,
orgId: string,
} }
} }
@ -369,6 +401,9 @@ export class User extends jspb.Message {
getStreetAddress(): string; getStreetAddress(): string;
setStreetAddress(value: string): void; setStreetAddress(value: string): void;
getSequence(): number;
setSequence(value: number): void;
serializeBinary(): Uint8Array; serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): User.AsObject; toObject(includeInstance?: boolean): User.AsObject;
static toObject(includeInstance: boolean, msg: User): User.AsObject; static toObject(includeInstance: boolean, msg: User): User.AsObject;
@ -399,6 +434,7 @@ export namespace User {
postalCode: string, postalCode: string,
region: string, region: string,
streetAddress: string, streetAddress: string,
sequence: number,
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -9,20 +9,20 @@ import * as protoc$gen$swagger_options_annotations_pb from './protoc-gen-swagger
import * as authoption_options_pb from './authoption/options_pb'; import * as authoption_options_pb from './authoption/options_pb';
import { import {
IsAdminResponse,
MfaOtpResponse, MfaOtpResponse,
MultiFactors, MultiFactors,
MyPermissions, MyPermissions,
MyProjectOrgSearchRequest, MyProjectOrgSearchRequest,
MyProjectOrgSearchResponse, MyProjectOrgSearchResponse,
PasswordChange, PasswordChange,
PasswordRequest,
UpdateUserAddressRequest, UpdateUserAddressRequest,
UpdateUserEmailRequest, UpdateUserEmailRequest,
UpdateUserPhoneRequest, UpdateUserPhoneRequest,
UpdateUserProfileRequest, UpdateUserProfileRequest,
UserAddress, UserAddress,
UserEmail, UserEmail,
UserGrantSearchRequest,
UserGrantSearchResponse,
UserPhone, UserPhone,
UserProfile, UserProfile,
UserSessionViews, UserSessionViews,
@ -154,13 +154,6 @@ export class AuthServiceClient {
response: MultiFactors) => void response: MultiFactors) => void
): grpcWeb.ClientReadableStream<MultiFactors>; ): grpcWeb.ClientReadableStream<MultiFactors>;
setMyPassword(
request: PasswordRequest,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error,
response: google_protobuf_empty_pb.Empty) => void
): grpcWeb.ClientReadableStream<google_protobuf_empty_pb.Empty>;
changeMyPassword( changeMyPassword(
request: PasswordChange, request: PasswordChange,
metadata: grpcWeb.Metadata | undefined, metadata: grpcWeb.Metadata | undefined,
@ -179,8 +172,8 @@ export class AuthServiceClient {
request: VerifyMfaOtp, request: VerifyMfaOtp,
metadata: grpcWeb.Metadata | undefined, metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error, callback: (err: grpcWeb.Error,
response: MfaOtpResponse) => void response: google_protobuf_empty_pb.Empty) => void
): grpcWeb.ClientReadableStream<MfaOtpResponse>; ): grpcWeb.ClientReadableStream<google_protobuf_empty_pb.Empty>;
removeMfaOTP( removeMfaOTP(
request: google_protobuf_empty_pb.Empty, request: google_protobuf_empty_pb.Empty,
@ -189,6 +182,13 @@ export class AuthServiceClient {
response: google_protobuf_empty_pb.Empty) => void response: google_protobuf_empty_pb.Empty) => void
): grpcWeb.ClientReadableStream<google_protobuf_empty_pb.Empty>; ): grpcWeb.ClientReadableStream<google_protobuf_empty_pb.Empty>;
searchMyUserGrant(
request: UserGrantSearchRequest,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error,
response: UserGrantSearchResponse) => void
): grpcWeb.ClientReadableStream<UserGrantSearchResponse>;
searchMyProjectOrgs( searchMyProjectOrgs(
request: MyProjectOrgSearchRequest, request: MyProjectOrgSearchRequest,
metadata: grpcWeb.Metadata | undefined, metadata: grpcWeb.Metadata | undefined,
@ -196,13 +196,6 @@ export class AuthServiceClient {
response: MyProjectOrgSearchResponse) => void response: MyProjectOrgSearchResponse) => void
): grpcWeb.ClientReadableStream<MyProjectOrgSearchResponse>; ): grpcWeb.ClientReadableStream<MyProjectOrgSearchResponse>;
isIamAdmin(
request: google_protobuf_empty_pb.Empty,
metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error,
response: IsAdminResponse) => void
): grpcWeb.ClientReadableStream<IsAdminResponse>;
getMyZitadelPermissions( getMyZitadelPermissions(
request: google_protobuf_empty_pb.Empty, request: google_protobuf_empty_pb.Empty,
metadata: grpcWeb.Metadata | undefined, metadata: grpcWeb.Metadata | undefined,
@ -302,11 +295,6 @@ export class AuthServicePromiseClient {
metadata?: grpcWeb.Metadata metadata?: grpcWeb.Metadata
): Promise<MultiFactors>; ): Promise<MultiFactors>;
setMyPassword(
request: PasswordRequest,
metadata?: grpcWeb.Metadata
): Promise<google_protobuf_empty_pb.Empty>;
changeMyPassword( changeMyPassword(
request: PasswordChange, request: PasswordChange,
metadata?: grpcWeb.Metadata metadata?: grpcWeb.Metadata
@ -320,23 +308,23 @@ export class AuthServicePromiseClient {
verifyMfaOTP( verifyMfaOTP(
request: VerifyMfaOtp, request: VerifyMfaOtp,
metadata?: grpcWeb.Metadata metadata?: grpcWeb.Metadata
): Promise<MfaOtpResponse>; ): Promise<google_protobuf_empty_pb.Empty>;
removeMfaOTP( removeMfaOTP(
request: google_protobuf_empty_pb.Empty, request: google_protobuf_empty_pb.Empty,
metadata?: grpcWeb.Metadata metadata?: grpcWeb.Metadata
): Promise<google_protobuf_empty_pb.Empty>; ): Promise<google_protobuf_empty_pb.Empty>;
searchMyUserGrant(
request: UserGrantSearchRequest,
metadata?: grpcWeb.Metadata
): Promise<UserGrantSearchResponse>;
searchMyProjectOrgs( searchMyProjectOrgs(
request: MyProjectOrgSearchRequest, request: MyProjectOrgSearchRequest,
metadata?: grpcWeb.Metadata metadata?: grpcWeb.Metadata
): Promise<MyProjectOrgSearchResponse>; ): Promise<MyProjectOrgSearchResponse>;
isIamAdmin(
request: google_protobuf_empty_pb.Empty,
metadata?: grpcWeb.Metadata
): Promise<IsAdminResponse>;
getMyZitadelPermissions( getMyZitadelPermissions(
request: google_protobuf_empty_pb.Empty, request: google_protobuf_empty_pb.Empty,
metadata?: grpcWeb.Metadata metadata?: grpcWeb.Metadata

File diff suppressed because it is too large Load Diff

View File

@ -218,6 +218,16 @@ export class UserProfile extends jspb.Message {
getSequence(): number; getSequence(): number;
setSequence(value: number): void; setSequence(value: number): void;
getCreationDate(): google_protobuf_timestamp_pb.Timestamp | undefined;
setCreationDate(value?: google_protobuf_timestamp_pb.Timestamp): void;
hasCreationDate(): boolean;
clearCreationDate(): void;
getChangeDate(): google_protobuf_timestamp_pb.Timestamp | undefined;
setChangeDate(value?: google_protobuf_timestamp_pb.Timestamp): void;
hasChangeDate(): boolean;
clearChangeDate(): void;
serializeBinary(): Uint8Array; serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UserProfile.AsObject; toObject(includeInstance?: boolean): UserProfile.AsObject;
static toObject(includeInstance: boolean, msg: UserProfile): UserProfile.AsObject; static toObject(includeInstance: boolean, msg: UserProfile): UserProfile.AsObject;
@ -237,6 +247,8 @@ export namespace UserProfile {
preferredLanguage: string, preferredLanguage: string,
gender: Gender, gender: Gender,
sequence: number, sequence: number,
creationDate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
changeDate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
} }
} }
@ -291,6 +303,16 @@ export class UserEmail extends jspb.Message {
getSequence(): number; getSequence(): number;
setSequence(value: number): void; setSequence(value: number): void;
getCreationDate(): google_protobuf_timestamp_pb.Timestamp | undefined;
setCreationDate(value?: google_protobuf_timestamp_pb.Timestamp): void;
hasCreationDate(): boolean;
clearCreationDate(): void;
getChangeDate(): google_protobuf_timestamp_pb.Timestamp | undefined;
setChangeDate(value?: google_protobuf_timestamp_pb.Timestamp): void;
hasChangeDate(): boolean;
clearChangeDate(): void;
serializeBinary(): Uint8Array; serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UserEmail.AsObject; toObject(includeInstance?: boolean): UserEmail.AsObject;
static toObject(includeInstance: boolean, msg: UserEmail): UserEmail.AsObject; static toObject(includeInstance: boolean, msg: UserEmail): UserEmail.AsObject;
@ -305,6 +327,8 @@ export namespace UserEmail {
email: string, email: string,
isemailverified: boolean, isemailverified: boolean,
sequence: number, sequence: number,
creationDate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
changeDate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
} }
} }
@ -379,6 +403,16 @@ export class UserPhone extends jspb.Message {
getSequence(): number; getSequence(): number;
setSequence(value: number): void; setSequence(value: number): void;
getCreationDate(): google_protobuf_timestamp_pb.Timestamp | undefined;
setCreationDate(value?: google_protobuf_timestamp_pb.Timestamp): void;
hasCreationDate(): boolean;
clearCreationDate(): void;
getChangeDate(): google_protobuf_timestamp_pb.Timestamp | undefined;
setChangeDate(value?: google_protobuf_timestamp_pb.Timestamp): void;
hasChangeDate(): boolean;
clearChangeDate(): void;
serializeBinary(): Uint8Array; serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UserPhone.AsObject; toObject(includeInstance?: boolean): UserPhone.AsObject;
static toObject(includeInstance: boolean, msg: UserPhone): UserPhone.AsObject; static toObject(includeInstance: boolean, msg: UserPhone): UserPhone.AsObject;
@ -393,6 +427,8 @@ export namespace UserPhone {
phone: string, phone: string,
isPhoneVerified: boolean, isPhoneVerified: boolean,
sequence: number, sequence: number,
creationDate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
changeDate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
} }
} }
@ -454,6 +490,16 @@ export class UserAddress extends jspb.Message {
getSequence(): number; getSequence(): number;
setSequence(value: number): void; setSequence(value: number): void;
getCreationDate(): google_protobuf_timestamp_pb.Timestamp | undefined;
setCreationDate(value?: google_protobuf_timestamp_pb.Timestamp): void;
hasCreationDate(): boolean;
clearCreationDate(): void;
getChangeDate(): google_protobuf_timestamp_pb.Timestamp | undefined;
setChangeDate(value?: google_protobuf_timestamp_pb.Timestamp): void;
hasChangeDate(): boolean;
clearChangeDate(): void;
serializeBinary(): Uint8Array; serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UserAddress.AsObject; toObject(includeInstance?: boolean): UserAddress.AsObject;
static toObject(includeInstance: boolean, msg: UserAddress): UserAddress.AsObject; static toObject(includeInstance: boolean, msg: UserAddress): UserAddress.AsObject;
@ -471,6 +517,8 @@ export namespace UserAddress {
region: string, region: string,
streetAddress: string, streetAddress: string,
sequence: number, sequence: number,
creationDate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
changeDate?: google_protobuf_timestamp_pb.Timestamp.AsObject,
} }
} }
@ -678,6 +726,136 @@ export namespace OIDCClientAuth {
} }
} }
export class UserGrantSearchRequest extends jspb.Message {
getOffset(): number;
setOffset(value: number): void;
getLimit(): number;
setLimit(value: number): void;
getSortingColumn(): UserGrantSearchKey;
setSortingColumn(value: UserGrantSearchKey): void;
getAsc(): boolean;
setAsc(value: boolean): void;
getQueriesList(): Array<UserGrantSearchQuery>;
setQueriesList(value: Array<UserGrantSearchQuery>): void;
clearQueriesList(): void;
addQueries(value?: UserGrantSearchQuery, index?: number): UserGrantSearchQuery;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UserGrantSearchRequest.AsObject;
static toObject(includeInstance: boolean, msg: UserGrantSearchRequest): UserGrantSearchRequest.AsObject;
static serializeBinaryToWriter(message: UserGrantSearchRequest, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): UserGrantSearchRequest;
static deserializeBinaryFromReader(message: UserGrantSearchRequest, reader: jspb.BinaryReader): UserGrantSearchRequest;
}
export namespace UserGrantSearchRequest {
export type AsObject = {
offset: number,
limit: number,
sortingColumn: UserGrantSearchKey,
asc: boolean,
queriesList: Array<UserGrantSearchQuery.AsObject>,
}
}
export class UserGrantSearchQuery extends jspb.Message {
getKey(): UserGrantSearchKey;
setKey(value: UserGrantSearchKey): void;
getMethod(): SearchMethod;
setMethod(value: SearchMethod): void;
getValue(): string;
setValue(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UserGrantSearchQuery.AsObject;
static toObject(includeInstance: boolean, msg: UserGrantSearchQuery): UserGrantSearchQuery.AsObject;
static serializeBinaryToWriter(message: UserGrantSearchQuery, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): UserGrantSearchQuery;
static deserializeBinaryFromReader(message: UserGrantSearchQuery, reader: jspb.BinaryReader): UserGrantSearchQuery;
}
export namespace UserGrantSearchQuery {
export type AsObject = {
key: UserGrantSearchKey,
method: SearchMethod,
value: string,
}
}
export class UserGrantSearchResponse extends jspb.Message {
getOffset(): number;
setOffset(value: number): void;
getLimit(): number;
setLimit(value: number): void;
getTotalResult(): number;
setTotalResult(value: number): void;
getResultList(): Array<UserGrantView>;
setResultList(value: Array<UserGrantView>): void;
clearResultList(): void;
addResult(value?: UserGrantView, index?: number): UserGrantView;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UserGrantSearchResponse.AsObject;
static toObject(includeInstance: boolean, msg: UserGrantSearchResponse): UserGrantSearchResponse.AsObject;
static serializeBinaryToWriter(message: UserGrantSearchResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): UserGrantSearchResponse;
static deserializeBinaryFromReader(message: UserGrantSearchResponse, reader: jspb.BinaryReader): UserGrantSearchResponse;
}
export namespace UserGrantSearchResponse {
export type AsObject = {
offset: number,
limit: number,
totalResult: number,
resultList: Array<UserGrantView.AsObject>,
}
}
export class UserGrantView extends jspb.Message {
getOrgid(): string;
setOrgid(value: string): void;
getProjectid(): string;
setProjectid(value: string): void;
getUserid(): string;
setUserid(value: string): void;
getRolesList(): Array<string>;
setRolesList(value: Array<string>): void;
clearRolesList(): void;
addRoles(value: string, index?: number): void;
getOrgname(): string;
setOrgname(value: string): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): UserGrantView.AsObject;
static toObject(includeInstance: boolean, msg: UserGrantView): UserGrantView.AsObject;
static serializeBinaryToWriter(message: UserGrantView, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): UserGrantView;
static deserializeBinaryFromReader(message: UserGrantView, reader: jspb.BinaryReader): UserGrantView;
}
export namespace UserGrantView {
export type AsObject = {
orgid: string,
projectid: string,
userid: string,
rolesList: Array<string>,
orgname: string,
}
}
export class MyProjectOrgSearchRequest extends jspb.Message { export class MyProjectOrgSearchRequest extends jspb.Message {
getOffset(): number; getOffset(): number;
setOffset(value: number): void; setOffset(value: number): void;
@ -768,24 +946,6 @@ export namespace MyProjectOrgSearchResponse {
} }
} }
export class IsAdminResponse extends jspb.Message {
getIsAdmin(): boolean;
setIsAdmin(value: boolean): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): IsAdminResponse.AsObject;
static toObject(includeInstance: boolean, msg: IsAdminResponse): IsAdminResponse.AsObject;
static serializeBinaryToWriter(message: IsAdminResponse, writer: jspb.BinaryWriter): void;
static deserializeBinary(bytes: Uint8Array): IsAdminResponse;
static deserializeBinaryFromReader(message: IsAdminResponse, reader: jspb.BinaryReader): IsAdminResponse;
}
export namespace IsAdminResponse {
export type AsObject = {
isAdmin: boolean,
}
}
export class Org extends jspb.Message { export class Org extends jspb.Message {
getId(): string; getId(): string;
setId(value: string): void; setId(value: string): void;
@ -864,6 +1024,11 @@ export enum MFAState {
MFASTATE_READY = 2, MFASTATE_READY = 2,
MFASTATE_REMOVED = 3, MFASTATE_REMOVED = 3,
} }
export enum UserGrantSearchKey {
USERGRANTSEARCHKEY_UNKNOWN = 0,
USERGRANTSEARCHKEY_ORG_ID = 1,
USERGRANTSEARCHKEY_PROJECT_ID = 2,
}
export enum MyProjectOrgSearchKey { export enum MyProjectOrgSearchKey {
MYPROJECTORGSEARCHKEY_UNSPECIFIED = 0, MYPROJECTORGSEARCHKEY_UNSPECIFIED = 0,
MYPROJECTORGSEARCHKEY_ORG_NAME = 1, MYPROJECTORGSEARCHKEY_ORG_NAME = 1,
@ -872,4 +1037,7 @@ export enum SearchMethod {
SEARCHMETHOD_EQUALS = 0, SEARCHMETHOD_EQUALS = 0,
SEARCHMETHOD_STARTS_WITH = 1, SEARCHMETHOD_STARTS_WITH = 1,
SEARCHMETHOD_CONTAINS = 2, SEARCHMETHOD_CONTAINS = 2,
SEARCHMETHOD_EQUALS_IGNORE_CASE = 3,
SEARCHMETHOD_STARTS_WITH_IGNORE_CASE = 4,
SEARCHMETHOD_CONTAINS_IGNORE_CASE = 5,
} }

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,8 @@ import {
Changes, Changes,
ClientSecret, ClientSecret,
CreateUserRequest, CreateUserRequest,
GrantedGrantID, GrantedProjectSearchRequest,
GrantedProjectSearchResponse,
MultiFactors, MultiFactors,
OIDCApplicationCreate, OIDCApplicationCreate,
OIDCConfig, OIDCConfig,
@ -31,6 +32,7 @@ import {
Org, Org,
OrgDomain, OrgDomain,
OrgID, OrgID,
OrgMember,
OrgMemberRoles, OrgMemberRoles,
OrgMemberSearchRequest, OrgMemberSearchRequest,
OrgMemberSearchResponse, OrgMemberSearchResponse,
@ -80,8 +82,6 @@ import {
ProjectRoleRemove, ProjectRoleRemove,
ProjectRoleSearchRequest, ProjectRoleSearchRequest,
ProjectRoleSearchResponse, ProjectRoleSearchResponse,
ProjectSearchRequest,
ProjectSearchResponse,
ProjectUpdateRequest, ProjectUpdateRequest,
ProjectUserGrantID, ProjectUserGrantID,
ProjectUserGrantSearchRequest, ProjectUserGrantSearchRequest,
@ -108,7 +108,8 @@ import {
UserPhone, UserPhone,
UserProfile, UserProfile,
UserSearchRequest, UserSearchRequest,
UserSearchResponse} from './management_pb'; UserSearchResponse,
UserView} from './management_pb';
export class ManagementServiceClient { export class ManagementServiceClient {
constructor (hostname: string, constructor (hostname: string,
@ -147,8 +148,8 @@ export class ManagementServiceClient {
request: UserEmailID, request: UserEmailID,
metadata: grpcWeb.Metadata | undefined, metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error, callback: (err: grpcWeb.Error,
response: User) => void response: UserView) => void
): grpcWeb.ClientReadableStream<User>; ): grpcWeb.ClientReadableStream<UserView>;
searchUsers( searchUsers(
request: UserSearchRequest, request: UserSearchRequest,
@ -448,15 +449,15 @@ export class ManagementServiceClient {
request: AddOrgMemberRequest, request: AddOrgMemberRequest,
metadata: grpcWeb.Metadata | undefined, metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error, callback: (err: grpcWeb.Error,
response: google_protobuf_empty_pb.Empty) => void response: OrgMember) => void
): grpcWeb.ClientReadableStream<google_protobuf_empty_pb.Empty>; ): grpcWeb.ClientReadableStream<OrgMember>;
changeOrgMember( changeOrgMember(
request: ChangeOrgMemberRequest, request: ChangeOrgMemberRequest,
metadata: grpcWeb.Metadata | undefined, metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error, callback: (err: grpcWeb.Error,
response: google_protobuf_empty_pb.Empty) => void response: OrgMember) => void
): grpcWeb.ClientReadableStream<google_protobuf_empty_pb.Empty>; ): grpcWeb.ClientReadableStream<OrgMember>;
removeOrgMember( removeOrgMember(
request: RemoveOrgMemberRequest, request: RemoveOrgMemberRequest,
@ -472,12 +473,12 @@ export class ManagementServiceClient {
response: OrgMemberSearchResponse) => void response: OrgMemberSearchResponse) => void
): grpcWeb.ClientReadableStream<OrgMemberSearchResponse>; ): grpcWeb.ClientReadableStream<OrgMemberSearchResponse>;
searchProjects( searchGrantedProjects(
request: ProjectSearchRequest, request: GrantedProjectSearchRequest,
metadata: grpcWeb.Metadata | undefined, metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error, callback: (err: grpcWeb.Error,
response: ProjectSearchResponse) => void response: GrantedProjectSearchResponse) => void
): grpcWeb.ClientReadableStream<ProjectSearchResponse>; ): grpcWeb.ClientReadableStream<GrantedProjectSearchResponse>;
projectByID( projectByID(
request: ProjectID, request: ProjectID,
@ -515,7 +516,7 @@ export class ManagementServiceClient {
): grpcWeb.ClientReadableStream<Project>; ): grpcWeb.ClientReadableStream<Project>;
getGrantedProjectGrantByID( getGrantedProjectGrantByID(
request: GrantedGrantID, request: ProjectGrantID,
metadata: grpcWeb.Metadata | undefined, metadata: grpcWeb.Metadata | undefined,
callback: (err: grpcWeb.Error, callback: (err: grpcWeb.Error,
response: ProjectGrant) => void response: ProjectGrant) => void
@ -901,7 +902,7 @@ export class ManagementServicePromiseClient {
getUserByEmailGlobal( getUserByEmailGlobal(
request: UserEmailID, request: UserEmailID,
metadata?: grpcWeb.Metadata metadata?: grpcWeb.Metadata
): Promise<User>; ): Promise<UserView>;
searchUsers( searchUsers(
request: UserSearchRequest, request: UserSearchRequest,
@ -1116,12 +1117,12 @@ export class ManagementServicePromiseClient {
addOrgMember( addOrgMember(
request: AddOrgMemberRequest, request: AddOrgMemberRequest,
metadata?: grpcWeb.Metadata metadata?: grpcWeb.Metadata
): Promise<google_protobuf_empty_pb.Empty>; ): Promise<OrgMember>;
changeOrgMember( changeOrgMember(
request: ChangeOrgMemberRequest, request: ChangeOrgMemberRequest,
metadata?: grpcWeb.Metadata metadata?: grpcWeb.Metadata
): Promise<google_protobuf_empty_pb.Empty>; ): Promise<OrgMember>;
removeOrgMember( removeOrgMember(
request: RemoveOrgMemberRequest, request: RemoveOrgMemberRequest,
@ -1133,10 +1134,10 @@ export class ManagementServicePromiseClient {
metadata?: grpcWeb.Metadata metadata?: grpcWeb.Metadata
): Promise<OrgMemberSearchResponse>; ): Promise<OrgMemberSearchResponse>;
searchProjects( searchGrantedProjects(
request: ProjectSearchRequest, request: GrantedProjectSearchRequest,
metadata?: grpcWeb.Metadata metadata?: grpcWeb.Metadata
): Promise<ProjectSearchResponse>; ): Promise<GrantedProjectSearchResponse>;
projectByID( projectByID(
request: ProjectID, request: ProjectID,
@ -1164,7 +1165,7 @@ export class ManagementServicePromiseClient {
): Promise<Project>; ): Promise<Project>;
getGrantedProjectGrantByID( getGrantedProjectGrantByID(
request: GrantedGrantID, request: ProjectGrantID,
metadata?: grpcWeb.Metadata metadata?: grpcWeb.Metadata
): Promise<ProjectGrant>; ): Promise<ProjectGrant>;

View File

@ -410,13 +410,13 @@ proto.caos.zitadel.management.api.v1.ManagementServicePromiseClient.prototype.ge
* @const * @const
* @type {!grpc.web.MethodDescriptor< * @type {!grpc.web.MethodDescriptor<
* !proto.caos.zitadel.management.api.v1.UserEmailID, * !proto.caos.zitadel.management.api.v1.UserEmailID,
* !proto.caos.zitadel.management.api.v1.User>} * !proto.caos.zitadel.management.api.v1.UserView>}
*/ */
const methodDescriptor_ManagementService_GetUserByEmailGlobal = new grpc.web.MethodDescriptor( const methodDescriptor_ManagementService_GetUserByEmailGlobal = new grpc.web.MethodDescriptor(
'/caos.zitadel.management.api.v1.ManagementService/GetUserByEmailGlobal', '/caos.zitadel.management.api.v1.ManagementService/GetUserByEmailGlobal',
grpc.web.MethodType.UNARY, grpc.web.MethodType.UNARY,
proto.caos.zitadel.management.api.v1.UserEmailID, proto.caos.zitadel.management.api.v1.UserEmailID,
proto.caos.zitadel.management.api.v1.User, proto.caos.zitadel.management.api.v1.UserView,
/** /**
* @param {!proto.caos.zitadel.management.api.v1.UserEmailID} request * @param {!proto.caos.zitadel.management.api.v1.UserEmailID} request
* @return {!Uint8Array} * @return {!Uint8Array}
@ -424,7 +424,7 @@ const methodDescriptor_ManagementService_GetUserByEmailGlobal = new grpc.web.Met
function(request) { function(request) {
return request.serializeBinary(); return request.serializeBinary();
}, },
proto.caos.zitadel.management.api.v1.User.deserializeBinary proto.caos.zitadel.management.api.v1.UserView.deserializeBinary
); );
@ -432,10 +432,10 @@ const methodDescriptor_ManagementService_GetUserByEmailGlobal = new grpc.web.Met
* @const * @const
* @type {!grpc.web.AbstractClientBase.MethodInfo< * @type {!grpc.web.AbstractClientBase.MethodInfo<
* !proto.caos.zitadel.management.api.v1.UserEmailID, * !proto.caos.zitadel.management.api.v1.UserEmailID,
* !proto.caos.zitadel.management.api.v1.User>} * !proto.caos.zitadel.management.api.v1.UserView>}
*/ */
const methodInfo_ManagementService_GetUserByEmailGlobal = new grpc.web.AbstractClientBase.MethodInfo( const methodInfo_ManagementService_GetUserByEmailGlobal = new grpc.web.AbstractClientBase.MethodInfo(
proto.caos.zitadel.management.api.v1.User, proto.caos.zitadel.management.api.v1.UserView,
/** /**
* @param {!proto.caos.zitadel.management.api.v1.UserEmailID} request * @param {!proto.caos.zitadel.management.api.v1.UserEmailID} request
* @return {!Uint8Array} * @return {!Uint8Array}
@ -443,7 +443,7 @@ const methodInfo_ManagementService_GetUserByEmailGlobal = new grpc.web.AbstractC
function(request) { function(request) {
return request.serializeBinary(); return request.serializeBinary();
}, },
proto.caos.zitadel.management.api.v1.User.deserializeBinary proto.caos.zitadel.management.api.v1.UserView.deserializeBinary
); );
@ -452,9 +452,9 @@ const methodInfo_ManagementService_GetUserByEmailGlobal = new grpc.web.AbstractC
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata
* @param {function(?grpc.web.Error, ?proto.caos.zitadel.management.api.v1.User)} * @param {function(?grpc.web.Error, ?proto.caos.zitadel.management.api.v1.UserView)}
* callback The callback function(error, response) * callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.caos.zitadel.management.api.v1.User>|undefined} * @return {!grpc.web.ClientReadableStream<!proto.caos.zitadel.management.api.v1.UserView>|undefined}
* The XHR Node Readable Stream * The XHR Node Readable Stream
*/ */
proto.caos.zitadel.management.api.v1.ManagementServiceClient.prototype.getUserByEmailGlobal = proto.caos.zitadel.management.api.v1.ManagementServiceClient.prototype.getUserByEmailGlobal =
@ -473,7 +473,7 @@ proto.caos.zitadel.management.api.v1.ManagementServiceClient.prototype.getUserBy
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata
* @return {!Promise<!proto.caos.zitadel.management.api.v1.User>} * @return {!Promise<!proto.caos.zitadel.management.api.v1.UserView>}
* A native promise that resolves to the response * A native promise that resolves to the response
*/ */
proto.caos.zitadel.management.api.v1.ManagementServicePromiseClient.prototype.getUserByEmailGlobal = proto.caos.zitadel.management.api.v1.ManagementServicePromiseClient.prototype.getUserByEmailGlobal =
@ -3850,13 +3850,13 @@ proto.caos.zitadel.management.api.v1.ManagementServicePromiseClient.prototype.ge
* @const * @const
* @type {!grpc.web.MethodDescriptor< * @type {!grpc.web.MethodDescriptor<
* !proto.caos.zitadel.management.api.v1.AddOrgMemberRequest, * !proto.caos.zitadel.management.api.v1.AddOrgMemberRequest,
* !proto.google.protobuf.Empty>} * !proto.caos.zitadel.management.api.v1.OrgMember>}
*/ */
const methodDescriptor_ManagementService_AddOrgMember = new grpc.web.MethodDescriptor( const methodDescriptor_ManagementService_AddOrgMember = new grpc.web.MethodDescriptor(
'/caos.zitadel.management.api.v1.ManagementService/AddOrgMember', '/caos.zitadel.management.api.v1.ManagementService/AddOrgMember',
grpc.web.MethodType.UNARY, grpc.web.MethodType.UNARY,
proto.caos.zitadel.management.api.v1.AddOrgMemberRequest, proto.caos.zitadel.management.api.v1.AddOrgMemberRequest,
google_protobuf_empty_pb.Empty, proto.caos.zitadel.management.api.v1.OrgMember,
/** /**
* @param {!proto.caos.zitadel.management.api.v1.AddOrgMemberRequest} request * @param {!proto.caos.zitadel.management.api.v1.AddOrgMemberRequest} request
* @return {!Uint8Array} * @return {!Uint8Array}
@ -3864,7 +3864,7 @@ const methodDescriptor_ManagementService_AddOrgMember = new grpc.web.MethodDescr
function(request) { function(request) {
return request.serializeBinary(); return request.serializeBinary();
}, },
google_protobuf_empty_pb.Empty.deserializeBinary proto.caos.zitadel.management.api.v1.OrgMember.deserializeBinary
); );
@ -3872,10 +3872,10 @@ const methodDescriptor_ManagementService_AddOrgMember = new grpc.web.MethodDescr
* @const * @const
* @type {!grpc.web.AbstractClientBase.MethodInfo< * @type {!grpc.web.AbstractClientBase.MethodInfo<
* !proto.caos.zitadel.management.api.v1.AddOrgMemberRequest, * !proto.caos.zitadel.management.api.v1.AddOrgMemberRequest,
* !proto.google.protobuf.Empty>} * !proto.caos.zitadel.management.api.v1.OrgMember>}
*/ */
const methodInfo_ManagementService_AddOrgMember = new grpc.web.AbstractClientBase.MethodInfo( const methodInfo_ManagementService_AddOrgMember = new grpc.web.AbstractClientBase.MethodInfo(
google_protobuf_empty_pb.Empty, proto.caos.zitadel.management.api.v1.OrgMember,
/** /**
* @param {!proto.caos.zitadel.management.api.v1.AddOrgMemberRequest} request * @param {!proto.caos.zitadel.management.api.v1.AddOrgMemberRequest} request
* @return {!Uint8Array} * @return {!Uint8Array}
@ -3883,7 +3883,7 @@ const methodInfo_ManagementService_AddOrgMember = new grpc.web.AbstractClientBas
function(request) { function(request) {
return request.serializeBinary(); return request.serializeBinary();
}, },
google_protobuf_empty_pb.Empty.deserializeBinary proto.caos.zitadel.management.api.v1.OrgMember.deserializeBinary
); );
@ -3892,9 +3892,9 @@ const methodInfo_ManagementService_AddOrgMember = new grpc.web.AbstractClientBas
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata
* @param {function(?grpc.web.Error, ?proto.google.protobuf.Empty)} * @param {function(?grpc.web.Error, ?proto.caos.zitadel.management.api.v1.OrgMember)}
* callback The callback function(error, response) * callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.google.protobuf.Empty>|undefined} * @return {!grpc.web.ClientReadableStream<!proto.caos.zitadel.management.api.v1.OrgMember>|undefined}
* The XHR Node Readable Stream * The XHR Node Readable Stream
*/ */
proto.caos.zitadel.management.api.v1.ManagementServiceClient.prototype.addOrgMember = proto.caos.zitadel.management.api.v1.ManagementServiceClient.prototype.addOrgMember =
@ -3913,7 +3913,7 @@ proto.caos.zitadel.management.api.v1.ManagementServiceClient.prototype.addOrgMem
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata
* @return {!Promise<!proto.google.protobuf.Empty>} * @return {!Promise<!proto.caos.zitadel.management.api.v1.OrgMember>}
* A native promise that resolves to the response * A native promise that resolves to the response
*/ */
proto.caos.zitadel.management.api.v1.ManagementServicePromiseClient.prototype.addOrgMember = proto.caos.zitadel.management.api.v1.ManagementServicePromiseClient.prototype.addOrgMember =
@ -3930,13 +3930,13 @@ proto.caos.zitadel.management.api.v1.ManagementServicePromiseClient.prototype.ad
* @const * @const
* @type {!grpc.web.MethodDescriptor< * @type {!grpc.web.MethodDescriptor<
* !proto.caos.zitadel.management.api.v1.ChangeOrgMemberRequest, * !proto.caos.zitadel.management.api.v1.ChangeOrgMemberRequest,
* !proto.google.protobuf.Empty>} * !proto.caos.zitadel.management.api.v1.OrgMember>}
*/ */
const methodDescriptor_ManagementService_ChangeOrgMember = new grpc.web.MethodDescriptor( const methodDescriptor_ManagementService_ChangeOrgMember = new grpc.web.MethodDescriptor(
'/caos.zitadel.management.api.v1.ManagementService/ChangeOrgMember', '/caos.zitadel.management.api.v1.ManagementService/ChangeOrgMember',
grpc.web.MethodType.UNARY, grpc.web.MethodType.UNARY,
proto.caos.zitadel.management.api.v1.ChangeOrgMemberRequest, proto.caos.zitadel.management.api.v1.ChangeOrgMemberRequest,
google_protobuf_empty_pb.Empty, proto.caos.zitadel.management.api.v1.OrgMember,
/** /**
* @param {!proto.caos.zitadel.management.api.v1.ChangeOrgMemberRequest} request * @param {!proto.caos.zitadel.management.api.v1.ChangeOrgMemberRequest} request
* @return {!Uint8Array} * @return {!Uint8Array}
@ -3944,7 +3944,7 @@ const methodDescriptor_ManagementService_ChangeOrgMember = new grpc.web.MethodDe
function(request) { function(request) {
return request.serializeBinary(); return request.serializeBinary();
}, },
google_protobuf_empty_pb.Empty.deserializeBinary proto.caos.zitadel.management.api.v1.OrgMember.deserializeBinary
); );
@ -3952,10 +3952,10 @@ const methodDescriptor_ManagementService_ChangeOrgMember = new grpc.web.MethodDe
* @const * @const
* @type {!grpc.web.AbstractClientBase.MethodInfo< * @type {!grpc.web.AbstractClientBase.MethodInfo<
* !proto.caos.zitadel.management.api.v1.ChangeOrgMemberRequest, * !proto.caos.zitadel.management.api.v1.ChangeOrgMemberRequest,
* !proto.google.protobuf.Empty>} * !proto.caos.zitadel.management.api.v1.OrgMember>}
*/ */
const methodInfo_ManagementService_ChangeOrgMember = new grpc.web.AbstractClientBase.MethodInfo( const methodInfo_ManagementService_ChangeOrgMember = new grpc.web.AbstractClientBase.MethodInfo(
google_protobuf_empty_pb.Empty, proto.caos.zitadel.management.api.v1.OrgMember,
/** /**
* @param {!proto.caos.zitadel.management.api.v1.ChangeOrgMemberRequest} request * @param {!proto.caos.zitadel.management.api.v1.ChangeOrgMemberRequest} request
* @return {!Uint8Array} * @return {!Uint8Array}
@ -3963,7 +3963,7 @@ const methodInfo_ManagementService_ChangeOrgMember = new grpc.web.AbstractClient
function(request) { function(request) {
return request.serializeBinary(); return request.serializeBinary();
}, },
google_protobuf_empty_pb.Empty.deserializeBinary proto.caos.zitadel.management.api.v1.OrgMember.deserializeBinary
); );
@ -3972,9 +3972,9 @@ const methodInfo_ManagementService_ChangeOrgMember = new grpc.web.AbstractClient
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata
* @param {function(?grpc.web.Error, ?proto.google.protobuf.Empty)} * @param {function(?grpc.web.Error, ?proto.caos.zitadel.management.api.v1.OrgMember)}
* callback The callback function(error, response) * callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.google.protobuf.Empty>|undefined} * @return {!grpc.web.ClientReadableStream<!proto.caos.zitadel.management.api.v1.OrgMember>|undefined}
* The XHR Node Readable Stream * The XHR Node Readable Stream
*/ */
proto.caos.zitadel.management.api.v1.ManagementServiceClient.prototype.changeOrgMember = proto.caos.zitadel.management.api.v1.ManagementServiceClient.prototype.changeOrgMember =
@ -3993,7 +3993,7 @@ proto.caos.zitadel.management.api.v1.ManagementServiceClient.prototype.changeOrg
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata
* @return {!Promise<!proto.google.protobuf.Empty>} * @return {!Promise<!proto.caos.zitadel.management.api.v1.OrgMember>}
* A native promise that resolves to the response * A native promise that resolves to the response
*/ */
proto.caos.zitadel.management.api.v1.ManagementServicePromiseClient.prototype.changeOrgMember = proto.caos.zitadel.management.api.v1.ManagementServicePromiseClient.prototype.changeOrgMember =
@ -4169,80 +4169,80 @@ proto.caos.zitadel.management.api.v1.ManagementServicePromiseClient.prototype.se
/** /**
* @const * @const
* @type {!grpc.web.MethodDescriptor< * @type {!grpc.web.MethodDescriptor<
* !proto.caos.zitadel.management.api.v1.ProjectSearchRequest, * !proto.caos.zitadel.management.api.v1.GrantedProjectSearchRequest,
* !proto.caos.zitadel.management.api.v1.ProjectSearchResponse>} * !proto.caos.zitadel.management.api.v1.GrantedProjectSearchResponse>}
*/ */
const methodDescriptor_ManagementService_SearchProjects = new grpc.web.MethodDescriptor( const methodDescriptor_ManagementService_SearchGrantedProjects = new grpc.web.MethodDescriptor(
'/caos.zitadel.management.api.v1.ManagementService/SearchProjects', '/caos.zitadel.management.api.v1.ManagementService/SearchGrantedProjects',
grpc.web.MethodType.UNARY, grpc.web.MethodType.UNARY,
proto.caos.zitadel.management.api.v1.ProjectSearchRequest, proto.caos.zitadel.management.api.v1.GrantedProjectSearchRequest,
proto.caos.zitadel.management.api.v1.ProjectSearchResponse, proto.caos.zitadel.management.api.v1.GrantedProjectSearchResponse,
/** /**
* @param {!proto.caos.zitadel.management.api.v1.ProjectSearchRequest} request * @param {!proto.caos.zitadel.management.api.v1.GrantedProjectSearchRequest} request
* @return {!Uint8Array} * @return {!Uint8Array}
*/ */
function(request) { function(request) {
return request.serializeBinary(); return request.serializeBinary();
}, },
proto.caos.zitadel.management.api.v1.ProjectSearchResponse.deserializeBinary proto.caos.zitadel.management.api.v1.GrantedProjectSearchResponse.deserializeBinary
); );
/** /**
* @const * @const
* @type {!grpc.web.AbstractClientBase.MethodInfo< * @type {!grpc.web.AbstractClientBase.MethodInfo<
* !proto.caos.zitadel.management.api.v1.ProjectSearchRequest, * !proto.caos.zitadel.management.api.v1.GrantedProjectSearchRequest,
* !proto.caos.zitadel.management.api.v1.ProjectSearchResponse>} * !proto.caos.zitadel.management.api.v1.GrantedProjectSearchResponse>}
*/ */
const methodInfo_ManagementService_SearchProjects = new grpc.web.AbstractClientBase.MethodInfo( const methodInfo_ManagementService_SearchGrantedProjects = new grpc.web.AbstractClientBase.MethodInfo(
proto.caos.zitadel.management.api.v1.ProjectSearchResponse, proto.caos.zitadel.management.api.v1.GrantedProjectSearchResponse,
/** /**
* @param {!proto.caos.zitadel.management.api.v1.ProjectSearchRequest} request * @param {!proto.caos.zitadel.management.api.v1.GrantedProjectSearchRequest} request
* @return {!Uint8Array} * @return {!Uint8Array}
*/ */
function(request) { function(request) {
return request.serializeBinary(); return request.serializeBinary();
}, },
proto.caos.zitadel.management.api.v1.ProjectSearchResponse.deserializeBinary proto.caos.zitadel.management.api.v1.GrantedProjectSearchResponse.deserializeBinary
); );
/** /**
* @param {!proto.caos.zitadel.management.api.v1.ProjectSearchRequest} request The * @param {!proto.caos.zitadel.management.api.v1.GrantedProjectSearchRequest} request The
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata
* @param {function(?grpc.web.Error, ?proto.caos.zitadel.management.api.v1.ProjectSearchResponse)} * @param {function(?grpc.web.Error, ?proto.caos.zitadel.management.api.v1.GrantedProjectSearchResponse)}
* callback The callback function(error, response) * callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.caos.zitadel.management.api.v1.ProjectSearchResponse>|undefined} * @return {!grpc.web.ClientReadableStream<!proto.caos.zitadel.management.api.v1.GrantedProjectSearchResponse>|undefined}
* The XHR Node Readable Stream * The XHR Node Readable Stream
*/ */
proto.caos.zitadel.management.api.v1.ManagementServiceClient.prototype.searchProjects = proto.caos.zitadel.management.api.v1.ManagementServiceClient.prototype.searchGrantedProjects =
function(request, metadata, callback) { function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ + return this.client_.rpcCall(this.hostname_ +
'/caos.zitadel.management.api.v1.ManagementService/SearchProjects', '/caos.zitadel.management.api.v1.ManagementService/SearchGrantedProjects',
request, request,
metadata || {}, metadata || {},
methodDescriptor_ManagementService_SearchProjects, methodDescriptor_ManagementService_SearchGrantedProjects,
callback); callback);
}; };
/** /**
* @param {!proto.caos.zitadel.management.api.v1.ProjectSearchRequest} request The * @param {!proto.caos.zitadel.management.api.v1.GrantedProjectSearchRequest} request The
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata
* @return {!Promise<!proto.caos.zitadel.management.api.v1.ProjectSearchResponse>} * @return {!Promise<!proto.caos.zitadel.management.api.v1.GrantedProjectSearchResponse>}
* A native promise that resolves to the response * A native promise that resolves to the response
*/ */
proto.caos.zitadel.management.api.v1.ManagementServicePromiseClient.prototype.searchProjects = proto.caos.zitadel.management.api.v1.ManagementServicePromiseClient.prototype.searchGrantedProjects =
function(request, metadata) { function(request, metadata) {
return this.client_.unaryCall(this.hostname_ + return this.client_.unaryCall(this.hostname_ +
'/caos.zitadel.management.api.v1.ManagementService/SearchProjects', '/caos.zitadel.management.api.v1.ManagementService/SearchGrantedProjects',
request, request,
metadata || {}, metadata || {},
methodDescriptor_ManagementService_SearchProjects); methodDescriptor_ManagementService_SearchGrantedProjects);
}; };
@ -4649,16 +4649,16 @@ proto.caos.zitadel.management.api.v1.ManagementServicePromiseClient.prototype.re
/** /**
* @const * @const
* @type {!grpc.web.MethodDescriptor< * @type {!grpc.web.MethodDescriptor<
* !proto.caos.zitadel.management.api.v1.GrantedGrantID, * !proto.caos.zitadel.management.api.v1.ProjectGrantID,
* !proto.caos.zitadel.management.api.v1.ProjectGrant>} * !proto.caos.zitadel.management.api.v1.ProjectGrant>}
*/ */
const methodDescriptor_ManagementService_GetGrantedProjectGrantByID = new grpc.web.MethodDescriptor( const methodDescriptor_ManagementService_GetGrantedProjectGrantByID = new grpc.web.MethodDescriptor(
'/caos.zitadel.management.api.v1.ManagementService/GetGrantedProjectGrantByID', '/caos.zitadel.management.api.v1.ManagementService/GetGrantedProjectGrantByID',
grpc.web.MethodType.UNARY, grpc.web.MethodType.UNARY,
proto.caos.zitadel.management.api.v1.GrantedGrantID, proto.caos.zitadel.management.api.v1.ProjectGrantID,
proto.caos.zitadel.management.api.v1.ProjectGrant, proto.caos.zitadel.management.api.v1.ProjectGrant,
/** /**
* @param {!proto.caos.zitadel.management.api.v1.GrantedGrantID} request * @param {!proto.caos.zitadel.management.api.v1.ProjectGrantID} request
* @return {!Uint8Array} * @return {!Uint8Array}
*/ */
function(request) { function(request) {
@ -4671,13 +4671,13 @@ const methodDescriptor_ManagementService_GetGrantedProjectGrantByID = new grpc.w
/** /**
* @const * @const
* @type {!grpc.web.AbstractClientBase.MethodInfo< * @type {!grpc.web.AbstractClientBase.MethodInfo<
* !proto.caos.zitadel.management.api.v1.GrantedGrantID, * !proto.caos.zitadel.management.api.v1.ProjectGrantID,
* !proto.caos.zitadel.management.api.v1.ProjectGrant>} * !proto.caos.zitadel.management.api.v1.ProjectGrant>}
*/ */
const methodInfo_ManagementService_GetGrantedProjectGrantByID = new grpc.web.AbstractClientBase.MethodInfo( const methodInfo_ManagementService_GetGrantedProjectGrantByID = new grpc.web.AbstractClientBase.MethodInfo(
proto.caos.zitadel.management.api.v1.ProjectGrant, proto.caos.zitadel.management.api.v1.ProjectGrant,
/** /**
* @param {!proto.caos.zitadel.management.api.v1.GrantedGrantID} request * @param {!proto.caos.zitadel.management.api.v1.ProjectGrantID} request
* @return {!Uint8Array} * @return {!Uint8Array}
*/ */
function(request) { function(request) {
@ -4688,7 +4688,7 @@ const methodInfo_ManagementService_GetGrantedProjectGrantByID = new grpc.web.Abs
/** /**
* @param {!proto.caos.zitadel.management.api.v1.GrantedGrantID} request The * @param {!proto.caos.zitadel.management.api.v1.ProjectGrantID} request The
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata
@ -4709,7 +4709,7 @@ proto.caos.zitadel.management.api.v1.ManagementServiceClient.prototype.getGrante
/** /**
* @param {!proto.caos.zitadel.management.api.v1.GrantedGrantID} request The * @param {!proto.caos.zitadel.management.api.v1.ProjectGrantID} request The
* request proto * request proto
* @param {?Object<string, string>} metadata User defined * @param {?Object<string, string>} metadata User defined
* call metadata * call metadata

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
import { Metadata } from 'grpc-web'; import { Metadata } from 'grpc-web';
import { AdminServicePromiseClient } from '../proto/generated/admin_grpc_web_pb'; import { AdminServicePromiseClient } from '../proto/generated/admin_grpc_web_pb';
import { CreateOrgRequest, OrgSetUpRequest, OrgSetUpResponse, RegisterUserRequest } from '../proto/generated/admin_pb'; import { CreateOrgRequest, CreateUserRequest, OrgSetUpRequest, OrgSetUpResponse } from '../proto/generated/admin_pb';
import { GrpcBackendService } from './grpc-backend.service'; import { GrpcBackendService } from './grpc-backend.service';
import { GrpcService, RequestFactory, ResponseMapper } from './grpc.service'; import { GrpcService, RequestFactory, ResponseMapper } from './grpc.service';
@ -29,7 +29,7 @@ export class AdminService {
public async SetUpOrg( public async SetUpOrg(
createOrgRequest: CreateOrgRequest, createOrgRequest: CreateOrgRequest,
registerUserRequest: RegisterUserRequest, registerUserRequest: CreateUserRequest,
): Promise<OrgSetUpResponse> { ): Promise<OrgSetUpResponse> {
const req: OrgSetUpRequest = new OrgSetUpRequest(); const req: OrgSetUpRequest = new OrgSetUpRequest();

View File

@ -14,5 +14,4 @@ export class AuthInterceptorService implements HttpInterceptor {
return next.handle(req); return next.handle(req);
} }
} }

View File

@ -12,7 +12,6 @@ import {
MyProjectOrgSearchRequest, MyProjectOrgSearchRequest,
MyProjectOrgSearchResponse, MyProjectOrgSearchResponse,
PasswordChange, PasswordChange,
PasswordRequest,
UpdateUserAddressRequest, UpdateUserAddressRequest,
UpdateUserEmailRequest, UpdateUserEmailRequest,
UpdateUserPhoneRequest, UpdateUserPhoneRequest,
@ -196,17 +195,6 @@ export class AuthUserService {
); );
} }
public async SetMyPassword(id: string): Promise<Empty> {
const req = new PasswordRequest();
req.setPassword(id);
return await this.request(
c => c.setMyPassword,
req,
f => f,
);
}
public async ChangeMyPassword(oldPassword: string, newPassword: string): Promise<Empty> { public async ChangeMyPassword(oldPassword: string, newPassword: string): Promise<Empty> {
const req = new PasswordChange(); const req = new PasswordChange();
req.setOldPassword(oldPassword); req.setOldPassword(oldPassword);
@ -234,7 +222,7 @@ export class AuthUserService {
); );
} }
public async VerifyMfaOTP(code: string): Promise<MfaOtpResponse> { public async VerifyMfaOTP(code: string): Promise<Empty> {
const req = new VerifyMfaOtp(); const req = new VerifyMfaOtp();
req.setCode(code); req.setCode(code);
return await this.request( return await this.request(

View File

@ -65,6 +65,8 @@ export class AuthService {
this.config.issuer = config?.issuer || this.grpcService.issuer; this.config.issuer = config?.issuer || this.grpcService.issuer;
this.config.clientId = config?.clientId || this.grpcService.clientid; this.config.clientId = config?.clientId || this.grpcService.clientid;
this.config.customQueryParams = config?.customQueryParams; this.config.customQueryParams = config?.customQueryParams;
console.log(this.config);
this.oauthService.configure(this.config); this.oauthService.configure(this.config);
// this.oauthService.setupAutomaticSilentRefresh(); // this.oauthService.setupAutomaticSilentRefresh();
this.oauthService.strictDiscoveryDocumentValidation = false; this.oauthService.strictDiscoveryDocumentValidation = false;

View File

@ -22,6 +22,9 @@ export class GrpcOrgInterceptor implements GrpcInterceptor {
metadata[orgKey] = org.id ?? ''; metadata[orgKey] = org.id ?? '';
} }
// metadata['x-zitadel-login'] = 'true';
// metadata['x-zitadel-userid'] = '58922557365027097';
// metadata['x-zitadel-orgid'] = '58922556878487833';
return await next.handle(req, metadata); return await next.handle(req, metadata);
} }
} }

View File

@ -31,6 +31,7 @@ export class GrpcService {
this.issuer = data.issuer; this.issuer = data.issuer;
if (data.clientid) { if (data.clientid) {
console.log(data.clientid);
this.clientid = data.clientid; this.clientid = data.clientid;
} }
} }

View File

@ -10,7 +10,9 @@ import {
ApplicationSearchRequest, ApplicationSearchRequest,
ApplicationSearchResponse, ApplicationSearchResponse,
ApplicationUpdate, ApplicationUpdate,
GrantedGrantID, GrantedProjectSearchQuery,
GrantedProjectSearchRequest,
GrantedProjectSearchResponse,
OIDCApplicationCreate, OIDCApplicationCreate,
OIDCConfig, OIDCConfig,
OIDCConfigUpdate, OIDCConfigUpdate,
@ -38,9 +40,6 @@ import {
ProjectRoleSearchQuery, ProjectRoleSearchQuery,
ProjectRoleSearchRequest, ProjectRoleSearchRequest,
ProjectRoleSearchResponse, ProjectRoleSearchResponse,
ProjectSearchQuery,
ProjectSearchRequest,
ProjectSearchResponse,
ProjectUpdateRequest, ProjectUpdateRequest,
ProjectUserGrantSearchRequest, ProjectUserGrantSearchRequest,
UserGrant, UserGrant,
@ -72,21 +71,36 @@ export class ProjectService {
return responseMapper(response); return responseMapper(response);
} }
public async SearchProjects( public async SearchGrantedProjects(
limit: number, offset: number, queryList?: ProjectSearchQuery[]): Promise<ProjectSearchResponse> { limit: number, offset: number, queryList?: GrantedProjectSearchQuery[]): Promise<GrantedProjectSearchResponse> {
const req = new ProjectSearchRequest(); const req = new GrantedProjectSearchRequest();
req.setLimit(limit); req.setLimit(limit);
req.setOffset(offset); req.setOffset(offset);
if (queryList) { if (queryList) {
req.setQueriesList(queryList); req.setQueriesList(queryList);
} }
return await this.request( return await this.request(
c => c.searchProjects, c => c.searchGrantedProjects,
req, req,
f => f, 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> { public async GetProjectById(projectId: string): Promise<Project> {
const req = new ProjectID(); const req = new ProjectID();
req.setId(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> { public async CreateProject(project: ProjectCreateRequest.AsObject): Promise<Project> {
const req = new ProjectCreateRequest(); const req = new ProjectCreateRequest();
req.setName(project.name); 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> { public async GetProjectMemberRoles(): Promise<ProjectMemberRoles> {
const req = new Empty(); const req = new Empty();
return await this.request( return await this.request(

View File

@ -3,5 +3,5 @@
"mgmtServiceUrl": "https://api.zitadel.dev", "mgmtServiceUrl": "https://api.zitadel.dev",
"adminServiceUrl":"https://api.zitadel.dev", "adminServiceUrl":"https://api.zitadel.dev",
"issuer": "https://issuer.zitadel.dev", "issuer": "https://issuer.zitadel.dev",
"clientid": "293876451759882777@Zitadel.DEFAULT" "clientid": "58891550352010481@zitadel"
} }