@azure-tools/communication-recipient-verification 1.0.0-alpha.20241119.1 → 1.0.0-alpha.20241122.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +661 -0
- package/dist/index.js.map +1 -0
- package/{dist/esm → dist-esm/src}/generated/src/index.js +3 -3
- package/dist-esm/src/generated/src/index.js.map +1 -0
- package/{dist/browser → dist-esm/src}/generated/src/models/parameters.js +1 -1
- package/{dist/esm → dist-esm/src}/generated/src/models/parameters.js.map +1 -1
- package/{dist/esm → dist-esm/src}/generated/src/operations/acsVerificationOperations.js +3 -3
- package/dist-esm/src/generated/src/operations/acsVerificationOperations.js.map +1 -0
- package/{dist/esm/generated/src/models → dist-esm/src/generated/src/operations}/index.js +1 -1
- package/{dist/esm → dist-esm/src}/generated/src/operations/index.js.map +1 -1
- package/dist-esm/src/generated/src/operationsInterfaces/acsVerificationOperations.js.map +1 -0
- package/{dist/react-native/generated/src/models → dist-esm/src/generated/src/operationsInterfaces}/index.js +1 -1
- package/{dist/react-native → dist-esm/src}/generated/src/operationsInterfaces/index.js.map +1 -1
- package/{dist/react-native → dist-esm/src}/generated/src/recipientVerificationClient.js +1 -1
- package/dist-esm/src/generated/src/recipientVerificationClient.js.map +1 -0
- package/dist-esm/src/index.js +6 -0
- package/dist-esm/src/index.js.map +1 -0
- package/{dist/esm → dist-esm/src}/mappers.js +5 -5
- package/dist-esm/src/mappers.js.map +1 -0
- package/{dist/browser → dist-esm/src}/models.js.map +1 -1
- package/{dist/esm → dist-esm/src}/recipientVerificationClient.js +3 -3
- package/dist-esm/src/recipientVerificationClient.js.map +1 -0
- package/dist-esm/src/utils/index.js +5 -0
- package/dist-esm/src/utils/index.js.map +1 -0
- package/package.json +37 -57
- package/dist/browser/generated/src/index.d.ts +0 -4
- package/dist/browser/generated/src/index.d.ts.map +0 -1
- package/dist/browser/generated/src/index.js +0 -11
- package/dist/browser/generated/src/index.js.map +0 -1
- package/dist/browser/generated/src/models/index.d.ts +0 -112
- package/dist/browser/generated/src/models/index.d.ts.map +0 -1
- package/dist/browser/generated/src/models/mappers.d.ts +0 -9
- package/dist/browser/generated/src/models/mappers.d.ts.map +0 -1
- package/dist/browser/generated/src/models/parameters.d.ts +0 -10
- package/dist/browser/generated/src/models/parameters.d.ts.map +0 -1
- package/dist/browser/generated/src/models/parameters.js.map +0 -1
- package/dist/browser/generated/src/operations/acsVerificationOperations.d.ts +0 -40
- package/dist/browser/generated/src/operations/acsVerificationOperations.d.ts.map +0 -1
- package/dist/browser/generated/src/operations/acsVerificationOperations.js +0 -167
- package/dist/browser/generated/src/operations/acsVerificationOperations.js.map +0 -1
- package/dist/browser/generated/src/operations/index.d.ts +0 -2
- package/dist/browser/generated/src/operations/index.d.ts.map +0 -1
- package/dist/browser/generated/src/operations/index.js +0 -9
- package/dist/browser/generated/src/operations/index.js.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/acsVerificationOperations.d.ts +0 -32
- package/dist/browser/generated/src/operationsInterfaces/acsVerificationOperations.d.ts.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/acsVerificationOperations.js.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts +0 -2
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/index.js +0 -9
- package/dist/browser/generated/src/operationsInterfaces/index.js.map +0 -1
- package/dist/browser/generated/src/recipientVerificationClient.d.ts +0 -17
- package/dist/browser/generated/src/recipientVerificationClient.d.ts.map +0 -1
- package/dist/browser/generated/src/recipientVerificationClient.js +0 -86
- package/dist/browser/generated/src/recipientVerificationClient.js.map +0 -1
- package/dist/browser/generated/src/tracing.d.ts +0 -2
- package/dist/browser/generated/src/tracing.d.ts.map +0 -1
- package/dist/browser/index.d.ts +0 -4
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.js +0 -6
- package/dist/browser/index.js.map +0 -1
- package/dist/browser/mappers.d.ts +0 -6
- package/dist/browser/mappers.d.ts.map +0 -1
- package/dist/browser/mappers.js +0 -8
- package/dist/browser/mappers.js.map +0 -1
- package/dist/browser/models.d.ts +0 -2
- package/dist/browser/models.d.ts.map +0 -1
- package/dist/browser/package.json +0 -3
- package/dist/browser/recipientVerificationClient.d.ts +0 -74
- package/dist/browser/recipientVerificationClient.d.ts.map +0 -1
- package/dist/browser/recipientVerificationClient.js +0 -82
- package/dist/browser/recipientVerificationClient.js.map +0 -1
- package/dist/browser/utils/constants.d.ts +0 -2
- package/dist/browser/utils/constants.d.ts.map +0 -1
- package/dist/browser/utils/index.d.ts +0 -3
- package/dist/browser/utils/index.d.ts.map +0 -1
- package/dist/browser/utils/index.js +0 -5
- package/dist/browser/utils/index.js.map +0 -1
- package/dist/browser/utils/logger.d.ts +0 -5
- package/dist/browser/utils/logger.d.ts.map +0 -1
- package/dist/commonjs/generated/src/index.d.ts +0 -4
- package/dist/commonjs/generated/src/index.d.ts.map +0 -1
- package/dist/commonjs/generated/src/index.js +0 -16
- package/dist/commonjs/generated/src/index.js.map +0 -1
- package/dist/commonjs/generated/src/models/index.d.ts +0 -112
- package/dist/commonjs/generated/src/models/index.d.ts.map +0 -1
- package/dist/commonjs/generated/src/models/index.js +0 -10
- package/dist/commonjs/generated/src/models/index.js.map +0 -1
- package/dist/commonjs/generated/src/models/mappers.d.ts +0 -9
- package/dist/commonjs/generated/src/models/mappers.d.ts.map +0 -1
- package/dist/commonjs/generated/src/models/mappers.js +0 -211
- package/dist/commonjs/generated/src/models/mappers.js.map +0 -1
- package/dist/commonjs/generated/src/models/parameters.d.ts +0 -10
- package/dist/commonjs/generated/src/models/parameters.d.ts.map +0 -1
- package/dist/commonjs/generated/src/models/parameters.js +0 -78
- package/dist/commonjs/generated/src/models/parameters.js.map +0 -1
- package/dist/commonjs/generated/src/operations/acsVerificationOperations.d.ts +0 -40
- package/dist/commonjs/generated/src/operations/acsVerificationOperations.d.ts.map +0 -1
- package/dist/commonjs/generated/src/operations/acsVerificationOperations.js +0 -172
- package/dist/commonjs/generated/src/operations/acsVerificationOperations.js.map +0 -1
- package/dist/commonjs/generated/src/operations/index.d.ts +0 -2
- package/dist/commonjs/generated/src/operations/index.d.ts.map +0 -1
- package/dist/commonjs/generated/src/operations/index.js +0 -12
- package/dist/commonjs/generated/src/operations/index.js.map +0 -1
- package/dist/commonjs/generated/src/operationsInterfaces/acsVerificationOperations.d.ts +0 -32
- package/dist/commonjs/generated/src/operationsInterfaces/acsVerificationOperations.d.ts.map +0 -1
- package/dist/commonjs/generated/src/operationsInterfaces/acsVerificationOperations.js +0 -10
- package/dist/commonjs/generated/src/operationsInterfaces/acsVerificationOperations.js.map +0 -1
- package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts +0 -2
- package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts.map +0 -1
- package/dist/commonjs/generated/src/operationsInterfaces/index.js +0 -12
- package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +0 -1
- package/dist/commonjs/generated/src/recipientVerificationClient.d.ts +0 -17
- package/dist/commonjs/generated/src/recipientVerificationClient.d.ts.map +0 -1
- package/dist/commonjs/generated/src/recipientVerificationClient.js +0 -91
- package/dist/commonjs/generated/src/recipientVerificationClient.js.map +0 -1
- package/dist/commonjs/generated/src/tracing.d.ts +0 -2
- package/dist/commonjs/generated/src/tracing.d.ts.map +0 -1
- package/dist/commonjs/generated/src/tracing.js +0 -17
- package/dist/commonjs/generated/src/tracing.js.map +0 -1
- package/dist/commonjs/index.d.ts +0 -4
- package/dist/commonjs/index.d.ts.map +0 -1
- package/dist/commonjs/index.js +0 -9
- package/dist/commonjs/index.js.map +0 -1
- package/dist/commonjs/mappers.d.ts +0 -6
- package/dist/commonjs/mappers.d.ts.map +0 -1
- package/dist/commonjs/mappers.js +0 -16
- package/dist/commonjs/mappers.js.map +0 -1
- package/dist/commonjs/models.d.ts +0 -2
- package/dist/commonjs/models.d.ts.map +0 -1
- package/dist/commonjs/models.js +0 -5
- package/dist/commonjs/models.js.map +0 -1
- package/dist/commonjs/package.json +0 -3
- package/dist/commonjs/recipientVerificationClient.d.ts +0 -74
- package/dist/commonjs/recipientVerificationClient.d.ts.map +0 -1
- package/dist/commonjs/recipientVerificationClient.js +0 -86
- package/dist/commonjs/recipientVerificationClient.js.map +0 -1
- package/dist/commonjs/tsdoc-metadata.json +0 -11
- package/dist/commonjs/utils/constants.d.ts +0 -2
- package/dist/commonjs/utils/constants.d.ts.map +0 -1
- package/dist/commonjs/utils/constants.js +0 -7
- package/dist/commonjs/utils/constants.js.map +0 -1
- package/dist/commonjs/utils/index.d.ts +0 -3
- package/dist/commonjs/utils/index.d.ts.map +0 -1
- package/dist/commonjs/utils/index.js +0 -8
- package/dist/commonjs/utils/index.js.map +0 -1
- package/dist/commonjs/utils/logger.d.ts +0 -5
- package/dist/commonjs/utils/logger.d.ts.map +0 -1
- package/dist/commonjs/utils/logger.js +0 -11
- package/dist/commonjs/utils/logger.js.map +0 -1
- package/dist/esm/generated/src/index.d.ts +0 -4
- package/dist/esm/generated/src/index.d.ts.map +0 -1
- package/dist/esm/generated/src/index.js.map +0 -1
- package/dist/esm/generated/src/models/index.d.ts +0 -112
- package/dist/esm/generated/src/models/index.d.ts.map +0 -1
- package/dist/esm/generated/src/models/index.js.map +0 -1
- package/dist/esm/generated/src/models/mappers.d.ts +0 -9
- package/dist/esm/generated/src/models/mappers.d.ts.map +0 -1
- package/dist/esm/generated/src/models/mappers.js +0 -208
- package/dist/esm/generated/src/models/mappers.js.map +0 -1
- package/dist/esm/generated/src/models/parameters.d.ts +0 -10
- package/dist/esm/generated/src/models/parameters.d.ts.map +0 -1
- package/dist/esm/generated/src/models/parameters.js +0 -75
- package/dist/esm/generated/src/operations/acsVerificationOperations.d.ts +0 -40
- package/dist/esm/generated/src/operations/acsVerificationOperations.d.ts.map +0 -1
- package/dist/esm/generated/src/operations/acsVerificationOperations.js.map +0 -1
- package/dist/esm/generated/src/operations/index.d.ts +0 -2
- package/dist/esm/generated/src/operations/index.d.ts.map +0 -1
- package/dist/esm/generated/src/operations/index.js +0 -9
- package/dist/esm/generated/src/operationsInterfaces/acsVerificationOperations.d.ts +0 -32
- package/dist/esm/generated/src/operationsInterfaces/acsVerificationOperations.d.ts.map +0 -1
- package/dist/esm/generated/src/operationsInterfaces/acsVerificationOperations.js +0 -9
- package/dist/esm/generated/src/operationsInterfaces/acsVerificationOperations.js.map +0 -1
- package/dist/esm/generated/src/operationsInterfaces/index.d.ts +0 -2
- package/dist/esm/generated/src/operationsInterfaces/index.d.ts.map +0 -1
- package/dist/esm/generated/src/operationsInterfaces/index.js +0 -9
- package/dist/esm/generated/src/operationsInterfaces/index.js.map +0 -1
- package/dist/esm/generated/src/recipientVerificationClient.d.ts +0 -17
- package/dist/esm/generated/src/recipientVerificationClient.d.ts.map +0 -1
- package/dist/esm/generated/src/recipientVerificationClient.js +0 -86
- package/dist/esm/generated/src/recipientVerificationClient.js.map +0 -1
- package/dist/esm/generated/src/tracing.d.ts +0 -2
- package/dist/esm/generated/src/tracing.d.ts.map +0 -1
- package/dist/esm/generated/src/tracing.js +0 -14
- package/dist/esm/generated/src/tracing.js.map +0 -1
- package/dist/esm/index.d.ts +0 -4
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/index.js +0 -6
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/mappers.d.ts +0 -6
- package/dist/esm/mappers.d.ts.map +0 -1
- package/dist/esm/mappers.js.map +0 -1
- package/dist/esm/models.d.ts +0 -2
- package/dist/esm/models.d.ts.map +0 -1
- package/dist/esm/models.js +0 -4
- package/dist/esm/models.js.map +0 -1
- package/dist/esm/package.json +0 -3
- package/dist/esm/recipientVerificationClient.d.ts +0 -74
- package/dist/esm/recipientVerificationClient.d.ts.map +0 -1
- package/dist/esm/recipientVerificationClient.js.map +0 -1
- package/dist/esm/utils/constants.d.ts +0 -2
- package/dist/esm/utils/constants.d.ts.map +0 -1
- package/dist/esm/utils/constants.js +0 -4
- package/dist/esm/utils/constants.js.map +0 -1
- package/dist/esm/utils/index.d.ts +0 -3
- package/dist/esm/utils/index.d.ts.map +0 -1
- package/dist/esm/utils/index.js +0 -5
- package/dist/esm/utils/index.js.map +0 -1
- package/dist/esm/utils/logger.d.ts +0 -5
- package/dist/esm/utils/logger.d.ts.map +0 -1
- package/dist/esm/utils/logger.js +0 -8
- package/dist/esm/utils/logger.js.map +0 -1
- package/dist/react-native/generated/src/index.d.ts +0 -4
- package/dist/react-native/generated/src/index.d.ts.map +0 -1
- package/dist/react-native/generated/src/index.js +0 -11
- package/dist/react-native/generated/src/index.js.map +0 -1
- package/dist/react-native/generated/src/models/index.d.ts +0 -112
- package/dist/react-native/generated/src/models/index.d.ts.map +0 -1
- package/dist/react-native/generated/src/models/index.js.map +0 -1
- package/dist/react-native/generated/src/models/mappers.d.ts +0 -9
- package/dist/react-native/generated/src/models/mappers.d.ts.map +0 -1
- package/dist/react-native/generated/src/models/mappers.js +0 -208
- package/dist/react-native/generated/src/models/mappers.js.map +0 -1
- package/dist/react-native/generated/src/models/parameters.d.ts +0 -10
- package/dist/react-native/generated/src/models/parameters.d.ts.map +0 -1
- package/dist/react-native/generated/src/models/parameters.js +0 -75
- package/dist/react-native/generated/src/models/parameters.js.map +0 -1
- package/dist/react-native/generated/src/operations/acsVerificationOperations.d.ts +0 -40
- package/dist/react-native/generated/src/operations/acsVerificationOperations.d.ts.map +0 -1
- package/dist/react-native/generated/src/operations/acsVerificationOperations.js +0 -167
- package/dist/react-native/generated/src/operations/acsVerificationOperations.js.map +0 -1
- package/dist/react-native/generated/src/operations/index.d.ts +0 -2
- package/dist/react-native/generated/src/operations/index.d.ts.map +0 -1
- package/dist/react-native/generated/src/operations/index.js +0 -9
- package/dist/react-native/generated/src/operations/index.js.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/acsVerificationOperations.d.ts +0 -32
- package/dist/react-native/generated/src/operationsInterfaces/acsVerificationOperations.d.ts.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/acsVerificationOperations.js +0 -9
- package/dist/react-native/generated/src/operationsInterfaces/acsVerificationOperations.js.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts +0 -2
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/index.js +0 -9
- package/dist/react-native/generated/src/recipientVerificationClient.d.ts +0 -17
- package/dist/react-native/generated/src/recipientVerificationClient.d.ts.map +0 -1
- package/dist/react-native/generated/src/recipientVerificationClient.js.map +0 -1
- package/dist/react-native/generated/src/tracing.d.ts +0 -2
- package/dist/react-native/generated/src/tracing.d.ts.map +0 -1
- package/dist/react-native/generated/src/tracing.js +0 -14
- package/dist/react-native/generated/src/tracing.js.map +0 -1
- package/dist/react-native/index.d.ts +0 -4
- package/dist/react-native/index.d.ts.map +0 -1
- package/dist/react-native/index.js +0 -6
- package/dist/react-native/index.js.map +0 -1
- package/dist/react-native/mappers.d.ts +0 -6
- package/dist/react-native/mappers.d.ts.map +0 -1
- package/dist/react-native/mappers.js +0 -8
- package/dist/react-native/mappers.js.map +0 -1
- package/dist/react-native/models.d.ts +0 -2
- package/dist/react-native/models.d.ts.map +0 -1
- package/dist/react-native/models.js +0 -4
- package/dist/react-native/models.js.map +0 -1
- package/dist/react-native/package.json +0 -3
- package/dist/react-native/recipientVerificationClient.d.ts +0 -74
- package/dist/react-native/recipientVerificationClient.d.ts.map +0 -1
- package/dist/react-native/recipientVerificationClient.js +0 -82
- package/dist/react-native/recipientVerificationClient.js.map +0 -1
- package/dist/react-native/utils/constants.d.ts +0 -2
- package/dist/react-native/utils/constants.d.ts.map +0 -1
- package/dist/react-native/utils/constants.js +0 -4
- package/dist/react-native/utils/constants.js.map +0 -1
- package/dist/react-native/utils/index.d.ts +0 -3
- package/dist/react-native/utils/index.d.ts.map +0 -1
- package/dist/react-native/utils/index.js +0 -5
- package/dist/react-native/utils/index.js.map +0 -1
- package/dist/react-native/utils/logger.d.ts +0 -5
- package/dist/react-native/utils/logger.d.ts.map +0 -1
- package/dist/react-native/utils/logger.js +0 -8
- package/dist/react-native/utils/logger.js.map +0 -1
- /package/{dist/browser → dist-esm/src}/generated/src/models/index.js +0 -0
- /package/{dist/browser → dist-esm/src}/generated/src/models/index.js.map +0 -0
- /package/{dist/browser → dist-esm/src}/generated/src/models/mappers.js +0 -0
- /package/{dist/browser → dist-esm/src}/generated/src/models/mappers.js.map +0 -0
- /package/{dist/browser → dist-esm/src}/generated/src/operationsInterfaces/acsVerificationOperations.js +0 -0
- /package/{dist/browser → dist-esm/src}/generated/src/tracing.js +0 -0
- /package/{dist/browser → dist-esm/src}/generated/src/tracing.js.map +0 -0
- /package/{dist/browser → dist-esm/src}/models.js +0 -0
- /package/{dist/browser → dist-esm/src}/utils/constants.js +0 -0
- /package/{dist/browser → dist-esm/src}/utils/constants.js.map +0 -0
- /package/{dist/browser → dist-esm/src}/utils/logger.js +0 -0
- /package/{dist/browser → dist-esm/src}/utils/logger.js.map +0 -0
- /package/{dist → types}/communication-recipient-verification.d.ts +0 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,661 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var coreAuth = require('@azure/core-auth');
|
|
6
|
+
var communicationCommon = require('@azure/communication-common');
|
|
7
|
+
var coreTracing = require('@azure/core-tracing');
|
|
8
|
+
var logger$1 = require('@azure/logger');
|
|
9
|
+
var coreClient = require('@azure/core-client');
|
|
10
|
+
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
11
|
+
|
|
12
|
+
function _interopNamespaceDefault(e) {
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var coreClient__namespace = /*#__PURE__*/_interopNamespaceDefault(coreClient);
|
|
30
|
+
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespaceDefault(coreRestPipeline);
|
|
31
|
+
|
|
32
|
+
/*
|
|
33
|
+
* Copyright (c) Microsoft Corporation.
|
|
34
|
+
* Licensed under the MIT License.
|
|
35
|
+
*
|
|
36
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
37
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
38
|
+
*/
|
|
39
|
+
const AcsVerification = {
|
|
40
|
+
type: {
|
|
41
|
+
name: "Composite",
|
|
42
|
+
className: "AcsVerification",
|
|
43
|
+
modelProperties: {
|
|
44
|
+
immutableId: {
|
|
45
|
+
serializedName: "ImmutableId",
|
|
46
|
+
type: {
|
|
47
|
+
name: "String"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
verificationId: {
|
|
51
|
+
serializedName: "VerificationId",
|
|
52
|
+
type: {
|
|
53
|
+
name: "String"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
status: {
|
|
57
|
+
serializedName: "Status",
|
|
58
|
+
type: {
|
|
59
|
+
name: "String"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
subscriptionId: {
|
|
63
|
+
serializedName: "SubscriptionId",
|
|
64
|
+
type: {
|
|
65
|
+
name: "String"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
identity: {
|
|
69
|
+
serializedName: "Identity",
|
|
70
|
+
type: {
|
|
71
|
+
name: "String"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
challengeId: {
|
|
75
|
+
serializedName: "ChallengeId",
|
|
76
|
+
type: {
|
|
77
|
+
name: "String"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
retries: {
|
|
81
|
+
serializedName: "Retries",
|
|
82
|
+
type: {
|
|
83
|
+
name: "Number"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
attempts: {
|
|
87
|
+
serializedName: "Attempts",
|
|
88
|
+
type: {
|
|
89
|
+
name: "Number"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
const CommunicationErrorResponse = {
|
|
96
|
+
type: {
|
|
97
|
+
name: "Composite",
|
|
98
|
+
className: "CommunicationErrorResponse",
|
|
99
|
+
modelProperties: {
|
|
100
|
+
error: {
|
|
101
|
+
serializedName: "error",
|
|
102
|
+
type: {
|
|
103
|
+
name: "Composite",
|
|
104
|
+
className: "CommunicationError"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
const CommunicationError = {
|
|
111
|
+
type: {
|
|
112
|
+
name: "Composite",
|
|
113
|
+
className: "CommunicationError",
|
|
114
|
+
modelProperties: {
|
|
115
|
+
code: {
|
|
116
|
+
serializedName: "code",
|
|
117
|
+
required: true,
|
|
118
|
+
type: {
|
|
119
|
+
name: "String"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
message: {
|
|
123
|
+
serializedName: "message",
|
|
124
|
+
required: true,
|
|
125
|
+
type: {
|
|
126
|
+
name: "String"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
target: {
|
|
130
|
+
serializedName: "target",
|
|
131
|
+
readOnly: true,
|
|
132
|
+
type: {
|
|
133
|
+
name: "String"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
details: {
|
|
137
|
+
serializedName: "details",
|
|
138
|
+
readOnly: true,
|
|
139
|
+
type: {
|
|
140
|
+
name: "Sequence",
|
|
141
|
+
element: {
|
|
142
|
+
type: {
|
|
143
|
+
name: "Composite",
|
|
144
|
+
className: "CommunicationError"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
innerError: {
|
|
150
|
+
serializedName: "innererror",
|
|
151
|
+
type: {
|
|
152
|
+
name: "Composite",
|
|
153
|
+
className: "CommunicationError"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
const VerificationRequest = {
|
|
160
|
+
type: {
|
|
161
|
+
name: "Composite",
|
|
162
|
+
className: "VerificationRequest",
|
|
163
|
+
modelProperties: {
|
|
164
|
+
identity: {
|
|
165
|
+
serializedName: "Identity",
|
|
166
|
+
type: {
|
|
167
|
+
name: "String"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
channel: {
|
|
171
|
+
serializedName: "Channel",
|
|
172
|
+
type: {
|
|
173
|
+
name: "String"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
const VerificationResponse = {
|
|
180
|
+
type: {
|
|
181
|
+
name: "Composite",
|
|
182
|
+
className: "VerificationResponse",
|
|
183
|
+
modelProperties: {
|
|
184
|
+
verificationId: {
|
|
185
|
+
serializedName: "VerificationId",
|
|
186
|
+
type: {
|
|
187
|
+
name: "String"
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
isVerified: {
|
|
191
|
+
serializedName: "IsVerified",
|
|
192
|
+
type: {
|
|
193
|
+
name: "Boolean"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
const VerificationCodeRequest = {
|
|
200
|
+
type: {
|
|
201
|
+
name: "Composite",
|
|
202
|
+
className: "VerificationCodeRequest",
|
|
203
|
+
modelProperties: {
|
|
204
|
+
verificationCode: {
|
|
205
|
+
serializedName: "VerificationCode",
|
|
206
|
+
type: {
|
|
207
|
+
name: "String"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
const VerificationConstantsResponse = {
|
|
214
|
+
type: {
|
|
215
|
+
name: "Composite",
|
|
216
|
+
className: "VerificationConstantsResponse",
|
|
217
|
+
modelProperties: {
|
|
218
|
+
maxRetriesAllowed: {
|
|
219
|
+
serializedName: "MaxRetriesAllowed",
|
|
220
|
+
type: {
|
|
221
|
+
name: "Number"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
maxVerificationsAllowed: {
|
|
225
|
+
serializedName: "MaxVerificationsAllowed",
|
|
226
|
+
type: {
|
|
227
|
+
name: "Number"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
currentNumberOfVerifications: {
|
|
231
|
+
serializedName: "CurrentNumberOfVerifications",
|
|
232
|
+
type: {
|
|
233
|
+
name: "Number"
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
var Mappers = /*#__PURE__*/Object.freeze({
|
|
241
|
+
__proto__: null,
|
|
242
|
+
AcsVerification: AcsVerification,
|
|
243
|
+
CommunicationError: CommunicationError,
|
|
244
|
+
CommunicationErrorResponse: CommunicationErrorResponse,
|
|
245
|
+
VerificationCodeRequest: VerificationCodeRequest,
|
|
246
|
+
VerificationConstantsResponse: VerificationConstantsResponse,
|
|
247
|
+
VerificationRequest: VerificationRequest,
|
|
248
|
+
VerificationResponse: VerificationResponse
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
/*
|
|
252
|
+
* Copyright (c) Microsoft Corporation.
|
|
253
|
+
* Licensed under the MIT License.
|
|
254
|
+
*
|
|
255
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
256
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
257
|
+
*/
|
|
258
|
+
const tracingClient = coreTracing.createTracingClient({
|
|
259
|
+
namespace: "Microsoft.Communication",
|
|
260
|
+
packageName: "@azure/communication-recipient-verification",
|
|
261
|
+
packageVersion: "1.0.0-beta.1"
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
/*
|
|
265
|
+
* Copyright (c) Microsoft Corporation.
|
|
266
|
+
* Licensed under the MIT License.
|
|
267
|
+
*
|
|
268
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
269
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
270
|
+
*/
|
|
271
|
+
const accept = {
|
|
272
|
+
parameterPath: "accept",
|
|
273
|
+
mapper: {
|
|
274
|
+
defaultValue: "application/json",
|
|
275
|
+
isConstant: true,
|
|
276
|
+
serializedName: "Accept",
|
|
277
|
+
type: {
|
|
278
|
+
name: "String"
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
const endpoint = {
|
|
283
|
+
parameterPath: "endpoint",
|
|
284
|
+
mapper: {
|
|
285
|
+
serializedName: "endpoint",
|
|
286
|
+
required: true,
|
|
287
|
+
type: {
|
|
288
|
+
name: "String"
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
skipEncoding: true
|
|
292
|
+
};
|
|
293
|
+
const apiVersion = {
|
|
294
|
+
parameterPath: "apiVersion",
|
|
295
|
+
mapper: {
|
|
296
|
+
defaultValue: "2022-11-15",
|
|
297
|
+
isConstant: true,
|
|
298
|
+
serializedName: "api-version",
|
|
299
|
+
type: {
|
|
300
|
+
name: "String"
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
const contentType = {
|
|
305
|
+
parameterPath: ["options", "contentType"],
|
|
306
|
+
mapper: {
|
|
307
|
+
defaultValue: "application/json",
|
|
308
|
+
isConstant: true,
|
|
309
|
+
serializedName: "Content-Type",
|
|
310
|
+
type: {
|
|
311
|
+
name: "String"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
const verificationId = {
|
|
316
|
+
parameterPath: "verificationId",
|
|
317
|
+
mapper: {
|
|
318
|
+
serializedName: "verificationId",
|
|
319
|
+
required: true,
|
|
320
|
+
type: {
|
|
321
|
+
name: "Uuid"
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
/*
|
|
327
|
+
* Copyright (c) Microsoft Corporation.
|
|
328
|
+
* Licensed under the MIT License.
|
|
329
|
+
*
|
|
330
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
331
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
332
|
+
*/
|
|
333
|
+
/** Class containing AcsVerificationOperations operations. */
|
|
334
|
+
class AcsVerificationOperationsImpl {
|
|
335
|
+
/**
|
|
336
|
+
* Initialize a new instance of the class AcsVerificationOperations class.
|
|
337
|
+
* @param client Reference to the service client
|
|
338
|
+
*/
|
|
339
|
+
constructor(client) {
|
|
340
|
+
this.client = client;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Gets the array of verified phone numbers for the current resource.
|
|
344
|
+
* @param options The options parameters.
|
|
345
|
+
*/
|
|
346
|
+
async getVerifications(options) {
|
|
347
|
+
return tracingClient.withSpan("RecipientVerificationClient.getVerifications", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
348
|
+
return this.client.sendOperationRequest({ options }, getVerificationsOperationSpec);
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Request the identity for the verification.
|
|
353
|
+
* @param options The options parameters.
|
|
354
|
+
*/
|
|
355
|
+
async requestVerification(options) {
|
|
356
|
+
return tracingClient.withSpan("RecipientVerificationClient.requestVerification", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
357
|
+
return this.client.sendOperationRequest({ options }, requestVerificationOperationSpec);
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Verify that the user received the correct verification code.
|
|
362
|
+
* @param verificationId Verification Id. Must be a valid GUID
|
|
363
|
+
* @param options The options parameters.
|
|
364
|
+
*/
|
|
365
|
+
async verifyIdentity(verificationId, options) {
|
|
366
|
+
return tracingClient.withSpan("RecipientVerificationClient.verifyIdentity", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
367
|
+
return this.client.sendOperationRequest({ verificationId, options }, verifyIdentityOperationSpec);
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Deleting a verification.
|
|
372
|
+
* @param verificationId Verification Id. Must be a valid GUID
|
|
373
|
+
* @param options The options parameters.
|
|
374
|
+
*/
|
|
375
|
+
async deleteVerification(verificationId, options) {
|
|
376
|
+
return tracingClient.withSpan("RecipientVerificationClient.deleteVerification", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
377
|
+
return this.client.sendOperationRequest({ verificationId, options }, deleteVerificationOperationSpec);
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Getting all the constants for the resource.
|
|
382
|
+
* @param options The options parameters.
|
|
383
|
+
*/
|
|
384
|
+
async getVerificationConstants(options) {
|
|
385
|
+
return tracingClient.withSpan("RecipientVerificationClient.getVerificationConstants", options !== null && options !== void 0 ? options : {}, async (options) => {
|
|
386
|
+
return this.client.sendOperationRequest({ options }, getVerificationConstantsOperationSpec);
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
// Operation Specifications
|
|
391
|
+
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
392
|
+
const getVerificationsOperationSpec = {
|
|
393
|
+
path: "/verifications",
|
|
394
|
+
httpMethod: "GET",
|
|
395
|
+
responses: {
|
|
396
|
+
200: {
|
|
397
|
+
bodyMapper: {
|
|
398
|
+
type: {
|
|
399
|
+
name: "Sequence",
|
|
400
|
+
element: { type: { name: "Composite", className: "AcsVerification" } }
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
default: {
|
|
405
|
+
bodyMapper: CommunicationErrorResponse
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
queryParameters: [apiVersion],
|
|
409
|
+
urlParameters: [endpoint],
|
|
410
|
+
headerParameters: [accept],
|
|
411
|
+
serializer
|
|
412
|
+
};
|
|
413
|
+
const requestVerificationOperationSpec = {
|
|
414
|
+
path: "/verifications",
|
|
415
|
+
httpMethod: "POST",
|
|
416
|
+
responses: {
|
|
417
|
+
200: {
|
|
418
|
+
bodyMapper: VerificationResponse
|
|
419
|
+
},
|
|
420
|
+
default: {
|
|
421
|
+
bodyMapper: CommunicationErrorResponse
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
requestBody: {
|
|
425
|
+
parameterPath: {
|
|
426
|
+
identity: ["options", "identity"],
|
|
427
|
+
channel: ["options", "channel"]
|
|
428
|
+
},
|
|
429
|
+
mapper: VerificationRequest
|
|
430
|
+
},
|
|
431
|
+
queryParameters: [apiVersion],
|
|
432
|
+
urlParameters: [endpoint],
|
|
433
|
+
headerParameters: [accept, contentType],
|
|
434
|
+
mediaType: "json",
|
|
435
|
+
serializer
|
|
436
|
+
};
|
|
437
|
+
const verifyIdentityOperationSpec = {
|
|
438
|
+
path: "/verifications/{verificationId}/check",
|
|
439
|
+
httpMethod: "POST",
|
|
440
|
+
responses: {
|
|
441
|
+
200: {
|
|
442
|
+
bodyMapper: VerificationResponse
|
|
443
|
+
},
|
|
444
|
+
default: {
|
|
445
|
+
bodyMapper: CommunicationErrorResponse
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
requestBody: {
|
|
449
|
+
parameterPath: { verificationCode: ["options", "verificationCode"] },
|
|
450
|
+
mapper: VerificationCodeRequest
|
|
451
|
+
},
|
|
452
|
+
queryParameters: [apiVersion],
|
|
453
|
+
urlParameters: [endpoint, verificationId],
|
|
454
|
+
headerParameters: [accept, contentType],
|
|
455
|
+
mediaType: "json",
|
|
456
|
+
serializer
|
|
457
|
+
};
|
|
458
|
+
const deleteVerificationOperationSpec = {
|
|
459
|
+
path: "/verifications/{verificationId}/",
|
|
460
|
+
httpMethod: "DELETE",
|
|
461
|
+
responses: {
|
|
462
|
+
200: {},
|
|
463
|
+
default: {
|
|
464
|
+
bodyMapper: CommunicationErrorResponse
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
queryParameters: [apiVersion],
|
|
468
|
+
urlParameters: [endpoint, verificationId],
|
|
469
|
+
headerParameters: [accept],
|
|
470
|
+
serializer
|
|
471
|
+
};
|
|
472
|
+
const getVerificationConstantsOperationSpec = {
|
|
473
|
+
path: "/verifications/configuration",
|
|
474
|
+
httpMethod: "GET",
|
|
475
|
+
responses: {
|
|
476
|
+
200: {
|
|
477
|
+
bodyMapper: VerificationConstantsResponse
|
|
478
|
+
},
|
|
479
|
+
default: {
|
|
480
|
+
bodyMapper: CommunicationErrorResponse
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
queryParameters: [apiVersion],
|
|
484
|
+
urlParameters: [endpoint],
|
|
485
|
+
headerParameters: [accept],
|
|
486
|
+
serializer
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
/*
|
|
490
|
+
* Copyright (c) Microsoft Corporation.
|
|
491
|
+
* Licensed under the MIT License.
|
|
492
|
+
*
|
|
493
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
494
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
495
|
+
*/
|
|
496
|
+
let RecipientVerificationClient$1 = class RecipientVerificationClient extends coreClient__namespace.ServiceClient {
|
|
497
|
+
/**
|
|
498
|
+
* Initializes a new instance of the RecipientVerificationClient class.
|
|
499
|
+
* @param endpoint The communication resource, for example https://resourcename.communication.azure.com
|
|
500
|
+
* @param options The parameter options
|
|
501
|
+
*/
|
|
502
|
+
constructor(endpoint, options) {
|
|
503
|
+
var _a, _b;
|
|
504
|
+
if (endpoint === undefined) {
|
|
505
|
+
throw new Error("'endpoint' cannot be null");
|
|
506
|
+
}
|
|
507
|
+
// Initializing default values for options
|
|
508
|
+
if (!options) {
|
|
509
|
+
options = {};
|
|
510
|
+
}
|
|
511
|
+
const defaults = {
|
|
512
|
+
requestContentType: "application/json; charset=utf-8"
|
|
513
|
+
};
|
|
514
|
+
const packageDetails = `azsdk-js-communication-recipient-verification/1.0.0-beta.1`;
|
|
515
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
516
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
517
|
+
: `${packageDetails}`;
|
|
518
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
519
|
+
userAgentPrefix
|
|
520
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}" });
|
|
521
|
+
super(optionsWithDefaults);
|
|
522
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
523
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
524
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
525
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
526
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
|
527
|
+
this.pipeline.removePolicy({
|
|
528
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
529
|
+
});
|
|
530
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
531
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
|
532
|
+
challengeCallbacks: {
|
|
533
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
534
|
+
}
|
|
535
|
+
}));
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
// Parameter assignments
|
|
539
|
+
this.endpoint = endpoint;
|
|
540
|
+
// Assigning values to Constant parameters
|
|
541
|
+
this.apiVersion = options.apiVersion || "2022-11-15";
|
|
542
|
+
this.acsVerificationOperations = new AcsVerificationOperationsImpl(this);
|
|
543
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
544
|
+
}
|
|
545
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
546
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
547
|
+
if (!apiVersion) {
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
550
|
+
const apiVersionPolicy = {
|
|
551
|
+
name: "CustomApiVersionPolicy",
|
|
552
|
+
async sendRequest(request, next) {
|
|
553
|
+
const param = request.url.split("?");
|
|
554
|
+
if (param.length > 1) {
|
|
555
|
+
const newParams = param[1].split("&").map((item) => {
|
|
556
|
+
if (item.indexOf("api-version") > -1) {
|
|
557
|
+
return "api-version=" + apiVersion;
|
|
558
|
+
}
|
|
559
|
+
else {
|
|
560
|
+
return item;
|
|
561
|
+
}
|
|
562
|
+
});
|
|
563
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
564
|
+
}
|
|
565
|
+
return next(request);
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
// Copyright (c) Microsoft Corporation.
|
|
573
|
+
// Licensed under the MIT License.
|
|
574
|
+
/**
|
|
575
|
+
* The \@azure\/logger configuration for this package.
|
|
576
|
+
*/
|
|
577
|
+
const logger = logger$1.createClientLogger("communication-verified-recipients");
|
|
578
|
+
|
|
579
|
+
// Copyright (c) Microsoft Corporation.
|
|
580
|
+
// Licensed under the MIT License.
|
|
581
|
+
/// <reference lib="esnext.asynciterable" />
|
|
582
|
+
const isRecipientVerificationClientOptions = (options) => options && !communicationCommon.isKeyCredential(options) && !coreAuth.isTokenCredential(options);
|
|
583
|
+
/**
|
|
584
|
+
* Client class for interacting with Azure Communication Services Recipient Verification.
|
|
585
|
+
*/
|
|
586
|
+
class RecipientVerificationClient {
|
|
587
|
+
constructor(connectionStringOrUrl, credentialOrOptions, maybeOptions = {}) {
|
|
588
|
+
const { url, credential } = communicationCommon.parseClientArguments(connectionStringOrUrl, credentialOrOptions);
|
|
589
|
+
const options = isRecipientVerificationClientOptions(credentialOrOptions)
|
|
590
|
+
? credentialOrOptions
|
|
591
|
+
: maybeOptions;
|
|
592
|
+
const internalPipelineOptions = Object.assign(Object.assign({}, options), {
|
|
593
|
+
loggingOptions: {
|
|
594
|
+
logger: logger.info,
|
|
595
|
+
},
|
|
596
|
+
});
|
|
597
|
+
this.client = new RecipientVerificationClient$1(url, internalPipelineOptions);
|
|
598
|
+
const authPolicy = communicationCommon.createCommunicationAuthPolicy(credential);
|
|
599
|
+
this.client.pipeline.addPolicy(authPolicy);
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Returns list of verified/pending phone numbers.
|
|
603
|
+
*
|
|
604
|
+
* @param options - Additional request options.
|
|
605
|
+
*/
|
|
606
|
+
getVerifications(options = {}) {
|
|
607
|
+
return tracingClient.withSpan("RecipientVerification.getVerifications", options, (updatedOptions) => {
|
|
608
|
+
return this.client.acsVerificationOperations.getVerifications(updatedOptions);
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* Removes a pending/verified number.
|
|
613
|
+
*
|
|
614
|
+
* @param verificationId - Id that is used to reference users phone number.
|
|
615
|
+
* @param options - Additional request options.
|
|
616
|
+
*/
|
|
617
|
+
deleteVerification(verificationId, options = {}) {
|
|
618
|
+
return tracingClient.withSpan("RecipientVerification.deleteVerification", options, (updatedOptions) => {
|
|
619
|
+
return this.client.acsVerificationOperations.deleteVerification(verificationId, updatedOptions);
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Verifies a users phone number.
|
|
624
|
+
*
|
|
625
|
+
* @param verificationId - Id that is used to reference users phone number.
|
|
626
|
+
* @param options - Additional request options.
|
|
627
|
+
*/
|
|
628
|
+
verifyIdentity(verificationId, options = {}) {
|
|
629
|
+
return tracingClient.withSpan("RecipientVerification.verifyIdentity", options, (updatedOptions) => {
|
|
630
|
+
return this.client.acsVerificationOperations.verifyIdentity(verificationId, updatedOptions);
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* Returns information about a resource in relation to recipient verification.
|
|
635
|
+
*
|
|
636
|
+
* @param options - Additional request options.
|
|
637
|
+
*/
|
|
638
|
+
getVerificationConstants(options = {}) {
|
|
639
|
+
return tracingClient.withSpan("RecipientVerification.getVerificationConstants", options, (updatedOptions) => {
|
|
640
|
+
return this.client.acsVerificationOperations.getVerificationConstants(updatedOptions);
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Sends a code to users phone number that will be used for verification.
|
|
645
|
+
*
|
|
646
|
+
* @param options - Additional request options.
|
|
647
|
+
*/
|
|
648
|
+
requestVerification(options = {}) {
|
|
649
|
+
return tracingClient.withSpan("RecipientVerification.requestVerification", options, (updatedOptions) => {
|
|
650
|
+
return this.client.acsVerificationOperations.requestVerification(updatedOptions);
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
exports.AcsVerificationMapper = AcsVerification;
|
|
656
|
+
exports.ConstantsMapper = VerificationConstantsResponse;
|
|
657
|
+
exports.RecipientVerificationClient = RecipientVerificationClient;
|
|
658
|
+
exports.VerificationCodeRequestMapper = VerificationCodeRequest;
|
|
659
|
+
exports.VerificationRequestMapper = VerificationRequest;
|
|
660
|
+
exports.VerificationResponseMapper = VerificationResponse;
|
|
661
|
+
//# sourceMappingURL=index.js.map
|