# Class CyberDeepClient<L>

#### Type Parameters

- L extends Link<string> = Link<string>

#### Hierarchy (view full)

- DeepClient<L>
  - CyberDeepClient

#### Implements

- CyberDeepClientInstance<L>

- Defined in work/deeplinks/deeplinks/imports/cyber.tsx:289

#####
Index

### Constructors

constructor

### Properties

DeepClient
DeepContext
DeepProvider
_byId
_loadedValues
accountPrefix
apolloClient
canSelectReturning?
client
config
cyberClient
deep
defaultDeleteName?
defaultInsertName?
defaultSelectName?
defaultUpdateName?
deleteReturning?
filesSelectReturning?
handleAuth?
handlersSelectReturning?
helia
insertReturning?
linkId?
linksSelectReturning?
local?
minilinks
models
namespace?
remote?
returning?
schemas
selectReturning?
selectorsSelectReturning?
silent
table?
token?
treeSelectReturning?
unsafe?
unvertualizeId
updateReturning?
useDeep
useDeepId
useDeepQuery
useDeepSubscription
useMinilinksApply
useMinilinksQuery
useMinilinksSubscription
valuesSelectReturning?
resolveDependency?

### Methods

Packager
Traveler
_findHandler
_generateHooks
_generateQuery
_generateResult
_silent
await
can
delete
eval
guest
id
idLocal
ids
import
insert
jwt
login
logout
name
nameLocal
reserve
select
serial
serializeQuery
serializeWhere
stringify
subscribe
update
value
whoami

##
Constructors

### constructor

- new CyberDeepClient<L>(options): CyberDeepClient<L>

- #### Type Parameters

  - L extends Link<string> = Link<string>

  #### Parameters

  - options: CyberDeepClientOptions<L>

  #### Returns CyberDeepClient<L>

  Overrides DeepClient.constructor

  - Defined in work/deeplinks/deeplinks/imports/cyber.tsx:308

##
Properties

### DeepClient

DeepClient: typeof DeepClient = DeepClient

Implementation of CyberDeepClientInstance.DeepClient

Inherited from DeepClient.DeepClient

- Defined in work/deeplinks/deeplinks/imports/client.tsx:773

### DeepContext

DeepContext: Context<CyberDeepClient<Link<string>>> = CyberDeepContext

Implementation of CyberDeepClientInstance.DeepContext

Overrides DeepClient.DeepContext

- Defined in work/deeplinks/deeplinks/imports/cyber.tsx:305

### DeepProvider

DeepProvider: ((__namedParameters: {
children?: any;
minilinks?: MinilinkCollection<any, Link<Id>>;
namespace?: string;
}) => Element) = CyberDeepProvider

Implementation of CyberDeepClientInstance.DeepProvider

Overrides DeepClient.DeepProvider

- Defined in work/deeplinks/deeplinks/imports/cyber.tsx:304

### _byId

_byId: {
[id: string]: any;
} = {}

- Defined in work/deeplinks/deeplinks/imports/cyber.tsx:298

### _loadedValues

_loadedValues: any = {}

- Defined in work/deeplinks/deeplinks/imports/cyber.tsx:365

### accountPrefix

accountPrefix: string

- Defined in work/deeplinks/deeplinks/imports/cyber.tsx:296

### apolloClient

apolloClient: IApolloClient<any>

Implementation of CyberDeepClientInstance.apolloClient

Inherited from DeepClient.apolloClient

- Defined in work/deeplinks/deeplinks/imports/client.tsx:776

### `Optional` canSelectReturning

canSelectReturning?: string

Implementation of CyberDeepClientInstance.canSelectReturning

Inherited from DeepClient.canSelectReturning

- Defined in work/deeplinks/deeplinks/imports/client.tsx:784

### client

client: IApolloClient<any>

Inherited from DeepClient.client

- Defined in work/deeplinks/deeplinks/imports/client.tsx:775

### config

config: CONFIG

- Defined in work/deeplinks/deeplinks/imports/cyber.tsx:294

### cyberClient

cyberClient: CyberClient

- Defined in work/deeplinks/deeplinks/imports/cyber.tsx:292

### deep

deep: DeepClientInstance<L>

Implementation of CyberDeepClientInstance.deep

Inherited from DeepClient.deep

- Defined in work/deeplinks/deeplinks/imports/client.tsx:772

### `Optional` defaultDeleteName

defaultDeleteName?: string

Implementation of CyberDeepClientInstance.defaultDeleteName

Inherited from DeepClient.defaultDeleteName

- Defined in work/deeplinks/deeplinks/imports/client.tsx:796

### `Optional` defaultInsertName

defaultInsertName?: string

Implementation of CyberDeepClientInstance.defaultInsertName

Inherited from DeepClient.defaultInsertName

- Defined in work/deeplinks/deeplinks/imports/client.tsx:794

### `Optional` defaultSelectName

defaultSelectName?: string

Implementation of CyberDeepClientInstance.defaultSelectName

Inherited from DeepClient.defaultSelectName

- Defined in work/deeplinks/deeplinks/imports/client.tsx:793

### `Optional` defaultUpdateName

defaultUpdateName?: string

Implementation of CyberDeepClientInstance.defaultUpdateName

Inherited from DeepClient.defaultUpdateName

- Defined in work/deeplinks/deeplinks/imports/client.tsx:795

### `Optional` deleteReturning

deleteReturning?: string

Implementation of CyberDeepClientInstance.deleteReturning

Inherited from DeepClient.deleteReturning

- Defined in work/deeplinks/deeplinks/imports/client.tsx:791

### `Optional` filesSelectReturning

filesSelectReturning?: string

Implementation of CyberDeepClientInstance.filesSelectReturning

Inherited from DeepClient.filesSelectReturning

- Defined in work/deeplinks/deeplinks/imports/client.tsx:787

### `Optional` handleAuth

handleAuth?: ((linkId?: Id, token?: string) => any)

Implementation of CyberDeepClientInstance.handleAuth

Inherited from DeepClient.handleAuth

- Defined in work/deeplinks/deeplinks/imports/client.tsx:770

### `Optional` handlersSelectReturning

handlersSelectReturning?: string

Implementation of CyberDeepClientInstance.handlersSelectReturning

Inherited from DeepClient.handlersSelectReturning

- Defined in work/deeplinks/deeplinks/imports/client.tsx:788

### helia

helia: Helia<Libp2p<ServiceMap>>

- Defined in work/deeplinks/deeplinks/imports/cyber.tsx:293

### `Optional` insertReturning

insertReturning?: string

Implementation of CyberDeepClientInstance.insertReturning

Inherited from DeepClient.insertReturning

- Defined in work/deeplinks/deeplinks/imports/client.tsx:789

### `Optional` linkId

linkId?: Id

Implementation of CyberDeepClientInstance.linkId

Inherited from DeepClient.linkId

- Defined in work/deeplinks/deeplinks/imports/client.tsx:768

### `Optional` linksSelectReturning

linksSelectReturning?: string

Implementation of CyberDeepClientInstance.linksSelectReturning

Inherited from DeepClient.linksSelectReturning

- Defined in work/deeplinks/deeplinks/imports/client.tsx:782

### `Optional` local

local?: boolean

Inherited from DeepClient.local

- Defined in work/deeplinks/deeplinks/imports/client.tsx:808

### minilinks

minilinks: MinilinksResult<L>

Implementation of CyberDeepClientInstance.minilinks

Inherited from DeepClient.minilinks

- Defined in work/deeplinks/deeplinks/imports/client.tsx:777

### models

models: Models

- Defined in work/deeplinks/deeplinks/imports/cyber.tsx:301

### `Optional` namespace

namespace?: string

Implementation of CyberDeepClientInstance.namespace

Inherited from DeepClient.namespace

- Defined in work/deeplinks/deeplinks/imports/client.tsx:766

### `Optional` remote

remote?: boolean

Inherited from DeepClient.remote

- Defined in work/deeplinks/deeplinks/imports/client.tsx:809

### `Optional` returning

returning?: string

Implementation of CyberDeepClientInstance.returning

Inherited from DeepClient.returning

- Defined in work/deeplinks/deeplinks/imports/client.tsx:779

### schemas

schemas: Schemas

- Defined in work/deeplinks/deeplinks/imports/cyber.tsx:300

### `Optional` selectReturning

selectReturning?: string

Implementation of CyberDeepClientInstance.selectReturning

Inherited from DeepClient.selectReturning

- Defined in work/deeplinks/deeplinks/imports/client.tsx:781

### `Optional` selectorsSelectReturning

selectorsSelectReturning?: string

Implementation of CyberDeepClientInstance.selectorsSelectReturning

Inherited from DeepClient.selectorsSelectReturning

- Defined in work/deeplinks/deeplinks/imports/client.tsx:783

### silent

silent: boolean

Inherited from DeepClient.silent

- Defined in work/deeplinks/deeplinks/imports/client.tsx:798

### `Optional` table

table?: string

Implementation of CyberDeepClientInstance.table

Inherited from DeepClient.table

- Defined in work/deeplinks/deeplinks/imports/client.tsx:778

### `Optional` token

token?: string

Implementation of CyberDeepClientInstance.token

Inherited from DeepClient.token

- Defined in work/deeplinks/deeplinks/imports/client.tsx:769

### `Optional` treeSelectReturning

treeSelectReturning?: string

Implementation of CyberDeepClientInstance.treeSelectReturning

Inherited from DeepClient.treeSelectReturning

- Defined in work/deeplinks/deeplinks/imports/client.tsx:785

### `Optional` unsafe

unsafe?: any

Implementation of CyberDeepClientInstance.unsafe

Inherited from DeepClient.unsafe

- Defined in work/deeplinks/deeplinks/imports/client.tsx:800

### unvertualizeId

unvertualizeId: ((id: Id) => Id)

Implementation of CyberDeepClientInstance.unvertualizeId

Inherited from DeepClient.unvertualizeId

- Defined in work/deeplinks/deeplinks/imports/client.tsx:811

### `Optional` updateReturning

updateReturning?: string

Implementation of CyberDeepClientInstance.updateReturning

Inherited from DeepClient.updateReturning

- Defined in work/deeplinks/deeplinks/imports/client.tsx:790

### useDeep

useDeep: (() => CyberDeepClient<Link<string>>) = useCyberDeep

Implementation of CyberDeepClientInstance.useDeep

Overrides DeepClient.useDeep

- Defined in work/deeplinks/deeplinks/imports/cyber.tsx:303

### useDeepId

useDeepId: ((start: QueryLink | DeepClientStartItem, ...path: DeepClientPathItem[]) => {
data: Id;
error?: any;
loading: boolean;
})

Implementation of CyberDeepClientInstance.useDeepId

Inherited from DeepClient.useDeepId

- Defined in work/deeplinks/deeplinks/imports/client.tsx:802

### useDeepQuery

useDeepQuery: (<Table, LL>(query: Exp<Table>, options?: Options<Table>) => {
data?: LL[];
error?: any;
loading: boolean;
})

Implementation of CyberDeepClientInstance.useDeepQuery

Inherited from DeepClient.useDeepQuery

- Defined in work/deeplinks/deeplinks/imports/client.tsx:804

### useDeepSubscription

useDeepSubscription: (<Table, LL>(query: Exp<Table>, options?: Options<Table>) => UseDeepSubscriptionResult<LL>)

Implementation of CyberDeepClientInstance.useDeepSubscription

Inherited from DeepClient.useDeepSubscription

- Defined in work/deeplinks/deeplinks/imports/client.tsx:803

### useMinilinksApply

useMinilinksApply: ((data: any, name: string) => void)

Implementation of CyberDeepClientInstance.useMinilinksApply

Inherited from DeepClient.useMinilinksApply

- Defined in work/deeplinks/deeplinks/imports/client.tsx:807

### useMinilinksQuery

useMinilinksQuery: ((query: Exp<"links">) => L[])

Implementation of CyberDeepClientInstance.useMinilinksQuery

Inherited from DeepClient.useMinilinksQuery

- Defined in work/deeplinks/deeplinks/imports/client.tsx:805

### useMinilinksSubscription

useMinilinksSubscription: ((query: Exp<"links">) => L[])

Implementation of CyberDeepClientInstance.useMinilinksSubscription

Inherited from DeepClient.useMinilinksSubscription

- Defined in work/deeplinks/deeplinks/imports/client.tsx:806

### `Optional` valuesSelectReturning

valuesSelectReturning?: string

Implementation of CyberDeepClientInstance.valuesSelectReturning

Inherited from DeepClient.valuesSelectReturning

- Defined in work/deeplinks/deeplinks/imports/client.tsx:786

### `Static` `Optional` resolveDependency

resolveDependency?: ((path: string) => Promise<any>)

Overrides DeepClient.resolveDependency

- Defined in work/deeplinks/deeplinks/imports/cyber.tsx:290

##
Methods

### Packager

- Packager(): Packager<L>

- #### Returns Packager<L>

  Implementation of CyberDeepClientInstance.Packager

  Inherited from DeepClient.Packager

  - Defined in work/deeplinks/deeplinks/imports/client.tsx:1968

### Traveler

- Traveler(links): Traveler

- #### Parameters

  - links: Link<Id>[]

  #### Returns Traveler

  Implementation of CyberDeepClientInstance.Traveler

  Overrides DeepClient.Traveler

  - Defined in work/deeplinks/deeplinks/imports/cyber.tsx:471

### _findHandler

- _findHandler(__namedParameters): Promise<void | Handler>

- #### Parameters

  - __namedParameters: {
    context?: Id[];
    execution_provider_id?: number;
    handlerId?: Id;
    isolation_provider_id?: number;
    }

    - ##### `Optional` context?: Id[]

    - ##### `Optional` execution_provider_id?: number

    - ##### `Optional` handlerId?: Id

    - ##### `Optional` isolation_provider_id?: number

  #### Returns Promise<void | Handler>

  Inherited from DeepClient._findHandler

  - Defined in work/deeplinks/deeplinks/imports/client.tsx:1972

### _generateHooks

- _generateHooks(deep): void

- #### Parameters

  - deep: any

  #### Returns void

  Inherited from DeepClient._generateHooks

  - Defined in work/deeplinks/deeplinks/imports/client.tsx:896

### _generateQuery

- _generateQuery<TTable>(exp, options): {
  query: IGenerateQueryResult;
  queryData: IGenerateQueryDataBuilder;
  }

- #### Type Parameters

  - TTable extends
    | "links"
    | "selectors"
    | "tree"
    | "numbers"
    | "strings"
    | "objects"
    | "can"
    | "handlers"

  #### Parameters

  - exp: Exp<TTable>
  - options: Options<TTable>

  #### Returns {
  query: IGenerateQueryResult;
  queryData: IGenerateQueryDataBuilder;
  }

  - ##### query: IGenerateQueryResult

  - ##### queryData: IGenerateQueryDataBuilder

  Overrides DeepClient._generateQuery

  - Defined in work/deeplinks/deeplinks/imports/cyber.tsx:327

### _generateResult

- _generateResult<TTable>(exp, options, data): Promise<any[]>

- #### Type Parameters

  - TTable extends
    | "links"
    | "selectors"
    | "tree"
    | "numbers"
    | "strings"
    | "objects"
    | "can"
    | "handlers"

  #### Parameters

  - exp: Exp<TTable>
  - options: Options<TTable>
  - data: any

  #### Returns Promise<any[]>

  Overrides DeepClient._generateResult

  - Defined in work/deeplinks/deeplinks/imports/cyber.tsx:366

### _silent

- _silent(options?): boolean

- #### Parameters

  - options: Partial<{
    silent?: boolean;
    }> = {}

  #### Returns boolean

  Inherited from DeepClient._silent

  - Defined in work/deeplinks/deeplinks/imports/client.tsx:813

### await

- await(id, options?): Promise<any>

- Await for a promise

  #### Parameters

  - id: Id

    Id of a link which is processed by a handler

  - options: {
    results: boolean;
    } = ...

    An object with options for the await operation

    - ##### results: boolean

  #### Returns Promise<any>

  A promise that resolves to the result of the awaited promise

  #### Example

  #### Await a promise of npm-packager

  Let us imagine you have published a package and want to programatically wait until it is published or failed to publish

      await deep.await(
        await deep.id('my-package-name')
      )

  In this case you will await all the promises for 'my-package-name' link

  Implementation of CyberDeepClientInstance.await

  Overrides DeepClient.await

  - Defined in work/deeplinks/deeplinks/imports/cyber.tsx:439

### can

- can(objectIds, subjectIds, actionIds, userIds?): Promise<boolean>

- Checks whether subjectUds can perform actionIds on objectIds

  #### Parameters

  - objectIds: Id | Id[]

    A link id or an array of link ids to check whether the subjectUds can perform the actionIds on

  - subjectIds: Id | Id[]

    A link id or an array of link ids to check whether they can perform the actionIds on the objectIds

  - actionIds: Id | Id[]

    A link id or an array of link ids to check whether the subjectUds can perform on the objectIds

  - userIds: Id | Id[] = ...

    A link id or an array of link ids from which perspective the check is performed

  #### Returns Promise<boolean>

  A promise that resolves to a boolean value indicating whether the subjectUds can perform the actionIds on the objectIds

  Implementation of CyberDeepClientInstance.can

  Overrides DeepClient.can

  - Defined in work/deeplinks/deeplinks/imports/cyber.tsx:467

### delete

- delete<TTable>(exp, options?): Promise<DeepClientResult<{
  id: any;
  }[]>>

- Deletes a value in the database. By default deletes a link in the links table

  #### Type Parameters

  - TTable extends
    | "links"
    | "numbers"
    | "strings"
    | "objects"

  #### Parameters

  - exp: Exp<TTable>

    An expression to filter the objects to delete

  - `Optional` options: WriteOptions<TTable>

    An object with options for the delete operation

  #### Returns Promise<DeepClientResult<{
  id: any;
  }[]>>

  A promise that resolves to the deleted object or an array of deleted objects with the fields configured by options.returning which is by default 'id'

  #### Example

  #### Delete by id

      await deep.delete({
        id: 888
      })

  In this case the link with id 888 will be deleted

  #### Delete by type_id

      await deep.delete({
        type_id: 888
      })

  In this case all the links with type_id 888 will be deleted

  #### Delete by from_id

      await deep.delete({
        from_id: 888
      })

  In this case all the links with from_id 888 will be deleted

  #### Delete by to_id

      await deep.delete({
        to_id: 888
      })

  In this case all the links with to_id 888 will be deleted

  #### Delete by string value

      await deep.delete({
        string: {
          value: {
            _eq: 'MyString'
          }
        }
      })

  In this case all the links with string value 'MyString' will be deleted

  #### Delete by number value

      await deep.delete({
        number: {
          value: {
            _eq: 888
          }
        }
      })

  In this case all the links with number value 888 will be deleted

  #### Delete by object value

      await deep.delete({
        object: {
          value: {
            _eq: {
              myFieldKey: "myFieldValue"
            }
          }
        }
      })

  In this case all the links with object value { myFieldName: "myFieldValue" } will be deleted

  #### Delete string value by link id

      await deep.delete({
        link_id: 888
      }, {
        table: 'strings'
      })

  In this case string value of a link with id 888 will be deleted

  #### Delete number value by link id

      await deep.delete({
        link_id: 888
      }, {
        table: 'numbers'
      })

  In this case number value of a link with id 888 will be deleted

  #### Delete object value by link id

      await deep.delete({
        link_id: 888
      }, {
        table: 'objects'
      })

  In this case object value of a link with id 888 will be deleted

  Implementation of CyberDeepClientInstance.delete

  Overrides DeepClient.delete

  - Defined in work/deeplinks/deeplinks/imports/cyber.tsx:425

### eval

- eval(__namedParameters): Promise<{
  data?: any;
  error?: any;
  }>

- #### Parameters

  - __namedParameters: {
    context?: Id[];
    handlerId?: Id;
    input?: any;
    linkId?: Id;
    value?: string;
    }

    - ##### `Optional` context?: Id[]

    - ##### `Optional` handlerId?: Id

    - ##### `Optional` input?: any

    - ##### `Optional` linkId?: Id

    - ##### `Optional` value?: string

  #### Returns Promise<{
  data?: any;
  error?: any;
  }>

  Implementation of CyberDeepClientInstance.eval

  Inherited from DeepClient.eval

  - Defined in work/deeplinks/deeplinks/imports/client.tsx:2002

### guest

- guest(options?): Promise<DeepClientAuthResult>

- Logs in as a guest

  #### Parameters

  - options: DeepClientGuestOptions = {}

    An object with options for the guest login operation

  #### Returns Promise<DeepClientAuthResult>

  A promise that resolves to the result of the guest login operation

  #### Example

      const apolloClient = generateApolloClient({
        path: NEXT_PUBLIC_GQL_PATH,
        ssl: true,
      });
      const unloginedDeep = new DeepClient({ apolloClient });
      const guestLoginResult = await unloginedDeep.guest();
      const guestDeep = new DeepClient({ deep: unloginedDeep, ...guestLoginResult });

  Implementation of CyberDeepClientInstance.guest

  Overrides DeepClient.guest

  - Defined in work/deeplinks/deeplinks/imports/cyber.tsx:443

### id

- id(start, ...path): Promise<number>

- Find id of a link by link name or id and contain values (names) as path items

  #### Parameters

  - start: QueryLink | DeepClientStartItem

    A name or id of a link

  - `Rest`...path: DeepClientPathItem[]

    Contain values (names) as path items

  #### Returns Promise<number>

  A promise that resolves to the id of the link

  #### Example

  #### Get Core Package Link Id

      const corePackageLinkId = await deep.id("@deep-foundation/core")

  #### Get User Type Link Id From Core Package

      const userTypeLinkId = await deep.id("@deep-foundation/core", "User")

  #### Get the link called "My Nested Link Name" contained in the link called "My Link Name" contained the current user

      const myLinkId = await deep.id(deep.linkId, 'My Link Name', 'My Nested Link Name')

  #### Get Admin Link Id

      const adminLinkId = await deep.id("deep", "admin")

  Implementation of CyberDeepClientInstance.id

  Inherited from DeepClient.id

  - Defined in work/deeplinks/deeplinks/imports/client.tsx:1645

### idLocal

- idLocal(start, ...path): Id

- Find id of a link from minilinks by link name or id and contain values (names) as path items

  #### Parameters

  - start: DeepClientStartItem

    A name or id of a link

  - `Rest`...path: DeepClientPathItem[]

    Contain values (names) as path items

  #### Returns Id

  A promise that resolves to the id of the link

  #### Example

  #### Get Core Package Link Id

      const corePackageLinkId = deep.idLocal("@deep-foundation/core")

  #### Get User Type Link Id From Core Package

      const userTypeLinkId = deep.idLocal("@deep-foundation/core", "User")

  #### Get the link called "My Nested Link Name" contained in the link called "My Link Name" contained the current user

      const myLinkId = deep.idLocal(deep.linkId, 'My Link Name', 'My Nested Link Name')

  #### Get Admin Link Id

      const adminLinkId = deep.idLocal("deep", "admin")

  Implementation of CyberDeepClientInstance.idLocal

  Inherited from DeepClient.idLocal

  - Defined in work/deeplinks/deeplinks/imports/client.tsx:1741

### ids

- ids(...paths): Promise<any>

- This function fetches the corresponding IDs from the Deep for each specified path.

  #### Parameters

  - `Rest`...paths: [DeepClientStartItem, ...DeepClientPathItem[]][]

    An array of [start, ...path] tuples. Each tuple specifies a path to a link, where 'start' is the package name or id and ...path further specifies the path to the id using Contain link values (names).

  #### Returns Promise<any>

  - Returns a Promise that resolves to an object. The object has keys corresponding to the package name or id of each path. The value for each package key is an object where keys are the items in the corresponding path, and the values are the IDs retrieved from the Deep.

  #### Async

  #### Function

  ids

  #### Throws

  Will throw an error if the id retrieval fails in `this.id()` function.

  #### Example

        const ids = await deep.ids([
          ['@deep-foundation/core', 'Package'],
          ['@deep-foundation/core', 'PackageVersion']
        ]);

        // Outputs
        // {
        //   "@deep-foundation/core": {
        //     "Package": 2,
        //     "PackageVersion": 46
        //   }
        // }

  Inherited from DeepClient.ids

  - Defined in work/deeplinks/deeplinks/imports/client.tsx:1696

### import

- import(path): Promise<any>

- Imports from a library

  #### Parameters

  - path: string

    A path to import from

  #### Returns Promise<any>

  A promise that resolves to the imported value

  #### Remarks

  Is able to import CommoJS and ESModule libraries. This is the recommended way to import from libraries in deep handlers

  #### Example

  #### Async handler using import

      async ({deep}) => {
        const importResult = await deep.import("my-lib-name");
      }

  Inherited from DeepClient.import

  - Defined in work/deeplinks/deeplinks/imports/client.tsx:1947

### insert

- insert<TTable, LL>(objects, options?): Promise<DeepClientResult<{
  id: any;
  }[]>>

- deep.subscribe

  #### Type Parameters

  - TTable extends
    | "links"
    | "numbers"
    | "strings"
    | "objects"
  - LL = L

  #### Parameters

  - objects: InsertObjects<TTable>
  - `Optional` options: WriteOptions<TTable>

  #### Returns Promise<DeepClientResult<{
  id: any;
  }[]>>

  #### Example

      deep.subscribe({ up: { link_id: 380 } }).subscribe({ next: (links) => {}, error: (err) => {} });

  Implementation of CyberDeepClientInstance.insert

  Overrides DeepClient.insert

  - Defined in work/deeplinks/deeplinks/imports/cyber.tsx:417

### jwt

- jwt(options): Promise<DeepClientAuthResult>

- #### Parameters

  - options: DeepClientJWTOptions

  #### Returns Promise<DeepClientAuthResult>

  Implementation of CyberDeepClientInstance.jwt

  Overrides DeepClient.jwt

  - Defined in work/deeplinks/deeplinks/imports/cyber.tsx:447

### login

- login(options): Promise<DeepClientAuthResult>

- Performs a login operation

  #### Parameters

  - options: DeepClientJWTOptions

    An object with options for the login operation

  #### Returns Promise<DeepClientAuthResult>

  A promsie that resolves to the result of the login operation

  #### Example

      const apolloClient = generateApolloClient({
        path: NEXT_PUBLIC_GQL_PATH,
        ssl: true,
      });
      const unloginedDeep = new DeepClient({ apolloClient });
      const guestLoginResult = await unloginedDeep.guest();
      const guestDeep = new DeepClient({ deep: unloginedDeep, ...guestLoginResult });
      const adminLoginResult = await guestDeep.login({
        linkId: await guestDeep.id('deep', 'admin'),
      });
      const deep = new DeepClient({ deep: guestDeep, ...adminLoginResult });

  Implementation of CyberDeepClientInstance.login

  Overrides DeepClient.login

  - Defined in work/deeplinks/deeplinks/imports/cyber.tsx:459

### logout

- logout(): Promise<DeepClientAuthResult>

- Performs a logout operation

  #### Returns Promise<DeepClientAuthResult>

  A promsie that resolves to the result of the logout operation

  Implementation of CyberDeepClientInstance.logout

  Overrides DeepClient.logout

  - Defined in work/deeplinks/deeplinks/imports/cyber.tsx:463

### name

- name(input): Promise<string>

- Returns a name of a link input that is located in a value of a contain link pointing to the link input

  #### Parameters

  - input: Id | Link<Id>

  #### Returns Promise<string>

  #### Example

      const userTypeLinkId = await deep.id("@deep-foundation/core", "User");
      const userTypeLinkName = await deep.name(userTypeLinkId);

  Implementation of CyberDeepClientInstance.name

  Inherited from DeepClient.name

  - Defined in work/deeplinks/deeplinks/imports/client.tsx:1896

### nameLocal

- nameLocal(input): string

- Returns a name of a link input that is located in a value of a contain link pointing to the link input according to links stored in minilinks

  #### Parameters

  - input: Id | Link<Id>

  #### Returns string

  #### Example

      const userTypeLinkId = await deep.id("@deep-foundation/core", "User");
      const userTypeLinkName = deep.nameLocal(userTypeLinkId);

  Note: "@deep-foundation/core" package, "User" link, Contain link pointing from "@deep-foundation/core" to "User" must be in minilinks

  Implementation of CyberDeepClientInstance.nameLocal

  Inherited from DeepClient.nameLocal

  - Defined in work/deeplinks/deeplinks/imports/client.tsx:1922

### reserve

- reserve<LL>(count): Promise<Id[]>

- #### Type Parameters

  - LL = L

  #### Parameters

  - count: number

  #### Returns Promise<Id[]>

  Implementation of CyberDeepClientInstance.reserve

  Overrides DeepClient.reserve

  - Defined in work/deeplinks/deeplinks/imports/cyber.tsx:435

### select

- select<TTable, LL>(exp, options?): Promise<DeepClientResult<LL[]>>

- Gets a value from the database. By default gets a link from the links table

  #### Type Parameters

  - TTable extends
    | "links"
    | "selectors"
    | "tree"
    | "numbers"
    | "strings"
    | "objects"
    | "can"
    | "handlers"
  - LL = L

  #### Parameters

  - exp: Exp<TTable>

    A filter expression to filter the objects to get

  - `Optional` options: ReadOptions<TTable>

    An object with options for the select operation

  #### Returns Promise<DeepClientResult<LL[]>>

  A promise that resolves to the selected object or an array of selected objects with the fields configured by options.returning which is by default 'id'

  #### Example

  #### Select by id

      await deep.select({
        id: deep.linkId
      })

  #### Select by type_id

      await deep.select({
        type_id: {
          _id: ["@deep-foundation/core", "User"]
        }
      })

  #### Select by from_id

      await deep.select({
        from_id: deep.linkId
      })

  #### Select by to_id

      await deep.select({
        to_id: deep.linkId
      })

  #### Select by string value

      await deep.select({
        string: {
          value: {
            _eq: "MyString"
          }
        }
      })

  #### Select by number value

      await deep.select({
        number: {
          value: {
            _eq: 888
          }
        }
      })

  #### Select by object value

      await deep.select({
        object: {
          value: {
            _eq: {
              myFieldKey: "myFieldValue"
            }
          }
        }
      })

  Implementation of CyberDeepClientInstance.select

  Overrides DeepClient.select

  - Defined in work/deeplinks/deeplinks/imports/cyber.tsx:372

### serial

- serial(options): Promise<DeepClientResult<{
  id: Id;
  }[]>>

- Performs write operations to the database in a serial manner

  #### Parameters

  - options: AsyncSerialParams

    An object with data for the serial operation

  #### Returns Promise<DeepClientResult<{
  id: Id;
  }[]>>

  A promise that resolves to the deleted object or an array of deleted objects with the fields configured by options.returning which is by default 'id'

  Implementation of CyberDeepClientInstance.serial

  Overrides DeepClient.serial

  - Defined in work/deeplinks/deeplinks/imports/cyber.tsx:429

### serializeQuery

- serializeQuery(exp, env?): any

- #### Parameters

  - exp: any
  - `Optional` env: string

  #### Returns any

  Implementation of CyberDeepClientInstance.serializeQuery

  Inherited from DeepClient.serializeQuery

  - Defined in work/deeplinks/deeplinks/imports/client.tsx:922

### serializeWhere

- serializeWhere(exp, env?): any

- #### Parameters

  - exp: any
  - `Optional` env: string

  #### Returns any

  Implementation of CyberDeepClientInstance.serializeWhere

  Inherited from DeepClient.serializeWhere

  - Defined in work/deeplinks/deeplinks/imports/client.tsx:923

### stringify

- stringify(any?): string

- #### Parameters

  - `Optional` any: any

  #### Returns string

  Implementation of CyberDeepClientInstance.stringify

  Inherited from DeepClient.stringify

  - Defined in work/deeplinks/deeplinks/imports/client.tsx:911

### subscribe

- subscribe<TTable, LL>(exp, options?): Observable<LL[]>

- Subscribes to data in the database

  #### Type Parameters

  - TTable extends
    | "links"
    | "selectors"
    | "tree"
    | "numbers"
    | "strings"
    | "objects"
    | "can"
    | "handlers"
  - LL = L

  #### Parameters

  - exp: Exp<TTable>
  - `Optional` options: ReadOptions<TTable>

  #### Returns Observable<LL[]>

  #### Example

      deep.subscribe({ up: { link_id: deep.linkId } }).subscribe({ next: (links) => {}, error: (err) => {} });

  Implementation of CyberDeepClientInstance.subscribe

  Inherited from DeepClient.subscribe

  - Defined in work/deeplinks/deeplinks/imports/client.tsx:1057

### update

- update<TTable>(exp, value, options?): Promise<DeepClientResult<{
  id: any;
  }[]>>

- Updates a value in the database. By default updates a link in the links table

  #### Type Parameters

  - TTable extends
    | "links"
    | "numbers"
    | "strings"
    | "objects"

  #### Parameters

  - exp: Exp<TTable>

    An expression to filter the objects to update

  - value: UpdateValue<TTable>

    A value to update the objects with

  - `Optional` options: WriteOptions<TTable>

    An object with options for the update operation

  #### Returns Promise<DeepClientResult<{
  id: any;
  }[]>>

  A promise that resolves to the updated object or an array of updated objects with the fields configured by options.returning which is by default 'id'

  #### Example

  #### Update from by id

      await deep.update({
        id: 888
      }, {
        from_id: 1
      })

  In this case from_id will be updated to 1 for link with id 888

  #### Update to by id

      await deep.update({
        id: 888
      }, {
        to_id: 1
      })

  In this case to_id will be updated to 1 for link with id 888

  #### Update string value by link id

      await deep.update(
        {
          link_id: 888
        },
        {
          value: "MyStringValue"
        },
        {
          table: 'strings'
        }
      )

  In this case string value will be updated to "MyStringValue" for link with id 888

  #### Update number value by link id

      await deep.update(
        {
          link_id: 888
        },
        {
          value: 888
        },
        {
          table: 'numbers'
        }
      )

  In this case number value will be updated to 888 for link with id 888

  #### Update object value by link id

      await deep.update(
        {
          link_id: 888
        },
        {
          value: {
            myFieldName: "myFieldValue"
          }
        },
        {
          table: 'numbers'
        }
      )

  In this case number value will be updated to { myFieldName: "myFieldValue" } for link with id 888

  Implementation of CyberDeepClientInstance.update

  Overrides DeepClient.update

  - Defined in work/deeplinks/deeplinks/imports/cyber.tsx:421

### value

- value(id, value): Promise<any>

- #### Parameters

  - id: Id
  - value: string | number | Object

  #### Returns Promise<any>

  Implementation of CyberDeepClientInstance.value

  Inherited from DeepClient.value

  - Defined in work/deeplinks/deeplinks/imports/client.tsx:1585

### whoami

- whoami(): Promise<number>

- Return is of current authorized user linkId. Refill client.linkId and return.

  #### Returns Promise<number>

  Overrides DeepClient.whoami

  - Defined in work/deeplinks/deeplinks/imports/cyber.tsx:455