import { Attribute as AttributeProto, AttributeType as AttributeTypeProto, Entity as EntityProto, EntityType as EntityTypeProto, Relation as RelationProto, RelationRolePlayer, RelationType as RelationTypeProto, RoleType as RoleTypeProto, RoleType, Thing as ThingProto, ThingType as ThingTypeProto, TypeAnnotation, TypeTransitivity, Value as ValueProto, ValueType } from "typedb-protocol/proto/concept"; import { LogicManagerReq, RuleReq } from "typedb-protocol/proto/logic"; import { Options } from "typedb-protocol/proto/options"; import { Label } from "../Label"; import { UserManagerAllReq, UserManagerContainsReq, UserManagerCreateReq, UserManagerDeleteReq, UserManagerGetReq, UserManagerPasswordSetReq, UserPasswordUpdateReq, UserTokenReq } from "typedb-protocol/proto/user"; import { DatabaseDeleteReq, DatabaseManagerAllReq, DatabaseManagerContainsReq, DatabaseManagerCreateReq, DatabaseManagerGetReq, DatabaseRuleSchemaReq, DatabaseSchemaReq, DatabaseTypeSchemaReq } from "typedb-protocol/proto/database"; import { TransactionClient, TransactionReq, TransactionType } from "typedb-protocol/proto/transaction"; import { ServerManagerAllReq } from "typedb-protocol/proto/server"; import { ConnectionOpenReq } from "typedb-protocol/proto/connection"; import { SessionCloseReq, SessionOpenReq, SessionPulseReq, SessionType } from "typedb-protocol/proto/session"; export declare namespace RequestBuilder { namespace DatabaseManager { function getReq(name: string): DatabaseManagerGetReq; function createReq(name: string): DatabaseManagerCreateReq; function containsReq(name: string): DatabaseManagerContainsReq; function allReq(): DatabaseManagerAllReq; } namespace Database { function schemaReq(name: string): DatabaseSchemaReq; function typeSchemaReq(name: string): DatabaseTypeSchemaReq; function ruleSchemaReq(name: string): DatabaseRuleSchemaReq; function deleteReq(name: string): DatabaseDeleteReq; } namespace ServerManager { function allReq(): ServerManagerAllReq; } namespace UserManager { function containsReq(name: string): UserManagerContainsReq; function createReq(name: string, password: string): UserManagerCreateReq; function deleteReq(name: string): UserManagerDeleteReq; function allReq(): UserManagerAllReq; function passwordSetReq(name: string, password: string): UserManagerPasswordSetReq; function getReq(name: string): UserManagerGetReq; } namespace User { function passwordUpdateReq(name: string, passwordOld: string, passwordNew: string): UserPasswordUpdateReq; function tokenReq(username: string): UserTokenReq; } namespace Connection { function openReq(): ConnectionOpenReq; } namespace Session { function openReq(database: string, type: SessionType, options: Options): SessionOpenReq; function closeReq(id: string): SessionCloseReq; function pulseReq(id: string): SessionPulseReq; } namespace Transaction { function clientReq(reqs: TransactionReq[]): TransactionClient; function openReq(sessionId: string, type: TransactionType, options: Options, latencyMillis: number): TransactionReq; function commitReq(): TransactionReq; function rollbackReq(): TransactionReq; function streamReq(requestId: string): TransactionReq; } namespace LogicManager { function logicManagerReq(logicReq: LogicManagerReq): TransactionReq; function putRuleReq(label: string, when: string, then: string): TransactionReq; function getRuleReq(label: string): TransactionReq; function getRulesReq(): TransactionReq; } namespace Rule { function ruleReq(request: RuleReq): TransactionReq; function setLabelReq(currentLabel: string, newLabel: string): TransactionReq; function deleteReq(label: string): TransactionReq; } namespace QueryManager { function defineReq(query: string, options: Options): TransactionReq; function undefineReq(query: string, options: Options): TransactionReq; function getReq(query: string, options: Options): TransactionReq; function getAggregateReq(query: string, options: Options): TransactionReq; function getGroupReq(query: string, options: Options): TransactionReq; function getGroupAggregateReq(query: string, options: Options): TransactionReq; function fetchReq(query: string, options: Options): TransactionReq; function insertReq(query: string, options: Options): TransactionReq; function deleteReq(query: string, options: Options): TransactionReq; function updateReq(query: string, options: Options): TransactionReq; function explainReq(id: number, options: Options): TransactionReq; } namespace ConceptManager { function putEntityTypeReq(label: string): TransactionReq; function putRelationTypeReq(label: string): TransactionReq; function putAttributeTypeReq(label: string, valueType: ValueType): TransactionReq; function getEntityTypeReq(label: string): TransactionReq; function getRelationTypeReq(label: string): TransactionReq; function getAttributeTypeReq(label: string): TransactionReq; function getEntityReq(iid: string): TransactionReq; function getRelationReq(iid: string): TransactionReq; function getAttributeReq(iid: string): TransactionReq; function getSchemaExceptions(): TransactionReq; } namespace Type { namespace RoleType { function protoRoleType(label: Label): RoleTypeProto; function deleteReq(label: Label): TransactionReq; function setLabelReq(label: Label, newLabel: string): TransactionReq; function getSupertypeReq(label: Label): TransactionReq; function getSupertypesReq(label: Label): TransactionReq; function getSubtypesReq(label: Label, transitivity: TypeTransitivity): TransactionReq; function getRelationTypesReq(label: Label): TransactionReq; function getPlayerTypesReq(label: Label, transitivity: TypeTransitivity): TransactionReq; function getRelationInstancesReq(label: Label, transitivity: TypeTransitivity): TransactionReq; function getPlayerInstancesReq(label: Label, transitivity: TypeTransitivity): TransactionReq; } namespace ThingType { function protoThingTypeEntityType(label: Label): ThingTypeProto; function protoThingTypeRelationType(label: Label): ThingTypeProto; function protoThingTypeAttributeType(label: Label): ThingTypeProto; function deleteReq(label: Label): TransactionReq; function setLabelReq(label: Label, newLabel: string): TransactionReq; function setAbstractReq(label: Label): TransactionReq; function unsetAbstractReq(label: Label): TransactionReq; function getOwnsReq(label: Label, value_type: ValueType, annotations: TypeAnnotation[], transitivity: TypeTransitivity): TransactionReq; function getOwnsOverriddenReq(label: Label, attributeType: AttributeTypeProto): TransactionReq; function setOwnsReq(label: Label, attributeType: AttributeTypeProto, overriddenType: AttributeTypeProto | null, annotations: TypeAnnotation[]): TransactionReq; function unsetOwnsReq(label: Label, attributeType: AttributeTypeProto): TransactionReq; function getPlaysReq(label: Label, transitivity: TypeTransitivity): TransactionReq; function getPlaysOverriddenReq(label: Label, roleType: RoleTypeProto): TransactionReq; function setPlaysReq(label: Label, roleType: RoleTypeProto, overriddenType?: RoleTypeProto): TransactionReq; function unsetPlaysReq(label: Label, roleType: RoleTypeProto): TransactionReq; function getSyntaxReq(label: Label): TransactionReq; } namespace EntityType { function protoEntityType(label: Label): EntityTypeProto; function createReq(label: Label): TransactionReq; function getSupertypeReq(label: Label): TransactionReq; function setSupertypeReq(label: Label, supertype: EntityTypeProto): TransactionReq; function getSupertypesReq(label: Label): TransactionReq; function getSubtypesReq(label: Label, transitivity: TypeTransitivity): TransactionReq; function getInstancesReq(label: Label, transitivity: TypeTransitivity): TransactionReq; } namespace RelationType { function protoRelationType(label: Label): RelationTypeProto; function createReq(label: Label): TransactionReq; function getSupertypeReq(label: Label): TransactionReq; function setSupertypeReq(label: Label, supertype: RelationTypeProto): TransactionReq; function getSupertypesReq(label: Label): TransactionReq; function getSubtypesReq(label: Label, transitivity: TypeTransitivity): TransactionReq; function getInstancesReq(label: Label, transitivity: TypeTransitivity): TransactionReq; function getRelatesReq(label: Label, transitivity: TypeTransitivity): TransactionReq; function getRelatesForRoleLabel(label: Label, roleLabel: string): TransactionReq; function getRelatesOverriddenReq(label: Label, roleLabel: string): TransactionReq; function setRelatesReq(label: Label, roleLabel: string, overriddenLabel?: string): TransactionReq; function unsetRelatesReq(label: Label, roleLabel: string): TransactionReq; } namespace AttributeType { function protoAttributeType(label: Label): AttributeTypeProto; function putReq(label: Label, value: ValueProto): TransactionReq; function getReq(label: Label, value: ValueProto): TransactionReq; function getSupertypeReq(label: Label): TransactionReq; function setSupertypeReq(label: Label, supertype: AttributeTypeProto): TransactionReq; function getSupertypesReq(label: Label): TransactionReq; function getSubtypesReq(label: Label, transitivity: TypeTransitivity, valueType?: ValueType): TransactionReq; function getInstancesReq(label: Label, transitivity: TypeTransitivity): TransactionReq; function getRegexReq(label: Label): TransactionReq; function setRegexReq(label: Label, regex: string): TransactionReq; function getOwnersReq(label: Label, transitivity: TypeTransitivity, annotations: TypeAnnotation[]): TransactionReq; } namespace Annotation { function annotationKey(): TypeAnnotation; function annotationUnique(): TypeAnnotation; } } namespace Thing { function protoThingEntity(iid: string): ThingProto; function protoThingRelation(iid: string): ThingProto; function protoThingAttribute(iid: string): ThingProto; function getHasReq(iid: string, attributeTypes: AttributeTypeProto[], annotations: TypeAnnotation[]): TransactionReq; function setHasReq(iid: string, attribute: AttributeProto): TransactionReq; function unsetHasReq(iid: string, attribute: AttributeProto): TransactionReq; function getPlayingReq(iid: string): TransactionReq; function getRelationsReq(iid: string, roleTypes: RoleType[]): TransactionReq; function deleteReq(iid: string): TransactionReq; namespace Entity { function protoEntity(iid: string): EntityProto; } namespace Relation { function protoRelation(iid: string): RelationProto; function protoRolePlayer(roleType: RoleType, player: ThingProto): RelationRolePlayer; function addRolePlayerReq(iid: string, roleType: RoleType, player: ThingProto): TransactionReq; function removeRolePlayerReq(iid: string, roleType: RoleType, player: ThingProto): TransactionReq; function getPlayersByRoleTypeReq(iid: string, roleTypes: RoleType[]): TransactionReq; function getRolePlayersReq(iid: string): TransactionReq; function getRelatingReq(iid: string): TransactionReq; } namespace Attribute { function protoAttribute(iid: string): AttributeProto; function getOwnersReq(iid: string, ownerType?: ThingTypeProto): TransactionReq; } } namespace Value { function protoValue(valueType: ValueType, value: boolean | string | number | Date): ValueProto; } }