@azure/arm-operations 4.0.0-beta.2 → 4.0.0-beta.4

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.
Files changed (106) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/LICENSE +1 -1
  3. package/README.md +13 -2
  4. package/dist/index.js +190 -71
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +1 -1
  7. package/dist/index.min.js.map +1 -1
  8. package/dist-esm/samples-dev/managementAssociationsCreateOrUpdateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/managementAssociationsCreateOrUpdateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/managementAssociationsCreateOrUpdateSample.js +40 -0
  11. package/dist-esm/samples-dev/managementAssociationsCreateOrUpdateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/managementAssociationsDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/managementAssociationsDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/managementAssociationsDeleteSample.js +34 -0
  15. package/dist-esm/samples-dev/managementAssociationsDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/managementAssociationsGetSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/managementAssociationsGetSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/managementAssociationsGetSample.js +34 -0
  19. package/dist-esm/samples-dev/managementAssociationsGetSample.js.map +1 -0
  20. package/dist-esm/samples-dev/managementAssociationsListBySubscriptionSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/managementAssociationsListBySubscriptionSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/managementAssociationsListBySubscriptionSample.js +29 -0
  23. package/dist-esm/samples-dev/managementAssociationsListBySubscriptionSample.js.map +1 -0
  24. package/dist-esm/samples-dev/managementConfigurationsCreateOrUpdateSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/managementConfigurationsCreateOrUpdateSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/managementConfigurationsCreateOrUpdateSample.js +32 -0
  27. package/dist-esm/samples-dev/managementConfigurationsCreateOrUpdateSample.js.map +1 -0
  28. package/dist-esm/samples-dev/managementConfigurationsDeleteSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/managementConfigurationsDeleteSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/managementConfigurationsDeleteSample.js +31 -0
  31. package/dist-esm/samples-dev/managementConfigurationsDeleteSample.js.map +1 -0
  32. package/dist-esm/samples-dev/managementConfigurationsGetSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/managementConfigurationsGetSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/managementConfigurationsGetSample.js +31 -0
  35. package/dist-esm/samples-dev/managementConfigurationsGetSample.js.map +1 -0
  36. package/dist-esm/samples-dev/managementConfigurationsListBySubscriptionSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/managementConfigurationsListBySubscriptionSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/managementConfigurationsListBySubscriptionSample.js +29 -0
  39. package/dist-esm/samples-dev/managementConfigurationsListBySubscriptionSample.js.map +1 -0
  40. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/operationsListSample.js +43 -0
  43. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  44. package/dist-esm/samples-dev/solutionsCreateOrUpdateSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/solutionsCreateOrUpdateSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/solutionsCreateOrUpdateSample.js +51 -0
  47. package/dist-esm/samples-dev/solutionsCreateOrUpdateSample.js.map +1 -0
  48. package/dist-esm/samples-dev/solutionsDeleteSample.d.ts +2 -0
  49. package/dist-esm/samples-dev/solutionsDeleteSample.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/solutionsDeleteSample.js +31 -0
  51. package/dist-esm/samples-dev/solutionsDeleteSample.js.map +1 -0
  52. package/dist-esm/samples-dev/solutionsGetSample.d.ts +2 -0
  53. package/dist-esm/samples-dev/solutionsGetSample.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/solutionsGetSample.js +31 -0
  55. package/dist-esm/samples-dev/solutionsGetSample.js.map +1 -0
  56. package/dist-esm/samples-dev/solutionsListByResourceGroupSample.d.ts +2 -0
  57. package/dist-esm/samples-dev/solutionsListByResourceGroupSample.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/solutionsListByResourceGroupSample.js +30 -0
  59. package/dist-esm/samples-dev/solutionsListByResourceGroupSample.js.map +1 -0
  60. package/dist-esm/samples-dev/solutionsListBySubscriptionSample.d.ts +2 -0
  61. package/dist-esm/samples-dev/solutionsListBySubscriptionSample.d.ts.map +1 -0
  62. package/dist-esm/samples-dev/solutionsListBySubscriptionSample.js +29 -0
  63. package/dist-esm/samples-dev/solutionsListBySubscriptionSample.js.map +1 -0
  64. package/dist-esm/samples-dev/solutionsUpdateSample.d.ts +2 -0
  65. package/dist-esm/samples-dev/solutionsUpdateSample.d.ts.map +1 -0
  66. package/dist-esm/samples-dev/solutionsUpdateSample.js +34 -0
  67. package/dist-esm/samples-dev/solutionsUpdateSample.js.map +1 -0
  68. package/dist-esm/src/index.d.ts +1 -0
  69. package/dist-esm/src/index.d.ts.map +1 -1
  70. package/dist-esm/src/index.js +1 -0
  71. package/dist-esm/src/index.js.map +1 -1
  72. package/dist-esm/src/operations/managementAssociations.d.ts +12 -3
  73. package/dist-esm/src/operations/managementAssociations.d.ts.map +1 -1
  74. package/dist-esm/src/operations/managementAssociations.js +37 -6
  75. package/dist-esm/src/operations/managementAssociations.js.map +1 -1
  76. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  77. package/dist-esm/src/operations/operations.js +8 -4
  78. package/dist-esm/src/operations/operations.js.map +1 -1
  79. package/dist-esm/src/operations/solutions.d.ts.map +1 -1
  80. package/dist-esm/src/operations/solutions.js +9 -3
  81. package/dist-esm/src/operations/solutions.js.map +1 -1
  82. package/dist-esm/src/operationsInterfaces/managementAssociations.d.ts +12 -3
  83. package/dist-esm/src/operationsInterfaces/managementAssociations.d.ts.map +1 -1
  84. package/dist-esm/src/operationsManagementClient.d.ts +3 -7
  85. package/dist-esm/src/operationsManagementClient.d.ts.map +1 -1
  86. package/dist-esm/src/operationsManagementClient.js +55 -21
  87. package/dist-esm/src/operationsManagementClient.js.map +1 -1
  88. package/dist-esm/src/pagingHelper.d.ts +13 -0
  89. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  90. package/dist-esm/src/pagingHelper.js +32 -0
  91. package/dist-esm/src/pagingHelper.js.map +1 -0
  92. package/dist-esm/test/sampleTest.js +11 -13
  93. package/dist-esm/test/sampleTest.js.map +1 -1
  94. package/package.json +51 -21
  95. package/review/arm-operations.api.md +7 -10
  96. package/rollup.config.js +6 -72
  97. package/src/index.ts +1 -0
  98. package/src/operations/managementAssociations.ts +43 -3
  99. package/src/operations/operations.ts +10 -5
  100. package/src/operations/solutions.ts +9 -3
  101. package/src/operationsInterfaces/managementAssociations.ts +18 -0
  102. package/src/operationsManagementClient.ts +70 -26
  103. package/src/pagingHelper.ts +39 -0
  104. package/tsconfig.json +19 -5
  105. package/types/arm-operations.d.ts +24 -10
  106. package/types/tsdoc-metadata.json +1 -1
@@ -5,7 +5,9 @@
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 { __awaiter } from "tslib";
8
9
  import * as coreClient from "@azure/core-client";
10
+ import * as coreRestPipeline from "@azure/core-rest-pipeline";
9
11
  import { SolutionsImpl, ManagementAssociationsImpl, ManagementConfigurationsImpl, OperationsImpl } from "./operations";
10
12
  export class OperationsManagementClient extends coreClient.ServiceClient {
11
13
  /**
@@ -13,27 +15,16 @@ export class OperationsManagementClient extends coreClient.ServiceClient {
13
15
  * @param credentials Subscription credentials which uniquely identify client subscription.
14
16
  * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure
15
17
  * subscription. The subscription ID forms part of the URI for every service call.
16
- * @param providerName Provider name for the parent resource.
17
- * @param resourceType Resource type for the parent resource
18
- * @param resourceName Parent resource name.
19
18
  * @param options The parameter options
20
19
  */
21
- constructor(credentials, subscriptionId, providerName, resourceType, resourceName, options) {
20
+ constructor(credentials, subscriptionId, options) {
21
+ var _a, _b, _c;
22
22
  if (credentials === undefined) {
23
23
  throw new Error("'credentials' cannot be null");
24
24
  }
25
25
  if (subscriptionId === undefined) {
26
26
  throw new Error("'subscriptionId' cannot be null");
27
27
  }
28
- if (providerName === undefined) {
29
- throw new Error("'providerName' cannot be null");
30
- }
31
- if (resourceType === undefined) {
32
- throw new Error("'resourceType' cannot be null");
33
- }
34
- if (resourceName === undefined) {
35
- throw new Error("'resourceName' cannot be null");
36
- }
37
28
  // Initializing default values for options
38
29
  if (!options) {
39
30
  options = {};
@@ -42,22 +33,37 @@ export class OperationsManagementClient extends coreClient.ServiceClient {
42
33
  requestContentType: "application/json; charset=utf-8",
43
34
  credential: credentials
44
35
  };
45
- const packageDetails = `azsdk-js-arm-operations/4.0.0-beta.2`;
36
+ const packageDetails = `azsdk-js-arm-operations/4.0.0-beta.4`;
46
37
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
47
38
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
48
39
  : `${packageDetails}`;
49
- if (!options.credentialScopes) {
50
- options.credentialScopes = ["https://management.azure.com/.default"];
51
- }
52
40
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
53
41
  userAgentPrefix
54
- }, baseUri: options.endpoint || "https://management.azure.com" });
42
+ }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
55
43
  super(optionsWithDefaults);
44
+ let bearerTokenAuthenticationPolicyFound = false;
45
+ if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
46
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
47
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
48
+ coreRestPipeline.bearerTokenAuthenticationPolicyName);
49
+ }
50
+ if (!options ||
51
+ !options.pipeline ||
52
+ options.pipeline.getOrderedPolicies().length == 0 ||
53
+ !bearerTokenAuthenticationPolicyFound) {
54
+ this.pipeline.removePolicy({
55
+ name: coreRestPipeline.bearerTokenAuthenticationPolicyName
56
+ });
57
+ this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
58
+ credential: credentials,
59
+ scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
60
+ challengeCallbacks: {
61
+ authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
62
+ }
63
+ }));
64
+ }
56
65
  // Parameter assignments
57
66
  this.subscriptionId = subscriptionId;
58
- this.providerName = providerName;
59
- this.resourceType = resourceType;
60
- this.resourceName = resourceName;
61
67
  // Assigning values to Constant parameters
62
68
  this.$host = options.$host || "https://management.azure.com";
63
69
  this.apiVersion = options.apiVersion || "2015-11-01-preview";
@@ -65,6 +71,34 @@ export class OperationsManagementClient extends coreClient.ServiceClient {
65
71
  this.managementAssociations = new ManagementAssociationsImpl(this);
66
72
  this.managementConfigurations = new ManagementConfigurationsImpl(this);
67
73
  this.operations = new OperationsImpl(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
+ sendRequest(request, next) {
84
+ return __awaiter(this, void 0, void 0, function* () {
85
+ const param = request.url.split("?");
86
+ if (param.length > 1) {
87
+ const newParams = param[1].split("&").map((item) => {
88
+ if (item.indexOf("api-version") > -1) {
89
+ return "api-version=" + apiVersion;
90
+ }
91
+ else {
92
+ return item;
93
+ }
94
+ });
95
+ request.url = param[0] + "?" + newParams.join("&");
96
+ }
97
+ return next(request);
98
+ });
99
+ }
100
+ };
101
+ this.pipeline.addPolicy(apiVersionPolicy);
68
102
  }
69
103
  }
70
104
  //# sourceMappingURL=operationsManagementClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"operationsManagementClient.js","sourceRoot":"","sources":["../../src/operationsManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,4BAA4B,EAC5B,cAAc,EACf,MAAM,cAAc,CAAC;AAStB,MAAM,OAAO,0BAA2B,SAAQ,UAAU,CAAC,aAAa;IAQtE;;;;;;;;;OASG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,YAAoB,EACpB,YAAoB,EACpB,YAAoB,EACpB,OAAkD;QAElD,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QACD,IAAI,cAAc,KAAK,SAAS,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;SACpD;QACD,IAAI,YAAY,KAAK,SAAS,EAAE;YAC9B,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;SAClD;QACD,IAAI,YAAY,KAAK,SAAS,EAAE;YAC9B,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;SAClD;QACD,IAAI,YAAY,KAAK,SAAS,EAAE;YAC9B,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;SAClD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ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CAAC;CAMF"}
1
+ {"version":3,"file":"operationsManagementClient.js","sourceRoot":"","sources":["../../src/operationsManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,aAAa,EACb,0BAA0B,EAC1B,4BAA4B,EAC5B,cAAc,EACf,MAAM,cAAc,CAAC;AAStB,MAAM,OAAO,0BAA2B,SAAQ,UAAU,CAAC,aAAa;IAKtE;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAkD;;QAElD,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QACD,IAAI,cAAc,KAAK,SAAS,EAAE;YAChC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;SACpD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAA6C;YACzD,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,sCAAsC,CAAC;QAC9D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,QAAQ,EACN,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,8BAA8B,GACxE,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAE3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, returns a
6
+ * continuation token that can be used to begin paging from
7
+ * that point later.
8
+ * @param page A result object from calling .byPage() on a paged operation.
9
+ * @returns The continuation token that can be passed into byPage().
10
+ */
11
+ export declare function getContinuationToken(page: unknown): string | undefined;
12
+ export declare function setContinuationToken(page: unknown, continuationToken: string | undefined): void;
13
+ //# sourceMappingURL=pagingHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagingHelper.d.ts","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,QAAQ;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAID;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAKtE;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,OAAO,EACb,iBAAiB,EAAE,MAAM,GAAG,SAAS,GACpC,IAAI,CAON"}
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ const pageMap = new WeakMap();
9
+ /**
10
+ * Given a result page from a pageable operation, returns a
11
+ * continuation token that can be used to begin paging from
12
+ * that point later.
13
+ * @param page A result object from calling .byPage() on a paged operation.
14
+ * @returns The continuation token that can be passed into byPage().
15
+ */
16
+ export function getContinuationToken(page) {
17
+ var _a;
18
+ if (typeof page !== "object" || page === null) {
19
+ return undefined;
20
+ }
21
+ return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
22
+ }
23
+ export function setContinuationToken(page, continuationToken) {
24
+ var _a;
25
+ if (typeof page !== "object" || page === null || !continuationToken) {
26
+ return;
27
+ }
28
+ const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
29
+ pageInfo.continuationToken = continuationToken;
30
+ pageMap.set(page, pageInfo);
31
+ }
32
+ //# sourceMappingURL=pagingHelper.js.map
@@ -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;QAC7C,OAAO,SAAS,CAAC;KAClB;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;QACnE,OAAO;KACR;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"}
@@ -6,24 +6,22 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
  import { __awaiter } from "tslib";
9
- import { record } from "@azure-tools/test-recorder";
10
- const recorderEnvSetup = {
11
- replaceableVariables: {
12
- AZURE_CLIENT_ID: "azure_client_id",
13
- AZURE_CLIENT_SECRET: "azure_client_secret",
14
- AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
15
- SUBSCRIPTION_ID: "azure_subscription_id"
16
- },
17
- customizationsOnRecordings: [
18
- (recording) => recording.replace(/"access_token":"[^"]*"/g, `"access_token":"access_token"`)
19
- ],
20
- queryParametersToSkip: []
9
+ import { Recorder } from "@azure-tools/test-recorder";
10
+ const replaceableVariables = {
11
+ AZURE_CLIENT_ID: "azure_client_id",
12
+ AZURE_CLIENT_SECRET: "azure_client_secret",
13
+ AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
14
+ SUBSCRIPTION_ID: "azure_subscription_id"
15
+ };
16
+ const recorderOptions = {
17
+ envSetupForPlayback: replaceableVariables
21
18
  };
22
19
  describe("My test", () => {
23
20
  let recorder;
24
21
  beforeEach(function () {
25
22
  return __awaiter(this, void 0, void 0, function* () {
26
- recorder = record(this, recorderEnvSetup);
23
+ recorder = new Recorder(this.currentTest);
24
+ yield recorder.start(recorderOptions);
27
25
  });
28
26
  });
29
27
  afterEach(function () {
@@ -1 +1 @@
1
- {"version":3,"file":"sampleTest.js","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EAEL,MAAM,EAGP,MAAM,4BAA4B,CAAC;AAGpC,MAAM,gBAAgB,GAA6B;IACjD,oBAAoB,EAAE;QACpB,eAAe,EAAE,iBAAiB;QAClC,mBAAmB,EAAE,qBAAqB;QAC1C,eAAe,EAAE,sCAAsC;QACvD,eAAe,EAAE,uBAAuB;KACzC;IACD,0BAA0B,EAAE;QAC1B,CAAC,SAAc,EAAO,EAAE,CACtB,SAAS,CAAC,OAAO,CACf,yBAAyB,EACzB,+BAA+B,CAChC;KACJ;IACD,qBAAqB,EAAE,EAAE;CAC1B,CAAC;AAEF,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,IAAI,QAAkB,CAAC;IAEvB,UAAU,CAAC;;YACT,QAAQ,GAAG,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QAC5C,CAAC;KAAA,CAAC,CAAC;IAEH,SAAS,CAAC;;YACR,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC;KAAA,CAAC,CAAC;IAEH,EAAE,CAAC,aAAa,EAAE;;YAChB,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACjC,CAAC;KAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"sampleTest.js","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EACL,QAAQ,EAGT,MAAM,4BAA4B,CAAC;AAIpC,MAAM,oBAAoB,GAA2B;IACnD,eAAe,EAAE,iBAAiB;IAClC,mBAAmB,EAAE,qBAAqB;IAC1C,eAAe,EAAE,sCAAsC;IACvD,eAAe,EAAE,uBAAuB;CACzC,CAAC;AAEF,MAAM,eAAe,GAAyB;IAC5C,mBAAmB,EAAE,oBAAoB;CAC1C,CAAC;AAEF,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,IAAI,QAAkB,CAAC;IAEvB,UAAU,CAAC;;YACT,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC1C,MAAM,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QACxC,CAAC;KAAA,CAAC,CAAC;IAEH,SAAS,CAAC;;YACR,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC;KAAA,CAAC,CAAC;IAEH,EAAE,CAAC,aAAa,EAAE;;YAChB,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACjC,CAAC;KAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -3,45 +3,60 @@
3
3
  "sdk-type": "mgmt",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "A generated SDK for OperationsManagementClient.",
6
- "version": "4.0.0-beta.2",
7
- "engines": { "node": ">=12.0.0" },
6
+ "version": "4.0.0-beta.4",
7
+ "engines": {
8
+ "node": ">=14.0.0"
9
+ },
8
10
  "dependencies": {
9
11
  "@azure/core-lro": "^2.2.0",
10
12
  "@azure/abort-controller": "^1.0.0",
11
13
  "@azure/core-paging": "^1.2.0",
12
- "@azure/core-client": "^1.0.0",
14
+ "@azure/core-client": "^1.6.1",
13
15
  "@azure/core-auth": "^1.3.0",
14
- "@azure/core-rest-pipeline": "^1.1.0",
16
+ "@azure/core-rest-pipeline": "^1.8.0",
15
17
  "tslib": "^2.2.0"
16
18
  },
17
- "keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
19
+ "keywords": [
20
+ "node",
21
+ "azure",
22
+ "typescript",
23
+ "browser",
24
+ "isomorphic"
25
+ ],
18
26
  "license": "MIT",
19
27
  "main": "./dist/index.js",
20
28
  "module": "./dist-esm/src/index.js",
21
29
  "types": "./types/arm-operations.d.ts",
22
30
  "devDependencies": {
23
- "@microsoft/api-extractor": "^7.18.11",
24
- "@rollup/plugin-commonjs": "11.0.2",
25
- "@rollup/plugin-json": "^4.0.0",
26
- "@rollup/plugin-multi-entry": "^3.0.0",
27
- "@rollup/plugin-node-resolve": "^8.0.0",
31
+ "@microsoft/api-extractor": "^7.31.1",
32
+ "@rollup/plugin-commonjs": "^21.0.1",
33
+ "@rollup/plugin-json": "^4.1.0",
34
+ "@rollup/plugin-multi-entry": "^4.1.0",
35
+ "@rollup/plugin-node-resolve": "^13.1.3",
28
36
  "mkdirp": "^1.0.4",
29
- "rollup": "^1.16.3",
30
- "rollup-plugin-sourcemaps": "^0.4.2",
31
- "typescript": "~4.2.0",
37
+ "rollup": "^2.66.1",
38
+ "rollup-plugin-sourcemaps": "^0.6.3",
39
+ "typescript": "~4.8.0",
32
40
  "uglify-js": "^3.4.9",
33
41
  "rimraf": "^3.0.0",
34
42
  "@azure/identity": "^2.0.1",
35
- "@azure-tools/test-recorder": "^1.0.0",
43
+ "@azure-tools/test-recorder": "^2.0.0",
44
+ "@azure-tools/test-credential": "^1.0.0",
36
45
  "mocha": "^7.1.1",
37
- "cross-env": "^7.0.2"
46
+ "@types/chai": "^4.2.8",
47
+ "chai": "^4.2.0",
48
+ "cross-env": "^7.0.2",
49
+ "@types/node": "^14.0.0",
50
+ "@azure/dev-tool": "^1.0.0"
38
51
  },
39
52
  "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/operationsmanagement/arm-operations",
40
53
  "repository": {
41
54
  "type": "git",
42
55
  "url": "https://github.com/Azure/azure-sdk-for-js.git"
43
56
  },
44
- "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
57
+ "bugs": {
58
+ "url": "https://github.com/Azure/azure-sdk-for-js/issues"
59
+ },
45
60
  "files": [
46
61
  "dist/**/*.js",
47
62
  "dist/**/*.js.map",
@@ -83,10 +98,25 @@
83
98
  "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node",
84
99
  "unit-test:browser": "echo skipped",
85
100
  "integration-test": "npm run integration-test:node && npm run integration-test:browser",
86
- "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js",
87
- "integration-test:browser": "echo skipped",
88
- "docs": "echo skipped"
101
+ "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'",
102
+ "integration-test:browser": "echo skipped"
89
103
  },
90
104
  "sideEffects": false,
91
- "autoPublish": true
92
- }
105
+ "//metadata": {
106
+ "constantPaths": [
107
+ {
108
+ "path": "src/operationsManagementClient.ts",
109
+ "prefix": "packageDetails"
110
+ }
111
+ ]
112
+ },
113
+ "autoPublish": true,
114
+ "//sampleConfiguration": {
115
+ "productName": "",
116
+ "productSlugs": [
117
+ "azure"
118
+ ],
119
+ "disableDocsMs": true,
120
+ "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-operations?view=azure-node-preview"
121
+ }
122
+ }
@@ -27,6 +27,9 @@ export interface CodeMessageErrorError {
27
27
  message?: string;
28
28
  }
29
29
 
30
+ // @public
31
+ export function getContinuationToken(page: unknown): string | undefined;
32
+
30
33
  // @public
31
34
  export interface ManagementAssociation {
32
35
  readonly id?: string;
@@ -48,9 +51,9 @@ export interface ManagementAssociationPropertiesList {
48
51
 
49
52
  // @public
50
53
  export interface ManagementAssociations {
51
- createOrUpdate(resourceGroupName: string, managementAssociationName: string, parameters: ManagementAssociation, options?: ManagementAssociationsCreateOrUpdateOptionalParams): Promise<ManagementAssociationsCreateOrUpdateResponse>;
52
- delete(resourceGroupName: string, managementAssociationName: string, options?: ManagementAssociationsDeleteOptionalParams): Promise<void>;
53
- get(resourceGroupName: string, managementAssociationName: string, options?: ManagementAssociationsGetOptionalParams): Promise<ManagementAssociationsGetResponse>;
54
+ createOrUpdate(resourceGroupName: string, providerName: string, resourceType: string, resourceName: string, managementAssociationName: string, parameters: ManagementAssociation, options?: ManagementAssociationsCreateOrUpdateOptionalParams): Promise<ManagementAssociationsCreateOrUpdateResponse>;
55
+ delete(resourceGroupName: string, providerName: string, resourceType: string, resourceName: string, managementAssociationName: string, options?: ManagementAssociationsDeleteOptionalParams): Promise<void>;
56
+ get(resourceGroupName: string, providerName: string, resourceType: string, resourceName: string, managementAssociationName: string, options?: ManagementAssociationsGetOptionalParams): Promise<ManagementAssociationsGetResponse>;
54
57
  listBySubscription(options?: ManagementAssociationsListBySubscriptionOptionalParams): Promise<ManagementAssociationsListBySubscriptionResponse>;
55
58
  }
56
59
 
@@ -169,7 +172,7 @@ export type OperationsListResponse = OperationListResult;
169
172
  export class OperationsManagementClient extends coreClient.ServiceClient {
170
173
  // (undocumented)
171
174
  $host: string;
172
- constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, providerName: string, resourceType: string, resourceName: string, options?: OperationsManagementClientOptionalParams);
175
+ constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: OperationsManagementClientOptionalParams);
173
176
  // (undocumented)
174
177
  apiVersion: string;
175
178
  // (undocumented)
@@ -179,12 +182,6 @@ export class OperationsManagementClient extends coreClient.ServiceClient {
179
182
  // (undocumented)
180
183
  operations: Operations;
181
184
  // (undocumented)
182
- providerName: string;
183
- // (undocumented)
184
- resourceName: string;
185
- // (undocumented)
186
- resourceType: string;
187
- // (undocumented)
188
185
  solutions: Solutions;
189
186
  // (undocumented)
190
187
  subscriptionId: string;
package/rollup.config.js CHANGED
@@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
14
14
 
15
15
  import nodeBuiltins from "builtin-modules";
16
16
 
17
- /**
18
- * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
19
- *
20
- * NOTE: this manual configuration is only needed because OpenTelemetry uses an
21
- * __exportStar downleveled helper function to declare its exports which confuses
22
- * rollup's automatic discovery mechanism.
23
- *
24
- * @returns an object reference that can be `...`'d into your cjs() configuration.
25
- */
26
- export function openTelemetryCommonJs() {
27
- const namedExports = {};
28
-
29
- for (const key of [
30
- "@opentelemetry/api",
31
- "@azure/core-tracing/node_modules/@opentelemetry/api"
32
- ]) {
33
- namedExports[key] = [
34
- "SpanKind",
35
- "TraceFlags",
36
- "getSpan",
37
- "setSpan",
38
- "SpanStatusCode",
39
- "getSpanContext",
40
- "setSpanContext"
41
- ];
42
- }
43
-
44
- const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
45
-
46
- for (const version of releasedOpenTelemetryVersions) {
47
- namedExports[
48
- // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
49
- `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
50
- ] = [
51
- "SpanKind",
52
- "TraceFlags",
53
- "getSpan",
54
- "setSpan",
55
- "StatusCode",
56
- "CanonicalCode",
57
- "getSpanContext",
58
- "setSpanContext"
59
- ];
60
- }
61
-
62
- return namedExports;
63
- }
64
-
65
17
  // #region Warning Handler
66
18
 
67
19
  /**
68
- * A function that can determine whether a rollupwarning should be ignored. If
20
+ * A function that can determine whether a rollup warning should be ignored. If
69
21
  * the function returns `true`, then the warning will not be displayed.
70
22
  */
71
23
 
72
- function ignoreNiseSinonEvalWarnings(warning) {
24
+ function ignoreNiseSinonEval(warning) {
73
25
  return (
74
26
  warning.code === "EVAL" &&
75
27
  warning.id &&
@@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
78
30
  );
79
31
  }
80
32
 
81
- function ignoreChaiCircularDependencyWarnings(warning) {
33
+ function ignoreChaiCircularDependency(warning) {
82
34
  return (
83
35
  warning.code === "CIRCULAR_DEPENDENCY" &&
84
36
  warning.importer && warning.importer.includes("node_modules/chai") === true
85
37
  );
86
38
  }
87
39
 
88
- const warningInhibitors = [
89
- ignoreChaiCircularDependencyWarnings,
90
- ignoreNiseSinonEvalWarnings
91
- ];
40
+ const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
92
41
 
93
42
  /**
94
43
  * Construct a warning handler for the shared rollup configuration
@@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
122
71
  nodeResolve({
123
72
  mainFields: ["module", "browser"]
124
73
  }),
125
- cjs({
126
- namedExports: {
127
- // Chai's strange internal architecture makes it impossible to statically
128
- // analyze its exports.
129
- chai: [
130
- "version",
131
- "use",
132
- "util",
133
- "config",
134
- "expect",
135
- "should",
136
- "assert"
137
- ],
138
- ...openTelemetryCommonJs()
139
- }
140
- }),
74
+ cjs(),
141
75
  json(),
142
76
  sourcemaps()
143
77
  //viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
@@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
173
107
  ],
174
108
  output: { file: "dist/index.js", format: "cjs", sourcemap: true },
175
109
  preserveSymlinks: false,
176
- plugins: [sourcemaps(), nodeResolve(), cjs()]
110
+ plugins: [sourcemaps(), nodeResolve()]
177
111
  };
178
112
 
179
113
  const config = [baseConfig];
package/src/index.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  */
8
8
 
9
9
  /// <reference lib="esnext.asynciterable" />
10
+ export { getContinuationToken } from "./pagingHelper";
10
11
  export * from "./models";
11
12
  export { OperationsManagementClient } from "./operationsManagementClient";
12
13
  export * from "./operationsInterfaces";
@@ -50,18 +50,32 @@ export class ManagementAssociationsImpl implements ManagementAssociations {
50
50
  /**
51
51
  * Creates or updates the ManagementAssociation.
52
52
  * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
53
+ * @param providerName Provider name for the parent resource.
54
+ * @param resourceType Resource type for the parent resource
55
+ * @param resourceName Parent resource name.
53
56
  * @param managementAssociationName User ManagementAssociation Name.
54
57
  * @param parameters The parameters required to create ManagementAssociation extension.
55
58
  * @param options The options parameters.
56
59
  */
57
60
  createOrUpdate(
58
61
  resourceGroupName: string,
62
+ providerName: string,
63
+ resourceType: string,
64
+ resourceName: string,
59
65
  managementAssociationName: string,
60
66
  parameters: ManagementAssociation,
61
67
  options?: ManagementAssociationsCreateOrUpdateOptionalParams
62
68
  ): Promise<ManagementAssociationsCreateOrUpdateResponse> {
63
69
  return this.client.sendOperationRequest(
64
- { resourceGroupName, managementAssociationName, parameters, options },
70
+ {
71
+ resourceGroupName,
72
+ providerName,
73
+ resourceType,
74
+ resourceName,
75
+ managementAssociationName,
76
+ parameters,
77
+ options
78
+ },
65
79
  createOrUpdateOperationSpec
66
80
  );
67
81
  }
@@ -69,16 +83,29 @@ export class ManagementAssociationsImpl implements ManagementAssociations {
69
83
  /**
70
84
  * Deletes the ManagementAssociation in the subscription.
71
85
  * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
86
+ * @param providerName Provider name for the parent resource.
87
+ * @param resourceType Resource type for the parent resource
88
+ * @param resourceName Parent resource name.
72
89
  * @param managementAssociationName User ManagementAssociation Name.
73
90
  * @param options The options parameters.
74
91
  */
75
92
  delete(
76
93
  resourceGroupName: string,
94
+ providerName: string,
95
+ resourceType: string,
96
+ resourceName: string,
77
97
  managementAssociationName: string,
78
98
  options?: ManagementAssociationsDeleteOptionalParams
79
99
  ): Promise<void> {
80
100
  return this.client.sendOperationRequest(
81
- { resourceGroupName, managementAssociationName, options },
101
+ {
102
+ resourceGroupName,
103
+ providerName,
104
+ resourceType,
105
+ resourceName,
106
+ managementAssociationName,
107
+ options
108
+ },
82
109
  deleteOperationSpec
83
110
  );
84
111
  }
@@ -86,16 +113,29 @@ export class ManagementAssociationsImpl implements ManagementAssociations {
86
113
  /**
87
114
  * Retrieves the user ManagementAssociation.
88
115
  * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
116
+ * @param providerName Provider name for the parent resource.
117
+ * @param resourceType Resource type for the parent resource
118
+ * @param resourceName Parent resource name.
89
119
  * @param managementAssociationName User ManagementAssociation Name.
90
120
  * @param options The options parameters.
91
121
  */
92
122
  get(
93
123
  resourceGroupName: string,
124
+ providerName: string,
125
+ resourceType: string,
126
+ resourceName: string,
94
127
  managementAssociationName: string,
95
128
  options?: ManagementAssociationsGetOptionalParams
96
129
  ): Promise<ManagementAssociationsGetResponse> {
97
130
  return this.client.sendOperationRequest(
98
- { resourceGroupName, managementAssociationName, options },
131
+ {
132
+ resourceGroupName,
133
+ providerName,
134
+ resourceType,
135
+ resourceName,
136
+ managementAssociationName,
137
+ options
138
+ },
99
139
  getOperationSpec
100
140
  );
101
141
  }
@@ -6,7 +6,7 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PagedAsyncIterableIterator } from "@azure/core-paging";
9
+ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
10
  import { Operations } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
@@ -46,16 +46,21 @@ export class OperationsImpl implements Operations {
46
46
  [Symbol.asyncIterator]() {
47
47
  return this;
48
48
  },
49
- byPage: () => {
50
- return this.listPagingPage(options);
49
+ byPage: (settings?: PageSettings) => {
50
+ if (settings?.maxPageSize) {
51
+ throw new Error("maxPageSize is not supported by this operation.");
52
+ }
53
+ return this.listPagingPage(options, settings);
51
54
  }
52
55
  };
53
56
  }
54
57
 
55
58
  private async *listPagingPage(
56
- options?: OperationsListOptionalParams
59
+ options?: OperationsListOptionalParams,
60
+ _settings?: PageSettings
57
61
  ): AsyncIterableIterator<Operation[]> {
58
- let result = await this._list(options);
62
+ let result: OperationsListResponse;
63
+ result = await this._list(options);
59
64
  yield result.value || [];
60
65
  }
61
66