diff --git a/services/user-registry.service.ts b/services/user-registry.service.ts index 55fc2b58..2218b07d 100644 --- a/services/user-registry.service.ts +++ b/services/user-registry.service.ts @@ -26,6 +26,28 @@ export class UserRegistryService { return this.http.post(properties.registryUrl + 'unsubscribe/' + encodeURIComponent(type) + '/' + encodeURIComponent(id), null, CustomOptions.registryOptions()) } + + public removeManagerRole(type: string, id: string, email: string): Observable { + return this.http.delete(properties.registryUrl + + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/manager/' + encodeURIComponent(email), CustomOptions.registryOptions()); + } + + public invite(type: string, id: string, email: string): Observable { + return this.http.post(properties.registryUrl + 'invite/' + + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/manager/' + encodeURIComponent(email), null, + CustomOptions.registryOptions()).pipe(map((response: any) => response.response)); + } + + public cancelInvitation(type: string, id: string, email: string): Observable { + return this.http.delete(properties.registryUrl + 'invite/' + + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/manager/' + encodeURIComponent(email), + CustomOptions.registryOptions()); + } + + public getPendingManagers(type: string, id: string): Observable { + return this.http.get(properties.registryUrl + 'invite/' + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/managers/', + CustomOptions.registryOptions()).pipe(map((response: any) => response.response)); + } public getSubscribers(type: string, id: string): Observable { return this.http.get(properties.registryUrl + encodeURIComponent(type) + '/' + encodeURIComponent(id) + '/subscribers/').pipe(map(response => response.response));