@backstage/plugin-permission-common
Advanced tools
Comparing version 0.0.0-nightly-20240618021721 to 0.0.0-nightly-20240716021845
# @backstage/plugin-permission-common | ||
## 0.0.0-nightly-20240618021721 | ||
## 0.0.0-nightly-20240716021845 | ||
### Minor Changes | ||
- f4085b8: **BREAKING**: Removed the deprecated and unused `token` option from `EvaluatorRequestOptions`. The `PermissionsClient` now has its own `PermissionClientRequestOptions` type that declares the `token` option instead. | ||
### Patch Changes | ||
- Updated dependencies | ||
- @backstage/config@1.2.0 | ||
- @backstage/errors@1.2.4 | ||
- @backstage/types@1.1.1 | ||
## 0.7.14 | ||
### Patch Changes | ||
- d44a20a: Added additional plugin metadata to `package.json`. | ||
@@ -8,0 +21,0 @@ - Updated dependencies |
@@ -276,3 +276,5 @@ import { JsonPrimitive } from '@backstage/types'; | ||
*/ | ||
authorize(requests: AuthorizePermissionRequest[], options?: EvaluatorRequestOptions): Promise<AuthorizePermissionResponse[]>; | ||
authorize(requests: AuthorizePermissionRequest[], options?: EvaluatorRequestOptions & { | ||
_ignored?: never; | ||
}): Promise<AuthorizePermissionResponse[]>; | ||
/** | ||
@@ -286,3 +288,5 @@ * Evaluates {@link ResourcePermission | ResourcePermissions} and returns both definitive and | ||
*/ | ||
authorizeConditional(requests: QueryPermissionRequest[], options?: EvaluatorRequestOptions): Promise<QueryPermissionResponse[]>; | ||
authorizeConditional(requests: QueryPermissionRequest[], options?: EvaluatorRequestOptions & { | ||
_ignored?: never; | ||
}): Promise<QueryPermissionResponse[]>; | ||
} | ||
@@ -292,14 +296,8 @@ /** | ||
* | ||
* This is currently empty, as there are no longer any common options for the permission evaluator. | ||
* | ||
* @public | ||
*/ | ||
type EvaluatorRequestOptions = { | ||
/** | ||
* @deprecated Backend plugins should no longer depend on the | ||
* `PermissionEvaluator`, but instead use the `PermissionService` from | ||
* `@backstage/backend-plugin-api`. Frontend plugins should not need to inject | ||
* this token at all, but instead implicitly rely on underlying fetchApi to do | ||
* it for them. | ||
*/ | ||
token?: string; | ||
}; | ||
interface EvaluatorRequestOptions { | ||
} | ||
@@ -376,2 +374,10 @@ /** | ||
/** | ||
* Options for {@link PermissionClient} requests. | ||
* | ||
* @public | ||
*/ | ||
type PermissionClientRequestOptions = { | ||
token?: string; | ||
}; | ||
/** | ||
* An isomorphic client for requesting authorization for Backstage permissions. | ||
@@ -390,7 +396,7 @@ * @public | ||
*/ | ||
authorize(requests: AuthorizePermissionRequest[], options?: EvaluatorRequestOptions): Promise<AuthorizePermissionResponse[]>; | ||
authorize(requests: AuthorizePermissionRequest[], options?: PermissionClientRequestOptions): Promise<AuthorizePermissionResponse[]>; | ||
/** | ||
* {@inheritdoc PermissionEvaluator.authorizeConditional} | ||
*/ | ||
authorizeConditional(queries: QueryPermissionRequest[], options?: EvaluatorRequestOptions): Promise<QueryPermissionResponse[]>; | ||
authorizeConditional(queries: QueryPermissionRequest[], options?: PermissionClientRequestOptions): Promise<QueryPermissionResponse[]>; | ||
private makeRequest; | ||
@@ -400,2 +406,2 @@ private getAuthorizationHeader; | ||
export { type AllOfCriteria, type AnyOfCriteria, type AuthorizePermissionRequest, type AuthorizePermissionResponse, type AuthorizeRequestOptions, AuthorizeResult, type BasicPermission, type ConditionalPolicyDecision, type DefinitivePolicyDecision, type DiscoveryApi, type EvaluatePermissionRequest, type EvaluatePermissionRequestBatch, type EvaluatePermissionResponse, type EvaluatePermissionResponseBatch, type EvaluatorRequestOptions, type IdentifiedPermissionMessage, type NotCriteria, type Permission, type PermissionAttributes, type PermissionAuthorizer, type PermissionBase, PermissionClient, type PermissionCondition, type PermissionCriteria, type PermissionEvaluator, type PermissionMessageBatch, type PermissionRuleParam, type PermissionRuleParams, type PolicyDecision, type QueryPermissionRequest, type QueryPermissionResponse, type ResourcePermission, createPermission, isCreatePermission, isDeletePermission, isPermission, isReadPermission, isResourcePermission, isUpdatePermission, toPermissionEvaluator }; | ||
export { type AllOfCriteria, type AnyOfCriteria, type AuthorizePermissionRequest, type AuthorizePermissionResponse, type AuthorizeRequestOptions, AuthorizeResult, type BasicPermission, type ConditionalPolicyDecision, type DefinitivePolicyDecision, type DiscoveryApi, type EvaluatePermissionRequest, type EvaluatePermissionRequestBatch, type EvaluatePermissionResponse, type EvaluatePermissionResponseBatch, type EvaluatorRequestOptions, type IdentifiedPermissionMessage, type NotCriteria, type Permission, type PermissionAttributes, type PermissionAuthorizer, type PermissionBase, PermissionClient, type PermissionClientRequestOptions, type PermissionCondition, type PermissionCriteria, type PermissionEvaluator, type PermissionMessageBatch, type PermissionRuleParam, type PermissionRuleParams, type PolicyDecision, type QueryPermissionRequest, type QueryPermissionResponse, type ResourcePermission, createPermission, isCreatePermission, isDeletePermission, isPermission, isReadPermission, isResourcePermission, isUpdatePermission, toPermissionEvaluator }; |
{ | ||
"name": "@backstage/plugin-permission-common", | ||
"version": "0.0.0-nightly-20240618021721", | ||
"version": "0.0.0-nightly-20240716021845", | ||
"description": "Isomorphic types and client for Backstage permissions and authorization", | ||
@@ -59,3 +59,3 @@ "backstage": { | ||
"devDependencies": { | ||
"@backstage/cli": "^0.0.0-nightly-20240618021721", | ||
"@backstage/cli": "^0.0.0-nightly-20240716021845", | ||
"msw": "^1.0.0" | ||
@@ -62,0 +62,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93805
785
17