/** * 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; /** * Defines the intended assignment scope metadata for the permission. * 'ANY' (default) - available to general permission-assignment flows. * 'SERVICE' - intended for service-account usage and may be hidden from user-role UI flows. * Note: this flag does not by itself enforce server-side assignment restrictions; any such * validation must be implemented by the consumer of this definition. * @property */ usageScope?: 'ANY' | 'SERVICE'; /** * 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[]; }