import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import Long from "long"; import type { CallContext, CallOptions } from "nice-grpc-common"; import { Argument, Attribute, AttributeFilter, CheckResult, Context, DataBundle, DataChanges, Entity, Entrance, Expand, Partials, RelationReference, SchemaDefinition as SchemaDefinition1, StringArrayValue, Subject, Tenant, Tuple, TupleFilter } from "./base"; export declare const protobufPackage = "base.v1"; /** PermissionCheckRequest is the request message for the Check method in the Permission service. */ export interface PermissionCheckRequest { /** Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. */ tenantId: string; /** Metadata associated with this request, required. */ metadata: PermissionCheckRequestMetadata | undefined; /** Entity on which the permission needs to be checked, required. */ entity: Entity | undefined; /** Name of the permission or relation, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes. */ permission: string; /** Subject for which the permission needs to be checked, required. */ subject: Subject | undefined; /** Context associated with this request. */ context: Context | undefined; /** Additional arguments associated with this request. */ arguments: Argument[]; } /** PermissionCheckRequestMetadata metadata for the PermissionCheckRequest. */ export interface PermissionCheckRequestMetadata { /** Version of the schema. */ schemaVersion: string; /** Token associated with the snap. */ snapToken: string; /** Depth of the check, must be greater than or equal to 3. */ depth: number; } /** PermissionCheckResponse is the response message for the Check method in the Permission service. */ export interface PermissionCheckResponse { /** Result of the permission check. */ can: CheckResult; /** Metadata associated with this response. */ metadata: PermissionCheckResponseMetadata | undefined; } /** PermissionCheckResponseMetadata metadata for the PermissionCheckResponse. */ export interface PermissionCheckResponseMetadata { /** The count of the checks performed. */ checkCount: number; } /** BULK CHECK */ export interface PermissionBulkCheckRequestItem { /** Entity on which the permission needs to be checked, required. */ entity: Entity | undefined; /** Name of the permission or relation, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes. */ permission: string; /** Subject for which the permission needs to be checked, required. */ subject: Subject | undefined; } /** PermissionBulkCheckRequest is the request message for the BulkCheck method in the Permission service. */ export interface PermissionBulkCheckRequest { /** Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. */ tenantId: string; /** Metadata associated with this request, required. */ metadata: PermissionCheckRequestMetadata | undefined; /** List of permission check requests, maximum 100 items. */ items: PermissionBulkCheckRequestItem[]; /** Context associated with this request. */ context: Context | undefined; /** Additional arguments associated with this request. */ arguments: Argument[]; } /** PermissionBulkCheckResponse is the response message for the BulkCheck method in the Permission service. */ export interface PermissionBulkCheckResponse { /** List of permission check responses corresponding to each request. */ results: PermissionCheckResponse[]; } /** PermissionExpandRequest is the request message for the Expand method in the Permission service. */ export interface PermissionExpandRequest { /** Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. */ tenantId: string; /** Metadata associated with this request, required. */ metadata: PermissionExpandRequestMetadata | undefined; /** Entity on which the permission needs to be expanded, required. */ entity: Entity | undefined; /** Name of the permission to be expanded, not required, must start with a letter and can include alphanumeric and underscore, max 64 bytes. */ permission: string; /** Context associated with this request. */ context: Context | undefined; /** Additional arguments associated with this request. */ arguments: Argument[]; } /** PermissionExpandRequestMetadata metadata for the PermissionExpandRequest. */ export interface PermissionExpandRequestMetadata { /** Version of the schema. */ schemaVersion: string; /** Token associated with the snap. */ snapToken: string; } /** PermissionExpandResponse is the response message for the Expand method in the Permission service. */ export interface PermissionExpandResponse { /** Expansion tree. */ tree: Expand | undefined; } /** PermissionLookupEntityRequest is the request message for the LookupEntity method in the Permission service. */ export interface PermissionLookupEntityRequest { /** Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. */ tenantId: string; /** Metadata associated with this request, required. */ metadata: PermissionLookupEntityRequestMetadata | undefined; /** Type of the entity to lookup, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes. */ entityType: string; /** Name of the permission to check, required, must start with a letter and can include alphanumeric and underscore, max 64 bytes. */ permission: string; /** Subject for which to check the permission, required. */ subject: Subject | undefined; /** Context associated with this request. */ context: Context | undefined; /** * Scope: A map that associates entity types with lists of identifiers. Each entry * helps filter requests by specifying which entities are relevant to the operation. */ scope: { [key: string]: StringArrayValue; }; /** * page_size is the number of entities to be returned in the response. * The value should be between 1 and 100. */ pageSize: number; /** * continuous_token is an optional parameter used for pagination. * It should be the value received in the previous response. */ continuousToken: string; } export interface PermissionLookupEntityRequest_ScopeEntry { key: string; value: StringArrayValue | undefined; } /** PermissionLookupEntityRequestMetadata metadata for the PermissionLookupEntityRequest. */ export interface PermissionLookupEntityRequestMetadata { /** Version of the schema. */ schemaVersion: string; /** Token associated with the snap. */ snapToken: string; /** Depth of lookup, required, must be greater or equal to 3. */ depth: number; } /** PermissionLookupEntityResponse is the response message for the LookupEntity method in the Permission service. */ export interface PermissionLookupEntityResponse { /** List of identifiers for entities that match the lookup. */ entityIds: string[]; /** continuous_token is a string that can be used to paginate and retrieve the next set of results. */ continuousToken: string; } /** PermissionLookupEntityStreamResponse is the response message for the LookupEntityStream method in the Permission service. */ export interface PermissionLookupEntityStreamResponse { /** Identifier for an entity that matches the lookup. */ entityId: string; /** continuous_token is a string that can be used to paginate and retrieve the next set of results. */ continuousToken: string; } /** PermissionEntityFilterRequest is the request message for the LookupEntityStream method in the Permission service. */ export interface PermissionEntityFilterRequest { /** Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. */ tenantId: string; /** Metadata associated with this request, required. */ metadata: PermissionEntityFilterRequestMetadata | undefined; /** Reference to the entity to filter. */ entrance: Entrance | undefined; /** Subject for which to check the permission. */ subject: Subject | undefined; /** Context associated with this request. */ context: Context | undefined; /** * Scope: A map that associates entity types with lists of identifiers. Each entry * helps filter requests by specifying which entities are relevant to the operation. */ scope: { [key: string]: StringArrayValue; }; /** * cursor is an optional parameter used for pagination. * It should be the value received in the previous response. */ cursor: string; } export interface PermissionEntityFilterRequest_ScopeEntry { key: string; value: StringArrayValue | undefined; } /** PermissionEntityFilterRequestMetadata metadata for the PermissionEntityFilterRequest. */ export interface PermissionEntityFilterRequestMetadata { /** Version of the schema. */ schemaVersion: string; /** Token associated with the snap. */ snapToken: string; /** Depth of lookup, required, must be greater or equal to 3. */ depth: number; } /** PermissionLookupSubjectRequest is the request message for the LookupSubject method in the Permission service. */ export interface PermissionLookupSubjectRequest { /** Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. */ tenantId: string; /** Metadata associated with this request, required. */ metadata: PermissionLookupSubjectRequestMetadata | undefined; /** Entity for which to check the permission, required. */ entity: Entity | undefined; /** Permission to be checked, can be a permission or relation. Required, and must match the pattern "^([a-zA-Z][a-zA-Z0-9_]{1,62}[a-zA-Z0-9])$", max 64 bytes. */ permission: string; /** Reference to the subject to lookup. */ subjectReference: RelationReference | undefined; /** Context associated with this request. */ context: Context | undefined; /** Additional arguments associated with this request. */ arguments: Argument[]; /** * page_size is the number of subjects to be returned in the response. * The value should be between 1 and 100. */ pageSize: number; /** * continuous_token is an optional parameter used for pagination. * It should be the value received in the previous response. */ continuousToken: string; } /** PermissionLookupSubjectRequestMetadata metadata for the PermissionLookupSubjectRequest. */ export interface PermissionLookupSubjectRequestMetadata { /** Version of the schema. */ schemaVersion: string; /** Token associated with the snap. */ snapToken: string; /** Depth of the check, must be greater than or equal to 3. */ depth: number; } /** PermissionLookupSubjectResponse is the response message for the LookupSubject method in the Permission service. */ export interface PermissionLookupSubjectResponse { /** List of identifiers for subjects that match the lookup. */ subjectIds: string[]; /** continuous_token is a string that can be used to paginate and retrieve the next set of results. */ continuousToken: string; } /** PermissionSubjectPermissionRequest is the request message for the SubjectPermission method in the Permission service. */ export interface PermissionSubjectPermissionRequest { /** Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. */ tenantId: string; /** Metadata associated with this request, required. */ metadata: PermissionSubjectPermissionRequestMetadata | undefined; /** Entity for which to check the permission, required. */ entity: Entity | undefined; /** Subject for which to check the permission, required. */ subject: Subject | undefined; /** Context associated with this request. */ context: Context | undefined; } /** PermissionSubjectPermissionRequestMetadata metadata for the PermissionSubjectPermissionRequest. */ export interface PermissionSubjectPermissionRequestMetadata { /** Version of the schema. */ schemaVersion: string; /** Token associated with the snap. */ snapToken: string; /** Whether to only check permissions. */ onlyPermission: boolean; /** Depth of the check, must be greater than or equal to 3. */ depth: number; } /** PermissionSubjectPermissionResponse is the response message for the SubjectPermission method in the Permission service. */ export interface PermissionSubjectPermissionResponse { /** Map of results for each permission check. */ results: { [key: string]: CheckResult; }; } export interface PermissionSubjectPermissionResponse_ResultsEntry { key: string; value: CheckResult; } /** * WatchRequest is the request message for the Watch RPC. It contains the * details needed to establish a watch stream. */ export interface WatchRequest { /** Identifier of the tenant, required, and must match the pattern "[a-zA-Z0-9-,]+", max 64 bytes. */ tenantId: string; /** Snap token to be used for watching. */ snapToken: string; } /** * WatchResponse is the response message for the Watch RPC. It contains the * changes in the data that are being watched. */ export interface WatchResponse { /** Changes in the data. */ changes: DataChanges | undefined; } /** * SchemaWriteRequest is the request message for the Write method in the Schema service. * It contains tenant_id and the schema to be written. */ export interface SchemaWriteRequest { /** * tenant_id is a string that identifies the tenant. It must match the pattern "[a-zA-Z0-9-,]+", * be a maximum of 64 bytes, and must not be empty. */ tenantId: string; /** schema is the string representation of the schema to be written. */ schema: string; } /** * SchemaWriteResponse is the response message for the Write method in the Schema service. * It returns the version of the written schema. */ export interface SchemaWriteResponse { /** schema_version is the string that identifies the version of the written schema. */ schemaVersion: string; } /** * It contains the tenant_id to identify the tenant and metadata of the schema to be edited, * with the corresponding edits to various entities */ export interface SchemaPartialWriteRequest { /** * tenant_id is a string that identifies the tenant. It must match the pattern "[a-zA-Z0-9-,]+", * be a maximum of 64 bytes, and must not be empty. */ tenantId: string; /** metadata is the additional information needed for the Partial Write request. */ metadata: SchemaPartialWriteRequestMetadata | undefined; /** Map of entity name with the values needed to be updated */ partials: { [key: string]: Partials; }; } export interface SchemaPartialWriteRequest_PartialsEntry { key: string; value: Partials | undefined; } /** * SchemaPartialWriteRequestMetadata provides additional information for the Schema Partial Write request. * It contains schema_version to specify which version of the schema should be read. */ export interface SchemaPartialWriteRequestMetadata { /** schema_version is the string that identifies the version of the schema to be read. */ schemaVersion: string; } /** * SchemaPartialWriteResponse is the response message for the Parietal Write method in the Schema service. * It returns the requested schema. */ export interface SchemaPartialWriteResponse { /** schema_version is the string that identifies the version of the written schema. */ schemaVersion: string; } /** * SchemaReadRequest is the request message for the Read method in the Schema service. * It contains tenant_id and metadata about the schema to be read. */ export interface SchemaReadRequest { /** * tenant_id is a string that identifies the tenant. It must match the pattern "[a-zA-Z0-9-,]+", * be a maximum of 64 bytes, and must not be empty. */ tenantId: string; /** metadata is the additional information needed for the Read request. */ metadata: SchemaReadRequestMetadata | undefined; } /** * SchemaReadRequestMetadata provides additional information for the Schema Read request. * It contains schema_version to specify which version of the schema should be read. */ export interface SchemaReadRequestMetadata { /** schema_version is the string that identifies the version of the schema to be read. */ schemaVersion: string; } /** * SchemaReadResponse is the response message for the Read method in the Schema service. * It returns the requested schema. */ export interface SchemaReadResponse { /** schema is the SchemaDefinition that represents the read schema. */ schema: SchemaDefinition1 | undefined; } /** * SchemaListRequest is the request message for the List method in the Schema service. * It contains tenant_id for which the schemas are to be listed. */ export interface SchemaListRequest { /** * tenant_id is a string that identifies the tenant. It must match the pattern "[a-zA-Z0-9-,]+", * be a maximum of 64 bytes, and must not be empty. */ tenantId: string; /** * page_size is the number of schemas to be returned in the response. * The value should be between 1 and 100. */ pageSize: number; /** * continuous_token is an optional parameter used for pagination. * It should be the value received in the previous response. */ continuousToken: string; } /** * SchemaListResponse is the response message for the List method in the Schema service. * It returns a paginated list of schemas */ export interface SchemaListResponse { /** head of the schemas is the latest version available for the tenant */ head: string; /** list of schema versions with creation timestamps */ schemas: SchemaList[]; /** continuous_token is a string that can be used to paginate and retrieve the next set of results. */ continuousToken: string; } /** SchemaList provides a list of schema versions with their corresponding creation timestamps */ export interface SchemaList { version: string; createdAt: string; } /** * DataWriteRequest defines the structure of a request for writing data. * It contains the necessary information such as tenant_id, metadata, * tuples and attributes for the write operation. */ export interface DataWriteRequest { /** tenant_id represents the unique identifier of the tenant for which data is written. */ tenantId: string; /** metadata holds additional data related to the request. */ metadata: DataWriteRequestMetadata | undefined; /** tuples contains the list of tuples (entity-relation-entity triples) that need to be written. */ tuples: Tuple[]; /** attributes contains the list of attributes (entity-attribute-value triples) that need to be written. */ attributes: Attribute[]; } /** * DataWriteRequestMetadata defines the structure of metadata for a write request. * It includes the schema version of the data to be written. */ export interface DataWriteRequestMetadata { /** schema_version represents the version of the schema for the data being written. */ schemaVersion: string; } /** * DataWriteResponse defines the structure of the response after writing data. * It contains the snap_token generated after the write operation. */ export interface DataWriteResponse { /** snap_token is the token generated after the data write operation, representing a snapshot of the data. */ snapToken: string; } /** Represents a request to write relationship data. */ export interface RelationshipWriteRequest { /** Unique identifier for the tenant with specific constraints. */ tenantId: string; /** Metadata for the request. It's required. */ metadata: RelationshipWriteRequestMetadata | undefined; /** List of tuples for the request. Must have between 1 and 100 items. */ tuples: Tuple[]; } /** RelationshipWriteRequestMetadata */ export interface RelationshipWriteRequestMetadata { schemaVersion: string; } /** RelationshipWriteResponse */ export interface RelationshipWriteResponse { snapToken: string; } /** * RelationshipReadRequest defines the structure of a request for reading relationships. * It contains the necessary information such as tenant_id, metadata, and filter for the read operation. */ export interface RelationshipReadRequest { /** tenant_id represents the unique identifier of the tenant for which relationships are read. */ tenantId: string; /** metadata holds additional data related to the request. */ metadata: RelationshipReadRequestMetadata | undefined; /** filter is used to specify criteria for the data that needs to be read. */ filter: TupleFilter | undefined; /** * page_size specifies the number of results to return in a single page. * If more results are available, a continuous_token is included in the response. */ pageSize: number; /** continuous_token is used in case of paginated reads to get the next page of results. */ continuousToken: string; } /** * RelationshipReadRequestMetadata defines the structure of the metadata for a read request focused on relationships. * It includes the snap_token associated with a particular state of the database. */ export interface RelationshipReadRequestMetadata { /** snap_token represents a specific state or "snapshot" of the database. */ snapToken: string; } /** * RelationshipReadResponse defines the structure of the response after reading relationships. * It includes the tuples representing the relationships and a continuous token for handling result pagination. */ export interface RelationshipReadResponse { /** tuples is a list of the relationships retrieved in the read operation, represented as entity-relation-entity triples. */ tuples: Tuple[]; /** continuous_token is used in the case of paginated reads to retrieve the next page of results. */ continuousToken: string; } /** * AttributeReadRequest defines the structure of a request for reading attributes. * It includes the tenant_id, metadata, attribute filter, page size for pagination, and a continuous token for multi-page results. */ export interface AttributeReadRequest { /** tenant_id represents the unique identifier of the tenant from which the attributes are being read. */ tenantId: string; /** metadata holds additional information related to the request. */ metadata: AttributeReadRequestMetadata | undefined; /** filter specifies the criteria used to select the attributes that should be returned. */ filter: AttributeFilter | undefined; /** * page_size specifies the number of results to return in a single page. * If more results are available, a continuous_token is included in the response. */ pageSize: number; /** continuous_token is used in case of paginated reads to get the next page of results. */ continuousToken: string; } /** * AttributeReadRequestMetadata defines the structure for the metadata of an attribute read request. * It includes the snap_token associated with a particular state of the database. */ export interface AttributeReadRequestMetadata { /** snap_token represents a specific state or "snapshot" of the database. */ snapToken: string; } /** * AttributeReadResponse defines the structure of the response to an attribute read request. * It includes the attributes retrieved and a continuous token for handling result pagination. */ export interface AttributeReadResponse { /** attributes is a list of the attributes retrieved in the read operation. */ attributes: Attribute[]; /** continuous_token is used in the case of paginated reads to retrieve the next page of results. */ continuousToken: string; } /** * DataDeleteRequest defines the structure of a request to delete data. * It includes the tenant_id and filters for selecting tuples and attributes to be deleted. */ export interface DataDeleteRequest { /** tenant_id represents the unique identifier of the tenant from which the data will be deleted. */ tenantId: string; /** tuple_filter specifies the criteria used to select the tuples that should be deleted. */ tupleFilter: TupleFilter | undefined; /** attribute_filter specifies the criteria used to select the attributes that should be deleted. */ attributeFilter: AttributeFilter | undefined; } /** * DataDeleteResponse defines the structure of the response to a data delete request. * It includes a snap_token representing the state of the database after the deletion. */ export interface DataDeleteResponse { /** snap_token represents the state of the database after the requested deletions. */ snapToken: string; } /** RelationshipDeleteRequest */ export interface RelationshipDeleteRequest { tenantId: string; filter: TupleFilter | undefined; } /** RelationshipDeleteResponse */ export interface RelationshipDeleteResponse { snapToken: string; } /** * BundleRunRequest is used to request the execution of a bundle. * It includes tenant_id, the name of the bundle, and additional arguments for execution. */ export interface BundleRunRequest { tenantId: string; /** Name of the bundle to be executed. */ name: string; /** Additional key-value pairs for execution arguments. */ arguments: { [key: string]: string; }; } export interface BundleRunRequest_ArgumentsEntry { key: string; value: string; } /** * BundleRunResponse is the response for a BundleRunRequest. * It includes a snap_token, which may be used for tracking the execution or its results. */ export interface BundleRunResponse { snapToken: string; } /** * BundleWriteRequest is used to request the writing of a bundle. * It contains the tenant_id to identify the tenant and the Bundles object. */ export interface BundleWriteRequest { tenantId: string; /** Contains the bundle data to be written. */ bundles: DataBundle[]; } /** * BundleWriteResponse is the response for a BundleWriteRequest. * It includes a name which could be used as an identifier or acknowledgment. */ export interface BundleWriteResponse { /** Identifier or acknowledgment of the written bundle. */ names: string[]; } export interface BundleReadRequest { tenantId: string; name: string; } export interface BundleReadResponse { bundle: DataBundle | undefined; } /** * BundleDeleteRequest is used to request the deletion of a bundle. * It contains the tenant_id to specify the tenant and the name of the bundle to be deleted. */ export interface BundleDeleteRequest { tenantId: string; /** Name of the bundle to be deleted. */ name: string; } export interface BundleDeleteResponse { name: string; } /** TenantCreateRequest is the message used for the request to create a tenant. */ export interface TenantCreateRequest { /** id is a unique identifier for the tenant. */ id: string; /** name is the name of the tenant. */ name: string; } /** TenantCreateResponse is the message returned from the request to create a tenant. */ export interface TenantCreateResponse { /** tenant is the created tenant information. */ tenant: Tenant | undefined; } /** TenantDeleteRequest is the message used for the request to delete a tenant. */ export interface TenantDeleteRequest { /** id is the unique identifier of the tenant to be deleted. */ id: string; } /** TenantDeleteResponse is the message returned from the request to delete a tenant. */ export interface TenantDeleteResponse { /** tenant_id is the tenant id that was deleted. */ tenantId: string; } /** TenantListRequest is the message used for the request to list all tenants. */ export interface TenantListRequest { /** * page_size is the number of tenants to be returned in the response. * The value should be between 1 and 100. */ pageSize: number; /** * continuous_token is an optional parameter used for pagination. * It should be the value received in the previous response. */ continuousToken: string; } /** TenantListResponse is the message returned from the request to list all tenants. */ export interface TenantListResponse { /** tenants is a list of tenants. */ tenants: Tenant[]; /** continuous_token is a string that can be used to paginate and retrieve the next set of results. */ continuousToken: string; } export declare const PermissionCheckRequest: MessageFns; export declare const PermissionCheckRequestMetadata: MessageFns; export declare const PermissionCheckResponse: MessageFns; export declare const PermissionCheckResponseMetadata: MessageFns; export declare const PermissionBulkCheckRequestItem: MessageFns; export declare const PermissionBulkCheckRequest: MessageFns; export declare const PermissionBulkCheckResponse: MessageFns; export declare const PermissionExpandRequest: MessageFns; export declare const PermissionExpandRequestMetadata: MessageFns; export declare const PermissionExpandResponse: MessageFns; export declare const PermissionLookupEntityRequest: MessageFns; export declare const PermissionLookupEntityRequest_ScopeEntry: MessageFns; export declare const PermissionLookupEntityRequestMetadata: MessageFns; export declare const PermissionLookupEntityResponse: MessageFns; export declare const PermissionLookupEntityStreamResponse: MessageFns; export declare const PermissionEntityFilterRequest: MessageFns; export declare const PermissionEntityFilterRequest_ScopeEntry: MessageFns; export declare const PermissionEntityFilterRequestMetadata: MessageFns; export declare const PermissionLookupSubjectRequest: MessageFns; export declare const PermissionLookupSubjectRequestMetadata: MessageFns; export declare const PermissionLookupSubjectResponse: MessageFns; export declare const PermissionSubjectPermissionRequest: MessageFns; export declare const PermissionSubjectPermissionRequestMetadata: MessageFns; export declare const PermissionSubjectPermissionResponse: MessageFns; export declare const PermissionSubjectPermissionResponse_ResultsEntry: MessageFns; export declare const WatchRequest: MessageFns; export declare const WatchResponse: MessageFns; export declare const SchemaWriteRequest: MessageFns; export declare const SchemaWriteResponse: MessageFns; export declare const SchemaPartialWriteRequest: MessageFns; export declare const SchemaPartialWriteRequest_PartialsEntry: MessageFns; export declare const SchemaPartialWriteRequestMetadata: MessageFns; export declare const SchemaPartialWriteResponse: MessageFns; export declare const SchemaReadRequest: MessageFns; export declare const SchemaReadRequestMetadata: MessageFns; export declare const SchemaReadResponse: MessageFns; export declare const SchemaListRequest: MessageFns; export declare const SchemaListResponse: MessageFns; export declare const SchemaList: MessageFns; export declare const DataWriteRequest: MessageFns; export declare const DataWriteRequestMetadata: MessageFns; export declare const DataWriteResponse: MessageFns; export declare const RelationshipWriteRequest: MessageFns; export declare const RelationshipWriteRequestMetadata: MessageFns; export declare const RelationshipWriteResponse: MessageFns; export declare const RelationshipReadRequest: MessageFns; export declare const RelationshipReadRequestMetadata: MessageFns; export declare const RelationshipReadResponse: MessageFns; export declare const AttributeReadRequest: MessageFns; export declare const AttributeReadRequestMetadata: MessageFns; export declare const AttributeReadResponse: MessageFns; export declare const DataDeleteRequest: MessageFns; export declare const DataDeleteResponse: MessageFns; export declare const RelationshipDeleteRequest: MessageFns; export declare const RelationshipDeleteResponse: MessageFns; export declare const BundleRunRequest: MessageFns; export declare const BundleRunRequest_ArgumentsEntry: MessageFns; export declare const BundleRunResponse: MessageFns; export declare const BundleWriteRequest: MessageFns; export declare const BundleWriteResponse: MessageFns; export declare const BundleReadRequest: MessageFns; export declare const BundleReadResponse: MessageFns; export declare const BundleDeleteRequest: MessageFns; export declare const BundleDeleteResponse: MessageFns; export declare const TenantCreateRequest: MessageFns; export declare const TenantCreateResponse: MessageFns; export declare const TenantDeleteRequest: MessageFns; export declare const TenantDeleteResponse: MessageFns; export declare const TenantListRequest: MessageFns; export declare const TenantListResponse: MessageFns; /** * * PERMISSION SERVICE ** * Permission service contains methods to interact with permissions. */ export type PermissionDefinition = typeof PermissionDefinition; export declare const PermissionDefinition: { readonly name: "Permission"; readonly fullName: "base.v1.Permission"; readonly methods: { /** * Check method receives a PermissionCheckRequest and returns a PermissionCheckResponse. * It is used to determine whether a specific user has permission to perform an action on a resource. * For example, "Can the user 1 push to repository 1?" */ readonly check: { readonly name: "Check"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** * BulkCheck method receives a PermissionBulkCheckRequest containing multiple check requests * and returns a PermissionBulkCheckResponse with results for each request. * Maximum 100 requests can be processed in a single bulk operation. */ readonly bulkCheck: { readonly name: "BulkCheck"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** * Expand method receives a PermissionExpandRequest and returns a PermissionExpandResponse. * It expands relationships according to the schema provided. */ readonly expand: { readonly name: "Expand"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** * LookupEntity method receives a PermissionLookupEntityRequest and returns a PermissionLookupEntityResponse. * It is used to retrieve an entity by its identifier. */ readonly lookupEntity: { readonly name: "LookupEntity"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** * LookupEntityStream method receives a PermissionLookupEntityRequest and streams a series of PermissionLookupEntityStreamResponse messages. * It is used to retrieve entities by their identifiers in a streaming fashion. */ readonly lookupEntityStream: { readonly name: "LookupEntityStream"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: true; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** * LookupSubject method receives a PermissionLookupSubjectRequest and returns a PermissionLookupSubjectResponse. * It is used to retrieve a subject by its identifier. */ readonly lookupSubject: { readonly name: "LookupSubject"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** * SubjectPermission method receives a PermissionSubjectPermissionRequest and returns a PermissionSubjectPermissionResponse. * It is used to retrieve permissions related to a specific subject. */ readonly subjectPermission: { readonly name: "SubjectPermission"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; }; }; export interface PermissionServiceImplementation { /** * Check method receives a PermissionCheckRequest and returns a PermissionCheckResponse. * It is used to determine whether a specific user has permission to perform an action on a resource. * For example, "Can the user 1 push to repository 1?" */ check(request: PermissionCheckRequest, context: CallContext & CallContextExt): Promise>; /** * BulkCheck method receives a PermissionBulkCheckRequest containing multiple check requests * and returns a PermissionBulkCheckResponse with results for each request. * Maximum 100 requests can be processed in a single bulk operation. */ bulkCheck(request: PermissionBulkCheckRequest, context: CallContext & CallContextExt): Promise>; /** * Expand method receives a PermissionExpandRequest and returns a PermissionExpandResponse. * It expands relationships according to the schema provided. */ expand(request: PermissionExpandRequest, context: CallContext & CallContextExt): Promise>; /** * LookupEntity method receives a PermissionLookupEntityRequest and returns a PermissionLookupEntityResponse. * It is used to retrieve an entity by its identifier. */ lookupEntity(request: PermissionLookupEntityRequest, context: CallContext & CallContextExt): Promise>; /** * LookupEntityStream method receives a PermissionLookupEntityRequest and streams a series of PermissionLookupEntityStreamResponse messages. * It is used to retrieve entities by their identifiers in a streaming fashion. */ lookupEntityStream(request: PermissionLookupEntityRequest, context: CallContext & CallContextExt): ServerStreamingMethodResult>; /** * LookupSubject method receives a PermissionLookupSubjectRequest and returns a PermissionLookupSubjectResponse. * It is used to retrieve a subject by its identifier. */ lookupSubject(request: PermissionLookupSubjectRequest, context: CallContext & CallContextExt): Promise>; /** * SubjectPermission method receives a PermissionSubjectPermissionRequest and returns a PermissionSubjectPermissionResponse. * It is used to retrieve permissions related to a specific subject. */ subjectPermission(request: PermissionSubjectPermissionRequest, context: CallContext & CallContextExt): Promise>; } export interface PermissionClient { /** * Check method receives a PermissionCheckRequest and returns a PermissionCheckResponse. * It is used to determine whether a specific user has permission to perform an action on a resource. * For example, "Can the user 1 push to repository 1?" */ check(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * BulkCheck method receives a PermissionBulkCheckRequest containing multiple check requests * and returns a PermissionBulkCheckResponse with results for each request. * Maximum 100 requests can be processed in a single bulk operation. */ bulkCheck(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * Expand method receives a PermissionExpandRequest and returns a PermissionExpandResponse. * It expands relationships according to the schema provided. */ expand(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * LookupEntity method receives a PermissionLookupEntityRequest and returns a PermissionLookupEntityResponse. * It is used to retrieve an entity by its identifier. */ lookupEntity(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * LookupEntityStream method receives a PermissionLookupEntityRequest and streams a series of PermissionLookupEntityStreamResponse messages. * It is used to retrieve entities by their identifiers in a streaming fashion. */ lookupEntityStream(request: DeepPartial, options?: CallOptions & CallOptionsExt): AsyncIterable; /** * LookupSubject method receives a PermissionLookupSubjectRequest and returns a PermissionLookupSubjectResponse. * It is used to retrieve a subject by its identifier. */ lookupSubject(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * SubjectPermission method receives a PermissionSubjectPermissionRequest and returns a PermissionSubjectPermissionResponse. * It is used to retrieve permissions related to a specific subject. */ subjectPermission(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; } /** * Watch is the main RPC in the Watch service. It establishes a stream between * the client and the server. The server pushes data changes into this stream * and the client can read those in real time. */ export type WatchDefinition = typeof WatchDefinition; export declare const WatchDefinition: { readonly name: "Watch"; readonly fullName: "base.v1.Watch"; readonly methods: { readonly watch: { readonly name: "Watch"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: true; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; }; }; export interface WatchServiceImplementation { watch(request: WatchRequest, context: CallContext & CallContextExt): ServerStreamingMethodResult>; } export interface WatchClient { watch(request: DeepPartial, options?: CallOptions & CallOptionsExt): AsyncIterable; } /** The Schema service definition. */ export type SchemaDefinition = typeof SchemaDefinition; export declare const SchemaDefinition: { readonly name: "Schema"; readonly fullName: "base.v1.Schema"; readonly methods: { /** Write is an RPC that allows you to write your authorization model. */ readonly write: { readonly name: "Write"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** PartialWrite is an RPC that allows you to partially update an existing authorization model. */ readonly partialWrite: { readonly name: "PartialWrite"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** Read is an RPC that allows you to read your authorization model. */ readonly read: { readonly name: "Read"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** List is an RPC that allows you to list all authorization models. */ readonly list: { readonly name: "List"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; }; }; export interface SchemaServiceImplementation { /** Write is an RPC that allows you to write your authorization model. */ write(request: SchemaWriteRequest, context: CallContext & CallContextExt): Promise>; /** PartialWrite is an RPC that allows you to partially update an existing authorization model. */ partialWrite(request: SchemaPartialWriteRequest, context: CallContext & CallContextExt): Promise>; /** Read is an RPC that allows you to read your authorization model. */ read(request: SchemaReadRequest, context: CallContext & CallContextExt): Promise>; /** List is an RPC that allows you to list all authorization models. */ list(request: SchemaListRequest, context: CallContext & CallContextExt): Promise>; } export interface SchemaClient { /** Write is an RPC that allows you to write your authorization model. */ write(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** PartialWrite is an RPC that allows you to partially update an existing authorization model. */ partialWrite(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** Read is an RPC that allows you to read your authorization model. */ read(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** List is an RPC that allows you to list all authorization models. */ list(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; } /** The Data service provides RPC methods for managing data in the context of relationships and attributes. */ export type DataDefinition = typeof DataDefinition; export declare const DataDefinition: { readonly name: "Data"; readonly fullName: "base.v1.Data"; readonly methods: { /** The Write RPC method creates a new relation tuple. */ readonly write: { readonly name: "Write"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** RPC method to write relationships for a tenant. This can be accessed via a POST request to the given HTTP path. It's tagged under "Data" in OpenAPI documentation. */ readonly writeRelationships: { readonly name: "WriteRelationships"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** The ReadRelationships RPC method reads relation tuple(s). */ readonly readRelationships: { readonly name: "ReadRelationships"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** The ReadAttributes RPC method reads attribute(s) of a relation. */ readonly readAttributes: { readonly name: "ReadAttributes"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** The Delete RPC method deletes a relation tuple. */ readonly delete: { readonly name: "Delete"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** RPC method to delete relationships for a tenant, accessed via a POST request to the specified path, tagged as "Data" in OpenAPI documentation. */ readonly deleteRelationships: { readonly name: "DeleteRelationships"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** Executes or runs a specific bundle. This method is useful for processing or triggering actions based on the bundle's data. */ readonly runBundle: { readonly name: "RunBundle"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; }; }; export interface DataServiceImplementation { /** The Write RPC method creates a new relation tuple. */ write(request: DataWriteRequest, context: CallContext & CallContextExt): Promise>; /** RPC method to write relationships for a tenant. This can be accessed via a POST request to the given HTTP path. It's tagged under "Data" in OpenAPI documentation. */ writeRelationships(request: RelationshipWriteRequest, context: CallContext & CallContextExt): Promise>; /** The ReadRelationships RPC method reads relation tuple(s). */ readRelationships(request: RelationshipReadRequest, context: CallContext & CallContextExt): Promise>; /** The ReadAttributes RPC method reads attribute(s) of a relation. */ readAttributes(request: AttributeReadRequest, context: CallContext & CallContextExt): Promise>; /** The Delete RPC method deletes a relation tuple. */ delete(request: DataDeleteRequest, context: CallContext & CallContextExt): Promise>; /** RPC method to delete relationships for a tenant, accessed via a POST request to the specified path, tagged as "Data" in OpenAPI documentation. */ deleteRelationships(request: RelationshipDeleteRequest, context: CallContext & CallContextExt): Promise>; /** Executes or runs a specific bundle. This method is useful for processing or triggering actions based on the bundle's data. */ runBundle(request: BundleRunRequest, context: CallContext & CallContextExt): Promise>; } export interface DataClient { /** The Write RPC method creates a new relation tuple. */ write(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** RPC method to write relationships for a tenant. This can be accessed via a POST request to the given HTTP path. It's tagged under "Data" in OpenAPI documentation. */ writeRelationships(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** The ReadRelationships RPC method reads relation tuple(s). */ readRelationships(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** The ReadAttributes RPC method reads attribute(s) of a relation. */ readAttributes(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** The Delete RPC method deletes a relation tuple. */ delete(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** RPC method to delete relationships for a tenant, accessed via a POST request to the specified path, tagged as "Data" in OpenAPI documentation. */ deleteRelationships(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** Executes or runs a specific bundle. This method is useful for processing or triggering actions based on the bundle's data. */ runBundle(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; } export type BundleDefinition = typeof BundleDefinition; export declare const BundleDefinition: { readonly name: "Bundle"; readonly fullName: "base.v1.Bundle"; readonly methods: { /** Writes a bundle of data for a specific operation. This is a general purpose method to handle writing data bundles. */ readonly write: { readonly name: "Write"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** Reads a data bundle based on a specified request. This method is tailored for retrieving data bundles. */ readonly read: { readonly name: "Read"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** Deletes a specific data bundle. This method is used to remove existing bundles from the system. */ readonly delete: { readonly name: "Delete"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; }; }; export interface BundleServiceImplementation { /** Writes a bundle of data for a specific operation. This is a general purpose method to handle writing data bundles. */ write(request: BundleWriteRequest, context: CallContext & CallContextExt): Promise>; /** Reads a data bundle based on a specified request. This method is tailored for retrieving data bundles. */ read(request: BundleReadRequest, context: CallContext & CallContextExt): Promise>; /** Deletes a specific data bundle. This method is used to remove existing bundles from the system. */ delete(request: BundleDeleteRequest, context: CallContext & CallContextExt): Promise>; } export interface BundleClient { /** Writes a bundle of data for a specific operation. This is a general purpose method to handle writing data bundles. */ write(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** Reads a data bundle based on a specified request. This method is tailored for retrieving data bundles. */ read(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** Deletes a specific data bundle. This method is used to remove existing bundles from the system. */ delete(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; } export type TenancyDefinition = typeof TenancyDefinition; export declare const TenancyDefinition: { readonly name: "Tenancy"; readonly fullName: "base.v1.Tenancy"; readonly methods: { /** * Create is a unary RPC to create a new tenant. * It requires a TenantCreateRequest and returns a TenantCreateResponse. */ readonly create: { readonly name: "Create"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** * Delete is a unary RPC to delete an existing tenant. * It requires a TenantDeleteRequest and returns a TenantDeleteResponse. */ readonly delete: { readonly name: "Delete"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; /** * List is a unary RPC to get a list of all tenants. * It requires a TenantListRequest and returns a TenantListResponse. */ readonly list: { readonly name: "List"; readonly requestType: MessageFns; readonly requestStream: false; readonly responseType: MessageFns; readonly responseStream: false; readonly options: { readonly _unknownFields: { readonly 8338: readonly [Buffer]; readonly 578365826: readonly [Buffer]; }; }; }; }; }; export interface TenancyServiceImplementation { /** * Create is a unary RPC to create a new tenant. * It requires a TenantCreateRequest and returns a TenantCreateResponse. */ create(request: TenantCreateRequest, context: CallContext & CallContextExt): Promise>; /** * Delete is a unary RPC to delete an existing tenant. * It requires a TenantDeleteRequest and returns a TenantDeleteResponse. */ delete(request: TenantDeleteRequest, context: CallContext & CallContextExt): Promise>; /** * List is a unary RPC to get a list of all tenants. * It requires a TenantListRequest and returns a TenantListResponse. */ list(request: TenantListRequest, context: CallContext & CallContextExt): Promise>; } export interface TenancyClient { /** * Create is a unary RPC to create a new tenant. * It requires a TenantCreateRequest and returns a TenantCreateResponse. */ create(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * Delete is a unary RPC to delete an existing tenant. * It requires a TenantDeleteRequest and returns a TenantDeleteResponse. */ delete(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; /** * List is a unary RPC to get a list of all tenants. * It requires a TenantListRequest and returns a TenantListResponse. */ list(request: DeepPartial, options?: CallOptions & CallOptionsExt): Promise; } type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends { $case: string; } ? { [K in keyof Omit]?: DeepPartial; } & { $case: T["$case"]; } : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; export type ServerStreamingMethodResult = { [Symbol.asyncIterator](): AsyncIterator; }; export interface MessageFns { encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create(base?: DeepPartial): T; fromPartial(object: DeepPartial): T; } export {};