import { z } from 'zod';
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
import { Client } from '@urql/core';
import { Observable } from 'rxjs';
import TypedEmitter from 'typed-emitter';

declare type Maybe<T> = T | null;
declare type InputMaybe<T> = Maybe<T>;
declare type Exact<T extends {
    [key: string]: unknown;
}> = {
    [K in keyof T]: T[K];
};
declare type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
    [SubKey in K]?: Maybe<T[SubKey]>;
};
declare type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
    [SubKey in K]: Maybe<T[SubKey]>;
};
/** All built-in and custom scalars, mapped to their actual values */
declare type Scalars = {
    ID: string;
    String: string;
    Boolean: boolean;
    Int: number;
    Float: number;
    Cursor: any;
    /** DateTime is an int64 Date + Time value given in Epoch with ns precision. */
    DateTime: any;
};
declare type Actor = Participant | Service | User;
/** AddGroupInput creates a new Group. */
declare type AddGroupInput = {
    /** participantIDs are the IDs of the Participants to link with the Group. */
    participantIDs: Array<Scalars["ID"]>;
};
/** AddGroupPayload is the return payload for the addGroup mutation. */
declare type AddGroupPayload = {
    __typename: "AddGroupPayload";
    /** group that the participant is added to. */
    group: Group;
};
/** AddParticipantInput finds or creates a Participant by Unique Identifier. */
declare type AddParticipantInput = {
    /**
     * identifier is the unique identifier for the Pariticipant. The identifier
     * is how a participant "logs into" the system.
     */
    identifier: Scalars["ID"];
};
/** AddParticipantPayload is the return payload for the addParticipant mutation. */
declare type AddParticipantPayload = {
    __typename: "AddParticipantPayload";
    /** participant is the created Participants. */
    participant: Participant;
    /** sessionToken is the session token to be used for authenticated requets. */
    sessionToken: Scalars["String"];
};
/** AddScopeInput creates a new Scope. */
declare type AddScopeInput = {
    /** attributes to be attached to the Scope at creation. */
    attributes?: InputMaybe<Array<SetAttributeInput>>;
    /** kind is an optional type name. */
    kind?: InputMaybe<Scalars["String"]>;
    /**
     * name is the *unique* name of the Scope. If a scope with the same name already
     * exists, it will return an "already exists" error.
     */
    name?: InputMaybe<Scalars["String"]>;
};
/** AddScopePayload is the return payload for the addScope mutation. */
declare type AddScopePayload = {
    __typename: "AddScopePayload";
    /** scope that the participant is added to. */
    scope: Scope;
};
/** AddStepInput creates a new Step. */
declare type AddStepInput = {
    /** duration is the duration in seconds of the Step should last before ending. */
    duration: Scalars["Int"];
};
/** AddStepPayload is the return payload for the addStep mutation. */
declare type AddStepPayload = {
    __typename: "AddStepPayload";
    /** step that the participant is added to. */
    step: Step;
};
declare type Admin = Service | User;
/**
 * Attribute is a single piece of custom data set on a Node. Attributes
 * with the same key can be grouped into an array through the use of a unique
 * index field within that key's scope.
 */
declare type Attribute = Node & {
    __typename: "Attribute";
    /** createdAt is the time of creation of the record. */
    createdAt: Scalars["DateTime"];
    /** createdBy is the Actor that created the record. */
    createdBy: Actor;
    /** current is true if the Attribute is the current version of the value for key. */
    current: Scalars["Boolean"];
    /**
     * deletedAt is the time when the Attribute was deleted. If null, the Attribute
     * was not deleted.
     */
    deletedAt?: Maybe<Scalars["DateTime"]>;
    /**
     * ephemeral indicates the Attribute should not be persisted. Ephemeral
     * Attributes are not stored in the database and are only synced to the
     * connected clients. An ephemeral Attribute cannot become non-ephemeral and vice
     * versa.
     */
    ephemeral: Scalars["Boolean"];
    /** id is the unique globally identifier for the record. */
    id: Scalars["ID"];
    /**
     * immutable indicates the Attribute can never be changed by any Actor.
     * immutable must be set on the Attribute at creation.
     */
    immutable: Scalars["Boolean"];
    /** index of the Attribute if the value is a vector. */
    index?: Maybe<Scalars["Int"]>;
    /** key identifies the unique key of the Attribute. */
    key: Scalars["String"];
    /** Object associated with Attribute. */
    node: Node;
    /**
     * private indicates whether the Attribute shouldn't be visible to Participants
     * in the scope.
     * private must be set on the Attribute at creation.
     */
    private: Scalars["Boolean"];
    /**
     * protected indicates the Attribute cannot be modified by other Participants. A
     * Participant can only set protected Records on their Participant record.
     * Users and Services can update protected Attributes.
     * protected must be set on the Attribute at creation.
     */
    protected: Scalars["Boolean"];
    /**
     * val is the value of the Attribute. If val is not returned, it is considered to
     * be explicitely `null`.
     */
    val?: Maybe<Scalars["String"]>;
    /** vector returns true if the value is a vector. */
    vector: Scalars["Boolean"];
    /** version is the version number of this Attribute, starting at 1. */
    version: Scalars["Int"];
    /** versions returns previous versions for the Attribute. */
    versions?: Maybe<AttributeConnection>;
};
/**
 * Attribute is a single piece of custom data set on a Node. Attributes
 * with the same key can be grouped into an array through the use of a unique
 * index field within that key's scope.
 */
declare type AttributeVersionsArgs = {
    after?: InputMaybe<Scalars["Cursor"]>;
    before?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<Scalars["Int"]>;
    last?: InputMaybe<Scalars["Int"]>;
};
declare type AttributeChange = {
    __typename: "AttributeChange";
    /** createdAt is the time the Attribute was created. */
    createdAt: Scalars["DateTime"];
    /** deleted is true with the attribute was deleted. */
    deleted: Scalars["Boolean"];
    /** id is the identifier for the Attribute. */
    id: Scalars["ID"];
    /** index is the index of the attribute if the value is a vector. */
    index?: Maybe<Scalars["Int"]>;
    /** isNew is true if the Attribute was just created. */
    isNew: Scalars["Boolean"];
    /** key is the attribute key being updated. */
    key: Scalars["String"];
    /** nodeID is the identifier for the Attribute's Node. */
    nodeID: Scalars["ID"];
    /** value is the value of the updated attribute. */
    val?: Maybe<Scalars["String"]>;
    /** vector indicates whether the value is a vector. */
    vector: Scalars["Boolean"];
    /** version is the version number of this Attribute, starting at 1. */
    version: Scalars["Int"];
};
declare type AttributeConnection = {
    __typename: "AttributeConnection";
    edges: Array<AttributeEdge>;
    pageInfo: PageInfo;
    totalCount: Scalars["Int"];
};
declare type AttributeEdge = {
    __typename: "AttributeEdge";
    cursor: Scalars["Cursor"];
    node: Attribute;
};
declare type Change = AttributeChange | ParticipantChange | ScopeChange | StepChange;
declare type ChangePayload = {
    __typename: "ChangePayload";
    /** change is the Change. */
    change?: Maybe<Change>;
    /** done indicates that the state has finished synchorizing. */
    done: Scalars["Boolean"];
    /** removed indicates whether the record was removed. */
    removed?: Maybe<Scalars["Boolean"]>;
};
/** EventType holds types of event that can trigger hooks. */
declare enum EventType {
    /** An attribute was added or updated. */
    AttributeUpdate = "ATTRIBUTE_UPDATE",
    /** A group was added. */
    GroupAdd = "GROUP_ADD",
    /** A link was added. */
    LinkAdd = "LINK_ADD",
    /** A participant was added. */
    ParticipantAdd = "PARTICIPANT_ADD",
    /** A participant connected. */
    ParticipantConnect = "PARTICIPANT_CONNECT",
    /**
     * Participant was already connected when this subscription started. This is a
     * special event that allows the listener to catch up on the currently connected
     * players at the beginning of the subscription.
     */
    ParticipantConnected = "PARTICIPANT_CONNECTED",
    /** A participant disconnected. */
    ParticipantDisconnect = "PARTICIPANT_DISCONNECT",
    /** A scope was added. */
    ScopeAdd = "SCOPE_ADD",
    /** A step was added. */
    StepAdd = "STEP_ADD",
    /** A transition was added. */
    TransitionAdd = "TRANSITION_ADD"
}
declare type Group = Node & {
    __typename: "Group";
    /** createdAt is the time of creation of the record. */
    createdAt: Scalars["DateTime"];
    /** createdBy returns the Actor that created the record. */
    createdBy: Actor;
    /** id is the unique globally identifier for the record. */
    id: Scalars["ID"];
    /** links returns Participant linking and unlinking with this Node. */
    links?: Maybe<LinkConnection>;
};
declare type GroupLinksArgs = {
    after?: InputMaybe<Scalars["Cursor"]>;
    before?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<Scalars["Int"]>;
    last?: InputMaybe<Scalars["Int"]>;
};
declare type GroupConnection = {
    __typename: "GroupConnection";
    edges: Array<GroupEdge>;
    pageInfo: PageInfo;
    totalCount: Scalars["Int"];
};
declare type GroupEdge = {
    __typename: "GroupEdge";
    cursor: Scalars["Cursor"];
    node: Group;
};
declare type Kv = {
    key: Scalars["String"];
    val: Scalars["String"];
};
/** Link records a Participant linking or unlinking with a Node. */
declare type Link = Node & {
    __typename: "Link";
    /** createdAt is the time of creation of the record. */
    createdAt: Scalars["DateTime"];
    /** createdBy is the Actor that created the record. */
    createdBy: Actor;
    /** id is the unique globally identifier for the record. */
    id: Scalars["ID"];
    /** link indicates whether the Participant was linked or unlinked with the Node. */
    link: Scalars["Boolean"];
    /** node the Participant is assigned to. */
    node: Node;
    /** participant that is assigned to  */
    participant: Participant;
};
declare type LinkConnection = {
    __typename: "LinkConnection";
    edges: Array<LinkEdge>;
    pageInfo: PageInfo;
    totalCount: Scalars["Int"];
};
declare type LinkEdge = {
    __typename: "LinkEdge";
    cursor: Scalars["Cursor"];
    node: Link;
};
/** LinkInput links or unlinks Participants with a Node. */
declare type LinkInput = {
    /**
     * link indicates whether the Participant was linked or unlinked with the Node.
     * WARNING: UNLINKING NOT CURRENTLY SUPPORTED, link must be true.
     */
    link: Scalars["Boolean"];
    /** nodeIDs are the IDs of the Nodes that the Participants should be added to. */
    nodeIDs: Array<Scalars["ID"]>;
    /**
     * participantIDs are the IDs of the Participants that should be added to the
     * Nodes.
     */
    participantIDs: Array<Scalars["ID"]>;
};
/**
 * LinkPayload is the return payload for the assignParticipants
 * mutation.
 */
declare type LinkPayload = {
    __typename: "LinkPayload";
    /** nodes the participants are added to. */
    nodes: Array<Node>;
    /** participants that are added to the Node. */
    participants: Array<Participant>;
};
/** LoginInput is the input for login() */
declare type LoginInput = {
    /** password of the user. */
    password: Scalars["String"];
    /** username is the user identifier string. */
    username: Scalars["String"];
};
/** LoginPayload is returned by login() */
declare type LoginPayload = {
    __typename: "LoginPayload";
    /** sessionToken is the session token to be used for authenticated requets. */
    sessionToken: Scalars["String"];
    /** user is the logged in User. */
    user: User;
};
declare type Mutation = {
    __typename: "Mutation";
    /** addGroups creates new Groups. */
    addGroups: Array<AddGroupPayload>;
    /** addParticipant finds or creates a Participant by Unique Identifier. */
    addParticipant: AddParticipantPayload;
    /** addScopes creates a new Scope. */
    addScopes: Array<AddScopePayload>;
    /** addSteps creates new Steps. */
    addSteps: Array<AddStepPayload>;
    /** link links or unlinks Participants to Nodes. */
    link: LinkPayload;
    /** login signs in a user. */
    login: LoginPayload;
    /** registerService registers a new Service. */
    registerService: RegisterServicePayload;
    /**
     * Create or update an Attribute on a Node. If the Attribute exists and the value
     * is the same, the Attribute is not updated and the attribute will not be
     * returned in the response.
     */
    setAttributes: Array<SetAttributePayload>;
    /**
     * login signs in a user with a PASETO Token. This can create a
     * new user if the user ID does not exist.
     */
    tokenLogin: LoginPayload;
    /** transition transition a Node from a state to another state. */
    transition: TransitionPayload;
};
declare type MutationAddGroupsArgs = {
    input: Array<AddGroupInput>;
};
declare type MutationAddParticipantArgs = {
    input: AddParticipantInput;
};
declare type MutationAddScopesArgs = {
    input: Array<AddScopeInput>;
};
declare type MutationAddStepsArgs = {
    input: Array<AddStepInput>;
};
declare type MutationLinkArgs = {
    input: LinkInput;
};
declare type MutationLoginArgs = {
    input: LoginInput;
};
declare type MutationRegisterServiceArgs = {
    input: RegisterServiceInput;
};
declare type MutationSetAttributesArgs = {
    input: Array<SetAttributeInput>;
};
declare type MutationTokenLoginArgs = {
    input: TokenLoginInput;
};
declare type MutationTransitionArgs = {
    input: TransitionInput;
};
/** Node is an interface allowing simple querying of any node */
declare type Node = {
    /** id is the unique globally identifier for the record. */
    id: Scalars["ID"];
};
/** OnAnyEventInput is the input for the onAnyEvent subscription. */
declare type OnAnyEventInput = {
    /** nodeID is an optional node ID of the node to listen to. */
    nodeID?: InputMaybe<Scalars["ID"]>;
};
/** OnEventInput is the input for the onEvent subscription. */
declare type OnEventInput = {
    /** eventsTypes speficies which events to listen to. */
    eventTypes: Array<EventType>;
    /** nodeID is an optional node ID of the node to listen to. */
    nodeID?: InputMaybe<Scalars["ID"]>;
};
/** OnEventPayload is the payload for the on[Any]Event subscriptions. */
declare type OnEventPayload = {
    __typename: "OnEventPayload";
    /**
     * done indicates that the state has finished synchorizing. This is only valid
     * for events that synchronize state on start of subscription (e.g.
     * PARTICIPANT_CONNECTED).
     */
    done: Scalars["Boolean"];
    /**
     * eventID is a unique identifier for the current event. Each OnEventPayload for
     * a single client will have a different eventID. eventID will be the same for
     * different clients on the same event.
     */
    eventID: Scalars["ID"];
    /** eventType is the type of the current event. */
    eventType: EventType;
    /** node is the node that triggered the event */
    node?: Maybe<Node>;
};
declare enum OrderDirection {
    Asc = "ASC",
    Desc = "DESC"
}
declare type PageInfo = {
    __typename: "PageInfo";
    endCursor?: Maybe<Scalars["Cursor"]>;
    hasNextPage: Scalars["Boolean"];
    hasPreviousPage: Scalars["Boolean"];
    startCursor?: Maybe<Scalars["Cursor"]>;
};
/** Participant is an entity participating in Steps. */
declare type Participant = Node & {
    __typename: "Participant";
    /** createdAt is the time of creation of the record. */
    createdAt: Scalars["DateTime"];
    /** id is the unique globally identifier for the record. */
    id: Scalars["ID"];
    /**
     * identifier is the unique identifier for the Pariticipant. This is different
     * from the id field, which is the database internal identifier. The identifier
     * is how a participant "logs into" the system.
     */
    identifier: Scalars["ID"];
    /**
     * links returns Participant linking and unlinking with Nodes. A single
     * Particpant might be linked and unlinked multiple times, and
     * so a Participant might have multiple Links on a single Node.
     */
    links?: Maybe<LinkConnection>;
};
/** Participant is an entity participating in Steps. */
declare type ParticipantLinksArgs = {
    after?: InputMaybe<Scalars["Cursor"]>;
    before?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<Scalars["Int"]>;
    last?: InputMaybe<Scalars["Int"]>;
};
declare type ParticipantChange = {
    __typename: "ParticipantChange";
    /** id is the identifier for the Participant. */
    id: Scalars["ID"];
};
declare type ParticipantConnection = {
    __typename: "ParticipantConnection";
    edges: Array<ParticipantEdge>;
    pageInfo: PageInfo;
    totalCount: Scalars["Int"];
};
declare type ParticipantEdge = {
    __typename: "ParticipantEdge";
    cursor: Scalars["Cursor"];
    node: Participant;
};
declare type Query = {
    __typename: "Query";
    /** attributes returns all attributes for a scope. */
    attributes?: Maybe<AttributeConnection>;
    /** groups returns all groups */
    groups?: Maybe<GroupConnection>;
    /** participants returns all Participants in the system. */
    participants?: Maybe<ParticipantConnection>;
    /**
     * scopes returns all scopes
     * If filter is provided it will return scopes matching any
     * ScopedAttributesInput.
     */
    scopes?: Maybe<ScopeConnection>;
    /** steps returns all steps */
    steps?: Maybe<StepConnection>;
};
declare type QueryAttributesArgs = {
    after?: InputMaybe<Scalars["Cursor"]>;
    before?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<Scalars["Int"]>;
    last?: InputMaybe<Scalars["Int"]>;
    scopeID: Scalars["ID"];
};
declare type QueryGroupsArgs = {
    after?: InputMaybe<Scalars["Cursor"]>;
    before?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<Scalars["Int"]>;
    last?: InputMaybe<Scalars["Int"]>;
};
declare type QueryParticipantsArgs = {
    after?: InputMaybe<Scalars["Cursor"]>;
    before?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<Scalars["Int"]>;
    last?: InputMaybe<Scalars["Int"]>;
};
declare type QueryScopesArgs = {
    after?: InputMaybe<Scalars["Cursor"]>;
    before?: InputMaybe<Scalars["Cursor"]>;
    filter?: InputMaybe<Array<ScopedAttributesInput>>;
    first?: InputMaybe<Scalars["Int"]>;
    last?: InputMaybe<Scalars["Int"]>;
};
declare type QueryStepsArgs = {
    after?: InputMaybe<Scalars["Cursor"]>;
    before?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<Scalars["Int"]>;
    last?: InputMaybe<Scalars["Int"]>;
};
/** RegisterServiceInput is the input for registerService() */
declare type RegisterServiceInput = {
    /** name is the name of the service to register. */
    name: Scalars["String"];
    /** token is the Service Registration token. */
    token: Scalars["String"];
};
/** RegisterServicePayload is returned by registerService() */
declare type RegisterServicePayload = {
    __typename: "RegisterServicePayload";
    /** service is newly created Service. */
    service: Service;
    /** sessionToken is the session token to be used for authenticated requets. */
    sessionToken: Scalars["String"];
};
declare enum Role {
    /** ADMIN is priviledged access for Users and Services. */
    Admin = "ADMIN",
    /** PARTICIPANT is access tailored for Participants' needs. */
    Participant = "PARTICIPANT"
}
declare type Scope = Node & {
    __typename: "Scope";
    /** attributes returns all custom data that has been set. */
    attributes: AttributeConnection;
    /** createdAt is the time of creation of the record. */
    createdAt: Scalars["DateTime"];
    /** createdBy returns the Actor that created the record. */
    createdBy: Actor;
    /** id is the unique globally identifier for the record. */
    id: Scalars["ID"];
    /** kind is an optional type name. */
    kind?: Maybe<Scalars["String"]>;
    /**
     * links returns Participant linking and unlinking with this Node. A single
     * Particpant might be linked and unlinked multiple times, and
     * so a Participant might have multiple Links on a Node.
     */
    links?: Maybe<LinkConnection>;
    /** name is an optional *unique* name. */
    name?: Maybe<Scalars["String"]>;
};
declare type ScopeAttributesArgs = {
    after?: InputMaybe<Scalars["Cursor"]>;
    before?: InputMaybe<Scalars["Cursor"]>;
    deleted?: InputMaybe<Scalars["Boolean"]>;
    first?: InputMaybe<Scalars["Int"]>;
    last?: InputMaybe<Scalars["Int"]>;
};
declare type ScopeLinksArgs = {
    after?: InputMaybe<Scalars["Cursor"]>;
    before?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<Scalars["Int"]>;
    last?: InputMaybe<Scalars["Int"]>;
};
declare type ScopeChange = {
    __typename: "ScopeChange";
    /** id is the identifier for the Scope. */
    id: Scalars["ID"];
    /** kind is the kind of the Scope. */
    kind?: Maybe<Scalars["String"]>;
    /** name is the name of the Scope. */
    name?: Maybe<Scalars["String"]>;
};
declare type ScopeConnection = {
    __typename: "ScopeConnection";
    edges: Array<ScopeEdge>;
    pageInfo: PageInfo;
    totalCount: Scalars["Int"];
};
declare type ScopeEdge = {
    __typename: "ScopeEdge";
    cursor: Scalars["Cursor"];
    node: Scope;
};
/**
 * ScopedAttributesInput subscribes to attributes in matching scopes. Either name,
 * kind, keys or kvs exclusively can be provided.
 */
declare type ScopedAttributesInput = {
    /** ids of the matching Scopes. */
    ids?: InputMaybe<Array<Scalars["ID"]>>;
    /** keys to Attributes in matching Scope. */
    keys?: InputMaybe<Array<Scalars["String"]>>;
    /** kinds of the matching Scopes. */
    kinds?: InputMaybe<Array<Scalars["String"]>>;
    /** kvs to Attributes in matching Scope. */
    kvs?: InputMaybe<Array<Kv>>;
    /** names of the matching Scopes. */
    names?: InputMaybe<Array<Scalars["String"]>>;
};
declare type Service = {
    __typename: "Service";
    /** createdAt is the time of creation of the record. */
    createdAt: Scalars["DateTime"];
    /** id is the unique globally identifier for the record. */
    id: Scalars["ID"];
    /** name is the name of the service gave itself. */
    name: Scalars["String"];
};
/** SetAttributeInput sets an Attribute on a Node. */
declare type SetAttributeInput = {
    /**
     * append allows appending to a vector without specifying the index. Setting the
     * index will make this Attribute a vector if it does not yet exist. An Attribute
     * cannot mutate between vector and non-vector formats.
     */
    append?: InputMaybe<Scalars["Boolean"]>;
    /**
     * ephemeral indicates the Attribute should not be persisted. Ephemeral
     * Attributes are not stored in the database and are only synced to the
     * connected clients.
     * Defaults to false and does need to be sent on subsequent updates. An ephemeral
     * Attribute cannot become non-ephemeral and vice versa.
     */
    ephemeral?: InputMaybe<Scalars["Boolean"]>;
    /**
     * immutable indicates the Attribute can never be changed by any Actor.
     * immutable must be set on the Attribute at creation.
     * Defaults to false and does need to be sent on subsequent updates.
     */
    immutable?: InputMaybe<Scalars["Boolean"]>;
    /**
     * index of value if Attribute is a vector. Setting the index will make this
     * Attribute a vector if it does not yet exist. An Attribute cannot mutate
     * between vector and non-vector formats.
     */
    index?: InputMaybe<Scalars["Int"]>;
    /** key identifies the unique key of the Attribute. */
    key: Scalars["String"];
    /**
     * ID of object on which to update the value. NodeID is required if attribute is
     * not created with addScope().
     */
    nodeID?: InputMaybe<Scalars["ID"]>;
    /**
     * private indicates whether the Attribute shouldn't be visible to Participants
     * in the scope.
     * private must be set on the Attribute at creation.
     * Defaults to false and does need to be sent on subsequent updates.
     */
    private?: InputMaybe<Scalars["Boolean"]>;
    /**
     * protected indicates the Attribute cannot be modified by other Participants. A
     * Participant can only set protected Records on their Participant record.
     * Users and Services can update protected Attributes.
     * protected must be set on the Attribute at creation.
     * Defaults to false and does need to be sent on subsequent updates.
     */
    protected?: InputMaybe<Scalars["Boolean"]>;
    /**
     * val is the value of the Attribute. It can be any JSON encodable value. If
     * value is not defined, value is assumed to be `null`.
     */
    val?: InputMaybe<Scalars["String"]>;
};
/** SetAttributePayload is the return payload for the setAttribute mutation. */
declare type SetAttributePayload = {
    __typename: "SetAttributePayload";
    /** attribute is the Attribute updated. */
    attribute: Attribute;
};
/** State of Step */
declare enum State {
    /** CREATED is when the Step has been created but hasn't started yet. */
    Created = "CREATED",
    /** ENDED is when the Step has finished without issues. */
    Ended = "ENDED",
    /** ERROR is when the Step has failed (due to an unrecoverable error). */
    Failed = "FAILED",
    /** PAUSED is when the Step has started but its timer was stopped. */
    Paused = "PAUSED",
    /** RUNNING is when the Step is currently in progress. */
    Running = "RUNNING",
    /**
     * TERMINATED is when the Step has been manually terminated. This could happen
     * before or during execution.
     */
    Terminated = "TERMINATED"
}
/** Step is a span of time. */
declare type Step = Node & {
    __typename: "Step";
    /** createdAt is the time of creation of the record. */
    createdAt: Scalars["DateTime"];
    /** createdBy returns the Actor that created the record. */
    createdBy: Actor;
    /** duration is the duration in seconds of the Step should last before ending. */
    duration: Scalars["Int"];
    /** endedAt is the time at which the Step ended. */
    endedAt?: Maybe<Scalars["DateTime"]>;
    /** id is the unique globally identifier for the record. */
    id: Scalars["ID"];
    /** links returns Participant linking and unlinking with this Node. */
    links: LinkConnection;
    /** startedAt is the time at which the Step started. */
    startedAt?: Maybe<Scalars["DateTime"]>;
    /** state is the stage the Step currently is in */
    state: State;
    /** transitions lists of States changes of the Step. */
    transitions: TransitionConnection;
};
/** Step is a span of time. */
declare type StepLinksArgs = {
    after?: InputMaybe<Scalars["Cursor"]>;
    before?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<Scalars["Int"]>;
    last?: InputMaybe<Scalars["Int"]>;
};
/** Step is a span of time. */
declare type StepTransitionsArgs = {
    after?: InputMaybe<Scalars["Cursor"]>;
    before?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<Scalars["Int"]>;
    last?: InputMaybe<Scalars["Int"]>;
};
declare type StepChange = {
    __typename: "StepChange";
    /** elapsed indicates the time in seconds elapsed since the start of the Step. */
    elapsed?: Maybe<Scalars["Int"]>;
    /** id is the identifier for the Step. */
    id: Scalars["ID"];
    /**
     * remaining is the duration left in seconds of the Step should last before
     * ending, from `since`.
     */
    remaining?: Maybe<Scalars["Int"]>;
    /** running indicates whether the Step is running. */
    running: Scalars["Boolean"];
    /** since is the time from which the counter should count. */
    since?: Maybe<Scalars["DateTime"]>;
    /** state is the stage the Step currently is in */
    state: State;
};
declare type StepConnection = {
    __typename: "StepConnection";
    edges: Array<StepEdge>;
    pageInfo: PageInfo;
    totalCount: Scalars["Int"];
};
declare type StepEdge = {
    __typename: "StepEdge";
    cursor: Scalars["Cursor"];
    node: Step;
};
declare type StepOrder = {
    direction: OrderDirection;
    field?: InputMaybe<StepOrderField>;
};
declare enum StepOrderField {
    CreatedAt = "CREATED_AT",
    Duration = "DURATION",
    StartedAt = "STARTED_AT"
}
/** SubAttributesPayload is the return payload for the scope attributes subs. */
declare type SubAttributesPayload = {
    __typename: "SubAttributesPayload";
    /**
     * scope that the participant is added to. Attribute may be null only if the
     * subscription did not match any Scopes and done must be published.
     */
    attribute?: Maybe<Attribute>;
    /** done indicates that the state has finished synchorizing. */
    done: Scalars["Boolean"];
    /** isNew returns true if the Attribute for key and nodeID was just created. */
    isNew: Scalars["Boolean"];
    /**
     * scopesUpdated is the list of the scope IDs matching the subscription that have
     * been sent and are done *synced). This can only sent along with done == true.
     * If done == true and the list is empty, then no scopes matched the
     * subscription. The list must be sent if done == true. Done can be true and
     * scopesUpdated can contain IDs even if no attributes were sent. In this case,
     * the scopes matched were empty.
     */
    scopesUpdated?: Maybe<Array<Scalars["String"]>>;
};
declare type Subscription = {
    __typename: "Subscription";
    /**
     * changes returns the changes relevant to the Participant, including changes to
     * the Step they are Participating in, Atrributes they have access that are
     * added, updated, or going in and out of scope, etc.
     */
    changes: ChangePayload;
    /**
     * globalAttributes returns Attributes for the global Scope, which is a singleton
     * permission-less Scope that any client can access, even if not logged in. The
     * name of the global Scope is "global" and can only be updated by Users. All
     * Attributes in this Scope will be returned initially, then any update to
     * Attributes from this Scopes.
     */
    globalAttributes: SubAttributesPayload;
    /** onAnyEvent works like onEvent, except all events are subscribed to. */
    onAnyEvent?: Maybe<OnEventPayload>;
    /**
     * onEvent attaches hooks to specified events. Optionally, a nodeType and nodeID
     * can be specified to only look at events for a particular record.
     */
    onEvent?: Maybe<OnEventPayload>;
    /**
     * scopedAttributes returns Attributes for Scopes matching the keys or KVs input.
     * keys or KVs (only one) must be provided. All Attributes in Scopes matching
     * will be returned initially, then any update to Attributes within the matching
     * Scopes.
     */
    scopedAttributes: SubAttributesPayload;
};
declare type SubscriptionOnAnyEventArgs = {
    input?: InputMaybe<OnAnyEventInput>;
};
declare type SubscriptionOnEventArgs = {
    input?: InputMaybe<OnEventInput>;
};
declare type SubscriptionScopedAttributesArgs = {
    input: Array<ScopedAttributesInput>;
};
/** TokenLoginInput is the input for tokenLogin() */
declare type TokenLoginInput = {
    /** token is the PASETO token. */
    token: Scalars["String"];
};
/** A Transition records a State change. */
declare type Transition = Node & {
    __typename: "Transition";
    /** createdAt is the time of creation of the record. */
    createdAt: Scalars["DateTime"];
    /** createdBy is the Actor that created the record. */
    createdBy: Actor;
    /** from is the State in which the Node was before the State change. */
    from: State;
    /** id is the unique globally identifier for the record. */
    id: Scalars["ID"];
    /** node is the Node that experienced this Transition. */
    node: Node;
    /** to is the State in which the Node was after the State change. */
    to: State;
};
declare type TransitionConnection = {
    __typename: "TransitionConnection";
    edges: Array<TransitionEdge>;
    pageInfo: PageInfo;
    totalCount: Scalars["Int"];
};
declare type TransitionEdge = {
    __typename: "TransitionEdge";
    cursor: Scalars["Cursor"];
    node: Transition;
};
/** TransitionInput transitions a Node. */
declare type TransitionInput = {
    /** cause is an optional open string explaining the reason for the transition. */
    cause?: InputMaybe<Scalars["String"]>;
    /**
     * from is the current State of the Node. To avoid concurrency or repeat errors,
     * from is required, and the transition will not happen if the from State does
     * not correspond to the Node's current State.
     */
    from: State;
    /** nodeID is the ID of the Node to transition. */
    nodeID: Scalars["ID"];
    /** to is the desired State of the Step. */
    to: State;
};
/** TransitionPayload is the return payload for the transition() mutation. */
declare type TransitionPayload = {
    __typename: "TransitionPayload";
    /** transition is the created Transition. */
    transition: Transition;
};
/** User is a user that has priviledged access to the data. */
declare type User = Node & {
    __typename: "User";
    /** createdAt is the time of creation of the record. */
    createdAt: Scalars["DateTime"];
    /** id is the unique globally identifier for the record. */
    id: Scalars["ID"];
    /** name is the display name of the user. */
    name: Scalars["String"];
    /** username is the login name of the user. */
    username: Scalars["String"];
};
declare type AttributesQueryVariables = Exact<{
    scopeID: Scalars["ID"];
    after?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<Scalars["Int"]>;
    before?: InputMaybe<Scalars["Cursor"]>;
    last?: InputMaybe<Scalars["Int"]>;
}>;
declare type AttributesQuery = {
    __typename: "Query";
    attributes?: {
        __typename: "AttributeConnection";
        totalCount: number;
        pageInfo: {
            __typename: "PageInfo";
            hasNextPage: boolean;
            hasPreviousPage: boolean;
            startCursor?: any | null;
            endCursor?: any | null;
        };
        edges: Array<{
            __typename: "AttributeEdge";
            cursor: any;
            node: {
                __typename: "Attribute";
                id: string;
                createdAt: any;
                private: boolean;
                protected: boolean;
                immutable: boolean;
                ephemeral: boolean;
                deletedAt?: any | null;
                key: string;
                val?: string | null;
                index?: number | null;
                current: boolean;
                version: number;
                vector: boolean;
                createdBy: {
                    __typename: "Participant";
                    id: string;
                    identifier: string;
                    createdAt: any;
                } | {
                    __typename: "Service";
                    id: string;
                    name: string;
                    createdAt: any;
                } | {
                    __typename: "User";
                    id: string;
                    username: string;
                    name: string;
                    createdAt: any;
                };
                node: {
                    __typename: "Attribute";
                    id: string;
                } | {
                    __typename: "Group";
                    id: string;
                } | {
                    __typename: "Link";
                    id: string;
                } | {
                    __typename: "Participant";
                    id: string;
                } | {
                    __typename: "Scope";
                    kind?: string | null;
                    name?: string | null;
                    id: string;
                } | {
                    __typename: "Step";
                    id: string;
                } | {
                    __typename: "Transition";
                    id: string;
                } | {
                    __typename: "User";
                    id: string;
                };
            };
        }>;
    } | null;
};
declare type SetAttributesMutationVariables = Exact<{
    input: Array<SetAttributeInput> | SetAttributeInput;
}>;
declare type SetAttributesMutation = {
    __typename: "Mutation";
    setAttributes: Array<{
        __typename: "SetAttributePayload";
        attribute: {
            __typename: "Attribute";
            id: string;
            createdAt: any;
            private: boolean;
            protected: boolean;
            immutable: boolean;
            ephemeral: boolean;
            deletedAt?: any | null;
            key: string;
            val?: string | null;
            index?: number | null;
            current: boolean;
            version: number;
            vector: boolean;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            node: {
                __typename: "Attribute";
                id: string;
            } | {
                __typename: "Group";
                id: string;
            } | {
                __typename: "Link";
                id: string;
            } | {
                __typename: "Participant";
                id: string;
            } | {
                __typename: "Scope";
                kind?: string | null;
                name?: string | null;
                id: string;
            } | {
                __typename: "Step";
                id: string;
            } | {
                __typename: "Transition";
                id: string;
            } | {
                __typename: "User";
                id: string;
            };
        };
    }>;
};
declare type ChangesSubscriptionVariables = Exact<{
    [key: string]: never;
}>;
declare type ChangesSubscription = {
    __typename: "Subscription";
    changes: {
        __typename: "ChangePayload";
        done: boolean;
        removed?: boolean | null;
        change?: {
            __typename: "AttributeChange";
            id: string;
            nodeID: string;
            deleted: boolean;
            createdAt: any;
            isNew: boolean;
            index?: number | null;
            vector: boolean;
            version: number;
            key: string;
            val?: string | null;
        } | {
            __typename: "ParticipantChange";
            id: string;
        } | {
            __typename: "ScopeChange";
            id: string;
            name?: string | null;
            kind?: string | null;
        } | {
            __typename: "StepChange";
            id: string;
            state: State;
            since?: any | null;
            remaining?: number | null;
            elapsed?: number | null;
            running: boolean;
        } | null;
    };
};
declare type AddGroupsMutationVariables = Exact<{
    input: Array<AddGroupInput> | AddGroupInput;
}>;
declare type AddGroupsMutation = {
    __typename: "Mutation";
    addGroups: Array<{
        __typename: "AddGroupPayload";
        group: {
            __typename: "Group";
            id: string;
        };
    }>;
};
declare type GroupsQueryVariables = Exact<{
    after?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<Scalars["Int"]>;
    before?: InputMaybe<Scalars["Cursor"]>;
    last?: InputMaybe<Scalars["Int"]>;
}>;
declare type GroupsQuery = {
    __typename: "Query";
    groups?: {
        __typename: "GroupConnection";
        totalCount: number;
        edges: Array<{
            __typename: "GroupEdge";
            node: {
                __typename: "Group";
                id: string;
                createdAt: any;
                createdBy: {
                    __typename: "Participant";
                    id: string;
                    identifier: string;
                    createdAt: any;
                } | {
                    __typename: "Service";
                    id: string;
                    name: string;
                    createdAt: any;
                } | {
                    __typename: "User";
                    id: string;
                    username: string;
                    name: string;
                    createdAt: any;
                };
            };
        }>;
        pageInfo: {
            __typename: "PageInfo";
            hasNextPage: boolean;
            hasPreviousPage: boolean;
            startCursor?: any | null;
            endCursor?: any | null;
        };
    } | null;
};
declare type OnEventSubscriptionVariables = Exact<{
    input?: InputMaybe<OnEventInput>;
}>;
declare type OnEventSubscription = {
    __typename: "Subscription";
    onEvent?: {
        __typename: "OnEventPayload";
        eventID: string;
        eventType: EventType;
        done: boolean;
        node?: {
            __typename: "Attribute";
            createdAt: any;
            private: boolean;
            protected: boolean;
            immutable: boolean;
            ephemeral: boolean;
            deletedAt?: any | null;
            key: string;
            val?: string | null;
            index?: number | null;
            current: boolean;
            version: number;
            vector: boolean;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            node: {
                __typename: "Attribute";
                id: string;
            } | {
                __typename: "Group";
                id: string;
            } | {
                __typename: "Link";
                id: string;
            } | {
                __typename: "Participant";
                id: string;
            } | {
                __typename: "Scope";
                kind?: string | null;
                name?: string | null;
                id: string;
            } | {
                __typename: "Step";
                id: string;
            } | {
                __typename: "Transition";
                id: string;
            } | {
                __typename: "User";
                id: string;
            };
        } | {
            __typename: "Group";
            createdAt: any;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
        } | {
            __typename: "Link";
            createdAt: any;
            link: boolean;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            participant: {
                __typename: "Participant";
                id: string;
            };
            node: {
                __typename: "Attribute";
                id: string;
            } | {
                __typename: "Group";
                id: string;
            } | {
                __typename: "Link";
                id: string;
            } | {
                __typename: "Participant";
                id: string;
            } | {
                __typename: "Scope";
                id: string;
            } | {
                __typename: "Step";
                id: string;
            } | {
                __typename: "Transition";
                id: string;
            } | {
                __typename: "User";
                id: string;
            };
        } | {
            __typename: "Participant";
            createdAt: any;
            identifier: string;
            id: string;
        } | {
            __typename: "Scope";
            name?: string | null;
            kind?: string | null;
            createdAt: any;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            attributes: {
                __typename: "AttributeConnection";
                totalCount: number;
                pageInfo: {
                    __typename: "PageInfo";
                    hasNextPage: boolean;
                    hasPreviousPage: boolean;
                    startCursor?: any | null;
                    endCursor?: any | null;
                };
                edges: Array<{
                    __typename: "AttributeEdge";
                    cursor: any;
                    node: {
                        __typename: "Attribute";
                        id: string;
                        createdAt: any;
                        private: boolean;
                        protected: boolean;
                        immutable: boolean;
                        ephemeral: boolean;
                        deletedAt?: any | null;
                        key: string;
                        val?: string | null;
                        index?: number | null;
                        current: boolean;
                        version: number;
                        vector: boolean;
                        createdBy: {
                            __typename: "Participant";
                            id: string;
                            identifier: string;
                            createdAt: any;
                        } | {
                            __typename: "Service";
                            id: string;
                            name: string;
                            createdAt: any;
                        } | {
                            __typename: "User";
                            id: string;
                            username: string;
                            name: string;
                            createdAt: any;
                        };
                        node: {
                            __typename: "Attribute";
                            id: string;
                        } | {
                            __typename: "Group";
                            id: string;
                        } | {
                            __typename: "Link";
                            id: string;
                        } | {
                            __typename: "Participant";
                            id: string;
                        } | {
                            __typename: "Scope";
                            kind?: string | null;
                            name?: string | null;
                            id: string;
                        } | {
                            __typename: "Step";
                            id: string;
                        } | {
                            __typename: "Transition";
                            id: string;
                        } | {
                            __typename: "User";
                            id: string;
                        };
                    };
                }>;
            };
        } | {
            __typename: "Step";
            createdAt: any;
            duration: number;
            startedAt?: any | null;
            endedAt?: any | null;
            state: State;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            transitions: {
                __typename: "TransitionConnection";
                totalCount: number;
                pageInfo: {
                    __typename: "PageInfo";
                    hasNextPage: boolean;
                    hasPreviousPage: boolean;
                    startCursor?: any | null;
                    endCursor?: any | null;
                };
                edges: Array<{
                    __typename: "TransitionEdge";
                    cursor: any;
                    node: {
                        __typename: "Transition";
                        id: string;
                        createdAt: any;
                        from: State;
                        to: State;
                        createdBy: {
                            __typename: "Participant";
                            id: string;
                            identifier: string;
                            createdAt: any;
                        } | {
                            __typename: "Service";
                            id: string;
                            name: string;
                            createdAt: any;
                        } | {
                            __typename: "User";
                            id: string;
                            username: string;
                            name: string;
                            createdAt: any;
                        };
                        node: {
                            __typename: "Attribute";
                        } | {
                            __typename: "Group";
                        } | {
                            __typename: "Link";
                        } | {
                            __typename: "Participant";
                        } | {
                            __typename: "Scope";
                        } | {
                            __typename: "Step";
                            id: string;
                            duration: number;
                            state: State;
                            startedAt?: any | null;
                            endedAt?: any | null;
                        } | {
                            __typename: "Transition";
                        } | {
                            __typename: "User";
                        };
                    };
                }>;
            };
        } | {
            __typename: "Transition";
            createdAt: any;
            from: State;
            to: State;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            node: {
                __typename: "Attribute";
            } | {
                __typename: "Group";
            } | {
                __typename: "Link";
            } | {
                __typename: "Participant";
            } | {
                __typename: "Scope";
            } | {
                __typename: "Step";
                id: string;
                duration: number;
                state: State;
                startedAt?: any | null;
                endedAt?: any | null;
            } | {
                __typename: "Transition";
            } | {
                __typename: "User";
            };
        } | {
            __typename: "User";
            id: string;
        } | null;
    } | null;
};
declare type OnAnyEventSubscriptionVariables = Exact<{
    input?: InputMaybe<OnAnyEventInput>;
}>;
declare type OnAnyEventSubscription = {
    __typename: "Subscription";
    onAnyEvent?: {
        __typename: "OnEventPayload";
        eventID: string;
        eventType: EventType;
        done: boolean;
        node?: {
            __typename: "Attribute";
            createdAt: any;
            private: boolean;
            protected: boolean;
            immutable: boolean;
            ephemeral: boolean;
            deletedAt?: any | null;
            key: string;
            val?: string | null;
            index?: number | null;
            current: boolean;
            version: number;
            vector: boolean;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            node: {
                __typename: "Attribute";
                id: string;
            } | {
                __typename: "Group";
                id: string;
            } | {
                __typename: "Link";
                id: string;
            } | {
                __typename: "Participant";
                id: string;
            } | {
                __typename: "Scope";
                kind?: string | null;
                name?: string | null;
                id: string;
            } | {
                __typename: "Step";
                id: string;
            } | {
                __typename: "Transition";
                id: string;
            } | {
                __typename: "User";
                id: string;
            };
        } | {
            __typename: "Group";
            createdAt: any;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
        } | {
            __typename: "Link";
            createdAt: any;
            link: boolean;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            participant: {
                __typename: "Participant";
                id: string;
            };
            node: {
                __typename: "Attribute";
                id: string;
            } | {
                __typename: "Group";
                id: string;
            } | {
                __typename: "Link";
                id: string;
            } | {
                __typename: "Participant";
                id: string;
            } | {
                __typename: "Scope";
                id: string;
            } | {
                __typename: "Step";
                id: string;
            } | {
                __typename: "Transition";
                id: string;
            } | {
                __typename: "User";
                id: string;
            };
        } | {
            __typename: "Participant";
            createdAt: any;
            identifier: string;
            id: string;
        } | {
            __typename: "Scope";
            name?: string | null;
            kind?: string | null;
            createdAt: any;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            attributes: {
                __typename: "AttributeConnection";
                totalCount: number;
                pageInfo: {
                    __typename: "PageInfo";
                    hasNextPage: boolean;
                    hasPreviousPage: boolean;
                    startCursor?: any | null;
                    endCursor?: any | null;
                };
                edges: Array<{
                    __typename: "AttributeEdge";
                    cursor: any;
                    node: {
                        __typename: "Attribute";
                        id: string;
                        createdAt: any;
                        private: boolean;
                        protected: boolean;
                        immutable: boolean;
                        ephemeral: boolean;
                        deletedAt?: any | null;
                        key: string;
                        val?: string | null;
                        index?: number | null;
                        current: boolean;
                        version: number;
                        vector: boolean;
                        createdBy: {
                            __typename: "Participant";
                            id: string;
                            identifier: string;
                            createdAt: any;
                        } | {
                            __typename: "Service";
                            id: string;
                            name: string;
                            createdAt: any;
                        } | {
                            __typename: "User";
                            id: string;
                            username: string;
                            name: string;
                            createdAt: any;
                        };
                        node: {
                            __typename: "Attribute";
                            id: string;
                        } | {
                            __typename: "Group";
                            id: string;
                        } | {
                            __typename: "Link";
                            id: string;
                        } | {
                            __typename: "Participant";
                            id: string;
                        } | {
                            __typename: "Scope";
                            kind?: string | null;
                            name?: string | null;
                            id: string;
                        } | {
                            __typename: "Step";
                            id: string;
                        } | {
                            __typename: "Transition";
                            id: string;
                        } | {
                            __typename: "User";
                            id: string;
                        };
                    };
                }>;
            };
        } | {
            __typename: "Step";
            createdAt: any;
            duration: number;
            startedAt?: any | null;
            endedAt?: any | null;
            state: State;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            transitions: {
                __typename: "TransitionConnection";
                totalCount: number;
                pageInfo: {
                    __typename: "PageInfo";
                    hasNextPage: boolean;
                    hasPreviousPage: boolean;
                    startCursor?: any | null;
                    endCursor?: any | null;
                };
                edges: Array<{
                    __typename: "TransitionEdge";
                    cursor: any;
                    node: {
                        __typename: "Transition";
                        id: string;
                        createdAt: any;
                        from: State;
                        to: State;
                        createdBy: {
                            __typename: "Participant";
                            id: string;
                            identifier: string;
                            createdAt: any;
                        } | {
                            __typename: "Service";
                            id: string;
                            name: string;
                            createdAt: any;
                        } | {
                            __typename: "User";
                            id: string;
                            username: string;
                            name: string;
                            createdAt: any;
                        };
                        node: {
                            __typename: "Attribute";
                        } | {
                            __typename: "Group";
                        } | {
                            __typename: "Link";
                        } | {
                            __typename: "Participant";
                        } | {
                            __typename: "Scope";
                        } | {
                            __typename: "Step";
                            id: string;
                            duration: number;
                            state: State;
                            startedAt?: any | null;
                            endedAt?: any | null;
                        } | {
                            __typename: "Transition";
                        } | {
                            __typename: "User";
                        };
                    };
                }>;
            };
        } | {
            __typename: "Transition";
            createdAt: any;
            from: State;
            to: State;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            node: {
                __typename: "Attribute";
            } | {
                __typename: "Group";
            } | {
                __typename: "Link";
            } | {
                __typename: "Participant";
            } | {
                __typename: "Scope";
            } | {
                __typename: "Step";
                id: string;
                duration: number;
                state: State;
                startedAt?: any | null;
                endedAt?: any | null;
            } | {
                __typename: "Transition";
            } | {
                __typename: "User";
            };
        } | {
            __typename: "User";
            id: string;
        } | null;
    } | null;
};
declare type LinkMutationVariables = Exact<{
    input: LinkInput;
}>;
declare type LinkMutation = {
    __typename: "Mutation";
    link: {
        __typename: "LinkPayload";
        nodes: Array<{
            __typename: "Attribute";
            id: string;
        } | {
            __typename: "Group";
            id: string;
        } | {
            __typename: "Link";
            id: string;
        } | {
            __typename: "Participant";
            id: string;
        } | {
            __typename: "Scope";
            id: string;
        } | {
            __typename: "Step";
            id: string;
        } | {
            __typename: "Transition";
            id: string;
        } | {
            __typename: "User";
            id: string;
        }>;
        participants: Array<{
            __typename: "Participant";
            id: string;
        }>;
    };
};
declare type ParticipantsQueryVariables = Exact<{
    after?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<Scalars["Int"]>;
    before?: InputMaybe<Scalars["Cursor"]>;
    last?: InputMaybe<Scalars["Int"]>;
}>;
declare type ParticipantsQuery = {
    __typename: "Query";
    participants?: {
        __typename: "ParticipantConnection";
        totalCount: number;
        edges: Array<{
            __typename: "ParticipantEdge";
            node: {
                __typename: "Participant";
                id: string;
                createdAt: any;
                identifier: string;
            };
        }>;
        pageInfo: {
            __typename: "PageInfo";
            hasNextPage: boolean;
            hasPreviousPage: boolean;
            startCursor?: any | null;
            endCursor?: any | null;
        };
    } | null;
};
declare type AddParticipantMutationVariables = Exact<{
    input: AddParticipantInput;
}>;
declare type AddParticipantMutation = {
    __typename: "Mutation";
    addParticipant: {
        __typename: "AddParticipantPayload";
        sessionToken: string;
        participant: {
            __typename: "Participant";
            id: string;
            createdAt: any;
            identifier: string;
        };
    };
};
declare type AddScopesMutationVariables = Exact<{
    input: Array<AddScopeInput> | AddScopeInput;
}>;
declare type AddScopesMutation = {
    __typename: "Mutation";
    addScopes: Array<{
        __typename: "AddScopePayload";
        scope: {
            __typename: "Scope";
            id: string;
            name?: string | null;
            kind?: string | null;
            createdAt: any;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            attributes: {
                __typename: "AttributeConnection";
                totalCount: number;
                pageInfo: {
                    __typename: "PageInfo";
                    hasNextPage: boolean;
                    hasPreviousPage: boolean;
                    startCursor?: any | null;
                    endCursor?: any | null;
                };
                edges: Array<{
                    __typename: "AttributeEdge";
                    cursor: any;
                    node: {
                        __typename: "Attribute";
                        id: string;
                        createdAt: any;
                        private: boolean;
                        protected: boolean;
                        immutable: boolean;
                        ephemeral: boolean;
                        deletedAt?: any | null;
                        key: string;
                        val?: string | null;
                        index?: number | null;
                        current: boolean;
                        version: number;
                        vector: boolean;
                        createdBy: {
                            __typename: "Participant";
                            id: string;
                            identifier: string;
                            createdAt: any;
                        } | {
                            __typename: "Service";
                            id: string;
                            name: string;
                            createdAt: any;
                        } | {
                            __typename: "User";
                            id: string;
                            username: string;
                            name: string;
                            createdAt: any;
                        };
                        node: {
                            __typename: "Attribute";
                            id: string;
                        } | {
                            __typename: "Group";
                            id: string;
                        } | {
                            __typename: "Link";
                            id: string;
                        } | {
                            __typename: "Participant";
                            id: string;
                        } | {
                            __typename: "Scope";
                            kind?: string | null;
                            name?: string | null;
                            id: string;
                        } | {
                            __typename: "Step";
                            id: string;
                        } | {
                            __typename: "Transition";
                            id: string;
                        } | {
                            __typename: "User";
                            id: string;
                        };
                    };
                }>;
            };
        };
    }>;
};
declare type ScopesQueryVariables = Exact<{
    filter?: InputMaybe<Array<ScopedAttributesInput> | ScopedAttributesInput>;
    after?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<Scalars["Int"]>;
    before?: InputMaybe<Scalars["Cursor"]>;
    last?: InputMaybe<Scalars["Int"]>;
}>;
declare type ScopesQuery = {
    __typename: "Query";
    scopes?: {
        __typename: "ScopeConnection";
        totalCount: number;
        edges: Array<{
            __typename: "ScopeEdge";
            node: {
                __typename: "Scope";
                id: string;
                name?: string | null;
                kind?: string | null;
                createdAt: any;
                createdBy: {
                    __typename: "Participant";
                    id: string;
                    identifier: string;
                    createdAt: any;
                } | {
                    __typename: "Service";
                    id: string;
                    name: string;
                    createdAt: any;
                } | {
                    __typename: "User";
                    id: string;
                    username: string;
                    name: string;
                    createdAt: any;
                };
                attributes: {
                    __typename: "AttributeConnection";
                    totalCount: number;
                    pageInfo: {
                        __typename: "PageInfo";
                        hasNextPage: boolean;
                        hasPreviousPage: boolean;
                        startCursor?: any | null;
                        endCursor?: any | null;
                    };
                    edges: Array<{
                        __typename: "AttributeEdge";
                        cursor: any;
                        node: {
                            __typename: "Attribute";
                            id: string;
                            createdAt: any;
                            private: boolean;
                            protected: boolean;
                            immutable: boolean;
                            ephemeral: boolean;
                            deletedAt?: any | null;
                            key: string;
                            val?: string | null;
                            index?: number | null;
                            current: boolean;
                            version: number;
                            vector: boolean;
                            createdBy: {
                                __typename: "Participant";
                                id: string;
                                identifier: string;
                                createdAt: any;
                            } | {
                                __typename: "Service";
                                id: string;
                                name: string;
                                createdAt: any;
                            } | {
                                __typename: "User";
                                id: string;
                                username: string;
                                name: string;
                                createdAt: any;
                            };
                            node: {
                                __typename: "Attribute";
                                id: string;
                            } | {
                                __typename: "Group";
                                id: string;
                            } | {
                                __typename: "Link";
                                id: string;
                            } | {
                                __typename: "Participant";
                                id: string;
                            } | {
                                __typename: "Scope";
                                kind?: string | null;
                                name?: string | null;
                                id: string;
                            } | {
                                __typename: "Step";
                                id: string;
                            } | {
                                __typename: "Transition";
                                id: string;
                            } | {
                                __typename: "User";
                                id: string;
                            };
                        };
                    }>;
                };
            };
        }>;
        pageInfo: {
            __typename: "PageInfo";
            hasNextPage: boolean;
            hasPreviousPage: boolean;
            startCursor?: any | null;
            endCursor?: any | null;
        };
    } | null;
};
declare type ScopedAttributesSubscriptionVariables = Exact<{
    input: Array<ScopedAttributesInput> | ScopedAttributesInput;
}>;
declare type ScopedAttributesSubscription = {
    __typename: "Subscription";
    scopedAttributes: {
        __typename: "SubAttributesPayload";
        isNew: boolean;
        scopesUpdated?: Array<string> | null;
        done: boolean;
        attribute?: {
            __typename: "Attribute";
            id: string;
            createdAt: any;
            private: boolean;
            protected: boolean;
            immutable: boolean;
            ephemeral: boolean;
            deletedAt?: any | null;
            key: string;
            val?: string | null;
            index?: number | null;
            current: boolean;
            version: number;
            vector: boolean;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            node: {
                __typename: "Attribute";
                id: string;
            } | {
                __typename: "Group";
                id: string;
            } | {
                __typename: "Link";
                id: string;
            } | {
                __typename: "Participant";
                id: string;
            } | {
                __typename: "Scope";
                kind?: string | null;
                name?: string | null;
                id: string;
            } | {
                __typename: "Step";
                id: string;
            } | {
                __typename: "Transition";
                id: string;
            } | {
                __typename: "User";
                id: string;
            };
        } | null;
    };
};
declare type GlobalAttributesSubscriptionVariables = Exact<{
    [key: string]: never;
}>;
declare type GlobalAttributesSubscription = {
    __typename: "Subscription";
    globalAttributes: {
        __typename: "SubAttributesPayload";
        isNew: boolean;
        done: boolean;
        attribute?: {
            __typename: "Attribute";
            id: string;
            createdAt: any;
            private: boolean;
            protected: boolean;
            immutable: boolean;
            ephemeral: boolean;
            deletedAt?: any | null;
            key: string;
            val?: string | null;
            index?: number | null;
            current: boolean;
            version: number;
            vector: boolean;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            node: {
                __typename: "Attribute";
                id: string;
            } | {
                __typename: "Group";
                id: string;
            } | {
                __typename: "Link";
                id: string;
            } | {
                __typename: "Participant";
                id: string;
            } | {
                __typename: "Scope";
                kind?: string | null;
                name?: string | null;
                id: string;
            } | {
                __typename: "Step";
                id: string;
            } | {
                __typename: "Transition";
                id: string;
            } | {
                __typename: "User";
                id: string;
            };
        } | null;
    };
};
declare type RegisterServiceMutationVariables = Exact<{
    input: RegisterServiceInput;
}>;
declare type RegisterServiceMutation = {
    __typename: "Mutation";
    registerService: {
        __typename: "RegisterServicePayload";
        sessionToken: string;
        service: {
            __typename: "Service";
            id: string;
            createdAt: any;
            name: string;
        };
    };
};
declare type AddStepsMutationVariables = Exact<{
    input: Array<AddStepInput> | AddStepInput;
}>;
declare type AddStepsMutation = {
    __typename: "Mutation";
    addSteps: Array<{
        __typename: "AddStepPayload";
        step: {
            __typename: "Step";
            id: string;
            createdAt: any;
            duration: number;
            startedAt?: any | null;
            endedAt?: any | null;
            state: State;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            transitions: {
                __typename: "TransitionConnection";
                totalCount: number;
                pageInfo: {
                    __typename: "PageInfo";
                    hasNextPage: boolean;
                    hasPreviousPage: boolean;
                    startCursor?: any | null;
                    endCursor?: any | null;
                };
                edges: Array<{
                    __typename: "TransitionEdge";
                    cursor: any;
                    node: {
                        __typename: "Transition";
                        id: string;
                        createdAt: any;
                        from: State;
                        to: State;
                        createdBy: {
                            __typename: "Participant";
                            id: string;
                            identifier: string;
                            createdAt: any;
                        } | {
                            __typename: "Service";
                            id: string;
                            name: string;
                            createdAt: any;
                        } | {
                            __typename: "User";
                            id: string;
                            username: string;
                            name: string;
                            createdAt: any;
                        };
                        node: {
                            __typename: "Attribute";
                        } | {
                            __typename: "Group";
                        } | {
                            __typename: "Link";
                        } | {
                            __typename: "Participant";
                        } | {
                            __typename: "Scope";
                        } | {
                            __typename: "Step";
                            id: string;
                            duration: number;
                            state: State;
                            startedAt?: any | null;
                            endedAt?: any | null;
                        } | {
                            __typename: "Transition";
                        } | {
                            __typename: "User";
                        };
                    };
                }>;
            };
        };
    }>;
};
declare type StepsQueryVariables = Exact<{
    after?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<Scalars["Int"]>;
    before?: InputMaybe<Scalars["Cursor"]>;
    last?: InputMaybe<Scalars["Int"]>;
}>;
declare type StepsQuery = {
    __typename: "Query";
    steps?: {
        __typename: "StepConnection";
        totalCount: number;
        edges: Array<{
            __typename: "StepEdge";
            node: {
                __typename: "Step";
                id: string;
                createdAt: any;
                duration: number;
                startedAt?: any | null;
                endedAt?: any | null;
                state: State;
                createdBy: {
                    __typename: "Participant";
                    id: string;
                    identifier: string;
                    createdAt: any;
                } | {
                    __typename: "Service";
                    id: string;
                    name: string;
                    createdAt: any;
                } | {
                    __typename: "User";
                    id: string;
                    username: string;
                    name: string;
                    createdAt: any;
                };
                transitions: {
                    __typename: "TransitionConnection";
                    totalCount: number;
                    pageInfo: {
                        __typename: "PageInfo";
                        hasNextPage: boolean;
                        hasPreviousPage: boolean;
                        startCursor?: any | null;
                        endCursor?: any | null;
                    };
                    edges: Array<{
                        __typename: "TransitionEdge";
                        cursor: any;
                        node: {
                            __typename: "Transition";
                            id: string;
                            createdAt: any;
                            from: State;
                            to: State;
                            createdBy: {
                                __typename: "Participant";
                                id: string;
                                identifier: string;
                                createdAt: any;
                            } | {
                                __typename: "Service";
                                id: string;
                                name: string;
                                createdAt: any;
                            } | {
                                __typename: "User";
                                id: string;
                                username: string;
                                name: string;
                                createdAt: any;
                            };
                            node: {
                                __typename: "Attribute";
                            } | {
                                __typename: "Group";
                            } | {
                                __typename: "Link";
                            } | {
                                __typename: "Participant";
                            } | {
                                __typename: "Scope";
                            } | {
                                __typename: "Step";
                                id: string;
                                duration: number;
                                state: State;
                                startedAt?: any | null;
                                endedAt?: any | null;
                            } | {
                                __typename: "Transition";
                            } | {
                                __typename: "User";
                            };
                        };
                    }>;
                };
            };
        }>;
        pageInfo: {
            __typename: "PageInfo";
            hasNextPage: boolean;
            hasPreviousPage: boolean;
            startCursor?: any | null;
            endCursor?: any | null;
        };
    } | null;
};
declare type TransitionMutationVariables = Exact<{
    input: TransitionInput;
}>;
declare type TransitionMutation = {
    __typename: "Mutation";
    transition: {
        __typename: "TransitionPayload";
        transition: {
            __typename: "Transition";
            id: string;
            createdAt: any;
            from: State;
            to: State;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            node: {
                __typename: "Attribute";
            } | {
                __typename: "Group";
            } | {
                __typename: "Link";
            } | {
                __typename: "Participant";
            } | {
                __typename: "Scope";
            } | {
                __typename: "Step";
                id: string;
                duration: number;
                state: State;
                startedAt?: any | null;
                endedAt?: any | null;
            } | {
                __typename: "Transition";
            } | {
                __typename: "User";
            };
        };
    };
};
declare type LoginMutationVariables = Exact<{
    input: LoginInput;
}>;
declare type LoginMutation = {
    __typename: "Mutation";
    login: {
        __typename: "LoginPayload";
        sessionToken: string;
        user: {
            __typename: "User";
            id: string;
            createdAt: any;
            username: string;
            name: string;
        };
    };
};
declare type TokenLoginMutationVariables = Exact<{
    input: TokenLoginInput;
}>;
declare type TokenLoginMutation = {
    __typename: "Mutation";
    tokenLogin: {
        __typename: "LoginPayload";
        sessionToken: string;
        user: {
            __typename: "User";
            id: string;
            createdAt: any;
            username: string;
            name: string;
        };
    };
};
declare const AttributesDocument: TypedDocumentNode<AttributesQuery, Exact<{
    scopeID: Scalars["ID"];
    after?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<number> | undefined;
    before?: InputMaybe<Scalars["Cursor"]>;
    last?: InputMaybe<number> | undefined;
}>>;
declare const SetAttributesDocument: TypedDocumentNode<SetAttributesMutation, Exact<{
    input: Array<SetAttributeInput> | SetAttributeInput;
}>>;
declare const ChangesDocument: TypedDocumentNode<ChangesSubscription, Exact<{
    [key: string]: never;
}>>;
declare const AddGroupsDocument: TypedDocumentNode<AddGroupsMutation, Exact<{
    input: Array<AddGroupInput> | AddGroupInput;
}>>;
declare const GroupsDocument: TypedDocumentNode<GroupsQuery, Exact<{
    after?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<number> | undefined;
    before?: InputMaybe<Scalars["Cursor"]>;
    last?: InputMaybe<number> | undefined;
}>>;
declare const OnEventDocument: TypedDocumentNode<OnEventSubscription, Exact<{
    input?: InputMaybe<OnEventInput> | undefined;
}>>;
declare const OnAnyEventDocument: TypedDocumentNode<OnAnyEventSubscription, Exact<{
    input?: InputMaybe<OnAnyEventInput> | undefined;
}>>;
declare const LinkDocument: TypedDocumentNode<LinkMutation, Exact<{
    input: LinkInput;
}>>;
declare const ParticipantsDocument: TypedDocumentNode<ParticipantsQuery, Exact<{
    after?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<number> | undefined;
    before?: InputMaybe<Scalars["Cursor"]>;
    last?: InputMaybe<number> | undefined;
}>>;
declare const AddParticipantDocument: TypedDocumentNode<AddParticipantMutation, Exact<{
    input: AddParticipantInput;
}>>;
declare const AddScopesDocument: TypedDocumentNode<AddScopesMutation, Exact<{
    input: Array<AddScopeInput> | AddScopeInput;
}>>;
declare const ScopesDocument: TypedDocumentNode<ScopesQuery, Exact<{
    filter?: InputMaybe<ScopedAttributesInput | ScopedAttributesInput[]> | undefined;
    after?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<number> | undefined;
    before?: InputMaybe<Scalars["Cursor"]>;
    last?: InputMaybe<number> | undefined;
}>>;
declare const ScopedAttributesDocument: TypedDocumentNode<ScopedAttributesSubscription, Exact<{
    input: Array<ScopedAttributesInput> | ScopedAttributesInput;
}>>;
declare const GlobalAttributesDocument: TypedDocumentNode<GlobalAttributesSubscription, Exact<{
    [key: string]: never;
}>>;
declare const RegisterServiceDocument: TypedDocumentNode<RegisterServiceMutation, Exact<{
    input: RegisterServiceInput;
}>>;
declare const AddStepsDocument: TypedDocumentNode<AddStepsMutation, Exact<{
    input: Array<AddStepInput> | AddStepInput;
}>>;
declare const StepsDocument: TypedDocumentNode<StepsQuery, Exact<{
    after?: InputMaybe<Scalars["Cursor"]>;
    first?: InputMaybe<number> | undefined;
    before?: InputMaybe<Scalars["Cursor"]>;
    last?: InputMaybe<number> | undefined;
}>>;
declare const TransitionDocument: TypedDocumentNode<TransitionMutation, Exact<{
    input: TransitionInput;
}>>;
declare const LoginDocument: TypedDocumentNode<LoginMutation, Exact<{
    input: LoginInput;
}>>;
declare const TokenLoginDocument: TypedDocumentNode<TokenLoginMutation, Exact<{
    input: TokenLoginInput;
}>>;
declare type Properties<T> = Required<{
    [K in keyof T]: z.ZodType<T[K], any, T[K]>;
}>;
declare type definedNonNullAny = {};
declare const isDefinedNonNullAny: (v: any) => v is definedNonNullAny;
declare const definedNonNullAnySchema: z.ZodEffects<z.ZodAny, any, any>;
declare function AddGroupInputSchema(): z.ZodObject<Properties<AddGroupInput>>;
declare function AddParticipantInputSchema(): z.ZodObject<Properties<AddParticipantInput>>;
declare function AddScopeInputSchema(): z.ZodObject<Properties<AddScopeInput>>;
declare function AddStepInputSchema(): z.ZodObject<Properties<AddStepInput>>;
declare const EventTypeSchema: z.ZodNativeEnum<typeof EventType>;
declare function KvSchema(): z.ZodObject<Properties<Kv>>;
declare function LinkInputSchema(): z.ZodObject<Properties<LinkInput>>;
declare function LoginInputSchema(): z.ZodObject<Properties<LoginInput>>;
declare function OnAnyEventInputSchema(): z.ZodObject<Properties<OnAnyEventInput>>;
declare function OnEventInputSchema(): z.ZodObject<Properties<OnEventInput>>;
declare const OrderDirectionSchema: z.ZodNativeEnum<typeof OrderDirection>;
declare function RegisterServiceInputSchema(): z.ZodObject<Properties<RegisterServiceInput>>;
declare const RoleSchema: z.ZodNativeEnum<typeof Role>;
declare function ScopedAttributesInputSchema(): z.ZodObject<Properties<ScopedAttributesInput>>;
declare function SetAttributeInputSchema(): z.ZodObject<Properties<SetAttributeInput>>;
declare const StateSchema: z.ZodNativeEnum<typeof State>;
declare function StepOrderSchema(): z.ZodObject<Properties<StepOrder>>;
declare const StepOrderFieldSchema: z.ZodNativeEnum<typeof StepOrderField>;
declare function TokenLoginInputSchema(): z.ZodObject<Properties<TokenLoginInput>>;
declare function TransitionInputSchema(): z.ZodObject<Properties<TransitionInput>>;

declare type TajribaEvents = {
    connected: () => void;
    disconnected: () => void;
    error: (error: Error) => void;
    closed: () => void;
    accessDenied: () => void;
};
declare const Tajriba_base: new () => TypedEmitter<TajribaEvents>;
declare class Tajriba extends Tajriba_base {
    readonly url: string;
    readonly token?: string | undefined;
    userAgent: string;
    useHTTP: boolean;
    private _connected;
    private _client?;
    private _wsClient?;
    private _firstConnProm?;
    protected constructor(url?: string, token?: string | undefined);
    static create(url?: string): Tajriba;
    static connect(url?: string): Tajriba;
    static createAndAwait(url?: string): Promise<Tajriba>;
    connectAndAwait(): Promise<void>;
    protected static authenticated(url: string | undefined, token: string): Promise<Tajriba>;
    sessionAdmin(sessionToken: string): Promise<TajribaAdmin>;
    sessionParticipant(sessionToken: string, participant: ParticipantIdent): Promise<TajribaParticipant>;
    get connected(): boolean;
    login(username: string, password: string): Promise<string>;
    tokenLogin(token: string): Promise<string>;
    registerService(name: string, token: string): Promise<string>;
    registerParticipant(identifier: string): Promise<[string, ParticipantIdent]>;
    get wsURL(): string;
    private connectionStatus;
    get client(): Client;
    private connect;
    stop(): void;
    setAttributes(input: SetAttributeInput[]): Promise<{
        __typename: "Attribute";
        id: string;
        createdAt: any;
        private: boolean;
        protected: boolean;
        immutable: boolean;
        ephemeral: boolean;
        deletedAt?: any;
        key: string;
        val?: string | null | undefined;
        index?: number | null | undefined;
        current: boolean;
        version: number;
        vector: boolean;
        createdBy: {
            __typename: "Participant";
            id: string;
            identifier: string;
            createdAt: any;
        } | {
            __typename: "Service";
            id: string;
            name: string;
            createdAt: any;
        } | {
            __typename: "User";
            id: string;
            username: string;
            name: string;
            createdAt: any;
        };
        node: {
            __typename: "Attribute";
            id: string;
        } | {
            __typename: "Group";
            id: string;
        } | {
            __typename: "Link";
            id: string;
        } | {
            __typename: "Participant";
            id: string;
        } | {
            __typename: "Scope";
            kind?: string | null | undefined;
            name?: string | null | undefined;
            id: string;
        } | {
            __typename: "Step";
            id: string;
        } | {
            __typename: "Transition";
            id: string;
        } | {
            __typename: "User";
            id: string;
        };
    }[]>;
    setAttribute(input: SetAttributeInput): Promise<{
        __typename: "Attribute";
        id: string;
        createdAt: any;
        private: boolean;
        protected: boolean;
        immutable: boolean;
        ephemeral: boolean;
        deletedAt?: any;
        key: string;
        val?: string | null | undefined;
        index?: number | null | undefined;
        current: boolean;
        version: number;
        vector: boolean;
        createdBy: {
            __typename: "Participant";
            id: string;
            identifier: string;
            createdAt: any;
        } | {
            __typename: "Service";
            id: string;
            name: string;
            createdAt: any;
        } | {
            __typename: "User";
            id: string;
            username: string;
            name: string;
            createdAt: any;
        };
        node: {
            __typename: "Attribute";
            id: string;
        } | {
            __typename: "Group";
            id: string;
        } | {
            __typename: "Link";
            id: string;
        } | {
            __typename: "Participant";
            id: string;
        } | {
            __typename: "Scope";
            kind?: string | null | undefined;
            name?: string | null | undefined;
            id: string;
        } | {
            __typename: "Step";
            id: string;
        } | {
            __typename: "Transition";
            id: string;
        } | {
            __typename: "User";
            id: string;
        };
    } | undefined>;
    /**
     * globalAttributes returns Attributes for the global Scope, which is a singleton
     * permission-less Scope that any client can access, even if not logged in. The
     * name of the global Scope is "global" and can only be updated by Users. All
     * Attributes in this Scope will be returned initially, then any update to
     * Attributes from this Scopes.
     */
    globalAttributes(): Observable<{
        __typename: "SubAttributesPayload";
        isNew: boolean;
        done: boolean;
        attribute?: {
            __typename: "Attribute";
            id: string;
            createdAt: any;
            private: boolean;
            protected: boolean;
            immutable: boolean;
            ephemeral: boolean;
            deletedAt?: any;
            key: string;
            val?: string | null | undefined;
            index?: number | null | undefined;
            current: boolean;
            version: number;
            vector: boolean;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            node: {
                __typename: "Attribute";
                id: string;
            } | {
                __typename: "Group";
                id: string;
            } | {
                __typename: "Link";
                id: string;
            } | {
                __typename: "Participant";
                id: string;
            } | {
                __typename: "Scope";
                kind?: string | null | undefined;
                name?: string | null | undefined;
                id: string;
            } | {
                __typename: "Step";
                id: string;
            } | {
                __typename: "Transition";
                id: string;
            } | {
                __typename: "User";
                id: string;
            };
        } | null | undefined;
    }>;
    query<T = any, TVariables extends object = {}, U = any>(query: TypedDocumentNode<T, TVariables>, variables: TVariables, data: (res: T) => U): Promise<U>;
    mutate<T = any, TVariables extends object = {}, U = any>(mutation: TypedDocumentNode<T, TVariables>, variables: TVariables, data: (res: T) => U | undefined): Promise<U>;
    subscribe<T = any, TVariables extends object = {}, U = any>(query: TypedDocumentNode<T, TVariables>, variables: TVariables, data: (res: T) => U | undefined): Observable<U>;
}
declare class TajribaAdmin extends Tajriba {
    /** addSteps creates new Steps. */
    addSteps(input: AddStepInput[]): Promise<{
        __typename: "Step";
        id: string;
        createdAt: any;
        duration: number;
        startedAt?: any;
        endedAt?: any;
        state: State;
        createdBy: {
            __typename: "Participant";
            id: string;
            identifier: string;
            createdAt: any;
        } | {
            __typename: "Service";
            id: string;
            name: string;
            createdAt: any;
        } | {
            __typename: "User";
            id: string;
            username: string;
            name: string;
            createdAt: any;
        };
        transitions: {
            __typename: "TransitionConnection";
            totalCount: number;
            pageInfo: {
                __typename: "PageInfo";
                hasNextPage: boolean;
                hasPreviousPage: boolean;
                startCursor?: any;
                endCursor?: any;
            };
            edges: {
                __typename: "TransitionEdge";
                cursor: any;
                node: {
                    __typename: "Transition";
                    id: string;
                    createdAt: any;
                    from: State;
                    to: State;
                    createdBy: {
                        __typename: "Participant";
                        id: string;
                        identifier: string;
                        createdAt: any;
                    } | {
                        __typename: "Service";
                        id: string;
                        name: string;
                        createdAt: any;
                    } | {
                        __typename: "User";
                        id: string;
                        username: string;
                        name: string;
                        createdAt: any;
                    };
                    node: {
                        __typename: "Attribute";
                    } | {
                        __typename: "Group";
                    } | {
                        __typename: "Link";
                    } | {
                        __typename: "Participant";
                    } | {
                        __typename: "Scope";
                    } | {
                        __typename: "Step";
                        id: string;
                        duration: number;
                        state: State;
                        startedAt?: any;
                        endedAt?: any;
                    } | {
                        __typename: "Transition";
                    } | {
                        __typename: "User";
                    };
                };
            }[];
        };
    }[]>;
    /** addStep creates a new Step. */
    addStep(input: AddStepInput): Promise<{
        __typename: "Step";
        id: string;
        createdAt: any;
        duration: number;
        startedAt?: any;
        endedAt?: any;
        state: State;
        createdBy: {
            __typename: "Participant";
            id: string;
            identifier: string;
            createdAt: any;
        } | {
            __typename: "Service";
            id: string;
            name: string;
            createdAt: any;
        } | {
            __typename: "User";
            id: string;
            username: string;
            name: string;
            createdAt: any;
        };
        transitions: {
            __typename: "TransitionConnection";
            totalCount: number;
            pageInfo: {
                __typename: "PageInfo";
                hasNextPage: boolean;
                hasPreviousPage: boolean;
                startCursor?: any;
                endCursor?: any;
            };
            edges: {
                __typename: "TransitionEdge";
                cursor: any;
                node: {
                    __typename: "Transition";
                    id: string;
                    createdAt: any;
                    from: State;
                    to: State;
                    createdBy: {
                        __typename: "Participant";
                        id: string;
                        identifier: string;
                        createdAt: any;
                    } | {
                        __typename: "Service";
                        id: string;
                        name: string;
                        createdAt: any;
                    } | {
                        __typename: "User";
                        id: string;
                        username: string;
                        name: string;
                        createdAt: any;
                    };
                    node: {
                        __typename: "Attribute";
                    } | {
                        __typename: "Group";
                    } | {
                        __typename: "Link";
                    } | {
                        __typename: "Participant";
                    } | {
                        __typename: "Scope";
                    } | {
                        __typename: "Step";
                        id: string;
                        duration: number;
                        state: State;
                        startedAt?: any;
                        endedAt?: any;
                    } | {
                        __typename: "Transition";
                    } | {
                        __typename: "User";
                    };
                };
            }[];
        };
    } | undefined>;
    /** steps returns all steps */
    steps(input: StepsQueryVariables): Promise<{
        __typename: "StepConnection";
        totalCount: number;
        edges: {
            __typename: "StepEdge";
            node: {
                __typename: "Step";
                id: string;
                createdAt: any;
                duration: number;
                startedAt?: any;
                endedAt?: any;
                state: State;
                createdBy: {
                    __typename: "Participant";
                    id: string;
                    identifier: string;
                    createdAt: any;
                } | {
                    __typename: "Service";
                    id: string;
                    name: string;
                    createdAt: any;
                } | {
                    __typename: "User";
                    id: string;
                    username: string;
                    name: string;
                    createdAt: any;
                };
                transitions: {
                    __typename: "TransitionConnection";
                    totalCount: number;
                    pageInfo: {
                        __typename: "PageInfo";
                        hasNextPage: boolean;
                        hasPreviousPage: boolean;
                        startCursor?: any;
                        endCursor?: any;
                    };
                    edges: {
                        __typename: "TransitionEdge";
                        cursor: any;
                        node: {
                            __typename: "Transition";
                            id: string;
                            createdAt: any;
                            from: State;
                            to: State;
                            createdBy: {
                                __typename: "Participant";
                                id: string;
                                identifier: string;
                                createdAt: any;
                            } | {
                                __typename: "Service";
                                id: string;
                                name: string;
                                createdAt: any;
                            } | {
                                __typename: "User";
                                id: string;
                                username: string;
                                name: string;
                                createdAt: any;
                            };
                            node: {
                                __typename: "Attribute";
                            } | {
                                __typename: "Group";
                            } | {
                                __typename: "Link";
                            } | {
                                __typename: "Participant";
                            } | {
                                __typename: "Scope";
                            } | {
                                __typename: "Step";
                                id: string;
                                duration: number;
                                state: State;
                                startedAt?: any;
                                endedAt?: any;
                            } | {
                                __typename: "Transition";
                            } | {
                                __typename: "User";
                            };
                        };
                    }[];
                };
            };
        }[];
        pageInfo: {
            __typename: "PageInfo";
            hasNextPage: boolean;
            hasPreviousPage: boolean;
            startCursor?: any;
            endCursor?: any;
        };
    } | null | undefined>;
    /** addGroups creates new Groups. */
    addGroups(input: AddGroupInput[]): Promise<{
        __typename: "Group";
        id: string;
    }[]>;
    /** addGroup creates a new Group. */
    addGroup(input: AddGroupInput): Promise<{
        __typename: "Group";
        id: string;
    } | undefined>;
    /** groups returns all groups */
    groups(input: GroupsQueryVariables): Promise<{
        __typename: "GroupConnection";
        totalCount: number;
        edges: {
            __typename: "GroupEdge";
            node: {
                __typename: "Group";
                id: string;
                createdAt: any;
                createdBy: {
                    __typename: "Participant";
                    id: string;
                    identifier: string;
                    createdAt: any;
                } | {
                    __typename: "Service";
                    id: string;
                    name: string;
                    createdAt: any;
                } | {
                    __typename: "User";
                    id: string;
                    username: string;
                    name: string;
                    createdAt: any;
                };
            };
        }[];
        pageInfo: {
            __typename: "PageInfo";
            hasNextPage: boolean;
            hasPreviousPage: boolean;
            startCursor?: any;
            endCursor?: any;
        };
    } | null | undefined>;
    /** addScopes creates new Scopes. */
    addScopes(input: AddScopeInput[]): Promise<{
        __typename: "Scope";
        id: string;
        name?: string | null | undefined;
        kind?: string | null | undefined;
        createdAt: any;
        createdBy: {
            __typename: "Participant";
            id: string;
            identifier: string;
            createdAt: any;
        } | {
            __typename: "Service";
            id: string;
            name: string;
            createdAt: any;
        } | {
            __typename: "User";
            id: string;
            username: string;
            name: string;
            createdAt: any;
        };
        attributes: {
            __typename: "AttributeConnection";
            totalCount: number;
            pageInfo: {
                __typename: "PageInfo";
                hasNextPage: boolean;
                hasPreviousPage: boolean;
                startCursor?: any;
                endCursor?: any;
            };
            edges: {
                __typename: "AttributeEdge";
                cursor: any;
                node: {
                    __typename: "Attribute";
                    id: string;
                    createdAt: any;
                    private: boolean;
                    protected: boolean;
                    immutable: boolean;
                    ephemeral: boolean;
                    deletedAt?: any;
                    key: string;
                    val?: string | null | undefined;
                    index?: number | null | undefined;
                    current: boolean;
                    version: number;
                    vector: boolean;
                    createdBy: {
                        __typename: "Participant";
                        id: string;
                        identifier: string;
                        createdAt: any;
                    } | {
                        __typename: "Service";
                        id: string;
                        name: string;
                        createdAt: any;
                    } | {
                        __typename: "User";
                        id: string;
                        username: string;
                        name: string;
                        createdAt: any;
                    };
                    node: {
                        __typename: "Attribute";
                        id: string;
                    } | {
                        __typename: "Group";
                        id: string;
                    } | {
                        __typename: "Link";
                        id: string;
                    } | {
                        __typename: "Participant";
                        id: string;
                    } | {
                        __typename: "Scope";
                        kind?: string | null | undefined;
                        name?: string | null | undefined;
                        id: string;
                    } | {
                        __typename: "Step";
                        id: string;
                    } | {
                        __typename: "Transition";
                        id: string;
                    } | {
                        __typename: "User";
                        id: string;
                    };
                };
            }[];
        };
    }[]>;
    /** addScope creates a new Scope. */
    addScope(input: AddScopeInput): Promise<{
        __typename: "Scope";
        id: string;
        name?: string | null | undefined;
        kind?: string | null | undefined;
        createdAt: any;
        createdBy: {
            __typename: "Participant";
            id: string;
            identifier: string;
            createdAt: any;
        } | {
            __typename: "Service";
            id: string;
            name: string;
            createdAt: any;
        } | {
            __typename: "User";
            id: string;
            username: string;
            name: string;
            createdAt: any;
        };
        attributes: {
            __typename: "AttributeConnection";
            totalCount: number;
            pageInfo: {
                __typename: "PageInfo";
                hasNextPage: boolean;
                hasPreviousPage: boolean;
                startCursor?: any;
                endCursor?: any;
            };
            edges: {
                __typename: "AttributeEdge";
                cursor: any;
                node: {
                    __typename: "Attribute";
                    id: string;
                    createdAt: any;
                    private: boolean;
                    protected: boolean;
                    immutable: boolean;
                    ephemeral: boolean;
                    deletedAt?: any;
                    key: string;
                    val?: string | null | undefined;
                    index?: number | null | undefined;
                    current: boolean;
                    version: number;
                    vector: boolean;
                    createdBy: {
                        __typename: "Participant";
                        id: string;
                        identifier: string;
                        createdAt: any;
                    } | {
                        __typename: "Service";
                        id: string;
                        name: string;
                        createdAt: any;
                    } | {
                        __typename: "User";
                        id: string;
                        username: string;
                        name: string;
                        createdAt: any;
                    };
                    node: {
                        __typename: "Attribute";
                        id: string;
                    } | {
                        __typename: "Group";
                        id: string;
                    } | {
                        __typename: "Link";
                        id: string;
                    } | {
                        __typename: "Participant";
                        id: string;
                    } | {
                        __typename: "Scope";
                        kind?: string | null | undefined;
                        name?: string | null | undefined;
                        id: string;
                    } | {
                        __typename: "Step";
                        id: string;
                    } | {
                        __typename: "Transition";
                        id: string;
                    } | {
                        __typename: "User";
                        id: string;
                    };
                };
            }[];
        };
    } | undefined>;
    /**
     * scopes returns all scopes
     * If filter is provided it will return scopes matching any
     * ScopedAttributesInput.
     */
    scopes(input: ScopesQueryVariables): Promise<{
        __typename: "ScopeConnection";
        totalCount: number;
        edges: {
            __typename: "ScopeEdge";
            node: {
                __typename: "Scope";
                id: string;
                name?: string | null | undefined;
                kind?: string | null | undefined;
                createdAt: any;
                createdBy: {
                    __typename: "Participant";
                    id: string;
                    identifier: string;
                    createdAt: any;
                } | {
                    __typename: "Service";
                    id: string;
                    name: string;
                    createdAt: any;
                } | {
                    __typename: "User";
                    id: string;
                    username: string;
                    name: string;
                    createdAt: any;
                };
                attributes: {
                    __typename: "AttributeConnection";
                    totalCount: number;
                    pageInfo: {
                        __typename: "PageInfo";
                        hasNextPage: boolean;
                        hasPreviousPage: boolean;
                        startCursor?: any;
                        endCursor?: any;
                    };
                    edges: {
                        __typename: "AttributeEdge";
                        cursor: any;
                        node: {
                            __typename: "Attribute";
                            id: string;
                            createdAt: any;
                            private: boolean;
                            protected: boolean;
                            immutable: boolean;
                            ephemeral: boolean;
                            deletedAt?: any;
                            key: string;
                            val?: string | null | undefined;
                            index?: number | null | undefined;
                            current: boolean;
                            version: number;
                            vector: boolean;
                            createdBy: {
                                __typename: "Participant";
                                id: string;
                                identifier: string;
                                createdAt: any;
                            } | {
                                __typename: "Service";
                                id: string;
                                name: string;
                                createdAt: any;
                            } | {
                                __typename: "User";
                                id: string;
                                username: string;
                                name: string;
                                createdAt: any;
                            };
                            node: {
                                __typename: "Attribute";
                                id: string;
                            } | {
                                __typename: "Group";
                                id: string;
                            } | {
                                __typename: "Link";
                                id: string;
                            } | {
                                __typename: "Participant";
                                id: string;
                            } | {
                                __typename: "Scope";
                                kind?: string | null | undefined;
                                name?: string | null | undefined;
                                id: string;
                            } | {
                                __typename: "Step";
                                id: string;
                            } | {
                                __typename: "Transition";
                                id: string;
                            } | {
                                __typename: "User";
                                id: string;
                            };
                        };
                    }[];
                };
            };
        }[];
        pageInfo: {
            __typename: "PageInfo";
            hasNextPage: boolean;
            hasPreviousPage: boolean;
            startCursor?: any;
            endCursor?: any;
        };
    } | null | undefined>;
    /**
     * attributes returns all attributes for a scope.
     */
    attributes(input: AttributesQueryVariables): Promise<{
        __typename: "AttributeConnection";
        totalCount: number;
        pageInfo: {
            __typename: "PageInfo";
            hasNextPage: boolean;
            hasPreviousPage: boolean;
            startCursor?: any;
            endCursor?: any;
        };
        edges: {
            __typename: "AttributeEdge";
            cursor: any;
            node: {
                __typename: "Attribute";
                id: string;
                createdAt: any;
                private: boolean;
                protected: boolean;
                immutable: boolean;
                ephemeral: boolean;
                deletedAt?: any;
                key: string;
                val?: string | null | undefined;
                index?: number | null | undefined;
                current: boolean;
                version: number;
                vector: boolean;
                createdBy: {
                    __typename: "Participant";
                    id: string;
                    identifier: string;
                    createdAt: any;
                } | {
                    __typename: "Service";
                    id: string;
                    name: string;
                    createdAt: any;
                } | {
                    __typename: "User";
                    id: string;
                    username: string;
                    name: string;
                    createdAt: any;
                };
                node: {
                    __typename: "Attribute";
                    id: string;
                } | {
                    __typename: "Group";
                    id: string;
                } | {
                    __typename: "Link";
                    id: string;
                } | {
                    __typename: "Participant";
                    id: string;
                } | {
                    __typename: "Scope";
                    kind?: string | null | undefined;
                    name?: string | null | undefined;
                    id: string;
                } | {
                    __typename: "Step";
                    id: string;
                } | {
                    __typename: "Transition";
                    id: string;
                } | {
                    __typename: "User";
                    id: string;
                };
            };
        }[];
    } | null | undefined>;
    /** participants returns all Participants in the system. */
    participants(input: ParticipantsQueryVariables): Promise<{
        __typename: "ParticipantConnection";
        totalCount: number;
        edges: {
            __typename: "ParticipantEdge";
            node: {
                __typename: "Participant";
                id: string;
                createdAt: any;
                identifier: string;
            };
        }[];
        pageInfo: {
            __typename: "PageInfo";
            hasNextPage: boolean;
            hasPreviousPage: boolean;
            startCursor?: any;
            endCursor?: any;
        };
    } | null | undefined>;
    /** transition transitions a Step from one state to the next. */
    transition(input: TransitionInput): Promise<{
        __typename: "Transition";
        id: string;
        createdAt: any;
        from: State;
        to: State;
        createdBy: {
            __typename: "Participant";
            id: string;
            identifier: string;
            createdAt: any;
        } | {
            __typename: "Service";
            id: string;
            name: string;
            createdAt: any;
        } | {
            __typename: "User";
            id: string;
            username: string;
            name: string;
            createdAt: any;
        };
        node: {
            __typename: "Attribute";
        } | {
            __typename: "Group";
        } | {
            __typename: "Link";
        } | {
            __typename: "Participant";
        } | {
            __typename: "Scope";
        } | {
            __typename: "Step";
            id: string;
            duration: number;
            state: State;
            startedAt?: any;
            endedAt?: any;
        } | {
            __typename: "Transition";
        } | {
            __typename: "User";
        };
    }>;
    /** addLink adds Links object between Participants and Nodes. */
    addLink(input: LinkInput): Promise<{
        __typename: "LinkPayload";
        nodes: ({
            __typename: "Attribute";
            id: string;
        } | {
            __typename: "Group";
            id: string;
        } | {
            __typename: "Link";
            id: string;
        } | {
            __typename: "Participant";
            id: string;
        } | {
            __typename: "Scope";
            id: string;
        } | {
            __typename: "Step";
            id: string;
        } | {
            __typename: "Transition";
            id: string;
        } | {
            __typename: "User";
            id: string;
        })[];
        participants: {
            __typename: "Participant";
            id: string;
        }[];
    }>;
    /** links Participants to Nodes. */
    link(input: LinkInput): Promise<{
        __typename: "LinkPayload";
        nodes: ({
            __typename: "Attribute";
            id: string;
        } | {
            __typename: "Group";
            id: string;
        } | {
            __typename: "Link";
            id: string;
        } | {
            __typename: "Participant";
            id: string;
        } | {
            __typename: "Scope";
            id: string;
        } | {
            __typename: "Step";
            id: string;
        } | {
            __typename: "Transition";
            id: string;
        } | {
            __typename: "User";
            id: string;
        })[];
        participants: {
            __typename: "Participant";
            id: string;
        }[];
    }>;
    /** unlinks Participants from Nodes. */
    unlink(input: LinkInput): Promise<{
        __typename: "LinkPayload";
        nodes: ({
            __typename: "Attribute";
            id: string;
        } | {
            __typename: "Group";
            id: string;
        } | {
            __typename: "Link";
            id: string;
        } | {
            __typename: "Participant";
            id: string;
        } | {
            __typename: "Scope";
            id: string;
        } | {
            __typename: "Step";
            id: string;
        } | {
            __typename: "Transition";
            id: string;
        } | {
            __typename: "User";
            id: string;
        })[];
        participants: {
            __typename: "Participant";
            id: string;
        }[];
    }>;
    /**
     * scopedAttributes returns Attributes for Scopes matching the keys or KVs input.
     * keys or KVs (only one) must be provided. All Attributes in Scopes matching
     * will be returned initially, then any update to Attributes within the matching
     * Scopes.
     */
    scopedAttributes(
    /** SubAttributesPayload is the return payload for the addScope mutation. */
    input: ScopedAttributesInput[]): Observable<{
        __typename: "SubAttributesPayload";
        isNew: boolean;
        scopesUpdated?: string[] | null | undefined;
        done: boolean;
        attribute?: {
            __typename: "Attribute";
            id: string;
            createdAt: any;
            private: boolean;
            protected: boolean;
            immutable: boolean;
            ephemeral: boolean;
            deletedAt?: any;
            key: string;
            val?: string | null | undefined;
            index?: number | null | undefined;
            current: boolean;
            version: number;
            vector: boolean;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            node: {
                __typename: "Attribute";
                id: string;
            } | {
                __typename: "Group";
                id: string;
            } | {
                __typename: "Link";
                id: string;
            } | {
                __typename: "Participant";
                id: string;
            } | {
                __typename: "Scope";
                kind?: string | null | undefined;
                name?: string | null | undefined;
                id: string;
            } | {
                __typename: "Step";
                id: string;
            } | {
                __typename: "Transition";
                id: string;
            } | {
                __typename: "User";
                id: string;
            };
        } | null | undefined;
    }>;
    /**
     * onEvent attaches hooks to specified events. Optionally, a nodeType and nodeID
     * can be specified to only look at events for a particular record.
     */
    onEvent(
    /** OnEventInput is the input for the onEvent subscription. */
    input: OnEventInput): Observable<{
        __typename: "OnEventPayload";
        eventID: string;
        eventType: EventType;
        done: boolean;
        node?: {
            __typename: "Attribute";
            createdAt: any;
            private: boolean;
            protected: boolean;
            immutable: boolean;
            ephemeral: boolean;
            deletedAt?: any;
            key: string;
            val?: string | null | undefined;
            index?: number | null | undefined;
            current: boolean;
            version: number;
            vector: boolean;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            node: {
                __typename: "Attribute";
                id: string;
            } | {
                __typename: "Group";
                id: string;
            } | {
                __typename: "Link";
                id: string;
            } | {
                __typename: "Participant";
                id: string;
            } | {
                __typename: "Scope";
                kind?: string | null | undefined;
                name?: string | null | undefined;
                id: string;
            } | {
                __typename: "Step";
                id: string;
            } | {
                __typename: "Transition";
                id: string;
            } | {
                __typename: "User";
                id: string;
            };
        } | {
            __typename: "Group";
            createdAt: any;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
        } | {
            __typename: "Link";
            createdAt: any;
            link: boolean;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            participant: {
                __typename: "Participant";
                id: string;
            };
            node: {
                __typename: "Attribute";
                id: string;
            } | {
                __typename: "Group";
                id: string;
            } | {
                __typename: "Link";
                id: string;
            } | {
                __typename: "Participant";
                id: string;
            } | {
                __typename: "Scope";
                id: string;
            } | {
                __typename: "Step";
                id: string;
            } | {
                __typename: "Transition";
                id: string;
            } | {
                __typename: "User";
                id: string;
            };
        } | {
            __typename: "Participant";
            createdAt: any;
            identifier: string;
            id: string;
        } | {
            __typename: "Scope";
            name?: string | null | undefined;
            kind?: string | null | undefined;
            createdAt: any;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            attributes: {
                __typename: "AttributeConnection";
                totalCount: number;
                pageInfo: {
                    __typename: "PageInfo";
                    hasNextPage: boolean;
                    hasPreviousPage: boolean;
                    startCursor?: any;
                    endCursor?: any;
                };
                edges: {
                    __typename: "AttributeEdge";
                    cursor: any;
                    node: {
                        __typename: "Attribute";
                        id: string;
                        createdAt: any;
                        private: boolean;
                        protected: boolean;
                        immutable: boolean;
                        ephemeral: boolean;
                        deletedAt?: any;
                        key: string;
                        val?: string | null | undefined;
                        index?: number | null | undefined;
                        current: boolean;
                        version: number;
                        vector: boolean;
                        createdBy: {
                            __typename: "Participant";
                            id: string;
                            identifier: string;
                            createdAt: any;
                        } | {
                            __typename: "Service";
                            id: string;
                            name: string;
                            createdAt: any;
                        } | {
                            __typename: "User";
                            id: string;
                            username: string;
                            name: string;
                            createdAt: any;
                        };
                        node: {
                            __typename: "Attribute";
                            id: string;
                        } | {
                            __typename: "Group";
                            id: string;
                        } | {
                            __typename: "Link";
                            id: string;
                        } | {
                            __typename: "Participant";
                            id: string;
                        } | {
                            __typename: "Scope";
                            kind?: string | null | undefined;
                            name?: string | null | undefined;
                            id: string;
                        } | {
                            __typename: "Step";
                            id: string;
                        } | {
                            __typename: "Transition";
                            id: string;
                        } | {
                            __typename: "User";
                            id: string;
                        };
                    };
                }[];
            };
        } | {
            __typename: "Step";
            createdAt: any;
            duration: number;
            startedAt?: any;
            endedAt?: any;
            state: State;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            transitions: {
                __typename: "TransitionConnection";
                totalCount: number;
                pageInfo: {
                    __typename: "PageInfo";
                    hasNextPage: boolean;
                    hasPreviousPage: boolean;
                    startCursor?: any;
                    endCursor?: any;
                };
                edges: {
                    __typename: "TransitionEdge";
                    cursor: any;
                    node: {
                        __typename: "Transition";
                        id: string;
                        createdAt: any;
                        from: State;
                        to: State;
                        createdBy: {
                            __typename: "Participant";
                            id: string;
                            identifier: string;
                            createdAt: any;
                        } | {
                            __typename: "Service";
                            id: string;
                            name: string;
                            createdAt: any;
                        } | {
                            __typename: "User";
                            id: string;
                            username: string;
                            name: string;
                            createdAt: any;
                        };
                        node: {
                            __typename: "Attribute";
                        } | {
                            __typename: "Group";
                        } | {
                            __typename: "Link";
                        } | {
                            __typename: "Participant";
                        } | {
                            __typename: "Scope";
                        } | {
                            __typename: "Step";
                            id: string;
                            duration: number;
                            state: State;
                            startedAt?: any;
                            endedAt?: any;
                        } | {
                            __typename: "Transition";
                        } | {
                            __typename: "User";
                        };
                    };
                }[];
            };
        } | {
            __typename: "Transition";
            createdAt: any;
            from: State;
            to: State;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            node: {
                __typename: "Attribute";
            } | {
                __typename: "Group";
            } | {
                __typename: "Link";
            } | {
                __typename: "Participant";
            } | {
                __typename: "Scope";
            } | {
                __typename: "Step";
                id: string;
                duration: number;
                state: State;
                startedAt?: any;
                endedAt?: any;
            } | {
                __typename: "Transition";
            } | {
                __typename: "User";
            };
        } | {
            __typename: "User";
            id: string;
        } | null | undefined;
    }>;
    /** onAnyEvent works like onEvent, except all events are subscribed to. */
    onAnyEvent(
    /** OnAnyEventInput is the input for the onAnyEvent subscription. */
    input: OnAnyEventInput): Observable<{
        __typename: "OnEventPayload";
        eventID: string;
        eventType: EventType;
        done: boolean;
        node?: {
            __typename: "Attribute";
            createdAt: any;
            private: boolean;
            protected: boolean;
            immutable: boolean;
            ephemeral: boolean;
            deletedAt?: any;
            key: string;
            val?: string | null | undefined;
            index?: number | null | undefined;
            current: boolean;
            version: number;
            vector: boolean;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            node: {
                __typename: "Attribute";
                id: string;
            } | {
                __typename: "Group";
                id: string;
            } | {
                __typename: "Link";
                id: string;
            } | {
                __typename: "Participant";
                id: string;
            } | {
                __typename: "Scope";
                kind?: string | null | undefined;
                name?: string | null | undefined;
                id: string;
            } | {
                __typename: "Step";
                id: string;
            } | {
                __typename: "Transition";
                id: string;
            } | {
                __typename: "User";
                id: string;
            };
        } | {
            __typename: "Group";
            createdAt: any;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
        } | {
            __typename: "Link";
            createdAt: any;
            link: boolean;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            participant: {
                __typename: "Participant";
                id: string;
            };
            node: {
                __typename: "Attribute";
                id: string;
            } | {
                __typename: "Group";
                id: string;
            } | {
                __typename: "Link";
                id: string;
            } | {
                __typename: "Participant";
                id: string;
            } | {
                __typename: "Scope";
                id: string;
            } | {
                __typename: "Step";
                id: string;
            } | {
                __typename: "Transition";
                id: string;
            } | {
                __typename: "User";
                id: string;
            };
        } | {
            __typename: "Participant";
            createdAt: any;
            identifier: string;
            id: string;
        } | {
            __typename: "Scope";
            name?: string | null | undefined;
            kind?: string | null | undefined;
            createdAt: any;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            attributes: {
                __typename: "AttributeConnection";
                totalCount: number;
                pageInfo: {
                    __typename: "PageInfo";
                    hasNextPage: boolean;
                    hasPreviousPage: boolean;
                    startCursor?: any;
                    endCursor?: any;
                };
                edges: {
                    __typename: "AttributeEdge";
                    cursor: any;
                    node: {
                        __typename: "Attribute";
                        id: string;
                        createdAt: any;
                        private: boolean;
                        protected: boolean;
                        immutable: boolean;
                        ephemeral: boolean;
                        deletedAt?: any;
                        key: string;
                        val?: string | null | undefined;
                        index?: number | null | undefined;
                        current: boolean;
                        version: number;
                        vector: boolean;
                        createdBy: {
                            __typename: "Participant";
                            id: string;
                            identifier: string;
                            createdAt: any;
                        } | {
                            __typename: "Service";
                            id: string;
                            name: string;
                            createdAt: any;
                        } | {
                            __typename: "User";
                            id: string;
                            username: string;
                            name: string;
                            createdAt: any;
                        };
                        node: {
                            __typename: "Attribute";
                            id: string;
                        } | {
                            __typename: "Group";
                            id: string;
                        } | {
                            __typename: "Link";
                            id: string;
                        } | {
                            __typename: "Participant";
                            id: string;
                        } | {
                            __typename: "Scope";
                            kind?: string | null | undefined;
                            name?: string | null | undefined;
                            id: string;
                        } | {
                            __typename: "Step";
                            id: string;
                        } | {
                            __typename: "Transition";
                            id: string;
                        } | {
                            __typename: "User";
                            id: string;
                        };
                    };
                }[];
            };
        } | {
            __typename: "Step";
            createdAt: any;
            duration: number;
            startedAt?: any;
            endedAt?: any;
            state: State;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            transitions: {
                __typename: "TransitionConnection";
                totalCount: number;
                pageInfo: {
                    __typename: "PageInfo";
                    hasNextPage: boolean;
                    hasPreviousPage: boolean;
                    startCursor?: any;
                    endCursor?: any;
                };
                edges: {
                    __typename: "TransitionEdge";
                    cursor: any;
                    node: {
                        __typename: "Transition";
                        id: string;
                        createdAt: any;
                        from: State;
                        to: State;
                        createdBy: {
                            __typename: "Participant";
                            id: string;
                            identifier: string;
                            createdAt: any;
                        } | {
                            __typename: "Service";
                            id: string;
                            name: string;
                            createdAt: any;
                        } | {
                            __typename: "User";
                            id: string;
                            username: string;
                            name: string;
                            createdAt: any;
                        };
                        node: {
                            __typename: "Attribute";
                        } | {
                            __typename: "Group";
                        } | {
                            __typename: "Link";
                        } | {
                            __typename: "Participant";
                        } | {
                            __typename: "Scope";
                        } | {
                            __typename: "Step";
                            id: string;
                            duration: number;
                            state: State;
                            startedAt?: any;
                            endedAt?: any;
                        } | {
                            __typename: "Transition";
                        } | {
                            __typename: "User";
                        };
                    };
                }[];
            };
        } | {
            __typename: "Transition";
            createdAt: any;
            from: State;
            to: State;
            id: string;
            createdBy: {
                __typename: "Participant";
                id: string;
                identifier: string;
                createdAt: any;
            } | {
                __typename: "Service";
                id: string;
                name: string;
                createdAt: any;
            } | {
                __typename: "User";
                id: string;
                username: string;
                name: string;
                createdAt: any;
            };
            node: {
                __typename: "Attribute";
            } | {
                __typename: "Group";
            } | {
                __typename: "Link";
            } | {
                __typename: "Participant";
            } | {
                __typename: "Scope";
            } | {
                __typename: "Step";
                id: string;
                duration: number;
                state: State;
                startedAt?: any;
                endedAt?: any;
            } | {
                __typename: "Transition";
            } | {
                __typename: "User";
            };
        } | {
            __typename: "User";
            id: string;
        } | null | undefined;
    }>;
}
interface ParticipantIdent {
    id: string;
    identifier: string;
}
declare class TajribaParticipant extends Tajriba {
    readonly url: string;
    readonly token: string;
    participant: ParticipantIdent;
    constructor(url: string, token: string, participant: ParticipantIdent);
    get id(): string;
    get identifier(): string;
    /**
     * changes returns changes of interest for the Participant.
     * */
    changes(): Observable<{
        __typename: "ChangePayload";
        done: boolean;
        removed?: boolean | null | undefined;
        change?: {
            __typename: "AttributeChange";
            id: string;
            nodeID: string;
            deleted: boolean;
            createdAt: any;
            isNew: boolean;
            index?: number | null | undefined;
            vector: boolean;
            version: number;
            key: string;
            val?: string | null | undefined;
        } | {
            __typename: "ParticipantChange";
            id: string;
        } | {
            __typename: "ScopeChange";
            id: string;
            name?: string | null | undefined;
            kind?: string | null | undefined;
        } | {
            __typename: "StepChange";
            id: string;
            state: State;
            since?: any;
            remaining?: number | null | undefined;
            elapsed?: number | null | undefined;
            running: boolean;
        } | null | undefined;
    }>;
}

export { Actor, AddGroupInput, AddGroupInputSchema, AddGroupPayload, AddGroupsDocument, AddGroupsMutation, AddGroupsMutationVariables, AddParticipantDocument, AddParticipantInput, AddParticipantInputSchema, AddParticipantMutation, AddParticipantMutationVariables, AddParticipantPayload, AddScopeInput, AddScopeInputSchema, AddScopePayload, AddScopesDocument, AddScopesMutation, AddScopesMutationVariables, AddStepInput, AddStepInputSchema, AddStepPayload, AddStepsDocument, AddStepsMutation, AddStepsMutationVariables, Admin, Attribute, AttributeChange, AttributeConnection, AttributeEdge, AttributeVersionsArgs, AttributesDocument, AttributesQuery, AttributesQueryVariables, Change, ChangePayload, ChangesDocument, ChangesSubscription, ChangesSubscriptionVariables, EventType, EventTypeSchema, Exact, GlobalAttributesDocument, GlobalAttributesSubscription, GlobalAttributesSubscriptionVariables, Group, GroupConnection, GroupEdge, GroupLinksArgs, GroupsDocument, GroupsQuery, GroupsQueryVariables, InputMaybe, Kv, KvSchema, Link, LinkConnection, LinkDocument, LinkEdge, LinkInput, LinkInputSchema, LinkMutation, LinkMutationVariables, LinkPayload, LoginDocument, LoginInput, LoginInputSchema, LoginMutation, LoginMutationVariables, LoginPayload, MakeMaybe, MakeOptional, Maybe, Mutation, MutationAddGroupsArgs, MutationAddParticipantArgs, MutationAddScopesArgs, MutationAddStepsArgs, MutationLinkArgs, MutationLoginArgs, MutationRegisterServiceArgs, MutationSetAttributesArgs, MutationTokenLoginArgs, MutationTransitionArgs, Node, OnAnyEventDocument, OnAnyEventInput, OnAnyEventInputSchema, OnAnyEventSubscription, OnAnyEventSubscriptionVariables, OnEventDocument, OnEventInput, OnEventInputSchema, OnEventPayload, OnEventSubscription, OnEventSubscriptionVariables, OrderDirection, OrderDirectionSchema, PageInfo, Participant, ParticipantChange, ParticipantConnection, ParticipantEdge, ParticipantIdent, ParticipantLinksArgs, ParticipantsDocument, ParticipantsQuery, ParticipantsQueryVariables, Query, QueryAttributesArgs, QueryGroupsArgs, QueryParticipantsArgs, QueryScopesArgs, QueryStepsArgs, RegisterServiceDocument, RegisterServiceInput, RegisterServiceInputSchema, RegisterServiceMutation, RegisterServiceMutationVariables, RegisterServicePayload, Role, RoleSchema, Scalars, Scope, ScopeAttributesArgs, ScopeChange, ScopeConnection, ScopeEdge, ScopeLinksArgs, ScopedAttributesDocument, ScopedAttributesInput, ScopedAttributesInputSchema, ScopedAttributesSubscription, ScopedAttributesSubscriptionVariables, ScopesDocument, ScopesQuery, ScopesQueryVariables, Service, SetAttributeInput, SetAttributeInputSchema, SetAttributePayload, SetAttributesDocument, SetAttributesMutation, SetAttributesMutationVariables, State, StateSchema, Step, StepChange, StepConnection, StepEdge, StepLinksArgs, StepOrder, StepOrderField, StepOrderFieldSchema, StepOrderSchema, StepTransitionsArgs, StepsDocument, StepsQuery, StepsQueryVariables, SubAttributesPayload, Subscription, SubscriptionOnAnyEventArgs, SubscriptionOnEventArgs, SubscriptionScopedAttributesArgs, Tajriba, TajribaAdmin, TajribaEvents, TajribaParticipant, TokenLoginDocument, TokenLoginInput, TokenLoginInputSchema, TokenLoginMutation, TokenLoginMutationVariables, Transition, TransitionConnection, TransitionDocument, TransitionEdge, TransitionInput, TransitionInputSchema, TransitionMutation, TransitionMutationVariables, TransitionPayload, User, definedNonNullAnySchema, isDefinedNonNullAny };
