@azure-rest/iot-device-update 1.0.1-alpha.20240827.1 → 1.0.1-alpha.20240828.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist-esm/src/clientDefinitions.js +1 -1
- package/dist-esm/src/clientDefinitions.js.map +1 -1
- package/dist-esm/src/deviceUpdate.js +1 -1
- package/dist-esm/src/deviceUpdate.js.map +1 -1
- package/dist-esm/src/index.js +1 -1
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/isUnexpected.js +1 -1
- package/dist-esm/src/isUnexpected.js.map +1 -1
- package/dist-esm/src/models.js +1 -1
- package/dist-esm/src/models.js.map +1 -1
- package/dist-esm/src/outputModels.js +1 -1
- package/dist-esm/src/outputModels.js.map +1 -1
- package/dist-esm/src/paginateHelper.js +1 -1
- package/dist-esm/src/paginateHelper.js.map +1 -1
- package/dist-esm/src/parameters.js +1 -1
- package/dist-esm/src/parameters.js.map +1 -1
- package/dist-esm/src/pollingHelper.js +1 -1
- package/dist-esm/src/pollingHelper.js.map +1 -1
- package/dist-esm/src/responses.js +1 -1
- package/dist-esm/src/responses.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n DeviceUpdateListUpdates200Response,\n DeviceUpdateListUpdatesdefaultResponse,\n DeviceUpdateImportUpdate200Response,\n DeviceUpdateImportUpdate202Response,\n DeviceUpdateImportUpdatedefaultResponse,\n DeviceUpdateGetUpdate200Response,\n DeviceUpdateGetUpdate304Response,\n DeviceUpdateGetUpdatedefaultResponse,\n DeviceUpdateDeleteUpdate202Response,\n DeviceUpdateDeleteUpdatedefaultResponse,\n DeviceUpdateListProviders200Response,\n DeviceUpdateListProvidersdefaultResponse,\n DeviceUpdateListNames200Response,\n DeviceUpdateListNamesdefaultResponse,\n DeviceUpdateListVersions200Response,\n DeviceUpdateListVersionsdefaultResponse,\n DeviceUpdateListFiles200Response,\n DeviceUpdateListFilesdefaultResponse,\n DeviceUpdateGetFile200Response,\n DeviceUpdateGetFile304Response,\n DeviceUpdateGetFiledefaultResponse,\n DeviceUpdateListOperationStatuses200Response,\n DeviceUpdateListOperationStatusesdefaultResponse,\n DeviceUpdateGetOperationStatus200Response,\n DeviceUpdateGetOperationStatus304Response,\n DeviceUpdateGetOperationStatusdefaultResponse,\n DeviceManagementListDeviceClasses200Response,\n DeviceManagementListDeviceClassesdefaultResponse,\n DeviceManagementGetDeviceClass200Response,\n DeviceManagementGetDeviceClassdefaultResponse,\n DeviceManagementUpdateDeviceClass200Response,\n DeviceManagementUpdateDeviceClassdefaultResponse,\n DeviceManagementDeleteDeviceClass204Response,\n DeviceManagementDeleteDeviceClassdefaultResponse,\n DeviceManagementListInstallableUpdatesForDeviceClass200Response,\n DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse,\n DeviceManagementListDevices200Response,\n DeviceManagementListDevicesdefaultResponse,\n DeviceManagementImportDevices202Response,\n DeviceManagementImportDevicesdefaultResponse,\n DeviceManagementGetDevice200Response,\n DeviceManagementGetDevicedefaultResponse,\n DeviceManagementGetDeviceModule200Response,\n DeviceManagementGetDeviceModuledefaultResponse,\n DeviceManagementGetUpdateCompliance200Response,\n DeviceManagementGetUpdateCompliancedefaultResponse,\n DeviceManagementListGroups200Response,\n DeviceManagementListGroupsdefaultResponse,\n DeviceManagementGetGroup200Response,\n DeviceManagementGetGroupdefaultResponse,\n DeviceManagementDeleteGroup204Response,\n DeviceManagementDeleteGroupdefaultResponse,\n DeviceManagementGetUpdateComplianceForGroup200Response,\n DeviceManagementGetUpdateComplianceForGroupdefaultResponse,\n DeviceManagementListBestUpdatesForGroup200Response,\n DeviceManagementListBestUpdatesForGroupdefaultResponse,\n DeviceManagementListDeploymentsForGroup200Response,\n DeviceManagementListDeploymentsForGroupdefaultResponse,\n DeviceManagementGetDeployment200Response,\n DeviceManagementGetDeploymentdefaultResponse,\n DeviceManagementCreateOrUpdateDeployment200Response,\n DeviceManagementCreateOrUpdateDeploymentdefaultResponse,\n DeviceManagementDeleteDeployment204Response,\n DeviceManagementDeleteDeploymentdefaultResponse,\n DeviceManagementGetDeploymentStatus200Response,\n DeviceManagementGetDeploymentStatusdefaultResponse,\n DeviceManagementListDeviceClassSubgroupsForGroup200Response,\n DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse,\n DeviceManagementGetDeviceClassSubgroup200Response,\n DeviceManagementGetDeviceClassSubgroupdefaultResponse,\n DeviceManagementDeleteDeviceClassSubgroup204Response,\n DeviceManagementDeleteDeviceClassSubgroupdefaultResponse,\n DeviceManagementGetDeviceClassSubgroupUpdateCompliance200Response,\n DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse,\n DeviceManagementGetBestUpdatesForDeviceClassSubgroup200Response,\n DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse,\n DeviceManagementListDeploymentsForDeviceClassSubgroup200Response,\n DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse,\n DeviceManagementGetDeploymentForDeviceClassSubgroup200Response,\n DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse,\n DeviceManagementDeleteDeploymentForDeviceClassSubgroup204Response,\n DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse,\n DeviceManagementStopDeployment200Response,\n DeviceManagementStopDeploymentdefaultResponse,\n DeviceManagementRetryDeployment200Response,\n DeviceManagementRetryDeploymentdefaultResponse,\n DeviceManagementGetDeviceClassSubgroupDeploymentStatus200Response,\n DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse,\n DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment200Response,\n DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse,\n DeviceManagementGetOperationStatus200Response,\n DeviceManagementGetOperationStatus304Response,\n DeviceManagementGetOperationStatusdefaultResponse,\n DeviceManagementListOperationStatuses200Response,\n DeviceManagementListOperationStatusesdefaultResponse,\n DeviceManagementStartLogCollection201Response,\n DeviceManagementStartLogCollectiondefaultResponse,\n DeviceManagementGetLogCollection200Response,\n DeviceManagementGetLogCollectiondefaultResponse,\n DeviceManagementListLogCollections200Response,\n DeviceManagementListLogCollectionsdefaultResponse,\n DeviceManagementGetLogCollectionDetailedStatus200Response,\n DeviceManagementGetLogCollectionDetailedStatusdefaultResponse,\n DeviceManagementListHealthOfDevices200Response,\n DeviceManagementListHealthOfDevicesdefaultResponse,\n} from \"./responses\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /deviceUpdate/{instanceId}/updates\": [\"200\"],\n \"POST /deviceUpdate/{instanceId}/updates:import\": [\"200\", \"202\"],\n \"GET /deviceUpdate/{instanceId}/updates:import\": [\"200\", \"202\"],\n \"GET /deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}\": [\n \"200\",\n \"304\",\n ],\n \"DELETE /deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}\":\n [\"202\"],\n \"GET /deviceUpdate/{instanceId}/updates/providers\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/updates/providers/{provider}/names\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}/files\":\n [\"200\"],\n \"GET /deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}/files/{fileId}\":\n [\"200\", \"304\"],\n \"GET /deviceUpdate/{instanceId}/updates/operations\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/updates/operations/{operationId}\": [\"200\", \"304\"],\n \"GET /deviceUpdate/{instanceId}/management/deviceClasses\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/deviceClasses/{deviceClassId}\": [\"200\"],\n \"PATCH /deviceUpdate/{instanceId}/management/deviceClasses/{deviceClassId}\": [\"200\"],\n \"DELETE /deviceUpdate/{instanceId}/management/deviceClasses/{deviceClassId}\": [\"204\"],\n \"GET /deviceUpdate/{instanceId}/management/deviceClasses/{deviceClassId}/installableUpdates\": [\n \"200\",\n ],\n \"GET /deviceUpdate/{instanceId}/management/devices\": [\"200\"],\n \"POST /deviceUpdate/{instanceId}/management/devices:import\": [\"202\"],\n \"GET /deviceUpdate/{instanceId}/management/devices:import\": [\"202\"],\n \"GET /deviceUpdate/{instanceId}/management/devices/{deviceId}\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/devices/{deviceId}/modules/{moduleId}\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/updateCompliance\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}\": [\"200\"],\n \"DELETE /deviceUpdate/{instanceId}/management/groups/{groupId}\": [\"204\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/updateCompliance\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/bestUpdates\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deployments\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}\": [\"200\"],\n \"PUT /deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}\": [\"200\"],\n \"DELETE /deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}\": [\n \"204\",\n ],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}/status\": [\n \"200\",\n ],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}\":\n [\"200\"],\n \"DELETE /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}\":\n [\"204\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/updateCompliance\":\n [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/bestUpdates\":\n [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments\":\n [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}\":\n [\"200\"],\n \"DELETE /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}\":\n [\"204\"],\n \"POST /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}:cancel\":\n [\"200\"],\n \"POST /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}:retry\":\n [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}/status\":\n [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}/devicestates\":\n [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/operations/{operationId}\": [\"200\", \"304\"],\n \"GET /deviceUpdate/{instanceId}/management/operations\": [\"200\"],\n \"PUT /deviceUpdate/{instanceId}/management/deviceDiagnostics/logCollections/{operationId}\": [\n \"201\",\n ],\n \"GET /deviceUpdate/{instanceId}/management/deviceDiagnostics/logCollections/{operationId}\": [\n \"200\",\n ],\n \"GET /deviceUpdate/{instanceId}/management/deviceDiagnostics/logCollections\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/deviceDiagnostics/logCollections/{operationId}/detailedStatus\":\n [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/deviceDiagnostics/deviceHealth\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: DeviceUpdateListUpdates200Response | DeviceUpdateListUpdatesdefaultResponse,\n): response is DeviceUpdateListUpdatesdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceUpdateImportUpdate200Response\n | DeviceUpdateImportUpdate202Response\n | DeviceUpdateImportUpdatedefaultResponse,\n): response is DeviceUpdateImportUpdatedefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceUpdateGetUpdate200Response\n | DeviceUpdateGetUpdate304Response\n | DeviceUpdateGetUpdatedefaultResponse,\n): response is DeviceUpdateGetUpdatedefaultResponse;\nexport function isUnexpected(\n response: DeviceUpdateDeleteUpdate202Response | DeviceUpdateDeleteUpdatedefaultResponse,\n): response is DeviceUpdateDeleteUpdatedefaultResponse;\nexport function isUnexpected(\n response: DeviceUpdateListProviders200Response | DeviceUpdateListProvidersdefaultResponse,\n): response is DeviceUpdateListProvidersdefaultResponse;\nexport function isUnexpected(\n response: DeviceUpdateListNames200Response | DeviceUpdateListNamesdefaultResponse,\n): response is DeviceUpdateListNamesdefaultResponse;\nexport function isUnexpected(\n response: DeviceUpdateListVersions200Response | DeviceUpdateListVersionsdefaultResponse,\n): response is DeviceUpdateListVersionsdefaultResponse;\nexport function isUnexpected(\n response: DeviceUpdateListFiles200Response | DeviceUpdateListFilesdefaultResponse,\n): response is DeviceUpdateListFilesdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceUpdateGetFile200Response\n | DeviceUpdateGetFile304Response\n | DeviceUpdateGetFiledefaultResponse,\n): response is DeviceUpdateGetFiledefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceUpdateListOperationStatuses200Response\n | DeviceUpdateListOperationStatusesdefaultResponse,\n): response is DeviceUpdateListOperationStatusesdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceUpdateGetOperationStatus200Response\n | DeviceUpdateGetOperationStatus304Response\n | DeviceUpdateGetOperationStatusdefaultResponse,\n): response is DeviceUpdateGetOperationStatusdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListDeviceClasses200Response\n | DeviceManagementListDeviceClassesdefaultResponse,\n): response is DeviceManagementListDeviceClassesdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetDeviceClass200Response\n | DeviceManagementGetDeviceClassdefaultResponse,\n): response is DeviceManagementGetDeviceClassdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementUpdateDeviceClass200Response\n | DeviceManagementUpdateDeviceClassdefaultResponse,\n): response is DeviceManagementUpdateDeviceClassdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementDeleteDeviceClass204Response\n | DeviceManagementDeleteDeviceClassdefaultResponse,\n): response is DeviceManagementDeleteDeviceClassdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListInstallableUpdatesForDeviceClass200Response\n | DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse,\n): response is DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse;\nexport function isUnexpected(\n response: DeviceManagementListDevices200Response | DeviceManagementListDevicesdefaultResponse,\n): response is DeviceManagementListDevicesdefaultResponse;\nexport function isUnexpected(\n response: DeviceManagementImportDevices202Response | DeviceManagementImportDevicesdefaultResponse,\n): response is DeviceManagementImportDevicesdefaultResponse;\nexport function isUnexpected(\n response: DeviceManagementGetDevice200Response | DeviceManagementGetDevicedefaultResponse,\n): response is DeviceManagementGetDevicedefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetDeviceModule200Response\n | DeviceManagementGetDeviceModuledefaultResponse,\n): response is DeviceManagementGetDeviceModuledefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetUpdateCompliance200Response\n | DeviceManagementGetUpdateCompliancedefaultResponse,\n): response is DeviceManagementGetUpdateCompliancedefaultResponse;\nexport function isUnexpected(\n response: DeviceManagementListGroups200Response | DeviceManagementListGroupsdefaultResponse,\n): response is DeviceManagementListGroupsdefaultResponse;\nexport function isUnexpected(\n response: DeviceManagementGetGroup200Response | DeviceManagementGetGroupdefaultResponse,\n): response is DeviceManagementGetGroupdefaultResponse;\nexport function isUnexpected(\n response: DeviceManagementDeleteGroup204Response | DeviceManagementDeleteGroupdefaultResponse,\n): response is DeviceManagementDeleteGroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetUpdateComplianceForGroup200Response\n | DeviceManagementGetUpdateComplianceForGroupdefaultResponse,\n): response is DeviceManagementGetUpdateComplianceForGroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListBestUpdatesForGroup200Response\n | DeviceManagementListBestUpdatesForGroupdefaultResponse,\n): response is DeviceManagementListBestUpdatesForGroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListDeploymentsForGroup200Response\n | DeviceManagementListDeploymentsForGroupdefaultResponse,\n): response is DeviceManagementListDeploymentsForGroupdefaultResponse;\nexport function isUnexpected(\n response: DeviceManagementGetDeployment200Response | DeviceManagementGetDeploymentdefaultResponse,\n): response is DeviceManagementGetDeploymentdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementCreateOrUpdateDeployment200Response\n | DeviceManagementCreateOrUpdateDeploymentdefaultResponse,\n): response is DeviceManagementCreateOrUpdateDeploymentdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementDeleteDeployment204Response\n | DeviceManagementDeleteDeploymentdefaultResponse,\n): response is DeviceManagementDeleteDeploymentdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetDeploymentStatus200Response\n | DeviceManagementGetDeploymentStatusdefaultResponse,\n): response is DeviceManagementGetDeploymentStatusdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListDeviceClassSubgroupsForGroup200Response\n | DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse,\n): response is DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetDeviceClassSubgroup200Response\n | DeviceManagementGetDeviceClassSubgroupdefaultResponse,\n): response is DeviceManagementGetDeviceClassSubgroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementDeleteDeviceClassSubgroup204Response\n | DeviceManagementDeleteDeviceClassSubgroupdefaultResponse,\n): response is DeviceManagementDeleteDeviceClassSubgroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetDeviceClassSubgroupUpdateCompliance200Response\n | DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse,\n): response is DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetBestUpdatesForDeviceClassSubgroup200Response\n | DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse,\n): response is DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListDeploymentsForDeviceClassSubgroup200Response\n | DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse,\n): response is DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetDeploymentForDeviceClassSubgroup200Response\n | DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse,\n): response is DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementDeleteDeploymentForDeviceClassSubgroup204Response\n | DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse,\n): response is DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementStopDeployment200Response\n | DeviceManagementStopDeploymentdefaultResponse,\n): response is DeviceManagementStopDeploymentdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementRetryDeployment200Response\n | DeviceManagementRetryDeploymentdefaultResponse,\n): response is DeviceManagementRetryDeploymentdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetDeviceClassSubgroupDeploymentStatus200Response\n | DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse,\n): response is DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment200Response\n | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse,\n): response is DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetOperationStatus200Response\n | DeviceManagementGetOperationStatus304Response\n | DeviceManagementGetOperationStatusdefaultResponse,\n): response is DeviceManagementGetOperationStatusdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListOperationStatuses200Response\n | DeviceManagementListOperationStatusesdefaultResponse,\n): response is DeviceManagementListOperationStatusesdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementStartLogCollection201Response\n | DeviceManagementStartLogCollectiondefaultResponse,\n): response is DeviceManagementStartLogCollectiondefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetLogCollection200Response\n | DeviceManagementGetLogCollectiondefaultResponse,\n): response is DeviceManagementGetLogCollectiondefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListLogCollections200Response\n | DeviceManagementListLogCollectionsdefaultResponse,\n): response is DeviceManagementListLogCollectionsdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetLogCollectionDetailedStatus200Response\n | DeviceManagementGetLogCollectionDetailedStatusdefaultResponse,\n): response is DeviceManagementGetLogCollectionDetailedStatusdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListHealthOfDevices200Response\n | DeviceManagementListHealthOfDevicesdefaultResponse,\n): response is DeviceManagementListHealthOfDevicesdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceUpdateListUpdates200Response\n | DeviceUpdateListUpdatesdefaultResponse\n | DeviceUpdateImportUpdate200Response\n | DeviceUpdateImportUpdate202Response\n | DeviceUpdateImportUpdatedefaultResponse\n | DeviceUpdateGetUpdate200Response\n | DeviceUpdateGetUpdate304Response\n | DeviceUpdateGetUpdatedefaultResponse\n | DeviceUpdateDeleteUpdate202Response\n | DeviceUpdateDeleteUpdatedefaultResponse\n | DeviceUpdateListProviders200Response\n | DeviceUpdateListProvidersdefaultResponse\n | DeviceUpdateListNames200Response\n | DeviceUpdateListNamesdefaultResponse\n | DeviceUpdateListVersions200Response\n | DeviceUpdateListVersionsdefaultResponse\n | DeviceUpdateListFiles200Response\n | DeviceUpdateListFilesdefaultResponse\n | DeviceUpdateGetFile200Response\n | DeviceUpdateGetFile304Response\n | DeviceUpdateGetFiledefaultResponse\n | DeviceUpdateListOperationStatuses200Response\n | DeviceUpdateListOperationStatusesdefaultResponse\n | DeviceUpdateGetOperationStatus200Response\n | DeviceUpdateGetOperationStatus304Response\n | DeviceUpdateGetOperationStatusdefaultResponse\n | DeviceManagementListDeviceClasses200Response\n | DeviceManagementListDeviceClassesdefaultResponse\n | DeviceManagementGetDeviceClass200Response\n | DeviceManagementGetDeviceClassdefaultResponse\n | DeviceManagementUpdateDeviceClass200Response\n | DeviceManagementUpdateDeviceClassdefaultResponse\n | DeviceManagementDeleteDeviceClass204Response\n | DeviceManagementDeleteDeviceClassdefaultResponse\n | DeviceManagementListInstallableUpdatesForDeviceClass200Response\n | DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse\n | DeviceManagementListDevices200Response\n | DeviceManagementListDevicesdefaultResponse\n | DeviceManagementImportDevices202Response\n | DeviceManagementImportDevicesdefaultResponse\n | DeviceManagementGetDevice200Response\n | DeviceManagementGetDevicedefaultResponse\n | DeviceManagementGetDeviceModule200Response\n | DeviceManagementGetDeviceModuledefaultResponse\n | DeviceManagementGetUpdateCompliance200Response\n | DeviceManagementGetUpdateCompliancedefaultResponse\n | DeviceManagementListGroups200Response\n | DeviceManagementListGroupsdefaultResponse\n | DeviceManagementGetGroup200Response\n | DeviceManagementGetGroupdefaultResponse\n | DeviceManagementDeleteGroup204Response\n | DeviceManagementDeleteGroupdefaultResponse\n | DeviceManagementGetUpdateComplianceForGroup200Response\n | DeviceManagementGetUpdateComplianceForGroupdefaultResponse\n | DeviceManagementListBestUpdatesForGroup200Response\n | DeviceManagementListBestUpdatesForGroupdefaultResponse\n | DeviceManagementListDeploymentsForGroup200Response\n | DeviceManagementListDeploymentsForGroupdefaultResponse\n | DeviceManagementGetDeployment200Response\n | DeviceManagementGetDeploymentdefaultResponse\n | DeviceManagementCreateOrUpdateDeployment200Response\n | DeviceManagementCreateOrUpdateDeploymentdefaultResponse\n | DeviceManagementDeleteDeployment204Response\n | DeviceManagementDeleteDeploymentdefaultResponse\n | DeviceManagementGetDeploymentStatus200Response\n | DeviceManagementGetDeploymentStatusdefaultResponse\n | DeviceManagementListDeviceClassSubgroupsForGroup200Response\n | DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse\n | DeviceManagementGetDeviceClassSubgroup200Response\n | DeviceManagementGetDeviceClassSubgroupdefaultResponse\n | DeviceManagementDeleteDeviceClassSubgroup204Response\n | DeviceManagementDeleteDeviceClassSubgroupdefaultResponse\n | DeviceManagementGetDeviceClassSubgroupUpdateCompliance200Response\n | DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse\n | DeviceManagementGetBestUpdatesForDeviceClassSubgroup200Response\n | DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse\n | DeviceManagementListDeploymentsForDeviceClassSubgroup200Response\n | DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse\n | DeviceManagementGetDeploymentForDeviceClassSubgroup200Response\n | DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse\n | DeviceManagementDeleteDeploymentForDeviceClassSubgroup204Response\n | DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse\n | DeviceManagementStopDeployment200Response\n | DeviceManagementStopDeploymentdefaultResponse\n | DeviceManagementRetryDeployment200Response\n | DeviceManagementRetryDeploymentdefaultResponse\n | DeviceManagementGetDeviceClassSubgroupDeploymentStatus200Response\n | DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse\n | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment200Response\n | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse\n | DeviceManagementGetOperationStatus200Response\n | DeviceManagementGetOperationStatus304Response\n | DeviceManagementGetOperationStatusdefaultResponse\n | DeviceManagementListOperationStatuses200Response\n | DeviceManagementListOperationStatusesdefaultResponse\n | DeviceManagementStartLogCollection201Response\n | DeviceManagementStartLogCollectiondefaultResponse\n | DeviceManagementGetLogCollection200Response\n | DeviceManagementGetLogCollectiondefaultResponse\n | DeviceManagementListLogCollections200Response\n | DeviceManagementListLogCollectionsdefaultResponse\n | DeviceManagementGetLogCollectionDetailedStatus200Response\n | DeviceManagementGetLogCollectionDetailedStatusdefaultResponse\n | DeviceManagementListHealthOfDevices200Response\n | DeviceManagementListHealthOfDevicesdefaultResponse,\n): response is\n | DeviceUpdateListUpdatesdefaultResponse\n | DeviceUpdateImportUpdatedefaultResponse\n | DeviceUpdateGetUpdatedefaultResponse\n | DeviceUpdateDeleteUpdatedefaultResponse\n | DeviceUpdateListProvidersdefaultResponse\n | DeviceUpdateListNamesdefaultResponse\n | DeviceUpdateListVersionsdefaultResponse\n | DeviceUpdateListFilesdefaultResponse\n | DeviceUpdateGetFiledefaultResponse\n | DeviceUpdateListOperationStatusesdefaultResponse\n | DeviceUpdateGetOperationStatusdefaultResponse\n | DeviceManagementListDeviceClassesdefaultResponse\n | DeviceManagementGetDeviceClassdefaultResponse\n | DeviceManagementUpdateDeviceClassdefaultResponse\n | DeviceManagementDeleteDeviceClassdefaultResponse\n | DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse\n | DeviceManagementListDevicesdefaultResponse\n | DeviceManagementImportDevicesdefaultResponse\n | DeviceManagementGetDevicedefaultResponse\n | DeviceManagementGetDeviceModuledefaultResponse\n | DeviceManagementGetUpdateCompliancedefaultResponse\n | DeviceManagementListGroupsdefaultResponse\n | DeviceManagementGetGroupdefaultResponse\n | DeviceManagementDeleteGroupdefaultResponse\n | DeviceManagementGetUpdateComplianceForGroupdefaultResponse\n | DeviceManagementListBestUpdatesForGroupdefaultResponse\n | DeviceManagementListDeploymentsForGroupdefaultResponse\n | DeviceManagementGetDeploymentdefaultResponse\n | DeviceManagementCreateOrUpdateDeploymentdefaultResponse\n | DeviceManagementDeleteDeploymentdefaultResponse\n | DeviceManagementGetDeploymentStatusdefaultResponse\n | DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse\n | DeviceManagementGetDeviceClassSubgroupdefaultResponse\n | DeviceManagementDeleteDeviceClassSubgroupdefaultResponse\n | DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse\n | DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse\n | DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse\n | DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse\n | DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse\n | DeviceManagementStopDeploymentdefaultResponse\n | DeviceManagementRetryDeploymentdefaultResponse\n | DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse\n | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse\n | DeviceManagementGetOperationStatusdefaultResponse\n | DeviceManagementListOperationStatusesdefaultResponse\n | DeviceManagementStartLogCollectiondefaultResponse\n | DeviceManagementGetLogCollectiondefaultResponse\n | DeviceManagementListLogCollectionsdefaultResponse\n | DeviceManagementGetLogCollectionDetailedStatusdefaultResponse\n | DeviceManagementListHealthOfDevicesdefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = geParametrizedPathSuccess(url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction geParametrizedPathSuccess(path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // If the candidate and actual paths don't match in size\n // we move on to the next candidate path\n if (candidateParts.length === pathParts.length && hasParametrizedPath(key)) {\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = 0; i < candidateParts.length; i++) {\n if (candidateParts[i].startsWith(\"{\") && candidateParts[i].endsWith(\"}\")) {\n // If the current part of the candidate is a \"template\" part\n // it is a match with the actual path part on hand\n // skip as the parameterized part can match anything\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[i]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // if all parts matched we return the success values form\n // the path mapping.\n if (found) {\n return value;\n }\n }\n }\n\n // No match was found, return an empty array.\n return [];\n}\n\nfunction hasParametrizedPath(path: string): boolean {\n return path.includes(\"/{\");\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n DeviceUpdateListUpdates200Response,\n DeviceUpdateListUpdatesdefaultResponse,\n DeviceUpdateImportUpdate200Response,\n DeviceUpdateImportUpdate202Response,\n DeviceUpdateImportUpdatedefaultResponse,\n DeviceUpdateGetUpdate200Response,\n DeviceUpdateGetUpdate304Response,\n DeviceUpdateGetUpdatedefaultResponse,\n DeviceUpdateDeleteUpdate202Response,\n DeviceUpdateDeleteUpdatedefaultResponse,\n DeviceUpdateListProviders200Response,\n DeviceUpdateListProvidersdefaultResponse,\n DeviceUpdateListNames200Response,\n DeviceUpdateListNamesdefaultResponse,\n DeviceUpdateListVersions200Response,\n DeviceUpdateListVersionsdefaultResponse,\n DeviceUpdateListFiles200Response,\n DeviceUpdateListFilesdefaultResponse,\n DeviceUpdateGetFile200Response,\n DeviceUpdateGetFile304Response,\n DeviceUpdateGetFiledefaultResponse,\n DeviceUpdateListOperationStatuses200Response,\n DeviceUpdateListOperationStatusesdefaultResponse,\n DeviceUpdateGetOperationStatus200Response,\n DeviceUpdateGetOperationStatus304Response,\n DeviceUpdateGetOperationStatusdefaultResponse,\n DeviceManagementListDeviceClasses200Response,\n DeviceManagementListDeviceClassesdefaultResponse,\n DeviceManagementGetDeviceClass200Response,\n DeviceManagementGetDeviceClassdefaultResponse,\n DeviceManagementUpdateDeviceClass200Response,\n DeviceManagementUpdateDeviceClassdefaultResponse,\n DeviceManagementDeleteDeviceClass204Response,\n DeviceManagementDeleteDeviceClassdefaultResponse,\n DeviceManagementListInstallableUpdatesForDeviceClass200Response,\n DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse,\n DeviceManagementListDevices200Response,\n DeviceManagementListDevicesdefaultResponse,\n DeviceManagementImportDevices202Response,\n DeviceManagementImportDevicesdefaultResponse,\n DeviceManagementGetDevice200Response,\n DeviceManagementGetDevicedefaultResponse,\n DeviceManagementGetDeviceModule200Response,\n DeviceManagementGetDeviceModuledefaultResponse,\n DeviceManagementGetUpdateCompliance200Response,\n DeviceManagementGetUpdateCompliancedefaultResponse,\n DeviceManagementListGroups200Response,\n DeviceManagementListGroupsdefaultResponse,\n DeviceManagementGetGroup200Response,\n DeviceManagementGetGroupdefaultResponse,\n DeviceManagementDeleteGroup204Response,\n DeviceManagementDeleteGroupdefaultResponse,\n DeviceManagementGetUpdateComplianceForGroup200Response,\n DeviceManagementGetUpdateComplianceForGroupdefaultResponse,\n DeviceManagementListBestUpdatesForGroup200Response,\n DeviceManagementListBestUpdatesForGroupdefaultResponse,\n DeviceManagementListDeploymentsForGroup200Response,\n DeviceManagementListDeploymentsForGroupdefaultResponse,\n DeviceManagementGetDeployment200Response,\n DeviceManagementGetDeploymentdefaultResponse,\n DeviceManagementCreateOrUpdateDeployment200Response,\n DeviceManagementCreateOrUpdateDeploymentdefaultResponse,\n DeviceManagementDeleteDeployment204Response,\n DeviceManagementDeleteDeploymentdefaultResponse,\n DeviceManagementGetDeploymentStatus200Response,\n DeviceManagementGetDeploymentStatusdefaultResponse,\n DeviceManagementListDeviceClassSubgroupsForGroup200Response,\n DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse,\n DeviceManagementGetDeviceClassSubgroup200Response,\n DeviceManagementGetDeviceClassSubgroupdefaultResponse,\n DeviceManagementDeleteDeviceClassSubgroup204Response,\n DeviceManagementDeleteDeviceClassSubgroupdefaultResponse,\n DeviceManagementGetDeviceClassSubgroupUpdateCompliance200Response,\n DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse,\n DeviceManagementGetBestUpdatesForDeviceClassSubgroup200Response,\n DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse,\n DeviceManagementListDeploymentsForDeviceClassSubgroup200Response,\n DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse,\n DeviceManagementGetDeploymentForDeviceClassSubgroup200Response,\n DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse,\n DeviceManagementDeleteDeploymentForDeviceClassSubgroup204Response,\n DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse,\n DeviceManagementStopDeployment200Response,\n DeviceManagementStopDeploymentdefaultResponse,\n DeviceManagementRetryDeployment200Response,\n DeviceManagementRetryDeploymentdefaultResponse,\n DeviceManagementGetDeviceClassSubgroupDeploymentStatus200Response,\n DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse,\n DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment200Response,\n DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse,\n DeviceManagementGetOperationStatus200Response,\n DeviceManagementGetOperationStatus304Response,\n DeviceManagementGetOperationStatusdefaultResponse,\n DeviceManagementListOperationStatuses200Response,\n DeviceManagementListOperationStatusesdefaultResponse,\n DeviceManagementStartLogCollection201Response,\n DeviceManagementStartLogCollectiondefaultResponse,\n DeviceManagementGetLogCollection200Response,\n DeviceManagementGetLogCollectiondefaultResponse,\n DeviceManagementListLogCollections200Response,\n DeviceManagementListLogCollectionsdefaultResponse,\n DeviceManagementGetLogCollectionDetailedStatus200Response,\n DeviceManagementGetLogCollectionDetailedStatusdefaultResponse,\n DeviceManagementListHealthOfDevices200Response,\n DeviceManagementListHealthOfDevicesdefaultResponse,\n} from \"./responses\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /deviceUpdate/{instanceId}/updates\": [\"200\"],\n \"POST /deviceUpdate/{instanceId}/updates:import\": [\"200\", \"202\"],\n \"GET /deviceUpdate/{instanceId}/updates:import\": [\"200\", \"202\"],\n \"GET /deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}\": [\n \"200\",\n \"304\",\n ],\n \"DELETE /deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}\":\n [\"202\"],\n \"GET /deviceUpdate/{instanceId}/updates/providers\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/updates/providers/{provider}/names\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}/files\":\n [\"200\"],\n \"GET /deviceUpdate/{instanceId}/updates/providers/{provider}/names/{name}/versions/{version}/files/{fileId}\":\n [\"200\", \"304\"],\n \"GET /deviceUpdate/{instanceId}/updates/operations\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/updates/operations/{operationId}\": [\"200\", \"304\"],\n \"GET /deviceUpdate/{instanceId}/management/deviceClasses\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/deviceClasses/{deviceClassId}\": [\"200\"],\n \"PATCH /deviceUpdate/{instanceId}/management/deviceClasses/{deviceClassId}\": [\"200\"],\n \"DELETE /deviceUpdate/{instanceId}/management/deviceClasses/{deviceClassId}\": [\"204\"],\n \"GET /deviceUpdate/{instanceId}/management/deviceClasses/{deviceClassId}/installableUpdates\": [\n \"200\",\n ],\n \"GET /deviceUpdate/{instanceId}/management/devices\": [\"200\"],\n \"POST /deviceUpdate/{instanceId}/management/devices:import\": [\"202\"],\n \"GET /deviceUpdate/{instanceId}/management/devices:import\": [\"202\"],\n \"GET /deviceUpdate/{instanceId}/management/devices/{deviceId}\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/devices/{deviceId}/modules/{moduleId}\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/updateCompliance\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}\": [\"200\"],\n \"DELETE /deviceUpdate/{instanceId}/management/groups/{groupId}\": [\"204\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/updateCompliance\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/bestUpdates\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deployments\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}\": [\"200\"],\n \"PUT /deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}\": [\"200\"],\n \"DELETE /deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}\": [\n \"204\",\n ],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deployments/{deploymentId}/status\": [\n \"200\",\n ],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}\":\n [\"200\"],\n \"DELETE /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}\":\n [\"204\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/updateCompliance\":\n [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/bestUpdates\":\n [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments\":\n [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}\":\n [\"200\"],\n \"DELETE /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}\":\n [\"204\"],\n \"POST /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}:cancel\":\n [\"200\"],\n \"POST /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}:retry\":\n [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}/status\":\n [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/groups/{groupId}/deviceClassSubgroups/{deviceClassId}/deployments/{deploymentId}/devicestates\":\n [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/operations/{operationId}\": [\"200\", \"304\"],\n \"GET /deviceUpdate/{instanceId}/management/operations\": [\"200\"],\n \"PUT /deviceUpdate/{instanceId}/management/deviceDiagnostics/logCollections/{operationId}\": [\n \"201\",\n ],\n \"GET /deviceUpdate/{instanceId}/management/deviceDiagnostics/logCollections/{operationId}\": [\n \"200\",\n ],\n \"GET /deviceUpdate/{instanceId}/management/deviceDiagnostics/logCollections\": [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/deviceDiagnostics/logCollections/{operationId}/detailedStatus\":\n [\"200\"],\n \"GET /deviceUpdate/{instanceId}/management/deviceDiagnostics/deviceHealth\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: DeviceUpdateListUpdates200Response | DeviceUpdateListUpdatesdefaultResponse,\n): response is DeviceUpdateListUpdatesdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceUpdateImportUpdate200Response\n | DeviceUpdateImportUpdate202Response\n | DeviceUpdateImportUpdatedefaultResponse,\n): response is DeviceUpdateImportUpdatedefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceUpdateGetUpdate200Response\n | DeviceUpdateGetUpdate304Response\n | DeviceUpdateGetUpdatedefaultResponse,\n): response is DeviceUpdateGetUpdatedefaultResponse;\nexport function isUnexpected(\n response: DeviceUpdateDeleteUpdate202Response | DeviceUpdateDeleteUpdatedefaultResponse,\n): response is DeviceUpdateDeleteUpdatedefaultResponse;\nexport function isUnexpected(\n response: DeviceUpdateListProviders200Response | DeviceUpdateListProvidersdefaultResponse,\n): response is DeviceUpdateListProvidersdefaultResponse;\nexport function isUnexpected(\n response: DeviceUpdateListNames200Response | DeviceUpdateListNamesdefaultResponse,\n): response is DeviceUpdateListNamesdefaultResponse;\nexport function isUnexpected(\n response: DeviceUpdateListVersions200Response | DeviceUpdateListVersionsdefaultResponse,\n): response is DeviceUpdateListVersionsdefaultResponse;\nexport function isUnexpected(\n response: DeviceUpdateListFiles200Response | DeviceUpdateListFilesdefaultResponse,\n): response is DeviceUpdateListFilesdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceUpdateGetFile200Response\n | DeviceUpdateGetFile304Response\n | DeviceUpdateGetFiledefaultResponse,\n): response is DeviceUpdateGetFiledefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceUpdateListOperationStatuses200Response\n | DeviceUpdateListOperationStatusesdefaultResponse,\n): response is DeviceUpdateListOperationStatusesdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceUpdateGetOperationStatus200Response\n | DeviceUpdateGetOperationStatus304Response\n | DeviceUpdateGetOperationStatusdefaultResponse,\n): response is DeviceUpdateGetOperationStatusdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListDeviceClasses200Response\n | DeviceManagementListDeviceClassesdefaultResponse,\n): response is DeviceManagementListDeviceClassesdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetDeviceClass200Response\n | DeviceManagementGetDeviceClassdefaultResponse,\n): response is DeviceManagementGetDeviceClassdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementUpdateDeviceClass200Response\n | DeviceManagementUpdateDeviceClassdefaultResponse,\n): response is DeviceManagementUpdateDeviceClassdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementDeleteDeviceClass204Response\n | DeviceManagementDeleteDeviceClassdefaultResponse,\n): response is DeviceManagementDeleteDeviceClassdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListInstallableUpdatesForDeviceClass200Response\n | DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse,\n): response is DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse;\nexport function isUnexpected(\n response: DeviceManagementListDevices200Response | DeviceManagementListDevicesdefaultResponse,\n): response is DeviceManagementListDevicesdefaultResponse;\nexport function isUnexpected(\n response: DeviceManagementImportDevices202Response | DeviceManagementImportDevicesdefaultResponse,\n): response is DeviceManagementImportDevicesdefaultResponse;\nexport function isUnexpected(\n response: DeviceManagementGetDevice200Response | DeviceManagementGetDevicedefaultResponse,\n): response is DeviceManagementGetDevicedefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetDeviceModule200Response\n | DeviceManagementGetDeviceModuledefaultResponse,\n): response is DeviceManagementGetDeviceModuledefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetUpdateCompliance200Response\n | DeviceManagementGetUpdateCompliancedefaultResponse,\n): response is DeviceManagementGetUpdateCompliancedefaultResponse;\nexport function isUnexpected(\n response: DeviceManagementListGroups200Response | DeviceManagementListGroupsdefaultResponse,\n): response is DeviceManagementListGroupsdefaultResponse;\nexport function isUnexpected(\n response: DeviceManagementGetGroup200Response | DeviceManagementGetGroupdefaultResponse,\n): response is DeviceManagementGetGroupdefaultResponse;\nexport function isUnexpected(\n response: DeviceManagementDeleteGroup204Response | DeviceManagementDeleteGroupdefaultResponse,\n): response is DeviceManagementDeleteGroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetUpdateComplianceForGroup200Response\n | DeviceManagementGetUpdateComplianceForGroupdefaultResponse,\n): response is DeviceManagementGetUpdateComplianceForGroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListBestUpdatesForGroup200Response\n | DeviceManagementListBestUpdatesForGroupdefaultResponse,\n): response is DeviceManagementListBestUpdatesForGroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListDeploymentsForGroup200Response\n | DeviceManagementListDeploymentsForGroupdefaultResponse,\n): response is DeviceManagementListDeploymentsForGroupdefaultResponse;\nexport function isUnexpected(\n response: DeviceManagementGetDeployment200Response | DeviceManagementGetDeploymentdefaultResponse,\n): response is DeviceManagementGetDeploymentdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementCreateOrUpdateDeployment200Response\n | DeviceManagementCreateOrUpdateDeploymentdefaultResponse,\n): response is DeviceManagementCreateOrUpdateDeploymentdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementDeleteDeployment204Response\n | DeviceManagementDeleteDeploymentdefaultResponse,\n): response is DeviceManagementDeleteDeploymentdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetDeploymentStatus200Response\n | DeviceManagementGetDeploymentStatusdefaultResponse,\n): response is DeviceManagementGetDeploymentStatusdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListDeviceClassSubgroupsForGroup200Response\n | DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse,\n): response is DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetDeviceClassSubgroup200Response\n | DeviceManagementGetDeviceClassSubgroupdefaultResponse,\n): response is DeviceManagementGetDeviceClassSubgroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementDeleteDeviceClassSubgroup204Response\n | DeviceManagementDeleteDeviceClassSubgroupdefaultResponse,\n): response is DeviceManagementDeleteDeviceClassSubgroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetDeviceClassSubgroupUpdateCompliance200Response\n | DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse,\n): response is DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetBestUpdatesForDeviceClassSubgroup200Response\n | DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse,\n): response is DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListDeploymentsForDeviceClassSubgroup200Response\n | DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse,\n): response is DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetDeploymentForDeviceClassSubgroup200Response\n | DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse,\n): response is DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementDeleteDeploymentForDeviceClassSubgroup204Response\n | DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse,\n): response is DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementStopDeployment200Response\n | DeviceManagementStopDeploymentdefaultResponse,\n): response is DeviceManagementStopDeploymentdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementRetryDeployment200Response\n | DeviceManagementRetryDeploymentdefaultResponse,\n): response is DeviceManagementRetryDeploymentdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetDeviceClassSubgroupDeploymentStatus200Response\n | DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse,\n): response is DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment200Response\n | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse,\n): response is DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetOperationStatus200Response\n | DeviceManagementGetOperationStatus304Response\n | DeviceManagementGetOperationStatusdefaultResponse,\n): response is DeviceManagementGetOperationStatusdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListOperationStatuses200Response\n | DeviceManagementListOperationStatusesdefaultResponse,\n): response is DeviceManagementListOperationStatusesdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementStartLogCollection201Response\n | DeviceManagementStartLogCollectiondefaultResponse,\n): response is DeviceManagementStartLogCollectiondefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetLogCollection200Response\n | DeviceManagementGetLogCollectiondefaultResponse,\n): response is DeviceManagementGetLogCollectiondefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListLogCollections200Response\n | DeviceManagementListLogCollectionsdefaultResponse,\n): response is DeviceManagementListLogCollectionsdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementGetLogCollectionDetailedStatus200Response\n | DeviceManagementGetLogCollectionDetailedStatusdefaultResponse,\n): response is DeviceManagementGetLogCollectionDetailedStatusdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceManagementListHealthOfDevices200Response\n | DeviceManagementListHealthOfDevicesdefaultResponse,\n): response is DeviceManagementListHealthOfDevicesdefaultResponse;\nexport function isUnexpected(\n response:\n | DeviceUpdateListUpdates200Response\n | DeviceUpdateListUpdatesdefaultResponse\n | DeviceUpdateImportUpdate200Response\n | DeviceUpdateImportUpdate202Response\n | DeviceUpdateImportUpdatedefaultResponse\n | DeviceUpdateGetUpdate200Response\n | DeviceUpdateGetUpdate304Response\n | DeviceUpdateGetUpdatedefaultResponse\n | DeviceUpdateDeleteUpdate202Response\n | DeviceUpdateDeleteUpdatedefaultResponse\n | DeviceUpdateListProviders200Response\n | DeviceUpdateListProvidersdefaultResponse\n | DeviceUpdateListNames200Response\n | DeviceUpdateListNamesdefaultResponse\n | DeviceUpdateListVersions200Response\n | DeviceUpdateListVersionsdefaultResponse\n | DeviceUpdateListFiles200Response\n | DeviceUpdateListFilesdefaultResponse\n | DeviceUpdateGetFile200Response\n | DeviceUpdateGetFile304Response\n | DeviceUpdateGetFiledefaultResponse\n | DeviceUpdateListOperationStatuses200Response\n | DeviceUpdateListOperationStatusesdefaultResponse\n | DeviceUpdateGetOperationStatus200Response\n | DeviceUpdateGetOperationStatus304Response\n | DeviceUpdateGetOperationStatusdefaultResponse\n | DeviceManagementListDeviceClasses200Response\n | DeviceManagementListDeviceClassesdefaultResponse\n | DeviceManagementGetDeviceClass200Response\n | DeviceManagementGetDeviceClassdefaultResponse\n | DeviceManagementUpdateDeviceClass200Response\n | DeviceManagementUpdateDeviceClassdefaultResponse\n | DeviceManagementDeleteDeviceClass204Response\n | DeviceManagementDeleteDeviceClassdefaultResponse\n | DeviceManagementListInstallableUpdatesForDeviceClass200Response\n | DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse\n | DeviceManagementListDevices200Response\n | DeviceManagementListDevicesdefaultResponse\n | DeviceManagementImportDevices202Response\n | DeviceManagementImportDevicesdefaultResponse\n | DeviceManagementGetDevice200Response\n | DeviceManagementGetDevicedefaultResponse\n | DeviceManagementGetDeviceModule200Response\n | DeviceManagementGetDeviceModuledefaultResponse\n | DeviceManagementGetUpdateCompliance200Response\n | DeviceManagementGetUpdateCompliancedefaultResponse\n | DeviceManagementListGroups200Response\n | DeviceManagementListGroupsdefaultResponse\n | DeviceManagementGetGroup200Response\n | DeviceManagementGetGroupdefaultResponse\n | DeviceManagementDeleteGroup204Response\n | DeviceManagementDeleteGroupdefaultResponse\n | DeviceManagementGetUpdateComplianceForGroup200Response\n | DeviceManagementGetUpdateComplianceForGroupdefaultResponse\n | DeviceManagementListBestUpdatesForGroup200Response\n | DeviceManagementListBestUpdatesForGroupdefaultResponse\n | DeviceManagementListDeploymentsForGroup200Response\n | DeviceManagementListDeploymentsForGroupdefaultResponse\n | DeviceManagementGetDeployment200Response\n | DeviceManagementGetDeploymentdefaultResponse\n | DeviceManagementCreateOrUpdateDeployment200Response\n | DeviceManagementCreateOrUpdateDeploymentdefaultResponse\n | DeviceManagementDeleteDeployment204Response\n | DeviceManagementDeleteDeploymentdefaultResponse\n | DeviceManagementGetDeploymentStatus200Response\n | DeviceManagementGetDeploymentStatusdefaultResponse\n | DeviceManagementListDeviceClassSubgroupsForGroup200Response\n | DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse\n | DeviceManagementGetDeviceClassSubgroup200Response\n | DeviceManagementGetDeviceClassSubgroupdefaultResponse\n | DeviceManagementDeleteDeviceClassSubgroup204Response\n | DeviceManagementDeleteDeviceClassSubgroupdefaultResponse\n | DeviceManagementGetDeviceClassSubgroupUpdateCompliance200Response\n | DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse\n | DeviceManagementGetBestUpdatesForDeviceClassSubgroup200Response\n | DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse\n | DeviceManagementListDeploymentsForDeviceClassSubgroup200Response\n | DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse\n | DeviceManagementGetDeploymentForDeviceClassSubgroup200Response\n | DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse\n | DeviceManagementDeleteDeploymentForDeviceClassSubgroup204Response\n | DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse\n | DeviceManagementStopDeployment200Response\n | DeviceManagementStopDeploymentdefaultResponse\n | DeviceManagementRetryDeployment200Response\n | DeviceManagementRetryDeploymentdefaultResponse\n | DeviceManagementGetDeviceClassSubgroupDeploymentStatus200Response\n | DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse\n | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeployment200Response\n | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse\n | DeviceManagementGetOperationStatus200Response\n | DeviceManagementGetOperationStatus304Response\n | DeviceManagementGetOperationStatusdefaultResponse\n | DeviceManagementListOperationStatuses200Response\n | DeviceManagementListOperationStatusesdefaultResponse\n | DeviceManagementStartLogCollection201Response\n | DeviceManagementStartLogCollectiondefaultResponse\n | DeviceManagementGetLogCollection200Response\n | DeviceManagementGetLogCollectiondefaultResponse\n | DeviceManagementListLogCollections200Response\n | DeviceManagementListLogCollectionsdefaultResponse\n | DeviceManagementGetLogCollectionDetailedStatus200Response\n | DeviceManagementGetLogCollectionDetailedStatusdefaultResponse\n | DeviceManagementListHealthOfDevices200Response\n | DeviceManagementListHealthOfDevicesdefaultResponse,\n): response is\n | DeviceUpdateListUpdatesdefaultResponse\n | DeviceUpdateImportUpdatedefaultResponse\n | DeviceUpdateGetUpdatedefaultResponse\n | DeviceUpdateDeleteUpdatedefaultResponse\n | DeviceUpdateListProvidersdefaultResponse\n | DeviceUpdateListNamesdefaultResponse\n | DeviceUpdateListVersionsdefaultResponse\n | DeviceUpdateListFilesdefaultResponse\n | DeviceUpdateGetFiledefaultResponse\n | DeviceUpdateListOperationStatusesdefaultResponse\n | DeviceUpdateGetOperationStatusdefaultResponse\n | DeviceManagementListDeviceClassesdefaultResponse\n | DeviceManagementGetDeviceClassdefaultResponse\n | DeviceManagementUpdateDeviceClassdefaultResponse\n | DeviceManagementDeleteDeviceClassdefaultResponse\n | DeviceManagementListInstallableUpdatesForDeviceClassdefaultResponse\n | DeviceManagementListDevicesdefaultResponse\n | DeviceManagementImportDevicesdefaultResponse\n | DeviceManagementGetDevicedefaultResponse\n | DeviceManagementGetDeviceModuledefaultResponse\n | DeviceManagementGetUpdateCompliancedefaultResponse\n | DeviceManagementListGroupsdefaultResponse\n | DeviceManagementGetGroupdefaultResponse\n | DeviceManagementDeleteGroupdefaultResponse\n | DeviceManagementGetUpdateComplianceForGroupdefaultResponse\n | DeviceManagementListBestUpdatesForGroupdefaultResponse\n | DeviceManagementListDeploymentsForGroupdefaultResponse\n | DeviceManagementGetDeploymentdefaultResponse\n | DeviceManagementCreateOrUpdateDeploymentdefaultResponse\n | DeviceManagementDeleteDeploymentdefaultResponse\n | DeviceManagementGetDeploymentStatusdefaultResponse\n | DeviceManagementListDeviceClassSubgroupsForGroupdefaultResponse\n | DeviceManagementGetDeviceClassSubgroupdefaultResponse\n | DeviceManagementDeleteDeviceClassSubgroupdefaultResponse\n | DeviceManagementGetDeviceClassSubgroupUpdateCompliancedefaultResponse\n | DeviceManagementGetBestUpdatesForDeviceClassSubgroupdefaultResponse\n | DeviceManagementListDeploymentsForDeviceClassSubgroupdefaultResponse\n | DeviceManagementGetDeploymentForDeviceClassSubgroupdefaultResponse\n | DeviceManagementDeleteDeploymentForDeviceClassSubgroupdefaultResponse\n | DeviceManagementStopDeploymentdefaultResponse\n | DeviceManagementRetryDeploymentdefaultResponse\n | DeviceManagementGetDeviceClassSubgroupDeploymentStatusdefaultResponse\n | DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentdefaultResponse\n | DeviceManagementGetOperationStatusdefaultResponse\n | DeviceManagementListOperationStatusesdefaultResponse\n | DeviceManagementStartLogCollectiondefaultResponse\n | DeviceManagementGetLogCollectiondefaultResponse\n | DeviceManagementListLogCollectionsdefaultResponse\n | DeviceManagementGetLogCollectionDetailedStatusdefaultResponse\n | DeviceManagementListHealthOfDevicesdefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = geParametrizedPathSuccess(url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction geParametrizedPathSuccess(path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // If the candidate and actual paths don't match in size\n // we move on to the next candidate path\n if (candidateParts.length === pathParts.length && hasParametrizedPath(key)) {\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = 0; i < candidateParts.length; i++) {\n if (candidateParts[i].startsWith(\"{\") && candidateParts[i].endsWith(\"}\")) {\n // If the current part of the candidate is a \"template\" part\n // it is a match with the actual path part on hand\n // skip as the parameterized part can match anything\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[i]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // if all parts matched we return the success values form\n // the path mapping.\n if (found) {\n return value;\n }\n }\n }\n\n // No match was found, return an empty array.\n return [];\n}\n\nfunction hasParametrizedPath(path: string): boolean {\n return path.includes(\"/{\");\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
|
package/dist-esm/src/models.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport interface UpdateId {\n /** Update provider. */\n provider: string;\n /** Update name. */\n name: string;\n /** Update version. */\n version: string;\n}\n\nexport interface ImportUpdateInputItem {\n /** Import manifest metadata like source URL, file size/hashes, etc. */\n importManifest: ImportManifestMetadata;\n /** Friendly update name. */\n friendlyName?: string;\n /** One or more update file properties like filename and source URL. */\n files?: Array<FileImportMetadata>;\n}\n\nexport interface ImportManifestMetadata {\n /** Azure Blob location from which the import manifest can be downloaded by Device Update for IoT Hub. This is typically a read-only SAS-protected blob URL with an expiration set to at least 4 hours. */\n url: string;\n /** File size in number of bytes. */\n sizeInBytes: number;\n /** A JSON object containing the hash(es) of the file. At least SHA256 hash is required. This object can be thought of as a set of key-value pairs where the key is the hash algorithm, and the value is the hash of the file calculated using that algorithm. */\n hashes: Record<string, string>;\n}\n\nexport interface FileImportMetadata {\n /** Update file name as specified inside import manifest. */\n filename: string;\n /** Azure Blob location from which the update file can be downloaded by Device Update for IoT Hub. This is typically a read-only SAS-protected blob URL with an expiration set to at least 4 hours. */\n url: string;\n}\n\nexport interface UpdateInfo {\n /** Update identifier. */\n updateId: UpdateId;\n /** Update description. */\n description?: string;\n /** Friendly update name. */\n friendlyName?: string;\n}\n\nexport interface PatchBody {\n /** The device class friendly name. Friendly name can be 1-100 characters, alphanumeric, dot, and dash. */\n friendlyName: string;\n}\n\nexport interface Deployment {\n /** The caller-provided deployment identifier. This cannot be longer than 73 characters, must be all lower-case, and cannot contain '&', '^', '[', ']', '{', '}', '|', '<', '>', forward slash, backslash, or double quote. The Updates view in the Azure Portal IoT Hub resource generates a GUID for deploymentId when you create a deployment. */\n deploymentId: string;\n /** The deployment start datetime. */\n startDateTime: Date | string;\n /** Update information for the update in the deployment. */\n update: UpdateInfo;\n /** The group identity for the devices the deployment is intended to update. */\n groupId: string;\n /** The device class subgroups the deployment is compatible with and subgroup deployments have been created for. This is not provided by the caller during CreateOrUpdateDeployment but is automatically determined by Device Update */\n deviceClassSubgroups?: Array<string>;\n /** Boolean flag indicating whether the deployment was canceled. */\n isCanceled?: boolean;\n /** Boolean flag indicating whether the deployment has been retried. */\n isRetried?: boolean;\n /** The rollback policy for the deployment. */\n rollbackPolicy?: CloudInitiatedRollbackPolicy;\n /** Boolean flag indicating whether the deployment is a rollback deployment. */\n isCloudInitiatedRollback?: boolean;\n}\n\nexport interface CloudInitiatedRollbackPolicy {\n /** Update to rollback to. */\n update: UpdateInfo;\n /** Failure conditions to initiate rollback policy. */\n failure: CloudInitiatedRollbackPolicyFailure;\n}\n\nexport interface CloudInitiatedRollbackPolicyFailure {\n /** Percentage of devices that failed. */\n devicesFailedPercentage: number;\n /** Number of devices that failed. */\n devicesFailedCount: number;\n}\n\nexport interface LogCollection {\n /** The log collection id. */\n operationId?: string;\n /** Array of Device Update agent ids */\n deviceList: Array<DeviceUpdateAgentId>;\n /** Description of the diagnostics operation. */\n description?: string;\n /** The timestamp when the operation was created. */\n createdDateTime?: string;\n /** A timestamp for when the current state was entered. */\n lastActionDateTime?: string;\n /** Operation status. */\n status?: \"NotStarted\" | \"Running\" | \"Succeeded\" | \"Failed\";\n}\n\nexport interface DeviceUpdateAgentId {\n /** Device Id */\n deviceId: string;\n /** Module Id */\n moduleId?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport interface UpdateListOutput {\n /** The collection of pageable items. */\n value: Array<UpdateOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface UpdateOutput {\n /** Update identity. */\n updateId: UpdateIdOutput;\n /** Update description specified by creator. */\n description?: string;\n /** Friendly update name specified by importer. */\n friendlyName?: string;\n /** Whether the update can be deployed to a device on its own. */\n isDeployable?: boolean;\n /** Update type. Deprecated in latest import manifest schema. */\n updateType?: string;\n /** String interpreted by Device Update client to determine if the update is installed on the device. Deprecated in latest import manifest schema. */\n installedCriteria?: string;\n /** List of update compatibility information. */\n compatibility: Array<Record<string, string>>;\n /** Update install instructions. */\n instructions?: InstructionsOutput;\n /** List of update identities that reference this update. */\n referencedBy?: Array<UpdateIdOutput>;\n /** Update aggregate scan result (calculated from payload file scan results). */\n scanResult?: string;\n /** Schema version of manifest used to import the update. */\n manifestVersion: string;\n /** Date and time in UTC when the update was imported. */\n importedDateTime: string;\n /** Date and time in UTC when the update was created. */\n createdDateTime: string;\n /** Update ETag. */\n etag?: string;\n}\n\nexport interface UpdateIdOutput {\n /** Update provider. */\n provider: string;\n /** Update name. */\n name: string;\n /** Update version. */\n version: string;\n}\n\nexport interface InstructionsOutput {\n /** Collection of installation steps. */\n steps: Array<StepOutput>;\n}\n\nexport interface StepOutput {\n /** Step type. */\n type?: \"Inline\" | \"Reference\";\n /** Step description. */\n description?: string;\n /** Identity of handler that will execute this step. Required if step type is inline. */\n handler?: string;\n /** Parameters to be passed to handler during execution. */\n handlerProperties?: Record<string, unknown>;\n /** Collection of file names to be passed to handler during execution. Required if step type is inline. */\n files?: Array<string>;\n /** Referenced child update identity. Required if step type is reference. */\n updateId?: UpdateIdOutput;\n}\n\nexport interface ErrorResponseOutput {\n /** The error details. */\n error: ErrorModelOutput;\n}\n\nexport interface ErrorModelOutput {\n /** Server defined error code. */\n code: string;\n /** A human-readable representation of the error. */\n message: string;\n /** The target of the error. */\n target?: string;\n /** An array of errors that led to the reported error. */\n details?: Array<ErrorModelOutput>;\n /** An object containing more specific information than the current object about the error. */\n innererror?: InnerErrorOutput;\n /** Date and time in UTC when the error occurred. */\n occurredDateTime?: string;\n}\n\nexport interface InnerErrorOutput {\n /** A more specific error code than what was provided by the containing error. */\n code: string;\n /** A human-readable representation of the error. */\n message?: string;\n /** The internal error or exception message. */\n errorDetail?: string;\n /** An object containing more specific information than the current object about the error. */\n innerError?: InnerErrorOutput;\n}\n\nexport interface StringsListOutput {\n /** The collection of pageable items. */\n value: Array<string>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface UpdateFileOutput extends UpdateFileBaseOutput {\n /** File identity, generated by server at import time. */\n fileId: string;\n /** Optional related files metadata used together DownloadHandler metadata to download payload file. */\n relatedFiles?: Array<UpdateFileBaseOutput>;\n /** Optional download handler for utilizing related files to download payload file. */\n downloadHandler?: UpdateFileDownloadHandlerOutput;\n /** File ETag. */\n etag?: string;\n}\n\nexport interface UpdateFileBaseOutput {\n /** File name. */\n fileName: string;\n /** File size in number of bytes. */\n sizeInBytes: number;\n /** Mapping of hashing algorithm to base64 encoded hash values. */\n hashes: Record<string, string>;\n /** File MIME type. */\n mimeType?: string;\n /** Anti-malware scan result. */\n scanResult?: string;\n /** Anti-malware scan details. */\n scanDetails?: string;\n /** Optional file properties (not consumed by service but pass-through to device). */\n properties?: Record<string, string>;\n}\n\nexport interface UpdateFileDownloadHandlerOutput {\n /** Download handler identifier. */\n id: string;\n}\n\nexport interface UpdateOperationsListOutput {\n /** The collection of pageable items. */\n value: Array<UpdateOperationOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface UpdateOperationOutput {\n /** Operation Id. */\n operationId: string;\n /** Operation status. */\n status: \"NotStarted\" | \"Running\" | \"Succeeded\" | \"Failed\";\n /** The update being imported or deleted. For import, this property will only be populated after import manifest is processed successfully. */\n update?: UpdateInfoOutput;\n /** Location of the imported update when operation is successful. */\n resourceLocation?: string;\n /** Operation error encountered, if any. */\n error?: ErrorModelOutput;\n /** Operation correlation identity that can used by Microsoft Support for troubleshooting. */\n traceId?: string;\n /** Date and time in UTC when the operation status was last updated. */\n lastActionDateTime: string;\n /** Date and time in UTC when the operation was created. */\n createdDateTime: string;\n /** Operation ETag. */\n etag?: string;\n}\n\nexport interface UpdateInfoOutput {\n /** Update identifier. */\n updateId: UpdateIdOutput;\n /** Update description. */\n description?: string;\n /** Friendly update name. */\n friendlyName?: string;\n}\n\nexport interface DeviceClassesListOutput {\n /** The collection of pageable items. */\n value: Array<DeviceClassOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface DeviceClassOutput {\n /** The device class identifier. This is generated from the model Id and the compat properties reported by the device update agent in the Device Update PnP interface in IoT Hub. It is a hex-encoded SHA1 hash. */\n deviceClassId: string;\n /** The device class friendly name. This can be updated by callers after the device class has been automatically created. */\n friendlyName?: string;\n /** The device class properties that are used to calculate the device class Id */\n deviceClassProperties: DeviceClassPropertiesOutput;\n /** Update that is the highest version compatible with this device class. */\n bestCompatibleUpdate?: UpdateInfoOutput;\n}\n\nexport interface DeviceClassPropertiesOutput {\n /** The Device Update agent contract model. */\n contractModel?: ContractModelOutput;\n /** The compat properties of the device class. This object can be thought of as a set of key-value pairs where the key is the name of the compatibility property and the value is the value of the compatibility property. There will always be at least 1 compat property */\n compatProperties: Record<string, string>;\n}\n\nexport interface ContractModelOutput {\n /** The Device Update agent contract model Id of the device class. This is also used to calculate the device class Id. */\n id: string;\n /** The Device Update agent contract model name of the device class. Intended to be a more readable form of the contract model Id. */\n name: string;\n}\n\nexport interface UpdateInfoListOutput {\n /** The collection of pageable items. */\n value: Array<UpdateInfoOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface DevicesListOutput {\n /** The collection of pageable items. */\n value: Array<DeviceOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface DeviceOutput {\n /** Device identity. */\n deviceId: string;\n /** Device module identity. */\n moduleId?: string;\n /** Device class identity. */\n deviceClassId: string;\n /** Device group identity. */\n groupId?: string;\n /** The update that device last attempted to install. */\n lastAttemptedUpdate?: UpdateInfoOutput;\n /** State of the device in its last deployment. */\n deploymentStatus?: \"Succeeded\" | \"InProgress\" | \"Canceled\" | \"Failed\";\n /** Currently installed update on device. */\n installedUpdate?: UpdateInfoOutput;\n /** Boolean flag indicating whether the latest update (the best compatible update for the device's device class and group) is installed on the device */\n onLatestUpdate: boolean;\n /** The deployment identifier for the last deployment to the device */\n lastDeploymentId?: string;\n /** Last install result. */\n lastInstallResult?: InstallResultOutput;\n}\n\nexport interface InstallResultOutput {\n /** Install result code. */\n resultCode: number;\n /** Install extended result code */\n extendedResultCode: number;\n /** A string containing further details about the install result */\n resultDetails?: string;\n /** Array of step results */\n stepResults?: Array<StepResultOutput>;\n}\n\nexport interface StepResultOutput {\n /** The update that this step installs if it is of reference type. */\n update?: UpdateInfoOutput;\n /** Step description. */\n description?: string;\n /** Install result code. */\n resultCode: number;\n /** Install extended result code */\n extendedResultCode: number;\n /** A string containing further details about the install result */\n resultDetails?: string;\n}\n\nexport interface UpdateComplianceOutput {\n /** Total number of devices. */\n totalDeviceCount: number;\n /** Number of devices on the latest update. */\n onLatestUpdateDeviceCount: number;\n /** Number of devices with a newer update available. */\n newUpdatesAvailableDeviceCount: number;\n /** Number of devices with update in-progress. */\n updatesInProgressDeviceCount: number;\n}\n\nexport interface GroupsListOutput {\n /** The collection of pageable items. */\n value: Array<GroupOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface GroupOutput {\n /** Group identity. This is created from the value of the ADUGroup tag in the Iot Hub's device/module twin or $default for devices with no tag. */\n groupId: string;\n /** Group type. */\n groupType: \"IoTHubTag\" | \"DefaultNoTag\";\n /** Date and time when the update was created. */\n createdDateTime: string;\n /** The number of devices in the group. */\n deviceCount?: number;\n /** The count of subgroups with new updates available. */\n subgroupsWithNewUpdatesAvailableCount?: number;\n /** The count of subgroups with updates in progress. */\n subgroupsWithUpdatesInProgressCount?: number;\n /** The count of subgroups with devices on the latest update. */\n subgroupsWithOnLatestUpdateCount?: number;\n /** The active deployment Ids for the group */\n deployments?: Array<string>;\n}\n\nexport interface DeviceClassSubgroupUpdatableDevicesListOutput {\n /** The collection of pageable items. */\n value: Array<DeviceClassSubgroupUpdatableDevicesOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface DeviceClassSubgroupUpdatableDevicesOutput {\n /** The group Id */\n groupId: string;\n /** The device class subgroup's device class Id */\n deviceClassId: string;\n /** Update information. */\n update: UpdateInfoOutput;\n /** Total number of devices for which the update is applicable. */\n deviceCount: number;\n}\n\nexport interface DeploymentsListOutput {\n /** The collection of pageable items. */\n value: Array<DeploymentOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface DeploymentOutput {\n /** The caller-provided deployment identifier. This cannot be longer than 73 characters, must be all lower-case, and cannot contain '&', '^', '[', ']', '{', '}', '|', '<', '>', forward slash, backslash, or double quote. The Updates view in the Azure Portal IoT Hub resource generates a GUID for deploymentId when you create a deployment. */\n deploymentId: string;\n /** The deployment start datetime. */\n startDateTime: string;\n /** Update information for the update in the deployment. */\n update: UpdateInfoOutput;\n /** The group identity for the devices the deployment is intended to update. */\n groupId: string;\n /** The device class subgroups the deployment is compatible with and subgroup deployments have been created for. This is not provided by the caller during CreateOrUpdateDeployment but is automatically determined by Device Update */\n deviceClassSubgroups?: Array<string>;\n /** Boolean flag indicating whether the deployment was canceled. */\n isCanceled?: boolean;\n /** Boolean flag indicating whether the deployment has been retried. */\n isRetried?: boolean;\n /** The rollback policy for the deployment. */\n rollbackPolicy?: CloudInitiatedRollbackPolicyOutput;\n /** Boolean flag indicating whether the deployment is a rollback deployment. */\n isCloudInitiatedRollback?: boolean;\n}\n\nexport interface CloudInitiatedRollbackPolicyOutput {\n /** Update to rollback to. */\n update: UpdateInfoOutput;\n /** Failure conditions to initiate rollback policy. */\n failure: CloudInitiatedRollbackPolicyFailureOutput;\n}\n\nexport interface CloudInitiatedRollbackPolicyFailureOutput {\n /** Percentage of devices that failed. */\n devicesFailedPercentage: number;\n /** Number of devices that failed. */\n devicesFailedCount: number;\n}\n\nexport interface DeploymentStatusOutput {\n /** The group identity */\n groupId: string;\n /** The state of the deployment. */\n deploymentState: \"Active\" | \"ActiveWithSubgroupFailures\" | \"Failed\" | \"Inactive\" | \"Canceled\";\n /** The error details of the Failed state. This is not present if the deployment state is not Failed. */\n error?: ErrorModelOutput;\n /** The collection of device class subgroup status objects */\n subgroupStatus: Array<DeviceClassSubgroupDeploymentStatusOutput>;\n}\n\nexport interface DeviceClassSubgroupDeploymentStatusOutput {\n /** The group identity */\n groupId: string;\n /** The device class subgroup identity */\n deviceClassId: string;\n /** The state of the subgroup deployment. */\n deploymentState: \"Active\" | \"Failed\" | \"Inactive\" | \"Canceled\";\n /** The error details of the Failed state. This is not present if the deployment state is not Failed. */\n error?: ErrorModelOutput;\n /** The total number of devices in the deployment. */\n totalDevices?: number;\n /** The number of devices that are currently in deployment. */\n devicesInProgressCount?: number;\n /** The number of devices that have completed deployment with a failure. */\n devicesCompletedFailedCount?: number;\n /** The number of devices which have successfully completed deployment. */\n devicesCompletedSucceededCount?: number;\n /** The number of devices which have had their deployment canceled. */\n devicesCanceledCount?: number;\n}\n\nexport interface DeviceClassSubgroupsListOutput {\n /** The collection of pageable items. */\n value: Array<DeviceClassSubgroupOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface DeviceClassSubgroupOutput {\n /** Device class subgroup identity. This is generated from the model Id and the compat properties reported by the device update agent in the Device Update PnP interface in IoT Hub. It is a hex-encoded SHA1 hash. */\n deviceClassId: string;\n /** Group identity. */\n groupId: string;\n /** Date and time when the device class subgroup was created. */\n createdDateTime: string;\n /** The number of devices in the device class subgroup. */\n deviceCount?: number;\n /** The active deployment Id for the device class subgroup. */\n deploymentId?: string;\n}\n\nexport interface DeploymentDeviceStatesListOutput {\n /** The collection of pageable items. */\n value: Array<DeploymentDeviceStateOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface DeploymentDeviceStateOutput {\n /** Device identity. */\n deviceId: string;\n /** Device module identity. */\n moduleId?: string;\n /** The number of times this deployment has been retried on this device. */\n retryCount: number;\n /** Boolean flag indicating whether this device is in a newer deployment and can no longer retry this deployment. */\n movedOnToNewDeployment: boolean;\n /** Deployment device state. */\n deviceState: \"Succeeded\" | \"InProgress\" | \"Canceled\" | \"Failed\";\n}\n\nexport interface DeviceOperationOutput {\n /** Operation Id. */\n operationId: string;\n /** Operation status. */\n status: \"NotStarted\" | \"Running\" | \"Succeeded\" | \"Failed\";\n /** Operation error encountered, if any. */\n error?: ErrorModelOutput;\n /** Operation correlation identity that can used by Microsoft Support for troubleshooting. */\n traceId?: string;\n /** Date and time in UTC when the operation status was last updated. */\n lastActionDateTime: string;\n /** Date and time in UTC when the operation was created. */\n createdDateTime: string;\n /** Operation ETag. */\n etag?: string;\n}\n\nexport interface DeviceOperationsListOutput {\n /** The collection of pageable items. */\n value: Array<DeviceOperationOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface LogCollectionOutput {\n /** The log collection id. */\n operationId?: string;\n /** Array of Device Update agent ids */\n deviceList: Array<DeviceUpdateAgentIdOutput>;\n /** Description of the diagnostics operation. */\n description?: string;\n /** The timestamp when the operation was created. */\n createdDateTime?: string;\n /** A timestamp for when the current state was entered. */\n lastActionDateTime?: string;\n /** Operation status. */\n status?: \"NotStarted\" | \"Running\" | \"Succeeded\" | \"Failed\";\n}\n\nexport interface DeviceUpdateAgentIdOutput {\n /** Device Id */\n deviceId: string;\n /** Module Id */\n moduleId?: string;\n}\n\nexport interface LogCollectionListOutput {\n /** The collection of pageable items. */\n value: Array<LogCollectionOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface LogCollectionOperationDetailedStatusOutput {\n /** The device diagnostics operation id. */\n operationId?: string;\n /** The timestamp when the operation was created. */\n createdDateTime?: string;\n /** A timestamp for when the current state was entered. */\n lastActionDateTime?: string;\n /** Operation status. */\n status?: \"NotStarted\" | \"Running\" | \"Succeeded\" | \"Failed\";\n /** Status of the devices in the operation */\n deviceStatus?: Array<LogCollectionOperationDeviceStatusOutput>;\n /** Device diagnostics operation description. */\n description?: string;\n}\n\nexport interface LogCollectionOperationDeviceStatusOutput {\n /** Device id */\n deviceId: string;\n /** Module id. */\n moduleId?: string;\n /** Log upload status */\n status: \"NotStarted\" | \"Running\" | \"Succeeded\" | \"Failed\";\n /** Log upload result code */\n resultCode?: string;\n /** Log upload extended result code */\n extendedResultCode?: string;\n /** Log upload location */\n logLocation?: string;\n}\n\nexport interface DeviceHealthListOutput {\n /** The collection of pageable items. */\n value: Array<DeviceHealthOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface DeviceHealthOutput {\n /** Device id */\n deviceId: string;\n /** Module id */\n moduleId?: string;\n /** Aggregate device health state */\n state: \"healthy\" | \"unhealthy\";\n /** Digital twin model Id */\n digitalTwinModelId?: string;\n /** Array of health checks and their results */\n healthChecks: Array<HealthCheckOutput>;\n}\n\nexport interface HealthCheckOutput {\n /** Health check name */\n name?: string;\n /** Health check result */\n result?: \"success\" | \"userError\";\n}\n"]}
|
|
1
|
+
{"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../src/outputModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport interface UpdateListOutput {\n /** The collection of pageable items. */\n value: Array<UpdateOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface UpdateOutput {\n /** Update identity. */\n updateId: UpdateIdOutput;\n /** Update description specified by creator. */\n description?: string;\n /** Friendly update name specified by importer. */\n friendlyName?: string;\n /** Whether the update can be deployed to a device on its own. */\n isDeployable?: boolean;\n /** Update type. Deprecated in latest import manifest schema. */\n updateType?: string;\n /** String interpreted by Device Update client to determine if the update is installed on the device. Deprecated in latest import manifest schema. */\n installedCriteria?: string;\n /** List of update compatibility information. */\n compatibility: Array<Record<string, string>>;\n /** Update install instructions. */\n instructions?: InstructionsOutput;\n /** List of update identities that reference this update. */\n referencedBy?: Array<UpdateIdOutput>;\n /** Update aggregate scan result (calculated from payload file scan results). */\n scanResult?: string;\n /** Schema version of manifest used to import the update. */\n manifestVersion: string;\n /** Date and time in UTC when the update was imported. */\n importedDateTime: string;\n /** Date and time in UTC when the update was created. */\n createdDateTime: string;\n /** Update ETag. */\n etag?: string;\n}\n\nexport interface UpdateIdOutput {\n /** Update provider. */\n provider: string;\n /** Update name. */\n name: string;\n /** Update version. */\n version: string;\n}\n\nexport interface InstructionsOutput {\n /** Collection of installation steps. */\n steps: Array<StepOutput>;\n}\n\nexport interface StepOutput {\n /** Step type. */\n type?: \"Inline\" | \"Reference\";\n /** Step description. */\n description?: string;\n /** Identity of handler that will execute this step. Required if step type is inline. */\n handler?: string;\n /** Parameters to be passed to handler during execution. */\n handlerProperties?: Record<string, unknown>;\n /** Collection of file names to be passed to handler during execution. Required if step type is inline. */\n files?: Array<string>;\n /** Referenced child update identity. Required if step type is reference. */\n updateId?: UpdateIdOutput;\n}\n\nexport interface ErrorResponseOutput {\n /** The error details. */\n error: ErrorModelOutput;\n}\n\nexport interface ErrorModelOutput {\n /** Server defined error code. */\n code: string;\n /** A human-readable representation of the error. */\n message: string;\n /** The target of the error. */\n target?: string;\n /** An array of errors that led to the reported error. */\n details?: Array<ErrorModelOutput>;\n /** An object containing more specific information than the current object about the error. */\n innererror?: InnerErrorOutput;\n /** Date and time in UTC when the error occurred. */\n occurredDateTime?: string;\n}\n\nexport interface InnerErrorOutput {\n /** A more specific error code than what was provided by the containing error. */\n code: string;\n /** A human-readable representation of the error. */\n message?: string;\n /** The internal error or exception message. */\n errorDetail?: string;\n /** An object containing more specific information than the current object about the error. */\n innerError?: InnerErrorOutput;\n}\n\nexport interface StringsListOutput {\n /** The collection of pageable items. */\n value: Array<string>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface UpdateFileOutput extends UpdateFileBaseOutput {\n /** File identity, generated by server at import time. */\n fileId: string;\n /** Optional related files metadata used together DownloadHandler metadata to download payload file. */\n relatedFiles?: Array<UpdateFileBaseOutput>;\n /** Optional download handler for utilizing related files to download payload file. */\n downloadHandler?: UpdateFileDownloadHandlerOutput;\n /** File ETag. */\n etag?: string;\n}\n\nexport interface UpdateFileBaseOutput {\n /** File name. */\n fileName: string;\n /** File size in number of bytes. */\n sizeInBytes: number;\n /** Mapping of hashing algorithm to base64 encoded hash values. */\n hashes: Record<string, string>;\n /** File MIME type. */\n mimeType?: string;\n /** Anti-malware scan result. */\n scanResult?: string;\n /** Anti-malware scan details. */\n scanDetails?: string;\n /** Optional file properties (not consumed by service but pass-through to device). */\n properties?: Record<string, string>;\n}\n\nexport interface UpdateFileDownloadHandlerOutput {\n /** Download handler identifier. */\n id: string;\n}\n\nexport interface UpdateOperationsListOutput {\n /** The collection of pageable items. */\n value: Array<UpdateOperationOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface UpdateOperationOutput {\n /** Operation Id. */\n operationId: string;\n /** Operation status. */\n status: \"NotStarted\" | \"Running\" | \"Succeeded\" | \"Failed\";\n /** The update being imported or deleted. For import, this property will only be populated after import manifest is processed successfully. */\n update?: UpdateInfoOutput;\n /** Location of the imported update when operation is successful. */\n resourceLocation?: string;\n /** Operation error encountered, if any. */\n error?: ErrorModelOutput;\n /** Operation correlation identity that can used by Microsoft Support for troubleshooting. */\n traceId?: string;\n /** Date and time in UTC when the operation status was last updated. */\n lastActionDateTime: string;\n /** Date and time in UTC when the operation was created. */\n createdDateTime: string;\n /** Operation ETag. */\n etag?: string;\n}\n\nexport interface UpdateInfoOutput {\n /** Update identifier. */\n updateId: UpdateIdOutput;\n /** Update description. */\n description?: string;\n /** Friendly update name. */\n friendlyName?: string;\n}\n\nexport interface DeviceClassesListOutput {\n /** The collection of pageable items. */\n value: Array<DeviceClassOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface DeviceClassOutput {\n /** The device class identifier. This is generated from the model Id and the compat properties reported by the device update agent in the Device Update PnP interface in IoT Hub. It is a hex-encoded SHA1 hash. */\n deviceClassId: string;\n /** The device class friendly name. This can be updated by callers after the device class has been automatically created. */\n friendlyName?: string;\n /** The device class properties that are used to calculate the device class Id */\n deviceClassProperties: DeviceClassPropertiesOutput;\n /** Update that is the highest version compatible with this device class. */\n bestCompatibleUpdate?: UpdateInfoOutput;\n}\n\nexport interface DeviceClassPropertiesOutput {\n /** The Device Update agent contract model. */\n contractModel?: ContractModelOutput;\n /** The compat properties of the device class. This object can be thought of as a set of key-value pairs where the key is the name of the compatibility property and the value is the value of the compatibility property. There will always be at least 1 compat property */\n compatProperties: Record<string, string>;\n}\n\nexport interface ContractModelOutput {\n /** The Device Update agent contract model Id of the device class. This is also used to calculate the device class Id. */\n id: string;\n /** The Device Update agent contract model name of the device class. Intended to be a more readable form of the contract model Id. */\n name: string;\n}\n\nexport interface UpdateInfoListOutput {\n /** The collection of pageable items. */\n value: Array<UpdateInfoOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface DevicesListOutput {\n /** The collection of pageable items. */\n value: Array<DeviceOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface DeviceOutput {\n /** Device identity. */\n deviceId: string;\n /** Device module identity. */\n moduleId?: string;\n /** Device class identity. */\n deviceClassId: string;\n /** Device group identity. */\n groupId?: string;\n /** The update that device last attempted to install. */\n lastAttemptedUpdate?: UpdateInfoOutput;\n /** State of the device in its last deployment. */\n deploymentStatus?: \"Succeeded\" | \"InProgress\" | \"Canceled\" | \"Failed\";\n /** Currently installed update on device. */\n installedUpdate?: UpdateInfoOutput;\n /** Boolean flag indicating whether the latest update (the best compatible update for the device's device class and group) is installed on the device */\n onLatestUpdate: boolean;\n /** The deployment identifier for the last deployment to the device */\n lastDeploymentId?: string;\n /** Last install result. */\n lastInstallResult?: InstallResultOutput;\n}\n\nexport interface InstallResultOutput {\n /** Install result code. */\n resultCode: number;\n /** Install extended result code */\n extendedResultCode: number;\n /** A string containing further details about the install result */\n resultDetails?: string;\n /** Array of step results */\n stepResults?: Array<StepResultOutput>;\n}\n\nexport interface StepResultOutput {\n /** The update that this step installs if it is of reference type. */\n update?: UpdateInfoOutput;\n /** Step description. */\n description?: string;\n /** Install result code. */\n resultCode: number;\n /** Install extended result code */\n extendedResultCode: number;\n /** A string containing further details about the install result */\n resultDetails?: string;\n}\n\nexport interface UpdateComplianceOutput {\n /** Total number of devices. */\n totalDeviceCount: number;\n /** Number of devices on the latest update. */\n onLatestUpdateDeviceCount: number;\n /** Number of devices with a newer update available. */\n newUpdatesAvailableDeviceCount: number;\n /** Number of devices with update in-progress. */\n updatesInProgressDeviceCount: number;\n}\n\nexport interface GroupsListOutput {\n /** The collection of pageable items. */\n value: Array<GroupOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface GroupOutput {\n /** Group identity. This is created from the value of the ADUGroup tag in the Iot Hub's device/module twin or $default for devices with no tag. */\n groupId: string;\n /** Group type. */\n groupType: \"IoTHubTag\" | \"DefaultNoTag\";\n /** Date and time when the update was created. */\n createdDateTime: string;\n /** The number of devices in the group. */\n deviceCount?: number;\n /** The count of subgroups with new updates available. */\n subgroupsWithNewUpdatesAvailableCount?: number;\n /** The count of subgroups with updates in progress. */\n subgroupsWithUpdatesInProgressCount?: number;\n /** The count of subgroups with devices on the latest update. */\n subgroupsWithOnLatestUpdateCount?: number;\n /** The active deployment Ids for the group */\n deployments?: Array<string>;\n}\n\nexport interface DeviceClassSubgroupUpdatableDevicesListOutput {\n /** The collection of pageable items. */\n value: Array<DeviceClassSubgroupUpdatableDevicesOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface DeviceClassSubgroupUpdatableDevicesOutput {\n /** The group Id */\n groupId: string;\n /** The device class subgroup's device class Id */\n deviceClassId: string;\n /** Update information. */\n update: UpdateInfoOutput;\n /** Total number of devices for which the update is applicable. */\n deviceCount: number;\n}\n\nexport interface DeploymentsListOutput {\n /** The collection of pageable items. */\n value: Array<DeploymentOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface DeploymentOutput {\n /** The caller-provided deployment identifier. This cannot be longer than 73 characters, must be all lower-case, and cannot contain '&', '^', '[', ']', '{', '}', '|', '<', '>', forward slash, backslash, or double quote. The Updates view in the Azure Portal IoT Hub resource generates a GUID for deploymentId when you create a deployment. */\n deploymentId: string;\n /** The deployment start datetime. */\n startDateTime: string;\n /** Update information for the update in the deployment. */\n update: UpdateInfoOutput;\n /** The group identity for the devices the deployment is intended to update. */\n groupId: string;\n /** The device class subgroups the deployment is compatible with and subgroup deployments have been created for. This is not provided by the caller during CreateOrUpdateDeployment but is automatically determined by Device Update */\n deviceClassSubgroups?: Array<string>;\n /** Boolean flag indicating whether the deployment was canceled. */\n isCanceled?: boolean;\n /** Boolean flag indicating whether the deployment has been retried. */\n isRetried?: boolean;\n /** The rollback policy for the deployment. */\n rollbackPolicy?: CloudInitiatedRollbackPolicyOutput;\n /** Boolean flag indicating whether the deployment is a rollback deployment. */\n isCloudInitiatedRollback?: boolean;\n}\n\nexport interface CloudInitiatedRollbackPolicyOutput {\n /** Update to rollback to. */\n update: UpdateInfoOutput;\n /** Failure conditions to initiate rollback policy. */\n failure: CloudInitiatedRollbackPolicyFailureOutput;\n}\n\nexport interface CloudInitiatedRollbackPolicyFailureOutput {\n /** Percentage of devices that failed. */\n devicesFailedPercentage: number;\n /** Number of devices that failed. */\n devicesFailedCount: number;\n}\n\nexport interface DeploymentStatusOutput {\n /** The group identity */\n groupId: string;\n /** The state of the deployment. */\n deploymentState: \"Active\" | \"ActiveWithSubgroupFailures\" | \"Failed\" | \"Inactive\" | \"Canceled\";\n /** The error details of the Failed state. This is not present if the deployment state is not Failed. */\n error?: ErrorModelOutput;\n /** The collection of device class subgroup status objects */\n subgroupStatus: Array<DeviceClassSubgroupDeploymentStatusOutput>;\n}\n\nexport interface DeviceClassSubgroupDeploymentStatusOutput {\n /** The group identity */\n groupId: string;\n /** The device class subgroup identity */\n deviceClassId: string;\n /** The state of the subgroup deployment. */\n deploymentState: \"Active\" | \"Failed\" | \"Inactive\" | \"Canceled\";\n /** The error details of the Failed state. This is not present if the deployment state is not Failed. */\n error?: ErrorModelOutput;\n /** The total number of devices in the deployment. */\n totalDevices?: number;\n /** The number of devices that are currently in deployment. */\n devicesInProgressCount?: number;\n /** The number of devices that have completed deployment with a failure. */\n devicesCompletedFailedCount?: number;\n /** The number of devices which have successfully completed deployment. */\n devicesCompletedSucceededCount?: number;\n /** The number of devices which have had their deployment canceled. */\n devicesCanceledCount?: number;\n}\n\nexport interface DeviceClassSubgroupsListOutput {\n /** The collection of pageable items. */\n value: Array<DeviceClassSubgroupOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface DeviceClassSubgroupOutput {\n /** Device class subgroup identity. This is generated from the model Id and the compat properties reported by the device update agent in the Device Update PnP interface in IoT Hub. It is a hex-encoded SHA1 hash. */\n deviceClassId: string;\n /** Group identity. */\n groupId: string;\n /** Date and time when the device class subgroup was created. */\n createdDateTime: string;\n /** The number of devices in the device class subgroup. */\n deviceCount?: number;\n /** The active deployment Id for the device class subgroup. */\n deploymentId?: string;\n}\n\nexport interface DeploymentDeviceStatesListOutput {\n /** The collection of pageable items. */\n value: Array<DeploymentDeviceStateOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface DeploymentDeviceStateOutput {\n /** Device identity. */\n deviceId: string;\n /** Device module identity. */\n moduleId?: string;\n /** The number of times this deployment has been retried on this device. */\n retryCount: number;\n /** Boolean flag indicating whether this device is in a newer deployment and can no longer retry this deployment. */\n movedOnToNewDeployment: boolean;\n /** Deployment device state. */\n deviceState: \"Succeeded\" | \"InProgress\" | \"Canceled\" | \"Failed\";\n}\n\nexport interface DeviceOperationOutput {\n /** Operation Id. */\n operationId: string;\n /** Operation status. */\n status: \"NotStarted\" | \"Running\" | \"Succeeded\" | \"Failed\";\n /** Operation error encountered, if any. */\n error?: ErrorModelOutput;\n /** Operation correlation identity that can used by Microsoft Support for troubleshooting. */\n traceId?: string;\n /** Date and time in UTC when the operation status was last updated. */\n lastActionDateTime: string;\n /** Date and time in UTC when the operation was created. */\n createdDateTime: string;\n /** Operation ETag. */\n etag?: string;\n}\n\nexport interface DeviceOperationsListOutput {\n /** The collection of pageable items. */\n value: Array<DeviceOperationOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface LogCollectionOutput {\n /** The log collection id. */\n operationId?: string;\n /** Array of Device Update agent ids */\n deviceList: Array<DeviceUpdateAgentIdOutput>;\n /** Description of the diagnostics operation. */\n description?: string;\n /** The timestamp when the operation was created. */\n createdDateTime?: string;\n /** A timestamp for when the current state was entered. */\n lastActionDateTime?: string;\n /** Operation status. */\n status?: \"NotStarted\" | \"Running\" | \"Succeeded\" | \"Failed\";\n}\n\nexport interface DeviceUpdateAgentIdOutput {\n /** Device Id */\n deviceId: string;\n /** Module Id */\n moduleId?: string;\n}\n\nexport interface LogCollectionListOutput {\n /** The collection of pageable items. */\n value: Array<LogCollectionOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface LogCollectionOperationDetailedStatusOutput {\n /** The device diagnostics operation id. */\n operationId?: string;\n /** The timestamp when the operation was created. */\n createdDateTime?: string;\n /** A timestamp for when the current state was entered. */\n lastActionDateTime?: string;\n /** Operation status. */\n status?: \"NotStarted\" | \"Running\" | \"Succeeded\" | \"Failed\";\n /** Status of the devices in the operation */\n deviceStatus?: Array<LogCollectionOperationDeviceStatusOutput>;\n /** Device diagnostics operation description. */\n description?: string;\n}\n\nexport interface LogCollectionOperationDeviceStatusOutput {\n /** Device id */\n deviceId: string;\n /** Module id. */\n moduleId?: string;\n /** Log upload status */\n status: \"NotStarted\" | \"Running\" | \"Succeeded\" | \"Failed\";\n /** Log upload result code */\n resultCode?: string;\n /** Log upload extended result code */\n extendedResultCode?: string;\n /** Log upload location */\n logLocation?: string;\n}\n\nexport interface DeviceHealthListOutput {\n /** The collection of pageable items. */\n value: Array<DeviceHealthOutput>;\n /** The link to the next page of items. */\n nextLink?: string;\n}\n\nexport interface DeviceHealthOutput {\n /** Device id */\n deviceId: string;\n /** Module id */\n moduleId?: string;\n /** Aggregate device health state */\n state: \"healthy\" | \"unhealthy\";\n /** Digital twin model Id */\n digitalTwinModelId?: string;\n /** Array of health checks and their results */\n healthChecks: Array<HealthCheckOutput>;\n}\n\nexport interface HealthCheckOutput {\n /** Health check name */\n name?: string;\n /** Health check result */\n result?: \"success\" | \"userError\";\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAA2C,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAU,eAAe,EAAyB,MAAM,yBAAyB,CAAC;AAyCzF;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CACtB,MAAc,EACd,eAA0B,EAC1B,UAAoC,EAAE;IAItC,IAAI,QAAQ,GAAG,IAAI,CAAC;IACpB,MAAM,QAAQ,GAAG,OAAO,CAAC;IACzB,MAAM,YAAY,GAAG,UAAU,CAAC;IAChC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAClC,MAAM,WAAW,GAA4B;QAC3C,aAAa,EAAE,EAAE;QACjB,OAAO,EACL,OAAO,aAAa,KAAK,UAAU;YACjC,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE;gBACzB,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC;gBACvF,QAAQ,GAAG,KAAK,CAAC;gBACjB,kBAAkB,CAAC,MAAM,CAAC,CAAC;gBAC3B,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;gBACxD,MAAM,MAAM,GAAG,WAAW,CAAW,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;gBAC5D,OAAO;oBACL,IAAI,EAAE,MAAM;oBACZ,YAAY,EAAE,QAAQ;iBACvB,CAAC;YACJ,CAAC;KACR,CAAC;IAEF,OAAO,qBAAqB,CAAC,WAAW,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,IAAa,EAAE,YAAqB;IACvD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,QAAQ,GAAI,IAAgC,CAAC,YAAY,CAAC,CAAC;IAEjE,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;QACpE,MAAM,IAAI,KAAK,CAAC,iBAAiB,YAAY,kCAAkC,CAAC,CAAC;IACnF,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAc,IAAa,EAAE,QAAgB;IAC/D,MAAM,KAAK,GAAI,IAAgC,CAAC,QAAQ,CAAQ,CAAC;IAEjE,qEAAqE;IACrE,qEAAqE;IACrE,iDAAiD;IACjD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,kFAAkF,QAAQ,EAAE,CAC7F,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB,CAAC,QAA+B;IACzD,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAClG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,MAAM,eAAe,CACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT
|
|
1
|
+
{"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../src/paginateHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAA2C,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAU,eAAe,EAAyB,MAAM,yBAAyB,CAAC;AAyCzF;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CACtB,MAAc,EACd,eAA0B,EAC1B,UAAoC,EAAE;IAItC,IAAI,QAAQ,GAAG,IAAI,CAAC;IACpB,MAAM,QAAQ,GAAG,OAAO,CAAC;IACzB,MAAM,YAAY,GAAG,UAAU,CAAC;IAChC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAClC,MAAM,WAAW,GAA4B;QAC3C,aAAa,EAAE,EAAE;QACjB,OAAO,EACL,OAAO,aAAa,KAAK,UAAU;YACjC,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE;gBACzB,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC;gBACvF,QAAQ,GAAG,KAAK,CAAC;gBACjB,kBAAkB,CAAC,MAAM,CAAC,CAAC;gBAC3B,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;gBACxD,MAAM,MAAM,GAAG,WAAW,CAAW,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;gBAC5D,OAAO;oBACL,IAAI,EAAE,MAAM;oBACZ,YAAY,EAAE,QAAQ;iBACvB,CAAC;YACJ,CAAC;KACR,CAAC;IAEF,OAAO,qBAAqB,CAAC,WAAW,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,IAAa,EAAE,YAAqB;IACvD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,QAAQ,GAAI,IAAgC,CAAC,YAAY,CAAC,CAAC;IAEjE,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;QACpE,MAAM,IAAI,KAAK,CAAC,iBAAiB,YAAY,kCAAkC,CAAC,CAAC;IACnF,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAc,IAAa,EAAE,QAAgB;IAC/D,MAAM,KAAK,GAAI,IAAgC,CAAC,QAAQ,CAAQ,CAAC;IAEjE,qEAAqE;IACrE,qEAAqE;IACrE,iDAAiD;IACjD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,kFAAkF,QAAQ,EAAE,CAC7F,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB,CAAC,QAA+B;IACzD,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAClG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,MAAM,eAAe,CACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { getPagedAsyncIterator, PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { Client, createRestError, PathUncheckedResponse } from \"@azure-rest/core-client\";\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (\n pageLink: string,\n maxPageSize?: number,\n) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends {\n body: { value?: infer TPage };\n}\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {},\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n const itemName = \"value\";\n const nextLinkName = \"nextLink\";\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\"200\", \"201\", \"202\", \"203\", \"204\", \"205\", \"206\", \"207\", \"208\", \"226\"];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RawHttpHeadersInput } from \"@azure/core-rest-pipeline\";\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport { ImportUpdateInputItem, PatchBody, Deployment, LogCollection } from \"./models\";\n\nexport interface DeviceUpdateListUpdatesQueryParamProperties {\n /** Request updates matching a free-text search expression. */\n search?: string;\n /** Optional to filter updates by isDeployable property. */\n filter?: string;\n}\n\nexport interface DeviceUpdateListUpdatesQueryParam {\n queryParameters?: DeviceUpdateListUpdatesQueryParamProperties;\n}\n\nexport type DeviceUpdateListUpdatesParameters = DeviceUpdateListUpdatesQueryParam &\n RequestParameters;\n\nexport interface DeviceUpdateImportUpdateBodyParam {\n /** The update to be imported (see schema https://json.schemastore.org/azure-deviceupdate-import-manifest-5.0.json for details). */\n body: Array<ImportUpdateInputItem>;\n}\n\nexport interface DeviceUpdateImportUpdateMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type DeviceUpdateImportUpdateParameters = DeviceUpdateImportUpdateMediaTypesParam &\n DeviceUpdateImportUpdateBodyParam &\n RequestParameters;\n\nexport interface DeviceUpdateGetUpdateHeaders {\n /** Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. */\n \"If-None-Match\"?: string;\n}\n\nexport interface DeviceUpdateGetUpdateHeaderParam {\n headers: RawHttpHeadersInput & DeviceUpdateGetUpdateHeaders;\n}\n\nexport type DeviceUpdateGetUpdateParameters = DeviceUpdateGetUpdateHeaderParam & RequestParameters;\nexport type DeviceUpdateDeleteUpdateParameters = RequestParameters;\nexport type DeviceUpdateListProvidersParameters = RequestParameters;\nexport type DeviceUpdateListNamesParameters = RequestParameters;\n\nexport interface DeviceUpdateListVersionsQueryParamProperties {\n /** Optional to filter updates by isDeployable property. */\n filter?: string;\n}\n\nexport interface DeviceUpdateListVersionsQueryParam {\n queryParameters?: DeviceUpdateListVersionsQueryParamProperties;\n}\n\nexport type DeviceUpdateListVersionsParameters = DeviceUpdateListVersionsQueryParam &\n RequestParameters;\nexport type DeviceUpdateListFilesParameters = RequestParameters;\n\nexport interface DeviceUpdateGetFileHeaders {\n /** Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. */\n \"If-None-Match\"?: string;\n}\n\nexport interface DeviceUpdateGetFileHeaderParam {\n headers: RawHttpHeadersInput & DeviceUpdateGetFileHeaders;\n}\n\nexport type DeviceUpdateGetFileParameters = DeviceUpdateGetFileHeaderParam & RequestParameters;\n\nexport interface DeviceUpdateListOperationStatusesQueryParamProperties {\n /** Optional to filter operations by status property. Only one specific filter is supported: \"status eq 'NotStarted' or status eq 'Running'\" */\n filter?: string;\n /** Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value n. */\n top?: number;\n}\n\nexport interface DeviceUpdateListOperationStatusesQueryParam {\n queryParameters?: DeviceUpdateListOperationStatusesQueryParamProperties;\n}\n\nexport type DeviceUpdateListOperationStatusesParameters =\n DeviceUpdateListOperationStatusesQueryParam & RequestParameters;\n\nexport interface DeviceUpdateGetOperationStatusHeaders {\n /** Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. */\n \"If-None-Match\"?: string;\n}\n\nexport interface DeviceUpdateGetOperationStatusHeaderParam {\n headers: RawHttpHeadersInput & DeviceUpdateGetOperationStatusHeaders;\n}\n\nexport type DeviceUpdateGetOperationStatusParameters = DeviceUpdateGetOperationStatusHeaderParam &\n RequestParameters;\n\nexport interface DeviceManagementListDeviceClassesQueryParamProperties {\n /** Restricts the set of device classes returned. You can filter on friendly name. */\n filter?: string;\n}\n\nexport interface DeviceManagementListDeviceClassesQueryParam {\n queryParameters?: DeviceManagementListDeviceClassesQueryParamProperties;\n}\n\nexport type DeviceManagementListDeviceClassesParameters =\n DeviceManagementListDeviceClassesQueryParam & RequestParameters;\nexport type DeviceManagementGetDeviceClassParameters = RequestParameters;\n\nexport interface DeviceManagementUpdateDeviceClassBodyParam {\n /** The device class json merge patch body. Currently only supports patching friendlyName. */\n body: PatchBody;\n}\n\nexport interface DeviceManagementUpdateDeviceClassMediaTypesParam {\n /** Request content type */\n contentType?: \"application/merge-patch+json\";\n}\n\nexport type DeviceManagementUpdateDeviceClassParameters =\n DeviceManagementUpdateDeviceClassMediaTypesParam &\n DeviceManagementUpdateDeviceClassBodyParam &\n RequestParameters;\nexport type DeviceManagementDeleteDeviceClassParameters = RequestParameters;\nexport type DeviceManagementListInstallableUpdatesForDeviceClassParameters = RequestParameters;\n\nexport interface DeviceManagementListDevicesQueryParamProperties {\n /** Restricts the set of devices returned. You can filter on GroupId, DeviceClassId, or GroupId and DeploymentStatus. Use DeploymentStatus eq null to query for devices with no deployment status (that have never been deployed to). */\n filter?: string;\n}\n\nexport interface DeviceManagementListDevicesQueryParam {\n queryParameters?: DeviceManagementListDevicesQueryParamProperties;\n}\n\nexport type DeviceManagementListDevicesParameters = DeviceManagementListDevicesQueryParam &\n RequestParameters;\n\nexport interface DeviceManagementImportDevicesBodyParam {\n /** The types of devices to import. */\n body: \"Devices\" | \"Modules\" | \"All\";\n}\n\nexport interface DeviceManagementImportDevicesMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type DeviceManagementImportDevicesParameters = DeviceManagementImportDevicesMediaTypesParam &\n DeviceManagementImportDevicesBodyParam &\n RequestParameters;\nexport type DeviceManagementGetDeviceParameters = RequestParameters;\nexport type DeviceManagementGetDeviceModuleParameters = RequestParameters;\nexport type DeviceManagementGetUpdateComplianceParameters = RequestParameters;\n\nexport interface DeviceManagementListGroupsQueryParamProperties {\n /** Orders the set of groups returned. You can order by groupId, deviceCount, createdDate, subgroupsWithNewUpdatesAvailableCount, subgroupsWithUpdatesInProgressCount, or subgroupsOnLatestUpdateCount. */\n orderby?: string;\n}\n\nexport interface DeviceManagementListGroupsQueryParam {\n queryParameters?: DeviceManagementListGroupsQueryParamProperties;\n}\n\nexport type DeviceManagementListGroupsParameters = DeviceManagementListGroupsQueryParam &\n RequestParameters;\nexport type DeviceManagementGetGroupParameters = RequestParameters;\nexport type DeviceManagementDeleteGroupParameters = RequestParameters;\nexport type DeviceManagementGetUpdateComplianceForGroupParameters = RequestParameters;\nexport type DeviceManagementListBestUpdatesForGroupParameters = RequestParameters;\n\nexport interface DeviceManagementListDeploymentsForGroupQueryParamProperties {\n /** Orders the set of deployments returned. You can order by start date. */\n orderby?: string;\n}\n\nexport interface DeviceManagementListDeploymentsForGroupQueryParam {\n queryParameters?: DeviceManagementListDeploymentsForGroupQueryParamProperties;\n}\n\nexport type DeviceManagementListDeploymentsForGroupParameters =\n DeviceManagementListDeploymentsForGroupQueryParam & RequestParameters;\nexport type DeviceManagementGetDeploymentParameters = RequestParameters;\n\nexport interface DeviceManagementCreateOrUpdateDeploymentBodyParam {\n /** The deployment properties. */\n body: Deployment;\n}\n\nexport interface DeviceManagementCreateOrUpdateDeploymentMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type DeviceManagementCreateOrUpdateDeploymentParameters =\n DeviceManagementCreateOrUpdateDeploymentMediaTypesParam &\n DeviceManagementCreateOrUpdateDeploymentBodyParam &\n RequestParameters;\nexport type DeviceManagementDeleteDeploymentParameters = RequestParameters;\nexport type DeviceManagementGetDeploymentStatusParameters = RequestParameters;\n\nexport interface DeviceManagementListDeviceClassSubgroupsForGroupQueryParamProperties {\n /** Restricts the set of device class subgroups returned. You can filter on compat properties by name and value. (i.e. filter=compatProperties/propertyName1 eq 'value1' and compatProperties/propertyName2 eq 'value2') */\n filter?: string;\n}\n\nexport interface DeviceManagementListDeviceClassSubgroupsForGroupQueryParam {\n queryParameters?: DeviceManagementListDeviceClassSubgroupsForGroupQueryParamProperties;\n}\n\nexport type DeviceManagementListDeviceClassSubgroupsForGroupParameters =\n DeviceManagementListDeviceClassSubgroupsForGroupQueryParam & RequestParameters;\nexport type DeviceManagementGetDeviceClassSubgroupParameters = RequestParameters;\nexport type DeviceManagementDeleteDeviceClassSubgroupParameters = RequestParameters;\nexport type DeviceManagementGetDeviceClassSubgroupUpdateComplianceParameters = RequestParameters;\nexport type DeviceManagementGetBestUpdatesForDeviceClassSubgroupParameters = RequestParameters;\n\nexport interface DeviceManagementListDeploymentsForDeviceClassSubgroupQueryParamProperties {\n /** Orders the set of deployments returned. You can order by start date. */\n orderby?: string;\n}\n\nexport interface DeviceManagementListDeploymentsForDeviceClassSubgroupQueryParam {\n queryParameters?: DeviceManagementListDeploymentsForDeviceClassSubgroupQueryParamProperties;\n}\n\nexport type DeviceManagementListDeploymentsForDeviceClassSubgroupParameters =\n DeviceManagementListDeploymentsForDeviceClassSubgroupQueryParam & RequestParameters;\nexport type DeviceManagementGetDeploymentForDeviceClassSubgroupParameters = RequestParameters;\nexport type DeviceManagementDeleteDeploymentForDeviceClassSubgroupParameters = RequestParameters;\nexport type DeviceManagementStopDeploymentParameters = RequestParameters;\nexport type DeviceManagementRetryDeploymentParameters = RequestParameters;\nexport type DeviceManagementGetDeviceClassSubgroupDeploymentStatusParameters = RequestParameters;\n\nexport interface DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentQueryParamProperties {\n /** Restricts the set of deployment device states returned. You can filter on deviceId and moduleId and/or deviceState. */\n filter?: string;\n}\n\nexport interface DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentQueryParam {\n queryParameters?: DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentQueryParamProperties;\n}\n\nexport type DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentParameters =\n DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentQueryParam & RequestParameters;\n\nexport interface DeviceManagementGetOperationStatusHeaders {\n /** Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. */\n \"If-None-Match\"?: string;\n}\n\nexport interface DeviceManagementGetOperationStatusHeaderParam {\n headers: RawHttpHeadersInput & DeviceManagementGetOperationStatusHeaders;\n}\n\nexport type DeviceManagementGetOperationStatusParameters =\n DeviceManagementGetOperationStatusHeaderParam & RequestParameters;\n\nexport interface DeviceManagementListOperationStatusesQueryParamProperties {\n /** Restricts the set of operations returned. Only one specific filter is supported: \"status eq 'NotStarted' or status eq 'Running'\" */\n filter?: string;\n /** Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value n. */\n top?: number;\n}\n\nexport interface DeviceManagementListOperationStatusesQueryParam {\n queryParameters?: DeviceManagementListOperationStatusesQueryParamProperties;\n}\n\nexport type DeviceManagementListOperationStatusesParameters =\n DeviceManagementListOperationStatusesQueryParam & RequestParameters;\n\nexport interface DeviceManagementStartLogCollectionBodyParam {\n /** The log collection properties. */\n body: LogCollection;\n}\n\nexport interface DeviceManagementStartLogCollectionMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type DeviceManagementStartLogCollectionParameters =\n DeviceManagementStartLogCollectionMediaTypesParam &\n DeviceManagementStartLogCollectionBodyParam &\n RequestParameters;\nexport type DeviceManagementGetLogCollectionParameters = RequestParameters;\nexport type DeviceManagementListLogCollectionsParameters = RequestParameters;\nexport type DeviceManagementGetLogCollectionDetailedStatusParameters = RequestParameters;\n\nexport interface DeviceManagementListHealthOfDevicesQueryParamProperties {\n /** Restricts the set of devices for which device health is returned. You can filter on status, device id and module id. */\n filter: string;\n}\n\nexport interface DeviceManagementListHealthOfDevicesQueryParam {\n queryParameters: DeviceManagementListHealthOfDevicesQueryParamProperties;\n}\n\nexport type DeviceManagementListHealthOfDevicesParameters =\n DeviceManagementListHealthOfDevicesQueryParam & RequestParameters;\n"]}
|
|
1
|
+
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../src/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RawHttpHeadersInput } from \"@azure/core-rest-pipeline\";\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport { ImportUpdateInputItem, PatchBody, Deployment, LogCollection } from \"./models\";\n\nexport interface DeviceUpdateListUpdatesQueryParamProperties {\n /** Request updates matching a free-text search expression. */\n search?: string;\n /** Optional to filter updates by isDeployable property. */\n filter?: string;\n}\n\nexport interface DeviceUpdateListUpdatesQueryParam {\n queryParameters?: DeviceUpdateListUpdatesQueryParamProperties;\n}\n\nexport type DeviceUpdateListUpdatesParameters = DeviceUpdateListUpdatesQueryParam &\n RequestParameters;\n\nexport interface DeviceUpdateImportUpdateBodyParam {\n /** The update to be imported (see schema https://json.schemastore.org/azure-deviceupdate-import-manifest-5.0.json for details). */\n body: Array<ImportUpdateInputItem>;\n}\n\nexport interface DeviceUpdateImportUpdateMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type DeviceUpdateImportUpdateParameters = DeviceUpdateImportUpdateMediaTypesParam &\n DeviceUpdateImportUpdateBodyParam &\n RequestParameters;\n\nexport interface DeviceUpdateGetUpdateHeaders {\n /** Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. */\n \"If-None-Match\"?: string;\n}\n\nexport interface DeviceUpdateGetUpdateHeaderParam {\n headers: RawHttpHeadersInput & DeviceUpdateGetUpdateHeaders;\n}\n\nexport type DeviceUpdateGetUpdateParameters = DeviceUpdateGetUpdateHeaderParam & RequestParameters;\nexport type DeviceUpdateDeleteUpdateParameters = RequestParameters;\nexport type DeviceUpdateListProvidersParameters = RequestParameters;\nexport type DeviceUpdateListNamesParameters = RequestParameters;\n\nexport interface DeviceUpdateListVersionsQueryParamProperties {\n /** Optional to filter updates by isDeployable property. */\n filter?: string;\n}\n\nexport interface DeviceUpdateListVersionsQueryParam {\n queryParameters?: DeviceUpdateListVersionsQueryParamProperties;\n}\n\nexport type DeviceUpdateListVersionsParameters = DeviceUpdateListVersionsQueryParam &\n RequestParameters;\nexport type DeviceUpdateListFilesParameters = RequestParameters;\n\nexport interface DeviceUpdateGetFileHeaders {\n /** Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. */\n \"If-None-Match\"?: string;\n}\n\nexport interface DeviceUpdateGetFileHeaderParam {\n headers: RawHttpHeadersInput & DeviceUpdateGetFileHeaders;\n}\n\nexport type DeviceUpdateGetFileParameters = DeviceUpdateGetFileHeaderParam & RequestParameters;\n\nexport interface DeviceUpdateListOperationStatusesQueryParamProperties {\n /** Optional to filter operations by status property. Only one specific filter is supported: \"status eq 'NotStarted' or status eq 'Running'\" */\n filter?: string;\n /** Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value n. */\n top?: number;\n}\n\nexport interface DeviceUpdateListOperationStatusesQueryParam {\n queryParameters?: DeviceUpdateListOperationStatusesQueryParamProperties;\n}\n\nexport type DeviceUpdateListOperationStatusesParameters =\n DeviceUpdateListOperationStatusesQueryParam & RequestParameters;\n\nexport interface DeviceUpdateGetOperationStatusHeaders {\n /** Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. */\n \"If-None-Match\"?: string;\n}\n\nexport interface DeviceUpdateGetOperationStatusHeaderParam {\n headers: RawHttpHeadersInput & DeviceUpdateGetOperationStatusHeaders;\n}\n\nexport type DeviceUpdateGetOperationStatusParameters = DeviceUpdateGetOperationStatusHeaderParam &\n RequestParameters;\n\nexport interface DeviceManagementListDeviceClassesQueryParamProperties {\n /** Restricts the set of device classes returned. You can filter on friendly name. */\n filter?: string;\n}\n\nexport interface DeviceManagementListDeviceClassesQueryParam {\n queryParameters?: DeviceManagementListDeviceClassesQueryParamProperties;\n}\n\nexport type DeviceManagementListDeviceClassesParameters =\n DeviceManagementListDeviceClassesQueryParam & RequestParameters;\nexport type DeviceManagementGetDeviceClassParameters = RequestParameters;\n\nexport interface DeviceManagementUpdateDeviceClassBodyParam {\n /** The device class json merge patch body. Currently only supports patching friendlyName. */\n body: PatchBody;\n}\n\nexport interface DeviceManagementUpdateDeviceClassMediaTypesParam {\n /** Request content type */\n contentType?: \"application/merge-patch+json\";\n}\n\nexport type DeviceManagementUpdateDeviceClassParameters =\n DeviceManagementUpdateDeviceClassMediaTypesParam &\n DeviceManagementUpdateDeviceClassBodyParam &\n RequestParameters;\nexport type DeviceManagementDeleteDeviceClassParameters = RequestParameters;\nexport type DeviceManagementListInstallableUpdatesForDeviceClassParameters = RequestParameters;\n\nexport interface DeviceManagementListDevicesQueryParamProperties {\n /** Restricts the set of devices returned. You can filter on GroupId, DeviceClassId, or GroupId and DeploymentStatus. Use DeploymentStatus eq null to query for devices with no deployment status (that have never been deployed to). */\n filter?: string;\n}\n\nexport interface DeviceManagementListDevicesQueryParam {\n queryParameters?: DeviceManagementListDevicesQueryParamProperties;\n}\n\nexport type DeviceManagementListDevicesParameters = DeviceManagementListDevicesQueryParam &\n RequestParameters;\n\nexport interface DeviceManagementImportDevicesBodyParam {\n /** The types of devices to import. */\n body: \"Devices\" | \"Modules\" | \"All\";\n}\n\nexport interface DeviceManagementImportDevicesMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type DeviceManagementImportDevicesParameters = DeviceManagementImportDevicesMediaTypesParam &\n DeviceManagementImportDevicesBodyParam &\n RequestParameters;\nexport type DeviceManagementGetDeviceParameters = RequestParameters;\nexport type DeviceManagementGetDeviceModuleParameters = RequestParameters;\nexport type DeviceManagementGetUpdateComplianceParameters = RequestParameters;\n\nexport interface DeviceManagementListGroupsQueryParamProperties {\n /** Orders the set of groups returned. You can order by groupId, deviceCount, createdDate, subgroupsWithNewUpdatesAvailableCount, subgroupsWithUpdatesInProgressCount, or subgroupsOnLatestUpdateCount. */\n orderby?: string;\n}\n\nexport interface DeviceManagementListGroupsQueryParam {\n queryParameters?: DeviceManagementListGroupsQueryParamProperties;\n}\n\nexport type DeviceManagementListGroupsParameters = DeviceManagementListGroupsQueryParam &\n RequestParameters;\nexport type DeviceManagementGetGroupParameters = RequestParameters;\nexport type DeviceManagementDeleteGroupParameters = RequestParameters;\nexport type DeviceManagementGetUpdateComplianceForGroupParameters = RequestParameters;\nexport type DeviceManagementListBestUpdatesForGroupParameters = RequestParameters;\n\nexport interface DeviceManagementListDeploymentsForGroupQueryParamProperties {\n /** Orders the set of deployments returned. You can order by start date. */\n orderby?: string;\n}\n\nexport interface DeviceManagementListDeploymentsForGroupQueryParam {\n queryParameters?: DeviceManagementListDeploymentsForGroupQueryParamProperties;\n}\n\nexport type DeviceManagementListDeploymentsForGroupParameters =\n DeviceManagementListDeploymentsForGroupQueryParam & RequestParameters;\nexport type DeviceManagementGetDeploymentParameters = RequestParameters;\n\nexport interface DeviceManagementCreateOrUpdateDeploymentBodyParam {\n /** The deployment properties. */\n body: Deployment;\n}\n\nexport interface DeviceManagementCreateOrUpdateDeploymentMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type DeviceManagementCreateOrUpdateDeploymentParameters =\n DeviceManagementCreateOrUpdateDeploymentMediaTypesParam &\n DeviceManagementCreateOrUpdateDeploymentBodyParam &\n RequestParameters;\nexport type DeviceManagementDeleteDeploymentParameters = RequestParameters;\nexport type DeviceManagementGetDeploymentStatusParameters = RequestParameters;\n\nexport interface DeviceManagementListDeviceClassSubgroupsForGroupQueryParamProperties {\n /** Restricts the set of device class subgroups returned. You can filter on compat properties by name and value. (i.e. filter=compatProperties/propertyName1 eq 'value1' and compatProperties/propertyName2 eq 'value2') */\n filter?: string;\n}\n\nexport interface DeviceManagementListDeviceClassSubgroupsForGroupQueryParam {\n queryParameters?: DeviceManagementListDeviceClassSubgroupsForGroupQueryParamProperties;\n}\n\nexport type DeviceManagementListDeviceClassSubgroupsForGroupParameters =\n DeviceManagementListDeviceClassSubgroupsForGroupQueryParam & RequestParameters;\nexport type DeviceManagementGetDeviceClassSubgroupParameters = RequestParameters;\nexport type DeviceManagementDeleteDeviceClassSubgroupParameters = RequestParameters;\nexport type DeviceManagementGetDeviceClassSubgroupUpdateComplianceParameters = RequestParameters;\nexport type DeviceManagementGetBestUpdatesForDeviceClassSubgroupParameters = RequestParameters;\n\nexport interface DeviceManagementListDeploymentsForDeviceClassSubgroupQueryParamProperties {\n /** Orders the set of deployments returned. You can order by start date. */\n orderby?: string;\n}\n\nexport interface DeviceManagementListDeploymentsForDeviceClassSubgroupQueryParam {\n queryParameters?: DeviceManagementListDeploymentsForDeviceClassSubgroupQueryParamProperties;\n}\n\nexport type DeviceManagementListDeploymentsForDeviceClassSubgroupParameters =\n DeviceManagementListDeploymentsForDeviceClassSubgroupQueryParam & RequestParameters;\nexport type DeviceManagementGetDeploymentForDeviceClassSubgroupParameters = RequestParameters;\nexport type DeviceManagementDeleteDeploymentForDeviceClassSubgroupParameters = RequestParameters;\nexport type DeviceManagementStopDeploymentParameters = RequestParameters;\nexport type DeviceManagementRetryDeploymentParameters = RequestParameters;\nexport type DeviceManagementGetDeviceClassSubgroupDeploymentStatusParameters = RequestParameters;\n\nexport interface DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentQueryParamProperties {\n /** Restricts the set of deployment device states returned. You can filter on deviceId and moduleId and/or deviceState. */\n filter?: string;\n}\n\nexport interface DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentQueryParam {\n queryParameters?: DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentQueryParamProperties;\n}\n\nexport type DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentParameters =\n DeviceManagementListDeviceStatesForDeviceClassSubgroupDeploymentQueryParam & RequestParameters;\n\nexport interface DeviceManagementGetOperationStatusHeaders {\n /** Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. */\n \"If-None-Match\"?: string;\n}\n\nexport interface DeviceManagementGetOperationStatusHeaderParam {\n headers: RawHttpHeadersInput & DeviceManagementGetOperationStatusHeaders;\n}\n\nexport type DeviceManagementGetOperationStatusParameters =\n DeviceManagementGetOperationStatusHeaderParam & RequestParameters;\n\nexport interface DeviceManagementListOperationStatusesQueryParamProperties {\n /** Restricts the set of operations returned. Only one specific filter is supported: \"status eq 'NotStarted' or status eq 'Running'\" */\n filter?: string;\n /** Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value n. */\n top?: number;\n}\n\nexport interface DeviceManagementListOperationStatusesQueryParam {\n queryParameters?: DeviceManagementListOperationStatusesQueryParamProperties;\n}\n\nexport type DeviceManagementListOperationStatusesParameters =\n DeviceManagementListOperationStatusesQueryParam & RequestParameters;\n\nexport interface DeviceManagementStartLogCollectionBodyParam {\n /** The log collection properties. */\n body: LogCollection;\n}\n\nexport interface DeviceManagementStartLogCollectionMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type DeviceManagementStartLogCollectionParameters =\n DeviceManagementStartLogCollectionMediaTypesParam &\n DeviceManagementStartLogCollectionBodyParam &\n RequestParameters;\nexport type DeviceManagementGetLogCollectionParameters = RequestParameters;\nexport type DeviceManagementListLogCollectionsParameters = RequestParameters;\nexport type DeviceManagementGetLogCollectionDetailedStatusParameters = RequestParameters;\n\nexport interface DeviceManagementListHealthOfDevicesQueryParamProperties {\n /** Restricts the set of devices for which device health is returned. You can filter on status, device id and module id. */\n filter: string;\n}\n\nexport interface DeviceManagementListHealthOfDevicesQueryParam {\n queryParameters: DeviceManagementListHealthOfDevicesQueryParamProperties;\n}\n\nexport type DeviceManagementListHealthOfDevicesParameters =\n DeviceManagementListHealthOfDevicesQueryParam & RequestParameters;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pollingHelper.js","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAEL,SAAS,GAKV,MAAM,iBAAiB,CAAC;AAEzB;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAc,EACd,eAAwB,EACxB,UAAkE,EAAE;IAEpE,MAAM,MAAM,GAAkC;QAC5C,aAAa,EAAE,eAAe,CAAC,OAAO,CAAC,MAAM;QAC7C,WAAW,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG;QACxC,kBAAkB,EAAE,KAAK,IAAI,EAAE;YAC7B,sGAAsG;YACtG,2FAA2F;YAC3F,6BAA6B;YAC7B,OAAO,cAAc,CAAC,eAAe,CAAC,CAAC;QACzC,CAAC;QACD,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YAC9B,sEAAsE;YACtE,4EAA4E;YAC5E,0JAA0J;YAC1J,+GAA+G;YAC/G,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;YACvF,MAAM,WAAW,GAAG,cAAc,CAAC,QAAmB,CAAC,CAAC;YACxD,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC;YACnF,OAAO,WAAW,CAAC;QACrB,CAAC;KACF,CAAC;IAEF,OAAO,IAAI,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CAA+B,QAAiB;IACrE,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,SAAS,CAAC,uDAAuD,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAChG,CAAC;IAED,OAAO;QACL,YAAY,EAAE,QAAQ;QACtB,WAAW,kCACN,QAAQ,KACX,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI,GACpB;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT
|
|
1
|
+
{"version":3,"file":"pollingHelper.js","sourceRoot":"","sources":["../../src/pollingHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAEL,SAAS,GAKV,MAAM,iBAAiB,CAAC;AAEzB;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAClC,MAAc,EACd,eAAwB,EACxB,UAAkE,EAAE;IAEpE,MAAM,MAAM,GAAkC;QAC5C,aAAa,EAAE,eAAe,CAAC,OAAO,CAAC,MAAM;QAC7C,WAAW,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG;QACxC,kBAAkB,EAAE,KAAK,IAAI,EAAE;YAC7B,sGAAsG;YACtG,2FAA2F;YAC3F,6BAA6B;YAC7B,OAAO,cAAc,CAAC,eAAe,CAAC,CAAC;QACzC,CAAC;QACD,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YAC9B,sEAAsE;YACtE,4EAA4E;YAC5E,0JAA0J;YAC1J,+GAA+G;YAC/G,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;YACvF,MAAM,WAAW,GAAG,cAAc,CAAC,QAAmB,CAAC,CAAC;YACxD,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC;YACnF,OAAO,WAAW,CAAC;QACrB,CAAC;KACF,CAAC;IAEF,OAAO,IAAI,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CAA+B,QAAiB;IACrE,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,SAAS,CAAC,uDAAuD,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAChG,CAAC;IAED,OAAO;QACL,YAAY,EAAE,QAAQ;QACtB,WAAW,kCACN,QAAQ,KACX,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI,GACpB;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport {\n LongRunningOperation,\n LroEngine,\n LroEngineOptions,\n LroResponse,\n PollerLike,\n PollOperationState,\n} from \"@azure/core-lro\";\n\n/**\n * Helper function that builds a Poller object to help polling a long running operation.\n * @param client - Client to use for sending the request to get additional pages.\n * @param initialResponse - The initial response.\n * @param options - Options to set a resume state or custom polling interval.\n * @returns - A poller object to poll for operation state updates and eventually get the final response.\n */\nexport function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: LroEngineOptions<TResult, PollOperationState<TResult>> = {},\n): PollerLike<PollOperationState<TResult>, TResult> {\n const poller: LongRunningOperation<TResult> = {\n requestMethod: initialResponse.request.method,\n requestPath: initialResponse.request.url,\n sendInitialRequest: async () => {\n // In the case of Rest Clients we are building the LRO poller object from a response that's the reason\n // we are not triggering the initial request here, just extracting the information from the\n // response we were provided.\n return getLroResponse(initialResponse);\n },\n sendPollRequest: async (path) => {\n // This is the callback that is going to be called to poll the service\n // to get the latest status. We use the client provided and the polling path\n // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location\n // depending on the lro pattern that the service implements. If non is provided we default to the initial path.\n const response = await client.pathUnchecked(path ?? initialResponse.request.url).get();\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] = initialResponse.request.url;\n return lroResponse;\n },\n };\n\n return new LroEngine(poller, options);\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO engine knows about\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO engine can work with\n */\nfunction getLroResponse<TResult extends HttpResponse>(response: TResult): LroResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);\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"]}
|