/** * This interface is define the structure of a permission array of PermissionDefinition. * */ export interface Permission { /** * Key of the permission. * @property */ key: string; /** * Title of the permission. * @property */ title: string; /** * True for only permission is used for manage services. * @property */ usedByManagedServiceOnly?: boolean; /** * True for only permission is used for development. * @property */ usedForDevelopment?: boolean; /** * List of gqlOperations. * @property */ gqlOperations?: readonly string[]; } /** * This interface is define the structure of a PermissionDefinition array for permission structure V2.. * */ export interface PermissionDefinition { gqlOptions?: { /** * Any operations defined under ANONYMOUS will be ignored while checking for Authorization. * @property */ anonymousGqlOperations?: string[]; /** * Any operations defined under IGNORE will not be logged as disabled operations * as they are known to be intentionally removed. * @property */ ignoredGqlOperations?: string[]; }; /** * Map of service specific permissions. * This is a permission array. * This is specially useful in authorizing REST APIs where a route could be authorized if an access-token * contains a specific permission, but there is no real need for mapping any GraphQL operations to that permission. * @property */ permissions: readonly Permission[]; }