import { Logger } from 'winston'; import { ResourceDefinition, ActionDefinition, ResourceRegistry } from './registry'; import { ResourceConfig, ActionConfig } from './interfaces'; import { IAuthorizonConfig } from '../config'; export interface SyncObjectResponse { id: string; } export declare class ResourceStub { private reporter; readonly resourceName: string; constructor(reporter: ResourceReporter, resourceName: string); action(config: ActionConfig): void; } export interface IResourceReporter { resource(config: ResourceConfig): ResourceStub; action(config: ActionConfig): ActionDefinition; } /** * the ResourceReporter is used to sync resources and actions * (the authorization enforcement points) defined by the app to the * authorizon control plane in the cloud, so that policy and permissions * may be defined by the control plane. The only data authorizon needs to * know about the app is the available enforcement point (i.e: resources * and actions). */ export declare class ResourceReporter implements IResourceReporter { private config; private registry; private logger; private initialized; private client; constructor(config: IAuthorizonConfig, registry: ResourceRegistry, logger: Logger); get token(): string; addResource(resource: ResourceDefinition): ResourceStub; addActionToResource(resourceName: string, actionDef: ActionDefinition): void; private maybeSyncResource; private maybeSyncAction; private syncResources; resource(config: ResourceConfig): ResourceStub; action(config: ActionConfig): ActionDefinition; getMethods(): IResourceReporter; }