@azure/arm-storagesync 10.0.0-beta.1 → 10.1.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 (153) hide show
  1. package/README.md +1 -1
  2. package/dist/browser/api/cloudEndpoints/index.d.ts +2 -2
  3. package/dist/browser/api/cloudEndpoints/index.js +1 -1
  4. package/dist/browser/api/cloudEndpoints/index.js.map +1 -1
  5. package/dist/browser/api/cloudEndpoints/operations.d.ts +6 -2
  6. package/dist/browser/api/cloudEndpoints/operations.js +59 -20
  7. package/dist/browser/api/cloudEndpoints/operations.js.map +1 -1
  8. package/dist/browser/api/cloudEndpoints/options.d.ts +5 -0
  9. package/dist/browser/api/cloudEndpoints/options.js.map +1 -1
  10. package/dist/browser/api/microsoftStorageSyncContext.js +4 -3
  11. package/dist/browser/api/microsoftStorageSyncContext.js.map +1 -1
  12. package/dist/browser/api/operationStatusOperations/operations.js +1 -1
  13. package/dist/browser/api/operationStatusOperations/operations.js.map +1 -1
  14. package/dist/browser/api/operations/operations.js +2 -2
  15. package/dist/browser/api/operations/operations.js.map +1 -1
  16. package/dist/browser/api/operations.js +1 -1
  17. package/dist/browser/api/operations.js.map +1 -1
  18. package/dist/browser/api/privateEndpointConnections/operations.js +7 -7
  19. package/dist/browser/api/privateEndpointConnections/operations.js.map +1 -1
  20. package/dist/browser/api/privateLinkResources/operations.js +1 -1
  21. package/dist/browser/api/privateLinkResources/operations.js.map +1 -1
  22. package/dist/browser/api/registeredServers/operations.js +11 -11
  23. package/dist/browser/api/registeredServers/operations.js.map +1 -1
  24. package/dist/browser/api/serverEndpoints/operations.js +11 -11
  25. package/dist/browser/api/serverEndpoints/operations.js.map +1 -1
  26. package/dist/browser/api/storageSyncServices/operations.js +12 -12
  27. package/dist/browser/api/storageSyncServices/operations.js.map +1 -1
  28. package/dist/browser/api/syncGroups/operations.js +5 -5
  29. package/dist/browser/api/syncGroups/operations.js.map +1 -1
  30. package/dist/browser/api/workflows/operations.js +4 -4
  31. package/dist/browser/api/workflows/operations.js.map +1 -1
  32. package/dist/browser/classic/cloudEndpoints/index.d.ts +8 -2
  33. package/dist/browser/classic/cloudEndpoints/index.js +10 -1
  34. package/dist/browser/classic/cloudEndpoints/index.js.map +1 -1
  35. package/dist/browser/index.d.ts +3 -3
  36. package/dist/browser/index.js +1 -1
  37. package/dist/browser/index.js.map +1 -1
  38. package/dist/browser/microsoftStorageSync.js +1 -8
  39. package/dist/browser/microsoftStorageSync.js.map +1 -1
  40. package/dist/browser/models/index.d.ts +2 -2
  41. package/dist/browser/models/index.js +1 -1
  42. package/dist/browser/models/index.js.map +1 -1
  43. package/dist/browser/models/models.d.ts +62 -5
  44. package/dist/browser/models/models.js +44 -2
  45. package/dist/browser/models/models.js.map +1 -1
  46. package/dist/browser/restorePollerHelpers.js +2 -1
  47. package/dist/browser/restorePollerHelpers.js.map +1 -1
  48. package/dist/browser/static-helpers/pollingHelpers.d.ts +1 -1
  49. package/dist/browser/static-helpers/pollingHelpers.js.map +1 -1
  50. package/dist/browser/static-helpers/simplePollerHelpers.d.ts +1 -1
  51. package/dist/browser/static-helpers/simplePollerHelpers.js.map +1 -1
  52. package/dist/commonjs/api/cloudEndpoints/index.d.ts +2 -2
  53. package/dist/commonjs/api/cloudEndpoints/index.js +4 -2
  54. package/dist/commonjs/api/cloudEndpoints/index.js.map +2 -2
  55. package/dist/commonjs/api/cloudEndpoints/operations.d.ts +6 -2
  56. package/dist/commonjs/api/cloudEndpoints/operations.js +77 -21
  57. package/dist/commonjs/api/cloudEndpoints/operations.js.map +2 -2
  58. package/dist/commonjs/api/cloudEndpoints/options.d.ts +5 -0
  59. package/dist/commonjs/api/cloudEndpoints/options.js.map +1 -1
  60. package/dist/commonjs/api/microsoftStorageSyncContext.js +13 -2
  61. package/dist/commonjs/api/microsoftStorageSyncContext.js.map +3 -3
  62. package/dist/commonjs/api/operationStatusOperations/operations.js +1 -1
  63. package/dist/commonjs/api/operationStatusOperations/operations.js.map +1 -1
  64. package/dist/commonjs/api/operations/operations.js +2 -2
  65. package/dist/commonjs/api/operations/operations.js.map +1 -1
  66. package/dist/commonjs/api/operations.js +1 -1
  67. package/dist/commonjs/api/operations.js.map +1 -1
  68. package/dist/commonjs/api/privateEndpointConnections/operations.js +7 -7
  69. package/dist/commonjs/api/privateEndpointConnections/operations.js.map +1 -1
  70. package/dist/commonjs/api/privateLinkResources/operations.js +1 -1
  71. package/dist/commonjs/api/privateLinkResources/operations.js.map +1 -1
  72. package/dist/commonjs/api/registeredServers/operations.js +11 -11
  73. package/dist/commonjs/api/registeredServers/operations.js.map +1 -1
  74. package/dist/commonjs/api/serverEndpoints/operations.js +11 -11
  75. package/dist/commonjs/api/serverEndpoints/operations.js.map +1 -1
  76. package/dist/commonjs/api/storageSyncServices/operations.js +12 -12
  77. package/dist/commonjs/api/storageSyncServices/operations.js.map +1 -1
  78. package/dist/commonjs/api/syncGroups/operations.js +5 -5
  79. package/dist/commonjs/api/syncGroups/operations.js.map +1 -1
  80. package/dist/commonjs/api/workflows/operations.js +4 -4
  81. package/dist/commonjs/api/workflows/operations.js.map +1 -1
  82. package/dist/commonjs/classic/cloudEndpoints/index.d.ts +8 -2
  83. package/dist/commonjs/classic/cloudEndpoints/index.js +33 -0
  84. package/dist/commonjs/classic/cloudEndpoints/index.js.map +2 -2
  85. package/dist/commonjs/index.d.ts +3 -3
  86. package/dist/commonjs/index.js +2 -0
  87. package/dist/commonjs/index.js.map +2 -2
  88. package/dist/commonjs/microsoftStorageSync.js +1 -6
  89. package/dist/commonjs/microsoftStorageSync.js.map +2 -2
  90. package/dist/commonjs/models/index.d.ts +2 -2
  91. package/dist/commonjs/models/index.js +2 -0
  92. package/dist/commonjs/models/index.js.map +2 -2
  93. package/dist/commonjs/models/models.d.ts +62 -5
  94. package/dist/commonjs/models/models.js +44 -8
  95. package/dist/commonjs/models/models.js.map +3 -3
  96. package/dist/commonjs/restorePollerHelpers.js +1 -0
  97. package/dist/commonjs/restorePollerHelpers.js.map +3 -3
  98. package/dist/commonjs/static-helpers/pollingHelpers.d.ts +1 -1
  99. package/dist/commonjs/static-helpers/pollingHelpers.js.map +1 -1
  100. package/dist/commonjs/static-helpers/simplePollerHelpers.d.ts +1 -1
  101. package/dist/commonjs/static-helpers/simplePollerHelpers.js.map +1 -1
  102. package/dist/commonjs/tsdoc-metadata.json +1 -1
  103. package/dist/esm/api/cloudEndpoints/index.d.ts +2 -2
  104. package/dist/esm/api/cloudEndpoints/index.js +1 -1
  105. package/dist/esm/api/cloudEndpoints/index.js.map +1 -1
  106. package/dist/esm/api/cloudEndpoints/operations.d.ts +6 -2
  107. package/dist/esm/api/cloudEndpoints/operations.js +59 -20
  108. package/dist/esm/api/cloudEndpoints/operations.js.map +1 -1
  109. package/dist/esm/api/cloudEndpoints/options.d.ts +5 -0
  110. package/dist/esm/api/cloudEndpoints/options.js.map +1 -1
  111. package/dist/esm/api/microsoftStorageSyncContext.js +4 -3
  112. package/dist/esm/api/microsoftStorageSyncContext.js.map +1 -1
  113. package/dist/esm/api/operationStatusOperations/operations.js +1 -1
  114. package/dist/esm/api/operationStatusOperations/operations.js.map +1 -1
  115. package/dist/esm/api/operations/operations.js +2 -2
  116. package/dist/esm/api/operations/operations.js.map +1 -1
  117. package/dist/esm/api/operations.js +1 -1
  118. package/dist/esm/api/operations.js.map +1 -1
  119. package/dist/esm/api/privateEndpointConnections/operations.js +7 -7
  120. package/dist/esm/api/privateEndpointConnections/operations.js.map +1 -1
  121. package/dist/esm/api/privateLinkResources/operations.js +1 -1
  122. package/dist/esm/api/privateLinkResources/operations.js.map +1 -1
  123. package/dist/esm/api/registeredServers/operations.js +11 -11
  124. package/dist/esm/api/registeredServers/operations.js.map +1 -1
  125. package/dist/esm/api/serverEndpoints/operations.js +11 -11
  126. package/dist/esm/api/serverEndpoints/operations.js.map +1 -1
  127. package/dist/esm/api/storageSyncServices/operations.js +12 -12
  128. package/dist/esm/api/storageSyncServices/operations.js.map +1 -1
  129. package/dist/esm/api/syncGroups/operations.js +5 -5
  130. package/dist/esm/api/syncGroups/operations.js.map +1 -1
  131. package/dist/esm/api/workflows/operations.js +4 -4
  132. package/dist/esm/api/workflows/operations.js.map +1 -1
  133. package/dist/esm/classic/cloudEndpoints/index.d.ts +8 -2
  134. package/dist/esm/classic/cloudEndpoints/index.js +10 -1
  135. package/dist/esm/classic/cloudEndpoints/index.js.map +1 -1
  136. package/dist/esm/index.d.ts +3 -3
  137. package/dist/esm/index.js +1 -1
  138. package/dist/esm/index.js.map +1 -1
  139. package/dist/esm/microsoftStorageSync.js +1 -8
  140. package/dist/esm/microsoftStorageSync.js.map +1 -1
  141. package/dist/esm/models/index.d.ts +2 -2
  142. package/dist/esm/models/index.js +1 -1
  143. package/dist/esm/models/index.js.map +1 -1
  144. package/dist/esm/models/models.d.ts +62 -5
  145. package/dist/esm/models/models.js +44 -2
  146. package/dist/esm/models/models.js.map +1 -1
  147. package/dist/esm/restorePollerHelpers.js +2 -1
  148. package/dist/esm/restorePollerHelpers.js.map +1 -1
  149. package/dist/esm/static-helpers/pollingHelpers.d.ts +1 -1
  150. package/dist/esm/static-helpers/pollingHelpers.js.map +1 -1
  151. package/dist/esm/static-helpers/simplePollerHelpers.d.ts +1 -1
  152. package/dist/esm/static-helpers/simplePollerHelpers.js.map +1 -1
  153. package/package.json +10 -10
@@ -73,6 +73,7 @@ const deserializeMap = {
73
73
  "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/postbackup": { deserializer: import_operations3._postBackupDeserialize, expectedStatuses: ["200", "202", "201"] },
74
74
  "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/prebackup": { deserializer: import_operations3._preBackupDeserialize, expectedStatuses: ["200", "202", "201"] },
75
75
  "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}": { deserializer: import_operations3._$deleteDeserialize, expectedStatuses: ["200", "202", "204"] },
76
+ "PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}": { deserializer: import_operations3._updateDeserialize, expectedStatuses: ["200", "202", "201"] },
76
77
  "PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}": { deserializer: import_operations3._createDeserialize, expectedStatuses: ["200", "202", "201"] },
77
78
  "DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}": {
78
79
  deserializer: import_operations4._$deleteDeserialize,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/restorePollerHelpers.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { MicrosoftStorageSync } from \"./microsoftStorageSync.js\";\nimport {\n _triggerRolloverDeserialize,\n _$deleteDeserialize,\n _updateDeserialize,\n _createDeserialize,\n} from \"./api/registeredServers/operations.js\";\nimport {\n _recallActionDeserialize,\n _$deleteDeserialize as _$deleteDeserializeServerEndpoints,\n _updateDeserialize as _updateDeserializeServerEndpoints,\n _createDeserialize as _createDeserializeServerEndpoints,\n} from \"./api/serverEndpoints/operations.js\";\nimport {\n _triggerChangeDetectionDeserialize,\n _postRestoreDeserialize,\n _preRestoreDeserialize,\n _postBackupDeserialize,\n _preBackupDeserialize,\n _$deleteDeserialize as _$deleteDeserializeCloudEndpoints,\n _createDeserialize as _createDeserializeCloudEndpoints,\n} from \"./api/cloudEndpoints/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializePrivateEndpointConnections,\n _createDeserialize as _createDeserializePrivateEndpointConnections,\n} from \"./api/privateEndpointConnections/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializeStorageSyncServices,\n _updateDeserialize as _updateDeserializeStorageSyncServices,\n _createDeserialize as _createDeserializeStorageSyncServices,\n} from \"./api/storageSyncServices/operations.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport type { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { PollerLike, OperationState, ResourceLocationConfig } from \"@azure/core-lro\";\nimport { deserializeState } from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: MicrosoftStorageSync,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n | ResourceLocationConfig\n | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n const apiVersion = getApiVersionFromUrl(initialRequestUrl);\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n apiVersion,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: (result: PathUncheckedResponse) => Promise<any>;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}/triggerRollover\":\n { deserializer: _triggerRolloverDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}\":\n { deserializer: _$deleteDeserialize, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}\":\n { deserializer: _updateDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}\":\n { deserializer: _createDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}/recallAction\":\n { deserializer: _recallActionDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}\":\n { deserializer: _$deleteDeserializeServerEndpoints, expectedStatuses: [\"200\", \"202\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}\":\n { deserializer: _updateDeserializeServerEndpoints, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}\":\n { deserializer: _createDeserializeServerEndpoints, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/triggerChangeDetection\":\n { deserializer: _triggerChangeDetectionDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/postrestore\":\n { deserializer: _postRestoreDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/prerestore\":\n { deserializer: _preRestoreDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/postbackup\":\n { deserializer: _postBackupDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/prebackup\":\n { deserializer: _preBackupDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}\":\n { deserializer: _$deleteDeserializeCloudEndpoints, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}\":\n { deserializer: _createDeserializeCloudEndpoints, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}\":\n {\n deserializer: _$deleteDeserializePrivateEndpointConnections,\n expectedStatuses: [\"200\", \"202\", \"204\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}\":\n {\n deserializer: _createDeserializePrivateEndpointConnections,\n expectedStatuses: [\"200\", \"202\", \"201\"],\n },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}\":\n {\n deserializer: _$deleteDeserializeStorageSyncServices,\n expectedStatuses: [\"200\", \"202\", \"204\"],\n },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}\":\n {\n deserializer: _updateDeserializeStorageSyncServices,\n expectedStatuses: [\"200\", \"202\", \"201\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}\":\n {\n deserializer: _createDeserializeStorageSyncServices,\n expectedStatuses: [\"200\", \"202\", \"201\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n\nfunction getApiVersionFromUrl(urlStr: string): string | undefined {\n const url = new URL(urlStr);\n return url.searchParams.get(\"api-version\") ?? undefined;\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,wBAKO;AACP,IAAAA,qBAKO;AACP,IAAAA,qBAQO;AACP,IAAAA,qBAGO;AACP,IAAAA,qBAIO;AACP,4BAAqC;AAIrC,sBAAiC;AAqB1B,SAAS,cACd,QACA,iBACA,iBACA,SAC8C;AAC9C,QAAM,mBAAe,kCAAiB,eAAe,EAAE;AACvD,QAAM,EAAE,mBAAmB,eAAe,SAAS,IAAI;AACvD,MAAI,CAAC,qBAAqB,CAAC,eAAe;AACxC,UAAM,IAAI;AAAA,MACR,6BAA6B,eAAe,wBAAwB,iBAAiB,IAAI;AAAA,IAC3F;AAAA,EACF;AACA,QAAM,yBAAyB,WAAW,wBAAwB;AAGlE,QAAM,EAAE,cAAc,mBAAmB,CAAC,EAAE,IAC1C,yBAAyB,mBAAmB,aAAa,KAAK,CAAC;AACjE,QAAM,oBAAoB,SAAS,uBAAuB;AAC1D,MAAI,CAAC,mBAAmB;AACtB,UAAM,IAAI;AAAA,MACR,0FAA0F,iBAAiB,IAAI;AAAA,IACjH;AAAA,EACF;AACA,QAAM,aAAa,qBAAqB,iBAAiB;AACzD,aAAO;AAAA,IACJ,OAAe,SAAS,KAA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GAAG,IAAI,GAC9C,MAAM,eAAe,CAAC,GAAG;AAK3B,cAAM,YAAY,IAAI,OAAO,GAAG,eAAe,CAAC,GAAG,MAAM,OAAO,GAAG,CAAC,EAAE,EAAE;AAAA,UACtE,UAAU,CAAC,KAAK;AAAA,QAClB;AAEA,YAAI,CAAC,WAAW;AACd,kBAAQ;AACR;AAAA,QACF;AACA;AAAA,MACF;AAKA,UAAI,eAAe,CAAC,MAAM,UAAU,CAAC,GAAG;AACtC,gBAAQ;AACR;AAAA,MACF;AAAA,IACF;AAIA,QAAI,SAAS,cAAc,SAAS,YAAY;AAC9C,mBAAa,cAAc;AAC3B,qBAAe;AAAA,IACjB;AAAA,EACF;AAEA,SAAO;AACT;AAEA,SAAS,kBAAkB,QAAwB;AACjD,QAAM,YAAY,OAAO,QAAQ,GAAG;AACpC,SAAO,OAAO,MAAM,SAAS;AAC/B;AAEA,SAAS,qBAAqB,QAAoC;AAChE,QAAM,MAAM,IAAI,IAAI,MAAM;AAC1B,SAAO,IAAI,aAAa,IAAI,aAAa,KAAK;AAChD;",
6
- "names": ["import_operations", "_$deleteDeserializeServerEndpoints", "_updateDeserializeServerEndpoints", "_createDeserializeServerEndpoints", "_$deleteDeserializeCloudEndpoints", "_createDeserializeCloudEndpoints", "_$deleteDeserializePrivateEndpointConnections", "_createDeserializePrivateEndpointConnections", "_$deleteDeserializeStorageSyncServices", "_updateDeserializeStorageSyncServices", "_createDeserializeStorageSyncServices"]
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { MicrosoftStorageSync } from \"./microsoftStorageSync.js\";\nimport {\n _triggerRolloverDeserialize,\n _$deleteDeserialize,\n _updateDeserialize,\n _createDeserialize,\n} from \"./api/registeredServers/operations.js\";\nimport {\n _recallActionDeserialize,\n _$deleteDeserialize as _$deleteDeserializeServerEndpoints,\n _updateDeserialize as _updateDeserializeServerEndpoints,\n _createDeserialize as _createDeserializeServerEndpoints,\n} from \"./api/serverEndpoints/operations.js\";\nimport {\n _triggerChangeDetectionDeserialize,\n _postRestoreDeserialize,\n _preRestoreDeserialize,\n _postBackupDeserialize,\n _preBackupDeserialize,\n _$deleteDeserialize as _$deleteDeserializeCloudEndpoints,\n _updateDeserialize as _updateDeserializeCloudEndpoints,\n _createDeserialize as _createDeserializeCloudEndpoints,\n} from \"./api/cloudEndpoints/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializePrivateEndpointConnections,\n _createDeserialize as _createDeserializePrivateEndpointConnections,\n} from \"./api/privateEndpointConnections/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializeStorageSyncServices,\n _updateDeserialize as _updateDeserializeStorageSyncServices,\n _createDeserialize as _createDeserializeStorageSyncServices,\n} from \"./api/storageSyncServices/operations.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport type { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { PollerLike, OperationState, ResourceLocationConfig } from \"@azure/core-lro\";\nimport { deserializeState } from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: MicrosoftStorageSync,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n ResourceLocationConfig | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n const apiVersion = getApiVersionFromUrl(initialRequestUrl);\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n apiVersion,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: (result: PathUncheckedResponse) => Promise<any>;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}/triggerRollover\":\n { deserializer: _triggerRolloverDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}\":\n { deserializer: _$deleteDeserialize, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}\":\n { deserializer: _updateDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/registeredServers/{serverId}\":\n { deserializer: _createDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}/recallAction\":\n { deserializer: _recallActionDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}\":\n { deserializer: _$deleteDeserializeServerEndpoints, expectedStatuses: [\"200\", \"202\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}\":\n { deserializer: _updateDeserializeServerEndpoints, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/serverEndpoints/{serverEndpointName}\":\n { deserializer: _createDeserializeServerEndpoints, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/triggerChangeDetection\":\n { deserializer: _triggerChangeDetectionDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/postrestore\":\n { deserializer: _postRestoreDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/prerestore\":\n { deserializer: _preRestoreDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/postbackup\":\n { deserializer: _postBackupDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}/prebackup\":\n { deserializer: _preBackupDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}\":\n { deserializer: _$deleteDeserializeCloudEndpoints, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}\":\n { deserializer: _updateDeserializeCloudEndpoints, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}\":\n { deserializer: _createDeserializeCloudEndpoints, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}\":\n {\n deserializer: _$deleteDeserializePrivateEndpointConnections,\n expectedStatuses: [\"200\", \"202\", \"204\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/privateEndpointConnections/{privateEndpointConnectionName}\":\n {\n deserializer: _createDeserializePrivateEndpointConnections,\n expectedStatuses: [\"200\", \"202\", \"201\"],\n },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}\":\n {\n deserializer: _$deleteDeserializeStorageSyncServices,\n expectedStatuses: [\"200\", \"202\", \"204\"],\n },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}\":\n {\n deserializer: _updateDeserializeStorageSyncServices,\n expectedStatuses: [\"200\", \"202\", \"201\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}\":\n {\n deserializer: _createDeserializeStorageSyncServices,\n expectedStatuses: [\"200\", \"202\", \"201\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n\nfunction getApiVersionFromUrl(urlStr: string): string | undefined {\n const url = new URL(urlStr);\n return url.searchParams.get(\"api-version\") ?? undefined;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,wBAKO;AACP,IAAAA,qBAKO;AACP,IAAAA,qBASO;AACP,IAAAA,qBAGO;AACP,IAAAA,qBAIO;AACP,4BAAqC;AAIrC,sBAAiC;AAqB1B,SAAS,cACd,QACA,iBACA,iBACA,SAC8C;AAC9C,QAAM,mBAAe,kCAAiB,eAAe,EAAE;AACvD,QAAM,EAAE,mBAAmB,eAAe,SAAS,IAAI;AACvD,MAAI,CAAC,qBAAqB,CAAC,eAAe;AACxC,UAAM,IAAI;AAAA,MACR,6BAA6B,eAAe,wBAAwB,iBAAiB,IAAI;AAAA,IAC3F;AAAA,EAC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KAAK,OAAO,QAAQ,cAAc,GAAG;AAGzD,QAAI,CAAC,IAAI,WAAW,MAAM,GAAG;AAC3B;AAAA,IACF;AACA,UAAM,gBAAgB,kBAAkB,GAAG;AAE3C,UAAM,iBAAiB,cAAc,MAAM,GAAG;AAG9C,QAAI,QAAQ;AACZ,aAAS,IAAI,eAAe,SAAS,GAAG,IAAI,UAAU,SAAS,GAAG,KAAK,KAAK,KAAK,GAAG,KAAK,KAAK;AAC5F,UAAI,eAAe,CAAC,GAAG,WAAW,GAAG,KAAK,eAAe,CAAC,GAAG,QAAQ,GAAG,MAAM,IAAI;AAChF,cAAM,QAAQ,eAAe,CAAC,EAAG,QAAQ,GAAG,IAAI,GAC9C,MAAM,eAAe,CAAC,GAAG;AAK3B,cAAM,YAAY,IAAI,OAAO,GAAG,eAAe,CAAC,GAAG,MAAM,OAAO,GAAG,CAAC,EAAE,EAAE;AAAA,UACtE,UAAU,CAAC,KAAK;AAAA,QAClB;AAEA,YAAI,CAAC,WAAW;AACd,kBAAQ;AACR;AAAA,QACF;AACA;AAAA,MACF;AAKA,UAAI,eAAe,CAAC,MAAM,UAAU,CAAC,GAAG;AACtC,gBAAQ;AACR;AAAA,MACF;AAAA,IACF;AAIA,QAAI,SAAS,cAAc,SAAS,YAAY;AAC9C,mBAAa,cAAc;AAC3B,qBAAe;AAAA,IACjB;AAAA,EACF;AAEA,SAAO;AACT;AAEA,SAAS,kBAAkB,QAAwB;AACjD,QAAM,YAAY,OAAO,QAAQ,GAAG;AACpC,SAAO,OAAO,MAAM,SAAS;AAC/B;AAEA,SAAS,qBAAqB,QAAoC;AAChE,QAAM,MAAM,IAAI,IAAI,MAAM;AAC1B,SAAO,IAAI,aAAa,IAAI,aAAa,KAAK;AAChD;",
6
+ "names": ["import_operations", "_$deleteDeserializeServerEndpoints", "_updateDeserializeServerEndpoints", "_createDeserializeServerEndpoints", "_$deleteDeserializeCloudEndpoints", "_updateDeserializeCloudEndpoints", "_createDeserializeCloudEndpoints", "_$deleteDeserializePrivateEndpointConnections", "_createDeserializePrivateEndpointConnections", "_$deleteDeserializeStorageSyncServices", "_updateDeserializeStorageSyncServices", "_createDeserializeStorageSyncServices"]
7
7
  }
@@ -1,4 +1,4 @@
1
- import type { PollerLike, OperationState, ResourceLocationConfig } from "@azure/core-lro";
1
+ import type { OperationState, PollerLike, ResourceLocationConfig } from "@azure/core-lro";
2
2
  import type { Client, PathUncheckedResponse } from "@azure-rest/core-client";
3
3
  import type { AbortSignalLike } from "@azure/abort-controller";
4
4
  export interface GetLongRunningPollerOptions<TResponse> {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/static-helpers/pollingHelpers.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PollerLike,\n OperationState,\n ResourceLocationConfig,\n RunningOperation,\n OperationResponse,\n} from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\n\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\n\nexport interface GetLongRunningPollerOptions<TResponse> {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /**\n * The potential location of the result of the LRO if specified by the LRO extension in the swagger.\n */\n resourceLocationConfig?: ResourceLocationConfig;\n /**\n * The original url of the LRO\n * Should not be null when restoreFrom is set\n */\n initialRequestUrl?: string;\n /**\n * A serialized poller which can be used to resume an existing paused Long-Running-Operation.\n */\n restoreFrom?: string;\n /**\n * The function to get the initial response\n */\n getInitialResponse?: () => PromiseLike<TResponse>;\n /**\n * The api-version of the LRO\n */\n apiVersion?: string;\n}\nexport function getLongRunningPoller<TResponse extends PathUncheckedResponse, TResult = void>(\n client: Client,\n processResponseBody: (result: TResponse) => Promise<TResult>,\n expectedStatuses: string[],\n options: GetLongRunningPollerOptions<TResponse>,\n): PollerLike<OperationState<TResult>, TResult> {\n const { restoreFrom, getInitialResponse, apiVersion } = options;\n if (!restoreFrom && !getInitialResponse) {\n throw new Error(\"Either restoreFrom or getInitialResponse must be specified\");\n }\n let initialResponse: TResponse | undefined = undefined;\n const pollAbortController = new AbortController();\n const poller: RunningOperation<TResponse> = {\n sendInitialRequest: async () => {\n if (!getInitialResponse) {\n throw new Error(\"getInitialResponse is required when initializing a new poller\");\n }\n initialResponse = await getInitialResponse();\n return getLroResponse(initialResponse, expectedStatuses);\n },\n sendPollRequest: async (\n path: string,\n pollOptions?: {\n abortSignal?: AbortSignalLike;\n },\n ) => {\n // The poll request would both listen to the user provided abort signal and the poller's own abort signal\n function abortListener(): void {\n pollAbortController.abort();\n }\n const abortSignal = pollAbortController.signal;\n if (options.abortSignal?.aborted) {\n pollAbortController.abort();\n } else if (pollOptions?.abortSignal?.aborted) {\n pollAbortController.abort();\n } else if (!abortSignal.aborted) {\n options.abortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n pollOptions?.abortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n }\n let response;\n try {\n const pollingPath = apiVersion ? addApiVersionToUrl(path, apiVersion) : path;\n response = await client.pathUnchecked(pollingPath).get({ abortSignal });\n } finally {\n options.abortSignal?.removeEventListener(\"abort\", abortListener);\n pollOptions?.abortSignal?.removeEventListener(\"abort\", abortListener);\n }\n\n return getLroResponse(response as TResponse, expectedStatuses);\n },\n };\n return createHttpPoller(poller, {\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: options?.resourceLocationConfig,\n restoreFrom: options?.restoreFrom,\n processResult: (result: unknown) => {\n return processResponseBody(result as TResponse);\n },\n });\n}\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @param deserializeFn - deserialize function to convert Rest response to modular output\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResponse extends PathUncheckedResponse>(\n response: TResponse,\n expectedStatuses: string[],\n): OperationResponse<TResponse> {\n if (!expectedStatuses.includes(response.status)) {\n throw createRestError(response);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n\n/**\n * Adds the api-version query parameter on a URL if it's not present.\n * @param url - the URL to modify\n * @param apiVersion - the API version to set\n * @returns - the URL with the api-version query parameter set\n */\nfunction addApiVersionToUrl(url: string, apiVersion: string): string {\n // The base URL is only used for parsing and won't appear in the returned URL\n const urlObj = new URL(url, \"https://microsoft.com\");\n if (!urlObj.searchParams.get(\"api-version\")) {\n // Append one if there is no apiVersion\n return `${url}${urlObj.search ? \"&\" : \"?\"}api-version=${apiVersion}`;\n }\n return url;\n}\n"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n OperationResponse,\n OperationState,\n PollerLike,\n ResourceLocationConfig,\n RunningOperation,\n} from \"@azure/core-lro\";\nimport { createHttpPoller } from \"@azure/core-lro\";\n\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\n\nexport interface GetLongRunningPollerOptions<TResponse> {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /**\n * The potential location of the result of the LRO if specified by the LRO extension in the swagger.\n */\n resourceLocationConfig?: ResourceLocationConfig;\n /**\n * The original url of the LRO\n * Should not be null when restoreFrom is set\n */\n initialRequestUrl?: string;\n /**\n * A serialized poller which can be used to resume an existing paused Long-Running-Operation.\n */\n restoreFrom?: string;\n /**\n * The function to get the initial response\n */\n getInitialResponse?: () => PromiseLike<TResponse>;\n /**\n * The api-version of the LRO\n */\n apiVersion?: string;\n}\nexport function getLongRunningPoller<TResponse extends PathUncheckedResponse, TResult = void>(\n client: Client,\n processResponseBody: (result: TResponse) => Promise<TResult>,\n expectedStatuses: string[],\n options: GetLongRunningPollerOptions<TResponse>,\n): PollerLike<OperationState<TResult>, TResult> {\n const { restoreFrom, getInitialResponse, apiVersion } = options;\n if (!restoreFrom && !getInitialResponse) {\n throw new Error(\"Either restoreFrom or getInitialResponse must be specified\");\n }\n let initialResponse: TResponse | undefined = undefined;\n const pollAbortController = new AbortController();\n const poller: RunningOperation<TResponse> = {\n sendInitialRequest: async () => {\n if (!getInitialResponse) {\n throw new Error(\"getInitialResponse is required when initializing a new poller\");\n }\n initialResponse = await getInitialResponse();\n return getLroResponse(initialResponse, expectedStatuses);\n },\n sendPollRequest: async (\n path: string,\n pollOptions?: {\n abortSignal?: AbortSignalLike;\n },\n ) => {\n // The poll request would both listen to the user provided abort signal and the poller's own abort signal\n function abortListener(): void {\n pollAbortController.abort();\n }\n const abortSignal = pollAbortController.signal;\n if (options.abortSignal?.aborted) {\n pollAbortController.abort();\n } else if (pollOptions?.abortSignal?.aborted) {\n pollAbortController.abort();\n } else if (!abortSignal.aborted) {\n options.abortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n pollOptions?.abortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n }\n let response;\n try {\n const pollingPath = apiVersion ? addApiVersionToUrl(path, apiVersion) : path;\n response = await client.pathUnchecked(pollingPath).get({ abortSignal });\n } finally {\n options.abortSignal?.removeEventListener(\"abort\", abortListener);\n pollOptions?.abortSignal?.removeEventListener(\"abort\", abortListener);\n }\n\n return getLroResponse(response as TResponse, expectedStatuses);\n },\n };\n return createHttpPoller(poller, {\n intervalInMs: options?.updateIntervalInMs,\n resourceLocationConfig: options?.resourceLocationConfig,\n restoreFrom: options?.restoreFrom,\n processResult: (result: unknown) => {\n return processResponseBody(result as TResponse);\n },\n });\n}\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @param deserializeFn - deserialize function to convert Rest response to modular output\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResponse extends PathUncheckedResponse>(\n response: TResponse,\n expectedStatuses: string[],\n): OperationResponse<TResponse> {\n if (!expectedStatuses.includes(response.status)) {\n throw createRestError(response);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n\n/**\n * Adds the api-version query parameter on a URL if it's not present.\n * @param url - the URL to modify\n * @param apiVersion - the API version to set\n * @returns - the URL with the api-version query parameter set\n */\nfunction addApiVersionToUrl(url: string, apiVersion: string): string {\n // The base URL is only used for parsing and won't appear in the returned URL\n const urlObj = new URL(url, \"https://microsoft.com\");\n if (!urlObj.searchParams.get(\"api-version\")) {\n // Append one if there is no apiVersion\n return `${url}${urlObj.search ? \"&\" : \"?\"}api-version=${apiVersion}`;\n }\n return url;\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,sBAAiC;AAGjC,yBAAgC;AAgCzB,SAAS,qBACd,QACA,qBACA,kBACA,SAC8C;AAC9C,QAAM,EAAE,aAAa,oBAAoB,WAAW,IAAI;AACxD,MAAI,CAAC,eAAe,CAAC,oBAAoB;AACvC,UAAM,IAAI,MAAM,4DAA4D;AAAA,EAC9E;AACA,MAAI,kBAAyC;AAC7C,QAAM,sBAAsB,IAAI,gBAAgB;AAChD,QAAM,SAAsC;AAAA,IAC1C,oBAAoB,YAAY;AAC9B,UAAI,CAAC,oBAAoB;AACvB,cAAM,IAAI,MAAM,+DAA+D;AAAA,MACjF;AACA,wBAAkB,MAAM,mBAAmB;AAC3C,aAAO,eAAe,iBAAiB,gBAAgB;AAAA,IACzD;AAAA,IACA,iBAAiB,OACf,MACA,gBAGG;AAEH,eAAS,gBAAsB;AAC7B,4BAAoB,MAAM;AAAA,MAC5B;AACA,YAAM,cAAc,oBAAoB;AACxC,UAAI,QAAQ,aAAa,SAAS;AAChC,4BAAoB,MAAM;AAAA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AAA,EACpE;AACA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
- import type { PollerLike, OperationState, CancelOnProgress } from "@azure/core-lro";
2
1
  import type { AbortSignalLike } from "@azure/abort-controller";
2
+ import type { CancelOnProgress, OperationState, PollerLike } from "@azure/core-lro";
3
3
  /**
4
4
  * A simple poller that can be used to poll a long running operation.
5
5
  */
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/static-helpers/simplePollerHelpers.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { PollerLike, OperationState, CancelOnProgress } from \"@azure/core-lro\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\n\n/**\n * A simple poller that can be used to poll a long running operation.\n */\nexport interface SimplePollerLike<TState extends OperationState<TResult>, TResult> {\n /**\n * Returns true if the poller has finished polling.\n */\n isDone(): boolean;\n /**\n * Returns the state of the operation.\n */\n getOperationState(): TState;\n /**\n * Returns the result value of the operation,\n * regardless of the state of the poller.\n * It can return undefined or an incomplete form of the final TResult value\n * depending on the implementation.\n */\n getResult(): TResult | undefined;\n /**\n * Returns a promise that will resolve once a single polling request finishes.\n * It does this by calling the update method of the Poller's operation.\n */\n poll(options?: { abortSignal?: AbortSignalLike }): Promise<TState>;\n /**\n * Returns a promise that will resolve once the underlying operation is completed.\n */\n pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise<TResult>;\n /**\n * Invokes the provided callback after each polling is completed,\n * sending the current state of the poller's operation.\n *\n * It returns a method that can be used to stop receiving updates on the given callback function.\n */\n onProgress(callback: (state: TState) => void): CancelOnProgress;\n\n /**\n * Returns a promise that could be used for serialized version of the poller's operation\n * by invoking the operation's serialize method.\n */\n serialize(): Promise<string>;\n\n /**\n * Wait the poller to be submitted.\n */\n submitted(): Promise<void>;\n\n /**\n * Returns a string representation of the poller's operation. Similar to serialize but returns a string.\n * @deprecated Use serialize() instead.\n */\n toString(): string;\n\n /**\n * Stops the poller from continuing to poll. Please note this will only stop the client-side polling\n * @deprecated Use abortSignal to stop polling instead.\n */\n stopPolling(): void;\n\n /**\n * Returns true if the poller is stopped.\n * @deprecated Use abortSignal status to track this instead.\n */\n isStopped(): boolean;\n}\n\n/**\n * Create the deprecated SimplePollerLike from PollerLike\n * @param poller PollerLike to convert\n * @returns SimplePollerLike\n */\nexport function getSimplePoller<TResult>(\n poller: PollerLike<OperationState<TResult>, TResult>,\n): SimplePollerLike<OperationState<TResult>, TResult> {\n const simplePoller: SimplePollerLike<OperationState<TResult>, TResult> = {\n isDone() {\n return poller.isDone;\n },\n isStopped() {\n throw new Error(\"isStopped is deprecated. Use abortSignal status to track this instead.\");\n },\n getOperationState() {\n if (!poller.operationState) {\n throw new Error(\n \"Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().\",\n );\n }\n return poller.operationState;\n },\n getResult() {\n return poller.result;\n },\n toString() {\n if (!poller.operationState) {\n throw new Error(\n \"Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().\",\n );\n }\n return JSON.stringify({\n state: poller.operationState,\n });\n },\n stopPolling() {\n throw new Error(\"stopPolling is deprecated. Use abortSignal to stop polling instead.\");\n },\n onProgress: poller.onProgress,\n poll: poller.poll,\n pollUntilDone: poller.pollUntilDone,\n serialize: poller.serialize,\n submitted: poller.submitted,\n };\n return simplePoller;\n}\n"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { CancelOnProgress, OperationState, PollerLike } from \"@azure/core-lro\";\n\n/**\n * A simple poller that can be used to poll a long running operation.\n */\nexport interface SimplePollerLike<TState extends OperationState<TResult>, TResult> {\n /**\n * Returns true if the poller has finished polling.\n */\n isDone(): boolean;\n /**\n * Returns the state of the operation.\n */\n getOperationState(): TState;\n /**\n * Returns the result value of the operation,\n * regardless of the state of the poller.\n * It can return undefined or an incomplete form of the final TResult value\n * depending on the implementation.\n */\n getResult(): TResult | undefined;\n /**\n * Returns a promise that will resolve once a single polling request finishes.\n * It does this by calling the update method of the Poller's operation.\n */\n poll(options?: { abortSignal?: AbortSignalLike }): Promise<TState>;\n /**\n * Returns a promise that will resolve once the underlying operation is completed.\n */\n pollUntilDone(pollOptions?: { abortSignal?: AbortSignalLike }): Promise<TResult>;\n /**\n * Invokes the provided callback after each polling is completed,\n * sending the current state of the poller's operation.\n *\n * It returns a method that can be used to stop receiving updates on the given callback function.\n */\n onProgress(callback: (state: TState) => void): CancelOnProgress;\n\n /**\n * Returns a promise that could be used for serialized version of the poller's operation\n * by invoking the operation's serialize method.\n */\n serialize(): Promise<string>;\n\n /**\n * Wait the poller to be submitted.\n */\n submitted(): Promise<void>;\n\n /**\n * Returns a string representation of the poller's operation. Similar to serialize but returns a string.\n * @deprecated Use serialize() instead.\n */\n toString(): string;\n\n /**\n * Stops the poller from continuing to poll. Please note this will only stop the client-side polling\n * @deprecated Use abortSignal to stop polling instead.\n */\n stopPolling(): void;\n\n /**\n * Returns true if the poller is stopped.\n * @deprecated Use abortSignal status to track this instead.\n */\n isStopped(): boolean;\n}\n\n/**\n * Create the deprecated SimplePollerLike from PollerLike\n * @param poller PollerLike to convert\n * @returns SimplePollerLike\n */\nexport function getSimplePoller<TResult>(\n poller: PollerLike<OperationState<TResult>, TResult>,\n): SimplePollerLike<OperationState<TResult>, TResult> {\n const simplePoller: SimplePollerLike<OperationState<TResult>, TResult> = {\n isDone() {\n return poller.isDone;\n },\n isStopped() {\n throw new Error(\"isStopped is deprecated. Use abortSignal status to track this instead.\");\n },\n getOperationState() {\n if (!poller.operationState) {\n throw new Error(\n \"Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().\",\n );\n }\n return poller.operationState;\n },\n getResult() {\n return poller.result;\n },\n toString() {\n if (!poller.operationState) {\n throw new Error(\n \"Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().\",\n );\n }\n return JSON.stringify({\n state: poller.operationState,\n });\n },\n stopPolling() {\n throw new Error(\"stopPolling is deprecated. Use abortSignal to stop polling instead.\");\n },\n onProgress: poller.onProgress,\n poll: poller.poll,\n pollUntilDone: poller.pollUntilDone,\n serialize: poller.serialize,\n submitted: poller.submitted,\n };\n return simplePoller;\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA6EO,SAAS,gBACd,QACoD;AACpD,QAAM,eAAmE;AAAA,IACvE,SAAS;AACP,aAAO,OAAO;AAAA,IAChB;AAAA,IACA,YAAY;AACV,YAAM,IAAI,MAAM,wEAAwE;AAAA,IAC1F;AAAA,IACA,oBAAoB;AAClB,UAAI,CAAC,OAAO,gBAAgB;AAC1B,cAAM,IAAI;AAAA,UACR;AAAA,QACF;AAAA,MACF;AACA,aAAO,OAAO;AAAA,IAChB;AAAA,IACA,YAAY;AACV,aAAO,OAAO;AAAA,IAChB;AAAA,IACA,WAAW;AACT,UAAI,CAAC,OAAO,gBAAgB;AAC1B,cAAM,IAAI;AAAA,UACR;AAAA,QACF;AAAA,MACF;AACA,aAAO,KAAK,UAAU;AAAA,QACpB,OAAO,OAAO;AAAA,MAChB,CAAC;AAAA,IACH;AAAA,IACA,cAAc;AACZ,YAAM,IAAI,MAAM,qEAAqE;AAAA,IACvF;AAAA,IACA,YAAY,OAAO;AAAA,IACnB,MAAM,OAAO;AAAA,IACb,eAAe,OAAO;AAAA,IACtB,WAAW,OAAO;AAAA,IAClB,WAAW,OAAO;AAAA,EACpB;AACA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.58.7"
8
+ "packageVersion": "7.58.12"
9
9
  }
10
10
  ]
11
11
  }
@@ -1,3 +1,3 @@
1
- export { afsShareMetadataCertificatePublicKeys, triggerChangeDetection, postRestore, restoreheartbeat, preRestore, postBackup, preBackup, listBySyncGroup, $delete, create, get, } from "./operations.js";
2
- export type { CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams, CloudEndpointsTriggerChangeDetectionOptionalParams, CloudEndpointsPostRestoreOptionalParams, CloudEndpointsRestoreheartbeatOptionalParams, CloudEndpointsPreRestoreOptionalParams, CloudEndpointsPostBackupOptionalParams, CloudEndpointsPreBackupOptionalParams, CloudEndpointsListBySyncGroupOptionalParams, CloudEndpointsDeleteOptionalParams, CloudEndpointsCreateOptionalParams, CloudEndpointsGetOptionalParams, } from "./options.js";
1
+ export { afsShareMetadataCertificatePublicKeys, triggerChangeDetection, postRestore, restoreheartbeat, preRestore, postBackup, preBackup, listBySyncGroup, $delete, update, create, get, } from "./operations.js";
2
+ export type { CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams, CloudEndpointsTriggerChangeDetectionOptionalParams, CloudEndpointsPostRestoreOptionalParams, CloudEndpointsRestoreheartbeatOptionalParams, CloudEndpointsPreRestoreOptionalParams, CloudEndpointsPostBackupOptionalParams, CloudEndpointsPreBackupOptionalParams, CloudEndpointsListBySyncGroupOptionalParams, CloudEndpointsDeleteOptionalParams, CloudEndpointsUpdateOptionalParams, CloudEndpointsCreateOptionalParams, CloudEndpointsGetOptionalParams, } from "./options.js";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- export { afsShareMetadataCertificatePublicKeys, triggerChangeDetection, postRestore, restoreheartbeat, preRestore, postBackup, preBackup, listBySyncGroup, $delete, create, get, } from "./operations.js";
3
+ export { afsShareMetadataCertificatePublicKeys, triggerChangeDetection, postRestore, restoreheartbeat, preRestore, postBackup, preBackup, listBySyncGroup, $delete, update, create, get, } from "./operations.js";
4
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/cloudEndpoints/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,qCAAqC,EACrC,sBAAsB,EACtB,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,MAAM,EACN,GAAG,GACJ,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport {\n afsShareMetadataCertificatePublicKeys,\n triggerChangeDetection,\n postRestore,\n restoreheartbeat,\n preRestore,\n postBackup,\n preBackup,\n listBySyncGroup,\n $delete,\n create,\n get,\n} from \"./operations.js\";\nexport type {\n CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams,\n CloudEndpointsTriggerChangeDetectionOptionalParams,\n CloudEndpointsPostRestoreOptionalParams,\n CloudEndpointsRestoreheartbeatOptionalParams,\n CloudEndpointsPreRestoreOptionalParams,\n CloudEndpointsPostBackupOptionalParams,\n CloudEndpointsPreBackupOptionalParams,\n CloudEndpointsListBySyncGroupOptionalParams,\n CloudEndpointsDeleteOptionalParams,\n CloudEndpointsCreateOptionalParams,\n CloudEndpointsGetOptionalParams,\n} from \"./options.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/cloudEndpoints/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,qCAAqC,EACrC,sBAAsB,EACtB,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,SAAS,EACT,eAAe,EACf,OAAO,EACP,MAAM,EACN,MAAM,EACN,GAAG,GACJ,MAAM,iBAAiB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport {\n afsShareMetadataCertificatePublicKeys,\n triggerChangeDetection,\n postRestore,\n restoreheartbeat,\n preRestore,\n postBackup,\n preBackup,\n listBySyncGroup,\n $delete,\n update,\n create,\n get,\n} from \"./operations.js\";\nexport type {\n CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams,\n CloudEndpointsTriggerChangeDetectionOptionalParams,\n CloudEndpointsPostRestoreOptionalParams,\n CloudEndpointsRestoreheartbeatOptionalParams,\n CloudEndpointsPreRestoreOptionalParams,\n CloudEndpointsPostBackupOptionalParams,\n CloudEndpointsPreBackupOptionalParams,\n CloudEndpointsListBySyncGroupOptionalParams,\n CloudEndpointsDeleteOptionalParams,\n CloudEndpointsUpdateOptionalParams,\n CloudEndpointsCreateOptionalParams,\n CloudEndpointsGetOptionalParams,\n} from \"./options.js\";\n"]}
@@ -1,7 +1,7 @@
1
1
  import type { MicrosoftStorageSyncContext as Client } from "../index.js";
2
- import type { CloudEndpoint, CloudEndpointCreateParameters, _CloudEndpointArray, BackupRequest, PostBackupResponse, PreRestoreRequest, PostRestoreRequest, TriggerChangeDetectionParameters, CloudEndpointAfsShareMetadataCertificatePublicKeys } from "../../models/models.js";
2
+ import type { CloudEndpoint, CloudEndpointCreateParameters, CloudEndpointUpdateParameters, _CloudEndpointArray, BackupRequest, PostBackupResponse, PreRestoreRequest, PostRestoreRequest, TriggerChangeDetectionParameters, CloudEndpointAfsShareMetadataCertificatePublicKeys } from "../../models/models.js";
3
3
  import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js";
4
- import type { CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams, CloudEndpointsTriggerChangeDetectionOptionalParams, CloudEndpointsPostRestoreOptionalParams, CloudEndpointsRestoreheartbeatOptionalParams, CloudEndpointsPreRestoreOptionalParams, CloudEndpointsPostBackupOptionalParams, CloudEndpointsPreBackupOptionalParams, CloudEndpointsListBySyncGroupOptionalParams, CloudEndpointsDeleteOptionalParams, CloudEndpointsCreateOptionalParams, CloudEndpointsGetOptionalParams } from "./options.js";
4
+ import type { CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams, CloudEndpointsTriggerChangeDetectionOptionalParams, CloudEndpointsPostRestoreOptionalParams, CloudEndpointsRestoreheartbeatOptionalParams, CloudEndpointsPreRestoreOptionalParams, CloudEndpointsPostBackupOptionalParams, CloudEndpointsPreBackupOptionalParams, CloudEndpointsListBySyncGroupOptionalParams, CloudEndpointsDeleteOptionalParams, CloudEndpointsUpdateOptionalParams, CloudEndpointsCreateOptionalParams, CloudEndpointsGetOptionalParams } from "./options.js";
5
5
  import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client";
6
6
  import type { PollerLike, OperationState } from "@azure/core-lro";
7
7
  export declare function _afsShareMetadataCertificatePublicKeysSend(context: Client, resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, options?: CloudEndpointsAfsShareMetadataCertificatePublicKeysOptionalParams): StreamableMethod;
@@ -40,6 +40,10 @@ export declare function _$deleteSend(context: Client, resourceGroupName: string,
40
40
  export declare function _$deleteDeserialize(result: PathUncheckedResponse): Promise<void>;
41
41
  /** Delete a given CloudEndpoint. */
42
42
  export declare function $delete(context: Client, resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, options?: CloudEndpointsDeleteOptionalParams): PollerLike<OperationState<void>, void>;
43
+ export declare function _updateSend(context: Client, resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, properties: CloudEndpointUpdateParameters, options?: CloudEndpointsUpdateOptionalParams): StreamableMethod;
44
+ export declare function _updateDeserialize(result: PathUncheckedResponse): Promise<CloudEndpoint>;
45
+ /** Patch a given CloudEndpoint. */
46
+ export declare function update(context: Client, resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, properties: CloudEndpointUpdateParameters, options?: CloudEndpointsUpdateOptionalParams): PollerLike<OperationState<CloudEndpoint>, CloudEndpoint>;
43
47
  export declare function _createSend(context: Client, resourceGroupName: string, storageSyncServiceName: string, syncGroupName: string, cloudEndpointName: string, parameters: CloudEndpointCreateParameters, options?: CloudEndpointsCreateOptionalParams): StreamableMethod;
44
48
  export declare function _createDeserialize(result: PathUncheckedResponse): Promise<CloudEndpoint>;
45
49
  /** Create a new CloudEndpoint. */
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import { storageSyncErrorDeserializer, cloudEndpointDeserializer, cloudEndpointCreateParametersSerializer, _cloudEndpointArrayDeserializer, backupRequestSerializer, postBackupResponseDeserializer, preRestoreRequestSerializer, postRestoreRequestSerializer, triggerChangeDetectionParametersSerializer, cloudEndpointAfsShareMetadataCertificatePublicKeysDeserializer, } from "../../models/models.js";
3
+ import { storageSyncErrorDeserializer, cloudEndpointDeserializer, cloudEndpointCreateParametersSerializer, cloudEndpointUpdateParametersSerializer, _cloudEndpointArrayDeserializer, backupRequestSerializer, postBackupResponseDeserializer, preRestoreRequestSerializer, postRestoreRequestSerializer, triggerChangeDetectionParametersSerializer, cloudEndpointAfsShareMetadataCertificatePublicKeysDeserializer, } from "../../models/models.js";
4
4
  import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js";
5
5
  import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js";
6
6
  import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js";
@@ -14,7 +14,7 @@ export function _afsShareMetadataCertificatePublicKeysSend(context, resourceGrou
14
14
  storageSyncServiceName: storageSyncServiceName,
15
15
  syncGroupName: syncGroupName,
16
16
  cloudEndpointName: cloudEndpointName,
17
- "api%2Dversion": context.apiVersion ?? "2022-09-01",
17
+ "api%2Dversion": context.apiVersion ?? "2025-12-01",
18
18
  }, {
19
19
  allowReserved: options?.requestOptions?.skipUrlEncoding,
20
20
  });
@@ -48,7 +48,7 @@ export function _triggerChangeDetectionSend(context, resourceGroupName, storageS
48
48
  storageSyncServiceName: storageSyncServiceName,
49
49
  syncGroupName: syncGroupName,
50
50
  cloudEndpointName: cloudEndpointName,
51
- "api%2Dversion": context.apiVersion ?? "2022-09-01",
51
+ "api%2Dversion": context.apiVersion ?? "2025-12-01",
52
52
  }, {
53
53
  allowReserved: options?.requestOptions?.skipUrlEncoding,
54
54
  });
@@ -76,7 +76,7 @@ export function triggerChangeDetection(context, resourceGroupName, storageSyncSe
76
76
  abortSignal: options?.abortSignal,
77
77
  getInitialResponse: () => _triggerChangeDetectionSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, options),
78
78
  resourceLocationConfig: "location",
79
- apiVersion: context.apiVersion ?? "2022-09-01",
79
+ apiVersion: context.apiVersion ?? "2025-12-01",
80
80
  });
81
81
  }
82
82
  export function _postRestoreSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, options = { requestOptions: {} }) {
@@ -86,7 +86,7 @@ export function _postRestoreSend(context, resourceGroupName, storageSyncServiceN
86
86
  storageSyncServiceName: storageSyncServiceName,
87
87
  syncGroupName: syncGroupName,
88
88
  cloudEndpointName: cloudEndpointName,
89
- "api%2Dversion": context.apiVersion ?? "2022-09-01",
89
+ "api%2Dversion": context.apiVersion ?? "2025-12-01",
90
90
  }, {
91
91
  allowReserved: options?.requestOptions?.skipUrlEncoding,
92
92
  });
@@ -114,7 +114,7 @@ export function postRestore(context, resourceGroupName, storageSyncServiceName,
114
114
  abortSignal: options?.abortSignal,
115
115
  getInitialResponse: () => _postRestoreSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, options),
116
116
  resourceLocationConfig: "location",
117
- apiVersion: context.apiVersion ?? "2022-09-01",
117
+ apiVersion: context.apiVersion ?? "2025-12-01",
118
118
  });
119
119
  }
120
120
  export function _restoreheartbeatSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, options = { requestOptions: {} }) {
@@ -124,7 +124,7 @@ export function _restoreheartbeatSend(context, resourceGroupName, storageSyncSer
124
124
  storageSyncServiceName: storageSyncServiceName,
125
125
  syncGroupName: syncGroupName,
126
126
  cloudEndpointName: cloudEndpointName,
127
- "api%2Dversion": context.apiVersion ?? "2022-09-01",
127
+ "api%2Dversion": context.apiVersion ?? "2025-12-01",
128
128
  }, {
129
129
  allowReserved: options?.requestOptions?.skipUrlEncoding,
130
130
  });
@@ -153,7 +153,7 @@ export function _preRestoreSend(context, resourceGroupName, storageSyncServiceNa
153
153
  storageSyncServiceName: storageSyncServiceName,
154
154
  syncGroupName: syncGroupName,
155
155
  cloudEndpointName: cloudEndpointName,
156
- "api%2Dversion": context.apiVersion ?? "2022-09-01",
156
+ "api%2Dversion": context.apiVersion ?? "2025-12-01",
157
157
  }, {
158
158
  allowReserved: options?.requestOptions?.skipUrlEncoding,
159
159
  });
@@ -181,7 +181,7 @@ export function preRestore(context, resourceGroupName, storageSyncServiceName, s
181
181
  abortSignal: options?.abortSignal,
182
182
  getInitialResponse: () => _preRestoreSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, options),
183
183
  resourceLocationConfig: "location",
184
- apiVersion: context.apiVersion ?? "2022-09-01",
184
+ apiVersion: context.apiVersion ?? "2025-12-01",
185
185
  });
186
186
  }
187
187
  export function _postBackupSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, options = { requestOptions: {} }) {
@@ -191,7 +191,7 @@ export function _postBackupSend(context, resourceGroupName, storageSyncServiceNa
191
191
  storageSyncServiceName: storageSyncServiceName,
192
192
  syncGroupName: syncGroupName,
193
193
  cloudEndpointName: cloudEndpointName,
194
- "api%2Dversion": context.apiVersion ?? "2022-09-01",
194
+ "api%2Dversion": context.apiVersion ?? "2025-12-01",
195
195
  }, {
196
196
  allowReserved: options?.requestOptions?.skipUrlEncoding,
197
197
  });
@@ -220,7 +220,7 @@ export function postBackup(context, resourceGroupName, storageSyncServiceName, s
220
220
  abortSignal: options?.abortSignal,
221
221
  getInitialResponse: () => _postBackupSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, options),
222
222
  resourceLocationConfig: "location",
223
- apiVersion: context.apiVersion ?? "2022-09-01",
223
+ apiVersion: context.apiVersion ?? "2025-12-01",
224
224
  });
225
225
  }
226
226
  export function _preBackupSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, options = { requestOptions: {} }) {
@@ -230,7 +230,7 @@ export function _preBackupSend(context, resourceGroupName, storageSyncServiceNam
230
230
  storageSyncServiceName: storageSyncServiceName,
231
231
  syncGroupName: syncGroupName,
232
232
  cloudEndpointName: cloudEndpointName,
233
- "api%2Dversion": context.apiVersion ?? "2022-09-01",
233
+ "api%2Dversion": context.apiVersion ?? "2025-12-01",
234
234
  }, {
235
235
  allowReserved: options?.requestOptions?.skipUrlEncoding,
236
236
  });
@@ -258,7 +258,7 @@ export function preBackup(context, resourceGroupName, storageSyncServiceName, sy
258
258
  abortSignal: options?.abortSignal,
259
259
  getInitialResponse: () => _preBackupSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, options),
260
260
  resourceLocationConfig: "location",
261
- apiVersion: context.apiVersion ?? "2022-09-01",
261
+ apiVersion: context.apiVersion ?? "2025-12-01",
262
262
  });
263
263
  }
264
264
  export function _listBySyncGroupSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, options = { requestOptions: {} }) {
@@ -267,7 +267,7 @@ export function _listBySyncGroupSend(context, resourceGroupName, storageSyncServ
267
267
  resourceGroupName: resourceGroupName,
268
268
  storageSyncServiceName: storageSyncServiceName,
269
269
  syncGroupName: syncGroupName,
270
- "api%2Dversion": context.apiVersion ?? "2022-09-01",
270
+ "api%2Dversion": context.apiVersion ?? "2025-12-01",
271
271
  }, {
272
272
  allowReserved: options?.requestOptions?.skipUrlEncoding,
273
273
  });
@@ -289,7 +289,7 @@ export async function _listBySyncGroupDeserialize(result) {
289
289
  }
290
290
  /** Get a CloudEndpoint List. */
291
291
  export function listBySyncGroup(context, resourceGroupName, storageSyncServiceName, syncGroupName, options = { requestOptions: {} }) {
292
- return buildPagedAsyncIterator(context, () => _listBySyncGroupSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, options), _listBySyncGroupDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink", apiVersion: context.apiVersion ?? "2022-09-01" });
292
+ return buildPagedAsyncIterator(context, () => _listBySyncGroupSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, options), _listBySyncGroupDeserialize, ["200"], { itemName: "value", nextLinkName: "nextLink", apiVersion: context.apiVersion ?? "2025-12-01" });
293
293
  }
294
294
  export function _$deleteSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, options = { requestOptions: {} }) {
295
295
  const path = expandUrlTemplate("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}{?api%2Dversion}", {
@@ -298,7 +298,7 @@ export function _$deleteSend(context, resourceGroupName, storageSyncServiceName,
298
298
  storageSyncServiceName: storageSyncServiceName,
299
299
  syncGroupName: syncGroupName,
300
300
  cloudEndpointName: cloudEndpointName,
301
- "api%2Dversion": context.apiVersion ?? "2022-09-01",
301
+ "api%2Dversion": context.apiVersion ?? "2025-12-01",
302
302
  }, {
303
303
  allowReserved: options?.requestOptions?.skipUrlEncoding,
304
304
  });
@@ -322,7 +322,46 @@ export function $delete(context, resourceGroupName, storageSyncServiceName, sync
322
322
  abortSignal: options?.abortSignal,
323
323
  getInitialResponse: () => _$deleteSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, options),
324
324
  resourceLocationConfig: "location",
325
- apiVersion: context.apiVersion ?? "2022-09-01",
325
+ apiVersion: context.apiVersion ?? "2025-12-01",
326
+ });
327
+ }
328
+ export function _updateSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, properties, options = { requestOptions: {} }) {
329
+ const path = expandUrlTemplate("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageSync/storageSyncServices/{storageSyncServiceName}/syncGroups/{syncGroupName}/cloudEndpoints/{cloudEndpointName}{?api%2Dversion}", {
330
+ subscriptionId: context.subscriptionId,
331
+ resourceGroupName: resourceGroupName,
332
+ storageSyncServiceName: storageSyncServiceName,
333
+ syncGroupName: syncGroupName,
334
+ cloudEndpointName: cloudEndpointName,
335
+ "api%2Dversion": context.apiVersion ?? "2025-12-01",
336
+ }, {
337
+ allowReserved: options?.requestOptions?.skipUrlEncoding,
338
+ });
339
+ return context.path(path).patch({
340
+ ...operationOptionsToRequestParameters(options),
341
+ contentType: "application/json",
342
+ headers: { accept: "application/json", ...options.requestOptions?.headers },
343
+ body: cloudEndpointUpdateParametersSerializer(properties),
344
+ });
345
+ }
346
+ export async function _updateDeserialize(result) {
347
+ const expectedStatuses = ["200", "202", "201"];
348
+ if (!expectedStatuses.includes(result.status)) {
349
+ const error = createRestError(result);
350
+ if (result.body) {
351
+ error.details = storageSyncErrorDeserializer(result.body);
352
+ }
353
+ throw error;
354
+ }
355
+ return cloudEndpointDeserializer(result.body);
356
+ }
357
+ /** Patch a given CloudEndpoint. */
358
+ export function update(context, resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, properties, options = { requestOptions: {} }) {
359
+ return getLongRunningPoller(context, _updateDeserialize, ["200", "202", "201"], {
360
+ updateIntervalInMs: options?.updateIntervalInMs,
361
+ abortSignal: options?.abortSignal,
362
+ getInitialResponse: () => _updateSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, properties, options),
363
+ resourceLocationConfig: "location",
364
+ apiVersion: context.apiVersion ?? "2025-12-01",
326
365
  });
327
366
  }
328
367
  export function _createSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, options = { requestOptions: {} }) {
@@ -332,7 +371,7 @@ export function _createSend(context, resourceGroupName, storageSyncServiceName,
332
371
  storageSyncServiceName: storageSyncServiceName,
333
372
  syncGroupName: syncGroupName,
334
373
  cloudEndpointName: cloudEndpointName,
335
- "api%2Dversion": context.apiVersion ?? "2022-09-01",
374
+ "api%2Dversion": context.apiVersion ?? "2025-12-01",
336
375
  }, {
337
376
  allowReserved: options?.requestOptions?.skipUrlEncoding,
338
377
  });
@@ -361,7 +400,7 @@ export function create(context, resourceGroupName, storageSyncServiceName, syncG
361
400
  abortSignal: options?.abortSignal,
362
401
  getInitialResponse: () => _createSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, parameters, options),
363
402
  resourceLocationConfig: "location",
364
- apiVersion: context.apiVersion ?? "2022-09-01",
403
+ apiVersion: context.apiVersion ?? "2025-12-01",
365
404
  });
366
405
  }
367
406
  export function _getSend(context, resourceGroupName, storageSyncServiceName, syncGroupName, cloudEndpointName, options = { requestOptions: {} }) {
@@ -371,7 +410,7 @@ export function _getSend(context, resourceGroupName, storageSyncServiceName, syn
371
410
  storageSyncServiceName: storageSyncServiceName,
372
411
  syncGroupName: syncGroupName,
373
412
  cloudEndpointName: cloudEndpointName,
374
- "api%2Dversion": context.apiVersion ?? "2022-09-01",
413
+ "api%2Dversion": context.apiVersion ?? "2025-12-01",
375
414
  }, {
376
415
  allowReserved: options?.requestOptions?.skipUrlEncoding,
377
416
  });