@azure/arm-astro 1.0.0-alpha.20241230.1 → 1.0.0-alpha.20250108.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-esm/src → dist/browser}/astroManagementClient.d.ts +2 -2
- package/dist/browser/astroManagementClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/astroManagementClient.js +15 -18
- package/dist/browser/astroManagementClient.js.map +1 -0
- package/dist/browser/index.d.ts +5 -0
- package/{dist-esm/src → dist/browser}/index.d.ts.map +1 -1
- package/{dist-esm/src → dist/browser}/index.js +4 -4
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/lroImpl.js.map +1 -0
- package/dist/browser/models/index.js.map +1 -0
- package/dist/browser/models/mappers.js.map +1 -0
- package/{dist-esm/src → dist/browser}/models/parameters.js +1 -1
- package/dist/browser/models/parameters.js.map +1 -0
- package/dist/browser/operations/index.d.ts +3 -0
- package/{dist-esm/src → dist/browser}/operations/index.d.ts.map +1 -1
- package/{dist-esm/src → dist/browser}/operations/index.js +2 -2
- package/dist/browser/operations/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/operations.d.ts +3 -3
- package/dist/browser/operations/operations.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/operations.js +3 -3
- package/dist/browser/operations/operations.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/organizations.d.ts +3 -3
- package/dist/browser/operations/organizations.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/operations/organizations.js +116 -128
- package/dist/browser/operations/organizations.js.map +1 -0
- package/dist/browser/operationsInterfaces/index.d.ts +3 -0
- package/{dist-esm/src → dist/browser}/operationsInterfaces/index.d.ts.map +1 -1
- package/{dist-esm/src → dist/browser}/operationsInterfaces/index.js +2 -2
- package/dist/browser/operationsInterfaces/index.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operationsInterfaces/operations.d.ts +1 -1
- package/{dist-esm/src → dist/browser}/operationsInterfaces/operations.d.ts.map +1 -1
- package/dist/browser/operationsInterfaces/operations.js.map +1 -0
- package/{dist-esm/src → dist/browser}/operationsInterfaces/organizations.d.ts +1 -1
- package/dist/browser/operationsInterfaces/organizations.d.ts.map +1 -0
- package/dist/browser/operationsInterfaces/organizations.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/pagingHelper.js.map +1 -0
- package/dist/commonjs/astroManagementClient.d.ts +21 -0
- package/dist/commonjs/astroManagementClient.d.ts.map +1 -0
- package/dist/commonjs/astroManagementClient.js +103 -0
- package/dist/commonjs/astroManagementClient.js.map +1 -0
- package/dist/commonjs/index.d.ts +5 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +19 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/lroImpl.d.ts +11 -0
- package/dist/commonjs/lroImpl.d.ts.map +1 -0
- package/dist/commonjs/lroImpl.js +24 -0
- package/dist/commonjs/lroImpl.js.map +1 -0
- package/{types/arm-astro.d.ts → dist/commonjs/models/index.d.ts} +565 -736
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +89 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/mappers.d.ts +28 -0
- package/dist/commonjs/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/models/mappers.js +860 -0
- package/dist/commonjs/models/mappers.js.map +1 -0
- package/dist/commonjs/models/parameters.d.ts +12 -0
- package/dist/commonjs/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/models/parameters.js +117 -0
- package/dist/commonjs/models/parameters.js.map +1 -0
- package/dist/commonjs/operations/index.d.ts +3 -0
- package/dist/commonjs/operations/index.d.ts.map +1 -0
- package/dist/commonjs/operations/index.js +13 -0
- package/dist/commonjs/operations/index.js.map +1 -0
- package/dist/commonjs/operations/operations.d.ts +32 -0
- package/dist/commonjs/operations/operations.d.ts.map +1 -0
- package/dist/commonjs/operations/operations.js +137 -0
- package/dist/commonjs/operations/operations.js.map +1 -0
- package/dist/commonjs/operations/organizations.d.ts +107 -0
- package/dist/commonjs/operations/organizations.d.ts.map +1 -0
- package/dist/commonjs/operations/organizations.js +546 -0
- package/dist/commonjs/operations/organizations.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts +3 -0
- package/dist/commonjs/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/index.js +13 -0
- package/dist/commonjs/operationsInterfaces/index.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/operations.d.ts +11 -0
- package/dist/commonjs/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/operations.js +10 -0
- package/dist/commonjs/operationsInterfaces/operations.js.map +1 -0
- package/dist/commonjs/operationsInterfaces/organizations.d.ts +71 -0
- package/dist/commonjs/operationsInterfaces/organizations.d.ts.map +1 -0
- package/dist/commonjs/operationsInterfaces/organizations.js +10 -0
- package/dist/commonjs/operationsInterfaces/organizations.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/pagingHelper.d.ts +13 -0
- package/dist/commonjs/pagingHelper.d.ts.map +1 -0
- package/dist/commonjs/pagingHelper.js +36 -0
- package/dist/commonjs/pagingHelper.js.map +1 -0
- package/dist/esm/astroManagementClient.d.ts +21 -0
- package/dist/esm/astroManagementClient.d.ts.map +1 -0
- package/dist/esm/astroManagementClient.js +98 -0
- package/dist/esm/astroManagementClient.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/{src/index.ts → dist/esm/index.js} +5 -5
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lroImpl.d.ts +11 -0
- package/dist/esm/lroImpl.d.ts.map +1 -0
- package/dist/esm/lroImpl.js +21 -0
- package/dist/esm/lroImpl.js.map +1 -0
- package/dist/esm/models/index.d.ts +565 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +86 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/mappers.d.ts +28 -0
- package/dist/esm/models/mappers.d.ts.map +1 -0
- package/dist/esm/models/mappers.js +857 -0
- package/dist/esm/models/mappers.js.map +1 -0
- package/dist/esm/models/parameters.d.ts +12 -0
- package/dist/esm/models/parameters.d.ts.map +1 -0
- package/dist/esm/models/parameters.js +114 -0
- package/dist/esm/models/parameters.js.map +1 -0
- package/dist/esm/operations/index.d.ts +3 -0
- package/dist/esm/operations/index.d.ts.map +1 -0
- package/dist/esm/operations/index.js +10 -0
- package/dist/esm/operations/index.js.map +1 -0
- package/dist/esm/operations/operations.d.ts +32 -0
- package/dist/esm/operations/operations.d.ts.map +1 -0
- package/dist/esm/operations/operations.js +133 -0
- package/dist/esm/operations/operations.js.map +1 -0
- package/dist/esm/operations/organizations.d.ts +107 -0
- package/dist/esm/operations/organizations.d.ts.map +1 -0
- package/dist/esm/operations/organizations.js +542 -0
- package/dist/esm/operations/organizations.js.map +1 -0
- package/dist/esm/operationsInterfaces/index.d.ts +3 -0
- package/dist/esm/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/esm/operationsInterfaces/index.js +10 -0
- package/dist/esm/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/operationsInterfaces/operations.d.ts +11 -0
- package/dist/esm/operationsInterfaces/operations.d.ts.map +1 -0
- package/{src/operations/index.ts → dist/esm/operationsInterfaces/operations.js} +2 -3
- package/dist/esm/operationsInterfaces/operations.js.map +1 -0
- package/dist/esm/operationsInterfaces/organizations.d.ts +71 -0
- package/dist/esm/operationsInterfaces/organizations.d.ts.map +1 -0
- package/{src/operationsInterfaces/index.ts → dist/esm/operationsInterfaces/organizations.js} +2 -3
- package/dist/esm/operationsInterfaces/organizations.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/pagingHelper.d.ts +13 -0
- package/dist/esm/pagingHelper.d.ts.map +1 -0
- package/dist/esm/pagingHelper.js +32 -0
- package/dist/esm/pagingHelper.js.map +1 -0
- package/dist/react-native/astroManagementClient.d.ts +21 -0
- package/dist/react-native/astroManagementClient.d.ts.map +1 -0
- package/dist/react-native/astroManagementClient.js +98 -0
- package/dist/react-native/astroManagementClient.js.map +1 -0
- package/dist/react-native/index.d.ts +5 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +13 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/lroImpl.d.ts +11 -0
- package/dist/react-native/lroImpl.d.ts.map +1 -0
- package/dist/react-native/lroImpl.js +21 -0
- package/dist/react-native/lroImpl.js.map +1 -0
- package/dist/react-native/models/index.d.ts +565 -0
- package/dist/react-native/models/index.d.ts.map +1 -0
- package/dist/react-native/models/index.js +86 -0
- package/dist/react-native/models/index.js.map +1 -0
- package/dist/react-native/models/mappers.d.ts +28 -0
- package/dist/react-native/models/mappers.d.ts.map +1 -0
- package/dist/react-native/models/mappers.js +857 -0
- package/dist/react-native/models/mappers.js.map +1 -0
- package/dist/react-native/models/parameters.d.ts +12 -0
- package/dist/react-native/models/parameters.d.ts.map +1 -0
- package/dist/react-native/models/parameters.js +114 -0
- package/dist/react-native/models/parameters.js.map +1 -0
- package/dist/react-native/operations/index.d.ts +3 -0
- package/dist/react-native/operations/index.d.ts.map +1 -0
- package/dist/react-native/operations/index.js +10 -0
- package/dist/react-native/operations/index.js.map +1 -0
- package/dist/react-native/operations/operations.d.ts +32 -0
- package/dist/react-native/operations/operations.d.ts.map +1 -0
- package/dist/react-native/operations/operations.js +133 -0
- package/dist/react-native/operations/operations.js.map +1 -0
- package/dist/react-native/operations/organizations.d.ts +107 -0
- package/dist/react-native/operations/organizations.d.ts.map +1 -0
- package/dist/react-native/operations/organizations.js +542 -0
- package/dist/react-native/operations/organizations.js.map +1 -0
- package/dist/react-native/operationsInterfaces/index.d.ts +3 -0
- package/dist/react-native/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/index.js +10 -0
- package/dist/react-native/operationsInterfaces/index.js.map +1 -0
- package/dist/react-native/operationsInterfaces/operations.d.ts +11 -0
- package/dist/react-native/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/operations.js +9 -0
- package/dist/react-native/operationsInterfaces/operations.js.map +1 -0
- package/dist/react-native/operationsInterfaces/organizations.d.ts +71 -0
- package/dist/react-native/operationsInterfaces/organizations.d.ts.map +1 -0
- package/dist/react-native/operationsInterfaces/organizations.js +9 -0
- package/dist/react-native/operationsInterfaces/organizations.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/pagingHelper.d.ts +13 -0
- package/dist/react-native/pagingHelper.d.ts.map +1 -0
- package/dist/react-native/pagingHelper.js +32 -0
- package/dist/react-native/pagingHelper.js.map +1 -0
- package/package.json +58 -28
- package/dist/index.js +0 -1942
- package/dist/index.js.map +0 -1
- package/dist/index.min.js +0 -1
- package/dist/index.min.js.map +0 -1
- package/dist-esm/samples-dev/operationsListSample.d.ts +0 -2
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/operationsListSample.js +0 -53
- package/dist-esm/samples-dev/operationsListSample.js.map +0 -1
- package/dist-esm/samples-dev/organizationsCreateOrUpdateSample.d.ts +0 -2
- package/dist-esm/samples-dev/organizationsCreateOrUpdateSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/organizationsCreateOrUpdateSample.js +0 -79
- package/dist-esm/samples-dev/organizationsCreateOrUpdateSample.js.map +0 -1
- package/dist-esm/samples-dev/organizationsDeleteSample.d.ts +0 -2
- package/dist-esm/samples-dev/organizationsDeleteSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/organizationsDeleteSample.js +0 -39
- package/dist-esm/samples-dev/organizationsDeleteSample.js.map +0 -1
- package/dist-esm/samples-dev/organizationsGetSample.d.ts +0 -2
- package/dist-esm/samples-dev/organizationsGetSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/organizationsGetSample.js +0 -39
- package/dist-esm/samples-dev/organizationsGetSample.js.map +0 -1
- package/dist-esm/samples-dev/organizationsListByResourceGroupSample.d.ts +0 -2
- package/dist-esm/samples-dev/organizationsListByResourceGroupSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/organizationsListByResourceGroupSample.js +0 -54
- package/dist-esm/samples-dev/organizationsListByResourceGroupSample.js.map +0 -1
- package/dist-esm/samples-dev/organizationsListBySubscriptionSample.d.ts +0 -2
- package/dist-esm/samples-dev/organizationsListBySubscriptionSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/organizationsListBySubscriptionSample.js +0 -53
- package/dist-esm/samples-dev/organizationsListBySubscriptionSample.js.map +0 -1
- package/dist-esm/samples-dev/organizationsUpdateSample.d.ts +0 -2
- package/dist-esm/samples-dev/organizationsUpdateSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/organizationsUpdateSample.js +0 -65
- package/dist-esm/samples-dev/organizationsUpdateSample.js.map +0 -1
- package/dist-esm/src/astroManagementClient.d.ts.map +0 -1
- package/dist-esm/src/astroManagementClient.js.map +0 -1
- package/dist-esm/src/index.d.ts +0 -5
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/lroImpl.js.map +0 -1
- package/dist-esm/src/models/index.js.map +0 -1
- package/dist-esm/src/models/mappers.js.map +0 -1
- package/dist-esm/src/models/parameters.js.map +0 -1
- package/dist-esm/src/operations/index.d.ts +0 -3
- package/dist-esm/src/operations/index.js.map +0 -1
- package/dist-esm/src/operations/operations.d.ts.map +0 -1
- package/dist-esm/src/operations/operations.js.map +0 -1
- package/dist-esm/src/operations/organizations.d.ts.map +0 -1
- package/dist-esm/src/operations/organizations.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/index.d.ts +0 -3
- package/dist-esm/src/operationsInterfaces/index.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/operations.js.map +0 -1
- package/dist-esm/src/operationsInterfaces/organizations.d.ts.map +0 -1
- package/dist-esm/src/operationsInterfaces/organizations.js.map +0 -1
- package/dist-esm/src/pagingHelper.js.map +0 -1
- package/dist-esm/test/astro_operations_test.spec.d.ts +0 -4
- package/dist-esm/test/astro_operations_test.spec.d.ts.map +0 -1
- package/dist-esm/test/astro_operations_test.spec.js +0 -77
- package/dist-esm/test/astro_operations_test.spec.js.map +0 -1
- package/src/astroManagementClient.ts +0 -143
- package/src/lroImpl.ts +0 -42
- package/src/models/index.ts +0 -637
- package/src/models/mappers.ts +0 -899
- package/src/models/parameters.ts +0 -132
- package/src/operations/operations.ts +0 -149
- package/src/operations/organizations.ts +0 -728
- package/src/operationsInterfaces/operations.ts +0 -22
- package/src/operationsInterfaces/organizations.ts +0 -145
- package/src/pagingHelper.ts +0 -39
- package/tsconfig.json +0 -33
- /package/{dist-esm/src → dist/browser}/lroImpl.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/lroImpl.d.ts.map +0 -0
- /package/{dist-esm/src → dist/browser}/lroImpl.js +0 -0
- /package/{dist-esm/src → dist/browser}/models/index.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/models/index.d.ts.map +0 -0
- /package/{dist-esm/src → dist/browser}/models/index.js +0 -0
- /package/{dist-esm/src → dist/browser}/models/mappers.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/models/mappers.d.ts.map +0 -0
- /package/{dist-esm/src → dist/browser}/models/mappers.js +0 -0
- /package/{dist-esm/src → dist/browser}/models/parameters.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/models/parameters.d.ts.map +0 -0
- /package/{dist-esm/src → dist/browser}/operationsInterfaces/operations.js +0 -0
- /package/{dist-esm/src → dist/browser}/operationsInterfaces/organizations.js +0 -0
- /package/{dist-esm/src → dist/browser}/pagingHelper.d.ts +0 -0
- /package/{dist-esm/src → dist/browser}/pagingHelper.d.ts.map +0 -0
- /package/{dist-esm/src → dist/browser}/pagingHelper.js +0 -0
- /package/{types → dist/commonjs}/tsdoc-metadata.json +0 -0
|
@@ -5,13 +5,13 @@
|
|
|
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
|
|
9
|
-
import { setContinuationToken } from "../pagingHelper";
|
|
8
|
+
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
|
+
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
10
|
import * as coreClient from "@azure/core-client";
|
|
11
|
-
import * as Mappers from "../models/mappers";
|
|
12
|
-
import * as Parameters from "../models/parameters";
|
|
11
|
+
import * as Mappers from "../models/mappers.js";
|
|
12
|
+
import * as Parameters from "../models/parameters.js";
|
|
13
13
|
import { createHttpPoller, } from "@azure/core-lro";
|
|
14
|
-
import { createLroSpec } from "../lroImpl";
|
|
14
|
+
import { createLroSpec } from "../lroImpl.js";
|
|
15
15
|
/// <reference lib="esnext.asynciterable" />
|
|
16
16
|
/** Class containing Organizations operations. */
|
|
17
17
|
export class OrganizationsImpl {
|
|
@@ -176,43 +176,41 @@ export class OrganizationsImpl {
|
|
|
176
176
|
* @param resource Resource create parameters.
|
|
177
177
|
* @param options The options parameters.
|
|
178
178
|
*/
|
|
179
|
-
beginCreateOrUpdate(resourceGroupName, organizationName, resource, options) {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
resourceLocationConfig: "azure-async-operation",
|
|
212
|
-
});
|
|
213
|
-
yield poller.poll();
|
|
214
|
-
return poller;
|
|
179
|
+
async beginCreateOrUpdate(resourceGroupName, organizationName, resource, options) {
|
|
180
|
+
const directSendOperation = async (args, spec) => {
|
|
181
|
+
return this.client.sendOperationRequest(args, spec);
|
|
182
|
+
};
|
|
183
|
+
const sendOperationFn = async (args, spec) => {
|
|
184
|
+
var _a;
|
|
185
|
+
let currentRawResponse = undefined;
|
|
186
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
187
|
+
const callback = (rawResponse, flatResponse) => {
|
|
188
|
+
currentRawResponse = rawResponse;
|
|
189
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
190
|
+
};
|
|
191
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
192
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
193
|
+
return {
|
|
194
|
+
flatResponse,
|
|
195
|
+
rawResponse: {
|
|
196
|
+
statusCode: currentRawResponse.status,
|
|
197
|
+
body: currentRawResponse.parsedBody,
|
|
198
|
+
headers: currentRawResponse.headers.toJSON(),
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
const lro = createLroSpec({
|
|
203
|
+
sendOperationFn,
|
|
204
|
+
args: { resourceGroupName, organizationName, resource, options },
|
|
205
|
+
spec: createOrUpdateOperationSpec,
|
|
206
|
+
});
|
|
207
|
+
const poller = await createHttpPoller(lro, {
|
|
208
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
209
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
210
|
+
resourceLocationConfig: "azure-async-operation",
|
|
215
211
|
});
|
|
212
|
+
await poller.poll();
|
|
213
|
+
return poller;
|
|
216
214
|
}
|
|
217
215
|
/**
|
|
218
216
|
* Create a OrganizationResource
|
|
@@ -221,11 +219,9 @@ export class OrganizationsImpl {
|
|
|
221
219
|
* @param resource Resource create parameters.
|
|
222
220
|
* @param options The options parameters.
|
|
223
221
|
*/
|
|
224
|
-
beginCreateOrUpdateAndWait(resourceGroupName, organizationName, resource, options) {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
return poller.pollUntilDone();
|
|
228
|
-
});
|
|
222
|
+
async beginCreateOrUpdateAndWait(resourceGroupName, organizationName, resource, options) {
|
|
223
|
+
const poller = await this.beginCreateOrUpdate(resourceGroupName, organizationName, resource, options);
|
|
224
|
+
return poller.pollUntilDone();
|
|
229
225
|
}
|
|
230
226
|
/**
|
|
231
227
|
* Update a OrganizationResource
|
|
@@ -234,43 +230,41 @@ export class OrganizationsImpl {
|
|
|
234
230
|
* @param properties The resource properties to be updated.
|
|
235
231
|
* @param options The options parameters.
|
|
236
232
|
*/
|
|
237
|
-
beginUpdate(resourceGroupName, organizationName, properties, options) {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
spec: updateOperationSpec,
|
|
265
|
-
});
|
|
266
|
-
const poller = yield createHttpPoller(lro, {
|
|
267
|
-
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
268
|
-
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
269
|
-
resourceLocationConfig: "location",
|
|
270
|
-
});
|
|
271
|
-
yield poller.poll();
|
|
272
|
-
return poller;
|
|
233
|
+
async beginUpdate(resourceGroupName, organizationName, properties, options) {
|
|
234
|
+
const directSendOperation = async (args, spec) => {
|
|
235
|
+
return this.client.sendOperationRequest(args, spec);
|
|
236
|
+
};
|
|
237
|
+
const sendOperationFn = async (args, spec) => {
|
|
238
|
+
var _a;
|
|
239
|
+
let currentRawResponse = undefined;
|
|
240
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
241
|
+
const callback = (rawResponse, flatResponse) => {
|
|
242
|
+
currentRawResponse = rawResponse;
|
|
243
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
244
|
+
};
|
|
245
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
246
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
247
|
+
return {
|
|
248
|
+
flatResponse,
|
|
249
|
+
rawResponse: {
|
|
250
|
+
statusCode: currentRawResponse.status,
|
|
251
|
+
body: currentRawResponse.parsedBody,
|
|
252
|
+
headers: currentRawResponse.headers.toJSON(),
|
|
253
|
+
},
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
const lro = createLroSpec({
|
|
257
|
+
sendOperationFn,
|
|
258
|
+
args: { resourceGroupName, organizationName, properties, options },
|
|
259
|
+
spec: updateOperationSpec,
|
|
273
260
|
});
|
|
261
|
+
const poller = await createHttpPoller(lro, {
|
|
262
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
263
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
264
|
+
resourceLocationConfig: "location",
|
|
265
|
+
});
|
|
266
|
+
await poller.poll();
|
|
267
|
+
return poller;
|
|
274
268
|
}
|
|
275
269
|
/**
|
|
276
270
|
* Update a OrganizationResource
|
|
@@ -279,11 +273,9 @@ export class OrganizationsImpl {
|
|
|
279
273
|
* @param properties The resource properties to be updated.
|
|
280
274
|
* @param options The options parameters.
|
|
281
275
|
*/
|
|
282
|
-
beginUpdateAndWait(resourceGroupName, organizationName, properties, options) {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
return poller.pollUntilDone();
|
|
286
|
-
});
|
|
276
|
+
async beginUpdateAndWait(resourceGroupName, organizationName, properties, options) {
|
|
277
|
+
const poller = await this.beginUpdate(resourceGroupName, organizationName, properties, options);
|
|
278
|
+
return poller.pollUntilDone();
|
|
287
279
|
}
|
|
288
280
|
/**
|
|
289
281
|
* Delete a OrganizationResource
|
|
@@ -291,43 +283,41 @@ export class OrganizationsImpl {
|
|
|
291
283
|
* @param organizationName Name of the Organizations resource
|
|
292
284
|
* @param options The options parameters.
|
|
293
285
|
*/
|
|
294
|
-
beginDelete(resourceGroupName, organizationName, options) {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
resourceLocationConfig: "location",
|
|
327
|
-
});
|
|
328
|
-
yield poller.poll();
|
|
329
|
-
return poller;
|
|
286
|
+
async beginDelete(resourceGroupName, organizationName, options) {
|
|
287
|
+
const directSendOperation = async (args, spec) => {
|
|
288
|
+
return this.client.sendOperationRequest(args, spec);
|
|
289
|
+
};
|
|
290
|
+
const sendOperationFn = async (args, spec) => {
|
|
291
|
+
var _a;
|
|
292
|
+
let currentRawResponse = undefined;
|
|
293
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
294
|
+
const callback = (rawResponse, flatResponse) => {
|
|
295
|
+
currentRawResponse = rawResponse;
|
|
296
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
297
|
+
};
|
|
298
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
299
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
300
|
+
return {
|
|
301
|
+
flatResponse,
|
|
302
|
+
rawResponse: {
|
|
303
|
+
statusCode: currentRawResponse.status,
|
|
304
|
+
body: currentRawResponse.parsedBody,
|
|
305
|
+
headers: currentRawResponse.headers.toJSON(),
|
|
306
|
+
},
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
const lro = createLroSpec({
|
|
310
|
+
sendOperationFn,
|
|
311
|
+
args: { resourceGroupName, organizationName, options },
|
|
312
|
+
spec: deleteOperationSpec,
|
|
313
|
+
});
|
|
314
|
+
const poller = await createHttpPoller(lro, {
|
|
315
|
+
restoreFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
316
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
317
|
+
resourceLocationConfig: "location",
|
|
330
318
|
});
|
|
319
|
+
await poller.poll();
|
|
320
|
+
return poller;
|
|
331
321
|
}
|
|
332
322
|
/**
|
|
333
323
|
* Delete a OrganizationResource
|
|
@@ -335,11 +325,9 @@ export class OrganizationsImpl {
|
|
|
335
325
|
* @param organizationName Name of the Organizations resource
|
|
336
326
|
* @param options The options parameters.
|
|
337
327
|
*/
|
|
338
|
-
beginDeleteAndWait(resourceGroupName, organizationName, options) {
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
return poller.pollUntilDone();
|
|
342
|
-
});
|
|
328
|
+
async beginDeleteAndWait(resourceGroupName, organizationName, options) {
|
|
329
|
+
const poller = await this.beginDelete(resourceGroupName, organizationName, options);
|
|
330
|
+
return poller.pollUntilDone();
|
|
343
331
|
}
|
|
344
332
|
/**
|
|
345
333
|
* ListBySubscriptionNext
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../../src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,UAAU,CAAC,gBAAgB;KAC5B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,mCAAmC,GAA6B;IACpE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,8BAA8B;SACnD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,oCAAoC,GAA6B;IACrE,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,8BAA8B;SACnD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;KAC7B;IACD,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 { Organizations } 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 { AstroManagementClient } from \"../astroManagementClient.js\";\nimport {\n SimplePollerLike,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport { createLroSpec } from \"../lroImpl.js\";\nimport {\n OrganizationResource,\n OrganizationsListBySubscriptionNextOptionalParams,\n OrganizationsListBySubscriptionOptionalParams,\n OrganizationsListBySubscriptionResponse,\n OrganizationsListByResourceGroupNextOptionalParams,\n OrganizationsListByResourceGroupOptionalParams,\n OrganizationsListByResourceGroupResponse,\n OrganizationsGetOptionalParams,\n OrganizationsGetResponse,\n OrganizationsCreateOrUpdateOptionalParams,\n OrganizationsCreateOrUpdateResponse,\n OrganizationResourceUpdate,\n OrganizationsUpdateOptionalParams,\n OrganizationsUpdateResponse,\n OrganizationsDeleteOptionalParams,\n OrganizationsDeleteResponse,\n OrganizationsListBySubscriptionNextResponse,\n OrganizationsListByResourceGroupNextResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Organizations operations. */\nexport class OrganizationsImpl implements Organizations {\n private readonly client: AstroManagementClient;\n\n /**\n * Initialize a new instance of the class Organizations class.\n * @param client Reference to the service client\n */\n constructor(client: AstroManagementClient) {\n this.client = client;\n }\n\n /**\n * List OrganizationResource resources by subscription ID\n * @param options The options parameters.\n */\n public listBySubscription(\n options?: OrganizationsListBySubscriptionOptionalParams,\n ): PagedAsyncIterableIterator<OrganizationResource> {\n const iter = this.listBySubscriptionPagingAll(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.listBySubscriptionPagingPage(options, settings);\n },\n };\n }\n\n private async *listBySubscriptionPagingPage(\n options?: OrganizationsListBySubscriptionOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<OrganizationResource[]> {\n let result: OrganizationsListBySubscriptionResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listBySubscription(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._listBySubscriptionNext(continuationToken, options);\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listBySubscriptionPagingAll(\n options?: OrganizationsListBySubscriptionOptionalParams,\n ): AsyncIterableIterator<OrganizationResource> {\n for await (const page of this.listBySubscriptionPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * List OrganizationResource resources by resource group\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n public listByResourceGroup(\n resourceGroupName: string,\n options?: OrganizationsListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<OrganizationResource> {\n const iter = this.listByResourceGroupPagingAll(resourceGroupName, 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.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n settings,\n );\n },\n };\n }\n\n private async *listByResourceGroupPagingPage(\n resourceGroupName: string,\n options?: OrganizationsListByResourceGroupOptionalParams,\n settings?: PageSettings,\n ): AsyncIterableIterator<OrganizationResource[]> {\n let result: OrganizationsListByResourceGroupResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByResourceGroup(resourceGroupName, 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._listByResourceGroupNext(\n resourceGroupName,\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 *listByResourceGroupPagingAll(\n resourceGroupName: string,\n options?: OrganizationsListByResourceGroupOptionalParams,\n ): AsyncIterableIterator<OrganizationResource> {\n for await (const page of this.listByResourceGroupPagingPage(\n resourceGroupName,\n options,\n )) {\n yield* page;\n }\n }\n\n /**\n * List OrganizationResource resources by subscription ID\n * @param options The options parameters.\n */\n private _listBySubscription(\n options?: OrganizationsListBySubscriptionOptionalParams,\n ): Promise<OrganizationsListBySubscriptionResponse> {\n return this.client.sendOperationRequest(\n { options },\n listBySubscriptionOperationSpec,\n );\n }\n\n /**\n * List OrganizationResource resources by resource group\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n private _listByResourceGroup(\n resourceGroupName: string,\n options?: OrganizationsListByResourceGroupOptionalParams,\n ): Promise<OrganizationsListByResourceGroupResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, options },\n listByResourceGroupOperationSpec,\n );\n }\n\n /**\n * Get a OrganizationResource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param organizationName Name of the Organizations resource\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n organizationName: string,\n options?: OrganizationsGetOptionalParams,\n ): Promise<OrganizationsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, organizationName, options },\n getOperationSpec,\n );\n }\n\n /**\n * Create a OrganizationResource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param organizationName Name of the Organizations resource\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n organizationName: string,\n resource: OrganizationResource,\n options?: OrganizationsCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<OrganizationsCreateOrUpdateResponse>,\n OrganizationsCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<OrganizationsCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, organizationName, resource, options },\n spec: createOrUpdateOperationSpec,\n });\n const poller = await createHttpPoller<\n OrganizationsCreateOrUpdateResponse,\n OperationState<OrganizationsCreateOrUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"azure-async-operation\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create a OrganizationResource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param organizationName Name of the Organizations resource\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n organizationName: string,\n resource: OrganizationResource,\n options?: OrganizationsCreateOrUpdateOptionalParams,\n ): Promise<OrganizationsCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n organizationName,\n resource,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Update a OrganizationResource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param organizationName Name of the Organizations resource\n * @param properties The resource properties to be updated.\n * @param options The options parameters.\n */\n async beginUpdate(\n resourceGroupName: string,\n organizationName: string,\n properties: OrganizationResourceUpdate,\n options?: OrganizationsUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<OrganizationsUpdateResponse>,\n OrganizationsUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<OrganizationsUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, organizationName, properties, options },\n spec: updateOperationSpec,\n });\n const poller = await createHttpPoller<\n OrganizationsUpdateResponse,\n OperationState<OrganizationsUpdateResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Update a OrganizationResource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param organizationName Name of the Organizations resource\n * @param properties The resource properties to be updated.\n * @param options The options parameters.\n */\n async beginUpdateAndWait(\n resourceGroupName: string,\n organizationName: string,\n properties: OrganizationResourceUpdate,\n options?: OrganizationsUpdateOptionalParams,\n ): Promise<OrganizationsUpdateResponse> {\n const poller = await this.beginUpdate(\n resourceGroupName,\n organizationName,\n properties,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Delete a OrganizationResource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param organizationName Name of the Organizations resource\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n organizationName: string,\n options?: OrganizationsDeleteOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<OrganizationsDeleteResponse>,\n OrganizationsDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ): Promise<OrganizationsDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperationFn = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec,\n ) => {\n let currentRawResponse: coreClient.FullOperationResponse | undefined =\n undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown,\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback,\n },\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON(),\n },\n };\n };\n\n const lro = createLroSpec({\n sendOperationFn,\n args: { resourceGroupName, organizationName, options },\n spec: deleteOperationSpec,\n });\n const poller = await createHttpPoller<\n OrganizationsDeleteResponse,\n OperationState<OrganizationsDeleteResponse>\n >(lro, {\n restoreFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: \"location\",\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Delete a OrganizationResource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param organizationName Name of the Organizations resource\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n organizationName: string,\n options?: OrganizationsDeleteOptionalParams,\n ): Promise<OrganizationsDeleteResponse> {\n const poller = await this.beginDelete(\n resourceGroupName,\n organizationName,\n options,\n );\n return poller.pollUntilDone();\n }\n\n /**\n * ListBySubscriptionNext\n * @param nextLink The nextLink from the previous successful call to the ListBySubscription method.\n * @param options The options parameters.\n */\n private _listBySubscriptionNext(\n nextLink: string,\n options?: OrganizationsListBySubscriptionNextOptionalParams,\n ): Promise<OrganizationsListBySubscriptionNextResponse> {\n return this.client.sendOperationRequest(\n { nextLink, options },\n listBySubscriptionNextOperationSpec,\n );\n }\n\n /**\n * ListByResourceGroupNext\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.\n * @param options The options parameters.\n */\n private _listByResourceGroupNext(\n resourceGroupName: string,\n nextLink: string,\n options?: OrganizationsListByResourceGroupNextOptionalParams,\n ): Promise<OrganizationsListByResourceGroupNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, nextLink, options },\n listByResourceGroupNextOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listBySubscriptionOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Astronomer.Astro/organizations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OrganizationResourceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByResourceGroupOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Astronomer.Astro/organizations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OrganizationResourceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Astronomer.Astro/organizations/{organizationName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OrganizationResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.organizationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Astronomer.Astro/organizations/{organizationName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.OrganizationResource,\n },\n 201: {\n bodyMapper: Mappers.OrganizationResource,\n },\n 202: {\n bodyMapper: Mappers.OrganizationResource,\n },\n 204: {\n bodyMapper: Mappers.OrganizationResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.resource,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.organizationName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Astronomer.Astro/organizations/{organizationName}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.OrganizationResource,\n },\n 201: {\n bodyMapper: Mappers.OrganizationResource,\n },\n 202: {\n bodyMapper: Mappers.OrganizationResource,\n },\n 204: {\n bodyMapper: Mappers.OrganizationResource,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.properties,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.organizationName,\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Astronomer.Astro/organizations/{organizationName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper: Mappers.OrganizationsDeleteHeaders,\n },\n 201: {\n headersMapper: Mappers.OrganizationsDeleteHeaders,\n },\n 202: {\n headersMapper: Mappers.OrganizationsDeleteHeaders,\n },\n 204: {\n headersMapper: Mappers.OrganizationsDeleteHeaders,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.organizationName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OrganizationResourceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OrganizationResourceListResult,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/index.ts"],"names":[],"mappings":"AAQA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/index.ts"],"names":[],"mappings":"AAQA,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
|
|
@@ -5,6 +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
|
-
export * from "./operations";
|
|
9
|
-
export * from "./organizations";
|
|
8
|
+
export * from "./operations.js";
|
|
9
|
+
export * from "./organizations.js";
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,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 * from \"./operations.js\";\nexport * from \"./organizations.js\";\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
2
|
-
import { Operation, OperationsListOptionalParams } from "../models";
|
|
2
|
+
import { Operation, OperationsListOptionalParams } from "../models/index.js";
|
|
3
3
|
/** Interface representing a Operations. */
|
|
4
4
|
export interface Operations {
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/operations.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/operations.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAG7E,2CAA2C;AAC3C,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,IAAI,CACF,OAAO,CAAC,EAAE,4BAA4B,GACrC,0BAA0B,CAAC,SAAS,CAAC,CAAC;CAC1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/operations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","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 } from \"@azure/core-paging\";\nimport { Operation, OperationsListOptionalParams } from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Interface representing a Operations. */\nexport interface Operations {\n /**\n * List the operations for the provider\n * @param options The options parameters.\n */\n list(\n options?: OperationsListOptionalParams,\n ): PagedAsyncIterableIterator<Operation>;\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
2
2
|
import { SimplePollerLike, OperationState } from "@azure/core-lro";
|
|
3
|
-
import { OrganizationResource, OrganizationsListBySubscriptionOptionalParams, OrganizationsListByResourceGroupOptionalParams, OrganizationsGetOptionalParams, OrganizationsGetResponse, OrganizationsCreateOrUpdateOptionalParams, OrganizationsCreateOrUpdateResponse, OrganizationResourceUpdate, OrganizationsUpdateOptionalParams, OrganizationsUpdateResponse, OrganizationsDeleteOptionalParams, OrganizationsDeleteResponse } from "../models";
|
|
3
|
+
import { OrganizationResource, OrganizationsListBySubscriptionOptionalParams, OrganizationsListByResourceGroupOptionalParams, OrganizationsGetOptionalParams, OrganizationsGetResponse, OrganizationsCreateOrUpdateOptionalParams, OrganizationsCreateOrUpdateResponse, OrganizationResourceUpdate, OrganizationsUpdateOptionalParams, OrganizationsUpdateResponse, OrganizationsDeleteOptionalParams, OrganizationsDeleteResponse } from "../models/index.js";
|
|
4
4
|
/** Interface representing a Organizations. */
|
|
5
5
|
export interface Organizations {
|
|
6
6
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/organizations.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EACL,oBAAoB,EACpB,6CAA6C,EAC7C,8CAA8C,EAC9C,8BAA8B,EAC9B,wBAAwB,EACxB,yCAAyC,EACzC,mCAAmC,EACnC,0BAA0B,EAC1B,iCAAiC,EACjC,2BAA2B,EAC3B,iCAAiC,EACjC,2BAA2B,EAC5B,MAAM,oBAAoB,CAAC;AAG5B,8CAA8C;AAC9C,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,kBAAkB,CAChB,OAAO,CAAC,EAAE,6CAA6C,GACtD,0BAA0B,CAAC,oBAAoB,CAAC,CAAC;IACpD;;;;OAIG;IACH,mBAAmB,CACjB,iBAAiB,EAAE,MAAM,EACzB,OAAO,CAAC,EAAE,8CAA8C,GACvD,0BAA0B,CAAC,oBAAoB,CAAC,CAAC;IACpD;;;;;OAKG;IACH,GAAG,CACD,iBAAiB,EAAE,MAAM,EACzB,gBAAgB,EAAE,MAAM,EACxB,OAAO,CAAC,EAAE,8BAA8B,GACvC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACrC;;;;;;OAMG;IACH,mBAAmB,CACjB,iBAAiB,EAAE,MAAM,EACzB,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CACR,gBAAgB,CACd,cAAc,CAAC,mCAAmC,CAAC,EACnD,mCAAmC,CACpC,CACF,CAAC;IACF;;;;;;OAMG;IACH,0BAA0B,CACxB,iBAAiB,EAAE,MAAM,EACzB,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CAAC,mCAAmC,CAAC,CAAC;IAChD;;;;;;OAMG;IACH,WAAW,CACT,iBAAiB,EAAE,MAAM,EACzB,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,0BAA0B,EACtC,OAAO,CAAC,EAAE,iCAAiC,GAC1C,OAAO,CACR,gBAAgB,CACd,cAAc,CAAC,2BAA2B,CAAC,EAC3C,2BAA2B,CAC5B,CACF,CAAC;IACF;;;;;;OAMG;IACH,kBAAkB,CAChB,iBAAiB,EAAE,MAAM,EACzB,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,0BAA0B,EACtC,OAAO,CAAC,EAAE,iCAAiC,GAC1C,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACxC;;;;;OAKG;IACH,WAAW,CACT,iBAAiB,EAAE,MAAM,EACzB,gBAAgB,EAAE,MAAM,EACxB,OAAO,CAAC,EAAE,iCAAiC,GAC1C,OAAO,CACR,gBAAgB,CACd,cAAc,CAAC,2BAA2B,CAAC,EAC3C,2BAA2B,CAC5B,CACF,CAAC;IACF;;;;;OAKG;IACH,kBAAkB,CAChB,iBAAiB,EAAE,MAAM,EACzB,gBAAgB,EAAE,MAAM,EACxB,OAAO,CAAC,EAAE,iCAAiC,GAC1C,OAAO,CAAC,2BAA2B,CAAC,CAAC;CACzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/organizations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","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 } from \"@azure/core-paging\";\nimport { SimplePollerLike, OperationState } from \"@azure/core-lro\";\nimport {\n OrganizationResource,\n OrganizationsListBySubscriptionOptionalParams,\n OrganizationsListByResourceGroupOptionalParams,\n OrganizationsGetOptionalParams,\n OrganizationsGetResponse,\n OrganizationsCreateOrUpdateOptionalParams,\n OrganizationsCreateOrUpdateResponse,\n OrganizationResourceUpdate,\n OrganizationsUpdateOptionalParams,\n OrganizationsUpdateResponse,\n OrganizationsDeleteOptionalParams,\n OrganizationsDeleteResponse,\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Interface representing a Organizations. */\nexport interface Organizations {\n /**\n * List OrganizationResource resources by subscription ID\n * @param options The options parameters.\n */\n listBySubscription(\n options?: OrganizationsListBySubscriptionOptionalParams,\n ): PagedAsyncIterableIterator<OrganizationResource>;\n /**\n * List OrganizationResource resources by resource group\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param options The options parameters.\n */\n listByResourceGroup(\n resourceGroupName: string,\n options?: OrganizationsListByResourceGroupOptionalParams,\n ): PagedAsyncIterableIterator<OrganizationResource>;\n /**\n * Get a OrganizationResource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param organizationName Name of the Organizations resource\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n organizationName: string,\n options?: OrganizationsGetOptionalParams,\n ): Promise<OrganizationsGetResponse>;\n /**\n * Create a OrganizationResource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param organizationName Name of the Organizations resource\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n beginCreateOrUpdate(\n resourceGroupName: string,\n organizationName: string,\n resource: OrganizationResource,\n options?: OrganizationsCreateOrUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<OrganizationsCreateOrUpdateResponse>,\n OrganizationsCreateOrUpdateResponse\n >\n >;\n /**\n * Create a OrganizationResource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param organizationName Name of the Organizations resource\n * @param resource Resource create parameters.\n * @param options The options parameters.\n */\n beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n organizationName: string,\n resource: OrganizationResource,\n options?: OrganizationsCreateOrUpdateOptionalParams,\n ): Promise<OrganizationsCreateOrUpdateResponse>;\n /**\n * Update a OrganizationResource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param organizationName Name of the Organizations resource\n * @param properties The resource properties to be updated.\n * @param options The options parameters.\n */\n beginUpdate(\n resourceGroupName: string,\n organizationName: string,\n properties: OrganizationResourceUpdate,\n options?: OrganizationsUpdateOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<OrganizationsUpdateResponse>,\n OrganizationsUpdateResponse\n >\n >;\n /**\n * Update a OrganizationResource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param organizationName Name of the Organizations resource\n * @param properties The resource properties to be updated.\n * @param options The options parameters.\n */\n beginUpdateAndWait(\n resourceGroupName: string,\n organizationName: string,\n properties: OrganizationResourceUpdate,\n options?: OrganizationsUpdateOptionalParams,\n ): Promise<OrganizationsUpdateResponse>;\n /**\n * Delete a OrganizationResource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param organizationName Name of the Organizations resource\n * @param options The options parameters.\n */\n beginDelete(\n resourceGroupName: string,\n organizationName: string,\n options?: OrganizationsDeleteOptionalParams,\n ): Promise<\n SimplePollerLike<\n OperationState<OrganizationsDeleteResponse>,\n OrganizationsDeleteResponse\n >\n >;\n /**\n * Delete a OrganizationResource\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param organizationName Name of the Organizations resource\n * @param options The options parameters.\n */\n beginDeleteAndWait(\n resourceGroupName: string,\n organizationName: string,\n options?: OrganizationsDeleteOptionalParams,\n ): Promise<OrganizationsDeleteResponse>;\n}\n"]}
|
|
@@ -0,0 +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;;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,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,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,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"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as coreClient from "@azure/core-client";
|
|
2
|
+
import * as coreAuth from "@azure/core-auth";
|
|
3
|
+
import { Operations, Organizations } from "./operationsInterfaces/index.js";
|
|
4
|
+
import { AstroManagementClientOptionalParams } from "./models/index.js";
|
|
5
|
+
export declare class AstroManagementClient extends coreClient.ServiceClient {
|
|
6
|
+
$host: string;
|
|
7
|
+
apiVersion: string;
|
|
8
|
+
subscriptionId: string;
|
|
9
|
+
/**
|
|
10
|
+
* Initializes a new instance of the AstroManagementClient class.
|
|
11
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
12
|
+
* @param subscriptionId The ID of the target subscription.
|
|
13
|
+
* @param options The parameter options
|
|
14
|
+
*/
|
|
15
|
+
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AstroManagementClientOptionalParams);
|
|
16
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
17
|
+
private addCustomApiVersionPolicy;
|
|
18
|
+
operations: Operations;
|
|
19
|
+
organizations: Organizations;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=astroManagementClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"astroManagementClient.d.ts","sourceRoot":"","sources":["../../src/astroManagementClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAOjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,mCAAmC,EAAE,MAAM,mBAAmB,CAAC;AAExE,qBAAa,qBAAsB,SAAQ,UAAU,CAAC,aAAa;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,mCAAmC;IA8E/C,8GAA8G;IAC9G,OAAO,CAAC,yBAAyB;IA2BjC,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,aAAa,CAAC;CAC9B"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*
|
|
6
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
7
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.AstroManagementClient = void 0;
|
|
11
|
+
const tslib_1 = require("tslib");
|
|
12
|
+
const coreClient = tslib_1.__importStar(require("@azure/core-client"));
|
|
13
|
+
const coreRestPipeline = tslib_1.__importStar(require("@azure/core-rest-pipeline"));
|
|
14
|
+
const index_js_1 = require("./operations/index.js");
|
|
15
|
+
class AstroManagementClient extends coreClient.ServiceClient {
|
|
16
|
+
/**
|
|
17
|
+
* Initializes a new instance of the AstroManagementClient class.
|
|
18
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
19
|
+
* @param subscriptionId The ID of the target subscription.
|
|
20
|
+
* @param options The parameter options
|
|
21
|
+
*/
|
|
22
|
+
constructor(credentials, subscriptionId, options) {
|
|
23
|
+
var _a, _b, _c;
|
|
24
|
+
if (credentials === undefined) {
|
|
25
|
+
throw new Error("'credentials' cannot be null");
|
|
26
|
+
}
|
|
27
|
+
if (subscriptionId === undefined) {
|
|
28
|
+
throw new Error("'subscriptionId' cannot be null");
|
|
29
|
+
}
|
|
30
|
+
// Initializing default values for options
|
|
31
|
+
if (!options) {
|
|
32
|
+
options = {};
|
|
33
|
+
}
|
|
34
|
+
const defaults = {
|
|
35
|
+
requestContentType: "application/json; charset=utf-8",
|
|
36
|
+
credential: credentials,
|
|
37
|
+
};
|
|
38
|
+
const packageDetails = `azsdk-js-arm-astro/1.0.0-beta.2`;
|
|
39
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
40
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
41
|
+
: `${packageDetails}`;
|
|
42
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
43
|
+
userAgentPrefix,
|
|
44
|
+
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
45
|
+
super(optionsWithDefaults);
|
|
46
|
+
let bearerTokenAuthenticationPolicyFound = false;
|
|
47
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
48
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
49
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
50
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
51
|
+
}
|
|
52
|
+
if (!options ||
|
|
53
|
+
!options.pipeline ||
|
|
54
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
55
|
+
!bearerTokenAuthenticationPolicyFound) {
|
|
56
|
+
this.pipeline.removePolicy({
|
|
57
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName,
|
|
58
|
+
});
|
|
59
|
+
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
60
|
+
credential: credentials,
|
|
61
|
+
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
|
|
62
|
+
challengeCallbacks: {
|
|
63
|
+
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,
|
|
64
|
+
},
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
// Parameter assignments
|
|
68
|
+
this.subscriptionId = subscriptionId;
|
|
69
|
+
// Assigning values to Constant parameters
|
|
70
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
71
|
+
this.apiVersion = options.apiVersion || "2023-08-01";
|
|
72
|
+
this.operations = new index_js_1.OperationsImpl(this);
|
|
73
|
+
this.organizations = new index_js_1.OrganizationsImpl(this);
|
|
74
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
75
|
+
}
|
|
76
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
77
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
78
|
+
if (!apiVersion) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const apiVersionPolicy = {
|
|
82
|
+
name: "CustomApiVersionPolicy",
|
|
83
|
+
async sendRequest(request, next) {
|
|
84
|
+
const param = request.url.split("?");
|
|
85
|
+
if (param.length > 1) {
|
|
86
|
+
const newParams = param[1].split("&").map((item) => {
|
|
87
|
+
if (item.indexOf("api-version") > -1) {
|
|
88
|
+
return "api-version=" + apiVersion;
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
return item;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
95
|
+
}
|
|
96
|
+
return next(request);
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.AstroManagementClient = AstroManagementClient;
|
|
103
|
+
//# sourceMappingURL=astroManagementClient.js.map
|