@azure/arm-qumulo 2.0.2-alpha.20260310.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +12 -11
- package/dist/browser/api/fileSystems/index.d.ts +3 -0
- package/dist/browser/api/fileSystems/index.js +4 -0
- package/dist/browser/api/fileSystems/index.js.map +1 -0
- package/dist/browser/api/fileSystems/operations.d.ts +31 -0
- package/dist/browser/api/fileSystems/operations.js +194 -0
- package/dist/browser/api/fileSystems/operations.js.map +1 -0
- package/dist/browser/api/fileSystems/options.d.ts +24 -0
- package/dist/browser/api/fileSystems/options.js +4 -0
- package/dist/browser/api/fileSystems/options.js.map +1 -0
- package/dist/browser/api/index.d.ts +3 -0
- package/dist/browser/api/index.js +4 -0
- package/dist/browser/api/index.js.map +1 -0
- package/dist/browser/api/operations/index.d.ts +3 -0
- package/dist/browser/api/operations/index.js +4 -0
- package/dist/browser/api/operations/index.js.map +1 -0
- package/dist/browser/api/operations/operations.d.ts +10 -0
- package/dist/browser/api/operations/operations.js +33 -0
- package/dist/browser/api/operations/operations.js.map +1 -0
- package/dist/browser/api/operations/options.d.ts +5 -0
- package/dist/browser/api/operations/options.js +4 -0
- package/dist/browser/api/operations/options.js.map +1 -0
- package/dist/browser/api/qumuloStorageContext.d.ts +20 -0
- package/dist/browser/api/qumuloStorageContext.js +25 -0
- package/dist/browser/api/qumuloStorageContext.js.map +1 -0
- package/dist/browser/classic/fileSystems/index.d.ts +31 -0
- package/dist/browser/classic/fileSystems/index.js +36 -0
- package/dist/browser/classic/fileSystems/index.js.map +1 -0
- package/dist/browser/classic/index.d.ts +3 -0
- package/dist/browser/classic/index.js +4 -0
- package/dist/browser/classic/index.js.map +1 -0
- package/dist/browser/classic/operations/index.d.ts +11 -0
- package/dist/browser/classic/operations/index.js +14 -0
- package/dist/browser/classic/operations/index.js.map +1 -0
- package/dist/browser/index.d.ts +16 -3
- package/dist/browser/index.js +7 -11
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/logger.d.ts +2 -0
- package/dist/browser/logger.js +5 -0
- package/dist/browser/logger.js.map +1 -0
- package/dist/browser/models/index.d.ts +2 -478
- package/dist/browser/models/index.js +3 -79
- package/dist/browser/models/index.js.map +1 -1
- package/dist/browser/models/models.d.ts +392 -0
- package/dist/browser/models/models.js +413 -0
- package/dist/browser/models/models.js.map +1 -0
- package/dist/browser/qumuloStorage.d.ts +15 -19
- package/dist/browser/qumuloStorage.js +23 -103
- package/dist/browser/qumuloStorage.js.map +1 -1
- package/dist/browser/restorePollerHelpers.d.ts +21 -0
- package/dist/browser/restorePollerHelpers.js +95 -0
- package/dist/browser/restorePollerHelpers.js.map +1 -0
- package/dist/browser/static-helpers/cloudSettingHelpers.d.ts +22 -0
- package/dist/browser/static-helpers/cloudSettingHelpers.js +38 -0
- package/dist/browser/static-helpers/cloudSettingHelpers.js.map +1 -0
- package/dist/browser/static-helpers/pagingHelpers.d.ts +74 -0
- package/dist/browser/static-helpers/pagingHelpers.js +143 -0
- package/dist/browser/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/browser/static-helpers/pollingHelpers.d.ts +34 -0
- package/dist/browser/static-helpers/pollingHelpers.js +95 -0
- package/dist/browser/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/browser/static-helpers/serialization/check-prop-undefined.d.ts +8 -0
- package/dist/browser/static-helpers/serialization/check-prop-undefined.js +17 -0
- package/dist/browser/static-helpers/serialization/check-prop-undefined.js.map +1 -0
- package/dist/browser/static-helpers/simplePollerHelpers.d.ts +73 -0
- package/dist/browser/static-helpers/simplePollerHelpers.js +44 -0
- package/dist/browser/static-helpers/simplePollerHelpers.js.map +1 -0
- package/dist/browser/static-helpers/urlTemplate.d.ts +5 -0
- package/dist/browser/static-helpers/urlTemplate.js +200 -0
- package/dist/browser/static-helpers/urlTemplate.js.map +1 -0
- package/dist/commonjs/api/fileSystems/index.d.ts +3 -0
- package/dist/commonjs/api/fileSystems/index.js +38 -0
- package/dist/commonjs/api/fileSystems/index.js.map +7 -0
- package/dist/commonjs/api/fileSystems/operations.d.ts +31 -0
- package/dist/commonjs/api/fileSystems/operations.js +282 -0
- package/dist/commonjs/api/fileSystems/operations.js.map +7 -0
- package/dist/commonjs/api/fileSystems/options.d.ts +24 -0
- package/dist/commonjs/{operationsInterfaces/operations.js → api/fileSystems/options.js} +3 -2
- package/dist/commonjs/api/fileSystems/options.js.map +7 -0
- package/dist/commonjs/api/index.d.ts +3 -0
- package/dist/commonjs/{operationsInterfaces → api}/index.js +12 -7
- package/dist/commonjs/api/index.js.map +7 -0
- package/dist/commonjs/api/operations/index.d.ts +3 -0
- package/dist/commonjs/{operations → api/operations}/index.js +10 -5
- package/dist/commonjs/api/operations/index.js.map +7 -0
- package/dist/commonjs/api/operations/operations.d.ts +10 -0
- package/dist/commonjs/api/operations/operations.js +70 -0
- package/dist/commonjs/api/operations/operations.js.map +7 -0
- package/dist/commonjs/api/operations/options.d.ts +5 -0
- package/dist/commonjs/api/operations/options.js +16 -0
- package/dist/commonjs/api/operations/options.js.map +7 -0
- package/dist/commonjs/api/qumuloStorageContext.d.ts +20 -0
- package/dist/commonjs/api/qumuloStorageContext.js +47 -0
- package/dist/commonjs/api/qumuloStorageContext.js.map +7 -0
- package/dist/commonjs/classic/fileSystems/index.d.ts +31 -0
- package/dist/commonjs/classic/fileSystems/index.js +60 -0
- package/dist/commonjs/classic/fileSystems/index.js.map +7 -0
- package/dist/commonjs/classic/index.d.ts +3 -0
- package/dist/commonjs/{operationsInterfaces/fileSystems.js → classic/index.js} +3 -2
- package/dist/commonjs/classic/index.js.map +7 -0
- package/dist/commonjs/classic/operations/index.d.ts +11 -0
- package/dist/commonjs/{lroImpl.js → classic/operations/index.js} +14 -19
- package/dist/commonjs/classic/operations/index.js.map +7 -0
- package/dist/commonjs/index.d.ts +16 -3
- package/dist/commonjs/index.js +27 -8
- package/dist/commonjs/index.js.map +3 -3
- package/dist/commonjs/logger.d.ts +2 -0
- package/dist/commonjs/logger.js +29 -0
- package/dist/commonjs/logger.js.map +7 -0
- package/dist/commonjs/models/index.d.ts +2 -478
- package/dist/commonjs/models/index.js +11 -49
- package/dist/commonjs/models/index.js.map +4 -4
- package/dist/commonjs/models/models.d.ts +392 -0
- package/dist/commonjs/models/models.js +436 -0
- package/dist/commonjs/models/models.js.map +7 -0
- package/dist/commonjs/qumuloStorage.d.ts +15 -19
- package/dist/commonjs/qumuloStorage.js +20 -99
- package/dist/commonjs/qumuloStorage.js.map +3 -3
- package/dist/commonjs/restorePollerHelpers.d.ts +21 -0
- package/dist/commonjs/restorePollerHelpers.js +108 -0
- package/dist/commonjs/restorePollerHelpers.js.map +7 -0
- package/dist/commonjs/static-helpers/cloudSettingHelpers.d.ts +22 -0
- package/dist/commonjs/static-helpers/cloudSettingHelpers.js +52 -0
- package/dist/commonjs/static-helpers/cloudSettingHelpers.js.map +7 -0
- package/dist/commonjs/static-helpers/pagingHelpers.d.ts +74 -0
- package/dist/commonjs/static-helpers/pagingHelpers.js +143 -0
- package/dist/commonjs/static-helpers/pagingHelpers.js.map +7 -0
- package/dist/commonjs/static-helpers/pollingHelpers.d.ts +34 -0
- package/dist/commonjs/static-helpers/pollingHelpers.js +101 -0
- package/dist/commonjs/static-helpers/pollingHelpers.js.map +7 -0
- package/dist/commonjs/static-helpers/serialization/check-prop-undefined.d.ts +8 -0
- package/dist/commonjs/{pagingHelper.js → static-helpers/serialization/check-prop-undefined.js} +12 -20
- package/dist/commonjs/static-helpers/serialization/check-prop-undefined.js.map +7 -0
- package/dist/commonjs/static-helpers/simplePollerHelpers.d.ts +73 -0
- package/dist/commonjs/static-helpers/simplePollerHelpers.js +67 -0
- package/dist/commonjs/static-helpers/simplePollerHelpers.js.map +7 -0
- package/dist/commonjs/static-helpers/urlTemplate.d.ts +5 -0
- package/dist/commonjs/static-helpers/urlTemplate.js +197 -0
- package/dist/commonjs/static-helpers/urlTemplate.js.map +7 -0
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/esm/api/fileSystems/index.d.ts +3 -0
- package/dist/esm/api/fileSystems/index.js +4 -0
- package/dist/esm/api/fileSystems/index.js.map +1 -0
- package/dist/esm/api/fileSystems/operations.d.ts +31 -0
- package/dist/esm/api/fileSystems/operations.js +194 -0
- package/dist/esm/api/fileSystems/operations.js.map +1 -0
- package/dist/esm/api/fileSystems/options.d.ts +24 -0
- package/dist/esm/api/fileSystems/options.js +4 -0
- package/dist/esm/api/fileSystems/options.js.map +1 -0
- package/dist/esm/api/index.d.ts +3 -0
- package/dist/esm/api/index.js +4 -0
- package/dist/esm/api/index.js.map +1 -0
- package/dist/esm/api/operations/index.d.ts +3 -0
- package/dist/esm/api/operations/index.js +4 -0
- package/dist/esm/api/operations/index.js.map +1 -0
- package/dist/esm/api/operations/operations.d.ts +10 -0
- package/dist/esm/api/operations/operations.js +33 -0
- package/dist/esm/api/operations/operations.js.map +1 -0
- package/dist/esm/api/operations/options.d.ts +5 -0
- package/dist/esm/api/operations/options.js +4 -0
- package/dist/esm/api/operations/options.js.map +1 -0
- package/dist/esm/api/qumuloStorageContext.d.ts +20 -0
- package/dist/esm/api/qumuloStorageContext.js +25 -0
- package/dist/esm/api/qumuloStorageContext.js.map +1 -0
- package/dist/esm/classic/fileSystems/index.d.ts +31 -0
- package/dist/esm/classic/fileSystems/index.js +36 -0
- package/dist/esm/classic/fileSystems/index.js.map +1 -0
- package/dist/esm/classic/index.d.ts +3 -0
- package/dist/esm/classic/index.js +4 -0
- package/dist/esm/classic/index.js.map +1 -0
- package/dist/esm/classic/operations/index.d.ts +11 -0
- package/dist/esm/classic/operations/index.js +14 -0
- package/dist/esm/classic/operations/index.js.map +1 -0
- package/dist/esm/index.d.ts +16 -3
- package/dist/esm/index.js +9 -8
- package/dist/esm/index.js.map +1 -7
- package/dist/esm/logger.d.ts +2 -0
- package/dist/esm/logger.js +5 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/models/index.d.ts +2 -478
- package/dist/esm/models/index.js +4 -50
- package/dist/esm/models/index.js.map +1 -7
- package/dist/esm/models/models.d.ts +392 -0
- package/dist/esm/models/models.js +413 -0
- package/dist/esm/models/models.js.map +1 -0
- package/dist/esm/qumuloStorage.d.ts +15 -19
- package/dist/esm/qumuloStorage.js +26 -94
- package/dist/esm/qumuloStorage.js.map +1 -7
- package/dist/esm/restorePollerHelpers.d.ts +21 -0
- package/dist/esm/restorePollerHelpers.js +95 -0
- package/dist/esm/restorePollerHelpers.js.map +1 -0
- package/dist/esm/static-helpers/cloudSettingHelpers.d.ts +22 -0
- package/dist/esm/static-helpers/cloudSettingHelpers.js +38 -0
- package/dist/esm/static-helpers/cloudSettingHelpers.js.map +1 -0
- package/dist/esm/static-helpers/pagingHelpers.d.ts +74 -0
- package/dist/esm/static-helpers/pagingHelpers.js +143 -0
- package/dist/esm/static-helpers/pagingHelpers.js.map +1 -0
- package/dist/esm/static-helpers/pollingHelpers.d.ts +34 -0
- package/dist/esm/static-helpers/pollingHelpers.js +95 -0
- package/dist/esm/static-helpers/pollingHelpers.js.map +1 -0
- package/dist/esm/static-helpers/serialization/check-prop-undefined.d.ts +8 -0
- package/dist/esm/static-helpers/serialization/check-prop-undefined.js +17 -0
- package/dist/esm/static-helpers/serialization/check-prop-undefined.js.map +1 -0
- package/dist/esm/static-helpers/simplePollerHelpers.d.ts +73 -0
- package/dist/esm/static-helpers/simplePollerHelpers.js +44 -0
- package/dist/esm/static-helpers/simplePollerHelpers.js.map +1 -0
- package/dist/esm/static-helpers/urlTemplate.d.ts +5 -0
- package/dist/esm/static-helpers/urlTemplate.js +200 -0
- package/dist/esm/static-helpers/urlTemplate.js.map +1 -0
- package/package.json +147 -81
- package/CHANGELOG.md +0 -40
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/lroImpl.d.ts +0 -11
- package/dist/browser/lroImpl.d.ts.map +0 -1
- package/dist/browser/lroImpl.js +0 -18
- package/dist/browser/lroImpl.js.map +0 -1
- package/dist/browser/models/index.d.ts.map +0 -1
- package/dist/browser/models/mappers.d.ts +0 -21
- package/dist/browser/models/mappers.d.ts.map +0 -1
- package/dist/browser/models/mappers.js +0 -641
- package/dist/browser/models/mappers.js.map +0 -1
- package/dist/browser/models/parameters.d.ts +0 -12
- package/dist/browser/models/parameters.d.ts.map +0 -1
- package/dist/browser/models/parameters.js +0 -112
- package/dist/browser/models/parameters.js.map +0 -1
- package/dist/browser/operations/fileSystems.d.ts +0 -99
- package/dist/browser/operations/fileSystems.d.ts.map +0 -1
- package/dist/browser/operations/fileSystems.js +0 -465
- package/dist/browser/operations/fileSystems.js.map +0 -1
- package/dist/browser/operations/index.d.ts +0 -3
- package/dist/browser/operations/index.d.ts.map +0 -1
- package/dist/browser/operations/index.js +0 -10
- package/dist/browser/operations/index.js.map +0 -1
- package/dist/browser/operations/operations.d.ts +0 -32
- package/dist/browser/operations/operations.d.ts.map +0 -1
- package/dist/browser/operations/operations.js +0 -116
- package/dist/browser/operations/operations.js.map +0 -1
- package/dist/browser/operationsInterfaces/fileSystems.d.ts +0 -63
- package/dist/browser/operationsInterfaces/fileSystems.d.ts.map +0 -1
- package/dist/browser/operationsInterfaces/fileSystems.js +0 -9
- package/dist/browser/operationsInterfaces/fileSystems.js.map +0 -1
- package/dist/browser/operationsInterfaces/index.d.ts +0 -3
- package/dist/browser/operationsInterfaces/index.d.ts.map +0 -1
- package/dist/browser/operationsInterfaces/index.js +0 -10
- package/dist/browser/operationsInterfaces/index.js.map +0 -1
- package/dist/browser/operationsInterfaces/operations.d.ts +0 -11
- package/dist/browser/operationsInterfaces/operations.d.ts.map +0 -1
- package/dist/browser/operationsInterfaces/operations.js +0 -9
- package/dist/browser/operationsInterfaces/operations.js.map +0 -1
- package/dist/browser/pagingHelper.d.ts +0 -13
- package/dist/browser/pagingHelper.d.ts.map +0 -1
- package/dist/browser/pagingHelper.js +0 -30
- package/dist/browser/pagingHelper.js.map +0 -1
- package/dist/browser/qumuloStorage.d.ts.map +0 -1
- package/dist/commonjs/index.d.ts.map +0 -1
- package/dist/commonjs/lroImpl.d.ts +0 -11
- package/dist/commonjs/lroImpl.d.ts.map +0 -1
- package/dist/commonjs/lroImpl.js.map +0 -7
- package/dist/commonjs/models/index.d.ts.map +0 -1
- package/dist/commonjs/models/mappers.d.ts +0 -21
- package/dist/commonjs/models/mappers.d.ts.map +0 -1
- package/dist/commonjs/models/mappers.js +0 -695
- package/dist/commonjs/models/mappers.js.map +0 -7
- package/dist/commonjs/models/parameters.d.ts +0 -12
- package/dist/commonjs/models/parameters.d.ts.map +0 -1
- package/dist/commonjs/models/parameters.js +0 -148
- package/dist/commonjs/models/parameters.js.map +0 -7
- package/dist/commonjs/operations/fileSystems.d.ts +0 -99
- package/dist/commonjs/operations/fileSystems.d.ts.map +0 -1
- package/dist/commonjs/operations/fileSystems.js +0 -532
- package/dist/commonjs/operations/fileSystems.js.map +0 -7
- package/dist/commonjs/operations/index.d.ts +0 -3
- package/dist/commonjs/operations/index.d.ts.map +0 -1
- package/dist/commonjs/operations/index.js.map +0 -7
- package/dist/commonjs/operations/operations.d.ts +0 -32
- package/dist/commonjs/operations/operations.d.ts.map +0 -1
- package/dist/commonjs/operations/operations.js +0 -148
- package/dist/commonjs/operations/operations.js.map +0 -7
- package/dist/commonjs/operationsInterfaces/fileSystems.d.ts +0 -63
- package/dist/commonjs/operationsInterfaces/fileSystems.d.ts.map +0 -1
- package/dist/commonjs/operationsInterfaces/fileSystems.js.map +0 -7
- package/dist/commonjs/operationsInterfaces/index.d.ts +0 -3
- package/dist/commonjs/operationsInterfaces/index.d.ts.map +0 -1
- package/dist/commonjs/operationsInterfaces/index.js.map +0 -7
- package/dist/commonjs/operationsInterfaces/operations.d.ts +0 -11
- package/dist/commonjs/operationsInterfaces/operations.d.ts.map +0 -1
- package/dist/commonjs/operationsInterfaces/operations.js.map +0 -7
- package/dist/commonjs/pagingHelper.d.ts +0 -13
- package/dist/commonjs/pagingHelper.d.ts.map +0 -1
- package/dist/commonjs/pagingHelper.js.map +0 -7
- package/dist/commonjs/qumuloStorage.d.ts.map +0 -1
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/lroImpl.d.ts +0 -11
- package/dist/esm/lroImpl.d.ts.map +0 -1
- package/dist/esm/lroImpl.js +0 -20
- package/dist/esm/lroImpl.js.map +0 -7
- package/dist/esm/models/index.d.ts.map +0 -1
- package/dist/esm/models/mappers.d.ts +0 -21
- package/dist/esm/models/mappers.d.ts.map +0 -1
- package/dist/esm/models/mappers.js +0 -654
- package/dist/esm/models/mappers.js.map +0 -7
- package/dist/esm/models/parameters.d.ts +0 -12
- package/dist/esm/models/parameters.d.ts.map +0 -1
- package/dist/esm/models/parameters.js +0 -119
- package/dist/esm/models/parameters.js.map +0 -7
- package/dist/esm/operations/fileSystems.d.ts +0 -99
- package/dist/esm/operations/fileSystems.d.ts.map +0 -1
- package/dist/esm/operations/fileSystems.js +0 -501
- package/dist/esm/operations/fileSystems.js.map +0 -7
- package/dist/esm/operations/index.d.ts +0 -3
- package/dist/esm/operations/index.d.ts.map +0 -1
- package/dist/esm/operations/index.js +0 -2
- package/dist/esm/operations/index.js.map +0 -7
- package/dist/esm/operations/operations.d.ts +0 -32
- package/dist/esm/operations/operations.d.ts.map +0 -1
- package/dist/esm/operations/operations.js +0 -115
- package/dist/esm/operations/operations.js.map +0 -7
- package/dist/esm/operationsInterfaces/fileSystems.d.ts +0 -63
- package/dist/esm/operationsInterfaces/fileSystems.d.ts.map +0 -1
- package/dist/esm/operationsInterfaces/fileSystems.js +0 -0
- package/dist/esm/operationsInterfaces/fileSystems.js.map +0 -7
- package/dist/esm/operationsInterfaces/index.d.ts +0 -3
- package/dist/esm/operationsInterfaces/index.d.ts.map +0 -1
- package/dist/esm/operationsInterfaces/index.js +0 -2
- package/dist/esm/operationsInterfaces/index.js.map +0 -7
- package/dist/esm/operationsInterfaces/operations.d.ts +0 -11
- package/dist/esm/operationsInterfaces/operations.d.ts.map +0 -1
- package/dist/esm/operationsInterfaces/operations.js +0 -0
- package/dist/esm/operationsInterfaces/operations.js.map +0 -7
- package/dist/esm/pagingHelper.d.ts +0 -13
- package/dist/esm/pagingHelper.d.ts.map +0 -1
- package/dist/esm/pagingHelper.js +0 -19
- package/dist/esm/pagingHelper.js.map +0 -7
- package/dist/esm/qumuloStorage.d.ts.map +0 -1
- package/dist/react-native/index.d.ts +0 -5
- package/dist/react-native/index.d.ts.map +0 -1
- package/dist/react-native/index.js +0 -13
- package/dist/react-native/index.js.map +0 -1
- package/dist/react-native/lroImpl.d.ts +0 -11
- package/dist/react-native/lroImpl.d.ts.map +0 -1
- package/dist/react-native/lroImpl.js +0 -18
- package/dist/react-native/lroImpl.js.map +0 -1
- package/dist/react-native/models/index.d.ts +0 -479
- package/dist/react-native/models/index.d.ts.map +0 -1
- package/dist/react-native/models/index.js +0 -80
- package/dist/react-native/models/index.js.map +0 -1
- package/dist/react-native/models/mappers.d.ts +0 -21
- package/dist/react-native/models/mappers.d.ts.map +0 -1
- package/dist/react-native/models/mappers.js +0 -641
- package/dist/react-native/models/mappers.js.map +0 -1
- package/dist/react-native/models/parameters.d.ts +0 -12
- package/dist/react-native/models/parameters.d.ts.map +0 -1
- package/dist/react-native/models/parameters.js +0 -112
- package/dist/react-native/models/parameters.js.map +0 -1
- package/dist/react-native/operations/fileSystems.d.ts +0 -99
- package/dist/react-native/operations/fileSystems.d.ts.map +0 -1
- package/dist/react-native/operations/fileSystems.js +0 -465
- package/dist/react-native/operations/fileSystems.js.map +0 -1
- package/dist/react-native/operations/index.d.ts +0 -3
- package/dist/react-native/operations/index.d.ts.map +0 -1
- package/dist/react-native/operations/index.js +0 -10
- package/dist/react-native/operations/index.js.map +0 -1
- package/dist/react-native/operations/operations.d.ts +0 -32
- package/dist/react-native/operations/operations.d.ts.map +0 -1
- package/dist/react-native/operations/operations.js +0 -116
- package/dist/react-native/operations/operations.js.map +0 -1
- package/dist/react-native/operationsInterfaces/fileSystems.d.ts +0 -63
- package/dist/react-native/operationsInterfaces/fileSystems.d.ts.map +0 -1
- package/dist/react-native/operationsInterfaces/fileSystems.js +0 -9
- package/dist/react-native/operationsInterfaces/fileSystems.js.map +0 -1
- package/dist/react-native/operationsInterfaces/index.d.ts +0 -3
- package/dist/react-native/operationsInterfaces/index.d.ts.map +0 -1
- package/dist/react-native/operationsInterfaces/index.js +0 -10
- package/dist/react-native/operationsInterfaces/index.js.map +0 -1
- package/dist/react-native/operationsInterfaces/operations.d.ts +0 -11
- package/dist/react-native/operationsInterfaces/operations.d.ts.map +0 -1
- package/dist/react-native/operationsInterfaces/operations.js +0 -9
- package/dist/react-native/operationsInterfaces/operations.js.map +0 -1
- package/dist/react-native/package.json +0 -3
- package/dist/react-native/pagingHelper.d.ts +0 -13
- package/dist/react-native/pagingHelper.d.ts.map +0 -1
- package/dist/react-native/pagingHelper.js +0 -30
- package/dist/react-native/pagingHelper.js.map +0 -1
- package/dist/react-native/qumuloStorage.d.ts +0 -21
- package/dist/react-native/qumuloStorage.d.ts.map +0 -1
- package/dist/react-native/qumuloStorage.js +0 -108
- package/dist/react-native/qumuloStorage.js.map +0 -1
- package/review/arm-qumulo-node.api.md +0 -346
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __export = (target, all) => {
|
|
8
6
|
for (var name in all)
|
|
@@ -16,114 +14,37 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
14
|
}
|
|
17
15
|
return to;
|
|
18
16
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
18
|
var qumuloStorage_exports = {};
|
|
29
19
|
__export(qumuloStorage_exports, {
|
|
30
20
|
QumuloStorage: () => QumuloStorage
|
|
31
21
|
});
|
|
32
22
|
module.exports = __toCommonJS(qumuloStorage_exports);
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var import_operations = require("./operations/index.js");
|
|
36
|
-
class QumuloStorage
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
* @param options The parameter options
|
|
45
|
-
*/
|
|
46
|
-
constructor(credentials, subscriptionId, options) {
|
|
47
|
-
if (credentials === void 0) {
|
|
48
|
-
throw new Error("'credentials' cannot be null");
|
|
49
|
-
}
|
|
50
|
-
if (subscriptionId === void 0) {
|
|
51
|
-
throw new Error("'subscriptionId' cannot be null");
|
|
52
|
-
}
|
|
53
|
-
if (!options) {
|
|
54
|
-
options = {};
|
|
55
|
-
}
|
|
56
|
-
const defaults = {
|
|
57
|
-
requestContentType: "application/json; charset=utf-8",
|
|
58
|
-
credential: credentials
|
|
59
|
-
};
|
|
60
|
-
const packageDetails = `azsdk-js-arm-qumulo/2.0.2`;
|
|
61
|
-
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`;
|
|
62
|
-
const optionsWithDefaults = {
|
|
63
|
-
...defaults,
|
|
23
|
+
var import_api = require("./api/index.js");
|
|
24
|
+
var import_fileSystems = require("./classic/fileSystems/index.js");
|
|
25
|
+
var import_operations = require("./classic/operations/index.js");
|
|
26
|
+
class QumuloStorage {
|
|
27
|
+
_client;
|
|
28
|
+
/** The pipeline used by this client to make requests */
|
|
29
|
+
pipeline;
|
|
30
|
+
constructor(credential, subscriptionId, options = {}) {
|
|
31
|
+
const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;
|
|
32
|
+
const userAgentPrefix = prefixFromOptions ? `${prefixFromOptions} azsdk-js-client` : `azsdk-js-client`;
|
|
33
|
+
this._client = (0, import_api.createQumuloStorage)(credential, subscriptionId, {
|
|
64
34
|
...options,
|
|
65
|
-
userAgentOptions: {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
super(optionsWithDefaults);
|
|
71
|
-
let bearerTokenAuthenticationPolicyFound = false;
|
|
72
|
-
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
73
|
-
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
74
|
-
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
|
75
|
-
(pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
if (!options || !options.pipeline || options.pipeline.getOrderedPolicies().length == 0 || !bearerTokenAuthenticationPolicyFound) {
|
|
79
|
-
this.pipeline.removePolicy({
|
|
80
|
-
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
81
|
-
});
|
|
82
|
-
this.pipeline.addPolicy(
|
|
83
|
-
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
84
|
-
credential: credentials,
|
|
85
|
-
scopes: optionsWithDefaults.credentialScopes ?? `${optionsWithDefaults.endpoint}/.default`,
|
|
86
|
-
challengeCallbacks: {
|
|
87
|
-
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
88
|
-
}
|
|
89
|
-
})
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
this.subscriptionId = subscriptionId;
|
|
93
|
-
this.$host = options.$host || "https://management.azure.com";
|
|
94
|
-
this.apiVersion = options.apiVersion || "2024-06-19";
|
|
95
|
-
this.operations = new import_operations.OperationsImpl(this);
|
|
96
|
-
this.fileSystems = new import_operations.FileSystemsImpl(this);
|
|
97
|
-
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
35
|
+
userAgentOptions: { userAgentPrefix }
|
|
36
|
+
});
|
|
37
|
+
this.pipeline = this._client.pipeline;
|
|
38
|
+
this.fileSystems = (0, import_fileSystems._getFileSystemsOperations)(this._client);
|
|
39
|
+
this.operations = (0, import_operations._getOperationsOperations)(this._client);
|
|
98
40
|
}
|
|
99
|
-
/**
|
|
100
|
-
addCustomApiVersionPolicy(apiVersion) {
|
|
101
|
-
if (!apiVersion) {
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
const apiVersionPolicy = {
|
|
105
|
-
name: "CustomApiVersionPolicy",
|
|
106
|
-
async sendRequest(request, next) {
|
|
107
|
-
const param = request.url.split("?");
|
|
108
|
-
if (param.length > 1) {
|
|
109
|
-
const newParams = param[1].split("&").map((item) => {
|
|
110
|
-
if (item.indexOf("api-version") > -1) {
|
|
111
|
-
return "api-version=" + apiVersion;
|
|
112
|
-
} else {
|
|
113
|
-
return item;
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
request.url = param[0] + "?" + newParams.join("&");
|
|
117
|
-
}
|
|
118
|
-
return next(request);
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
this.pipeline.addPolicy(apiVersionPolicy);
|
|
122
|
-
}
|
|
123
|
-
operations;
|
|
41
|
+
/** The operation groups for fileSystems */
|
|
124
42
|
fileSystems;
|
|
43
|
+
/** The operation groups for operations */
|
|
44
|
+
operations;
|
|
125
45
|
}
|
|
126
46
|
// Annotate the CommonJS export names for ESM import in node:
|
|
127
47
|
0 && (module.exports = {
|
|
128
48
|
QumuloStorage
|
|
129
49
|
});
|
|
50
|
+
//# sourceMappingURL=qumuloStorage.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
3
|
+
"sources": ["../../src/qumuloStorage.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { QumuloStorageContext, QumuloStorageOptionalParams } from \"./api/index.js\";\nimport { createQumuloStorage } from \"./api/index.js\";\nimport type { FileSystemsOperations } from \"./classic/fileSystems/index.js\";\nimport { _getFileSystemsOperations } from \"./classic/fileSystems/index.js\";\nimport type { OperationsOperations } from \"./classic/operations/index.js\";\nimport { _getOperationsOperations } from \"./classic/operations/index.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { Pipeline } from \"@azure/core-rest-pipeline\";\n\nexport type { QumuloStorageOptionalParams } from \"./api/qumuloStorageContext.js\";\n\nexport class QumuloStorage {\n private _client: QumuloStorageContext;\n /** The pipeline used by this client to make requests */\n public readonly pipeline: Pipeline;\n\n constructor(\n credential: TokenCredential,\n subscriptionId: string,\n options: QumuloStorageOptionalParams = {},\n ) {\n const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix;\n const userAgentPrefix = prefixFromOptions\n ? `${prefixFromOptions} azsdk-js-client`\n : `azsdk-js-client`;\n this._client = createQumuloStorage(credential, subscriptionId, {\n ...options,\n userAgentOptions: { userAgentPrefix },\n });\n this.pipeline = this._client.pipeline;\n this.fileSystems = _getFileSystemsOperations(this._client);\n this.operations = _getOperationsOperations(this._client);\n }\n\n /** The operation groups for fileSystems */\n public readonly fileSystems: FileSystemsOperations;\n /** The operation groups for operations */\n public readonly operations: OperationsOperations;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,iBAAoC;AAEpC,yBAA0C;AAE1C,wBAAyC;AAMlC,MAAM,cAAc;AAAA,EACjB;AAAA;AAAA,EAEQ;AAAA,EAEhB,YACE,YACA,gBACA,UAAuC,CAAC,GACxC;AACA,UAAM,oBAAoB,SAAS,kBAAkB;AACrD,UAAM,kBAAkB,oBACpB,GAAG,iBAAiB,qBACpB;AACJ,SAAK,cAAU,gCAAoB,YAAY,gBAAgB;AAAA,MAC7D,GAAG;AAAA,MACH,kBAAkB,EAAE,gBAAgB;AAAA,IACtC,CAAC;AACD,SAAK,WAAW,KAAK,QAAQ;AAC7B,SAAK,kBAAc,8CAA0B,KAAK,OAAO;AACzD,SAAK,iBAAa,4CAAyB,KAAK,OAAO;AAAA,EACzD;AAAA;AAAA,EAGgB;AAAA;AAAA,EAEA;AAClB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { QumuloStorage } from "./qumuloStorage.js";
|
|
2
|
+
import type { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client";
|
|
3
|
+
import type { AbortSignalLike } from "@azure/abort-controller";
|
|
4
|
+
import type { 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: QumuloStorage, 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,108 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var restorePollerHelpers_exports = {};
|
|
19
|
+
__export(restorePollerHelpers_exports, {
|
|
20
|
+
restorePoller: () => restorePoller
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(restorePollerHelpers_exports);
|
|
23
|
+
var import_operations = require("./api/fileSystems/operations.js");
|
|
24
|
+
var import_pollingHelpers = require("./static-helpers/pollingHelpers.js");
|
|
25
|
+
var import_core_lro = require("@azure/core-lro");
|
|
26
|
+
function restorePoller(client, serializedState, sourceOperation, options) {
|
|
27
|
+
const pollerConfig = (0, import_core_lro.deserializeState)(serializedState).config;
|
|
28
|
+
const { initialRequestUrl, requestMethod, metadata } = pollerConfig;
|
|
29
|
+
if (!initialRequestUrl || !requestMethod) {
|
|
30
|
+
throw new Error(
|
|
31
|
+
`Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
const resourceLocationConfig = metadata?.["resourceLocationConfig"];
|
|
35
|
+
const { deserializer, expectedStatuses = [] } = getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};
|
|
36
|
+
const deserializeHelper = options?.processResponseBody ?? deserializer;
|
|
37
|
+
if (!deserializeHelper) {
|
|
38
|
+
throw new Error(
|
|
39
|
+
`Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
const apiVersion = getApiVersionFromUrl(initialRequestUrl);
|
|
43
|
+
return (0, import_pollingHelpers.getLongRunningPoller)(
|
|
44
|
+
client["_client"] ?? client,
|
|
45
|
+
deserializeHelper,
|
|
46
|
+
expectedStatuses,
|
|
47
|
+
{
|
|
48
|
+
updateIntervalInMs: options?.updateIntervalInMs,
|
|
49
|
+
abortSignal: options?.abortSignal,
|
|
50
|
+
resourceLocationConfig,
|
|
51
|
+
restoreFrom: serializedState,
|
|
52
|
+
initialRequestUrl,
|
|
53
|
+
apiVersion
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
const deserializeMap = {
|
|
58
|
+
"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Qumulo.Storage/fileSystems/{fileSystemName}": { deserializer: import_operations._$deleteDeserialize, expectedStatuses: ["202", "204", "200"] },
|
|
59
|
+
"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Qumulo.Storage/fileSystems/{fileSystemName}": { deserializer: import_operations._createOrUpdateDeserialize, expectedStatuses: ["200", "201", "202"] }
|
|
60
|
+
};
|
|
61
|
+
function getDeserializationHelper(urlStr, method) {
|
|
62
|
+
const path = new URL(urlStr).pathname;
|
|
63
|
+
const pathParts = path.split("/");
|
|
64
|
+
let matchedLen = -1, matchedValue;
|
|
65
|
+
for (const [key, value] of Object.entries(deserializeMap)) {
|
|
66
|
+
if (!key.startsWith(method)) {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
const candidatePath = getPathFromMapKey(key);
|
|
70
|
+
const candidateParts = candidatePath.split("/");
|
|
71
|
+
let found = true;
|
|
72
|
+
for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
|
|
73
|
+
if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) {
|
|
74
|
+
const start = candidateParts[i].indexOf("}") + 1, end = candidateParts[i]?.length;
|
|
75
|
+
const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(
|
|
76
|
+
pathParts[j] || ""
|
|
77
|
+
);
|
|
78
|
+
if (!isMatched) {
|
|
79
|
+
found = false;
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
if (candidateParts[i] !== pathParts[j]) {
|
|
85
|
+
found = false;
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (found && candidatePath.length > matchedLen) {
|
|
90
|
+
matchedLen = candidatePath.length;
|
|
91
|
+
matchedValue = value;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return matchedValue;
|
|
95
|
+
}
|
|
96
|
+
function getPathFromMapKey(mapKey) {
|
|
97
|
+
const pathStart = mapKey.indexOf("/");
|
|
98
|
+
return mapKey.slice(pathStart);
|
|
99
|
+
}
|
|
100
|
+
function getApiVersionFromUrl(urlStr) {
|
|
101
|
+
const url = new URL(urlStr);
|
|
102
|
+
return url.searchParams.get("api-version") ?? void 0;
|
|
103
|
+
}
|
|
104
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
105
|
+
0 && (module.exports = {
|
|
106
|
+
restorePoller
|
|
107
|
+
});
|
|
108
|
+
//# sourceMappingURL=restorePollerHelpers.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/restorePollerHelpers.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { QumuloStorage } from \"./qumuloStorage.js\";\nimport { _$deleteDeserialize, _createOrUpdateDeserialize } from \"./api/fileSystems/operations.js\";\nimport { getLongRunningPoller } from \"./static-helpers/pollingHelpers.js\";\nimport type { OperationOptions, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { PollerLike, OperationState, ResourceLocationConfig } from \"@azure/core-lro\";\nimport { deserializeState } from \"@azure/core-lro\";\n\nexport interface RestorePollerOptions<\n TResult,\n TResponse extends PathUncheckedResponse = PathUncheckedResponse,\n> extends OperationOptions {\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /**\n * The signal which can be used to abort requests.\n */\n abortSignal?: AbortSignalLike;\n /** Deserialization function for raw response body */\n processResponseBody?: (result: TResponse) => Promise<TResult>;\n}\n\n/**\n * Creates a poller from the serialized state of another poller. This can be\n * useful when you want to create pollers on a different host or a poller\n * needs to be constructed after the original one is not in scope.\n */\nexport function restorePoller<TResponse extends PathUncheckedResponse, TResult>(\n client: QumuloStorage,\n serializedState: string,\n sourceOperation: (...args: any[]) => PollerLike<OperationState<TResult>, TResult>,\n options?: RestorePollerOptions<TResult>,\n): PollerLike<OperationState<TResult>, TResult> {\n const pollerConfig = deserializeState(serializedState).config;\n const { initialRequestUrl, requestMethod, metadata } = pollerConfig;\n if (!initialRequestUrl || !requestMethod) {\n throw new Error(\n `Invalid serialized state: ${serializedState} for sourceOperation ${sourceOperation?.name}`,\n );\n }\n const resourceLocationConfig = metadata?.[\"resourceLocationConfig\"] as\n | ResourceLocationConfig\n | undefined;\n const { deserializer, expectedStatuses = [] } =\n getDeserializationHelper(initialRequestUrl, requestMethod) ?? {};\n const deserializeHelper = options?.processResponseBody ?? deserializer;\n if (!deserializeHelper) {\n throw new Error(\n `Please ensure the operation is in this client! We can't find its deserializeHelper for ${sourceOperation?.name}.`,\n );\n }\n const apiVersion = getApiVersionFromUrl(initialRequestUrl);\n return getLongRunningPoller(\n (client as any)[\"_client\"] ?? client,\n deserializeHelper as (result: TResponse) => Promise<TResult>,\n expectedStatuses,\n {\n updateIntervalInMs: options?.updateIntervalInMs,\n abortSignal: options?.abortSignal,\n resourceLocationConfig,\n restoreFrom: serializedState,\n initialRequestUrl,\n apiVersion,\n },\n );\n}\n\ninterface DeserializationHelper {\n deserializer: (result: PathUncheckedResponse) => Promise<any>;\n expectedStatuses: string[];\n}\n\nconst deserializeMap: Record<string, DeserializationHelper> = {\n \"DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Qumulo.Storage/fileSystems/{fileSystemName}\":\n { deserializer: _$deleteDeserialize, expectedStatuses: [\"202\", \"204\", \"200\"] },\n \"PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Qumulo.Storage/fileSystems/{fileSystemName}\":\n { deserializer: _createOrUpdateDeserialize, expectedStatuses: [\"200\", \"201\", \"202\"] },\n};\n\nfunction getDeserializationHelper(\n urlStr: string,\n method: string,\n): DeserializationHelper | undefined {\n const path = new URL(urlStr).pathname;\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: DeserializationHelper | undefined;\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(deserializeMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n\nfunction getApiVersionFromUrl(urlStr: string): string | undefined {\n const url = new URL(urlStr);\n return url.searchParams.get(\"api-version\") ?? undefined;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,wBAAgE;AAChE,4BAAqC;AAIrC,sBAAiC;AAqB1B,SAAS,cACd,QACA,iBACA,iBACA,SAC8C;AAC9C,QAAM,mBAAe,kCAAiB,eAAe,EAAE;AACvD,QAAM,EAAE,mBAAmB,eAAe,SAAS,IAAI;AACvD,MAAI,CAAC,qBAAqB,CAAC,eAAe;AACxC,UAAM,IAAI;AAAA,MACR,6BAA6B,eAAe,wBAAwB,iBAAiB,IAAI;AAAA,IAC3F;AAAA,EACF;AACA,QAAM,yBAAyB,WAAW,wBAAwB;AAGlE,QAAM,EAAE,cAAc,mBAAmB,CAAC,EAAE,IAC1C,yBAAyB,mBAAmB,aAAa,KAAK,CAAC;AACjE,QAAM,oBAAoB,SAAS,uBAAuB;AAC1D,MAAI,CAAC,mBAAmB;AACtB,UAAM,IAAI;AAAA,MACR,0FAA0F,iBAAiB,IAAI;AAAA,IACjH;AAAA,EACF;AACA,QAAM,aAAa,qBAAqB,iBAAiB;AACzD,aAAO;AAAA,IACJ,OAAe,SAAS,KAAK;AAAA,IAC9B;AAAA,IACA;AAAA,IACA;AAAA,MACE,oBAAoB,SAAS;AAAA,MAC7B,aAAa,SAAS;AAAA,MACtB;AAAA,MACA,aAAa;AAAA,MACb;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;AAOA,MAAM,iBAAwD;AAAA,EAC5D,mIACE,EAAE,cAAc,uCAAqB,kBAAkB,CAAC,OAAO,OAAO,KAAK,EAAE;AAAA,EAC/E,gIACE,EAAE,cAAc,8CAA4B,kBAAkB,CAAC,OAAO,OAAO,KAAK,EAAE;AACxF;AAEA,SAAS,yBACP,QACA,QACmC;AACnC,QAAM,OAAO,IAAI,IAAI,MAAM,EAAE;AAC7B,QAAM,YAAY,KAAK,MAAM,GAAG;AAKhC,MAAI,aAAa,IACf;AAGF,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,cAAc,GAAG;AAGzD,QAAI,CAAC,IAAI,WAAW,MAAM,GAAG;AAC3B;AAAA,IACF;AACA,UAAM,gBAAgB,kBAAkB,GAAG;AAE3C,UAAM,iBAAiB,cAAc,MAAM,GAAG;AAG9C,QAAI,QAAQ;AACZ,aAAS,IAAI,eAAe,SAAS,GAAG,IAAI,UAAU,SAAS,GAAG,KAAK,KAAK,KAAK,GAAG,KAAK,KAAK;AAC5F,UAAI,eAAe,CAAC,GAAG,WAAW,GAAG,KAAK,eAAe,CAAC,GAAG,QAAQ,GAAG,MAAM,IAAI;AAChF,cAAM,QAAQ,eAAe,CAAC,EAAG,QAAQ,GAAG,IAAI,GAC9C,MAAM,eAAe,CAAC,GAAG;AAK3B,cAAM,YAAY,IAAI,OAAO,GAAG,eAAe,CAAC,GAAG,MAAM,OAAO,GAAG,CAAC,EAAE,EAAE;AAAA,UACtE,UAAU,CAAC,KAAK;AAAA,QAClB;AAEA,YAAI,CAAC,WAAW;AACd,kBAAQ;AACR;AAAA,QACF;AACA;AAAA,MACF;AAKA,UAAI,eAAe,CAAC,MAAM,UAAU,CAAC,GAAG;AACtC,gBAAQ;AACR;AAAA,MACF;AAAA,IACF;AAIA,QAAI,SAAS,cAAc,SAAS,YAAY;AAC9C,mBAAa,cAAc;AAC3B,qBAAe;AAAA,IACjB;AAAA,EACF;AAEA,SAAO;AACT;AAEA,SAAS,kBAAkB,QAAwB;AACjD,QAAM,YAAY,OAAO,QAAQ,GAAG;AACpC,SAAO,OAAO,MAAM,SAAS;AAC/B;AAEA,SAAS,qBAAqB,QAAoC;AAChE,QAAM,MAAM,IAAI,IAAI,MAAM;AAC1B,SAAO,IAAI,aAAa,IAAI,aAAa,KAAK;AAChD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An enum to describe Azure Cloud environments.
|
|
3
|
+
* @enum {string}
|
|
4
|
+
*/
|
|
5
|
+
export declare enum AzureClouds {
|
|
6
|
+
/** Azure public cloud, which is the default cloud for Azure SDKs. */
|
|
7
|
+
AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD",
|
|
8
|
+
/** Azure China cloud */
|
|
9
|
+
AZURE_CHINA_CLOUD = "AZURE_CHINA_CLOUD",
|
|
10
|
+
/** Azure US government cloud */
|
|
11
|
+
AZURE_US_GOVERNMENT = "AZURE_US_GOVERNMENT"
|
|
12
|
+
}
|
|
13
|
+
/** The supported values for cloud setting as a string literal type */
|
|
14
|
+
export type AzureSupportedClouds = `${AzureClouds}`;
|
|
15
|
+
/**
|
|
16
|
+
* Gets the Azure Resource Manager endpoint URL for the specified cloud setting.
|
|
17
|
+
* @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values.
|
|
18
|
+
* @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined.
|
|
19
|
+
* @throws {Error} Throws an error if an unknown cloud setting is provided.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getArmEndpoint(cloudSetting?: AzureSupportedClouds): string | undefined;
|
|
22
|
+
//# sourceMappingURL=cloudSettingHelpers.d.ts.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var cloudSettingHelpers_exports = {};
|
|
19
|
+
__export(cloudSettingHelpers_exports, {
|
|
20
|
+
AzureClouds: () => AzureClouds,
|
|
21
|
+
getArmEndpoint: () => getArmEndpoint
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(cloudSettingHelpers_exports);
|
|
24
|
+
var AzureClouds = /* @__PURE__ */ ((AzureClouds2) => {
|
|
25
|
+
AzureClouds2["AZURE_PUBLIC_CLOUD"] = "AZURE_PUBLIC_CLOUD";
|
|
26
|
+
AzureClouds2["AZURE_CHINA_CLOUD"] = "AZURE_CHINA_CLOUD";
|
|
27
|
+
AzureClouds2["AZURE_US_GOVERNMENT"] = "AZURE_US_GOVERNMENT";
|
|
28
|
+
return AzureClouds2;
|
|
29
|
+
})(AzureClouds || {});
|
|
30
|
+
function getArmEndpoint(cloudSetting) {
|
|
31
|
+
if (cloudSetting === void 0) {
|
|
32
|
+
return void 0;
|
|
33
|
+
}
|
|
34
|
+
const cloudEndpoints = {
|
|
35
|
+
AZURE_CHINA_CLOUD: "https://management.chinacloudapi.cn/",
|
|
36
|
+
AZURE_US_GOVERNMENT: "https://management.usgovcloudapi.net/",
|
|
37
|
+
AZURE_PUBLIC_CLOUD: "https://management.azure.com/"
|
|
38
|
+
};
|
|
39
|
+
if (cloudSetting in cloudEndpoints) {
|
|
40
|
+
return cloudEndpoints[cloudSetting];
|
|
41
|
+
} else {
|
|
42
|
+
throw new Error(
|
|
43
|
+
`Unknown cloud setting: ${cloudSetting}. Please refer to the enum AzureClouds for possible values.`
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
AzureClouds,
|
|
50
|
+
getArmEndpoint
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=cloudSettingHelpers.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/static-helpers/cloudSettingHelpers.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * An enum to describe Azure Cloud environments.\n * @enum {string}\n */\nexport enum AzureClouds {\n /** Azure public cloud, which is the default cloud for Azure SDKs. */\n AZURE_PUBLIC_CLOUD = \"AZURE_PUBLIC_CLOUD\",\n /** Azure China cloud */\n AZURE_CHINA_CLOUD = \"AZURE_CHINA_CLOUD\",\n /** Azure US government cloud */\n AZURE_US_GOVERNMENT = \"AZURE_US_GOVERNMENT\",\n}\n\n/** The supported values for cloud setting as a string literal type */\nexport type AzureSupportedClouds = `${AzureClouds}`;\n\n/**\n * Gets the Azure Resource Manager endpoint URL for the specified cloud setting.\n * @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values.\n * @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined.\n * @throws {Error} Throws an error if an unknown cloud setting is provided.\n */\nexport function getArmEndpoint(cloudSetting?: AzureSupportedClouds): string | undefined {\n if (cloudSetting === undefined) {\n return undefined;\n }\n const cloudEndpoints: Record<keyof typeof AzureClouds, string> = {\n AZURE_CHINA_CLOUD: \"https://management.chinacloudapi.cn/\",\n AZURE_US_GOVERNMENT: \"https://management.usgovcloudapi.net/\",\n AZURE_PUBLIC_CLOUD: \"https://management.azure.com/\",\n };\n if (cloudSetting in cloudEndpoints) {\n return cloudEndpoints[cloudSetting];\n } else {\n throw new Error(\n `Unknown cloud setting: ${cloudSetting}. Please refer to the enum AzureClouds for possible values.`,\n );\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,IAAK,cAAL,kBAAKA,iBAAL;AAEL,EAAAA,aAAA,wBAAqB;AAErB,EAAAA,aAAA,uBAAoB;AAEpB,EAAAA,aAAA,yBAAsB;AANZ,SAAAA;AAAA,GAAA;AAkBL,SAAS,eAAe,cAAyD;AACtF,MAAI,iBAAiB,QAAW;AAC9B,WAAO;AAAA,EACT;AACA,QAAM,iBAA2D;AAAA,IAC/D,mBAAmB;AAAA,IACnB,qBAAqB;AAAA,IACrB,oBAAoB;AAAA,EACtB;AACA,MAAI,gBAAgB,gBAAgB;AAClC,WAAO,eAAe,YAAY;AAAA,EACpC,OAAO;AACL,UAAM,IAAI;AAAA,MACR,0BAA0B,YAAY;AAAA,IACxC;AAAA,EACF;AACF;",
|
|
6
|
+
"names": ["AzureClouds"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { 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
|
+
nextLinkMethod?: "GET" | "POST";
|
|
68
|
+
apiVersion?: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Helper to paginate results in a generic way and return a PagedAsyncIterableIterator
|
|
72
|
+
*/
|
|
73
|
+
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>;
|
|
74
|
+
//# sourceMappingURL=pagingHelpers.d.ts.map
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var pagingHelpers_exports = {};
|
|
19
|
+
__export(pagingHelpers_exports, {
|
|
20
|
+
buildPagedAsyncIterator: () => buildPagedAsyncIterator
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(pagingHelpers_exports);
|
|
23
|
+
var import_core_client = require("@azure-rest/core-client");
|
|
24
|
+
var import_core_rest_pipeline = require("@azure/core-rest-pipeline");
|
|
25
|
+
function buildPagedAsyncIterator(client, getInitialResponse, processResponseBody, expectedStatuses, options = {}) {
|
|
26
|
+
const itemName = options.itemName ?? "value";
|
|
27
|
+
const nextLinkName = options.nextLinkName ?? "nextLink";
|
|
28
|
+
const nextLinkMethod = options.nextLinkMethod ?? "GET";
|
|
29
|
+
const apiVersion = options.apiVersion;
|
|
30
|
+
const pagedResult = {
|
|
31
|
+
getPage: async (pageLink) => {
|
|
32
|
+
let result;
|
|
33
|
+
if (pageLink === void 0) {
|
|
34
|
+
result = await getInitialResponse();
|
|
35
|
+
} else {
|
|
36
|
+
const resolvedPageLink = apiVersion ? addApiVersionToUrl(pageLink, apiVersion) : pageLink;
|
|
37
|
+
result = nextLinkMethod === "POST" ? await client.pathUnchecked(resolvedPageLink).post() : await client.pathUnchecked(resolvedPageLink).get();
|
|
38
|
+
}
|
|
39
|
+
checkPagingRequest(result, expectedStatuses);
|
|
40
|
+
const results = await processResponseBody(result);
|
|
41
|
+
const nextLink = getNextLink(results, nextLinkName);
|
|
42
|
+
const values = getElements(results, itemName);
|
|
43
|
+
return {
|
|
44
|
+
page: values,
|
|
45
|
+
nextPageLink: nextLink
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
byPage: (settings) => {
|
|
49
|
+
const { continuationToken } = settings ?? {};
|
|
50
|
+
return getPageAsyncIterator(pagedResult, {
|
|
51
|
+
pageLink: continuationToken
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
return getPagedAsyncIterator(pagedResult);
|
|
56
|
+
}
|
|
57
|
+
function getPagedAsyncIterator(pagedResult) {
|
|
58
|
+
const iter = getItemAsyncIterator(pagedResult);
|
|
59
|
+
return {
|
|
60
|
+
next() {
|
|
61
|
+
return iter.next();
|
|
62
|
+
},
|
|
63
|
+
[Symbol.asyncIterator]() {
|
|
64
|
+
return this;
|
|
65
|
+
},
|
|
66
|
+
byPage: pagedResult?.byPage ?? ((settings) => {
|
|
67
|
+
const { continuationToken } = settings ?? {};
|
|
68
|
+
return getPageAsyncIterator(pagedResult, {
|
|
69
|
+
pageLink: continuationToken
|
|
70
|
+
});
|
|
71
|
+
})
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
async function* getItemAsyncIterator(pagedResult) {
|
|
75
|
+
const pages = getPageAsyncIterator(pagedResult);
|
|
76
|
+
for await (const page of pages) {
|
|
77
|
+
yield* page;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
async function* getPageAsyncIterator(pagedResult, options = {}) {
|
|
81
|
+
const { pageLink } = options;
|
|
82
|
+
let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);
|
|
83
|
+
if (!response) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
let result = response.page;
|
|
87
|
+
result.continuationToken = response.nextPageLink;
|
|
88
|
+
yield result;
|
|
89
|
+
while (response.nextPageLink) {
|
|
90
|
+
response = await pagedResult.getPage(response.nextPageLink);
|
|
91
|
+
if (!response) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
result = response.page;
|
|
95
|
+
result.continuationToken = response.nextPageLink;
|
|
96
|
+
yield result;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function getNextLink(body, nextLinkName) {
|
|
100
|
+
if (!nextLinkName) {
|
|
101
|
+
return void 0;
|
|
102
|
+
}
|
|
103
|
+
const nextLink = body[nextLinkName];
|
|
104
|
+
if (typeof nextLink !== "string" && typeof nextLink !== "undefined" && nextLink !== null) {
|
|
105
|
+
throw new import_core_rest_pipeline.RestError(
|
|
106
|
+
`Body Property ${nextLinkName} should be a string or undefined or null but got ${typeof nextLink}`
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
if (nextLink === null) {
|
|
110
|
+
return void 0;
|
|
111
|
+
}
|
|
112
|
+
return nextLink;
|
|
113
|
+
}
|
|
114
|
+
function getElements(body, itemName) {
|
|
115
|
+
const value = body[itemName];
|
|
116
|
+
if (!Array.isArray(value)) {
|
|
117
|
+
throw new import_core_rest_pipeline.RestError(
|
|
118
|
+
`Couldn't paginate response
|
|
119
|
+
Body doesn't contain an array property with name: ${itemName}`
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
return value ?? [];
|
|
123
|
+
}
|
|
124
|
+
function checkPagingRequest(response, expectedStatuses) {
|
|
125
|
+
if (!expectedStatuses.includes(response.status)) {
|
|
126
|
+
throw (0, import_core_client.createRestError)(
|
|
127
|
+
`Pagination failed with unexpected statusCode ${response.status}`,
|
|
128
|
+
response
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
function addApiVersionToUrl(url, apiVersion) {
|
|
133
|
+
const urlObj = new URL(url, "https://microsoft.com");
|
|
134
|
+
if (!urlObj.searchParams.get("api-version")) {
|
|
135
|
+
return `${url}${urlObj.search ? "&" : "?"}api-version=${apiVersion}`;
|
|
136
|
+
}
|
|
137
|
+
return url;
|
|
138
|
+
}
|
|
139
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
140
|
+
0 && (module.exports = {
|
|
141
|
+
buildPagedAsyncIterator
|
|
142
|
+
});
|
|
143
|
+
//# sourceMappingURL=pagingHelpers.js.map
|