/
communicationIdentityOperations.ts
69 lines (67 loc) · 2.52 KB
/
communicationIdentityOperations.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import {
CommunicationIdentityCreateOptionalParams,
CommunicationIdentityCreateResponse,
CommunicationIdentityDeleteOptionalParams,
CommunicationIdentityRevokeAccessTokensOptionalParams,
CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams,
CommunicationIdentityExchangeTeamsUserAccessTokenResponse,
CommunicationIdentityTokenScope,
CommunicationIdentityIssueAccessTokenOptionalParams,
CommunicationIdentityIssueAccessTokenResponse
} from "../models";
/** Interface representing a CommunicationIdentityOperations. */
export interface CommunicationIdentityOperations {
/**
* Create a new identity, and optionally, an access token.
* @param options The options parameters.
*/
create(
options?: CommunicationIdentityCreateOptionalParams
): Promise<CommunicationIdentityCreateResponse>;
/**
* Delete the identity, revoke all tokens for the identity and delete all associated data.
* @param id Identifier of the identity to be deleted.
* @param options The options parameters.
*/
delete(
id: string,
options?: CommunicationIdentityDeleteOptionalParams
): Promise<void>;
/**
* Revoke all access tokens for the specific identity.
* @param id Identifier of the identity.
* @param options The options parameters.
*/
revokeAccessTokens(
id: string,
options?: CommunicationIdentityRevokeAccessTokensOptionalParams
): Promise<void>;
/**
* Exchange an AAD access token of a Teams user for a new Communication Identity access token with a
* matching expiration time.
* @param token AAD access token of a Teams User to acquire a new Communication Identity access token.
* @param options The options parameters.
*/
exchangeTeamsUserAccessToken(
token: string,
options?: CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams
): Promise<CommunicationIdentityExchangeTeamsUserAccessTokenResponse>;
/**
* Issue a new token for an identity.
* @param id Identifier of the identity to issue token for.
* @param scopes List of scopes attached to the token.
* @param options The options parameters.
*/
issueAccessToken(
id: string,
scopes: CommunicationIdentityTokenScope[],
options?: CommunicationIdentityIssueAccessTokenOptionalParams
): Promise<CommunicationIdentityIssueAccessTokenResponse>;
}