@azure/search-documents 11.3.0-beta.5 → 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.
Files changed (72) hide show
  1. package/README.md +71 -55
  2. package/dist/index.js +1178 -601
  3. package/dist/index.js.map +1 -1
  4. package/dist-esm/src/constants.js +1 -1
  5. package/dist-esm/src/constants.js.map +1 -1
  6. package/dist-esm/src/generated/data/index.js +0 -1
  7. package/dist-esm/src/generated/data/index.js.map +1 -1
  8. package/dist-esm/src/generated/data/models/index.js +2 -2
  9. package/dist-esm/src/generated/data/models/index.js.map +1 -1
  10. package/dist-esm/src/generated/data/operations/documents.js.map +1 -1
  11. package/dist-esm/src/generated/data/searchClient.js +31 -3
  12. package/dist-esm/src/generated/data/searchClient.js.map +1 -1
  13. package/dist-esm/src/generated/data/searchClientContext.js +1 -1
  14. package/dist-esm/src/generated/data/searchClientContext.js.map +1 -1
  15. package/dist-esm/src/generated/service/index.js +0 -1
  16. package/dist-esm/src/generated/service/index.js.map +1 -1
  17. package/dist-esm/src/generated/service/models/index.js +2 -0
  18. package/dist-esm/src/generated/service/models/index.js.map +1 -1
  19. package/dist-esm/src/generated/service/models/mappers.js +109 -0
  20. package/dist-esm/src/generated/service/models/mappers.js.map +1 -1
  21. package/dist-esm/src/generated/service/models/parameters.js +15 -1
  22. package/dist-esm/src/generated/service/models/parameters.js.map +1 -1
  23. package/dist-esm/src/generated/service/operations/aliases.js +166 -0
  24. package/dist-esm/src/generated/service/operations/aliases.js.map +1 -0
  25. package/dist-esm/src/generated/service/operations/dataSources.js.map +1 -1
  26. package/dist-esm/src/generated/service/operations/index.js +1 -0
  27. package/dist-esm/src/generated/service/operations/index.js.map +1 -1
  28. package/dist-esm/src/generated/service/operations/indexers.js.map +1 -1
  29. package/dist-esm/src/generated/service/operations/indexes.js.map +1 -1
  30. package/dist-esm/src/generated/service/operations/skillsets.js.map +1 -1
  31. package/dist-esm/src/generated/service/operations/synonymMaps.js.map +1 -1
  32. package/dist-esm/src/generated/service/operationsInterfaces/aliases.js +9 -0
  33. package/dist-esm/src/generated/service/operationsInterfaces/aliases.js.map +1 -0
  34. package/dist-esm/src/generated/service/operationsInterfaces/index.js +1 -0
  35. package/dist-esm/src/generated/service/operationsInterfaces/index.js.map +1 -1
  36. package/dist-esm/src/generated/service/searchServiceClient.js +29 -4
  37. package/dist-esm/src/generated/service/searchServiceClient.js.map +1 -1
  38. package/dist-esm/src/generated/service/searchServiceClientContext.js +1 -1
  39. package/dist-esm/src/generated/service/searchServiceClientContext.js.map +1 -1
  40. package/dist-esm/src/geographyPoint.js +1 -1
  41. package/dist-esm/src/geographyPoint.js.map +1 -1
  42. package/dist-esm/src/index.js +5 -4
  43. package/dist-esm/src/index.js.map +1 -1
  44. package/dist-esm/src/indexDocumentsBatch.js +1 -1
  45. package/dist-esm/src/indexDocumentsBatch.js.map +1 -1
  46. package/dist-esm/src/indexModels.js.map +1 -1
  47. package/dist-esm/src/odataMetadataPolicy.js +1 -1
  48. package/dist-esm/src/odataMetadataPolicy.js.map +1 -1
  49. package/dist-esm/src/searchApiKeyCredentialPolicy.js +1 -1
  50. package/dist-esm/src/searchApiKeyCredentialPolicy.js.map +1 -1
  51. package/dist-esm/src/searchAudience.js +21 -0
  52. package/dist-esm/src/searchAudience.js.map +1 -0
  53. package/dist-esm/src/searchClient.js +55 -40
  54. package/dist-esm/src/searchClient.js.map +1 -1
  55. package/dist-esm/src/searchIndexClient.js +206 -45
  56. package/dist-esm/src/searchIndexClient.js.map +1 -1
  57. package/dist-esm/src/searchIndexerClient.js +72 -57
  58. package/dist-esm/src/searchIndexerClient.js.map +1 -1
  59. package/dist-esm/src/searchIndexingBufferedSender.js +15 -16
  60. package/dist-esm/src/searchIndexingBufferedSender.js.map +1 -1
  61. package/dist-esm/src/serialization.js +5 -5
  62. package/dist-esm/src/serialization.js.map +1 -1
  63. package/dist-esm/src/serviceModels.js.map +1 -1
  64. package/dist-esm/src/serviceUtils.js +23 -19
  65. package/dist-esm/src/serviceUtils.js.map +1 -1
  66. package/dist-esm/src/synonymMapHelper.js +1 -1
  67. package/dist-esm/src/synonymMapHelper.js.map +1 -1
  68. package/dist-esm/src/tracing.js +6 -5
  69. package/dist-esm/src/tracing.js.map +1 -1
  70. package/package.json +22 -33
  71. package/types/search-documents.d.ts +195 -17
  72. package/CHANGELOG.md +0 -188
@@ -1,13 +1,20 @@
1
1
  /// <reference lib="esnext.asynciterable" />
2
2
 
3
3
  import { AzureKeyCredential } from '@azure/core-auth';
4
- import { CommonClientOptions } from '@azure/core-client';
4
+ import { ExtendedCommonClientOptions } from '@azure/core-http-compat';
5
5
  import { KeyCredential } from '@azure/core-auth';
6
6
  import { OperationOptions } from '@azure/core-client';
7
7
  import { PagedAsyncIterableIterator } from '@azure/core-paging';
8
8
  import { RestError } from '@azure/core-rest-pipeline';
9
9
  import { TokenCredential } from '@azure/core-auth';
10
10
 
11
+ /**
12
+ * An iterator for listing the aliases that exist in the Search service. Will make requests
13
+ * as needed during iteration. Use .byPage() to make one request to the server
14
+ * per iteration.
15
+ */
16
+ export declare type AliasIterator = PagedAsyncIterableIterator<SearchIndexAlias, SearchIndexAlias[], {}>;
17
+
11
18
  /** Information about a token returned by an analyzer. */
12
19
  export declare interface AnalyzedTokenInfo {
13
20
  /**
@@ -86,7 +93,7 @@ export declare interface AnswerResult {
86
93
  /** Describes unknown properties. The value of an unknown property can be of "any" type. */
87
94
  [property: string]: any;
88
95
  /**
89
- * The score value represents how relevant the answer is to the the query relative to other answers returned for the query.
96
+ * The score value represents how relevant the answer is to the query relative to other answers returned for the query.
90
97
  * NOTE: This property will not be serialized. It can only be populated by the server.
91
98
  */
92
99
  readonly score: number;
@@ -223,6 +230,24 @@ export declare interface AzureActiveDirectoryApplicationCredentials {
223
230
 
224
231
  export { AzureKeyCredential }
225
232
 
233
+ /** The AML skill allows you to extend AI enrichment with a custom Azure Machine Learning (AML) model. Once an AML model is trained and deployed, an AML skill integrates it into AI enrichment. */
234
+ export declare type AzureMachineLearningSkill = BaseSearchIndexerSkill & {
235
+ /** Polymorphic discriminator, which specifies the different types this object can be */
236
+ odatatype: "#Microsoft.Skills.Custom.AmlSkill";
237
+ /** (Required for no authentication or key authentication) The scoring URI of the AML service to which the JSON payload will be sent. Only the https URI scheme is allowed. */
238
+ scoringUri?: string;
239
+ /** (Required for key authentication) The key for the AML service. */
240
+ authenticationKey?: string;
241
+ /** (Required for token authentication). The Azure Resource Manager resource ID of the AML service. It should be in the format subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}. */
242
+ resourceId?: string;
243
+ /** (Optional) When specified, indicates the timeout for the http client making the API call. */
244
+ timeout?: string;
245
+ /** (Optional for token authentication). The region the AML service is deployed in. */
246
+ region?: string;
247
+ /** (Optional) When specified, indicates the number of calls the indexer will make in parallel to the endpoint you have provided. You can decrease this value if your endpoint is failing under too high of a request load, or raise it if your endpoint is able to accept more requests and you would like an increase in the performance of the indexer. If not set, a default value of 5 is used. The degreeOfParallelism can be set to a maximum of 10 and a minimum of 1. */
248
+ degreeOfParallelism?: number;
249
+ };
250
+
226
251
  /** Base type for character filters. */
227
252
  export declare interface BaseCharFilter {
228
253
  /** Polymorphic discriminator, which specifies the different types this object can be */
@@ -296,7 +321,7 @@ export declare interface BaseSearchIndexerDataIdentity {
296
321
  /** Base type for skills. */
297
322
  export declare interface BaseSearchIndexerSkill {
298
323
  /** Polymorphic discriminator, which specifies the different types this object can be */
299
- odatatype: "#Microsoft.Skills.Util.ConditionalSkill" | "#Microsoft.Skills.Text.KeyPhraseExtractionSkill" | "#Microsoft.Skills.Vision.OcrSkill" | "#Microsoft.Skills.Vision.ImageAnalysisSkill" | "#Microsoft.Skills.Text.LanguageDetectionSkill" | "#Microsoft.Skills.Util.ShaperSkill" | "#Microsoft.Skills.Text.MergeSkill" | "#Microsoft.Skills.Text.EntityRecognitionSkill" | "#Microsoft.Skills.Text.SentimentSkill" | "#Microsoft.Skills.Text.V3.SentimentSkill" | "#Microsoft.Skills.Text.V3.EntityLinkingSkill" | "#Microsoft.Skills.Text.V3.EntityRecognitionSkill" | "#Microsoft.Skills.Text.PIIDetectionSkill" | "#Microsoft.Skills.Text.SplitSkill" | "#Microsoft.Skills.Text.CustomEntityLookupSkill" | "#Microsoft.Skills.Text.TranslationSkill" | "#Microsoft.Skills.Util.DocumentExtractionSkill" | "#Microsoft.Skills.Custom.WebApiSkill";
324
+ odatatype: "#Microsoft.Skills.Util.ConditionalSkill" | "#Microsoft.Skills.Text.KeyPhraseExtractionSkill" | "#Microsoft.Skills.Vision.OcrSkill" | "#Microsoft.Skills.Vision.ImageAnalysisSkill" | "#Microsoft.Skills.Text.LanguageDetectionSkill" | "#Microsoft.Skills.Util.ShaperSkill" | "#Microsoft.Skills.Text.MergeSkill" | "#Microsoft.Skills.Text.EntityRecognitionSkill" | "#Microsoft.Skills.Text.SentimentSkill" | "#Microsoft.Skills.Text.V3.SentimentSkill" | "#Microsoft.Skills.Text.V3.EntityLinkingSkill" | "#Microsoft.Skills.Text.V3.EntityRecognitionSkill" | "#Microsoft.Skills.Text.PIIDetectionSkill" | "#Microsoft.Skills.Text.SplitSkill" | "#Microsoft.Skills.Text.CustomEntityLookupSkill" | "#Microsoft.Skills.Text.TranslationSkill" | "#Microsoft.Skills.Util.DocumentExtractionSkill" | "#Microsoft.Skills.Custom.WebApiSkill" | "#Microsoft.Skills.Custom.AmlSkill";
300
325
  /** The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. */
301
326
  name?: string;
302
327
  /** The description of the skill which describes the inputs, outputs, and usage of the skill. */
@@ -512,6 +537,11 @@ export declare interface CorsOptions {
512
537
  */
513
538
  export declare type CountDocumentsOptions = OperationOptions;
514
539
 
540
+ /**
541
+ * Options for create alias operation.
542
+ */
543
+ export declare type CreateAliasOptions = OperationOptions;
544
+
515
545
  /**
516
546
  * Options for create datasource operation.
517
547
  */
@@ -527,12 +557,22 @@ export declare type CreateIndexerOptions = OperationOptions;
527
557
  */
528
558
  export declare type CreateIndexOptions = OperationOptions;
529
559
 
560
+ /**
561
+ * Options for create or update alias operation.
562
+ */
563
+ export declare interface CreateOrUpdateAliasOptions extends OperationOptions {
564
+ /**
565
+ * If set to true, Resource will be deleted only if the etag matches.
566
+ */
567
+ onlyIfUnchanged?: boolean;
568
+ }
569
+
530
570
  /**
531
571
  * Options for create/update datasource operation.
532
572
  */
533
573
  export declare interface CreateorUpdateDataSourceConnectionOptions extends OperationOptions {
534
574
  /**
535
- * If set to true, Resource will be deleted only if the etag matches.
575
+ * If set to true, Resource will be updated only if the etag matches.
536
576
  */
537
577
  onlyIfUnchanged?: boolean;
538
578
  /**
@@ -546,7 +586,7 @@ export declare interface CreateorUpdateDataSourceConnectionOptions extends Opera
546
586
  */
547
587
  export declare interface CreateorUpdateIndexerOptions extends OperationOptions {
548
588
  /**
549
- * If set to true, Resource will be deleted only if the etag matches.
589
+ * If set to true, Resource will be updated only if the etag matches.
550
590
  */
551
591
  onlyIfUnchanged?: boolean;
552
592
  /** Ignores cache reset requirements. */
@@ -577,7 +617,7 @@ export declare interface CreateOrUpdateIndexOptions extends OperationOptions {
577
617
  */
578
618
  export declare interface CreateOrUpdateSkillsetOptions extends OperationOptions {
579
619
  /**
580
- * If set to true, Resource will be deleted only if the etag matches.
620
+ * If set to true, Resource will be updated only if the etag matches.
581
621
  */
582
622
  onlyIfUnchanged?: boolean;
583
623
  /**
@@ -595,7 +635,7 @@ export declare interface CreateOrUpdateSkillsetOptions extends OperationOptions
595
635
  */
596
636
  export declare interface CreateOrUpdateSynonymMapOptions extends OperationOptions {
597
637
  /**
598
- * If set to true, Resource will be deleted only if the etag matches.
638
+ * If set to true, Resource will be updated only if the etag matches.
599
639
  */
600
640
  onlyIfUnchanged?: boolean;
601
641
  }
@@ -770,6 +810,16 @@ export declare type DefaultCognitiveServicesAccount = BaseCognitiveServicesAccou
770
810
  odatatype: "#Microsoft.Azure.Search.DefaultCognitiveServices";
771
811
  };
772
812
 
813
+ /**
814
+ * Options for delete alias operation.
815
+ */
816
+ export declare interface DeleteAliasOptions extends OperationOptions {
817
+ /**
818
+ * If set to true, Resource will be deleted only if the etag matches.
819
+ */
820
+ onlyIfUnchanged?: boolean;
821
+ }
822
+
773
823
  /**
774
824
  * Options for delete datasource operation.
775
825
  */
@@ -1083,6 +1133,11 @@ export declare class GeographyPoint {
1083
1133
  toJSON(): Record<string, unknown>;
1084
1134
  }
1085
1135
 
1136
+ /**
1137
+ * Options for get alias operation.
1138
+ */
1139
+ export declare type GetAliasOptions = OperationOptions;
1140
+
1086
1141
  /**
1087
1142
  * Options for get datasource operation.
1088
1143
  */
@@ -2468,7 +2523,9 @@ export declare enum KnownOcrSkillLanguage {
2468
2523
  /** Serbian (Latin, Serbia) */
2469
2524
  SrLatn = "sr-Latn",
2470
2525
  /** Slovak */
2471
- Sk = "sk"
2526
+ Sk = "sk",
2527
+ /** Unknown. If the language is explicitly set to "unk", the language will be auto-detected. */
2528
+ Unk = "unk"
2472
2529
  }
2473
2530
 
2474
2531
  /** Known values of {@link PIIDetectionSkillMaskingMode} that the service accepts. */
@@ -2563,9 +2620,9 @@ export declare enum KnownQueryLanguage {
2563
2620
  ArJo = "ar-jo",
2564
2621
  /** Query language value for Danish (Denmark). */
2565
2622
  DaDk = "da-dk",
2566
- /** Query language value for Norwegian (Normway). */
2623
+ /** Query language value for Norwegian (Norway). */
2567
2624
  NoNo = "no-no",
2568
- /** Query language value for Bulgarian (Bulgary). */
2625
+ /** Query language value for Bulgarian (Bulgaria). */
2569
2626
  BgBg = "bg-bg",
2570
2627
  /** Query language value for Croatian (Croatia). */
2571
2628
  HrHr = "hr-hr",
@@ -2671,6 +2728,24 @@ export declare enum KnownRegexFlags {
2671
2728
  UnixLines = "UNIX_LINES"
2672
2729
  }
2673
2730
 
2731
+ /**
2732
+ * Known values for Search Audience
2733
+ */
2734
+ export declare enum KnownSearchAudience {
2735
+ /**
2736
+ * Audience for Azure China
2737
+ */
2738
+ AzureChina = "https://search.azure.cn",
2739
+ /**
2740
+ * Audience for Azure Government
2741
+ */
2742
+ AzureGovernment = "https://search.azure.us",
2743
+ /**
2744
+ * Audience for Azure Public
2745
+ */
2746
+ AzurePublicCloud = "https://search.azure.com"
2747
+ }
2748
+
2674
2749
  /** Known values of {@link SearchIndexerDataSourceType} that the service accepts. */
2675
2750
  export declare enum KnownSearchIndexerDataSourceType {
2676
2751
  /** Indicates an Azure SQL datasource. */
@@ -3422,6 +3497,11 @@ export declare type LimitTokenFilter = BaseTokenFilter & {
3422
3497
  */
3423
3498
  export declare type LineEnding = string;
3424
3499
 
3500
+ /**
3501
+ * Options for list aliases operation.
3502
+ */
3503
+ export declare type ListAliasesOptions = OperationOptions;
3504
+
3425
3505
  /**
3426
3506
  * Options for a list data sources operation.
3427
3507
  */
@@ -3645,7 +3725,8 @@ export declare type OcrSkill = BaseSearchIndexerSkill & {
3645
3725
  * **ro**: Romanian \
3646
3726
  * **sr-Cyrl**: Serbian (Cyrillic, Serbia) \
3647
3727
  * **sr-Latn**: Serbian (Latin, Serbia) \
3648
- * **sk**: Slovak
3728
+ * **sk**: Slovak \
3729
+ * **unk**: Unknown. If the language is explicitly set to "unk", the language will be auto-detected.
3649
3730
  */
3650
3731
  export declare type OcrSkillLanguage = string;
3651
3732
 
@@ -3895,8 +3976,8 @@ export declare type QueryCaptionType = string;
3895
3976
  * **ar-kw**: Query language value for Arabic (Kuwait). \
3896
3977
  * **ar-jo**: Query language value for Arabic (Jordan). \
3897
3978
  * **da-dk**: Query language value for Danish (Denmark). \
3898
- * **no-no**: Query language value for Norwegian (Normway). \
3899
- * **bg-bg**: Query language value for Bulgarian (Bulgary). \
3979
+ * **no-no**: Query language value for Norwegian (Norway). \
3980
+ * **bg-bg**: Query language value for Bulgarian (Bulgaria). \
3900
3981
  * **hr-hr**: Query language value for Croatian (Croatia). \
3901
3982
  * **hr-ba**: Query language value for Croatian (Bosnia and Herzegovina). \
3902
3983
  * **ms-my**: Query language value for Malay (Malaysia). \
@@ -4042,14 +4123,29 @@ export declare interface ScoringProfile {
4042
4123
  /** Defines values for ScoringStatistics. */
4043
4124
  export declare type ScoringStatistics = "local" | "global";
4044
4125
 
4126
+ /** Represents an index alias, which describes a mapping from the alias name to an index. The alias name can be used in place of the index name for supported operations. */
4127
+ export declare interface SearchAlias {
4128
+ /** The name of the alias. */
4129
+ name: string;
4130
+ /** The name of the index this alias maps to. Only one index name may be specified. */
4131
+ indexes: string[];
4132
+ /** The ETag of the alias. */
4133
+ etag?: string;
4134
+ }
4135
+
4045
4136
  /**
4046
4137
  * Class used to perform operations against a search index,
4047
4138
  * including querying documents in the index as well as
4048
4139
  * adding, updating, and removing them.
4049
4140
  */
4050
4141
  export declare class SearchClient<T> implements IndexDocumentsClient<T> {
4142
+ /**
4143
+ * The service version to use when communicating with the service.
4144
+ */
4145
+ readonly serviceVersion: string;
4051
4146
  /**
4052
4147
  * The API version to use when communicating with the service.
4148
+ * @deprecated use {@Link serviceVersion} instead
4053
4149
  */
4054
4150
  readonly apiVersion: string;
4055
4151
  /**
@@ -4174,11 +4270,22 @@ export declare class SearchClient<T> implements IndexDocumentsClient<T> {
4174
4270
  /**
4175
4271
  * Client options used to configure Cognitive Search API requests.
4176
4272
  */
4177
- export declare interface SearchClientOptions extends CommonClientOptions {
4273
+ export declare interface SearchClientOptions extends ExtendedCommonClientOptions {
4178
4274
  /**
4179
4275
  * The API version to use when communicating with the service.
4276
+ * @deprecated use {@Link serviceVersion} instead
4180
4277
  */
4181
4278
  apiVersion?: string;
4279
+ /**
4280
+ * The service version to use when communicating with the service.
4281
+ */
4282
+ serviceVersion?: string;
4283
+ /**
4284
+ * The Audience to use for authentication with Azure Active Directory (AAD). The
4285
+ * audience is not considered when using a shared key.
4286
+ * {@link KnownSearchAudience} can be used interchangeably with audience
4287
+ */
4288
+ audience?: string;
4182
4289
  }
4183
4290
 
4184
4291
  /**
@@ -4336,6 +4443,11 @@ export declare interface SearchIndex {
4336
4443
  etag?: string;
4337
4444
  }
4338
4445
 
4446
+ /**
4447
+ * Search Alias object.
4448
+ */
4449
+ export declare type SearchIndexAlias = SearchAlias;
4450
+
4339
4451
  /**
4340
4452
  * Class to perform operations to manage
4341
4453
  * (create, update, list/delete)
@@ -4345,6 +4457,11 @@ export declare class SearchIndexClient {
4345
4457
  /**
4346
4458
  * The API version to use when communicating with the service.
4347
4459
  */
4460
+ readonly serviceVersion: string;
4461
+ /**
4462
+ * The API version to use when communicating with the service.
4463
+ * @deprecated use {@Link serviceVersion} instead
4464
+ */
4348
4465
  readonly apiVersion: string;
4349
4466
  /**
4350
4467
  * The endpoint of the search service
@@ -4383,6 +4500,13 @@ export declare class SearchIndexClient {
4383
4500
  * @param options - Options to the list index operation.
4384
4501
  */
4385
4502
  listIndexes(options?: ListIndexesOptions): IndexIterator;
4503
+ private listAliasesPage;
4504
+ private listAliasesAll;
4505
+ /**
4506
+ * Lists all aliases available for a search service.
4507
+ * @param options - The options parameters.
4508
+ */
4509
+ listAliases(options?: ListAliasesOptions): AliasIterator;
4386
4510
  private listIndexesNamesPage;
4387
4511
  private listIndexesNamesAll;
4388
4512
  /**
@@ -4448,6 +4572,31 @@ export declare class SearchIndexClient {
4448
4572
  * @param options - Additional optional arguments.
4449
4573
  */
4450
4574
  deleteSynonymMap(synonymMap: string | SynonymMap, options?: DeleteSynonymMapOptions): Promise<void>;
4575
+ /**
4576
+ * Creates a new search alias or updates an alias if it already exists.
4577
+ * @param alias - The definition of the alias to create or update.
4578
+ * @param options - The options parameters.
4579
+ */
4580
+ createOrUpdateAlias(alias: SearchIndexAlias, options?: CreateOrUpdateAliasOptions): Promise<SearchIndexAlias>;
4581
+ /**
4582
+ * Creates a new search alias.
4583
+ * @param alias - The definition of the alias to create.
4584
+ * @param options - The options parameters.
4585
+ */
4586
+ createAlias(alias: SearchIndexAlias, options?: CreateAliasOptions): Promise<SearchIndexAlias>;
4587
+ /**
4588
+ * Deletes a search alias and its associated mapping to an index. This operation is permanent, with no
4589
+ * recovery option. The mapped index is untouched by this operation.
4590
+ * @param alias - Alias/Name name of the alias to delete.
4591
+ * @param options - The options parameters.
4592
+ */
4593
+ deleteAlias(alias: string | SearchIndexAlias, options?: DeleteAliasOptions): Promise<void>;
4594
+ /**
4595
+ * Retrieves an alias definition.
4596
+ * @param aliasName - The name of the alias to retrieve.
4597
+ * @param options - The options parameters.
4598
+ */
4599
+ getAlias(aliasName: string, options?: GetAliasOptions): Promise<SearchIndexAlias>;
4451
4600
  /**
4452
4601
  * Retrieves statistics about an index, such as the count of documents and the size
4453
4602
  * of index storage.
@@ -4478,11 +4627,22 @@ export declare class SearchIndexClient {
4478
4627
  /**
4479
4628
  * Client options used to configure Cognitive Search API requests.
4480
4629
  */
4481
- export declare interface SearchIndexClientOptions extends CommonClientOptions {
4630
+ export declare interface SearchIndexClientOptions extends ExtendedCommonClientOptions {
4482
4631
  /**
4483
4632
  * The API version to use when communicating with the service.
4633
+ * @deprecated use {@Link serviceVersion} instead
4484
4634
  */
4485
4635
  apiVersion?: string;
4636
+ /**
4637
+ * The service version to use when communicating with the service.
4638
+ */
4639
+ serviceVersion?: string;
4640
+ /**
4641
+ * The Audience to use for authentication with Azure Active Directory (AAD). The
4642
+ * audience is not considered when using a shared key.
4643
+ * {@link KnownSearchAudience} can be used interchangeably with audience
4644
+ */
4645
+ audience?: string;
4486
4646
  }
4487
4647
 
4488
4648
  /**
@@ -4569,6 +4729,11 @@ export declare class SearchIndexerClient {
4569
4729
  /**
4570
4730
  * The API version to use when communicating with the service.
4571
4731
  */
4732
+ readonly serviceVersion: string;
4733
+ /**
4734
+ * The API version to use when communicating with the service.
4735
+ * @deprecated use {@Link serviceVersion} instead
4736
+ */
4572
4737
  readonly apiVersion: string;
4573
4738
  /**
4574
4739
  * The endpoint of the search service
@@ -4730,11 +4895,22 @@ export declare class SearchIndexerClient {
4730
4895
  /**
4731
4896
  * Client options used to configure Cognitive Search API requests.
4732
4897
  */
4733
- export declare interface SearchIndexerClientOptions extends CommonClientOptions {
4898
+ export declare interface SearchIndexerClientOptions extends ExtendedCommonClientOptions {
4734
4899
  /**
4735
4900
  * The API version to use when communicating with the service.
4901
+ * @deprecated use {@Link serviceVersion} instead
4736
4902
  */
4737
4903
  apiVersion?: string;
4904
+ /**
4905
+ * The service version to use when communicating with the service.
4906
+ */
4907
+ serviceVersion?: string;
4908
+ /**
4909
+ * The Audience to use for authentication with Azure Active Directory (AAD). The
4910
+ * audience is not considered when using a shared key.
4911
+ * {@link KnownSearchAudience} can be used interchangeably with audience
4912
+ */
4913
+ audience?: string;
4738
4914
  }
4739
4915
 
4740
4916
  /** Represents information about the entity (such as Azure SQL table or CosmosDB collection) that will be indexed. */
@@ -4940,7 +5116,7 @@ export declare interface SearchIndexerLimits {
4940
5116
  /**
4941
5117
  * Contains the possible cases for Skill.
4942
5118
  */
4943
- export declare type SearchIndexerSkill = ConditionalSkill | KeyPhraseExtractionSkill | OcrSkill | ImageAnalysisSkill | LanguageDetectionSkill | ShaperSkill | MergeSkill | EntityRecognitionSkill | SentimentSkill | SplitSkill | PIIDetectionSkill | EntityRecognitionSkillV3 | EntityLinkingSkill | SentimentSkillV3 | CustomEntityLookupSkill | TextTranslationSkill | DocumentExtractionSkill | WebApiSkill;
5119
+ export declare type SearchIndexerSkill = ConditionalSkill | KeyPhraseExtractionSkill | OcrSkill | ImageAnalysisSkill | LanguageDetectionSkill | ShaperSkill | MergeSkill | EntityRecognitionSkill | SentimentSkill | SplitSkill | PIIDetectionSkill | EntityRecognitionSkillV3 | EntityLinkingSkill | SentimentSkillV3 | CustomEntityLookupSkill | TextTranslationSkill | DocumentExtractionSkill | WebApiSkill | AzureMachineLearningSkill;
4944
5120
 
4945
5121
  /**
4946
5122
  * A list of skills.
@@ -5731,6 +5907,8 @@ export declare type SentimentSkillV3 = BaseSearchIndexerSkill & {
5731
5907
 
5732
5908
  /** Represents service-level resource counters and quotas. */
5733
5909
  export declare interface ServiceCounters {
5910
+ /** Total number of aliases. */
5911
+ aliasCounter?: ResourceCounter;
5734
5912
  /** Total number of documents across all indexes in the service. */
5735
5913
  documentCounter: ResourceCounter;
5736
5914
  /** Total number of indexes. */
package/CHANGELOG.md DELETED
@@ -1,188 +0,0 @@
1
- # Release History
2
-
3
- ## 11.3.0-beta.5 (2021-11-09)
4
-
5
- ### Features Added
6
-
7
- - Added `semanticConfiguration` property to `SearchRequest` object.
8
- - Several new languages are added to the `KnownQueryLanguage` object.
9
- - Added `semanticSettings` property to `SearchIndex` object.
10
-
11
- ### Breaking Changes
12
-
13
- - Renamed `IndexerCurrentState` property to `IndexerState` property.
14
- - Renamed `AllDocsInitialChangeTrackingState` property to `AllDocumentsInitialChangeTrackingState` property.
15
- - Renamed `AllDocsFinalChangeTrackingState` property to `AllDocumentsFinalChangeTrackingState` property.
16
- - Renamed `ResetDocsInitialChangeTrackingState` property to `ResetDocumentsInitialChangeTrackingState` property.
17
- - Renamed `ResetDocsFinalChangeTrackingState` property to `ResetDocumentsFinalChangeTrackingState` property.
18
- - Renamed `SkillNames` property to `ResetSkillsOptions` (with a `SkillNames` property)
19
- - Renamed `ResetDocs` method to `ResetDocuments` in the SDK client.
20
-
21
- ### Bugs Fixed
22
-
23
- - Fixed the issue with the presence of recursive structure while uploading documents. Please refer [#15656](https://github.com/Azure/azure-sdk-for-js/issues/15656) for further details.
24
-
25
- ## 11.3.0-beta.4 (2021-10-05)
26
-
27
- ### Features Added
28
-
29
- - Added properties `currentState` & `statusDetail` to the `IndexerExecutionResult` object.
30
- - Added operations `resetDocs` & `resetSkills` to the `SearchIndexerClient` class.
31
-
32
- ### Breaking Changes
33
-
34
- - Changed property `ignoreResetRequirements` to `skipIndexerResetRequirementForCache` in `CreateorUpdateDataSourceConnectionOptions`, `CreateorUpdateIndexerOptions` & `CreateOrUpdateSkillsetOptions` objects.
35
- - Changed the type of `answers` property from `Answers` to `QueryAnswerType`, in the `SearchRequest` object.
36
- - Changed the type of `captions` property from `Captions` to `QueryCaptionType`, in the `SearchRequest` object.
37
- - Changed the type of `speller` property from `Speller` to `QuerySpellerType`, in the `SearchRequest` object.
38
- - Changed the underlying dependency of the SDK from `core-http` to `core-rest-pipeline` package.
39
-
40
- ## 11.3.0-beta.3 (2021-09-07)
41
-
42
- ### Features Added
43
-
44
- - Added a new property `normalizerName` to the `AnalyzeRequest` object.
45
- - Added 2 new properties `captions` & `semanticFields` to the `SearchRequestOptions` object.
46
-
47
- ## 11.3.0-beta.2 (2021-08-10)
48
-
49
- ### Features Added
50
-
51
- - Added a new parameter `ignoreResetRequirements` for the `createOrUpdate` operation of Data Sources.
52
- - Added new parameters `ignoreResetRequirements` & `disableCacheReprocessingChangeDetection` for the `createOrUpdate` operation of Indexers and Skillsets.
53
-
54
- ### Bugs Fixed
55
-
56
- - Converted the complex fields correctly within the Search Fields. Please refer [#16489](https://github.com/Azure/azure-sdk-for-js/issues/16489) for more details.
57
- - Fixed the typos `anayzerName` to `analyzerName` and `normalizerNames` to `normalizerName` in `convertFieldsToPublic` method of `serviceUtils.ts`.
58
-
59
- ### Other Changes
60
-
61
- - Removed the `| null` from the definitions of the optional values. Please refer [#16694](https://github.com/Azure/azure-sdk-for-js/pull/16694) for more details.
62
-
63
- ## 11.3.0-beta.1 (2021-07-07)
64
-
65
- - With the dropping of support for Node.js versions that are no longer in LTS, the dependency on `@types/node` has been updated to version 12. Read our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
66
- - Updated our internal core package dependencies to their latest versions in order to add support for Opentelemetry 1.0.0 which is compatible with the latest versions of our other client libraries.
67
- - Changed TS compilation target to ES2017 in order to produce smaller bundles and use more native platform features
68
- - Regenerated the search SDK with the latest swaggers that includes the following changes:
69
-
70
- - Support for `TokenCredential` has been added. With this addition, the Search SDK supports authentication via AAD.
71
- - Identity types - `SearchIndexerDataNoneIdentity` & `SearchIndexerDataUserAssignedIdentity` have been added.
72
- - The following new skills have been added:
73
- - SentimentSkill(V3)
74
- - EntityLinkingSkill(V3)
75
- - EntityRecognitionSkill(V3)
76
- - PIIDetectionSkill
77
- - A new property `lineEnding` has been added to the skill `OcrSkill`.
78
-
79
- ## 11.2.0 (2021-06-08)
80
-
81
- The list of changes in 11.2.0 since 11.1.0 & 11.2.0-beta.2 are provided below:
82
-
83
- **Changes since 11.1.0**
84
-
85
- - Added support for Knowledge Store feature through the new `SearchIndexerKnowledgeStore` in the `SearchIndexerSkillset` object.
86
- - The `skillsetCounter` property in `ServiceCounters` object has been made optional.
87
- - Added Support for new datasource `adlsgen2`. Please refer [#14620](https://github.com/Azure/azure-sdk-for-js/pull/14620) for further details.
88
- - Added Support for new skills such as `CustomEntityLookupSkill`, `DocumentExtractionSkill`, etc. Please refer [#14620](https://github.com/Azure/azure-sdk-for-js/pull/14620) for further details.
89
-
90
- **Changes since 11.2.0-beta.2**
91
-
92
- - Removed Support for Semantic Search and introduced new properties in `SearchOptions`, `SearchRequest`, `SearchResult` and `SearchDocumentsResult` objects.
93
- - Removed Support for normalizers `LexicalNormalizer` & `CustomNormalizer`. Please refer [#14620](https://github.com/Azure/azure-sdk-for-js/pull/14620) for further details.
94
-
95
- ## 11.2.0-beta.2 (2021-05-11)
96
-
97
- - Added Support for Semantic Search and introduced new properties in `SearchOptions`, `SearchRequest`, `SearchResult` and `SearchDocumentsResult` objects.
98
- - Added support for Knowledge Store feature through the new `SearchIndexerKnowledgeStore` in the `SearchIndexerSkillset` object.
99
- - The `skillsetCounter` property in `ServiceCounters` object has been made optional.
100
-
101
- ## 11.2.0-beta.1 (2021-04-06)
102
-
103
- - Added Support for new skills such as `CustomEntityLookupSkill`, `DocumentExtractionSkill`, etc. Please refer [#14620](https://github.com/Azure/azure-sdk-for-js/pull/14620) for further details.
104
- - Added Support for new datasource `adlsgen2`. Please refer [#14620](https://github.com/Azure/azure-sdk-for-js/pull/14620) for further details.
105
- - Added Support for normalizers `LexicalNormalizer` & `CustomNormalizer`. Please refer [#14620](https://github.com/Azure/azure-sdk-for-js/pull/14620) for further details.
106
-
107
- ## 11.1.0 (2021-02-11)
108
-
109
- - The list of changes in 11.1.0 since 11.0.3 & 11.1.0-beta.2 are provided below:
110
-
111
- **Changes since 11.0.3**
112
-
113
- - Added Batching ability to the search SDK. The `SearchIndexingBufferedSender` class enables the user to perform indexing documents in batch mode. There are several user configurable properties such as `autoFlush`, `flushWindowInMs`, `throttlingDelayInMs`, etc.
114
- - The types `BlobIndexerDataToExtract`, `BlobIndexerImageAction`, `BlobIndexerParsingMode`, `BlobIndexerPDFTextRotationAlgorithm` have changed from union of string literals to string. This is to support the service definition for these types to be extensible enums. The documentation on methods that use these have been updated with known values that can be used for these types.
115
-
116
- **Changes since 11.1.0-beta.2**
117
-
118
- - [Breaking] Hidden the constructor of `SearchIndexingBufferedSender` and made it to an interface. Please refer [#11785](https://github.com/Azure/azure-sdk-for-js/pull/11785) for further details.
119
- - Added `encryptionKey` property to `SearchIndexerDataSource`, `SearchIndexer` and `SearchIndexerSkillSet` objects. Please refer [#12275](https://github.com/Azure/azure-sdk-for-js/pull/12275) for further details.
120
- - Added user configurable properties such as `flushWindowInMs`, `initialBatchActionCount`, `maxRetries`, etc to the `SearchIndexingBufferedSenderOptions` object. Please refer [#12297](https://github.com/Azure/azure-sdk-for-js/pull/12297) for further details.
121
-
122
- ## 11.1.0-beta.1 (2020-10-05)
123
-
124
- - Added Batching ability to the search SDK. Please refer [#11544](https://github.com/Azure/azure-sdk-for-js/pull/11544) for further details.
125
- - Regenerated the search SDK using the latest swaggers. Please refer [#11533](https://github.com/Azure/azure-sdk-for-js/pull/11533) for further details.
126
- - Fixed the testcases to ensure success in CI. Please refer [#11518](https://github.com/Azure/azure-sdk-for-js/pull/11518) for further details.
127
- - Added more test cases for odata scenario. Please refer [#11321](https://github.com/Azure/azure-sdk-for-js/pull/11321) for further details.
128
-
129
- ## 11.0.3 (2020-08-04)
130
-
131
- - Fixed the parented tracing span in the searchClient.search API. Please refer [#10442](https://github.com/Azure/azure-sdk-for-js/issues/10442) for further details.
132
-
133
- ## 11.0.2 (2020-07-31)
134
-
135
- - Fixed the samples in the Readme File. Please refer [#10383](https://github.com/Azure/azure-sdk-for-js/pull/10383) for further details.
136
-
137
- ## 11.0.1 (2020-07-20)
138
-
139
- - [BugFix] Set the correct continuation token in the search documrnts API. Please refer [#10146](https://github.com/Azure/azure-sdk-for-js/pull/10146) for further details.
140
-
141
- ## 11.0.0 (2020-07-06)
142
-
143
- - Set `ConnectionString` value to `<unchanged>` in `SearchIndexerDataSourceConnection`, if the value is not set by the user.
144
- - [Breaking] In Suggest API & Search API return values, a new property called `document` is introduced. All user-defined fields are moved inside this `document` property.
145
- - [Breaking] In `analyzeText` API, the `text` parameter is moved from method level to inside `options` bag.
146
- - [Breaking] In `search` API, `includeTotalResultCount` property is renamed to `includeTotalCount`.
147
- - [Breaking] In `ServiceCounters`, the `skillsetCounter` property has been removed.
148
- - [Breaking] Modified the names of several properties. Please refer [#9321](https://github.com/Azure/azure-sdk-for-js/issues/9321) for a detailed list of renames.
149
-
150
- ## 1.0.0-preview.4 (2020-06-08)
151
-
152
- - [Breaking] Changed `ListIndexes` operation to a pageable operation.
153
- - [Breaking] Added `onlyIfUnchanged` parameter for CreateOrUpdate and Delete operations.
154
- - [Breaking] Removed `$select` property for the List operations.
155
- - [Breaking] Refactored `SearchServiceClient` and split it to `SearchIndexClient` and `SearchIndexerClient` and changed `SearchIndexClient` class to `SearchClient` class.
156
- - [Breaking] Moved non-optional parameters from options bag.
157
- - [Breaking] Renamed `countDocuments` method to `getDocumentsCount` method.
158
- - [Breaking] In `search` method, moved the `searchText` parameter from the options bag to method parameter.
159
- - [Breaking] In `indexDocuments` method, the options parameter is renamed to `IndexDocumentsOptions`.
160
- - [Breaking] Modified `deleteDocuments` method to get documents as a parameter.
161
- - [Breaking] In `getIndexStatistics` method, renamed the return type from `GetIndexStatisticsResult` to `SearchIndexStatistics`.
162
- - [Breaking] In `getServiceStatistics` method, renamed the return type from `ServiceStatistics` to `SearchServiceStatistics`.
163
- - [Breaking] Modified `DataSource` model name to `DataSourceConnection`. Changed all references in the method names, parameters, etc.
164
- - [Breaking] Renamed `SimpleDataType` model to `SearchFieldDataType` model.
165
- - [Breaking] Modified the names of several models & parameters. Please refer [#8984](https://github.com/Azure/azure-sdk-for-js/issues/8984), [#9037](https://github.com/Azure/azure-sdk-for-js/issues/9037) and [#8383](https://github.com/Azure/azure-sdk-for-js/issues/8383) for a detailed list of renames.
166
- - Added separate methods for getting just names such as `listIndexesNames`, `listSynonymMapsNames`, etc.
167
- - Added `getSearchClient` method to the `SearchIndexClient` class.
168
-
169
- ## 1.0.0-preview.3 (2020-05-05)
170
-
171
- - Added support for Indexers API (Create, Get, List, etc.)
172
- - Added support for Datasources API.(Create, Get, List, etc.)
173
- - Fixed a bug where GeographyPoints were serialized incorrectly causing latitude and longitude to be flipped.
174
-
175
- ## 1.0.0-preview.2 (2020-04-06)
176
-
177
- - [Breaking] Package renamed to `@azure/search-documents` and version number reset to `1.0.0-preview.2`.
178
- - Support for index management operations using the `SearchServiceClient`.
179
- - [Breaking] `indexDocuments` on `SearchIndexClient` now takes an `IndexDocumentsBatch` object instead of a raw action array. This new type helps compose an array of actions to be performed on the index.
180
- - [Breaking] In `SearchIndexClient`, removed options `mergeIfExists` and `uploadIfNotExists` on `uploadDocuments` and `mergeDocuments` and replaced them with new helper `mergeOrUploadDocuments`.
181
- - The type `IndexAction` was renamed to `IndexDocumentsAction`.
182
- - [Breaking] Removed `SearchApiKeyCredential` and replaced with `AzureKeyCredential`.
183
- - [Breaking] Search results accessed `byPage` now have an opaque `continuationToken` in place of `nextLink` and `nextPageParameters`.
184
-
185
- ## 11.0.0-preview.1 (2020-03-09)
186
-
187
- - Initial implementation of the data-plane Cognitive Search Client. The version number starts at 11 to align with client libraries in other languages.
188
- - This first preview has support for document operations on an index, such as querying and document management.