@azure/communication-identity 1.3.2-alpha.20241113.1 → 1.3.2-alpha.20241119.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/common/logger.d.ts +5 -0
- package/dist/browser/common/logger.d.ts.map +1 -0
- package/dist/browser/communicationIdentityClient.d.ts +76 -0
- package/dist/browser/communicationIdentityClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/communicationIdentityClient.js +3 -3
- package/dist/browser/communicationIdentityClient.js.map +1 -0
- package/dist/browser/constants.d.ts +2 -0
- package/dist/browser/constants.d.ts.map +1 -0
- package/dist/browser/generated/src/identityRestClient.d.ts +17 -0
- package/dist/browser/generated/src/identityRestClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/src/identityRestClient.js +1 -1
- package/dist/browser/generated/src/identityRestClient.js.map +1 -0
- package/dist/browser/generated/src/index.d.ts +4 -0
- package/dist/browser/generated/src/index.d.ts.map +1 -0
- package/dist/browser/generated/src/index.js +11 -0
- package/dist/browser/generated/src/index.js.map +1 -0
- package/dist/browser/generated/src/models/index.d.ts +127 -0
- package/dist/browser/generated/src/models/index.d.ts.map +1 -0
- package/dist/browser/generated/src/models/mappers.d.ts +10 -0
- package/dist/browser/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/browser/generated/src/models/parameters.d.ts +14 -0
- package/dist/browser/generated/src/models/parameters.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/src/models/parameters.js +1 -1
- package/dist/browser/generated/src/models/parameters.js.map +1 -0
- package/dist/browser/generated/src/operations/communicationIdentityOperations.d.ts +49 -0
- package/dist/browser/generated/src/operations/communicationIdentityOperations.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/src/operations/communicationIdentityOperations.js +3 -3
- package/dist/browser/generated/src/operations/communicationIdentityOperations.js.map +1 -0
- package/dist/browser/generated/src/operations/index.d.ts +2 -0
- package/dist/browser/generated/src/operations/index.d.ts.map +1 -0
- package/{dist-esm/src/generated/src → dist/browser/generated/src/operations}/index.js +1 -3
- package/{dist-esm/src → dist/browser}/generated/src/operations/index.js.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/communicationIdentityOperations.d.ts +41 -0
- package/dist/browser/generated/src/operationsInterfaces/communicationIdentityOperations.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/communicationIdentityOperations.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts +2 -0
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/index.js +9 -0
- package/{dist-esm/src → dist/browser}/generated/src/operationsInterfaces/index.js.map +1 -1
- package/dist/browser/generated/src/tracing.d.ts +2 -0
- package/dist/browser/generated/src/tracing.d.ts.map +1 -0
- package/dist/browser/index.d.ts +3 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +5 -0
- package/{dist-esm/src → dist/browser}/index.js.map +1 -1
- package/dist/browser/models.d.ts +65 -0
- package/dist/browser/models.d.ts.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/commonjs/common/logger.d.ts +5 -0
- package/dist/commonjs/common/logger.d.ts.map +1 -0
- package/dist/commonjs/common/logger.js +11 -0
- package/dist/commonjs/common/logger.js.map +1 -0
- package/dist/commonjs/communicationIdentityClient.d.ts +76 -0
- package/dist/commonjs/communicationIdentityClient.d.ts.map +1 -0
- package/dist/commonjs/communicationIdentityClient.js +107 -0
- package/dist/commonjs/communicationIdentityClient.js.map +1 -0
- package/dist/commonjs/constants.d.ts +2 -0
- package/dist/commonjs/constants.d.ts.map +1 -0
- package/dist/commonjs/constants.js +7 -0
- package/dist/commonjs/constants.js.map +1 -0
- package/dist/commonjs/generated/src/identityRestClient.d.ts +17 -0
- package/dist/commonjs/generated/src/identityRestClient.d.ts.map +1 -0
- package/dist/commonjs/generated/src/identityRestClient.js +74 -0
- package/dist/commonjs/generated/src/identityRestClient.js.map +1 -0
- package/dist/commonjs/generated/src/index.d.ts +4 -0
- package/dist/commonjs/generated/src/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/index.js +16 -0
- package/dist/commonjs/generated/src/index.js.map +1 -0
- package/dist/commonjs/generated/src/models/index.d.ts +127 -0
- package/dist/commonjs/generated/src/models/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/index.js +25 -0
- package/dist/commonjs/generated/src/models/index.js.map +1 -0
- package/dist/commonjs/generated/src/models/mappers.d.ts +10 -0
- package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/mappers.js +224 -0
- package/dist/commonjs/generated/src/models/mappers.js.map +1 -0
- package/dist/commonjs/generated/src/models/parameters.d.ts +14 -0
- package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/parameters.js +94 -0
- package/dist/commonjs/generated/src/models/parameters.js.map +1 -0
- package/dist/commonjs/generated/src/operations/communicationIdentityOperations.d.ts +49 -0
- package/dist/commonjs/generated/src/operations/communicationIdentityOperations.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/communicationIdentityOperations.js +182 -0
- package/dist/commonjs/generated/src/operations/communicationIdentityOperations.js.map +1 -0
- package/dist/commonjs/generated/src/operations/index.d.ts +2 -0
- package/dist/commonjs/generated/src/operations/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/index.js +12 -0
- package/dist/commonjs/generated/src/operations/index.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/communicationIdentityOperations.d.ts +41 -0
- package/dist/commonjs/generated/src/operationsInterfaces/communicationIdentityOperations.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/communicationIdentityOperations.js +10 -0
- package/dist/commonjs/generated/src/operationsInterfaces/communicationIdentityOperations.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts +2 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.js +12 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/commonjs/generated/src/tracing.d.ts +2 -0
- package/dist/commonjs/generated/src/tracing.d.ts.map +1 -0
- package/dist/commonjs/generated/src/tracing.js +17 -0
- package/dist/commonjs/generated/src/tracing.js.map +1 -0
- package/dist/commonjs/index.d.ts +3 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +8 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/models.d.ts +65 -0
- package/dist/commonjs/models.d.ts.map +1 -0
- package/dist/commonjs/models.js +5 -0
- package/dist/commonjs/models.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/common/logger.d.ts +5 -0
- package/dist/esm/common/logger.d.ts.map +1 -0
- package/dist/esm/common/logger.js +8 -0
- package/dist/esm/common/logger.js.map +1 -0
- package/dist/esm/communicationIdentityClient.d.ts +76 -0
- package/dist/esm/communicationIdentityClient.d.ts.map +1 -0
- package/dist/esm/communicationIdentityClient.js +103 -0
- package/dist/esm/communicationIdentityClient.js.map +1 -0
- package/dist/esm/constants.d.ts +2 -0
- package/dist/esm/constants.d.ts.map +1 -0
- package/dist/esm/constants.js +4 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/generated/src/identityRestClient.d.ts +17 -0
- package/dist/esm/generated/src/identityRestClient.d.ts.map +1 -0
- package/dist/esm/generated/src/identityRestClient.js +69 -0
- package/dist/esm/generated/src/identityRestClient.js.map +1 -0
- package/dist/esm/generated/src/index.d.ts +4 -0
- package/dist/esm/generated/src/index.d.ts.map +1 -0
- package/dist/esm/generated/src/index.js +11 -0
- package/dist/esm/generated/src/index.js.map +1 -0
- package/dist/esm/generated/src/models/index.d.ts +127 -0
- package/dist/esm/generated/src/models/index.d.ts.map +1 -0
- package/dist/esm/generated/src/models/index.js +22 -0
- package/dist/esm/generated/src/models/index.js.map +1 -0
- package/dist/esm/generated/src/models/mappers.d.ts +10 -0
- package/dist/esm/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/esm/generated/src/models/mappers.js +221 -0
- package/dist/esm/generated/src/models/mappers.js.map +1 -0
- package/dist/esm/generated/src/models/parameters.d.ts +14 -0
- package/dist/esm/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/esm/generated/src/models/parameters.js +91 -0
- package/dist/esm/generated/src/models/parameters.js.map +1 -0
- package/dist/esm/generated/src/operations/communicationIdentityOperations.d.ts +49 -0
- package/dist/esm/generated/src/operations/communicationIdentityOperations.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/communicationIdentityOperations.js +177 -0
- package/dist/esm/generated/src/operations/communicationIdentityOperations.js.map +1 -0
- package/dist/esm/generated/src/operations/index.d.ts +2 -0
- package/dist/esm/generated/src/operations/index.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/index.js +9 -0
- package/dist/esm/generated/src/operations/index.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/communicationIdentityOperations.d.ts +41 -0
- package/dist/esm/generated/src/operationsInterfaces/communicationIdentityOperations.d.ts.map +1 -0
- package/{dist-esm/src/generated/src/operationsInterfaces/index.js → dist/esm/generated/src/operationsInterfaces/communicationIdentityOperations.js} +2 -2
- package/dist/esm/generated/src/operationsInterfaces/communicationIdentityOperations.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/index.d.ts +2 -0
- package/dist/esm/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/index.js +9 -0
- package/dist/esm/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/generated/src/tracing.d.ts +2 -0
- package/dist/esm/generated/src/tracing.d.ts.map +1 -0
- package/dist/esm/generated/src/tracing.js +14 -0
- package/dist/esm/generated/src/tracing.js.map +1 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/models.d.ts +65 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.js +4 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/react-native/common/logger.d.ts +5 -0
- package/dist/react-native/common/logger.d.ts.map +1 -0
- package/dist/react-native/common/logger.js +8 -0
- package/dist/react-native/common/logger.js.map +1 -0
- package/dist/react-native/communicationIdentityClient.d.ts +76 -0
- package/dist/react-native/communicationIdentityClient.d.ts.map +1 -0
- package/dist/react-native/communicationIdentityClient.js +103 -0
- package/dist/react-native/communicationIdentityClient.js.map +1 -0
- package/dist/react-native/constants.d.ts +2 -0
- package/dist/react-native/constants.d.ts.map +1 -0
- package/dist/react-native/constants.js +4 -0
- package/dist/react-native/constants.js.map +1 -0
- package/dist/react-native/generated/src/identityRestClient.d.ts +17 -0
- package/dist/react-native/generated/src/identityRestClient.d.ts.map +1 -0
- package/dist/react-native/generated/src/identityRestClient.js +69 -0
- package/dist/react-native/generated/src/identityRestClient.js.map +1 -0
- package/dist/react-native/generated/src/index.d.ts +4 -0
- package/dist/react-native/generated/src/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/index.js +11 -0
- package/dist/react-native/generated/src/index.js.map +1 -0
- package/dist/react-native/generated/src/models/index.d.ts +127 -0
- package/dist/react-native/generated/src/models/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/index.js +22 -0
- package/dist/react-native/generated/src/models/index.js.map +1 -0
- package/dist/react-native/generated/src/models/mappers.d.ts +10 -0
- package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/mappers.js +221 -0
- package/dist/react-native/generated/src/models/mappers.js.map +1 -0
- package/dist/react-native/generated/src/models/parameters.d.ts +14 -0
- package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/parameters.js +91 -0
- package/dist/react-native/generated/src/models/parameters.js.map +1 -0
- package/dist/react-native/generated/src/operations/communicationIdentityOperations.d.ts +49 -0
- package/dist/react-native/generated/src/operations/communicationIdentityOperations.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/communicationIdentityOperations.js +177 -0
- package/dist/react-native/generated/src/operations/communicationIdentityOperations.js.map +1 -0
- package/dist/react-native/generated/src/operations/index.d.ts +2 -0
- package/dist/react-native/generated/src/operations/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/index.js +9 -0
- package/dist/react-native/generated/src/operations/index.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/communicationIdentityOperations.d.ts +41 -0
- package/dist/react-native/generated/src/operationsInterfaces/communicationIdentityOperations.d.ts.map +1 -0
- package/{dist-esm/src/generated/src/operations/index.js → dist/react-native/generated/src/operationsInterfaces/communicationIdentityOperations.js} +2 -2
- package/dist/react-native/generated/src/operationsInterfaces/communicationIdentityOperations.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts +2 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.js +9 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/react-native/generated/src/tracing.d.ts +2 -0
- package/dist/react-native/generated/src/tracing.d.ts.map +1 -0
- package/dist/react-native/generated/src/tracing.js +14 -0
- package/dist/react-native/generated/src/tracing.js.map +1 -0
- package/dist/react-native/index.d.ts +3 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +5 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/models.d.ts +65 -0
- package/dist/react-native/models.d.ts.map +1 -0
- package/dist/react-native/models.js +4 -0
- package/dist/react-native/models.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/package.json +68 -48
- package/dist/index.js +0 -684
- package/dist/index.js.map +0 -1
- package/dist-esm/src/communicationIdentityClient.js.map +0 -1
- package/dist-esm/src/generated/src/identityRestClient.js.map +0 -1
- package/dist-esm/src/generated/src/index.js.map +0 -1
- package/dist-esm/src/generated/src/models/parameters.js.map +0 -1
- package/dist-esm/src/generated/src/operations/communicationIdentityOperations.js.map +0 -1
- package/dist-esm/src/generated/src/operationsInterfaces/communicationIdentityOperations.js.map +0 -1
- package/dist-esm/src/index.js +0 -5
- /package/{dist-esm/src → dist/browser}/common/logger.js +0 -0
- /package/{dist-esm/src → dist/browser}/common/logger.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/constants.js +0 -0
- /package/{dist-esm/src → dist/browser}/constants.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/models/index.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/models/index.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/models/mappers.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/models/mappers.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/operationsInterfaces/communicationIdentityOperations.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/tracing.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/tracing.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/models.js +0 -0
- /package/{dist-esm/src → dist/browser}/models.js.map +0 -0
- /package/{types → dist}/communication-identity.d.ts +0 -0
@@ -0,0 +1,182 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
4
|
+
* Licensed under the MIT License.
|
5
|
+
*
|
6
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
7
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
8
|
+
*/
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
+
exports.CommunicationIdentityOperationsImpl = void 0;
|
11
|
+
const tslib_1 = require("tslib");
|
12
|
+
const tracing_js_1 = require("../tracing.js");
|
13
|
+
const coreClient = tslib_1.__importStar(require("@azure/core-client"));
|
14
|
+
const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
|
15
|
+
const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
16
|
+
/** Class containing CommunicationIdentityOperations operations. */
|
17
|
+
class CommunicationIdentityOperationsImpl {
|
18
|
+
/**
|
19
|
+
* Initialize a new instance of the class CommunicationIdentityOperations class.
|
20
|
+
* @param client Reference to the service client
|
21
|
+
*/
|
22
|
+
constructor(client) {
|
23
|
+
this.client = client;
|
24
|
+
}
|
25
|
+
/**
|
26
|
+
* Create a new identity, and optionally, an access token.
|
27
|
+
* @param options The options parameters.
|
28
|
+
*/
|
29
|
+
async create(options) {
|
30
|
+
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.create", options !== null && options !== void 0 ? options : {}, async (options) => {
|
31
|
+
return this.client.sendOperationRequest({ options }, createOperationSpec);
|
32
|
+
});
|
33
|
+
}
|
34
|
+
/**
|
35
|
+
* Delete the identity, revoke all tokens for the identity and delete all associated data.
|
36
|
+
* @param id Identifier of the identity to be deleted.
|
37
|
+
* @param options The options parameters.
|
38
|
+
*/
|
39
|
+
async delete(id, options) {
|
40
|
+
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.delete", options !== null && options !== void 0 ? options : {}, async (options) => {
|
41
|
+
return this.client.sendOperationRequest({ id, options }, deleteOperationSpec);
|
42
|
+
});
|
43
|
+
}
|
44
|
+
/**
|
45
|
+
* Revoke all access tokens for the specific identity.
|
46
|
+
* @param id Identifier of the identity.
|
47
|
+
* @param options The options parameters.
|
48
|
+
*/
|
49
|
+
async revokeAccessTokens(id, options) {
|
50
|
+
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.revokeAccessTokens", options !== null && options !== void 0 ? options : {}, async (options) => {
|
51
|
+
return this.client.sendOperationRequest({ id, options }, revokeAccessTokensOperationSpec);
|
52
|
+
});
|
53
|
+
}
|
54
|
+
/**
|
55
|
+
* Exchange an Azure Active Directory (Azure AD) access token of a Teams user for a new Communication
|
56
|
+
* Identity access token with a matching expiration time.
|
57
|
+
* @param token Azure AD access token of a Teams User to acquire a new Communication Identity access
|
58
|
+
* token.
|
59
|
+
* @param appId Client ID of an Azure AD application to be verified against the appid claim in the
|
60
|
+
* Azure AD access token.
|
61
|
+
* @param userId Object ID of an Azure AD user (Teams User) to be verified against the oid claim in the
|
62
|
+
* Azure AD access token.
|
63
|
+
* @param options The options parameters.
|
64
|
+
*/
|
65
|
+
async exchangeTeamsUserAccessToken(token, appId, userId, options) {
|
66
|
+
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.exchangeTeamsUserAccessToken", options !== null && options !== void 0 ? options : {}, async (options) => {
|
67
|
+
return this.client.sendOperationRequest({ token, appId, userId, options }, exchangeTeamsUserAccessTokenOperationSpec);
|
68
|
+
});
|
69
|
+
}
|
70
|
+
/**
|
71
|
+
* Issue a new token for an identity.
|
72
|
+
* @param id Identifier of the identity to issue token for.
|
73
|
+
* @param scopes List of scopes attached to the token.
|
74
|
+
* @param options The options parameters.
|
75
|
+
*/
|
76
|
+
async issueAccessToken(id, scopes, options) {
|
77
|
+
return tracing_js_1.tracingClient.withSpan("IdentityRestClient.issueAccessToken", options !== null && options !== void 0 ? options : {}, async (options) => {
|
78
|
+
return this.client.sendOperationRequest({ id, scopes, options }, issueAccessTokenOperationSpec);
|
79
|
+
});
|
80
|
+
}
|
81
|
+
}
|
82
|
+
exports.CommunicationIdentityOperationsImpl = CommunicationIdentityOperationsImpl;
|
83
|
+
// Operation Specifications
|
84
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
85
|
+
const createOperationSpec = {
|
86
|
+
path: "/identities",
|
87
|
+
httpMethod: "POST",
|
88
|
+
responses: {
|
89
|
+
201: {
|
90
|
+
bodyMapper: Mappers.CommunicationIdentityAccessTokenResult
|
91
|
+
},
|
92
|
+
default: {
|
93
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
94
|
+
}
|
95
|
+
},
|
96
|
+
requestBody: {
|
97
|
+
parameterPath: {
|
98
|
+
createTokenWithScopes: ["options", "createTokenWithScopes"],
|
99
|
+
expiresInMinutes: ["options", "expiresInMinutes"]
|
100
|
+
},
|
101
|
+
mapper: Mappers.CommunicationIdentityCreateRequest
|
102
|
+
},
|
103
|
+
queryParameters: [Parameters.apiVersion],
|
104
|
+
urlParameters: [Parameters.endpoint],
|
105
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
106
|
+
mediaType: "json",
|
107
|
+
serializer
|
108
|
+
};
|
109
|
+
const deleteOperationSpec = {
|
110
|
+
path: "/identities/{id}",
|
111
|
+
httpMethod: "DELETE",
|
112
|
+
responses: {
|
113
|
+
204: {},
|
114
|
+
default: {
|
115
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
116
|
+
}
|
117
|
+
},
|
118
|
+
queryParameters: [Parameters.apiVersion],
|
119
|
+
urlParameters: [Parameters.endpoint, Parameters.id],
|
120
|
+
headerParameters: [Parameters.accept],
|
121
|
+
serializer
|
122
|
+
};
|
123
|
+
const revokeAccessTokensOperationSpec = {
|
124
|
+
path: "/identities/{id}/:revokeAccessTokens",
|
125
|
+
httpMethod: "POST",
|
126
|
+
responses: {
|
127
|
+
204: {},
|
128
|
+
default: {
|
129
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
130
|
+
}
|
131
|
+
},
|
132
|
+
queryParameters: [Parameters.apiVersion],
|
133
|
+
urlParameters: [Parameters.endpoint, Parameters.id],
|
134
|
+
headerParameters: [Parameters.accept],
|
135
|
+
serializer
|
136
|
+
};
|
137
|
+
const exchangeTeamsUserAccessTokenOperationSpec = {
|
138
|
+
path: "/teamsUser/:exchangeAccessToken",
|
139
|
+
httpMethod: "POST",
|
140
|
+
responses: {
|
141
|
+
200: {
|
142
|
+
bodyMapper: Mappers.CommunicationIdentityAccessToken
|
143
|
+
},
|
144
|
+
default: {
|
145
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
146
|
+
}
|
147
|
+
},
|
148
|
+
requestBody: {
|
149
|
+
parameterPath: { token: ["token"], appId: ["appId"], userId: ["userId"] },
|
150
|
+
mapper: Object.assign(Object.assign({}, Mappers.TeamsUserExchangeTokenRequest), { required: true })
|
151
|
+
},
|
152
|
+
queryParameters: [Parameters.apiVersion],
|
153
|
+
urlParameters: [Parameters.endpoint],
|
154
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
155
|
+
mediaType: "json",
|
156
|
+
serializer
|
157
|
+
};
|
158
|
+
const issueAccessTokenOperationSpec = {
|
159
|
+
path: "/identities/{id}/:issueAccessToken",
|
160
|
+
httpMethod: "POST",
|
161
|
+
responses: {
|
162
|
+
200: {
|
163
|
+
bodyMapper: Mappers.CommunicationIdentityAccessToken
|
164
|
+
},
|
165
|
+
default: {
|
166
|
+
bodyMapper: Mappers.CommunicationErrorResponse
|
167
|
+
}
|
168
|
+
},
|
169
|
+
requestBody: {
|
170
|
+
parameterPath: {
|
171
|
+
scopes: ["scopes"],
|
172
|
+
expiresInMinutes: ["options", "expiresInMinutes"]
|
173
|
+
},
|
174
|
+
mapper: Object.assign(Object.assign({}, Mappers.CommunicationIdentityAccessTokenRequest), { required: true })
|
175
|
+
},
|
176
|
+
queryParameters: [Parameters.apiVersion],
|
177
|
+
urlParameters: [Parameters.endpoint, Parameters.id],
|
178
|
+
headerParameters: [Parameters.contentType, Parameters.accept],
|
179
|
+
mediaType: "json",
|
180
|
+
serializer
|
181
|
+
};
|
182
|
+
//# sourceMappingURL=communicationIdentityOperations.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"communicationIdentityOperations.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/communicationIdentityOperations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,8CAA8C;AAE9C,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AActD,mEAAmE;AACnE,MAAa,mCAAmC;IAI9C;;;OAGG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,MAAM,CACV,OAAmD;QAEnD,OAAO,0BAAa,CAAC,QAAQ,CAC3B,2BAA2B,EAC3B,O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IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,6BAA6B,GAA6B;IAC9D,IAAI,EAAE,oCAAoC;IAC1C,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gCAAgC;SACrD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,WAAW,EAAE;QACX,aAAa,EAAE;YACb,MAAM,EAAE,CAAC,QAAQ,CAAC;YAClB,gBAAgB,EAAE,CAAC,SAAS,EAAE,kBAAkB,CAAC;SAClD;QACD,MAAM,kCACD,OAAO,CAAC,uCAAuC,KAClD,QAAQ,EAAE,IAAI,GACf;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,CAAC;IACnD,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing.js\";\nimport { CommunicationIdentityOperations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { IdentityRestClient } from \"../identityRestClient.js\";\nimport {\n CommunicationIdentityCreateOptionalParams,\n CommunicationIdentityCreateResponse,\n CommunicationIdentityDeleteOptionalParams,\n CommunicationIdentityRevokeAccessTokensOptionalParams,\n CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams,\n CommunicationIdentityExchangeTeamsUserAccessTokenResponse,\n CommunicationIdentityTokenScope,\n CommunicationIdentityIssueAccessTokenOptionalParams,\n CommunicationIdentityIssueAccessTokenResponse\n} from \"../models/index.js\";\n\n/** Class containing CommunicationIdentityOperations operations. */\nexport class CommunicationIdentityOperationsImpl\n implements CommunicationIdentityOperations {\n private readonly client: IdentityRestClient;\n\n /**\n * Initialize a new instance of the class CommunicationIdentityOperations class.\n * @param client Reference to the service client\n */\n constructor(client: IdentityRestClient) {\n this.client = client;\n }\n\n /**\n * Create a new identity, and optionally, an access token.\n * @param options The options parameters.\n */\n async create(\n options?: CommunicationIdentityCreateOptionalParams\n ): Promise<CommunicationIdentityCreateResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.create\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n createOperationSpec\n ) as Promise<CommunicationIdentityCreateResponse>;\n }\n );\n }\n\n /**\n * Delete the identity, revoke all tokens for the identity and delete all associated data.\n * @param id Identifier of the identity to be deleted.\n * @param options The options parameters.\n */\n async delete(\n id: string,\n options?: CommunicationIdentityDeleteOptionalParams\n ): Promise<void> {\n return tracingClient.withSpan(\n \"IdentityRestClient.delete\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { id, options },\n deleteOperationSpec\n ) as Promise<void>;\n }\n );\n }\n\n /**\n * Revoke all access tokens for the specific identity.\n * @param id Identifier of the identity.\n * @param options The options parameters.\n */\n async revokeAccessTokens(\n id: string,\n options?: CommunicationIdentityRevokeAccessTokensOptionalParams\n ): Promise<void> {\n return tracingClient.withSpan(\n \"IdentityRestClient.revokeAccessTokens\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { id, options },\n revokeAccessTokensOperationSpec\n ) as Promise<void>;\n }\n );\n }\n\n /**\n * Exchange an Azure Active Directory (Azure AD) access token of a Teams user for a new Communication\n * Identity access token with a matching expiration time.\n * @param token Azure AD access token of a Teams User to acquire a new Communication Identity access\n * token.\n * @param appId Client ID of an Azure AD application to be verified against the appid claim in the\n * Azure AD access token.\n * @param userId Object ID of an Azure AD user (Teams User) to be verified against the oid claim in the\n * Azure AD access token.\n * @param options The options parameters.\n */\n async exchangeTeamsUserAccessToken(\n token: string,\n appId: string,\n userId: string,\n options?: CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams\n ): Promise<CommunicationIdentityExchangeTeamsUserAccessTokenResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.exchangeTeamsUserAccessToken\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { token, appId, userId, options },\n exchangeTeamsUserAccessTokenOperationSpec\n ) as Promise<CommunicationIdentityExchangeTeamsUserAccessTokenResponse>;\n }\n );\n }\n\n /**\n * Issue a new token for an identity.\n * @param id Identifier of the identity to issue token for.\n * @param scopes List of scopes attached to the token.\n * @param options The options parameters.\n */\n async issueAccessToken(\n id: string,\n scopes: CommunicationIdentityTokenScope[],\n options?: CommunicationIdentityIssueAccessTokenOptionalParams\n ): Promise<CommunicationIdentityIssueAccessTokenResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.issueAccessToken\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { id, scopes, options },\n issueAccessTokenOperationSpec\n ) as Promise<CommunicationIdentityIssueAccessTokenResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/identities\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.CommunicationIdentityAccessTokenResult\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n requestBody: {\n parameterPath: {\n createTokenWithScopes: [\"options\", \"createTokenWithScopes\"],\n expiresInMinutes: [\"options\", \"expiresInMinutes\"]\n },\n mapper: Mappers.CommunicationIdentityCreateRequest\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/identities/{id}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst revokeAccessTokensOperationSpec: coreClient.OperationSpec = {\n path: \"/identities/{id}/:revokeAccessTokens\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst exchangeTeamsUserAccessTokenOperationSpec: coreClient.OperationSpec = {\n path: \"/teamsUser/:exchangeAccessToken\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CommunicationIdentityAccessToken\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n requestBody: {\n parameterPath: { token: [\"token\"], appId: [\"appId\"], userId: [\"userId\"] },\n mapper: { ...Mappers.TeamsUserExchangeTokenRequest, required: true }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\nconst issueAccessTokenOperationSpec: coreClient.OperationSpec = {\n path: \"/identities/{id}/:issueAccessToken\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CommunicationIdentityAccessToken\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n requestBody: {\n parameterPath: {\n scopes: [\"scopes\"],\n expiresInMinutes: [\"options\", \"expiresInMinutes\"]\n },\n mapper: {\n ...Mappers.CommunicationIdentityAccessTokenRequest,\n required: true\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/src/operations/index.ts"],"names":[],"mappings":"AAQA,cAAc,sCAAsC,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
4
|
+
* Licensed under the MIT License.
|
5
|
+
*
|
6
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
7
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
8
|
+
*/
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
+
const tslib_1 = require("tslib");
|
11
|
+
tslib_1.__exportStar(require("./communicationIdentityOperations.js"), exports);
|
12
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,+EAAqD","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./communicationIdentityOperations.js\";\n"]}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { CommunicationIdentityCreateOptionalParams, CommunicationIdentityCreateResponse, CommunicationIdentityDeleteOptionalParams, CommunicationIdentityRevokeAccessTokensOptionalParams, CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams, CommunicationIdentityExchangeTeamsUserAccessTokenResponse, CommunicationIdentityTokenScope, CommunicationIdentityIssueAccessTokenOptionalParams, CommunicationIdentityIssueAccessTokenResponse } from "../models/index.js";
|
2
|
+
/** Interface representing a CommunicationIdentityOperations. */
|
3
|
+
export interface CommunicationIdentityOperations {
|
4
|
+
/**
|
5
|
+
* Create a new identity, and optionally, an access token.
|
6
|
+
* @param options The options parameters.
|
7
|
+
*/
|
8
|
+
create(options?: CommunicationIdentityCreateOptionalParams): Promise<CommunicationIdentityCreateResponse>;
|
9
|
+
/**
|
10
|
+
* Delete the identity, revoke all tokens for the identity and delete all associated data.
|
11
|
+
* @param id Identifier of the identity to be deleted.
|
12
|
+
* @param options The options parameters.
|
13
|
+
*/
|
14
|
+
delete(id: string, options?: CommunicationIdentityDeleteOptionalParams): Promise<void>;
|
15
|
+
/**
|
16
|
+
* Revoke all access tokens for the specific identity.
|
17
|
+
* @param id Identifier of the identity.
|
18
|
+
* @param options The options parameters.
|
19
|
+
*/
|
20
|
+
revokeAccessTokens(id: string, options?: CommunicationIdentityRevokeAccessTokensOptionalParams): Promise<void>;
|
21
|
+
/**
|
22
|
+
* Exchange an Azure Active Directory (Azure AD) access token of a Teams user for a new Communication
|
23
|
+
* Identity access token with a matching expiration time.
|
24
|
+
* @param token Azure AD access token of a Teams User to acquire a new Communication Identity access
|
25
|
+
* token.
|
26
|
+
* @param appId Client ID of an Azure AD application to be verified against the appid claim in the
|
27
|
+
* Azure AD access token.
|
28
|
+
* @param userId Object ID of an Azure AD user (Teams User) to be verified against the oid claim in the
|
29
|
+
* Azure AD access token.
|
30
|
+
* @param options The options parameters.
|
31
|
+
*/
|
32
|
+
exchangeTeamsUserAccessToken(token: string, appId: string, userId: string, options?: CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams): Promise<CommunicationIdentityExchangeTeamsUserAccessTokenResponse>;
|
33
|
+
/**
|
34
|
+
* Issue a new token for an identity.
|
35
|
+
* @param id Identifier of the identity to issue token for.
|
36
|
+
* @param scopes List of scopes attached to the token.
|
37
|
+
* @param options The options parameters.
|
38
|
+
*/
|
39
|
+
issueAccessToken(id: string, scopes: CommunicationIdentityTokenScope[], options?: CommunicationIdentityIssueAccessTokenOptionalParams): Promise<CommunicationIdentityIssueAccessTokenResponse>;
|
40
|
+
}
|
41
|
+
//# sourceMappingURL=communicationIdentityOperations.d.ts.map
|
package/dist/commonjs/generated/src/operationsInterfaces/communicationIdentityOperations.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"communicationIdentityOperations.d.ts","sourceRoot":"","sources":["../../../../../src/generated/src/operationsInterfaces/communicationIdentityOperations.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,yCAAyC,EACzC,mCAAmC,EACnC,yCAAyC,EACzC,qDAAqD,EACrD,+DAA+D,EAC/D,yDAAyD,EACzD,+BAA+B,EAC/B,mDAAmD,EACnD,6CAA6C,EAC9C,MAAM,oBAAoB,CAAC;AAE5B,gEAAgE;AAChE,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,MAAM,CACJ,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CAAC,mCAAmC,CAAC,CAAC;IAChD;;;;OAIG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB;;;;OAIG;IACH,kBAAkB,CAChB,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,qDAAqD,GAC9D,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB;;;;;;;;;;OAUG;IACH,4BAA4B,CAC1B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,+DAA+D,GACxE,OAAO,CAAC,yDAAyD,CAAC,CAAC;IACtE;;;;;OAKG;IACH,gBAAgB,CACd,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,+BAA+B,EAAE,EACzC,OAAO,CAAC,EAAE,mDAAmD,GAC5D,OAAO,CAAC,6CAA6C,CAAC,CAAC;CAC3D"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
4
|
+
* Licensed under the MIT License.
|
5
|
+
*
|
6
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
7
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
8
|
+
*/
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
+
//# sourceMappingURL=communicationIdentityOperations.js.map
|
package/dist/commonjs/generated/src/operationsInterfaces/communicationIdentityOperations.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"communicationIdentityOperations.js","sourceRoot":"","sources":["../../../../../src/generated/src/operationsInterfaces/communicationIdentityOperations.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n CommunicationIdentityCreateOptionalParams,\n CommunicationIdentityCreateResponse,\n CommunicationIdentityDeleteOptionalParams,\n CommunicationIdentityRevokeAccessTokensOptionalParams,\n CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams,\n CommunicationIdentityExchangeTeamsUserAccessTokenResponse,\n CommunicationIdentityTokenScope,\n CommunicationIdentityIssueAccessTokenOptionalParams,\n CommunicationIdentityIssueAccessTokenResponse\n} from \"../models/index.js\";\n\n/** Interface representing a CommunicationIdentityOperations. */\nexport interface CommunicationIdentityOperations {\n /**\n * Create a new identity, and optionally, an access token.\n * @param options The options parameters.\n */\n create(\n options?: CommunicationIdentityCreateOptionalParams\n ): Promise<CommunicationIdentityCreateResponse>;\n /**\n * Delete the identity, revoke all tokens for the identity and delete all associated data.\n * @param id Identifier of the identity to be deleted.\n * @param options The options parameters.\n */\n delete(\n id: string,\n options?: CommunicationIdentityDeleteOptionalParams\n ): Promise<void>;\n /**\n * Revoke all access tokens for the specific identity.\n * @param id Identifier of the identity.\n * @param options The options parameters.\n */\n revokeAccessTokens(\n id: string,\n options?: CommunicationIdentityRevokeAccessTokensOptionalParams\n ): Promise<void>;\n /**\n * Exchange an Azure Active Directory (Azure AD) access token of a Teams user for a new Communication\n * Identity access token with a matching expiration time.\n * @param token Azure AD access token of a Teams User to acquire a new Communication Identity access\n * token.\n * @param appId Client ID of an Azure AD application to be verified against the appid claim in the\n * Azure AD access token.\n * @param userId Object ID of an Azure AD user (Teams User) to be verified against the oid claim in the\n * Azure AD access token.\n * @param options The options parameters.\n */\n exchangeTeamsUserAccessToken(\n token: string,\n appId: string,\n userId: string,\n options?: CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams\n ): Promise<CommunicationIdentityExchangeTeamsUserAccessTokenResponse>;\n /**\n * Issue a new token for an identity.\n * @param id Identifier of the identity to issue token for.\n * @param scopes List of scopes attached to the token.\n * @param options The options parameters.\n */\n issueAccessToken(\n id: string,\n scopes: CommunicationIdentityTokenScope[],\n options?: CommunicationIdentityIssueAccessTokenOptionalParams\n ): Promise<CommunicationIdentityIssueAccessTokenResponse>;\n}\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/src/operationsInterfaces/index.ts"],"names":[],"mappings":"AAQA,cAAc,sCAAsC,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
4
|
+
* Licensed under the MIT License.
|
5
|
+
*
|
6
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
7
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
8
|
+
*/
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
+
const tslib_1 = require("tslib");
|
11
|
+
tslib_1.__exportStar(require("./communicationIdentityOperations.js"), exports);
|
12
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/src/operationsInterfaces/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,+EAAqD","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./communicationIdentityOperations.js\";\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/tracing.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,aAAa,6CAIxB,CAAC"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
4
|
+
* Licensed under the MIT License.
|
5
|
+
*
|
6
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
7
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
8
|
+
*/
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
+
exports.tracingClient = void 0;
|
11
|
+
const core_tracing_1 = require("@azure/core-tracing");
|
12
|
+
exports.tracingClient = (0, core_tracing_1.createTracingClient)({
|
13
|
+
namespace: "Microsoft.Communication",
|
14
|
+
packageName: "@azure/communication-identity",
|
15
|
+
packageVersion: "1.3.2"
|
16
|
+
});
|
17
|
+
//# sourceMappingURL=tracing.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../../src/generated/src/tracing.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,sDAA0D;AAE7C,QAAA,aAAa,GAAG,IAAA,kCAAmB,EAAC;IAC/C,SAAS,EAAE,yBAAyB;IACpC,WAAW,EAAE,+BAA+B;IAC5C,cAAc,EAAE,OAAO;CACxB,CAAC,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { createTracingClient } from \"@azure/core-tracing\";\n\nexport const tracingClient = createTracingClient({\n namespace: \"Microsoft.Communication\",\n packageName: \"@azure/communication-identity\",\n packageVersion: \"1.3.2\"\n});\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,kCAAkC,CAAC;AACjD,cAAc,aAAa,CAAC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
3
|
+
// Licensed under the MIT License.
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
5
|
+
const tslib_1 = require("tslib");
|
6
|
+
tslib_1.__exportStar(require("./communicationIdentityClient.js"), exports);
|
7
|
+
tslib_1.__exportStar(require("./models.js"), exports);
|
8
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,2EAAiD;AACjD,sDAA4B","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"./communicationIdentityClient.js\";\nexport * from \"./models.js\";\n"]}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import type { CommonClientOptions, OperationOptions } from "@azure/core-client";
|
2
|
+
import type { CommunicationUserIdentifier } from "@azure/communication-common";
|
3
|
+
/**
|
4
|
+
* Represents the scope of the token.
|
5
|
+
*/
|
6
|
+
export type TokenScope = "chat" | "voip" | "chat.join" | "chat.join.limited" | "voip.join";
|
7
|
+
/**
|
8
|
+
* Client options used to configure the CommunicationIdentity API requests.
|
9
|
+
*/
|
10
|
+
export interface CommunicationIdentityClientOptions extends CommonClientOptions {
|
11
|
+
}
|
12
|
+
/**
|
13
|
+
* The access token for a user.
|
14
|
+
*/
|
15
|
+
export interface CommunicationAccessToken {
|
16
|
+
/**
|
17
|
+
* The access token issued for the user.
|
18
|
+
*/
|
19
|
+
token: string;
|
20
|
+
/**
|
21
|
+
* The expiry time of the token.
|
22
|
+
*/
|
23
|
+
expiresOn: Date;
|
24
|
+
}
|
25
|
+
/**
|
26
|
+
* The issued token and the user it was issued for.
|
27
|
+
*/
|
28
|
+
export interface CommunicationUserToken extends CommunicationAccessToken {
|
29
|
+
/**
|
30
|
+
* Represents the user the token was issued for
|
31
|
+
*/
|
32
|
+
user: CommunicationUserIdentifier;
|
33
|
+
}
|
34
|
+
/**
|
35
|
+
* Options used to exchange an AAD access token of a Teams user for a new Communication Identity access token.
|
36
|
+
*/
|
37
|
+
export interface GetTokenForTeamsUserOptions extends OperationOptions {
|
38
|
+
/**
|
39
|
+
* Azure Active Directory access token of a Teams user.
|
40
|
+
*/
|
41
|
+
teamsUserAadToken: string;
|
42
|
+
/**
|
43
|
+
* Client ID of an Azure AD application to be verified against the appId claim in the Azure AD access token.
|
44
|
+
*/
|
45
|
+
clientId: string;
|
46
|
+
/**
|
47
|
+
* Object ID of an Azure AD user (Teams User) to be verified against the OID claim in the Azure AD access token.
|
48
|
+
*/
|
49
|
+
userObjectId: string;
|
50
|
+
}
|
51
|
+
/**
|
52
|
+
* Options to create a single user and a token simultaneously.
|
53
|
+
*/
|
54
|
+
export declare interface CreateUserAndTokenOptions extends OperationOptions {
|
55
|
+
/** 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. */
|
56
|
+
tokenExpiresInMinutes?: number;
|
57
|
+
}
|
58
|
+
/**
|
59
|
+
* Options to create a scoped user token.
|
60
|
+
*/
|
61
|
+
export declare interface GetTokenOptions extends OperationOptions {
|
62
|
+
/** 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. */
|
63
|
+
tokenExpiresInMinutes?: number;
|
64
|
+
}
|
65
|
+
//# sourceMappingURL=models.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,mBAAmB,GAAG,WAAW,CAAC;AAE3F;;GAEG;AACH,MAAM,WAAW,kCAAmC,SAAQ,mBAAmB;CAAG;AAElF;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,wBAAwB;IACtE;;OAEG;IACH,IAAI,EAAE,2BAA2B,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB;IACnE;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,WAAW,yBAA0B,SAAQ,gBAAgB;IACzE,+JAA+J;IAC/J,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,WAAW,eAAgB,SAAQ,gBAAgB;IAC/D,+JAA+J;IAC/J,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport type { CommunicationUserIdentifier } from \"@azure/communication-common\";\n\n/**\n * Represents the scope of the token.\n */\nexport type TokenScope = \"chat\" | \"voip\" | \"chat.join\" | \"chat.join.limited\" | \"voip.join\";\n\n/**\n * Client options used to configure the CommunicationIdentity API requests.\n */\nexport interface CommunicationIdentityClientOptions extends CommonClientOptions {}\n\n/**\n * The access token for a user.\n */\nexport interface CommunicationAccessToken {\n /**\n * The access token issued for the user.\n */\n token: string;\n /**\n * The expiry time of the token.\n */\n expiresOn: Date;\n}\n\n/**\n * The issued token and the user it was issued for.\n */\nexport interface CommunicationUserToken extends CommunicationAccessToken {\n /**\n * Represents the user the token was issued for\n */\n user: CommunicationUserIdentifier;\n}\n\n/**\n * Options used to exchange an AAD access token of a Teams user for a new Communication Identity access token.\n */\nexport interface GetTokenForTeamsUserOptions extends OperationOptions {\n /**\n * Azure Active Directory access token of a Teams user.\n */\n teamsUserAadToken: string;\n\n /**\n * Client ID of an Azure AD application to be verified against the appId claim in the Azure AD access token.\n */\n clientId: string;\n\n /**\n * Object ID of an Azure AD user (Teams User) to be verified against the OID claim in the Azure AD access token.\n */\n userObjectId: string;\n}\n\n/**\n * Options to create a single user and a token simultaneously.\n */\nexport declare interface CreateUserAndTokenOptions extends OperationOptions {\n /** 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. */\n tokenExpiresInMinutes?: number;\n}\n\n/**\n * Options to create a scoped user token.\n */\nexport declare interface GetTokenOptions extends OperationOptions {\n /** 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. */\n tokenExpiresInMinutes?: number;\n}\n"]}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
3
|
+
{
|
4
|
+
"tsdocVersion": "0.12",
|
5
|
+
"toolPackages": [
|
6
|
+
{
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
8
|
+
"packageVersion": "7.47.11"
|
9
|
+
}
|
10
|
+
]
|
11
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/common/logger.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,MAAM,qCAA+C,CAAC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT License.
|
3
|
+
import { createClientLogger } from "@azure/logger";
|
4
|
+
/**
|
5
|
+
* The \@azure/logger configuration for this package.
|
6
|
+
*/
|
7
|
+
export const logger = createClientLogger("communication-identity");
|
8
|
+
//# sourceMappingURL=logger.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/common/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,wBAAwB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\n\n/**\n * The \\@azure/logger configuration for this package.\n */\nexport const logger = createClientLogger(\"communication-identity\");\n"]}
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import type { CommunicationAccessToken, CommunicationIdentityClientOptions, CommunicationUserToken, GetTokenForTeamsUserOptions, CreateUserAndTokenOptions, GetTokenOptions, TokenScope } from "./models.js";
|
2
|
+
import type { CommunicationUserIdentifier } from "@azure/communication-common";
|
3
|
+
import type { OperationOptions } from "@azure/core-client";
|
4
|
+
import type { KeyCredential, TokenCredential } from "@azure/core-auth";
|
5
|
+
/**
|
6
|
+
* Client class for interacting with Azure Communication Services User Token Management.
|
7
|
+
*/
|
8
|
+
export declare class CommunicationIdentityClient {
|
9
|
+
/**
|
10
|
+
* A reference to the auto-generated UserToken HTTP client.
|
11
|
+
*/
|
12
|
+
private readonly client;
|
13
|
+
/**
|
14
|
+
* Initializes a new instance of the CommunicationIdentity class.
|
15
|
+
* @param connectionString - Connection string to connect to an Azure Communication Service resource.
|
16
|
+
* Example: "endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret";
|
17
|
+
* @param options - Optional. Options to configure the HTTP pipeline.
|
18
|
+
*/
|
19
|
+
constructor(connectionString: string, options?: CommunicationIdentityClientOptions);
|
20
|
+
/**
|
21
|
+
* Initializes a new instance of the CommunicationIdentity class using an Azure KeyCredential.
|
22
|
+
* @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).
|
23
|
+
* @param credential - An object that is used to authenticate requests to the service. Use the AzureKeyCredential or `@azure/identity` to create a credential.
|
24
|
+
* @param options - Optional. Options to configure the HTTP pipeline.
|
25
|
+
*/
|
26
|
+
constructor(endpoint: string, credential: KeyCredential, options?: CommunicationIdentityClientOptions);
|
27
|
+
/**
|
28
|
+
* Initializes a new instance of the CommunicationIdentity class using a TokenCredential.
|
29
|
+
* @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net)
|
30
|
+
* @param credential - TokenCredential that is used to authenticate requests to the service.
|
31
|
+
* @param options - Optional. Options to configure the HTTP pipeline.
|
32
|
+
*/
|
33
|
+
constructor(endpoint: string, credential: TokenCredential, options?: CommunicationIdentityClientOptions);
|
34
|
+
/**
|
35
|
+
* Creates a scoped user token.
|
36
|
+
*
|
37
|
+
* @param user - The user whose tokens are being issued.
|
38
|
+
* @param scopes - Scopes to include in the token.
|
39
|
+
* @param options - Additional options for the request.
|
40
|
+
*/
|
41
|
+
getToken(user: CommunicationUserIdentifier, scopes: TokenScope[], options?: GetTokenOptions): Promise<CommunicationAccessToken>;
|
42
|
+
/**
|
43
|
+
* Revokes all data and tokens created for a user.
|
44
|
+
*
|
45
|
+
* @param user - The user whose tokens are being revoked.
|
46
|
+
* @param options - Additional options for the request.
|
47
|
+
*/
|
48
|
+
revokeTokens(user: CommunicationUserIdentifier, options?: OperationOptions): Promise<void>;
|
49
|
+
/**
|
50
|
+
* Creates a single user.
|
51
|
+
*
|
52
|
+
* @param options - Additional options for the request.
|
53
|
+
*/
|
54
|
+
createUser(options?: OperationOptions): Promise<CommunicationUserIdentifier>;
|
55
|
+
/**
|
56
|
+
* Creates a single user and a token simultaneously.
|
57
|
+
*
|
58
|
+
* @param scopes - Scopes to include in the token.
|
59
|
+
* @param options - Additional options for the request.
|
60
|
+
*/
|
61
|
+
createUserAndToken(scopes: TokenScope[], options?: CreateUserAndTokenOptions): Promise<CommunicationUserToken>;
|
62
|
+
/**
|
63
|
+
* Triggers revocation event for user and deletes all its data.
|
64
|
+
*
|
65
|
+
* @param user - The user being deleted.
|
66
|
+
* @param options - Additional options for the request.
|
67
|
+
*/
|
68
|
+
deleteUser(user: CommunicationUserIdentifier, options?: OperationOptions): Promise<void>;
|
69
|
+
/**
|
70
|
+
* Exchanges an Azure AD access token of a Teams user for a new Communication Identity access token with a matching expiration time.
|
71
|
+
*
|
72
|
+
* @param options - Options used to exchange an Azure AD access token of a Teams user for a new Communication Identity access token.
|
73
|
+
*/
|
74
|
+
getTokenForTeamsUser(options: GetTokenForTeamsUserOptions): Promise<CommunicationAccessToken>;
|
75
|
+
}
|
76
|
+
//# sourceMappingURL=communicationIdentityClient.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"communicationIdentityClient.d.ts","sourceRoot":"","sources":["../../src/communicationIdentityClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,wBAAwB,EACxB,kCAAkC,EAClC,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,eAAe,EACf,UAAU,EACX,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAA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