@azure/arm-cdn 9.1.1-alpha.20250718.1 → 9.1.1-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.
Files changed (202) hide show
  1. package/dist/browser/cdnManagementClient.js +34 -5
  2. package/dist/browser/cdnManagementClient.js.map +1 -1
  3. package/dist/browser/lroImpl.js +7 -3
  4. package/dist/browser/lroImpl.js.map +1 -1
  5. package/dist/browser/models/mappers.js +663 -294
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/afdCustomDomains.js +67 -64
  8. package/dist/browser/operations/afdCustomDomains.js.map +1 -1
  9. package/dist/browser/operations/afdEndpoints.js +89 -103
  10. package/dist/browser/operations/afdEndpoints.js.map +1 -1
  11. package/dist/browser/operations/afdOriginGroups.js +78 -97
  12. package/dist/browser/operations/afdOriginGroups.js.map +1 -1
  13. package/dist/browser/operations/afdOrigins.js +56 -58
  14. package/dist/browser/operations/afdOrigins.js.map +1 -1
  15. package/dist/browser/operations/afdProfiles.js +34 -46
  16. package/dist/browser/operations/afdProfiles.js.map +1 -1
  17. package/dist/browser/operations/customDomains.js +67 -64
  18. package/dist/browser/operations/customDomains.js.map +1 -1
  19. package/dist/browser/operations/edgeNodes.js +23 -40
  20. package/dist/browser/operations/edgeNodes.js.map +1 -1
  21. package/dist/browser/operations/endpoints.js +122 -121
  22. package/dist/browser/operations/endpoints.js.map +1 -1
  23. package/dist/browser/operations/logAnalytics.js +1 -0
  24. package/dist/browser/operations/logAnalytics.js.map +1 -1
  25. package/dist/browser/operations/managedRuleSets.js +23 -40
  26. package/dist/browser/operations/managedRuleSets.js.map +1 -1
  27. package/dist/browser/operations/operations.js +23 -40
  28. package/dist/browser/operations/operations.js.map +1 -1
  29. package/dist/browser/operations/originGroups.js +56 -58
  30. package/dist/browser/operations/originGroups.js.map +1 -1
  31. package/dist/browser/operations/origins.js +56 -58
  32. package/dist/browser/operations/origins.js.map +1 -1
  33. package/dist/browser/operations/policies.js +45 -52
  34. package/dist/browser/operations/policies.js.map +1 -1
  35. package/dist/browser/operations/profiles.js +133 -154
  36. package/dist/browser/operations/profiles.js.map +1 -1
  37. package/dist/browser/operations/resourceUsageOperations.js +23 -40
  38. package/dist/browser/operations/resourceUsageOperations.js.map +1 -1
  39. package/dist/browser/operations/routes.js +56 -58
  40. package/dist/browser/operations/routes.js.map +1 -1
  41. package/dist/browser/operations/ruleSets.js +56 -85
  42. package/dist/browser/operations/ruleSets.js.map +1 -1
  43. package/dist/browser/operations/rules.js +56 -58
  44. package/dist/browser/operations/rules.js.map +1 -1
  45. package/dist/browser/operations/secrets.js +45 -52
  46. package/dist/browser/operations/secrets.js.map +1 -1
  47. package/dist/browser/operations/securityPolicies.js +56 -58
  48. package/dist/browser/operations/securityPolicies.js.map +1 -1
  49. package/dist/browser/pagingHelper.js +2 -4
  50. package/dist/browser/pagingHelper.js.map +1 -1
  51. package/dist/commonjs/cdnManagementClient.js +34 -5
  52. package/dist/commonjs/cdnManagementClient.js.map +1 -1
  53. package/dist/commonjs/lroImpl.js +7 -3
  54. package/dist/commonjs/lroImpl.js.map +1 -1
  55. package/dist/commonjs/models/mappers.js +663 -294
  56. package/dist/commonjs/models/mappers.js.map +1 -1
  57. package/dist/commonjs/operations/afdCustomDomains.js +67 -63
  58. package/dist/commonjs/operations/afdCustomDomains.js.map +1 -1
  59. package/dist/commonjs/operations/afdEndpoints.js +89 -102
  60. package/dist/commonjs/operations/afdEndpoints.js.map +1 -1
  61. package/dist/commonjs/operations/afdOriginGroups.js +78 -96
  62. package/dist/commonjs/operations/afdOriginGroups.js.map +1 -1
  63. package/dist/commonjs/operations/afdOrigins.js +56 -57
  64. package/dist/commonjs/operations/afdOrigins.js.map +1 -1
  65. package/dist/commonjs/operations/afdProfiles.js +34 -45
  66. package/dist/commonjs/operations/afdProfiles.js.map +1 -1
  67. package/dist/commonjs/operations/customDomains.js +67 -63
  68. package/dist/commonjs/operations/customDomains.js.map +1 -1
  69. package/dist/commonjs/operations/edgeNodes.js +23 -39
  70. package/dist/commonjs/operations/edgeNodes.js.map +1 -1
  71. package/dist/commonjs/operations/endpoints.js +122 -120
  72. package/dist/commonjs/operations/endpoints.js.map +1 -1
  73. package/dist/commonjs/operations/logAnalytics.js +1 -0
  74. package/dist/commonjs/operations/logAnalytics.js.map +1 -1
  75. package/dist/commonjs/operations/managedRuleSets.js +23 -39
  76. package/dist/commonjs/operations/managedRuleSets.js.map +1 -1
  77. package/dist/commonjs/operations/operations.js +23 -39
  78. package/dist/commonjs/operations/operations.js.map +1 -1
  79. package/dist/commonjs/operations/originGroups.js +56 -57
  80. package/dist/commonjs/operations/originGroups.js.map +1 -1
  81. package/dist/commonjs/operations/origins.js +56 -57
  82. package/dist/commonjs/operations/origins.js.map +1 -1
  83. package/dist/commonjs/operations/policies.js +45 -51
  84. package/dist/commonjs/operations/policies.js.map +1 -1
  85. package/dist/commonjs/operations/profiles.js +133 -153
  86. package/dist/commonjs/operations/profiles.js.map +1 -1
  87. package/dist/commonjs/operations/resourceUsageOperations.js +23 -39
  88. package/dist/commonjs/operations/resourceUsageOperations.js.map +1 -1
  89. package/dist/commonjs/operations/routes.js +56 -57
  90. package/dist/commonjs/operations/routes.js.map +1 -1
  91. package/dist/commonjs/operations/ruleSets.js +56 -84
  92. package/dist/commonjs/operations/ruleSets.js.map +1 -1
  93. package/dist/commonjs/operations/rules.js +56 -57
  94. package/dist/commonjs/operations/rules.js.map +1 -1
  95. package/dist/commonjs/operations/secrets.js +45 -51
  96. package/dist/commonjs/operations/secrets.js.map +1 -1
  97. package/dist/commonjs/operations/securityPolicies.js +56 -57
  98. package/dist/commonjs/operations/securityPolicies.js.map +1 -1
  99. package/dist/commonjs/pagingHelper.js +2 -4
  100. package/dist/commonjs/pagingHelper.js.map +1 -1
  101. package/dist/commonjs/tsdoc-metadata.json +1 -1
  102. package/dist/esm/cdnManagementClient.js +34 -5
  103. package/dist/esm/cdnManagementClient.js.map +1 -1
  104. package/dist/esm/lroImpl.js +7 -3
  105. package/dist/esm/lroImpl.js.map +1 -1
  106. package/dist/esm/models/mappers.js +663 -294
  107. package/dist/esm/models/mappers.js.map +1 -1
  108. package/dist/esm/operations/afdCustomDomains.js +67 -64
  109. package/dist/esm/operations/afdCustomDomains.js.map +1 -1
  110. package/dist/esm/operations/afdEndpoints.js +89 -103
  111. package/dist/esm/operations/afdEndpoints.js.map +1 -1
  112. package/dist/esm/operations/afdOriginGroups.js +78 -97
  113. package/dist/esm/operations/afdOriginGroups.js.map +1 -1
  114. package/dist/esm/operations/afdOrigins.js +56 -58
  115. package/dist/esm/operations/afdOrigins.js.map +1 -1
  116. package/dist/esm/operations/afdProfiles.js +34 -46
  117. package/dist/esm/operations/afdProfiles.js.map +1 -1
  118. package/dist/esm/operations/customDomains.js +67 -64
  119. package/dist/esm/operations/customDomains.js.map +1 -1
  120. package/dist/esm/operations/edgeNodes.js +23 -40
  121. package/dist/esm/operations/edgeNodes.js.map +1 -1
  122. package/dist/esm/operations/endpoints.js +122 -121
  123. package/dist/esm/operations/endpoints.js.map +1 -1
  124. package/dist/esm/operations/logAnalytics.js +1 -0
  125. package/dist/esm/operations/logAnalytics.js.map +1 -1
  126. package/dist/esm/operations/managedRuleSets.js +23 -40
  127. package/dist/esm/operations/managedRuleSets.js.map +1 -1
  128. package/dist/esm/operations/operations.js +23 -40
  129. package/dist/esm/operations/operations.js.map +1 -1
  130. package/dist/esm/operations/originGroups.js +56 -58
  131. package/dist/esm/operations/originGroups.js.map +1 -1
  132. package/dist/esm/operations/origins.js +56 -58
  133. package/dist/esm/operations/origins.js.map +1 -1
  134. package/dist/esm/operations/policies.js +45 -52
  135. package/dist/esm/operations/policies.js.map +1 -1
  136. package/dist/esm/operations/profiles.js +133 -154
  137. package/dist/esm/operations/profiles.js.map +1 -1
  138. package/dist/esm/operations/resourceUsageOperations.js +23 -40
  139. package/dist/esm/operations/resourceUsageOperations.js.map +1 -1
  140. package/dist/esm/operations/routes.js +56 -58
  141. package/dist/esm/operations/routes.js.map +1 -1
  142. package/dist/esm/operations/ruleSets.js +56 -85
  143. package/dist/esm/operations/ruleSets.js.map +1 -1
  144. package/dist/esm/operations/rules.js +56 -58
  145. package/dist/esm/operations/rules.js.map +1 -1
  146. package/dist/esm/operations/secrets.js +45 -52
  147. package/dist/esm/operations/secrets.js.map +1 -1
  148. package/dist/esm/operations/securityPolicies.js +56 -58
  149. package/dist/esm/operations/securityPolicies.js.map +1 -1
  150. package/dist/esm/pagingHelper.js +2 -4
  151. package/dist/esm/pagingHelper.js.map +1 -1
  152. package/dist/react-native/cdnManagementClient.js +34 -5
  153. package/dist/react-native/cdnManagementClient.js.map +1 -1
  154. package/dist/react-native/lroImpl.js +7 -3
  155. package/dist/react-native/lroImpl.js.map +1 -1
  156. package/dist/react-native/models/mappers.js +663 -294
  157. package/dist/react-native/models/mappers.js.map +1 -1
  158. package/dist/react-native/operations/afdCustomDomains.js +67 -64
  159. package/dist/react-native/operations/afdCustomDomains.js.map +1 -1
  160. package/dist/react-native/operations/afdEndpoints.js +89 -103
  161. package/dist/react-native/operations/afdEndpoints.js.map +1 -1
  162. package/dist/react-native/operations/afdOriginGroups.js +78 -97
  163. package/dist/react-native/operations/afdOriginGroups.js.map +1 -1
  164. package/dist/react-native/operations/afdOrigins.js +56 -58
  165. package/dist/react-native/operations/afdOrigins.js.map +1 -1
  166. package/dist/react-native/operations/afdProfiles.js +34 -46
  167. package/dist/react-native/operations/afdProfiles.js.map +1 -1
  168. package/dist/react-native/operations/customDomains.js +67 -64
  169. package/dist/react-native/operations/customDomains.js.map +1 -1
  170. package/dist/react-native/operations/edgeNodes.js +23 -40
  171. package/dist/react-native/operations/edgeNodes.js.map +1 -1
  172. package/dist/react-native/operations/endpoints.js +122 -121
  173. package/dist/react-native/operations/endpoints.js.map +1 -1
  174. package/dist/react-native/operations/logAnalytics.js +1 -0
  175. package/dist/react-native/operations/logAnalytics.js.map +1 -1
  176. package/dist/react-native/operations/managedRuleSets.js +23 -40
  177. package/dist/react-native/operations/managedRuleSets.js.map +1 -1
  178. package/dist/react-native/operations/operations.js +23 -40
  179. package/dist/react-native/operations/operations.js.map +1 -1
  180. package/dist/react-native/operations/originGroups.js +56 -58
  181. package/dist/react-native/operations/originGroups.js.map +1 -1
  182. package/dist/react-native/operations/origins.js +56 -58
  183. package/dist/react-native/operations/origins.js.map +1 -1
  184. package/dist/react-native/operations/policies.js +45 -52
  185. package/dist/react-native/operations/policies.js.map +1 -1
  186. package/dist/react-native/operations/profiles.js +133 -154
  187. package/dist/react-native/operations/profiles.js.map +1 -1
  188. package/dist/react-native/operations/resourceUsageOperations.js +23 -40
  189. package/dist/react-native/operations/resourceUsageOperations.js.map +1 -1
  190. package/dist/react-native/operations/routes.js +56 -58
  191. package/dist/react-native/operations/routes.js.map +1 -1
  192. package/dist/react-native/operations/ruleSets.js +56 -85
  193. package/dist/react-native/operations/ruleSets.js.map +1 -1
  194. package/dist/react-native/operations/rules.js +56 -58
  195. package/dist/react-native/operations/rules.js.map +1 -1
  196. package/dist/react-native/operations/secrets.js +45 -52
  197. package/dist/react-native/operations/secrets.js.map +1 -1
  198. package/dist/react-native/operations/securityPolicies.js +56 -58
  199. package/dist/react-native/operations/securityPolicies.js.map +1 -1
  200. package/dist/react-native/pagingHelper.js +2 -4
  201. package/dist/react-native/pagingHelper.js.map +1 -1
  202. package/package.json +2 -2
@@ -11,8 +11,10 @@ import { AfdProfilesImpl, AfdCustomDomainsImpl, AfdEndpointsImpl, AfdOriginGroup
11
11
  import * as Parameters from "./models/parameters.js";
12
12
  import * as Mappers from "./models/mappers.js";
13
13
  export class CdnManagementClient extends coreClient.ServiceClient {
14
+ $host;
15
+ subscriptionId;
16
+ apiVersion;
14
17
  constructor(credentials, subscriptionIdOrOptions, options) {
15
- var _a, _b, _c;
16
18
  if (credentials === undefined) {
17
19
  throw new Error("'credentials' cannot be null");
18
20
  }
@@ -35,12 +37,17 @@ export class CdnManagementClient extends coreClient.ServiceClient {
35
37
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
36
38
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
37
39
  : `${packageDetails}`;
38
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
40
+ const optionsWithDefaults = {
41
+ ...defaults,
42
+ ...options,
43
+ userAgentOptions: {
39
44
  userAgentPrefix,
40
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
45
+ },
46
+ endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com",
47
+ };
41
48
  super(optionsWithDefaults);
42
49
  let bearerTokenAuthenticationPolicyFound = false;
43
- if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
50
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
44
51
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
45
52
  bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
46
53
  coreRestPipeline.bearerTokenAuthenticationPolicyName);
@@ -54,7 +61,8 @@ export class CdnManagementClient extends coreClient.ServiceClient {
54
61
  });
55
62
  this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
56
63
  credential: credentials,
57
- scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
64
+ scopes: optionsWithDefaults.credentialScopes ??
65
+ `${optionsWithDefaults.endpoint}/.default`,
58
66
  challengeCallbacks: {
59
67
  authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge,
60
68
  },
@@ -151,6 +159,27 @@ export class CdnManagementClient extends coreClient.ServiceClient {
151
159
  validateProbe(validateProbeInput, options) {
152
160
  return this.sendOperationRequest({ validateProbeInput, options }, validateProbeOperationSpec);
153
161
  }
162
+ afdProfiles;
163
+ afdCustomDomains;
164
+ afdEndpoints;
165
+ afdOriginGroups;
166
+ afdOrigins;
167
+ routes;
168
+ ruleSets;
169
+ rules;
170
+ securityPolicies;
171
+ secrets;
172
+ logAnalytics;
173
+ profiles;
174
+ endpoints;
175
+ origins;
176
+ originGroups;
177
+ customDomains;
178
+ resourceUsageOperations;
179
+ operations;
180
+ edgeNodes;
181
+ policies;
182
+ managedRuleSets;
154
183
  }
155
184
  // Operation Specifications
156
185
  const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
@@ -1 +1 @@
1
- {"version":3,"file":"cdnManagementClient.js","sourceRoot":"","sources":["../../src/cdnManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,UAAU,EACV,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,2BAA2B,EAC3B,cAAc,EACd,aAAa,EACb,YAAY,EACZ,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAwB/B,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,OAAO,MAAM,qBAAqB,CAAC;AAgB/C,MAAM,OAAO,mBAAoB,SAAQ,UAAU,CAAC,aAAa;IAoB/D,YACE,WAAqC,EACrC,uBAAoE,EACpE,OAA2C;;QAE3C,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QAED,IAAI,cAAkC,CAAC;QAEvC,IAAI,OAAO,uBAAuB,KAAK,QAAQ,EAAE,CAAC;YAChD,cAAc,GAAG,uBAAuB,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IACjB,UAAU;CACX,CAAC;AACF,MAAM,kDAAkD,GACtD;IACE,IAAI,EAAE,+EAA+E;IACrF,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,2BAA2B;SAChD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,0BAA0B;IAClD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACJ,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EAAE,uEAAuE;IAC7E,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,kBAAkB;IAC1C,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * 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 {\n AfdProfilesImpl,\n AfdCustomDomainsImpl,\n AfdEndpointsImpl,\n AfdOriginGroupsImpl,\n AfdOriginsImpl,\n RoutesImpl,\n RuleSetsImpl,\n RulesImpl,\n SecurityPoliciesImpl,\n SecretsImpl,\n LogAnalyticsImpl,\n ProfilesImpl,\n EndpointsImpl,\n OriginsImpl,\n OriginGroupsImpl,\n CustomDomainsImpl,\n ResourceUsageOperationsImpl,\n OperationsImpl,\n EdgeNodesImpl,\n PoliciesImpl,\n ManagedRuleSetsImpl,\n} from \"./operations/index.js\";\nimport {\n AfdProfiles,\n AfdCustomDomains,\n AfdEndpoints,\n AfdOriginGroups,\n AfdOrigins,\n Routes,\n RuleSets,\n Rules,\n SecurityPolicies,\n Secrets,\n LogAnalytics,\n Profiles,\n Endpoints,\n Origins,\n OriginGroups,\n CustomDomains,\n ResourceUsageOperations,\n Operations,\n EdgeNodes,\n Policies,\n ManagedRuleSets,\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n CdnManagementClientOptionalParams,\n CheckEndpointNameAvailabilityInput,\n CheckEndpointNameAvailabilityOptionalParams,\n CheckEndpointNameAvailabilityResponse,\n CheckNameAvailabilityInput,\n CheckNameAvailabilityOptionalParams,\n CheckNameAvailabilityResponse,\n CheckNameAvailabilityWithSubscriptionOptionalParams,\n CheckNameAvailabilityWithSubscriptionResponse,\n ValidateProbeInput,\n ValidateProbeOptionalParams,\n ValidateProbeResponse,\n} from \"./models/index.js\";\n\nexport class CdnManagementClient extends coreClient.ServiceClient {\n $host: string;\n subscriptionId?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the CdnManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Azure Subscription ID.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: CdnManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: CdnManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: CdnManagementClientOptionalParams | string,\n options?: CdnManagementClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: CdnManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-cdn/9.1.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2024-02-01\";\n this.afdProfiles = new AfdProfilesImpl(this);\n this.afdCustomDomains = new AfdCustomDomainsImpl(this);\n this.afdEndpoints = new AfdEndpointsImpl(this);\n this.afdOriginGroups = new AfdOriginGroupsImpl(this);\n this.afdOrigins = new AfdOriginsImpl(this);\n this.routes = new RoutesImpl(this);\n this.ruleSets = new RuleSetsImpl(this);\n this.rules = new RulesImpl(this);\n this.securityPolicies = new SecurityPoliciesImpl(this);\n this.secrets = new SecretsImpl(this);\n this.logAnalytics = new LogAnalyticsImpl(this);\n this.profiles = new ProfilesImpl(this);\n this.endpoints = new EndpointsImpl(this);\n this.origins = new OriginsImpl(this);\n this.originGroups = new OriginGroupsImpl(this);\n this.customDomains = new CustomDomainsImpl(this);\n this.resourceUsageOperations = new ResourceUsageOperationsImpl(this);\n this.operations = new OperationsImpl(this);\n this.edgeNodes = new EdgeNodesImpl(this);\n this.policies = new PoliciesImpl(this);\n this.managedRuleSets = new ManagedRuleSetsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally\n * unique, such as a afdx endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param checkEndpointNameAvailabilityInput Input to check.\n * @param options The options parameters.\n */\n checkEndpointNameAvailability(\n resourceGroupName: string,\n checkEndpointNameAvailabilityInput: CheckEndpointNameAvailabilityInput,\n options?: CheckEndpointNameAvailabilityOptionalParams,\n ): Promise<CheckEndpointNameAvailabilityResponse> {\n return this.sendOperationRequest(\n { resourceGroupName, checkEndpointNameAvailabilityInput, options },\n checkEndpointNameAvailabilityOperationSpec,\n );\n }\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally\n * unique, such as a CDN endpoint.\n * @param checkNameAvailabilityInput Input to check.\n * @param options The options parameters.\n */\n checkNameAvailability(\n checkNameAvailabilityInput: CheckNameAvailabilityInput,\n options?: CheckNameAvailabilityOptionalParams,\n ): Promise<CheckNameAvailabilityResponse> {\n return this.sendOperationRequest(\n { checkNameAvailabilityInput, options },\n checkNameAvailabilityOperationSpec,\n );\n }\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally\n * unique, such as a CDN endpoint.\n * @param checkNameAvailabilityInput Input to check.\n * @param options The options parameters.\n */\n checkNameAvailabilityWithSubscription(\n checkNameAvailabilityInput: CheckNameAvailabilityInput,\n options?: CheckNameAvailabilityWithSubscriptionOptionalParams,\n ): Promise<CheckNameAvailabilityWithSubscriptionResponse> {\n return this.sendOperationRequest(\n { checkNameAvailabilityInput, options },\n checkNameAvailabilityWithSubscriptionOperationSpec,\n );\n }\n\n /**\n * Check if the probe path is a valid path and the file can be accessed. Probe path is the path to a\n * file hosted on the origin server to help accelerate the delivery of dynamic content via the CDN\n * endpoint. This path is relative to the origin path specified in the endpoint configuration.\n * @param validateProbeInput Input to check.\n * @param options The options parameters.\n */\n validateProbe(\n validateProbeInput: ValidateProbeInput,\n options?: ValidateProbeOptionalParams,\n ): Promise<ValidateProbeResponse> {\n return this.sendOperationRequest(\n { validateProbeInput, options },\n validateProbeOperationSpec,\n );\n }\n\n afdProfiles: AfdProfiles;\n afdCustomDomains: AfdCustomDomains;\n afdEndpoints: AfdEndpoints;\n afdOriginGroups: AfdOriginGroups;\n afdOrigins: AfdOrigins;\n routes: Routes;\n ruleSets: RuleSets;\n rules: Rules;\n securityPolicies: SecurityPolicies;\n secrets: Secrets;\n logAnalytics: LogAnalytics;\n profiles: Profiles;\n endpoints: Endpoints;\n origins: Origins;\n originGroups: OriginGroups;\n customDomains: CustomDomains;\n resourceUsageOperations: ResourceUsageOperations;\n operations: Operations;\n edgeNodes: EdgeNodes;\n policies: Policies;\n managedRuleSets: ManagedRuleSets;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkEndpointNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/checkEndpointNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckEndpointNameAvailabilityOutput,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n requestBody: Parameters.checkEndpointNameAvailabilityInput,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Cdn/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameAvailabilityOutput,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.checkNameAvailabilityInput,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst checkNameAvailabilityWithSubscriptionOperationSpec: coreClient.OperationSpec =\n {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameAvailabilityOutput,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.checkNameAvailabilityInput,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n };\nconst validateProbeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateProbe\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.ValidateProbeOutput,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.validateProbeInput,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
1
+ {"version":3,"file":"cdnManagementClient.js","sourceRoot":"","sources":["../../src/cdnManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,UAAU,EACV,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,2BAA2B,EAC3B,cAAc,EACd,aAAa,EACb,YAAY,EACZ,mBAAmB,G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cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACJ,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EAAE,uEAAuE;IAC7E,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,WAAW,EAAE,UAAU,CAAC,kBAAkB;IAC1C,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * 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 {\n AfdProfilesImpl,\n AfdCustomDomainsImpl,\n AfdEndpointsImpl,\n AfdOriginGroupsImpl,\n AfdOriginsImpl,\n RoutesImpl,\n RuleSetsImpl,\n RulesImpl,\n SecurityPoliciesImpl,\n SecretsImpl,\n LogAnalyticsImpl,\n ProfilesImpl,\n EndpointsImpl,\n OriginsImpl,\n OriginGroupsImpl,\n CustomDomainsImpl,\n ResourceUsageOperationsImpl,\n OperationsImpl,\n EdgeNodesImpl,\n PoliciesImpl,\n ManagedRuleSetsImpl,\n} from \"./operations/index.js\";\nimport {\n AfdProfiles,\n AfdCustomDomains,\n AfdEndpoints,\n AfdOriginGroups,\n AfdOrigins,\n Routes,\n RuleSets,\n Rules,\n SecurityPolicies,\n Secrets,\n LogAnalytics,\n Profiles,\n Endpoints,\n Origins,\n OriginGroups,\n CustomDomains,\n ResourceUsageOperations,\n Operations,\n EdgeNodes,\n Policies,\n ManagedRuleSets,\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n CdnManagementClientOptionalParams,\n CheckEndpointNameAvailabilityInput,\n CheckEndpointNameAvailabilityOptionalParams,\n CheckEndpointNameAvailabilityResponse,\n CheckNameAvailabilityInput,\n CheckNameAvailabilityOptionalParams,\n CheckNameAvailabilityResponse,\n CheckNameAvailabilityWithSubscriptionOptionalParams,\n CheckNameAvailabilityWithSubscriptionResponse,\n ValidateProbeInput,\n ValidateProbeOptionalParams,\n ValidateProbeResponse,\n} from \"./models/index.js\";\n\nexport class CdnManagementClient extends coreClient.ServiceClient {\n $host: string;\n subscriptionId?: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the CdnManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Azure Subscription ID.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: CdnManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n options?: CdnManagementClientOptionalParams,\n );\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionIdOrOptions?: CdnManagementClientOptionalParams | string,\n options?: CdnManagementClientOptionalParams,\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n\n let subscriptionId: string | undefined;\n\n if (typeof subscriptionIdOrOptions === \"string\") {\n subscriptionId = subscriptionIdOrOptions;\n } else if (typeof subscriptionIdOrOptions === \"object\") {\n options = subscriptionIdOrOptions;\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: CdnManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials,\n };\n\n const packageDetails = `azsdk-js-arm-cdn/9.1.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\",\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] =\n options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName,\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName,\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge,\n },\n }),\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2024-02-01\";\n this.afdProfiles = new AfdProfilesImpl(this);\n this.afdCustomDomains = new AfdCustomDomainsImpl(this);\n this.afdEndpoints = new AfdEndpointsImpl(this);\n this.afdOriginGroups = new AfdOriginGroupsImpl(this);\n this.afdOrigins = new AfdOriginsImpl(this);\n this.routes = new RoutesImpl(this);\n this.ruleSets = new RuleSetsImpl(this);\n this.rules = new RulesImpl(this);\n this.securityPolicies = new SecurityPoliciesImpl(this);\n this.secrets = new SecretsImpl(this);\n this.logAnalytics = new LogAnalyticsImpl(this);\n this.profiles = new ProfilesImpl(this);\n this.endpoints = new EndpointsImpl(this);\n this.origins = new OriginsImpl(this);\n this.originGroups = new OriginGroupsImpl(this);\n this.customDomains = new CustomDomainsImpl(this);\n this.resourceUsageOperations = new ResourceUsageOperationsImpl(this);\n this.operations = new OperationsImpl(this);\n this.edgeNodes = new EdgeNodesImpl(this);\n this.policies = new PoliciesImpl(this);\n this.managedRuleSets = new ManagedRuleSetsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally\n * unique, such as a afdx endpoint.\n * @param resourceGroupName Name of the Resource group within the Azure subscription.\n * @param checkEndpointNameAvailabilityInput Input to check.\n * @param options The options parameters.\n */\n checkEndpointNameAvailability(\n resourceGroupName: string,\n checkEndpointNameAvailabilityInput: CheckEndpointNameAvailabilityInput,\n options?: CheckEndpointNameAvailabilityOptionalParams,\n ): Promise<CheckEndpointNameAvailabilityResponse> {\n return this.sendOperationRequest(\n { resourceGroupName, checkEndpointNameAvailabilityInput, options },\n checkEndpointNameAvailabilityOperationSpec,\n );\n }\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally\n * unique, such as a CDN endpoint.\n * @param checkNameAvailabilityInput Input to check.\n * @param options The options parameters.\n */\n checkNameAvailability(\n checkNameAvailabilityInput: CheckNameAvailabilityInput,\n options?: CheckNameAvailabilityOptionalParams,\n ): Promise<CheckNameAvailabilityResponse> {\n return this.sendOperationRequest(\n { checkNameAvailabilityInput, options },\n checkNameAvailabilityOperationSpec,\n );\n }\n\n /**\n * Check the availability of a resource name. This is needed for resources where name is globally\n * unique, such as a CDN endpoint.\n * @param checkNameAvailabilityInput Input to check.\n * @param options The options parameters.\n */\n checkNameAvailabilityWithSubscription(\n checkNameAvailabilityInput: CheckNameAvailabilityInput,\n options?: CheckNameAvailabilityWithSubscriptionOptionalParams,\n ): Promise<CheckNameAvailabilityWithSubscriptionResponse> {\n return this.sendOperationRequest(\n { checkNameAvailabilityInput, options },\n checkNameAvailabilityWithSubscriptionOperationSpec,\n );\n }\n\n /**\n * Check if the probe path is a valid path and the file can be accessed. Probe path is the path to a\n * file hosted on the origin server to help accelerate the delivery of dynamic content via the CDN\n * endpoint. This path is relative to the origin path specified in the endpoint configuration.\n * @param validateProbeInput Input to check.\n * @param options The options parameters.\n */\n validateProbe(\n validateProbeInput: ValidateProbeInput,\n options?: ValidateProbeOptionalParams,\n ): Promise<ValidateProbeResponse> {\n return this.sendOperationRequest(\n { validateProbeInput, options },\n validateProbeOperationSpec,\n );\n }\n\n afdProfiles: AfdProfiles;\n afdCustomDomains: AfdCustomDomains;\n afdEndpoints: AfdEndpoints;\n afdOriginGroups: AfdOriginGroups;\n afdOrigins: AfdOrigins;\n routes: Routes;\n ruleSets: RuleSets;\n rules: Rules;\n securityPolicies: SecurityPolicies;\n secrets: Secrets;\n logAnalytics: LogAnalytics;\n profiles: Profiles;\n endpoints: Endpoints;\n origins: Origins;\n originGroups: OriginGroups;\n customDomains: CustomDomains;\n resourceUsageOperations: ResourceUsageOperations;\n operations: Operations;\n edgeNodes: EdgeNodes;\n policies: Policies;\n managedRuleSets: ManagedRuleSets;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst checkEndpointNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/checkEndpointNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckEndpointNameAvailabilityOutput,\n },\n default: {\n bodyMapper: Mappers.AfdErrorResponse,\n },\n },\n requestBody: Parameters.checkEndpointNameAvailabilityInput,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst checkNameAvailabilityOperationSpec: coreClient.OperationSpec = {\n path: \"/providers/Microsoft.Cdn/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameAvailabilityOutput,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.checkNameAvailabilityInput,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst checkNameAvailabilityWithSubscriptionOperationSpec: coreClient.OperationSpec =\n {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/checkNameAvailability\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CheckNameAvailabilityOutput,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.checkNameAvailabilityInput,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n };\nconst validateProbeOperationSpec: coreClient.OperationSpec = {\n path: \"/subscriptions/{subscriptionId}/providers/Microsoft.Cdn/validateProbe\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.ValidateProbeOutput,\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n },\n },\n requestBody: Parameters.validateProbeInput,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.$host, Parameters.subscriptionId],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
@@ -1,4 +1,3 @@
1
- import { __rest } from "tslib";
2
1
  export function createLroSpec(inputs) {
3
2
  const { args, spec, sendOperationFn } = inputs;
4
3
  return {
@@ -6,8 +5,13 @@ export function createLroSpec(inputs) {
6
5
  requestPath: spec.path,
7
6
  sendInitialRequest: () => sendOperationFn(args, spec),
8
7
  sendPollRequest: (path, options) => {
9
- const { requestBody } = spec, restSpec = __rest(spec, ["requestBody"]);
10
- return sendOperationFn(args, Object.assign(Object.assign({}, restSpec), { httpMethod: "GET", path, abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }));
8
+ const { requestBody, ...restSpec } = spec;
9
+ return sendOperationFn(args, {
10
+ ...restSpec,
11
+ httpMethod: "GET",
12
+ path,
13
+ abortSignal: options?.abortSignal,
14
+ });
11
15
  },
12
16
  };
13
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":";AAUA,MAAM,UAAU,aAAa,CAAI,MAQhC;IACC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IAC/C,OAAO;QACL,aAAa,EAAE,IAAI,CAAC,UAAU;QAC9B,WAAW,EAAE,IAAI,CAAC,IAAK;QACvB,kBAAkB,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC;QACrD,eAAe,EAAE,CACf,IAAY,EACZ,OAA2C,EAC3C,EAAE;YACF,MAAM,EAAE,WAAW,KAAkB,IAAI,EAAjB,QAAQ,UAAK,IAAI,EAAnC,eAA4B,CAAO,CAAC;YAC1C,OAAO,eAAe,CAAC,IAAI,kCACtB,QAAQ,KACX,UAAU,EAAE,KAAK,EACjB,IAAI,EACJ,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,IACjC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport function createLroSpec<T>(inputs: {\n sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;\n args: Record<string, unknown>;\n spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>;\n}): LongRunningOperation<T> {\n const { args, spec, sendOperationFn } = inputs;\n return {\n requestMethod: spec.httpMethod,\n requestPath: spec.path!,\n sendInitialRequest: () => sendOperationFn(args, spec),\n sendPollRequest: (\n path: string,\n options?: { abortSignal?: AbortSignalLike },\n ) => {\n const { requestBody, ...restSpec } = spec;\n return sendOperationFn(args, {\n ...restSpec,\n httpMethod: \"GET\",\n path,\n abortSignal: options?.abortSignal,\n });\n },\n };\n}\n"]}
1
+ {"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,aAAa,CAAI,MAQhC;IACC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;IAC/C,OAAO;QACL,aAAa,EAAE,IAAI,CAAC,UAAU;QAC9B,WAAW,EAAE,IAAI,CAAC,IAAK;QACvB,kBAAkB,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC;QACrD,eAAe,EAAE,CACf,IAAY,EACZ,OAA2C,EAC3C,EAAE;YACF,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC;YAC1C,OAAO,eAAe,CAAC,IAAI,EAAE;gBAC3B,GAAG,QAAQ;gBACX,UAAU,EAAE,KAAK;gBACjB,IAAI;gBACJ,WAAW,EAAE,OAAO,EAAE,WAAW;aAClC,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport function createLroSpec<T>(inputs: {\n sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;\n args: Record<string, unknown>;\n spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>;\n}): LongRunningOperation<T> {\n const { args, spec, sendOperationFn } = inputs;\n return {\n requestMethod: spec.httpMethod,\n requestPath: spec.path!,\n sendInitialRequest: () => sendOperationFn(args, spec),\n sendPollRequest: (\n path: string,\n options?: { abortSignal?: AbortSignalLike },\n ) => {\n const { requestBody, ...restSpec } = spec;\n return sendOperationFn(args, {\n ...restSpec,\n httpMethod: \"GET\",\n path,\n abortSignal: options?.abortSignal,\n });\n },\n };\n}\n"]}