authz: update permission-node api-report
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
@@ -3,39 +3,25 @@
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
import { AuthorizeRequest } from '@backstage/permission-common';
|
||||
import { AuthorizeResult } from '@backstage/permission-common';
|
||||
import { BackstageIdentity } from '@backstage/plugin-auth-backend';
|
||||
import { DefinitiveAuthorizeResult } from '@backstage/permission-common';
|
||||
import { OpaqueAuthorizeRequest } from '@backstage/permission-common';
|
||||
import { PermissionCondition } from '@backstage/permission-common';
|
||||
import { PermissionCriteria } from '@backstage/permission-common';
|
||||
import { Router } from 'express';
|
||||
|
||||
// Warning: (ae-missing-release-tag) "AllowAllPermissionPolicy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export class AllowAllPermissionPolicy implements PermissionPolicy {
|
||||
// (undocumented)
|
||||
handle(
|
||||
_request: OpaqueAuthorizeRequest,
|
||||
_user?: BackstageIdentity,
|
||||
): Promise<PolicyResult>;
|
||||
}
|
||||
|
||||
// Warning: (ae-missing-release-tag) "ApplyConditionsRequest" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
// @public
|
||||
export type ApplyConditionsRequest = {
|
||||
resourceRef: string;
|
||||
resourceType: string;
|
||||
conditions: PermissionCriteria<PermissionCondition<unknown[]>>;
|
||||
conditions: PermissionCriteria<PermissionCondition>;
|
||||
};
|
||||
|
||||
// Warning: (ae-missing-release-tag) "ConditionalPolicyResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@backstage/plugin-permission-node" does not have an export "AuthorizeResult"
|
||||
//
|
||||
// @public (undocumented)
|
||||
// @public
|
||||
export type ConditionalPolicyResult = {
|
||||
result: AuthorizeResult.MAYBE;
|
||||
result: AuthorizeResult.CONDITIONAL;
|
||||
conditions: {
|
||||
pluginId: string;
|
||||
resourceType: string;
|
||||
@@ -47,7 +33,7 @@ export type ConditionalPolicyResult = {
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const conditionFor: <TParams extends any[]>(
|
||||
rule: PermissionRule<any, any, TParams>,
|
||||
rule: PermissionRule<unknown, unknown, TParams>,
|
||||
) => (...params: TParams) => {
|
||||
rule: string;
|
||||
params: TParams;
|
||||
@@ -59,7 +45,7 @@ export const conditionFor: <TParams extends any[]>(
|
||||
export const createPermissionIntegration: <
|
||||
TResource,
|
||||
TRules extends {
|
||||
[key: string]: PermissionRule<TResource, any, any>;
|
||||
[key: string]: PermissionRule<TResource, any, unknown[]>;
|
||||
},
|
||||
TGetResourceParams extends any[] = [],
|
||||
>({
|
||||
@@ -78,49 +64,55 @@ export const createPermissionIntegration: <
|
||||
}) => {
|
||||
createPermissionIntegrationRouter: (...params: TGetResourceParams) => Router;
|
||||
toQuery: (
|
||||
conditions: PermissionCriteria<PermissionCondition>,
|
||||
conditions: PermissionCriteria<PermissionCondition<QueryType<TRules>>>,
|
||||
) => PermissionCriteria<QueryType<TRules>>;
|
||||
conditions: Conditions<TRules>;
|
||||
createConditions: (conditions: PermissionCriteria<PermissionCondition>) => {
|
||||
createConditions: (
|
||||
conditions: PermissionCriteria<PermissionCondition<QueryType<TRules>>>,
|
||||
) => {
|
||||
pluginId: string;
|
||||
resourceType: string;
|
||||
conditions: PermissionCriteria<PermissionCondition>;
|
||||
conditions: PermissionCriteria<PermissionCondition<QueryType<TRules>>>;
|
||||
};
|
||||
registerPermissionRule: (
|
||||
rule: PermissionRule<TResource, QueryType<TRules>, any>,
|
||||
rule: PermissionRule<TResource, QueryType<TRules>, unknown[]>,
|
||||
) => void;
|
||||
};
|
||||
|
||||
// Warning: (ae-missing-release-tag) "PermissionPolicy" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
// @public
|
||||
export interface PermissionPolicy {
|
||||
// Warning: (ae-forgotten-export) The symbol "PolicyAuthorizeRequest" needs to be exported by the entry point index.d.ts
|
||||
//
|
||||
// (undocumented)
|
||||
handle(
|
||||
request: OpaqueAuthorizeRequest,
|
||||
request: PolicyAuthorizeRequest,
|
||||
user?: BackstageIdentity,
|
||||
): Promise<PolicyResult>;
|
||||
}
|
||||
|
||||
// Warning: (ae-missing-release-tag) "PermissionRule" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
// Warning: (ae-unresolved-link) The @link reference could not be resolved: The package "@backstage/plugin-permission-node" does not have an export "AuthorizeResult"
|
||||
//
|
||||
// @public (undocumented)
|
||||
export type PermissionRule<TResource, TQuery, TParams extends any[] = any> = {
|
||||
// @public
|
||||
export type PermissionRule<
|
||||
TResource,
|
||||
TQuery,
|
||||
TParams extends unknown[] = unknown[],
|
||||
> = {
|
||||
name: string;
|
||||
description: string;
|
||||
apply(resource: TResource, ...params: TParams): boolean;
|
||||
toQuery(...params: TParams): TQuery | PermissionCriteria<TQuery>;
|
||||
};
|
||||
|
||||
// Warning: (ae-missing-release-tag) "PolicyResult" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export type PolicyResult = DefinitiveAuthorizeResult | ConditionalPolicyResult;
|
||||
// @public
|
||||
export type PolicyResult =
|
||||
| {
|
||||
result: AuthorizeResult.ALLOW | AuthorizeResult.DENY;
|
||||
}
|
||||
| ConditionalPolicyResult;
|
||||
|
||||
// Warnings were encountered during analysis:
|
||||
//
|
||||
// src/integration/createPermissionIntegration.d.ts:23:5 - (ae-forgotten-export) The symbol "QueryType" needs to be exported by the entry point index.d.ts
|
||||
// src/integration/createPermissionIntegration.d.ts:24:5 - (ae-forgotten-export) The symbol "Conditions" needs to be exported by the entry point index.d.ts
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
// src/integration/createPermissionIntegration.d.ts:28:5 - (ae-forgotten-export) The symbol "QueryType" needs to be exported by the entry point index.d.ts
|
||||
// src/integration/createPermissionIntegration.d.ts:29:5 - (ae-forgotten-export) The symbol "Conditions" needs to be exported by the entry point index.d.ts
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user