@azure/search-documents 11.3.0-beta.7 → 11.3.0-beta.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/README.md +71 -55
- package/dist/index.js +168 -175
- package/dist/index.js.map +1 -1
- package/dist-esm/src/constants.js +1 -1
- package/dist-esm/src/constants.js.map +1 -1
- package/dist-esm/src/generated/data/index.js +0 -1
- package/dist-esm/src/generated/data/index.js.map +1 -1
- package/dist-esm/src/generated/data/models/index.js.map +1 -1
- package/dist-esm/src/generated/data/operations/documents.js.map +1 -1
- package/dist-esm/src/generated/data/searchClient.js +31 -3
- package/dist-esm/src/generated/data/searchClient.js.map +1 -1
- package/dist-esm/src/generated/service/index.js +0 -1
- package/dist-esm/src/generated/service/index.js.map +1 -1
- package/dist-esm/src/generated/service/models/index.js.map +1 -1
- package/dist-esm/src/generated/service/operations/aliases.js.map +1 -1
- package/dist-esm/src/generated/service/operations/dataSources.js.map +1 -1
- package/dist-esm/src/generated/service/operations/indexers.js.map +1 -1
- package/dist-esm/src/generated/service/operations/indexes.js.map +1 -1
- package/dist-esm/src/generated/service/operations/skillsets.js.map +1 -1
- package/dist-esm/src/generated/service/operations/synonymMaps.js.map +1 -1
- package/dist-esm/src/generated/service/searchServiceClient.js +27 -3
- package/dist-esm/src/generated/service/searchServiceClient.js.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/searchAudience.js +21 -0
- package/dist-esm/src/searchAudience.js.map +1 -0
- package/dist-esm/src/searchClient.js +27 -24
- package/dist-esm/src/searchClient.js.map +1 -1
- package/dist-esm/src/searchIndexClient.js +45 -42
- package/dist-esm/src/searchIndexClient.js.map +1 -1
- package/dist-esm/src/searchIndexerClient.js +51 -48
- package/dist-esm/src/searchIndexerClient.js.map +1 -1
- package/dist-esm/src/searchIndexingBufferedSender.js +10 -11
- package/dist-esm/src/searchIndexingBufferedSender.js.map +1 -1
- package/dist-esm/src/serviceModels.js.map +1 -1
- package/dist-esm/src/serviceUtils.js +0 -1
- package/dist-esm/src/serviceUtils.js.map +1 -1
- package/dist-esm/src/tracing.js +5 -4
- package/dist-esm/src/tracing.js.map +1 -1
- package/package.json +6 -5
- package/types/search-documents.d.ts +44 -8
- package/CHANGELOG.md +0 -205
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
7
|
+
var coreHttpCompat = require('@azure/core-http-compat');
|
|
7
8
|
var coreClient = require('@azure/core-client');
|
|
8
9
|
var coreAuth = require('@azure/core-auth');
|
|
9
10
|
var logger$1 = require('@azure/logger');
|
|
@@ -32,6 +33,7 @@ function _interopNamespace(e) {
|
|
|
32
33
|
return Object.freeze(n);
|
|
33
34
|
}
|
|
34
35
|
|
|
36
|
+
var coreHttpCompat__namespace = /*#__PURE__*/_interopNamespace(coreHttpCompat);
|
|
35
37
|
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
36
38
|
var EventEmitter__default = /*#__PURE__*/_interopDefaultLegacy(EventEmitter);
|
|
37
39
|
var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
|
|
@@ -1731,15 +1733,16 @@ const autocompletePostOperationSpec = {
|
|
|
1731
1733
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1732
1734
|
*/
|
|
1733
1735
|
/** @internal */
|
|
1734
|
-
class
|
|
1736
|
+
class SearchClient$1 extends coreHttpCompat__namespace.ExtendedServiceClient {
|
|
1735
1737
|
/**
|
|
1736
|
-
* Initializes a new instance of the
|
|
1738
|
+
* Initializes a new instance of the SearchClient class.
|
|
1737
1739
|
* @param endpoint The endpoint URL of the search service.
|
|
1738
1740
|
* @param indexName The name of the index.
|
|
1739
1741
|
* @param apiVersion Api Version
|
|
1740
1742
|
* @param options The parameter options
|
|
1741
1743
|
*/
|
|
1742
1744
|
constructor(endpoint, indexName, apiVersion, options) {
|
|
1745
|
+
var _a, _b;
|
|
1743
1746
|
if (endpoint === undefined) {
|
|
1744
1747
|
throw new Error("'endpoint' cannot be null");
|
|
1745
1748
|
}
|
|
@@ -1756,39 +1759,18 @@ class SearchClientContext extends coreClient__namespace.ServiceClient {
|
|
|
1756
1759
|
const defaults = {
|
|
1757
1760
|
requestContentType: "application/json; charset=utf-8"
|
|
1758
1761
|
};
|
|
1759
|
-
const packageDetails = `azsdk-js-search-documents/11.3.0-beta.
|
|
1762
|
+
const packageDetails = `azsdk-js-search-documents/11.3.0-beta.8`;
|
|
1760
1763
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
1761
1764
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
1762
1765
|
: `${packageDetails}`;
|
|
1763
1766
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
1764
1767
|
userAgentPrefix
|
|
1765
|
-
}, baseUri: options.endpoint
|
|
1768
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}/indexes('{indexName}')" });
|
|
1766
1769
|
super(optionsWithDefaults);
|
|
1767
1770
|
// Parameter assignments
|
|
1768
1771
|
this.endpoint = endpoint;
|
|
1769
1772
|
this.indexName = indexName;
|
|
1770
1773
|
this.apiVersion = apiVersion;
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
/*
|
|
1775
|
-
* Copyright (c) Microsoft Corporation.
|
|
1776
|
-
* Licensed under the MIT License.
|
|
1777
|
-
*
|
|
1778
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1779
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1780
|
-
*/
|
|
1781
|
-
/** @internal */
|
|
1782
|
-
class SearchClient$1 extends SearchClientContext {
|
|
1783
|
-
/**
|
|
1784
|
-
* Initializes a new instance of the SearchClient class.
|
|
1785
|
-
* @param endpoint The endpoint URL of the search service.
|
|
1786
|
-
* @param indexName The name of the index.
|
|
1787
|
-
* @param apiVersion Api Version
|
|
1788
|
-
* @param options The parameter options
|
|
1789
|
-
*/
|
|
1790
|
-
constructor(endpoint, indexName, apiVersion, options) {
|
|
1791
|
-
super(endpoint, indexName, apiVersion, options);
|
|
1792
1774
|
this.documents = new DocumentsImpl(this);
|
|
1793
1775
|
}
|
|
1794
1776
|
}
|
|
@@ -1815,7 +1797,7 @@ function createSearchApiKeyCredentialPolicy(credential) {
|
|
|
1815
1797
|
|
|
1816
1798
|
// Copyright (c) Microsoft Corporation.
|
|
1817
1799
|
// Licensed under the MIT license.
|
|
1818
|
-
const SDK_VERSION = "11.3.0-beta.
|
|
1800
|
+
const SDK_VERSION = "11.3.0-beta.8";
|
|
1819
1801
|
|
|
1820
1802
|
// Copyright (c) Microsoft Corporation.
|
|
1821
1803
|
/**
|
|
@@ -1825,13 +1807,14 @@ const logger = logger$1.createClientLogger("search");
|
|
|
1825
1807
|
|
|
1826
1808
|
// Copyright (c) Microsoft Corporation.
|
|
1827
1809
|
/**
|
|
1828
|
-
* Creates a
|
|
1810
|
+
* Creates a tracing client using the global tracer.
|
|
1829
1811
|
* @internal
|
|
1830
1812
|
*/
|
|
1831
|
-
const
|
|
1832
|
-
packagePrefix: "Azure.Search",
|
|
1813
|
+
const tracingClient = coreTracing.createTracingClient({
|
|
1833
1814
|
namespace: "Microsoft.Search",
|
|
1815
|
+
packageName: "Azure.Search",
|
|
1834
1816
|
});
|
|
1817
|
+
const createSpan = tracingClient.startSpan;
|
|
1835
1818
|
|
|
1836
1819
|
// Copyright (c) Microsoft Corporation.
|
|
1837
1820
|
// Licensed under the MIT license.
|
|
@@ -2787,7 +2770,6 @@ exports.KnownAnalyzerNames = void 0;
|
|
|
2787
2770
|
// END manually modified generated interfaces
|
|
2788
2771
|
|
|
2789
2772
|
// Copyright (c) Microsoft Corporation.
|
|
2790
|
-
const DEFAULT_SEARCH_SCOPE = "https://search.azure.com/.default";
|
|
2791
2773
|
function convertSkillsToPublic(skills) {
|
|
2792
2774
|
if (!skills) {
|
|
2793
2775
|
return skills;
|
|
@@ -3262,6 +3244,27 @@ function delay(timeInMs) {
|
|
|
3262
3244
|
const serviceVersions = ["2020-06-30", "2021-04-30-Preview"];
|
|
3263
3245
|
const defaultServiceVersion = "2021-04-30-Preview";
|
|
3264
3246
|
|
|
3247
|
+
// Copyright (c) Microsoft Corporation.
|
|
3248
|
+
// Licensed under the MIT license.
|
|
3249
|
+
/**
|
|
3250
|
+
* Known values for Search Audience
|
|
3251
|
+
*/
|
|
3252
|
+
exports.KnownSearchAudience = void 0;
|
|
3253
|
+
(function (KnownSearchAudience) {
|
|
3254
|
+
/**
|
|
3255
|
+
* Audience for Azure China
|
|
3256
|
+
*/
|
|
3257
|
+
KnownSearchAudience["AzureChina"] = "https://search.azure.cn";
|
|
3258
|
+
/**
|
|
3259
|
+
* Audience for Azure Government
|
|
3260
|
+
*/
|
|
3261
|
+
KnownSearchAudience["AzureGovernment"] = "https://search.azure.us";
|
|
3262
|
+
/**
|
|
3263
|
+
* Audience for Azure Public
|
|
3264
|
+
*/
|
|
3265
|
+
KnownSearchAudience["AzurePublicCloud"] = "https://search.azure.com";
|
|
3266
|
+
})(exports.KnownSearchAudience || (exports.KnownSearchAudience = {}));
|
|
3267
|
+
|
|
3265
3268
|
// Copyright (c) Microsoft Corporation.
|
|
3266
3269
|
/**
|
|
3267
3270
|
* Class used to perform operations against a search index,
|
|
@@ -3340,7 +3343,10 @@ class SearchClient {
|
|
|
3340
3343
|
}
|
|
3341
3344
|
this.client = new SearchClient$1(this.endpoint, this.indexName, this.serviceVersion, internalClientPipelineOptions);
|
|
3342
3345
|
if (coreAuth.isTokenCredential(credential)) {
|
|
3343
|
-
|
|
3346
|
+
const scope = options.audience
|
|
3347
|
+
? `${options.audience}/.default`
|
|
3348
|
+
: `${exports.KnownSearchAudience.AzurePublicCloud}/.default`;
|
|
3349
|
+
this.client.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ credential, scopes: scope }));
|
|
3344
3350
|
}
|
|
3345
3351
|
else {
|
|
3346
3352
|
this.client.pipeline.addPolicy(createSearchApiKeyCredentialPolicy(credential));
|
|
@@ -3362,8 +3368,8 @@ class SearchClient {
|
|
|
3362
3368
|
}
|
|
3363
3369
|
catch (e) {
|
|
3364
3370
|
span.setStatus({
|
|
3365
|
-
|
|
3366
|
-
|
|
3371
|
+
status: "error",
|
|
3372
|
+
error: e.message,
|
|
3367
3373
|
});
|
|
3368
3374
|
throw e;
|
|
3369
3375
|
}
|
|
@@ -3395,8 +3401,8 @@ class SearchClient {
|
|
|
3395
3401
|
}
|
|
3396
3402
|
catch (e) {
|
|
3397
3403
|
span.setStatus({
|
|
3398
|
-
|
|
3399
|
-
|
|
3404
|
+
status: "error",
|
|
3405
|
+
error: e.message,
|
|
3400
3406
|
});
|
|
3401
3407
|
throw e;
|
|
3402
3408
|
}
|
|
@@ -3425,8 +3431,8 @@ class SearchClient {
|
|
|
3425
3431
|
}
|
|
3426
3432
|
catch (e) {
|
|
3427
3433
|
span.setStatus({
|
|
3428
|
-
|
|
3429
|
-
|
|
3434
|
+
status: "error",
|
|
3435
|
+
error: e.message,
|
|
3430
3436
|
});
|
|
3431
3437
|
throw e;
|
|
3432
3438
|
}
|
|
@@ -3506,8 +3512,8 @@ class SearchClient {
|
|
|
3506
3512
|
}
|
|
3507
3513
|
catch (e) {
|
|
3508
3514
|
span.setStatus({
|
|
3509
|
-
|
|
3510
|
-
|
|
3515
|
+
status: "error",
|
|
3516
|
+
error: e.message,
|
|
3511
3517
|
});
|
|
3512
3518
|
throw e;
|
|
3513
3519
|
}
|
|
@@ -3540,8 +3546,8 @@ class SearchClient {
|
|
|
3540
3546
|
}
|
|
3541
3547
|
catch (e) {
|
|
3542
3548
|
span.setStatus({
|
|
3543
|
-
|
|
3544
|
-
|
|
3549
|
+
status: "error",
|
|
3550
|
+
error: e.message,
|
|
3545
3551
|
});
|
|
3546
3552
|
throw e;
|
|
3547
3553
|
}
|
|
@@ -3562,8 +3568,8 @@ class SearchClient {
|
|
|
3562
3568
|
}
|
|
3563
3569
|
catch (e) {
|
|
3564
3570
|
span.setStatus({
|
|
3565
|
-
|
|
3566
|
-
|
|
3571
|
+
status: "error",
|
|
3572
|
+
error: e.message,
|
|
3567
3573
|
});
|
|
3568
3574
|
throw e;
|
|
3569
3575
|
}
|
|
@@ -3597,8 +3603,8 @@ class SearchClient {
|
|
|
3597
3603
|
}
|
|
3598
3604
|
catch (e) {
|
|
3599
3605
|
span.setStatus({
|
|
3600
|
-
|
|
3601
|
-
|
|
3606
|
+
status: "error",
|
|
3607
|
+
error: e.message,
|
|
3602
3608
|
});
|
|
3603
3609
|
throw e;
|
|
3604
3610
|
}
|
|
@@ -3620,8 +3626,8 @@ class SearchClient {
|
|
|
3620
3626
|
}
|
|
3621
3627
|
catch (e) {
|
|
3622
3628
|
span.setStatus({
|
|
3623
|
-
|
|
3624
|
-
|
|
3629
|
+
status: "error",
|
|
3630
|
+
error: e.message,
|
|
3625
3631
|
});
|
|
3626
3632
|
throw e;
|
|
3627
3633
|
}
|
|
@@ -3644,8 +3650,8 @@ class SearchClient {
|
|
|
3644
3650
|
}
|
|
3645
3651
|
catch (e) {
|
|
3646
3652
|
span.setStatus({
|
|
3647
|
-
|
|
3648
|
-
|
|
3653
|
+
status: "error",
|
|
3654
|
+
error: e.message,
|
|
3649
3655
|
});
|
|
3650
3656
|
throw e;
|
|
3651
3657
|
}
|
|
@@ -3668,8 +3674,8 @@ class SearchClient {
|
|
|
3668
3674
|
}
|
|
3669
3675
|
catch (e) {
|
|
3670
3676
|
span.setStatus({
|
|
3671
|
-
|
|
3672
|
-
|
|
3677
|
+
status: "error",
|
|
3678
|
+
error: e.message,
|
|
3673
3679
|
});
|
|
3674
3680
|
throw e;
|
|
3675
3681
|
}
|
|
@@ -3691,8 +3697,8 @@ class SearchClient {
|
|
|
3691
3697
|
}
|
|
3692
3698
|
catch (e) {
|
|
3693
3699
|
span.setStatus({
|
|
3694
|
-
|
|
3695
|
-
|
|
3700
|
+
status: "error",
|
|
3701
|
+
error: e.message,
|
|
3696
3702
|
});
|
|
3697
3703
|
throw e;
|
|
3698
3704
|
}
|
|
@@ -3840,8 +3846,8 @@ class SearchIndexingBufferedSender {
|
|
|
3840
3846
|
}
|
|
3841
3847
|
catch (e) {
|
|
3842
3848
|
span.setStatus({
|
|
3843
|
-
|
|
3844
|
-
|
|
3849
|
+
status: "error",
|
|
3850
|
+
error: e.message,
|
|
3845
3851
|
});
|
|
3846
3852
|
throw e;
|
|
3847
3853
|
}
|
|
@@ -3867,8 +3873,8 @@ class SearchIndexingBufferedSender {
|
|
|
3867
3873
|
}
|
|
3868
3874
|
catch (e) {
|
|
3869
3875
|
span.setStatus({
|
|
3870
|
-
|
|
3871
|
-
|
|
3876
|
+
status: "error",
|
|
3877
|
+
error: e.message,
|
|
3872
3878
|
});
|
|
3873
3879
|
throw e;
|
|
3874
3880
|
}
|
|
@@ -3894,8 +3900,8 @@ class SearchIndexingBufferedSender {
|
|
|
3894
3900
|
}
|
|
3895
3901
|
catch (e) {
|
|
3896
3902
|
span.setStatus({
|
|
3897
|
-
|
|
3898
|
-
|
|
3903
|
+
status: "error",
|
|
3904
|
+
error: e.message,
|
|
3899
3905
|
});
|
|
3900
3906
|
throw e;
|
|
3901
3907
|
}
|
|
@@ -3921,8 +3927,8 @@ class SearchIndexingBufferedSender {
|
|
|
3921
3927
|
}
|
|
3922
3928
|
catch (e) {
|
|
3923
3929
|
span.setStatus({
|
|
3924
|
-
|
|
3925
|
-
|
|
3930
|
+
status: "error",
|
|
3931
|
+
error: e.message,
|
|
3926
3932
|
});
|
|
3927
3933
|
throw e;
|
|
3928
3934
|
}
|
|
@@ -3944,8 +3950,8 @@ class SearchIndexingBufferedSender {
|
|
|
3944
3950
|
}
|
|
3945
3951
|
catch (e) {
|
|
3946
3952
|
span.setStatus({
|
|
3947
|
-
|
|
3948
|
-
|
|
3953
|
+
status: "error",
|
|
3954
|
+
error: e.message,
|
|
3949
3955
|
});
|
|
3950
3956
|
throw e;
|
|
3951
3957
|
}
|
|
@@ -10728,14 +10734,15 @@ const getOperationSpec = {
|
|
|
10728
10734
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
10729
10735
|
*/
|
|
10730
10736
|
/** @internal */
|
|
10731
|
-
class
|
|
10737
|
+
class SearchServiceClient extends coreHttpCompat__namespace.ExtendedServiceClient {
|
|
10732
10738
|
/**
|
|
10733
|
-
* Initializes a new instance of the
|
|
10739
|
+
* Initializes a new instance of the SearchServiceClient class.
|
|
10734
10740
|
* @param endpoint The endpoint URL of the search service.
|
|
10735
10741
|
* @param apiVersion Api Version
|
|
10736
10742
|
* @param options The parameter options
|
|
10737
10743
|
*/
|
|
10738
10744
|
constructor(endpoint, apiVersion, options) {
|
|
10745
|
+
var _a, _b;
|
|
10739
10746
|
if (endpoint === undefined) {
|
|
10740
10747
|
throw new Error("'endpoint' cannot be null");
|
|
10741
10748
|
}
|
|
@@ -10749,37 +10756,17 @@ class SearchServiceClientContext extends coreClient__namespace.ServiceClient {
|
|
|
10749
10756
|
const defaults = {
|
|
10750
10757
|
requestContentType: "application/json; charset=utf-8"
|
|
10751
10758
|
};
|
|
10752
|
-
const packageDetails = `azsdk-js-search-documents/11.3.0-beta.
|
|
10759
|
+
const packageDetails = `azsdk-js-search-documents/11.3.0-beta.8`;
|
|
10753
10760
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
10754
10761
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
10755
10762
|
: `${packageDetails}`;
|
|
10756
10763
|
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
10757
10764
|
userAgentPrefix
|
|
10758
|
-
}, baseUri: options.endpoint
|
|
10765
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}" });
|
|
10759
10766
|
super(optionsWithDefaults);
|
|
10760
10767
|
// Parameter assignments
|
|
10761
10768
|
this.endpoint = endpoint;
|
|
10762
10769
|
this.apiVersion = apiVersion;
|
|
10763
|
-
}
|
|
10764
|
-
}
|
|
10765
|
-
|
|
10766
|
-
/*
|
|
10767
|
-
* Copyright (c) Microsoft Corporation.
|
|
10768
|
-
* Licensed under the MIT License.
|
|
10769
|
-
*
|
|
10770
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
10771
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
10772
|
-
*/
|
|
10773
|
-
/** @internal */
|
|
10774
|
-
class SearchServiceClient extends SearchServiceClientContext {
|
|
10775
|
-
/**
|
|
10776
|
-
* Initializes a new instance of the SearchServiceClient class.
|
|
10777
|
-
* @param endpoint The endpoint URL of the search service.
|
|
10778
|
-
* @param apiVersion Api Version
|
|
10779
|
-
* @param options The parameter options
|
|
10780
|
-
*/
|
|
10781
|
-
constructor(endpoint, apiVersion, options) {
|
|
10782
|
-
super(endpoint, apiVersion, options);
|
|
10783
10770
|
this.dataSources = new DataSourcesImpl(this);
|
|
10784
10771
|
this.indexers = new IndexersImpl(this);
|
|
10785
10772
|
this.skillsets = new SkillsetsImpl(this);
|
|
@@ -10889,7 +10876,10 @@ class SearchIndexClient {
|
|
|
10889
10876
|
}
|
|
10890
10877
|
this.client = new SearchServiceClient(this.endpoint, this.serviceVersion, internalClientPipelineOptions);
|
|
10891
10878
|
if (coreAuth.isTokenCredential(credential)) {
|
|
10892
|
-
|
|
10879
|
+
const scope = options.audience
|
|
10880
|
+
? `${options.audience}/.default`
|
|
10881
|
+
: `${exports.KnownSearchAudience.AzurePublicCloud}/.default`;
|
|
10882
|
+
this.client.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ credential, scopes: scope }));
|
|
10893
10883
|
}
|
|
10894
10884
|
else {
|
|
10895
10885
|
this.client.pipeline.addPolicy(createSearchApiKeyCredentialPolicy(credential));
|
|
@@ -10906,8 +10896,8 @@ class SearchIndexClient {
|
|
|
10906
10896
|
}
|
|
10907
10897
|
catch (e) {
|
|
10908
10898
|
span.setStatus({
|
|
10909
|
-
|
|
10910
|
-
|
|
10899
|
+
status: "error",
|
|
10900
|
+
error: e.message,
|
|
10911
10901
|
});
|
|
10912
10902
|
throw e;
|
|
10913
10903
|
}
|
|
@@ -10961,8 +10951,8 @@ class SearchIndexClient {
|
|
|
10961
10951
|
}
|
|
10962
10952
|
catch (e) {
|
|
10963
10953
|
span.setStatus({
|
|
10964
|
-
|
|
10965
|
-
|
|
10954
|
+
status: "error",
|
|
10955
|
+
error: e.message,
|
|
10966
10956
|
});
|
|
10967
10957
|
throw e;
|
|
10968
10958
|
}
|
|
@@ -11017,8 +11007,8 @@ class SearchIndexClient {
|
|
|
11017
11007
|
}
|
|
11018
11008
|
catch (e) {
|
|
11019
11009
|
span.setStatus({
|
|
11020
|
-
|
|
11021
|
-
|
|
11010
|
+
status: "error",
|
|
11011
|
+
error: e.message,
|
|
11022
11012
|
});
|
|
11023
11013
|
throw e;
|
|
11024
11014
|
}
|
|
@@ -11075,8 +11065,8 @@ class SearchIndexClient {
|
|
|
11075
11065
|
}
|
|
11076
11066
|
catch (e) {
|
|
11077
11067
|
span.setStatus({
|
|
11078
|
-
|
|
11079
|
-
|
|
11068
|
+
status: "error",
|
|
11069
|
+
error: e.message,
|
|
11080
11070
|
});
|
|
11081
11071
|
throw e;
|
|
11082
11072
|
}
|
|
@@ -11096,8 +11086,8 @@ class SearchIndexClient {
|
|
|
11096
11086
|
}
|
|
11097
11087
|
catch (e) {
|
|
11098
11088
|
span.setStatus({
|
|
11099
|
-
|
|
11100
|
-
|
|
11089
|
+
status: "error",
|
|
11090
|
+
error: e.message,
|
|
11101
11091
|
});
|
|
11102
11092
|
throw e;
|
|
11103
11093
|
}
|
|
@@ -11118,8 +11108,8 @@ class SearchIndexClient {
|
|
|
11118
11108
|
}
|
|
11119
11109
|
catch (e) {
|
|
11120
11110
|
span.setStatus({
|
|
11121
|
-
|
|
11122
|
-
|
|
11111
|
+
status: "error",
|
|
11112
|
+
error: e.message,
|
|
11123
11113
|
});
|
|
11124
11114
|
throw e;
|
|
11125
11115
|
}
|
|
@@ -11140,8 +11130,8 @@ class SearchIndexClient {
|
|
|
11140
11130
|
}
|
|
11141
11131
|
catch (e) {
|
|
11142
11132
|
span.setStatus({
|
|
11143
|
-
|
|
11144
|
-
|
|
11133
|
+
status: "error",
|
|
11134
|
+
error: e.message,
|
|
11145
11135
|
});
|
|
11146
11136
|
throw e;
|
|
11147
11137
|
}
|
|
@@ -11162,8 +11152,8 @@ class SearchIndexClient {
|
|
|
11162
11152
|
}
|
|
11163
11153
|
catch (e) {
|
|
11164
11154
|
span.setStatus({
|
|
11165
|
-
|
|
11166
|
-
|
|
11155
|
+
status: "error",
|
|
11156
|
+
error: e.message,
|
|
11167
11157
|
});
|
|
11168
11158
|
throw e;
|
|
11169
11159
|
}
|
|
@@ -11184,8 +11174,8 @@ class SearchIndexClient {
|
|
|
11184
11174
|
}
|
|
11185
11175
|
catch (e) {
|
|
11186
11176
|
span.setStatus({
|
|
11187
|
-
|
|
11188
|
-
|
|
11177
|
+
status: "error",
|
|
11178
|
+
error: e.message,
|
|
11189
11179
|
});
|
|
11190
11180
|
throw e;
|
|
11191
11181
|
}
|
|
@@ -11207,8 +11197,8 @@ class SearchIndexClient {
|
|
|
11207
11197
|
}
|
|
11208
11198
|
catch (e) {
|
|
11209
11199
|
span.setStatus({
|
|
11210
|
-
|
|
11211
|
-
|
|
11200
|
+
status: "error",
|
|
11201
|
+
error: e.message,
|
|
11212
11202
|
});
|
|
11213
11203
|
throw e;
|
|
11214
11204
|
}
|
|
@@ -11230,8 +11220,8 @@ class SearchIndexClient {
|
|
|
11230
11220
|
}
|
|
11231
11221
|
catch (e) {
|
|
11232
11222
|
span.setStatus({
|
|
11233
|
-
|
|
11234
|
-
|
|
11223
|
+
status: "error",
|
|
11224
|
+
error: e.message,
|
|
11235
11225
|
});
|
|
11236
11226
|
throw e;
|
|
11237
11227
|
}
|
|
@@ -11253,8 +11243,8 @@ class SearchIndexClient {
|
|
|
11253
11243
|
}
|
|
11254
11244
|
catch (e) {
|
|
11255
11245
|
span.setStatus({
|
|
11256
|
-
|
|
11257
|
-
|
|
11246
|
+
status: "error",
|
|
11247
|
+
error: e.message,
|
|
11258
11248
|
});
|
|
11259
11249
|
throw e;
|
|
11260
11250
|
}
|
|
@@ -11280,8 +11270,8 @@ class SearchIndexClient {
|
|
|
11280
11270
|
}
|
|
11281
11271
|
catch (e) {
|
|
11282
11272
|
span.setStatus({
|
|
11283
|
-
|
|
11284
|
-
|
|
11273
|
+
status: "error",
|
|
11274
|
+
error: e.message,
|
|
11285
11275
|
});
|
|
11286
11276
|
throw e;
|
|
11287
11277
|
}
|
|
@@ -11303,8 +11293,8 @@ class SearchIndexClient {
|
|
|
11303
11293
|
}
|
|
11304
11294
|
catch (e) {
|
|
11305
11295
|
span.setStatus({
|
|
11306
|
-
|
|
11307
|
-
|
|
11296
|
+
status: "error",
|
|
11297
|
+
error: e.message,
|
|
11308
11298
|
});
|
|
11309
11299
|
throw e;
|
|
11310
11300
|
}
|
|
@@ -11325,8 +11315,8 @@ class SearchIndexClient {
|
|
|
11325
11315
|
}
|
|
11326
11316
|
catch (e) {
|
|
11327
11317
|
span.setStatus({
|
|
11328
|
-
|
|
11329
|
-
|
|
11318
|
+
status: "error",
|
|
11319
|
+
error: e.message,
|
|
11330
11320
|
});
|
|
11331
11321
|
throw e;
|
|
11332
11322
|
}
|
|
@@ -11349,8 +11339,8 @@ class SearchIndexClient {
|
|
|
11349
11339
|
}
|
|
11350
11340
|
catch (e) {
|
|
11351
11341
|
span.setStatus({
|
|
11352
|
-
|
|
11353
|
-
|
|
11342
|
+
status: "error",
|
|
11343
|
+
error: e.message,
|
|
11354
11344
|
});
|
|
11355
11345
|
throw e;
|
|
11356
11346
|
}
|
|
@@ -11371,8 +11361,8 @@ class SearchIndexClient {
|
|
|
11371
11361
|
}
|
|
11372
11362
|
catch (e) {
|
|
11373
11363
|
span.setStatus({
|
|
11374
|
-
|
|
11375
|
-
|
|
11364
|
+
status: "error",
|
|
11365
|
+
error: e.message,
|
|
11376
11366
|
});
|
|
11377
11367
|
throw e;
|
|
11378
11368
|
}
|
|
@@ -11394,8 +11384,8 @@ class SearchIndexClient {
|
|
|
11394
11384
|
}
|
|
11395
11385
|
catch (e) {
|
|
11396
11386
|
span.setStatus({
|
|
11397
|
-
|
|
11398
|
-
|
|
11387
|
+
status: "error",
|
|
11388
|
+
error: e.message,
|
|
11399
11389
|
});
|
|
11400
11390
|
throw e;
|
|
11401
11391
|
}
|
|
@@ -11423,8 +11413,8 @@ class SearchIndexClient {
|
|
|
11423
11413
|
}
|
|
11424
11414
|
catch (e) {
|
|
11425
11415
|
span.setStatus({
|
|
11426
|
-
|
|
11427
|
-
|
|
11416
|
+
status: "error",
|
|
11417
|
+
error: e.message,
|
|
11428
11418
|
});
|
|
11429
11419
|
throw e;
|
|
11430
11420
|
}
|
|
@@ -11444,8 +11434,8 @@ class SearchIndexClient {
|
|
|
11444
11434
|
}
|
|
11445
11435
|
catch (e) {
|
|
11446
11436
|
span.setStatus({
|
|
11447
|
-
|
|
11448
|
-
|
|
11437
|
+
status: "error",
|
|
11438
|
+
error: e.message,
|
|
11449
11439
|
});
|
|
11450
11440
|
throw e;
|
|
11451
11441
|
}
|
|
@@ -11536,7 +11526,10 @@ class SearchIndexerClient {
|
|
|
11536
11526
|
}
|
|
11537
11527
|
this.client = new SearchServiceClient(this.endpoint, this.serviceVersion, internalClientPipelineOptions);
|
|
11538
11528
|
if (coreAuth.isTokenCredential(credential)) {
|
|
11539
|
-
|
|
11529
|
+
const scope = options.audience
|
|
11530
|
+
? `${options.audience}/.default`
|
|
11531
|
+
: `${exports.KnownSearchAudience.AzurePublicCloud}/.default`;
|
|
11532
|
+
this.client.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({ credential, scopes: scope }));
|
|
11540
11533
|
}
|
|
11541
11534
|
else {
|
|
11542
11535
|
this.client.pipeline.addPolicy(createSearchApiKeyCredentialPolicy(credential));
|
|
@@ -11555,8 +11548,8 @@ class SearchIndexerClient {
|
|
|
11555
11548
|
}
|
|
11556
11549
|
catch (e) {
|
|
11557
11550
|
span.setStatus({
|
|
11558
|
-
|
|
11559
|
-
|
|
11551
|
+
status: "error",
|
|
11552
|
+
error: e.message,
|
|
11560
11553
|
});
|
|
11561
11554
|
throw e;
|
|
11562
11555
|
}
|
|
@@ -11576,8 +11569,8 @@ class SearchIndexerClient {
|
|
|
11576
11569
|
}
|
|
11577
11570
|
catch (e) {
|
|
11578
11571
|
span.setStatus({
|
|
11579
|
-
|
|
11580
|
-
|
|
11572
|
+
status: "error",
|
|
11573
|
+
error: e.message,
|
|
11581
11574
|
});
|
|
11582
11575
|
throw e;
|
|
11583
11576
|
}
|
|
@@ -11597,8 +11590,8 @@ class SearchIndexerClient {
|
|
|
11597
11590
|
}
|
|
11598
11591
|
catch (e) {
|
|
11599
11592
|
span.setStatus({
|
|
11600
|
-
|
|
11601
|
-
|
|
11593
|
+
status: "error",
|
|
11594
|
+
error: e.message,
|
|
11602
11595
|
});
|
|
11603
11596
|
throw e;
|
|
11604
11597
|
}
|
|
@@ -11618,8 +11611,8 @@ class SearchIndexerClient {
|
|
|
11618
11611
|
}
|
|
11619
11612
|
catch (e) {
|
|
11620
11613
|
span.setStatus({
|
|
11621
|
-
|
|
11622
|
-
|
|
11614
|
+
status: "error",
|
|
11615
|
+
error: e.message,
|
|
11623
11616
|
});
|
|
11624
11617
|
throw e;
|
|
11625
11618
|
}
|
|
@@ -11639,8 +11632,8 @@ class SearchIndexerClient {
|
|
|
11639
11632
|
}
|
|
11640
11633
|
catch (e) {
|
|
11641
11634
|
span.setStatus({
|
|
11642
|
-
|
|
11643
|
-
|
|
11635
|
+
status: "error",
|
|
11636
|
+
error: e.message,
|
|
11644
11637
|
});
|
|
11645
11638
|
throw e;
|
|
11646
11639
|
}
|
|
@@ -11660,8 +11653,8 @@ class SearchIndexerClient {
|
|
|
11660
11653
|
}
|
|
11661
11654
|
catch (e) {
|
|
11662
11655
|
span.setStatus({
|
|
11663
|
-
|
|
11664
|
-
|
|
11656
|
+
status: "error",
|
|
11657
|
+
error: e.message,
|
|
11665
11658
|
});
|
|
11666
11659
|
throw e;
|
|
11667
11660
|
}
|
|
@@ -11682,8 +11675,8 @@ class SearchIndexerClient {
|
|
|
11682
11675
|
}
|
|
11683
11676
|
catch (e) {
|
|
11684
11677
|
span.setStatus({
|
|
11685
|
-
|
|
11686
|
-
|
|
11678
|
+
status: "error",
|
|
11679
|
+
error: e.message,
|
|
11687
11680
|
});
|
|
11688
11681
|
throw e;
|
|
11689
11682
|
}
|
|
@@ -11704,8 +11697,8 @@ class SearchIndexerClient {
|
|
|
11704
11697
|
}
|
|
11705
11698
|
catch (e) {
|
|
11706
11699
|
span.setStatus({
|
|
11707
|
-
|
|
11708
|
-
|
|
11700
|
+
status: "error",
|
|
11701
|
+
error: e.message,
|
|
11709
11702
|
});
|
|
11710
11703
|
throw e;
|
|
11711
11704
|
}
|
|
@@ -11726,8 +11719,8 @@ class SearchIndexerClient {
|
|
|
11726
11719
|
}
|
|
11727
11720
|
catch (e) {
|
|
11728
11721
|
span.setStatus({
|
|
11729
|
-
|
|
11730
|
-
|
|
11722
|
+
status: "error",
|
|
11723
|
+
error: e.message,
|
|
11731
11724
|
});
|
|
11732
11725
|
throw e;
|
|
11733
11726
|
}
|
|
@@ -11748,8 +11741,8 @@ class SearchIndexerClient {
|
|
|
11748
11741
|
}
|
|
11749
11742
|
catch (e) {
|
|
11750
11743
|
span.setStatus({
|
|
11751
|
-
|
|
11752
|
-
|
|
11744
|
+
status: "error",
|
|
11745
|
+
error: e.message,
|
|
11753
11746
|
});
|
|
11754
11747
|
throw e;
|
|
11755
11748
|
}
|
|
@@ -11770,8 +11763,8 @@ class SearchIndexerClient {
|
|
|
11770
11763
|
}
|
|
11771
11764
|
catch (e) {
|
|
11772
11765
|
span.setStatus({
|
|
11773
|
-
|
|
11774
|
-
|
|
11766
|
+
status: "error",
|
|
11767
|
+
error: e.message,
|
|
11775
11768
|
});
|
|
11776
11769
|
throw e;
|
|
11777
11770
|
}
|
|
@@ -11792,8 +11785,8 @@ class SearchIndexerClient {
|
|
|
11792
11785
|
}
|
|
11793
11786
|
catch (e) {
|
|
11794
11787
|
span.setStatus({
|
|
11795
|
-
|
|
11796
|
-
|
|
11788
|
+
status: "error",
|
|
11789
|
+
error: e.message,
|
|
11797
11790
|
});
|
|
11798
11791
|
throw e;
|
|
11799
11792
|
}
|
|
@@ -11815,8 +11808,8 @@ class SearchIndexerClient {
|
|
|
11815
11808
|
}
|
|
11816
11809
|
catch (e) {
|
|
11817
11810
|
span.setStatus({
|
|
11818
|
-
|
|
11819
|
-
|
|
11811
|
+
status: "error",
|
|
11812
|
+
error: e.message,
|
|
11820
11813
|
});
|
|
11821
11814
|
throw e;
|
|
11822
11815
|
}
|
|
@@ -11838,8 +11831,8 @@ class SearchIndexerClient {
|
|
|
11838
11831
|
}
|
|
11839
11832
|
catch (e) {
|
|
11840
11833
|
span.setStatus({
|
|
11841
|
-
|
|
11842
|
-
|
|
11834
|
+
status: "error",
|
|
11835
|
+
error: e.message,
|
|
11843
11836
|
});
|
|
11844
11837
|
throw e;
|
|
11845
11838
|
}
|
|
@@ -11861,8 +11854,8 @@ class SearchIndexerClient {
|
|
|
11861
11854
|
}
|
|
11862
11855
|
catch (e) {
|
|
11863
11856
|
span.setStatus({
|
|
11864
|
-
|
|
11865
|
-
|
|
11857
|
+
status: "error",
|
|
11858
|
+
error: e.message,
|
|
11866
11859
|
});
|
|
11867
11860
|
throw e;
|
|
11868
11861
|
}
|
|
@@ -11888,8 +11881,8 @@ class SearchIndexerClient {
|
|
|
11888
11881
|
}
|
|
11889
11882
|
catch (e) {
|
|
11890
11883
|
span.setStatus({
|
|
11891
|
-
|
|
11892
|
-
|
|
11884
|
+
status: "error",
|
|
11885
|
+
error: e.message,
|
|
11893
11886
|
});
|
|
11894
11887
|
throw e;
|
|
11895
11888
|
}
|
|
@@ -11915,8 +11908,8 @@ class SearchIndexerClient {
|
|
|
11915
11908
|
}
|
|
11916
11909
|
catch (e) {
|
|
11917
11910
|
span.setStatus({
|
|
11918
|
-
|
|
11919
|
-
|
|
11911
|
+
status: "error",
|
|
11912
|
+
error: e.message,
|
|
11920
11913
|
});
|
|
11921
11914
|
throw e;
|
|
11922
11915
|
}
|
|
@@ -11942,8 +11935,8 @@ class SearchIndexerClient {
|
|
|
11942
11935
|
}
|
|
11943
11936
|
catch (e) {
|
|
11944
11937
|
span.setStatus({
|
|
11945
|
-
|
|
11946
|
-
|
|
11938
|
+
status: "error",
|
|
11939
|
+
error: e.message,
|
|
11947
11940
|
});
|
|
11948
11941
|
throw e;
|
|
11949
11942
|
}
|
|
@@ -11964,8 +11957,8 @@ class SearchIndexerClient {
|
|
|
11964
11957
|
}
|
|
11965
11958
|
catch (e) {
|
|
11966
11959
|
span.setStatus({
|
|
11967
|
-
|
|
11968
|
-
|
|
11960
|
+
status: "error",
|
|
11961
|
+
error: e.message,
|
|
11969
11962
|
});
|
|
11970
11963
|
throw e;
|
|
11971
11964
|
}
|
|
@@ -11985,8 +11978,8 @@ class SearchIndexerClient {
|
|
|
11985
11978
|
}
|
|
11986
11979
|
catch (e) {
|
|
11987
11980
|
span.setStatus({
|
|
11988
|
-
|
|
11989
|
-
|
|
11981
|
+
status: "error",
|
|
11982
|
+
error: e.message,
|
|
11990
11983
|
});
|
|
11991
11984
|
throw e;
|
|
11992
11985
|
}
|
|
@@ -12006,8 +11999,8 @@ class SearchIndexerClient {
|
|
|
12006
11999
|
}
|
|
12007
12000
|
catch (e) {
|
|
12008
12001
|
span.setStatus({
|
|
12009
|
-
|
|
12010
|
-
|
|
12002
|
+
status: "error",
|
|
12003
|
+
error: e.message,
|
|
12011
12004
|
});
|
|
12012
12005
|
throw e;
|
|
12013
12006
|
}
|
|
@@ -12030,8 +12023,8 @@ class SearchIndexerClient {
|
|
|
12030
12023
|
}
|
|
12031
12024
|
catch (e) {
|
|
12032
12025
|
span.setStatus({
|
|
12033
|
-
|
|
12034
|
-
|
|
12026
|
+
status: "error",
|
|
12027
|
+
error: e.message,
|
|
12035
12028
|
});
|
|
12036
12029
|
throw e;
|
|
12037
12030
|
}
|
|
@@ -12052,8 +12045,8 @@ class SearchIndexerClient {
|
|
|
12052
12045
|
}
|
|
12053
12046
|
catch (e) {
|
|
12054
12047
|
span.setStatus({
|
|
12055
|
-
|
|
12056
|
-
|
|
12048
|
+
status: "error",
|
|
12049
|
+
error: e.message,
|
|
12057
12050
|
});
|
|
12058
12051
|
throw e;
|
|
12059
12052
|
}
|