@azure/arm-managementpartner 3.0.2-alpha.20250718.1 → 3.0.2-alpha.20250730.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/aCEProvisioningManagementPartnerAPI.js +15 -5
- package/dist/browser/aCEProvisioningManagementPartnerAPI.js.map +1 -1
- package/dist/browser/operations/operation.js +23 -40
- package/dist/browser/operations/operation.js.map +1 -1
- package/dist/browser/operations/partner.js +1 -0
- package/dist/browser/operations/partner.js.map +1 -1
- package/dist/browser/operations/partners.js +1 -0
- package/dist/browser/operations/partners.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/aCEProvisioningManagementPartnerAPI.js +15 -5
- package/dist/commonjs/aCEProvisioningManagementPartnerAPI.js.map +1 -1
- package/dist/commonjs/operations/operation.js +23 -39
- package/dist/commonjs/operations/operation.js.map +1 -1
- package/dist/commonjs/operations/partner.js +1 -0
- package/dist/commonjs/operations/partner.js.map +1 -1
- package/dist/commonjs/operations/partners.js +1 -0
- package/dist/commonjs/operations/partners.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/aCEProvisioningManagementPartnerAPI.js +15 -5
- package/dist/esm/aCEProvisioningManagementPartnerAPI.js.map +1 -1
- package/dist/esm/operations/operation.js +23 -40
- package/dist/esm/operations/operation.js.map +1 -1
- package/dist/esm/operations/partner.js +1 -0
- package/dist/esm/operations/partner.js.map +1 -1
- package/dist/esm/operations/partners.js +1 -0
- package/dist/esm/operations/partners.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/aCEProvisioningManagementPartnerAPI.js +15 -5
- package/dist/react-native/aCEProvisioningManagementPartnerAPI.js.map +1 -1
- package/dist/react-native/operations/operation.js +23 -40
- package/dist/react-native/operations/operation.js.map +1 -1
- package/dist/react-native/operations/partner.js +1 -0
- package/dist/react-native/operations/partner.js.map +1 -1
- package/dist/react-native/operations/partners.js +1 -0
- package/dist/react-native/operations/partners.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-managementpartner-node.api.md +169 -169
|
@@ -9,13 +9,14 @@ import * as coreClient from "@azure/core-client";
|
|
|
9
9
|
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
10
10
|
import { PartnerImpl, OperationImpl, PartnersImpl } from "./operations/index.js";
|
|
11
11
|
export class ACEProvisioningManagementPartnerAPI extends coreClient.ServiceClient {
|
|
12
|
+
$host;
|
|
13
|
+
apiVersion;
|
|
12
14
|
/**
|
|
13
15
|
* Initializes a new instance of the ACEProvisioningManagementPartnerAPI class.
|
|
14
16
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
15
17
|
* @param options The parameter options
|
|
16
18
|
*/
|
|
17
19
|
constructor(credentials, options) {
|
|
18
|
-
var _a, _b, _c;
|
|
19
20
|
if (credentials === undefined) {
|
|
20
21
|
throw new Error("'credentials' cannot be null");
|
|
21
22
|
}
|
|
@@ -31,12 +32,17 @@ export class ACEProvisioningManagementPartnerAPI extends coreClient.ServiceClien
|
|
|
31
32
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
32
33
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
33
34
|
: `${packageDetails}`;
|
|
34
|
-
const optionsWithDefaults =
|
|
35
|
+
const optionsWithDefaults = {
|
|
36
|
+
...defaults,
|
|
37
|
+
...options,
|
|
38
|
+
userAgentOptions: {
|
|
35
39
|
userAgentPrefix
|
|
36
|
-
},
|
|
40
|
+
},
|
|
41
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
42
|
+
};
|
|
37
43
|
super(optionsWithDefaults);
|
|
38
44
|
let bearerTokenAuthenticationPolicyFound = false;
|
|
39
|
-
if (
|
|
45
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
40
46
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
41
47
|
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
42
48
|
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
@@ -50,7 +56,8 @@ export class ACEProvisioningManagementPartnerAPI extends coreClient.ServiceClien
|
|
|
50
56
|
});
|
|
51
57
|
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
52
58
|
credential: credentials,
|
|
53
|
-
scopes:
|
|
59
|
+
scopes: optionsWithDefaults.credentialScopes ??
|
|
60
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
54
61
|
challengeCallbacks: {
|
|
55
62
|
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
56
63
|
}
|
|
@@ -89,5 +96,8 @@ export class ACEProvisioningManagementPartnerAPI extends coreClient.ServiceClien
|
|
|
89
96
|
};
|
|
90
97
|
this.pipeline.addPolicy(apiVersionPolicy);
|
|
91
98
|
}
|
|
99
|
+
partner;
|
|
100
|
+
operation;
|
|
101
|
+
partners;
|
|
92
102
|
}
|
|
93
103
|
//# sourceMappingURL=aCEProvisioningManagementPartnerAPI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aCEProvisioningManagementPartnerAPI.js","sourceRoot":"","sources":["../../src/aCEProvisioningManagementPartnerAPI.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAIjF,MAAM,OAAO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I,YAAY,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;IAED,8GAA8G;IACtG,yBAAyB,CAAC,UAAmB;QACnD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,CAAC,WAAW,CACf,OAAwB,EACxB,IAAiB;gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,CAAU;IACjB,SAAS,CAAY;IACrB,QAAQ,CAAW;CACpB","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 { PartnerImpl, OperationImpl, PartnersImpl } from \"./operations/index.js\";\nimport { Partner, Operation, Partners } from \"./operationsInterfaces/index.js\";\nimport { ACEProvisioningManagementPartnerAPIOptionalParams } from \"./models/index.js\";\n\nexport class ACEProvisioningManagementPartnerAPI extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the ACEProvisioningManagementPartnerAPI class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: ACEProvisioningManagementPartnerAPIOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: ACEProvisioningManagementPartnerAPIOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-managementpartner/3.0.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\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[] = 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\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2018-02-01\";\n this.partner = new PartnerImpl(this);\n this.operation = new OperationImpl(this);\n this.partners = new PartnersImpl(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 partner: Partner;\n operation: Operation;\n partners: Partners;\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 Operation operations. */
|
|
15
14
|
export class OperationImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class Operation class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -34,52 +34,35 @@ export class OperationImpl {
|
|
|
34
34
|
return this;
|
|
35
35
|
},
|
|
36
36
|
byPage: (settings) => {
|
|
37
|
-
if (settings
|
|
37
|
+
if (settings?.maxPageSize) {
|
|
38
38
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
39
39
|
}
|
|
40
40
|
return this.listPagingPage(options, settings);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
listPagingPage(options, settings) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
});
|
|
44
|
+
async *listPagingPage(options, settings) {
|
|
45
|
+
let result;
|
|
46
|
+
let continuationToken = settings?.continuationToken;
|
|
47
|
+
if (!continuationToken) {
|
|
48
|
+
result = await this._list(options);
|
|
49
|
+
let page = result.value || [];
|
|
50
|
+
continuationToken = result.nextLink;
|
|
51
|
+
setContinuationToken(page, continuationToken);
|
|
52
|
+
yield page;
|
|
53
|
+
}
|
|
54
|
+
while (continuationToken) {
|
|
55
|
+
result = await this._listNext(continuationToken, options);
|
|
56
|
+
continuationToken = result.nextLink;
|
|
57
|
+
let page = result.value || [];
|
|
58
|
+
setContinuationToken(page, continuationToken);
|
|
59
|
+
yield page;
|
|
60
|
+
}
|
|
63
61
|
}
|
|
64
|
-
listPagingAll(options) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
69
|
-
_c = _f.value;
|
|
70
|
-
_d = false;
|
|
71
|
-
const page = _c;
|
|
72
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
76
|
-
finally {
|
|
77
|
-
try {
|
|
78
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
79
|
-
}
|
|
80
|
-
finally { if (e_1) throw e_1.error; }
|
|
81
|
-
}
|
|
82
|
-
});
|
|
62
|
+
async *listPagingAll(options) {
|
|
63
|
+
for await (const page of this.listPagingPage(options)) {
|
|
64
|
+
yield* page;
|
|
65
|
+
}
|
|
83
66
|
}
|
|
84
67
|
/**
|
|
85
68
|
* List all the operations.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../src/operations/operation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../src/operations/operation.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,6CAA6C;AAC7C,MAAM,OAAO,aAAa;IACP,MAAM,CAAsC;IAE7D;;;OAGG;IACH,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,I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ACF;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 { Operation } 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 { ACEProvisioningManagementPartnerAPI } from \"../aCEProvisioningManagementPartnerAPI.js\";\nimport {\n OperationResponse,\n OperationListNextOptionalParams,\n OperationListOptionalParams,\n OperationListResponse,\n OperationListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operation operations. */\nexport class OperationImpl implements Operation {\n private readonly client: ACEProvisioningManagementPartnerAPI;\n\n /**\n * Initialize a new instance of the class Operation class.\n * @param client Reference to the service client\n */\n constructor(client: ACEProvisioningManagementPartnerAPI) {\n this.client = client;\n }\n\n /**\n * List all the operations.\n * @param options The options parameters.\n */\n public list(\n options?: OperationListOptionalParams\n ): PagedAsyncIterableIterator<OperationResponse> {\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?: OperationListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<OperationResponse[]> {\n let result: OperationListResponse;\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?: OperationListOptionalParams\n ): AsyncIterableIterator<OperationResponse> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * List all the operations.\n * @param options The options parameters.\n */\n private _list(\n options?: OperationListOptionalParams\n ): Promise<OperationListResponse> {\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?: OperationListNextOptionalParams\n ): Promise<OperationListNextResponse> {\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.ManagementPartner/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationList\n },\n default: {\n bodyMapper: Mappers.ErrorModel\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.ErrorModel\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing Partner operations. */
|
|
12
12
|
export class PartnerImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class Partner class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partner.js","sourceRoot":"","sources":["../../../src/operations/partner.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAYtD,2CAA2C;AAC3C,MAAM,OAAO,WAAW;
|
|
1
|
+
{"version":3,"file":"partner.js","sourceRoot":"","sources":["../../../src/operations/partner.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAYtD,2CAA2C;AAC3C,MAAM,OAAO,WAAW;IACL,MAAM,CAAsC;IAE7D;;;OAGG;IACH,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,GAAG,CACD,SAAiB,EACjB,OAAkC;QAElC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,SAAS,EAAE,OAAO,EAAE,EACtB,gBAAgB,CACjB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,SAAiB,EACjB,OAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,SAAS,EAAE,OAAO,EAAE,EACtB,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,SAAiB,EACjB,OAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,SAAS,EAAE,OAAO,EAAE,EACtB,m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T,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,eAAe;SACpC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC;IACvD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,6DAA6D;IACnE,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC;IACvD,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 { Partner } 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 { ACEProvisioningManagementPartnerAPI } from \"../aCEProvisioningManagementPartnerAPI.js\";\nimport {\n PartnerGetOptionalParams,\n PartnerGetResponse,\n PartnerCreateOptionalParams,\n PartnerCreateResponse,\n PartnerUpdateOptionalParams,\n PartnerUpdateResponse,\n PartnerDeleteOptionalParams\n} from \"../models/index.js\";\n\n/** Class containing Partner operations. */\nexport class PartnerImpl implements Partner {\n private readonly client: ACEProvisioningManagementPartnerAPI;\n\n /**\n * Initialize a new instance of the class Partner class.\n * @param client Reference to the service client\n */\n constructor(client: ACEProvisioningManagementPartnerAPI) {\n this.client = client;\n }\n\n /**\n * Get the management partner using the partnerId, objectId and tenantId.\n * @param partnerId Id of the Partner\n * @param options The options parameters.\n */\n get(\n partnerId: string,\n options?: PartnerGetOptionalParams\n ): Promise<PartnerGetResponse> {\n return this.client.sendOperationRequest(\n { partnerId, options },\n getOperationSpec\n );\n }\n\n /**\n * Create a management partner for the objectId and tenantId.\n * @param partnerId Id of the Partner\n * @param options The options parameters.\n */\n create(\n partnerId: string,\n options?: PartnerCreateOptionalParams\n ): Promise<PartnerCreateResponse> {\n return this.client.sendOperationRequest(\n { partnerId, options },\n createOperationSpec\n );\n }\n\n /**\n * Update the management partner for the objectId and tenantId.\n * @param partnerId Id of the Partner\n * @param options The options parameters.\n */\n update(\n partnerId: string,\n options?: PartnerUpdateOptionalParams\n ): Promise<PartnerUpdateResponse> {\n return this.client.sendOperationRequest(\n { partnerId, options },\n updateOperationSpec\n );\n }\n\n /**\n * Delete the management partner for the objectId and tenantId.\n * @param partnerId Id of the Partner\n * @param options The options parameters.\n */\n delete(\n partnerId: string,\n options?: PartnerDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { partnerId, options },\n deleteOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ManagementPartner/partners/{partnerId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PartnerResponse\n },\n default: {\n bodyMapper: Mappers.ErrorModel\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.partnerId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ManagementPartner/partners/{partnerId}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.PartnerResponse\n },\n default: {\n bodyMapper: Mappers.ErrorModel\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.partnerId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ManagementPartner/partners/{partnerId}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.PartnerResponse\n },\n default: {\n bodyMapper: Mappers.ErrorModel\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.partnerId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ManagementPartner/partners/{partnerId}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.ErrorModel\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.partnerId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing Partners operations. */
|
|
12
12
|
export class PartnersImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class Partners class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partners.js","sourceRoot":"","sources":["../../../src/operations/partners.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAItD,4CAA4C;AAC5C,MAAM,OAAO,YAAY;
|
|
1
|
+
{"version":3,"file":"partners.js","sourceRoot":"","sources":["../../../src/operations/partners.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAItD,4CAA4C;AAC5C,MAAM,OAAO,YAAY;IACN,MAAM,CAAsC;IAE7D;;;OAGG;IACH,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,OAAmC;QACrC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,gBAAgB,CAAC,CAAC;IACzE,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EAAE,iDAAiD;IACvD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,eAAe;SACpC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,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 { Partners } 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 { ACEProvisioningManagementPartnerAPI } from \"../aCEProvisioningManagementPartnerAPI.js\";\nimport { PartnersGetOptionalParams, PartnersGetResponse } from \"../models/index.js\";\n\n/** Class containing Partners operations. */\nexport class PartnersImpl implements Partners {\n private readonly client: ACEProvisioningManagementPartnerAPI;\n\n /**\n * Initialize a new instance of the class Partners class.\n * @param client Reference to the service client\n */\n constructor(client: ACEProvisioningManagementPartnerAPI) {\n this.client = client;\n }\n\n /**\n * Get the management partner using the objectId and tenantId.\n * @param options The options parameters.\n */\n get(options?: PartnersGetOptionalParams): Promise<PartnersGetResponse> {\n return this.client.sendOperationRequest({ options }, getOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ManagementPartner/partners\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PartnerResponse\n },\n default: {\n bodyMapper: Mappers.ErrorModel\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.accept],\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"]}
|
|
@@ -13,13 +13,14 @@ const coreClient = tslib_1.__importStar(require("@azure/core-client"));
|
|
|
13
13
|
const coreRestPipeline = tslib_1.__importStar(require("@azure/core-rest-pipeline"));
|
|
14
14
|
const index_js_1 = require("./operations/index.js");
|
|
15
15
|
class ACEProvisioningManagementPartnerAPI extends coreClient.ServiceClient {
|
|
16
|
+
$host;
|
|
17
|
+
apiVersion;
|
|
16
18
|
/**
|
|
17
19
|
* Initializes a new instance of the ACEProvisioningManagementPartnerAPI class.
|
|
18
20
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
19
21
|
* @param options The parameter options
|
|
20
22
|
*/
|
|
21
23
|
constructor(credentials, options) {
|
|
22
|
-
var _a, _b, _c;
|
|
23
24
|
if (credentials === undefined) {
|
|
24
25
|
throw new Error("'credentials' cannot be null");
|
|
25
26
|
}
|
|
@@ -35,12 +36,17 @@ class ACEProvisioningManagementPartnerAPI extends coreClient.ServiceClient {
|
|
|
35
36
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
36
37
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
37
38
|
: `${packageDetails}`;
|
|
38
|
-
const optionsWithDefaults =
|
|
39
|
+
const optionsWithDefaults = {
|
|
40
|
+
...defaults,
|
|
41
|
+
...options,
|
|
42
|
+
userAgentOptions: {
|
|
39
43
|
userAgentPrefix
|
|
40
|
-
},
|
|
44
|
+
},
|
|
45
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
46
|
+
};
|
|
41
47
|
super(optionsWithDefaults);
|
|
42
48
|
let bearerTokenAuthenticationPolicyFound = false;
|
|
43
|
-
if (
|
|
49
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
44
50
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
45
51
|
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
46
52
|
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
@@ -54,7 +60,8 @@ class ACEProvisioningManagementPartnerAPI extends coreClient.ServiceClient {
|
|
|
54
60
|
});
|
|
55
61
|
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
56
62
|
credential: credentials,
|
|
57
|
-
scopes:
|
|
63
|
+
scopes: optionsWithDefaults.credentialScopes ??
|
|
64
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
58
65
|
challengeCallbacks: {
|
|
59
66
|
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
60
67
|
}
|
|
@@ -93,6 +100,9 @@ class ACEProvisioningManagementPartnerAPI extends coreClient.ServiceClient {
|
|
|
93
100
|
};
|
|
94
101
|
this.pipeline.addPolicy(apiVersionPolicy);
|
|
95
102
|
}
|
|
103
|
+
partner;
|
|
104
|
+
operation;
|
|
105
|
+
partners;
|
|
96
106
|
}
|
|
97
107
|
exports.ACEProvisioningManagementPartnerAPI = ACEProvisioningManagementPartnerAPI;
|
|
98
108
|
//# sourceMappingURL=aCEProvisioningManagementPartnerAPI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aCEProvisioningManagementPartnerAPI.js","sourceRoot":"","sources":["../../src/aCEProvisioningManagementPartnerAPI.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA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AAC;IACrD,CAAC;IAED,8GAA8G;IACtG,yBAAyB,CAAC,UAAmB;QACnD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,CAAC,WAAW,CACf,OAAwB,EACxB,IAAiB;gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,CAAU;IACjB,SAAS,CAAY;IACrB,QAAQ,CAAW;CACpB;AAnHD,kFAmHC","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 { PartnerImpl, OperationImpl, PartnersImpl } from \"./operations/index.js\";\nimport { Partner, Operation, Partners } from \"./operationsInterfaces/index.js\";\nimport { ACEProvisioningManagementPartnerAPIOptionalParams } from \"./models/index.js\";\n\nexport class ACEProvisioningManagementPartnerAPI extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the ACEProvisioningManagementPartnerAPI class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: ACEProvisioningManagementPartnerAPIOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: ACEProvisioningManagementPartnerAPIOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-managementpartner/3.0.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\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[] = 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\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2018-02-01\";\n this.partner = new PartnerImpl(this);\n this.operation = new OperationImpl(this);\n this.partners = new PartnersImpl(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 partner: Partner;\n operation: Operation;\n partners: Partners;\n}\n"]}
|
|
@@ -16,6 +16,7 @@ const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
|
16
16
|
/// <reference lib="esnext.asynciterable" />
|
|
17
17
|
/** Class containing Operation operations. */
|
|
18
18
|
class OperationImpl {
|
|
19
|
+
client;
|
|
19
20
|
/**
|
|
20
21
|
* Initialize a new instance of the class Operation class.
|
|
21
22
|
* @param client Reference to the service client
|
|
@@ -37,52 +38,35 @@ class OperationImpl {
|
|
|
37
38
|
return this;
|
|
38
39
|
},
|
|
39
40
|
byPage: (settings) => {
|
|
40
|
-
if (settings
|
|
41
|
+
if (settings?.maxPageSize) {
|
|
41
42
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
42
43
|
}
|
|
43
44
|
return this.listPagingPage(options, settings);
|
|
44
45
|
}
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
|
-
listPagingPage(options, settings) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
});
|
|
48
|
+
async *listPagingPage(options, settings) {
|
|
49
|
+
let result;
|
|
50
|
+
let continuationToken = settings?.continuationToken;
|
|
51
|
+
if (!continuationToken) {
|
|
52
|
+
result = await this._list(options);
|
|
53
|
+
let page = result.value || [];
|
|
54
|
+
continuationToken = result.nextLink;
|
|
55
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
56
|
+
yield page;
|
|
57
|
+
}
|
|
58
|
+
while (continuationToken) {
|
|
59
|
+
result = await this._listNext(continuationToken, options);
|
|
60
|
+
continuationToken = result.nextLink;
|
|
61
|
+
let page = result.value || [];
|
|
62
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
63
|
+
yield page;
|
|
64
|
+
}
|
|
66
65
|
}
|
|
67
|
-
listPagingAll(options) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
72
|
-
_c = _f.value;
|
|
73
|
-
_d = false;
|
|
74
|
-
const page = _c;
|
|
75
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
79
|
-
finally {
|
|
80
|
-
try {
|
|
81
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
82
|
-
}
|
|
83
|
-
finally { if (e_1) throw e_1.error; }
|
|
84
|
-
}
|
|
85
|
-
});
|
|
66
|
+
async *listPagingAll(options) {
|
|
67
|
+
for await (const page of this.listPagingPage(options)) {
|
|
68
|
+
yield* page;
|
|
69
|
+
}
|
|
86
70
|
}
|
|
87
71
|
/**
|
|
88
72
|
* List all the operations.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../src/operations/operation.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,6CAA6C;AAC7C,MAAa,aAAa;
|
|
1
|
+
{"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../src/operations/operation.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAUtD,4CAA4C;AAC5C,6CAA6C;AAC7C,MAAa,aAAa;IACP,MAAM,CAAsC;IAE7D;;;OAGG;IACH,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAqC;QAErC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,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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CAAC,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IAED;;;;OAIG;IACK,SAAS,CACf,QAAgB,EAChB,OAAyC;QAEzC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,QAAQ,EAAE,OAAO,EAAE,EACrB,qBAAqB,CACtB,CAAC;IACJ,CAAC;CACF;AAzFD,sCAyFC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,mDAAmD;IACzD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;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 { Operation } 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 { ACEProvisioningManagementPartnerAPI } from \"../aCEProvisioningManagementPartnerAPI.js\";\nimport {\n OperationResponse,\n OperationListNextOptionalParams,\n OperationListOptionalParams,\n OperationListResponse,\n OperationListNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Operation operations. */\nexport class OperationImpl implements Operation {\n private readonly client: ACEProvisioningManagementPartnerAPI;\n\n /**\n * Initialize a new instance of the class Operation class.\n * @param client Reference to the service client\n */\n constructor(client: ACEProvisioningManagementPartnerAPI) {\n this.client = client;\n }\n\n /**\n * List all the operations.\n * @param options The options parameters.\n */\n public list(\n options?: OperationListOptionalParams\n ): PagedAsyncIterableIterator<OperationResponse> {\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?: OperationListOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<OperationResponse[]> {\n let result: OperationListResponse;\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?: OperationListOptionalParams\n ): AsyncIterableIterator<OperationResponse> {\n for await (const page of this.listPagingPage(options)) {\n yield* page;\n }\n }\n\n /**\n * List all the operations.\n * @param options The options parameters.\n */\n private _list(\n options?: OperationListOptionalParams\n ): Promise<OperationListResponse> {\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?: OperationListNextOptionalParams\n ): Promise<OperationListNextResponse> {\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.ManagementPartner/operations\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationList\n },\n default: {\n bodyMapper: Mappers.ErrorModel\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.ErrorModel\n }\n },\n urlParameters: [Parameters.$host, Parameters.nextLink],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -14,6 +14,7 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
|
|
|
14
14
|
const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
|
15
15
|
/** Class containing Partner operations. */
|
|
16
16
|
class PartnerImpl {
|
|
17
|
+
client;
|
|
17
18
|
/**
|
|
18
19
|
* Initialize a new instance of the class Partner class.
|
|
19
20
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partner.js","sourceRoot":"","sources":["../../../src/operations/partner.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAYtD,2CAA2C;AAC3C,MAAa,WAAW;
|
|
1
|
+
{"version":3,"file":"partner.js","sourceRoot":"","sources":["../../../src/operations/partner.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAYtD,2CAA2C;AAC3C,MAAa,WAAW;IACL,MAAM,CAAsC;IAE7D;;;OAGG;IACH,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,GAAG,CACD,SAAiB,EACjB,OAAkC;QAElC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,SAAS,EAAE,OAAO,EAAE,EACtB,gBAAgB,CACjB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,SAAiB,EACjB,OAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,SAAS,EAAE,OAAO,EAAE,EACtB,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,SAAiB,EACjB,OAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,SAAS,EAAE,OAAO,EAAE,EACtB,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,SAAiB,EACjB,OAAqC;QAErC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,SAAS,EAAE,OAAO,EAAE,EACtB,mBAAmB,CACpB,CAAC;IACJ,CAAC;CACF;AAtED,kCAsEC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EAAE,6DAA6D;IACnE,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,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G,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC;IACvD,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 { Partner } 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 { ACEProvisioningManagementPartnerAPI } from \"../aCEProvisioningManagementPartnerAPI.js\";\nimport {\n PartnerGetOptionalParams,\n PartnerGetResponse,\n PartnerCreateOptionalParams,\n PartnerCreateResponse,\n PartnerUpdateOptionalParams,\n PartnerUpdateResponse,\n PartnerDeleteOptionalParams\n} from \"../models/index.js\";\n\n/** Class containing Partner operations. */\nexport class PartnerImpl implements Partner {\n private readonly client: ACEProvisioningManagementPartnerAPI;\n\n /**\n * Initialize a new instance of the class Partner class.\n * @param client Reference to the service client\n */\n constructor(client: ACEProvisioningManagementPartnerAPI) {\n this.client = client;\n }\n\n /**\n * Get the management partner using the partnerId, objectId and tenantId.\n * @param partnerId Id of the Partner\n * @param options The options parameters.\n */\n get(\n partnerId: string,\n options?: PartnerGetOptionalParams\n ): Promise<PartnerGetResponse> {\n return this.client.sendOperationRequest(\n { partnerId, options },\n getOperationSpec\n );\n }\n\n /**\n * Create a management partner for the objectId and tenantId.\n * @param partnerId Id of the Partner\n * @param options The options parameters.\n */\n create(\n partnerId: string,\n options?: PartnerCreateOptionalParams\n ): Promise<PartnerCreateResponse> {\n return this.client.sendOperationRequest(\n { partnerId, options },\n createOperationSpec\n );\n }\n\n /**\n * Update the management partner for the objectId and tenantId.\n * @param partnerId Id of the Partner\n * @param options The options parameters.\n */\n update(\n partnerId: string,\n options?: PartnerUpdateOptionalParams\n ): Promise<PartnerUpdateResponse> {\n return this.client.sendOperationRequest(\n { partnerId, options },\n updateOperationSpec\n );\n }\n\n /**\n * Delete the management partner for the objectId and tenantId.\n * @param partnerId Id of the Partner\n * @param options The options parameters.\n */\n delete(\n partnerId: string,\n options?: PartnerDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { partnerId, options },\n deleteOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ManagementPartner/partners/{partnerId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.PartnerResponse\n },\n default: {\n bodyMapper: Mappers.ErrorModel\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.partnerId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ManagementPartner/partners/{partnerId}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.PartnerResponse\n },\n default: {\n bodyMapper: Mappers.ErrorModel\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.partnerId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ManagementPartner/partners/{partnerId}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.PartnerResponse\n },\n default: {\n bodyMapper: Mappers.ErrorModel\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.partnerId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.ManagementPartner/partners/{partnerId}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.ErrorModel\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.partnerId],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|