From 049e129f3647ee807bdc68a3d0a38854b4ba0256 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 9 Jul 2018 23:47:12 -0400 Subject: [PATCH] added delete entity user apis --- src/abstractions/api.service.ts | 2 ++ src/services/api.service.ts | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/abstractions/api.service.ts b/src/abstractions/api.service.ts index 8238556992..6600b8ccbb 100644 --- a/src/abstractions/api.service.ts +++ b/src/abstractions/api.service.ts @@ -128,6 +128,7 @@ export abstract class ApiService { postCollection: (organizationId: string, request: CollectionRequest) => Promise; putCollection: (organizationId: string, id: string, request: CollectionRequest) => Promise; deleteCollection: (organizationId: string, id: string) => Promise; + deleteCollectionUser: (organizationId: string, id: string, organizationUserId: string) => Promise; getGroupDetails: (organizationId: string, id: string) => Promise; getGroups: (organizationId: string) => Promise>; @@ -135,6 +136,7 @@ export abstract class ApiService { postGroup: (organizationId: string, request: GroupRequest) => Promise; putGroup: (organizationId: string, id: string, request: GroupRequest) => Promise; deleteGroup: (organizationId: string, id: string) => Promise; + deleteGroupUser: (organizationId: string, id: string, organizationUserId: string) => Promise; getOrganizationUsers: (organizationId: string) => Promise>; diff --git a/src/services/api.service.ts b/src/services/api.service.ts index 1452ea17be..54a34f2d0d 100644 --- a/src/services/api.service.ts +++ b/src/services/api.service.ts @@ -398,6 +398,12 @@ export class ApiService implements ApiServiceAbstraction { return this.send('DELETE', '/organizations/' + organizationId + '/collections/' + id, null, true, false); } + deleteCollectionUser(organizationId: string, id: string, organizationUserId: string): Promise { + return this.send('DELETE', + '/organizations/' + organizationId + '/collections/' + id + '/user/' + organizationUserId, + null, true, false); + } + // Groups APIs async getGroupDetails(organizationId: string, id: string): Promise { @@ -431,6 +437,11 @@ export class ApiService implements ApiServiceAbstraction { return this.send('DELETE', '/organizations/' + organizationId + '/groups/' + id, null, true, false); } + deleteGroupUser(organizationId: string, id: string, organizationUserId: string): Promise { + return this.send('DELETE', + '/organizations/' + organizationId + '/groups/' + id + '/user/' + organizationUserId, null, true, false); + } + // Organization User APIs async getOrganizationUsers(organizationId: string): Promise> {