@azure/search-documents 12.0.0-alpha.20230320.1 → 12.0.0-alpha.20230418.2
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 +63 -66
- package/dist/index.js.map +1 -1
- package/dist-esm/src/generated/data/searchClient.js +1 -1
- package/dist-esm/src/generated/data/searchClient.js.map +1 -1
- package/dist-esm/src/generated/data/searchClientContext.js +3 -3
- package/dist-esm/src/generated/data/searchClientContext.js.map +1 -1
- package/dist-esm/src/generated/service/searchServiceClient.js +1 -1
- package/dist-esm/src/generated/service/searchServiceClient.js.map +1 -1
- package/dist-esm/src/generated/service/searchServiceClientContext.js +3 -3
- package/dist-esm/src/generated/service/searchServiceClientContext.js.map +1 -1
- package/dist-esm/src/indexModels.js.map +1 -1
- package/dist-esm/src/searchClient.js +17 -20
- package/dist-esm/src/searchClient.js.map +1 -1
- package/dist-esm/src/searchIndexClient.js +40 -29
- package/dist-esm/src/searchIndexClient.js.map +1 -1
- package/dist-esm/src/searchIndexerClient.js +4 -14
- package/dist-esm/src/searchIndexerClient.js.map +1 -1
- package/package.json +3 -2
- package/types/search-documents.d.ts +1 -1
package/dist/index.js
CHANGED
|
@@ -1734,7 +1734,7 @@ class SearchClient$1 extends coreHttpCompat__namespace.ExtendedServiceClient {
|
|
|
1734
1734
|
const defaults = {
|
|
1735
1735
|
requestContentType: "application/json; charset=utf-8"
|
|
1736
1736
|
};
|
|
1737
|
-
const packageDetails = `azsdk-js-search-documents/
|
|
1737
|
+
const packageDetails = `azsdk-js-search-documents/12.0.0-beta.1`;
|
|
1738
1738
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
1739
1739
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
1740
1740
|
: `${packageDetails}`;
|
|
@@ -3216,7 +3216,6 @@ function getRandomIntegerInclusive(min, max) {
|
|
|
3216
3216
|
function delay(timeInMs) {
|
|
3217
3217
|
return new Promise((resolve) => setTimeout(() => resolve(), timeInMs));
|
|
3218
3218
|
}
|
|
3219
|
-
const serviceVersions = ["2020-06-30", "2021-04-30-Preview"];
|
|
3220
3219
|
const defaultServiceVersion = "2021-04-30-Preview";
|
|
3221
3220
|
|
|
3222
3221
|
// Copyright (c) Microsoft Corporation.
|
|
@@ -3285,6 +3284,7 @@ class SearchClient {
|
|
|
3285
3284
|
* non-nullable type `string`.
|
|
3286
3285
|
*/
|
|
3287
3286
|
constructor(endpoint, indexName, credential, options = {}) {
|
|
3287
|
+
var _a, _b;
|
|
3288
3288
|
/// Maintenance note: when updating supported API versions,
|
|
3289
3289
|
/// the ContinuationToken logic will need to be updated below.
|
|
3290
3290
|
/**
|
|
@@ -3321,20 +3321,9 @@ class SearchClient {
|
|
|
3321
3321
|
],
|
|
3322
3322
|
},
|
|
3323
3323
|
});
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
}
|
|
3328
|
-
this.serviceVersion = options.apiVersion;
|
|
3329
|
-
this.apiVersion = options.apiVersion;
|
|
3330
|
-
}
|
|
3331
|
-
if (options.serviceVersion) {
|
|
3332
|
-
if (!serviceVersions.includes(options.serviceVersion)) {
|
|
3333
|
-
throw new Error(`Invalid Service Version: ${options.serviceVersion}`);
|
|
3334
|
-
}
|
|
3335
|
-
this.serviceVersion = options.serviceVersion;
|
|
3336
|
-
this.apiVersion = options.serviceVersion;
|
|
3337
|
-
}
|
|
3324
|
+
this.serviceVersion =
|
|
3325
|
+
(_b = (_a = options.serviceVersion) !== null && _a !== void 0 ? _a : options.apiVersion) !== null && _b !== void 0 ? _b : defaultServiceVersion;
|
|
3326
|
+
this.apiVersion = this.serviceVersion;
|
|
3338
3327
|
this.client = new SearchClient$1(this.endpoint, this.indexName, this.serviceVersion, internalClientPipelineOptions);
|
|
3339
3328
|
if (coreAuth.isTokenCredential(credential)) {
|
|
3340
3329
|
const scope = options.audience
|
|
@@ -3480,21 +3469,28 @@ class SearchClient {
|
|
|
3480
3469
|
}
|
|
3481
3470
|
listSearchResultsAll(firstPage, searchText, options = {}) {
|
|
3482
3471
|
return tslib.__asyncGenerator(this, arguments, function* listSearchResultsAll_1() {
|
|
3483
|
-
var e_1,
|
|
3472
|
+
var _a, e_1, _b, _c;
|
|
3484
3473
|
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(firstPage.results)));
|
|
3485
3474
|
if (firstPage.continuationToken) {
|
|
3486
3475
|
try {
|
|
3487
|
-
for (var
|
|
3476
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listSearchResultsPage(searchText, options, {
|
|
3488
3477
|
continuationToken: firstPage.continuationToken,
|
|
3489
|
-
})),
|
|
3490
|
-
|
|
3491
|
-
|
|
3478
|
+
})), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
|
3479
|
+
_c = _f.value;
|
|
3480
|
+
_d = false;
|
|
3481
|
+
try {
|
|
3482
|
+
const page = _c;
|
|
3483
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page.results)));
|
|
3484
|
+
}
|
|
3485
|
+
finally {
|
|
3486
|
+
_d = true;
|
|
3487
|
+
}
|
|
3492
3488
|
}
|
|
3493
3489
|
}
|
|
3494
3490
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
3495
3491
|
finally {
|
|
3496
3492
|
try {
|
|
3497
|
-
if (
|
|
3493
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
|
3498
3494
|
}
|
|
3499
3495
|
finally { if (e_1) throw e_1.error; }
|
|
3500
3496
|
}
|
|
@@ -10780,7 +10776,7 @@ class SearchServiceClient extends coreHttpCompat__namespace.ExtendedServiceClien
|
|
|
10780
10776
|
const defaults = {
|
|
10781
10777
|
requestContentType: "application/json; charset=utf-8"
|
|
10782
10778
|
};
|
|
10783
|
-
const packageDetails = `azsdk-js-search-documents/
|
|
10779
|
+
const packageDetails = `azsdk-js-search-documents/12.0.0-beta.1`;
|
|
10784
10780
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
10785
10781
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
10786
10782
|
: `${packageDetails}`;
|
|
@@ -10849,6 +10845,7 @@ class SearchIndexClient {
|
|
|
10849
10845
|
* @param options - Used to configure the Search Index client.
|
|
10850
10846
|
*/
|
|
10851
10847
|
constructor(endpoint, credential, options = {}) {
|
|
10848
|
+
var _a, _b;
|
|
10852
10849
|
/**
|
|
10853
10850
|
* The API version to use when communicating with the service.
|
|
10854
10851
|
*/
|
|
@@ -10884,20 +10881,9 @@ class SearchIndexClient {
|
|
|
10884
10881
|
],
|
|
10885
10882
|
},
|
|
10886
10883
|
});
|
|
10887
|
-
|
|
10888
|
-
|
|
10889
|
-
|
|
10890
|
-
}
|
|
10891
|
-
this.serviceVersion = options.apiVersion;
|
|
10892
|
-
this.apiVersion = options.apiVersion;
|
|
10893
|
-
}
|
|
10894
|
-
if (options.serviceVersion) {
|
|
10895
|
-
if (!serviceVersions.includes(options.serviceVersion)) {
|
|
10896
|
-
throw new Error(`Invalid Service Version: ${options.serviceVersion}`);
|
|
10897
|
-
}
|
|
10898
|
-
this.serviceVersion = options.serviceVersion;
|
|
10899
|
-
this.apiVersion = options.serviceVersion;
|
|
10900
|
-
}
|
|
10884
|
+
this.serviceVersion =
|
|
10885
|
+
(_b = (_a = options.serviceVersion) !== null && _a !== void 0 ? _a : options.apiVersion) !== null && _b !== void 0 ? _b : defaultServiceVersion;
|
|
10886
|
+
this.apiVersion = this.serviceVersion;
|
|
10901
10887
|
this.client = new SearchServiceClient(this.endpoint, this.serviceVersion, internalClientPipelineOptions);
|
|
10902
10888
|
if (coreAuth.isTokenCredential(credential)) {
|
|
10903
10889
|
const scope = options.audience
|
|
@@ -10932,17 +10918,24 @@ class SearchIndexClient {
|
|
|
10932
10918
|
}
|
|
10933
10919
|
listIndexesAll(options = {}) {
|
|
10934
10920
|
return tslib.__asyncGenerator(this, arguments, function* listIndexesAll_1() {
|
|
10935
|
-
var e_1,
|
|
10921
|
+
var _a, e_1, _b, _c;
|
|
10936
10922
|
try {
|
|
10937
|
-
for (var
|
|
10938
|
-
|
|
10939
|
-
|
|
10923
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listIndexesPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
|
10924
|
+
_c = _f.value;
|
|
10925
|
+
_d = false;
|
|
10926
|
+
try {
|
|
10927
|
+
const page = _c;
|
|
10928
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
10929
|
+
}
|
|
10930
|
+
finally {
|
|
10931
|
+
_d = true;
|
|
10932
|
+
}
|
|
10940
10933
|
}
|
|
10941
10934
|
}
|
|
10942
10935
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
10943
10936
|
finally {
|
|
10944
10937
|
try {
|
|
10945
|
-
if (
|
|
10938
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
|
10946
10939
|
}
|
|
10947
10940
|
finally { if (e_1) throw e_1.error; }
|
|
10948
10941
|
}
|
|
@@ -10987,17 +10980,24 @@ class SearchIndexClient {
|
|
|
10987
10980
|
}
|
|
10988
10981
|
listAliasesAll(options = {}) {
|
|
10989
10982
|
return tslib.__asyncGenerator(this, arguments, function* listAliasesAll_1() {
|
|
10990
|
-
var e_2,
|
|
10983
|
+
var _a, e_2, _b, _c;
|
|
10991
10984
|
try {
|
|
10992
|
-
for (var
|
|
10993
|
-
|
|
10994
|
-
|
|
10985
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listAliasesPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
|
10986
|
+
_c = _f.value;
|
|
10987
|
+
_d = false;
|
|
10988
|
+
try {
|
|
10989
|
+
const page = _c;
|
|
10990
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
10991
|
+
}
|
|
10992
|
+
finally {
|
|
10993
|
+
_d = true;
|
|
10994
|
+
}
|
|
10995
10995
|
}
|
|
10996
10996
|
}
|
|
10997
10997
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
10998
10998
|
finally {
|
|
10999
10999
|
try {
|
|
11000
|
-
if (
|
|
11000
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
|
11001
11001
|
}
|
|
11002
11002
|
finally { if (e_2) throw e_2.error; }
|
|
11003
11003
|
}
|
|
@@ -11043,17 +11043,24 @@ class SearchIndexClient {
|
|
|
11043
11043
|
}
|
|
11044
11044
|
listIndexesNamesAll(options = {}) {
|
|
11045
11045
|
return tslib.__asyncGenerator(this, arguments, function* listIndexesNamesAll_1() {
|
|
11046
|
-
var e_3,
|
|
11046
|
+
var _a, e_3, _b, _c;
|
|
11047
11047
|
try {
|
|
11048
|
-
for (var
|
|
11049
|
-
|
|
11050
|
-
|
|
11048
|
+
for (var _d = true, _e = tslib.__asyncValues(this.listIndexesNamesPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
|
|
11049
|
+
_c = _f.value;
|
|
11050
|
+
_d = false;
|
|
11051
|
+
try {
|
|
11052
|
+
const page = _c;
|
|
11053
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
11054
|
+
}
|
|
11055
|
+
finally {
|
|
11056
|
+
_d = true;
|
|
11057
|
+
}
|
|
11051
11058
|
}
|
|
11052
11059
|
}
|
|
11053
11060
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
11054
11061
|
finally {
|
|
11055
11062
|
try {
|
|
11056
|
-
if (
|
|
11063
|
+
if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
|
|
11057
11064
|
}
|
|
11058
11065
|
finally { if (e_3) throw e_3.error; }
|
|
11059
11066
|
}
|
|
@@ -11505,6 +11512,7 @@ class SearchIndexerClient {
|
|
|
11505
11512
|
* @param options - Used to configure the Search client.
|
|
11506
11513
|
*/
|
|
11507
11514
|
constructor(endpoint, credential, options = {}) {
|
|
11515
|
+
var _a, _b;
|
|
11508
11516
|
/**
|
|
11509
11517
|
* The API version to use when communicating with the service.
|
|
11510
11518
|
*/
|
|
@@ -11538,20 +11546,9 @@ class SearchIndexerClient {
|
|
|
11538
11546
|
],
|
|
11539
11547
|
},
|
|
11540
11548
|
});
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
|
|
11544
|
-
}
|
|
11545
|
-
this.serviceVersion = options.apiVersion;
|
|
11546
|
-
this.apiVersion = options.apiVersion;
|
|
11547
|
-
}
|
|
11548
|
-
if (options.serviceVersion) {
|
|
11549
|
-
if (!serviceVersions.includes(options.serviceVersion)) {
|
|
11550
|
-
throw new Error(`Invalid Service Version: ${options.serviceVersion}`);
|
|
11551
|
-
}
|
|
11552
|
-
this.serviceVersion = options.serviceVersion;
|
|
11553
|
-
this.apiVersion = options.serviceVersion;
|
|
11554
|
-
}
|
|
11549
|
+
this.serviceVersion =
|
|
11550
|
+
(_b = (_a = options.serviceVersion) !== null && _a !== void 0 ? _a : options.apiVersion) !== null && _b !== void 0 ? _b : defaultServiceVersion;
|
|
11551
|
+
this.apiVersion = this.serviceVersion;
|
|
11555
11552
|
this.client = new SearchServiceClient(this.endpoint, this.serviceVersion, internalClientPipelineOptions);
|
|
11556
11553
|
if (coreAuth.isTokenCredential(credential)) {
|
|
11557
11554
|
const scope = options.audience
|