API for getting policies by token (#80)
* API for getting policies by token * not authed when calling this API
This commit is contained in:
parent
fb48091bb8
commit
4aecc53dde
|
@ -192,6 +192,8 @@ export abstract class ApiService {
|
|||
|
||||
getPolicy: (organizationId: string, type: PolicyType) => Promise<PolicyResponse>;
|
||||
getPolicies: (organizationId: string) => Promise<ListResponse<PolicyResponse>>;
|
||||
getPoliciesByToken: (organizationId: string, token: string, email: string, organizationUserId: string) =>
|
||||
Promise<ListResponse<PolicyResponse>>;
|
||||
putPolicy: (organizationId: string, type: PolicyType, request: PolicyRequest) => Promise<PolicyResponse>;
|
||||
|
||||
getOrganizationUser: (organizationId: string, id: string) => Promise<OrganizationUserDetailsResponse>;
|
||||
|
|
|
@ -564,6 +564,13 @@ export class ApiService implements ApiServiceAbstraction {
|
|||
return new ListResponse(r, PolicyResponse);
|
||||
}
|
||||
|
||||
async getPoliciesByToken(organizationId: string, token: string, email: string, organizationUserId: string):
|
||||
Promise<ListResponse<PolicyResponse>> {
|
||||
const r = await this.send('GET', '/organizations/' + organizationId + '/policies?token=' + token +
|
||||
'&email=' + email + '&organizationUserId=' + organizationUserId, null, false, true);
|
||||
return new ListResponse(r, PolicyResponse);
|
||||
}
|
||||
|
||||
async putPolicy(organizationId: string, type: PolicyType, request: PolicyRequest): Promise<PolicyResponse> {
|
||||
const r = await this.send('PUT', '/organizations/' + organizationId + '/policies/' + type, request, true, true);
|
||||
return new PolicyResponse(r);
|
||||
|
|
Loading…
Reference in New Issue