@azure/search-documents 12.2.0-alpha.20250718.1 → 12.2.0-alpha.20250722.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/browser/generated/data/models/mappers.js +32 -13
- package/dist/browser/generated/data/models/mappers.js.map +1 -1
- package/dist/browser/generated/data/operations/documents.js +1 -0
- package/dist/browser/generated/data/operations/documents.js.map +1 -1
- package/dist/browser/generated/data/searchClient.js +13 -3
- package/dist/browser/generated/data/searchClient.js.map +1 -1
- package/dist/browser/generated/service/models/mappers.js +687 -297
- package/dist/browser/generated/service/models/mappers.js.map +1 -1
- package/dist/browser/generated/service/operations/aliases.js +1 -0
- package/dist/browser/generated/service/operations/aliases.js.map +1 -1
- package/dist/browser/generated/service/operations/dataSources.js +1 -0
- package/dist/browser/generated/service/operations/dataSources.js.map +1 -1
- package/dist/browser/generated/service/operations/indexers.js +1 -0
- package/dist/browser/generated/service/operations/indexers.js.map +1 -1
- package/dist/browser/generated/service/operations/indexes.js +1 -0
- package/dist/browser/generated/service/operations/indexes.js.map +1 -1
- package/dist/browser/generated/service/operations/skillsets.js +1 -0
- package/dist/browser/generated/service/operations/skillsets.js.map +1 -1
- package/dist/browser/generated/service/operations/synonymMaps.js +1 -0
- package/dist/browser/generated/service/operations/synonymMaps.js.map +1 -1
- package/dist/browser/generated/service/searchServiceClient.js +15 -3
- package/dist/browser/generated/service/searchServiceClient.js.map +1 -1
- package/dist/browser/geographyPoint.js +8 -0
- package/dist/browser/geographyPoint.js.map +1 -1
- package/dist/browser/indexDocumentsBatch.js +20 -4
- package/dist/browser/indexDocumentsBatch.js.map +1 -1
- package/dist/browser/searchClient.js +139 -83
- package/dist/browser/searchClient.js.map +1 -1
- package/dist/browser/searchIndexClient.js +141 -146
- package/dist/browser/searchIndexClient.js.map +1 -1
- package/dist/browser/searchIndexerClient.js +80 -36
- package/dist/browser/searchIndexerClient.js.map +1 -1
- package/dist/browser/searchIndexingBufferedSender.js +51 -12
- package/dist/browser/searchIndexingBufferedSender.js.map +1 -1
- package/dist/browser/serviceUtils.js +159 -54
- package/dist/browser/serviceUtils.js.map +1 -1
- package/dist/browser/walk.js +9 -12
- package/dist/browser/walk.js.map +1 -1
- package/dist/commonjs/generated/data/models/mappers.js +32 -13
- package/dist/commonjs/generated/data/models/mappers.js.map +1 -1
- package/dist/commonjs/generated/data/operations/documents.js +1 -0
- package/dist/commonjs/generated/data/operations/documents.js.map +1 -1
- package/dist/commonjs/generated/data/searchClient.js +13 -3
- package/dist/commonjs/generated/data/searchClient.js.map +1 -1
- package/dist/commonjs/generated/service/models/mappers.js +687 -297
- package/dist/commonjs/generated/service/models/mappers.js.map +1 -1
- package/dist/commonjs/generated/service/operations/aliases.js +1 -0
- package/dist/commonjs/generated/service/operations/aliases.js.map +1 -1
- package/dist/commonjs/generated/service/operations/dataSources.js +1 -0
- package/dist/commonjs/generated/service/operations/dataSources.js.map +1 -1
- package/dist/commonjs/generated/service/operations/indexers.js +1 -0
- package/dist/commonjs/generated/service/operations/indexers.js.map +1 -1
- package/dist/commonjs/generated/service/operations/indexes.js +1 -0
- package/dist/commonjs/generated/service/operations/indexes.js.map +1 -1
- package/dist/commonjs/generated/service/operations/skillsets.js +1 -0
- package/dist/commonjs/generated/service/operations/skillsets.js.map +1 -1
- package/dist/commonjs/generated/service/operations/synonymMaps.js +1 -0
- package/dist/commonjs/generated/service/operations/synonymMaps.js.map +1 -1
- package/dist/commonjs/generated/service/searchServiceClient.js +15 -3
- package/dist/commonjs/generated/service/searchServiceClient.js.map +1 -1
- package/dist/commonjs/geographyPoint.js +8 -0
- package/dist/commonjs/geographyPoint.js.map +1 -1
- package/dist/commonjs/indexDocumentsBatch.js +20 -4
- package/dist/commonjs/indexDocumentsBatch.js.map +1 -1
- package/dist/commonjs/searchClient.js +139 -82
- package/dist/commonjs/searchClient.js.map +1 -1
- package/dist/commonjs/searchIndexClient.js +141 -145
- package/dist/commonjs/searchIndexClient.js.map +1 -1
- package/dist/commonjs/searchIndexerClient.js +80 -35
- package/dist/commonjs/searchIndexerClient.js.map +1 -1
- package/dist/commonjs/searchIndexingBufferedSender.js +51 -12
- package/dist/commonjs/searchIndexingBufferedSender.js.map +1 -1
- package/dist/commonjs/serviceUtils.js +159 -54
- package/dist/commonjs/serviceUtils.js.map +1 -1
- package/dist/commonjs/walk.js +9 -12
- package/dist/commonjs/walk.js.map +1 -1
- package/dist/esm/generated/data/models/mappers.js +32 -13
- package/dist/esm/generated/data/models/mappers.js.map +1 -1
- package/dist/esm/generated/data/operations/documents.js +1 -0
- package/dist/esm/generated/data/operations/documents.js.map +1 -1
- package/dist/esm/generated/data/searchClient.js +13 -3
- package/dist/esm/generated/data/searchClient.js.map +1 -1
- package/dist/esm/generated/service/models/mappers.js +687 -297
- package/dist/esm/generated/service/models/mappers.js.map +1 -1
- package/dist/esm/generated/service/operations/aliases.js +1 -0
- package/dist/esm/generated/service/operations/aliases.js.map +1 -1
- package/dist/esm/generated/service/operations/dataSources.js +1 -0
- package/dist/esm/generated/service/operations/dataSources.js.map +1 -1
- package/dist/esm/generated/service/operations/indexers.js +1 -0
- package/dist/esm/generated/service/operations/indexers.js.map +1 -1
- package/dist/esm/generated/service/operations/indexes.js +1 -0
- package/dist/esm/generated/service/operations/indexes.js.map +1 -1
- package/dist/esm/generated/service/operations/skillsets.js +1 -0
- package/dist/esm/generated/service/operations/skillsets.js.map +1 -1
- package/dist/esm/generated/service/operations/synonymMaps.js +1 -0
- package/dist/esm/generated/service/operations/synonymMaps.js.map +1 -1
- package/dist/esm/generated/service/searchServiceClient.js +15 -3
- package/dist/esm/generated/service/searchServiceClient.js.map +1 -1
- package/dist/esm/geographyPoint.js +8 -0
- package/dist/esm/geographyPoint.js.map +1 -1
- package/dist/esm/indexDocumentsBatch.js +20 -4
- package/dist/esm/indexDocumentsBatch.js.map +1 -1
- package/dist/esm/searchClient.js +139 -83
- package/dist/esm/searchClient.js.map +1 -1
- package/dist/esm/searchIndexClient.js +141 -146
- package/dist/esm/searchIndexClient.js.map +1 -1
- package/dist/esm/searchIndexerClient.js +80 -36
- package/dist/esm/searchIndexerClient.js.map +1 -1
- package/dist/esm/searchIndexingBufferedSender.js +51 -12
- package/dist/esm/searchIndexingBufferedSender.js.map +1 -1
- package/dist/esm/serviceUtils.js +159 -54
- package/dist/esm/serviceUtils.js.map +1 -1
- package/dist/esm/walk.js +9 -12
- package/dist/esm/walk.js.map +1 -1
- package/dist/react-native/generated/data/models/mappers.js +32 -13
- package/dist/react-native/generated/data/models/mappers.js.map +1 -1
- package/dist/react-native/generated/data/operations/documents.js +1 -0
- package/dist/react-native/generated/data/operations/documents.js.map +1 -1
- package/dist/react-native/generated/data/searchClient.js +13 -3
- package/dist/react-native/generated/data/searchClient.js.map +1 -1
- package/dist/react-native/generated/service/models/mappers.js +687 -297
- package/dist/react-native/generated/service/models/mappers.js.map +1 -1
- package/dist/react-native/generated/service/operations/aliases.js +1 -0
- package/dist/react-native/generated/service/operations/aliases.js.map +1 -1
- package/dist/react-native/generated/service/operations/dataSources.js +1 -0
- package/dist/react-native/generated/service/operations/dataSources.js.map +1 -1
- package/dist/react-native/generated/service/operations/indexers.js +1 -0
- package/dist/react-native/generated/service/operations/indexers.js.map +1 -1
- package/dist/react-native/generated/service/operations/indexes.js +1 -0
- package/dist/react-native/generated/service/operations/indexes.js.map +1 -1
- package/dist/react-native/generated/service/operations/skillsets.js +1 -0
- package/dist/react-native/generated/service/operations/skillsets.js.map +1 -1
- package/dist/react-native/generated/service/operations/synonymMaps.js +1 -0
- package/dist/react-native/generated/service/operations/synonymMaps.js.map +1 -1
- package/dist/react-native/generated/service/searchServiceClient.js +15 -3
- package/dist/react-native/generated/service/searchServiceClient.js.map +1 -1
- package/dist/react-native/geographyPoint.js +8 -0
- package/dist/react-native/geographyPoint.js.map +1 -1
- package/dist/react-native/indexDocumentsBatch.js +20 -4
- package/dist/react-native/indexDocumentsBatch.js.map +1 -1
- package/dist/react-native/searchClient.js +139 -83
- package/dist/react-native/searchClient.js.map +1 -1
- package/dist/react-native/searchIndexClient.js +141 -146
- package/dist/react-native/searchIndexClient.js.map +1 -1
- package/dist/react-native/searchIndexerClient.js +80 -36
- package/dist/react-native/searchIndexerClient.js.map +1 -1
- package/dist/react-native/searchIndexingBufferedSender.js +51 -12
- package/dist/react-native/searchIndexingBufferedSender.js.map +1 -1
- package/dist/react-native/serviceUtils.js +159 -54
- package/dist/react-native/serviceUtils.js.map +1 -1
- package/dist/react-native/walk.js +9 -12
- package/dist/react-native/walk.js.map +1 -1
- package/package.json +2 -2
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing Aliases operations. */
|
|
12
12
|
export class AliasesImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class Aliases class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aliases.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/aliases.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAetD,2CAA2C;AAC3C,MAAM,OAAO,WAAW;
|
|
1
|
+
{"version":3,"file":"aliases.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/aliases.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAetD,2CAA2C;AAC3C,MAAM,OAAO,WAAW;IACL,MAAM,CAAsB;IAE7C;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAA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MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,yBAAyB;IAC/B,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC;IAC1D,gBAAgB,EAAE;QAChB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,WAAW;KACvB;IACD,UAAU;CACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EAAE,yBAAyB;IAC/B,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,WAAW;SAChC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC;IAC1D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Aliases } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { SearchServiceClient } from \"../searchServiceClient.js\";\nimport {\n SearchAlias,\n AliasesCreateOptionalParams,\n AliasesCreateResponse,\n AliasesListOptionalParams,\n AliasesListResponse,\n AliasesCreateOrUpdateOptionalParams,\n AliasesCreateOrUpdateResponse,\n AliasesDeleteOptionalParams,\n AliasesGetOptionalParams,\n AliasesGetResponse,\n} from \"../models/index.js\";\n\n/** Class containing Aliases operations. */\nexport class AliasesImpl implements Aliases {\n private readonly client: SearchServiceClient;\n\n /**\n * Initialize a new instance of the class Aliases class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClient) {\n this.client = client;\n }\n\n /**\n * Creates a new search alias.\n * @param alias The definition of the alias to create.\n * @param options The options parameters.\n */\n create(\n alias: SearchAlias,\n options?: AliasesCreateOptionalParams,\n ): Promise<AliasesCreateResponse> {\n return this.client.sendOperationRequest(\n { alias, options },\n createOperationSpec,\n );\n }\n\n /**\n * Lists all aliases available for a search service.\n * @param options The options parameters.\n */\n list(options?: AliasesListOptionalParams): Promise<AliasesListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Creates a new search alias or updates an alias if it already exists.\n * @param aliasName The definition of the alias to create or update.\n * @param alias The definition of the alias to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n aliasName: string,\n alias: SearchAlias,\n options?: AliasesCreateOrUpdateOptionalParams,\n ): Promise<AliasesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { aliasName, alias, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes a search alias and its associated mapping to an index. This operation is permanent, with no\n * recovery option. The mapped index is untouched by this operation.\n * @param aliasName The name of the alias to delete.\n * @param options The options parameters.\n */\n delete(\n aliasName: string,\n options?: AliasesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { aliasName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Retrieves an alias definition.\n * @param aliasName The name of the alias to retrieve.\n * @param options The options parameters.\n */\n get(\n aliasName: string,\n options?: AliasesGetOptionalParams,\n ): Promise<AliasesGetResponse> {\n return this.client.sendOperationRequest(\n { aliasName, options },\n getOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/aliases\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SearchAlias,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.alias,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/aliases\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListAliasesResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/aliases('{aliasName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchAlias,\n },\n 201: {\n bodyMapper: Mappers.SearchAlias,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.alias,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.aliasName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.prefer,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/aliases('{aliasName}')\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n 404: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.aliasName],\n headerParameters: [\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n ],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/aliases('{aliasName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchAlias,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.aliasName],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing DataSources operations. */
|
|
12
12
|
export class DataSourcesImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class DataSources class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataSources.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/dataSources.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAetD,+CAA+C;AAC/C,MAAM,OAAO,eAAe;
|
|
1
|
+
{"version":3,"file":"dataSources.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/dataSources.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAetD,+CAA+C;AAC/C,MAAM,OAAO,eAAe;IACT,MAAM,CAAsB;IAE7C;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,cAAc,CACZ,cAAsB,EACtB,UAAmC,EACnC,OAAi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AAI,EAAE,cAAc;IACpB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,qBAAqB;SAC1C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,cAAc;IACpB,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,uBAAuB;SAC5C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,UAAU;IAClC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { DataSources } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { SearchServiceClient } from \"../searchServiceClient.js\";\nimport {\n SearchIndexerDataSource,\n DataSourcesCreateOrUpdateOptionalParams,\n DataSourcesCreateOrUpdateResponse,\n DataSourcesDeleteOptionalParams,\n DataSourcesGetOptionalParams,\n DataSourcesGetResponse,\n DataSourcesListOptionalParams,\n DataSourcesListResponse,\n DataSourcesCreateOptionalParams,\n DataSourcesCreateResponse,\n} from \"../models/index.js\";\n\n/** Class containing DataSources operations. */\nexport class DataSourcesImpl implements DataSources {\n private readonly client: SearchServiceClient;\n\n /**\n * Initialize a new instance of the class DataSources class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClient) {\n this.client = client;\n }\n\n /**\n * Creates a new datasource or updates a datasource if it already exists.\n * @param dataSourceName The name of the datasource to create or update.\n * @param dataSource The definition of the datasource to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n dataSourceName: string,\n dataSource: SearchIndexerDataSource,\n options?: DataSourcesCreateOrUpdateOptionalParams,\n ): Promise<DataSourcesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { dataSourceName, dataSource, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes a datasource.\n * @param dataSourceName The name of the datasource to delete.\n * @param options The options parameters.\n */\n delete(\n dataSourceName: string,\n options?: DataSourcesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { dataSourceName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Retrieves a datasource definition.\n * @param dataSourceName The name of the datasource to retrieve.\n * @param options The options parameters.\n */\n get(\n dataSourceName: string,\n options?: DataSourcesGetOptionalParams,\n ): Promise<DataSourcesGetResponse> {\n return this.client.sendOperationRequest(\n { dataSourceName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Lists all datasources available for a search service.\n * @param options The options parameters.\n */\n list(\n options?: DataSourcesListOptionalParams,\n ): Promise<DataSourcesListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Creates a new datasource.\n * @param dataSource The definition of the datasource to create.\n * @param options The options parameters.\n */\n create(\n dataSource: SearchIndexerDataSource,\n options?: DataSourcesCreateOptionalParams,\n ): Promise<DataSourcesCreateResponse> {\n return this.client.sendOperationRequest(\n { dataSource, options },\n createOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/datasources('{dataSourceName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerDataSource,\n },\n 201: {\n bodyMapper: Mappers.SearchIndexerDataSource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.dataSource,\n queryParameters: [\n Parameters.apiVersion,\n Parameters.skipIndexerResetRequirementForCache,\n ],\n urlParameters: [Parameters.endpoint, Parameters.dataSourceName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.prefer,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/datasources('{dataSourceName}')\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n 404: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.dataSourceName],\n headerParameters: [\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n ],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/datasources('{dataSourceName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerDataSource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.dataSourceName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/datasources\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListDataSourcesResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.select],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/datasources\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SearchIndexerDataSource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.dataSource,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing Indexers operations. */
|
|
12
12
|
export class IndexersImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class Indexers class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexers.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/indexers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAoBtD,4CAA4C;AAC5C,MAAM,OAAO,YAAY;IAGvB;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CACH,WAAmB,EACnB,OAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,WAAW,EAAE,OAAO,EAAE,EACxB,kBAAkB,CACnB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,SAAS,CACP,WAAmB,EACnB,OAAyC;QAEzC,OAAO,IAAI,CAAC,MAAM,C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,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,sBAAsB,GAA6B;IACvD,IAAI,EAAE,0CAA0C;IAChD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Indexers } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { SearchServiceClient } from \"../searchServiceClient.js\";\nimport {\n IndexersResetOptionalParams,\n IndexersResetDocsOptionalParams,\n IndexersRunOptionalParams,\n SearchIndexer,\n IndexersCreateOrUpdateOptionalParams,\n IndexersCreateOrUpdateResponse,\n IndexersDeleteOptionalParams,\n IndexersGetOptionalParams,\n IndexersGetResponse,\n IndexersListOptionalParams,\n IndexersListResponse,\n IndexersCreateOptionalParams,\n IndexersCreateResponse,\n IndexersGetStatusOptionalParams,\n IndexersGetStatusResponse,\n} from \"../models/index.js\";\n\n/** Class containing Indexers operations. */\nexport class IndexersImpl implements Indexers {\n private readonly client: SearchServiceClient;\n\n /**\n * Initialize a new instance of the class Indexers class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClient) {\n this.client = client;\n }\n\n /**\n * Resets the change tracking state associated with an indexer.\n * @param indexerName The name of the indexer to reset.\n * @param options The options parameters.\n */\n reset(\n indexerName: string,\n options?: IndexersResetOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { indexerName, options },\n resetOperationSpec,\n );\n }\n\n /**\n * Resets specific documents in the datasource to be selectively re-ingested by the indexer.\n * @param indexerName The name of the indexer to reset documents for.\n * @param options The options parameters.\n */\n resetDocs(\n indexerName: string,\n options?: IndexersResetDocsOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { indexerName, options },\n resetDocsOperationSpec,\n );\n }\n\n /**\n * Runs an indexer on-demand.\n * @param indexerName The name of the indexer to run.\n * @param options The options parameters.\n */\n run(indexerName: string, options?: IndexersRunOptionalParams): Promise<void> {\n return this.client.sendOperationRequest(\n { indexerName, options },\n runOperationSpec,\n );\n }\n\n /**\n * Creates a new indexer or updates an indexer if it already exists.\n * @param indexerName The name of the indexer to create or update.\n * @param indexer The definition of the indexer to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n indexerName: string,\n indexer: SearchIndexer,\n options?: IndexersCreateOrUpdateOptionalParams,\n ): Promise<IndexersCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { indexerName, indexer, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes an indexer.\n * @param indexerName The name of the indexer to delete.\n * @param options The options parameters.\n */\n delete(\n indexerName: string,\n options?: IndexersDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { indexerName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Retrieves an indexer definition.\n * @param indexerName The name of the indexer to retrieve.\n * @param options The options parameters.\n */\n get(\n indexerName: string,\n options?: IndexersGetOptionalParams,\n ): Promise<IndexersGetResponse> {\n return this.client.sendOperationRequest(\n { indexerName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Lists all indexers available for a search service.\n * @param options The options parameters.\n */\n list(options?: IndexersListOptionalParams): Promise<IndexersListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Creates a new indexer.\n * @param indexer The definition of the indexer to create.\n * @param options The options parameters.\n */\n create(\n indexer: SearchIndexer,\n options?: IndexersCreateOptionalParams,\n ): Promise<IndexersCreateResponse> {\n return this.client.sendOperationRequest(\n { indexer, options },\n createOperationSpec,\n );\n }\n\n /**\n * Returns the current status and execution history of an indexer.\n * @param indexerName The name of the indexer for which to retrieve status.\n * @param options The options parameters.\n */\n getStatus(\n indexerName: string,\n options?: IndexersGetStatusOptionalParams,\n ): Promise<IndexersGetStatusResponse> {\n return this.client.sendOperationRequest(\n { indexerName, options },\n getStatusOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst resetOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')/search.reset\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst resetDocsOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')/search.resetdocs\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.keysOrIds,\n queryParameters: [Parameters.apiVersion, Parameters.overwrite],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst runOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')/search.run\",\n httpMethod: \"POST\",\n responses: {\n 202: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexer,\n },\n 201: {\n bodyMapper: Mappers.SearchIndexer,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.indexer,\n queryParameters: [\n Parameters.apiVersion,\n Parameters.skipIndexerResetRequirementForCache,\n Parameters.disableCacheReprocessingChangeDetection,\n ],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.prefer,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n 404: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n ],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexer,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListIndexersResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.select],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SearchIndexer,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.indexer,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst getStatusOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')/search.status\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerStatus,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"indexers.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/indexers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAoBtD,4CAA4C;AAC5C,MAAM,OAAO,YAAY;IACN,MAAM,CAAsB;IAE7C;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,KAAK,CACH,WAAmB,EACnB,OAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,WAAW,EAAE,OAAO,EAAE,EACxB,kBAAkB,CACnB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,SAAS,CACP,WAAmB,EACnB,OAAyC;QAEzC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,WAAW,EAAE,OAAO,EAA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AAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,sBAAsB,GAA6B;IACvD,IAAI,EAAE,0CAA0C;IAChD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,WAAW,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Indexers } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { SearchServiceClient } from \"../searchServiceClient.js\";\nimport {\n IndexersResetOptionalParams,\n IndexersResetDocsOptionalParams,\n IndexersRunOptionalParams,\n SearchIndexer,\n IndexersCreateOrUpdateOptionalParams,\n IndexersCreateOrUpdateResponse,\n IndexersDeleteOptionalParams,\n IndexersGetOptionalParams,\n IndexersGetResponse,\n IndexersListOptionalParams,\n IndexersListResponse,\n IndexersCreateOptionalParams,\n IndexersCreateResponse,\n IndexersGetStatusOptionalParams,\n IndexersGetStatusResponse,\n} from \"../models/index.js\";\n\n/** Class containing Indexers operations. */\nexport class IndexersImpl implements Indexers {\n private readonly client: SearchServiceClient;\n\n /**\n * Initialize a new instance of the class Indexers class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClient) {\n this.client = client;\n }\n\n /**\n * Resets the change tracking state associated with an indexer.\n * @param indexerName The name of the indexer to reset.\n * @param options The options parameters.\n */\n reset(\n indexerName: string,\n options?: IndexersResetOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { indexerName, options },\n resetOperationSpec,\n );\n }\n\n /**\n * Resets specific documents in the datasource to be selectively re-ingested by the indexer.\n * @param indexerName The name of the indexer to reset documents for.\n * @param options The options parameters.\n */\n resetDocs(\n indexerName: string,\n options?: IndexersResetDocsOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { indexerName, options },\n resetDocsOperationSpec,\n );\n }\n\n /**\n * Runs an indexer on-demand.\n * @param indexerName The name of the indexer to run.\n * @param options The options parameters.\n */\n run(indexerName: string, options?: IndexersRunOptionalParams): Promise<void> {\n return this.client.sendOperationRequest(\n { indexerName, options },\n runOperationSpec,\n );\n }\n\n /**\n * Creates a new indexer or updates an indexer if it already exists.\n * @param indexerName The name of the indexer to create or update.\n * @param indexer The definition of the indexer to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n indexerName: string,\n indexer: SearchIndexer,\n options?: IndexersCreateOrUpdateOptionalParams,\n ): Promise<IndexersCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { indexerName, indexer, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes an indexer.\n * @param indexerName The name of the indexer to delete.\n * @param options The options parameters.\n */\n delete(\n indexerName: string,\n options?: IndexersDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { indexerName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Retrieves an indexer definition.\n * @param indexerName The name of the indexer to retrieve.\n * @param options The options parameters.\n */\n get(\n indexerName: string,\n options?: IndexersGetOptionalParams,\n ): Promise<IndexersGetResponse> {\n return this.client.sendOperationRequest(\n { indexerName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Lists all indexers available for a search service.\n * @param options The options parameters.\n */\n list(options?: IndexersListOptionalParams): Promise<IndexersListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Creates a new indexer.\n * @param indexer The definition of the indexer to create.\n * @param options The options parameters.\n */\n create(\n indexer: SearchIndexer,\n options?: IndexersCreateOptionalParams,\n ): Promise<IndexersCreateResponse> {\n return this.client.sendOperationRequest(\n { indexer, options },\n createOperationSpec,\n );\n }\n\n /**\n * Returns the current status and execution history of an indexer.\n * @param indexerName The name of the indexer for which to retrieve status.\n * @param options The options parameters.\n */\n getStatus(\n indexerName: string,\n options?: IndexersGetStatusOptionalParams,\n ): Promise<IndexersGetStatusResponse> {\n return this.client.sendOperationRequest(\n { indexerName, options },\n getStatusOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst resetOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')/search.reset\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst resetDocsOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')/search.resetdocs\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.keysOrIds,\n queryParameters: [Parameters.apiVersion, Parameters.overwrite],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst runOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')/search.run\",\n httpMethod: \"POST\",\n responses: {\n 202: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexer,\n },\n 201: {\n bodyMapper: Mappers.SearchIndexer,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.indexer,\n queryParameters: [\n Parameters.apiVersion,\n Parameters.skipIndexerResetRequirementForCache,\n Parameters.disableCacheReprocessingChangeDetection,\n ],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.prefer,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n 404: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n ],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexer,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListIndexersResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.select],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SearchIndexer,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.indexer,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst getStatusOperationSpec: coreClient.OperationSpec = {\n path: \"/indexers('{indexerName}')/search.status\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerStatus,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexerName],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing Indexes operations. */
|
|
12
12
|
export class IndexesImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class Indexes class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexes.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/indexes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAoBtD,2CAA2C;AAC3C,MAAM,OAAO,WAAW;IAGtB;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,KAAkB,EAClB,OAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,KA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AE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC;IAC1D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,oBAAoB,GAA6B;IACrD,IAAI,EAAE,wCAAwC;IAC9C,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,OAAO;IAC/B,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC;IAC1D,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Indexes } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { SearchServiceClient } from \"../searchServiceClient.js\";\nimport {\n SearchIndex,\n IndexesCreateOptionalParams,\n IndexesCreateResponse,\n IndexesListOptionalParams,\n IndexesListResponse,\n IndexesCreateOrUpdateOptionalParams,\n IndexesCreateOrUpdateResponse,\n IndexesDeleteOptionalParams,\n IndexesGetOptionalParams,\n IndexesGetResponse,\n IndexesGetStatisticsOptionalParams,\n IndexesGetStatisticsResponse,\n AnalyzeRequest,\n IndexesAnalyzeOptionalParams,\n IndexesAnalyzeResponse,\n} from \"../models/index.js\";\n\n/** Class containing Indexes operations. */\nexport class IndexesImpl implements Indexes {\n private readonly client: SearchServiceClient;\n\n /**\n * Initialize a new instance of the class Indexes class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClient) {\n this.client = client;\n }\n\n /**\n * Creates a new search index.\n * @param index The definition of the index to create.\n * @param options The options parameters.\n */\n create(\n index: SearchIndex,\n options?: IndexesCreateOptionalParams,\n ): Promise<IndexesCreateResponse> {\n return this.client.sendOperationRequest(\n { index, options },\n createOperationSpec,\n );\n }\n\n /**\n * Lists all indexes available for a search service.\n * @param options The options parameters.\n */\n list(options?: IndexesListOptionalParams): Promise<IndexesListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Creates a new search index or updates an index if it already exists.\n * @param indexName The definition of the index to create or update.\n * @param index The definition of the index to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n indexName: string,\n index: SearchIndex,\n options?: IndexesCreateOrUpdateOptionalParams,\n ): Promise<IndexesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { indexName, index, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes a search index and all the documents it contains. This operation is permanent, with no\n * recovery option. Make sure you have a master copy of your index definition, data ingestion code, and\n * a backup of the primary data source in case you need to re-build the index.\n * @param indexName The name of the index to delete.\n * @param options The options parameters.\n */\n delete(\n indexName: string,\n options?: IndexesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { indexName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Retrieves an index definition.\n * @param indexName The name of the index to retrieve.\n * @param options The options parameters.\n */\n get(\n indexName: string,\n options?: IndexesGetOptionalParams,\n ): Promise<IndexesGetResponse> {\n return this.client.sendOperationRequest(\n { indexName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Returns statistics for the given index, including a document count and storage usage.\n * @param indexName The name of the index for which to retrieve statistics.\n * @param options The options parameters.\n */\n getStatistics(\n indexName: string,\n options?: IndexesGetStatisticsOptionalParams,\n ): Promise<IndexesGetStatisticsResponse> {\n return this.client.sendOperationRequest(\n { indexName, options },\n getStatisticsOperationSpec,\n );\n }\n\n /**\n * Shows how an analyzer breaks text into tokens.\n * @param indexName The name of the index for which to test an analyzer.\n * @param request The text and analyzer or analysis components to test.\n * @param options The options parameters.\n */\n analyze(\n indexName: string,\n request: AnalyzeRequest,\n options?: IndexesAnalyzeOptionalParams,\n ): Promise<IndexesAnalyzeResponse> {\n return this.client.sendOperationRequest(\n { indexName, request, options },\n analyzeOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SearchIndex,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.index,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListIndexesResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.select],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes('{indexName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndex,\n },\n 201: {\n bodyMapper: Mappers.SearchIndex,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.index,\n queryParameters: [Parameters.apiVersion, Parameters.allowIndexDowntime],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.prefer,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes('{indexName}')\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n 404: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n ],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes('{indexName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndex,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getStatisticsOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes('{indexName}')/search.stats\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GetIndexStatisticsResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst analyzeOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes('{indexName}')/search.analyze\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AnalyzeResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.request,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"indexes.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/indexes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAoBtD,2CAA2C;AAC3C,MAAM,OAAO,WAAW;IACL,MAAM,CAAsB;IAE7C;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,KAAkB,EAClB,OAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,KAAK,EAAE,OAAO,EAAE,EAClB,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,OAAmC;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;OAKG;IACH,cAAc,CACZ,SAAiB,EACjB,KAAkB,EAClB,OAA6C;QAE7C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,EAC7B,2BAA2B,CAC5B,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CACJ,SAAiB,EACjB,OAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,SAAS,EAAE,OAAO,EAAE,EACtB,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,GAAG,CACD,SAAiB,EACjB,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UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC;IAC1D,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Indexes } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { SearchServiceClient } from \"../searchServiceClient.js\";\nimport {\n SearchIndex,\n IndexesCreateOptionalParams,\n IndexesCreateResponse,\n IndexesListOptionalParams,\n IndexesListResponse,\n IndexesCreateOrUpdateOptionalParams,\n IndexesCreateOrUpdateResponse,\n IndexesDeleteOptionalParams,\n IndexesGetOptionalParams,\n IndexesGetResponse,\n IndexesGetStatisticsOptionalParams,\n IndexesGetStatisticsResponse,\n AnalyzeRequest,\n IndexesAnalyzeOptionalParams,\n IndexesAnalyzeResponse,\n} from \"../models/index.js\";\n\n/** Class containing Indexes operations. */\nexport class IndexesImpl implements Indexes {\n private readonly client: SearchServiceClient;\n\n /**\n * Initialize a new instance of the class Indexes class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClient) {\n this.client = client;\n }\n\n /**\n * Creates a new search index.\n * @param index The definition of the index to create.\n * @param options The options parameters.\n */\n create(\n index: SearchIndex,\n options?: IndexesCreateOptionalParams,\n ): Promise<IndexesCreateResponse> {\n return this.client.sendOperationRequest(\n { index, options },\n createOperationSpec,\n );\n }\n\n /**\n * Lists all indexes available for a search service.\n * @param options The options parameters.\n */\n list(options?: IndexesListOptionalParams): Promise<IndexesListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Creates a new search index or updates an index if it already exists.\n * @param indexName The definition of the index to create or update.\n * @param index The definition of the index to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n indexName: string,\n index: SearchIndex,\n options?: IndexesCreateOrUpdateOptionalParams,\n ): Promise<IndexesCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { indexName, index, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes a search index and all the documents it contains. This operation is permanent, with no\n * recovery option. Make sure you have a master copy of your index definition, data ingestion code, and\n * a backup of the primary data source in case you need to re-build the index.\n * @param indexName The name of the index to delete.\n * @param options The options parameters.\n */\n delete(\n indexName: string,\n options?: IndexesDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { indexName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Retrieves an index definition.\n * @param indexName The name of the index to retrieve.\n * @param options The options parameters.\n */\n get(\n indexName: string,\n options?: IndexesGetOptionalParams,\n ): Promise<IndexesGetResponse> {\n return this.client.sendOperationRequest(\n { indexName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Returns statistics for the given index, including a document count and storage usage.\n * @param indexName The name of the index for which to retrieve statistics.\n * @param options The options parameters.\n */\n getStatistics(\n indexName: string,\n options?: IndexesGetStatisticsOptionalParams,\n ): Promise<IndexesGetStatisticsResponse> {\n return this.client.sendOperationRequest(\n { indexName, options },\n getStatisticsOperationSpec,\n );\n }\n\n /**\n * Shows how an analyzer breaks text into tokens.\n * @param indexName The name of the index for which to test an analyzer.\n * @param request The text and analyzer or analysis components to test.\n * @param options The options parameters.\n */\n analyze(\n indexName: string,\n request: AnalyzeRequest,\n options?: IndexesAnalyzeOptionalParams,\n ): Promise<IndexesAnalyzeResponse> {\n return this.client.sendOperationRequest(\n { indexName, request, options },\n analyzeOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SearchIndex,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.index,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListIndexesResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.select],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes('{indexName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndex,\n },\n 201: {\n bodyMapper: Mappers.SearchIndex,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.index,\n queryParameters: [Parameters.apiVersion, Parameters.allowIndexDowntime],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.prefer,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes('{indexName}')\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n 404: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n ],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes('{indexName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndex,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getStatisticsOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes('{indexName}')/search.stats\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.GetIndexStatisticsResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst analyzeOperationSpec: coreClient.OperationSpec = {\n path: \"/indexes('{indexName}')/search.analyze\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AnalyzeResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.request,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.indexName],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing Skillsets operations. */
|
|
12
12
|
export class SkillsetsImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class Skillsets class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skillsets.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/skillsets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAiBtD,6CA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AM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,wBAAwB,GAA6B;IACzD,IAAI,EAAE,iDAAiD;IACvD,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,UAAU;IAClC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,YAAY,CAAC;IAC7D,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Skillsets } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { SearchServiceClient } from \"../searchServiceClient.js\";\nimport {\n SearchIndexerSkillset,\n SkillsetsCreateOrUpdateOptionalParams,\n SkillsetsCreateOrUpdateResponse,\n SkillsetsDeleteOptionalParams,\n SkillsetsGetOptionalParams,\n SkillsetsGetResponse,\n SkillsetsListOptionalParams,\n SkillsetsListResponse,\n SkillsetsCreateOptionalParams,\n SkillsetsCreateResponse,\n SkillNames,\n SkillsetsResetSkillsOptionalParams,\n} from \"../models/index.js\";\n\n/** Class containing Skillsets operations. */\nexport class SkillsetsImpl implements Skillsets {\n private readonly client: SearchServiceClient;\n\n /**\n * Initialize a new instance of the class Skillsets class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClient) {\n this.client = client;\n }\n\n /**\n * Creates a new skillset in a search service or updates the skillset if it already exists.\n * @param skillsetName The name of the skillset to create or update.\n * @param skillset The skillset containing one or more skills to create or update in a search service.\n * @param options The options parameters.\n */\n createOrUpdate(\n skillsetName: string,\n skillset: SearchIndexerSkillset,\n options?: SkillsetsCreateOrUpdateOptionalParams,\n ): Promise<SkillsetsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { skillsetName, skillset, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes a skillset in a search service.\n * @param skillsetName The name of the skillset to delete.\n * @param options The options parameters.\n */\n delete(\n skillsetName: string,\n options?: SkillsetsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { skillsetName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Retrieves a skillset in a search service.\n * @param skillsetName The name of the skillset to retrieve.\n * @param options The options parameters.\n */\n get(\n skillsetName: string,\n options?: SkillsetsGetOptionalParams,\n ): Promise<SkillsetsGetResponse> {\n return this.client.sendOperationRequest(\n { skillsetName, options },\n getOperationSpec,\n );\n }\n\n /**\n * List all skillsets in a search service.\n * @param options The options parameters.\n */\n list(options?: SkillsetsListOptionalParams): Promise<SkillsetsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Creates a new skillset in a search service.\n * @param skillset The skillset containing one or more skills to create in a search service.\n * @param options The options parameters.\n */\n create(\n skillset: SearchIndexerSkillset,\n options?: SkillsetsCreateOptionalParams,\n ): Promise<SkillsetsCreateResponse> {\n return this.client.sendOperationRequest(\n { skillset, options },\n createOperationSpec,\n );\n }\n\n /**\n * Reset an existing skillset in a search service.\n * @param skillsetName The name of the skillset to reset.\n * @param skillNames The names of skills to reset.\n * @param options The options parameters.\n */\n resetSkills(\n skillsetName: string,\n skillNames: SkillNames,\n options?: SkillsetsResetSkillsOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { skillsetName, skillNames, options },\n resetSkillsOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets('{skillsetName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerSkillset,\n },\n 201: {\n bodyMapper: Mappers.SearchIndexerSkillset,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.skillset,\n queryParameters: [\n Parameters.apiVersion,\n Parameters.skipIndexerResetRequirementForCache,\n Parameters.disableCacheReprocessingChangeDetection,\n ],\n urlParameters: [Parameters.endpoint, Parameters.skillsetName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.prefer,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets('{skillsetName}')\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n 404: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.skillsetName],\n headerParameters: [\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n ],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets('{skillsetName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerSkillset,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.skillsetName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListSkillsetsResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.select],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SearchIndexerSkillset,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.skillset,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst resetSkillsOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets('{skillsetName}')/search.resetskills\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.skillNames,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.skillsetName],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"skillsets.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/skillsets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAiBtD,6CAA6C;AAC7C,MAAM,OAAO,aAAa;IACP,MAAM,CAAsB;IAE7C;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,cAAc,CACZ,YAAoB,EACpB,QAA+B,EAC/B,OAA+C;QAE/C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,EACnC,2BAA2B,CAC5B,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,YAAoB,EACpB,OAAuC;QAEvC,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EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Skillsets } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { SearchServiceClient } from \"../searchServiceClient.js\";\nimport {\n SearchIndexerSkillset,\n SkillsetsCreateOrUpdateOptionalParams,\n SkillsetsCreateOrUpdateResponse,\n SkillsetsDeleteOptionalParams,\n SkillsetsGetOptionalParams,\n SkillsetsGetResponse,\n SkillsetsListOptionalParams,\n SkillsetsListResponse,\n SkillsetsCreateOptionalParams,\n SkillsetsCreateResponse,\n SkillNames,\n SkillsetsResetSkillsOptionalParams,\n} from \"../models/index.js\";\n\n/** Class containing Skillsets operations. */\nexport class SkillsetsImpl implements Skillsets {\n private readonly client: SearchServiceClient;\n\n /**\n * Initialize a new instance of the class Skillsets class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClient) {\n this.client = client;\n }\n\n /**\n * Creates a new skillset in a search service or updates the skillset if it already exists.\n * @param skillsetName The name of the skillset to create or update.\n * @param skillset The skillset containing one or more skills to create or update in a search service.\n * @param options The options parameters.\n */\n createOrUpdate(\n skillsetName: string,\n skillset: SearchIndexerSkillset,\n options?: SkillsetsCreateOrUpdateOptionalParams,\n ): Promise<SkillsetsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { skillsetName, skillset, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes a skillset in a search service.\n * @param skillsetName The name of the skillset to delete.\n * @param options The options parameters.\n */\n delete(\n skillsetName: string,\n options?: SkillsetsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { skillsetName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Retrieves a skillset in a search service.\n * @param skillsetName The name of the skillset to retrieve.\n * @param options The options parameters.\n */\n get(\n skillsetName: string,\n options?: SkillsetsGetOptionalParams,\n ): Promise<SkillsetsGetResponse> {\n return this.client.sendOperationRequest(\n { skillsetName, options },\n getOperationSpec,\n );\n }\n\n /**\n * List all skillsets in a search service.\n * @param options The options parameters.\n */\n list(options?: SkillsetsListOptionalParams): Promise<SkillsetsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Creates a new skillset in a search service.\n * @param skillset The skillset containing one or more skills to create in a search service.\n * @param options The options parameters.\n */\n create(\n skillset: SearchIndexerSkillset,\n options?: SkillsetsCreateOptionalParams,\n ): Promise<SkillsetsCreateResponse> {\n return this.client.sendOperationRequest(\n { skillset, options },\n createOperationSpec,\n );\n }\n\n /**\n * Reset an existing skillset in a search service.\n * @param skillsetName The name of the skillset to reset.\n * @param skillNames The names of skills to reset.\n * @param options The options parameters.\n */\n resetSkills(\n skillsetName: string,\n skillNames: SkillNames,\n options?: SkillsetsResetSkillsOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { skillsetName, skillNames, options },\n resetSkillsOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets('{skillsetName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerSkillset,\n },\n 201: {\n bodyMapper: Mappers.SearchIndexerSkillset,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.skillset,\n queryParameters: [\n Parameters.apiVersion,\n Parameters.skipIndexerResetRequirementForCache,\n Parameters.disableCacheReprocessingChangeDetection,\n ],\n urlParameters: [Parameters.endpoint, Parameters.skillsetName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.prefer,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets('{skillsetName}')\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n 404: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.skillsetName],\n headerParameters: [\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n ],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets('{skillsetName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SearchIndexerSkillset,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.skillsetName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListSkillsetsResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.select],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SearchIndexerSkillset,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.skillset,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst resetSkillsOperationSpec: coreClient.OperationSpec = {\n path: \"/skillsets('{skillsetName}')/search.resetskills\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.skillNames,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.skillsetName],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing SynonymMaps operations. */
|
|
12
12
|
export class SynonymMapsImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class SynonymMaps class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"synonymMaps.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/synonymMaps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAetD,+CAA+C;AAC/C,MAAM,OAAO,eAAe;
|
|
1
|
+
{"version":3,"file":"synonymMaps.js","sourceRoot":"","sources":["../../../../../src/generated/service/operations/synonymMaps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAetD,+CAA+C;AAC/C,MAAM,OAAO,eAAe;IACT,MAAM,CAAsB;IAE7C;;;OAGG;IACH,YAAY,MAA2B;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,cAAc,CACZ,cAAsB,EACtB,UAAsB,EACtB,OAAiD;QAEjD,OAAO,IAAI,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AAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,qBAAqB;SAC1C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,cAAc;IACpB,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,UAAU;IAClC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { SynonymMaps } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { SearchServiceClient } from \"../searchServiceClient.js\";\nimport {\n SynonymMap,\n SynonymMapsCreateOrUpdateOptionalParams,\n SynonymMapsCreateOrUpdateResponse,\n SynonymMapsDeleteOptionalParams,\n SynonymMapsGetOptionalParams,\n SynonymMapsGetResponse,\n SynonymMapsListOptionalParams,\n SynonymMapsListResponse,\n SynonymMapsCreateOptionalParams,\n SynonymMapsCreateResponse,\n} from \"../models/index.js\";\n\n/** Class containing SynonymMaps operations. */\nexport class SynonymMapsImpl implements SynonymMaps {\n private readonly client: SearchServiceClient;\n\n /**\n * Initialize a new instance of the class SynonymMaps class.\n * @param client Reference to the service client\n */\n constructor(client: SearchServiceClient) {\n this.client = client;\n }\n\n /**\n * Creates a new synonym map or updates a synonym map if it already exists.\n * @param synonymMapName The name of the synonym map to create or update.\n * @param synonymMap The definition of the synonym map to create or update.\n * @param options The options parameters.\n */\n createOrUpdate(\n synonymMapName: string,\n synonymMap: SynonymMap,\n options?: SynonymMapsCreateOrUpdateOptionalParams,\n ): Promise<SynonymMapsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { synonymMapName, synonymMap, options },\n createOrUpdateOperationSpec,\n );\n }\n\n /**\n * Deletes a synonym map.\n * @param synonymMapName The name of the synonym map to delete.\n * @param options The options parameters.\n */\n delete(\n synonymMapName: string,\n options?: SynonymMapsDeleteOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { synonymMapName, options },\n deleteOperationSpec,\n );\n }\n\n /**\n * Retrieves a synonym map definition.\n * @param synonymMapName The name of the synonym map to retrieve.\n * @param options The options parameters.\n */\n get(\n synonymMapName: string,\n options?: SynonymMapsGetOptionalParams,\n ): Promise<SynonymMapsGetResponse> {\n return this.client.sendOperationRequest(\n { synonymMapName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Lists all synonym maps available for a search service.\n * @param options The options parameters.\n */\n list(\n options?: SynonymMapsListOptionalParams,\n ): Promise<SynonymMapsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * Creates a new synonym map.\n * @param synonymMap The definition of the synonym map to create.\n * @param options The options parameters.\n */\n create(\n synonymMap: SynonymMap,\n options?: SynonymMapsCreateOptionalParams,\n ): Promise<SynonymMapsCreateResponse> {\n return this.client.sendOperationRequest(\n { synonymMap, options },\n createOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/synonymmaps('{synonymMapName}')\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.SynonymMap,\n },\n 201: {\n bodyMapper: Mappers.SynonymMap,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.synonymMap,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.synonymMapName],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n Parameters.prefer,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/synonymmaps('{synonymMapName}')\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n 404: {},\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.synonymMapName],\n headerParameters: [\n Parameters.accept,\n Parameters.ifMatch,\n Parameters.ifNoneMatch,\n ],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/synonymmaps('{synonymMapName}')\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SynonymMap,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.synonymMapName],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/synonymmaps\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ListSynonymMapsResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.select],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/synonymmaps\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.SynonymMap,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.synonymMap,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
@@ -12,6 +12,8 @@ import * as Parameters from "./models/parameters.js";
|
|
|
12
12
|
import * as Mappers from "./models/mappers.js";
|
|
13
13
|
/** @internal */
|
|
14
14
|
export class SearchServiceClient extends coreHttpCompat.ExtendedServiceClient {
|
|
15
|
+
endpoint;
|
|
16
|
+
apiVersion;
|
|
15
17
|
/**
|
|
16
18
|
* Initializes a new instance of the SearchServiceClient class.
|
|
17
19
|
* @param endpoint The endpoint URL of the search service.
|
|
@@ -19,7 +21,6 @@ export class SearchServiceClient extends coreHttpCompat.ExtendedServiceClient {
|
|
|
19
21
|
* @param options The parameter options
|
|
20
22
|
*/
|
|
21
23
|
constructor(endpoint, apiVersion, options) {
|
|
22
|
-
var _a, _b;
|
|
23
24
|
if (endpoint === undefined) {
|
|
24
25
|
throw new Error("'endpoint' cannot be null");
|
|
25
26
|
}
|
|
@@ -37,9 +38,14 @@ export class SearchServiceClient extends coreHttpCompat.ExtendedServiceClient {
|
|
|
37
38
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
38
39
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
39
40
|
: `${packageDetails}`;
|
|
40
|
-
const optionsWithDefaults =
|
|
41
|
+
const optionsWithDefaults = {
|
|
42
|
+
...defaults,
|
|
43
|
+
...options,
|
|
44
|
+
userAgentOptions: {
|
|
41
45
|
userAgentPrefix,
|
|
42
|
-
},
|
|
46
|
+
},
|
|
47
|
+
endpoint: options.endpoint ?? options.baseUri ?? "{endpoint}",
|
|
48
|
+
};
|
|
43
49
|
super(optionsWithDefaults);
|
|
44
50
|
// Parameter assignments
|
|
45
51
|
this.endpoint = endpoint;
|
|
@@ -84,6 +90,12 @@ export class SearchServiceClient extends coreHttpCompat.ExtendedServiceClient {
|
|
|
84
90
|
getServiceStatistics(options) {
|
|
85
91
|
return this.sendOperationRequest({ options }, getServiceStatisticsOperationSpec);
|
|
86
92
|
}
|
|
93
|
+
dataSources;
|
|
94
|
+
indexers;
|
|
95
|
+
skillsets;
|
|
96
|
+
synonymMaps;
|
|
97
|
+
indexes;
|
|
98
|
+
aliases;
|
|
87
99
|
}
|
|
88
100
|
// Operation Specifications
|
|
89
101
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchServiceClient.js","sourceRoot":"","sources":["../../../../src/generated/service/searchServiceClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAC;AAM1D,OAAO,EACL,eAAe,EACf,YAAY,EACZ,aAAa,EACb,eAAe,EACf,WAAW,EACX,WAAW,GACZ,MAAM,uBAAuB,CAAC;AAS/B,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAQ/C,gBAAgB;AAChB,MAAM,OAAO,mBAAoB,SAAQ,cAAc,CAAC,qBAAqB;
|
|
1
|
+
{"version":3,"file":"searchServiceClient.js","sourceRoot":"","sources":["../../../../src/generated/service/searchServiceClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAC;AAM1D,OAAO,EACL,eAAe,EACf,YAAY,EACZ,aAAa,EACb,eAAe,EACf,WAAW,EACX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,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED;;;OAGG;IACH,oBAAoB,CAClB,OAA4C;QAE5C,OAAO,IAAI,CAAC,oBAAoB,CAC9B,EAAE,OAAO,EAAE,EACX,iCAAiC,CAClC,CAAC;IACJ,CAAC;IAED,WAAW,CAAc;IACzB,QAAQ,CAAW;IACnB,SAAS,CAAY;IACrB,WAAW,CAAc;IACzB,OAAO,CAAU;IACjB,OAAO,CAAU;CAClB;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iCAAiC,GAA6B;IAClE,IAAI,EAAE,eAAe;IACrB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreHttpCompat from \"@azure/core-http-compat\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport {\n DataSourcesImpl,\n IndexersImpl,\n SkillsetsImpl,\n SynonymMapsImpl,\n IndexesImpl,\n AliasesImpl,\n} from \"./operations/index.js\";\nimport {\n DataSources,\n Indexers,\n Skillsets,\n SynonymMaps,\n Indexes,\n Aliases,\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n ApiVersion20241101Preview,\n SearchServiceClientOptionalParams,\n GetServiceStatisticsOptionalParams,\n GetServiceStatisticsResponse,\n} from \"./models/index.js\";\n\n/** @internal */\nexport class SearchServiceClient extends coreHttpCompat.ExtendedServiceClient {\n endpoint: string;\n apiVersion: ApiVersion20241101Preview;\n\n /**\n * Initializes a new instance of the SearchServiceClient class.\n * @param endpoint The endpoint URL of the search service.\n * @param apiVersion Api Version\n * @param options The parameter options\n */\n constructor(\n endpoint: string,\n apiVersion: ApiVersion20241101Preview,\n options?: SearchServiceClientOptionalParams,\n ) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n if (apiVersion === undefined) {\n throw new Error(\"'apiVersion' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: SearchServiceClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-search-documents/12.2.0-beta.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint: options.endpoint ?? options.baseUri ?? \"{endpoint}\",\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n this.apiVersion = apiVersion;\n this.dataSources = new DataSourcesImpl(this);\n this.indexers = new IndexersImpl(this);\n this.skillsets = new SkillsetsImpl(this);\n this.synonymMaps = new SynonymMapsImpl(this);\n this.indexes = new IndexesImpl(this);\n this.aliases = new AliasesImpl(this);\n this.addCustomApiVersionPolicy(apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n /**\n * Gets service level statistics for a search service.\n * @param options The options parameters.\n */\n getServiceStatistics(\n options?: GetServiceStatisticsOptionalParams,\n ): Promise<GetServiceStatisticsResponse> {\n return this.sendOperationRequest(\n { options },\n getServiceStatisticsOperationSpec,\n );\n }\n\n dataSources: DataSources;\n indexers: Indexers;\n skillsets: Skillsets;\n synonymMaps: SynonymMaps;\n indexes: Indexes;\n aliases: Aliases;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getServiceStatisticsOperationSpec: coreClient.OperationSpec = {\n path: \"/servicestats\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ServiceStatistics,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -5,6 +5,14 @@ const WorldGeodeticSystem1984 = "EPSG:4326"; // See https://epsg.io/4326
|
|
|
5
5
|
* Represents a geographic point in global coordinates.
|
|
6
6
|
*/
|
|
7
7
|
export default class GeographyPoint {
|
|
8
|
+
/**
|
|
9
|
+
* The latitude in decimal.
|
|
10
|
+
*/
|
|
11
|
+
latitude;
|
|
12
|
+
/**
|
|
13
|
+
* The longitude in decimal.
|
|
14
|
+
*/
|
|
15
|
+
longitude;
|
|
8
16
|
/**
|
|
9
17
|
* Constructs a new instance of GeographyPoint given
|
|
10
18
|
* the specified coordinates.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geographyPoint.js","sourceRoot":"","sources":["../../src/geographyPoint.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,uBAAuB,GAAG,WAAW,CAAC,CAAC,2BAA2B;AAExE;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,cAAc;
|
|
1
|
+
{"version":3,"file":"geographyPoint.js","sourceRoot":"","sources":["../../src/geographyPoint.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,uBAAuB,GAAG,WAAW,CAAC,CAAC,2BAA2B;AAExE;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC;;OAEG;IACI,QAAQ,CAAS;IACxB;;OAEG;IACI,SAAS,CAAS;IAEzB;;;;OAIG;IACH,YAAY,cAAuD;QACjE,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,SAAS,CAAC;QAC1C,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,QAAQ,CAAC;IAC1C,CAAC;IAED;;OAEG;IACI,MAAM;QACX,OAAO;YACL,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC;YAC5C,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE;SACrE,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nconst WorldGeodeticSystem1984 = \"EPSG:4326\"; // See https://epsg.io/4326\n\n/**\n * Represents a geographic point in global coordinates.\n */\nexport default class GeographyPoint {\n /**\n * The latitude in decimal.\n */\n public latitude: number;\n /**\n * The longitude in decimal.\n */\n public longitude: number;\n\n /**\n * Constructs a new instance of GeographyPoint given\n * the specified coordinates.\n * @param geographyPoint - object with longitude and latitude values in decimal\n */\n constructor(geographyPoint: { longitude: number; latitude: number }) {\n this.longitude = geographyPoint.longitude;\n this.latitude = geographyPoint.latitude;\n }\n\n /**\n * Used to serialize to a GeoJSON Point.\n */\n public toJSON(): Record<string, unknown> {\n return {\n type: \"Point\",\n coordinates: [this.longitude, this.latitude],\n crs: { type: \"name\", properties: { name: WorldGeodeticSystem1984 } },\n };\n }\n}\n"]}
|
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
* with multiple documents to the index.
|
|
6
6
|
*/
|
|
7
7
|
export class IndexDocumentsBatch {
|
|
8
|
+
/**
|
|
9
|
+
* The set of actions taken in this batch.
|
|
10
|
+
*/
|
|
11
|
+
actions;
|
|
8
12
|
constructor(actions = []) {
|
|
9
13
|
this.actions = actions;
|
|
10
14
|
}
|
|
@@ -14,7 +18,10 @@ export class IndexDocumentsBatch {
|
|
|
14
18
|
*/
|
|
15
19
|
upload(documents) {
|
|
16
20
|
const batch = documents.map((doc) => {
|
|
17
|
-
return
|
|
21
|
+
return {
|
|
22
|
+
...doc,
|
|
23
|
+
__actionType: "upload",
|
|
24
|
+
};
|
|
18
25
|
});
|
|
19
26
|
this.actions.push(...batch);
|
|
20
27
|
}
|
|
@@ -25,7 +32,10 @@ export class IndexDocumentsBatch {
|
|
|
25
32
|
*/
|
|
26
33
|
merge(documents) {
|
|
27
34
|
const batch = documents.map((doc) => {
|
|
28
|
-
return
|
|
35
|
+
return {
|
|
36
|
+
...doc,
|
|
37
|
+
__actionType: "merge",
|
|
38
|
+
};
|
|
29
39
|
});
|
|
30
40
|
this.actions.push(...batch);
|
|
31
41
|
}
|
|
@@ -36,7 +46,10 @@ export class IndexDocumentsBatch {
|
|
|
36
46
|
*/
|
|
37
47
|
mergeOrUpload(documents) {
|
|
38
48
|
const batch = documents.map((doc) => {
|
|
39
|
-
return
|
|
49
|
+
return {
|
|
50
|
+
...doc,
|
|
51
|
+
__actionType: "mergeOrUpload",
|
|
52
|
+
};
|
|
40
53
|
});
|
|
41
54
|
this.actions.push(...batch);
|
|
42
55
|
}
|
|
@@ -54,7 +67,10 @@ export class IndexDocumentsBatch {
|
|
|
54
67
|
else {
|
|
55
68
|
const documents = keyNameOrDocuments;
|
|
56
69
|
const batch = documents.map((document) => {
|
|
57
|
-
return
|
|
70
|
+
return {
|
|
71
|
+
__actionType: "delete",
|
|
72
|
+
...document,
|
|
73
|
+
};
|
|
58
74
|
});
|
|
59
75
|
this.actions.push(...batch);
|
|
60
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexDocumentsBatch.js","sourceRoot":"","sources":["../../src/indexDocumentsBatch.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC;;;GAGG;AACH,MAAM,OAAO,mBAAmB;
|
|
1
|
+
{"version":3,"file":"indexDocumentsBatch.js","sourceRoot":"","sources":["../../src/indexDocumentsBatch.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAC9B;;OAEG;IACa,OAAO,CAAiC;IAExD,YAAY,UAA0C,EAAE;QACtD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,SAAmB;QAC/B,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAA+B,CAAC,GAAG,EAAE,EAAE;YAChE,OAAO;gBACL,GAAG,GAAG;gBACN,YAAY,EAAE,QAAQ;aACvB,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,SAAmB;QAC9B,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CA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IndexDocumentsAction } from \"./indexModels.js\";\n\n/**\n * Class used to perform batch operations\n * with multiple documents to the index.\n */\nexport class IndexDocumentsBatch<TModel> {\n /**\n * The set of actions taken in this batch.\n */\n public readonly actions: IndexDocumentsAction<TModel>[];\n\n constructor(actions: IndexDocumentsAction<TModel>[] = []) {\n this.actions = actions;\n }\n\n /**\n * Upload an array of documents to the index.\n * @param documents - The documents to upload.\n */\n public upload(documents: TModel[]): void {\n const batch = documents.map<IndexDocumentsAction<TModel>>((doc) => {\n return {\n ...doc,\n __actionType: \"upload\",\n };\n });\n\n this.actions.push(...batch);\n }\n\n /**\n * Update a set of documents in the index.\n * For more details about how merging works, see https://learn.microsoft.com/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param documents - The updated documents.\n */\n public merge(documents: TModel[]): void {\n const batch = documents.map<IndexDocumentsAction<TModel>>((doc) => {\n return {\n ...doc,\n __actionType: \"merge\",\n };\n });\n\n this.actions.push(...batch);\n }\n\n /**\n * Update a set of documents in the index or uploads them if they don't exist.\n * For more details about how merging works, see https://learn.microsoft.com/rest/api/searchservice/AddUpdate-or-Delete-Documents\n * @param documents - The new/updated documents.\n */\n public mergeOrUpload(documents: TModel[]): void {\n const batch = documents.map<IndexDocumentsAction<TModel>>((doc) => {\n return {\n ...doc,\n __actionType: \"mergeOrUpload\",\n };\n });\n\n this.actions.push(...batch);\n }\n\n /**\n * Delete a set of documents.\n * @param keyName - The name of their primary key in the index.\n * @param keyValues - The primary key values of documents to delete.\n */\n public delete(keyName: keyof TModel, keyValues: string[]): void;\n\n /**\n * Delete a set of documents.\n * @param documents - Documents to be deleted.\n */\n public delete(documents: TModel[]): void;\n\n public delete(keyNameOrDocuments: keyof TModel | TModel[], keyValues?: string[]): void {\n if (keyValues) {\n const keyName = keyNameOrDocuments as keyof TModel;\n\n const batch = keyValues.map<IndexDocumentsAction<TModel>>((keyValue) => {\n return {\n __actionType: \"delete\",\n [keyName]: keyValue,\n } as IndexDocumentsAction<TModel>;\n });\n\n this.actions.push(...batch);\n } else {\n const documents = keyNameOrDocuments as TModel[];\n\n const batch = documents.map<IndexDocumentsAction<TModel>>((document) => {\n return {\n __actionType: \"delete\",\n ...document,\n } as IndexDocumentsAction<TModel>;\n });\n\n this.actions.push(...batch);\n }\n }\n}\n"]}
|