@azure/arm-resourcesbicep 1.0.0-alpha.20250910.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 (169) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +21 -0
  3. package/README.md +115 -0
  4. package/dist/browser/api/bicepContext.d.ts +19 -0
  5. package/dist/browser/api/bicepContext.js +38 -0
  6. package/dist/browser/api/bicepContext.js.map +1 -0
  7. package/dist/browser/api/decompileOperationGroup/index.d.ts +3 -0
  8. package/dist/browser/api/decompileOperationGroup/index.js +4 -0
  9. package/dist/browser/api/decompileOperationGroup/index.js.map +1 -0
  10. package/dist/browser/api/decompileOperationGroup/operations.d.ts +9 -0
  11. package/dist/browser/api/decompileOperationGroup/operations.js +37 -0
  12. package/dist/browser/api/decompileOperationGroup/operations.js.map +1 -0
  13. package/dist/browser/api/decompileOperationGroup/options.d.ts +5 -0
  14. package/dist/browser/api/decompileOperationGroup/options.js +4 -0
  15. package/dist/browser/api/decompileOperationGroup/options.js.map +1 -0
  16. package/dist/browser/api/index.d.ts +2 -0
  17. package/dist/browser/api/index.js +4 -0
  18. package/dist/browser/api/index.js.map +1 -0
  19. package/dist/browser/bicepClient.d.ts +15 -0
  20. package/dist/browser/bicepClient.js +25 -0
  21. package/dist/browser/bicepClient.js.map +1 -0
  22. package/dist/browser/classic/decompileOperationGroup/index.d.ts +10 -0
  23. package/dist/browser/classic/decompileOperationGroup/index.js +14 -0
  24. package/dist/browser/classic/decompileOperationGroup/index.js.map +1 -0
  25. package/dist/browser/classic/index.d.ts +2 -0
  26. package/dist/browser/classic/index.js +4 -0
  27. package/dist/browser/classic/index.js.map +1 -0
  28. package/dist/browser/index.d.ts +6 -0
  29. package/dist/browser/index.js +5 -0
  30. package/dist/browser/index.js.map +1 -0
  31. package/dist/browser/logger.d.ts +2 -0
  32. package/dist/browser/logger.js +5 -0
  33. package/dist/browser/logger.js.map +1 -0
  34. package/dist/browser/models/index.d.ts +2 -0
  35. package/dist/browser/models/index.js +4 -0
  36. package/dist/browser/models/index.js.map +1 -0
  37. package/dist/browser/models/models.d.ts +59 -0
  38. package/dist/browser/models/models.js +61 -0
  39. package/dist/browser/models/models.js.map +1 -0
  40. package/dist/browser/package.json +3 -0
  41. package/dist/browser/static-helpers/urlTemplate.d.ts +5 -0
  42. package/dist/browser/static-helpers/urlTemplate.js +169 -0
  43. package/dist/browser/static-helpers/urlTemplate.js.map +1 -0
  44. package/dist/commonjs/api/bicepContext.d.ts +19 -0
  45. package/dist/commonjs/api/bicepContext.js +41 -0
  46. package/dist/commonjs/api/bicepContext.js.map +1 -0
  47. package/dist/commonjs/api/decompileOperationGroup/index.d.ts +3 -0
  48. package/dist/commonjs/api/decompileOperationGroup/index.js +8 -0
  49. package/dist/commonjs/api/decompileOperationGroup/index.js.map +1 -0
  50. package/dist/commonjs/api/decompileOperationGroup/operations.d.ts +9 -0
  51. package/dist/commonjs/api/decompileOperationGroup/operations.js +42 -0
  52. package/dist/commonjs/api/decompileOperationGroup/operations.js.map +1 -0
  53. package/dist/commonjs/api/decompileOperationGroup/options.d.ts +5 -0
  54. package/dist/commonjs/api/decompileOperationGroup/options.js +5 -0
  55. package/dist/commonjs/api/decompileOperationGroup/options.js.map +1 -0
  56. package/dist/commonjs/api/index.d.ts +2 -0
  57. package/dist/commonjs/api/index.js +8 -0
  58. package/dist/commonjs/api/index.js.map +1 -0
  59. package/dist/commonjs/bicepClient.d.ts +15 -0
  60. package/dist/commonjs/bicepClient.js +29 -0
  61. package/dist/commonjs/bicepClient.js.map +1 -0
  62. package/dist/commonjs/classic/decompileOperationGroup/index.d.ts +10 -0
  63. package/dist/commonjs/classic/decompileOperationGroup/index.js +17 -0
  64. package/dist/commonjs/classic/decompileOperationGroup/index.js.map +1 -0
  65. package/dist/commonjs/classic/index.d.ts +2 -0
  66. package/dist/commonjs/classic/index.js +5 -0
  67. package/dist/commonjs/classic/index.js.map +1 -0
  68. package/dist/commonjs/index.d.ts +6 -0
  69. package/dist/commonjs/index.js +10 -0
  70. package/dist/commonjs/index.js.map +1 -0
  71. package/dist/commonjs/logger.d.ts +2 -0
  72. package/dist/commonjs/logger.js +8 -0
  73. package/dist/commonjs/logger.js.map +1 -0
  74. package/dist/commonjs/models/index.d.ts +2 -0
  75. package/dist/commonjs/models/index.js +8 -0
  76. package/dist/commonjs/models/index.js.map +1 -0
  77. package/dist/commonjs/models/models.d.ts +59 -0
  78. package/dist/commonjs/models/models.js +73 -0
  79. package/dist/commonjs/models/models.js.map +1 -0
  80. package/dist/commonjs/package.json +3 -0
  81. package/dist/commonjs/static-helpers/urlTemplate.d.ts +5 -0
  82. package/dist/commonjs/static-helpers/urlTemplate.js +172 -0
  83. package/dist/commonjs/static-helpers/urlTemplate.js.map +1 -0
  84. package/dist/commonjs/tsdoc-metadata.json +11 -0
  85. package/dist/esm/api/bicepContext.d.ts +19 -0
  86. package/dist/esm/api/bicepContext.js +38 -0
  87. package/dist/esm/api/bicepContext.js.map +1 -0
  88. package/dist/esm/api/decompileOperationGroup/index.d.ts +3 -0
  89. package/dist/esm/api/decompileOperationGroup/index.js +4 -0
  90. package/dist/esm/api/decompileOperationGroup/index.js.map +1 -0
  91. package/dist/esm/api/decompileOperationGroup/operations.d.ts +9 -0
  92. package/dist/esm/api/decompileOperationGroup/operations.js +37 -0
  93. package/dist/esm/api/decompileOperationGroup/operations.js.map +1 -0
  94. package/dist/esm/api/decompileOperationGroup/options.d.ts +5 -0
  95. package/dist/esm/api/decompileOperationGroup/options.js +4 -0
  96. package/dist/esm/api/decompileOperationGroup/options.js.map +1 -0
  97. package/dist/esm/api/index.d.ts +2 -0
  98. package/dist/esm/api/index.js +4 -0
  99. package/dist/esm/api/index.js.map +1 -0
  100. package/dist/esm/bicepClient.d.ts +15 -0
  101. package/dist/esm/bicepClient.js +25 -0
  102. package/dist/esm/bicepClient.js.map +1 -0
  103. package/dist/esm/classic/decompileOperationGroup/index.d.ts +10 -0
  104. package/dist/esm/classic/decompileOperationGroup/index.js +14 -0
  105. package/dist/esm/classic/decompileOperationGroup/index.js.map +1 -0
  106. package/dist/esm/classic/index.d.ts +2 -0
  107. package/dist/esm/classic/index.js +4 -0
  108. package/dist/esm/classic/index.js.map +1 -0
  109. package/dist/esm/index.d.ts +6 -0
  110. package/dist/esm/index.js +5 -0
  111. package/dist/esm/index.js.map +1 -0
  112. package/dist/esm/logger.d.ts +2 -0
  113. package/dist/esm/logger.js +5 -0
  114. package/dist/esm/logger.js.map +1 -0
  115. package/dist/esm/models/index.d.ts +2 -0
  116. package/dist/esm/models/index.js +4 -0
  117. package/dist/esm/models/index.js.map +1 -0
  118. package/dist/esm/models/models.d.ts +59 -0
  119. package/dist/esm/models/models.js +61 -0
  120. package/dist/esm/models/models.js.map +1 -0
  121. package/dist/esm/package.json +3 -0
  122. package/dist/esm/static-helpers/urlTemplate.d.ts +5 -0
  123. package/dist/esm/static-helpers/urlTemplate.js +169 -0
  124. package/dist/esm/static-helpers/urlTemplate.js.map +1 -0
  125. package/dist/react-native/api/bicepContext.d.ts +19 -0
  126. package/dist/react-native/api/bicepContext.js +38 -0
  127. package/dist/react-native/api/bicepContext.js.map +1 -0
  128. package/dist/react-native/api/decompileOperationGroup/index.d.ts +3 -0
  129. package/dist/react-native/api/decompileOperationGroup/index.js +4 -0
  130. package/dist/react-native/api/decompileOperationGroup/index.js.map +1 -0
  131. package/dist/react-native/api/decompileOperationGroup/operations.d.ts +9 -0
  132. package/dist/react-native/api/decompileOperationGroup/operations.js +37 -0
  133. package/dist/react-native/api/decompileOperationGroup/operations.js.map +1 -0
  134. package/dist/react-native/api/decompileOperationGroup/options.d.ts +5 -0
  135. package/dist/react-native/api/decompileOperationGroup/options.js +4 -0
  136. package/dist/react-native/api/decompileOperationGroup/options.js.map +1 -0
  137. package/dist/react-native/api/index.d.ts +2 -0
  138. package/dist/react-native/api/index.js +4 -0
  139. package/dist/react-native/api/index.js.map +1 -0
  140. package/dist/react-native/bicepClient.d.ts +15 -0
  141. package/dist/react-native/bicepClient.js +25 -0
  142. package/dist/react-native/bicepClient.js.map +1 -0
  143. package/dist/react-native/classic/decompileOperationGroup/index.d.ts +10 -0
  144. package/dist/react-native/classic/decompileOperationGroup/index.js +14 -0
  145. package/dist/react-native/classic/decompileOperationGroup/index.js.map +1 -0
  146. package/dist/react-native/classic/index.d.ts +2 -0
  147. package/dist/react-native/classic/index.js +4 -0
  148. package/dist/react-native/classic/index.js.map +1 -0
  149. package/dist/react-native/index.d.ts +6 -0
  150. package/dist/react-native/index.js +5 -0
  151. package/dist/react-native/index.js.map +1 -0
  152. package/dist/react-native/logger.d.ts +2 -0
  153. package/dist/react-native/logger.js +5 -0
  154. package/dist/react-native/logger.js.map +1 -0
  155. package/dist/react-native/models/index.d.ts +2 -0
  156. package/dist/react-native/models/index.js +4 -0
  157. package/dist/react-native/models/index.js.map +1 -0
  158. package/dist/react-native/models/models.d.ts +59 -0
  159. package/dist/react-native/models/models.js +61 -0
  160. package/dist/react-native/models/models.js.map +1 -0
  161. package/dist/react-native/package.json +3 -0
  162. package/dist/react-native/static-helpers/urlTemplate.d.ts +5 -0
  163. package/dist/react-native/static-helpers/urlTemplate.js +169 -0
  164. package/dist/react-native/static-helpers/urlTemplate.js.map +1 -0
  165. package/package.json +192 -0
  166. package/review/arm-resourcesbicep-api-decompileOperationGroup-node.api.md +19 -0
  167. package/review/arm-resourcesbicep-api-node.api.md +27 -0
  168. package/review/arm-resourcesbicep-models-node.api.md +51 -0
  169. package/review/arm-resourcesbicep-node.api.md +77 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # Release History
2
+
3
+ ## 1.0.0-beta.1 (2025-09-08)
4
+
5
+ ### Features Added
6
+
7
+ Initial release of package @azure/arm-resourcesbicep
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ Copyright (c) Microsoft Corporation.
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,115 @@
1
+ # Azure Bicep client library for JavaScript
2
+
3
+ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure Bicep client.
4
+
5
+ Bicep Client
6
+
7
+ Key links:
8
+
9
+ - [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resources/arm-resourcesbicep)
10
+ - [Package (NPM)](https://www.npmjs.com/package/@azure/arm-resourcesbicep)
11
+ - [API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-resourcesbicep?view=azure-node-preview)
12
+ - [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resources/arm-resourcesbicep/samples)
13
+
14
+ ## Getting started
15
+
16
+ ### Currently supported environments
17
+
18
+ - [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
19
+ - Latest versions of Safari, Chrome, Edge and Firefox.
20
+
21
+ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
22
+
23
+ ### Prerequisites
24
+
25
+ - An [Azure subscription][azure_sub].
26
+
27
+ ### Install the `@azure/arm-resourcesbicep` package
28
+
29
+ Install the Azure Bicep client library for JavaScript with `npm`:
30
+
31
+ ```bash
32
+ npm install @azure/arm-resourcesbicep
33
+ ```
34
+
35
+ ### Create and authenticate a `BicepClient`
36
+
37
+ To create a client object to access the Azure Bicep API, you will need the `endpoint` of your Azure Bicep resource and a `credential`. The Azure Bicep client can use Azure Active Directory credentials to authenticate.
38
+ You can find the endpoint for your Azure Bicep resource in the [Azure Portal][azure_portal].
39
+
40
+ You can authenticate with Azure Active Directory using a credential from the [@azure/identity][azure_identity] library or [an existing AAD Token](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token).
41
+
42
+ To use the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with the Azure SDK, please install the `@azure/identity` package:
43
+
44
+ ```bash
45
+ npm install @azure/identity
46
+ ```
47
+
48
+ You will also need to **register a new AAD application and grant access to Azure Bicep** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions).
49
+
50
+ For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal).
51
+
52
+ Using Node.js and Node-like environments, you can use the `DefaultAzureCredential` class to authenticate the client.
53
+
54
+ ```ts snippet:ReadmeSampleCreateClient_Node
55
+ import { BicepClient } from "@azure/arm-resourcesbicep";
56
+ import { DefaultAzureCredential } from "@azure/identity";
57
+
58
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
59
+ const client = new BicepClient(new DefaultAzureCredential(), subscriptionId);
60
+ ```
61
+
62
+ For browser environments, use the `InteractiveBrowserCredential` from the `@azure/identity` package to authenticate.
63
+
64
+ ```ts snippet:ReadmeSampleCreateClient_Browser
65
+ import { InteractiveBrowserCredential } from "@azure/identity";
66
+ import { BicepClient } from "@azure/arm-resourcesbicep";
67
+
68
+ const credential = new InteractiveBrowserCredential({
69
+ tenantId: "<YOUR_TENANT_ID>",
70
+ clientId: "<YOUR_CLIENT_ID>",
71
+ });
72
+ const subscriptionId = "00000000-0000-0000-0000-000000000000";
73
+ const client = new BicepClient(credential, subscriptionId);
74
+ ```
75
+
76
+
77
+ ### JavaScript Bundle
78
+ To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling).
79
+
80
+ ## Key concepts
81
+
82
+ ### BicepClient
83
+
84
+ `BicepClient` is the primary interface for developers using the Azure Bicep client library. Explore the methods on this client object to understand the different features of the Azure Bicep service that you can access.
85
+
86
+ ## Troubleshooting
87
+
88
+ ### Logging
89
+
90
+ Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
91
+
92
+ ```ts snippet:SetLogLevel
93
+ import { setLogLevel } from "@azure/logger";
94
+
95
+ setLogLevel("info");
96
+ ```
97
+
98
+ For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
99
+
100
+ ## Next steps
101
+
102
+ Please take a look at the [samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/resources/arm-resourcesbicep/samples) directory for detailed examples on how to use this library.
103
+
104
+ ## Contributing
105
+
106
+ If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/main/CONTRIBUTING.md) to learn more about how to build and test the code.
107
+
108
+ ## Related projects
109
+
110
+ - [Microsoft Azure SDK for JavaScript](https://github.com/Azure/azure-sdk-for-js)
111
+
112
+ [azure_sub]: https://azure.microsoft.com/free/
113
+ [azure_portal]: https://portal.azure.com
114
+ [azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity
115
+ [defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential
@@ -0,0 +1,19 @@
1
+ import { Client, ClientOptions } from "@azure-rest/core-client";
2
+ import { TokenCredential } from "@azure/core-auth";
3
+ /** Bicep Client */
4
+ export interface BicepContext extends Client {
5
+ /** The API version to use for this operation. */
6
+ /** Known values of {@link KnownVersions} that the service accepts. */
7
+ apiVersion: string;
8
+ /** The ID of the target subscription. The value must be an UUID. */
9
+ subscriptionId: string;
10
+ }
11
+ /** Optional parameters for the client. */
12
+ export interface BicepClientOptionalParams extends ClientOptions {
13
+ /** The API version to use for this operation. */
14
+ /** Known values of {@link KnownVersions} that the service accepts. */
15
+ apiVersion?: string;
16
+ }
17
+ /** Bicep Client */
18
+ export declare function createBicep(credential: TokenCredential, subscriptionId: string, options?: BicepClientOptionalParams): BicepContext;
19
+ //# sourceMappingURL=bicepContext.d.ts.map
@@ -0,0 +1,38 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { logger } from "../logger.js";
4
+ import { getClient } from "@azure-rest/core-client";
5
+ /** Bicep Client */
6
+ export function createBicep(credential, subscriptionId, options = {}) {
7
+ const endpointUrl = options.endpoint ?? options.baseUrl ?? "https://management.azure.com";
8
+ const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
9
+ const userAgentInfo = `azsdk-js-arm-resourcesbicep/1.0.0-beta.1`;
10
+ const userAgentPrefix = prefixFromOptions
11
+ ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`
12
+ : `azsdk-js-api ${userAgentInfo}`;
13
+ const { apiVersion: _, ...updatedOptions } = {
14
+ ...options,
15
+ userAgentOptions: { userAgentPrefix },
16
+ loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },
17
+ credentials: {
18
+ scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],
19
+ },
20
+ };
21
+ const clientContext = getClient(endpointUrl, credential, updatedOptions);
22
+ clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" });
23
+ const apiVersion = options.apiVersion ?? "2023-11-01";
24
+ clientContext.pipeline.addPolicy({
25
+ name: "ClientApiVersionPolicy",
26
+ sendRequest: (req, next) => {
27
+ // Use the apiVersion defined in request url directly
28
+ // Append one if there is no apiVersion and we have one at client options
29
+ const url = new URL(req.url);
30
+ if (!url.searchParams.get("api-version")) {
31
+ req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${apiVersion}`;
32
+ }
33
+ return next(req);
34
+ },
35
+ });
36
+ return { ...clientContext, apiVersion, subscriptionId };
37
+ }
38
+ //# sourceMappingURL=bicepContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bicepContext.js","sourceRoot":"","sources":["../../../src/api/bicepContext.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAyB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAmB3E,mBAAmB;AACnB,MAAM,UAAU,WAAW,CACzB,UAA2B,EAC3B,cAAsB,EACtB,UAAqC,EAAE;IAEvC,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,OAAO,IAAI,8BAA8B,CAAC;IAC1F,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;IACrE,MAAM,aAAa,GAAG,0CAA0C,CAAC;IACjE,MAAM,eAAe,GAAG,iBAAiB;QACvC,CAAC,CAAC,GAAG,iBAAiB,iBAAiB,aAAa,EAAE;QACtD,CAAC,CAAC,gBAAgB,aAAa,EAAE,CAAC;IACpC,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,GAAG;QAC3C,GAAG,OAAO;QACV,gBAAgB,EAAE,EAAE,eAAe,EAAE;QACrC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE;QACzE,WAAW,EAAE;YACX,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC,GAAG,WAAW,WAAW,CAAC;SACnE;KACF,CAAC;IACF,MAAM,aAAa,GAAG,SAAS,CAAC,WAAW,EAAE,UAAU,EAAE,cAAc,CAAC,CAAC;IACzE,aAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAClE,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACtD,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC;QAC/B,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;gBACzC,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IACH,OAAO,EAAE,GAAG,aAAa,EAAE,UAAU,EAAE,cAAc,EAAkB,CAAC;AAC1E,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { logger } from \"../logger.js\";\nimport { KnownVersions } from \"../models/models.js\";\nimport { Client, ClientOptions, getClient } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\n/** Bicep Client */\nexport interface BicepContext extends Client {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion: string;\n /** The ID of the target subscription. The value must be an UUID. */\n subscriptionId: string;\n}\n\n/** Optional parameters for the client. */\nexport interface BicepClientOptionalParams extends ClientOptions {\n /** The API version to use for this operation. */\n /** Known values of {@link KnownVersions} that the service accepts. */\n apiVersion?: string;\n}\n\n/** Bicep Client */\nexport function createBicep(\n credential: TokenCredential,\n subscriptionId: string,\n options: BicepClientOptionalParams = {},\n): BicepContext {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? \"https://management.azure.com\";\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentInfo = `azsdk-js-arm-resourcesbicep/1.0.0-beta.1`;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-api ${userAgentInfo}`\n : `azsdk-js-api ${userAgentInfo}`;\n const { apiVersion: _, ...updatedOptions } = {\n ...options,\n userAgentOptions: { userAgentPrefix },\n loggingOptions: { logger: options.loggingOptions?.logger ?? logger.info },\n credentials: {\n scopes: options.credentials?.scopes ?? [`${endpointUrl}/.default`],\n },\n };\n const clientContext = getClient(endpointUrl, credential, updatedOptions);\n clientContext.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n const apiVersion = options.apiVersion ?? \"2023-11-01\";\n clientContext.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\")) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n return { ...clientContext, apiVersion, subscriptionId } as BicepContext;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export { bicep } from "./operations.js";
2
+ export { DecompileOperationGroupBicepOptionalParams } from "./options.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export { bicep } from "./operations.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/decompileOperationGroup/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { bicep } from \"./operations.js\";\nexport { DecompileOperationGroupBicepOptionalParams } from \"./options.js\";\n"]}
@@ -0,0 +1,9 @@
1
+ import { BicepContext as Client } from "../index.js";
2
+ import { DecompileOperationRequest, DecompileOperationSuccessResponse } from "../../models/models.js";
3
+ import { DecompileOperationGroupBicepOptionalParams } from "./options.js";
4
+ import { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client";
5
+ export declare function _bicepSend(context: Client, decompileOperationRequest: DecompileOperationRequest, options?: DecompileOperationGroupBicepOptionalParams): StreamableMethod;
6
+ export declare function _bicepDeserialize(result: PathUncheckedResponse): Promise<DecompileOperationSuccessResponse>;
7
+ /** Decompiles an ARM json template into a Bicep template */
8
+ export declare function bicep(context: Client, decompileOperationRequest: DecompileOperationRequest, options?: DecompileOperationGroupBicepOptionalParams): Promise<DecompileOperationSuccessResponse>;
9
+ //# sourceMappingURL=operations.d.ts.map
@@ -0,0 +1,37 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { decompileOperationRequestSerializer, decompileOperationSuccessResponseDeserializer, errorResponseDeserializer, } from "../../models/models.js";
4
+ import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
5
+ import { createRestError, operationOptionsToRequestParameters, } from "@azure-rest/core-client";
6
+ export function _bicepSend(context, decompileOperationRequest, options = { requestOptions: {} }) {
7
+ const path = expandUrlTemplate("/subscriptions/{subscriptionId}/providers/Microsoft.Resources/decompileBicep{?api%2Dversion}", {
8
+ subscriptionId: context.subscriptionId,
9
+ "api%2Dversion": context.apiVersion,
10
+ }, {
11
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
12
+ });
13
+ return context.path(path).post({
14
+ ...operationOptionsToRequestParameters(options),
15
+ contentType: "application/json",
16
+ headers: {
17
+ accept: "application/json",
18
+ ...options.requestOptions?.headers,
19
+ },
20
+ body: decompileOperationRequestSerializer(decompileOperationRequest),
21
+ });
22
+ }
23
+ export async function _bicepDeserialize(result) {
24
+ const expectedStatuses = ["200"];
25
+ if (!expectedStatuses.includes(result.status)) {
26
+ const error = createRestError(result);
27
+ error.details = errorResponseDeserializer(result.body);
28
+ throw error;
29
+ }
30
+ return decompileOperationSuccessResponseDeserializer(result.body);
31
+ }
32
+ /** Decompiles an ARM json template into a Bicep template */
33
+ export async function bicep(context, decompileOperationRequest, options = { requestOptions: {} }) {
34
+ const result = await _bicepSend(context, decompileOperationRequest, options);
35
+ return _bicepDeserialize(result);
36
+ }
37
+ //# sourceMappingURL=operations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../../src/api/decompileOperationGroup/operations.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAEL,mCAAmC,EAEnC,6CAA6C,EAC7C,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAGL,eAAe,EACf,mCAAmC,GACpC,MAAM,yBAAyB,CAAC;AAEjC,MAAM,UAAU,UAAU,CACxB,OAAe,EACf,yBAAoD,EACpD,UAAsD,EAAE,cAAc,EAAE,EAAE,EAAE;IAE5E,MAAM,IAAI,GAAG,iBAAiB,CAC5B,8FAA8F,EAC9F;QACE,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,eAAe,EAAE,OAAO,CAAC,UAAU;KACpC,EACD;QACE,aAAa,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe;KACxD,CACF,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;QAC7B,GAAG,mCAAmC,CAAC,OAAO,CAAC;QAC/C,WAAW,EAAE,kBAAkB;QAC/B,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;YAC1B,GAAG,OAAO,CAAC,cAAc,EAAE,OAAO;SACnC;QACD,IAAI,EAAE,mCAAmC,CAAC,yBAAyB,CAAC;KACrE,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,MAA6B;IAE7B,MAAM,gBAAgB,GAAG,CAAC,KAAK,CAAC,CAAC;IACjC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACtC,KAAK,CAAC,OAAO,GAAG,yBAAyB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC;IACd,CAAC;IAED,OAAO,6CAA6C,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACpE,CAAC;AAED,4DAA4D;AAC5D,MAAM,CAAC,KAAK,UAAU,KAAK,CACzB,OAAe,EACf,yBAAoD,EACpD,UAAsD,EAAE,cAAc,EAAE,EAAE,EAAE;IAE5E,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,EAAE,yBAAyB,EAAE,OAAO,CAAC,CAAC;IAC7E,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { BicepContext as Client } from \"../index.js\";\nimport {\n DecompileOperationRequest,\n decompileOperationRequestSerializer,\n DecompileOperationSuccessResponse,\n decompileOperationSuccessResponseDeserializer,\n errorResponseDeserializer,\n} from \"../../models/models.js\";\nimport { DecompileOperationGroupBicepOptionalParams } from \"./options.js\";\nimport { expandUrlTemplate } from \"../../static-helpers/urlTemplate.js\";\nimport {\n StreamableMethod,\n PathUncheckedResponse,\n createRestError,\n operationOptionsToRequestParameters,\n} from \"@azure-rest/core-client\";\n\nexport function _bicepSend(\n context: Client,\n decompileOperationRequest: DecompileOperationRequest,\n options: DecompileOperationGroupBicepOptionalParams = { requestOptions: {} },\n): StreamableMethod {\n const path = expandUrlTemplate(\n \"/subscriptions/{subscriptionId}/providers/Microsoft.Resources/decompileBicep{?api%2Dversion}\",\n {\n subscriptionId: context.subscriptionId,\n \"api%2Dversion\": context.apiVersion,\n },\n {\n allowReserved: options?.requestOptions?.skipUrlEncoding,\n },\n );\n return context.path(path).post({\n ...operationOptionsToRequestParameters(options),\n contentType: \"application/json\",\n headers: {\n accept: \"application/json\",\n ...options.requestOptions?.headers,\n },\n body: decompileOperationRequestSerializer(decompileOperationRequest),\n });\n}\n\nexport async function _bicepDeserialize(\n result: PathUncheckedResponse,\n): Promise<DecompileOperationSuccessResponse> {\n const expectedStatuses = [\"200\"];\n if (!expectedStatuses.includes(result.status)) {\n const error = createRestError(result);\n error.details = errorResponseDeserializer(result.body);\n throw error;\n }\n\n return decompileOperationSuccessResponseDeserializer(result.body);\n}\n\n/** Decompiles an ARM json template into a Bicep template */\nexport async function bicep(\n context: Client,\n decompileOperationRequest: DecompileOperationRequest,\n options: DecompileOperationGroupBicepOptionalParams = { requestOptions: {} },\n): Promise<DecompileOperationSuccessResponse> {\n const result = await _bicepSend(context, decompileOperationRequest, options);\n return _bicepDeserialize(result);\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { OperationOptions } from "@azure-rest/core-client";
2
+ /** Optional parameters. */
3
+ export interface DecompileOperationGroupBicepOptionalParams extends OperationOptions {
4
+ }
5
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../../src/api/decompileOperationGroup/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OperationOptions } from \"@azure-rest/core-client\";\n\n/** Optional parameters. */\nexport interface DecompileOperationGroupBicepOptionalParams extends OperationOptions {}\n"]}
@@ -0,0 +1,2 @@
1
+ export { createBicep, BicepContext, BicepClientOptionalParams } from "./bicepContext.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export { createBicep } from "./bicepContext.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAA2C,MAAM,mBAAmB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { createBicep, BicepContext, BicepClientOptionalParams } from \"./bicepContext.js\";\n"]}
@@ -0,0 +1,15 @@
1
+ import { BicepClientOptionalParams } from "./api/index.js";
2
+ import { DecompileOperationGroupOperations } from "./classic/decompileOperationGroup/index.js";
3
+ import { Pipeline } from "@azure/core-rest-pipeline";
4
+ import { TokenCredential } from "@azure/core-auth";
5
+ export { BicepClientOptionalParams } from "./api/bicepContext.js";
6
+ export declare class BicepClient {
7
+ private _client;
8
+ /** The pipeline used by this client to make requests */
9
+ readonly pipeline: Pipeline;
10
+ /** Bicep Client */
11
+ constructor(credential: TokenCredential, subscriptionId: string, options?: BicepClientOptionalParams);
12
+ /** The operation groups for decompileOperationGroup */
13
+ readonly decompileOperationGroup: DecompileOperationGroupOperations;
14
+ }
15
+ //# sourceMappingURL=bicepClient.d.ts.map
@@ -0,0 +1,25 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { createBicep } from "./api/index.js";
4
+ import { _getDecompileOperationGroupOperations, } from "./classic/decompileOperationGroup/index.js";
5
+ export class BicepClient {
6
+ _client;
7
+ /** The pipeline used by this client to make requests */
8
+ pipeline;
9
+ /** Bicep Client */
10
+ constructor(credential, subscriptionId, options = {}) {
11
+ const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
12
+ const userAgentPrefix = prefixFromOptions
13
+ ? `${prefixFromOptions} azsdk-js-client`
14
+ : `azsdk-js-client`;
15
+ this._client = createBicep(credential, subscriptionId, {
16
+ ...options,
17
+ userAgentOptions: { userAgentPrefix },
18
+ });
19
+ this.pipeline = this._client.pipeline;
20
+ this.decompileOperationGroup = _getDecompileOperationGroupOperations(this._client);
21
+ }
22
+ /** The operation groups for decompileOperationGroup */
23
+ decompileOperationGroup;
24
+ }
25
+ //# sourceMappingURL=bicepClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bicepClient.js","sourceRoot":"","sources":["../../src/bicepClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAA2C,MAAM,gBAAgB,CAAC;AACtF,OAAO,EAEL,qCAAqC,GACtC,MAAM,4CAA4C,CAAC;AAMpD,MAAM,OAAO,WAAW;IACd,OAAO,CAAe;IAC9B,wDAAwD;IACxC,QAAQ,CAAW;IAEnC,mBAAmB;IACnB,YACE,UAA2B,EAC3B,cAAsB,EACtB,UAAqC,EAAE;QAEvC,MAAM,iBAAiB,GAAG,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC;QACrE,MAAM,eAAe,GAAG,iBAAiB;YACvC,CAAC,CAAC,GAAG,iBAAiB,kBAAkB;YACxC,CAAC,CAAC,iBAAiB,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC,UAAU,EAAE,cAAc,EAAE;YACrD,GAAG,OAAO;YACV,gBAAgB,EAAE,EAAE,eAAe,EAAE;SACtC,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;QACtC,IAAI,CAAC,uBAAuB,GAAG,qCAAqC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrF,CAAC;IAED,uDAAuD;IACvC,uBAAuB,CAAoC;CAC5E","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createBicep, BicepContext, BicepClientOptionalParams } from \"./api/index.js\";\nimport {\n DecompileOperationGroupOperations,\n _getDecompileOperationGroupOperations,\n} from \"./classic/decompileOperationGroup/index.js\";\nimport { Pipeline } from \"@azure/core-rest-pipeline\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport { BicepClientOptionalParams } from \"./api/bicepContext.js\";\n\nexport class BicepClient {\n private _client: BicepContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n /** Bicep Client */\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options: BicepClientOptionalParams = {},\n ) {\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createBicep(credential, subscriptionId, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.decompileOperationGroup = _getDecompileOperationGroupOperations(this._client);\n }\n\n /** The operation groups for decompileOperationGroup */\n public readonly decompileOperationGroup: DecompileOperationGroupOperations;\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import { BicepContext } from "../../api/bicepContext.js";
2
+ import { DecompileOperationRequest, DecompileOperationSuccessResponse } from "../../models/models.js";
3
+ import { DecompileOperationGroupBicepOptionalParams } from "../../api/decompileOperationGroup/options.js";
4
+ /** Interface representing a DecompileOperationGroup operations. */
5
+ export interface DecompileOperationGroupOperations {
6
+ /** Decompiles an ARM json template into a Bicep template */
7
+ bicep: (decompileOperationRequest: DecompileOperationRequest, options?: DecompileOperationGroupBicepOptionalParams) => Promise<DecompileOperationSuccessResponse>;
8
+ }
9
+ export declare function _getDecompileOperationGroupOperations(context: BicepContext): DecompileOperationGroupOperations;
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,14 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { bicep } from "../../api/decompileOperationGroup/operations.js";
4
+ function _getDecompileOperationGroup(context) {
5
+ return {
6
+ bicep: (decompileOperationRequest, options) => bicep(context, decompileOperationRequest, options),
7
+ };
8
+ }
9
+ export function _getDecompileOperationGroupOperations(context) {
10
+ return {
11
+ ..._getDecompileOperationGroup(context),
12
+ };
13
+ }
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/decompileOperationGroup/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAQlC,OAAO,EAAE,KAAK,EAAE,MAAM,iDAAiD,CAAC;AAWxE,SAAS,2BAA2B,CAAC,OAAqB;IACxD,OAAO;QACL,KAAK,EAAE,CACL,yBAAoD,EACpD,OAAoD,EACpD,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,yBAAyB,EAAE,OAAO,CAAC;KACxD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qCAAqC,CACnD,OAAqB;IAErB,OAAO;QACL,GAAG,2BAA2B,CAAC,OAAO,CAAC;KACxC,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { BicepContext } from \"../../api/bicepContext.js\";\nimport {\n DecompileOperationRequest,\n DecompileOperationSuccessResponse,\n} from \"../../models/models.js\";\nimport { DecompileOperationGroupBicepOptionalParams } from \"../../api/decompileOperationGroup/options.js\";\nimport { bicep } from \"../../api/decompileOperationGroup/operations.js\";\n\n/** Interface representing a DecompileOperationGroup operations. */\nexport interface DecompileOperationGroupOperations {\n /** Decompiles an ARM json template into a Bicep template */\n bicep: (\n decompileOperationRequest: DecompileOperationRequest,\n options?: DecompileOperationGroupBicepOptionalParams,\n ) => Promise<DecompileOperationSuccessResponse>;\n}\n\nfunction _getDecompileOperationGroup(context: BicepContext) {\n return {\n bicep: (\n decompileOperationRequest: DecompileOperationRequest,\n options?: DecompileOperationGroupBicepOptionalParams,\n ) => bicep(context, decompileOperationRequest, options),\n };\n}\n\nexport function _getDecompileOperationGroupOperations(\n context: BicepContext,\n): DecompileOperationGroupOperations {\n return {\n ..._getDecompileOperationGroup(context),\n };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export { DecompileOperationGroupOperations } from "./decompileOperationGroup/index.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/classic/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { DecompileOperationGroupOperations } from \"./decompileOperationGroup/index.js\";\n"]}
@@ -0,0 +1,6 @@
1
+ export { BicepClient } from "./bicepClient.js";
2
+ export { DecompileOperationRequest, DecompileOperationSuccessResponse, FileDefinition, ErrorResponse, ErrorDetail, ErrorAdditionalInfo, KnownVersions, } from "./models/index.js";
3
+ export { BicepClientOptionalParams } from "./api/index.js";
4
+ export { DecompileOperationGroupBicepOptionalParams } from "./api/decompileOperationGroup/index.js";
5
+ export { DecompileOperationGroupOperations } from "./classic/index.js";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,5 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export { BicepClient } from "./bicepClient.js";
4
+ export { KnownVersions, } from "./models/index.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAOL,aAAa,GACd,MAAM,mBAAmB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { BicepClient } from \"./bicepClient.js\";\nexport {\n DecompileOperationRequest,\n DecompileOperationSuccessResponse,\n FileDefinition,\n ErrorResponse,\n ErrorDetail,\n ErrorAdditionalInfo,\n KnownVersions,\n} from \"./models/index.js\";\nexport { BicepClientOptionalParams } from \"./api/index.js\";\nexport { DecompileOperationGroupBicepOptionalParams } from \"./api/decompileOperationGroup/index.js\";\nexport { DecompileOperationGroupOperations } from \"./classic/index.js\";\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const logger: import("@azure/logger").AzureLogger;
2
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1,5 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import { createClientLogger } from "@azure/logger";
4
+ export const logger = createClientLogger("arm-resourcesbicep");
5
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,oBAAoB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"arm-resourcesbicep\");\n"]}
@@ -0,0 +1,2 @@
1
+ export { DecompileOperationRequest, DecompileOperationSuccessResponse, FileDefinition, ErrorResponse, ErrorDetail, ErrorAdditionalInfo, KnownVersions, } from "./models.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export { KnownVersions, } from "./models.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAOL,aAAa,GACd,MAAM,aAAa,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport {\n DecompileOperationRequest,\n DecompileOperationSuccessResponse,\n FileDefinition,\n ErrorResponse,\n ErrorDetail,\n ErrorAdditionalInfo,\n KnownVersions,\n} from \"./models.js\";\n"]}
@@ -0,0 +1,59 @@
1
+ /** The body of the request for the decompileBicep operation */
2
+ export interface DecompileOperationRequest {
3
+ /** The ARM json template to be decompiled into a Bicep file */
4
+ template: string;
5
+ }
6
+ export declare function decompileOperationRequestSerializer(item: DecompileOperationRequest): any;
7
+ /** The response of the decompileBicep operation */
8
+ export interface DecompileOperationSuccessResponse {
9
+ /** An array of key-value pairs containing the entryPoint string as the key for the Bicep file decompiled from the ARM json template */
10
+ files: FileDefinition[];
11
+ /** The file path to the main Bicep file generated from the decompiled ARM json template. */
12
+ entryPoint: string;
13
+ }
14
+ export declare function decompileOperationSuccessResponseDeserializer(item: any): DecompileOperationSuccessResponse;
15
+ export declare function fileDefinitionArrayDeserializer(result: Array<FileDefinition>): any[];
16
+ /** The definition of a file along with its contents */
17
+ export interface FileDefinition {
18
+ /** The file path of the Bicep file. */
19
+ path?: string;
20
+ /** The contents of the Bicep file. */
21
+ contents?: string;
22
+ }
23
+ export declare function fileDefinitionDeserializer(item: any): FileDefinition;
24
+ /** Common error response for all Azure Resource Manager APIs to return error details for failed operations. */
25
+ export interface ErrorResponse {
26
+ /** The error object. */
27
+ error?: ErrorDetail;
28
+ }
29
+ export declare function errorResponseDeserializer(item: any): ErrorResponse;
30
+ /** The error detail. */
31
+ export interface ErrorDetail {
32
+ /** The error code. */
33
+ readonly code?: string;
34
+ /** The error message. */
35
+ readonly message?: string;
36
+ /** The error target. */
37
+ readonly target?: string;
38
+ /** The error details. */
39
+ readonly details?: ErrorDetail[];
40
+ /** The error additional info. */
41
+ readonly additionalInfo?: ErrorAdditionalInfo[];
42
+ }
43
+ export declare function errorDetailDeserializer(item: any): ErrorDetail;
44
+ export declare function errorDetailArrayDeserializer(result: Array<ErrorDetail>): any[];
45
+ export declare function errorAdditionalInfoArrayDeserializer(result: Array<ErrorAdditionalInfo>): any[];
46
+ /** The resource management error additional info. */
47
+ export interface ErrorAdditionalInfo {
48
+ /** The additional info type. */
49
+ readonly type?: string;
50
+ /** The additional info. */
51
+ readonly info?: any;
52
+ }
53
+ export declare function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo;
54
+ /** The available API versions. */
55
+ export declare enum KnownVersions {
56
+ /** The 2023-11-01 API version. */
57
+ V20231101 = "2023-11-01"
58
+ }
59
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1,61 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export function decompileOperationRequestSerializer(item) {
4
+ return { template: item["template"] };
5
+ }
6
+ export function decompileOperationSuccessResponseDeserializer(item) {
7
+ return {
8
+ files: fileDefinitionArrayDeserializer(item["files"]),
9
+ entryPoint: item["entryPoint"],
10
+ };
11
+ }
12
+ export function fileDefinitionArrayDeserializer(result) {
13
+ return result.map((item) => {
14
+ return fileDefinitionDeserializer(item);
15
+ });
16
+ }
17
+ export function fileDefinitionDeserializer(item) {
18
+ return {
19
+ path: item["path"],
20
+ contents: item["contents"],
21
+ };
22
+ }
23
+ export function errorResponseDeserializer(item) {
24
+ return {
25
+ error: !item["error"] ? item["error"] : errorDetailDeserializer(item["error"]),
26
+ };
27
+ }
28
+ export function errorDetailDeserializer(item) {
29
+ return {
30
+ code: item["code"],
31
+ message: item["message"],
32
+ target: item["target"],
33
+ details: !item["details"] ? item["details"] : errorDetailArrayDeserializer(item["details"]),
34
+ additionalInfo: !item["additionalInfo"]
35
+ ? item["additionalInfo"]
36
+ : errorAdditionalInfoArrayDeserializer(item["additionalInfo"]),
37
+ };
38
+ }
39
+ export function errorDetailArrayDeserializer(result) {
40
+ return result.map((item) => {
41
+ return errorDetailDeserializer(item);
42
+ });
43
+ }
44
+ export function errorAdditionalInfoArrayDeserializer(result) {
45
+ return result.map((item) => {
46
+ return errorAdditionalInfoDeserializer(item);
47
+ });
48
+ }
49
+ export function errorAdditionalInfoDeserializer(item) {
50
+ return {
51
+ type: item["type"],
52
+ info: item["info"],
53
+ };
54
+ }
55
+ /** The available API versions. */
56
+ export var KnownVersions;
57
+ (function (KnownVersions) {
58
+ /** The 2023-11-01 API version. */
59
+ KnownVersions["V20231101"] = "2023-11-01";
60
+ })(KnownVersions || (KnownVersions = {}));
61
+ //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAQlC,MAAM,UAAU,mCAAmC,CAAC,IAA+B;IACjF,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;AACxC,CAAC;AAUD,MAAM,UAAU,6CAA6C,CAC3D,IAAS;IAET,OAAO;QACL,KAAK,EAAE,+BAA+B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACrD,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC;KAC/B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,+BAA+B,CAAC,MAA6B;IAC3E,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACzB,OAAO,0BAA0B,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC;AAUD,MAAM,UAAU,0BAA0B,CAAC,IAAS;IAClD,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;QAClB,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC;KAC3B,CAAC;AACJ,CAAC;AAQD,MAAM,UAAU,yBAAyB,CAAC,IAAS;IACjD,OAAO;QACL,KAAK,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;KAC/E,CAAC;AACJ,CAAC;AAgBD,MAAM,UAAU,uBAAuB,CAAC,IAAS;IAC/C,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;QAClB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC;QACxB,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC;QACtB,OAAO,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3F,cAAc,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC;YACrC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC;YACxB,CAAC,CAAC,oCAAoC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;KACjE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,MAA0B;IACrE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACzB,OAAO,uBAAuB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,oCAAoC,CAAC,MAAkC;IACrF,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACzB,OAAO,+BAA+B,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;AACL,CAAC;AAUD,MAAM,UAAU,+BAA+B,CAAC,IAAS;IACvD,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;QAClB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;KACnB,CAAC;AACJ,CAAC;AAED,kCAAkC;AAClC,MAAM,CAAN,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,kCAAkC;IAClC,yCAAwB,CAAA;AAC1B,CAAC,EAHW,aAAa,KAAb,aAAa,QAGxB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** The body of the request for the decompileBicep operation */\nexport interface DecompileOperationRequest {\n /** The ARM json template to be decompiled into a Bicep file */\n template: string;\n}\n\nexport function decompileOperationRequestSerializer(item: DecompileOperationRequest): any {\n return { template: item[\"template\"] };\n}\n\n/** The response of the decompileBicep operation */\nexport interface DecompileOperationSuccessResponse {\n /** An array of key-value pairs containing the entryPoint string as the key for the Bicep file decompiled from the ARM json template */\n files: FileDefinition[];\n /** The file path to the main Bicep file generated from the decompiled ARM json template. */\n entryPoint: string;\n}\n\nexport function decompileOperationSuccessResponseDeserializer(\n item: any,\n): DecompileOperationSuccessResponse {\n return {\n files: fileDefinitionArrayDeserializer(item[\"files\"]),\n entryPoint: item[\"entryPoint\"],\n };\n}\n\nexport function fileDefinitionArrayDeserializer(result: Array<FileDefinition>): any[] {\n return result.map((item) => {\n return fileDefinitionDeserializer(item);\n });\n}\n\n/** The definition of a file along with its contents */\nexport interface FileDefinition {\n /** The file path of the Bicep file. */\n path?: string;\n /** The contents of the Bicep file. */\n contents?: string;\n}\n\nexport function fileDefinitionDeserializer(item: any): FileDefinition {\n return {\n path: item[\"path\"],\n contents: item[\"contents\"],\n };\n}\n\n/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. */\nexport interface ErrorResponse {\n /** The error object. */\n error?: ErrorDetail;\n}\n\nexport function errorResponseDeserializer(item: any): ErrorResponse {\n return {\n error: !item[\"error\"] ? item[\"error\"] : errorDetailDeserializer(item[\"error\"]),\n };\n}\n\n/** The error detail. */\nexport interface ErrorDetail {\n /** The error code. */\n readonly code?: string;\n /** The error message. */\n readonly message?: string;\n /** The error target. */\n readonly target?: string;\n /** The error details. */\n readonly details?: ErrorDetail[];\n /** The error additional info. */\n readonly additionalInfo?: ErrorAdditionalInfo[];\n}\n\nexport function errorDetailDeserializer(item: any): ErrorDetail {\n return {\n code: item[\"code\"],\n message: item[\"message\"],\n target: item[\"target\"],\n details: !item[\"details\"] ? item[\"details\"] : errorDetailArrayDeserializer(item[\"details\"]),\n additionalInfo: !item[\"additionalInfo\"]\n ? item[\"additionalInfo\"]\n : errorAdditionalInfoArrayDeserializer(item[\"additionalInfo\"]),\n };\n}\n\nexport function errorDetailArrayDeserializer(result: Array<ErrorDetail>): any[] {\n return result.map((item) => {\n return errorDetailDeserializer(item);\n });\n}\n\nexport function errorAdditionalInfoArrayDeserializer(result: Array<ErrorAdditionalInfo>): any[] {\n return result.map((item) => {\n return errorAdditionalInfoDeserializer(item);\n });\n}\n\n/** The resource management error additional info. */\nexport interface ErrorAdditionalInfo {\n /** The additional info type. */\n readonly type?: string;\n /** The additional info. */\n readonly info?: any;\n}\n\nexport function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo {\n return {\n type: item[\"type\"],\n info: item[\"info\"],\n };\n}\n\n/** The available API versions. */\nexport enum KnownVersions {\n /** The 2023-11-01 API version. */\n V20231101 = \"2023-11-01\",\n}\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,5 @@
1
+ export interface UrlTemplateOptions {
2
+ allowReserved?: boolean;
3
+ }
4
+ export declare function expandUrlTemplate(template: string, context: Record<string, any>, option?: UrlTemplateOptions): string;
5
+ //# sourceMappingURL=urlTemplate.d.ts.map