@azure/arm-databox 5.1.0-alpha.20250620.1 → 5.1.0-alpha.20250721.1
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/dataBoxManagementClient.js +16 -5
- package/dist/browser/dataBoxManagementClient.js.map +1 -1
- package/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +324 -144
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/jobs.js +87 -123
- package/dist/browser/operations/jobs.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/service.js +23 -40
- package/dist/browser/operations/service.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/dataBoxManagementClient.js +16 -5
- package/dist/commonjs/dataBoxManagementClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +324 -144
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/jobs.js +87 -122
- package/dist/commonjs/operations/jobs.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/service.js +23 -39
- package/dist/commonjs/operations/service.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/dataBoxManagementClient.js +16 -5
- package/dist/esm/dataBoxManagementClient.js.map +1 -1
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +324 -144
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/jobs.js +87 -123
- package/dist/esm/operations/jobs.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/service.js +23 -40
- package/dist/esm/operations/service.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/dataBoxManagementClient.js +16 -5
- package/dist/react-native/dataBoxManagementClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +324 -144
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/jobs.js +87 -123
- package/dist/react-native/operations/jobs.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/service.js +23 -40
- package/dist/react-native/operations/service.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- /package/review/{arm-databox.api.md → arm-databox-node.api.md} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAUtD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IACR,MAAM,CAA0B;IAEjD;;;OAGG;IACH,YAAY,MAA+B;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IA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C7B;KACF;IACD,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Operations } 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 { DataBoxManagementClient } from \"../dataBoxManagementClient.js\";\nimport {\n Operation,\n OperationsListNextOptionalParams,\n OperationsListOptionalParams,\n OperationsListResponse,\n OperationsListNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operations operations. */\nexport class OperationsImpl implements Operations {\n private readonly client: DataBoxManagementClient;\n\n /**\n * Initialize a new instance of the class Operations class.\n * @param client Reference to the service client\n */\n constructor(client: DataBoxManagementClient) {\n this.client = client;\n }\n\n /**\n * This method gets all the operations.\n * @param options The options parameters.\n */\n public list(\n options?: OperationsListOptionalParams,\n ): PagedAsyncIterableIterator<Operation> {\n const iter = this.listPagingAll(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(options, settings);\n },\n };\n }\n\n private async *listPagingPage(\n options?: OperationsListOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<Operation[]> {\n let result: OperationsListResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._list(options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listPagingAll(\n options?: OperationsListOptionalParams,\n ): AsyncIterableIterator<Operation> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * This method gets all the operations.\n * @param options The options parameters.\n */\n private _list(\n options?: OperationsListOptionalParams,\n ): Promise<OperationsListResponse> {\n return this.client.sendOperationRequest({ options }, listOperationSpec);\n }\n\n /**\n * ListNext\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n private _listNext(\n nextLink: string,\n options?: OperationsListNextOptionalParams,\n ): Promise<OperationsListNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.DataBox/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationList,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationList,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
|
|
|
13
12
|
/// <reference lib="esnext.asynciterable" />
|
|
14
13
|
/** Class containing Service operations. */
|
|
15
14
|
export class ServiceImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class Service class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -38,52 +38,35 @@ export class ServiceImpl {
|
|
|
38
38
|
return this;
|
|
39
39
|
},
|
|
40
40
|
byPage: (settings) => {
|
|
41
|
-
if (settings
|
|
41
|
+
if (settings?.maxPageSize) {
|
|
42
42
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
43
43
|
}
|
|
44
44
|
return this.listAvailableSkusByResourceGroupPagingPage(resourceGroupName, location, availableSkuRequest, options, settings);
|
|
45
45
|
},
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
listAvailableSkusByResourceGroupPagingPage(resourceGroupName, location, availableSkuRequest, options, settings) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
});
|
|
48
|
+
async *listAvailableSkusByResourceGroupPagingPage(resourceGroupName, location, availableSkuRequest, options, settings) {
|
|
49
|
+
let result;
|
|
50
|
+
let continuationToken = settings?.continuationToken;
|
|
51
|
+
if (!continuationToken) {
|
|
52
|
+
result = await this._listAvailableSkusByResourceGroup(resourceGroupName, location, availableSkuRequest, options);
|
|
53
|
+
let page = result.value || [];
|
|
54
|
+
continuationToken = result.nextLink;
|
|
55
|
+
setContinuationToken(page, continuationToken);
|
|
56
|
+
yield page;
|
|
57
|
+
}
|
|
58
|
+
while (continuationToken) {
|
|
59
|
+
result = await this._listAvailableSkusByResourceGroupNext(resourceGroupName, location, availableSkuRequest, continuationToken, options);
|
|
60
|
+
continuationToken = result.nextLink;
|
|
61
|
+
let page = result.value || [];
|
|
62
|
+
setContinuationToken(page, continuationToken);
|
|
63
|
+
yield page;
|
|
64
|
+
}
|
|
67
65
|
}
|
|
68
|
-
listAvailableSkusByResourceGroupPagingAll(resourceGroupName, location, availableSkuRequest, options) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
for (var _d = true, _e = __asyncValues(this.listAvailableSkusByResourceGroupPagingPage(resourceGroupName, location, availableSkuRequest, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
73
|
-
_c = _f.value;
|
|
74
|
-
_d = false;
|
|
75
|
-
const page = _c;
|
|
76
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
80
|
-
finally {
|
|
81
|
-
try {
|
|
82
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
83
|
-
}
|
|
84
|
-
finally { if (e_1) throw e_1.error; }
|
|
85
|
-
}
|
|
86
|
-
});
|
|
66
|
+
async *listAvailableSkusByResourceGroupPagingAll(resourceGroupName, location, availableSkuRequest, options) {
|
|
67
|
+
for await (const page of this.listAvailableSkusByResourceGroupPagingPage(resourceGroupName, location, availableSkuRequest, options)) {
|
|
68
|
+
yield* page;
|
|
69
|
+
}
|
|
87
70
|
}
|
|
88
71
|
/**
|
|
89
72
|
* This method provides the list of available skus for the given subscription, resource group and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/operations/service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;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AC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,QAAQ;SAC7B;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Service } 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 { DataBoxManagementClient } from \"../dataBoxManagementClient.js\";\nimport {\n SkuInformation,\n AvailableSkuRequest,\n ServiceListAvailableSkusByResourceGroupNextOptionalParams,\n ServiceListAvailableSkusByResourceGroupOptionalParams,\n ServiceListAvailableSkusByResourceGroupResponse,\n ValidateAddress,\n ServiceValidateAddressOptionalParams,\n ServiceValidateAddressResponse,\n ValidationRequestUnion,\n ServiceValidateInputsByResourceGroupOptionalParams,\n ServiceValidateInputsByResourceGroupResponse,\n ServiceValidateInputsOptionalParams,\n ServiceValidateInputsResponse,\n RegionConfigurationRequest,\n ServiceRegionConfigurationOptionalParams,\n ServiceRegionConfigurationResponse,\n ServiceRegionConfigurationByResourceGroupOptionalParams,\n ServiceRegionConfigurationByResourceGroupResponse,\n ServiceListAvailableSkusByResourceGroupNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Service operations. */\nexport class ServiceImpl implements Service {\n private readonly client: DataBoxManagementClient;\n\n /**\n * Initialize a new instance of the class Service class.\n * @param client Reference to the service client\n */\n constructor(client: DataBoxManagementClient) {\n this.client = client;\n }\n\n /**\n * This method provides the list of available skus for the given subscription, resource group and\n * location.\n * @param resourceGroupName The Resource Group Name\n * @param location The location of the resource\n * @param availableSkuRequest Filters for showing the available skus.\n * @param options The options parameters.\n */\n public listAvailableSkusByResourceGroup(\n resourceGroupName: string,\n location: string,\n availableSkuRequest: AvailableSkuRequest,\n options?: ServiceListAvailableSkusByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<SkuInformation> {\n const iter = this.listAvailableSkusByResourceGroupPagingAll(\n resourceGroupName,\n location,\n availableSkuRequest,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listAvailableSkusByResourceGroupPagingPage(\n resourceGroupName,\n location,\n availableSkuRequest,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listAvailableSkusByResourceGroupPagingPage(\n resourceGroupName: string,\n location: string,\n availableSkuRequest: AvailableSkuRequest,\n options?: ServiceListAvailableSkusByResourceGroupOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<SkuInformation[]> {\n let result: ServiceListAvailableSkusByResourceGroupResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listAvailableSkusByResourceGroup(\n resourceGroupName,\n location,\n availableSkuRequest,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listAvailableSkusByResourceGroupNext(\n resourceGroupName,\n location,\n availableSkuRequest,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listAvailableSkusByResourceGroupPagingAll(\n resourceGroupName: string,\n location: string,\n availableSkuRequest: AvailableSkuRequest,\n options?: ServiceListAvailableSkusByResourceGroupOptionalParams,\n ): AsyncIterableIterator<SkuInformation> {\n for await (const page of this.listAvailableSkusByResourceGroupPagingPage(\n resourceGroupName,\n location,\n availableSkuRequest,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * This method provides the list of available skus for the given subscription, resource group and\n * location.\n * @param resourceGroupName The Resource Group Name\n * @param location The location of the resource\n * @param availableSkuRequest Filters for showing the available skus.\n * @param options The options parameters.\n */\n private _listAvailableSkusByResourceGroup(\n resourceGroupName: string,\n location: string,\n availableSkuRequest: AvailableSkuRequest,\n options?: ServiceListAvailableSkusByResourceGroupOptionalParams,\n ): Promise<ServiceListAvailableSkusByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, location, availableSkuRequest, options },\n listAvailableSkusByResourceGroupOperationSpec,\n );\n }\n\n /**\n * [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer\n * shipping address and provide alternate addresses if any.\n * @param location The location of the resource\n * @param validateAddress Shipping address of the customer.\n * @param options The options parameters.\n */\n validateAddress(\n location: string,\n validateAddress: ValidateAddress,\n options?: ServiceValidateAddressOptionalParams,\n ): Promise<ServiceValidateAddressResponse> {\n return this.client.sendOperationRequest(\n { location, validateAddress, options },\n validateAddressOperationSpec,\n );\n }\n\n /**\n * This method does all necessary pre-job creation validation under resource group.\n * @param resourceGroupName The Resource Group Name\n * @param location The location of the resource\n * @param validationRequest Inputs of the customer.\n * @param options The options parameters.\n */\n validateInputsByResourceGroup(\n resourceGroupName: string,\n location: string,\n validationRequest: ValidationRequestUnion,\n options?: ServiceValidateInputsByResourceGroupOptionalParams,\n ): Promise<ServiceValidateInputsByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, location, validationRequest, options },\n validateInputsByResourceGroupOperationSpec,\n );\n }\n\n /**\n * This method does all necessary pre-job creation validation under subscription.\n * @param location The location of the resource\n * @param validationRequest Inputs of the customer.\n * @param options The options parameters.\n */\n validateInputs(\n location: string,\n validationRequest: ValidationRequestUnion,\n options?: ServiceValidateInputsOptionalParams,\n ): Promise<ServiceValidateInputsResponse> {\n return this.client.sendOperationRequest(\n { location, validationRequest, options },\n validateInputsOperationSpec,\n );\n }\n\n /**\n * This API provides configuration details specific to given region/location at Subscription level.\n * @param location The location of the resource\n * @param regionConfigurationRequest Request body to get the configuration for the region.\n * @param options The options parameters.\n */\n regionConfiguration(\n location: string,\n regionConfigurationRequest: RegionConfigurationRequest,\n options?: ServiceRegionConfigurationOptionalParams,\n ): Promise<ServiceRegionConfigurationResponse> {\n return this.client.sendOperationRequest(\n { location, regionConfigurationRequest, options },\n regionConfigurationOperationSpec,\n );\n }\n\n /**\n * This API provides configuration details specific to given region/location at Resource group level.\n * @param resourceGroupName The Resource Group Name\n * @param location The location of the resource\n * @param regionConfigurationRequest Request body to get the configuration for the region at resource\n * group level.\n * @param options The options parameters.\n */\n regionConfigurationByResourceGroup(\n resourceGroupName: string,\n location: string,\n regionConfigurationRequest: RegionConfigurationRequest,\n options?: ServiceRegionConfigurationByResourceGroupOptionalParams,\n ): Promise<ServiceRegionConfigurationByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, location, regionConfigurationRequest, options },\n regionConfigurationByResourceGroupOperationSpec,\n );\n }\n\n /**\n * ListAvailableSkusByResourceGroupNext\n * @param resourceGroupName The Resource Group Name\n * @param location The location of the resource\n * @param availableSkuRequest Filters for showing the available skus.\n * @param nextLink The nextLink from the previous successful call to the\n * ListAvailableSkusByResourceGroup method.\n * @param options The options parameters.\n */\n private _listAvailableSkusByResourceGroupNext(\n resourceGroupName: string,\n location: string,\n availableSkuRequest: AvailableSkuRequest,\n nextLink: string,\n options?: ServiceListAvailableSkusByResourceGroupNextOptionalParams,\n ): Promise<ServiceListAvailableSkusByResourceGroupNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, location, availableSkuRequest, nextLink, options },\n listAvailableSkusByResourceGroupNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listAvailableSkusByResourceGroupOperationSpec: coreClient.OperationSpec =\n {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AvailableSkusResult,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.availableSkuRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.location,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n };\nconst validateAddressOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AddressValidationOutput,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.validateAddress,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst validateInputsByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.ValidationResponse,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.validationRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.location,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst validateInputsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.ValidationResponse,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.validationRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst regionConfigurationOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.RegionConfigurationResponse,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.regionConfigurationRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst regionConfigurationByResourceGroupOperationSpec: coreClient.OperationSpec =\n {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.RegionConfigurationResponse,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.regionConfigurationRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.location,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n };\nconst listAvailableSkusByResourceGroupNextOperationSpec: coreClient.OperationSpec =\n {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AvailableSkusResult,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.location,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n };\n"]}
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/operations/service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAwBtD,4CAA4C;AAC5C,2CAA2C;AAC3C,MAAM,OAAO,WAAW;IACL,MAAM,CAA0B;IAEjD;;;OAGG;IACH,YAAY,MAA+B;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACI,gCAAgC,CACrC,iBAAyB,EACzB,QAAgB,EAChB,mBAAwC,EACxC,OAA+D;QAE/D,MAAM,IAAI,GAAG,IAAI,CAAC,yCAAyC,CACzD,iBAAiB,EACjB,QAAQ,EACR,mBAAmB,EACnB,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,0CAA0C,CACp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D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACJ,MAAM,iDAAiD,GACrD;IACE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,QAAQ;SAC7B;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,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 { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Service } 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 { DataBoxManagementClient } from \"../dataBoxManagementClient.js\";\nimport {\n SkuInformation,\n AvailableSkuRequest,\n ServiceListAvailableSkusByResourceGroupNextOptionalParams,\n ServiceListAvailableSkusByResourceGroupOptionalParams,\n ServiceListAvailableSkusByResourceGroupResponse,\n ValidateAddress,\n ServiceValidateAddressOptionalParams,\n ServiceValidateAddressResponse,\n ValidationRequestUnion,\n ServiceValidateInputsByResourceGroupOptionalParams,\n ServiceValidateInputsByResourceGroupResponse,\n ServiceValidateInputsOptionalParams,\n ServiceValidateInputsResponse,\n RegionConfigurationRequest,\n ServiceRegionConfigurationOptionalParams,\n ServiceRegionConfigurationResponse,\n ServiceRegionConfigurationByResourceGroupOptionalParams,\n ServiceRegionConfigurationByResourceGroupResponse,\n ServiceListAvailableSkusByResourceGroupNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Service operations. */\nexport class ServiceImpl implements Service {\n private readonly client: DataBoxManagementClient;\n\n /**\n * Initialize a new instance of the class Service class.\n * @param client Reference to the service client\n */\n constructor(client: DataBoxManagementClient) {\n this.client = client;\n }\n\n /**\n * This method provides the list of available skus for the given subscription, resource group and\n * location.\n * @param resourceGroupName The Resource Group Name\n * @param location The location of the resource\n * @param availableSkuRequest Filters for showing the available skus.\n * @param options The options parameters.\n */\n public listAvailableSkusByResourceGroup(\n resourceGroupName: string,\n location: string,\n availableSkuRequest: AvailableSkuRequest,\n options?: ServiceListAvailableSkusByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<SkuInformation> {\n const iter = this.listAvailableSkusByResourceGroupPagingAll(\n resourceGroupName,\n location,\n availableSkuRequest,\n options,\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listAvailableSkusByResourceGroupPagingPage(\n resourceGroupName,\n location,\n availableSkuRequest,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listAvailableSkusByResourceGroupPagingPage(\n resourceGroupName: string,\n location: string,\n availableSkuRequest: AvailableSkuRequest,\n options?: ServiceListAvailableSkusByResourceGroupOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<SkuInformation[]> {\n let result: ServiceListAvailableSkusByResourceGroupResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listAvailableSkusByResourceGroup(\n resourceGroupName,\n location,\n availableSkuRequest,\n options,\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listAvailableSkusByResourceGroupNext(\n resourceGroupName,\n location,\n availableSkuRequest,\n continuationToken,\n options,\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listAvailableSkusByResourceGroupPagingAll(\n resourceGroupName: string,\n location: string,\n availableSkuRequest: AvailableSkuRequest,\n options?: ServiceListAvailableSkusByResourceGroupOptionalParams,\n ): AsyncIterableIterator<SkuInformation> {\n for await (const page of this.listAvailableSkusByResourceGroupPagingPage(\n resourceGroupName,\n location,\n availableSkuRequest,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * This method provides the list of available skus for the given subscription, resource group and\n * location.\n * @param resourceGroupName The Resource Group Name\n * @param location The location of the resource\n * @param availableSkuRequest Filters for showing the available skus.\n * @param options The options parameters.\n */\n private _listAvailableSkusByResourceGroup(\n resourceGroupName: string,\n location: string,\n availableSkuRequest: AvailableSkuRequest,\n options?: ServiceListAvailableSkusByResourceGroupOptionalParams,\n ): Promise<ServiceListAvailableSkusByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, location, availableSkuRequest, options },\n listAvailableSkusByResourceGroupOperationSpec,\n );\n }\n\n /**\n * [DEPRECATED NOTICE: This operation will soon be removed]. This method validates the customer\n * shipping address and provide alternate addresses if any.\n * @param location The location of the resource\n * @param validateAddress Shipping address of the customer.\n * @param options The options parameters.\n */\n validateAddress(\n location: string,\n validateAddress: ValidateAddress,\n options?: ServiceValidateAddressOptionalParams,\n ): Promise<ServiceValidateAddressResponse> {\n return this.client.sendOperationRequest(\n { location, validateAddress, options },\n validateAddressOperationSpec,\n );\n }\n\n /**\n * This method does all necessary pre-job creation validation under resource group.\n * @param resourceGroupName The Resource Group Name\n * @param location The location of the resource\n * @param validationRequest Inputs of the customer.\n * @param options The options parameters.\n */\n validateInputsByResourceGroup(\n resourceGroupName: string,\n location: string,\n validationRequest: ValidationRequestUnion,\n options?: ServiceValidateInputsByResourceGroupOptionalParams,\n ): Promise<ServiceValidateInputsByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, location, validationRequest, options },\n validateInputsByResourceGroupOperationSpec,\n );\n }\n\n /**\n * This method does all necessary pre-job creation validation under subscription.\n * @param location The location of the resource\n * @param validationRequest Inputs of the customer.\n * @param options The options parameters.\n */\n validateInputs(\n location: string,\n validationRequest: ValidationRequestUnion,\n options?: ServiceValidateInputsOptionalParams,\n ): Promise<ServiceValidateInputsResponse> {\n return this.client.sendOperationRequest(\n { location, validationRequest, options },\n validateInputsOperationSpec,\n );\n }\n\n /**\n * This API provides configuration details specific to given region/location at Subscription level.\n * @param location The location of the resource\n * @param regionConfigurationRequest Request body to get the configuration for the region.\n * @param options The options parameters.\n */\n regionConfiguration(\n location: string,\n regionConfigurationRequest: RegionConfigurationRequest,\n options?: ServiceRegionConfigurationOptionalParams,\n ): Promise<ServiceRegionConfigurationResponse> {\n return this.client.sendOperationRequest(\n { location, regionConfigurationRequest, options },\n regionConfigurationOperationSpec,\n );\n }\n\n /**\n * This API provides configuration details specific to given region/location at Resource group level.\n * @param resourceGroupName The Resource Group Name\n * @param location The location of the resource\n * @param regionConfigurationRequest Request body to get the configuration for the region at resource\n * group level.\n * @param options The options parameters.\n */\n regionConfigurationByResourceGroup(\n resourceGroupName: string,\n location: string,\n regionConfigurationRequest: RegionConfigurationRequest,\n options?: ServiceRegionConfigurationByResourceGroupOptionalParams,\n ): Promise<ServiceRegionConfigurationByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, location, regionConfigurationRequest, options },\n regionConfigurationByResourceGroupOperationSpec,\n );\n }\n\n /**\n * ListAvailableSkusByResourceGroupNext\n * @param resourceGroupName The Resource Group Name\n * @param location The location of the resource\n * @param availableSkuRequest Filters for showing the available skus.\n * @param nextLink The nextLink from the previous successful call to the\n * ListAvailableSkusByResourceGroup method.\n * @param options The options parameters.\n */\n private _listAvailableSkusByResourceGroupNext(\n resourceGroupName: string,\n location: string,\n availableSkuRequest: AvailableSkuRequest,\n nextLink: string,\n options?: ServiceListAvailableSkusByResourceGroupNextOptionalParams,\n ): Promise<ServiceListAvailableSkusByResourceGroupNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, location, availableSkuRequest, nextLink, options },\n listAvailableSkusByResourceGroupNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listAvailableSkusByResourceGroupOperationSpec: coreClient.OperationSpec =\n {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/availableSkus\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AvailableSkusResult,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.availableSkuRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.location,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n };\nconst validateAddressOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateAddress\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.AddressValidationOutput,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.validateAddress,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst validateInputsByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/validateInputs\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.ValidationResponse,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.validationRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.location,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst validateInputsOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/validateInputs\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.ValidationResponse,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.validationRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst regionConfigurationOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.RegionConfigurationResponse,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.regionConfigurationRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst regionConfigurationByResourceGroupOperationSpec: coreClient.OperationSpec =\n {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/locations/{location}/regionConfiguration\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.RegionConfigurationResponse,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.regionConfigurationRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.location,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n };\nconst listAvailableSkusByResourceGroupNextOperationSpec: coreClient.OperationSpec =\n {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AvailableSkusResult,\n },\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.location,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n };\n"]}
|
|
@@ -14,18 +14,16 @@ const pageMap = new WeakMap();
|
|
|
14
14
|
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
15
15
|
*/
|
|
16
16
|
export function getContinuationToken(page) {
|
|
17
|
-
var _a;
|
|
18
17
|
if (typeof page !== "object" || page === null) {
|
|
19
18
|
return undefined;
|
|
20
19
|
}
|
|
21
|
-
return
|
|
20
|
+
return pageMap.get(page)?.continuationToken;
|
|
22
21
|
}
|
|
23
22
|
export function setContinuationToken(page, continuationToken) {
|
|
24
|
-
var _a;
|
|
25
23
|
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
26
24
|
return;
|
|
27
25
|
}
|
|
28
|
-
const pageInfo =
|
|
26
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
29
27
|
pageInfo.continuationToken = continuationToken;
|
|
30
28
|
pageMap.set(page, pageInfo);
|
|
31
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa
|
|
1
|
+
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,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\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given the last `.value` produced by the `byPage` iterator,\n * returns a continuation token that can be used to begin paging from\n * that point later.\n * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.\n * @returns The continuation token that can be passed into byPage() during future calls.\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined,\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
|
|
@@ -15,6 +15,9 @@ const index_js_1 = require("./operations/index.js");
|
|
|
15
15
|
const Parameters = tslib_1.__importStar(require("./models/parameters.js"));
|
|
16
16
|
const Mappers = tslib_1.__importStar(require("./models/mappers.js"));
|
|
17
17
|
class DataBoxManagementClient extends coreClient.ServiceClient {
|
|
18
|
+
$host;
|
|
19
|
+
apiVersion;
|
|
20
|
+
subscriptionId;
|
|
18
21
|
/**
|
|
19
22
|
* Initializes a new instance of the DataBoxManagementClient class.
|
|
20
23
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -22,7 +25,6 @@ class DataBoxManagementClient extends coreClient.ServiceClient {
|
|
|
22
25
|
* @param options The parameter options
|
|
23
26
|
*/
|
|
24
27
|
constructor(credentials, subscriptionId, options) {
|
|
25
|
-
var _a, _b, _c;
|
|
26
28
|
if (credentials === undefined) {
|
|
27
29
|
throw new Error("'credentials' cannot be null");
|
|
28
30
|
}
|
|
@@ -41,12 +43,17 @@ class DataBoxManagementClient extends coreClient.ServiceClient {
|
|
|
41
43
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
42
44
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
43
45
|
: `${packageDetails}`;
|
|
44
|
-
const optionsWithDefaults =
|
|
46
|
+
const optionsWithDefaults = {
|
|
47
|
+
...defaults,
|
|
48
|
+
...options,
|
|
49
|
+
userAgentOptions: {
|
|
45
50
|
userAgentPrefix,
|
|
46
|
-
},
|
|
51
|
+
},
|
|
52
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com",
|
|
53
|
+
};
|
|
47
54
|
super(optionsWithDefaults);
|
|
48
55
|
let bearerTokenAuthenticationPolicyFound = false;
|
|
49
|
-
if (
|
|
56
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
50
57
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
51
58
|
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
52
59
|
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
@@ -60,7 +67,8 @@ class DataBoxManagementClient extends coreClient.ServiceClient {
|
|
|
60
67
|
});
|
|
61
68
|
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
62
69
|
credential: credentials,
|
|
63
|
-
scopes:
|
|
70
|
+
scopes: optionsWithDefaults.credentialScopes ??
|
|
71
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
64
72
|
challengeCallbacks: {
|
|
65
73
|
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,
|
|
66
74
|
},
|
|
@@ -112,6 +120,9 @@ class DataBoxManagementClient extends coreClient.ServiceClient {
|
|
|
112
120
|
mitigate(jobName, resourceGroupName, mitigateJobRequest, options) {
|
|
113
121
|
return this.sendOperationRequest({ jobName, resourceGroupName, mitigateJobRequest, options }, mitigateOperationSpec);
|
|
114
122
|
}
|
|
123
|
+
operations;
|
|
124
|
+
jobs;
|
|
125
|
+
service;
|
|
115
126
|
}
|
|
116
127
|
exports.DataBoxManagementClient = DataBoxManagementClient;
|
|
117
128
|
// Operation Specifications
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataBoxManagementClient.js","sourceRoot":"","sources":["../../src/dataBoxManagementClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA8D;AAO9D,oDAA8E;AAE9E,2EAAqD;AACrD,qEAA+C;AAO/C,MAAa,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IAKnE;;;;;OAKG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAA+C;;QAE/C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC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AAO,CAAC,QAAQ;SAC7B;KACF;IACD,WAAW,EAAE,UAAU,CAAC,kBAAkB;IAC1C,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport { OperationsImpl, JobsImpl, ServiceImpl } from \"./operations/index.js\";\nimport { Operations, Jobs, Service } from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n DataBoxManagementClientOptionalParams,\n MitigateJobRequest,\n MitigateOptionalParams,\n} from \"./models/index.js\";\n\nexport class DataBoxManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the DataBoxManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The Subscription Id\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: DataBoxManagementClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: DataBoxManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-databox/5.1.0`;\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:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2025-02-01\";\n this.operations = new OperationsImpl(this);\n this.jobs = new JobsImpl(this);\n this.service = new ServiceImpl(this);\n this.addCustomApiVersionPolicy(options.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 * Request to mitigate for a given job\n * @param jobName The name of the job Resource within the specified resource group. job names must be\n * between 3 and 24 characters in length and use any alphanumeric and underscore only\n * @param resourceGroupName The Resource Group Name\n * @param mitigateJobRequest Mitigation Request\n * @param options The options parameters.\n */\n mitigate(\n jobName: string,\n resourceGroupName: string,\n mitigateJobRequest: MitigateJobRequest,\n options?: MitigateOptionalParams,\n ): Promise<void> {\n return this.sendOperationRequest(\n { jobName, resourceGroupName, mitigateJobRequest, options },\n mitigateOperationSpec,\n );\n }\n\n operations: Operations;\n jobs: Jobs;\n service: Service;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst mitigateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/mitigate\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.mitigateJobRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.jobName,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"dataBoxManagementClient.js","sourceRoot":"","sources":["../../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C;IACJ,CAAC;IAED,UAAU,CAAa;IACvB,IAAI,CAAO;IACX,OAAO,CAAU;CAClB;AAhJD,0DAgJC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,wHAAwH;IAC9H,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,QAAQ;SAC7B;KACF;IACD,WAAW,EAAE,UAAU,CAAC,kBAAkB;IAC1C,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,OAAO;QAClB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport { OperationsImpl, JobsImpl, ServiceImpl } from \"./operations/index.js\";\nimport { Operations, Jobs, Service } from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n DataBoxManagementClientOptionalParams,\n MitigateJobRequest,\n MitigateOptionalParams,\n} from \"./models/index.js\";\n\nexport class DataBoxManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the DataBoxManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId The Subscription Id\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: DataBoxManagementClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: DataBoxManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-databox/5.1.0`;\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:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2025-02-01\";\n this.operations = new OperationsImpl(this);\n this.jobs = new JobsImpl(this);\n this.service = new ServiceImpl(this);\n this.addCustomApiVersionPolicy(options.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 * Request to mitigate for a given job\n * @param jobName The name of the job Resource within the specified resource group. job names must be\n * between 3 and 24 characters in length and use any alphanumeric and underscore only\n * @param resourceGroupName The Resource Group Name\n * @param mitigateJobRequest Mitigation Request\n * @param options The options parameters.\n */\n mitigate(\n jobName: string,\n resourceGroupName: string,\n mitigateJobRequest: MitigateJobRequest,\n options?: MitigateOptionalParams,\n ): Promise<void> {\n return this.sendOperationRequest(\n { jobName, resourceGroupName, mitigateJobRequest, options },\n mitigateOperationSpec,\n );\n }\n\n operations: Operations;\n jobs: Jobs;\n service: Service;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst mitigateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBox/jobs/{jobName}/mitigate\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.ApiError,\n },\n },\n requestBody: Parameters.mitigateJobRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.jobName,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
package/dist/commonjs/lroImpl.js
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.createLroSpec = createLroSpec;
|
|
11
|
-
const tslib_1 = require("tslib");
|
|
12
11
|
function createLroSpec(inputs) {
|
|
13
12
|
const { args, spec, sendOperationFn } = inputs;
|
|
14
13
|
return {
|
|
@@ -16,8 +15,13 @@ function createLroSpec(inputs) {
|
|
|
16
15
|
requestPath: spec.path,
|
|
17
16
|
sendInitialRequest: () => sendOperationFn(args, spec),
|
|
18
17
|
sendPollRequest: (path, options) => {
|
|
19
|
-
const { requestBody
|
|
20
|
-
return sendOperationFn(args,
|
|
18
|
+
const { requestBody, ...restSpec } = spec;
|
|
19
|
+
return sendOperationFn(args, {
|
|
20
|
+
...restSpec,
|
|
21
|
+
httpMethod: "GET",
|
|
22
|
+
path,
|
|
23
|
+
abortSignal: options?.abortSignal,
|
|
24
|
+
});
|
|
21
25
|
},
|
|
22
26
|
};
|
|
23
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAQH,sCA2BC
|
|
1
|
+
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAQH,sCA2BC;AA3BD,SAAgB,aAAa,CAAI,MAQhC;IACC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IAC/C,OAAO;QACL,aAAa,EAAE,IAAI,CAAC,UAAU;QAC9B,WAAW,EAAE,IAAI,CAAC,IAAK;QACvB,kBAAkB,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC;QACrD,eAAe,EAAE,CACf,IAAY,EACZ,OAA2C,EAC3C,EAAE;YACF,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;YAC1C,OAAO,eAAe,CAAC,IAAI,EAAE;gBAC3B,GAAG,QAAQ;gBACX,UAAU,EAAE,KAAK;gBACjB,IAAI;gBACJ,WAAW,EAAE,OAAO,EAAE,WAAW;aAClC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,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\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport function createLroSpec<T>(inputs: {\n sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;\n args: Record<string, unknown>;\n spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>;\n}): LongRunningOperation<T> {\n const { args, spec, sendOperationFn } = inputs;\n return {\n requestMethod: spec.httpMethod,\n requestPath: spec.path!,\n sendInitialRequest: () => sendOperationFn(args, spec),\n sendPollRequest: (\n path: string,\n options?: { abortSignal?: AbortSignalLike },\n ) => {\n const { requestBody, ...restSpec } = spec;\n return sendOperationFn(args, {\n ...restSpec,\n httpMethod: \"GET\",\n path,\n abortSignal: options?.abortSignal,\n });\n },\n };\n}\n"]}
|