@azure/arm-storagediscovery 1.0.0-alpha.20250930.1 → 1.0.0

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 (131) hide show
  1. package/dist/browser/api/operations/operations.d.ts +5 -5
  2. package/dist/browser/api/operations/operations.js +2 -2
  3. package/dist/browser/api/operations/operations.js.map +1 -1
  4. package/dist/browser/api/operations/options.d.ts +1 -1
  5. package/dist/browser/api/operations/options.js.map +1 -1
  6. package/dist/browser/api/storageDiscoveryContext.d.ts +5 -2
  7. package/dist/browser/api/storageDiscoveryContext.js +4 -3
  8. package/dist/browser/api/storageDiscoveryContext.js.map +1 -1
  9. package/dist/browser/api/storageDiscoveryWorkspaces/operations.d.ts +5 -5
  10. package/dist/browser/api/storageDiscoveryWorkspaces/operations.js +3 -9
  11. package/dist/browser/api/storageDiscoveryWorkspaces/operations.js.map +1 -1
  12. package/dist/browser/api/storageDiscoveryWorkspaces/options.d.ts +1 -1
  13. package/dist/browser/api/storageDiscoveryWorkspaces/options.js.map +1 -1
  14. package/dist/browser/classic/operations/index.d.ts +4 -4
  15. package/dist/browser/classic/operations/index.js.map +1 -1
  16. package/dist/browser/classic/storageDiscoveryWorkspaces/index.d.ts +4 -4
  17. package/dist/browser/classic/storageDiscoveryWorkspaces/index.js.map +1 -1
  18. package/dist/browser/index.d.ts +2 -0
  19. package/dist/browser/index.js +2 -0
  20. package/dist/browser/index.js.map +1 -1
  21. package/dist/browser/models/models.d.ts +3 -2
  22. package/dist/browser/models/models.js +2 -1
  23. package/dist/browser/models/models.js.map +1 -1
  24. package/dist/browser/static-helpers/cloudSettingHelpers.d.ts +22 -0
  25. package/dist/browser/static-helpers/cloudSettingHelpers.js +38 -0
  26. package/dist/browser/static-helpers/cloudSettingHelpers.js.map +1 -0
  27. package/dist/browser/static-helpers/pagingHelpers.d.ts +1 -1
  28. package/dist/browser/static-helpers/pagingHelpers.js.map +1 -1
  29. package/dist/browser/static-helpers/urlTemplate.js +22 -6
  30. package/dist/browser/static-helpers/urlTemplate.js.map +1 -1
  31. package/dist/browser/storageDiscoveryClient.d.ts +5 -5
  32. package/dist/browser/storageDiscoveryClient.js +2 -2
  33. package/dist/browser/storageDiscoveryClient.js.map +1 -1
  34. package/dist/commonjs/api/operations/operations.d.ts +5 -5
  35. package/dist/commonjs/api/operations/operations.js.map +1 -1
  36. package/dist/commonjs/api/operations/options.d.ts +1 -1
  37. package/dist/commonjs/api/operations/options.js.map +1 -1
  38. package/dist/commonjs/api/storageDiscoveryContext.d.ts +5 -2
  39. package/dist/commonjs/api/storageDiscoveryContext.js +4 -3
  40. package/dist/commonjs/api/storageDiscoveryContext.js.map +1 -1
  41. package/dist/commonjs/api/storageDiscoveryWorkspaces/operations.d.ts +5 -5
  42. package/dist/commonjs/api/storageDiscoveryWorkspaces/operations.js +1 -7
  43. package/dist/commonjs/api/storageDiscoveryWorkspaces/operations.js.map +1 -1
  44. package/dist/commonjs/api/storageDiscoveryWorkspaces/options.d.ts +1 -1
  45. package/dist/commonjs/api/storageDiscoveryWorkspaces/options.js.map +1 -1
  46. package/dist/commonjs/classic/operations/index.d.ts +4 -4
  47. package/dist/commonjs/classic/operations/index.js.map +1 -1
  48. package/dist/commonjs/classic/storageDiscoveryWorkspaces/index.d.ts +4 -4
  49. package/dist/commonjs/classic/storageDiscoveryWorkspaces/index.js.map +1 -1
  50. package/dist/commonjs/index.d.ts +2 -0
  51. package/dist/commonjs/index.js +3 -1
  52. package/dist/commonjs/index.js.map +1 -1
  53. package/dist/commonjs/models/models.d.ts +3 -2
  54. package/dist/commonjs/models/models.js +2 -1
  55. package/dist/commonjs/models/models.js.map +1 -1
  56. package/dist/commonjs/static-helpers/cloudSettingHelpers.d.ts +22 -0
  57. package/dist/commonjs/static-helpers/cloudSettingHelpers.js +42 -0
  58. package/dist/commonjs/static-helpers/cloudSettingHelpers.js.map +1 -0
  59. package/dist/commonjs/static-helpers/pagingHelpers.d.ts +1 -1
  60. package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -1
  61. package/dist/commonjs/static-helpers/urlTemplate.js +22 -6
  62. package/dist/commonjs/static-helpers/urlTemplate.js.map +1 -1
  63. package/dist/commonjs/storageDiscoveryClient.d.ts +5 -5
  64. package/dist/commonjs/storageDiscoveryClient.js.map +1 -1
  65. package/dist/esm/api/operations/operations.d.ts +5 -5
  66. package/dist/esm/api/operations/operations.js +2 -2
  67. package/dist/esm/api/operations/operations.js.map +1 -1
  68. package/dist/esm/api/operations/options.d.ts +1 -1
  69. package/dist/esm/api/operations/options.js.map +1 -1
  70. package/dist/esm/api/storageDiscoveryContext.d.ts +5 -2
  71. package/dist/esm/api/storageDiscoveryContext.js +4 -3
  72. package/dist/esm/api/storageDiscoveryContext.js.map +1 -1
  73. package/dist/esm/api/storageDiscoveryWorkspaces/operations.d.ts +5 -5
  74. package/dist/esm/api/storageDiscoveryWorkspaces/operations.js +3 -9
  75. package/dist/esm/api/storageDiscoveryWorkspaces/operations.js.map +1 -1
  76. package/dist/esm/api/storageDiscoveryWorkspaces/options.d.ts +1 -1
  77. package/dist/esm/api/storageDiscoveryWorkspaces/options.js.map +1 -1
  78. package/dist/esm/classic/operations/index.d.ts +4 -4
  79. package/dist/esm/classic/operations/index.js.map +1 -1
  80. package/dist/esm/classic/storageDiscoveryWorkspaces/index.d.ts +4 -4
  81. package/dist/esm/classic/storageDiscoveryWorkspaces/index.js.map +1 -1
  82. package/dist/esm/index.d.ts +2 -0
  83. package/dist/esm/index.js +2 -0
  84. package/dist/esm/index.js.map +1 -1
  85. package/dist/esm/models/models.d.ts +3 -2
  86. package/dist/esm/models/models.js +2 -1
  87. package/dist/esm/models/models.js.map +1 -1
  88. package/dist/esm/static-helpers/cloudSettingHelpers.d.ts +22 -0
  89. package/dist/esm/static-helpers/cloudSettingHelpers.js +38 -0
  90. package/dist/esm/static-helpers/cloudSettingHelpers.js.map +1 -0
  91. package/dist/esm/static-helpers/pagingHelpers.d.ts +1 -1
  92. package/dist/esm/static-helpers/pagingHelpers.js.map +1 -1
  93. package/dist/esm/static-helpers/urlTemplate.js +22 -6
  94. package/dist/esm/static-helpers/urlTemplate.js.map +1 -1
  95. package/dist/esm/storageDiscoveryClient.d.ts +5 -5
  96. package/dist/esm/storageDiscoveryClient.js +2 -2
  97. package/dist/esm/storageDiscoveryClient.js.map +1 -1
  98. package/dist/react-native/api/operations/operations.d.ts +5 -5
  99. package/dist/react-native/api/operations/operations.js +2 -2
  100. package/dist/react-native/api/operations/operations.js.map +1 -1
  101. package/dist/react-native/api/operations/options.d.ts +1 -1
  102. package/dist/react-native/api/operations/options.js.map +1 -1
  103. package/dist/react-native/api/storageDiscoveryContext.d.ts +5 -2
  104. package/dist/react-native/api/storageDiscoveryContext.js +4 -3
  105. package/dist/react-native/api/storageDiscoveryContext.js.map +1 -1
  106. package/dist/react-native/api/storageDiscoveryWorkspaces/operations.d.ts +5 -5
  107. package/dist/react-native/api/storageDiscoveryWorkspaces/operations.js +3 -9
  108. package/dist/react-native/api/storageDiscoveryWorkspaces/operations.js.map +1 -1
  109. package/dist/react-native/api/storageDiscoveryWorkspaces/options.d.ts +1 -1
  110. package/dist/react-native/api/storageDiscoveryWorkspaces/options.js.map +1 -1
  111. package/dist/react-native/classic/operations/index.d.ts +4 -4
  112. package/dist/react-native/classic/operations/index.js.map +1 -1
  113. package/dist/react-native/classic/storageDiscoveryWorkspaces/index.d.ts +4 -4
  114. package/dist/react-native/classic/storageDiscoveryWorkspaces/index.js.map +1 -1
  115. package/dist/react-native/index.d.ts +2 -0
  116. package/dist/react-native/index.js +2 -0
  117. package/dist/react-native/index.js.map +1 -1
  118. package/dist/react-native/models/models.d.ts +3 -2
  119. package/dist/react-native/models/models.js +2 -1
  120. package/dist/react-native/models/models.js.map +1 -1
  121. package/dist/react-native/static-helpers/cloudSettingHelpers.d.ts +22 -0
  122. package/dist/react-native/static-helpers/cloudSettingHelpers.js +38 -0
  123. package/dist/react-native/static-helpers/cloudSettingHelpers.js.map +1 -0
  124. package/dist/react-native/static-helpers/pagingHelpers.d.ts +1 -1
  125. package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -1
  126. package/dist/react-native/static-helpers/urlTemplate.js +22 -6
  127. package/dist/react-native/static-helpers/urlTemplate.js.map +1 -1
  128. package/dist/react-native/storageDiscoveryClient.d.ts +5 -5
  129. package/dist/react-native/storageDiscoveryClient.js +2 -2
  130. package/dist/react-native/storageDiscoveryClient.js.map +1 -1
  131. package/package.json +35 -34
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/operations/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAoBlC,4DAIC;AAnBD,sEAA0D;AAS1D,SAAS,cAAc,CAAC,OAAgC;IACtD,OAAO;QACL,IAAI,EAAE,CAAC,OAAsC,EAAE,EAAE,CAAC,IAAA,oBAAI,EAAC,OAAO,EAAE,OAAO,CAAC;KACzE,CAAC;AACJ,CAAC;AAED,SAAgB,wBAAwB,CAAC,OAAgC;IACvE,OAAO;QACL,GAAG,cAAc,CAAC,OAAO,CAAC;KAC3B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { StorageDiscoveryContext } from \"../../api/storageDiscoveryContext.js\";\nimport { Operation } from \"../../models/models.js\";\nimport { OperationsListOptionalParams } from \"../../api/operations/options.js\";\nimport { list } from \"../../api/operations/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a Operations operations. */\nexport interface OperationsOperations {\n /** List the operations for the provider */\n list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator<Operation>;\n}\n\nfunction _getOperations(context: StorageDiscoveryContext) {\n return {\n list: (options?: OperationsListOptionalParams) => list(context, options),\n };\n}\n\nexport function _getOperationsOperations(context: StorageDiscoveryContext): OperationsOperations {\n return {\n ..._getOperations(context),\n };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/operations/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAoBlC,4DAIC;AArBD,sEAA0D;AAW1D,SAAS,cAAc,CAAC,OAAgC;IACtD,OAAO;QACL,IAAI,EAAE,CAAC,OAAsC,EAAE,EAAE,CAAC,IAAA,oBAAI,EAAC,OAAO,EAAE,OAAO,CAAC;KACzE,CAAC;AACJ,CAAC;AAED,SAAgB,wBAAwB,CAAC,OAAgC;IACvE,OAAO;QACL,GAAG,cAAc,CAAC,OAAO,CAAC;KAC3B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { StorageDiscoveryContext } from \"../../api/storageDiscoveryContext.js\";\nimport { list } from \"../../api/operations/operations.js\";\nimport type { OperationsListOptionalParams } from \"../../api/operations/options.js\";\nimport type { Operation } from \"../../models/models.js\";\nimport type { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a Operations operations. */\nexport interface OperationsOperations {\n /** List the operations for the provider */\n list: (options?: OperationsListOptionalParams) => PagedAsyncIterableIterator<Operation>;\n}\n\nfunction _getOperations(context: StorageDiscoveryContext) {\n return {\n list: (options?: OperationsListOptionalParams) => list(context, options),\n };\n}\n\nexport function _getOperationsOperations(context: StorageDiscoveryContext): OperationsOperations {\n return {\n ..._getOperations(context),\n };\n}\n"]}
@@ -1,7 +1,7 @@
1
- import { StorageDiscoveryContext } from "../../api/storageDiscoveryContext.js";
2
- import { StorageDiscoveryWorkspace, StorageDiscoveryWorkspaceUpdate } from "../../models/models.js";
3
- import { StorageDiscoveryWorkspacesListBySubscriptionOptionalParams, StorageDiscoveryWorkspacesListByResourceGroupOptionalParams, StorageDiscoveryWorkspacesDeleteOptionalParams, StorageDiscoveryWorkspacesUpdateOptionalParams, StorageDiscoveryWorkspacesCreateOrUpdateOptionalParams, StorageDiscoveryWorkspacesGetOptionalParams } from "../../api/storageDiscoveryWorkspaces/options.js";
4
- import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
1
+ import type { StorageDiscoveryContext } from "../../api/storageDiscoveryContext.js";
2
+ import type { StorageDiscoveryWorkspacesListBySubscriptionOptionalParams, StorageDiscoveryWorkspacesListByResourceGroupOptionalParams, StorageDiscoveryWorkspacesDeleteOptionalParams, StorageDiscoveryWorkspacesUpdateOptionalParams, StorageDiscoveryWorkspacesCreateOrUpdateOptionalParams, StorageDiscoveryWorkspacesGetOptionalParams } from "../../api/storageDiscoveryWorkspaces/options.js";
3
+ import type { StorageDiscoveryWorkspace, StorageDiscoveryWorkspaceUpdate } from "../../models/models.js";
4
+ import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
5
5
  /** Interface representing a StorageDiscoveryWorkspaces operations. */
6
6
  export interface StorageDiscoveryWorkspacesOperations {
7
7
  /** List StorageDiscoveryWorkspace resources by subscription ID */
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/storageDiscoveryWorkspaces/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAoGlC,4FAMC;AA9FD,sFAO4D;AA+C5D,SAAS,8BAA8B,CAAC,OAAgC;IACtE,OAAO;QACL,kBAAkB,EAAE,CAAC,OAAoE,EAAE,EAAE,CAC3F,IAAA,kCAAkB,EAAC,OAAO,EAAE,OAAO,CAAC;QACtC,mBAAmB,EAAE,CACnB,iBAAyB,EACzB,OAAqE,EACrE,EAAE,CAAC,IAAA,mCAAmB,EAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,CAAC;QAC7D,MAAM,EAAE,CACN,iBAAyB,EACzB,6BAAqC,EACrC,OAAwD,EACxD,EAAE,CAAC,IAAA,uBAAO,EAAC,OAAO,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,OAAO,CAAC;QAChF,MAAM,EAAE,CACN,iBAAyB,EACzB,6BAAqC,EACrC,UAA2C,EAC3C,OAAwD,EACxD,EAAE,CAAC,IAAA,sBAAM,EAAC,OAAO,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,UAAU,EAAE,OAAO,CAAC;QAC3F,cAAc,EAAE,CACd,iBAAyB,EACzB,6BAAqC,EACrC,QAAmC,EACnC,OAAgE,EAChE,EAAE,CACF,IAAA,8BAAc,EAAC,OAAO,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,QAAQ,EAAE,OAAO,CAAC;QAC9F,GAAG,EAAE,CACH,iBAAyB,EACzB,6BAAqC,EACrC,OAAqD,EACrD,EAAE,CAAC,IAAA,mBAAG,EAAC,OAAO,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,OAAO,CAAC;KAC7E,CAAC;AACJ,CAAC;AAED,SAAgB,wCAAwC,CACtD,OAAgC;IAEhC,OAAO;QACL,GAAG,8BAA8B,CAAC,OAAO,CAAC;KAC3C,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { StorageDiscoveryContext } from \"../../api/storageDiscoveryContext.js\";\nimport { StorageDiscoveryWorkspace, StorageDiscoveryWorkspaceUpdate } from \"../../models/models.js\";\nimport {\n StorageDiscoveryWorkspacesListBySubscriptionOptionalParams,\n StorageDiscoveryWorkspacesListByResourceGroupOptionalParams,\n StorageDiscoveryWorkspacesDeleteOptionalParams,\n StorageDiscoveryWorkspacesUpdateOptionalParams,\n StorageDiscoveryWorkspacesCreateOrUpdateOptionalParams,\n StorageDiscoveryWorkspacesGetOptionalParams,\n} from \"../../api/storageDiscoveryWorkspaces/options.js\";\nimport {\n listBySubscription,\n listByResourceGroup,\n $delete,\n update,\n createOrUpdate,\n get,\n} from \"../../api/storageDiscoveryWorkspaces/operations.js\";\nimport { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a StorageDiscoveryWorkspaces operations. */\nexport interface StorageDiscoveryWorkspacesOperations {\n /** List StorageDiscoveryWorkspace resources by subscription ID */\n listBySubscription: (\n options?: StorageDiscoveryWorkspacesListBySubscriptionOptionalParams,\n ) => PagedAsyncIterableIterator<StorageDiscoveryWorkspace>;\n /** List StorageDiscoveryWorkspace resources by resource group */\n listByResourceGroup: (\n resourceGroupName: string,\n options?: StorageDiscoveryWorkspacesListByResourceGroupOptionalParams,\n ) => PagedAsyncIterableIterator<StorageDiscoveryWorkspace>;\n /** Delete a StorageDiscoveryWorkspace */\n /**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\n delete: (\n resourceGroupName: string,\n storageDiscoveryWorkspaceName: string,\n options?: StorageDiscoveryWorkspacesDeleteOptionalParams,\n ) => Promise<void>;\n /** Update a StorageDiscoveryWorkspace */\n update: (\n resourceGroupName: string,\n storageDiscoveryWorkspaceName: string,\n properties: StorageDiscoveryWorkspaceUpdate,\n options?: StorageDiscoveryWorkspacesUpdateOptionalParams,\n ) => Promise<StorageDiscoveryWorkspace>;\n /** Create a StorageDiscoveryWorkspace */\n createOrUpdate: (\n resourceGroupName: string,\n storageDiscoveryWorkspaceName: string,\n resource: StorageDiscoveryWorkspace,\n options?: StorageDiscoveryWorkspacesCreateOrUpdateOptionalParams,\n ) => Promise<StorageDiscoveryWorkspace>;\n /** Get a StorageDiscoveryWorkspace */\n get: (\n resourceGroupName: string,\n storageDiscoveryWorkspaceName: string,\n options?: StorageDiscoveryWorkspacesGetOptionalParams,\n ) => Promise<StorageDiscoveryWorkspace>;\n}\n\nfunction _getStorageDiscoveryWorkspaces(context: StorageDiscoveryContext) {\n return {\n listBySubscription: (options?: StorageDiscoveryWorkspacesListBySubscriptionOptionalParams) =>\n listBySubscription(context, options),\n listByResourceGroup: (\n resourceGroupName: string,\n options?: StorageDiscoveryWorkspacesListByResourceGroupOptionalParams,\n ) => listByResourceGroup(context, resourceGroupName, options),\n delete: (\n resourceGroupName: string,\n storageDiscoveryWorkspaceName: string,\n options?: StorageDiscoveryWorkspacesDeleteOptionalParams,\n ) => $delete(context, resourceGroupName, storageDiscoveryWorkspaceName, options),\n update: (\n resourceGroupName: string,\n storageDiscoveryWorkspaceName: string,\n properties: StorageDiscoveryWorkspaceUpdate,\n options?: StorageDiscoveryWorkspacesUpdateOptionalParams,\n ) => update(context, resourceGroupName, storageDiscoveryWorkspaceName, properties, options),\n createOrUpdate: (\n resourceGroupName: string,\n storageDiscoveryWorkspaceName: string,\n resource: StorageDiscoveryWorkspace,\n options?: StorageDiscoveryWorkspacesCreateOrUpdateOptionalParams,\n ) =>\n createOrUpdate(context, resourceGroupName, storageDiscoveryWorkspaceName, resource, options),\n get: (\n resourceGroupName: string,\n storageDiscoveryWorkspaceName: string,\n options?: StorageDiscoveryWorkspacesGetOptionalParams,\n ) => get(context, resourceGroupName, storageDiscoveryWorkspaceName, options),\n };\n}\n\nexport function _getStorageDiscoveryWorkspacesOperations(\n context: StorageDiscoveryContext,\n): StorageDiscoveryWorkspacesOperations {\n return {\n ..._getStorageDiscoveryWorkspaces(context),\n };\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/classic/storageDiscoveryWorkspaces/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAuGlC,4FAMC;AA1GD,sFAO4D;AA2D5D,SAAS,8BAA8B,CAAC,OAAgC;IACtE,OAAO;QACL,kBAAkB,EAAE,CAAC,OAAoE,EAAE,EAAE,CAC3F,IAAA,kCAAkB,EAAC,OAAO,EAAE,OAAO,CAAC;QACtC,mBAAmB,EAAE,CACnB,iBAAyB,EACzB,OAAqE,EACrE,EAAE,CAAC,IAAA,mCAAmB,EAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,CAAC;QAC7D,MAAM,EAAE,CACN,iBAAyB,EACzB,6BAAqC,EACrC,OAAwD,EACxD,EAAE,CAAC,IAAA,uBAAO,EAAC,OAAO,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,OAAO,CAAC;QAChF,MAAM,EAAE,CACN,iBAAyB,EACzB,6BAAqC,EACrC,UAA2C,EAC3C,OAAwD,EACxD,EAAE,CAAC,IAAA,sBAAM,EAAC,OAAO,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,UAAU,EAAE,OAAO,CAAC;QAC3F,cAAc,EAAE,CACd,iBAAyB,EACzB,6BAAqC,EACrC,QAAmC,EACnC,OAAgE,EAChE,EAAE,CACF,IAAA,8BAAc,EAAC,OAAO,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,QAAQ,EAAE,OAAO,CAAC;QAC9F,GAAG,EAAE,CACH,iBAAyB,EACzB,6BAAqC,EACrC,OAAqD,EACrD,EAAE,CAAC,IAAA,mBAAG,EAAC,OAAO,EAAE,iBAAiB,EAAE,6BAA6B,EAAE,OAAO,CAAC;KAC7E,CAAC;AACJ,CAAC;AAED,SAAgB,wCAAwC,CACtD,OAAgC;IAEhC,OAAO;QACL,GAAG,8BAA8B,CAAC,OAAO,CAAC;KAC3C,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { StorageDiscoveryContext } from \"../../api/storageDiscoveryContext.js\";\nimport {\n listBySubscription,\n listByResourceGroup,\n $delete,\n update,\n createOrUpdate,\n get,\n} from \"../../api/storageDiscoveryWorkspaces/operations.js\";\nimport type {\n StorageDiscoveryWorkspacesListBySubscriptionOptionalParams,\n StorageDiscoveryWorkspacesListByResourceGroupOptionalParams,\n StorageDiscoveryWorkspacesDeleteOptionalParams,\n StorageDiscoveryWorkspacesUpdateOptionalParams,\n StorageDiscoveryWorkspacesCreateOrUpdateOptionalParams,\n StorageDiscoveryWorkspacesGetOptionalParams,\n} from \"../../api/storageDiscoveryWorkspaces/options.js\";\nimport type {\n StorageDiscoveryWorkspace,\n StorageDiscoveryWorkspaceUpdate,\n} from \"../../models/models.js\";\nimport type { PagedAsyncIterableIterator } from \"../../static-helpers/pagingHelpers.js\";\n\n/** Interface representing a StorageDiscoveryWorkspaces operations. */\nexport interface StorageDiscoveryWorkspacesOperations {\n /** List StorageDiscoveryWorkspace resources by subscription ID */\n listBySubscription: (\n options?: StorageDiscoveryWorkspacesListBySubscriptionOptionalParams,\n ) => PagedAsyncIterableIterator<StorageDiscoveryWorkspace>;\n /** List StorageDiscoveryWorkspace resources by resource group */\n listByResourceGroup: (\n resourceGroupName: string,\n options?: StorageDiscoveryWorkspacesListByResourceGroupOptionalParams,\n ) => PagedAsyncIterableIterator<StorageDiscoveryWorkspace>;\n /** Delete a StorageDiscoveryWorkspace */\n /**\n * @fixme delete is a reserved word that cannot be used as an operation name.\n * Please add @clientName(\"clientName\") or @clientName(\"<JS-Specific-Name>\", \"javascript\")\n * to the operation to override the generated name.\n */\n delete: (\n resourceGroupName: string,\n storageDiscoveryWorkspaceName: string,\n options?: StorageDiscoveryWorkspacesDeleteOptionalParams,\n ) => Promise<void>;\n /** Update a StorageDiscoveryWorkspace */\n update: (\n resourceGroupName: string,\n storageDiscoveryWorkspaceName: string,\n properties: StorageDiscoveryWorkspaceUpdate,\n options?: StorageDiscoveryWorkspacesUpdateOptionalParams,\n ) => Promise<StorageDiscoveryWorkspace>;\n /** Create a StorageDiscoveryWorkspace */\n createOrUpdate: (\n resourceGroupName: string,\n storageDiscoveryWorkspaceName: string,\n resource: StorageDiscoveryWorkspace,\n options?: StorageDiscoveryWorkspacesCreateOrUpdateOptionalParams,\n ) => Promise<StorageDiscoveryWorkspace>;\n /** Get a StorageDiscoveryWorkspace */\n get: (\n resourceGroupName: string,\n storageDiscoveryWorkspaceName: string,\n options?: StorageDiscoveryWorkspacesGetOptionalParams,\n ) => Promise<StorageDiscoveryWorkspace>;\n}\n\nfunction _getStorageDiscoveryWorkspaces(context: StorageDiscoveryContext) {\n return {\n listBySubscription: (options?: StorageDiscoveryWorkspacesListBySubscriptionOptionalParams) =>\n listBySubscription(context, options),\n listByResourceGroup: (\n resourceGroupName: string,\n options?: StorageDiscoveryWorkspacesListByResourceGroupOptionalParams,\n ) => listByResourceGroup(context, resourceGroupName, options),\n delete: (\n resourceGroupName: string,\n storageDiscoveryWorkspaceName: string,\n options?: StorageDiscoveryWorkspacesDeleteOptionalParams,\n ) => $delete(context, resourceGroupName, storageDiscoveryWorkspaceName, options),\n update: (\n resourceGroupName: string,\n storageDiscoveryWorkspaceName: string,\n properties: StorageDiscoveryWorkspaceUpdate,\n options?: StorageDiscoveryWorkspacesUpdateOptionalParams,\n ) => update(context, resourceGroupName, storageDiscoveryWorkspaceName, properties, options),\n createOrUpdate: (\n resourceGroupName: string,\n storageDiscoveryWorkspaceName: string,\n resource: StorageDiscoveryWorkspace,\n options?: StorageDiscoveryWorkspacesCreateOrUpdateOptionalParams,\n ) =>\n createOrUpdate(context, resourceGroupName, storageDiscoveryWorkspaceName, resource, options),\n get: (\n resourceGroupName: string,\n storageDiscoveryWorkspaceName: string,\n options?: StorageDiscoveryWorkspacesGetOptionalParams,\n ) => get(context, resourceGroupName, storageDiscoveryWorkspaceName, options),\n };\n}\n\nexport function _getStorageDiscoveryWorkspacesOperations(\n context: StorageDiscoveryContext,\n): StorageDiscoveryWorkspacesOperations {\n return {\n ..._getStorageDiscoveryWorkspaces(context),\n };\n}\n"]}
@@ -1,3 +1,4 @@
1
+ import { AzureClouds, AzureSupportedClouds } from "./static-helpers/cloudSettingHelpers.js";
1
2
  import { PageSettings, ContinuablePage, PagedAsyncIterableIterator } from "./static-helpers/pagingHelpers.js";
2
3
  export { StorageDiscoveryClient } from "./storageDiscoveryClient.js";
3
4
  export { StorageDiscoveryWorkspace, StorageDiscoveryWorkspaceProperties, KnownStorageDiscoverySku, StorageDiscoverySku, StorageDiscoveryScope, KnownStorageDiscoveryResourceType, StorageDiscoveryResourceType, KnownResourceProvisioningState, ResourceProvisioningState, TrackedResource, Resource, SystemData, KnownCreatedByType, CreatedByType, ErrorResponse, ErrorDetail, ErrorAdditionalInfo, StorageDiscoveryWorkspaceUpdate, StorageDiscoveryWorkspacePropertiesUpdate, Operation, OperationDisplay, KnownOrigin, Origin, KnownActionType, ActionType, KnownApiVersion, } from "./models/index.js";
@@ -6,4 +7,5 @@ export { OperationsListOptionalParams } from "./api/operations/index.js";
6
7
  export { StorageDiscoveryWorkspacesListBySubscriptionOptionalParams, StorageDiscoveryWorkspacesListByResourceGroupOptionalParams, StorageDiscoveryWorkspacesDeleteOptionalParams, StorageDiscoveryWorkspacesUpdateOptionalParams, StorageDiscoveryWorkspacesCreateOrUpdateOptionalParams, StorageDiscoveryWorkspacesGetOptionalParams, } from "./api/storageDiscoveryWorkspaces/index.js";
7
8
  export { OperationsOperations, StorageDiscoveryWorkspacesOperations } from "./classic/index.js";
8
9
  export { PageSettings, ContinuablePage, PagedAsyncIterableIterator };
10
+ export { AzureClouds, AzureSupportedClouds };
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -2,7 +2,9 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT License.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.KnownApiVersion = exports.KnownActionType = exports.KnownOrigin = exports.KnownCreatedByType = exports.KnownResourceProvisioningState = exports.KnownStorageDiscoveryResourceType = exports.KnownStorageDiscoverySku = exports.StorageDiscoveryClient = void 0;
5
+ exports.AzureClouds = exports.KnownApiVersion = exports.KnownActionType = exports.KnownOrigin = exports.KnownCreatedByType = exports.KnownResourceProvisioningState = exports.KnownStorageDiscoveryResourceType = exports.KnownStorageDiscoverySku = exports.StorageDiscoveryClient = void 0;
6
+ const cloudSettingHelpers_js_1 = require("./static-helpers/cloudSettingHelpers.js");
7
+ Object.defineProperty(exports, "AzureClouds", { enumerable: true, get: function () { return cloudSettingHelpers_js_1.AzureClouds; } });
6
8
  var storageDiscoveryClient_js_1 = require("./storageDiscoveryClient.js");
7
9
  Object.defineProperty(exports, "StorageDiscoveryClient", { enumerable: true, get: function () { return storageDiscoveryClient_js_1.StorageDiscoveryClient; } });
8
10
  var index_js_1 = require("./models/index.js");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAQlC,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAC/B,8CA2B2B;AAxBzB,oHAAA,wBAAwB,OAAA;AAGxB,6HAAA,iCAAiC,OAAA;AAEjC,0HAAA,8BAA8B,OAAA;AAK9B,8GAAA,kBAAkB,OAAA;AASlB,uGAAA,WAAW,OAAA;AAEX,2GAAA,eAAe,OAAA;AAEf,2GAAA,eAAe,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n PageSettings,\n ContinuablePage,\n PagedAsyncIterableIterator,\n} from \"./static-helpers/pagingHelpers.js\";\n\nexport { StorageDiscoveryClient } from \"./storageDiscoveryClient.js\";\nexport {\n StorageDiscoveryWorkspace,\n StorageDiscoveryWorkspaceProperties,\n KnownStorageDiscoverySku,\n StorageDiscoverySku,\n StorageDiscoveryScope,\n KnownStorageDiscoveryResourceType,\n StorageDiscoveryResourceType,\n KnownResourceProvisioningState,\n ResourceProvisioningState,\n TrackedResource,\n Resource,\n SystemData,\n KnownCreatedByType,\n CreatedByType,\n ErrorResponse,\n ErrorDetail,\n ErrorAdditionalInfo,\n StorageDiscoveryWorkspaceUpdate,\n StorageDiscoveryWorkspacePropertiesUpdate,\n Operation,\n OperationDisplay,\n KnownOrigin,\n Origin,\n KnownActionType,\n ActionType,\n KnownApiVersion,\n} from \"./models/index.js\";\nexport { StorageDiscoveryClientOptionalParams } from \"./api/index.js\";\nexport { OperationsListOptionalParams } from \"./api/operations/index.js\";\nexport {\n StorageDiscoveryWorkspacesListBySubscriptionOptionalParams,\n StorageDiscoveryWorkspacesListByResourceGroupOptionalParams,\n StorageDiscoveryWorkspacesDeleteOptionalParams,\n StorageDiscoveryWorkspacesUpdateOptionalParams,\n StorageDiscoveryWorkspacesCreateOrUpdateOptionalParams,\n StorageDiscoveryWorkspacesGetOptionalParams,\n} from \"./api/storageDiscoveryWorkspaces/index.js\";\nexport { OperationsOperations, StorageDiscoveryWorkspacesOperations } from \"./classic/index.js\";\nexport { PageSettings, ContinuablePage, PagedAsyncIterableIterator };\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,oFAA4F;AAgDnF,4FAhDA,oCAAW,OAgDA;AAzCpB,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAC/B,8CA2B2B;AAxBzB,oHAAA,wBAAwB,OAAA;AAGxB,6HAAA,iCAAiC,OAAA;AAEjC,0HAAA,8BAA8B,OAAA;AAK9B,8GAAA,kBAAkB,OAAA;AASlB,uGAAA,WAAW,OAAA;AAEX,2GAAA,eAAe,OAAA;AAEf,2GAAA,eAAe,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AzureClouds, AzureSupportedClouds } from \"./static-helpers/cloudSettingHelpers.js\";\nimport {\n PageSettings,\n ContinuablePage,\n PagedAsyncIterableIterator,\n} from \"./static-helpers/pagingHelpers.js\";\n\nexport { StorageDiscoveryClient } from \"./storageDiscoveryClient.js\";\nexport {\n StorageDiscoveryWorkspace,\n StorageDiscoveryWorkspaceProperties,\n KnownStorageDiscoverySku,\n StorageDiscoverySku,\n StorageDiscoveryScope,\n KnownStorageDiscoveryResourceType,\n StorageDiscoveryResourceType,\n KnownResourceProvisioningState,\n ResourceProvisioningState,\n TrackedResource,\n Resource,\n SystemData,\n KnownCreatedByType,\n CreatedByType,\n ErrorResponse,\n ErrorDetail,\n ErrorAdditionalInfo,\n StorageDiscoveryWorkspaceUpdate,\n StorageDiscoveryWorkspacePropertiesUpdate,\n Operation,\n OperationDisplay,\n KnownOrigin,\n Origin,\n KnownActionType,\n ActionType,\n KnownApiVersion,\n} from \"./models/index.js\";\nexport { StorageDiscoveryClientOptionalParams } from \"./api/index.js\";\nexport { OperationsListOptionalParams } from \"./api/operations/index.js\";\nexport {\n StorageDiscoveryWorkspacesListBySubscriptionOptionalParams,\n StorageDiscoveryWorkspacesListByResourceGroupOptionalParams,\n StorageDiscoveryWorkspacesDeleteOptionalParams,\n StorageDiscoveryWorkspacesUpdateOptionalParams,\n StorageDiscoveryWorkspacesCreateOrUpdateOptionalParams,\n StorageDiscoveryWorkspacesGetOptionalParams,\n} from \"./api/storageDiscoveryWorkspaces/index.js\";\nexport { OperationsOperations, StorageDiscoveryWorkspacesOperations } from \"./classic/index.js\";\nexport { PageSettings, ContinuablePage, PagedAsyncIterableIterator };\nexport { AzureClouds, AzureSupportedClouds };\n"]}
@@ -134,7 +134,7 @@ export declare enum KnownCreatedByType {
134
134
  }
135
135
  /**
136
136
  * The kind of entity that created the resource. \
137
- * {@link KnownCreatedByType} can be used interchangeably with createdByType,
137
+ * {@link KnownCreatedByType} can be used interchangeably with CreatedByType,
138
138
  * this enum contains the known values that the service supports.
139
139
  * ### Known values supported by the service
140
140
  * **User**: The entity was created by a user. \
@@ -272,6 +272,7 @@ export declare enum KnownActionType {
272
272
  export type ActionType = string;
273
273
  /** Known values of {@link ApiVersion} that the service accepts. */
274
274
  export declare enum KnownApiVersion {
275
- V20250601Preview = "2025-06-01-preview"
275
+ /** 2025-09-01 */
276
+ V20250901 = "2025-09-01"
276
277
  }
277
278
  //# sourceMappingURL=models.d.ts.map
@@ -304,6 +304,7 @@ var KnownActionType;
304
304
  /** Known values of {@link ApiVersion} that the service accepts. */
305
305
  var KnownApiVersion;
306
306
  (function (KnownApiVersion) {
307
- KnownApiVersion["V20250601Preview"] = "2025-06-01-preview";
307
+ /** 2025-09-01 */
308
+ KnownApiVersion["V20250901"] = "2025-09-01";
308
309
  })(KnownApiVersion || (exports.KnownApiVersion = KnownApiVersion = {}));
309
310
  //# sourceMappingURL=models.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":";AAAA,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AC,IAAS;IAC7C,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC;QAClB,YAAY,EAAE,IAAI,CAAC,cAAc,CAAC;QAClC,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,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC;QACtB,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC;KAC/B,CAAC;AACJ,CAAC;AAcD,SAAgB,4BAA4B,CAAC,IAAS;IACpD,OAAO;QACL,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC;QAC1B,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC;QAC1B,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC;QAC5B,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC;KACjC,CAAC;AACJ,CAAC;AAED,2IAA2I;AAC3I,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,sDAAsD;IACtD,4BAAa,CAAA;IACb,wDAAwD;IACxD,gCAAiB,CAAA;IACjB,gEAAgE;IAChE,yCAA0B,CAAA;AAC5B,CAAC,EAPW,WAAW,2BAAX,WAAW,QAOtB;AAaD,gHAAgH;AAChH,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,0CAA0C;IAC1C,wCAAqB,CAAA;AACvB,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B;AAWD,mEAAmE;AACnE,IAAY,eAEX;AAFD,WAAY,eAAe;IACzB,0DAAuC,CAAA;AACzC,CAAC,EAFW,eAAe,+BAAf,eAAe,QAE1B","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** A Storage Discovery Workspace resource. This resource configures the collection of storage account metrics. */\nexport interface StorageDiscoveryWorkspace extends TrackedResource {\n /** The resource-specific properties for this resource. */\n properties?: StorageDiscoveryWorkspaceProperties;\n}\n\nexport function storageDiscoveryWorkspaceSerializer(item: StorageDiscoveryWorkspace): any {\n return {\n tags: item[\"tags\"],\n location: item[\"location\"],\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : storageDiscoveryWorkspacePropertiesSerializer(item[\"properties\"]),\n };\n}\n\nexport function storageDiscoveryWorkspaceDeserializer(item: any): StorageDiscoveryWorkspace {\n return {\n tags: item[\"tags\"],\n location: item[\"location\"],\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : storageDiscoveryWorkspacePropertiesDeserializer(item[\"properties\"]),\n };\n}\n\n/** Storage Discovery Workspace Properties */\nexport interface StorageDiscoveryWorkspaceProperties {\n /** The storage discovery sku */\n sku?: StorageDiscoverySku;\n /** The description of the storage discovery workspace */\n description?: string;\n /** The view level storage discovery data estate */\n workspaceRoots: string[];\n /** The scopes of the storage discovery workspace. */\n scopes: StorageDiscoveryScope[];\n /** The status of the last operation. */\n readonly provisioningState?: ResourceProvisioningState;\n}\n\nexport function storageDiscoveryWorkspacePropertiesSerializer(\n item: StorageDiscoveryWorkspaceProperties,\n): any {\n return {\n sku: item[\"sku\"],\n description: item[\"description\"],\n workspaceRoots: item[\"workspaceRoots\"].map((p: any) => {\n return p;\n }),\n scopes: storageDiscoveryScopeArraySerializer(item[\"scopes\"]),\n };\n}\n\nexport function storageDiscoveryWorkspacePropertiesDeserializer(\n item: any,\n): StorageDiscoveryWorkspaceProperties {\n return {\n sku: item[\"sku\"],\n description: item[\"description\"],\n workspaceRoots: item[\"workspaceRoots\"].map((p: any) => {\n return p;\n }),\n scopes: storageDiscoveryScopeArrayDeserializer(item[\"scopes\"]),\n provisioningState: item[\"provisioningState\"],\n };\n}\n\n/** Storage Discovery Sku */\nexport enum KnownStorageDiscoverySku {\n /** Standard Sku */\n Standard = \"Standard\",\n /** Free Sku */\n Free = \"Free\",\n}\n\n/**\n * Storage Discovery Sku \\\n * {@link KnownStorageDiscoverySku} can be used interchangeably with StorageDiscoverySku,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Standard**: Standard Sku \\\n * **Free**: Free Sku\n */\nexport type StorageDiscoverySku = string;\n\nexport function storageDiscoveryScopeArraySerializer(result: Array<StorageDiscoveryScope>): any[] {\n return result.map((item) => {\n return storageDiscoveryScopeSerializer(item);\n });\n}\n\nexport function storageDiscoveryScopeArrayDeserializer(\n result: Array<StorageDiscoveryScope>,\n): any[] {\n return result.map((item) => {\n return storageDiscoveryScopeDeserializer(item);\n });\n}\n\n/** Storage Discovery Scope. This had added validations */\nexport interface StorageDiscoveryScope {\n /** Display name of the collection */\n displayName: string;\n /** Resource types for the collection */\n resourceTypes: StorageDiscoveryResourceType[];\n /** The storage account tags keys to filter */\n tagKeysOnly?: string[];\n /** Resource tags. */\n tags?: Record<string, string>;\n}\n\nexport function storageDiscoveryScopeSerializer(item: StorageDiscoveryScope): any {\n return {\n displayName: item[\"displayName\"],\n resourceTypes: item[\"resourceTypes\"].map((p: any) => {\n return p;\n }),\n tagKeysOnly: !item[\"tagKeysOnly\"]\n ? item[\"tagKeysOnly\"]\n : item[\"tagKeysOnly\"].map((p: any) => {\n return p;\n }),\n tags: item[\"tags\"],\n };\n}\n\nexport function storageDiscoveryScopeDeserializer(item: any): StorageDiscoveryScope {\n return {\n displayName: item[\"displayName\"],\n resourceTypes: item[\"resourceTypes\"].map((p: any) => {\n return p;\n }),\n tagKeysOnly: !item[\"tagKeysOnly\"]\n ? item[\"tagKeysOnly\"]\n : item[\"tagKeysOnly\"].map((p: any) => {\n return p;\n }),\n tags: item[\"tags\"],\n };\n}\n\n/** Storage Discovery Resource Type */\nexport enum KnownStorageDiscoveryResourceType {\n /** Storage Account Resource Type */\n StorageAccounts = \"Microsoft.Storage/storageAccounts\",\n}\n\n/**\n * Storage Discovery Resource Type \\\n * {@link KnownStorageDiscoveryResourceType} can be used interchangeably with StorageDiscoveryResourceType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Microsoft.Storage\\/storageAccounts**: Storage Account Resource Type\n */\nexport type StorageDiscoveryResourceType = string;\n\n/** The provisioning state of a resource type. */\nexport enum KnownResourceProvisioningState {\n /** Resource has been created. */\n Succeeded = \"Succeeded\",\n /** Resource creation failed. */\n Failed = \"Failed\",\n /** Resource creation was canceled. */\n Canceled = \"Canceled\",\n}\n\n/**\n * The provisioning state of a resource type. \\\n * {@link KnownResourceProvisioningState} can be used interchangeably with ResourceProvisioningState,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Succeeded**: Resource has been created. \\\n * **Failed**: Resource creation failed. \\\n * **Canceled**: Resource creation was canceled.\n */\nexport type ResourceProvisioningState = string;\n\n/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */\nexport interface TrackedResource extends Resource {\n /** Resource tags. */\n tags?: Record<string, string>;\n /** The geo-location where the resource lives */\n location: string;\n}\n\nexport function trackedResourceSerializer(item: TrackedResource): any {\n return { tags: item[\"tags\"], location: item[\"location\"] };\n}\n\nexport function trackedResourceDeserializer(item: any): TrackedResource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n tags: item[\"tags\"],\n location: item[\"location\"],\n };\n}\n\n/** Common fields that are returned in the response for all Azure Resource Manager resources */\nexport interface Resource {\n /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */\n readonly id?: string;\n /** The name of the resource */\n readonly name?: string;\n /** The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\" */\n readonly type?: string;\n /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */\n readonly systemData?: SystemData;\n}\n\nexport function resourceSerializer(item: Resource): any {\n return item;\n}\n\nexport function resourceDeserializer(item: any): Resource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n };\n}\n\n/** Metadata pertaining to creation and last modification of the resource. */\nexport interface SystemData {\n /** The identity that created the resource. */\n createdBy?: string;\n /** The type of identity that created the resource. */\n createdByType?: CreatedByType;\n /** The timestamp of resource creation (UTC). */\n createdAt?: Date;\n /** The identity that last modified the resource. */\n lastModifiedBy?: string;\n /** The type of identity that last modified the resource. */\n lastModifiedByType?: CreatedByType;\n /** The timestamp of resource last modification (UTC) */\n lastModifiedAt?: Date;\n}\n\nexport function systemDataDeserializer(item: any): SystemData {\n return {\n createdBy: item[\"createdBy\"],\n createdByType: item[\"createdByType\"],\n createdAt: !item[\"createdAt\"] ? item[\"createdAt\"] : new Date(item[\"createdAt\"]),\n lastModifiedBy: item[\"lastModifiedBy\"],\n lastModifiedByType: item[\"lastModifiedByType\"],\n lastModifiedAt: !item[\"lastModifiedAt\"]\n ? item[\"lastModifiedAt\"]\n : new Date(item[\"lastModifiedAt\"]),\n };\n}\n\n/** The kind of entity that created the resource. */\nexport enum KnownCreatedByType {\n /** The entity was created by a user. */\n User = \"User\",\n /** The entity was created by an application. */\n Application = \"Application\",\n /** The entity was created by a managed identity. */\n ManagedIdentity = \"ManagedIdentity\",\n /** The entity was created by a key. */\n Key = \"Key\",\n}\n\n/**\n * The kind of entity that created the resource. \\\n * {@link KnownCreatedByType} can be used interchangeably with createdByType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **User**: The entity was created by a user. \\\n * **Application**: The entity was created by an application. \\\n * **ManagedIdentity**: The entity was created by a managed identity. \\\n * **Key**: The entity was created by a key.\n */\nexport type CreatedByType = string;\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 template for adding updateable properties. */\nexport interface StorageDiscoveryWorkspaceUpdate {\n /** Resource tags. */\n tags?: Record<string, string>;\n /** The resource-specific properties for this resource. */\n properties?: StorageDiscoveryWorkspacePropertiesUpdate;\n}\n\nexport function storageDiscoveryWorkspaceUpdateSerializer(\n item: StorageDiscoveryWorkspaceUpdate,\n): any {\n return {\n tags: item[\"tags\"],\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : storageDiscoveryWorkspacePropertiesUpdateSerializer(item[\"properties\"]),\n };\n}\n\n/** The template for adding updateable properties. */\nexport interface StorageDiscoveryWorkspacePropertiesUpdate {\n /** The storage discovery sku */\n sku?: StorageDiscoverySku;\n /** The description of the storage discovery workspace */\n description?: string;\n /** The view level storage discovery data estate */\n workspaceRoots?: string[];\n /** The scopes of the storage discovery workspace. */\n scopes?: StorageDiscoveryScope[];\n}\n\nexport function storageDiscoveryWorkspacePropertiesUpdateSerializer(\n item: StorageDiscoveryWorkspacePropertiesUpdate,\n): any {\n return {\n sku: item[\"sku\"],\n description: item[\"description\"],\n workspaceRoots: !item[\"workspaceRoots\"]\n ? item[\"workspaceRoots\"]\n : item[\"workspaceRoots\"].map((p: any) => {\n return p;\n }),\n scopes: !item[\"scopes\"] ? item[\"scopes\"] : storageDiscoveryScopeArraySerializer(item[\"scopes\"]),\n };\n}\n\n/** The response of a StorageDiscoveryWorkspace list operation. */\nexport interface _StorageDiscoveryWorkspaceListResult {\n /** The StorageDiscoveryWorkspace items on this page */\n value: StorageDiscoveryWorkspace[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _storageDiscoveryWorkspaceListResultDeserializer(\n item: any,\n): _StorageDiscoveryWorkspaceListResult {\n return {\n value: storageDiscoveryWorkspaceArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function storageDiscoveryWorkspaceArraySerializer(\n result: Array<StorageDiscoveryWorkspace>,\n): any[] {\n return result.map((item) => {\n return storageDiscoveryWorkspaceSerializer(item);\n });\n}\n\nexport function storageDiscoveryWorkspaceArrayDeserializer(\n result: Array<StorageDiscoveryWorkspace>,\n): any[] {\n return result.map((item) => {\n return storageDiscoveryWorkspaceDeserializer(item);\n });\n}\n\n/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */\nexport interface _OperationListResult {\n /** The Operation items on this page */\n value: Operation[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _operationListResultDeserializer(item: any): _OperationListResult {\n return {\n value: operationArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function operationArrayDeserializer(result: Array<Operation>): any[] {\n return result.map((item) => {\n return operationDeserializer(item);\n });\n}\n\n/** Details of a REST API operation, returned from the Resource Provider Operations API */\nexport interface Operation {\n /** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\" */\n readonly name?: string;\n /** Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations. */\n readonly isDataAction?: boolean;\n /** Localized display information for this particular operation. */\n display?: OperationDisplay;\n /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" */\n readonly origin?: Origin;\n /** Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. */\n readonly actionType?: ActionType;\n}\n\nexport function operationDeserializer(item: any): Operation {\n return {\n name: item[\"name\"],\n isDataAction: item[\"isDataAction\"],\n display: !item[\"display\"] ? item[\"display\"] : operationDisplayDeserializer(item[\"display\"]),\n origin: item[\"origin\"],\n actionType: item[\"actionType\"],\n };\n}\n\n/** Localized display information for and operation. */\nexport interface OperationDisplay {\n /** The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\". */\n readonly provider?: string;\n /** The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\". */\n readonly resource?: string;\n /** The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\". */\n readonly operation?: string;\n /** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */\n readonly description?: string;\n}\n\nexport function operationDisplayDeserializer(item: any): OperationDisplay {\n return {\n provider: item[\"provider\"],\n resource: item[\"resource\"],\n operation: item[\"operation\"],\n description: item[\"description\"],\n };\n}\n\n/** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" */\nexport enum KnownOrigin {\n /** Indicates the operation is initiated by a user. */\n User = \"user\",\n /** Indicates the operation is initiated by a system. */\n System = \"system\",\n /** Indicates the operation is initiated by a user or system. */\n UserSystem = \"user,system\",\n}\n\n/**\n * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" \\\n * {@link KnownOrigin} can be used interchangeably with Origin,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **user**: Indicates the operation is initiated by a user. \\\n * **system**: Indicates the operation is initiated by a system. \\\n * **user,system**: Indicates the operation is initiated by a user or system.\n */\nexport type Origin = string;\n\n/** Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. */\nexport enum KnownActionType {\n /** Actions are for internal-only APIs. */\n Internal = \"Internal\",\n}\n\n/**\n * Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. \\\n * {@link KnownActionType} can be used interchangeably with ActionType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Internal**: Actions are for internal-only APIs.\n */\nexport type ActionType = string;\n\n/** Known values of {@link ApiVersion} that the service accepts. */\nexport enum KnownApiVersion {\n V20250601Preview = \"2025-06-01-preview\",\n}\n"]}
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAQlC,kFAQC;AAED,sFAcC;AAgBD,sGAWC;AAED,0GAYC;AAoBD,oFAIC;AAED,wFAMC;AAcD,0EAaC;AAED,8EAaC;AA8CD,8DAEC;AAED,kEAWC;AAcD,gDAEC;AAED,oDASC;AAkBD,wDAWC;AAgCD,8DAIC;AAgBD,0DAUC;AAED,oEAIC;AAED,oFAIC;AAUD,0EAKC;AAUD,8FASC;AAcD,kHAaC;AAUD,4GAOC;AAED,4FAMC;AAED,gGAMC;AAUD,4EAKC;AAED,gEAIC;AAgBD,sDAQC;AAcD,oEAOC;AA1eD,SAAgB,mCAAmC,CAAC,IAA+B;IACj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QACL,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC;QAC1B,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC;QAC1B,SAAS,EAAE,IAAI,CAAC,WAAW,CAAC;QAC5B,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC;KACjC,CAAC;AACJ,CAAC;AAED,2IAA2I;AAC3I,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,sDAAsD;IACtD,4BAAa,CAAA;IACb,wDAAwD;IACxD,gCAAiB,CAAA;IACjB,gEAAgE;IAChE,yCAA0B,CAAA;AAC5B,CAAC,EAPW,WAAW,2BAAX,WAAW,QAOtB;AAaD,gHAAgH;AAChH,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,0CAA0C;IAC1C,wCAAqB,CAAA;AACvB,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B;AAWD,mEAAmE;AACnE,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,iBAAiB;IACjB,2CAAwB,CAAA;AAC1B,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** A Storage Discovery Workspace resource. This resource configures the collection of storage account metrics. */\nexport interface StorageDiscoveryWorkspace extends TrackedResource {\n /** The resource-specific properties for this resource. */\n properties?: StorageDiscoveryWorkspaceProperties;\n}\n\nexport function storageDiscoveryWorkspaceSerializer(item: StorageDiscoveryWorkspace): any {\n return {\n tags: item[\"tags\"],\n location: item[\"location\"],\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : storageDiscoveryWorkspacePropertiesSerializer(item[\"properties\"]),\n };\n}\n\nexport function storageDiscoveryWorkspaceDeserializer(item: any): StorageDiscoveryWorkspace {\n return {\n tags: item[\"tags\"],\n location: item[\"location\"],\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : storageDiscoveryWorkspacePropertiesDeserializer(item[\"properties\"]),\n };\n}\n\n/** Storage Discovery Workspace Properties */\nexport interface StorageDiscoveryWorkspaceProperties {\n /** The storage discovery sku */\n sku?: StorageDiscoverySku;\n /** The description of the storage discovery workspace */\n description?: string;\n /** The view level storage discovery data estate */\n workspaceRoots: string[];\n /** The scopes of the storage discovery workspace. */\n scopes: StorageDiscoveryScope[];\n /** The status of the last operation. */\n readonly provisioningState?: ResourceProvisioningState;\n}\n\nexport function storageDiscoveryWorkspacePropertiesSerializer(\n item: StorageDiscoveryWorkspaceProperties,\n): any {\n return {\n sku: item[\"sku\"],\n description: item[\"description\"],\n workspaceRoots: item[\"workspaceRoots\"].map((p: any) => {\n return p;\n }),\n scopes: storageDiscoveryScopeArraySerializer(item[\"scopes\"]),\n };\n}\n\nexport function storageDiscoveryWorkspacePropertiesDeserializer(\n item: any,\n): StorageDiscoveryWorkspaceProperties {\n return {\n sku: item[\"sku\"],\n description: item[\"description\"],\n workspaceRoots: item[\"workspaceRoots\"].map((p: any) => {\n return p;\n }),\n scopes: storageDiscoveryScopeArrayDeserializer(item[\"scopes\"]),\n provisioningState: item[\"provisioningState\"],\n };\n}\n\n/** Storage Discovery Sku */\nexport enum KnownStorageDiscoverySku {\n /** Standard Sku */\n Standard = \"Standard\",\n /** Free Sku */\n Free = \"Free\",\n}\n\n/**\n * Storage Discovery Sku \\\n * {@link KnownStorageDiscoverySku} can be used interchangeably with StorageDiscoverySku,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Standard**: Standard Sku \\\n * **Free**: Free Sku\n */\nexport type StorageDiscoverySku = string;\n\nexport function storageDiscoveryScopeArraySerializer(result: Array<StorageDiscoveryScope>): any[] {\n return result.map((item) => {\n return storageDiscoveryScopeSerializer(item);\n });\n}\n\nexport function storageDiscoveryScopeArrayDeserializer(\n result: Array<StorageDiscoveryScope>,\n): any[] {\n return result.map((item) => {\n return storageDiscoveryScopeDeserializer(item);\n });\n}\n\n/** Storage Discovery Scope. This had added validations */\nexport interface StorageDiscoveryScope {\n /** Display name of the collection */\n displayName: string;\n /** Resource types for the collection */\n resourceTypes: StorageDiscoveryResourceType[];\n /** The storage account tags keys to filter */\n tagKeysOnly?: string[];\n /** Resource tags. */\n tags?: Record<string, string>;\n}\n\nexport function storageDiscoveryScopeSerializer(item: StorageDiscoveryScope): any {\n return {\n displayName: item[\"displayName\"],\n resourceTypes: item[\"resourceTypes\"].map((p: any) => {\n return p;\n }),\n tagKeysOnly: !item[\"tagKeysOnly\"]\n ? item[\"tagKeysOnly\"]\n : item[\"tagKeysOnly\"].map((p: any) => {\n return p;\n }),\n tags: item[\"tags\"],\n };\n}\n\nexport function storageDiscoveryScopeDeserializer(item: any): StorageDiscoveryScope {\n return {\n displayName: item[\"displayName\"],\n resourceTypes: item[\"resourceTypes\"].map((p: any) => {\n return p;\n }),\n tagKeysOnly: !item[\"tagKeysOnly\"]\n ? item[\"tagKeysOnly\"]\n : item[\"tagKeysOnly\"].map((p: any) => {\n return p;\n }),\n tags: item[\"tags\"],\n };\n}\n\n/** Storage Discovery Resource Type */\nexport enum KnownStorageDiscoveryResourceType {\n /** Storage Account Resource Type */\n StorageAccounts = \"Microsoft.Storage/storageAccounts\",\n}\n\n/**\n * Storage Discovery Resource Type \\\n * {@link KnownStorageDiscoveryResourceType} can be used interchangeably with StorageDiscoveryResourceType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Microsoft.Storage\\/storageAccounts**: Storage Account Resource Type\n */\nexport type StorageDiscoveryResourceType = string;\n\n/** The provisioning state of a resource type. */\nexport enum KnownResourceProvisioningState {\n /** Resource has been created. */\n Succeeded = \"Succeeded\",\n /** Resource creation failed. */\n Failed = \"Failed\",\n /** Resource creation was canceled. */\n Canceled = \"Canceled\",\n}\n\n/**\n * The provisioning state of a resource type. \\\n * {@link KnownResourceProvisioningState} can be used interchangeably with ResourceProvisioningState,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Succeeded**: Resource has been created. \\\n * **Failed**: Resource creation failed. \\\n * **Canceled**: Resource creation was canceled.\n */\nexport type ResourceProvisioningState = string;\n\n/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */\nexport interface TrackedResource extends Resource {\n /** Resource tags. */\n tags?: Record<string, string>;\n /** The geo-location where the resource lives */\n location: string;\n}\n\nexport function trackedResourceSerializer(item: TrackedResource): any {\n return { tags: item[\"tags\"], location: item[\"location\"] };\n}\n\nexport function trackedResourceDeserializer(item: any): TrackedResource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n tags: item[\"tags\"],\n location: item[\"location\"],\n };\n}\n\n/** Common fields that are returned in the response for all Azure Resource Manager resources */\nexport interface Resource {\n /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */\n readonly id?: string;\n /** The name of the resource */\n readonly name?: string;\n /** The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\" */\n readonly type?: string;\n /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */\n readonly systemData?: SystemData;\n}\n\nexport function resourceSerializer(item: Resource): any {\n return item;\n}\n\nexport function resourceDeserializer(item: any): Resource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n };\n}\n\n/** Metadata pertaining to creation and last modification of the resource. */\nexport interface SystemData {\n /** The identity that created the resource. */\n createdBy?: string;\n /** The type of identity that created the resource. */\n createdByType?: CreatedByType;\n /** The timestamp of resource creation (UTC). */\n createdAt?: Date;\n /** The identity that last modified the resource. */\n lastModifiedBy?: string;\n /** The type of identity that last modified the resource. */\n lastModifiedByType?: CreatedByType;\n /** The timestamp of resource last modification (UTC) */\n lastModifiedAt?: Date;\n}\n\nexport function systemDataDeserializer(item: any): SystemData {\n return {\n createdBy: item[\"createdBy\"],\n createdByType: item[\"createdByType\"],\n createdAt: !item[\"createdAt\"] ? item[\"createdAt\"] : new Date(item[\"createdAt\"]),\n lastModifiedBy: item[\"lastModifiedBy\"],\n lastModifiedByType: item[\"lastModifiedByType\"],\n lastModifiedAt: !item[\"lastModifiedAt\"]\n ? item[\"lastModifiedAt\"]\n : new Date(item[\"lastModifiedAt\"]),\n };\n}\n\n/** The kind of entity that created the resource. */\nexport enum KnownCreatedByType {\n /** The entity was created by a user. */\n User = \"User\",\n /** The entity was created by an application. */\n Application = \"Application\",\n /** The entity was created by a managed identity. */\n ManagedIdentity = \"ManagedIdentity\",\n /** The entity was created by a key. */\n Key = \"Key\",\n}\n\n/**\n * The kind of entity that created the resource. \\\n * {@link KnownCreatedByType} can be used interchangeably with CreatedByType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **User**: The entity was created by a user. \\\n * **Application**: The entity was created by an application. \\\n * **ManagedIdentity**: The entity was created by a managed identity. \\\n * **Key**: The entity was created by a key.\n */\nexport type CreatedByType = string;\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 template for adding updateable properties. */\nexport interface StorageDiscoveryWorkspaceUpdate {\n /** Resource tags. */\n tags?: Record<string, string>;\n /** The resource-specific properties for this resource. */\n properties?: StorageDiscoveryWorkspacePropertiesUpdate;\n}\n\nexport function storageDiscoveryWorkspaceUpdateSerializer(\n item: StorageDiscoveryWorkspaceUpdate,\n): any {\n return {\n tags: item[\"tags\"],\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : storageDiscoveryWorkspacePropertiesUpdateSerializer(item[\"properties\"]),\n };\n}\n\n/** The template for adding updateable properties. */\nexport interface StorageDiscoveryWorkspacePropertiesUpdate {\n /** The storage discovery sku */\n sku?: StorageDiscoverySku;\n /** The description of the storage discovery workspace */\n description?: string;\n /** The view level storage discovery data estate */\n workspaceRoots?: string[];\n /** The scopes of the storage discovery workspace. */\n scopes?: StorageDiscoveryScope[];\n}\n\nexport function storageDiscoveryWorkspacePropertiesUpdateSerializer(\n item: StorageDiscoveryWorkspacePropertiesUpdate,\n): any {\n return {\n sku: item[\"sku\"],\n description: item[\"description\"],\n workspaceRoots: !item[\"workspaceRoots\"]\n ? item[\"workspaceRoots\"]\n : item[\"workspaceRoots\"].map((p: any) => {\n return p;\n }),\n scopes: !item[\"scopes\"] ? item[\"scopes\"] : storageDiscoveryScopeArraySerializer(item[\"scopes\"]),\n };\n}\n\n/** The response of a StorageDiscoveryWorkspace list operation. */\nexport interface _StorageDiscoveryWorkspaceListResult {\n /** The StorageDiscoveryWorkspace items on this page */\n value: StorageDiscoveryWorkspace[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _storageDiscoveryWorkspaceListResultDeserializer(\n item: any,\n): _StorageDiscoveryWorkspaceListResult {\n return {\n value: storageDiscoveryWorkspaceArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function storageDiscoveryWorkspaceArraySerializer(\n result: Array<StorageDiscoveryWorkspace>,\n): any[] {\n return result.map((item) => {\n return storageDiscoveryWorkspaceSerializer(item);\n });\n}\n\nexport function storageDiscoveryWorkspaceArrayDeserializer(\n result: Array<StorageDiscoveryWorkspace>,\n): any[] {\n return result.map((item) => {\n return storageDiscoveryWorkspaceDeserializer(item);\n });\n}\n\n/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */\nexport interface _OperationListResult {\n /** The Operation items on this page */\n value: Operation[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _operationListResultDeserializer(item: any): _OperationListResult {\n return {\n value: operationArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function operationArrayDeserializer(result: Array<Operation>): any[] {\n return result.map((item) => {\n return operationDeserializer(item);\n });\n}\n\n/** Details of a REST API operation, returned from the Resource Provider Operations API */\nexport interface Operation {\n /** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\" */\n readonly name?: string;\n /** Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations. */\n readonly isDataAction?: boolean;\n /** Localized display information for this particular operation. */\n display?: OperationDisplay;\n /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" */\n readonly origin?: Origin;\n /** Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. */\n readonly actionType?: ActionType;\n}\n\nexport function operationDeserializer(item: any): Operation {\n return {\n name: item[\"name\"],\n isDataAction: item[\"isDataAction\"],\n display: !item[\"display\"] ? item[\"display\"] : operationDisplayDeserializer(item[\"display\"]),\n origin: item[\"origin\"],\n actionType: item[\"actionType\"],\n };\n}\n\n/** Localized display information for and operation. */\nexport interface OperationDisplay {\n /** The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\". */\n readonly provider?: string;\n /** The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\". */\n readonly resource?: string;\n /** The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\". */\n readonly operation?: string;\n /** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */\n readonly description?: string;\n}\n\nexport function operationDisplayDeserializer(item: any): OperationDisplay {\n return {\n provider: item[\"provider\"],\n resource: item[\"resource\"],\n operation: item[\"operation\"],\n description: item[\"description\"],\n };\n}\n\n/** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" */\nexport enum KnownOrigin {\n /** Indicates the operation is initiated by a user. */\n User = \"user\",\n /** Indicates the operation is initiated by a system. */\n System = \"system\",\n /** Indicates the operation is initiated by a user or system. */\n UserSystem = \"user,system\",\n}\n\n/**\n * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" \\\n * {@link KnownOrigin} can be used interchangeably with Origin,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **user**: Indicates the operation is initiated by a user. \\\n * **system**: Indicates the operation is initiated by a system. \\\n * **user,system**: Indicates the operation is initiated by a user or system.\n */\nexport type Origin = string;\n\n/** Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. */\nexport enum KnownActionType {\n /** Actions are for internal-only APIs. */\n Internal = \"Internal\",\n}\n\n/**\n * Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. \\\n * {@link KnownActionType} can be used interchangeably with ActionType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Internal**: Actions are for internal-only APIs.\n */\nexport type ActionType = string;\n\n/** Known values of {@link ApiVersion} that the service accepts. */\nexport enum KnownApiVersion {\n /** 2025-09-01 */\n V20250901 = \"2025-09-01\",\n}\n"]}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * An enum to describe Azure Cloud environments.
3
+ * @enum {string}
4
+ */
5
+ export declare enum AzureClouds {
6
+ /** Azure public cloud, which is the default cloud for Azure SDKs. */
7
+ AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD",
8
+ /** Azure China cloud */
9
+ AZURE_CHINA_CLOUD = "AZURE_CHINA_CLOUD",
10
+ /** Azure US government cloud */
11
+ AZURE_US_GOVERNMENT = "AZURE_US_GOVERNMENT"
12
+ }
13
+ /** The supported values for cloud setting as a string literal type */
14
+ export type AzureSupportedClouds = `${AzureClouds}`;
15
+ /**
16
+ * Gets the Azure Resource Manager endpoint URL for the specified cloud setting.
17
+ * @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values.
18
+ * @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined.
19
+ * @throws {Error} Throws an error if an unknown cloud setting is provided.
20
+ */
21
+ export declare function getArmEndpoint(cloudSetting?: AzureSupportedClouds): string | undefined;
22
+ //# sourceMappingURL=cloudSettingHelpers.d.ts.map
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.AzureClouds = void 0;
6
+ exports.getArmEndpoint = getArmEndpoint;
7
+ /**
8
+ * An enum to describe Azure Cloud environments.
9
+ * @enum {string}
10
+ */
11
+ var AzureClouds;
12
+ (function (AzureClouds) {
13
+ /** Azure public cloud, which is the default cloud for Azure SDKs. */
14
+ AzureClouds["AZURE_PUBLIC_CLOUD"] = "AZURE_PUBLIC_CLOUD";
15
+ /** Azure China cloud */
16
+ AzureClouds["AZURE_CHINA_CLOUD"] = "AZURE_CHINA_CLOUD";
17
+ /** Azure US government cloud */
18
+ AzureClouds["AZURE_US_GOVERNMENT"] = "AZURE_US_GOVERNMENT";
19
+ })(AzureClouds || (exports.AzureClouds = AzureClouds = {}));
20
+ /**
21
+ * Gets the Azure Resource Manager endpoint URL for the specified cloud setting.
22
+ * @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values.
23
+ * @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined.
24
+ * @throws {Error} Throws an error if an unknown cloud setting is provided.
25
+ */
26
+ function getArmEndpoint(cloudSetting) {
27
+ if (cloudSetting === undefined) {
28
+ return undefined;
29
+ }
30
+ const cloudEndpoints = {
31
+ AZURE_CHINA_CLOUD: "https://management.chinacloudapi.cn/",
32
+ AZURE_US_GOVERNMENT: "https://management.usgovcloudapi.net/",
33
+ AZURE_PUBLIC_CLOUD: "https://management.azure.com/",
34
+ };
35
+ if (cloudSetting in cloudEndpoints) {
36
+ return cloudEndpoints[cloudSetting];
37
+ }
38
+ else {
39
+ throw new Error(`Unknown cloud setting: ${cloudSetting}. Please refer to the enum AzureClouds for possible values.`);
40
+ }
41
+ }
42
+ //# sourceMappingURL=cloudSettingHelpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloudSettingHelpers.js","sourceRoot":"","sources":["../../../src/static-helpers/cloudSettingHelpers.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAwBlC,wCAgBC;AAtCD;;;GAGG;AACH,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,qEAAqE;IACrE,wDAAyC,CAAA;IACzC,wBAAwB;IACxB,sDAAuC,CAAA;IACvC,gCAAgC;IAChC,0DAA2C,CAAA;AAC7C,CAAC,EAPW,WAAW,2BAAX,WAAW,QAOtB;AAKD;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,YAAmC;IAChE,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,cAAc,GAA6C;QAC/D,iBAAiB,EAAE,sCAAsC;QACzD,mBAAmB,EAAE,uCAAuC;QAC5D,kBAAkB,EAAE,+BAA+B;KACpD,CAAC;IACF,IAAI,YAAY,IAAI,cAAc,EAAE,CAAC;QACnC,OAAO,cAAc,CAAC,YAAY,CAAC,CAAC;IACtC,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CACb,0BAA0B,YAAY,6DAA6D,CACpG,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * An enum to describe Azure Cloud environments.\n * @enum {string}\n */\nexport enum AzureClouds {\n /** Azure public cloud, which is the default cloud for Azure SDKs. */\n AZURE_PUBLIC_CLOUD = \"AZURE_PUBLIC_CLOUD\",\n /** Azure China cloud */\n AZURE_CHINA_CLOUD = \"AZURE_CHINA_CLOUD\",\n /** Azure US government cloud */\n AZURE_US_GOVERNMENT = \"AZURE_US_GOVERNMENT\",\n}\n\n/** The supported values for cloud setting as a string literal type */\nexport type AzureSupportedClouds = `${AzureClouds}`;\n\n/**\n * Gets the Azure Resource Manager endpoint URL for the specified cloud setting.\n * @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values.\n * @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined.\n * @throws {Error} Throws an error if an unknown cloud setting is provided.\n */\nexport function getArmEndpoint(cloudSetting?: AzureSupportedClouds): string | undefined {\n if (cloudSetting === undefined) {\n return undefined;\n }\n const cloudEndpoints: Record<keyof typeof AzureClouds, string> = {\n AZURE_CHINA_CLOUD: \"https://management.chinacloudapi.cn/\",\n AZURE_US_GOVERNMENT: \"https://management.usgovcloudapi.net/\",\n AZURE_PUBLIC_CLOUD: \"https://management.azure.com/\",\n };\n if (cloudSetting in cloudEndpoints) {\n return cloudEndpoints[cloudSetting];\n } else {\n throw new Error(\n `Unknown cloud setting: ${cloudSetting}. Please refer to the enum AzureClouds for possible values.`,\n );\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Client, PathUncheckedResponse } from "@azure-rest/core-client";
1
+ import type { Client, PathUncheckedResponse } from "@azure-rest/core-client";
2
2
  /**
3
3
  * Options for the byPage method
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"pagingHelpers.js","sourceRoot":"","sources":["../../../src/static-helpers/pagingHelpers.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAqFlC,0DAqCC;AAxHD,yDAAyF;AACzF,kEAAsD;AA+EtD;;GAEG;AACH,SAAgB,uBAAuB,CAMrC,MAAc,EACd,kBAAgD,EAChD,mBAAgE,EAChE,gBAA0B,EAC1B,UAA0C,EAAE;IAE5C,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC;IAC7C,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,UAAU,CAAC;IACxD,MAAM,WAAW,GAAgD;QAC/D,OAAO,EAAE,KAAK,EAAE,QAAiB,EAAE,EAAE;YACnC,MAAM,MAAM,GACV,QAAQ,KAAK,SAAS;gBACpB,CAAC,CAAC,MAAM,kBAAkB,EAAE;gBAC5B,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC;YACjD,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;YAC7C,MAAM,OAAO,GAAG,MAAM,mBAAmB,CAAC,MAAmB,CAAC,CAAC;YAC/D,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;YACpD,MAAM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;IAC/D,MAAM,KAAK,GAAI,IAAgC,CAAC,QAAQ,CAAQ,CAAC;IACjE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,8BAAS,CACjB,kFAAkF,QAAQ,EAAE,CAC7F,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,IAAI,EAAE,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB,CAAC,QAA+B,EAAE,gBAA0B;IACrF,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAChD,MAAM,IAAA,6BAAe,EACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Client, createRestError, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\n\n/**\n * Options for the byPage method\n */\nexport interface PageSettings {\n /**\n * A reference to a specific page to start iterating from.\n */\n continuationToken?: string;\n}\n\n/**\n * An interface that describes a page of results.\n */\nexport type ContinuablePage<TElement, TPage = TElement[]> = TPage & {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n};\n\n/**\n * An interface that allows async iterable iteration both to completion and by page.\n */\nexport interface PagedAsyncIterableIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n> {\n /**\n * The next method, part of the iteration protocol\n */\n next(): Promise<IteratorResult<TElement>>;\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;\n}\n\n/**\n * An interface that describes how to communicate with the service.\n */\nexport interface PagedResult<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n> {\n /**\n * Link to the first page of results.\n */\n firstPageLink?: string;\n /**\n * A method that returns a page of results.\n */\n getPage: (pageLink?: string) => Promise<{ page: TPage; nextPageLink?: string } | undefined>;\n /**\n * a function to implement the `byPage` method on the paged async iterator.\n */\n byPage?: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;\n\n /**\n * A function to extract elements from a page.\n */\n toElements?: (page: TPage) => TElement[];\n}\n\n/**\n * Options for the paging helper\n */\nexport interface BuildPagedAsyncIteratorOptions {\n itemName?: string;\n nextLinkName?: string;\n}\n\n/**\n * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator\n */\nexport function buildPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n>(\n client: Client,\n getInitialResponse: () => PromiseLike<TResponse>,\n processResponseBody: (result: TResponse) => PromiseLike<unknown>,\n expectedStatuses: string[],\n options: BuildPagedAsyncIteratorOptions = {},\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const itemName = options.itemName ?? \"value\";\n const nextLinkName = options.nextLinkName ?? \"nextLink\";\n const pagedResult: PagedResult<TElement, TPage, TPageSettings> = {\n getPage: async (pageLink?: string) => {\n const result =\n pageLink === undefined\n ? await getInitialResponse()\n : await client.pathUnchecked(pageLink).get();\n checkPagingRequest(result, expectedStatuses);\n const results = await processResponseBody(result as TResponse);\n const nextLink = getNextLink(results, nextLinkName);\n const values = getElements<TElement>(results, itemName) as TPage;\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n byPage: (settings?: TPageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken,\n });\n },\n };\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * returns an async iterator that iterates over results. It also has a `byPage`\n * method that returns pages of items at once.\n *\n * @param pagedResult - an object that specifies how to get pages.\n * @returns a paged async iterator that iterates over results.\n */\n\nfunction getPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const iter = getItemAsyncIterator<TElement, TPage, TPageSettings>(pagedResult);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage:\n pagedResult?.byPage ??\n ((settings?: TPageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken,\n });\n }),\n };\n}\n\nasync function* getItemAsyncIterator<TElement, TPage, TPageSettings extends PageSettings>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n): AsyncIterableIterator<TElement> {\n const pages = getPageAsyncIterator(pagedResult);\n for await (const page of pages) {\n yield* page as unknown as TElement[];\n }\n}\n\nasync function* getPageAsyncIterator<TElement, TPage, TPageSettings extends PageSettings>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n options: {\n pageLink?: string;\n } = {},\n): AsyncIterableIterator<ContinuablePage<TElement, TPage>> {\n const { pageLink } = options;\n let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);\n if (!response) {\n return;\n }\n let result = response.page as ContinuablePage<TElement, TPage>;\n result.continuationToken = response.nextPageLink;\n yield result;\n while (response.nextPageLink) {\n response = await pagedResult.getPage(response.nextPageLink);\n if (!response) {\n return;\n }\n result = response.page as ContinuablePage<TElement, TPage>;\n result.continuationToken = response.nextPageLink;\n yield result;\n }\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\" && nextLink !== null) {\n throw new RestError(\n `Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`,\n );\n }\n\n if (nextLink === null) {\n return undefined;\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n if (!Array.isArray(value)) {\n throw new RestError(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void {\n if (!expectedStatuses.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pagingHelpers.js","sourceRoot":"","sources":["../../../src/static-helpers/pagingHelpers.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAsFlC,0DAqCC;AAxHD,yDAA0D;AAC1D,kEAAsD;AA+EtD;;GAEG;AACH,SAAgB,uBAAuB,CAMrC,MAAc,EACd,kBAAgD,EAChD,mBAAgE,EAChE,gBAA0B,EAC1B,UAA0C,EAAE;IAE5C,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC;IAC7C,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,UAAU,CAAC;IACxD,MAAM,WAAW,GAAgD;QAC/D,OAAO,EAAE,KAAK,EAAE,QAAiB,EAAE,EAAE;YACnC,MAAM,MAAM,GACV,QAAQ,KAAK,SAAS;gBACpB,CAAC,CAAC,MAAM,kBAAkB,EAAE;gBAC5B,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC;YACjD,kBAAkB,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;YAC7C,MAAM,OAAO,GAAG,MAAM,mBAAmB,CAAC,MAAmB,CAAC,CAAC;YAC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AQ,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAc,IAAa,EAAE,QAAgB;IAC/D,MAAM,KAAK,GAAI,IAAgC,CAAC,QAAQ,CAAQ,CAAC;IACjE,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,8BAAS,CACjB,kFAAkF,QAAQ,EAAE,CAC7F,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,IAAI,EAAE,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB,CAAC,QAA+B,EAAE,gBAA0B;IACrF,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAChD,MAAM,IAAA,6BAAe,EACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } from \"@azure-rest/core-client\";\nimport { RestError } from \"@azure/core-rest-pipeline\";\n\n/**\n * Options for the byPage method\n */\nexport interface PageSettings {\n /**\n * A reference to a specific page to start iterating from.\n */\n continuationToken?: string;\n}\n\n/**\n * An interface that describes a page of results.\n */\nexport type ContinuablePage<TElement, TPage = TElement[]> = TPage & {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n};\n\n/**\n * An interface that allows async iterable iteration both to completion and by page.\n */\nexport interface PagedAsyncIterableIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n> {\n /**\n * The next method, part of the iteration protocol\n */\n next(): Promise<IteratorResult<TElement>>;\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;\n}\n\n/**\n * An interface that describes how to communicate with the service.\n */\nexport interface PagedResult<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n> {\n /**\n * Link to the first page of results.\n */\n firstPageLink?: string;\n /**\n * A method that returns a page of results.\n */\n getPage: (pageLink?: string) => Promise<{ page: TPage; nextPageLink?: string } | undefined>;\n /**\n * a function to implement the `byPage` method on the paged async iterator.\n */\n byPage?: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;\n\n /**\n * A function to extract elements from a page.\n */\n toElements?: (page: TPage) => TElement[];\n}\n\n/**\n * Options for the paging helper\n */\nexport interface BuildPagedAsyncIteratorOptions {\n itemName?: string;\n nextLinkName?: string;\n}\n\n/**\n * Helper to paginate results in a generic way and return a PagedAsyncIterableIterator\n */\nexport function buildPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n>(\n client: Client,\n getInitialResponse: () => PromiseLike<TResponse>,\n processResponseBody: (result: TResponse) => PromiseLike<unknown>,\n expectedStatuses: string[],\n options: BuildPagedAsyncIteratorOptions = {},\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const itemName = options.itemName ?? \"value\";\n const nextLinkName = options.nextLinkName ?? \"nextLink\";\n const pagedResult: PagedResult<TElement, TPage, TPageSettings> = {\n getPage: async (pageLink?: string) => {\n const result =\n pageLink === undefined\n ? await getInitialResponse()\n : await client.pathUnchecked(pageLink).get();\n checkPagingRequest(result, expectedStatuses);\n const results = await processResponseBody(result as TResponse);\n const nextLink = getNextLink(results, nextLinkName);\n const values = getElements<TElement>(results, itemName) as TPage;\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n byPage: (settings?: TPageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken,\n });\n },\n };\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * returns an async iterator that iterates over results. It also has a `byPage`\n * method that returns pages of items at once.\n *\n * @param pagedResult - an object that specifies how to get pages.\n * @returns a paged async iterator that iterates over results.\n */\n\nfunction getPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings extends PageSettings = PageSettings,\n>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const iter = getItemAsyncIterator<TElement, TPage, TPageSettings>(pagedResult);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage:\n pagedResult?.byPage ??\n ((settings?: TPageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken,\n });\n }),\n };\n}\n\nasync function* getItemAsyncIterator<TElement, TPage, TPageSettings extends PageSettings>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n): AsyncIterableIterator<TElement> {\n const pages = getPageAsyncIterator(pagedResult);\n for await (const page of pages) {\n yield* page as unknown as TElement[];\n }\n}\n\nasync function* getPageAsyncIterator<TElement, TPage, TPageSettings extends PageSettings>(\n pagedResult: PagedResult<TElement, TPage, TPageSettings>,\n options: {\n pageLink?: string;\n } = {},\n): AsyncIterableIterator<ContinuablePage<TElement, TPage>> {\n const { pageLink } = options;\n let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);\n if (!response) {\n return;\n }\n let result = response.page as ContinuablePage<TElement, TPage>;\n result.continuationToken = response.nextPageLink;\n yield result;\n while (response.nextPageLink) {\n response = await pagedResult.getPage(response.nextPageLink);\n if (!response) {\n return;\n }\n result = response.page as ContinuablePage<TElement, TPage>;\n result.continuationToken = response.nextPageLink;\n yield result;\n }\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\" && nextLink !== null) {\n throw new RestError(\n `Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`,\n );\n }\n\n if (nextLink === null) {\n return undefined;\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n if (!Array.isArray(value)) {\n throw new RestError(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse, expectedStatuses: string[]): void {\n if (!expectedStatuses.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"]}
@@ -51,7 +51,12 @@ function getExpandedValue(option) {
51
51
  vals.push(`${getFirstOrSep(op, isFirst)}`);
52
52
  if (named && varName) {
53
53
  vals.push(`${encodeURIComponent(varName)}`);
54
- val === "" ? vals.push(ifEmpty) : vals.push("=");
54
+ if (val === "") {
55
+ vals.push(ifEmpty);
56
+ }
57
+ else {
58
+ vals.push("=");
59
+ }
55
60
  }
56
61
  vals.push(encodeComponent(val, reserved, op));
57
62
  isFirst = false;
@@ -67,7 +72,12 @@ function getExpandedValue(option) {
67
72
  vals.push(`${getFirstOrSep(op, isFirst)}`);
68
73
  if (key) {
69
74
  vals.push(`${encodeURIComponent(key)}`);
70
- named && val === "" ? vals.push(ifEmpty) : vals.push("=");
75
+ if (named && val === "") {
76
+ vals.push(ifEmpty);
77
+ }
78
+ else {
79
+ vals.push("=");
80
+ }
71
81
  }
72
82
  vals.push(encodeComponent(val, reserved, op));
73
83
  isFirst = false;
@@ -120,7 +130,12 @@ function getVarValue(option) {
120
130
  if (named && varName) {
121
131
  // No need to encode varName considering it is already encoded
122
132
  vals.push(varName);
123
- val === "" ? vals.push(ifEmpty) : vals.push("=");
133
+ if (val === "") {
134
+ vals.push(ifEmpty);
135
+ }
136
+ else {
137
+ vals.push("=");
138
+ }
124
139
  }
125
140
  if (modifier && modifier !== "*") {
126
141
  val = val.substring(0, parseInt(modifier, 10));
@@ -139,18 +154,19 @@ function getVarValue(option) {
139
154
  // This is an implementation of RFC 6570 URI Template: https://datatracker.ietf.org/doc/html/rfc6570.
140
155
  // ---------------------------------------------------------------------------------------------------
141
156
  function expandUrlTemplate(template, context, option) {
142
- return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, (_, expr, text) => {
157
+ return template.replace(/\{([^{}]+)\}|([^{}]+)/g, (_, expr, text) => {
143
158
  if (!expr) {
144
159
  return encodeReservedComponent(text);
145
160
  }
146
161
  let op;
147
162
  if (["+", "#", ".", "/", ";", "?", "&"].includes(expr[0])) {
148
- ((op = expr[0]), (expr = expr.slice(1)));
163
+ op = expr[0];
164
+ expr = expr.slice(1);
149
165
  }
150
166
  const varList = expr.split(/,/g);
151
167
  const result = [];
152
168
  for (const varSpec of varList) {
153
- const varMatch = /([^:\*]*)(?::(\d+)|(\*))?/.exec(varSpec);
169
+ const varMatch = /([^:*]*)(?::(\d+)|(\*))?/.exec(varSpec);
154
170
  if (!varMatch || !varMatch[1]) {
155
171
  continue;
156
172
  }
@@ -1 +1 @@
1
- {"version":3,"file":"urlTemplate.js","sourceRoot":"","sources":["../../../src/static-helpers/urlTemplate.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAiKlC,8CAkCC;AAhLD,wBAAwB;AACxB,UAAU;AACV,wBAAwB;AACxB,SAAS,eAAe,CAAC,GAAW,EAAE,QAAkB,EAAE,EAAW;IACnE,OAAO,CAAC,QAAQ,IAAI,EAAE,KAAK,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG;QAC3C,CAAC,CAAC,uBAAuB,CAAC,GAAG,CAAC;QAC9B,CAAC,CAAC,yBAAyB,CAAC,GAAG,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BAC3B,OAAO,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;gBAC5B,EAAE;gBACF,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAC9B,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;gBACpB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC;gBACpC,QAAQ,EAAE,MAAM,EAAE,aAAa;aAChC,CAAC,CAAC;YACH,IAAI,QAAQ,EAAE,CAAC;gBACb,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACxB,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n//---------------------\n// interfaces\n//---------------------\ninterface ValueOptions {\n isFirst: boolean; // is first value in the expression\n op?: string; // operator\n varValue?: any; // variable value\n varName?: string; // variable name\n modifier?: string; // modifier e.g *\n reserved?: boolean; // if true we'll keep reserved words with not encoding\n}\n\nexport interface UrlTemplateOptions {\n // if set to true, reserved characters will not be encoded\n allowReserved?: boolean;\n}\n\n// ---------------------\n// helpers\n// ---------------------\nfunction encodeComponent(val: string, reserved?: boolean, op?: string) {\n return (reserved ?? op === \"+\") || op === \"#\"\n ? encodeReservedComponent(val)\n : encodeRFC3986URIComponent(val);\n}\n\nfunction encodeReservedComponent(str: string) {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map((part) => (!/%[0-9A-Fa-f]/.test(part) ? encodeURI(part) : part))\n .join(\"\");\n}\n\nfunction encodeRFC3986URIComponent(str: string) {\n return encodeURIComponent(str).replace(\n /[!'()*]/g,\n (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`,\n );\n}\n\nfunction isDefined(val: any) {\n return val !== undefined && val !== null;\n}\n\nfunction getNamedAndIfEmpty(op?: string): [boolean, string] {\n return [!!op && [\";\", \"?\", \"&\"].includes(op), !!op && [\"?\", \"&\"].includes(op) ? \"=\" : \"\"];\n}\n\nfunction getFirstOrSep(op?: string, isFirst = false) {\n if (isFirst) {\n return !op || op === \"+\" ? \"\" : op;\n } else if (!op || op === \"+\" || op === \"#\") {\n return \",\";\n } else if (op === \"?\") {\n return \"&\";\n } else {\n return op;\n }\n}\n\nfunction getExpandedValue(option: ValueOptions) {\n let isFirst = option.isFirst;\n const { op, varName, varValue: value, reserved } = option;\n const vals: string[] = [];\n const [named, ifEmpty] = getNamedAndIfEmpty(op);\n\n if (Array.isArray(value)) {\n for (const val of value.filter(isDefined)) {\n // prepare the following parts: separator, varName, value\n vals.push(`${getFirstOrSep(op, isFirst)}`);\n if (named && varName) {\n vals.push(`${encodeURIComponent(varName)}`);\n val === \"\" ? vals.push(ifEmpty) : vals.push(\"=\");\n }\n vals.push(encodeComponent(val, reserved, op));\n isFirst = false;\n }\n } else if (typeof value === \"object\") {\n for (const key of Object.keys(value)) {\n const val = value[key];\n if (!isDefined(val)) {\n continue;\n }\n // prepare the following parts: separator, key, value\n vals.push(`${getFirstOrSep(op, isFirst)}`);\n if (key) {\n vals.push(`${encodeURIComponent(key)}`);\n named && val === \"\" ? vals.push(ifEmpty) : vals.push(\"=\");\n }\n vals.push(encodeComponent(val, reserved, op));\n isFirst = false;\n }\n }\n return vals.join(\"\");\n}\n\nfunction getNonExpandedValue(option: ValueOptions) {\n const { op, varName, varValue: value, isFirst, reserved } = option;\n const vals: string[] = [];\n const first = getFirstOrSep(op, isFirst);\n const [named, ifEmpty] = getNamedAndIfEmpty(op);\n if (named && varName) {\n vals.push(encodeComponent(varName, reserved, op));\n if (value === \"\") {\n if (!ifEmpty) {\n vals.push(ifEmpty);\n }\n return !vals.join(\"\") ? undefined : `${first}${vals.join(\"\")}`;\n }\n vals.push(\"=\");\n }\n\n const items = [];\n if (Array.isArray(value)) {\n for (const val of value.filter(isDefined)) {\n items.push(encodeComponent(val, reserved, op));\n }\n } else if (typeof value === \"object\") {\n for (const key of Object.keys(value)) {\n if (!isDefined(value[key])) {\n continue;\n }\n items.push(encodeRFC3986URIComponent(key));\n items.push(encodeComponent(value[key], reserved, op));\n }\n }\n vals.push(items.join(\",\"));\n return !vals.join(\",\") ? undefined : `${first}${vals.join(\"\")}`;\n}\n\nfunction getVarValue(option: ValueOptions): string | undefined {\n const { op, varName, modifier, isFirst, reserved, varValue: value } = option;\n\n if (!isDefined(value)) {\n return undefined;\n } else if ([\"string\", \"number\", \"boolean\"].includes(typeof value)) {\n let val = value.toString();\n const [named, ifEmpty] = getNamedAndIfEmpty(op);\n const vals: string[] = [getFirstOrSep(op, isFirst)];\n if (named && varName) {\n // No need to encode varName considering it is already encoded\n vals.push(varName);\n val === \"\" ? vals.push(ifEmpty) : vals.push(\"=\");\n }\n if (modifier && modifier !== \"*\") {\n val = val.substring(0, parseInt(modifier, 10));\n }\n vals.push(encodeComponent(val, reserved, op));\n return vals.join(\"\");\n } else if (modifier === \"*\") {\n return getExpandedValue(option);\n } else {\n return getNonExpandedValue(option);\n }\n}\n\n// ---------------------------------------------------------------------------------------------------\n// This is an implementation of RFC 6570 URI Template: https://datatracker.ietf.org/doc/html/rfc6570.\n// ---------------------------------------------------------------------------------------------------\nexport function expandUrlTemplate(\n template: string,\n context: Record<string, any>,\n option?: UrlTemplateOptions,\n): string {\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, (_, expr, text) => {\n if (!expr) {\n return encodeReservedComponent(text);\n }\n let op;\n if ([\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"].includes(expr[0])) {\n ((op = expr[0]), (expr = expr.slice(1)));\n }\n const varList = expr.split(/,/g);\n const result = [];\n for (const varSpec of varList) {\n const varMatch = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(varSpec);\n if (!varMatch || !varMatch[1]) {\n continue;\n }\n const varValue = getVarValue({\n isFirst: result.length === 0,\n op,\n varValue: context[varMatch[1]],\n varName: varMatch[1],\n modifier: varMatch[2] || varMatch[3],\n reserved: option?.allowReserved,\n });\n if (varValue) {\n result.push(varValue);\n }\n }\n return result.join(\"\");\n });\n}\n"]}
1
+ {"version":3,"file":"urlTemplate.js","sourceRoot":"","sources":["../../../src/static-helpers/urlTemplate.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA6KlC,8CAmCC;AA7LD,wBAAwB;AACxB,UAAU;AACV,wBAAwB;AACxB,SAAS,eAAe,CAAC,GAAW,EAAE,QAAkB,EAAE,EAAW;IACnE,OAAO,CAAC,QAAQ,IAAI,EAAE,KAAK,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG;QAC3C,CAAC,CAAC,uBAAuB,CAAC,GAAG,CAAC;QAC9B,CAAC,CAAC,yBAAyB,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,uBAAuB,CAAC,GAAW;IAC1C,OAAO,GAAG;SACP,KAAK,CAAC,oBAAoB,CAAC;SAC3B,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;SACpE,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC;AAED,SAAS,yBAAyB,CAAC,GAAW;IAC5C,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,OAAO,CACpC,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,EAAE,CACxD,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,CAAC;AAC3C,CAAC;AAED,SAAS,kBAAkB,CAAC,EAAW;IACr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EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAC1D,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACb,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACvB,CAAC;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACjC,MAAM,MAAM,GAAG,EAAE,CAAC;QAClB,KAAK,MAAM,OAAO,IAAI,OAAO,EAAE,CAAC;YAC9B,MAAM,QAAQ,GAAG,0BAA0B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC1D,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC9B,SAAS;YACX,CAAC;YACD,MAAM,QAAQ,GAAG,WAAW,CAAC;gBAC3B,OAAO,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC;gBAC5B,EAAE;gBACF,QAAQ,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAC9B,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;gBACpB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC;gBACpC,QAAQ,EAAE,MAAM,EAAE,aAAa;aAChC,CAAC,CAAC;YACH,IAAI,QAAQ,EAAE,CAAC;gBACb,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACxB,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// ---------------------\n// interfaces\n// ---------------------\ninterface ValueOptions {\n isFirst: boolean; // is first value in the expression\n op?: string; // operator\n varValue?: any; // variable value\n varName?: string; // variable name\n modifier?: string; // modifier e.g *\n reserved?: boolean; // if true we'll keep reserved words with not encoding\n}\n\nexport interface UrlTemplateOptions {\n // if set to true, reserved characters will not be encoded\n allowReserved?: boolean;\n}\n\n// ---------------------\n// helpers\n// ---------------------\nfunction encodeComponent(val: string, reserved?: boolean, op?: string): string {\n return (reserved ?? op === \"+\") || op === \"#\"\n ? encodeReservedComponent(val)\n : encodeRFC3986URIComponent(val);\n}\n\nfunction encodeReservedComponent(str: string): string {\n return str\n .split(/(%[0-9A-Fa-f]{2})/g)\n .map((part) => (!/%[0-9A-Fa-f]/.test(part) ? encodeURI(part) : part))\n .join(\"\");\n}\n\nfunction encodeRFC3986URIComponent(str: string): string {\n return encodeURIComponent(str).replace(\n /[!'()*]/g,\n (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`,\n );\n}\n\nfunction isDefined(val: any): boolean {\n return val !== undefined && val !== null;\n}\n\nfunction getNamedAndIfEmpty(op?: string): [boolean, string] {\n return [!!op && [\";\", \"?\", \"&\"].includes(op), !!op && [\"?\", \"&\"].includes(op) ? \"=\" : \"\"];\n}\n\nfunction getFirstOrSep(op?: string, isFirst = false): string {\n if (isFirst) {\n return !op || op === \"+\" ? \"\" : op;\n } else if (!op || op === \"+\" || op === \"#\") {\n return \",\";\n } else if (op === \"?\") {\n return \"&\";\n } else {\n return op;\n }\n}\n\nfunction getExpandedValue(option: ValueOptions): string {\n let isFirst = option.isFirst;\n const { op, varName, varValue: value, reserved } = option;\n const vals: string[] = [];\n const [named, ifEmpty] = getNamedAndIfEmpty(op);\n\n if (Array.isArray(value)) {\n for (const val of value.filter(isDefined)) {\n // prepare the following parts: separator, varName, value\n vals.push(`${getFirstOrSep(op, isFirst)}`);\n if (named && varName) {\n vals.push(`${encodeURIComponent(varName)}`);\n if (val === \"\") {\n vals.push(ifEmpty);\n } else {\n vals.push(\"=\");\n }\n }\n vals.push(encodeComponent(val, reserved, op));\n isFirst = false;\n }\n } else if (typeof value === \"object\") {\n for (const key of Object.keys(value)) {\n const val = value[key];\n if (!isDefined(val)) {\n continue;\n }\n // prepare the following parts: separator, key, value\n vals.push(`${getFirstOrSep(op, isFirst)}`);\n if (key) {\n vals.push(`${encodeURIComponent(key)}`);\n if (named && val === \"\") {\n vals.push(ifEmpty);\n } else {\n vals.push(\"=\");\n }\n }\n vals.push(encodeComponent(val, reserved, op));\n isFirst = false;\n }\n }\n return vals.join(\"\");\n}\n\nfunction getNonExpandedValue(option: ValueOptions): string | undefined {\n const { op, varName, varValue: value, isFirst, reserved } = option;\n const vals: string[] = [];\n const first = getFirstOrSep(op, isFirst);\n const [named, ifEmpty] = getNamedAndIfEmpty(op);\n if (named && varName) {\n vals.push(encodeComponent(varName, reserved, op));\n if (value === \"\") {\n if (!ifEmpty) {\n vals.push(ifEmpty);\n }\n return !vals.join(\"\") ? undefined : `${first}${vals.join(\"\")}`;\n }\n vals.push(\"=\");\n }\n\n const items = [];\n if (Array.isArray(value)) {\n for (const val of value.filter(isDefined)) {\n items.push(encodeComponent(val, reserved, op));\n }\n } else if (typeof value === \"object\") {\n for (const key of Object.keys(value)) {\n if (!isDefined(value[key])) {\n continue;\n }\n items.push(encodeRFC3986URIComponent(key));\n items.push(encodeComponent(value[key], reserved, op));\n }\n }\n vals.push(items.join(\",\"));\n return !vals.join(\",\") ? undefined : `${first}${vals.join(\"\")}`;\n}\n\nfunction getVarValue(option: ValueOptions): string | undefined {\n const { op, varName, modifier, isFirst, reserved, varValue: value } = option;\n\n if (!isDefined(value)) {\n return undefined;\n } else if ([\"string\", \"number\", \"boolean\"].includes(typeof value)) {\n let val = value.toString();\n const [named, ifEmpty] = getNamedAndIfEmpty(op);\n const vals: string[] = [getFirstOrSep(op, isFirst)];\n if (named && varName) {\n // No need to encode varName considering it is already encoded\n vals.push(varName);\n if (val === \"\") {\n vals.push(ifEmpty);\n } else {\n vals.push(\"=\");\n }\n }\n if (modifier && modifier !== \"*\") {\n val = val.substring(0, parseInt(modifier, 10));\n }\n vals.push(encodeComponent(val, reserved, op));\n return vals.join(\"\");\n } else if (modifier === \"*\") {\n return getExpandedValue(option);\n } else {\n return getNonExpandedValue(option);\n }\n}\n\n// ---------------------------------------------------------------------------------------------------\n// This is an implementation of RFC 6570 URI Template: https://datatracker.ietf.org/doc/html/rfc6570.\n// ---------------------------------------------------------------------------------------------------\nexport function expandUrlTemplate(\n template: string,\n context: Record<string, any>,\n option?: UrlTemplateOptions,\n): string {\n return template.replace(/\\{([^{}]+)\\}|([^{}]+)/g, (_, expr, text) => {\n if (!expr) {\n return encodeReservedComponent(text);\n }\n let op;\n if ([\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"].includes(expr[0])) {\n op = expr[0];\n expr = expr.slice(1);\n }\n const varList = expr.split(/,/g);\n const result = [];\n for (const varSpec of varList) {\n const varMatch = /([^:*]*)(?::(\\d+)|(\\*))?/.exec(varSpec);\n if (!varMatch || !varMatch[1]) {\n continue;\n }\n const varValue = getVarValue({\n isFirst: result.length === 0,\n op,\n varValue: context[varMatch[1]],\n varName: varMatch[1],\n modifier: varMatch[2] || varMatch[3],\n reserved: option?.allowReserved,\n });\n if (varValue) {\n result.push(varValue);\n }\n }\n return result.join(\"\");\n });\n}\n"]}
@@ -1,8 +1,8 @@
1
- import { StorageDiscoveryClientOptionalParams } from "./api/index.js";
2
- import { OperationsOperations } from "./classic/operations/index.js";
3
- import { StorageDiscoveryWorkspacesOperations } from "./classic/storageDiscoveryWorkspaces/index.js";
4
- import { Pipeline } from "@azure/core-rest-pipeline";
5
- import { TokenCredential } from "@azure/core-auth";
1
+ import type { StorageDiscoveryClientOptionalParams } from "./api/index.js";
2
+ import type { OperationsOperations } from "./classic/operations/index.js";
3
+ import type { StorageDiscoveryWorkspacesOperations } from "./classic/storageDiscoveryWorkspaces/index.js";
4
+ import type { TokenCredential } from "@azure/core-auth";
5
+ import type { Pipeline } from "@azure/core-rest-pipeline";
6
6
  export { StorageDiscoveryClientOptionalParams } from "./api/storageDiscoveryContext.js";
7
7
  export declare class StorageDiscoveryClient {
8
8
  private _client;
@@ -1 +1 @@
1
- {"version":3,"file":"storageDiscoveryClient.js","sourceRoot":"","sources":["../../src/storageDiscoveryClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,6CAIwB;AACxB,4DAA+F;AAC/F,4EAGuD;AAMvD,MAAa,sBAAsB;IACzB,OAAO,CAA0B;IACzC,wDAAwD;IACxC,QAAQ,CAAW;IAEnC,kDAAkD;IAClD,YACE,UAA2B,EAC3B,cAAsB,EACtB,UAAgD,EAAE;QAElD,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,IAAA,iCAAsB,EAAC,UAAU,EAAE,cAAc,EAAE;YAChE,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,UAAU,GAAG,IAAA,mCAAwB,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,IAAI,CAAC,0BAA0B,GAAG,IAAA,mDAAwC,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3F,CAAC;IAED,0CAA0C;IAC1B,UAAU,CAAuB;IACjD,0DAA0D;IAC1C,0BAA0B,CAAuC;CAClF;AA5BD,wDA4BC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n createStorageDiscovery,\n StorageDiscoveryContext,\n StorageDiscoveryClientOptionalParams,\n} from \"./api/index.js\";\nimport { OperationsOperations, _getOperationsOperations } from \"./classic/operations/index.js\";\nimport {\n StorageDiscoveryWorkspacesOperations,\n _getStorageDiscoveryWorkspacesOperations,\n} from \"./classic/storageDiscoveryWorkspaces/index.js\";\nimport { Pipeline } from \"@azure/core-rest-pipeline\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\nexport { StorageDiscoveryClientOptionalParams } from \"./api/storageDiscoveryContext.js\";\n\nexport class StorageDiscoveryClient {\n private _client: StorageDiscoveryContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n /** The Azure Storage Discovery Management API. */\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options: StorageDiscoveryClientOptionalParams = {},\n ) {\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createStorageDiscovery(credential, subscriptionId, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.operations = _getOperationsOperations(this._client);\n this.storageDiscoveryWorkspaces = _getStorageDiscoveryWorkspacesOperations(this._client);\n }\n\n /** The operation groups for operations */\n public readonly operations: OperationsOperations;\n /** The operation groups for storageDiscoveryWorkspaces */\n public readonly storageDiscoveryWorkspaces: StorageDiscoveryWorkspacesOperations;\n}\n"]}
1
+ {"version":3,"file":"storageDiscoveryClient.js","sourceRoot":"","sources":["../../src/storageDiscoveryClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,6CAAwD;AAExD,4DAAyE;AAEzE,4EAAyG;AAMzG,MAAa,sBAAsB;IACzB,OAAO,CAA0B;IACzC,wDAAwD;IACxC,QAAQ,CAAW;IAEnC,kDAAkD;IAClD,YACE,UAA2B,EAC3B,cAAsB,EACtB,UAAgD,EAAE;QAElD,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,IAAA,iCAAsB,EAAC,UAAU,EAAE,cAAc,EAAE;YAChE,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,UAAU,GAAG,IAAA,mCAAwB,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,IAAI,CAAC,0BAA0B,GAAG,IAAA,mDAAwC,EAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC3F,CAAC;IAED,0CAA0C;IAC1B,UAAU,CAAuB;IACjD,0DAA0D;IAC1C,0BAA0B,CAAuC;CAClF;AA5BD,wDA4BC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { StorageDiscoveryContext, StorageDiscoveryClientOptionalParams } from \"./api/index.js\";\nimport { createStorageDiscovery } from \"./api/index.js\";\nimport type { OperationsOperations } from \"./classic/operations/index.js\";\nimport { _getOperationsOperations } from \"./classic/operations/index.js\";\nimport type { StorageDiscoveryWorkspacesOperations } from \"./classic/storageDiscoveryWorkspaces/index.js\";\nimport { _getStorageDiscoveryWorkspacesOperations } from \"./classic/storageDiscoveryWorkspaces/index.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { Pipeline } from \"@azure/core-rest-pipeline\";\n\nexport { StorageDiscoveryClientOptionalParams } from \"./api/storageDiscoveryContext.js\";\n\nexport class StorageDiscoveryClient {\n private _client: StorageDiscoveryContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n /** The Azure Storage Discovery Management API. */\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options: StorageDiscoveryClientOptionalParams = {},\n ) {\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createStorageDiscovery(credential, subscriptionId, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.operations = _getOperationsOperations(this._client);\n this.storageDiscoveryWorkspaces = _getStorageDiscoveryWorkspacesOperations(this._client);\n }\n\n /** The operation groups for operations */\n public readonly operations: OperationsOperations;\n /** The operation groups for storageDiscoveryWorkspaces */\n public readonly storageDiscoveryWorkspaces: StorageDiscoveryWorkspacesOperations;\n}\n"]}
@@ -1,8 +1,8 @@
1
- import { StorageDiscoveryContext as Client } from "../index.js";
2
- import { _OperationListResult, Operation } from "../../models/models.js";
3
- import { OperationsListOptionalParams } from "./options.js";
4
- import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
5
- import { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client";
1
+ import type { StorageDiscoveryContext as Client } from "../index.js";
2
+ import type { _OperationListResult, Operation } from "../../models/models.js";
3
+ import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
4
+ import type { OperationsListOptionalParams } from "./options.js";
5
+ import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client";
6
6
  export declare function _listSend(context: Client, options?: OperationsListOptionalParams): StreamableMethod;
7
7
  export declare function _listDeserialize(result: PathUncheckedResponse): Promise<_OperationListResult>;
8
8
  /** List the operations for the provider */