@azure-rest/purview-administration 1.0.0-beta.1 → 1.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/LICENSE +3 -3
- package/README.md +62 -36
- 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 +82 -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-esm/src → dist/browser}/account/paginateHelper.js +70 -3
- 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 +45 -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 +72 -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-esm/src → dist/browser}/metadataPolicies/paginateHelper.js +70 -3
- 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 +45 -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 +85 -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 +140 -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 +48 -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 +75 -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 +173 -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 +48 -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 +82 -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 +137 -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 +45 -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 +72 -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 +170 -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 +45 -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 +82 -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 +137 -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 +45 -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 +72 -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 +170 -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 +45 -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 +89 -83
- package/review/purview-administration-node.api.md +1722 -0
- 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.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.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
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { RequestParameters } from "@azure-rest/core-client";
|
|
2
|
+
import type { DataPlaneAccountUpdateParameters, AccessKeyOptions, Collection, ResourceSetRuleConfig } from "./models.js";
|
|
3
|
+
export type AccountsGetAccountPropertiesParameters = RequestParameters;
|
|
4
|
+
export interface AccountsUpdateAccountPropertiesBodyParam {
|
|
5
|
+
body: DataPlaneAccountUpdateParameters;
|
|
6
|
+
}
|
|
7
|
+
export interface AccountsUpdateAccountPropertiesMediaTypesParam {
|
|
8
|
+
/** Request content type */
|
|
9
|
+
contentType?: "application/json";
|
|
10
|
+
}
|
|
11
|
+
export type AccountsUpdateAccountPropertiesParameters = AccountsUpdateAccountPropertiesMediaTypesParam & AccountsUpdateAccountPropertiesBodyParam & RequestParameters;
|
|
12
|
+
export type AccountsGetAccessKeysParameters = RequestParameters;
|
|
13
|
+
export interface AccountsRegenerateAccessKeyBodyParam {
|
|
14
|
+
body: AccessKeyOptions;
|
|
15
|
+
}
|
|
16
|
+
export interface AccountsRegenerateAccessKeyMediaTypesParam {
|
|
17
|
+
/** Request content type */
|
|
18
|
+
contentType?: "application/json";
|
|
19
|
+
}
|
|
20
|
+
export type AccountsRegenerateAccessKeyParameters = AccountsRegenerateAccessKeyMediaTypesParam & AccountsRegenerateAccessKeyBodyParam & RequestParameters;
|
|
21
|
+
export type CollectionsGetCollectionParameters = RequestParameters;
|
|
22
|
+
export interface CollectionsCreateOrUpdateCollectionBodyParam {
|
|
23
|
+
body: Collection;
|
|
24
|
+
}
|
|
25
|
+
export interface CollectionsCreateOrUpdateCollectionMediaTypesParam {
|
|
26
|
+
/** Request content type */
|
|
27
|
+
contentType?: "application/json";
|
|
28
|
+
}
|
|
29
|
+
export type CollectionsCreateOrUpdateCollectionParameters = CollectionsCreateOrUpdateCollectionMediaTypesParam & CollectionsCreateOrUpdateCollectionBodyParam & RequestParameters;
|
|
30
|
+
export type CollectionsDeleteCollectionParameters = RequestParameters;
|
|
31
|
+
export interface CollectionsListCollectionsQueryParamProperties {
|
|
32
|
+
$skipToken?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface CollectionsListCollectionsQueryParam {
|
|
35
|
+
queryParameters?: CollectionsListCollectionsQueryParamProperties;
|
|
36
|
+
}
|
|
37
|
+
export type CollectionsListCollectionsParameters = CollectionsListCollectionsQueryParam & RequestParameters;
|
|
38
|
+
export interface CollectionsListChildCollectionNamesQueryParamProperties {
|
|
39
|
+
$skipToken?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface CollectionsListChildCollectionNamesQueryParam {
|
|
42
|
+
queryParameters?: CollectionsListChildCollectionNamesQueryParamProperties;
|
|
43
|
+
}
|
|
44
|
+
export type CollectionsListChildCollectionNamesParameters = CollectionsListChildCollectionNamesQueryParam & RequestParameters;
|
|
45
|
+
export type CollectionsGetCollectionPathParameters = RequestParameters;
|
|
46
|
+
export type ResourceSetRulesGetResourceSetRuleParameters = RequestParameters;
|
|
47
|
+
export interface ResourceSetRulesCreateOrUpdateResourceSetRuleBodyParam {
|
|
48
|
+
body: ResourceSetRuleConfig;
|
|
49
|
+
}
|
|
50
|
+
export interface ResourceSetRulesCreateOrUpdateResourceSetRuleMediaTypesParam {
|
|
51
|
+
/** Request content type */
|
|
52
|
+
contentType?: "application/json";
|
|
53
|
+
}
|
|
54
|
+
export type ResourceSetRulesCreateOrUpdateResourceSetRuleParameters = ResourceSetRulesCreateOrUpdateResourceSetRuleMediaTypesParam & ResourceSetRulesCreateOrUpdateResourceSetRuleBodyParam & RequestParameters;
|
|
55
|
+
export type ResourceSetRulesDeleteResourceSetRuleParameters = RequestParameters;
|
|
56
|
+
export interface ResourceSetRulesListResourceSetRulesQueryParamProperties {
|
|
57
|
+
$skipToken?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface ResourceSetRulesListResourceSetRulesQueryParam {
|
|
60
|
+
queryParameters?: ResourceSetRulesListResourceSetRulesQueryParamProperties;
|
|
61
|
+
}
|
|
62
|
+
export type ResourceSetRulesListResourceSetRulesParameters = ResourceSetRulesListResourceSetRulesQueryParam & RequestParameters;
|
|
63
|
+
//# sourceMappingURL=parameters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../src/account/parameters.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EACV,gCAAgC,EAChC,gBAAgB,EAChB,UAAU,EACV,qBAAqB,EACtB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,sCAAsC,GAAG,iBAAiB,CAAC;AAEvE,MAAM,WAAW,wCAAwC;IACvD,IAAI,EAAE,gCAAgC,CAAC;CACxC;AAED,MAAM,WAAW,8CAA8C;IAC7D,2BAA2B;IAC3B,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED,MAAM,MAAM,yCAAyC,GACnD,8CAA8C,GAC5C,wCAAwC,GACxC,iBAAiB,CAAC;AACtB,MAAM,MAAM,+BAA+B,GAAG,iBAAiB,CAAC;AAEhE,MAAM,WAAW,oCAAoC;IACnD,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,MAAM,WAAW,0CAA0C;IACzD,2BAA2B;IAC3B,WAAW,CAAC,EAAE,kBAAkB,CAAC;CAClC;AAED,MAAM,MAAM,qCAAqC,GAAG,0CAA0C,GAC5F,oCAAoC,GACpC,iBAAiB,CAAC;AACpB,MAAM,MAAM,kCAAkC,GAAG,iBAAiB,CAAC;AAEnE,MAAM,WAAW,4CAA4C;IAC3D,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,kDAAkD;IACjE,2BAA2B;IAC3B,WAAW,CAAC,EAAE,kBAAkB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ACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { RequestParameters } from \"@azure-rest/core-client\";\nimport type {\n DataPlaneAccountUpdateParameters,\n AccessKeyOptions,\n Collection,\n ResourceSetRuleConfig,\n} from \"./models.js\";\n\nexport type AccountsGetAccountPropertiesParameters = RequestParameters;\n\nexport interface AccountsUpdateAccountPropertiesBodyParam {\n body: DataPlaneAccountUpdateParameters;\n}\n\nexport interface AccountsUpdateAccountPropertiesMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type AccountsUpdateAccountPropertiesParameters =\n AccountsUpdateAccountPropertiesMediaTypesParam &\n AccountsUpdateAccountPropertiesBodyParam &\n RequestParameters;\nexport type AccountsGetAccessKeysParameters = RequestParameters;\n\nexport interface AccountsRegenerateAccessKeyBodyParam {\n body: AccessKeyOptions;\n}\n\nexport interface AccountsRegenerateAccessKeyMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type AccountsRegenerateAccessKeyParameters = AccountsRegenerateAccessKeyMediaTypesParam &\n AccountsRegenerateAccessKeyBodyParam &\n RequestParameters;\nexport type CollectionsGetCollectionParameters = RequestParameters;\n\nexport interface CollectionsCreateOrUpdateCollectionBodyParam {\n body: Collection;\n}\n\nexport interface CollectionsCreateOrUpdateCollectionMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type CollectionsCreateOrUpdateCollectionParameters =\n CollectionsCreateOrUpdateCollectionMediaTypesParam &\n 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 =\n CollectionsListChildCollectionNamesQueryParam & RequestParameters;\nexport type CollectionsGetCollectionPathParameters = RequestParameters;\nexport type ResourceSetRulesGetResourceSetRuleParameters = RequestParameters;\n\nexport interface ResourceSetRulesCreateOrUpdateResourceSetRuleBodyParam {\n body: ResourceSetRuleConfig;\n}\n\nexport interface ResourceSetRulesCreateOrUpdateResourceSetRuleMediaTypesParam {\n /** Request content type */\n contentType?: \"application/json\";\n}\n\nexport type ResourceSetRulesCreateOrUpdateResourceSetRuleParameters =\n ResourceSetRulesCreateOrUpdateResourceSetRuleMediaTypesParam &\n 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 =\n ResourceSetRulesListResourceSetRulesQueryParam & RequestParameters;\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ClientOptions } from "@azure-rest/core-client";
|
|
2
|
+
import type { TokenCredential } from "@azure/core-auth";
|
|
3
|
+
import type { PurviewAccountClient } from "./clientDefinitions.js";
|
|
4
|
+
/** The optional parameters for the client */
|
|
5
|
+
export interface PurviewAccountClientOptions extends ClientOptions {
|
|
6
|
+
/** The api version option of the client */
|
|
7
|
+
apiVersion?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Initialize a new instance of `PurviewAccountClient`
|
|
11
|
+
* @param endpoint - The account endpoint of your Purview account. Example: https://\{accountName\}.purview.azure.com/account/
|
|
12
|
+
* @param credentials - uniquely identify client credential
|
|
13
|
+
* @param options - the parameter for all optional parameters
|
|
14
|
+
*/
|
|
15
|
+
export declare function createClient(endpoint: string, credentials: TokenCredential, { apiVersion, ...options }?: PurviewAccountClientOptions): PurviewAccountClient;
|
|
16
|
+
//# sourceMappingURL=purviewAccount.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purviewAccount.d.ts","sourceRoot":"","sources":["../../../src/account/purviewAccount.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,6CAA6C;AAC7C,MAAM,WAAW,2BAA4B,SAAQ,aAAa;IAChE,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,eAAe,EAC5B,EAAE,UAAiC,EAAE,GAAG,OAAO,EAAE,GAAE,2BAAgC,GAClF,oBAAoB,CAuCtB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { getClient } from "@azure-rest/core-client";
|
|
4
|
+
import { logger } from "../logger.js";
|
|
5
|
+
/**
|
|
6
|
+
* Initialize a new instance of `PurviewAccountClient`
|
|
7
|
+
* @param endpoint - The account endpoint of your Purview account. Example: https://\{accountName\}.purview.azure.com/account/
|
|
8
|
+
* @param credentials - uniquely identify client credential
|
|
9
|
+
* @param options - the parameter for all optional parameters
|
|
10
|
+
*/
|
|
11
|
+
export function createClient(endpoint, credentials, { apiVersion = "2019-11-01-preview", ...options } = {}) {
|
|
12
|
+
const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpoint}`;
|
|
13
|
+
const userAgentInfo = `azsdk-js-purview-administration-rest/1.0.0-beta.2`;
|
|
14
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
15
|
+
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
16
|
+
: `${userAgentInfo}`;
|
|
17
|
+
options = {
|
|
18
|
+
...options,
|
|
19
|
+
userAgentOptions: {
|
|
20
|
+
userAgentPrefix,
|
|
21
|
+
},
|
|
22
|
+
loggingOptions: {
|
|
23
|
+
logger: options.loggingOptions?.logger ?? logger.info,
|
|
24
|
+
},
|
|
25
|
+
credentials: {
|
|
26
|
+
scopes: ["https://purview.azure.net/.default"],
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
const client = getClient(endpointUrl, credentials, options);
|
|
30
|
+
client.pipeline.removePolicy({ name: "ApiVersionPolicy" });
|
|
31
|
+
client.pipeline.addPolicy({
|
|
32
|
+
name: "ClientApiVersionPolicy",
|
|
33
|
+
sendRequest: (req, next) => {
|
|
34
|
+
// Use the apiVersion defined in request url directly
|
|
35
|
+
// Append one if there is no apiVersion and we have one at client options
|
|
36
|
+
const url = new URL(req.url);
|
|
37
|
+
if (!url.searchParams.get("api-version") && apiVersion) {
|
|
38
|
+
req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${apiVersion}`;
|
|
39
|
+
}
|
|
40
|
+
return next(req);
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
return client;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=purviewAccount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"purviewAccount.js","sourceRoot":"","sources":["../../../src/account/purviewAccount.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;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G,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"../logger.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { PurviewAccountClient } from \"./clientDefinitions.js\";\n\n/** The optional parameters for the client */\nexport interface PurviewAccountClientOptions extends ClientOptions {\n /** The api version option of the client */\n apiVersion?: string;\n}\n\n/**\n * Initialize a new instance of `PurviewAccountClient`\n * @param endpoint - The account endpoint of your Purview account. Example: https://\\{accountName\\}.purview.azure.com/account/\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport function createClient(\n endpoint: string,\n credentials: TokenCredential,\n { apiVersion = \"2019-11-01-preview\", ...options }: PurviewAccountClientOptions = {},\n): PurviewAccountClient {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpoint}`;\n const userAgentInfo = `azsdk-js-purview-administration-rest/1.0.0-beta.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: [\"https://purview.azure.net/.default\"],\n },\n };\n const client = getClient(endpointUrl, credentials, options) as PurviewAccountClient;\n\n client.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n client.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\") && apiVersion) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n\n return client;\n}\n"]}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { HttpResponse } from "@azure-rest/core-client";
|
|
2
|
+
import type { AccountOutput, ErrorResponseModelOutput, AccessKeysOutput, CollectionOutput, CollectionListOutput, CollectionNameResponseListOutput, CollectionPathResponseOutput, ResourceSetRuleConfigOutput, ResourceSetRuleConfigListOutput } from "./outputModels.js";
|
|
3
|
+
/** Get an account */
|
|
4
|
+
export interface AccountsGetAccountProperties200Response extends HttpResponse {
|
|
5
|
+
status: "200";
|
|
6
|
+
body: AccountOutput;
|
|
7
|
+
}
|
|
8
|
+
/** Get an account */
|
|
9
|
+
export interface AccountsGetAccountPropertiesDefaultResponse extends HttpResponse {
|
|
10
|
+
status: string;
|
|
11
|
+
body: ErrorResponseModelOutput;
|
|
12
|
+
}
|
|
13
|
+
/** Updates an account */
|
|
14
|
+
export interface AccountsUpdateAccountProperties200Response extends HttpResponse {
|
|
15
|
+
status: "200";
|
|
16
|
+
body: AccountOutput;
|
|
17
|
+
}
|
|
18
|
+
/** Updates an account */
|
|
19
|
+
export interface AccountsUpdateAccountPropertiesDefaultResponse extends HttpResponse {
|
|
20
|
+
status: string;
|
|
21
|
+
body: ErrorResponseModelOutput;
|
|
22
|
+
}
|
|
23
|
+
/** List the authorization keys associated with this account. */
|
|
24
|
+
export interface AccountsGetAccessKeys200Response extends HttpResponse {
|
|
25
|
+
status: "200";
|
|
26
|
+
body: AccessKeysOutput;
|
|
27
|
+
}
|
|
28
|
+
/** List the authorization keys associated with this account. */
|
|
29
|
+
export interface AccountsGetAccessKeysDefaultResponse extends HttpResponse {
|
|
30
|
+
status: string;
|
|
31
|
+
body: ErrorResponseModelOutput;
|
|
32
|
+
}
|
|
33
|
+
/** Regenerate the authorization keys associated with this data catalog. */
|
|
34
|
+
export interface AccountsRegenerateAccessKey200Response extends HttpResponse {
|
|
35
|
+
status: "200";
|
|
36
|
+
body: AccessKeysOutput;
|
|
37
|
+
}
|
|
38
|
+
/** Regenerate the authorization keys associated with this data catalog. */
|
|
39
|
+
export interface AccountsRegenerateAccessKeyDefaultResponse extends HttpResponse {
|
|
40
|
+
status: string;
|
|
41
|
+
body: ErrorResponseModelOutput;
|
|
42
|
+
}
|
|
43
|
+
/** Get a collection */
|
|
44
|
+
export interface CollectionsGetCollection200Response extends HttpResponse {
|
|
45
|
+
status: "200";
|
|
46
|
+
body: CollectionOutput;
|
|
47
|
+
}
|
|
48
|
+
/** Get a collection */
|
|
49
|
+
export interface CollectionsGetCollectionDefaultResponse extends HttpResponse {
|
|
50
|
+
status: string;
|
|
51
|
+
body: ErrorResponseModelOutput;
|
|
52
|
+
}
|
|
53
|
+
/** Creates or updates a collection entity. */
|
|
54
|
+
export interface CollectionsCreateOrUpdateCollection200Response extends HttpResponse {
|
|
55
|
+
status: "200";
|
|
56
|
+
body: CollectionOutput;
|
|
57
|
+
}
|
|
58
|
+
/** Creates or updates a collection entity. */
|
|
59
|
+
export interface CollectionsCreateOrUpdateCollectionDefaultResponse extends HttpResponse {
|
|
60
|
+
status: string;
|
|
61
|
+
body: ErrorResponseModelOutput;
|
|
62
|
+
}
|
|
63
|
+
/** Deletes a Collection entity. */
|
|
64
|
+
export interface CollectionsDeleteCollection204Response extends HttpResponse {
|
|
65
|
+
status: "204";
|
|
66
|
+
}
|
|
67
|
+
/** Deletes a Collection entity. */
|
|
68
|
+
export interface CollectionsDeleteCollectionDefaultResponse extends HttpResponse {
|
|
69
|
+
status: string;
|
|
70
|
+
body: ErrorResponseModelOutput;
|
|
71
|
+
}
|
|
72
|
+
/** List the collections in the account. */
|
|
73
|
+
export interface CollectionsListCollections200Response extends HttpResponse {
|
|
74
|
+
status: "200";
|
|
75
|
+
body: CollectionListOutput;
|
|
76
|
+
}
|
|
77
|
+
/** List the collections in the account. */
|
|
78
|
+
export interface CollectionsListCollectionsDefaultResponse extends HttpResponse {
|
|
79
|
+
status: string;
|
|
80
|
+
body: ErrorResponseModelOutput;
|
|
81
|
+
}
|
|
82
|
+
/** Lists the child collections names in the collection. */
|
|
83
|
+
export interface CollectionsListChildCollectionNames200Response extends HttpResponse {
|
|
84
|
+
status: "200";
|
|
85
|
+
body: CollectionNameResponseListOutput;
|
|
86
|
+
}
|
|
87
|
+
/** Lists the child collections names in the collection. */
|
|
88
|
+
export interface CollectionsListChildCollectionNamesDefaultResponse extends HttpResponse {
|
|
89
|
+
status: string;
|
|
90
|
+
body: ErrorResponseModelOutput;
|
|
91
|
+
}
|
|
92
|
+
/** Gets the parent name and parent friendly name chains that represent the collection path. */
|
|
93
|
+
export interface CollectionsGetCollectionPath200Response extends HttpResponse {
|
|
94
|
+
status: "200";
|
|
95
|
+
body: CollectionPathResponseOutput;
|
|
96
|
+
}
|
|
97
|
+
/** Gets the parent name and parent friendly name chains that represent the collection path. */
|
|
98
|
+
export interface CollectionsGetCollectionPathDefaultResponse extends HttpResponse {
|
|
99
|
+
status: string;
|
|
100
|
+
body: ErrorResponseModelOutput;
|
|
101
|
+
}
|
|
102
|
+
/** Get a resource set config service model. */
|
|
103
|
+
export interface ResourceSetRulesGetResourceSetRule200Response extends HttpResponse {
|
|
104
|
+
status: "200";
|
|
105
|
+
body: ResourceSetRuleConfigOutput;
|
|
106
|
+
}
|
|
107
|
+
/** Get a resource set config service model. */
|
|
108
|
+
export interface ResourceSetRulesGetResourceSetRuleDefaultResponse extends HttpResponse {
|
|
109
|
+
status: string;
|
|
110
|
+
body: ErrorResponseModelOutput;
|
|
111
|
+
}
|
|
112
|
+
/** Creates or updates an resource set config. */
|
|
113
|
+
export interface ResourceSetRulesCreateOrUpdateResourceSetRule200Response extends HttpResponse {
|
|
114
|
+
status: "200";
|
|
115
|
+
body: ResourceSetRuleConfigOutput;
|
|
116
|
+
}
|
|
117
|
+
/** Creates or updates an resource set config. */
|
|
118
|
+
export interface ResourceSetRulesCreateOrUpdateResourceSetRuleDefaultResponse extends HttpResponse {
|
|
119
|
+
status: string;
|
|
120
|
+
body: ErrorResponseModelOutput;
|
|
121
|
+
}
|
|
122
|
+
/** Deletes a ResourceSetRuleConfig resource. */
|
|
123
|
+
export interface ResourceSetRulesDeleteResourceSetRule200Response extends HttpResponse {
|
|
124
|
+
status: "200";
|
|
125
|
+
}
|
|
126
|
+
/** Deletes a ResourceSetRuleConfig resource. */
|
|
127
|
+
export interface ResourceSetRulesDeleteResourceSetRule204Response extends HttpResponse {
|
|
128
|
+
status: "204";
|
|
129
|
+
}
|
|
130
|
+
/** Deletes a ResourceSetRuleConfig resource. */
|
|
131
|
+
export interface ResourceSetRulesDeleteResourceSetRuleDefaultResponse extends HttpResponse {
|
|
132
|
+
status: string;
|
|
133
|
+
body: ErrorResponseModelOutput;
|
|
134
|
+
}
|
|
135
|
+
/** Get a resource set config service model. */
|
|
136
|
+
export interface ResourceSetRulesListResourceSetRules200Response extends HttpResponse {
|
|
137
|
+
status: "200";
|
|
138
|
+
body: ResourceSetRuleConfigListOutput;
|
|
139
|
+
}
|
|
140
|
+
/** Get a resource set config service model. */
|
|
141
|
+
export interface ResourceSetRulesListResourceSetRulesDefaultResponse extends HttpResponse {
|
|
142
|
+
status: string;
|
|
143
|
+
body: ErrorResponseModelOutput;
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=responses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../../src/account/responses.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EACV,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AAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { HttpResponse } from \"@azure-rest/core-client\";\nimport type {\n AccountOutput,\n ErrorResponseModelOutput,\n AccessKeysOutput,\n CollectionOutput,\n CollectionListOutput,\n CollectionNameResponseListOutput,\n CollectionPathResponseOutput,\n ResourceSetRuleConfigOutput,\n ResourceSetRuleConfigListOutput,\n} from \"./outputModels.js\";\n\n/** Get an account */\nexport interface AccountsGetAccountProperties200Response extends HttpResponse {\n status: \"200\";\n body: AccountOutput;\n}\n\n/** Get an account */\nexport interface AccountsGetAccountPropertiesDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseModelOutput;\n}\n\n/** Updates an account */\nexport interface AccountsUpdateAccountProperties200Response extends HttpResponse {\n status: \"200\";\n body: AccountOutput;\n}\n\n/** Updates an account */\nexport interface AccountsUpdateAccountPropertiesDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseModelOutput;\n}\n\n/** List the authorization keys associated with this account. */\nexport interface AccountsGetAccessKeys200Response extends HttpResponse {\n status: \"200\";\n body: AccessKeysOutput;\n}\n\n/** List the authorization keys associated with this account. */\nexport interface AccountsGetAccessKeysDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseModelOutput;\n}\n\n/** Regenerate the authorization keys associated with this data catalog. */\nexport interface AccountsRegenerateAccessKey200Response extends HttpResponse {\n status: \"200\";\n body: AccessKeysOutput;\n}\n\n/** Regenerate the authorization keys associated with this data catalog. */\nexport interface AccountsRegenerateAccessKeyDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseModelOutput;\n}\n\n/** Get a collection */\nexport interface CollectionsGetCollection200Response extends HttpResponse {\n status: \"200\";\n body: CollectionOutput;\n}\n\n/** Get a collection */\nexport interface CollectionsGetCollectionDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseModelOutput;\n}\n\n/** Creates or updates a collection entity. */\nexport interface CollectionsCreateOrUpdateCollection200Response extends HttpResponse {\n status: \"200\";\n body: CollectionOutput;\n}\n\n/** Creates or updates a collection entity. */\nexport interface CollectionsCreateOrUpdateCollectionDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseModelOutput;\n}\n\n/** Deletes a Collection entity. */\nexport interface CollectionsDeleteCollection204Response extends HttpResponse {\n status: \"204\";\n}\n\n/** Deletes a Collection entity. */\nexport interface CollectionsDeleteCollectionDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseModelOutput;\n}\n\n/** List the collections in the account. */\nexport interface CollectionsListCollections200Response extends HttpResponse {\n status: \"200\";\n body: CollectionListOutput;\n}\n\n/** List the collections in the account. */\nexport interface CollectionsListCollectionsDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseModelOutput;\n}\n\n/** Lists the child collections names in the collection. */\nexport interface CollectionsListChildCollectionNames200Response extends HttpResponse {\n status: \"200\";\n body: CollectionNameResponseListOutput;\n}\n\n/** Lists the child collections names in the collection. */\nexport interface CollectionsListChildCollectionNamesDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseModelOutput;\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: CollectionPathResponseOutput;\n}\n\n/** Gets the parent name and parent friendly name chains that represent the collection path. */\nexport interface CollectionsGetCollectionPathDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseModelOutput;\n}\n\n/** Get a resource set config service model. */\nexport interface ResourceSetRulesGetResourceSetRule200Response extends HttpResponse {\n status: \"200\";\n body: ResourceSetRuleConfigOutput;\n}\n\n/** Get a resource set config service model. */\nexport interface ResourceSetRulesGetResourceSetRuleDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseModelOutput;\n}\n\n/** Creates or updates an resource set config. */\nexport interface ResourceSetRulesCreateOrUpdateResourceSetRule200Response extends HttpResponse {\n status: \"200\";\n body: ResourceSetRuleConfigOutput;\n}\n\n/** Creates or updates an resource set config. */\nexport interface ResourceSetRulesCreateOrUpdateResourceSetRuleDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseModelOutput;\n}\n\n/** Deletes a ResourceSetRuleConfig resource. */\nexport interface ResourceSetRulesDeleteResourceSetRule200Response extends HttpResponse {\n status: \"200\";\n}\n\n/** Deletes a ResourceSetRuleConfig resource. */\nexport interface ResourceSetRulesDeleteResourceSetRule204Response extends HttpResponse {\n status: \"204\";\n}\n\n/** Deletes a ResourceSetRuleConfig resource. */\nexport interface ResourceSetRulesDeleteResourceSetRuleDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseModelOutput;\n}\n\n/** Get a resource set config service model. */\nexport interface ResourceSetRulesListResourceSetRules200Response extends HttpResponse {\n status: \"200\";\n body: ResourceSetRuleConfigListOutput;\n}\n\n/** Get a resource set config service model. */\nexport interface ResourceSetRulesListResourceSetRulesDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponseModelOutput;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,uBAAuB,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,cAAc,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import * as PurviewMetadataPolicies from "./metadataPolicies/index.js";
|
|
4
|
+
import * as PurviewAccount from "./account/index.js";
|
|
5
|
+
export { PurviewMetadataPolicies, PurviewAccount };
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,uBAAuB,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,cAAc,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as PurviewMetadataPolicies from \"./metadataPolicies/index.js\";\nimport * as PurviewAccount from \"./account/index.js\";\n\nexport { PurviewMetadataPolicies, PurviewAccount };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,qCAA+C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,wBAAwB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"purview-administration\");\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { MetadataRolesListParameters, MetadataPolicyListAllParameters, MetadataPolicyUpdateParameters, MetadataPolicyGetParameters } from "./parameters.js";
|
|
2
|
+
import type { MetadataRolesList200Response, MetadataRolesListDefaultResponse, MetadataPolicyListAll200Response, MetadataPolicyListAllDefaultResponse, MetadataPolicyUpdate200Response, MetadataPolicyUpdateDefaultResponse, MetadataPolicyGet200Response, MetadataPolicyGetDefaultResponse } from "./responses.js";
|
|
3
|
+
import type { Client, StreamableMethod } from "@azure-rest/core-client";
|
|
4
|
+
export interface MetadataRolesList {
|
|
5
|
+
/** Lists roles for Purview Account */
|
|
6
|
+
get(options?: MetadataRolesListParameters): StreamableMethod<MetadataRolesList200Response | MetadataRolesListDefaultResponse>;
|
|
7
|
+
}
|
|
8
|
+
export interface MetadataPolicyListAll {
|
|
9
|
+
/** List or Get metadata policies */
|
|
10
|
+
get(options?: MetadataPolicyListAllParameters): StreamableMethod<MetadataPolicyListAll200Response | MetadataPolicyListAllDefaultResponse>;
|
|
11
|
+
}
|
|
12
|
+
export interface MetadataPolicyUpdate {
|
|
13
|
+
/** Updates a metadata policy */
|
|
14
|
+
put(options?: MetadataPolicyUpdateParameters): StreamableMethod<MetadataPolicyUpdate200Response | MetadataPolicyUpdateDefaultResponse>;
|
|
15
|
+
/** Gets a metadata policy */
|
|
16
|
+
get(options?: MetadataPolicyGetParameters): StreamableMethod<MetadataPolicyGet200Response | MetadataPolicyGetDefaultResponse>;
|
|
17
|
+
}
|
|
18
|
+
export interface Routes {
|
|
19
|
+
/** Resource for '/metadataRoles' has methods for the following verbs: get */
|
|
20
|
+
(path: "/metadataRoles"): MetadataRolesList;
|
|
21
|
+
/** Resource for '/metadataPolicies' has methods for the following verbs: get */
|
|
22
|
+
(path: "/metadataPolicies"): MetadataPolicyListAll;
|
|
23
|
+
/** Resource for '/metadataPolicies/\{policyId\}' has methods for the following verbs: put, get */
|
|
24
|
+
(path: "/metadataPolicies/{policyId}", policyId: string): MetadataPolicyUpdate;
|
|
25
|
+
}
|
|
26
|
+
export type PurviewMetadataPoliciesClient = Client & {
|
|
27
|
+
path: Routes;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=clientDefinitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../../src/metadataPolicies/clientDefinitions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,2BAA2B,EAC3B,+BAA+B,EAC/B,8BAA8B,EAC9B,2BAA2B,EAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,4BAA4B,EAC5B,gCAAgC,EAChC,gCAAgC,EAChC,oCAAoC,EACpC,+BAA+B,EAC/B,mCAAmC,EACnC,4BAA4B,EAC5B,gCAAgC,EACjC,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAExE,MAAM,WAAW,iBAAiB;IAChC,sCAAsC;IACtC,GAAG,CACD,OAAO,CAAC,EAAE,2BAA2B,GACpC,gBAAgB,CAAC,4BAA4B,GAAG,gCAAgC,CAAC,CAAC;CACtF;AAED,MAAM,WAAW,qBAAqB;IACpC,oCAAoC;IACpC,GAAG,CACD,OAAO,CAAC,EAAE,+BAA+B,GACxC,gBAAgB,CAAC,gCAAgC,GAAG,oCAAoC,CAAC,CAAC;CAC9F;AAED,MAAM,WAAW,oBAAoB;IACnC,gCAAgC;IAChC,GAAG,CACD,OAAO,CAAC,EAAE,8BAA8B,GACvC,gBAAgB,CAAC,+BAA+B,GAAG,mCAAmC,CAAC,CAAC;IAC3F,6BAA6B;IAC7B,GAAG,CACD,OAAO,CAAC,EAAE,2BAA2B,GACpC,gBAAgB,CAAC,4BAA4B,GAAG,gCAAgC,CAAC,CAAC;CACtF;AAED,MAAM,WAAW,MAAM;IACrB,6EAA6E;IAC7E,CAAC,IAAI,EAAE,gBAAgB,GAAG,iBAAiB,CAAC;IAC5C,gFAAgF;IAChF,CAAC,IAAI,EAAE,mBAAmB,GAAG,qBAAqB,CAAC;IACnD,kGAAkG;IAClG,CAAC,IAAI,EAAE,8BAA8B,EAAE,QAAQ,EAAE,MAAM,GAAG,oBAAoB,CAAC;CAChF;AAED,MAAM,MAAM,6BAA6B,GAAG,MAAM,GAAG;IACnD,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
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 type {\n MetadataRolesListParameters,\n MetadataPolicyListAllParameters,\n MetadataPolicyUpdateParameters,\n MetadataPolicyGetParameters,\n} from \"./parameters.js\";\nimport type {\n MetadataRolesList200Response,\n MetadataRolesListDefaultResponse,\n MetadataPolicyListAll200Response,\n MetadataPolicyListAllDefaultResponse,\n MetadataPolicyUpdate200Response,\n MetadataPolicyUpdateDefaultResponse,\n MetadataPolicyGet200Response,\n MetadataPolicyGetDefaultResponse,\n} from \"./responses.js\";\nimport type { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface MetadataRolesList {\n /** Lists roles for Purview Account */\n get(\n options?: MetadataRolesListParameters,\n ): StreamableMethod<MetadataRolesList200Response | MetadataRolesListDefaultResponse>;\n}\n\nexport interface MetadataPolicyListAll {\n /** List or Get metadata policies */\n get(\n options?: MetadataPolicyListAllParameters,\n ): StreamableMethod<MetadataPolicyListAll200Response | MetadataPolicyListAllDefaultResponse>;\n}\n\nexport interface MetadataPolicyUpdate {\n /** Updates a metadata policy */\n put(\n options?: MetadataPolicyUpdateParameters,\n ): StreamableMethod<MetadataPolicyUpdate200Response | MetadataPolicyUpdateDefaultResponse>;\n /** Gets a metadata policy */\n get(\n options?: MetadataPolicyGetParameters,\n ): StreamableMethod<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 PurviewMetadataPoliciesClient = Client & {\n path: Routes;\n};\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as Parameters from "./parameters.js";
|
|
2
|
+
import * as Responses from "./responses.js";
|
|
3
|
+
import * as Client from "./clientDefinitions.js";
|
|
4
|
+
import * as Models from "./models.js";
|
|
5
|
+
import * as OutputModels from "./outputModels.js";
|
|
6
|
+
import * as PaginateHelper from "./paginateHelper.js";
|
|
7
|
+
import * as UnexpectedHelper from "./isUnexpected.js";
|
|
8
|
+
export { createClient, PurviewMetadataPoliciesClientOptions } from "./purviewMetadataPolicies.js";
|
|
9
|
+
export { Parameters, Responses, Client, Models, OutputModels, PaginateHelper, UnexpectedHelper };
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/metadataPolicies/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,gBAAgB,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,oCAAoC,EAAE,MAAM,8BAA8B,CAAC;AAClG,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import * as Parameters from "./parameters.js";
|
|
4
|
+
import * as Responses from "./responses.js";
|
|
5
|
+
import * as Client from "./clientDefinitions.js";
|
|
6
|
+
import * as Models from "./models.js";
|
|
7
|
+
import * as OutputModels from "./outputModels.js";
|
|
8
|
+
import * as PaginateHelper from "./paginateHelper.js";
|
|
9
|
+
import * as UnexpectedHelper from "./isUnexpected.js";
|
|
10
|
+
export { createClient } from "./purviewMetadataPolicies.js";
|
|
11
|
+
export { Parameters, Responses, Client, Models, OutputModels, PaginateHelper, UnexpectedHelper };
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/metadataPolicies/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,gBAAgB,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAwC,MAAM,8BAA8B,CAAC;AAClG,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport * as Parameters from \"./parameters.js\";\nimport * as Responses from \"./responses.js\";\nimport * as Client from \"./clientDefinitions.js\";\nimport * as Models from \"./models.js\";\nimport * as OutputModels from \"./outputModels.js\";\nimport * as PaginateHelper from \"./paginateHelper.js\";\nimport * as UnexpectedHelper from \"./isUnexpected.js\";\n\nexport { createClient, PurviewMetadataPoliciesClientOptions } from \"./purviewMetadataPolicies.js\";\nexport { Parameters, Responses, Client, Models, OutputModels, PaginateHelper, UnexpectedHelper };\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { MetadataRolesList200Response, MetadataRolesListDefaultResponse, MetadataPolicyListAll200Response, MetadataPolicyListAllDefaultResponse, MetadataPolicyUpdate200Response, MetadataPolicyUpdateDefaultResponse, MetadataPolicyGet200Response, MetadataPolicyGetDefaultResponse } from "./responses.js";
|
|
2
|
+
export declare function isUnexpected(response: MetadataRolesList200Response | MetadataRolesListDefaultResponse): response is MetadataRolesListDefaultResponse;
|
|
3
|
+
export declare function isUnexpected(response: MetadataPolicyListAll200Response | MetadataPolicyListAllDefaultResponse): response is MetadataPolicyListAllDefaultResponse;
|
|
4
|
+
export declare function isUnexpected(response: MetadataPolicyUpdate200Response | MetadataPolicyUpdateDefaultResponse): response is MetadataPolicyUpdateDefaultResponse;
|
|
5
|
+
export declare function isUnexpected(response: MetadataPolicyGet200Response | MetadataPolicyGetDefaultResponse): response is MetadataPolicyGetDefaultResponse;
|
|
6
|
+
//# sourceMappingURL=isUnexpected.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../../src/metadataPolicies/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,4BAA4B,EAC5B,gCAAgC,EAChC,gCAAgC,EAChC,oCAAoC,EACpC,+BAA+B,EAC/B,mCAAmC,EACnC,4BAA4B,EAC5B,gCAAgC,EACjC,MAAM,gBAAgB,CAAC;AASxB,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,4BAA4B,GAAG,gCAAgC,GACxE,QAAQ,IAAI,gCAAgC,CAAC;AAChD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,gCAAgC,GAAG,oCAAoC,GAChF,QAAQ,IAAI,oCAAoC,CAAC;AACpD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,+BAA+B,GAAG,mCAAmC,GAC9E,QAAQ,IAAI,mCAAmC,CAAC;AACnD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,4BAA4B,GAAG,gCAAgC,GACxE,QAAQ,IAAI,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
const responseMap = {
|
|
4
|
+
"GET /metadataRoles": ["200"],
|
|
5
|
+
"GET /metadataPolicies": ["200"],
|
|
6
|
+
"PUT /metadataPolicies/{policyId}": ["200"],
|
|
7
|
+
"GET /metadataPolicies/{policyId}": ["200"],
|
|
8
|
+
};
|
|
9
|
+
export function isUnexpected(response) {
|
|
10
|
+
const lroOriginal = response.headers["x-ms-original-url"];
|
|
11
|
+
const url = new URL(lroOriginal ?? response.request.url);
|
|
12
|
+
const method = response.request.method;
|
|
13
|
+
let pathDetails = responseMap[`${method} ${url.pathname}`];
|
|
14
|
+
if (!pathDetails) {
|
|
15
|
+
pathDetails = getParametrizedPathSuccess(method, url.pathname);
|
|
16
|
+
}
|
|
17
|
+
return !pathDetails.includes(response.status);
|
|
18
|
+
}
|
|
19
|
+
function getParametrizedPathSuccess(method, path) {
|
|
20
|
+
const pathParts = path.split("/");
|
|
21
|
+
// Traverse list to match the longest candidate
|
|
22
|
+
// matchedLen: the length of candidate path
|
|
23
|
+
// matchedValue: the matched status code array
|
|
24
|
+
let matchedLen = -1, matchedValue = [];
|
|
25
|
+
// Iterate the responseMap to find a match
|
|
26
|
+
for (const [key, value] of Object.entries(responseMap)) {
|
|
27
|
+
// Extracting the path from the map key which is in format
|
|
28
|
+
// GET /path/foo
|
|
29
|
+
if (!key.startsWith(method)) {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
const candidatePath = getPathFromMapKey(key);
|
|
33
|
+
// Get each part of the url path
|
|
34
|
+
const candidateParts = candidatePath.split("/");
|
|
35
|
+
// track if we have found a match to return the values found.
|
|
36
|
+
let found = true;
|
|
37
|
+
for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
|
|
38
|
+
if (candidateParts[i]?.startsWith("{") && candidateParts[i]?.indexOf("}") !== -1) {
|
|
39
|
+
const start = candidateParts[i].indexOf("}") + 1, end = candidateParts[i]?.length;
|
|
40
|
+
// If the current part of the candidate is a "template" part
|
|
41
|
+
// Try to use the suffix of pattern to match the path
|
|
42
|
+
// {guid} ==> $
|
|
43
|
+
// {guid}:export ==> :export$
|
|
44
|
+
const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(pathParts[j] || "");
|
|
45
|
+
if (!isMatched) {
|
|
46
|
+
found = false;
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
// If the candidate part is not a template and
|
|
52
|
+
// the parts don't match mark the candidate as not found
|
|
53
|
+
// to move on with the next candidate path.
|
|
54
|
+
if (candidateParts[i] !== pathParts[j]) {
|
|
55
|
+
found = false;
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
// We finished evaluating the current candidate parts
|
|
60
|
+
// Update the matched value if and only if we found the longer pattern
|
|
61
|
+
if (found && candidatePath.length > matchedLen) {
|
|
62
|
+
matchedLen = candidatePath.length;
|
|
63
|
+
matchedValue = value;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return matchedValue;
|
|
67
|
+
}
|
|
68
|
+
function getPathFromMapKey(mapKey) {
|
|
69
|
+
const pathStart = mapKey.indexOf("/");
|
|
70
|
+
return mapKey.slice(pathStart);
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=isUnexpected.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../../src/metadataPolicies/isUnexpected.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAalC,MAAM,WAAW,GAA6B;IAC5C,oBAAoB,EAAE,CAAC,KAAK,CAAC;IAC7B,uBAAuB,EAAE,CAAC,KAAK,CAAC;IAChC,kCAAkC,EAAE,CAAC,KAAK,CAAC;IAC3C,kCAAkC,EAAE,CAAC,KA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YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n MetadataRolesList200Response,\n MetadataRolesListDefaultResponse,\n MetadataPolicyListAll200Response,\n MetadataPolicyListAllDefaultResponse,\n MetadataPolicyUpdate200Response,\n MetadataPolicyUpdateDefaultResponse,\n MetadataPolicyGet200Response,\n MetadataPolicyGetDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /metadataRoles\": [\"200\"],\n \"GET /metadataPolicies\": [\"200\"],\n \"PUT /metadataPolicies/{policyId}\": [\"200\"],\n \"GET /metadataPolicies/{policyId}\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: MetadataRolesList200Response | MetadataRolesListDefaultResponse,\n): response is MetadataRolesListDefaultResponse;\nexport function isUnexpected(\n response: MetadataPolicyListAll200Response | MetadataPolicyListAllDefaultResponse,\n): response is MetadataPolicyListAllDefaultResponse;\nexport function isUnexpected(\n response: MetadataPolicyUpdate200Response | MetadataPolicyUpdateDefaultResponse,\n): response is MetadataPolicyUpdateDefaultResponse;\nexport function isUnexpected(\n response: MetadataPolicyGet200Response | MetadataPolicyGetDefaultResponse,\n): response is MetadataPolicyGetDefaultResponse;\nexport function isUnexpected(\n response:\n | MetadataRolesList200Response\n | MetadataRolesListDefaultResponse\n | MetadataPolicyListAll200Response\n | MetadataPolicyListAllDefaultResponse\n | MetadataPolicyUpdate200Response\n | MetadataPolicyUpdateDefaultResponse\n | MetadataPolicyGet200Response\n | MetadataPolicyGetDefaultResponse,\n): response is\n | MetadataRolesListDefaultResponse\n | MetadataPolicyListAllDefaultResponse\n | MetadataPolicyUpdateDefaultResponse\n | MetadataPolicyGetDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
|