Updated API Reports

Signed-off-by: Harry Hogg <hhogg@spotify.com>
This commit is contained in:
Harry Hogg
2022-10-11 12:32:26 +01:00
parent 3f25d863b0
commit 04db0e8afb
2 changed files with 9 additions and 21 deletions
+6 -6
View File
@@ -179,8 +179,8 @@ export const catalogConditions: Conditions<{
EntitiesSearchFilter,
'catalog-entity',
{
value?: string | undefined;
annotation: string;
value: string | undefined;
}
>;
hasLabel: PermissionRule<
@@ -196,8 +196,8 @@ export const catalogConditions: Conditions<{
EntitiesSearchFilter,
'catalog-entity',
{
value?: string | undefined;
key: string;
value: string | undefined;
}
>;
hasSpec: PermissionRule<
@@ -205,8 +205,8 @@ export const catalogConditions: Conditions<{
EntitiesSearchFilter,
'catalog-entity',
{
value?: string | undefined;
key: string;
value: string | undefined;
}
>;
isEntityKind: PermissionRule<
@@ -468,8 +468,8 @@ export const permissionRules: {
EntitiesSearchFilter,
'catalog-entity',
{
value?: string | undefined;
annotation: string;
value: string | undefined;
}
>;
hasLabel: PermissionRule<
@@ -485,8 +485,8 @@ export const permissionRules: {
EntitiesSearchFilter,
'catalog-entity',
{
value?: string | undefined;
key: string;
value: string | undefined;
}
>;
hasSpec: PermissionRule<
@@ -494,8 +494,8 @@ export const permissionRules: {
EntitiesSearchFilter,
'catalog-entity',
{
value?: string | undefined;
key: string;
value: string | undefined;
}
>;
isEntityKind: PermissionRule<
+3 -15
View File
@@ -179,23 +179,11 @@ export type PermissionRule<
name: string;
description: string;
resourceType: TResourceType;
paramsSchema?: PermissionRuleSchema<TParams>;
apply(
resource: TResource,
params: NoInfer<z.input<PermissionRuleSchema<TParams>>>,
): boolean;
toQuery(
params: NoInfer<z.input<PermissionRuleSchema<TParams>>>,
): PermissionCriteria<TQuery>;
paramsSchema?: z.ZodSchema<TParams>;
apply(resource: TResource, params: NoInfer<TParams>): boolean;
toQuery(params: NoInfer<TParams>): PermissionCriteria<TQuery>;
};
// @public
export type PermissionRuleSchema<TParams> = z.ZodObject<{
[P in keyof TParams]-?: TParams[P] extends undefined
? z.ZodOptionalType<z.ZodType<TParams[P]>>
: z.ZodType<TParams[P]>;
}>;
// @public
export type PolicyQuery = {
permission: Permission;