@equinor/fusion-services 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +78 -0
- package/dist/esm/index.js +25 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/roles/endpoints/access-roles.get.js +118 -0
- package/dist/esm/roles/endpoints/access-roles.get.js.map +1 -0
- package/dist/esm/roles/endpoints/account-access-role-assignments.get.js +133 -0
- package/dist/esm/roles/endpoints/account-access-role-assignments.get.js.map +1 -0
- package/dist/esm/roles/endpoints/account-active-access-role-assignments.get.js +115 -0
- package/dist/esm/roles/endpoints/account-active-access-role-assignments.get.js.map +1 -0
- package/dist/esm/roles/endpoints/account-claimable-role-assignment-activation.get.js +118 -0
- package/dist/esm/roles/endpoints/account-claimable-role-assignment-activation.get.js.map +1 -0
- package/dist/esm/roles/endpoints/account-claimable-role-assignment-activation.post.js +124 -0
- package/dist/esm/roles/endpoints/account-claimable-role-assignment-activation.post.js.map +1 -0
- package/dist/esm/roles/endpoints/account-claimable-role-assignment-deactivation.post.js +120 -0
- package/dist/esm/roles/endpoints/account-claimable-role-assignment-deactivation.post.js.map +1 -0
- package/dist/esm/roles/endpoints/account-claimable-role-assignments.get.js +118 -0
- package/dist/esm/roles/endpoints/account-claimable-role-assignments.get.js.map +1 -0
- package/dist/esm/roles/endpoints/account-consolidated-claimable-role-assignments.get.js +120 -0
- package/dist/esm/roles/endpoints/account-consolidated-claimable-role-assignments.get.js.map +1 -0
- package/dist/esm/roles/endpoints/account-consolidated-role-assignments.get.js +116 -0
- package/dist/esm/roles/endpoints/account-consolidated-role-assignments.get.js.map +1 -0
- package/dist/esm/roles/endpoints/account-role-assignments.get.js +115 -0
- package/dist/esm/roles/endpoints/account-role-assignments.get.js.map +1 -0
- package/dist/esm/roles/endpoints/claimable-role-access-role.delete.js +118 -0
- package/dist/esm/roles/endpoints/claimable-role-access-role.delete.js.map +1 -0
- package/dist/esm/roles/endpoints/claimable-role-access-roles.post.js +118 -0
- package/dist/esm/roles/endpoints/claimable-role-access-roles.post.js.map +1 -0
- package/dist/esm/roles/endpoints/claimable-role-assignment-activations-by-assignment.get.js +128 -0
- package/dist/esm/roles/endpoints/claimable-role-assignment-activations-by-assignment.get.js.map +1 -0
- package/dist/esm/roles/endpoints/claimable-role-assignment-activations.get.js +106 -0
- package/dist/esm/roles/endpoints/claimable-role-assignment-activations.get.js.map +1 -0
- package/dist/esm/roles/endpoints/claimable-role-assignment.delete.js +118 -0
- package/dist/esm/roles/endpoints/claimable-role-assignment.delete.js.map +1 -0
- package/dist/esm/roles/endpoints/claimable-role-assignment.get.js +112 -0
- package/dist/esm/roles/endpoints/claimable-role-assignment.get.js.map +1 -0
- package/dist/esm/roles/endpoints/claimable-role-assignment.patch.js +122 -0
- package/dist/esm/roles/endpoints/claimable-role-assignment.patch.js.map +1 -0
- package/dist/esm/roles/endpoints/claimable-role-assignments-by-external-identifier.delete.js +121 -0
- package/dist/esm/roles/endpoints/claimable-role-assignments-by-external-identifier.delete.js.map +1 -0
- package/dist/esm/roles/endpoints/claimable-role-assignments.get.js +127 -0
- package/dist/esm/roles/endpoints/claimable-role-assignments.get.js.map +1 -0
- package/dist/esm/roles/endpoints/claimable-role-assignments.post.js +120 -0
- package/dist/esm/roles/endpoints/claimable-role-assignments.post.js.map +1 -0
- package/dist/esm/roles/endpoints/claimable-role.delete.js +112 -0
- package/dist/esm/roles/endpoints/claimable-role.delete.js.map +1 -0
- package/dist/esm/roles/endpoints/claimable-role.get.js +108 -0
- package/dist/esm/roles/endpoints/claimable-role.get.js.map +1 -0
- package/dist/esm/roles/endpoints/claimable-role.patch.js +118 -0
- package/dist/esm/roles/endpoints/claimable-role.patch.js.map +1 -0
- package/dist/esm/roles/endpoints/claimable-roles.get.js +127 -0
- package/dist/esm/roles/endpoints/claimable-roles.get.js.map +1 -0
- package/dist/esm/roles/endpoints/claimable-roles.post.js +114 -0
- package/dist/esm/roles/endpoints/claimable-roles.post.js.map +1 -0
- package/dist/esm/roles/endpoints/public-schema.get.js +104 -0
- package/dist/esm/roles/endpoints/public-schema.get.js.map +1 -0
- package/dist/esm/roles/endpoints/role-access-role.delete.js +115 -0
- package/dist/esm/roles/endpoints/role-access-role.delete.js.map +1 -0
- package/dist/esm/roles/endpoints/role-access-roles.post.js +116 -0
- package/dist/esm/roles/endpoints/role-access-roles.post.js.map +1 -0
- package/dist/esm/roles/endpoints/role-assignment.delete.js +115 -0
- package/dist/esm/roles/endpoints/role-assignment.delete.js.map +1 -0
- package/dist/esm/roles/endpoints/role-assignment.get.js +113 -0
- package/dist/esm/roles/endpoints/role-assignment.get.js.map +1 -0
- package/dist/esm/roles/endpoints/role-assignment.patch.js +119 -0
- package/dist/esm/roles/endpoints/role-assignment.patch.js.map +1 -0
- package/dist/esm/roles/endpoints/role-assignments-by-external-identifier.delete.js +117 -0
- package/dist/esm/roles/endpoints/role-assignments-by-external-identifier.delete.js.map +1 -0
- package/dist/esm/roles/endpoints/role-assignments-delete.post.js +118 -0
- package/dist/esm/roles/endpoints/role-assignments-delete.post.js.map +1 -0
- package/dist/esm/roles/endpoints/role-assignments.get.js +128 -0
- package/dist/esm/roles/endpoints/role-assignments.get.js.map +1 -0
- package/dist/esm/roles/endpoints/role-assignments.post.js +118 -0
- package/dist/esm/roles/endpoints/role-assignments.post.js.map +1 -0
- package/dist/esm/roles/endpoints/role-binding-configuration-expired-history.delete.js +112 -0
- package/dist/esm/roles/endpoints/role-binding-configuration-expired-history.delete.js.map +1 -0
- package/dist/esm/roles/endpoints/role-binding-configuration-history.get.js +122 -0
- package/dist/esm/roles/endpoints/role-binding-configuration-history.get.js.map +1 -0
- package/dist/esm/roles/endpoints/role-binding-configuration-history.post.js +120 -0
- package/dist/esm/roles/endpoints/role-binding-configuration-history.post.js.map +1 -0
- package/dist/esm/roles/endpoints/role-binding-configuration-notifications.get.js +123 -0
- package/dist/esm/roles/endpoints/role-binding-configuration-notifications.get.js.map +1 -0
- package/dist/esm/roles/endpoints/role-binding-configuration-notifications.post.js +121 -0
- package/dist/esm/roles/endpoints/role-binding-configuration-notifications.post.js.map +1 -0
- package/dist/esm/roles/endpoints/role-binding-configuration-status.get.js +106 -0
- package/dist/esm/roles/endpoints/role-binding-configuration-status.get.js.map +1 -0
- package/dist/esm/roles/endpoints/role-binding-configuration-status.patch.js +116 -0
- package/dist/esm/roles/endpoints/role-binding-configuration-status.patch.js.map +1 -0
- package/dist/esm/roles/endpoints/role-binding-configuration.delete.js +110 -0
- package/dist/esm/roles/endpoints/role-binding-configuration.delete.js.map +1 -0
- package/dist/esm/roles/endpoints/role-binding-configuration.get.js +114 -0
- package/dist/esm/roles/endpoints/role-binding-configuration.get.js.map +1 -0
- package/dist/esm/roles/endpoints/role-binding-configuration.patch.js +115 -0
- package/dist/esm/roles/endpoints/role-binding-configuration.patch.js.map +1 -0
- package/dist/esm/roles/endpoints/role-binding-configurations.get.js +119 -0
- package/dist/esm/roles/endpoints/role-binding-configurations.get.js.map +1 -0
- package/dist/esm/roles/endpoints/role-binding-configurations.post.js +116 -0
- package/dist/esm/roles/endpoints/role-binding-configurations.post.js.map +1 -0
- package/dist/esm/roles/endpoints/role.delete.js +111 -0
- package/dist/esm/roles/endpoints/role.delete.js.map +1 -0
- package/dist/esm/roles/endpoints/role.get.js +110 -0
- package/dist/esm/roles/endpoints/role.get.js.map +1 -0
- package/dist/esm/roles/endpoints/role.patch.js +117 -0
- package/dist/esm/roles/endpoints/role.patch.js.map +1 -0
- package/dist/esm/roles/endpoints/roles-subscription.put.js +115 -0
- package/dist/esm/roles/endpoints/roles-subscription.put.js.map +1 -0
- package/dist/esm/roles/endpoints/roles.get.js +125 -0
- package/dist/esm/roles/endpoints/roles.get.js.map +1 -0
- package/dist/esm/roles/endpoints/roles.post.js +116 -0
- package/dist/esm/roles/endpoints/roles.post.js.map +1 -0
- package/dist/esm/roles/endpoints/scope-type.delete.js +110 -0
- package/dist/esm/roles/endpoints/scope-type.delete.js.map +1 -0
- package/dist/esm/roles/endpoints/scope-type.get.js +103 -0
- package/dist/esm/roles/endpoints/scope-type.get.js.map +1 -0
- package/dist/esm/roles/endpoints/scope-type.patch.js +116 -0
- package/dist/esm/roles/endpoints/scope-type.patch.js.map +1 -0
- package/dist/esm/roles/endpoints/scope-types.get.js +98 -0
- package/dist/esm/roles/endpoints/scope-types.get.js.map +1 -0
- package/dist/esm/roles/endpoints/scope-types.post.js +113 -0
- package/dist/esm/roles/endpoints/scope-types.post.js.map +1 -0
- package/dist/esm/roles/endpoints/system-access-role-assignment.delete.js +119 -0
- package/dist/esm/roles/endpoints/system-access-role-assignment.delete.js.map +1 -0
- package/dist/esm/roles/endpoints/system-access-role-assignment.get.js +119 -0
- package/dist/esm/roles/endpoints/system-access-role-assignment.get.js.map +1 -0
- package/dist/esm/roles/endpoints/system-access-role-assignment.patch.js +123 -0
- package/dist/esm/roles/endpoints/system-access-role-assignment.patch.js.map +1 -0
- package/dist/esm/roles/endpoints/system-access-role-assignments.get.js +134 -0
- package/dist/esm/roles/endpoints/system-access-role-assignments.get.js.map +1 -0
- package/dist/esm/roles/endpoints/system-access-role-assignments.post.js +120 -0
- package/dist/esm/roles/endpoints/system-access-role-assignments.post.js.map +1 -0
- package/dist/esm/roles/endpoints/system-access-role.delete.js +115 -0
- package/dist/esm/roles/endpoints/system-access-role.delete.js.map +1 -0
- package/dist/esm/roles/endpoints/system-access-role.get.js +109 -0
- package/dist/esm/roles/endpoints/system-access-role.get.js.map +1 -0
- package/dist/esm/roles/endpoints/system-access-role.patch.js +119 -0
- package/dist/esm/roles/endpoints/system-access-role.patch.js.map +1 -0
- package/dist/esm/roles/endpoints/system-access-roles.get.js +106 -0
- package/dist/esm/roles/endpoints/system-access-roles.get.js.map +1 -0
- package/dist/esm/roles/endpoints/system-access-roles.post.js +116 -0
- package/dist/esm/roles/endpoints/system-access-roles.post.js.map +1 -0
- package/dist/esm/roles/endpoints/system.delete.js +108 -0
- package/dist/esm/roles/endpoints/system.delete.js.map +1 -0
- package/dist/esm/roles/endpoints/system.get.js +101 -0
- package/dist/esm/roles/endpoints/system.get.js.map +1 -0
- package/dist/esm/roles/endpoints/system.patch.js +114 -0
- package/dist/esm/roles/endpoints/system.patch.js.map +1 -0
- package/dist/esm/roles/endpoints/systems.get.js +113 -0
- package/dist/esm/roles/endpoints/systems.get.js.map +1 -0
- package/dist/esm/roles/endpoints/systems.post.js +113 -0
- package/dist/esm/roles/endpoints/systems.post.js.map +1 -0
- package/dist/esm/roles/index.js +190 -0
- package/dist/esm/roles/index.js.map +1 -0
- package/dist/esm/roles/static.js +29 -0
- package/dist/esm/roles/static.js.map +1 -0
- package/dist/esm/roles/types.js +7 -0
- package/dist/esm/roles/types.js.map +1 -0
- package/dist/esm/roles/v1/schemas/access-role-mapping-schema-v1.js +11 -0
- package/dist/esm/roles/v1/schemas/access-role-mapping-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/activate-assigned-claimable-role-request-schema-v1.js +14 -0
- package/dist/esm/roles/v1/schemas/activate-assigned-claimable-role-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/add-claimable-role-access-role-request-schema-v1.js +13 -0
- package/dist/esm/roles/v1/schemas/add-claimable-role-access-role-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/add-role-access-role-request-schema-v1.js +13 -0
- package/dist/esm/roles/v1/schemas/add-role-access-role-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-access-role-assignment-schema-v1.js +46 -0
- package/dist/esm/roles/v1/schemas/api-access-role-assignment-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-access-role-mapping-schema-v1.js +15 -0
- package/dist/esm/roles/v1/schemas/api-access-role-mapping-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-access-role-schema-v1.js +16 -0
- package/dist/esm/roles/v1/schemas/api-access-role-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-account-access-role-assignment-schema-v1.js +46 -0
- package/dist/esm/roles/v1/schemas/api-account-access-role-assignment-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-account-access-role-schema-v1.js +9 -0
- package/dist/esm/roles/v1/schemas/api-account-access-role-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-account-active-access-role-assignment-schema-v1.js +21 -0
- package/dist/esm/roles/v1/schemas/api-account-active-access-role-assignment-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-account-claimable-role-assignment-schema-v1.js +11 -0
- package/dist/esm/roles/v1/schemas/api-account-claimable-role-assignment-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-account-role-assignment-schema-v1.js +11 -0
- package/dist/esm/roles/v1/schemas/api-account-role-assignment-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-account-schema-v1.js +25 -0
- package/dist/esm/roles/v1/schemas/api-account-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-binding-execution-record-schema-v1.js +52 -0
- package/dist/esm/roles/v1/schemas/api-binding-execution-record-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-binding-notification-record-schema-v1.js +32 -0
- package/dist/esm/roles/v1/schemas/api-binding-notification-record-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-claimable-access-role-mapping-schema-v1.js +15 -0
- package/dist/esm/roles/v1/schemas/api-claimable-access-role-mapping-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-claimable-role-assignment-activation-schema-v1.js +21 -0
- package/dist/esm/roles/v1/schemas/api-claimable-role-assignment-activation-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-claimable-role-assignment-schema-v1.js +48 -0
- package/dist/esm/roles/v1/schemas/api-claimable-role-assignment-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-claimable-role-schema-v1.js +18 -0
- package/dist/esm/roles/v1/schemas/api-claimable-role-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-claimable-role-scope-schema-v1.js +16 -0
- package/dist/esm/roles/v1/schemas/api-claimable-role-scope-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-consolidated-assignment-entry-schema-v1.js +25 -0
- package/dist/esm/roles/v1/schemas/api-consolidated-assignment-entry-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-consolidated-claimable-role-assignment-schema-v1.js +51 -0
- package/dist/esm/roles/v1/schemas/api-consolidated-claimable-role-assignment-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-consolidated-claimable-role-ref-schema-v1.js +18 -0
- package/dist/esm/roles/v1/schemas/api-consolidated-claimable-role-ref-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-consolidated-role-assignment-schema-v1.js +41 -0
- package/dist/esm/roles/v1/schemas/api-consolidated-role-assignment-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-extended-access-role-schema-v1.js +9 -0
- package/dist/esm/roles/v1/schemas/api-extended-access-role-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-extended-claimable-role-assignment-activation-schema-v1.js +24 -0
- package/dist/esm/roles/v1/schemas/api-extended-claimable-role-assignment-activation-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-owner-schema-v1.js +12 -0
- package/dist/esm/roles/v1/schemas/api-owner-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-paged-collection-schema-v1.js +41 -0
- package/dist/esm/roles/v1/schemas/api-paged-collection-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-purge-binding-result-schema-v1.js +12 -0
- package/dist/esm/roles/v1/schemas/api-purge-binding-result-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-role-assignment-schema-v1.js +38 -0
- package/dist/esm/roles/v1/schemas/api-role-assignment-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-role-binding-configuration-schema-v1.js +36 -0
- package/dist/esm/roles/v1/schemas/api-role-binding-configuration-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-role-binding-configuration-status-schema-v1.js +28 -0
- package/dist/esm/roles/v1/schemas/api-role-binding-configuration-status-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-role-schema-v1.js +24 -0
- package/dist/esm/roles/v1/schemas/api-role-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-role-scope-schema-v1.js +16 -0
- package/dist/esm/roles/v1/schemas/api-role-scope-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-scope-schema-v1.js +16 -0
- package/dist/esm/roles/v1/schemas/api-scope-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-scope-type-schema-v1.js +13 -0
- package/dist/esm/roles/v1/schemas/api-scope-type-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-scope-values-schema-v1.js +22 -0
- package/dist/esm/roles/v1/schemas/api-scope-values-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-simple-claimable-role-assignment-schema-v1.js +12 -0
- package/dist/esm/roles/v1/schemas/api-simple-claimable-role-assignment-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-simple-claimable-role-schema-v1.js +27 -0
- package/dist/esm/roles/v1/schemas/api-simple-claimable-role-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-simple-role-assignment-schema-v1.js +12 -0
- package/dist/esm/roles/v1/schemas/api-simple-role-assignment-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-simple-role-schema-v1.js +18 -0
- package/dist/esm/roles/v1/schemas/api-simple-role-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-simple-system-schema-v1.js +11 -0
- package/dist/esm/roles/v1/schemas/api-simple-system-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-subscription-type-schema-v1.js +6 -0
- package/dist/esm/roles/v1/schemas/api-subscription-type-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/api-system-schema-v1.js +11 -0
- package/dist/esm/roles/v1/schemas/api-system-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/assign-access-role-request-schema-v1.js +32 -0
- package/dist/esm/roles/v1/schemas/assign-access-role-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/assign-claimable-role-request-schema-v1.js +32 -0
- package/dist/esm/roles/v1/schemas/assign-claimable-role-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/assign-role-request-schema-v1.js +32 -0
- package/dist/esm/roles/v1/schemas/assign-role-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/claimable-role-binding-schema-v1.js +14 -0
- package/dist/esm/roles/v1/schemas/claimable-role-binding-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/create-access-role-request-schema-v1.js +19 -0
- package/dist/esm/roles/v1/schemas/create-access-role-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/create-binding-execution-record-request-schema-v1.js +49 -0
- package/dist/esm/roles/v1/schemas/create-binding-execution-record-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/create-binding-execution-record-response-schema-v1.js +9 -0
- package/dist/esm/roles/v1/schemas/create-binding-execution-record-response-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/create-binding-notification-record-request-schema-v1.js +23 -0
- package/dist/esm/roles/v1/schemas/create-binding-notification-record-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/create-binding-notification-record-response-schema-v1.js +9 -0
- package/dist/esm/roles/v1/schemas/create-binding-notification-record-response-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/create-claimable-role-request-schema-v1.js +27 -0
- package/dist/esm/roles/v1/schemas/create-claimable-role-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/create-role-binding-configuration-request-schema-v1.js +27 -0
- package/dist/esm/roles/v1/schemas/create-role-binding-configuration-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/create-role-request-schema-v1.js +27 -0
- package/dist/esm/roles/v1/schemas/create-role-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/create-scope-type-request-schema-v1.js +14 -0
- package/dist/esm/roles/v1/schemas/create-scope-type-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/delete-role-assignments-request-schema-v1.js +13 -0
- package/dist/esm/roles/v1/schemas/delete-role-assignments-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/entra-group-binding-schema-v1.js +24 -0
- package/dist/esm/roles/v1/schemas/entra-group-binding-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/entra-group-schema-v1.js +11 -0
- package/dist/esm/roles/v1/schemas/entra-group-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/expand-schema-v1.js +4 -0
- package/dist/esm/roles/v1/schemas/expand-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/filter-schema-v1.js +4 -0
- package/dist/esm/roles/v1/schemas/filter-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/include-deleted-schema-v1.js +7 -0
- package/dist/esm/roles/v1/schemas/include-deleted-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/org-chart-assign-entry-schema-v1.js +14 -0
- package/dist/esm/roles/v1/schemas/org-chart-assign-entry-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/org-chart-assignment-schema-v1.js +18 -0
- package/dist/esm/roles/v1/schemas/org-chart-assignment-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/org-chart-binding-schema-v1.js +19 -0
- package/dist/esm/roles/v1/schemas/org-chart-binding-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/org-chart-context-schema-v1.js +22 -0
- package/dist/esm/roles/v1/schemas/org-chart-context-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/org-chart-match-criteria-schema-v1.js +16 -0
- package/dist/esm/roles/v1/schemas/org-chart-match-criteria-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/org-chart-profile-schema-v1.js +15 -0
- package/dist/esm/roles/v1/schemas/org-chart-profile-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/org-chart-rule-schema-v1.js +13 -0
- package/dist/esm/roles/v1/schemas/org-chart-rule-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/org-chart-scope-schema-v1.js +20 -0
- package/dist/esm/roles/v1/schemas/org-chart-scope-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/owner-info-schema-v1.js +11 -0
- package/dist/esm/roles/v1/schemas/owner-info-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/register-system-request-schema-v1.js +17 -0
- package/dist/esm/roles/v1/schemas/register-system-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/request-claimable-role-scope-schema-v1.js +19 -0
- package/dist/esm/roles/v1/schemas/request-claimable-role-scope-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/request-role-scope-schema-v1.js +19 -0
- package/dist/esm/roles/v1/schemas/request-role-scope-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/request-scope-schema-v1.js +19 -0
- package/dist/esm/roles/v1/schemas/request-scope-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/role-binding-configuration-binding-schema-v1.js +13 -0
- package/dist/esm/roles/v1/schemas/role-binding-configuration-binding-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/role-binding-schema-v1.js +14 -0
- package/dist/esm/roles/v1/schemas/role-binding-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/scope-binding-schema-v1.js +19 -0
- package/dist/esm/roles/v1/schemas/scope-binding-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/skip-schema-v1.js +9 -0
- package/dist/esm/roles/v1/schemas/skip-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/subscription-request-schema-v1.js +19 -0
- package/dist/esm/roles/v1/schemas/subscription-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/top-schema-v1.js +10 -0
- package/dist/esm/roles/v1/schemas/top-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/update-access-role-assignment-request-schema-v1.js +12 -0
- package/dist/esm/roles/v1/schemas/update-access-role-assignment-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/update-access-role-request-schema-v1.js +12 -0
- package/dist/esm/roles/v1/schemas/update-access-role-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/update-claimable-role-assignment-request-schema-v1.js +12 -0
- package/dist/esm/roles/v1/schemas/update-claimable-role-assignment-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/update-claimable-role-request-schema-v1.js +22 -0
- package/dist/esm/roles/v1/schemas/update-claimable-role-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/update-role-assignment-request-schema-v1.js +12 -0
- package/dist/esm/roles/v1/schemas/update-role-assignment-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/update-role-binding-configuration-request-schema-v1.js +32 -0
- package/dist/esm/roles/v1/schemas/update-role-binding-configuration-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/update-role-binding-configuration-status-request-schema-v1.js +14 -0
- package/dist/esm/roles/v1/schemas/update-role-binding-configuration-status-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/update-role-request-schema-v1.js +22 -0
- package/dist/esm/roles/v1/schemas/update-role-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/update-scope-request-schema-v1.js +12 -0
- package/dist/esm/roles/v1/schemas/update-scope-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/schemas/update-system-request-schema-v1.js +18 -0
- package/dist/esm/roles/v1/schemas/update-system-request-schema-v1.js.map +1 -0
- package/dist/esm/roles/v1/types.js +19 -0
- package/dist/esm/roles/v1/types.js.map +1 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/esm/utils.js +118 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/esm/version.js +3 -0
- package/dist/esm/version.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/index.d.ts +23 -0
- package/dist/types/roles/endpoints/access-roles.get.d.ts +136 -0
- package/dist/types/roles/endpoints/account-access-role-assignments.get.d.ts +275 -0
- package/dist/types/roles/endpoints/account-active-access-role-assignments.get.d.ts +118 -0
- package/dist/types/roles/endpoints/account-claimable-role-assignment-activation.get.d.ts +123 -0
- package/dist/types/roles/endpoints/account-claimable-role-assignment-activation.post.d.ts +127 -0
- package/dist/types/roles/endpoints/account-claimable-role-assignment-deactivation.post.d.ts +123 -0
- package/dist/types/roles/endpoints/account-claimable-role-assignments.get.d.ts +230 -0
- package/dist/types/roles/endpoints/account-consolidated-claimable-role-assignments.get.d.ts +150 -0
- package/dist/types/roles/endpoints/account-consolidated-role-assignments.get.d.ts +146 -0
- package/dist/types/roles/endpoints/account-role-assignments.get.d.ts +197 -0
- package/dist/types/roles/endpoints/claimable-role-access-role.delete.d.ts +105 -0
- package/dist/types/roles/endpoints/claimable-role-access-roles.post.d.ts +150 -0
- package/dist/types/roles/endpoints/claimable-role-assignment-activations-by-assignment.get.d.ts +150 -0
- package/dist/types/roles/endpoints/claimable-role-assignment-activations.get.d.ts +187 -0
- package/dist/types/roles/endpoints/claimable-role-assignment.delete.d.ts +106 -0
- package/dist/types/roles/endpoints/claimable-role-assignment.get.d.ts +152 -0
- package/dist/types/roles/endpoints/claimable-role-assignment.patch.d.ts +158 -0
- package/dist/types/roles/endpoints/claimable-role-assignments-by-external-identifier.delete.d.ts +113 -0
- package/dist/types/roles/endpoints/claimable-role-assignments.get.d.ts +211 -0
- package/dist/types/roles/endpoints/claimable-role-assignments.post.d.ts +168 -0
- package/dist/types/roles/endpoints/claimable-role.delete.d.ts +100 -0
- package/dist/types/roles/endpoints/claimable-role.get.d.ts +141 -0
- package/dist/types/roles/endpoints/claimable-role.patch.d.ts +149 -0
- package/dist/types/roles/endpoints/claimable-roles.get.d.ts +199 -0
- package/dist/types/roles/endpoints/claimable-roles.post.d.ts +150 -0
- package/dist/types/roles/endpoints/public-schema.get.d.ts +98 -0
- package/dist/types/roles/endpoints/role-access-role.delete.d.ts +104 -0
- package/dist/types/roles/endpoints/role-access-roles.post.d.ts +150 -0
- package/dist/types/roles/endpoints/role-assignment.delete.d.ts +104 -0
- package/dist/types/roles/endpoints/role-assignment.get.d.ts +138 -0
- package/dist/types/roles/endpoints/role-assignment.patch.d.ts +140 -0
- package/dist/types/roles/endpoints/role-assignments-by-external-identifier.delete.d.ts +109 -0
- package/dist/types/roles/endpoints/role-assignments-delete.post.d.ts +108 -0
- package/dist/types/roles/endpoints/role-assignments.get.d.ts +184 -0
- package/dist/types/roles/endpoints/role-assignments.post.d.ts +151 -0
- package/dist/types/roles/endpoints/role-binding-configuration-expired-history.delete.d.ts +109 -0
- package/dist/types/roles/endpoints/role-binding-configuration-history.get.d.ts +145 -0
- package/dist/types/roles/endpoints/role-binding-configuration-history.post.d.ts +125 -0
- package/dist/types/roles/endpoints/role-binding-configuration-notifications.get.d.ts +140 -0
- package/dist/types/roles/endpoints/role-binding-configuration-notifications.post.d.ts +122 -0
- package/dist/types/roles/endpoints/role-binding-configuration-status.get.d.ts +110 -0
- package/dist/types/roles/endpoints/role-binding-configuration-status.patch.d.ts +117 -0
- package/dist/types/roles/endpoints/role-binding-configuration.delete.d.ts +100 -0
- package/dist/types/roles/endpoints/role-binding-configuration.get.d.ts +117 -0
- package/dist/types/roles/endpoints/role-binding-configuration.patch.d.ts +171 -0
- package/dist/types/roles/endpoints/role-binding-configurations.get.d.ts +115 -0
- package/dist/types/roles/endpoints/role-binding-configurations.post.d.ts +173 -0
- package/dist/types/roles/endpoints/role.delete.d.ts +100 -0
- package/dist/types/roles/endpoints/role.get.d.ts +144 -0
- package/dist/types/roles/endpoints/role.patch.d.ts +149 -0
- package/dist/types/roles/endpoints/roles-subscription.put.d.ts +110 -0
- package/dist/types/roles/endpoints/roles.get.d.ts +197 -0
- package/dist/types/roles/endpoints/roles.post.d.ts +152 -0
- package/dist/types/roles/endpoints/scope-type.delete.d.ts +100 -0
- package/dist/types/roles/endpoints/scope-type.get.d.ts +100 -0
- package/dist/types/roles/endpoints/scope-type.patch.d.ts +110 -0
- package/dist/types/roles/endpoints/scope-types.get.d.ts +97 -0
- package/dist/types/roles/endpoints/scope-types.post.d.ts +106 -0
- package/dist/types/roles/endpoints/system-access-role-assignment.delete.d.ts +109 -0
- package/dist/types/roles/endpoints/system-access-role-assignment.get.d.ts +182 -0
- package/dist/types/roles/endpoints/system-access-role-assignment.patch.d.ts +186 -0
- package/dist/types/roles/endpoints/system-access-role-assignments.get.d.ts +267 -0
- package/dist/types/roles/endpoints/system-access-role-assignments.post.d.ts +194 -0
- package/dist/types/roles/endpoints/system-access-role.delete.d.ts +104 -0
- package/dist/types/roles/endpoints/system-access-role.get.d.ts +111 -0
- package/dist/types/roles/endpoints/system-access-role.patch.d.ts +117 -0
- package/dist/types/roles/endpoints/system-access-roles.get.d.ts +109 -0
- package/dist/types/roles/endpoints/system-access-roles.post.d.ts +117 -0
- package/dist/types/roles/endpoints/system.delete.d.ts +97 -0
- package/dist/types/roles/endpoints/system.get.d.ts +110 -0
- package/dist/types/roles/endpoints/system.patch.d.ts +123 -0
- package/dist/types/roles/endpoints/systems.get.d.ts +138 -0
- package/dist/types/roles/endpoints/systems.post.d.ts +122 -0
- package/dist/types/roles/index.d.ts +191 -0
- package/dist/types/roles/static.d.ts +27 -0
- package/dist/types/roles/types.d.ts +22 -0
- package/dist/types/roles/v1/schemas/access-role-mapping-schema-v1.d.ts +13 -0
- package/dist/types/roles/v1/schemas/activate-assigned-claimable-role-request-schema-v1.d.ts +14 -0
- package/dist/types/roles/v1/schemas/add-claimable-role-access-role-request-schema-v1.d.ts +16 -0
- package/dist/types/roles/v1/schemas/add-role-access-role-request-schema-v1.d.ts +15 -0
- package/dist/types/roles/v1/schemas/api-access-role-assignment-schema-v1.d.ts +82 -0
- package/dist/types/roles/v1/schemas/api-access-role-mapping-schema-v1.d.ts +22 -0
- package/dist/types/roles/v1/schemas/api-access-role-schema-v1.d.ts +19 -0
- package/dist/types/roles/v1/schemas/api-account-access-role-assignment-schema-v1.d.ts +88 -0
- package/dist/types/roles/v1/schemas/api-account-access-role-schema-v1.d.ts +25 -0
- package/dist/types/roles/v1/schemas/api-account-active-access-role-assignment-schema-v1.d.ts +21 -0
- package/dist/types/roles/v1/schemas/api-account-claimable-role-assignment-schema-v1.d.ts +69 -0
- package/dist/types/roles/v1/schemas/api-account-role-assignment-schema-v1.d.ts +52 -0
- package/dist/types/roles/v1/schemas/api-account-schema-v1.d.ts +17 -0
- package/dist/types/roles/v1/schemas/api-binding-execution-record-schema-v1.d.ts +23 -0
- package/dist/types/roles/v1/schemas/api-binding-notification-record-schema-v1.d.ts +20 -0
- package/dist/types/roles/v1/schemas/api-claimable-access-role-mapping-schema-v1.d.ts +23 -0
- package/dist/types/roles/v1/schemas/api-claimable-role-assignment-activation-schema-v1.d.ts +24 -0
- package/dist/types/roles/v1/schemas/api-claimable-role-assignment-schema-v1.d.ts +57 -0
- package/dist/types/roles/v1/schemas/api-claimable-role-schema-v1.d.ts +52 -0
- package/dist/types/roles/v1/schemas/api-claimable-role-scope-schema-v1.d.ts +15 -0
- package/dist/types/roles/v1/schemas/api-consolidated-assignment-entry-schema-v1.d.ts +18 -0
- package/dist/types/roles/v1/schemas/api-consolidated-claimable-role-assignment-schema-v1.d.ts +47 -0
- package/dist/types/roles/v1/schemas/api-consolidated-claimable-role-ref-schema-v1.d.ts +16 -0
- package/dist/types/roles/v1/schemas/api-consolidated-role-assignment-schema-v1.d.ts +48 -0
- package/dist/types/roles/v1/schemas/api-extended-access-role-schema-v1.d.ts +24 -0
- package/dist/types/roles/v1/schemas/api-extended-claimable-role-assignment-activation-schema-v1.d.ts +52 -0
- package/dist/types/roles/v1/schemas/api-owner-schema-v1.d.ts +20 -0
- package/dist/types/roles/v1/schemas/api-paged-collection-schema-v1.d.ts +37 -0
- package/dist/types/roles/v1/schemas/api-purge-binding-result-schema-v1.d.ts +12 -0
- package/dist/types/roles/v1/schemas/api-role-assignment-schema-v1.d.ts +42 -0
- package/dist/types/roles/v1/schemas/api-role-binding-configuration-schema-v1.d.ts +23 -0
- package/dist/types/roles/v1/schemas/api-role-binding-configuration-status-schema-v1.d.ts +18 -0
- package/dist/types/roles/v1/schemas/api-role-schema-v1.d.ts +51 -0
- package/dist/types/roles/v1/schemas/api-role-scope-schema-v1.d.ts +14 -0
- package/dist/types/roles/v1/schemas/api-scope-schema-v1.d.ts +14 -0
- package/dist/types/roles/v1/schemas/api-scope-type-schema-v1.d.ts +14 -0
- package/dist/types/roles/v1/schemas/api-scope-values-schema-v1.d.ts +14 -0
- package/dist/types/roles/v1/schemas/api-simple-claimable-role-assignment-schema-v1.d.ts +37 -0
- package/dist/types/roles/v1/schemas/api-simple-claimable-role-schema-v1.d.ts +32 -0
- package/dist/types/roles/v1/schemas/api-simple-role-assignment-schema-v1.d.ts +22 -0
- package/dist/types/roles/v1/schemas/api-simple-role-schema-v1.d.ts +19 -0
- package/dist/types/roles/v1/schemas/api-simple-system-schema-v1.d.ts +13 -0
- package/dist/types/roles/v1/schemas/api-subscription-type-schema-v1.d.ts +14 -0
- package/dist/types/roles/v1/schemas/api-system-schema-v1.d.ts +26 -0
- package/dist/types/roles/v1/schemas/assign-access-role-request-schema-v1.d.ts +24 -0
- package/dist/types/roles/v1/schemas/assign-claimable-role-request-schema-v1.d.ts +24 -0
- package/dist/types/roles/v1/schemas/assign-role-request-schema-v1.d.ts +24 -0
- package/dist/types/roles/v1/schemas/claimable-role-binding-schema-v1.d.ts +18 -0
- package/dist/types/roles/v1/schemas/create-access-role-request-schema-v1.d.ts +14 -0
- package/dist/types/roles/v1/schemas/create-binding-execution-record-request-schema-v1.d.ts +21 -0
- package/dist/types/roles/v1/schemas/create-binding-execution-record-response-schema-v1.d.ts +13 -0
- package/dist/types/roles/v1/schemas/create-binding-notification-record-request-schema-v1.d.ts +17 -0
- package/dist/types/roles/v1/schemas/create-binding-notification-record-response-schema-v1.d.ts +13 -0
- package/dist/types/roles/v1/schemas/create-claimable-role-request-schema-v1.d.ts +19 -0
- package/dist/types/roles/v1/schemas/create-role-binding-configuration-request-schema-v1.d.ts +81 -0
- package/dist/types/roles/v1/schemas/create-role-request-schema-v1.d.ts +19 -0
- package/dist/types/roles/v1/schemas/create-scope-type-request-schema-v1.d.ts +13 -0
- package/dist/types/roles/v1/schemas/delete-role-assignments-request-schema-v1.d.ts +13 -0
- package/dist/types/roles/v1/schemas/entra-group-binding-schema-v1.d.ts +35 -0
- package/dist/types/roles/v1/schemas/entra-group-schema-v1.d.ts +13 -0
- package/dist/types/roles/v1/schemas/expand-schema-v1.d.ts +11 -0
- package/dist/types/roles/v1/schemas/filter-schema-v1.d.ts +10 -0
- package/dist/types/roles/v1/schemas/include-deleted-schema-v1.d.ts +11 -0
- package/dist/types/roles/v1/schemas/org-chart-assign-entry-schema-v1.d.ts +18 -0
- package/dist/types/roles/v1/schemas/org-chart-assignment-schema-v1.d.ts +29 -0
- package/dist/types/roles/v1/schemas/org-chart-binding-schema-v1.d.ts +48 -0
- package/dist/types/roles/v1/schemas/org-chart-context-schema-v1.d.ts +15 -0
- package/dist/types/roles/v1/schemas/org-chart-match-criteria-schema-v1.d.ts +13 -0
- package/dist/types/roles/v1/schemas/org-chart-profile-schema-v1.d.ts +38 -0
- package/dist/types/roles/v1/schemas/org-chart-rule-schema-v1.d.ts +35 -0
- package/dist/types/roles/v1/schemas/org-chart-scope-schema-v1.d.ts +14 -0
- package/dist/types/roles/v1/schemas/owner-info-schema-v1.d.ts +13 -0
- package/dist/types/roles/v1/schemas/register-system-request-schema-v1.d.ts +17 -0
- package/dist/types/roles/v1/schemas/request-claimable-role-scope-schema-v1.d.ts +14 -0
- package/dist/types/roles/v1/schemas/request-role-scope-schema-v1.d.ts +14 -0
- package/dist/types/roles/v1/schemas/request-scope-schema-v1.d.ts +14 -0
- package/dist/types/roles/v1/schemas/role-binding-configuration-binding-schema-v1.d.ts +78 -0
- package/dist/types/roles/v1/schemas/role-binding-schema-v1.d.ts +18 -0
- package/dist/types/roles/v1/schemas/scope-binding-schema-v1.d.ts +14 -0
- package/dist/types/roles/v1/schemas/skip-schema-v1.d.ts +11 -0
- package/dist/types/roles/v1/schemas/subscription-request-schema-v1.d.ts +19 -0
- package/dist/types/roles/v1/schemas/top-schema-v1.d.ts +11 -0
- package/dist/types/roles/v1/schemas/update-access-role-assignment-request-schema-v1.d.ts +13 -0
- package/dist/types/roles/v1/schemas/update-access-role-request-schema-v1.d.ts +12 -0
- package/dist/types/roles/v1/schemas/update-claimable-role-assignment-request-schema-v1.d.ts +13 -0
- package/dist/types/roles/v1/schemas/update-claimable-role-request-schema-v1.d.ts +14 -0
- package/dist/types/roles/v1/schemas/update-role-assignment-request-schema-v1.d.ts +13 -0
- package/dist/types/roles/v1/schemas/update-role-binding-configuration-request-schema-v1.d.ts +79 -0
- package/dist/types/roles/v1/schemas/update-role-binding-configuration-status-request-schema-v1.d.ts +15 -0
- package/dist/types/roles/v1/schemas/update-role-request-schema-v1.d.ts +14 -0
- package/dist/types/roles/v1/schemas/update-scope-request-schema-v1.d.ts +12 -0
- package/dist/types/roles/v1/schemas/update-system-request-schema-v1.d.ts +16 -0
- package/dist/types/roles/v1/types.d.ts +109 -0
- package/dist/types/types.d.ts +173 -0
- package/dist/types/utils.d.ts +97 -0
- package/dist/types/version.d.ts +1 -0
- package/docs/roles.md +211 -0
- package/package.json +62 -0
- package/src/roles/v1/openapi.json +1 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { extractVersion, parseVersionedArgs, versionedResponseSelector } from '../../utils';
|
|
3
|
+
import { ApiVersion } from '../static';
|
|
4
|
+
import { ApiScopeTypeSchemaV1 } from '../v1/schemas/api-scope-type-schema-v1';
|
|
5
|
+
/**
|
|
6
|
+
* Version contract for `getScopeType`, implementing `GET /scope-types/{scopeTypeIdentifier}`.
|
|
7
|
+
*
|
|
8
|
+
* Each concrete {@link ApiVersion} maps to the argument and response schemas that
|
|
9
|
+
* version publishes, so the version a caller passes is the single discriminator
|
|
10
|
+
* for the request shape, the request path, and the response shape.
|
|
11
|
+
*/
|
|
12
|
+
const VersionContract = {
|
|
13
|
+
[ApiVersion.v1]: {
|
|
14
|
+
/** Arguments accepted by version 1.0 of this operation. */
|
|
15
|
+
args: z
|
|
16
|
+
.object({
|
|
17
|
+
/** Scope type UUID or unique scope type name. */
|
|
18
|
+
scopeTypeIdentifier: z.string().describe('Scope type UUID or unique scope type name.'),
|
|
19
|
+
})
|
|
20
|
+
.describe('Arguments for GET /scope-types/{scopeTypeIdentifier} (getScopeType v1.0).'),
|
|
21
|
+
/** Response published by version 1.0 of this operation. */
|
|
22
|
+
response: ApiScopeTypeSchemaV1,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
/** Builds the request init for the resolved version, including its response-schema selector. */
|
|
26
|
+
const generateRequestParameters = (version, _args, init) => {
|
|
27
|
+
// Select the response schema that matches the requested API version.
|
|
28
|
+
switch (version) {
|
|
29
|
+
case ApiVersion.v1: {
|
|
30
|
+
const baseInit = {
|
|
31
|
+
selector: versionedResponseSelector(VersionContract, version),
|
|
32
|
+
};
|
|
33
|
+
// Apply the caller-supplied `init` first, then the generated defaults, so the
|
|
34
|
+
// version-specific response `selector` always wins and cannot be bypassed.
|
|
35
|
+
return Object.assign({}, init, baseInit);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
throw Error(`Unknown API version: ${version}`);
|
|
39
|
+
};
|
|
40
|
+
/** Builds the request path for the resolved version, including its `api-version` parameter. */
|
|
41
|
+
const generateApiPath = (version, args) => {
|
|
42
|
+
// Build the endpoint path according to the requested API version.
|
|
43
|
+
switch (version) {
|
|
44
|
+
case ApiVersion.v1: {
|
|
45
|
+
const params = new URLSearchParams();
|
|
46
|
+
params.append('api-version', version);
|
|
47
|
+
return `/scope-types/${encodeURIComponent(args.scopeTypeIdentifier)}?${String(params)}`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
throw Error(`Unknown API version: ${version}`);
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Fetches one scope type by its UUID or unique scope type name.
|
|
54
|
+
*
|
|
55
|
+
* Roles V2 operation: `GET /scope-types/{scopeTypeIdentifier}` — "Get a scope type by
|
|
56
|
+
* identifier."
|
|
57
|
+
*
|
|
58
|
+
* Curried in two stages: `getScopeType(version, client, method)` binds the API version, the
|
|
59
|
+
* `IHttpClient` that reaches the Roles service, and the execution method — `'json'` for a
|
|
60
|
+
* promise, `'json$'` for an observable stream. The returned function takes
|
|
61
|
+
* {@link GetScopeTypeArg} plus an optional `ClientRequestInit`, and gives back
|
|
62
|
+
* {@link GetScopeTypeResult}.
|
|
63
|
+
*
|
|
64
|
+
* The version argument is the single discriminator: `'v1'` — equivalently `'1.0'` or
|
|
65
|
+
* `ApiVersion.v1` — selects the version-1.0 argument schema, validates the response with
|
|
66
|
+
* `ApiScopeTypeSchemaV1`, and sends `api-version=1.0` on the request.
|
|
67
|
+
*
|
|
68
|
+
* Roles V2 answers `200 OK`; the body is typed `ApiScopeTypeV1`.
|
|
69
|
+
*
|
|
70
|
+
* @template TVersion - Roles API version identifier: `'v1'`, `'1.0'`, or `ApiVersion.v1`.
|
|
71
|
+
* @template TMethod - Execution method: `'json'` for a promise, `'json$'` for an observable.
|
|
72
|
+
* @param version - API version selecting the request path, the argument schema, and the
|
|
73
|
+
* response schema.
|
|
74
|
+
* @param client - HTTP client that executes the request against the Roles service.
|
|
75
|
+
* @param method - Execution method, defaulting to `'json'`.
|
|
76
|
+
* @returns A request function taking {@link GetScopeTypeArg} and an optional
|
|
77
|
+
* `ClientRequestInit`, returning {@link GetScopeTypeResult}.
|
|
78
|
+
* @throws {Error} When `version` names an API version this operation does not publish. The
|
|
79
|
+
* check runs while binding, before the HTTP client is used.
|
|
80
|
+
* @throws {z.ZodError} From the returned function, when the arguments fail this version's
|
|
81
|
+
* argument schema or the response body fails its response schema.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```ts
|
|
85
|
+
* import { getScopeType } from '@equinor/fusion-services/roles';
|
|
86
|
+
*
|
|
87
|
+
* const scopeType = await getScopeType('v1', httpClient)({ scopeTypeIdentifier: 'project' });
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
const getScopeType = (version, client, method = 'json') => {
|
|
91
|
+
const apiVersion = extractVersion(ApiVersion, version);
|
|
92
|
+
return (input, init) => {
|
|
93
|
+
const args = parseVersionedArgs(VersionContract, apiVersion, input);
|
|
94
|
+
return client[method](generateApiPath(apiVersion, args), generateRequestParameters(apiVersion, args, init));
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
// Every symbol is declared under its public name so hover and code completion show this
|
|
98
|
+
// endpoint's own documentation. They are exported in one block rather than inline because an
|
|
99
|
+
// inline `export const` would require renaming the file away from the `<resource>.<verb>`
|
|
100
|
+
// convention that mirrors the OpenAPI operation it implements.
|
|
101
|
+
// fusion-lint-disable-next-line no-separate-export
|
|
102
|
+
export { getScopeType, };
|
|
103
|
+
//# sourceMappingURL=scope-type.get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-type.get.js","sourceRoot":"","sources":["../../../../src/roles/endpoints/scope-type.get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAc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AAM,KAAK,CAAC,wBAAwB,OAAO,EAAE,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,YAAY,GAAG,CAInB,OAAiB,EACjB,MAAmB,EACnB,MAAM,GAAY,MAAiB,EACnC,EAAE;IAEF,MAAM,UAAU,GAAG,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACvD,OAAO,CACL,KAAqC,EACrC,IAA0E,EAC9B,EAAE;QAC9C,MAAM,IAAI,GAAG,kBAAkB,CAAC,eAAe,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QACpE,OAAO,MAAM,CAAC,MAAM,CAAC,CACnB,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,EACjC,yBAAyB,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,CACJ,CAAC;IAClD,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,wFAAwF;AACxF,6FAA6F;AAC7F,0FAA0F;AAC1F,+DAA+D;AAC/D,mDAAmD;AACnD,OAAO,EAKL,YAAY,GACb,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { extractVersion, parseVersionedArgs, versionedResponseSelector } from '../../utils';
|
|
3
|
+
import { ApiVersion } from '../static';
|
|
4
|
+
import { ApiScopeTypeSchemaV1 } from '../v1/schemas/api-scope-type-schema-v1';
|
|
5
|
+
import { UpdateScopeRequestSchemaV1 } from '../v1/schemas/update-scope-request-schema-v1';
|
|
6
|
+
/**
|
|
7
|
+
* Version contract for `updateScopeType`, implementing
|
|
8
|
+
* `PATCH /scope-types/{scopeTypeIdentifier}`.
|
|
9
|
+
*
|
|
10
|
+
* Each concrete {@link ApiVersion} maps to the argument and response schemas that
|
|
11
|
+
* version publishes, so the version a caller passes is the single discriminator
|
|
12
|
+
* for the request shape, the request path, and the response shape.
|
|
13
|
+
*/
|
|
14
|
+
const VersionContract = {
|
|
15
|
+
[ApiVersion.v1]: {
|
|
16
|
+
/** Arguments accepted by version 1.0 of this operation. */
|
|
17
|
+
args: z
|
|
18
|
+
.object({
|
|
19
|
+
/** Scope type UUID or unique scope type name. */
|
|
20
|
+
scopeTypeIdentifier: z.string().describe('Scope type UUID or unique scope type name.'),
|
|
21
|
+
...UpdateScopeRequestSchemaV1.shape,
|
|
22
|
+
})
|
|
23
|
+
.describe('Arguments for PATCH /scope-types/{scopeTypeIdentifier} (updateScopeType v1.0).'),
|
|
24
|
+
/** Response published by version 1.0 of this operation. */
|
|
25
|
+
response: ApiScopeTypeSchemaV1,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
/** Builds the request init for the resolved version, including its response-schema selector. */
|
|
29
|
+
const generateRequestParameters = (version, args, init) => {
|
|
30
|
+
// Select the response schema that matches the requested API version.
|
|
31
|
+
switch (version) {
|
|
32
|
+
case ApiVersion.v1: {
|
|
33
|
+
// Path identifiers address the resource, so only the remaining fields form the request body.
|
|
34
|
+
const { scopeTypeIdentifier: _scopeTypeIdentifier, ...body } = args;
|
|
35
|
+
const baseInit = {
|
|
36
|
+
method: 'PATCH',
|
|
37
|
+
selector: versionedResponseSelector(VersionContract, version),
|
|
38
|
+
body,
|
|
39
|
+
};
|
|
40
|
+
// Apply the caller-supplied `init` first, then the generated defaults, so the
|
|
41
|
+
// generated `method`, `body`, and version-specific response `selector` always win
|
|
42
|
+
// and cannot be overridden or bypassed.
|
|
43
|
+
return Object.assign({}, init, baseInit);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
throw Error(`Unknown API version: ${version}`);
|
|
47
|
+
};
|
|
48
|
+
/** Builds the request path for the resolved version, including its `api-version` parameter. */
|
|
49
|
+
const generateApiPath = (version, args) => {
|
|
50
|
+
// Build the endpoint path according to the requested API version.
|
|
51
|
+
switch (version) {
|
|
52
|
+
case ApiVersion.v1: {
|
|
53
|
+
const params = new URLSearchParams();
|
|
54
|
+
params.append('api-version', version);
|
|
55
|
+
return `/scope-types/${encodeURIComponent(args.scopeTypeIdentifier)}?${String(params)}`;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
throw Error(`Unknown API version: ${version}`);
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Updates the description of a scope type.
|
|
62
|
+
*
|
|
63
|
+
* Roles V2 operation: `PATCH /scope-types/{scopeTypeIdentifier}` — "Update a scope type by
|
|
64
|
+
* identifier."
|
|
65
|
+
*
|
|
66
|
+
* Curried in two stages: `updateScopeType(version, client, method)` binds the API version, the
|
|
67
|
+
* `IHttpClient` that reaches the Roles service, and the execution method — `'json'` for a
|
|
68
|
+
* promise, `'json$'` for an observable stream. The returned function takes
|
|
69
|
+
* {@link UpdateScopeTypeArg} plus an optional `ClientRequestInit`, and gives back
|
|
70
|
+
* {@link UpdateScopeTypeResult}.
|
|
71
|
+
*
|
|
72
|
+
* The version argument is the single discriminator: `'v1'` — equivalently `'1.0'` or
|
|
73
|
+
* `ApiVersion.v1` — selects the version-1.0 argument schema, validates the response with
|
|
74
|
+
* `ApiScopeTypeSchemaV1`, and sends `api-version=1.0` on the request.
|
|
75
|
+
*
|
|
76
|
+
* Roles V2 answers `200 OK`; the body is typed `ApiScopeTypeV1`. Fields left out of the
|
|
77
|
+
* arguments are not sent, so they keep their stored values. The contract declares `403
|
|
78
|
+
* Forbidden` for callers the Roles service does not authorise for this operation.
|
|
79
|
+
*
|
|
80
|
+
* @template TVersion - Roles API version identifier: `'v1'`, `'1.0'`, or `ApiVersion.v1`.
|
|
81
|
+
* @template TMethod - Execution method: `'json'` for a promise, `'json$'` for an observable.
|
|
82
|
+
* @param version - API version selecting the request path, the argument schema, and the
|
|
83
|
+
* response schema.
|
|
84
|
+
* @param client - HTTP client that executes the request against the Roles service.
|
|
85
|
+
* @param method - Execution method, defaulting to `'json'`.
|
|
86
|
+
* @returns A request function taking {@link UpdateScopeTypeArg} and an optional
|
|
87
|
+
* `ClientRequestInit`, returning {@link UpdateScopeTypeResult}.
|
|
88
|
+
* @throws {Error} When `version` names an API version this operation does not publish. The
|
|
89
|
+
* check runs while binding, before the HTTP client is used.
|
|
90
|
+
* @throws {z.ZodError} From the returned function, when the arguments fail this version's
|
|
91
|
+
* argument schema or the response body fails its response schema.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* import { updateScopeType } from '@equinor/fusion-services/roles';
|
|
96
|
+
*
|
|
97
|
+
* const scopeType = await updateScopeType('v1', httpClient)({
|
|
98
|
+
* scopeTypeIdentifier: 'project',
|
|
99
|
+
* description: 'Project scope',
|
|
100
|
+
* });
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
const updateScopeType = (version, client, method = 'json') => {
|
|
104
|
+
const apiVersion = extractVersion(ApiVersion, version);
|
|
105
|
+
return (input, init) => {
|
|
106
|
+
const args = parseVersionedArgs(VersionContract, apiVersion, input);
|
|
107
|
+
return client[method](generateApiPath(apiVersion, args), generateRequestParameters(apiVersion, args, init));
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
// Every symbol is declared under its public name so hover and code completion show this
|
|
111
|
+
// endpoint's own documentation. They are exported in one block rather than inline because an
|
|
112
|
+
// inline `export const` would require renaming the file away from the `<resource>.<verb>`
|
|
113
|
+
// convention that mirrors the OpenAPI operation it implements.
|
|
114
|
+
// fusion-lint-disable-next-line no-separate-export
|
|
115
|
+
export { updateScopeType, };
|
|
116
|
+
//# sourceMappingURL=scope-type.patch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-type.patch.js","sourceRoot":"","sources":["../../../../src/roles/endpoints/scope-type.patch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CA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,EAAE,CAAC;QAChB,KAAK,UAAU,CAAC,EAAE,EAAE,CAAC;YACnB,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;YACrC,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;YACtC,OAAO,gBAAgB,kBAAkB,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC1F,CAAC;IACH,CAAC;IACD,MAAM,KAAK,CAAC,wBAAwB,OAAO,EAAE,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,eAAe,GAAG,CAItB,OAAiB,EACjB,MAAmB,EACnB,MAAM,GAAY,MAAiB,EACnC,EAAE;IAEF,MAAM,UAAU,GAAG,cAAc,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACvD,OAAO,CACL,KAAwC,EACxC,IAA6E,EAC9B,EAAE;QACjD,MAAM,IAAI,GAAG,kBAAkB,CAAC,eAAe,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;QACpE,OAAO,MAAM,CAAC,MAAM,CAAC,CACnB,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,EACjC,yBAAyB,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,CACD,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,wFAAwF;AACxF,6FAA6F;AAC7F,0FAA0F;AAC1F,+DAA+D;AAC/D,mDAAmD;AACnD,OAAO,EAKL,eAAe,GAChB,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { extractVersion, parseVersionedArgs, versionedResponseSelector } from '../../utils';
|
|
3
|
+
import { ApiVersion } from '../static';
|
|
4
|
+
import { ApiScopeTypeSchemaV1 } from '../v1/schemas/api-scope-type-schema-v1';
|
|
5
|
+
/**
|
|
6
|
+
* Version contract for `listScopeTypes`, implementing `GET /scope-types`.
|
|
7
|
+
*
|
|
8
|
+
* Each concrete {@link ApiVersion} maps to the argument and response schemas that
|
|
9
|
+
* version publishes, so the version a caller passes is the single discriminator
|
|
10
|
+
* for the request shape, the request path, and the response shape.
|
|
11
|
+
*/
|
|
12
|
+
const VersionContract = {
|
|
13
|
+
[ApiVersion.v1]: {
|
|
14
|
+
/** Arguments accepted by version 1.0 of this operation. */
|
|
15
|
+
args: z.object({}).describe('Arguments for GET /scope-types (listScopeTypes v1.0).'),
|
|
16
|
+
/** Response published by version 1.0 of this operation. */
|
|
17
|
+
response: z.array(ApiScopeTypeSchemaV1),
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
/** Builds the request init for the resolved version, including its response-schema selector. */
|
|
21
|
+
const generateRequestParameters = (version, _args, init) => {
|
|
22
|
+
// Select the response schema that matches the requested API version.
|
|
23
|
+
switch (version) {
|
|
24
|
+
case ApiVersion.v1: {
|
|
25
|
+
const baseInit = {
|
|
26
|
+
selector: versionedResponseSelector(VersionContract, version),
|
|
27
|
+
};
|
|
28
|
+
// Apply the caller-supplied `init` first, then the generated defaults, so the
|
|
29
|
+
// version-specific response `selector` always wins and cannot be bypassed.
|
|
30
|
+
return Object.assign({}, init, baseInit);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
throw Error(`Unknown API version: ${version}`);
|
|
34
|
+
};
|
|
35
|
+
/** Builds the request path for the resolved version, including its `api-version` parameter. */
|
|
36
|
+
const generateApiPath = (version, _args) => {
|
|
37
|
+
// Build the endpoint path according to the requested API version.
|
|
38
|
+
switch (version) {
|
|
39
|
+
case ApiVersion.v1: {
|
|
40
|
+
const params = new URLSearchParams();
|
|
41
|
+
params.append('api-version', version);
|
|
42
|
+
return `/scope-types?${String(params)}`;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
throw Error(`Unknown API version: ${version}`);
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Lists every scope type the Roles service publishes.
|
|
49
|
+
*
|
|
50
|
+
* Roles V2 operation: `GET /scope-types` — "Get all scope types."
|
|
51
|
+
*
|
|
52
|
+
* Curried in two stages: `listScopeTypes(version, client, method)` binds the API version, the
|
|
53
|
+
* `IHttpClient` that reaches the Roles service, and the execution method — `'json'` for a
|
|
54
|
+
* promise, `'json$'` for an observable stream. The returned function takes
|
|
55
|
+
* {@link ListScopeTypesArg} plus an optional `ClientRequestInit`, and gives back
|
|
56
|
+
* {@link ListScopeTypesResult}.
|
|
57
|
+
*
|
|
58
|
+
* The version argument is the single discriminator: `'v1'` — equivalently `'1.0'` or
|
|
59
|
+
* `ApiVersion.v1` — selects the version-1.0 argument schema, validates the response with
|
|
60
|
+
* `z.array(ApiScopeTypeSchemaV1)`, and sends `api-version=1.0` on the request.
|
|
61
|
+
*
|
|
62
|
+
* Roles V2 answers `200 OK`; the body is typed `ApiScopeTypeV1[]`.
|
|
63
|
+
*
|
|
64
|
+
* @template TVersion - Roles API version identifier: `'v1'`, `'1.0'`, or `ApiVersion.v1`.
|
|
65
|
+
* @template TMethod - Execution method: `'json'` for a promise, `'json$'` for an observable.
|
|
66
|
+
* @param version - API version selecting the request path, the argument schema, and the
|
|
67
|
+
* response schema.
|
|
68
|
+
* @param client - HTTP client that executes the request against the Roles service.
|
|
69
|
+
* @param method - Execution method, defaulting to `'json'`.
|
|
70
|
+
* @returns A request function taking {@link ListScopeTypesArg} and an optional
|
|
71
|
+
* `ClientRequestInit`, returning {@link ListScopeTypesResult}.
|
|
72
|
+
* @throws {Error} When `version` names an API version this operation does not publish. The
|
|
73
|
+
* check runs while binding, before the HTTP client is used.
|
|
74
|
+
* @throws {z.ZodError} From the returned function, when the arguments fail this version's
|
|
75
|
+
* argument schema or the response body fails its response schema.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* import { listScopeTypes } from '@equinor/fusion-services/roles';
|
|
80
|
+
*
|
|
81
|
+
* const page = await listScopeTypes('v1', httpClient)({});
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
const listScopeTypes = (version, client, method = 'json') => {
|
|
85
|
+
const apiVersion = extractVersion(ApiVersion, version);
|
|
86
|
+
return (input, init) => {
|
|
87
|
+
// The operation has no required arguments, so an omitted argument object parses as empty.
|
|
88
|
+
const args = parseVersionedArgs(VersionContract, apiVersion, input ?? {});
|
|
89
|
+
return client[method](generateApiPath(apiVersion, args), generateRequestParameters(apiVersion, args, init));
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
// Every symbol is declared under its public name so hover and code completion show this
|
|
93
|
+
// endpoint's own documentation. They are exported in one block rather than inline because an
|
|
94
|
+
// inline `export const` would require renaming the file away from the `<resource>.<verb>`
|
|
95
|
+
// convention that mirrors the OpenAPI operation it implements.
|
|
96
|
+
// fusion-lint-disable-next-line no-separate-export
|
|
97
|
+
export { listScopeTypes, };
|
|
98
|
+
//# sourceMappingURL=scope-types.get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-types.get.js","sourceRoot":"","sources":["../../../../src/roles/endpoints/scope-types.get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAc9E;;;;;;GAMG;AACH,MAAM,eAAe,GAAG;IACtB,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE;QACf,2DAA2D;QAC3D,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,uDAAuD,CAAC;QACpF,2DAA2D;QAC3D,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC;KACxC;CACoC,CA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C,eAAe,EAAE,UAAU,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QAC1E,OAAO,MAAM,CAAC,MAAM,CAAC,CACnB,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,EACjC,yBAAyB,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,CACF,CAAC;IACpD,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,wFAAwF;AACxF,6FAA6F;AAC7F,0FAA0F;AAC1F,+DAA+D;AAC/D,mDAAmD;AACnD,OAAO,EAKL,cAAc,GACf,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { extractVersion, parseVersionedArgs, versionedResponseSelector } from '../../utils';
|
|
3
|
+
import { ApiVersion } from '../static';
|
|
4
|
+
import { ApiScopeTypeSchemaV1 } from '../v1/schemas/api-scope-type-schema-v1';
|
|
5
|
+
import { CreateScopeTypeRequestSchemaV1 } from '../v1/schemas/create-scope-type-request-schema-v1';
|
|
6
|
+
/**
|
|
7
|
+
* Version contract for `createScopeType`, implementing `POST /scope-types`.
|
|
8
|
+
*
|
|
9
|
+
* Each concrete {@link ApiVersion} maps to the argument and response schemas that
|
|
10
|
+
* version publishes, so the version a caller passes is the single discriminator
|
|
11
|
+
* for the request shape, the request path, and the response shape.
|
|
12
|
+
*/
|
|
13
|
+
const VersionContract = {
|
|
14
|
+
[ApiVersion.v1]: {
|
|
15
|
+
/** Arguments accepted by version 1.0 of this operation. */
|
|
16
|
+
args: z
|
|
17
|
+
.object({
|
|
18
|
+
...CreateScopeTypeRequestSchemaV1.shape,
|
|
19
|
+
})
|
|
20
|
+
.describe('Arguments for POST /scope-types (createScopeType v1.0).'),
|
|
21
|
+
/** Response published by version 1.0 of this operation. */
|
|
22
|
+
response: ApiScopeTypeSchemaV1,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
/** Builds the request init for the resolved version, including its response-schema selector. */
|
|
26
|
+
const generateRequestParameters = (version, args, init) => {
|
|
27
|
+
// Select the response schema that matches the requested API version.
|
|
28
|
+
switch (version) {
|
|
29
|
+
case ApiVersion.v1: {
|
|
30
|
+
// The operation takes no path identifiers, so every argument belongs to the request body.
|
|
31
|
+
const body = { ...args };
|
|
32
|
+
const baseInit = {
|
|
33
|
+
method: 'POST',
|
|
34
|
+
selector: versionedResponseSelector(VersionContract, version),
|
|
35
|
+
body,
|
|
36
|
+
};
|
|
37
|
+
// Apply the caller-supplied `init` first, then the generated defaults, so the
|
|
38
|
+
// generated `method`, `body`, and version-specific response `selector` always win
|
|
39
|
+
// and cannot be overridden or bypassed.
|
|
40
|
+
return Object.assign({}, init, baseInit);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
throw Error(`Unknown API version: ${version}`);
|
|
44
|
+
};
|
|
45
|
+
/** Builds the request path for the resolved version, including its `api-version` parameter. */
|
|
46
|
+
const generateApiPath = (version, _args) => {
|
|
47
|
+
// Build the endpoint path according to the requested API version.
|
|
48
|
+
switch (version) {
|
|
49
|
+
case ApiVersion.v1: {
|
|
50
|
+
const params = new URLSearchParams();
|
|
51
|
+
params.append('api-version', version);
|
|
52
|
+
return `/scope-types?${String(params)}`;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
throw Error(`Unknown API version: ${version}`);
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Creates a scope type, the vocabulary that role assignment scopes are expressed in.
|
|
59
|
+
*
|
|
60
|
+
* Roles V2 operation: `POST /scope-types` — "Create a new scope type."
|
|
61
|
+
*
|
|
62
|
+
* Curried in two stages: `createScopeType(version, client, method)` binds the API version, the
|
|
63
|
+
* `IHttpClient` that reaches the Roles service, and the execution method — `'json'` for a
|
|
64
|
+
* promise, `'json$'` for an observable stream. The returned function takes
|
|
65
|
+
* {@link CreateScopeTypeArg} plus an optional `ClientRequestInit`, and gives back
|
|
66
|
+
* {@link CreateScopeTypeResult}.
|
|
67
|
+
*
|
|
68
|
+
* The version argument is the single discriminator: `'v1'` — equivalently `'1.0'` or
|
|
69
|
+
* `ApiVersion.v1` — selects the version-1.0 argument schema, validates the response with
|
|
70
|
+
* `ApiScopeTypeSchemaV1`, and sends `api-version=1.0` on the request.
|
|
71
|
+
*
|
|
72
|
+
* Roles V2 answers `201 Created`; the body is typed `ApiScopeTypeV1`. A colliding name answers
|
|
73
|
+
* `409 Conflict`. The contract declares `403 Forbidden` for callers the Roles service does not
|
|
74
|
+
* authorise for this operation.
|
|
75
|
+
*
|
|
76
|
+
* @template TVersion - Roles API version identifier: `'v1'`, `'1.0'`, or `ApiVersion.v1`.
|
|
77
|
+
* @template TMethod - Execution method: `'json'` for a promise, `'json$'` for an observable.
|
|
78
|
+
* @param version - API version selecting the request path, the argument schema, and the
|
|
79
|
+
* response schema.
|
|
80
|
+
* @param client - HTTP client that executes the request against the Roles service.
|
|
81
|
+
* @param method - Execution method, defaulting to `'json'`.
|
|
82
|
+
* @returns A request function taking {@link CreateScopeTypeArg} and an optional
|
|
83
|
+
* `ClientRequestInit`, returning {@link CreateScopeTypeResult}.
|
|
84
|
+
* @throws {Error} When `version` names an API version this operation does not publish. The
|
|
85
|
+
* check runs while binding, before the HTTP client is used.
|
|
86
|
+
* @throws {z.ZodError} From the returned function, when the arguments fail this version's
|
|
87
|
+
* argument schema or the response body fails its response schema.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* import { createScopeType } from '@equinor/fusion-services/roles';
|
|
92
|
+
*
|
|
93
|
+
* const scopeType = await createScopeType('v1', httpClient)({
|
|
94
|
+
* name: 'project',
|
|
95
|
+
* description: 'Project scope',
|
|
96
|
+
* });
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
const createScopeType = (version, client, method = 'json') => {
|
|
100
|
+
const apiVersion = extractVersion(ApiVersion, version);
|
|
101
|
+
return (input, init) => {
|
|
102
|
+
// The operation has no required arguments, so an omitted argument object parses as empty.
|
|
103
|
+
const args = parseVersionedArgs(VersionContract, apiVersion, input ?? {});
|
|
104
|
+
return client[method](generateApiPath(apiVersion, args), generateRequestParameters(apiVersion, args, init));
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
// Every symbol is declared under its public name so hover and code completion show this
|
|
108
|
+
// endpoint's own documentation. They are exported in one block rather than inline because an
|
|
109
|
+
// inline `export const` would require renaming the file away from the `<resource>.<verb>`
|
|
110
|
+
// convention that mirrors the OpenAPI operation it implements.
|
|
111
|
+
// fusion-lint-disable-next-line no-separate-export
|
|
112
|
+
export { createScopeType, };
|
|
113
|
+
//# sourceMappingURL=scope-types.post.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-types.post.js","sourceRoot":"","sources":["../../../../src/roles/endpoints/scope-types.post.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,8BAA8B,EAAE,MAAM,mDAAmD,CAAC;AAcnG;;;;;;GAMG;AACH,MAAM,eAAe,GAAG;IACtB,CAAC,UAAU,CAAC,EAAE,CAAC,EAAE;QACf,2DAA2D;QAC3D,IAAI,EAAE,CAAC;aACJ,MAAM,CAAC;YACN,GAAG,8BAA8B,CAAC,KAAK;SACxC,CAAC;aACD,QAAQ,CAAC,yDAAyD,CAAC;QACtE,2DAA2D;QAC3D,QAAQ,EAAE,oBAAoB;KAC/B;CACoC,CAAC;AAwCxC,gGAAgG;AAChG,MAAM,yBAAyB,GAAG,CAChC,OAAiB,EACjB,IAA2D,EAC3D,IAA8C,EACL,EAAE;IAC3C,qEAAqE;IACrE,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,UAAU,CAAC,EAA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,CAAC;QAC1E,OAAO,MAAM,CAAC,MAAM,CAAC,CACnB,eAAe,CAAC,UAAU,EAAE,IAAI,CAAC,EACjC,yBAAyB,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,CACD,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,wFAAwF;AACxF,6FAA6F;AAC7F,0FAA0F;AAC1F,+DAA+D;AAC/D,mDAAmD;AACnD,OAAO,EAKL,eAAe,GAChB,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { extractVersion, parseVersionedArgs, versionedResponseSelector } from '../../utils';
|
|
3
|
+
import { ApiVersion } from '../static';
|
|
4
|
+
/**
|
|
5
|
+
* Version contract for `deleteSystemAccessRoleAssignment`, implementing
|
|
6
|
+
* `DELETE /systems/{systemIdentifier}/access-roles/{accessRoleIdentifier}/assignments/{accessRoleAssignmentId}`.
|
|
7
|
+
*
|
|
8
|
+
* Each concrete {@link ApiVersion} maps to the argument and response schemas that
|
|
9
|
+
* version publishes, so the version a caller passes is the single discriminator
|
|
10
|
+
* for the request shape, the request path, and the response shape.
|
|
11
|
+
*/
|
|
12
|
+
const VersionContract = {
|
|
13
|
+
[ApiVersion.v1]: {
|
|
14
|
+
/** Arguments accepted by version 1.0 of this operation. */
|
|
15
|
+
args: z
|
|
16
|
+
.object({
|
|
17
|
+
/** System UUID or unique system name. */
|
|
18
|
+
systemIdentifier: z.string().describe('System UUID or unique system name.'),
|
|
19
|
+
/** Access role UUID or unique access role name. */
|
|
20
|
+
accessRoleIdentifier: z.string().describe('Access role UUID or unique access role name.'),
|
|
21
|
+
/** Access role assignment UUID. */
|
|
22
|
+
accessRoleAssignmentId: z.string().describe('Access role assignment UUID.'),
|
|
23
|
+
})
|
|
24
|
+
.describe('Arguments for DELETE /systems/{systemIdentifier}/access-roles/{accessRoleIdentifier}/assignments/{accessRoleAssignmentId} (deleteSystemAccessRoleAssignment v1.0).'),
|
|
25
|
+
/** Response published by version 1.0. The operation answers `204 No Content`. */
|
|
26
|
+
response: z.void(),
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
/** Builds the request init for the resolved version, including its response-schema selector. */
|
|
30
|
+
const generateRequestParameters = (version, _args, init) => {
|
|
31
|
+
// Select the response schema that matches the requested API version.
|
|
32
|
+
switch (version) {
|
|
33
|
+
case ApiVersion.v1: {
|
|
34
|
+
const baseInit = {
|
|
35
|
+
method: 'DELETE',
|
|
36
|
+
selector: versionedResponseSelector(VersionContract, version),
|
|
37
|
+
// The contract declares no request body, so any caller-supplied body is dropped.
|
|
38
|
+
body: undefined,
|
|
39
|
+
};
|
|
40
|
+
// Apply the caller-supplied `init` first, then the generated defaults, so the
|
|
41
|
+
// generated `method`, forced empty `body`, and version-specific response `selector`
|
|
42
|
+
// always win and cannot be overridden or bypassed.
|
|
43
|
+
return Object.assign({}, init, baseInit);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
throw Error(`Unknown API version: ${version}`);
|
|
47
|
+
};
|
|
48
|
+
/** Builds the request path for the resolved version, including its `api-version` parameter. */
|
|
49
|
+
const generateApiPath = (version, args) => {
|
|
50
|
+
// Build the endpoint path according to the requested API version.
|
|
51
|
+
switch (version) {
|
|
52
|
+
case ApiVersion.v1: {
|
|
53
|
+
const params = new URLSearchParams();
|
|
54
|
+
params.append('api-version', version);
|
|
55
|
+
return `/systems/${encodeURIComponent(args.systemIdentifier)}/access-roles/${encodeURIComponent(args.accessRoleIdentifier)}/assignments/${encodeURIComponent(args.accessRoleAssignmentId)}?${String(params)}`;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
throw Error(`Unknown API version: ${version}`);
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Deletes one assignment of a system access role, addressed by its assignment ID.
|
|
62
|
+
*
|
|
63
|
+
* Roles V2 operation:
|
|
64
|
+
* `DELETE /systems/{systemIdentifier}/access-roles/{accessRoleIdentifier}/assignments/{accessRoleAssignmentId}`
|
|
65
|
+
* — "Delete an access role assignment by ID."
|
|
66
|
+
*
|
|
67
|
+
* Curried in two stages: `deleteSystemAccessRoleAssignment(version, client, method)` binds the
|
|
68
|
+
* API version, the `IHttpClient` that reaches the Roles service, and the execution method —
|
|
69
|
+
* `'json'` for a promise, `'json$'` for an observable stream. The returned function takes
|
|
70
|
+
* {@link DeleteSystemAccessRoleAssignmentArg} plus an optional `ClientRequestInit`, and gives
|
|
71
|
+
* back {@link DeleteSystemAccessRoleAssignmentResult}.
|
|
72
|
+
*
|
|
73
|
+
* The version argument is the single discriminator: `'v1'` — equivalently `'1.0'` or
|
|
74
|
+
* `ApiVersion.v1` — selects the version-1.0 argument schema, expects the empty success body,
|
|
75
|
+
* and sends `api-version=1.0` on the request.
|
|
76
|
+
*
|
|
77
|
+
* Destructive: it removes the access role assignment permanently, and the deletion cannot be
|
|
78
|
+
* undone through this API. Roles V2 answers `204 No Content` with no body, so the resolved
|
|
79
|
+
* value is `void`. The contract declares `403 Forbidden` for callers the Roles service does not
|
|
80
|
+
* authorise for this operation.
|
|
81
|
+
*
|
|
82
|
+
* @template TVersion - Roles API version identifier: `'v1'`, `'1.0'`, or `ApiVersion.v1`.
|
|
83
|
+
* @template TMethod - Execution method: `'json'` for a promise, `'json$'` for an observable.
|
|
84
|
+
* @param version - API version selecting the request path, the argument schema, and the
|
|
85
|
+
* response schema.
|
|
86
|
+
* @param client - HTTP client that executes the request against the Roles service.
|
|
87
|
+
* @param method - Execution method, defaulting to `'json'`.
|
|
88
|
+
* @returns A request function taking {@link DeleteSystemAccessRoleAssignmentArg} and an
|
|
89
|
+
* optional `ClientRequestInit`, returning {@link DeleteSystemAccessRoleAssignmentResult}.
|
|
90
|
+
* @throws {Error} When `version` names an API version this operation does not publish. The
|
|
91
|
+
* check runs while binding, before the HTTP client is used.
|
|
92
|
+
* @throws {z.ZodError} From the returned function, when the arguments fail this version's
|
|
93
|
+
* argument schema or the response body fails its response schema.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* import { deleteSystemAccessRoleAssignment } from '@equinor/fusion-services/roles';
|
|
98
|
+
*
|
|
99
|
+
* await deleteSystemAccessRoleAssignment('v1', httpClient)({
|
|
100
|
+
* systemIdentifier: 'fusion-core',
|
|
101
|
+
* accessRoleIdentifier: 'writer',
|
|
102
|
+
* accessRoleAssignmentId: '4d2c9a71-5e6f-4b80-9c12-3a4b5c6d7e8f',
|
|
103
|
+
* });
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
const deleteSystemAccessRoleAssignment = (version, client, method = 'json') => {
|
|
107
|
+
const apiVersion = extractVersion(ApiVersion, version);
|
|
108
|
+
return (input, init) => {
|
|
109
|
+
const args = parseVersionedArgs(VersionContract, apiVersion, input);
|
|
110
|
+
return client[method](generateApiPath(apiVersion, args), generateRequestParameters(apiVersion, args, init));
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
// Every symbol is declared under its public name so hover and code completion show this
|
|
114
|
+
// endpoint's own documentation. They are exported in one block rather than inline because an
|
|
115
|
+
// inline `export const` would require renaming the file away from the `<resource>.<verb>`
|
|
116
|
+
// convention that mirrors the OpenAPI operation it implements.
|
|
117
|
+
// fusion-lint-disable-next-line no-separate-export
|
|
118
|
+
export { deleteSystemAccessRoleAssignment, };
|
|
119
|
+
//# sourceMappingURL=system-access-role-assignment.delete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-access-role-assignment.delete.js","sourceRoot":"","sources":["../../../../src/roles/endpoints/system-access-role-assignment.delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoBxB,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAgBvC;;;;;;;GAOG;AACH,MAAM,eAAe,GA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