@azure-rest/purview-administration 1.0.0-beta.1 → 1.0.0-beta.2
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 +3 -3
- package/README.md +11 -11
- package/dist/browser/account/clientDefinitions.d.ts +73 -0
- package/dist/browser/account/clientDefinitions.d.ts.map +1 -0
- package/dist/browser/account/clientDefinitions.js +4 -0
- package/dist/browser/account/clientDefinitions.js.map +1 -0
- package/dist/browser/account/index.d.ts +10 -0
- package/dist/browser/account/index.d.ts.map +1 -0
- package/dist/browser/account/index.js +12 -0
- package/dist/browser/account/index.js.map +1 -0
- package/dist/browser/account/isUnexpected.d.ts +16 -0
- package/dist/browser/account/isUnexpected.d.ts.map +1 -0
- package/dist/browser/account/isUnexpected.js +83 -0
- package/dist/browser/account/isUnexpected.js.map +1 -0
- package/dist/browser/account/models.d.ts +130 -0
- package/dist/browser/account/models.d.ts.map +1 -0
- package/dist/browser/account/models.js +4 -0
- package/dist/browser/account/models.js.map +1 -0
- package/dist/browser/account/outputModels.d.ts +337 -0
- package/dist/browser/account/outputModels.d.ts.map +1 -0
- package/dist/browser/account/outputModels.js +4 -0
- package/dist/browser/account/outputModels.js.map +1 -0
- package/dist/browser/account/paginateHelper.d.ts +68 -0
- package/dist/browser/account/paginateHelper.d.ts.map +1 -0
- package/dist/browser/account/paginateHelper.js +167 -0
- package/dist/browser/account/paginateHelper.js.map +1 -0
- package/dist/browser/account/parameters.d.ts +63 -0
- package/dist/browser/account/parameters.d.ts.map +1 -0
- package/dist/browser/account/parameters.js +4 -0
- package/dist/browser/account/parameters.js.map +1 -0
- package/dist/browser/account/purviewAccount.d.ts +16 -0
- package/dist/browser/account/purviewAccount.d.ts.map +1 -0
- package/dist/browser/account/purviewAccount.js +43 -0
- package/dist/browser/account/purviewAccount.js.map +1 -0
- package/dist/browser/account/responses.d.ts +145 -0
- package/dist/browser/account/responses.d.ts.map +1 -0
- package/dist/browser/account/responses.js +4 -0
- package/dist/browser/account/responses.js.map +1 -0
- package/dist/browser/index.d.ts +4 -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/metadataPolicies/clientDefinitions.d.ts +29 -0
- package/dist/browser/metadataPolicies/clientDefinitions.d.ts.map +1 -0
- package/dist/browser/metadataPolicies/clientDefinitions.js +4 -0
- package/dist/browser/metadataPolicies/clientDefinitions.js.map +1 -0
- package/dist/browser/metadataPolicies/index.d.ts +10 -0
- package/dist/browser/metadataPolicies/index.d.ts.map +1 -0
- package/dist/browser/metadataPolicies/index.js +12 -0
- package/dist/browser/metadataPolicies/index.js.map +1 -0
- package/dist/browser/metadataPolicies/isUnexpected.d.ts +6 -0
- package/dist/browser/metadataPolicies/isUnexpected.d.ts.map +1 -0
- package/dist/browser/metadataPolicies/isUnexpected.js +73 -0
- package/dist/browser/metadataPolicies/isUnexpected.js.map +1 -0
- package/dist/browser/metadataPolicies/models.d.ts +58 -0
- package/dist/browser/metadataPolicies/models.d.ts.map +1 -0
- package/dist/browser/metadataPolicies/models.js +4 -0
- package/dist/browser/metadataPolicies/models.js.map +1 -0
- package/dist/browser/metadataPolicies/outputModels.d.ts +113 -0
- package/dist/browser/metadataPolicies/outputModels.d.ts.map +1 -0
- package/dist/browser/metadataPolicies/outputModels.js +4 -0
- package/dist/browser/metadataPolicies/outputModels.js.map +1 -0
- package/dist/browser/metadataPolicies/paginateHelper.d.ts +72 -0
- package/dist/browser/metadataPolicies/paginateHelper.d.ts.map +1 -0
- package/dist/browser/metadataPolicies/paginateHelper.js +200 -0
- package/dist/browser/metadataPolicies/paginateHelper.js.map +1 -0
- package/dist/browser/metadataPolicies/parameters.d.ts +22 -0
- package/dist/browser/metadataPolicies/parameters.d.ts.map +1 -0
- package/dist/browser/metadataPolicies/parameters.js +4 -0
- package/dist/browser/metadataPolicies/parameters.js.map +1 -0
- package/dist/browser/metadataPolicies/purviewMetadataPolicies.d.ts +16 -0
- package/dist/browser/metadataPolicies/purviewMetadataPolicies.d.ts.map +1 -0
- package/dist/browser/metadataPolicies/purviewMetadataPolicies.js +43 -0
- package/dist/browser/metadataPolicies/purviewMetadataPolicies.js.map +1 -0
- package/dist/browser/metadataPolicies/responses.d.ts +64 -0
- package/dist/browser/metadataPolicies/responses.d.ts.map +1 -0
- package/dist/browser/metadataPolicies/responses.js +4 -0
- package/dist/browser/metadataPolicies/responses.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/commonjs/account/clientDefinitions.d.ts +73 -0
- package/dist/commonjs/account/clientDefinitions.d.ts.map +1 -0
- package/dist/commonjs/account/clientDefinitions.js +5 -0
- package/dist/commonjs/account/clientDefinitions.js.map +1 -0
- package/dist/commonjs/account/index.d.ts +10 -0
- package/dist/commonjs/account/index.d.ts.map +1 -0
- package/dist/commonjs/account/index.js +23 -0
- package/dist/commonjs/account/index.js.map +1 -0
- package/dist/commonjs/account/isUnexpected.d.ts +16 -0
- package/dist/commonjs/account/isUnexpected.d.ts.map +1 -0
- package/dist/commonjs/account/isUnexpected.js +86 -0
- package/dist/commonjs/account/isUnexpected.js.map +1 -0
- package/dist/commonjs/account/models.d.ts +130 -0
- package/dist/commonjs/account/models.d.ts.map +1 -0
- package/dist/commonjs/account/models.js +5 -0
- package/dist/commonjs/account/models.js.map +1 -0
- package/dist/commonjs/account/outputModels.d.ts +337 -0
- package/dist/commonjs/account/outputModels.d.ts.map +1 -0
- package/dist/commonjs/account/outputModels.js +5 -0
- package/dist/commonjs/account/outputModels.js.map +1 -0
- package/dist/commonjs/account/paginateHelper.d.ts +68 -0
- package/dist/commonjs/account/paginateHelper.d.ts.map +1 -0
- package/dist/commonjs/account/paginateHelper.js +170 -0
- package/dist/commonjs/account/paginateHelper.js.map +1 -0
- package/dist/commonjs/account/parameters.d.ts +63 -0
- package/dist/commonjs/account/parameters.d.ts.map +1 -0
- package/dist/commonjs/account/parameters.js +5 -0
- package/dist/commonjs/account/parameters.js.map +1 -0
- package/dist/commonjs/account/purviewAccount.d.ts +16 -0
- package/dist/commonjs/account/purviewAccount.d.ts.map +1 -0
- package/dist/commonjs/account/purviewAccount.js +46 -0
- package/dist/commonjs/account/purviewAccount.js.map +1 -0
- package/dist/commonjs/account/responses.d.ts +145 -0
- package/dist/commonjs/account/responses.d.ts.map +1 -0
- package/dist/commonjs/account/responses.js +5 -0
- package/dist/commonjs/account/responses.js.map +1 -0
- package/dist/commonjs/index.d.ts +4 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +11 -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/metadataPolicies/clientDefinitions.d.ts +29 -0
- package/dist/commonjs/metadataPolicies/clientDefinitions.d.ts.map +1 -0
- package/dist/commonjs/metadataPolicies/clientDefinitions.js +5 -0
- package/dist/commonjs/metadataPolicies/clientDefinitions.js.map +1 -0
- package/dist/commonjs/metadataPolicies/index.d.ts +10 -0
- package/dist/commonjs/metadataPolicies/index.d.ts.map +1 -0
- package/dist/commonjs/metadataPolicies/index.js +23 -0
- package/dist/commonjs/metadataPolicies/index.js.map +1 -0
- package/dist/commonjs/metadataPolicies/isUnexpected.d.ts +6 -0
- package/dist/commonjs/metadataPolicies/isUnexpected.d.ts.map +1 -0
- package/dist/commonjs/metadataPolicies/isUnexpected.js +76 -0
- package/dist/commonjs/metadataPolicies/isUnexpected.js.map +1 -0
- package/dist/commonjs/metadataPolicies/models.d.ts +58 -0
- package/dist/commonjs/metadataPolicies/models.d.ts.map +1 -0
- package/dist/commonjs/metadataPolicies/models.js +5 -0
- package/dist/commonjs/metadataPolicies/models.js.map +1 -0
- package/dist/commonjs/metadataPolicies/outputModels.d.ts +113 -0
- package/dist/commonjs/metadataPolicies/outputModels.d.ts.map +1 -0
- package/dist/commonjs/metadataPolicies/outputModels.js +5 -0
- package/dist/commonjs/metadataPolicies/outputModels.js.map +1 -0
- package/dist/commonjs/metadataPolicies/paginateHelper.d.ts +72 -0
- package/dist/commonjs/metadataPolicies/paginateHelper.d.ts.map +1 -0
- package/dist/commonjs/metadataPolicies/paginateHelper.js +203 -0
- package/dist/commonjs/metadataPolicies/paginateHelper.js.map +1 -0
- package/dist/commonjs/metadataPolicies/parameters.d.ts +22 -0
- package/dist/commonjs/metadataPolicies/parameters.d.ts.map +1 -0
- package/dist/commonjs/metadataPolicies/parameters.js +5 -0
- package/dist/commonjs/metadataPolicies/parameters.js.map +1 -0
- package/dist/commonjs/metadataPolicies/purviewMetadataPolicies.d.ts +16 -0
- package/dist/commonjs/metadataPolicies/purviewMetadataPolicies.d.ts.map +1 -0
- package/dist/commonjs/metadataPolicies/purviewMetadataPolicies.js +46 -0
- package/dist/commonjs/metadataPolicies/purviewMetadataPolicies.js.map +1 -0
- package/dist/commonjs/metadataPolicies/responses.d.ts +64 -0
- package/dist/commonjs/metadataPolicies/responses.d.ts.map +1 -0
- package/dist/commonjs/metadataPolicies/responses.js +5 -0
- package/dist/commonjs/metadataPolicies/responses.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/account/clientDefinitions.d.ts +73 -0
- package/dist/esm/account/clientDefinitions.d.ts.map +1 -0
- package/dist/esm/account/clientDefinitions.js +4 -0
- package/dist/esm/account/clientDefinitions.js.map +1 -0
- package/dist/esm/account/index.d.ts +10 -0
- package/dist/esm/account/index.d.ts.map +1 -0
- package/dist/esm/account/index.js +12 -0
- package/dist/esm/account/index.js.map +1 -0
- package/dist/esm/account/isUnexpected.d.ts +16 -0
- package/dist/esm/account/isUnexpected.d.ts.map +1 -0
- package/dist/esm/account/isUnexpected.js +83 -0
- package/dist/esm/account/isUnexpected.js.map +1 -0
- package/dist/esm/account/models.d.ts +130 -0
- package/dist/esm/account/models.d.ts.map +1 -0
- package/dist/esm/account/models.js +4 -0
- package/dist/esm/account/models.js.map +1 -0
- package/dist/esm/account/outputModels.d.ts +337 -0
- package/dist/esm/account/outputModels.d.ts.map +1 -0
- package/dist/esm/account/outputModels.js +4 -0
- package/dist/esm/account/outputModels.js.map +1 -0
- package/dist/esm/account/paginateHelper.d.ts +68 -0
- package/dist/esm/account/paginateHelper.d.ts.map +1 -0
- package/dist/esm/account/paginateHelper.js +167 -0
- package/dist/esm/account/paginateHelper.js.map +1 -0
- package/dist/esm/account/parameters.d.ts +63 -0
- package/dist/esm/account/parameters.d.ts.map +1 -0
- package/dist/esm/account/parameters.js +4 -0
- package/dist/esm/account/parameters.js.map +1 -0
- package/dist/esm/account/purviewAccount.d.ts +16 -0
- package/dist/esm/account/purviewAccount.d.ts.map +1 -0
- package/dist/esm/account/purviewAccount.js +43 -0
- package/dist/esm/account/purviewAccount.js.map +1 -0
- package/dist/esm/account/responses.d.ts +145 -0
- package/dist/esm/account/responses.d.ts.map +1 -0
- package/dist/esm/account/responses.js +4 -0
- package/dist/esm/account/responses.js.map +1 -0
- package/dist/esm/index.d.ts +4 -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/metadataPolicies/clientDefinitions.d.ts +29 -0
- package/dist/esm/metadataPolicies/clientDefinitions.d.ts.map +1 -0
- package/dist/esm/metadataPolicies/clientDefinitions.js +4 -0
- package/dist/esm/metadataPolicies/clientDefinitions.js.map +1 -0
- package/dist/esm/metadataPolicies/index.d.ts +10 -0
- package/dist/esm/metadataPolicies/index.d.ts.map +1 -0
- package/dist/esm/metadataPolicies/index.js +12 -0
- package/dist/esm/metadataPolicies/index.js.map +1 -0
- package/dist/esm/metadataPolicies/isUnexpected.d.ts +6 -0
- package/dist/esm/metadataPolicies/isUnexpected.d.ts.map +1 -0
- package/dist/esm/metadataPolicies/isUnexpected.js +73 -0
- package/dist/esm/metadataPolicies/isUnexpected.js.map +1 -0
- package/dist/esm/metadataPolicies/models.d.ts +58 -0
- package/dist/esm/metadataPolicies/models.d.ts.map +1 -0
- package/dist/esm/metadataPolicies/models.js +4 -0
- package/dist/esm/metadataPolicies/models.js.map +1 -0
- package/dist/esm/metadataPolicies/outputModels.d.ts +113 -0
- package/dist/esm/metadataPolicies/outputModels.d.ts.map +1 -0
- package/dist/esm/metadataPolicies/outputModels.js +4 -0
- package/dist/esm/metadataPolicies/outputModels.js.map +1 -0
- package/dist/esm/metadataPolicies/paginateHelper.d.ts +72 -0
- package/dist/esm/metadataPolicies/paginateHelper.d.ts.map +1 -0
- package/dist/esm/metadataPolicies/paginateHelper.js +200 -0
- package/dist/esm/metadataPolicies/paginateHelper.js.map +1 -0
- package/dist/esm/metadataPolicies/parameters.d.ts +22 -0
- package/dist/esm/metadataPolicies/parameters.d.ts.map +1 -0
- package/dist/esm/metadataPolicies/parameters.js +4 -0
- package/dist/esm/metadataPolicies/parameters.js.map +1 -0
- package/dist/esm/metadataPolicies/purviewMetadataPolicies.d.ts +16 -0
- package/dist/esm/metadataPolicies/purviewMetadataPolicies.d.ts.map +1 -0
- package/dist/esm/metadataPolicies/purviewMetadataPolicies.js +43 -0
- package/dist/esm/metadataPolicies/purviewMetadataPolicies.js.map +1 -0
- package/dist/esm/metadataPolicies/responses.d.ts +64 -0
- package/dist/esm/metadataPolicies/responses.d.ts.map +1 -0
- package/dist/esm/metadataPolicies/responses.js +4 -0
- package/dist/esm/metadataPolicies/responses.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/react-native/account/clientDefinitions.d.ts +73 -0
- package/dist/react-native/account/clientDefinitions.d.ts.map +1 -0
- package/dist/react-native/account/clientDefinitions.js +4 -0
- package/dist/react-native/account/clientDefinitions.js.map +1 -0
- package/dist/react-native/account/index.d.ts +10 -0
- package/dist/react-native/account/index.d.ts.map +1 -0
- package/dist/react-native/account/index.js +12 -0
- package/dist/react-native/account/index.js.map +1 -0
- package/dist/react-native/account/isUnexpected.d.ts +16 -0
- package/dist/react-native/account/isUnexpected.d.ts.map +1 -0
- package/dist/react-native/account/isUnexpected.js +83 -0
- package/dist/react-native/account/isUnexpected.js.map +1 -0
- package/dist/react-native/account/models.d.ts +130 -0
- package/dist/react-native/account/models.d.ts.map +1 -0
- package/dist/react-native/account/models.js +4 -0
- package/dist/react-native/account/models.js.map +1 -0
- package/dist/react-native/account/outputModels.d.ts +337 -0
- package/dist/react-native/account/outputModels.d.ts.map +1 -0
- package/dist/react-native/account/outputModels.js +4 -0
- package/dist/react-native/account/outputModels.js.map +1 -0
- package/dist/react-native/account/paginateHelper.d.ts +68 -0
- package/dist/react-native/account/paginateHelper.d.ts.map +1 -0
- package/dist/react-native/account/paginateHelper.js +167 -0
- package/dist/react-native/account/paginateHelper.js.map +1 -0
- package/dist/react-native/account/parameters.d.ts +63 -0
- package/dist/react-native/account/parameters.d.ts.map +1 -0
- package/dist/react-native/account/parameters.js +4 -0
- package/dist/react-native/account/parameters.js.map +1 -0
- package/dist/react-native/account/purviewAccount.d.ts +16 -0
- package/dist/react-native/account/purviewAccount.d.ts.map +1 -0
- package/dist/react-native/account/purviewAccount.js +43 -0
- package/dist/react-native/account/purviewAccount.js.map +1 -0
- package/dist/react-native/account/responses.d.ts +145 -0
- package/dist/react-native/account/responses.d.ts.map +1 -0
- package/dist/react-native/account/responses.js +4 -0
- package/dist/react-native/account/responses.js.map +1 -0
- package/dist/react-native/index.d.ts +4 -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/metadataPolicies/clientDefinitions.d.ts +29 -0
- package/dist/react-native/metadataPolicies/clientDefinitions.d.ts.map +1 -0
- package/dist/react-native/metadataPolicies/clientDefinitions.js +4 -0
- package/dist/react-native/metadataPolicies/clientDefinitions.js.map +1 -0
- package/dist/react-native/metadataPolicies/index.d.ts +10 -0
- package/dist/react-native/metadataPolicies/index.d.ts.map +1 -0
- package/dist/react-native/metadataPolicies/index.js +12 -0
- package/dist/react-native/metadataPolicies/index.js.map +1 -0
- package/dist/react-native/metadataPolicies/isUnexpected.d.ts +6 -0
- package/dist/react-native/metadataPolicies/isUnexpected.d.ts.map +1 -0
- package/dist/react-native/metadataPolicies/isUnexpected.js +73 -0
- package/dist/react-native/metadataPolicies/isUnexpected.js.map +1 -0
- package/dist/react-native/metadataPolicies/models.d.ts +58 -0
- package/dist/react-native/metadataPolicies/models.d.ts.map +1 -0
- package/dist/react-native/metadataPolicies/models.js +4 -0
- package/dist/react-native/metadataPolicies/models.js.map +1 -0
- package/dist/react-native/metadataPolicies/outputModels.d.ts +113 -0
- package/dist/react-native/metadataPolicies/outputModels.d.ts.map +1 -0
- package/dist/react-native/metadataPolicies/outputModels.js +4 -0
- package/dist/react-native/metadataPolicies/outputModels.js.map +1 -0
- package/dist/react-native/metadataPolicies/paginateHelper.d.ts +72 -0
- package/dist/react-native/metadataPolicies/paginateHelper.d.ts.map +1 -0
- package/dist/react-native/metadataPolicies/paginateHelper.js +200 -0
- package/dist/react-native/metadataPolicies/paginateHelper.js.map +1 -0
- package/dist/react-native/metadataPolicies/parameters.d.ts +22 -0
- package/dist/react-native/metadataPolicies/parameters.d.ts.map +1 -0
- package/dist/react-native/metadataPolicies/parameters.js +4 -0
- package/dist/react-native/metadataPolicies/parameters.js.map +1 -0
- package/dist/react-native/metadataPolicies/purviewMetadataPolicies.d.ts +16 -0
- package/dist/react-native/metadataPolicies/purviewMetadataPolicies.d.ts.map +1 -0
- package/dist/react-native/metadataPolicies/purviewMetadataPolicies.js +43 -0
- package/dist/react-native/metadataPolicies/purviewMetadataPolicies.js.map +1 -0
- package/dist/react-native/metadataPolicies/responses.d.ts +64 -0
- package/dist/react-native/metadataPolicies/responses.d.ts.map +1 -0
- package/dist/react-native/metadataPolicies/responses.js +4 -0
- package/dist/react-native/metadataPolicies/responses.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/package.json +83 -71
- package/CHANGELOG.md +0 -6
- package/dist/index.js +0 -283
- package/dist/index.js.map +0 -1
- package/dist-esm/src/account/clientDefinitions.js +0 -4
- package/dist-esm/src/account/clientDefinitions.js.map +0 -1
- package/dist-esm/src/account/index.js +0 -10
- package/dist-esm/src/account/index.js.map +0 -1
- package/dist-esm/src/account/models.js +0 -4
- package/dist-esm/src/account/models.js.map +0 -1
- package/dist-esm/src/account/paginateHelper.js +0 -70
- package/dist-esm/src/account/paginateHelper.js.map +0 -1
- package/dist-esm/src/account/parameters.js +0 -4
- package/dist-esm/src/account/parameters.js.map +0 -1
- package/dist-esm/src/account/purviewAccount.js +0 -13
- package/dist-esm/src/account/purviewAccount.js.map +0 -1
- package/dist-esm/src/account/responses.js +0 -4
- package/dist-esm/src/account/responses.js.map +0 -1
- package/dist-esm/src/index.js +0 -9
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/metadataPolicies/clientDefinitions.js +0 -4
- package/dist-esm/src/metadataPolicies/clientDefinitions.js.map +0 -1
- package/dist-esm/src/metadataPolicies/index.js +0 -10
- package/dist-esm/src/metadataPolicies/index.js.map +0 -1
- package/dist-esm/src/metadataPolicies/models.js +0 -4
- package/dist-esm/src/metadataPolicies/models.js.map +0 -1
- package/dist-esm/src/metadataPolicies/paginateHelper.js +0 -103
- package/dist-esm/src/metadataPolicies/paginateHelper.js.map +0 -1
- package/dist-esm/src/metadataPolicies/parameters.js +0 -4
- package/dist-esm/src/metadataPolicies/parameters.js.map +0 -1
- package/dist-esm/src/metadataPolicies/purviewMetadataPolicies.js +0 -13
- package/dist-esm/src/metadataPolicies/purviewMetadataPolicies.js.map +0 -1
- package/dist-esm/src/metadataPolicies/responses.js +0 -4
- package/dist-esm/src/metadataPolicies/responses.js.map +0 -1
- package/types/purview-administration-rest.d.ts +0 -1248
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/account/models.ts","../src/account/paginateHelper.ts","../src/account/parameters.ts","../src/account/clientDefinitions.ts","../src/account/responses.ts","../src/account/purviewAccount.ts","../src/account/index.ts","../src/metadataPolicies/models.ts","../src/metadataPolicies/paginateHelper.ts","../src/metadataPolicies/parameters.ts","../src/metadataPolicies/clientDefinitions.ts","../src/metadataPolicies/responses.ts","../src/metadataPolicies/purviewMetadataPolicies.ts","../src/metadataPolicies/index.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport interface Account {\n /** Gets or sets the identifier. */\n id?: string;\n /** Identity Info on the tracked resource */\n identity?: Identity;\n /** Gets or sets the location. */\n location?: string;\n /** Gets or sets the name. */\n name?: string;\n /** Gets or sets the properties. */\n properties?: AccountProperties;\n /** Gets or sets the Sku. */\n sku?: AccountSku;\n /** Metadata pertaining to creation and last modification of the resource. */\n systemData?: AccountSystemData;\n /** Tags on the azure resource. */\n tags?: Record<string, string>;\n /** Gets or sets the type. */\n type?: string;\n}\n\nexport interface Identity {\n /** Service principal object Id */\n principalId?: string;\n /** Tenant Id */\n tenantId?: string;\n /** Identity Type */\n type?: \"SystemAssigned\";\n}\n\nexport interface AccountProperties {\n /**\n * Cloud connectors.\n * External cloud identifier used as part of scanning configuration.\n */\n cloudConnectors?: CloudConnectors;\n /** Gets the time at which the entity was created. */\n createdAt?: Date;\n /** Gets the creator of the entity. */\n createdBy?: string;\n /** Gets the creators of the entity's object id. */\n createdByObjectId?: string;\n /** The URIs that are the public endpoints of the account. */\n endpoints?: AccountPropertiesEndpoints;\n /** Gets or sets the friendly name. */\n friendlyName?: string;\n /** Gets or sets the managed resource group name */\n managedResourceGroupName?: string;\n /** Gets the resource identifiers of the managed resources. */\n managedResources?: AccountPropertiesManagedResources;\n /** Gets the private endpoint connections information. */\n privateEndpointConnections?: Array<PrivateEndpointConnection>;\n /** Gets or sets the state of the provisioning. */\n provisioningState?:\n | \"Unknown\"\n | \"Creating\"\n | \"Moving\"\n | \"Deleting\"\n | \"SoftDeleting\"\n | \"SoftDeleted\"\n | \"Failed\"\n | \"Succeeded\"\n | \"Canceled\";\n /** Gets or sets the public network access. */\n publicNetworkAccess?: \"NotSpecified\" | \"Enabled\" | \"Disabled\";\n}\n\nexport interface CloudConnectors {\n /**\n * AWS external identifier.\n * Configured in AWS to allow use of the role arn used for scanning\n */\n awsExternalId?: string;\n}\n\nexport interface AccountEndpoints {\n /** Gets the catalog endpoint. */\n catalog?: string;\n /** Gets the guardian endpoint. */\n guardian?: string;\n /** Gets the scan endpoint. */\n scan?: string;\n}\n\nexport interface AccountPropertiesEndpoints extends AccountEndpoints {}\n\nexport interface ManagedResources {\n /** Gets the managed event hub namespace resource identifier. */\n eventHubNamespace?: string;\n /** Gets the managed resource group resource identifier. This resource group will host resource dependencies for the account. */\n resourceGroup?: string;\n /** Gets the managed storage account resource identifier. */\n storageAccount?: string;\n}\n\nexport interface AccountPropertiesManagedResources extends ManagedResources {}\n\nexport interface PrivateEndpointConnection {\n /** Gets or sets the identifier. */\n id?: string;\n /** Gets or sets the name. */\n name?: string;\n /** The connection identifier. */\n properties?: PrivateEndpointConnectionProperties;\n /** Gets or sets the type. */\n type?: string;\n}\n\nexport interface PrivateEndpointConnectionProperties {\n /** The private endpoint information. */\n privateEndpoint?: PrivateEndpoint;\n /** The private link service connection state. */\n privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState;\n /** The provisioning state. */\n provisioningState?: string;\n}\n\nexport interface PrivateEndpoint {\n /** The private endpoint identifier. */\n id?: string;\n}\n\nexport interface PrivateLinkServiceConnectionState {\n /** The required actions. */\n actionsRequired?: string;\n /** The description. */\n description?: string;\n /** The status. */\n status?: \"Unknown\" | \"Pending\" | \"Approved\" | \"Rejected\" | \"Disconnected\";\n}\n\nexport interface AccountSku {\n /** Gets or sets the sku capacity. Possible values include: 4, 16 */\n capacity?: number;\n /** Gets or sets the sku name. */\n name?: \"Standard\";\n}\n\nexport interface SystemData {\n /** The timestamp of resource creation (UTC). */\n createdAt?: Date;\n /** The identity that created the resource. */\n createdBy?: string;\n /** The type of identity that created the resource. */\n createdByType?: \"User\" | \"Application\" | \"ManagedIdentity\" | \"Key\";\n /** The timestamp of the last modification the resource (UTC). */\n lastModifiedAt?: Date;\n /** The identity that last modified the resource. */\n lastModifiedBy?: string;\n /** The type of identity that last modified the resource. */\n lastModifiedByType?: \"User\" | \"Application\" | \"ManagedIdentity\" | \"Key\";\n}\n\nexport interface AccountSystemData extends SystemData {}\n\nexport interface ErrorResponseModel {\n /** Gets or sets the error. */\n error?: ErrorResponseModelError;\n}\n\nexport interface ErrorModel {\n /** Gets or sets the code. */\n code?: string;\n /** Gets or sets the details. */\n details?: Array<ErrorModel>;\n /** Gets or sets the messages. */\n message?: string;\n /** Gets or sets the target. */\n target?: string;\n}\n\nexport interface ErrorResponseModelError extends ErrorModel {}\n\nexport interface DataPlaneAccountUpdateParameters {\n /** The friendly name for the azure resource. */\n friendlyName?: string;\n}\n\nexport interface AccessKeys {\n /** Gets or sets the primary connection string. */\n atlasKafkaPrimaryEndpoint?: string;\n /** Gets or sets the secondary connection string. */\n atlasKafkaSecondaryEndpoint?: string;\n}\n\nexport interface AccessKeyOptions {\n /** The access key type. */\n keyType?: \"PrimaryAtlasKafkaKey\" | \"SecondaryAtlasKafkaKey\";\n}\n\nexport interface Collection {\n /** Gets the state of the provisioning. */\n collectionProvisioningState?:\n | \"Unknown\"\n | \"Creating\"\n | \"Moving\"\n | \"Deleting\"\n | \"Failed\"\n | \"Succeeded\";\n /** Gets or sets the description. */\n description?: string;\n /** Gets or sets the friendly name of the collection. */\n friendlyName?: string;\n /** Gets the name. */\n name?: string;\n /** Gets or sets the parent collection reference. */\n parentCollection?: CollectionReference;\n /** Metadata pertaining to creation and last modification of the resource. */\n systemData?: CollectionSystemData;\n}\n\nexport interface CollectionReference {\n /** Gets or sets the reference name. */\n referenceName?: string;\n /** Gets or sets the reference type property. */\n type?: string;\n}\n\nexport interface CollectionSystemData extends SystemData {}\n\nexport interface CollectionList {\n /** Total item count. */\n count?: number;\n /** The Url of next result page. */\n nextLink?: string;\n /** Collection of items of type results. */\n value: Array<Collection>;\n}\n\nexport interface CollectionNameResponseList {\n /** Total item count. */\n count?: number;\n /** The Url of next result page. */\n nextLink?: string;\n /** Collection of items of type results. */\n value: Array<CollectionNameResponse>;\n}\n\nexport interface CollectionNameResponse {\n /** Gets or sets the friendly name of the collection. */\n friendlyName?: string;\n /** Gets the name. */\n name?: string;\n}\n\nexport interface CollectionPathResponse {\n /** The friendly names of ancestors starting from the default (root) collection and ending with the immediate parent. */\n parentFriendlyNameChain?: Array<string>;\n /** The names of ancestors starting from the default (root) collection and ending with the immediate parent. */\n parentNameChain?: Array<string>;\n}\n\nexport interface ResourceSetRuleConfig {\n /** Gets or sets the advanced resource set property of the account. */\n advancedResourceSet?: AdvancedResourceSet;\n /** The name of the rule */\n name?: string;\n /** The configuration rules for path pattern extraction. */\n pathPatternConfig?: PathPatternExtractorConfig;\n}\n\nexport interface AdvancedResourceSet {\n /** Date at which ResourceSetProcessing property of the account is updated. */\n modifiedAt?: Date;\n /** The advanced resource property of the account. */\n resourceSetProcessing?: \"Default\" | \"Advanced\";\n}\n\nexport interface PathPatternExtractorConfig {\n acceptedPatterns?: Array<Filter>;\n complexReplacers?: Array<ComplexReplacerConfig>;\n createdBy: string;\n enableDefaultPatterns: boolean;\n lastUpdatedTimestamp?: number;\n modifiedBy?: string;\n normalizationRules?: Array<NormalizationRule>;\n regexReplacers?: Array<RegexReplacer>;\n rejectedPatterns?: Array<Filter>;\n scopedRules?: Array<ScopedRule>;\n version?: number;\n}\n\nexport interface Filter {\n createdBy?: string;\n filterType?: \"Pattern\" | \"Regex\";\n lastUpdatedTimestamp?: number;\n modifiedBy?: string;\n name: string;\n path: string;\n}\n\nexport interface ComplexReplacerConfig {\n createdBy?: string;\n description?: string;\n disabled?: boolean;\n disableRecursiveReplacerApplication?: boolean;\n lastUpdatedTimestamp?: number;\n modifiedBy?: string;\n name?: string;\n typeName?: string;\n}\n\nexport interface NormalizationRule {\n description?: string;\n disabled?: boolean;\n dynamicReplacement?: boolean;\n entityTypes?: Array<string>;\n lastUpdatedTimestamp?: number;\n name?: string;\n regex?: FastRegex;\n replaceWith?: string;\n version?: number;\n}\n\nexport interface FastRegex {\n maxDigits?: number;\n maxLetters?: number;\n minDashes?: number;\n minDigits?: number;\n minDigitsOrLetters?: number;\n minDots?: number;\n minHex?: number;\n minLetters?: number;\n minUnderscores?: number;\n options?: number;\n regexStr?: string;\n}\n\nexport interface RegexReplacer {\n condition?: string;\n createdBy?: string;\n description?: string;\n disabled: boolean;\n disableRecursiveReplacerApplication?: boolean;\n doNotReplaceRegex?: FastRegex;\n lastUpdatedTimestamp?: number;\n modifiedBy?: string;\n name: string;\n regex?: FastRegex;\n replaceWith?: string;\n}\n\nexport interface ScopedRule {\n bindingUrl: string;\n rules?: Array<Rule>;\n storeType: string;\n}\n\nexport interface Rule {\n displayName?: string;\n isResourceSet?: boolean;\n lastUpdatedTimestamp?: number;\n name?: string;\n qualifiedName: string;\n}\n\nexport interface ResourceSetRuleConfigList {\n /** Total item count. */\n count?: number;\n /** The Url of next result page. */\n nextLink?: string;\n /** Collection of items of type results. */\n value: Array<ResourceSetRuleConfig>;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getPagedAsyncIterator, PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { Client, createRestError, PathUncheckedResponse } from \"@azure-rest/core-client\";\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (\n pageLink: string,\n maxPageSize?: number\n) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends {\n body: { value?: infer TPage };\n}\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {}\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n const itemName = \"value\";\n const nextLinkName = \"nextLink\";\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\"200\", \"201\", \"202\", \"203\", \"204\", \"205\", \"206\", \"207\", \"208\", \"226\"];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response\n );\n }\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport {\n AccessKeyOptions,\n Collection,\n DataPlaneAccountUpdateParameters,\n ResourceSetRuleConfig,\n} from \"./models\";\n\nexport type AccountsGetAccountPropertiesParameters = RequestParameters;\n\nexport interface AccountsUpdateAccountPropertiesBodyParam {\n body: DataPlaneAccountUpdateParameters;\n}\n\nexport type AccountsUpdateAccountPropertiesParameters = AccountsUpdateAccountPropertiesBodyParam &\n RequestParameters;\nexport type AccountsGetAccessKeysParameters = RequestParameters;\n\nexport interface AccountsRegenerateAccessKeyBodyParam {\n body: AccessKeyOptions;\n}\n\nexport type AccountsRegenerateAccessKeyParameters = AccountsRegenerateAccessKeyBodyParam &\n RequestParameters;\nexport type CollectionsGetCollectionParameters = RequestParameters;\n\nexport interface CollectionsCreateOrUpdateCollectionBodyParam {\n body: Collection;\n}\n\nexport type CollectionsCreateOrUpdateCollectionParameters = CollectionsCreateOrUpdateCollectionBodyParam &\n RequestParameters;\nexport type CollectionsDeleteCollectionParameters = RequestParameters;\n\nexport interface CollectionsListCollectionsQueryParamProperties {\n $skipToken?: string;\n}\n\nexport interface CollectionsListCollectionsQueryParam {\n queryParameters?: CollectionsListCollectionsQueryParamProperties;\n}\n\nexport type CollectionsListCollectionsParameters = CollectionsListCollectionsQueryParam &\n RequestParameters;\n\nexport interface CollectionsListChildCollectionNamesQueryParamProperties {\n $skipToken?: string;\n}\n\nexport interface CollectionsListChildCollectionNamesQueryParam {\n queryParameters?: CollectionsListChildCollectionNamesQueryParamProperties;\n}\n\nexport type CollectionsListChildCollectionNamesParameters = CollectionsListChildCollectionNamesQueryParam &\n RequestParameters;\nexport type CollectionsGetCollectionPathParameters = RequestParameters;\nexport type ResourceSetRulesGetResourceSetRuleParameters = RequestParameters;\n\nexport interface ResourceSetRulesCreateOrUpdateResourceSetRuleBodyParam {\n body: ResourceSetRuleConfig;\n}\n\nexport type ResourceSetRulesCreateOrUpdateResourceSetRuleParameters = ResourceSetRulesCreateOrUpdateResourceSetRuleBodyParam &\n RequestParameters;\nexport type ResourceSetRulesDeleteResourceSetRuleParameters = RequestParameters;\n\nexport interface ResourceSetRulesListResourceSetRulesQueryParamProperties {\n $skipToken?: string;\n}\n\nexport interface ResourceSetRulesListResourceSetRulesQueryParam {\n queryParameters?: ResourceSetRulesListResourceSetRulesQueryParamProperties;\n}\n\nexport type ResourceSetRulesListResourceSetRulesParameters = ResourceSetRulesListResourceSetRulesQueryParam &\n RequestParameters;\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Client } from \"@azure-rest/core-client\";\nimport {\n AccountsGetAccessKeysParameters,\n AccountsGetAccountPropertiesParameters,\n AccountsRegenerateAccessKeyParameters,\n AccountsUpdateAccountPropertiesParameters,\n CollectionsCreateOrUpdateCollectionParameters,\n CollectionsDeleteCollectionParameters,\n CollectionsGetCollectionParameters,\n CollectionsGetCollectionPathParameters,\n CollectionsListChildCollectionNamesParameters,\n CollectionsListCollectionsParameters,\n ResourceSetRulesCreateOrUpdateResourceSetRuleParameters,\n ResourceSetRulesDeleteResourceSetRuleParameters,\n ResourceSetRulesGetResourceSetRuleParameters,\n ResourceSetRulesListResourceSetRulesParameters,\n} from \"./parameters\";\nimport {\n AccountsGetAccessKeys200Response,\n AccountsGetAccessKeysdefaultResponse,\n AccountsGetAccountProperties200Response,\n AccountsGetAccountPropertiesdefaultResponse,\n AccountsRegenerateAccessKey200Response,\n AccountsRegenerateAccessKeydefaultResponse,\n AccountsUpdateAccountProperties200Response,\n AccountsUpdateAccountPropertiesdefaultResponse,\n CollectionsCreateOrUpdateCollection200Response,\n CollectionsCreateOrUpdateCollectiondefaultResponse,\n CollectionsDeleteCollection204Response,\n CollectionsDeleteCollectiondefaultResponse,\n CollectionsGetCollection200Response,\n CollectionsGetCollectiondefaultResponse,\n CollectionsGetCollectionPath200Response,\n CollectionsGetCollectionPathdefaultResponse,\n CollectionsListChildCollectionNames200Response,\n CollectionsListChildCollectionNamesdefaultResponse,\n CollectionsListCollections200Response,\n CollectionsListCollectionsdefaultResponse,\n ResourceSetRulesCreateOrUpdateResourceSetRule200Response,\n ResourceSetRulesCreateOrUpdateResourceSetRuledefaultResponse,\n ResourceSetRulesDeleteResourceSetRule200Response,\n ResourceSetRulesDeleteResourceSetRule204Response,\n ResourceSetRulesDeleteResourceSetRuledefaultResponse,\n ResourceSetRulesGetResourceSetRule200Response,\n ResourceSetRulesGetResourceSetRuledefaultResponse,\n ResourceSetRulesListResourceSetRules200Response,\n ResourceSetRulesListResourceSetRulesdefaultResponse,\n} from \"./responses\";\n\nexport interface AccountsGetAccountProperties {\n /** Get an account */\n get(\n options?: AccountsGetAccountPropertiesParameters\n ): Promise<AccountsGetAccountProperties200Response | AccountsGetAccountPropertiesdefaultResponse>;\n /** Updates an account */\n patch(\n options: AccountsUpdateAccountPropertiesParameters\n ): Promise<\n AccountsUpdateAccountProperties200Response | AccountsUpdateAccountPropertiesdefaultResponse\n >;\n}\n\nexport interface AccountsGetAccessKeys {\n /** List the authorization keys associated with this account. */\n post(\n options?: AccountsGetAccessKeysParameters\n ): Promise<AccountsGetAccessKeys200Response | AccountsGetAccessKeysdefaultResponse>;\n}\n\nexport interface AccountsRegenerateAccessKey {\n /** Regenerate the authorization keys associated with this data catalog. */\n post(\n options: AccountsRegenerateAccessKeyParameters\n ): Promise<AccountsRegenerateAccessKey200Response | AccountsRegenerateAccessKeydefaultResponse>;\n}\n\nexport interface CollectionsGetCollection {\n /** Get a collection */\n get(\n options?: CollectionsGetCollectionParameters\n ): Promise<CollectionsGetCollection200Response | CollectionsGetCollectiondefaultResponse>;\n /** Creates or updates a collection entity. */\n put(\n options: CollectionsCreateOrUpdateCollectionParameters\n ): Promise<\n | CollectionsCreateOrUpdateCollection200Response\n | CollectionsCreateOrUpdateCollectiondefaultResponse\n >;\n /** Deletes a Collection entity. */\n delete(\n options?: CollectionsDeleteCollectionParameters\n ): Promise<CollectionsDeleteCollection204Response | CollectionsDeleteCollectiondefaultResponse>;\n}\n\nexport interface CollectionsListCollections {\n /** List the collections in the account. */\n get(\n options?: CollectionsListCollectionsParameters\n ): Promise<CollectionsListCollections200Response | CollectionsListCollectionsdefaultResponse>;\n}\n\nexport interface CollectionsListChildCollectionNames {\n /** Lists the child collections names in the collection. */\n get(\n options?: CollectionsListChildCollectionNamesParameters\n ): Promise<\n | CollectionsListChildCollectionNames200Response\n | CollectionsListChildCollectionNamesdefaultResponse\n >;\n}\n\nexport interface CollectionsGetCollectionPath {\n /** Gets the parent name and parent friendly name chains that represent the collection path. */\n get(\n options?: CollectionsGetCollectionPathParameters\n ): Promise<CollectionsGetCollectionPath200Response | CollectionsGetCollectionPathdefaultResponse>;\n}\n\nexport interface ResourceSetRulesGetResourceSetRule {\n /** Get a resource set config service model. */\n get(\n options?: ResourceSetRulesGetResourceSetRuleParameters\n ): Promise<\n | ResourceSetRulesGetResourceSetRule200Response\n | ResourceSetRulesGetResourceSetRuledefaultResponse\n >;\n /** Creates or updates an resource set config. */\n put(\n options: ResourceSetRulesCreateOrUpdateResourceSetRuleParameters\n ): Promise<\n | ResourceSetRulesCreateOrUpdateResourceSetRule200Response\n | ResourceSetRulesCreateOrUpdateResourceSetRuledefaultResponse\n >;\n /** Deletes a ResourceSetRuleConfig resource. */\n delete(\n options?: ResourceSetRulesDeleteResourceSetRuleParameters\n ): Promise<\n | ResourceSetRulesDeleteResourceSetRule200Response\n | ResourceSetRulesDeleteResourceSetRule204Response\n | ResourceSetRulesDeleteResourceSetRuledefaultResponse\n >;\n}\n\nexport interface ResourceSetRulesListResourceSetRules {\n /** Get a resource set config service model. */\n get(\n options?: ResourceSetRulesListResourceSetRulesParameters\n ): Promise<\n | ResourceSetRulesListResourceSetRules200Response\n | ResourceSetRulesListResourceSetRulesdefaultResponse\n >;\n}\n\nexport interface Routes {\n /** Resource for '/' has methods for the following verbs: get, patch */\n (path: \"/\"): AccountsGetAccountProperties;\n /** Resource for '/listkeys' has methods for the following verbs: post */\n (path: \"/listkeys\"): AccountsGetAccessKeys;\n /** Resource for '/regeneratekeys' has methods for the following verbs: post */\n (path: \"/regeneratekeys\"): AccountsRegenerateAccessKey;\n /** Resource for '/collections/\\{collectionName\\}' has methods for the following verbs: get, put, delete */\n (path: \"/collections/{collectionName}\", collectionName: string): CollectionsGetCollection;\n /** Resource for '/collections' has methods for the following verbs: get */\n (path: \"/collections\"): CollectionsListCollections;\n /** Resource for '/collections/\\{collectionName\\}/getChildCollectionNames' has methods for the following verbs: get */\n (\n path: \"/collections/{collectionName}/getChildCollectionNames\",\n collectionName: string\n ): CollectionsListChildCollectionNames;\n /** Resource for '/collections/\\{collectionName\\}/getCollectionPath' has methods for the following verbs: get */\n (\n path: \"/collections/{collectionName}/getCollectionPath\",\n collectionName: string\n ): CollectionsGetCollectionPath;\n /** Resource for '/resourceSetRuleConfigs/defaultResourceSetRuleConfig' has methods for the following verbs: get, put, delete */\n (\n path: \"/resourceSetRuleConfigs/defaultResourceSetRuleConfig\"\n ): ResourceSetRulesGetResourceSetRule;\n /** Resource for '/resourceSetRuleConfigs' has methods for the following verbs: get */\n (path: \"/resourceSetRuleConfigs\"): ResourceSetRulesListResourceSetRules;\n}\n\nexport type PurviewAccountRestClient = Client & {\n path: Routes;\n};\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpResponse } from \"@azure-rest/core-client\";\nimport {\n AccessKeys,\n Account,\n Collection,\n CollectionList,\n CollectionNameResponseList,\n CollectionPathResponse,\n ErrorResponseModel,\n ResourceSetRuleConfig,\n ResourceSetRuleConfigList,\n} from \"./models\";\n\n/** Get an account */\nexport interface AccountsGetAccountProperties200Response extends HttpResponse {\n status: \"200\";\n body: Account;\n}\n\n/** Get an account */\nexport interface AccountsGetAccountPropertiesdefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Updates an account */\nexport interface AccountsUpdateAccountProperties200Response extends HttpResponse {\n status: \"200\";\n body: Account;\n}\n\n/** Updates an account */\nexport interface AccountsUpdateAccountPropertiesdefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** List the authorization keys associated with this account. */\nexport interface AccountsGetAccessKeys200Response extends HttpResponse {\n status: \"200\";\n body: AccessKeys;\n}\n\n/** List the authorization keys associated with this account. */\nexport interface AccountsGetAccessKeysdefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Regenerate the authorization keys associated with this data catalog. */\nexport interface AccountsRegenerateAccessKey200Response extends HttpResponse {\n status: \"200\";\n body: AccessKeys;\n}\n\n/** Regenerate the authorization keys associated with this data catalog. */\nexport interface AccountsRegenerateAccessKeydefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Get a collection */\nexport interface CollectionsGetCollection200Response extends HttpResponse {\n status: \"200\";\n body: Collection;\n}\n\n/** Get a collection */\nexport interface CollectionsGetCollectiondefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Creates or updates a collection entity. */\nexport interface CollectionsCreateOrUpdateCollection200Response extends HttpResponse {\n status: \"200\";\n body: Collection;\n}\n\n/** Creates or updates a collection entity. */\nexport interface CollectionsCreateOrUpdateCollectiondefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Deletes a Collection entity. */\nexport interface CollectionsDeleteCollection204Response extends HttpResponse {\n status: \"204\";\n body: Record<string, unknown>;\n}\n\n/** Deletes a Collection entity. */\nexport interface CollectionsDeleteCollectiondefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** List the collections in the account. */\nexport interface CollectionsListCollections200Response extends HttpResponse {\n status: \"200\";\n body: CollectionList;\n}\n\n/** List the collections in the account. */\nexport interface CollectionsListCollectionsdefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Lists the child collections names in the collection. */\nexport interface CollectionsListChildCollectionNames200Response extends HttpResponse {\n status: \"200\";\n body: CollectionNameResponseList;\n}\n\n/** Lists the child collections names in the collection. */\nexport interface CollectionsListChildCollectionNamesdefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Gets the parent name and parent friendly name chains that represent the collection path. */\nexport interface CollectionsGetCollectionPath200Response extends HttpResponse {\n status: \"200\";\n body: CollectionPathResponse;\n}\n\n/** Gets the parent name and parent friendly name chains that represent the collection path. */\nexport interface CollectionsGetCollectionPathdefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Get a resource set config service model. */\nexport interface ResourceSetRulesGetResourceSetRule200Response extends HttpResponse {\n status: \"200\";\n body: ResourceSetRuleConfig;\n}\n\n/** Get a resource set config service model. */\nexport interface ResourceSetRulesGetResourceSetRuledefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Creates or updates an resource set config. */\nexport interface ResourceSetRulesCreateOrUpdateResourceSetRule200Response extends HttpResponse {\n status: \"200\";\n body: ResourceSetRuleConfig;\n}\n\n/** Creates or updates an resource set config. */\nexport interface ResourceSetRulesCreateOrUpdateResourceSetRuledefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Deletes a ResourceSetRuleConfig resource. */\nexport interface ResourceSetRulesDeleteResourceSetRule200Response extends HttpResponse {\n status: \"200\";\n body: Record<string, unknown>;\n}\n\n/** Deletes a ResourceSetRuleConfig resource. */\nexport interface ResourceSetRulesDeleteResourceSetRule204Response extends HttpResponse {\n status: \"204\";\n body: Record<string, unknown>;\n}\n\n/** Deletes a ResourceSetRuleConfig resource. */\nexport interface ResourceSetRulesDeleteResourceSetRuledefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Get a resource set config service model. */\nexport interface ResourceSetRulesListResourceSetRules200Response extends HttpResponse {\n status: \"200\";\n body: ResourceSetRuleConfigList;\n}\n\n/** Get a resource set config service model. */\nexport interface ResourceSetRulesListResourceSetRulesdefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { PurviewAccountRestClient } from \"./clientDefinitions\";\n\nexport function PurviewAccountClient(\n endpoint: string,\n credentials: TokenCredential,\n options: ClientOptions = {}\n): PurviewAccountRestClient {\n const baseUrl = options.baseUrl ?? `${endpoint}`;\n options.apiVersion = options.apiVersion ?? \"2019-11-01-preview\";\n options = {\n ...options,\n credentials: {\n scopes: [\"https://purview.azure.net/.default\"],\n },\n };\n\n return getClient(baseUrl, credentials, options) as PurviewAccountRestClient;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as Models from \"./models\";\nimport * as Pagination from \"./paginateHelper\";\nimport * as Parameters from \"./parameters\";\nimport * as Client from \"./clientDefinitions\";\nimport * as Responses from \"./responses\";\nexport { Models, Pagination, Parameters, Client, Responses };\nexport { PurviewAccountClient } from \"./purviewAccount\";\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport interface MetadataRoleList {\n values: Array<MetadataRole>;\n nextLink?: string;\n}\n\nexport interface MetadataRole {\n /** The Id of role */\n id?: string;\n /** The name of role */\n name?: string;\n /** The type of role */\n type?: string;\n properties?: MetadataRoleProperties;\n}\n\nexport interface MetadataRoleProperties {\n /** The provisioningState of role */\n provisioningState?: string;\n /** The type of role */\n roleType?: string;\n /** The friendly name of role */\n friendlyName?: string;\n /** The description of role */\n description?: string;\n /** The cnf Condition for a rule */\n cnfCondition?: Array<Array<AttributeMatcher>>;\n /** The dnf Condition for a rule */\n dnfCondition?: Array<Array<AttributeMatcher>>;\n /** The version of role */\n version?: number;\n}\n\nexport interface AttributeMatcher {\n /** AttributeName */\n attributeName?: string;\n /** Value for attribute */\n attributeValueIncludes?: string;\n /** List of values for attribute */\n attributeValueIncludedIn?: Array<string>;\n /** Value excluded for attribute */\n attributeValueExcludes?: string;\n /** List of values excluded for attribute */\n attributeValueExcludedIn?: Array<string>;\n}\n\nexport interface ErrorResponseModel {\n /** The error model for metadata policy */\n error: ErrorModel;\n}\n\nexport interface ErrorModel {\n /** The error code */\n code: string;\n /** The error message */\n message: string;\n /** The error target */\n target?: string;\n /** The error details */\n details?: Array<ErrorModel>;\n}\n\nexport interface MetadataPolicyList {\n values: Array<MetadataPolicy>;\n nextLink?: string;\n}\n\nexport interface MetadataPolicy {\n /** The name of policy */\n name?: string;\n /** The id of policy */\n id?: string;\n /** The version of policy */\n version?: number;\n properties?: MetadataPolicyProperties;\n}\n\nexport interface MetadataPolicyProperties {\n /** The description of policy */\n description?: string;\n /** The DecisionRules of policy */\n decisionRules?: Array<DecisionRule>;\n /** The AttributeRules of policy */\n attributeRules?: Array<AttributeRule>;\n /** The collection reference for a policy */\n collection?: CollectionReference;\n /** The parent collection of the policy */\n parentCollectionName?: string;\n}\n\nexport interface DecisionRule {\n /** The kind of rule */\n kind?: \"decisionrule\" | \"attributerule\";\n /** The effect for rule */\n effect?: \"Deny\" | \"Permit\";\n /** The dnf Condition for a rule */\n dnfCondition?: Array<Array<AttributeMatcher>>;\n}\n\nexport interface AttributeRule {\n /** The kind of rule */\n kind?: \"decisionrule\" | \"attributerule\";\n /** The id for rule */\n id?: string;\n /** The name for rule */\n name?: string;\n /** The dnf Condition for a rule */\n dnfCondition?: Array<Array<AttributeMatcher>>;\n}\n\nexport interface CollectionReference {\n /** The type of reference */\n type?: string;\n /** The name of reference */\n referenceName?: string;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getPagedAsyncIterator, PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { Client, createRestError, PathUncheckedResponse } from \"@azure-rest/core-client\";\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (\n pageLink: string,\n maxPageSize?: number\n) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends\n | {\n body: { value?: infer TPage };\n }\n | {\n body: { values?: infer TPage };\n }\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {}\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n // We need to check the response for success before trying to inspect it looking for\n // the properties to use for nextLink and itemName\n checkPagingRequest(initialResponse);\n const { itemName, nextLinkName } = getPaginationProperties(initialResponse);\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\"200\", \"201\", \"202\", \"203\", \"204\", \"205\", \"206\", \"207\", \"208\", \"226\"];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response\n );\n }\n}\n\n/**\n * Extracts the itemName and nextLinkName from the initial response to use them for pagination\n */\nfunction getPaginationProperties(initialResponse: PathUncheckedResponse) {\n // Build a set with the passed custom nextLinkNames\n const nextLinkNames = new Set([\"nextLink\"]);\n\n // Build a set with the passed custom set of itemNames\n const itemNames = new Set([\"value\", \"values\"]);\n\n let nextLinkName: string | undefined;\n let itemName: string | undefined;\n\n for (const name of nextLinkNames) {\n const nextLink = (initialResponse.body as Record<string, unknown>)[name] as string;\n if (nextLink) {\n nextLinkName = name;\n break;\n }\n }\n\n for (const name of itemNames) {\n const item = (initialResponse.body as Record<string, unknown>)[name] as string;\n if (item) {\n itemName = name;\n break;\n }\n }\n\n if (!itemName) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${[\n ...itemNames,\n ].join(\" OR \")}`\n );\n }\n\n return { itemName, nextLinkName };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport { MetadataPolicy } from \"./models\";\n\nexport type MetadataRolesListParameters = RequestParameters;\n\nexport interface MetadataPolicyListAllQueryParamProperties {\n /** The name of an existing collection for which one policy needs to be fetched. */\n collectionName?: string;\n}\n\nexport interface MetadataPolicyListAllQueryParam {\n queryParameters?: MetadataPolicyListAllQueryParamProperties;\n}\n\nexport type MetadataPolicyListAllParameters = MetadataPolicyListAllQueryParam & RequestParameters;\n\nexport interface MetadataPolicyUpdateBodyParam {\n /** Policy to be updated. */\n body?: MetadataPolicy;\n}\n\nexport type MetadataPolicyUpdateParameters = MetadataPolicyUpdateBodyParam & RequestParameters;\nexport type MetadataPolicyGetParameters = RequestParameters;\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Client } from \"@azure-rest/core-client\";\nimport {\n MetadataPolicyGetParameters,\n MetadataPolicyListAllParameters,\n MetadataPolicyUpdateParameters,\n MetadataRolesListParameters,\n} from \"./parameters\";\nimport {\n MetadataPolicyGet200Response,\n MetadataPolicyGetdefaultResponse,\n MetadataPolicyListAll200Response,\n MetadataPolicyListAlldefaultResponse,\n MetadataPolicyUpdate200Response,\n MetadataPolicyUpdatedefaultResponse,\n MetadataRolesList200Response,\n MetadataRolesListdefaultResponse,\n} from \"./responses\";\n\nexport interface MetadataRolesList {\n /** Lists roles for Purview Account */\n get(\n options?: MetadataRolesListParameters\n ): Promise<MetadataRolesList200Response | MetadataRolesListdefaultResponse>;\n}\n\nexport interface MetadataPolicyListAll {\n /** List or Get metadata policies */\n get(\n options?: MetadataPolicyListAllParameters\n ): Promise<MetadataPolicyListAll200Response | MetadataPolicyListAlldefaultResponse>;\n}\n\nexport interface MetadataPolicyUpdate {\n /** Updates a metadata policy */\n put(\n options?: MetadataPolicyUpdateParameters\n ): Promise<MetadataPolicyUpdate200Response | MetadataPolicyUpdatedefaultResponse>;\n /** Gets a metadata policy */\n get(\n options?: MetadataPolicyGetParameters\n ): Promise<MetadataPolicyGet200Response | MetadataPolicyGetdefaultResponse>;\n}\n\nexport interface Routes {\n /** Resource for '/metadataRoles' has methods for the following verbs: get */\n (path: \"/metadataRoles\"): MetadataRolesList;\n /** Resource for '/metadataPolicies' has methods for the following verbs: get */\n (path: \"/metadataPolicies\"): MetadataPolicyListAll;\n /** Resource for '/metadataPolicies/\\{policyId\\}' has methods for the following verbs: put, get */\n (path: \"/metadataPolicies/{policyId}\", policyId: string): MetadataPolicyUpdate;\n}\n\nexport type PurviewMetadataPoliciesRestClient = Client & {\n path: Routes;\n};\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpResponse } from \"@azure-rest/core-client\";\nimport { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { ErrorResponseModel, MetadataPolicy, MetadataPolicyList, MetadataRoleList } from \"./models\";\n\n/** Lists roles for Purview Account */\nexport interface MetadataRolesList200Response extends HttpResponse {\n status: \"200\";\n body: MetadataRoleList;\n}\n\nexport interface MetadataRolesListdefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** Lists roles for Purview Account */\nexport interface MetadataRolesListdefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n headers: RawHttpHeaders & MetadataRolesListdefaultHeaders;\n}\n\n/** List or Get metadata policies */\nexport interface MetadataPolicyListAll200Response extends HttpResponse {\n status: \"200\";\n body: MetadataPolicyList;\n}\n\nexport interface MetadataPolicyListAlldefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** List or Get metadata policies */\nexport interface MetadataPolicyListAlldefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n headers: RawHttpHeaders & MetadataPolicyListAlldefaultHeaders;\n}\n\n/** Updates a metadata policy */\nexport interface MetadataPolicyUpdate200Response extends HttpResponse {\n status: \"200\";\n body: MetadataPolicy;\n}\n\nexport interface MetadataPolicyUpdatedefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** Updates a metadata policy */\nexport interface MetadataPolicyUpdatedefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n headers: RawHttpHeaders & MetadataPolicyUpdatedefaultHeaders;\n}\n\n/** Gets a metadata policy */\nexport interface MetadataPolicyGet200Response extends HttpResponse {\n status: \"200\";\n body: MetadataPolicy;\n}\n\nexport interface MetadataPolicyGetdefaultHeaders {\n /** The error code */\n \"x-ms-error-code\"?: string;\n}\n\n/** Gets a metadata policy */\nexport interface MetadataPolicyGetdefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n headers: RawHttpHeaders & MetadataPolicyGetdefaultHeaders;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { PurviewMetadataPoliciesRestClient } from \"./clientDefinitions\";\n\nexport function PurviewMetadataPoliciesClient(\n Endpoint: string,\n credentials: TokenCredential,\n options: ClientOptions = {}\n): PurviewMetadataPoliciesRestClient {\n const baseUrl = options.baseUrl ?? `${Endpoint}/policyStore`;\n options.apiVersion = options.apiVersion ?? \"2021-07-01-preview\";\n options = {\n ...options,\n credentials: {\n scopes: [\"https://purview.azure.net/.default\"],\n },\n };\n\n return getClient(baseUrl, credentials, options) as PurviewMetadataPoliciesRestClient;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as Models from \"./models\";\nimport * as Pagination from \"./paginateHelper\";\nimport * as Parameters from \"./parameters\";\nimport * as Client from \"./clientDefinitions\";\nimport * as Responses from \"./responses\";\nexport { PurviewMetadataPoliciesClient } from \"./purviewMetadataPolicies\";\nexport { Models, Pagination, Parameters, Client, Responses };\n"],"names":["getPagedAsyncIterator","createRestError","getClient","paginate","checkPagingRequest","getNextLink","getElements"],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../../src/account/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Client } from \"@azure-rest/core-client\";\nimport {\n AccountsGetAccessKeysParameters,\n AccountsGetAccountPropertiesParameters,\n AccountsRegenerateAccessKeyParameters,\n AccountsUpdateAccountPropertiesParameters,\n CollectionsCreateOrUpdateCollectionParameters,\n CollectionsDeleteCollectionParameters,\n CollectionsGetCollectionParameters,\n CollectionsGetCollectionPathParameters,\n CollectionsListChildCollectionNamesParameters,\n CollectionsListCollectionsParameters,\n ResourceSetRulesCreateOrUpdateResourceSetRuleParameters,\n ResourceSetRulesDeleteResourceSetRuleParameters,\n ResourceSetRulesGetResourceSetRuleParameters,\n ResourceSetRulesListResourceSetRulesParameters,\n} from \"./parameters\";\nimport {\n AccountsGetAccessKeys200Response,\n AccountsGetAccessKeysdefaultResponse,\n AccountsGetAccountProperties200Response,\n AccountsGetAccountPropertiesdefaultResponse,\n AccountsRegenerateAccessKey200Response,\n AccountsRegenerateAccessKeydefaultResponse,\n AccountsUpdateAccountProperties200Response,\n AccountsUpdateAccountPropertiesdefaultResponse,\n CollectionsCreateOrUpdateCollection200Response,\n CollectionsCreateOrUpdateCollectiondefaultResponse,\n CollectionsDeleteCollection204Response,\n CollectionsDeleteCollectiondefaultResponse,\n CollectionsGetCollection200Response,\n CollectionsGetCollectiondefaultResponse,\n CollectionsGetCollectionPath200Response,\n CollectionsGetCollectionPathdefaultResponse,\n CollectionsListChildCollectionNames200Response,\n CollectionsListChildCollectionNamesdefaultResponse,\n CollectionsListCollections200Response,\n CollectionsListCollectionsdefaultResponse,\n ResourceSetRulesCreateOrUpdateResourceSetRule200Response,\n ResourceSetRulesCreateOrUpdateResourceSetRuledefaultResponse,\n ResourceSetRulesDeleteResourceSetRule200Response,\n ResourceSetRulesDeleteResourceSetRule204Response,\n ResourceSetRulesDeleteResourceSetRuledefaultResponse,\n ResourceSetRulesGetResourceSetRule200Response,\n ResourceSetRulesGetResourceSetRuledefaultResponse,\n ResourceSetRulesListResourceSetRules200Response,\n ResourceSetRulesListResourceSetRulesdefaultResponse,\n} from \"./responses\";\n\nexport interface AccountsGetAccountProperties {\n /** Get an account */\n get(\n options?: AccountsGetAccountPropertiesParameters\n ): Promise<AccountsGetAccountProperties200Response | AccountsGetAccountPropertiesdefaultResponse>;\n /** Updates an account */\n patch(\n options: AccountsUpdateAccountPropertiesParameters\n ): Promise<\n AccountsUpdateAccountProperties200Response | AccountsUpdateAccountPropertiesdefaultResponse\n >;\n}\n\nexport interface AccountsGetAccessKeys {\n /** List the authorization keys associated with this account. */\n post(\n options?: AccountsGetAccessKeysParameters\n ): Promise<AccountsGetAccessKeys200Response | AccountsGetAccessKeysdefaultResponse>;\n}\n\nexport interface AccountsRegenerateAccessKey {\n /** Regenerate the authorization keys associated with this data catalog. */\n post(\n options: AccountsRegenerateAccessKeyParameters\n ): Promise<AccountsRegenerateAccessKey200Response | AccountsRegenerateAccessKeydefaultResponse>;\n}\n\nexport interface CollectionsGetCollection {\n /** Get a collection */\n get(\n options?: CollectionsGetCollectionParameters\n ): Promise<CollectionsGetCollection200Response | CollectionsGetCollectiondefaultResponse>;\n /** Creates or updates a collection entity. */\n put(\n options: CollectionsCreateOrUpdateCollectionParameters\n ): Promise<\n | CollectionsCreateOrUpdateCollection200Response\n | CollectionsCreateOrUpdateCollectiondefaultResponse\n >;\n /** Deletes a Collection entity. */\n delete(\n options?: CollectionsDeleteCollectionParameters\n ): Promise<CollectionsDeleteCollection204Response | CollectionsDeleteCollectiondefaultResponse>;\n}\n\nexport interface CollectionsListCollections {\n /** List the collections in the account. */\n get(\n options?: CollectionsListCollectionsParameters\n ): Promise<CollectionsListCollections200Response | CollectionsListCollectionsdefaultResponse>;\n}\n\nexport interface CollectionsListChildCollectionNames {\n /** Lists the child collections names in the collection. */\n get(\n options?: CollectionsListChildCollectionNamesParameters\n ): Promise<\n | CollectionsListChildCollectionNames200Response\n | CollectionsListChildCollectionNamesdefaultResponse\n >;\n}\n\nexport interface CollectionsGetCollectionPath {\n /** Gets the parent name and parent friendly name chains that represent the collection path. */\n get(\n options?: CollectionsGetCollectionPathParameters\n ): Promise<CollectionsGetCollectionPath200Response | CollectionsGetCollectionPathdefaultResponse>;\n}\n\nexport interface ResourceSetRulesGetResourceSetRule {\n /** Get a resource set config service model. */\n get(\n options?: ResourceSetRulesGetResourceSetRuleParameters\n ): Promise<\n | ResourceSetRulesGetResourceSetRule200Response\n | ResourceSetRulesGetResourceSetRuledefaultResponse\n >;\n /** Creates or updates an resource set config. */\n put(\n options: ResourceSetRulesCreateOrUpdateResourceSetRuleParameters\n ): Promise<\n | ResourceSetRulesCreateOrUpdateResourceSetRule200Response\n | ResourceSetRulesCreateOrUpdateResourceSetRuledefaultResponse\n >;\n /** Deletes a ResourceSetRuleConfig resource. */\n delete(\n options?: ResourceSetRulesDeleteResourceSetRuleParameters\n ): Promise<\n | ResourceSetRulesDeleteResourceSetRule200Response\n | ResourceSetRulesDeleteResourceSetRule204Response\n | ResourceSetRulesDeleteResourceSetRuledefaultResponse\n >;\n}\n\nexport interface ResourceSetRulesListResourceSetRules {\n /** Get a resource set config service model. */\n get(\n options?: ResourceSetRulesListResourceSetRulesParameters\n ): Promise<\n | ResourceSetRulesListResourceSetRules200Response\n | ResourceSetRulesListResourceSetRulesdefaultResponse\n >;\n}\n\nexport interface Routes {\n /** Resource for '/' has methods for the following verbs: get, patch */\n (path: \"/\"): AccountsGetAccountProperties;\n /** Resource for '/listkeys' has methods for the following verbs: post */\n (path: \"/listkeys\"): AccountsGetAccessKeys;\n /** Resource for '/regeneratekeys' has methods for the following verbs: post */\n (path: \"/regeneratekeys\"): AccountsRegenerateAccessKey;\n /** Resource for '/collections/\\{collectionName\\}' has methods for the following verbs: get, put, delete */\n (path: \"/collections/{collectionName}\", collectionName: string): CollectionsGetCollection;\n /** Resource for '/collections' has methods for the following verbs: get */\n (path: \"/collections\"): CollectionsListCollections;\n /** Resource for '/collections/\\{collectionName\\}/getChildCollectionNames' has methods for the following verbs: get */\n (\n path: \"/collections/{collectionName}/getChildCollectionNames\",\n collectionName: string\n ): CollectionsListChildCollectionNames;\n /** Resource for '/collections/\\{collectionName\\}/getCollectionPath' has methods for the following verbs: get */\n (\n path: \"/collections/{collectionName}/getCollectionPath\",\n collectionName: string\n ): CollectionsGetCollectionPath;\n /** Resource for '/resourceSetRuleConfigs/defaultResourceSetRuleConfig' has methods for the following verbs: get, put, delete */\n (\n path: \"/resourceSetRuleConfigs/defaultResourceSetRuleConfig\"\n ): ResourceSetRulesGetResourceSetRule;\n /** Resource for '/resourceSetRuleConfigs' has methods for the following verbs: get */\n (path: \"/resourceSetRuleConfigs\"): ResourceSetRulesListResourceSetRules;\n}\n\nexport type PurviewAccountRestClient = Client & {\n path: Routes;\n};\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
import * as Models from "./models";
|
|
4
|
-
import * as Pagination from "./paginateHelper";
|
|
5
|
-
import * as Parameters from "./parameters";
|
|
6
|
-
import * as Client from "./clientDefinitions";
|
|
7
|
-
import * as Responses from "./responses";
|
|
8
|
-
export { Models, Pagination, Parameters, Client, Responses };
|
|
9
|
-
export { PurviewAccountClient } from "./purviewAccount";
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/account/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as Models from \"./models\";\nimport * as Pagination from \"./paginateHelper\";\nimport * as Parameters from \"./parameters\";\nimport * as Client from \"./clientDefinitions\";\nimport * as Responses from \"./responses\";\nexport { Models, Pagination, Parameters, Client, Responses };\nexport { PurviewAccountClient } from \"./purviewAccount\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/account/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport interface Account {\n /** Gets or sets the identifier. */\n id?: string;\n /** Identity Info on the tracked resource */\n identity?: Identity;\n /** Gets or sets the location. */\n location?: string;\n /** Gets or sets the name. */\n name?: string;\n /** Gets or sets the properties. */\n properties?: AccountProperties;\n /** Gets or sets the Sku. */\n sku?: AccountSku;\n /** Metadata pertaining to creation and last modification of the resource. */\n systemData?: AccountSystemData;\n /** Tags on the azure resource. */\n tags?: Record<string, string>;\n /** Gets or sets the type. */\n type?: string;\n}\n\nexport interface Identity {\n /** Service principal object Id */\n principalId?: string;\n /** Tenant Id */\n tenantId?: string;\n /** Identity Type */\n type?: \"SystemAssigned\";\n}\n\nexport interface AccountProperties {\n /**\n * Cloud connectors.\n * External cloud identifier used as part of scanning configuration.\n */\n cloudConnectors?: CloudConnectors;\n /** Gets the time at which the entity was created. */\n createdAt?: Date;\n /** Gets the creator of the entity. */\n createdBy?: string;\n /** Gets the creators of the entity's object id. */\n createdByObjectId?: string;\n /** The URIs that are the public endpoints of the account. */\n endpoints?: AccountPropertiesEndpoints;\n /** Gets or sets the friendly name. */\n friendlyName?: string;\n /** Gets or sets the managed resource group name */\n managedResourceGroupName?: string;\n /** Gets the resource identifiers of the managed resources. */\n managedResources?: AccountPropertiesManagedResources;\n /** Gets the private endpoint connections information. */\n privateEndpointConnections?: Array<PrivateEndpointConnection>;\n /** Gets or sets the state of the provisioning. */\n provisioningState?:\n | \"Unknown\"\n | \"Creating\"\n | \"Moving\"\n | \"Deleting\"\n | \"SoftDeleting\"\n | \"SoftDeleted\"\n | \"Failed\"\n | \"Succeeded\"\n | \"Canceled\";\n /** Gets or sets the public network access. */\n publicNetworkAccess?: \"NotSpecified\" | \"Enabled\" | \"Disabled\";\n}\n\nexport interface CloudConnectors {\n /**\n * AWS external identifier.\n * Configured in AWS to allow use of the role arn used for scanning\n */\n awsExternalId?: string;\n}\n\nexport interface AccountEndpoints {\n /** Gets the catalog endpoint. */\n catalog?: string;\n /** Gets the guardian endpoint. */\n guardian?: string;\n /** Gets the scan endpoint. */\n scan?: string;\n}\n\nexport interface AccountPropertiesEndpoints extends AccountEndpoints {}\n\nexport interface ManagedResources {\n /** Gets the managed event hub namespace resource identifier. */\n eventHubNamespace?: string;\n /** Gets the managed resource group resource identifier. This resource group will host resource dependencies for the account. */\n resourceGroup?: string;\n /** Gets the managed storage account resource identifier. */\n storageAccount?: string;\n}\n\nexport interface AccountPropertiesManagedResources extends ManagedResources {}\n\nexport interface PrivateEndpointConnection {\n /** Gets or sets the identifier. */\n id?: string;\n /** Gets or sets the name. */\n name?: string;\n /** The connection identifier. */\n properties?: PrivateEndpointConnectionProperties;\n /** Gets or sets the type. */\n type?: string;\n}\n\nexport interface PrivateEndpointConnectionProperties {\n /** The private endpoint information. */\n privateEndpoint?: PrivateEndpoint;\n /** The private link service connection state. */\n privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState;\n /** The provisioning state. */\n provisioningState?: string;\n}\n\nexport interface PrivateEndpoint {\n /** The private endpoint identifier. */\n id?: string;\n}\n\nexport interface PrivateLinkServiceConnectionState {\n /** The required actions. */\n actionsRequired?: string;\n /** The description. */\n description?: string;\n /** The status. */\n status?: \"Unknown\" | \"Pending\" | \"Approved\" | \"Rejected\" | \"Disconnected\";\n}\n\nexport interface AccountSku {\n /** Gets or sets the sku capacity. Possible values include: 4, 16 */\n capacity?: number;\n /** Gets or sets the sku name. */\n name?: \"Standard\";\n}\n\nexport interface SystemData {\n /** The timestamp of resource creation (UTC). */\n createdAt?: Date;\n /** The identity that created the resource. */\n createdBy?: string;\n /** The type of identity that created the resource. */\n createdByType?: \"User\" | \"Application\" | \"ManagedIdentity\" | \"Key\";\n /** The timestamp of the last modification the resource (UTC). */\n lastModifiedAt?: Date;\n /** The identity that last modified the resource. */\n lastModifiedBy?: string;\n /** The type of identity that last modified the resource. */\n lastModifiedByType?: \"User\" | \"Application\" | \"ManagedIdentity\" | \"Key\";\n}\n\nexport interface AccountSystemData extends SystemData {}\n\nexport interface ErrorResponseModel {\n /** Gets or sets the error. */\n error?: ErrorResponseModelError;\n}\n\nexport interface ErrorModel {\n /** Gets or sets the code. */\n code?: string;\n /** Gets or sets the details. */\n details?: Array<ErrorModel>;\n /** Gets or sets the messages. */\n message?: string;\n /** Gets or sets the target. */\n target?: string;\n}\n\nexport interface ErrorResponseModelError extends ErrorModel {}\n\nexport interface DataPlaneAccountUpdateParameters {\n /** The friendly name for the azure resource. */\n friendlyName?: string;\n}\n\nexport interface AccessKeys {\n /** Gets or sets the primary connection string. */\n atlasKafkaPrimaryEndpoint?: string;\n /** Gets or sets the secondary connection string. */\n atlasKafkaSecondaryEndpoint?: string;\n}\n\nexport interface AccessKeyOptions {\n /** The access key type. */\n keyType?: \"PrimaryAtlasKafkaKey\" | \"SecondaryAtlasKafkaKey\";\n}\n\nexport interface Collection {\n /** Gets the state of the provisioning. */\n collectionProvisioningState?:\n | \"Unknown\"\n | \"Creating\"\n | \"Moving\"\n | \"Deleting\"\n | \"Failed\"\n | \"Succeeded\";\n /** Gets or sets the description. */\n description?: string;\n /** Gets or sets the friendly name of the collection. */\n friendlyName?: string;\n /** Gets the name. */\n name?: string;\n /** Gets or sets the parent collection reference. */\n parentCollection?: CollectionReference;\n /** Metadata pertaining to creation and last modification of the resource. */\n systemData?: CollectionSystemData;\n}\n\nexport interface CollectionReference {\n /** Gets or sets the reference name. */\n referenceName?: string;\n /** Gets or sets the reference type property. */\n type?: string;\n}\n\nexport interface CollectionSystemData extends SystemData {}\n\nexport interface CollectionList {\n /** Total item count. */\n count?: number;\n /** The Url of next result page. */\n nextLink?: string;\n /** Collection of items of type results. */\n value: Array<Collection>;\n}\n\nexport interface CollectionNameResponseList {\n /** Total item count. */\n count?: number;\n /** The Url of next result page. */\n nextLink?: string;\n /** Collection of items of type results. */\n value: Array<CollectionNameResponse>;\n}\n\nexport interface CollectionNameResponse {\n /** Gets or sets the friendly name of the collection. */\n friendlyName?: string;\n /** Gets the name. */\n name?: string;\n}\n\nexport interface CollectionPathResponse {\n /** The friendly names of ancestors starting from the default (root) collection and ending with the immediate parent. */\n parentFriendlyNameChain?: Array<string>;\n /** The names of ancestors starting from the default (root) collection and ending with the immediate parent. */\n parentNameChain?: Array<string>;\n}\n\nexport interface ResourceSetRuleConfig {\n /** Gets or sets the advanced resource set property of the account. */\n advancedResourceSet?: AdvancedResourceSet;\n /** The name of the rule */\n name?: string;\n /** The configuration rules for path pattern extraction. */\n pathPatternConfig?: PathPatternExtractorConfig;\n}\n\nexport interface AdvancedResourceSet {\n /** Date at which ResourceSetProcessing property of the account is updated. */\n modifiedAt?: Date;\n /** The advanced resource property of the account. */\n resourceSetProcessing?: \"Default\" | \"Advanced\";\n}\n\nexport interface PathPatternExtractorConfig {\n acceptedPatterns?: Array<Filter>;\n complexReplacers?: Array<ComplexReplacerConfig>;\n createdBy: string;\n enableDefaultPatterns: boolean;\n lastUpdatedTimestamp?: number;\n modifiedBy?: string;\n normalizationRules?: Array<NormalizationRule>;\n regexReplacers?: Array<RegexReplacer>;\n rejectedPatterns?: Array<Filter>;\n scopedRules?: Array<ScopedRule>;\n version?: number;\n}\n\nexport interface Filter {\n createdBy?: string;\n filterType?: \"Pattern\" | \"Regex\";\n lastUpdatedTimestamp?: number;\n modifiedBy?: string;\n name: string;\n path: string;\n}\n\nexport interface ComplexReplacerConfig {\n createdBy?: string;\n description?: string;\n disabled?: boolean;\n disableRecursiveReplacerApplication?: boolean;\n lastUpdatedTimestamp?: number;\n modifiedBy?: string;\n name?: string;\n typeName?: string;\n}\n\nexport interface NormalizationRule {\n description?: string;\n disabled?: boolean;\n dynamicReplacement?: boolean;\n entityTypes?: Array<string>;\n lastUpdatedTimestamp?: number;\n name?: string;\n regex?: FastRegex;\n replaceWith?: string;\n version?: number;\n}\n\nexport interface FastRegex {\n maxDigits?: number;\n maxLetters?: number;\n minDashes?: number;\n minDigits?: number;\n minDigitsOrLetters?: number;\n minDots?: number;\n minHex?: number;\n minLetters?: number;\n minUnderscores?: number;\n options?: number;\n regexStr?: string;\n}\n\nexport interface RegexReplacer {\n condition?: string;\n createdBy?: string;\n description?: string;\n disabled: boolean;\n disableRecursiveReplacerApplication?: boolean;\n doNotReplaceRegex?: FastRegex;\n lastUpdatedTimestamp?: number;\n modifiedBy?: string;\n name: string;\n regex?: FastRegex;\n replaceWith?: string;\n}\n\nexport interface ScopedRule {\n bindingUrl: string;\n rules?: Array<Rule>;\n storeType: string;\n}\n\nexport interface Rule {\n displayName?: string;\n isResourceSet?: boolean;\n lastUpdatedTimestamp?: number;\n name?: string;\n qualifiedName: string;\n}\n\nexport interface ResourceSetRuleConfigList {\n /** Total item count. */\n count?: number;\n /** The Url of next result page. */\n nextLink?: string;\n /** Collection of items of type results. */\n value: Array<ResourceSetRuleConfig>;\n}\n"]}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
import { getPagedAsyncIterator } from "@azure/core-paging";
|
|
4
|
-
import { createRestError } from "@azure-rest/core-client";
|
|
5
|
-
/**
|
|
6
|
-
* Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
|
|
7
|
-
* @param client - Client to use for sending the next page requests
|
|
8
|
-
* @param initialResponse - Initial response containing the nextLink and current page of elements
|
|
9
|
-
* @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
|
|
10
|
-
* @returns - PagedAsyncIterableIterator to iterate the elements
|
|
11
|
-
*/
|
|
12
|
-
export function paginate(client, initialResponse, options = {}) {
|
|
13
|
-
let firstRun = true;
|
|
14
|
-
const itemName = "value";
|
|
15
|
-
const nextLinkName = "nextLink";
|
|
16
|
-
const { customGetPage } = options;
|
|
17
|
-
const pagedResult = {
|
|
18
|
-
firstPageLink: "",
|
|
19
|
-
getPage: typeof customGetPage === "function"
|
|
20
|
-
? customGetPage
|
|
21
|
-
: async (pageLink) => {
|
|
22
|
-
const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();
|
|
23
|
-
firstRun = false;
|
|
24
|
-
checkPagingRequest(result);
|
|
25
|
-
const nextLink = getNextLink(result.body, nextLinkName);
|
|
26
|
-
const values = getElements(result.body, itemName);
|
|
27
|
-
return {
|
|
28
|
-
page: values,
|
|
29
|
-
nextPageLink: nextLink,
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
return getPagedAsyncIterator(pagedResult);
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Gets for the value of nextLink in the body
|
|
37
|
-
*/
|
|
38
|
-
function getNextLink(body, nextLinkName) {
|
|
39
|
-
if (!nextLinkName) {
|
|
40
|
-
return undefined;
|
|
41
|
-
}
|
|
42
|
-
const nextLink = body[nextLinkName];
|
|
43
|
-
if (typeof nextLink !== "string" && typeof nextLink !== "undefined") {
|
|
44
|
-
throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);
|
|
45
|
-
}
|
|
46
|
-
return nextLink;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Gets the elements of the current request in the body.
|
|
50
|
-
*/
|
|
51
|
-
function getElements(body, itemName) {
|
|
52
|
-
const value = body[itemName];
|
|
53
|
-
// value has to be an array according to the x-ms-pageable extension.
|
|
54
|
-
// The fact that this must be an array is used above to calculate the
|
|
55
|
-
// type of elements in the page in PaginateReturn
|
|
56
|
-
if (!Array.isArray(value)) {
|
|
57
|
-
throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
|
|
58
|
-
}
|
|
59
|
-
return value !== null && value !== void 0 ? value : [];
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Checks if a request failed
|
|
63
|
-
*/
|
|
64
|
-
function checkPagingRequest(response) {
|
|
65
|
-
const Http2xxStatusCodes = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226"];
|
|
66
|
-
if (!Http2xxStatusCodes.includes(response.status)) {
|
|
67
|
-
throw createRestError(`Pagination failed with unexpected statusCode ${response.status}`, response);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=paginateHelper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../../src/account/paginateHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAA2C,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAU,eAAe,EAAyB,MAAM,yBAAyB,CAAC;AAyCzF;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CACtB,MAAc,EACd,eAA0B,EAC1B,UAAoC,EAAE;IAItC,IAAI,QAAQ,GAAG,IAAI,CAAC;IACpB,MAAM,QAAQ,GAAG,OAAO,CAAC;IACzB,MAAM,YAAY,GAAG,UAAU,CAAC;IAChC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAClC,MAAM,WAAW,GAA4B;QAC3C,aAAa,EAAE,EAAE;QACjB,OAAO,EACL,OAAO,aAAa,KAAK,UAAU;YACjC,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE;gBACzB,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC;gBACvF,QAAQ,GAAG,KAAK,CAAC;gBACjB,kBAAkB,CAAC,MAAM,CAAC,CAAC;gBAC3B,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;gBACxD,MAAM,MAAM,GAAG,WAAW,CAAW,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;gBAC5D,OAAO;oBACL,IAAI,EAAE,MAAM;oBACZ,YAAY,EAAE,QAAQ;iBACvB,CAAC;YACJ,CAAC;KACR,CAAC;IAEF,OAAO,qBAAqB,CAAC,WAAW,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,IAAa,EAAE,YAAqB;IACvD,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,QAAQ,GAAI,IAAgC,CAAC,YAAY,CAAC,CAAC;IAEjE,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;QACnE,MAAM,IAAI,KAAK,CAAC,iBAAiB,YAAY,kCAAkC,CAAC,CAAC;KAClF;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAc,IAAa,EAAE,QAAgB;IAC/D,MAAM,KAAK,GAAI,IAAgC,CAAC,QAAQ,CAAQ,CAAC;IAEjE,qEAAqE;IACrE,qEAAqE;IACrE,iDAAiD;IACjD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACzB,MAAM,IAAI,KAAK,CACb,kFAAkF,QAAQ,EAAE,CAC7F,CAAC;KACH;IAED,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB,CAAC,QAA+B;IACzD,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAClG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QACjD,MAAM,eAAe,CACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;KACH;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getPagedAsyncIterator, PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { Client, createRestError, PathUncheckedResponse } from \"@azure-rest/core-client\";\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (\n pageLink: string,\n maxPageSize?: number\n) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends {\n body: { value?: infer TPage };\n}\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {}\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n const itemName = \"value\";\n const nextLinkName = \"nextLink\";\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\"200\", \"201\", \"202\", \"203\", \"204\", \"205\", \"206\", \"207\", \"208\", \"226\"];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response\n );\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../src/account/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport {\n AccessKeyOptions,\n Collection,\n DataPlaneAccountUpdateParameters,\n ResourceSetRuleConfig,\n} from \"./models\";\n\nexport type AccountsGetAccountPropertiesParameters = RequestParameters;\n\nexport interface AccountsUpdateAccountPropertiesBodyParam {\n body: DataPlaneAccountUpdateParameters;\n}\n\nexport type AccountsUpdateAccountPropertiesParameters = AccountsUpdateAccountPropertiesBodyParam &\n RequestParameters;\nexport type AccountsGetAccessKeysParameters = RequestParameters;\n\nexport interface AccountsRegenerateAccessKeyBodyParam {\n body: AccessKeyOptions;\n}\n\nexport type AccountsRegenerateAccessKeyParameters = AccountsRegenerateAccessKeyBodyParam &\n RequestParameters;\nexport type CollectionsGetCollectionParameters = RequestParameters;\n\nexport interface CollectionsCreateOrUpdateCollectionBodyParam {\n body: Collection;\n}\n\nexport type CollectionsCreateOrUpdateCollectionParameters = CollectionsCreateOrUpdateCollectionBodyParam &\n RequestParameters;\nexport type CollectionsDeleteCollectionParameters = RequestParameters;\n\nexport interface CollectionsListCollectionsQueryParamProperties {\n $skipToken?: string;\n}\n\nexport interface CollectionsListCollectionsQueryParam {\n queryParameters?: CollectionsListCollectionsQueryParamProperties;\n}\n\nexport type CollectionsListCollectionsParameters = CollectionsListCollectionsQueryParam &\n RequestParameters;\n\nexport interface CollectionsListChildCollectionNamesQueryParamProperties {\n $skipToken?: string;\n}\n\nexport interface CollectionsListChildCollectionNamesQueryParam {\n queryParameters?: CollectionsListChildCollectionNamesQueryParamProperties;\n}\n\nexport type CollectionsListChildCollectionNamesParameters = CollectionsListChildCollectionNamesQueryParam &\n RequestParameters;\nexport type CollectionsGetCollectionPathParameters = RequestParameters;\nexport type ResourceSetRulesGetResourceSetRuleParameters = RequestParameters;\n\nexport interface ResourceSetRulesCreateOrUpdateResourceSetRuleBodyParam {\n body: ResourceSetRuleConfig;\n}\n\nexport type ResourceSetRulesCreateOrUpdateResourceSetRuleParameters = ResourceSetRulesCreateOrUpdateResourceSetRuleBodyParam &\n RequestParameters;\nexport type ResourceSetRulesDeleteResourceSetRuleParameters = RequestParameters;\n\nexport interface ResourceSetRulesListResourceSetRulesQueryParamProperties {\n $skipToken?: string;\n}\n\nexport interface ResourceSetRulesListResourceSetRulesQueryParam {\n queryParameters?: ResourceSetRulesListResourceSetRulesQueryParamProperties;\n}\n\nexport type ResourceSetRulesListResourceSetRulesParameters = ResourceSetRulesListResourceSetRulesQueryParam &\n RequestParameters;\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
import { getClient } from "@azure-rest/core-client";
|
|
4
|
-
export function PurviewAccountClient(endpoint, credentials, options = {}) {
|
|
5
|
-
var _a, _b;
|
|
6
|
-
const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${endpoint}`;
|
|
7
|
-
options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2019-11-01-preview";
|
|
8
|
-
options = Object.assign(Object.assign({}, options), { credentials: {
|
|
9
|
-
scopes: ["https://purview.azure.net/.default"],
|
|
10
|
-
} });
|
|
11
|
-
return getClient(baseUrl, credentials, options);
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=purviewAccount.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"purviewAccount.js","sourceRoot":"","sources":["../../../src/account/purviewAccount.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,SAAS,EAAiB,MAAM,yBAAyB,CAAC;AAInE,MAAM,UAAU,oBAAoB,CAClC,QAAgB,EAChB,WAA4B,EAC5B,UAAyB,EAAE;;IAE3B,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,GAAG,QAAQ,EAAE,CAAC;IACjD,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,OAAO,mCACF,OAAO,KACV,WAAW,EAAE;YACX,MAAM,EAAE,CAAC,oCAAoC,CAAC;SAC/C,GACF,CAAC;IAEF,OAAO,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAA6B,CAAC;AAC9E,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { PurviewAccountRestClient } from \"./clientDefinitions\";\n\nexport function PurviewAccountClient(\n endpoint: string,\n credentials: TokenCredential,\n options: ClientOptions = {}\n): PurviewAccountRestClient {\n const baseUrl = options.baseUrl ?? `${endpoint}`;\n options.apiVersion = options.apiVersion ?? \"2019-11-01-preview\";\n options = {\n ...options,\n credentials: {\n scopes: [\"https://purview.azure.net/.default\"],\n },\n };\n\n return getClient(baseUrl, credentials, options) as PurviewAccountRestClient;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../src/account/responses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { HttpResponse } from \"@azure-rest/core-client\";\nimport {\n AccessKeys,\n Account,\n Collection,\n CollectionList,\n CollectionNameResponseList,\n CollectionPathResponse,\n ErrorResponseModel,\n ResourceSetRuleConfig,\n ResourceSetRuleConfigList,\n} from \"./models\";\n\n/** Get an account */\nexport interface AccountsGetAccountProperties200Response extends HttpResponse {\n status: \"200\";\n body: Account;\n}\n\n/** Get an account */\nexport interface AccountsGetAccountPropertiesdefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Updates an account */\nexport interface AccountsUpdateAccountProperties200Response extends HttpResponse {\n status: \"200\";\n body: Account;\n}\n\n/** Updates an account */\nexport interface AccountsUpdateAccountPropertiesdefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** List the authorization keys associated with this account. */\nexport interface AccountsGetAccessKeys200Response extends HttpResponse {\n status: \"200\";\n body: AccessKeys;\n}\n\n/** List the authorization keys associated with this account. */\nexport interface AccountsGetAccessKeysdefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Regenerate the authorization keys associated with this data catalog. */\nexport interface AccountsRegenerateAccessKey200Response extends HttpResponse {\n status: \"200\";\n body: AccessKeys;\n}\n\n/** Regenerate the authorization keys associated with this data catalog. */\nexport interface AccountsRegenerateAccessKeydefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Get a collection */\nexport interface CollectionsGetCollection200Response extends HttpResponse {\n status: \"200\";\n body: Collection;\n}\n\n/** Get a collection */\nexport interface CollectionsGetCollectiondefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Creates or updates a collection entity. */\nexport interface CollectionsCreateOrUpdateCollection200Response extends HttpResponse {\n status: \"200\";\n body: Collection;\n}\n\n/** Creates or updates a collection entity. */\nexport interface CollectionsCreateOrUpdateCollectiondefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Deletes a Collection entity. */\nexport interface CollectionsDeleteCollection204Response extends HttpResponse {\n status: \"204\";\n body: Record<string, unknown>;\n}\n\n/** Deletes a Collection entity. */\nexport interface CollectionsDeleteCollectiondefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** List the collections in the account. */\nexport interface CollectionsListCollections200Response extends HttpResponse {\n status: \"200\";\n body: CollectionList;\n}\n\n/** List the collections in the account. */\nexport interface CollectionsListCollectionsdefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Lists the child collections names in the collection. */\nexport interface CollectionsListChildCollectionNames200Response extends HttpResponse {\n status: \"200\";\n body: CollectionNameResponseList;\n}\n\n/** Lists the child collections names in the collection. */\nexport interface CollectionsListChildCollectionNamesdefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Gets the parent name and parent friendly name chains that represent the collection path. */\nexport interface CollectionsGetCollectionPath200Response extends HttpResponse {\n status: \"200\";\n body: CollectionPathResponse;\n}\n\n/** Gets the parent name and parent friendly name chains that represent the collection path. */\nexport interface CollectionsGetCollectionPathdefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Get a resource set config service model. */\nexport interface ResourceSetRulesGetResourceSetRule200Response extends HttpResponse {\n status: \"200\";\n body: ResourceSetRuleConfig;\n}\n\n/** Get a resource set config service model. */\nexport interface ResourceSetRulesGetResourceSetRuledefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Creates or updates an resource set config. */\nexport interface ResourceSetRulesCreateOrUpdateResourceSetRule200Response extends HttpResponse {\n status: \"200\";\n body: ResourceSetRuleConfig;\n}\n\n/** Creates or updates an resource set config. */\nexport interface ResourceSetRulesCreateOrUpdateResourceSetRuledefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Deletes a ResourceSetRuleConfig resource. */\nexport interface ResourceSetRulesDeleteResourceSetRule200Response extends HttpResponse {\n status: \"200\";\n body: Record<string, unknown>;\n}\n\n/** Deletes a ResourceSetRuleConfig resource. */\nexport interface ResourceSetRulesDeleteResourceSetRule204Response extends HttpResponse {\n status: \"204\";\n body: Record<string, unknown>;\n}\n\n/** Deletes a ResourceSetRuleConfig resource. */\nexport interface ResourceSetRulesDeleteResourceSetRuledefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n\n/** Get a resource set config service model. */\nexport interface ResourceSetRulesListResourceSetRules200Response extends HttpResponse {\n status: \"200\";\n body: ResourceSetRuleConfigList;\n}\n\n/** Get a resource set config service model. */\nexport interface ResourceSetRulesListResourceSetRulesdefaultResponse extends HttpResponse {\n status: \"500\";\n body: ErrorResponseModel;\n}\n"]}
|
package/dist-esm/src/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
import * as PurviewAccount from "./account";
|
|
4
|
-
import * as PurviewMetadataPolicies from "./metadataPolicies";
|
|
5
|
-
export { PurviewAccount };
|
|
6
|
-
export { PurviewMetadataPolicies };
|
|
7
|
-
export { PurviewAccountClient } from "./account/purviewAccount";
|
|
8
|
-
export { PurviewMetadataPoliciesClient } from "./metadataPolicies/purviewMetadataPolicies";
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,cAAc,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,uBAAuB,MAAM,oBAAoB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as PurviewAccount from \"./account\";\nimport * as PurviewMetadataPolicies from \"./metadataPolicies\";\n\nexport { PurviewAccount };\nexport { PurviewMetadataPolicies };\nexport { PurviewAccountClient } from \"./account/purviewAccount\";\nexport { PurviewMetadataPoliciesClient } from \"./metadataPolicies/purviewMetadataPolicies\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../../src/metadataPolicies/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Client } from \"@azure-rest/core-client\";\nimport {\n MetadataPolicyGetParameters,\n MetadataPolicyListAllParameters,\n MetadataPolicyUpdateParameters,\n MetadataRolesListParameters,\n} from \"./parameters\";\nimport {\n MetadataPolicyGet200Response,\n MetadataPolicyGetdefaultResponse,\n MetadataPolicyListAll200Response,\n MetadataPolicyListAlldefaultResponse,\n MetadataPolicyUpdate200Response,\n MetadataPolicyUpdatedefaultResponse,\n MetadataRolesList200Response,\n MetadataRolesListdefaultResponse,\n} from \"./responses\";\n\nexport interface MetadataRolesList {\n /** Lists roles for Purview Account */\n get(\n options?: MetadataRolesListParameters\n ): Promise<MetadataRolesList200Response | MetadataRolesListdefaultResponse>;\n}\n\nexport interface MetadataPolicyListAll {\n /** List or Get metadata policies */\n get(\n options?: MetadataPolicyListAllParameters\n ): Promise<MetadataPolicyListAll200Response | MetadataPolicyListAlldefaultResponse>;\n}\n\nexport interface MetadataPolicyUpdate {\n /** Updates a metadata policy */\n put(\n options?: MetadataPolicyUpdateParameters\n ): Promise<MetadataPolicyUpdate200Response | MetadataPolicyUpdatedefaultResponse>;\n /** Gets a metadata policy */\n get(\n options?: MetadataPolicyGetParameters\n ): Promise<MetadataPolicyGet200Response | MetadataPolicyGetdefaultResponse>;\n}\n\nexport interface Routes {\n /** Resource for '/metadataRoles' has methods for the following verbs: get */\n (path: \"/metadataRoles\"): MetadataRolesList;\n /** Resource for '/metadataPolicies' has methods for the following verbs: get */\n (path: \"/metadataPolicies\"): MetadataPolicyListAll;\n /** Resource for '/metadataPolicies/\\{policyId\\}' has methods for the following verbs: put, get */\n (path: \"/metadataPolicies/{policyId}\", policyId: string): MetadataPolicyUpdate;\n}\n\nexport type PurviewMetadataPoliciesRestClient = Client & {\n path: Routes;\n};\n"]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
import * as Models from "./models";
|
|
4
|
-
import * as Pagination from "./paginateHelper";
|
|
5
|
-
import * as Parameters from "./parameters";
|
|
6
|
-
import * as Client from "./clientDefinitions";
|
|
7
|
-
import * as Responses from "./responses";
|
|
8
|
-
export { PurviewMetadataPoliciesClient } from "./purviewMetadataPolicies";
|
|
9
|
-
export { Models, Pagination, Parameters, Client, Responses };
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/metadataPolicies/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,MAAM,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport * as Models from \"./models\";\nimport * as Pagination from \"./paginateHelper\";\nimport * as Parameters from \"./parameters\";\nimport * as Client from \"./clientDefinitions\";\nimport * as Responses from \"./responses\";\nexport { PurviewMetadataPoliciesClient } from \"./purviewMetadataPolicies\";\nexport { Models, Pagination, Parameters, Client, Responses };\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/metadataPolicies/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport interface MetadataRoleList {\n values: Array<MetadataRole>;\n nextLink?: string;\n}\n\nexport interface MetadataRole {\n /** The Id of role */\n id?: string;\n /** The name of role */\n name?: string;\n /** The type of role */\n type?: string;\n properties?: MetadataRoleProperties;\n}\n\nexport interface MetadataRoleProperties {\n /** The provisioningState of role */\n provisioningState?: string;\n /** The type of role */\n roleType?: string;\n /** The friendly name of role */\n friendlyName?: string;\n /** The description of role */\n description?: string;\n /** The cnf Condition for a rule */\n cnfCondition?: Array<Array<AttributeMatcher>>;\n /** The dnf Condition for a rule */\n dnfCondition?: Array<Array<AttributeMatcher>>;\n /** The version of role */\n version?: number;\n}\n\nexport interface AttributeMatcher {\n /** AttributeName */\n attributeName?: string;\n /** Value for attribute */\n attributeValueIncludes?: string;\n /** List of values for attribute */\n attributeValueIncludedIn?: Array<string>;\n /** Value excluded for attribute */\n attributeValueExcludes?: string;\n /** List of values excluded for attribute */\n attributeValueExcludedIn?: Array<string>;\n}\n\nexport interface ErrorResponseModel {\n /** The error model for metadata policy */\n error: ErrorModel;\n}\n\nexport interface ErrorModel {\n /** The error code */\n code: string;\n /** The error message */\n message: string;\n /** The error target */\n target?: string;\n /** The error details */\n details?: Array<ErrorModel>;\n}\n\nexport interface MetadataPolicyList {\n values: Array<MetadataPolicy>;\n nextLink?: string;\n}\n\nexport interface MetadataPolicy {\n /** The name of policy */\n name?: string;\n /** The id of policy */\n id?: string;\n /** The version of policy */\n version?: number;\n properties?: MetadataPolicyProperties;\n}\n\nexport interface MetadataPolicyProperties {\n /** The description of policy */\n description?: string;\n /** The DecisionRules of policy */\n decisionRules?: Array<DecisionRule>;\n /** The AttributeRules of policy */\n attributeRules?: Array<AttributeRule>;\n /** The collection reference for a policy */\n collection?: CollectionReference;\n /** The parent collection of the policy */\n parentCollectionName?: string;\n}\n\nexport interface DecisionRule {\n /** The kind of rule */\n kind?: \"decisionrule\" | \"attributerule\";\n /** The effect for rule */\n effect?: \"Deny\" | \"Permit\";\n /** The dnf Condition for a rule */\n dnfCondition?: Array<Array<AttributeMatcher>>;\n}\n\nexport interface AttributeRule {\n /** The kind of rule */\n kind?: \"decisionrule\" | \"attributerule\";\n /** The id for rule */\n id?: string;\n /** The name for rule */\n name?: string;\n /** The dnf Condition for a rule */\n dnfCondition?: Array<Array<AttributeMatcher>>;\n}\n\nexport interface CollectionReference {\n /** The type of reference */\n type?: string;\n /** The name of reference */\n referenceName?: string;\n}\n"]}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
import { getPagedAsyncIterator } from "@azure/core-paging";
|
|
4
|
-
import { createRestError } from "@azure-rest/core-client";
|
|
5
|
-
/**
|
|
6
|
-
* Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
|
|
7
|
-
* @param client - Client to use for sending the next page requests
|
|
8
|
-
* @param initialResponse - Initial response containing the nextLink and current page of elements
|
|
9
|
-
* @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
|
|
10
|
-
* @returns - PagedAsyncIterableIterator to iterate the elements
|
|
11
|
-
*/
|
|
12
|
-
export function paginate(client, initialResponse, options = {}) {
|
|
13
|
-
let firstRun = true;
|
|
14
|
-
// We need to check the response for success before trying to inspect it looking for
|
|
15
|
-
// the properties to use for nextLink and itemName
|
|
16
|
-
checkPagingRequest(initialResponse);
|
|
17
|
-
const { itemName, nextLinkName } = getPaginationProperties(initialResponse);
|
|
18
|
-
const { customGetPage } = options;
|
|
19
|
-
const pagedResult = {
|
|
20
|
-
firstPageLink: "",
|
|
21
|
-
getPage: typeof customGetPage === "function"
|
|
22
|
-
? customGetPage
|
|
23
|
-
: async (pageLink) => {
|
|
24
|
-
const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();
|
|
25
|
-
firstRun = false;
|
|
26
|
-
checkPagingRequest(result);
|
|
27
|
-
const nextLink = getNextLink(result.body, nextLinkName);
|
|
28
|
-
const values = getElements(result.body, itemName);
|
|
29
|
-
return {
|
|
30
|
-
page: values,
|
|
31
|
-
nextPageLink: nextLink,
|
|
32
|
-
};
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
return getPagedAsyncIterator(pagedResult);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Gets for the value of nextLink in the body
|
|
39
|
-
*/
|
|
40
|
-
function getNextLink(body, nextLinkName) {
|
|
41
|
-
if (!nextLinkName) {
|
|
42
|
-
return undefined;
|
|
43
|
-
}
|
|
44
|
-
const nextLink = body[nextLinkName];
|
|
45
|
-
if (typeof nextLink !== "string" && typeof nextLink !== "undefined") {
|
|
46
|
-
throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);
|
|
47
|
-
}
|
|
48
|
-
return nextLink;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Gets the elements of the current request in the body.
|
|
52
|
-
*/
|
|
53
|
-
function getElements(body, itemName) {
|
|
54
|
-
const value = body[itemName];
|
|
55
|
-
// value has to be an array according to the x-ms-pageable extension.
|
|
56
|
-
// The fact that this must be an array is used above to calculate the
|
|
57
|
-
// type of elements in the page in PaginateReturn
|
|
58
|
-
if (!Array.isArray(value)) {
|
|
59
|
-
throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
|
|
60
|
-
}
|
|
61
|
-
return value !== null && value !== void 0 ? value : [];
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Checks if a request failed
|
|
65
|
-
*/
|
|
66
|
-
function checkPagingRequest(response) {
|
|
67
|
-
const Http2xxStatusCodes = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226"];
|
|
68
|
-
if (!Http2xxStatusCodes.includes(response.status)) {
|
|
69
|
-
throw createRestError(`Pagination failed with unexpected statusCode ${response.status}`, response);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Extracts the itemName and nextLinkName from the initial response to use them for pagination
|
|
74
|
-
*/
|
|
75
|
-
function getPaginationProperties(initialResponse) {
|
|
76
|
-
// Build a set with the passed custom nextLinkNames
|
|
77
|
-
const nextLinkNames = new Set(["nextLink"]);
|
|
78
|
-
// Build a set with the passed custom set of itemNames
|
|
79
|
-
const itemNames = new Set(["value", "values"]);
|
|
80
|
-
let nextLinkName;
|
|
81
|
-
let itemName;
|
|
82
|
-
for (const name of nextLinkNames) {
|
|
83
|
-
const nextLink = initialResponse.body[name];
|
|
84
|
-
if (nextLink) {
|
|
85
|
-
nextLinkName = name;
|
|
86
|
-
break;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
for (const name of itemNames) {
|
|
90
|
-
const item = initialResponse.body[name];
|
|
91
|
-
if (item) {
|
|
92
|
-
itemName = name;
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
if (!itemName) {
|
|
97
|
-
throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${[
|
|
98
|
-
...itemNames,
|
|
99
|
-
].join(" OR ")}`);
|
|
100
|
-
}
|
|
101
|
-
return { itemName, nextLinkName };
|
|
102
|
-
}
|
|
103
|
-
//# sourceMappingURL=paginateHelper.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../../src/metadataPolicies/paginateHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,qBAAqB,EAA2C,MAAM,oBAAoB,CAAC;AACpG,OAAO,EAAU,eAAe,EAAyB,MAAM,yBAAyB,CAAC;AA6CzF;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CACtB,MAAc,EACd,eAA0B,EAC1B,UAAoC,EAAE;IAItC,IAAI,QAAQ,GAAG,IAAI,CAAC;IACpB,oFAAoF;IACpF,kDAAkD;IAClD,kBAAkB,CAAC,eAAe,CAAC,CAAC;IACpC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,uBAAuB,CAAC,eAAe,CAAC,CAAC;IAC5E,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAClC,MAAM,WAAW,GAA4B;QAC3C,aAAa,EAAE,EAAE;QACjB,OAAO,EACL,OAAO,aAAa,KAAK,UAAU;YACjC,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE;gBACzB,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC;gBACvF,QAAQ,GAAG,KAAK,CAAC;gBACjB,kBAAkB,CAAC,MAAM,CAAC,CAAC;gBAC3B,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;gBACxD,MAAM,MAAM,GAAG,WAAW,CAAW,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;gBAC5D,OAAO;oBACL,IAAI,EAAE,MAAM;oBACZ,YAAY,EAAE,QAAQ;iBACvB,CAAC;YACJ,CAAC;KACR,CAAC;IAEF,OAAO,qBAAqB,CAAC,WAAW,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,IAAa,EAAE,YAAqB;IACvD,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,QAAQ,GAAI,IAAgC,CAAC,YAAY,CAAC,CAAC;IAEjE,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;QACnE,MAAM,IAAI,KAAK,CAAC,iBAAiB,YAAY,kCAAkC,CAAC,CAAC;KAClF;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAc,IAAa,EAAE,QAAgB;IAC/D,MAAM,KAAK,GAAI,IAAgC,CAAC,QAAQ,CAAQ,CAAC;IAEjE,qEAAqE;IACrE,qEAAqE;IACrE,iDAAiD;IACjD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACzB,MAAM,IAAI,KAAK,CACb,kFAAkF,QAAQ,EAAE,CAC7F,CAAC;KACH;IAED,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB,CAAC,QAA+B;IACzD,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAClG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QACjD,MAAM,eAAe,CACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;KACH;AACH,CAAC;AAED;;GAEG;AACH,SAAS,uBAAuB,CAAC,eAAsC;IACrE,mDAAmD;IACnD,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IAE5C,sDAAsD;IACtD,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE/C,IAAI,YAAgC,CAAC;IACrC,IAAI,QAA4B,CAAC;IAEjC,KAAK,MAAM,IAAI,IAAI,aAAa,EAAE;QAChC,MAAM,QAAQ,GAAI,eAAe,CAAC,IAAgC,CAAC,IAAI,CAAW,CAAC;QACnF,IAAI,QAAQ,EAAE;YACZ,YAAY,GAAG,IAAI,CAAC;YACpB,MAAM;SACP;KACF;IAED,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE;QAC5B,MAAM,IAAI,GAAI,eAAe,CAAC,IAAgC,CAAC,IAAI,CAAW,CAAC;QAC/E,IAAI,IAAI,EAAE;YACR,QAAQ,GAAG,IAAI,CAAC;YAChB,MAAM;SACP;KACF;IAED,IAAI,CAAC,QAAQ,EAAE;QACb,MAAM,IAAI,KAAK,CACb,kFAAkF;YAChF,GAAG,SAAS;SACb,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CACjB,CAAC;KACH;IAED,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;AACpC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getPagedAsyncIterator, PagedAsyncIterableIterator, PagedResult } from \"@azure/core-paging\";\nimport { Client, createRestError, PathUncheckedResponse } from \"@azure-rest/core-client\";\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (\n pageLink: string,\n maxPageSize?: number\n) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends\n | {\n body: { value?: infer TPage };\n }\n | {\n body: { values?: infer TPage };\n }\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {}\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n // We need to check the response for success before trying to inspect it looking for\n // the properties to use for nextLink and itemName\n checkPagingRequest(initialResponse);\n const { itemName, nextLinkName } = getPaginationProperties(initialResponse);\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun ? initialResponse : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\"200\", \"201\", \"202\", \"203\", \"204\", \"205\", \"206\", \"207\", \"208\", \"226\"];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response\n );\n }\n}\n\n/**\n * Extracts the itemName and nextLinkName from the initial response to use them for pagination\n */\nfunction getPaginationProperties(initialResponse: PathUncheckedResponse) {\n // Build a set with the passed custom nextLinkNames\n const nextLinkNames = new Set([\"nextLink\"]);\n\n // Build a set with the passed custom set of itemNames\n const itemNames = new Set([\"value\", \"values\"]);\n\n let nextLinkName: string | undefined;\n let itemName: string | undefined;\n\n for (const name of nextLinkNames) {\n const nextLink = (initialResponse.body as Record<string, unknown>)[name] as string;\n if (nextLink) {\n nextLinkName = name;\n break;\n }\n }\n\n for (const name of itemNames) {\n const item = (initialResponse.body as Record<string, unknown>)[name] as string;\n if (item) {\n itemName = name;\n break;\n }\n }\n\n if (!itemName) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${[\n ...itemNames,\n ].join(\" OR \")}`\n );\n }\n\n return { itemName, nextLinkName };\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../src/metadataPolicies/parameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport { MetadataPolicy } from \"./models\";\n\nexport type MetadataRolesListParameters = RequestParameters;\n\nexport interface MetadataPolicyListAllQueryParamProperties {\n /** The name of an existing collection for which one policy needs to be fetched. */\n collectionName?: string;\n}\n\nexport interface MetadataPolicyListAllQueryParam {\n queryParameters?: MetadataPolicyListAllQueryParamProperties;\n}\n\nexport type MetadataPolicyListAllParameters = MetadataPolicyListAllQueryParam & RequestParameters;\n\nexport interface MetadataPolicyUpdateBodyParam {\n /** Policy to be updated. */\n body?: MetadataPolicy;\n}\n\nexport type MetadataPolicyUpdateParameters = MetadataPolicyUpdateBodyParam & RequestParameters;\nexport type MetadataPolicyGetParameters = RequestParameters;\n"]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT license.
|
|
3
|
-
import { getClient } from "@azure-rest/core-client";
|
|
4
|
-
export function PurviewMetadataPoliciesClient(Endpoint, credentials, options = {}) {
|
|
5
|
-
var _a, _b;
|
|
6
|
-
const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${Endpoint}/policyStore`;
|
|
7
|
-
options.apiVersion = (_b = options.apiVersion) !== null && _b !== void 0 ? _b : "2021-07-01-preview";
|
|
8
|
-
options = Object.assign(Object.assign({}, options), { credentials: {
|
|
9
|
-
scopes: ["https://purview.azure.net/.default"],
|
|
10
|
-
} });
|
|
11
|
-
return getClient(baseUrl, credentials, options);
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=purviewMetadataPolicies.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"purviewMetadataPolicies.js","sourceRoot":"","sources":["../../../src/metadataPolicies/purviewMetadataPolicies.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAiB,MAAM,yBAAyB,CAAC;AAInE,MAAM,UAAU,6BAA6B,CAC3C,QAAgB,EAChB,WAA4B,EAC5B,UAAyB,EAAE;;IAE3B,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,GAAG,QAAQ,cAAc,CAAC;IAC7D,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,oBAAoB,CAAC;IAChE,OAAO,mCACF,OAAO,KACV,WAAW,EAAE;YACX,MAAM,EAAE,CAAC,oCAAoC,CAAC;SAC/C,GACF,CAAC;IAEF,OAAO,SAAS,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,CAAsC,CAAC;AACvF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { PurviewMetadataPoliciesRestClient } from \"./clientDefinitions\";\n\nexport function PurviewMetadataPoliciesClient(\n Endpoint: string,\n credentials: TokenCredential,\n options: ClientOptions = {}\n): PurviewMetadataPoliciesRestClient {\n const baseUrl = options.baseUrl ?? `${Endpoint}/policyStore`;\n options.apiVersion = options.apiVersion ?? \"2021-07-01-preview\";\n options = {\n ...options,\n credentials: {\n scopes: [\"https://purview.azure.net/.default\"],\n },\n };\n\n return getClient(baseUrl, credentials, options) as PurviewMetadataPoliciesRestClient;\n}\n"]}
|