@azure/communication-identity 1.3.2-alpha.20241119.1 → 1.3.2-alpha.20241203.1
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@azure/communication-identity",
|
3
|
-
"version": "1.3.2-alpha.
|
3
|
+
"version": "1.3.2-alpha.20241203.1",
|
4
4
|
"description": "SDK for Azure Communication service which facilitates user token administration.",
|
5
5
|
"sdk-type": "client",
|
6
6
|
"main": "./dist/commonjs/index.js",
|
@@ -97,7 +97,7 @@
|
|
97
97
|
"@azure/core-client": "^1.9.2",
|
98
98
|
"@azure/core-lro": "^2.2.0",
|
99
99
|
"@azure/core-paging": "^1.6.2",
|
100
|
-
"@azure/core-rest-pipeline": "
|
100
|
+
"@azure/core-rest-pipeline": "^1.18.0",
|
101
101
|
"@azure/core-tracing": "^1.2.0",
|
102
102
|
"@azure/logger": "^1.1.4",
|
103
103
|
"events": "^3.0.0",
|
@@ -1,148 +0,0 @@
|
|
1
|
-
import type { CommonClientOptions } from '@azure/core-client';
|
2
|
-
import type { CommunicationUserIdentifier } from '@azure/communication-common';
|
3
|
-
import type { KeyCredential } from '@azure/core-auth';
|
4
|
-
import type { OperationOptions } from '@azure/core-client';
|
5
|
-
import type { TokenCredential } from '@azure/core-auth';
|
6
|
-
|
7
|
-
/**
|
8
|
-
* The access token for a user.
|
9
|
-
*/
|
10
|
-
export declare interface CommunicationAccessToken {
|
11
|
-
/**
|
12
|
-
* The access token issued for the user.
|
13
|
-
*/
|
14
|
-
token: string;
|
15
|
-
/**
|
16
|
-
* The expiry time of the token.
|
17
|
-
*/
|
18
|
-
expiresOn: Date;
|
19
|
-
}
|
20
|
-
|
21
|
-
/**
|
22
|
-
* Client class for interacting with Azure Communication Services User Token Management.
|
23
|
-
*/
|
24
|
-
export declare class CommunicationIdentityClient {
|
25
|
-
/**
|
26
|
-
* A reference to the auto-generated UserToken HTTP client.
|
27
|
-
*/
|
28
|
-
private readonly client;
|
29
|
-
/**
|
30
|
-
* Initializes a new instance of the CommunicationIdentity class.
|
31
|
-
* @param connectionString - Connection string to connect to an Azure Communication Service resource.
|
32
|
-
* Example: "endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret";
|
33
|
-
* @param options - Optional. Options to configure the HTTP pipeline.
|
34
|
-
*/
|
35
|
-
constructor(connectionString: string, options?: CommunicationIdentityClientOptions);
|
36
|
-
/**
|
37
|
-
* Initializes a new instance of the CommunicationIdentity class using an Azure KeyCredential.
|
38
|
-
* @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).
|
39
|
-
* @param credential - An object that is used to authenticate requests to the service. Use the AzureKeyCredential or `@azure/identity` to create a credential.
|
40
|
-
* @param options - Optional. Options to configure the HTTP pipeline.
|
41
|
-
*/
|
42
|
-
constructor(endpoint: string, credential: KeyCredential, options?: CommunicationIdentityClientOptions);
|
43
|
-
/**
|
44
|
-
* Initializes a new instance of the CommunicationIdentity class using a TokenCredential.
|
45
|
-
* @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net)
|
46
|
-
* @param credential - TokenCredential that is used to authenticate requests to the service.
|
47
|
-
* @param options - Optional. Options to configure the HTTP pipeline.
|
48
|
-
*/
|
49
|
-
constructor(endpoint: string, credential: TokenCredential, options?: CommunicationIdentityClientOptions);
|
50
|
-
/**
|
51
|
-
* Creates a scoped user token.
|
52
|
-
*
|
53
|
-
* @param user - The user whose tokens are being issued.
|
54
|
-
* @param scopes - Scopes to include in the token.
|
55
|
-
* @param options - Additional options for the request.
|
56
|
-
*/
|
57
|
-
getToken(user: CommunicationUserIdentifier, scopes: TokenScope[], options?: GetTokenOptions): Promise<CommunicationAccessToken>;
|
58
|
-
/**
|
59
|
-
* Revokes all data and tokens created for a user.
|
60
|
-
*
|
61
|
-
* @param user - The user whose tokens are being revoked.
|
62
|
-
* @param options - Additional options for the request.
|
63
|
-
*/
|
64
|
-
revokeTokens(user: CommunicationUserIdentifier, options?: OperationOptions): Promise<void>;
|
65
|
-
/**
|
66
|
-
* Creates a single user.
|
67
|
-
*
|
68
|
-
* @param options - Additional options for the request.
|
69
|
-
*/
|
70
|
-
createUser(options?: OperationOptions): Promise<CommunicationUserIdentifier>;
|
71
|
-
/**
|
72
|
-
* Creates a single user and a token simultaneously.
|
73
|
-
*
|
74
|
-
* @param scopes - Scopes to include in the token.
|
75
|
-
* @param options - Additional options for the request.
|
76
|
-
*/
|
77
|
-
createUserAndToken(scopes: TokenScope[], options?: CreateUserAndTokenOptions): Promise<CommunicationUserToken>;
|
78
|
-
/**
|
79
|
-
* Triggers revocation event for user and deletes all its data.
|
80
|
-
*
|
81
|
-
* @param user - The user being deleted.
|
82
|
-
* @param options - Additional options for the request.
|
83
|
-
*/
|
84
|
-
deleteUser(user: CommunicationUserIdentifier, options?: OperationOptions): Promise<void>;
|
85
|
-
/**
|
86
|
-
* Exchanges an Azure AD access token of a Teams user for a new Communication Identity access token with a matching expiration time.
|
87
|
-
*
|
88
|
-
* @param options - Options used to exchange an Azure AD access token of a Teams user for a new Communication Identity access token.
|
89
|
-
*/
|
90
|
-
getTokenForTeamsUser(options: GetTokenForTeamsUserOptions): Promise<CommunicationAccessToken>;
|
91
|
-
}
|
92
|
-
|
93
|
-
/**
|
94
|
-
* Client options used to configure the CommunicationIdentity API requests.
|
95
|
-
*/
|
96
|
-
export declare interface CommunicationIdentityClientOptions extends CommonClientOptions {
|
97
|
-
}
|
98
|
-
|
99
|
-
/**
|
100
|
-
* The issued token and the user it was issued for.
|
101
|
-
*/
|
102
|
-
export declare interface CommunicationUserToken extends CommunicationAccessToken {
|
103
|
-
/**
|
104
|
-
* Represents the user the token was issued for
|
105
|
-
*/
|
106
|
-
user: CommunicationUserIdentifier;
|
107
|
-
}
|
108
|
-
|
109
|
-
/**
|
110
|
-
* Options to create a single user and a token simultaneously.
|
111
|
-
*/
|
112
|
-
export declare interface CreateUserAndTokenOptions extends OperationOptions {
|
113
|
-
/** Optional custom validity period of the token within [60,1440] minutes range. If not provided, the default value of 1440 minutes (24 hours) will be used. */
|
114
|
-
tokenExpiresInMinutes?: number;
|
115
|
-
}
|
116
|
-
|
117
|
-
/**
|
118
|
-
* Options used to exchange an AAD access token of a Teams user for a new Communication Identity access token.
|
119
|
-
*/
|
120
|
-
export declare interface GetTokenForTeamsUserOptions extends OperationOptions {
|
121
|
-
/**
|
122
|
-
* Azure Active Directory access token of a Teams user.
|
123
|
-
*/
|
124
|
-
teamsUserAadToken: string;
|
125
|
-
/**
|
126
|
-
* Client ID of an Azure AD application to be verified against the appId claim in the Azure AD access token.
|
127
|
-
*/
|
128
|
-
clientId: string;
|
129
|
-
/**
|
130
|
-
* Object ID of an Azure AD user (Teams User) to be verified against the OID claim in the Azure AD access token.
|
131
|
-
*/
|
132
|
-
userObjectId: string;
|
133
|
-
}
|
134
|
-
|
135
|
-
/**
|
136
|
-
* Options to create a scoped user token.
|
137
|
-
*/
|
138
|
-
export declare interface GetTokenOptions extends OperationOptions {
|
139
|
-
/** Optional custom validity period of the token within [60,1440] minutes range. If not provided, the default value of 1440 minutes (24 hours) will be used. */
|
140
|
-
tokenExpiresInMinutes?: number;
|
141
|
-
}
|
142
|
-
|
143
|
-
/**
|
144
|
-
* Represents the scope of the token.
|
145
|
-
*/
|
146
|
-
export declare type TokenScope = "chat" | "voip" | "chat.join" | "chat.join.limited" | "voip.join";
|
147
|
-
|
148
|
-
export { }
|