@azure/arm-storagecache 9.0.0-beta.1 → 9.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.
@@ -1 +1 @@
1
- {"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,mBAAmB,IAAI,iCAAiC,EACxD,kBAAkB,IAAI,gCAAgC,EACtD,0BAA0B,IAAI,wCAAwC,GACvE,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,mBAAmB,IAAI,6BAA6B,EACpD,kBAAkB,IAAI,4BAA4B,EAClD,0BAA0B,IAAI,oCAAoC,GACnE,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,mBAAmB,IAAI,iCAAiC,EACxD,kBAAkB,IAAI,gCAAgC,EACtD,0BAA0B,IAAI,wCAAwC,GACvE,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,mBAAmB,IAAI,iCAAiC,EACxD,kBAAkB,IAAI,gCAAgC,EACtD,0BAA0B,IAAI,wCAAwC,GACvE,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,EACtB,mBAAmB,IAAI,iCAAiC,EACxD,0BAA0B,IAAI,wCAAwC,GACvE,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,2BAA2B,EAC3B,0BAA0B,EAC1B,2BAA2B,EAC3B,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,IAAI,uBAAuB,EAC5C,qBAAqB,EACrB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C,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,oBAAoB,CAAC,MAAc;IAC1C,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,OAAO,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,SAAS,CAAC;AAC1D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { StorageCacheManagementClient } from \"./storageCacheManagementClient.js\";\nimport {\n _invalidateDeserialize,\n _resumeDeserialize,\n _suspendDeserialize,\n _flushDeserialize,\n} from \"./api/storageTargetOperations/operations.js\";\nimport {\n _$deleteDeserialize,\n _updateDeserialize,\n _createOrUpdateDeserialize,\n} from \"./api/expansionJobs/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializeAutoImportJobs,\n _updateDeserialize as _updateDeserializeAutoImportJobs,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeAutoImportJobs,\n} from \"./api/autoImportJobs/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializeImportJobs,\n _updateDeserialize as _updateDeserializeImportJobs,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeImportJobs,\n} from \"./api/importJobs/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializeAutoExportJobs,\n _updateDeserialize as _updateDeserializeAutoExportJobs,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeAutoExportJobs,\n} from \"./api/autoExportJobs/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializeAmlFilesystems,\n _updateDeserialize as _updateDeserializeAmlFilesystems,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeAmlFilesystems,\n} from \"./api/amlFilesystems/operations.js\";\nimport {\n _restoreDefaultsDeserialize,\n _dnsRefreshDeserialize,\n _$deleteDeserialize as _$deleteDeserializeStorageTargets,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeStorageTargets,\n} from \"./api/storageTargets/operations.js\";\nimport {\n _spaceAllocationDeserialize,\n _upgradeFirmwareDeserialize,\n _resumePrimingJobDeserialize,\n _pausePrimingJobDeserialize,\n _stopPrimingJobDeserialize,\n _startPrimingJobDeserialize,\n _stopDeserialize,\n _startDeserialize,\n _flushDeserialize as _flushDeserializeCaches,\n _debugInfoDeserialize,\n _$deleteDeserialize as _$deleteDeserializeCaches,\n _updateDeserialize as _updateDeserializeCaches,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeCaches,\n} from \"./api/caches/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: StorageCacheManagementClient,\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.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/invalidate\":\n { deserializer: _invalidateDeserialize, expectedStatuses: [\"202\", \"200\", \"204\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/resume\":\n { deserializer: _resumeDeserialize, expectedStatuses: [\"202\", \"200\", \"204\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/suspend\":\n { deserializer: _suspendDeserialize, expectedStatuses: [\"202\", \"200\", \"204\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/flush\":\n { deserializer: _flushDeserialize, expectedStatuses: [\"202\", \"200\", \"204\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/expansionJobs/{expansionJobName}\":\n { deserializer: _$deleteDeserialize, expectedStatuses: [\"202\", \"204\", \"200\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/expansionJobs/{expansionJobName}\":\n { deserializer: _updateDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/expansionJobs/{expansionJobName}\":\n { deserializer: _createOrUpdateDeserialize, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/autoImportJobs/{autoImportJobName}\":\n { deserializer: _$deleteDeserializeAutoImportJobs, expectedStatuses: [\"202\", \"204\", \"200\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/autoImportJobs/{autoImportJobName}\":\n { deserializer: _updateDeserializeAutoImportJobs, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/autoImportJobs/{autoImportJobName}\":\n {\n deserializer: _createOrUpdateDeserializeAutoImportJobs,\n expectedStatuses: [\"200\", \"201\", \"202\"],\n },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/importJobs/{importJobName}\":\n { deserializer: _$deleteDeserializeImportJobs, expectedStatuses: [\"202\", \"204\", \"200\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/importJobs/{importJobName}\":\n { deserializer: _updateDeserializeImportJobs, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/importJobs/{importJobName}\":\n { deserializer: _createOrUpdateDeserializeImportJobs, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/autoExportJobs/{autoExportJobName}\":\n { deserializer: _$deleteDeserializeAutoExportJobs, expectedStatuses: [\"202\", \"204\", \"200\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/autoExportJobs/{autoExportJobName}\":\n { deserializer: _updateDeserializeAutoExportJobs, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/autoExportJobs/{autoExportJobName}\":\n {\n deserializer: _createOrUpdateDeserializeAutoExportJobs,\n expectedStatuses: [\"200\", \"201\", \"202\"],\n },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}\":\n { deserializer: _$deleteDeserializeAmlFilesystems, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}\":\n { deserializer: _updateDeserializeAmlFilesystems, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}\":\n {\n deserializer: _createOrUpdateDeserializeAmlFilesystems,\n expectedStatuses: [\"200\", \"201\", \"202\"],\n },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/restoreDefaults\":\n { deserializer: _restoreDefaultsDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/dnsRefresh\":\n { deserializer: _dnsRefreshDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}\":\n { deserializer: _$deleteDeserializeStorageTargets, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}\":\n {\n deserializer: _createOrUpdateDeserializeStorageTargets,\n expectedStatuses: [\"200\", \"201\", \"202\"],\n },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/spaceAllocation\":\n { deserializer: _spaceAllocationDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/upgrade\":\n { deserializer: _upgradeFirmwareDeserialize, expectedStatuses: [\"202\", \"201\", \"204\", \"200\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/resumePrimingJob\":\n { deserializer: _resumePrimingJobDeserialize, expectedStatuses: [\"202\", \"204\", \"200\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/pausePrimingJob\":\n { deserializer: _pausePrimingJobDeserialize, expectedStatuses: [\"202\", \"204\", \"200\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/stopPrimingJob\":\n { deserializer: _stopPrimingJobDeserialize, expectedStatuses: [\"202\", \"204\", \"200\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/startPrimingJob\":\n { deserializer: _startPrimingJobDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/stop\":\n { deserializer: _stopDeserialize, expectedStatuses: [\"202\", \"200\", \"204\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/start\":\n { deserializer: _startDeserialize, expectedStatuses: [\"202\", \"200\", \"204\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/flush\":\n { deserializer: _flushDeserializeCaches, expectedStatuses: [\"202\", \"200\", \"204\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/debugInfo\":\n { deserializer: _debugInfoDeserialize, expectedStatuses: [\"202\", \"200\", \"204\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}\":\n { deserializer: _$deleteDeserializeCaches, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}\":\n { deserializer: _updateDeserializeCaches, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}\":\n { deserializer: _createOrUpdateDeserializeCaches, expectedStatuses: [\"200\", \"201\", \"202\"] },\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"]}
1
+ {"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,mBAAmB,IAAI,iCAAiC,EACxD,kBAAkB,IAAI,gCAAgC,EACtD,0BAA0B,IAAI,wCAAwC,GACvE,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,mBAAmB,IAAI,6BAA6B,EACpD,kBAAkB,IAAI,4BAA4B,EAClD,0BAA0B,IAAI,oCAAoC,GACnE,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,mBAAmB,IAAI,iCAAiC,EACxD,kBAAkB,IAAI,gCAAgC,EACtD,0BAA0B,IAAI,wCAAwC,GACvE,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACL,mBAAmB,IAAI,iCAAiC,EACxD,kBAAkB,IAAI,gCAAgC,EACtD,0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AAG,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAC1E,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CACnB,CAAC;gBAEF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,oBAAoB,CAAC,MAAc;IAC1C,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,OAAO,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,SAAS,CAAC;AAC1D,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { StorageCacheManagementClient } from \"./storageCacheManagementClient.js\";\nimport {\n _invalidateDeserialize,\n _resumeDeserialize,\n _suspendDeserialize,\n _flushDeserialize,\n} from \"./api/storageTargetOperations/operations.js\";\nimport {\n _$deleteDeserialize,\n _updateDeserialize,\n _createOrUpdateDeserialize,\n} from \"./api/expansionJobs/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializeAutoImportJobs,\n _updateDeserialize as _updateDeserializeAutoImportJobs,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeAutoImportJobs,\n} from \"./api/autoImportJobs/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializeImportJobs,\n _updateDeserialize as _updateDeserializeImportJobs,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeImportJobs,\n} from \"./api/importJobs/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializeAutoExportJobs,\n _updateDeserialize as _updateDeserializeAutoExportJobs,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeAutoExportJobs,\n} from \"./api/autoExportJobs/operations.js\";\nimport {\n _$deleteDeserialize as _$deleteDeserializeAmlFilesystems,\n _updateDeserialize as _updateDeserializeAmlFilesystems,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeAmlFilesystems,\n} from \"./api/amlFilesystems/operations.js\";\nimport {\n _restoreDefaultsDeserialize,\n _dnsRefreshDeserialize,\n _$deleteDeserialize as _$deleteDeserializeStorageTargets,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeStorageTargets,\n} from \"./api/storageTargets/operations.js\";\nimport {\n _spaceAllocationDeserialize,\n _upgradeFirmwareDeserialize,\n _resumePrimingJobDeserialize,\n _pausePrimingJobDeserialize,\n _stopPrimingJobDeserialize,\n _startPrimingJobDeserialize,\n _stopDeserialize,\n _startDeserialize,\n _flushDeserialize as _flushDeserializeCaches,\n _debugInfoDeserialize,\n _$deleteDeserialize as _$deleteDeserializeCaches,\n _updateDeserialize as _updateDeserializeCaches,\n _createOrUpdateDeserialize as _createOrUpdateDeserializeCaches,\n} from \"./api/caches/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: StorageCacheManagementClient,\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.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/invalidate\":\n { deserializer: _invalidateDeserialize, expectedStatuses: [\"202\", \"200\", \"204\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/resume\":\n { deserializer: _resumeDeserialize, expectedStatuses: [\"202\", \"200\", \"204\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/suspend\":\n { deserializer: _suspendDeserialize, expectedStatuses: [\"202\", \"200\", \"204\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/flush\":\n { deserializer: _flushDeserialize, expectedStatuses: [\"202\", \"200\", \"204\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/expansionJobs/{expansionJobName}\":\n { deserializer: _$deleteDeserialize, expectedStatuses: [\"202\", \"204\", \"200\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/expansionJobs/{expansionJobName}\":\n { deserializer: _updateDeserialize, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/expansionJobs/{expansionJobName}\":\n { deserializer: _createOrUpdateDeserialize, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/autoImportJobs/{autoImportJobName}\":\n { deserializer: _$deleteDeserializeAutoImportJobs, expectedStatuses: [\"202\", \"204\", \"200\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/autoImportJobs/{autoImportJobName}\":\n { deserializer: _updateDeserializeAutoImportJobs, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/autoImportJobs/{autoImportJobName}\":\n {\n deserializer: _createOrUpdateDeserializeAutoImportJobs,\n expectedStatuses: [\"200\", \"201\", \"202\"],\n },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/importJobs/{importJobName}\":\n { deserializer: _$deleteDeserializeImportJobs, expectedStatuses: [\"202\", \"204\", \"200\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/importJobs/{importJobName}\":\n { deserializer: _updateDeserializeImportJobs, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/importJobs/{importJobName}\":\n { deserializer: _createOrUpdateDeserializeImportJobs, expectedStatuses: [\"200\", \"201\", \"202\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/autoExportJobs/{autoExportJobName}\":\n { deserializer: _$deleteDeserializeAutoExportJobs, expectedStatuses: [\"202\", \"204\", \"200\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/autoExportJobs/{autoExportJobName}\":\n { deserializer: _updateDeserializeAutoExportJobs, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}/autoExportJobs/{autoExportJobName}\":\n {\n deserializer: _createOrUpdateDeserializeAutoExportJobs,\n expectedStatuses: [\"200\", \"201\", \"202\"],\n },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}\":\n { deserializer: _$deleteDeserializeAmlFilesystems, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}\":\n { deserializer: _updateDeserializeAmlFilesystems, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/amlFilesystems/{amlFilesystemName}\":\n {\n deserializer: _createOrUpdateDeserializeAmlFilesystems,\n expectedStatuses: [\"200\", \"201\", \"202\"],\n },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/restoreDefaults\":\n { deserializer: _restoreDefaultsDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}/dnsRefresh\":\n { deserializer: _dnsRefreshDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}\":\n { deserializer: _$deleteDeserializeStorageTargets, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/storageTargets/{storageTargetName}\":\n {\n deserializer: _createOrUpdateDeserializeStorageTargets,\n expectedStatuses: [\"200\", \"201\", \"202\"],\n },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/spaceAllocation\":\n { deserializer: _spaceAllocationDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/upgrade\":\n { deserializer: _upgradeFirmwareDeserialize, expectedStatuses: [\"202\", \"201\", \"204\", \"200\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/resumePrimingJob\":\n { deserializer: _resumePrimingJobDeserialize, expectedStatuses: [\"202\", \"204\", \"200\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/pausePrimingJob\":\n { deserializer: _pausePrimingJobDeserialize, expectedStatuses: [\"202\", \"204\", \"200\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/stopPrimingJob\":\n { deserializer: _stopPrimingJobDeserialize, expectedStatuses: [\"202\", \"204\", \"200\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/startPrimingJob\":\n { deserializer: _startPrimingJobDeserialize, expectedStatuses: [\"202\", \"200\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/stop\":\n { deserializer: _stopDeserialize, expectedStatuses: [\"202\", \"200\", \"204\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/start\":\n { deserializer: _startDeserialize, expectedStatuses: [\"202\", \"200\", \"204\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/flush\":\n { deserializer: _flushDeserializeCaches, expectedStatuses: [\"202\", \"200\", \"204\", \"201\"] },\n \"POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}/debugInfo\":\n { deserializer: _debugInfoDeserialize, expectedStatuses: [\"202\", \"200\", \"204\", \"201\"] },\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}\":\n { deserializer: _$deleteDeserializeCaches, expectedStatuses: [\"200\", \"202\", \"204\"] },\n \"PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}\":\n { deserializer: _updateDeserializeCaches, expectedStatuses: [\"200\", \"202\", \"201\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageCache/caches/{cacheName}\":\n { deserializer: _createOrUpdateDeserializeCaches, expectedStatuses: [\"200\", \"201\", \"202\"] },\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"]}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@azure/arm-storagecache",
3
- "version": "9.0.0-beta.1",
3
+ "version": "9.0.0",
4
4
  "description": "A generated SDK for StorageCacheManagementClient.",
5
5
  "engines": {
6
- "node": ">=20.0.0"
6
+ "node": ">=22.0.0"
7
7
  },
8
8
  "sideEffects": false,
9
9
  "autoPublish": false,
@@ -292,10 +292,10 @@
292
292
  },
293
293
  "devDependencies": {
294
294
  "@azure/identity": "4.13.0",
295
- "@types/node": "^20.19.25",
295
+ "@types/node": "^22.0.0",
296
296
  "cross-env": "^10.1.0",
297
297
  "eslint": "^9.39.1",
298
- "prettier": "^3.6.2",
298
+ "prettier": "^3.9.1",
299
299
  "rimraf": "^6.1.0",
300
300
  "@vitest/browser-playwright": "^4.1.2",
301
301
  "@vitest/coverage-istanbul": "^4.1.2",
@@ -303,11 +303,11 @@
303
303
  "playwright": "^1.60.0",
304
304
  "typescript": "~6.0.2",
305
305
  "vitest": "^4.1.2",
306
- "@azure-tools/test-utils-vitest": "^2.0.1",
307
306
  "@azure-tools/test-credential": "^2.1.2",
308
- "@azure/eslint-plugin-azure-sdk": "^3.0.0",
307
+ "@azure-tools/test-utils-vitest": "^2.0.1",
308
+ "@azure-tools/test-recorder": "^4.1.1",
309
309
  "@azure/dev-tool": "^1.0.0",
310
- "@azure-tools/test-recorder": "^4.1.1"
310
+ "@azure/eslint-plugin-azure-sdk": "^3.0.0"
311
311
  },
312
312
  "//sampleConfiguration": {
313
313
  "productName": "@azure/arm-storagecache",
@@ -315,7 +315,7 @@
315
315
  "azure"
316
316
  ],
317
317
  "disableDocsMs": true,
318
- "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-storagecache?view=azure-node-preview"
318
+ "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-storagecache"
319
319
  },
320
320
  "scripts": {
321
321
  "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",