import { GetResourceAuthorizationCacheKey, ResourceAuthorizationAction, ResourceAuthorizationResource } from '.'; /** * This class exists primarily to keep all these functions easily accessible via IDE suggestions */ export declare class ResourceAuthorizationPolicy { /** * Split platform identifier * * For the moment, there's two possible formats * - `cm` * - `application:4dec94e8-947e-4aee-8cce-3df0f3757a0c` * * @param platformIdentifier * @returns */ private splitPlatformIdentifier; /** * Split resource identifier * * For the moment, there's one possible format * - `EntityName:4dec94e8-947e-4aee-8cce-3df0f3757a0c` * * @param resourceIdentifier * @returns */ private splitResourceIdentifier; /** * Parse policy resource string * * For the moment, there's two possible formats: * - `cm:::DocumentEntity:4dec94e8-947e-4aee-8cce-3df0f3757a0c` * - 'application:9dke8-947e-4aee-8cce-3df0f3757a0c:::DocumentEntity:4dec94e8-947e-4aee-8cce-3df0f3757a0c' * * @param policyString * @returns */ parseResourceString(policyString: string): { result?: ResourceAuthorizationResource; errors: string[]; }; /** * Parse multiple policy resource string * @param policyIdentifiers * @returns */ parseResourceStringArray(policyIdentifiers: string[]): { errors: any[]; result: ResourceAuthorizationResource[]; }; /** * Create policy resource string * @param resourceIdentifier: ResourceAuthorizationResource * includes: * identifier: PLATFORM_IDENTIFIER * applicationEndpointId? * entity * entityName * entityId * @returns 'cm:::SignatureEntity:4dec94e8-947e-4aee-8cce-3df0f3757a0c' */ createResourceString(resourceIdentifier: ResourceAuthorizationResource): string; /** * Parse policy action string * @param action 'api:get' * @returns { endpointType: 'api', actionIdentifier: 'get' } */ parseActionString(action: string): { result?: ResourceAuthorizationAction; error?: string; }; /** * Parse multiple policy action string * @param actions * @returns */ parseActionStringArray(actions: string[]): { result?: ResourceAuthorizationAction[]; errors?: string[]; }; /** * Create policy action string * @param params * @returns 'api:get' */ createActionString(params: ResourceAuthorizationAction): string; /** * * @param action action string. for ex. 'api:get' * @param resource resource string. for ex. 'DocumentEntity:4dec94e8-947e-4aee-8cce-3df0f3757a0c' * @returns */ parse(action: string, resource: string): { errors: string[]; resource: ResourceAuthorizationResource; action: ResourceAuthorizationAction; }; parseMany(actions: string[], resources: string[]): { errors: any[]; resources: ResourceAuthorizationResource[]; actions: ResourceAuthorizationAction[]; }; create(action: ResourceAuthorizationAction, resource: ResourceAuthorizationResource): { action: string; resource: string; }; createMany(actions: ResourceAuthorizationAction[], resources: ResourceAuthorizationResource[]): { actions: string[]; resources: string[]; }; } export declare function get_resource_authorization_cache_key(params: GetResourceAuthorizationCacheKey): string;