@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../../src/account/paginateHelper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D;;;;;;GAMG;AACH,SAAS,qBAAqB,CAM5B,WAAqD;;IAErD,MAAM,IAAI,GAAG,oBAAoB,CAAwC,WAAW,CAAC,CAAC;IACtF,OAAO;QACL,IAAI;YACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;QACrB,CAAC;QACD,CAAC,MAAM,CAAC,aAAa,CAAC;YACpB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,EACJ,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,MAAM,mCAClB,CAAC,CAAC,QAAuB,EAAE,EAAE;YAC5B,MAAM,EAAE,iBAAiB,EAAE,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,CAAC;YAC7C,OAAO,oBAAoB,CAAC,WAAW,EAAE;gBACvC,QAAQ,EAAE,iBAAiD;aAC5D,CAAC,CAAC;QACL,CAAC,CAA2E;KAC/E,CAAC;AACJ,CAAC;AAED,SAAgB,oBAAoB,CAClC,WAAqD;;;QAErD,MAAM,KAAK,GAAG,oBAAoB,CAAC,WAAW,CAAC,CAAC;QAChD,MAAM,QAAQ,GAAG,cAAM,KAAK,CAAC,IAAI,EAAE,CAAA,CAAC;QACpC,6FAA6F;QAC7F,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACnC,sCAAsC;YACtC,MAAM,EAAE,UAAU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the MIT License.\n\nimport type { Client, PathUncheckedResponse } from \"@azure-rest/core-client\";\nimport { createRestError } from \"@azure-rest/core-client\";\n\n/**\n * returns an async iterator that iterates over results. It also has a `byPage`\n * method that returns pages of items at once.\n *\n * @param pagedResult - an object that specifies how to get pages.\n * @returns a paged async iterator that iterates over results.\n */\nfunction getPagedAsyncIterator<\n TElement,\n TPage = TElement[],\n TPageSettings = PageSettings,\n TLink = string,\n>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n): PagedAsyncIterableIterator<TElement, TPage, TPageSettings> {\n const iter = getItemAsyncIterator<TElement, TPage, TLink, TPageSettings>(pagedResult);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage:\n pagedResult?.byPage ??\n (((settings?: PageSettings) => {\n const { continuationToken } = settings ?? {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken as unknown as TLink | undefined,\n });\n }) as unknown as (settings?: TPageSettings) => AsyncIterableIterator<TPage>),\n };\n}\n\nasync function* getItemAsyncIterator<TElement, TPage, TLink, TPageSettings>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n): AsyncIterableIterator<TElement> {\n const pages = getPageAsyncIterator(pagedResult);\n const firstVal = await pages.next();\n // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is\n if (!Array.isArray(firstVal.value)) {\n // can extract elements from this page\n const { toElements } = pagedResult;\n if (toElements) {\n yield* toElements(firstVal.value) as TElement[];\n for await (const page of pages) {\n yield* toElements(page) as TElement[];\n }\n } else {\n yield firstVal.value;\n // `pages` is of type `AsyncIterableIterator<TPage>` but TPage = TElement in this case\n yield* pages as unknown as AsyncIterableIterator<TElement>;\n }\n } else {\n yield* firstVal.value;\n for await (const page of pages) {\n // pages is of type `AsyncIterableIterator<TPage>` so `page` is of type `TPage`. In this branch,\n // it must be the case that `TPage = TElement[]`\n yield* page as unknown as TElement[];\n }\n }\n}\n\nasync function* getPageAsyncIterator<TPage, TLink, TPageSettings>(\n pagedResult: PagedResult<TPage, TPageSettings, TLink>,\n options: {\n pageLink?: TLink;\n } = {},\n): AsyncIterableIterator<TPage> {\n const { pageLink } = options;\n let response = await pagedResult.getPage(pageLink ?? pagedResult.firstPageLink);\n if (!response) {\n return;\n }\n yield response.page;\n while (response.nextPageLink) {\n response = await pagedResult.getPage(response.nextPageLink);\n if (!response) {\n return;\n }\n yield response.page;\n }\n}\n\n/**\n * An interface that tracks the settings for paged iteration\n */\nexport interface PageSettings {\n /**\n * The token that keeps track of where to continue the iterator\n */\n continuationToken?: string;\n}\n\n/**\n * An interface that allows async iterable iteration both to completion and by page.\n */\nexport interface PagedAsyncIterableIterator<\n TElement,\n TPage = TElement[],\n TPageSettings = PageSettings,\n> {\n /**\n * The next method, part of the iteration protocol\n */\n next(): Promise<IteratorResult<TElement>>;\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator](): PagedAsyncIterableIterator<TElement, TPage, TPageSettings>;\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;\n}\n\n/**\n * An interface that describes how to communicate with the service.\n */\ninterface PagedResult<TPage, TPageSettings = PageSettings, TLink = string> {\n /**\n * Link to the first page of results.\n */\n firstPageLink: TLink;\n /**\n * A method that returns a page of results.\n */\n getPage: (pageLink: TLink) => Promise<{ page: TPage; nextPageLink?: TLink } | undefined>;\n /**\n * a function to implement the `byPage` method on the paged async iterator.\n */\n byPage?: (settings?: TPageSettings) => AsyncIterableIterator<TPage>;\n\n /**\n * A function to extract elements from a page.\n */\n toElements?: (page: TPage) => unknown[];\n}\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> = (pageLink: string) => 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"]}
|
|
@@ -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;AA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4D,GAC1D,sDAAsD,GACtD,iBAAiB,CAAC;AACtB,MAAM,MAAM,+CAA+C,GAAG,iBAAiB,CAAC;AAEhF,MAAM,WAAW,wDAAwD;IACvE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,8CAA8C;IAC7D,eAAe,CAAC,EAAE,wDAAwD,CAAC;CAC5E;AAED,MAAM,MAAM,8CAA8C,GACxD,8CAA8C,GAAG,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
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 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,43 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
import { __rest } from "tslib";
|
|
4
|
+
import { getClient } from "@azure-rest/core-client";
|
|
5
|
+
import { logger } from "../logger.js";
|
|
6
|
+
/**
|
|
7
|
+
* Initialize a new instance of `PurviewAccountClient`
|
|
8
|
+
* @param endpoint - The account endpoint of your Purview account. Example: https://\{accountName\}.purview.azure.com/account/
|
|
9
|
+
* @param credentials - uniquely identify client credential
|
|
10
|
+
* @param options - the parameter for all optional parameters
|
|
11
|
+
*/
|
|
12
|
+
export function createClient(endpoint, credentials, _a = {}) {
|
|
13
|
+
var _b, _c, _d, _e;
|
|
14
|
+
var { apiVersion = "2019-11-01-preview" } = _a, options = __rest(_a, ["apiVersion"]);
|
|
15
|
+
const endpointUrl = (_c = (_b = options.endpoint) !== null && _b !== void 0 ? _b : options.baseUrl) !== null && _c !== void 0 ? _c : `${endpoint}`;
|
|
16
|
+
const userAgentInfo = `azsdk-js-purview-administration-rest/1.0.0-beta.2`;
|
|
17
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
18
|
+
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
19
|
+
: `${userAgentInfo}`;
|
|
20
|
+
options = Object.assign(Object.assign({}, options), { userAgentOptions: {
|
|
21
|
+
userAgentPrefix,
|
|
22
|
+
}, loggingOptions: {
|
|
23
|
+
logger: (_e = (_d = options.loggingOptions) === null || _d === void 0 ? void 0 : _d.logger) !== null && _e !== void 0 ? _e : logger.info,
|
|
24
|
+
}, credentials: {
|
|
25
|
+
scopes: ["https://purview.azure.net/.default"],
|
|
26
|
+
} });
|
|
27
|
+
const client = getClient(endpointUrl, credentials, options);
|
|
28
|
+
client.pipeline.removePolicy({ name: "ApiVersionPolicy" });
|
|
29
|
+
client.pipeline.addPolicy({
|
|
30
|
+
name: "ClientApiVersionPolicy",
|
|
31
|
+
sendRequest: (req, next) => {
|
|
32
|
+
// Use the apiVersion defined in request url directly
|
|
33
|
+
// Append one if there is no apiVersion and we have one at client options
|
|
34
|
+
const url = new URL(req.url);
|
|
35
|
+
if (!url.searchParams.get("api-version") && apiVersion) {
|
|
36
|
+
req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${apiVersion}`;
|
|
37
|
+
}
|
|
38
|
+
return next(req);
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
return client;
|
|
42
|
+
}
|
|
43
|
+
//# 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;AAUtC;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAC1B,QAAgB,EAChB,WAA4B,EAC5B,KAAiF,EAAE;;QAAnF,EAAE,UAAU,GAAG,oBAAoB,OAAgD,EAA3C,OAAO,cAA/C,cAAiD,CAAF;IAE/C,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,GAAG,QAAQ,EAAE,CAAC;IACzE,MAAM,aAAa,GAAG,mDAAmD,CAAC;IAC1E,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI;SACtD,EACD,WAAW,EAAE;YACX,MAAM,EAAE,CAAC,oCAAoC,CAAC;SAC/C,GACF,CAAC;IACF,MAAM,MAAM,GAAG,SAAS,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAyB,CAAC;IAEpF,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAC3D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;QACxB,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,UAAU,EAAE,CAAC;gBACvD,GAAG,CAAC,GAAG,GAAG,GAAG,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,aAAa,EACb,wBAAwB,EACxB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,gCAAgC,EAChC,4BAA4B,EAC5B,2BAA2B,EAC3B,+BAA+B,EAChC,MAAM,mBAAmB,CAAC;AAE3B,qBAAqB;AACrB,MAAM,WAAW,uCAAwC,SAAQ,YAAY;IAC3E,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,qBAAqB;AACrB,MAAM,WAAW,2CAA4C,SAAQ,YAAY;IAC/E,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,wBAAwB,CAAC;CAChC;AAED,yBAAyB;AACzB,MAAM,WAAW,0CAA2C,SAAQ,YAAY;IAC9E,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,yBAAyB;AACzB,MAAM,WAAW,8CAA+C,SAAQ,YAAY;IAClF,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,wBAAwB,CAAC;C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MAAM,EAAE,KAAK,CAAC;CACf;AAED,gDAAgD;AAChD,MAAM,WAAW,gDAAiD,SAAQ,YAAY;IACpF,MAAM,EAAE,KAAK,CAAC;CACf;AAED,gDAAgD;AAChD,MAAM,WAAW,oDAAqD,SAAQ,YAAY;IACxF,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,wBAAwB,CAAC;CAChC;AAED,+CAA+C;AAC/C,MAAM,WAAW,+CAAgD,SAAQ,YAAY;IACnF,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,+BAA+B,CAAC;CACvC;AAED,+CAA+C;AAC/C,MAAM,WAAW,mDAAoD,SAAQ,YAAY;IACvF,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,wBAAwB,CAAC;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
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 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,73 @@
|
|
|
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 !== null && lroOriginal !== void 0 ? 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
|
+
var _a, _b, _c, _d;
|
|
21
|
+
const pathParts = path.split("/");
|
|
22
|
+
// Traverse list to match the longest candidate
|
|
23
|
+
// matchedLen: the length of candidate path
|
|
24
|
+
// matchedValue: the matched status code array
|
|
25
|
+
let matchedLen = -1, matchedValue = [];
|
|
26
|
+
// Iterate the responseMap to find a match
|
|
27
|
+
for (const [key, value] of Object.entries(responseMap)) {
|
|
28
|
+
// Extracting the path from the map key which is in format
|
|
29
|
+
// GET /path/foo
|
|
30
|
+
if (!key.startsWith(method)) {
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
const candidatePath = getPathFromMapKey(key);
|
|
34
|
+
// Get each part of the url path
|
|
35
|
+
const candidateParts = candidatePath.split("/");
|
|
36
|
+
// track if we have found a match to return the values found.
|
|
37
|
+
let found = true;
|
|
38
|
+
for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
|
|
39
|
+
if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) && ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
|
|
40
|
+
const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
|
|
41
|
+
// If the current part of the candidate is a "template" part
|
|
42
|
+
// Try to use the suffix of pattern to match the path
|
|
43
|
+
// {guid} ==> $
|
|
44
|
+
// {guid}:export ==> :export$
|
|
45
|
+
const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
|
|
46
|
+
if (!isMatched) {
|
|
47
|
+
found = false;
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
// If the candidate part is not a template and
|
|
53
|
+
// the parts don't match mark the candidate as not found
|
|
54
|
+
// to move on with the next candidate path.
|
|
55
|
+
if (candidateParts[i] !== pathParts[j]) {
|
|
56
|
+
found = false;
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
// We finished evaluating the current candidate parts
|
|
61
|
+
// Update the matched value if and only if we found the longer pattern
|
|
62
|
+
if (found && candidatePath.length > matchedLen) {
|
|
63
|
+
matchedLen = candidatePath.length;
|
|
64
|
+
matchedValue = value;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return matchedValue;
|
|
68
|
+
}
|
|
69
|
+
function getPathFromMapKey(mapKey) {
|
|
70
|
+
const pathStart = mapKey.indexOf("/");
|
|
71
|
+
return mapKey.slice(pathStart);
|
|
72
|
+
}
|
|
73
|
+
//# 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,KAAK,CAAC;CAC5C,CAAC;AAcF,MAAM,UAAU,YAAY,CAC1B,QAQoC;IAMpC,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;IACvC,IAAI,WAAW,GAAG,WAAW,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3D,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,WAAW,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Ac,CAAC,CAAC,CAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAC/C,GAAG,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,MAAM,CAAC;gBAClC,4DAA4D;gBAC5D,qDAAqD;gBACrD,eAAe;gBACf,6BAA6B;gBAC7B,MAAM,SAAS,GAAG,IAAI,MAAM,CAAC,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAC1E,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CACnB,CAAC;gBAEF,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,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"]}
|