Skip to content

Commit

Permalink
Custom Code Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sarangan12 committed Jan 22, 2021
1 parent 010c6e2 commit 0395911
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 46 deletions.
35 changes: 34 additions & 1 deletion sdk/search/search-documents/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export {
} from "./generated/data/models";
export {
RegexFlags,
KnownRegexFlags,
LuceneStandardAnalyzer,
StopAnalyzer,
MappingCharFilter,
Expand Down Expand Up @@ -187,6 +188,7 @@ export {
AnalyzeResult,
AnalyzedTokenInfo,
ConditionalSkill,
CustomEntityLookupSkill,
KeyPhraseExtractionSkill,
OcrSkill,
ImageAnalysisSkill,
Expand All @@ -199,20 +201,31 @@ export {
TextTranslationSkill,
WebApiSkill,
SentimentSkillLanguage,
KnownSentimentSkillLanguage,
SplitSkillLanguage,
KnownSplitSkillLanguage,
TextSplitMode,
KnownTextSplitMode,
TextTranslationSkillLanguage,
KnownTextTranslationSkillLanguage,
DefaultCognitiveServicesAccount,
CognitiveServicesAccountKey,
InputFieldMappingEntry,
OutputFieldMappingEntry,
EntityCategory,
KnownEntityCategory,
EntityRecognitionSkillLanguage,
KnownEntityRecognitionSkillLanguage,
ImageAnalysisSkillLanguage,
KnownImageAnalysisSkillLanguage,
ImageDetail,
KnownImageDetail,
VisualFeature,
KnownVisualFeature,
KeyPhraseExtractionSkillLanguage,
KnownKeyPhraseExtractionSkillLanguage,
OcrSkillLanguage,
KnownOcrSkillLanguage,
FieldMapping,
IndexingParameters,
IndexingSchedule,
Expand All @@ -226,20 +239,40 @@ export {
SearchIndexerWarning,
SearchIndexerDataContainer,
SearchIndexerDataSourceType,
KnownSearchIndexerDataSourceType,
SoftDeleteColumnDeletionDetectionPolicy,
SqlIntegratedChangeTrackingPolicy,
HighWaterMarkChangeDetectionPolicy,
ServiceCounters,
ServiceLimits,
ResourceCounter,
LexicalAnalyzerName,
KnownLexicalAnalyzerName,
ClassicSimilarity,
BM25Similarity,
IndexingParametersConfiguration,
BlobIndexerDataToExtract,
KnownBlobIndexerDataToExtract,
IndexerExecutionEnvironment,
BlobIndexerImageAction,
KnownBlobIndexerImageAction,
BlobIndexerParsingMode,
BlobIndexerPDFTextRotationAlgorithm
KnownBlobIndexerParsingMode,
BlobIndexerPDFTextRotationAlgorithm,
KnownBlobIndexerPDFTextRotationAlgorithm,
TokenFilter as BaseTokenFilter,
Similarity,
LexicalTokenizer as BaseLexicalTokenizer,
CognitiveServicesAccount as BaseCognitiveServicesAccount,
SearchIndexerSkill as BaseSearchIndexerSkill,
ScoringFunction as BaseScoringFunction,
DataChangeDetectionPolicy as BaseDataChangeDetectionPolicy,
LexicalAnalyzer as BaseLexicalAnalyzer,
CharFilter as BaseCharFilter,
DataDeletionDetectionPolicy as BaseDataDeletionDetectionPolicy,
CustomEntityLookupSkillLanguage,
KnownCustomEntityLookupSkillLanguage,
CustomEntity,
CustomEntityAlias
} from "./generated/service/models";
export { AzureKeyCredential } from "@azure/core-auth";
2 changes: 1 addition & 1 deletion sdk/search/search-documents/src/searchClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export class SearchClient<T> {
pipeline.requestPolicyFactories.unshift(odataMetadataPolicy("none"));
}

this.client = new GeneratedClient(this.apiVersion, this.endpoint, this.indexName, pipeline);
this.client = new GeneratedClient(this.endpoint, this.indexName, this.apiVersion, pipeline);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions sdk/search/search-documents/src/searchIndexClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class SearchIndexClient {
pipeline.requestPolicyFactories.unshift(odataMetadataPolicy("minimal"));
}

this.client = new GeneratedClient(this.apiVersion, this.endpoint, pipeline);
this.client = new GeneratedClient(this.endpoint, this.apiVersion, pipeline);
}

private async *listIndexesPage(
Expand Down Expand Up @@ -473,7 +473,7 @@ export class SearchIndexClient {
const etag =
typeof index === "string" ? undefined : options.onlyIfUnchanged ? index.etag : undefined;

await this.client.indexes.deleteMethod(indexName, {
await this.client.indexes.delete(indexName, {
...operationOptionsToRequestOptionsBase(updatedOptions),
ifMatch: etag
});
Expand Down Expand Up @@ -507,7 +507,7 @@ export class SearchIndexClient {
? synonymMap.etag
: undefined;

await this.client.synonymMaps.deleteMethod(synonymMapName, {
await this.client.synonymMaps.delete(synonymMapName, {
...operationOptionsToRequestOptionsBase(updatedOptions),
ifMatch: etag
});
Expand Down
8 changes: 4 additions & 4 deletions sdk/search/search-documents/src/searchIndexerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class SearchIndexerClient {
pipeline.requestPolicyFactories.unshift(odataMetadataPolicy("minimal"));
}

this.client = new GeneratedClient(this.apiVersion, this.endpoint, pipeline);
this.client = new GeneratedClient(this.endpoint, this.apiVersion, pipeline);
}

/**
Expand Down Expand Up @@ -574,7 +574,7 @@ export class SearchIndexerClient {
? indexer.etag
: undefined;

await this.client.indexers.deleteMethod(indexerName, {
await this.client.indexers.delete(indexerName, {
...operationOptionsToRequestOptionsBase(updatedOptions),
ifMatch: etag
});
Expand Down Expand Up @@ -612,7 +612,7 @@ export class SearchIndexerClient {
? dataSourceConnection.etag
: undefined;

await this.client.dataSources.deleteMethod(dataSourceConnectionName, {
await this.client.dataSources.delete(dataSourceConnectionName, {
...operationOptionsToRequestOptionsBase(updatedOptions),
ifMatch: etag
});
Expand Down Expand Up @@ -646,7 +646,7 @@ export class SearchIndexerClient {
? skillset.etag
: undefined;

await this.client.skillsets.deleteMethod(skillsetName, {
await this.client.skillsets.delete(skillsetName, {
...operationOptionsToRequestOptionsBase(updatedOptions),
ifMatch: etag
});
Expand Down
30 changes: 16 additions & 14 deletions sdk/search/search-documents/src/serviceModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ import {
ServiceLimits,
FieldMapping,
IndexingParameters,
IndexingSchedule
IndexingSchedule,
CustomEntityLookupSkill
} from "./generated/service/models";

import { PagedAsyncIterableIterator } from "@azure/core-paging";
Expand Down Expand Up @@ -415,7 +416,7 @@ export interface CustomAnalyzer {
* The name of the tokenizer to use to divide continuous text into a sequence of tokens, such as
* breaking a sentence into words. KnownTokenizerNames is an enum containing known values.
*/
tokenizerName: string;
tokenizer: string;
/**
* A list of token filters used to filter out or modify the tokens generated by a tokenizer. For
* example, you can specify a lowercase filter that converts all characters to lowercase. The
Expand Down Expand Up @@ -454,7 +455,8 @@ export type SearchIndexerSkill =
| SentimentSkill
| SplitSkill
| TextTranslationSkill
| WebApiSkill;
| WebApiSkill
| CustomEntityLookupSkill;

/**
* Contains the possible cases for CognitiveServicesAccount.
Expand Down Expand Up @@ -850,7 +852,7 @@ export interface SynonymMap {
* keys is not available for free search services, and is only available for paid services
* created on or after January 1, 2019.
*/
encryptionKey?: SearchResourceEncryptionKey;
encryptionKey?: SearchResourceEncryptionKey | null;
/**
* The ETag of the synonym map.
*/
Expand Down Expand Up @@ -899,7 +901,7 @@ export interface SearchIndex {
/**
* Options to control Cross-Origin Resource Sharing (CORS) for the index.
*/
corsOptions?: CorsOptions;
corsOptions?: CorsOptions | null;
/**
* The suggesters for the index.
*/
Expand Down Expand Up @@ -930,7 +932,7 @@ export interface SearchIndex {
* keys is not available for free search services, and is only available for paid services
* created on or after January 1, 2019.
*/
encryptionKey?: SearchResourceEncryptionKey;
encryptionKey?: SearchResourceEncryptionKey | null;
/**
* The type of similarity algorithm to be used when scoring and ranking the documents matching a
* search query. The similarity algorithm can only be defined at index creation time and cannot
Expand Down Expand Up @@ -970,11 +972,11 @@ export interface SearchIndexer {
/**
* The schedule for this indexer.
*/
schedule?: IndexingSchedule;
schedule?: IndexingSchedule | null;
/**
* Parameters for indexer execution.
*/
parameters?: IndexingParameters;
parameters?: IndexingParameters | null;
/**
* Defines mappings between fields in the data source and corresponding target fields in the
* index.
Expand All @@ -987,7 +989,7 @@ export interface SearchIndexer {
/**
* A value indicating whether the indexer is disabled. Default is false. Default value: false.
*/
isDisabled?: boolean;
isDisabled?: boolean | null;
/**
* The ETag of the indexer.
*/
Expand All @@ -1003,7 +1005,7 @@ export interface SearchIndexer {
* customer-managed keys is not available for free search services, and is only available for
* paid services created on or after January 1, 2019.
*/
encryptionKey?: SearchResourceEncryptionKey;
encryptionKey?: SearchResourceEncryptionKey | null;
}

/**
Expand Down Expand Up @@ -1072,7 +1074,7 @@ export interface SearchIndexerSkillset {
* definition will be unaffected. Encryption with customer-managed keys is not available for free
* search services, and is only available for paid services created on or after January 1, 2019.
*/
encryptionKey?: SearchResourceEncryptionKey;
encryptionKey?: SearchResourceEncryptionKey | null;
}

/**
Expand Down Expand Up @@ -1786,11 +1788,11 @@ export interface SearchIndexerDataSourceConnection {
/**
* The data change detection policy for the datasource.
*/
dataChangeDetectionPolicy?: DataChangeDetectionPolicy;
dataChangeDetectionPolicy?: DataChangeDetectionPolicy | null;
/**
* The data deletion detection policy for the datasource.
*/
dataDeletionDetectionPolicy?: DataDeletionDetectionPolicy;
dataDeletionDetectionPolicy?: DataDeletionDetectionPolicy | null;
/**
* The ETag of the DataSource.
*/
Expand All @@ -1806,6 +1808,6 @@ export interface SearchIndexerDataSourceConnection {
* available for free search services, and is only available for paid services created on or
* after January 1, 2019.
*/
encryptionKey?: SearchResourceEncryptionKey;
encryptionKey?: SearchResourceEncryptionKey | null;
}
// END manually modified generated interfaces
Loading

0 comments on commit 0395911

Please sign in to comment.