@azure/arm-mongocluster 1.0.0-beta.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/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/browser/api/firewallRules/index.d.ts +23 -0
- package/dist/browser/api/firewallRules/index.d.ts.map +1 -0
- package/dist/browser/api/firewallRules/index.js +170 -0
- package/dist/browser/api/firewallRules/index.js.map +1 -0
- package/dist/browser/api/index.d.ts +7 -0
- package/dist/browser/api/index.d.ts.map +1 -0
- package/dist/browser/api/index.js +9 -0
- package/dist/browser/api/index.js.map +1 -0
- package/dist/browser/api/mongoClusterManagementContext.d.ts +12 -0
- package/dist/browser/api/mongoClusterManagementContext.d.ts.map +1 -0
- package/dist/browser/api/mongoClusterManagementContext.js +14 -0
- package/dist/browser/api/mongoClusterManagementContext.js.map +1 -0
- package/dist/browser/api/mongoClusters/index.d.ts +39 -0
- package/dist/browser/api/mongoClusters/index.d.ts.map +1 -0
- package/dist/browser/api/mongoClusters/index.js +642 -0
- package/dist/browser/api/mongoClusters/index.js.map +1 -0
- package/dist/browser/api/operations/index.d.ts +10 -0
- package/dist/browser/api/operations/index.d.ts.map +1 -0
- package/dist/browser/api/operations/index.js +40 -0
- package/dist/browser/api/operations/index.js.map +1 -0
- package/dist/browser/api/pagingHelpers.d.ts +7 -0
- package/dist/browser/api/pagingHelpers.d.ts.map +1 -0
- package/dist/browser/api/pagingHelpers.js +140 -0
- package/dist/browser/api/pagingHelpers.js.map +1 -0
- package/dist/browser/api/pollingHelpers.d.ts +30 -0
- package/dist/browser/api/pollingHelpers.d.ts.map +1 -0
- package/dist/browser/api/pollingHelpers.js +81 -0
- package/dist/browser/api/pollingHelpers.js.map +1 -0
- package/dist/browser/api/privateEndpointConnections/index.d.ts +23 -0
- package/dist/browser/api/privateEndpointConnections/index.d.ts.map +1 -0
- package/dist/browser/api/privateEndpointConnections/index.js +199 -0
- package/dist/browser/api/privateEndpointConnections/index.js.map +1 -0
- package/dist/browser/api/privateLinks/index.d.ts +10 -0
- package/dist/browser/api/privateLinks/index.d.ts.map +1 -0
- package/dist/browser/api/privateLinks/index.js +56 -0
- package/dist/browser/api/privateLinks/index.js.map +1 -0
- package/dist/browser/classic/firewallRules/index.d.ts +24 -0
- package/dist/browser/classic/firewallRules/index.d.ts.map +1 -0
- package/dist/browser/classic/firewallRules/index.js +15 -0
- package/dist/browser/classic/firewallRules/index.js.map +1 -0
- package/dist/browser/classic/index.d.ts +6 -0
- package/dist/browser/classic/index.d.ts.map +1 -0
- package/dist/browser/classic/index.js +4 -0
- package/dist/browser/classic/index.js.map +1 -0
- package/dist/browser/classic/mongoClusters/index.d.ts +36 -0
- package/dist/browser/classic/mongoClusters/index.d.ts.map +1 -0
- package/dist/browser/classic/mongoClusters/index.js +19 -0
- package/dist/browser/classic/mongoClusters/index.js.map +1 -0
- package/dist/browser/classic/operations/index.d.ts +14 -0
- package/dist/browser/classic/operations/index.d.ts.map +1 -0
- package/dist/browser/classic/operations/index.js +12 -0
- package/dist/browser/classic/operations/index.js.map +1 -0
- package/dist/browser/classic/privateEndpointConnections/index.d.ts +24 -0
- package/dist/browser/classic/privateEndpointConnections/index.d.ts.map +1 -0
- package/dist/browser/classic/privateEndpointConnections/index.js +15 -0
- package/dist/browser/classic/privateEndpointConnections/index.js.map +1 -0
- package/dist/browser/classic/privateLinks/index.d.ts +14 -0
- package/dist/browser/classic/privateLinks/index.d.ts.map +1 -0
- package/dist/browser/classic/privateLinks/index.js +12 -0
- package/dist/browser/classic/privateLinks/index.js.map +1 -0
- package/dist/browser/helpers/serializerHelpers.d.ts +3 -0
- package/dist/browser/helpers/serializerHelpers.d.ts.map +1 -0
- package/dist/browser/helpers/serializerHelpers.js +25 -0
- package/dist/browser/helpers/serializerHelpers.js.map +1 -0
- package/dist/browser/index.d.ts +5 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +6 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/logger.d.ts +2 -0
- package/dist/browser/logger.d.ts.map +1 -0
- package/dist/browser/logger.js +5 -0
- package/dist/browser/logger.js.map +1 -0
- package/dist/browser/models/index.d.ts +4 -0
- package/dist/browser/models/index.d.ts.map +1 -0
- package/dist/browser/models/index.js +4 -0
- package/dist/browser/models/index.js.map +1 -0
- package/dist/browser/models/models.d.ts +510 -0
- package/dist/browser/models/models.d.ts.map +1 -0
- package/dist/browser/models/models.js +227 -0
- package/dist/browser/models/models.js.map +1 -0
- package/dist/browser/models/options.d.ts +70 -0
- package/dist/browser/models/options.d.ts.map +1 -0
- package/dist/browser/models/options.js +4 -0
- package/dist/browser/models/options.js.map +1 -0
- package/dist/browser/models/pagingTypes.d.ts +67 -0
- package/dist/browser/models/pagingTypes.d.ts.map +1 -0
- package/dist/browser/models/pagingTypes.js +4 -0
- package/dist/browser/models/pagingTypes.js.map +1 -0
- package/dist/browser/mongoClusterManagementClient.d.ts +27 -0
- package/dist/browser/mongoClusterManagementClient.d.ts.map +1 -0
- package/dist/browser/mongoClusterManagementClient.js +26 -0
- package/dist/browser/mongoClusterManagementClient.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/rest/clientDefinitions.d.ts +89 -0
- package/dist/browser/rest/clientDefinitions.d.ts.map +1 -0
- package/dist/browser/rest/clientDefinitions.js +4 -0
- package/dist/browser/rest/clientDefinitions.js.map +1 -0
- package/dist/browser/rest/documentDBClient.d.ts +15 -0
- package/dist/browser/rest/documentDBClient.d.ts.map +1 -0
- package/dist/browser/rest/documentDBClient.js +42 -0
- package/dist/browser/rest/documentDBClient.js.map +1 -0
- package/dist/browser/rest/index.d.ts +12 -0
- package/dist/browser/rest/index.d.ts.map +1 -0
- package/dist/browser/rest/index.js +14 -0
- package/dist/browser/rest/index.js.map +1 -0
- package/dist/browser/rest/isUnexpected.d.ts +20 -0
- package/dist/browser/rest/isUnexpected.d.ts.map +1 -0
- package/dist/browser/rest/isUnexpected.js +88 -0
- package/dist/browser/rest/isUnexpected.js.map +1 -0
- package/dist/browser/rest/models.d.ts +234 -0
- package/dist/browser/rest/models.d.ts.map +1 -0
- package/dist/browser/rest/models.js +4 -0
- package/dist/browser/rest/models.js.map +1 -0
- package/dist/browser/rest/outputModels.d.ts +331 -0
- package/dist/browser/rest/outputModels.d.ts.map +1 -0
- package/dist/browser/rest/outputModels.js +4 -0
- package/dist/browser/rest/outputModels.js.map +1 -0
- package/dist/browser/rest/paginateHelper.d.ts +43 -0
- package/dist/browser/rest/paginateHelper.d.ts.map +1 -0
- package/dist/browser/rest/paginateHelper.js +83 -0
- package/dist/browser/rest/paginateHelper.js.map +1 -0
- package/dist/browser/rest/parameters.d.ts +41 -0
- package/dist/browser/rest/parameters.d.ts.map +1 -0
- package/dist/browser/rest/parameters.js +4 -0
- package/dist/browser/rest/parameters.js.map +1 -0
- package/dist/browser/rest/pollingHelper.d.ts +83 -0
- package/dist/browser/rest/pollingHelper.d.ts.map +1 -0
- package/dist/browser/rest/pollingHelper.js +98 -0
- package/dist/browser/rest/pollingHelper.js.map +1 -0
- package/dist/browser/rest/responses.d.ts +281 -0
- package/dist/browser/rest/responses.d.ts.map +1 -0
- package/dist/browser/rest/responses.js +4 -0
- package/dist/browser/rest/responses.js.map +1 -0
- package/dist/browser/restorePollerHelpers.d.ts +21 -0
- package/dist/browser/restorePollerHelpers.d.ts.map +1 -0
- package/dist/browser/restorePollerHelpers.js +98 -0
- package/dist/browser/restorePollerHelpers.js.map +1 -0
- package/dist/commonjs/api/firewallRules/index.d.ts +23 -0
- package/dist/commonjs/api/firewallRules/index.d.ts.map +1 -0
- package/dist/commonjs/api/firewallRules/index.js +184 -0
- package/dist/commonjs/api/firewallRules/index.js.map +1 -0
- package/dist/commonjs/api/index.d.ts +7 -0
- package/dist/commonjs/api/index.d.ts.map +1 -0
- package/dist/commonjs/api/index.js +31 -0
- package/dist/commonjs/api/index.js.map +1 -0
- package/dist/commonjs/api/mongoClusterManagementContext.d.ts +12 -0
- package/dist/commonjs/api/mongoClusterManagementContext.d.ts.map +1 -0
- package/dist/commonjs/api/mongoClusterManagementContext.js +18 -0
- package/dist/commonjs/api/mongoClusterManagementContext.js.map +1 -0
- package/dist/commonjs/api/mongoClusters/index.d.ts +39 -0
- package/dist/commonjs/api/mongoClusters/index.d.ts.map +1 -0
- package/dist/commonjs/api/mongoClusters/index.js +668 -0
- package/dist/commonjs/api/mongoClusters/index.js.map +1 -0
- package/dist/commonjs/api/operations/index.d.ts +10 -0
- package/dist/commonjs/api/operations/index.d.ts.map +1 -0
- package/dist/commonjs/api/operations/index.js +45 -0
- package/dist/commonjs/api/operations/index.js.map +1 -0
- package/dist/commonjs/api/pagingHelpers.d.ts +7 -0
- package/dist/commonjs/api/pagingHelpers.d.ts.map +1 -0
- package/dist/commonjs/api/pagingHelpers.js +143 -0
- package/dist/commonjs/api/pagingHelpers.js.map +1 -0
- package/dist/commonjs/api/pollingHelpers.d.ts +30 -0
- package/dist/commonjs/api/pollingHelpers.d.ts.map +1 -0
- package/dist/commonjs/api/pollingHelpers.js +84 -0
- package/dist/commonjs/api/pollingHelpers.js.map +1 -0
- package/dist/commonjs/api/privateEndpointConnections/index.d.ts +23 -0
- package/dist/commonjs/api/privateEndpointConnections/index.d.ts.map +1 -0
- package/dist/commonjs/api/privateEndpointConnections/index.js +213 -0
- package/dist/commonjs/api/privateEndpointConnections/index.js.map +1 -0
- package/dist/commonjs/api/privateLinks/index.d.ts +10 -0
- package/dist/commonjs/api/privateLinks/index.d.ts.map +1 -0
- package/dist/commonjs/api/privateLinks/index.js +61 -0
- package/dist/commonjs/api/privateLinks/index.js.map +1 -0
- package/dist/commonjs/classic/firewallRules/index.d.ts +24 -0
- package/dist/commonjs/classic/firewallRules/index.d.ts.map +1 -0
- package/dist/commonjs/classic/firewallRules/index.js +19 -0
- package/dist/commonjs/classic/firewallRules/index.js.map +1 -0
- package/dist/commonjs/classic/index.d.ts +6 -0
- package/dist/commonjs/classic/index.d.ts.map +1 -0
- package/dist/commonjs/classic/index.js +5 -0
- package/dist/commonjs/classic/index.js.map +1 -0
- package/dist/commonjs/classic/mongoClusters/index.d.ts +36 -0
- package/dist/commonjs/classic/mongoClusters/index.d.ts.map +1 -0
- package/dist/commonjs/classic/mongoClusters/index.js +23 -0
- package/dist/commonjs/classic/mongoClusters/index.js.map +1 -0
- package/dist/commonjs/classic/operations/index.d.ts +14 -0
- package/dist/commonjs/classic/operations/index.d.ts.map +1 -0
- package/dist/commonjs/classic/operations/index.js +16 -0
- package/dist/commonjs/classic/operations/index.js.map +1 -0
- package/dist/commonjs/classic/privateEndpointConnections/index.d.ts +24 -0
- package/dist/commonjs/classic/privateEndpointConnections/index.d.ts.map +1 -0
- package/dist/commonjs/classic/privateEndpointConnections/index.js +19 -0
- package/dist/commonjs/classic/privateEndpointConnections/index.js.map +1 -0
- package/dist/commonjs/classic/privateLinks/index.d.ts +14 -0
- package/dist/commonjs/classic/privateLinks/index.d.ts.map +1 -0
- package/dist/commonjs/classic/privateLinks/index.js +16 -0
- package/dist/commonjs/classic/privateLinks/index.js.map +1 -0
- package/dist/commonjs/helpers/serializerHelpers.d.ts +3 -0
- package/dist/commonjs/helpers/serializerHelpers.d.ts.map +1 -0
- package/dist/commonjs/helpers/serializerHelpers.js +28 -0
- package/dist/commonjs/helpers/serializerHelpers.js.map +1 -0
- package/dist/commonjs/index.d.ts +5 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +22 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/logger.d.ts +2 -0
- package/dist/commonjs/logger.d.ts.map +1 -0
- package/dist/commonjs/logger.js +8 -0
- package/dist/commonjs/logger.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +4 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +18 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/models.d.ts +510 -0
- package/dist/commonjs/models/models.d.ts.map +1 -0
- package/dist/commonjs/models/models.js +246 -0
- package/dist/commonjs/models/models.js.map +1 -0
- package/dist/commonjs/models/options.d.ts +70 -0
- package/dist/commonjs/models/options.d.ts.map +1 -0
- package/dist/commonjs/models/options.js +5 -0
- package/dist/commonjs/models/options.js.map +1 -0
- package/dist/commonjs/models/pagingTypes.d.ts +67 -0
- package/dist/commonjs/models/pagingTypes.d.ts.map +1 -0
- package/dist/commonjs/models/pagingTypes.js +5 -0
- package/dist/commonjs/models/pagingTypes.js.map +1 -0
- package/dist/commonjs/mongoClusterManagementClient.d.ts +27 -0
- package/dist/commonjs/mongoClusterManagementClient.d.ts.map +1 -0
- package/dist/commonjs/mongoClusterManagementClient.js +30 -0
- package/dist/commonjs/mongoClusterManagementClient.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/rest/clientDefinitions.d.ts +89 -0
- package/dist/commonjs/rest/clientDefinitions.d.ts.map +1 -0
- package/dist/commonjs/rest/clientDefinitions.js +5 -0
- package/dist/commonjs/rest/clientDefinitions.js.map +1 -0
- package/dist/commonjs/rest/documentDBClient.d.ts +15 -0
- package/dist/commonjs/rest/documentDBClient.d.ts.map +1 -0
- package/dist/commonjs/rest/documentDBClient.js +45 -0
- package/dist/commonjs/rest/documentDBClient.js.map +1 -0
- package/dist/commonjs/rest/index.d.ts +12 -0
- package/dist/commonjs/rest/index.d.ts.map +1 -0
- package/dist/commonjs/rest/index.js +17 -0
- package/dist/commonjs/rest/index.js.map +1 -0
- package/dist/commonjs/rest/isUnexpected.d.ts +20 -0
- package/dist/commonjs/rest/isUnexpected.d.ts.map +1 -0
- package/dist/commonjs/rest/isUnexpected.js +91 -0
- package/dist/commonjs/rest/isUnexpected.js.map +1 -0
- package/dist/commonjs/rest/models.d.ts +234 -0
- package/dist/commonjs/rest/models.d.ts.map +1 -0
- package/dist/commonjs/rest/models.js +5 -0
- package/dist/commonjs/rest/models.js.map +1 -0
- package/dist/commonjs/rest/outputModels.d.ts +331 -0
- package/dist/commonjs/rest/outputModels.d.ts.map +1 -0
- package/dist/commonjs/rest/outputModels.js +5 -0
- package/dist/commonjs/rest/outputModels.js.map +1 -0
- package/dist/commonjs/rest/paginateHelper.d.ts +43 -0
- package/dist/commonjs/rest/paginateHelper.d.ts.map +1 -0
- package/dist/commonjs/rest/paginateHelper.js +86 -0
- package/dist/commonjs/rest/paginateHelper.js.map +1 -0
- package/dist/commonjs/rest/parameters.d.ts +41 -0
- package/dist/commonjs/rest/parameters.d.ts.map +1 -0
- package/dist/commonjs/rest/parameters.js +5 -0
- package/dist/commonjs/rest/parameters.js.map +1 -0
- package/dist/commonjs/rest/pollingHelper.d.ts +83 -0
- package/dist/commonjs/rest/pollingHelper.d.ts.map +1 -0
- package/dist/commonjs/rest/pollingHelper.js +101 -0
- package/dist/commonjs/rest/pollingHelper.js.map +1 -0
- package/dist/commonjs/rest/responses.d.ts +281 -0
- package/dist/commonjs/rest/responses.d.ts.map +1 -0
- package/dist/commonjs/rest/responses.js +5 -0
- package/dist/commonjs/rest/responses.js.map +1 -0
- package/dist/commonjs/restorePollerHelpers.d.ts +21 -0
- package/dist/commonjs/restorePollerHelpers.d.ts.map +1 -0
- package/dist/commonjs/restorePollerHelpers.js +101 -0
- package/dist/commonjs/restorePollerHelpers.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/api/firewallRules/index.d.ts +23 -0
- package/dist/esm/api/firewallRules/index.d.ts.map +1 -0
- package/dist/esm/api/firewallRules/index.js +170 -0
- package/dist/esm/api/firewallRules/index.js.map +1 -0
- package/dist/esm/api/index.d.ts +7 -0
- package/dist/esm/api/index.d.ts.map +1 -0
- package/dist/esm/api/index.js +9 -0
- package/dist/esm/api/index.js.map +1 -0
- package/dist/esm/api/mongoClusterManagementContext.d.ts +12 -0
- package/dist/esm/api/mongoClusterManagementContext.d.ts.map +1 -0
- package/dist/esm/api/mongoClusterManagementContext.js +14 -0
- package/dist/esm/api/mongoClusterManagementContext.js.map +1 -0
- package/dist/esm/api/mongoClusters/index.d.ts +39 -0
- package/dist/esm/api/mongoClusters/index.d.ts.map +1 -0
- package/dist/esm/api/mongoClusters/index.js +642 -0
- package/dist/esm/api/mongoClusters/index.js.map +1 -0
- package/dist/esm/api/operations/index.d.ts +10 -0
- package/dist/esm/api/operations/index.d.ts.map +1 -0
- package/dist/esm/api/operations/index.js +40 -0
- package/dist/esm/api/operations/index.js.map +1 -0
- package/dist/esm/api/pagingHelpers.d.ts +7 -0
- package/dist/esm/api/pagingHelpers.d.ts.map +1 -0
- package/dist/esm/api/pagingHelpers.js +140 -0
- package/dist/esm/api/pagingHelpers.js.map +1 -0
- package/dist/esm/api/pollingHelpers.d.ts +30 -0
- package/dist/esm/api/pollingHelpers.d.ts.map +1 -0
- package/dist/esm/api/pollingHelpers.js +81 -0
- package/dist/esm/api/pollingHelpers.js.map +1 -0
- package/dist/esm/api/privateEndpointConnections/index.d.ts +23 -0
- package/dist/esm/api/privateEndpointConnections/index.d.ts.map +1 -0
- package/dist/esm/api/privateEndpointConnections/index.js +199 -0
- package/dist/esm/api/privateEndpointConnections/index.js.map +1 -0
- package/dist/esm/api/privateLinks/index.d.ts +10 -0
- package/dist/esm/api/privateLinks/index.d.ts.map +1 -0
- package/dist/esm/api/privateLinks/index.js +56 -0
- package/dist/esm/api/privateLinks/index.js.map +1 -0
- package/dist/esm/classic/firewallRules/index.d.ts +24 -0
- package/dist/esm/classic/firewallRules/index.d.ts.map +1 -0
- package/dist/esm/classic/firewallRules/index.js +15 -0
- package/dist/esm/classic/firewallRules/index.js.map +1 -0
- package/dist/esm/classic/index.d.ts +6 -0
- package/dist/esm/classic/index.d.ts.map +1 -0
- package/dist/esm/classic/index.js +4 -0
- package/dist/esm/classic/index.js.map +1 -0
- package/dist/esm/classic/mongoClusters/index.d.ts +36 -0
- package/dist/esm/classic/mongoClusters/index.d.ts.map +1 -0
- package/dist/esm/classic/mongoClusters/index.js +19 -0
- package/dist/esm/classic/mongoClusters/index.js.map +1 -0
- package/dist/esm/classic/operations/index.d.ts +14 -0
- package/dist/esm/classic/operations/index.d.ts.map +1 -0
- package/dist/esm/classic/operations/index.js +12 -0
- package/dist/esm/classic/operations/index.js.map +1 -0
- package/dist/esm/classic/privateEndpointConnections/index.d.ts +24 -0
- package/dist/esm/classic/privateEndpointConnections/index.d.ts.map +1 -0
- package/dist/esm/classic/privateEndpointConnections/index.js +15 -0
- package/dist/esm/classic/privateEndpointConnections/index.js.map +1 -0
- package/dist/esm/classic/privateLinks/index.d.ts +14 -0
- package/dist/esm/classic/privateLinks/index.d.ts.map +1 -0
- package/dist/esm/classic/privateLinks/index.js +12 -0
- package/dist/esm/classic/privateLinks/index.js.map +1 -0
- package/dist/esm/helpers/serializerHelpers.d.ts +3 -0
- package/dist/esm/helpers/serializerHelpers.d.ts.map +1 -0
- package/dist/esm/helpers/serializerHelpers.js +25 -0
- package/dist/esm/helpers/serializerHelpers.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/logger.d.ts +2 -0
- package/dist/esm/logger.d.ts.map +1 -0
- package/dist/esm/logger.js +5 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/models.d.ts +510 -0
- package/dist/esm/models/models.d.ts.map +1 -0
- package/dist/esm/models/models.js +227 -0
- package/dist/esm/models/models.js.map +1 -0
- package/dist/esm/models/options.d.ts +70 -0
- package/dist/esm/models/options.d.ts.map +1 -0
- package/dist/esm/models/options.js +4 -0
- package/dist/esm/models/options.js.map +1 -0
- package/dist/esm/models/pagingTypes.d.ts +67 -0
- package/dist/esm/models/pagingTypes.d.ts.map +1 -0
- package/dist/esm/models/pagingTypes.js +4 -0
- package/dist/esm/models/pagingTypes.js.map +1 -0
- package/dist/esm/mongoClusterManagementClient.d.ts +27 -0
- package/dist/esm/mongoClusterManagementClient.d.ts.map +1 -0
- package/dist/esm/mongoClusterManagementClient.js +26 -0
- package/dist/esm/mongoClusterManagementClient.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/rest/clientDefinitions.d.ts +89 -0
- package/dist/esm/rest/clientDefinitions.d.ts.map +1 -0
- package/dist/esm/rest/clientDefinitions.js +4 -0
- package/dist/esm/rest/clientDefinitions.js.map +1 -0
- package/dist/esm/rest/documentDBClient.d.ts +15 -0
- package/dist/esm/rest/documentDBClient.d.ts.map +1 -0
- package/dist/esm/rest/documentDBClient.js +42 -0
- package/dist/esm/rest/documentDBClient.js.map +1 -0
- package/dist/esm/rest/index.d.ts +12 -0
- package/dist/esm/rest/index.d.ts.map +1 -0
- package/dist/esm/rest/index.js +14 -0
- package/dist/esm/rest/index.js.map +1 -0
- package/dist/esm/rest/isUnexpected.d.ts +20 -0
- package/dist/esm/rest/isUnexpected.d.ts.map +1 -0
- package/dist/esm/rest/isUnexpected.js +88 -0
- package/dist/esm/rest/isUnexpected.js.map +1 -0
- package/dist/esm/rest/models.d.ts +234 -0
- package/dist/esm/rest/models.d.ts.map +1 -0
- package/dist/esm/rest/models.js +4 -0
- package/dist/esm/rest/models.js.map +1 -0
- package/dist/esm/rest/outputModels.d.ts +331 -0
- package/dist/esm/rest/outputModels.d.ts.map +1 -0
- package/dist/esm/rest/outputModels.js +4 -0
- package/dist/esm/rest/outputModels.js.map +1 -0
- package/dist/esm/rest/paginateHelper.d.ts +43 -0
- package/dist/esm/rest/paginateHelper.d.ts.map +1 -0
- package/dist/esm/rest/paginateHelper.js +83 -0
- package/dist/esm/rest/paginateHelper.js.map +1 -0
- package/dist/esm/rest/parameters.d.ts +41 -0
- package/dist/esm/rest/parameters.d.ts.map +1 -0
- package/dist/esm/rest/parameters.js +4 -0
- package/dist/esm/rest/parameters.js.map +1 -0
- package/dist/esm/rest/pollingHelper.d.ts +83 -0
- package/dist/esm/rest/pollingHelper.d.ts.map +1 -0
- package/dist/esm/rest/pollingHelper.js +98 -0
- package/dist/esm/rest/pollingHelper.js.map +1 -0
- package/dist/esm/rest/responses.d.ts +281 -0
- package/dist/esm/rest/responses.d.ts.map +1 -0
- package/dist/esm/rest/responses.js +4 -0
- package/dist/esm/rest/responses.js.map +1 -0
- package/dist/esm/restorePollerHelpers.d.ts +21 -0
- package/dist/esm/restorePollerHelpers.d.ts.map +1 -0
- package/dist/esm/restorePollerHelpers.js +98 -0
- package/dist/esm/restorePollerHelpers.js.map +1 -0
- package/dist/react-native/api/firewallRules/index.d.ts +23 -0
- package/dist/react-native/api/firewallRules/index.d.ts.map +1 -0
- package/dist/react-native/api/firewallRules/index.js +170 -0
- package/dist/react-native/api/firewallRules/index.js.map +1 -0
- package/dist/react-native/api/index.d.ts +7 -0
- package/dist/react-native/api/index.d.ts.map +1 -0
- package/dist/react-native/api/index.js +9 -0
- package/dist/react-native/api/index.js.map +1 -0
- package/dist/react-native/api/mongoClusterManagementContext.d.ts +12 -0
- package/dist/react-native/api/mongoClusterManagementContext.d.ts.map +1 -0
- package/dist/react-native/api/mongoClusterManagementContext.js +14 -0
- package/dist/react-native/api/mongoClusterManagementContext.js.map +1 -0
- package/dist/react-native/api/mongoClusters/index.d.ts +39 -0
- package/dist/react-native/api/mongoClusters/index.d.ts.map +1 -0
- package/dist/react-native/api/mongoClusters/index.js +642 -0
- package/dist/react-native/api/mongoClusters/index.js.map +1 -0
- package/dist/react-native/api/operations/index.d.ts +10 -0
- package/dist/react-native/api/operations/index.d.ts.map +1 -0
- package/dist/react-native/api/operations/index.js +40 -0
- package/dist/react-native/api/operations/index.js.map +1 -0
- package/dist/react-native/api/pagingHelpers.d.ts +7 -0
- package/dist/react-native/api/pagingHelpers.d.ts.map +1 -0
- package/dist/react-native/api/pagingHelpers.js +140 -0
- package/dist/react-native/api/pagingHelpers.js.map +1 -0
- package/dist/react-native/api/pollingHelpers.d.ts +30 -0
- package/dist/react-native/api/pollingHelpers.d.ts.map +1 -0
- package/dist/react-native/api/pollingHelpers.js +81 -0
- package/dist/react-native/api/pollingHelpers.js.map +1 -0
- package/dist/react-native/api/privateEndpointConnections/index.d.ts +23 -0
- package/dist/react-native/api/privateEndpointConnections/index.d.ts.map +1 -0
- package/dist/react-native/api/privateEndpointConnections/index.js +199 -0
- package/dist/react-native/api/privateEndpointConnections/index.js.map +1 -0
- package/dist/react-native/api/privateLinks/index.d.ts +10 -0
- package/dist/react-native/api/privateLinks/index.d.ts.map +1 -0
- package/dist/react-native/api/privateLinks/index.js +56 -0
- package/dist/react-native/api/privateLinks/index.js.map +1 -0
- package/dist/react-native/classic/firewallRules/index.d.ts +24 -0
- package/dist/react-native/classic/firewallRules/index.d.ts.map +1 -0
- package/dist/react-native/classic/firewallRules/index.js +15 -0
- package/dist/react-native/classic/firewallRules/index.js.map +1 -0
- package/dist/react-native/classic/index.d.ts +6 -0
- package/dist/react-native/classic/index.d.ts.map +1 -0
- package/dist/react-native/classic/index.js +4 -0
- package/dist/react-native/classic/index.js.map +1 -0
- package/dist/react-native/classic/mongoClusters/index.d.ts +36 -0
- package/dist/react-native/classic/mongoClusters/index.d.ts.map +1 -0
- package/dist/react-native/classic/mongoClusters/index.js +19 -0
- package/dist/react-native/classic/mongoClusters/index.js.map +1 -0
- package/dist/react-native/classic/operations/index.d.ts +14 -0
- package/dist/react-native/classic/operations/index.d.ts.map +1 -0
- package/dist/react-native/classic/operations/index.js +12 -0
- package/dist/react-native/classic/operations/index.js.map +1 -0
- package/dist/react-native/classic/privateEndpointConnections/index.d.ts +24 -0
- package/dist/react-native/classic/privateEndpointConnections/index.d.ts.map +1 -0
- package/dist/react-native/classic/privateEndpointConnections/index.js +15 -0
- package/dist/react-native/classic/privateEndpointConnections/index.js.map +1 -0
- package/dist/react-native/classic/privateLinks/index.d.ts +14 -0
- package/dist/react-native/classic/privateLinks/index.d.ts.map +1 -0
- package/dist/react-native/classic/privateLinks/index.js +12 -0
- package/dist/react-native/classic/privateLinks/index.js.map +1 -0
- package/dist/react-native/helpers/serializerHelpers.d.ts +3 -0
- package/dist/react-native/helpers/serializerHelpers.d.ts.map +1 -0
- package/dist/react-native/helpers/serializerHelpers.js +25 -0
- package/dist/react-native/helpers/serializerHelpers.js.map +1 -0
- package/dist/react-native/index.d.ts +5 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +6 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/logger.d.ts +2 -0
- package/dist/react-native/logger.d.ts.map +1 -0
- package/dist/react-native/logger.js +5 -0
- package/dist/react-native/logger.js.map +1 -0
- package/dist/react-native/models/index.d.ts +4 -0
- package/dist/react-native/models/index.d.ts.map +1 -0
- package/dist/react-native/models/index.js +4 -0
- package/dist/react-native/models/index.js.map +1 -0
- package/dist/react-native/models/models.d.ts +510 -0
- package/dist/react-native/models/models.d.ts.map +1 -0
- package/dist/react-native/models/models.js +227 -0
- package/dist/react-native/models/models.js.map +1 -0
- package/dist/react-native/models/options.d.ts +70 -0
- package/dist/react-native/models/options.d.ts.map +1 -0
- package/dist/react-native/models/options.js +4 -0
- package/dist/react-native/models/options.js.map +1 -0
- package/dist/react-native/models/pagingTypes.d.ts +67 -0
- package/dist/react-native/models/pagingTypes.d.ts.map +1 -0
- package/dist/react-native/models/pagingTypes.js +4 -0
- package/dist/react-native/models/pagingTypes.js.map +1 -0
- package/dist/react-native/mongoClusterManagementClient.d.ts +27 -0
- package/dist/react-native/mongoClusterManagementClient.d.ts.map +1 -0
- package/dist/react-native/mongoClusterManagementClient.js +26 -0
- package/dist/react-native/mongoClusterManagementClient.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/rest/clientDefinitions.d.ts +89 -0
- package/dist/react-native/rest/clientDefinitions.d.ts.map +1 -0
- package/dist/react-native/rest/clientDefinitions.js +4 -0
- package/dist/react-native/rest/clientDefinitions.js.map +1 -0
- package/dist/react-native/rest/documentDBClient.d.ts +15 -0
- package/dist/react-native/rest/documentDBClient.d.ts.map +1 -0
- package/dist/react-native/rest/documentDBClient.js +42 -0
- package/dist/react-native/rest/documentDBClient.js.map +1 -0
- package/dist/react-native/rest/index.d.ts +12 -0
- package/dist/react-native/rest/index.d.ts.map +1 -0
- package/dist/react-native/rest/index.js +14 -0
- package/dist/react-native/rest/index.js.map +1 -0
- package/dist/react-native/rest/isUnexpected.d.ts +20 -0
- package/dist/react-native/rest/isUnexpected.d.ts.map +1 -0
- package/dist/react-native/rest/isUnexpected.js +88 -0
- package/dist/react-native/rest/isUnexpected.js.map +1 -0
- package/dist/react-native/rest/models.d.ts +234 -0
- package/dist/react-native/rest/models.d.ts.map +1 -0
- package/dist/react-native/rest/models.js +4 -0
- package/dist/react-native/rest/models.js.map +1 -0
- package/dist/react-native/rest/outputModels.d.ts +331 -0
- package/dist/react-native/rest/outputModels.d.ts.map +1 -0
- package/dist/react-native/rest/outputModels.js +4 -0
- package/dist/react-native/rest/outputModels.js.map +1 -0
- package/dist/react-native/rest/paginateHelper.d.ts +43 -0
- package/dist/react-native/rest/paginateHelper.d.ts.map +1 -0
- package/dist/react-native/rest/paginateHelper.js +83 -0
- package/dist/react-native/rest/paginateHelper.js.map +1 -0
- package/dist/react-native/rest/parameters.d.ts +41 -0
- package/dist/react-native/rest/parameters.d.ts.map +1 -0
- package/dist/react-native/rest/parameters.js +4 -0
- package/dist/react-native/rest/parameters.js.map +1 -0
- package/dist/react-native/rest/pollingHelper.d.ts +83 -0
- package/dist/react-native/rest/pollingHelper.d.ts.map +1 -0
- package/dist/react-native/rest/pollingHelper.js +98 -0
- package/dist/react-native/rest/pollingHelper.js.map +1 -0
- package/dist/react-native/rest/responses.d.ts +281 -0
- package/dist/react-native/rest/responses.d.ts.map +1 -0
- package/dist/react-native/rest/responses.js +4 -0
- package/dist/react-native/rest/responses.js.map +1 -0
- package/dist/react-native/restorePollerHelpers.d.ts +21 -0
- package/dist/react-native/restorePollerHelpers.d.ts.map +1 -0
- package/dist/react-native/restorePollerHelpers.js +98 -0
- package/dist/react-native/restorePollerHelpers.js.map +1 -0
- package/package.json +187 -0
- package/review/arm-mongocluster-api.api.md +88 -0
- package/review/arm-mongocluster-models.api.md +417 -0
- package/review/arm-mongocluster.api.md +488 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../../src/rest/outputModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Paged } from \"@azure/core-paging\";\n\n/** Details of a REST API operation, returned from the Resource Provider Operations API */\nexport interface OperationOutput {\n /** The name of the operation, as per Resource-Based Access Control (RBAC). Examples: \"Microsoft.Compute/virtualMachines/write\", \"Microsoft.Compute/virtualMachines/capture/action\" */\n readonly name?: string;\n /** Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations. */\n readonly isDataAction?: boolean;\n /** Localized display information for this particular operation. */\n display?: OperationDisplayOutput;\n /** The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\" */\n readonly origin?: OriginOutput;\n /** Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. */\n actionType?: ActionTypeOutput;\n}\n\n/** Localized display information for and operation. */\nexport interface OperationDisplayOutput {\n /** The localized friendly form of the resource provider name, e.g. \"Microsoft Monitoring Insights\" or \"Microsoft Compute\". */\n provider?: string;\n /** The localized friendly name of the resource type related to this operation. E.g. \"Virtual Machines\" or \"Job Schedule Collections\". */\n resource?: string;\n /** The concise, localized friendly name for the operation; suitable for dropdowns. E.g. \"Create or Update Virtual Machine\", \"Restart Virtual Machine\". */\n operation?: string;\n /** The short, localized friendly description of the operation; suitable for tool tips and detailed views. */\n description?: string;\n}\n\n/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. */\nexport interface ErrorResponseOutput {\n /** The error object. */\n error?: ErrorDetailOutput;\n}\n\n/** The error detail. */\nexport interface ErrorDetailOutput {\n /** The error code. */\n readonly code?: string;\n /** The error message. */\n readonly message?: string;\n /** The error target. */\n readonly target?: string;\n /** The error details. */\n readonly details?: Array<ErrorDetailOutput>;\n /** The error additional info. */\n readonly additionalInfo?: Array<ErrorAdditionalInfoOutput>;\n}\n\n/** The resource management error additional info. */\nexport interface ErrorAdditionalInfoOutput {\n /** The additional info type. */\n readonly type?: string;\n /** The additional info. */\n readonly info?: Record<string, any>;\n}\n\n/** Represents a mongo cluster resource. */\nexport interface MongoClusterOutput extends TrackedResourceOutput {\n /** The resource-specific properties for this resource. */\n properties?: MongoClusterPropertiesOutput;\n}\n\n/** The properties of a mongo cluster. */\nexport interface MongoClusterPropertiesOutput {\n /** The mode to create a mongo cluster. */\n createMode?: CreateModeOutput;\n /** The parameters to create a point-in-time restore mongo cluster. */\n restoreParameters?: MongoClusterRestoreParametersOutput;\n /** The administrator's login for the mongo cluster. */\n administratorLogin?: string;\n /** The password of the administrator login. */\n administratorLoginPassword?: string;\n /** The Mongo DB server version. Defaults to the latest available version if not specified. */\n serverVersion?: string;\n /** The default mongo connection string for the cluster. */\n readonly connectionString?: string;\n /** Earliest restore timestamp in UTC ISO8601 format. */\n readonly earliestRestoreTime?: string;\n /** The provisioning state of the mongo cluster. */\n readonly provisioningState?: ProvisioningStateOutput;\n /** The status of the mongo cluster. */\n readonly clusterStatus?: MongoClusterStatusOutput;\n /** Whether or not public endpoint access is allowed for this mongo cluster. */\n publicNetworkAccess?: PublicNetworkAccessOutput;\n /** The list of node group specs in the cluster. */\n nodeGroupSpecs?: Array<NodeGroupSpecOutput>;\n /** List of private endpoint connections. */\n readonly privateEndpointConnections?: Array<PrivateEndpointConnectionOutput>;\n}\n\n/** Parameters used for restore operations */\nexport interface MongoClusterRestoreParametersOutput {\n /** UTC point in time to restore a mongo cluster */\n pointInTimeUTC?: string;\n /** Resource ID to locate the source cluster to restore */\n sourceResourceId?: string;\n}\n\n/** Specification for a node group. */\nexport interface NodeGroupSpecOutput {\n /** The resource sku for the node group. This defines the size of CPU and memory that is provisioned for each node. Example values: 'M30', 'M40'. */\n sku?: string;\n /** The disk storage size for the node group in GB. Example values: 128, 256, 512, 1024. */\n diskSizeGB?: number;\n /** Whether high availability is enabled on the node group. */\n enableHa?: boolean;\n /** The node type deployed in the node group. */\n kind?: NodeKindOutput;\n /** The number of nodes in the node group. */\n nodeCount?: number;\n}\n\n/** The private endpoint connection resource */\nexport interface PrivateEndpointConnectionOutput extends ResourceOutput {\n /** The private endpoint connection properties */\n properties?: PrivateEndpointConnectionPropertiesOutput;\n}\n\n/** Properties of the private endpoint connection. */\nexport interface PrivateEndpointConnectionPropertiesOutput {\n /** The group ids for the private endpoint resource. */\n readonly groupIds?: string[];\n /** The private endpoint resource. */\n privateEndpoint?: PrivateEndpointOutput;\n /** A collection of information about the state of the connection between service consumer and provider. */\n privateLinkServiceConnectionState: PrivateLinkServiceConnectionStateOutput;\n /** The provisioning state of the private endpoint connection resource. */\n readonly provisioningState?: PrivateEndpointConnectionProvisioningStateOutput;\n}\n\n/** The Private Endpoint resource. */\nexport interface PrivateEndpointOutput {\n /** The resource identifier for private endpoint */\n readonly id?: string;\n}\n\n/** A collection of information about the state of the connection between service consumer and provider. */\nexport interface PrivateLinkServiceConnectionStateOutput {\n /** Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. */\n status?: PrivateEndpointServiceConnectionStatusOutput;\n /** The reason for approval/rejection of the connection. */\n description?: string;\n /** A message indicating if changes on the service provider require any updates on the consumer. */\n actionsRequired?: string;\n}\n\n/** Common fields that are returned in the response for all Azure Resource Manager resources */\nexport interface ResourceOutput {\n /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */\n readonly id?: string;\n /** The name of the resource */\n readonly name?: string;\n /** The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\" */\n readonly type?: string;\n /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */\n readonly systemData?: SystemDataOutput;\n}\n\n/** Metadata pertaining to creation and last modification of the resource. */\nexport interface SystemDataOutput {\n /** The identity that created the resource. */\n createdBy?: string;\n /** The type of identity that created the resource. */\n createdByType?: CreatedByTypeOutput;\n /** The timestamp of resource creation (UTC). */\n createdAt?: string;\n /** The identity that last modified the resource. */\n lastModifiedBy?: string;\n /** The type of identity that last modified the resource. */\n lastModifiedByType?: CreatedByTypeOutput;\n /** The timestamp of resource last modification (UTC) */\n lastModifiedAt?: string;\n}\n\n/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */\nexport interface TrackedResourceOutput extends ResourceOutput {\n /** Resource tags. */\n tags?: Record<string, string>;\n /** The geo-location where the resource lives */\n location: string;\n}\n\n/** The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set. */\nexport interface ResourceModelWithAllowedPropertySetOutput\n extends TrackedResourceOutput {\n /**\n * The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource.\n * If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource.\n */\n managedBy?: string;\n /**\n * Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type.\n * If supported, the resource provider must validate and persist this value.\n */\n kind?: string;\n /**\n * The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention.\n * Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19),\n * If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.\n */\n eTag?: string;\n identity?: IdentityOutput;\n sku?: SkuOutput;\n plan?: PlanOutput;\n}\n\n/** Identity for the resource. */\nexport interface IdentityOutput {\n /** The principal ID of resource identity. The value must be an UUID. */\n readonly principalId?: string;\n /** The tenant ID of resource. The value must be an UUID. */\n readonly tenantId?: string;\n /** The identity type. */\n type?: ResourceIdentityTypeOutput;\n}\n\n/** The resource model definition representing SKU */\nexport interface SkuOutput {\n /** The name of the SKU. Ex - P3. It is typically a letter+number code */\n name: string;\n /** This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT. */\n tier?: SkuTierOutput;\n /** The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. */\n size?: string;\n /** If the service has different generations of hardware, for the same SKU, then that can be captured here. */\n family?: string;\n /** If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. */\n capacity?: number;\n}\n\n/** Plan for the resource. */\nexport interface PlanOutput {\n /** A user defined name of the 3rd Party Artifact that is being procured. */\n name: string;\n /** The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic */\n publisher: string;\n /** The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. */\n product: string;\n /** A publisher provided promotion code as provisioned in Data Market for the said product/artifact. */\n promotionCode?: string;\n /** The version of the desired product/artifact. */\n version?: string;\n}\n\n/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */\nexport interface ProxyResourceOutput extends ResourceOutput {}\n\n/** Represents a mongo cluster firewall rule. */\nexport interface FirewallRuleOutput extends ProxyResourceOutput {\n /** The resource-specific properties for this resource. */\n properties?: FirewallRulePropertiesOutput;\n}\n\n/** The properties of a mongo cluster firewall rule. */\nexport interface FirewallRulePropertiesOutput {\n /** The provisioning state of the firewall rule. */\n readonly provisioningState?: ProvisioningStateOutput;\n /** The start IP address of the mongo cluster firewall rule. Must be IPv4 format. */\n startIpAddress: string;\n /** The end IP address of the mongo cluster firewall rule. Must be IPv4 format. */\n endIpAddress: string;\n}\n\n/** Concrete proxy resource types can be created by aliasing this type using a specific property type. */\nexport interface PrivateEndpointConnectionResourceOutput\n extends ProxyResourceOutput {\n /** The resource-specific properties for this resource. */\n properties?: PrivateEndpointConnectionPropertiesOutput;\n}\n\n/** Concrete proxy resource types can be created by aliasing this type using a specific property type. */\nexport interface PrivateLinkResourceOutput extends ProxyResourceOutput {\n /** The resource-specific properties for this resource. */\n properties?: PrivateLinkResourcePropertiesOutput;\n}\n\n/** Properties of a private link resource. */\nexport interface PrivateLinkResourcePropertiesOutput {\n /** The private link resource group id. */\n readonly groupId?: string;\n /** The private link resource required member names. */\n readonly requiredMembers?: string[];\n /** The private link resource private link DNS zone name. */\n requiredZoneNames?: string[];\n}\n\n/** The base extension resource. */\nexport interface ExtensionResourceOutput extends ResourceOutput {}\n\n/** The resource model definition for an Azure Resource Manager resource with an etag. */\nexport interface AzureEntityResourceOutput extends ResourceOutput {\n /** Resource Etag. */\n readonly etag?: string;\n}\n\n/** A private link resource. */\nexport interface PrivateLinkResourceOutput extends ResourceOutput {\n /** Resource properties. */\n properties?: PrivateLinkResourcePropertiesOutput;\n}\n\n/** The connection strings for the given mongo cluster. */\nexport interface ListConnectionStringsResultOutput {\n /** An array that contains the connection strings for a mongo cluster. */\n readonly connectionStrings?: Array<ConnectionStringOutput>;\n}\n\n/** Connection string for the mongo cluster */\nexport interface ConnectionStringOutput {\n /** Value of the connection string */\n readonly connectionString?: string;\n /** Description of the connection string */\n readonly description?: string;\n}\n\n/** The check availability result. */\nexport interface CheckNameAvailabilityResponseOutput {\n /** Indicates if the resource name is available. */\n nameAvailable?: boolean;\n /** The reason why the given name is not available. */\n reason?: CheckNameAvailabilityReasonOutput;\n /** Detailed reason why the given name is not available. */\n message?: string;\n}\n\n/** A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. */\nexport type OperationListResultOutput = Paged<OperationOutput>;\n/** Alias for OriginOutput */\nexport type OriginOutput = string;\n/** Alias for ActionTypeOutput */\nexport type ActionTypeOutput = string;\n/** Alias for CreateModeOutput */\nexport type CreateModeOutput = string;\n/** Alias for ResourceProvisioningStateOutput */\nexport type ResourceProvisioningStateOutput = string;\n/** Alias for ProvisioningStateOutput */\nexport type ProvisioningStateOutput = string;\n/** Alias for MongoClusterStatusOutput */\nexport type MongoClusterStatusOutput = string;\n/** Alias for PublicNetworkAccessOutput */\nexport type PublicNetworkAccessOutput = string;\n/** Alias for NodeKindOutput */\nexport type NodeKindOutput = string;\n/** Alias for PrivateEndpointServiceConnectionStatusOutput */\nexport type PrivateEndpointServiceConnectionStatusOutput = string;\n/** Alias for PrivateEndpointConnectionProvisioningStateOutput */\nexport type PrivateEndpointConnectionProvisioningStateOutput = string;\n/** Alias for CreatedByTypeOutput */\nexport type CreatedByTypeOutput = string;\n/** Alias for ResourceIdentityTypeOutput */\nexport type ResourceIdentityTypeOutput = \"SystemAssigned\";\n/** Alias for SkuTierOutput */\nexport type SkuTierOutput = \"Free\" | \"Basic\" | \"Standard\" | \"Premium\";\n/** The response of a MongoCluster list operation. */\nexport type MongoClusterListResultOutput = Paged<MongoClusterOutput>;\n/** Alias for CheckNameAvailabilityReasonOutput */\nexport type CheckNameAvailabilityReasonOutput = string;\n/** The response of a FirewallRule list operation. */\nexport type FirewallRuleListResultOutput = Paged<FirewallRuleOutput>;\n/** The response of a PrivateEndpointConnectionResource list operation. */\nexport type PrivateEndpointConnectionResourceListResultOutput =\n Paged<PrivateEndpointConnectionResourceOutput>;\n/** The response of a PrivateLinkResource list operation. */\nexport type PrivateLinkResourceListResultOutput =\n Paged<PrivateLinkResourceOutput>;\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
2
|
+
import { Client, PathUncheckedResponse } from "@azure-rest/core-client";
|
|
3
|
+
/**
|
|
4
|
+
* Helper type to extract the type of an array
|
|
5
|
+
*/
|
|
6
|
+
export type GetArrayType<T> = T extends Array<infer TData> ? TData : never;
|
|
7
|
+
/**
|
|
8
|
+
* The type of a custom function that defines how to get a page and a link to the next one if any.
|
|
9
|
+
*/
|
|
10
|
+
export type GetPage<TPage> = (pageLink: string, maxPageSize?: number) => Promise<{
|
|
11
|
+
page: TPage;
|
|
12
|
+
nextPageLink?: string;
|
|
13
|
+
}>;
|
|
14
|
+
/**
|
|
15
|
+
* Options for the paging helper
|
|
16
|
+
*/
|
|
17
|
+
export interface PagingOptions<TResponse> {
|
|
18
|
+
/**
|
|
19
|
+
* Custom function to extract pagination details for crating the PagedAsyncIterableIterator
|
|
20
|
+
*/
|
|
21
|
+
customGetPage?: GetPage<PaginateReturn<TResponse>[]>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Helper type to infer the Type of the paged elements from the response type
|
|
25
|
+
* This type is generated based on the swagger information for x-ms-pageable
|
|
26
|
+
* specifically on the itemName property which indicates the property of the response
|
|
27
|
+
* where the page items are found. The default value is `value`.
|
|
28
|
+
* This type will allow us to provide strongly typed Iterator based on the response we get as second parameter
|
|
29
|
+
*/
|
|
30
|
+
export type PaginateReturn<TResult> = TResult extends {
|
|
31
|
+
body: {
|
|
32
|
+
value?: infer TPage;
|
|
33
|
+
};
|
|
34
|
+
} ? GetArrayType<TPage> : Array<unknown>;
|
|
35
|
+
/**
|
|
36
|
+
* Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
|
|
37
|
+
* @param client - Client to use for sending the next page requests
|
|
38
|
+
* @param initialResponse - Initial response containing the nextLink and current page of elements
|
|
39
|
+
* @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
|
|
40
|
+
* @returns - PagedAsyncIterableIterator to iterate the elements
|
|
41
|
+
*/
|
|
42
|
+
export declare function paginate<TResponse extends PathUncheckedResponse>(client: Client, initialResponse: TResponse, options?: PagingOptions<TResponse>): PagedAsyncIterableIterator<PaginateReturn<TResponse>>;
|
|
43
|
+
//# sourceMappingURL=paginateHelper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paginateHelper.d.ts","sourceRoot":"","sources":["../../../src/rest/paginateHelper.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,0BAA0B,EAE3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,MAAM,EAEN,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,OAAO,CAAC,KAAK,IAAI,CAC3B,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,KACjB,OAAO,CAAC;IACX,IAAI,EAAE,KAAK,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,SAAS;IACtC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;CACtD;AAED;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,CAAC,OAAO,IAAI,OAAO,SAAS;IACpD,IAAI,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAA;KAAE,CAAC;CAC/B,GACG,YAAY,CAAC,KAAK,CAAC,GACnB,KAAK,CAAC,OAAO,CAAC,CAAC;AAEnB;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,SAAS,SAAS,qBAAqB,EAC9D,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,SAAS,EAC1B,OAAO,GAAE,aAAa,CAAC,SAAS,CAAM,GACrC,0BAA0B,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CA4BvD"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
import { getPagedAsyncIterator, } from "@azure/core-paging";
|
|
4
|
+
import { createRestError, } from "@azure-rest/core-client";
|
|
5
|
+
/**
|
|
6
|
+
* Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
|
|
7
|
+
* @param client - Client to use for sending the next page requests
|
|
8
|
+
* @param initialResponse - Initial response containing the nextLink and current page of elements
|
|
9
|
+
* @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
|
|
10
|
+
* @returns - PagedAsyncIterableIterator to iterate the elements
|
|
11
|
+
*/
|
|
12
|
+
export function paginate(client, initialResponse, options = {}) {
|
|
13
|
+
let firstRun = true;
|
|
14
|
+
const itemName = "value";
|
|
15
|
+
const nextLinkName = "nextLink";
|
|
16
|
+
const { customGetPage } = options;
|
|
17
|
+
const pagedResult = {
|
|
18
|
+
firstPageLink: "",
|
|
19
|
+
getPage: typeof customGetPage === "function"
|
|
20
|
+
? customGetPage
|
|
21
|
+
: async (pageLink) => {
|
|
22
|
+
const result = firstRun
|
|
23
|
+
? initialResponse
|
|
24
|
+
: await client.pathUnchecked(pageLink).get();
|
|
25
|
+
firstRun = false;
|
|
26
|
+
checkPagingRequest(result);
|
|
27
|
+
const nextLink = getNextLink(result.body, nextLinkName);
|
|
28
|
+
const values = getElements(result.body, itemName);
|
|
29
|
+
return {
|
|
30
|
+
page: values,
|
|
31
|
+
nextPageLink: nextLink,
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
return getPagedAsyncIterator(pagedResult);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Gets for the value of nextLink in the body
|
|
39
|
+
*/
|
|
40
|
+
function getNextLink(body, nextLinkName) {
|
|
41
|
+
if (!nextLinkName) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
const nextLink = body[nextLinkName];
|
|
45
|
+
if (typeof nextLink !== "string" && typeof nextLink !== "undefined") {
|
|
46
|
+
throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);
|
|
47
|
+
}
|
|
48
|
+
return nextLink;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Gets the elements of the current request in the body.
|
|
52
|
+
*/
|
|
53
|
+
function getElements(body, itemName) {
|
|
54
|
+
const value = body[itemName];
|
|
55
|
+
// value has to be an array according to the x-ms-pageable extension.
|
|
56
|
+
// The fact that this must be an array is used above to calculate the
|
|
57
|
+
// type of elements in the page in PaginateReturn
|
|
58
|
+
if (!Array.isArray(value)) {
|
|
59
|
+
throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
|
|
60
|
+
}
|
|
61
|
+
return value !== null && value !== void 0 ? value : [];
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Checks if a request failed
|
|
65
|
+
*/
|
|
66
|
+
function checkPagingRequest(response) {
|
|
67
|
+
const Http2xxStatusCodes = [
|
|
68
|
+
"200",
|
|
69
|
+
"201",
|
|
70
|
+
"202",
|
|
71
|
+
"203",
|
|
72
|
+
"204",
|
|
73
|
+
"205",
|
|
74
|
+
"206",
|
|
75
|
+
"207",
|
|
76
|
+
"208",
|
|
77
|
+
"226",
|
|
78
|
+
];
|
|
79
|
+
if (!Http2xxStatusCodes.includes(response.status)) {
|
|
80
|
+
throw createRestError(`Pagination failed with unexpected statusCode ${response.status}`, response);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=paginateHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../../src/rest/paginateHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,qBAAqB,GAGtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,eAAe,GAEhB,MAAM,yBAAyB,CAAC;AAyCjC;;;;;;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,E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,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;QACzB,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;KACN,CAAC;IACF,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 {\n getPagedAsyncIterator,\n PagedAsyncIterableIterator,\n PagedResult,\n} from \"@azure/core-paging\";\nimport {\n Client,\n createRestError,\n PathUncheckedResponse,\n} 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\n ? initialResponse\n : 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(\n `Body Property ${nextLinkName} should be a string or undefined`,\n );\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 = [\n \"200\",\n \"201\",\n \"202\",\n \"203\",\n \"204\",\n \"205\",\n \"206\",\n \"207\",\n \"208\",\n \"226\",\n ];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { RequestParameters } from "@azure-rest/core-client";
|
|
2
|
+
import { MongoCluster, MongoClusterUpdate, CheckNameAvailabilityRequest, FirewallRule, PrivateEndpointConnectionResource } from "./models.js";
|
|
3
|
+
export type OperationsListParameters = RequestParameters;
|
|
4
|
+
export type MongoClustersGetParameters = RequestParameters;
|
|
5
|
+
export interface MongoClustersCreateOrUpdateBodyParam {
|
|
6
|
+
/** Resource create parameters. */
|
|
7
|
+
body: MongoCluster;
|
|
8
|
+
}
|
|
9
|
+
export type MongoClustersCreateOrUpdateParameters = MongoClustersCreateOrUpdateBodyParam & RequestParameters;
|
|
10
|
+
export interface MongoClustersUpdateBodyParam {
|
|
11
|
+
/** The resource properties to be updated. */
|
|
12
|
+
body: MongoClusterUpdate;
|
|
13
|
+
}
|
|
14
|
+
export type MongoClustersUpdateParameters = MongoClustersUpdateBodyParam & RequestParameters;
|
|
15
|
+
export type MongoClustersDeleteParameters = RequestParameters;
|
|
16
|
+
export type MongoClustersListByResourceGroupParameters = RequestParameters;
|
|
17
|
+
export type MongoClustersListParameters = RequestParameters;
|
|
18
|
+
export type MongoClustersListConnectionStringsParameters = RequestParameters;
|
|
19
|
+
export interface MongoClustersCheckNameAvailabilityBodyParam {
|
|
20
|
+
/** The CheckAvailability request */
|
|
21
|
+
body: CheckNameAvailabilityRequest;
|
|
22
|
+
}
|
|
23
|
+
export type MongoClustersCheckNameAvailabilityParameters = MongoClustersCheckNameAvailabilityBodyParam & RequestParameters;
|
|
24
|
+
export type FirewallRulesGetParameters = RequestParameters;
|
|
25
|
+
export interface FirewallRulesCreateOrUpdateBodyParam {
|
|
26
|
+
/** Resource create parameters. */
|
|
27
|
+
body: FirewallRule;
|
|
28
|
+
}
|
|
29
|
+
export type FirewallRulesCreateOrUpdateParameters = FirewallRulesCreateOrUpdateBodyParam & RequestParameters;
|
|
30
|
+
export type FirewallRulesDeleteParameters = RequestParameters;
|
|
31
|
+
export type FirewallRulesListByMongoClusterParameters = RequestParameters;
|
|
32
|
+
export type PrivateEndpointConnectionsListByMongoClusterParameters = RequestParameters;
|
|
33
|
+
export type PrivateEndpointConnectionsGetParameters = RequestParameters;
|
|
34
|
+
export interface PrivateEndpointConnectionsCreateBodyParam {
|
|
35
|
+
/** Resource create parameters. */
|
|
36
|
+
body: PrivateEndpointConnectionResource;
|
|
37
|
+
}
|
|
38
|
+
export type PrivateEndpointConnectionsCreateParameters = PrivateEndpointConnectionsCreateBodyParam & RequestParameters;
|
|
39
|
+
export type PrivateEndpointConnectionsDeleteParameters = RequestParameters;
|
|
40
|
+
export type PrivateLinksListByMongoClusterParameters = RequestParameters;
|
|
41
|
+
//# sourceMappingURL=parameters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../src/rest/parameters.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,4BAA4B,EAC5B,YAAY,EACZ,iCAAiC,EAClC,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;AACzD,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;AAE3D,MAAM,WAAW,oCAAoC;IACnD,kCAAkC;IAClC,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,MAAM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"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport {\n MongoCluster,\n MongoClusterUpdate,\n CheckNameAvailabilityRequest,\n FirewallRule,\n PrivateEndpointConnectionResource,\n} from \"./models.js\";\n\nexport type OperationsListParameters = RequestParameters;\nexport type MongoClustersGetParameters = RequestParameters;\n\nexport interface MongoClustersCreateOrUpdateBodyParam {\n /** Resource create parameters. */\n body: MongoCluster;\n}\n\nexport type MongoClustersCreateOrUpdateParameters =\n MongoClustersCreateOrUpdateBodyParam & RequestParameters;\n\nexport interface MongoClustersUpdateBodyParam {\n /** The resource properties to be updated. */\n body: MongoClusterUpdate;\n}\n\nexport type MongoClustersUpdateParameters = MongoClustersUpdateBodyParam &\n RequestParameters;\nexport type MongoClustersDeleteParameters = RequestParameters;\nexport type MongoClustersListByResourceGroupParameters = RequestParameters;\nexport type MongoClustersListParameters = RequestParameters;\nexport type MongoClustersListConnectionStringsParameters = RequestParameters;\n\nexport interface MongoClustersCheckNameAvailabilityBodyParam {\n /** The CheckAvailability request */\n body: CheckNameAvailabilityRequest;\n}\n\nexport type MongoClustersCheckNameAvailabilityParameters =\n MongoClustersCheckNameAvailabilityBodyParam & RequestParameters;\nexport type FirewallRulesGetParameters = RequestParameters;\n\nexport interface FirewallRulesCreateOrUpdateBodyParam {\n /** Resource create parameters. */\n body: FirewallRule;\n}\n\nexport type FirewallRulesCreateOrUpdateParameters =\n FirewallRulesCreateOrUpdateBodyParam & RequestParameters;\nexport type FirewallRulesDeleteParameters = RequestParameters;\nexport type FirewallRulesListByMongoClusterParameters = RequestParameters;\nexport type PrivateEndpointConnectionsListByMongoClusterParameters =\n RequestParameters;\nexport type PrivateEndpointConnectionsGetParameters = RequestParameters;\n\nexport interface PrivateEndpointConnectionsCreateBodyParam {\n /** Resource create parameters. */\n body: PrivateEndpointConnectionResource;\n}\n\nexport type PrivateEndpointConnectionsCreateParameters =\n PrivateEndpointConnectionsCreateBodyParam & RequestParameters;\nexport type PrivateEndpointConnectionsDeleteParameters = RequestParameters;\nexport type PrivateLinksListByMongoClusterParameters = RequestParameters;\n"]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { Client } from "@azure-rest/core-client";
|
|
2
|
+
import { AbortSignalLike } from "@azure/abort-controller";
|
|
3
|
+
import { CancelOnProgress, CreateHttpPollerOptions, OperationState } from "@azure/core-lro";
|
|
4
|
+
import { MongoClustersCreateOrUpdate200Response, MongoClustersCreateOrUpdate201Response, MongoClustersCreateOrUpdateDefaultResponse, MongoClustersCreateOrUpdateLogicalResponse, MongoClustersUpdate200Response, MongoClustersUpdate202Response, MongoClustersUpdateDefaultResponse, MongoClustersUpdateLogicalResponse, MongoClustersDelete202Response, MongoClustersDelete204Response, MongoClustersDeleteDefaultResponse, MongoClustersDeleteLogicalResponse, FirewallRulesCreateOrUpdate200Response, FirewallRulesCreateOrUpdate201Response, FirewallRulesCreateOrUpdate202Response, FirewallRulesCreateOrUpdateDefaultResponse, FirewallRulesCreateOrUpdateLogicalResponse, FirewallRulesDelete202Response, FirewallRulesDelete204Response, FirewallRulesDeleteDefaultResponse, FirewallRulesDeleteLogicalResponse, PrivateEndpointConnectionsCreate200Response, PrivateEndpointConnectionsCreate201Response, PrivateEndpointConnectionsCreate202Response, PrivateEndpointConnectionsCreateDefaultResponse, PrivateEndpointConnectionsCreateLogicalResponse, PrivateEndpointConnectionsDelete202Response, PrivateEndpointConnectionsDelete204Response, PrivateEndpointConnectionsDeleteDefaultResponse, PrivateEndpointConnectionsDeleteLogicalResponse } from "./responses.js";
|
|
5
|
+
/**
|
|
6
|
+
* A simple poller that can be used to poll a long running operation.
|
|
7
|
+
*/
|
|
8
|
+
export interface SimplePollerLike<TState extends OperationState<TResult>, TResult> {
|
|
9
|
+
/**
|
|
10
|
+
* Returns true if the poller has finished polling.
|
|
11
|
+
*/
|
|
12
|
+
isDone(): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Returns the state of the operation.
|
|
15
|
+
*/
|
|
16
|
+
getOperationState(): TState;
|
|
17
|
+
/**
|
|
18
|
+
* Returns the result value of the operation,
|
|
19
|
+
* regardless of the state of the poller.
|
|
20
|
+
* It can return undefined or an incomplete form of the final TResult value
|
|
21
|
+
* depending on the implementation.
|
|
22
|
+
*/
|
|
23
|
+
getResult(): TResult | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Returns a promise that will resolve once a single polling request finishes.
|
|
26
|
+
* It does this by calling the update method of the Poller's operation.
|
|
27
|
+
*/
|
|
28
|
+
poll(options?: {
|
|
29
|
+
abortSignal?: AbortSignalLike;
|
|
30
|
+
}): Promise<TState>;
|
|
31
|
+
/**
|
|
32
|
+
* Returns a promise that will resolve once the underlying operation is completed.
|
|
33
|
+
*/
|
|
34
|
+
pollUntilDone(pollOptions?: {
|
|
35
|
+
abortSignal?: AbortSignalLike;
|
|
36
|
+
}): Promise<TResult>;
|
|
37
|
+
/**
|
|
38
|
+
* Invokes the provided callback after each polling is completed,
|
|
39
|
+
* sending the current state of the poller's operation.
|
|
40
|
+
*
|
|
41
|
+
* It returns a method that can be used to stop receiving updates on the given callback function.
|
|
42
|
+
*/
|
|
43
|
+
onProgress(callback: (state: TState) => void): CancelOnProgress;
|
|
44
|
+
/**
|
|
45
|
+
* Returns a promise that could be used for serialized version of the poller's operation
|
|
46
|
+
* by invoking the operation's serialize method.
|
|
47
|
+
*/
|
|
48
|
+
serialize(): Promise<string>;
|
|
49
|
+
/**
|
|
50
|
+
* Wait the poller to be submitted.
|
|
51
|
+
*/
|
|
52
|
+
submitted(): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Returns a string representation of the poller's operation. Similar to serialize but returns a string.
|
|
55
|
+
* @deprecated Use serialize() instead.
|
|
56
|
+
*/
|
|
57
|
+
toString(): string;
|
|
58
|
+
/**
|
|
59
|
+
* Stops the poller from continuing to poll. Please note this will only stop the client-side polling
|
|
60
|
+
* @deprecated Use abortSignal to stop polling instead.
|
|
61
|
+
*/
|
|
62
|
+
stopPolling(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Returns true if the poller is stopped.
|
|
65
|
+
* @deprecated Use abortSignal status to track this instead.
|
|
66
|
+
*/
|
|
67
|
+
isStopped(): boolean;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Helper function that builds a Poller object to help polling a long running operation.
|
|
71
|
+
* @param client - Client to use for sending the request to get additional pages.
|
|
72
|
+
* @param initialResponse - The initial response.
|
|
73
|
+
* @param options - Options to set a resume state or custom polling interval.
|
|
74
|
+
* @returns - A poller object to poll for operation state updates and eventually get the final response.
|
|
75
|
+
*/
|
|
76
|
+
export declare function getLongRunningPoller<TResult extends MongoClustersCreateOrUpdateLogicalResponse | MongoClustersCreateOrUpdateDefaultResponse>(client: Client, initialResponse: MongoClustersCreateOrUpdate200Response | MongoClustersCreateOrUpdate201Response | MongoClustersCreateOrUpdateDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
|
|
77
|
+
export declare function getLongRunningPoller<TResult extends MongoClustersUpdateLogicalResponse | MongoClustersUpdateDefaultResponse>(client: Client, initialResponse: MongoClustersUpdate200Response | MongoClustersUpdate202Response | MongoClustersUpdateDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
|
|
78
|
+
export declare function getLongRunningPoller<TResult extends MongoClustersDeleteLogicalResponse | MongoClustersDeleteDefaultResponse>(client: Client, initialResponse: MongoClustersDelete202Response | MongoClustersDelete204Response | MongoClustersDeleteDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
|
|
79
|
+
export declare function getLongRunningPoller<TResult extends FirewallRulesCreateOrUpdateLogicalResponse | FirewallRulesCreateOrUpdateDefaultResponse>(client: Client, initialResponse: FirewallRulesCreateOrUpdate200Response | FirewallRulesCreateOrUpdate201Response | FirewallRulesCreateOrUpdate202Response | FirewallRulesCreateOrUpdateDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
|
|
80
|
+
export declare function getLongRunningPoller<TResult extends FirewallRulesDeleteLogicalResponse | FirewallRulesDeleteDefaultResponse>(client: Client, initialResponse: FirewallRulesDelete202Response | FirewallRulesDelete204Response | FirewallRulesDeleteDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
|
|
81
|
+
export declare function getLongRunningPoller<TResult extends PrivateEndpointConnectionsCreateLogicalResponse | PrivateEndpointConnectionsCreateDefaultResponse>(client: Client, initialResponse: PrivateEndpointConnectionsCreate200Response | PrivateEndpointConnectionsCreate201Response | PrivateEndpointConnectionsCreate202Response | PrivateEndpointConnectionsCreateDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
|
|
82
|
+
export declare function getLongRunningPoller<TResult extends PrivateEndpointConnectionsDeleteLogicalResponse | PrivateEndpointConnectionsDeleteDefaultResponse>(client: Client, initialResponse: PrivateEndpointConnectionsDelete202Response | PrivateEndpointConnectionsDelete204Response | PrivateEndpointConnectionsDeleteDefaultResponse, options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;
|
|
83
|
+
//# sourceMappingURL=pollingHelper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pollingHelper.d.ts","sourceRoot":"","sources":["../../../src/rest/pollingHelper.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAgB,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,gBA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soft Corporation.
|
|
2
|
+
// Licensed under the MIT license.
|
|
3
|
+
import { createHttpPoller, } from "@azure/core-lro";
|
|
4
|
+
export async function getLongRunningPoller(client, initialResponse, options = {}) {
|
|
5
|
+
var _a;
|
|
6
|
+
const abortController = new AbortController();
|
|
7
|
+
const poller = {
|
|
8
|
+
sendInitialRequest: async () => {
|
|
9
|
+
// In the case of Rest Clients we are building the LRO poller object from a response that's the reason
|
|
10
|
+
// we are not triggering the initial request here, just extracting the information from the
|
|
11
|
+
// response we were provided.
|
|
12
|
+
return getLroResponse(initialResponse);
|
|
13
|
+
},
|
|
14
|
+
sendPollRequest: async (path, pollOptions) => {
|
|
15
|
+
// This is the callback that is going to be called to poll the service
|
|
16
|
+
// to get the latest status. We use the client provided and the polling path
|
|
17
|
+
// which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location
|
|
18
|
+
// depending on the lro pattern that the service implements. If non is provided we default to the initial path.
|
|
19
|
+
function abortListener() {
|
|
20
|
+
abortController.abort();
|
|
21
|
+
}
|
|
22
|
+
const inputAbortSignal = pollOptions === null || pollOptions === void 0 ? void 0 : pollOptions.abortSignal;
|
|
23
|
+
const abortSignal = abortController.signal;
|
|
24
|
+
if (inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.aborted) {
|
|
25
|
+
abortController.abort();
|
|
26
|
+
}
|
|
27
|
+
else if (!abortSignal.aborted) {
|
|
28
|
+
inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.addEventListener("abort", abortListener, {
|
|
29
|
+
once: true,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
let response;
|
|
33
|
+
try {
|
|
34
|
+
response = await client
|
|
35
|
+
.pathUnchecked(path !== null && path !== void 0 ? path : initialResponse.request.url)
|
|
36
|
+
.get({ abortSignal });
|
|
37
|
+
}
|
|
38
|
+
finally {
|
|
39
|
+
inputAbortSignal === null || inputAbortSignal === void 0 ? void 0 : inputAbortSignal.removeEventListener("abort", abortListener);
|
|
40
|
+
}
|
|
41
|
+
const lroResponse = getLroResponse(response);
|
|
42
|
+
lroResponse.rawResponse.headers["x-ms-original-url"] =
|
|
43
|
+
initialResponse.request.url;
|
|
44
|
+
return lroResponse;
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
options.resolveOnUnsuccessful = (_a = options.resolveOnUnsuccessful) !== null && _a !== void 0 ? _a : true;
|
|
48
|
+
const httpPoller = createHttpPoller(poller, options);
|
|
49
|
+
const simplePoller = {
|
|
50
|
+
isDone() {
|
|
51
|
+
return httpPoller.isDone;
|
|
52
|
+
},
|
|
53
|
+
isStopped() {
|
|
54
|
+
return abortController.signal.aborted;
|
|
55
|
+
},
|
|
56
|
+
getOperationState() {
|
|
57
|
+
if (!httpPoller.operationState) {
|
|
58
|
+
throw new Error("Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().");
|
|
59
|
+
}
|
|
60
|
+
return httpPoller.operationState;
|
|
61
|
+
},
|
|
62
|
+
getResult() {
|
|
63
|
+
return httpPoller.result;
|
|
64
|
+
},
|
|
65
|
+
toString() {
|
|
66
|
+
if (!httpPoller.operationState) {
|
|
67
|
+
throw new Error("Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().");
|
|
68
|
+
}
|
|
69
|
+
return JSON.stringify({
|
|
70
|
+
state: httpPoller.operationState,
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
stopPolling() {
|
|
74
|
+
abortController.abort();
|
|
75
|
+
},
|
|
76
|
+
onProgress: httpPoller.onProgress,
|
|
77
|
+
poll: httpPoller.poll,
|
|
78
|
+
pollUntilDone: httpPoller.pollUntilDone,
|
|
79
|
+
serialize: httpPoller.serialize,
|
|
80
|
+
submitted: httpPoller.submitted,
|
|
81
|
+
};
|
|
82
|
+
return simplePoller;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Converts a Rest Client response to a response that the LRO implementation understands
|
|
86
|
+
* @param response - a rest client http response
|
|
87
|
+
* @returns - An LRO response that the LRO implementation understands
|
|
88
|
+
*/
|
|
89
|
+
function getLroResponse(response) {
|
|
90
|
+
if (Number.isNaN(response.status)) {
|
|
91
|
+
throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
flatResponse: response,
|
|
95
|
+
rawResponse: Object.assign(Object.assign({}, response), { statusCode: Number.parseInt(response.status), body: response.body }),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=pollingHelper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pollingHelper.js","sourceRoot":"","sources":["../../../src/rest/pollingHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAML,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAsMzB,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,MAAc,EACd,eAAwB,EACxB,UAAqE,EAAE;;IAEvE,MAAM,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC;IAC9C,MAAM,MAAM,GAA8B;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,EACpB,IAAY,EACZ,WAA+C,EAC/C,EAAE;YACF,sEAAsE;YACtE,4EAA4E;YAC5E,0JAA0J;YAC1J,+GAA+G;YAC/G,SAAS,aAAa;gBACpB,eAAe,CAAC,KAAK,EAAE,CAAC;YAC1B,CAAC;YACD,MAAM,gBAAgB,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,WAAW,CAAC;YAClD,MAAM,WAAW,GAAG,eAAe,CAAC,MAAM,CAAC;YAC3C,IAAI,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,OAAO,EAAE,C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C;YACD,OAAO,UAAU,CAAC,cAAc,CAAC;QACnC,CAAC;QACD,SAAS;YACP,OAAO,UAAU,CAAC,MAAM,CAAC;QAC3B,CAAC;QACD,QAAQ;YACN,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC;gBAC/B,MAAM,IAAI,KAAK,CACb,4IAA4I,CAC7I,CAAC;YACJ,CAAC;YACD,OAAO,IAAI,CAAC,SAAS,CAAC;gBACpB,KAAK,EAAE,UAAU,CAAC,cAAc;aACjC,CAAC,CAAC;QACL,CAAC;QACD,WAAW;YACT,eAAe,CAAC,KAAK,EAAE,CAAC;QAC1B,CAAC;QACD,UAAU,EAAE,UAAU,CAAC,UAAU;QACjC,IAAI,EAAE,UAAU,CAAC,IAAI;QACrB,aAAa,EAAE,UAAU,CAAC,aAAa;QACvC,SAAS,EAAE,UAAU,CAAC,SAAS;QAC/B,SAAS,EAAE,UAAU,CAAC,SAAS;KAChC,CAAC;IACF,OAAO,YAAY,CAAC;AACtB,CAAC;AAED;;;;GAIG;AACH,SAAS,cAAc,CACrB,QAAiB;IAEjB,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,SAAS,CACjB,uDAAuD,QAAQ,CAAC,MAAM,EAAE,CACzE,CAAC;IACJ,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 { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n CancelOnProgress,\n CreateHttpPollerOptions,\n RunningOperation,\n OperationResponse,\n OperationState,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport {\n MongoClustersCreateOrUpdate200Response,\n MongoClustersCreateOrUpdate201Response,\n MongoClustersCreateOrUpdateDefaultResponse,\n MongoClustersCreateOrUpdateLogicalResponse,\n MongoClustersUpdate200Response,\n MongoClustersUpdate202Response,\n MongoClustersUpdateDefaultResponse,\n MongoClustersUpdateLogicalResponse,\n MongoClustersDelete202Response,\n MongoClustersDelete204Response,\n MongoClustersDeleteDefaultResponse,\n MongoClustersDeleteLogicalResponse,\n FirewallRulesCreateOrUpdate200Response,\n FirewallRulesCreateOrUpdate201Response,\n FirewallRulesCreateOrUpdate202Response,\n FirewallRulesCreateOrUpdateDefaultResponse,\n FirewallRulesCreateOrUpdateLogicalResponse,\n FirewallRulesDelete202Response,\n FirewallRulesDelete204Response,\n FirewallRulesDeleteDefaultResponse,\n FirewallRulesDeleteLogicalResponse,\n PrivateEndpointConnectionsCreate200Response,\n PrivateEndpointConnectionsCreate201Response,\n PrivateEndpointConnectionsCreate202Response,\n PrivateEndpointConnectionsCreateDefaultResponse,\n PrivateEndpointConnectionsCreateLogicalResponse,\n PrivateEndpointConnectionsDelete202Response,\n PrivateEndpointConnectionsDelete204Response,\n PrivateEndpointConnectionsDeleteDefaultResponse,\n PrivateEndpointConnectionsDeleteLogicalResponse,\n} from \"./responses.js\";\n\n/**\n * A simple poller that can be used to poll a long running operation.\n */\nexport interface SimplePollerLike<\n TState extends OperationState<TResult>,\n TResult,\n> {\n /**\n * Returns true if the poller has finished polling.\n */\n isDone(): boolean;\n /**\n * Returns the state of the operation.\n */\n getOperationState(): TState;\n /**\n * Returns the result value of the operation,\n * regardless of the state of the poller.\n * It can return undefined or an incomplete form of the final TResult value\n * depending on the implementation.\n */\n getResult(): TResult | undefined;\n /**\n * Returns a promise that will resolve once a single polling request finishes.\n * It does this by calling the update method of the Poller's operation.\n */\n poll(options?: { abortSignal?: AbortSignalLike }): Promise<TState>;\n /**\n * Returns a promise that will resolve once the underlying operation is completed.\n */\n pollUntilDone(pollOptions?: {\n abortSignal?: AbortSignalLike;\n }): Promise<TResult>;\n /**\n * Invokes the provided callback after each polling is completed,\n * sending the current state of the poller's operation.\n *\n * It returns a method that can be used to stop receiving updates on the given callback function.\n */\n onProgress(callback: (state: TState) => void): CancelOnProgress;\n\n /**\n * Returns a promise that could be used for serialized version of the poller's operation\n * by invoking the operation's serialize method.\n */\n serialize(): Promise<string>;\n\n /**\n * Wait the poller to be submitted.\n */\n submitted(): Promise<void>;\n\n /**\n * Returns a string representation of the poller's operation. Similar to serialize but returns a string.\n * @deprecated Use serialize() instead.\n */\n toString(): string;\n\n /**\n * Stops the poller from continuing to poll. Please note this will only stop the client-side polling\n * @deprecated Use abortSignal to stop polling instead.\n */\n stopPolling(): void;\n\n /**\n * Returns true if the poller is stopped.\n * @deprecated Use abortSignal status to track this instead.\n */\n isStopped(): boolean;\n}\n\n/**\n * 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 async function getLongRunningPoller<\n TResult extends\n | MongoClustersCreateOrUpdateLogicalResponse\n | MongoClustersCreateOrUpdateDefaultResponse,\n>(\n client: Client,\n initialResponse:\n | MongoClustersCreateOrUpdate200Response\n | MongoClustersCreateOrUpdate201Response\n | MongoClustersCreateOrUpdateDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends\n | MongoClustersUpdateLogicalResponse\n | MongoClustersUpdateDefaultResponse,\n>(\n client: Client,\n initialResponse:\n | MongoClustersUpdate200Response\n | MongoClustersUpdate202Response\n | MongoClustersUpdateDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends\n | MongoClustersDeleteLogicalResponse\n | MongoClustersDeleteDefaultResponse,\n>(\n client: Client,\n initialResponse:\n | MongoClustersDelete202Response\n | MongoClustersDelete204Response\n | MongoClustersDeleteDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends\n | FirewallRulesCreateOrUpdateLogicalResponse\n | FirewallRulesCreateOrUpdateDefaultResponse,\n>(\n client: Client,\n initialResponse:\n | FirewallRulesCreateOrUpdate200Response\n | FirewallRulesCreateOrUpdate201Response\n | FirewallRulesCreateOrUpdate202Response\n | FirewallRulesCreateOrUpdateDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends\n | FirewallRulesDeleteLogicalResponse\n | FirewallRulesDeleteDefaultResponse,\n>(\n client: Client,\n initialResponse:\n | FirewallRulesDelete202Response\n | FirewallRulesDelete204Response\n | FirewallRulesDeleteDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends\n | PrivateEndpointConnectionsCreateLogicalResponse\n | PrivateEndpointConnectionsCreateDefaultResponse,\n>(\n client: Client,\n initialResponse:\n | PrivateEndpointConnectionsCreate200Response\n | PrivateEndpointConnectionsCreate201Response\n | PrivateEndpointConnectionsCreate202Response\n | PrivateEndpointConnectionsCreateDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<\n TResult extends\n | PrivateEndpointConnectionsDeleteLogicalResponse\n | PrivateEndpointConnectionsDeleteDefaultResponse,\n>(\n client: Client,\n initialResponse:\n | PrivateEndpointConnectionsDelete202Response\n | PrivateEndpointConnectionsDelete204Response\n | PrivateEndpointConnectionsDeleteDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: CreateHttpPollerOptions<TResult, OperationState<TResult>> = {},\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>> {\n const abortController = new AbortController();\n const poller: RunningOperation<TResult> = {\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 (\n path: string,\n pollOptions?: { abortSignal?: AbortSignalLike },\n ) => {\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 function abortListener(): void {\n abortController.abort();\n }\n const inputAbortSignal = pollOptions?.abortSignal;\n const abortSignal = abortController.signal;\n if (inputAbortSignal?.aborted) {\n abortController.abort();\n } else if (!abortSignal.aborted) {\n inputAbortSignal?.addEventListener(\"abort\", abortListener, {\n once: true,\n });\n }\n let response;\n try {\n response = await client\n .pathUnchecked(path ?? initialResponse.request.url)\n .get({ abortSignal });\n } finally {\n inputAbortSignal?.removeEventListener(\"abort\", abortListener);\n }\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] =\n initialResponse.request.url;\n return lroResponse;\n },\n };\n\n options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true;\n const httpPoller = createHttpPoller(poller, options);\n const simplePoller: SimplePollerLike<OperationState<TResult>, TResult> = {\n isDone() {\n return httpPoller.isDone;\n },\n isStopped() {\n return abortController.signal.aborted;\n },\n getOperationState() {\n if (!httpPoller.operationState) {\n throw new Error(\n \"Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().\",\n );\n }\n return httpPoller.operationState;\n },\n getResult() {\n return httpPoller.result;\n },\n toString() {\n if (!httpPoller.operationState) {\n throw new Error(\n \"Operation state is not available. The poller may not have been started and you could await submitted() before calling getOperationState().\",\n );\n }\n return JSON.stringify({\n state: httpPoller.operationState,\n });\n },\n stopPolling() {\n abortController.abort();\n },\n onProgress: httpPoller.onProgress,\n poll: httpPoller.poll,\n pollUntilDone: httpPoller.pollUntilDone,\n serialize: httpPoller.serialize,\n submitted: httpPoller.submitted,\n };\n return simplePoller;\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResult extends HttpResponse>(\n response: TResult,\n): OperationResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(\n `Status code of the response is not a number. Value: ${response.status}`,\n );\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"]}
|