@azure/arm-sitemanager 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/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +115 -0
- package/dist/browser/api/edgeContext.d.ts +19 -0
- package/dist/browser/api/edgeContext.d.ts.map +1 -0
- package/dist/browser/api/edgeContext.js +35 -0
- package/dist/browser/api/edgeContext.js.map +1 -0
- package/dist/browser/api/index.d.ts +2 -0
- package/dist/browser/api/index.d.ts.map +1 -0
- package/dist/browser/api/index.js +4 -0
- package/dist/browser/api/index.js.map +1 -0
- package/dist/browser/api/sites/index.d.ts +3 -0
- package/dist/browser/api/sites/index.d.ts.map +1 -0
- package/dist/browser/api/sites/index.js +4 -0
- package/dist/browser/api/sites/index.js.map +1 -0
- package/dist/browser/api/sites/operations.d.ts +32 -0
- package/dist/browser/api/sites/operations.d.ts.map +1 -0
- package/dist/browser/api/sites/operations.js +145 -0
- package/dist/browser/api/sites/operations.js.map +1 -0
- package/dist/browser/api/sites/options.d.ts +19 -0
- package/dist/browser/api/sites/options.d.ts.map +1 -0
- package/dist/browser/api/sites/options.js +4 -0
- package/dist/browser/api/sites/options.js.map +1 -0
- package/dist/browser/api/sitesByServiceGroup/index.d.ts +3 -0
- package/dist/browser/api/sitesByServiceGroup/index.d.ts.map +1 -0
- package/dist/browser/api/sitesByServiceGroup/index.js +4 -0
- package/dist/browser/api/sitesByServiceGroup/index.js.map +1 -0
- package/dist/browser/api/sitesByServiceGroup/operations.d.ts +32 -0
- package/dist/browser/api/sitesByServiceGroup/operations.d.ts.map +1 -0
- package/dist/browser/api/sitesByServiceGroup/operations.js +148 -0
- package/dist/browser/api/sitesByServiceGroup/operations.js.map +1 -0
- package/dist/browser/api/sitesByServiceGroup/options.d.ts +19 -0
- package/dist/browser/api/sitesByServiceGroup/options.d.ts.map +1 -0
- package/dist/browser/api/sitesByServiceGroup/options.js +4 -0
- package/dist/browser/api/sitesByServiceGroup/options.js.map +1 -0
- package/dist/browser/api/sitesBySubscription/index.d.ts +3 -0
- package/dist/browser/api/sitesBySubscription/index.d.ts.map +1 -0
- package/dist/browser/api/sitesBySubscription/index.js +4 -0
- package/dist/browser/api/sitesBySubscription/index.js.map +1 -0
- package/dist/browser/api/sitesBySubscription/operations.d.ts +32 -0
- package/dist/browser/api/sitesBySubscription/operations.d.ts.map +1 -0
- package/dist/browser/api/sitesBySubscription/operations.js +144 -0
- package/dist/browser/api/sitesBySubscription/operations.js.map +1 -0
- package/dist/browser/api/sitesBySubscription/options.d.ts +19 -0
- package/dist/browser/api/sitesBySubscription/options.d.ts.map +1 -0
- package/dist/browser/api/sitesBySubscription/options.js +4 -0
- package/dist/browser/api/sitesBySubscription/options.js.map +1 -0
- package/dist/browser/classic/index.d.ts +4 -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/sites/index.d.ts +25 -0
- package/dist/browser/classic/sites/index.d.ts.map +1 -0
- package/dist/browser/classic/sites/index.js +16 -0
- package/dist/browser/classic/sites/index.js.map +1 -0
- package/dist/browser/classic/sitesByServiceGroup/index.d.ts +25 -0
- package/dist/browser/classic/sitesByServiceGroup/index.d.ts.map +1 -0
- package/dist/browser/classic/sitesByServiceGroup/index.js +16 -0
- package/dist/browser/classic/sitesByServiceGroup/index.js.map +1 -0
- package/dist/browser/classic/sitesBySubscription/index.d.ts +25 -0
- package/dist/browser/classic/sitesBySubscription/index.d.ts.map +1 -0
- package/dist/browser/classic/sitesBySubscription/index.js +16 -0
- package/dist/browser/classic/sitesBySubscription/index.js.map +1 -0
- package/dist/browser/edgeClient.d.ts +21 -0
- package/dist/browser/edgeClient.d.ts.map +1 -0
- package/dist/browser/edgeClient.js +22 -0
- package/dist/browser/edgeClient.js.map +1 -0
- package/dist/browser/index.d.ts +11 -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 +2 -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 +184 -0
- package/dist/browser/models/models.d.ts.map +1 -0
- package/dist/browser/models/models.js +200 -0
- package/dist/browser/models/models.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/restorePollerHelpers.d.ts +21 -0
- package/dist/browser/restorePollerHelpers.d.ts.map +1 -0
- package/dist/browser/restorePollerHelpers.js +103 -0
- package/dist/browser/restorePollerHelpers.js.map +1 -0
- package/dist/browser/static-helpers/pagingHelpers.d.ts +72 -0
- package/dist/browser/static-helpers/pagingHelpers.d.ts.map +1 -0
- package/dist/browser/static-helpers/pagingHelpers.js +137 -0
- package/dist/browser/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/browser/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/browser/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/browser/static-helpers/pollingHelpers.js +76 -0
- package/dist/browser/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/browser/static-helpers/urlTemplate.d.ts +5 -0
- package/dist/browser/static-helpers/urlTemplate.d.ts.map +1 -0
- package/dist/browser/static-helpers/urlTemplate.js +169 -0
- package/dist/browser/static-helpers/urlTemplate.js.map +1 -0
- package/dist/commonjs/api/edgeContext.d.ts +19 -0
- package/dist/commonjs/api/edgeContext.d.ts.map +1 -0
- package/dist/commonjs/api/edgeContext.js +38 -0
- package/dist/commonjs/api/edgeContext.js.map +1 -0
- package/dist/commonjs/api/index.d.ts +2 -0
- package/dist/commonjs/api/index.d.ts.map +1 -0
- package/dist/commonjs/api/index.js +8 -0
- package/dist/commonjs/api/index.js.map +1 -0
- package/dist/commonjs/api/sites/index.d.ts +3 -0
- package/dist/commonjs/api/sites/index.d.ts.map +1 -0
- package/dist/commonjs/api/sites/index.js +12 -0
- package/dist/commonjs/api/sites/index.js.map +1 -0
- package/dist/commonjs/api/sites/operations.d.ts +32 -0
- package/dist/commonjs/api/sites/operations.d.ts.map +1 -0
- package/dist/commonjs/api/sites/operations.js +162 -0
- package/dist/commonjs/api/sites/operations.js.map +1 -0
- package/dist/commonjs/api/sites/options.d.ts +19 -0
- package/dist/commonjs/api/sites/options.d.ts.map +1 -0
- package/dist/commonjs/api/sites/options.js +5 -0
- package/dist/commonjs/api/sites/options.js.map +1 -0
- package/dist/commonjs/api/sitesByServiceGroup/index.d.ts +3 -0
- package/dist/commonjs/api/sitesByServiceGroup/index.d.ts.map +1 -0
- package/dist/commonjs/api/sitesByServiceGroup/index.js +12 -0
- package/dist/commonjs/api/sitesByServiceGroup/index.js.map +1 -0
- package/dist/commonjs/api/sitesByServiceGroup/operations.d.ts +32 -0
- package/dist/commonjs/api/sitesByServiceGroup/operations.d.ts.map +1 -0
- package/dist/commonjs/api/sitesByServiceGroup/operations.js +165 -0
- package/dist/commonjs/api/sitesByServiceGroup/operations.js.map +1 -0
- package/dist/commonjs/api/sitesByServiceGroup/options.d.ts +19 -0
- package/dist/commonjs/api/sitesByServiceGroup/options.d.ts.map +1 -0
- package/dist/commonjs/api/sitesByServiceGroup/options.js +5 -0
- package/dist/commonjs/api/sitesByServiceGroup/options.js.map +1 -0
- package/dist/commonjs/api/sitesBySubscription/index.d.ts +3 -0
- package/dist/commonjs/api/sitesBySubscription/index.d.ts.map +1 -0
- package/dist/commonjs/api/sitesBySubscription/index.js +12 -0
- package/dist/commonjs/api/sitesBySubscription/index.js.map +1 -0
- package/dist/commonjs/api/sitesBySubscription/operations.d.ts +32 -0
- package/dist/commonjs/api/sitesBySubscription/operations.d.ts.map +1 -0
- package/dist/commonjs/api/sitesBySubscription/operations.js +161 -0
- package/dist/commonjs/api/sitesBySubscription/operations.js.map +1 -0
- package/dist/commonjs/api/sitesBySubscription/options.d.ts +19 -0
- package/dist/commonjs/api/sitesBySubscription/options.d.ts.map +1 -0
- package/dist/commonjs/api/sitesBySubscription/options.js +5 -0
- package/dist/commonjs/api/sitesBySubscription/options.js.map +1 -0
- package/dist/commonjs/classic/index.d.ts +4 -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/sites/index.d.ts +25 -0
- package/dist/commonjs/classic/sites/index.d.ts.map +1 -0
- package/dist/commonjs/classic/sites/index.js +19 -0
- package/dist/commonjs/classic/sites/index.js.map +1 -0
- package/dist/commonjs/classic/sitesByServiceGroup/index.d.ts +25 -0
- package/dist/commonjs/classic/sitesByServiceGroup/index.d.ts.map +1 -0
- package/dist/commonjs/classic/sitesByServiceGroup/index.js +19 -0
- package/dist/commonjs/classic/sitesByServiceGroup/index.js.map +1 -0
- package/dist/commonjs/classic/sitesBySubscription/index.d.ts +25 -0
- package/dist/commonjs/classic/sitesBySubscription/index.d.ts.map +1 -0
- package/dist/commonjs/classic/sitesBySubscription/index.js +19 -0
- package/dist/commonjs/classic/sitesBySubscription/index.js.map +1 -0
- package/dist/commonjs/edgeClient.d.ts +21 -0
- package/dist/commonjs/edgeClient.d.ts.map +1 -0
- package/dist/commonjs/edgeClient.js +26 -0
- package/dist/commonjs/edgeClient.js.map +1 -0
- package/dist/commonjs/index.d.ts +11 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +14 -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 +2 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +10 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/models.d.ts +184 -0
- package/dist/commonjs/models/models.d.ts.map +1 -0
- package/dist/commonjs/models/models.js +225 -0
- package/dist/commonjs/models/models.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/restorePollerHelpers.d.ts +21 -0
- package/dist/commonjs/restorePollerHelpers.d.ts.map +1 -0
- package/dist/commonjs/restorePollerHelpers.js +106 -0
- package/dist/commonjs/restorePollerHelpers.js.map +1 -0
- package/dist/commonjs/static-helpers/pagingHelpers.d.ts +72 -0
- package/dist/commonjs/static-helpers/pagingHelpers.d.ts.map +1 -0
- package/dist/commonjs/static-helpers/pagingHelpers.js +140 -0
- package/dist/commonjs/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/commonjs/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/commonjs/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/commonjs/static-helpers/pollingHelpers.js +79 -0
- package/dist/commonjs/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/commonjs/static-helpers/urlTemplate.d.ts +5 -0
- package/dist/commonjs/static-helpers/urlTemplate.d.ts.map +1 -0
- package/dist/commonjs/static-helpers/urlTemplate.js +172 -0
- package/dist/commonjs/static-helpers/urlTemplate.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/api/edgeContext.d.ts +19 -0
- package/dist/esm/api/edgeContext.d.ts.map +1 -0
- package/dist/esm/api/edgeContext.js +35 -0
- package/dist/esm/api/edgeContext.js.map +1 -0
- package/dist/esm/api/index.d.ts +2 -0
- package/dist/esm/api/index.d.ts.map +1 -0
- package/dist/esm/api/index.js +4 -0
- package/dist/esm/api/index.js.map +1 -0
- package/dist/esm/api/sites/index.d.ts +3 -0
- package/dist/esm/api/sites/index.d.ts.map +1 -0
- package/dist/esm/api/sites/index.js +4 -0
- package/dist/esm/api/sites/index.js.map +1 -0
- package/dist/esm/api/sites/operations.d.ts +32 -0
- package/dist/esm/api/sites/operations.d.ts.map +1 -0
- package/dist/esm/api/sites/operations.js +145 -0
- package/dist/esm/api/sites/operations.js.map +1 -0
- package/dist/esm/api/sites/options.d.ts +19 -0
- package/dist/esm/api/sites/options.d.ts.map +1 -0
- package/dist/esm/api/sites/options.js +4 -0
- package/dist/esm/api/sites/options.js.map +1 -0
- package/dist/esm/api/sitesByServiceGroup/index.d.ts +3 -0
- package/dist/esm/api/sitesByServiceGroup/index.d.ts.map +1 -0
- package/dist/esm/api/sitesByServiceGroup/index.js +4 -0
- package/dist/esm/api/sitesByServiceGroup/index.js.map +1 -0
- package/dist/esm/api/sitesByServiceGroup/operations.d.ts +32 -0
- package/dist/esm/api/sitesByServiceGroup/operations.d.ts.map +1 -0
- package/dist/esm/api/sitesByServiceGroup/operations.js +148 -0
- package/dist/esm/api/sitesByServiceGroup/operations.js.map +1 -0
- package/dist/esm/api/sitesByServiceGroup/options.d.ts +19 -0
- package/dist/esm/api/sitesByServiceGroup/options.d.ts.map +1 -0
- package/dist/esm/api/sitesByServiceGroup/options.js +4 -0
- package/dist/esm/api/sitesByServiceGroup/options.js.map +1 -0
- package/dist/esm/api/sitesBySubscription/index.d.ts +3 -0
- package/dist/esm/api/sitesBySubscription/index.d.ts.map +1 -0
- package/dist/esm/api/sitesBySubscription/index.js +4 -0
- package/dist/esm/api/sitesBySubscription/index.js.map +1 -0
- package/dist/esm/api/sitesBySubscription/operations.d.ts +32 -0
- package/dist/esm/api/sitesBySubscription/operations.d.ts.map +1 -0
- package/dist/esm/api/sitesBySubscription/operations.js +144 -0
- package/dist/esm/api/sitesBySubscription/operations.js.map +1 -0
- package/dist/esm/api/sitesBySubscription/options.d.ts +19 -0
- package/dist/esm/api/sitesBySubscription/options.d.ts.map +1 -0
- package/dist/esm/api/sitesBySubscription/options.js +4 -0
- package/dist/esm/api/sitesBySubscription/options.js.map +1 -0
- package/dist/esm/classic/index.d.ts +4 -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/sites/index.d.ts +25 -0
- package/dist/esm/classic/sites/index.d.ts.map +1 -0
- package/dist/esm/classic/sites/index.js +16 -0
- package/dist/esm/classic/sites/index.js.map +1 -0
- package/dist/esm/classic/sitesByServiceGroup/index.d.ts +25 -0
- package/dist/esm/classic/sitesByServiceGroup/index.d.ts.map +1 -0
- package/dist/esm/classic/sitesByServiceGroup/index.js +16 -0
- package/dist/esm/classic/sitesByServiceGroup/index.js.map +1 -0
- package/dist/esm/classic/sitesBySubscription/index.d.ts +25 -0
- package/dist/esm/classic/sitesBySubscription/index.d.ts.map +1 -0
- package/dist/esm/classic/sitesBySubscription/index.js +16 -0
- package/dist/esm/classic/sitesBySubscription/index.js.map +1 -0
- package/dist/esm/edgeClient.d.ts +21 -0
- package/dist/esm/edgeClient.d.ts.map +1 -0
- package/dist/esm/edgeClient.js +22 -0
- package/dist/esm/edgeClient.js.map +1 -0
- package/dist/esm/index.d.ts +11 -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 +2 -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 +184 -0
- package/dist/esm/models/models.d.ts.map +1 -0
- package/dist/esm/models/models.js +200 -0
- package/dist/esm/models/models.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/restorePollerHelpers.d.ts +21 -0
- package/dist/esm/restorePollerHelpers.d.ts.map +1 -0
- package/dist/esm/restorePollerHelpers.js +103 -0
- package/dist/esm/restorePollerHelpers.js.map +1 -0
- package/dist/esm/static-helpers/pagingHelpers.d.ts +72 -0
- package/dist/esm/static-helpers/pagingHelpers.d.ts.map +1 -0
- package/dist/esm/static-helpers/pagingHelpers.js +137 -0
- package/dist/esm/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/esm/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/esm/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/esm/static-helpers/pollingHelpers.js +76 -0
- package/dist/esm/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/esm/static-helpers/urlTemplate.d.ts +5 -0
- package/dist/esm/static-helpers/urlTemplate.d.ts.map +1 -0
- package/dist/esm/static-helpers/urlTemplate.js +169 -0
- package/dist/esm/static-helpers/urlTemplate.js.map +1 -0
- package/dist/react-native/api/edgeContext.d.ts +19 -0
- package/dist/react-native/api/edgeContext.d.ts.map +1 -0
- package/dist/react-native/api/edgeContext.js +35 -0
- package/dist/react-native/api/edgeContext.js.map +1 -0
- package/dist/react-native/api/index.d.ts +2 -0
- package/dist/react-native/api/index.d.ts.map +1 -0
- package/dist/react-native/api/index.js +4 -0
- package/dist/react-native/api/index.js.map +1 -0
- package/dist/react-native/api/sites/index.d.ts +3 -0
- package/dist/react-native/api/sites/index.d.ts.map +1 -0
- package/dist/react-native/api/sites/index.js +4 -0
- package/dist/react-native/api/sites/index.js.map +1 -0
- package/dist/react-native/api/sites/operations.d.ts +32 -0
- package/dist/react-native/api/sites/operations.d.ts.map +1 -0
- package/dist/react-native/api/sites/operations.js +145 -0
- package/dist/react-native/api/sites/operations.js.map +1 -0
- package/dist/react-native/api/sites/options.d.ts +19 -0
- package/dist/react-native/api/sites/options.d.ts.map +1 -0
- package/dist/react-native/api/sites/options.js +4 -0
- package/dist/react-native/api/sites/options.js.map +1 -0
- package/dist/react-native/api/sitesByServiceGroup/index.d.ts +3 -0
- package/dist/react-native/api/sitesByServiceGroup/index.d.ts.map +1 -0
- package/dist/react-native/api/sitesByServiceGroup/index.js +4 -0
- package/dist/react-native/api/sitesByServiceGroup/index.js.map +1 -0
- package/dist/react-native/api/sitesByServiceGroup/operations.d.ts +32 -0
- package/dist/react-native/api/sitesByServiceGroup/operations.d.ts.map +1 -0
- package/dist/react-native/api/sitesByServiceGroup/operations.js +148 -0
- package/dist/react-native/api/sitesByServiceGroup/operations.js.map +1 -0
- package/dist/react-native/api/sitesByServiceGroup/options.d.ts +19 -0
- package/dist/react-native/api/sitesByServiceGroup/options.d.ts.map +1 -0
- package/dist/react-native/api/sitesByServiceGroup/options.js +4 -0
- package/dist/react-native/api/sitesByServiceGroup/options.js.map +1 -0
- package/dist/react-native/api/sitesBySubscription/index.d.ts +3 -0
- package/dist/react-native/api/sitesBySubscription/index.d.ts.map +1 -0
- package/dist/react-native/api/sitesBySubscription/index.js +4 -0
- package/dist/react-native/api/sitesBySubscription/index.js.map +1 -0
- package/dist/react-native/api/sitesBySubscription/operations.d.ts +32 -0
- package/dist/react-native/api/sitesBySubscription/operations.d.ts.map +1 -0
- package/dist/react-native/api/sitesBySubscription/operations.js +144 -0
- package/dist/react-native/api/sitesBySubscription/operations.js.map +1 -0
- package/dist/react-native/api/sitesBySubscription/options.d.ts +19 -0
- package/dist/react-native/api/sitesBySubscription/options.d.ts.map +1 -0
- package/dist/react-native/api/sitesBySubscription/options.js +4 -0
- package/dist/react-native/api/sitesBySubscription/options.js.map +1 -0
- package/dist/react-native/classic/index.d.ts +4 -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/sites/index.d.ts +25 -0
- package/dist/react-native/classic/sites/index.d.ts.map +1 -0
- package/dist/react-native/classic/sites/index.js +16 -0
- package/dist/react-native/classic/sites/index.js.map +1 -0
- package/dist/react-native/classic/sitesByServiceGroup/index.d.ts +25 -0
- package/dist/react-native/classic/sitesByServiceGroup/index.d.ts.map +1 -0
- package/dist/react-native/classic/sitesByServiceGroup/index.js +16 -0
- package/dist/react-native/classic/sitesByServiceGroup/index.js.map +1 -0
- package/dist/react-native/classic/sitesBySubscription/index.d.ts +25 -0
- package/dist/react-native/classic/sitesBySubscription/index.d.ts.map +1 -0
- package/dist/react-native/classic/sitesBySubscription/index.js +16 -0
- package/dist/react-native/classic/sitesBySubscription/index.js.map +1 -0
- package/dist/react-native/edgeClient.d.ts +21 -0
- package/dist/react-native/edgeClient.d.ts.map +1 -0
- package/dist/react-native/edgeClient.js +22 -0
- package/dist/react-native/edgeClient.js.map +1 -0
- package/dist/react-native/index.d.ts +11 -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 +2 -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 +184 -0
- package/dist/react-native/models/models.d.ts.map +1 -0
- package/dist/react-native/models/models.js +200 -0
- package/dist/react-native/models/models.js.map +1 -0
- package/dist/react-native/package.json +3 -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 +103 -0
- package/dist/react-native/restorePollerHelpers.js.map +1 -0
- package/dist/react-native/static-helpers/pagingHelpers.d.ts +72 -0
- package/dist/react-native/static-helpers/pagingHelpers.d.ts.map +1 -0
- package/dist/react-native/static-helpers/pagingHelpers.js +137 -0
- package/dist/react-native/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/react-native/static-helpers/pollingHelpers.d.ts +30 -0
- package/dist/react-native/static-helpers/pollingHelpers.d.ts.map +1 -0
- package/dist/react-native/static-helpers/pollingHelpers.js +76 -0
- package/dist/react-native/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/react-native/static-helpers/urlTemplate.d.ts +5 -0
- package/dist/react-native/static-helpers/urlTemplate.d.ts.map +1 -0
- package/dist/react-native/static-helpers/urlTemplate.js +169 -0
- package/dist/react-native/static-helpers/urlTemplate.js.map +1 -0
- package/package.json +232 -0
- package/review/arm-sitemanager-api-sites.api.md +50 -0
- package/review/arm-sitemanager-api-sitesByServiceGroup.api.md +50 -0
- package/review/arm-sitemanager-api-sitesBySubscription.api.md +50 -0
- package/review/arm-sitemanager-api.api.md +27 -0
- package/review/arm-sitemanager-models.api.md +115 -0
- package/review/arm-sitemanager.api.md +255 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.KnownVersions = exports.KnownCreatedByType = exports.KnownResourceProvisioningState = void 0;
|
|
6
|
+
exports.siteSerializer = siteSerializer;
|
|
7
|
+
exports.siteDeserializer = siteDeserializer;
|
|
8
|
+
exports.sitePropertiesSerializer = sitePropertiesSerializer;
|
|
9
|
+
exports.sitePropertiesDeserializer = sitePropertiesDeserializer;
|
|
10
|
+
exports.siteAddressPropertiesSerializer = siteAddressPropertiesSerializer;
|
|
11
|
+
exports.siteAddressPropertiesDeserializer = siteAddressPropertiesDeserializer;
|
|
12
|
+
exports.proxyResourceSerializer = proxyResourceSerializer;
|
|
13
|
+
exports.proxyResourceDeserializer = proxyResourceDeserializer;
|
|
14
|
+
exports.resourceSerializer = resourceSerializer;
|
|
15
|
+
exports.resourceDeserializer = resourceDeserializer;
|
|
16
|
+
exports.systemDataDeserializer = systemDataDeserializer;
|
|
17
|
+
exports.errorResponseDeserializer = errorResponseDeserializer;
|
|
18
|
+
exports.errorDetailDeserializer = errorDetailDeserializer;
|
|
19
|
+
exports.errorDetailArrayDeserializer = errorDetailArrayDeserializer;
|
|
20
|
+
exports.errorAdditionalInfoArrayDeserializer = errorAdditionalInfoArrayDeserializer;
|
|
21
|
+
exports.errorAdditionalInfoDeserializer = errorAdditionalInfoDeserializer;
|
|
22
|
+
exports._errorAdditionalInfoInfoDeserializer = _errorAdditionalInfoInfoDeserializer;
|
|
23
|
+
exports.siteUpdateSerializer = siteUpdateSerializer;
|
|
24
|
+
exports.siteUpdatePropertiesSerializer = siteUpdatePropertiesSerializer;
|
|
25
|
+
exports._siteListResultDeserializer = _siteListResultDeserializer;
|
|
26
|
+
exports.siteArraySerializer = siteArraySerializer;
|
|
27
|
+
exports.siteArrayDeserializer = siteArrayDeserializer;
|
|
28
|
+
function siteSerializer(item) {
|
|
29
|
+
return {
|
|
30
|
+
properties: !item["properties"]
|
|
31
|
+
? item["properties"]
|
|
32
|
+
: sitePropertiesSerializer(item["properties"]),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function siteDeserializer(item) {
|
|
36
|
+
return {
|
|
37
|
+
id: item["id"],
|
|
38
|
+
name: item["name"],
|
|
39
|
+
type: item["type"],
|
|
40
|
+
systemData: !item["systemData"]
|
|
41
|
+
? item["systemData"]
|
|
42
|
+
: systemDataDeserializer(item["systemData"]),
|
|
43
|
+
properties: !item["properties"]
|
|
44
|
+
? item["properties"]
|
|
45
|
+
: sitePropertiesDeserializer(item["properties"]),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function sitePropertiesSerializer(item) {
|
|
49
|
+
return {
|
|
50
|
+
displayName: item["displayName"],
|
|
51
|
+
description: item["description"],
|
|
52
|
+
siteAddress: !item["siteAddress"]
|
|
53
|
+
? item["siteAddress"]
|
|
54
|
+
: siteAddressPropertiesSerializer(item["siteAddress"]),
|
|
55
|
+
labels: item["labels"],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function sitePropertiesDeserializer(item) {
|
|
59
|
+
return {
|
|
60
|
+
displayName: item["displayName"],
|
|
61
|
+
description: item["description"],
|
|
62
|
+
siteAddress: !item["siteAddress"]
|
|
63
|
+
? item["siteAddress"]
|
|
64
|
+
: siteAddressPropertiesDeserializer(item["siteAddress"]),
|
|
65
|
+
labels: item["labels"],
|
|
66
|
+
provisioningState: item["provisioningState"],
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function siteAddressPropertiesSerializer(item) {
|
|
70
|
+
return {
|
|
71
|
+
streetAddress1: item["streetAddress1"],
|
|
72
|
+
streetAddress2: item["streetAddress2"],
|
|
73
|
+
city: item["city"],
|
|
74
|
+
stateOrProvince: item["stateOrProvince"],
|
|
75
|
+
country: item["country"],
|
|
76
|
+
postalCode: item["postalCode"],
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function siteAddressPropertiesDeserializer(item) {
|
|
80
|
+
return {
|
|
81
|
+
streetAddress1: item["streetAddress1"],
|
|
82
|
+
streetAddress2: item["streetAddress2"],
|
|
83
|
+
city: item["city"],
|
|
84
|
+
stateOrProvince: item["stateOrProvince"],
|
|
85
|
+
country: item["country"],
|
|
86
|
+
postalCode: item["postalCode"],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/** The provisioning state of a resource type. */
|
|
90
|
+
var KnownResourceProvisioningState;
|
|
91
|
+
(function (KnownResourceProvisioningState) {
|
|
92
|
+
/** Resource has been created. */
|
|
93
|
+
KnownResourceProvisioningState["Succeeded"] = "Succeeded";
|
|
94
|
+
/** Resource creation failed. */
|
|
95
|
+
KnownResourceProvisioningState["Failed"] = "Failed";
|
|
96
|
+
/** Resource creation was canceled. */
|
|
97
|
+
KnownResourceProvisioningState["Canceled"] = "Canceled";
|
|
98
|
+
})(KnownResourceProvisioningState || (exports.KnownResourceProvisioningState = KnownResourceProvisioningState = {}));
|
|
99
|
+
function proxyResourceSerializer(item) {
|
|
100
|
+
return item;
|
|
101
|
+
}
|
|
102
|
+
function proxyResourceDeserializer(item) {
|
|
103
|
+
return {
|
|
104
|
+
id: item["id"],
|
|
105
|
+
name: item["name"],
|
|
106
|
+
type: item["type"],
|
|
107
|
+
systemData: !item["systemData"]
|
|
108
|
+
? item["systemData"]
|
|
109
|
+
: systemDataDeserializer(item["systemData"]),
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function resourceSerializer(item) {
|
|
113
|
+
return item;
|
|
114
|
+
}
|
|
115
|
+
function resourceDeserializer(item) {
|
|
116
|
+
return {
|
|
117
|
+
id: item["id"],
|
|
118
|
+
name: item["name"],
|
|
119
|
+
type: item["type"],
|
|
120
|
+
systemData: !item["systemData"]
|
|
121
|
+
? item["systemData"]
|
|
122
|
+
: systemDataDeserializer(item["systemData"]),
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function systemDataDeserializer(item) {
|
|
126
|
+
return {
|
|
127
|
+
createdBy: item["createdBy"],
|
|
128
|
+
createdByType: item["createdByType"],
|
|
129
|
+
createdAt: !item["createdAt"] ? item["createdAt"] : new Date(item["createdAt"]),
|
|
130
|
+
lastModifiedBy: item["lastModifiedBy"],
|
|
131
|
+
lastModifiedByType: item["lastModifiedByType"],
|
|
132
|
+
lastModifiedAt: !item["lastModifiedAt"]
|
|
133
|
+
? item["lastModifiedAt"]
|
|
134
|
+
: new Date(item["lastModifiedAt"]),
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
/** The kind of entity that created the resource. */
|
|
138
|
+
var KnownCreatedByType;
|
|
139
|
+
(function (KnownCreatedByType) {
|
|
140
|
+
/** The entity was created by a user. */
|
|
141
|
+
KnownCreatedByType["User"] = "User";
|
|
142
|
+
/** The entity was created by an application. */
|
|
143
|
+
KnownCreatedByType["Application"] = "Application";
|
|
144
|
+
/** The entity was created by a managed identity. */
|
|
145
|
+
KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
|
|
146
|
+
/** The entity was created by a key. */
|
|
147
|
+
KnownCreatedByType["Key"] = "Key";
|
|
148
|
+
})(KnownCreatedByType || (exports.KnownCreatedByType = KnownCreatedByType = {}));
|
|
149
|
+
function errorResponseDeserializer(item) {
|
|
150
|
+
return {
|
|
151
|
+
error: !item["error"] ? item["error"] : errorDetailDeserializer(item["error"]),
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function errorDetailDeserializer(item) {
|
|
155
|
+
return {
|
|
156
|
+
code: item["code"],
|
|
157
|
+
message: item["message"],
|
|
158
|
+
target: item["target"],
|
|
159
|
+
details: !item["details"] ? item["details"] : errorDetailArrayDeserializer(item["details"]),
|
|
160
|
+
additionalInfo: !item["additionalInfo"]
|
|
161
|
+
? item["additionalInfo"]
|
|
162
|
+
: errorAdditionalInfoArrayDeserializer(item["additionalInfo"]),
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
function errorDetailArrayDeserializer(result) {
|
|
166
|
+
return result.map((item) => {
|
|
167
|
+
return errorDetailDeserializer(item);
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
function errorAdditionalInfoArrayDeserializer(result) {
|
|
171
|
+
return result.map((item) => {
|
|
172
|
+
return errorAdditionalInfoDeserializer(item);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function errorAdditionalInfoDeserializer(item) {
|
|
176
|
+
return {
|
|
177
|
+
type: item["type"],
|
|
178
|
+
info: !item["info"] ? item["info"] : _errorAdditionalInfoInfoDeserializer(item["info"]),
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
function _errorAdditionalInfoInfoDeserializer(item) {
|
|
182
|
+
return item;
|
|
183
|
+
}
|
|
184
|
+
function siteUpdateSerializer(item) {
|
|
185
|
+
return {
|
|
186
|
+
properties: !item["properties"]
|
|
187
|
+
? item["properties"]
|
|
188
|
+
: siteUpdatePropertiesSerializer(item["properties"]),
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
function siteUpdatePropertiesSerializer(item) {
|
|
192
|
+
return {
|
|
193
|
+
displayName: item["displayName"],
|
|
194
|
+
description: item["description"],
|
|
195
|
+
siteAddress: !item["siteAddress"]
|
|
196
|
+
? item["siteAddress"]
|
|
197
|
+
: siteAddressPropertiesSerializer(item["siteAddress"]),
|
|
198
|
+
labels: item["labels"],
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
function _siteListResultDeserializer(item) {
|
|
202
|
+
return {
|
|
203
|
+
value: siteArrayDeserializer(item["value"]),
|
|
204
|
+
nextLink: item["nextLink"],
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
function siteArraySerializer(result) {
|
|
208
|
+
return result.map((item) => {
|
|
209
|
+
return siteSerializer(item);
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
function siteArrayDeserializer(result) {
|
|
213
|
+
return result.map((item) => {
|
|
214
|
+
return siteDeserializer(item);
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
/** Supported API Versions */
|
|
218
|
+
var KnownVersions;
|
|
219
|
+
(function (KnownVersions) {
|
|
220
|
+
/** API Version - 2024-02-01-preview */
|
|
221
|
+
KnownVersions["V20240201Preview"] = "2024-02-01-preview";
|
|
222
|
+
/** API Version - 2025-03-01-preview */
|
|
223
|
+
KnownVersions["V20250301Preview"] = "2025-03-01-preview";
|
|
224
|
+
})(KnownVersions || (exports.KnownVersions = KnownVersions = {}));
|
|
225
|
+
//# sourceMappingURL=models.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAQlC,wCAMC;AAED,4CAYC;AAgBD,4DASC;AAED,gEAUC;AAkBD,0EASC;AAED,8EASC;AA0BD,0DAEC;AAED,8DASC;AAcD,gDAEC;AAED,oDASC;AAkBD,wDAWC;AAgCD,8DAIC;AAgBD,0DAUC;AAED,oEAIC;AAED,oFAIC;AAUD,0EAKC;AAKD,oFAEC;AAQD,oDAMC;AAcD,wEASC;AAUD,kEAKC;AAED,kDAIC;AAED,sDAIC;AA9VD,SAAgB,cAAc,CAAC,IAAU;IACvC,OAAO;QACL,UAAU,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC;YAC7B,CAAC,CAAC,IAAI,CAAC,YAAY,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AAC;IAC9B,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,qBAAqB,CAAC,MAAmB;IACvD,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACzB,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC;AAED,6BAA6B;AAC7B,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,uCAAuC;IACvC,wDAAuC,CAAA;IACvC,uCAAuC;IACvC,wDAAuC,CAAA;AACzC,CAAC,EALW,aAAa,6BAAb,aAAa,QAKxB","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** Site as ARM Resource */\nexport interface Site extends ProxyResource {\n /** The resource-specific properties for this resource. */\n properties?: SiteProperties;\n}\n\nexport function siteSerializer(item: Site): any {\n return {\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : sitePropertiesSerializer(item[\"properties\"]),\n };\n}\n\nexport function siteDeserializer(item: any): Site {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : sitePropertiesDeserializer(item[\"properties\"]),\n };\n}\n\n/** Site properties */\nexport interface SiteProperties {\n /** displayName of Site resource */\n displayName?: string;\n /** Description of Site resource */\n description?: string;\n /** Physical address of the site */\n siteAddress?: SiteAddressProperties;\n /** Key-value pairs for labeling the site resource. */\n labels?: Record<string, string>;\n /** Provisioning state of last operation */\n readonly provisioningState?: ResourceProvisioningState;\n}\n\nexport function sitePropertiesSerializer(item: SiteProperties): any {\n return {\n displayName: item[\"displayName\"],\n description: item[\"description\"],\n siteAddress: !item[\"siteAddress\"]\n ? item[\"siteAddress\"]\n : siteAddressPropertiesSerializer(item[\"siteAddress\"]),\n labels: item[\"labels\"],\n };\n}\n\nexport function sitePropertiesDeserializer(item: any): SiteProperties {\n return {\n displayName: item[\"displayName\"],\n description: item[\"description\"],\n siteAddress: !item[\"siteAddress\"]\n ? item[\"siteAddress\"]\n : siteAddressPropertiesDeserializer(item[\"siteAddress\"]),\n labels: item[\"labels\"],\n provisioningState: item[\"provisioningState\"],\n };\n}\n\n/** Site address properties */\nexport interface SiteAddressProperties {\n /** First line of the street address */\n streetAddress1?: string;\n /** Second line of the street address */\n streetAddress2?: string;\n /** City of the address */\n city?: string;\n /** State or province of the address */\n stateOrProvince?: string;\n /** Country of the address */\n country?: string;\n /** Postal or ZIP code of the address */\n postalCode?: string;\n}\n\nexport function siteAddressPropertiesSerializer(item: SiteAddressProperties): any {\n return {\n streetAddress1: item[\"streetAddress1\"],\n streetAddress2: item[\"streetAddress2\"],\n city: item[\"city\"],\n stateOrProvince: item[\"stateOrProvince\"],\n country: item[\"country\"],\n postalCode: item[\"postalCode\"],\n };\n}\n\nexport function siteAddressPropertiesDeserializer(item: any): SiteAddressProperties {\n return {\n streetAddress1: item[\"streetAddress1\"],\n streetAddress2: item[\"streetAddress2\"],\n city: item[\"city\"],\n stateOrProvince: item[\"stateOrProvince\"],\n country: item[\"country\"],\n postalCode: item[\"postalCode\"],\n };\n}\n\n/** The provisioning state of a resource type. */\nexport enum KnownResourceProvisioningState {\n /** Resource has been created. */\n Succeeded = \"Succeeded\",\n /** Resource creation failed. */\n Failed = \"Failed\",\n /** Resource creation was canceled. */\n Canceled = \"Canceled\",\n}\n\n/**\n * The provisioning state of a resource type. \\\n * {@link KnownResourceProvisioningState} can be used interchangeably with ResourceProvisioningState,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Succeeded**: Resource has been created. \\\n * **Failed**: Resource creation failed. \\\n * **Canceled**: Resource creation was canceled.\n */\nexport type ResourceProvisioningState = string;\n\n/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */\nexport interface ProxyResource extends Resource {}\n\nexport function proxyResourceSerializer(item: ProxyResource): any {\n return item;\n}\n\nexport function proxyResourceDeserializer(item: any): ProxyResource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n };\n}\n\n/** Common fields that are returned in the response for all Azure Resource Manager resources */\nexport interface Resource {\n /** Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} */\n readonly id?: string;\n /** The name of the resource */\n readonly name?: string;\n /** The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\" */\n readonly type?: string;\n /** Azure Resource Manager metadata containing createdBy and modifiedBy information. */\n readonly systemData?: SystemData;\n}\n\nexport function resourceSerializer(item: Resource): any {\n return item;\n}\n\nexport function resourceDeserializer(item: any): Resource {\n return {\n id: item[\"id\"],\n name: item[\"name\"],\n type: item[\"type\"],\n systemData: !item[\"systemData\"]\n ? item[\"systemData\"]\n : systemDataDeserializer(item[\"systemData\"]),\n };\n}\n\n/** Metadata pertaining to creation and last modification of the resource. */\nexport interface SystemData {\n /** The identity that created the resource. */\n createdBy?: string;\n /** The type of identity that created the resource. */\n createdByType?: CreatedByType;\n /** The timestamp of resource creation (UTC). */\n createdAt?: Date;\n /** The identity that last modified the resource. */\n lastModifiedBy?: string;\n /** The type of identity that last modified the resource. */\n lastModifiedByType?: CreatedByType;\n /** The timestamp of resource last modification (UTC) */\n lastModifiedAt?: Date;\n}\n\nexport function systemDataDeserializer(item: any): SystemData {\n return {\n createdBy: item[\"createdBy\"],\n createdByType: item[\"createdByType\"],\n createdAt: !item[\"createdAt\"] ? item[\"createdAt\"] : new Date(item[\"createdAt\"]),\n lastModifiedBy: item[\"lastModifiedBy\"],\n lastModifiedByType: item[\"lastModifiedByType\"],\n lastModifiedAt: !item[\"lastModifiedAt\"]\n ? item[\"lastModifiedAt\"]\n : new Date(item[\"lastModifiedAt\"]),\n };\n}\n\n/** The kind of entity that created the resource. */\nexport enum KnownCreatedByType {\n /** The entity was created by a user. */\n User = \"User\",\n /** The entity was created by an application. */\n Application = \"Application\",\n /** The entity was created by a managed identity. */\n ManagedIdentity = \"ManagedIdentity\",\n /** The entity was created by a key. */\n Key = \"Key\",\n}\n\n/**\n * The kind of entity that created the resource. \\\n * {@link KnowncreatedByType} can be used interchangeably with createdByType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **User**: The entity was created by a user. \\\n * **Application**: The entity was created by an application. \\\n * **ManagedIdentity**: The entity was created by a managed identity. \\\n * **Key**: The entity was created by a key.\n */\nexport type CreatedByType = string;\n\n/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. */\nexport interface ErrorResponse {\n /** The error object. */\n error?: ErrorDetail;\n}\n\nexport function errorResponseDeserializer(item: any): ErrorResponse {\n return {\n error: !item[\"error\"] ? item[\"error\"] : errorDetailDeserializer(item[\"error\"]),\n };\n}\n\n/** The error detail. */\nexport interface ErrorDetail {\n /** The error code. */\n readonly code?: string;\n /** The error message. */\n readonly message?: string;\n /** The error target. */\n readonly target?: string;\n /** The error details. */\n readonly details?: ErrorDetail[];\n /** The error additional info. */\n readonly additionalInfo?: ErrorAdditionalInfo[];\n}\n\nexport function errorDetailDeserializer(item: any): ErrorDetail {\n return {\n code: item[\"code\"],\n message: item[\"message\"],\n target: item[\"target\"],\n details: !item[\"details\"] ? item[\"details\"] : errorDetailArrayDeserializer(item[\"details\"]),\n additionalInfo: !item[\"additionalInfo\"]\n ? item[\"additionalInfo\"]\n : errorAdditionalInfoArrayDeserializer(item[\"additionalInfo\"]),\n };\n}\n\nexport function errorDetailArrayDeserializer(result: Array<ErrorDetail>): any[] {\n return result.map((item) => {\n return errorDetailDeserializer(item);\n });\n}\n\nexport function errorAdditionalInfoArrayDeserializer(result: Array<ErrorAdditionalInfo>): any[] {\n return result.map((item) => {\n return errorAdditionalInfoDeserializer(item);\n });\n}\n\n/** The resource management error additional info. */\nexport interface ErrorAdditionalInfo {\n /** The additional info type. */\n readonly type?: string;\n /** The additional info. */\n readonly info?: Record<string, any>;\n}\n\nexport function errorAdditionalInfoDeserializer(item: any): ErrorAdditionalInfo {\n return {\n type: item[\"type\"],\n info: !item[\"info\"] ? item[\"info\"] : _errorAdditionalInfoInfoDeserializer(item[\"info\"]),\n };\n}\n\n/** model interface _ErrorAdditionalInfoInfo */\nexport interface _ErrorAdditionalInfoInfo {}\n\nexport function _errorAdditionalInfoInfoDeserializer(item: any): _ErrorAdditionalInfoInfo {\n return item;\n}\n\n/** The type used for update operations of the Site. */\nexport interface SiteUpdate {\n /** The updatable properties of the Site. */\n properties?: SiteUpdateProperties;\n}\n\nexport function siteUpdateSerializer(item: SiteUpdate): any {\n return {\n properties: !item[\"properties\"]\n ? item[\"properties\"]\n : siteUpdatePropertiesSerializer(item[\"properties\"]),\n };\n}\n\n/** The updatable properties of the Site. */\nexport interface SiteUpdateProperties {\n /** displayName of Site resource */\n displayName?: string;\n /** Description of Site resource */\n description?: string;\n /** Physical address of the site */\n siteAddress?: SiteAddressProperties;\n /** Key-value pairs for labeling the site resource. */\n labels?: Record<string, string>;\n}\n\nexport function siteUpdatePropertiesSerializer(item: SiteUpdateProperties): any {\n return {\n displayName: item[\"displayName\"],\n description: item[\"description\"],\n siteAddress: !item[\"siteAddress\"]\n ? item[\"siteAddress\"]\n : siteAddressPropertiesSerializer(item[\"siteAddress\"]),\n labels: item[\"labels\"],\n };\n}\n\n/** The response of a Site list operation. */\nexport interface _SiteListResult {\n /** The Site items on this page */\n value: Site[];\n /** The link to the next page of items */\n nextLink?: string;\n}\n\nexport function _siteListResultDeserializer(item: any): _SiteListResult {\n return {\n value: siteArrayDeserializer(item[\"value\"]),\n nextLink: item[\"nextLink\"],\n };\n}\n\nexport function siteArraySerializer(result: Array<Site>): any[] {\n return result.map((item) => {\n return siteSerializer(item);\n });\n}\n\nexport function siteArrayDeserializer(result: Array<Site>): any[] {\n return result.map((item) => {\n return siteDeserializer(item);\n });\n}\n\n/** Supported API Versions */\nexport enum KnownVersions {\n /** API Version - 2024-02-01-preview */\n V20240201Preview = \"2024-02-01-preview\",\n /** API Version - 2025-03-01-preview */\n V20250301Preview = \"2025-03-01-preview\",\n}\n"]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EdgeClient } from "./edgeClient.js";
|
|
2
|
+
import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client";
|
|
3
|
+
import { AbortSignalLike } from "@azure/abort-controller";
|
|
4
|
+
import { PollerLike, OperationState } from "@azure/core-lro";
|
|
5
|
+
export interface RestorePollerOptions<TResult, TResponse extends PathUncheckedResponse = PathUncheckedResponse> extends OperationOptions {
|
|
6
|
+
/** Delay to wait until next poll, in milliseconds. */
|
|
7
|
+
updateIntervalInMs?: number;
|
|
8
|
+
/**
|
|
9
|
+
* The signal which can be used to abort requests.
|
|
10
|
+
*/
|
|
11
|
+
abortSignal?: AbortSignalLike;
|
|
12
|
+
/** Deserialization function for raw response body */
|
|
13
|
+
processResponseBody?: (result: TResponse) => Promise<TResult>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Creates a poller from the serialized state of another poller. This can be
|
|
17
|
+
* useful when you want to create pollers on a different host or a poller
|
|
18
|
+
* needs to be constructed after the original one is not in scope.
|
|
19
|
+
*/
|
|
20
|
+
export declare function restorePoller<TResponse extends PathUncheckedResponse, TResult>(client: EdgeClient, serializedState: string, sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>, options?: RestorePollerOptions<TResult>): PollerLike<OperationState<TResult>, TResult>;
|
|
21
|
+
//# sourceMappingURL=restorePollerHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restorePollerHelpers.d.ts","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAK7C,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,UAAU,EACV,cAAc,EAGf,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,oBAAoB,CACnC,OAAO,EACP,SAAS,SAAS,qBAAqB,GAAG,qBAAqB,CAC/D,SAAQ,gBAAgB;IACxB,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,qDAAqD;IACrD,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC/D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,SAAS,qBAAqB,EAAE,OAAO,EAC5E,MAAM,EAAE,UAAU,EAClB,eAAe,EAAE,MAAM,EACvB,eAAe,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,EACjF,OAAO,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,GACtC,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CA+B9C"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.restorePoller = restorePoller;
|
|
6
|
+
const operations_js_1 = require("./api/sitesByServiceGroup/operations.js");
|
|
7
|
+
const operations_js_2 = require("./api/sitesBySubscription/operations.js");
|
|
8
|
+
const operations_js_3 = require("./api/sites/operations.js");
|
|
9
|
+
const pollingHelpers_js_1 = require("./static-helpers/pollingHelpers.js");
|
|
10
|
+
const core_lro_1 = require("@azure/core-lro");
|
|
11
|
+
/**
|
|
12
|
+
* Creates a poller from the serialized state of another poller. This can be
|
|
13
|
+
* useful when you want to create pollers on a different host or a poller
|
|
14
|
+
* needs to be constructed after the original one is not in scope.
|
|
15
|
+
*/
|
|
16
|
+
function restorePoller(client, serializedState, sourceOperation, options) {
|
|
17
|
+
var _a, _b, _c;
|
|
18
|
+
const pollerConfig = (0, core_lro_1.deserializeState)(serializedState).config;
|
|
19
|
+
const { initialRequestUrl, requestMethod, metadata } = pollerConfig;
|
|
20
|
+
if (!initialRequestUrl || !requestMethod) {
|
|
21
|
+
throw new Error(`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation === null || sourceOperation === void 0 ? void 0 : sourceOperation.name}`);
|
|
22
|
+
}
|
|
23
|
+
const resourceLocationConfig = metadata === null || metadata === void 0 ? void 0 : metadata["resourceLocationConfig"];
|
|
24
|
+
const { deserializer, expectedStatuses = [] } = (_a = getDeserializationHelper(initialRequestUrl, requestMethod)) !== null && _a !== void 0 ? _a : {};
|
|
25
|
+
const deserializeHelper = (_b = options === null || options === void 0 ? void 0 : options.processResponseBody) !== null && _b !== void 0 ? _b : deserializer;
|
|
26
|
+
if (!deserializeHelper) {
|
|
27
|
+
throw new Error(`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation === null || sourceOperation === void 0 ? void 0 : sourceOperation.name}.`);
|
|
28
|
+
}
|
|
29
|
+
return (0, pollingHelpers_js_1.getLongRunningPoller)((_c = client["_client"]) !== null && _c !== void 0 ? _c : client, deserializeHelper, expectedStatuses, {
|
|
30
|
+
updateIntervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
31
|
+
abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal,
|
|
32
|
+
resourceLocationConfig,
|
|
33
|
+
restoreFrom: serializedState,
|
|
34
|
+
initialRequestUrl,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
const deserializeMap = {
|
|
38
|
+
"PUT /providers/Microsoft.Management/serviceGroups/{servicegroupName}/providers/Microsoft.Edge/sites/{siteName}": {
|
|
39
|
+
deserializer: operations_js_1._createOrUpdateDeserialize,
|
|
40
|
+
expectedStatuses: ["200", "201"],
|
|
41
|
+
},
|
|
42
|
+
"PUT /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName}": {
|
|
43
|
+
deserializer: operations_js_2._createOrUpdateDeserialize,
|
|
44
|
+
expectedStatuses: ["200", "201"],
|
|
45
|
+
},
|
|
46
|
+
"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName}": {
|
|
47
|
+
deserializer: operations_js_3._createOrUpdateDeserialize,
|
|
48
|
+
expectedStatuses: ["200", "201"],
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
function getDeserializationHelper(urlStr, method) {
|
|
52
|
+
var _a, _b, _c, _d;
|
|
53
|
+
const path = new URL(urlStr).pathname;
|
|
54
|
+
const pathParts = path.split("/");
|
|
55
|
+
// Traverse list to match the longest candidate
|
|
56
|
+
// matchedLen: the length of candidate path
|
|
57
|
+
// matchedValue: the matched status code array
|
|
58
|
+
let matchedLen = -1, matchedValue;
|
|
59
|
+
// Iterate the responseMap to find a match
|
|
60
|
+
for (const [key, value] of Object.entries(deserializeMap)) {
|
|
61
|
+
// Extracting the path from the map key which is in format
|
|
62
|
+
// GET /path/foo
|
|
63
|
+
if (!key.startsWith(method)) {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
const candidatePath = getPathFromMapKey(key);
|
|
67
|
+
// Get each part of the url path
|
|
68
|
+
const candidateParts = candidatePath.split("/");
|
|
69
|
+
// track if we have found a match to return the values found.
|
|
70
|
+
let found = true;
|
|
71
|
+
for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
|
|
72
|
+
if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
|
|
73
|
+
const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
|
|
74
|
+
// If the current part of the candidate is a "template" part
|
|
75
|
+
// Try to use the suffix of pattern to match the path
|
|
76
|
+
// {guid} ==> $
|
|
77
|
+
// {guid}:export ==> :export$
|
|
78
|
+
const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
|
|
79
|
+
if (!isMatched) {
|
|
80
|
+
found = false;
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
85
|
+
// If the candidate part is not a template and
|
|
86
|
+
// the parts don't match mark the candidate as not found
|
|
87
|
+
// to move on with the next candidate path.
|
|
88
|
+
if (candidateParts[i] !== pathParts[j]) {
|
|
89
|
+
found = false;
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// We finished evaluating the current candidate parts
|
|
94
|
+
// Update the matched value if and only if we found the longer pattern
|
|
95
|
+
if (found && candidatePath.length > matchedLen) {
|
|
96
|
+
matchedLen = candidatePath.length;
|
|
97
|
+
matchedValue = value;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return matchedValue;
|
|
101
|
+
}
|
|
102
|
+
function getPathFromMapKey(mapKey) {
|
|
103
|
+
const pathStart = mapKey.indexOf("/");
|
|
104
|
+
return mapKey.slice(pathStart);
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=restorePollerHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restorePollerHelpers.js","sourceRoot":"","sources":["../../src/restorePollerHelpers.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAmClC,sCAoCC;AApED,2EAAqF;AACrF,2EAAsI;AACtI,6DAA0G;AAC1G,0EAA0E;AAG1E,8CAKyB;AAgBzB;;;;GAIG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IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { EdgeClient } from \"./edgeClient.js\";\nimport { _createOrUpdateDeserialize } from \"./api/sitesByServiceGroup/operations.js\";\nimport { _createOrUpdateDeserialize as _createOrUpdateDeserializeSitesBySubscription } from \"./api/sitesBySubscription/operations.js\";\nimport { _createOrUpdateDeserialize as _createOrUpdateDeserializeSites } from \"./api/sites/operations.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n PollerLike,\n OperationState,\n deserializeState,\n ResourceLocationConfig,\n} from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: EdgeClient,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n | ResourceLocationConfig\n | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: Function;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"PUT /providers/Microsoft.Management/serviceGroups/{servicegroupName}/providers/Microsoft.Edge/sites/{siteName}\":\n {\n deserializer: _createOrUpdateDeserialize,\n expectedStatuses: [\"200\", \"201\"],\n },\n \"PUT /subscriptions/{subscriptionId}/providers/Microsoft.Edge/sites/{siteName}\": {\n deserializer: _createOrUpdateDeserializeSitesBySubscription,\n expectedStatuses: [\"200\", \"201\"],\n },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Edge/sites/{siteName}\":\n {\n deserializer: _createOrUpdateDeserializeSites,\n expectedStatuses: [\"200\", \"201\"],\n },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Client, PathUncheckedResponse } from "@azure-rest/core-client";
|
|
2
|
+
/**
|
|
3
|
+
* Options for the byPage method
|
|
4
|
+
*/
|
|
5
|
+
export interface PageSettings {
|
|
6
|
+
/**
|
|
7
|
+
* A reference to a specific page to start iterating from.
|
|
8
|
+
*/
|
|
9
|
+
continuationToken?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* An interface that describes a page of results.
|
|
13
|
+
*/
|
|
14
|
+
export type ContinuablePage<TElement, TPage = TElement[]> = TPage & {
|
|
15
|
+
/**
|
|
16
|
+
* The token that keeps track of where to continue the iterator
|
|
17
|
+
*/
|
|
18
|
+
continuationToken?: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* An interface that allows async iterable iteration both to completion and by page.
|
|
22
|
+
*/
|
|
23
|
+
export interface PagedAsyncIterableIterator<TElement, TPage = TElement[], TPageSettings extends PageSettings = PageSettings> {
|
|
24
|
+
/**
|
|
25
|
+
* The next method, part of the iteration protocol
|
|
26
|
+
*/
|
|
27
|
+
next(): Promise<IteratorResult<TElement>>;
|
|
28
|
+
/**
|
|
29
|
+
* The connection to the async iterator, part of the iteration protocol
|
|
30
|
+
*/
|
|
31
|
+
[Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;
|
|
32
|
+
/**
|
|
33
|
+
* Return an AsyncIterableIterator that works a page at a time
|
|
34
|
+
*/
|
|
35
|
+
byPage: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* An interface that describes how to communicate with the service.
|
|
39
|
+
*/
|
|
40
|
+
export interface PagedResult<TElement, TPage = TElement[], TPageSettings extends PageSettings = PageSettings> {
|
|
41
|
+
/**
|
|
42
|
+
* Link to the first page of results.
|
|
43
|
+
*/
|
|
44
|
+
firstPageLink?: string;
|
|
45
|
+
/**
|
|
46
|
+
* A method that returns a page of results.
|
|
47
|
+
*/
|
|
48
|
+
getPage: (pageLink?: string) => Promise<{
|
|
49
|
+
page: TPage;
|
|
50
|
+
nextPageLink?: string;
|
|
51
|
+
} | undefined>;
|
|
52
|
+
/**
|
|
53
|
+
* a function to implement the `byPage` method on the paged async iterator.
|
|
54
|
+
*/
|
|
55
|
+
byPage?: (settings?: TPageSettings) => AsyncIterableIterator<ContinuablePage<TElement, TPage>>;
|
|
56
|
+
/**
|
|
57
|
+
* A function to extract elements from a page.
|
|
58
|
+
*/
|
|
59
|
+
toElements?: (page: TPage) => TElement[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Options for the paging helper
|
|
63
|
+
*/
|
|
64
|
+
export interface BuildPagedAsyncIteratorOptions {
|
|
65
|
+
itemName?: string;
|
|
66
|
+
nextLinkName?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Helper to paginate results in a generic way and return a PagedAsyncIterableIterator
|
|
70
|
+
*/
|
|
71
|
+
export declare function buildPagedAsyncIterator<TElement, TPage = TElement[], TPageSettings extends PageSettings = PageSettings, TResponse extends PathUncheckedResponse = PathUncheckedResponse>(client: Client, getInitialResponse: () => PromiseLike<TResponse>, processResponseBody: (result: TResponse) => PromiseLike<unknown>, expectedStatuses: string[], options?: BuildPagedAsyncIteratorOptions): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;
|
|
72
|
+
//# sourceMappingURL=pagingHelpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagingHelpers.d.ts","sourceRoot":"","sources":["../../../src/static-helpers/pagingHelpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAmB,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGzF;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,QAAQ,EAAE,KAAK,GAAG,QAAQ,EAAE,IAAI,KAAK,GAAG;IAClE;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,0BAA0B,CACzC,QAAQ,EACR,KAAK,GAAG,QAAQ,EAAE,EAClB,aAAa,SAAS,YAAY,GAAG,YAAY;IAEjD;;OAEG;IACH,IAAI,IAAI,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC1C;;OAEG;IACH,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,0BAA0B,CAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC;IACrF;;OAEG;IACH,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,aAAa,KAAK,qBAAqB,CAA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
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT License.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.buildPagedAsyncIterator = buildPagedAsyncIterator;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const core_client_1 = require("@azure-rest/core-client");
|
|
8
|
+
const core_rest_pipeline_1 = require("@azure/core-rest-pipeline");
|
|
9
|
+
/**
|
|
10
|
+
* Helper to paginate results in a generic way and return a PagedAsyncIterableIterator
|
|
11
|
+
*/
|
|
12
|
+
function buildPagedAsyncIterator(client, getInitialResponse, processResponseBody, expectedStatuses, options = {}) {
|
|
13
|
+
var _a, _b;
|
|
14
|
+
const itemName = (_a = options.itemName) !== null && _a !== void 0 ? _a : "value";
|
|
15
|
+
const nextLinkName = (_b = options.nextLinkName) !== null && _b !== void 0 ? _b : "nextLink";
|
|
16
|
+
const pagedResult = {
|
|
17
|
+
getPage: async (pageLink) => {
|
|
18
|
+
const result = pageLink === undefined
|
|
19
|
+
? await getInitialResponse()
|
|
20
|
+
: await client.pathUnchecked(pageLink).get();
|
|
21
|
+
checkPagingRequest(result, expectedStatuses);
|
|
22
|
+
const results = await processResponseBody(result);
|
|
23
|
+
const nextLink = getNextLink(results, nextLinkName);
|
|
24
|
+
const values = getElements(results, itemName);
|
|
25
|
+
return {
|
|
26
|
+
page: values,
|
|
27
|
+
nextPageLink: nextLink,
|
|
28
|
+
};
|
|
29
|
+
},
|
|
30
|
+
byPage: (settings) => {
|
|
31
|
+
const { continuationToken } = settings !== null && settings !== void 0 ? settings : {};
|
|
32
|
+
return getPageAsyncIterator(pagedResult, {
|
|
33
|
+
pageLink: continuationToken,
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
return getPagedAsyncIterator(pagedResult);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* returns an async iterator that iterates over results. It also has a `byPage`
|
|
41
|
+
* method that returns pages of items at once.
|
|
42
|
+
*
|
|
43
|
+
* @param pagedResult - an object that specifies how to get pages.
|
|
44
|
+
* @returns a paged async iterator that iterates over results.
|
|
45
|
+
*/
|
|
46
|
+
function getPagedAsyncIterator(pagedResult) {
|
|
47
|
+
var _a;
|
|
48
|
+
const iter = getItemAsyncIterator(pagedResult);
|
|
49
|
+
return {
|
|
50
|
+
next() {
|
|
51
|
+
return iter.next();
|
|
52
|
+
},
|
|
53
|
+
[Symbol.asyncIterator]() {
|
|
54
|
+
return this;
|
|
55
|
+
},
|
|
56
|
+
byPage: (_a = pagedResult === null || pagedResult === void 0 ? void 0 : pagedResult.byPage) !== null && _a !== void 0 ? _a : ((settings) => {
|
|
57
|
+
const { continuationToken } = settings !== null && settings !== void 0 ? settings : {};
|
|
58
|
+
return getPageAsyncIterator(pagedResult, {
|
|
59
|
+
pageLink: continuationToken,
|
|
60
|
+
});
|
|
61
|
+
}),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function getItemAsyncIterator(pagedResult) {
|
|
65
|
+
return tslib_1.__asyncGenerator(this, arguments, function* getItemAsyncIterator_1() {
|
|
66
|
+
var _a, e_1, _b, _c;
|
|
67
|
+
const pages = getPageAsyncIterator(pagedResult);
|
|
68
|
+
try {
|
|
69
|
+
for (var _d = true, pages_1 = tslib_1.__asyncValues(pages), pages_1_1; pages_1_1 = yield tslib_1.__await(pages_1.next()), _a = pages_1_1.done, !_a; _d = true) {
|
|
70
|
+
_c = pages_1_1.value;
|
|
71
|
+
_d = false;
|
|
72
|
+
const page = _c;
|
|
73
|
+
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
77
|
+
finally {
|
|
78
|
+
try {
|
|
79
|
+
if (!_d && !_a && (_b = pages_1.return)) yield tslib_1.__await(_b.call(pages_1));
|
|
80
|
+
}
|
|
81
|
+
finally { if (e_1) throw e_1.error; }
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function getPageAsyncIterator(pagedResult_1) {
|
|
86
|
+
return tslib_1.__asyncGenerator(this, arguments, function* getPageAsyncIterator_1(pagedResult, options = {}) {
|
|
87
|
+
const { pageLink } = options;
|
|
88
|
+
let response = yield tslib_1.__await(pagedResult.getPage(pageLink !== null && pageLink !== void 0 ? pageLink : pagedResult.firstPageLink));
|
|
89
|
+
if (!response) {
|
|
90
|
+
return yield tslib_1.__await(void 0);
|
|
91
|
+
}
|
|
92
|
+
let result = response.page;
|
|
93
|
+
result.continuationToken = response.nextPageLink;
|
|
94
|
+
yield yield tslib_1.__await(result);
|
|
95
|
+
while (response.nextPageLink) {
|
|
96
|
+
response = yield tslib_1.__await(pagedResult.getPage(response.nextPageLink));
|
|
97
|
+
if (!response) {
|
|
98
|
+
return yield tslib_1.__await(void 0);
|
|
99
|
+
}
|
|
100
|
+
result = response.page;
|
|
101
|
+
result.continuationToken = response.nextPageLink;
|
|
102
|
+
yield yield tslib_1.__await(result);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Gets for the value of nextLink in the body
|
|
108
|
+
*/
|
|
109
|
+
function getNextLink(body, nextLinkName) {
|
|
110
|
+
if (!nextLinkName) {
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
const nextLink = body[nextLinkName];
|
|
114
|
+
if (typeof nextLink !== "string" && typeof nextLink !== "undefined" && nextLink !== null) {
|
|
115
|
+
throw new core_rest_pipeline_1.RestError(`Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`);
|
|
116
|
+
}
|
|
117
|
+
if (nextLink === null) {
|
|
118
|
+
return undefined;
|
|
119
|
+
}
|
|
120
|
+
return nextLink;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Gets the elements of the current request in the body.
|
|
124
|
+
*/
|
|
125
|
+
function getElements(body, itemName) {
|
|
126
|
+
const value = body[itemName];
|
|
127
|
+
if (!Array.isArray(value)) {
|
|
128
|
+
throw new core_rest_pipeline_1.RestError(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
|
|
129
|
+
}
|
|
130
|
+
return value !== null && value !== void 0 ? value : [];
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Checks if a request failed
|
|
134
|
+
*/
|
|
135
|
+
function checkPagingRequest(response, expectedStatuses) {
|
|
136
|
+
if (!expectedStatuses.includes(response.status)) {
|
|
137
|
+
throw (0, core_client_1.createRestError)(`Pagination failed with unexpected statusCode ${response.status}`, response);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
//# sourceMappingURL=pagingHelpers.js.map
|