# Class DeepClient<L>

#### Type Parameters

- L extends Link<Id> = Link<Id>

#### Hierarchy (view full)

- DeepClient
  - CyberDeepClient

#### Implements

- DeepClientInstance<L>

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

#####
Index

### Constructors

constructor

### Properties

DeepClient
DeepContext
DeepProvider
apolloClient
canSelectReturning?
client
deep
defaultDeleteName?
defaultInsertName?
defaultSelectName?
defaultUpdateName?
deleteReturning?
filesSelectReturning?
handleAuth?
handlersSelectReturning?
insertReturning?
linkId?
linksSelectReturning?
local?
minilinks
namespace?
remote?
returning?
selectReturning?
selectorsSelectReturning?
silent
table?
token?
treeSelectReturning?
unsafe?
unvertualizeId
updateReturning?
useDeep
useDeepId
useDeepQuery
useDeepSubscription
useId
useMinilinksApply
useMinilinksQuery
useMinilinksSubscription
useQuery
useSubscription
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 DeepClient<L>(options): DeepClient<L>

- #### Type Parameters

  - L extends Link<Id> = Link<Id>

  #### Parameters

  - options: DeepClientOptions<L>

  #### Returns DeepClient<L>

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

##
Properties

### DeepClient

DeepClient: typeof DeepClient = DeepClient

Implementation of DeepClientInstance.DeepClient

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

### DeepContext

DeepContext: Context<DeepClient<Link<Id>>> = DeepContext

Implementation of DeepClientInstance.DeepContext

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

### DeepProvider

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

Implementation of DeepClientInstance.DeepProvider

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

### apolloClient

apolloClient: IApolloClient<any>

Implementation of DeepClientInstance.apolloClient

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

### `Optional` canSelectReturning

canSelectReturning?: string

Implementation of DeepClientInstance.canSelectReturning

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

### client

client: IApolloClient<any>

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

### deep

deep: DeepClientInstance<L>

Implementation of DeepClientInstance.deep

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

### `Optional` defaultDeleteName

defaultDeleteName?: string

Implementation of DeepClientInstance.defaultDeleteName

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

### `Optional` defaultInsertName

defaultInsertName?: string

Implementation of DeepClientInstance.defaultInsertName

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

### `Optional` defaultSelectName

defaultSelectName?: string

Implementation of DeepClientInstance.defaultSelectName

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

### `Optional` defaultUpdateName

defaultUpdateName?: string

Implementation of DeepClientInstance.defaultUpdateName

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

### `Optional` deleteReturning

deleteReturning?: string

Implementation of DeepClientInstance.deleteReturning

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

### `Optional` filesSelectReturning

filesSelectReturning?: string

Implementation of DeepClientInstance.filesSelectReturning

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

### `Optional` handleAuth

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

Implementation of DeepClientInstance.handleAuth

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

### `Optional` handlersSelectReturning

handlersSelectReturning?: string

Implementation of DeepClientInstance.handlersSelectReturning

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

### `Optional` insertReturning

insertReturning?: string

Implementation of DeepClientInstance.insertReturning

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

### `Optional` linkId

linkId?: Id

Implementation of DeepClientInstance.linkId

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

### `Optional` linksSelectReturning

linksSelectReturning?: string

Implementation of DeepClientInstance.linksSelectReturning

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

### `Optional` local

local?: boolean

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

### minilinks

minilinks: MinilinksResult<L>

Implementation of DeepClientInstance.minilinks

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

### `Optional` namespace

namespace?: string

Implementation of DeepClientInstance.namespace

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

### `Optional` remote

remote?: boolean

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

### `Optional` returning

returning?: string

Implementation of DeepClientInstance.returning

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

### `Optional` selectReturning

selectReturning?: string

Implementation of DeepClientInstance.selectReturning

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

### `Optional` selectorsSelectReturning

selectorsSelectReturning?: string

Implementation of DeepClientInstance.selectorsSelectReturning

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

### silent

silent: boolean

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

### `Optional` table

table?: string

Implementation of DeepClientInstance.table

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

### `Optional` token

token?: string

Implementation of DeepClientInstance.token

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

### `Optional` treeSelectReturning

treeSelectReturning?: string

Implementation of DeepClientInstance.treeSelectReturning

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

### `Optional` unsafe

unsafe?: any

Implementation of DeepClientInstance.unsafe

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

### unvertualizeId

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

Implementation of DeepClientInstance.unvertualizeId

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

### `Optional` updateReturning

updateReturning?: string

Implementation of DeepClientInstance.updateReturning

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

### useDeep

useDeep: (() => DeepClient<Link<Id>>) = useDeep

Implementation of DeepClientInstance.useDeep

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

### useDeepId

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

Implementation of DeepClientInstance.useDeepId

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

### useDeepQuery

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

Implementation of DeepClientInstance.useDeepQuery

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

### useDeepSubscription

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

Implementation of DeepClientInstance.useDeepSubscription

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

### useId

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

Implementation of DeepClientInstance.useId

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

### useMinilinksApply

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

Implementation of DeepClientInstance.useMinilinksApply

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

### useMinilinksQuery

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

Implementation of DeepClientInstance.useMinilinksQuery

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

### useMinilinksSubscription

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

Implementation of DeepClientInstance.useMinilinksSubscription

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

### useQuery

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

Implementation of DeepClientInstance.useQuery

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

### useSubscription

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

Implementation of DeepClientInstance.useSubscription

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

### `Optional` valuesSelectReturning

valuesSelectReturning?: string

Implementation of DeepClientInstance.valuesSelectReturning

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

### `Static` `Optional` resolveDependency

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

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

##
Methods

### Packager

- Packager(): Packager<L>

- #### Returns Packager<L>

  Implementation of DeepClientInstance.Packager

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

### Traveler

- Traveler(links): Traveler

- #### Parameters

  - links: Link<Id>[]

  #### Returns Traveler

  Implementation of DeepClientInstance.Traveler

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

### _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>

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

### _generateHooks

- _generateHooks(deep): void

- #### Parameters

  - deep: any

  #### Returns void

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

### _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

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

### _generateResult

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

- #### Type Parameters

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

  #### Parameters

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

  #### Returns any[] | Promise<any[]>

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

### _silent

- _silent(options?): boolean

- #### Parameters

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

  #### Returns boolean

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

### 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 DeepClientInstance.await

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

### 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 DeepClientInstance.can

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

### 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 DeepClientInstance.delete

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

### 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 DeepClientInstance.eval

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

### 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 DeepClientInstance.guest

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

### 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 DeepClientInstance.id

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

### 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 DeepClientInstance.idLocal

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

### 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
        //   }
        // }

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

### 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");
      }

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

### insert

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

- Inserts a value into the database. By default inserts a link to the links table

  #### Type Parameters

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

  #### Parameters

  - objects: InsertObjects<TTable>

    An object or array of objects to insert to the database

  - `Optional` options: WriteOptions<TTable>

    An object with options for the insert operation

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

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

  #### Remarks

  If a link already has value you should update its value, not insert

  #### Example

  #### Insert Type

      await deep.insert({
        type_id: await deep.id("@deep-foundation/core", "Type")
      })

  In this case instances of your type will not have from and to

  #### Insert Type from Package to User

      await deep.insert({
        type_id: await deep.id("@deep-foundation/core", "Type"),
        from_id: await deep.id("@deep-foundation/core", "Package"),
        to_id: await deep.id("@deep-foundation/core", "User")
      })

  In this case instances of your type will must go from instances of Package to instances of User

  #### Insert Type with from Any to Any

      await deep.insert({
        type_id: await deep.id("@deep-foundation/core", "Type"),
        from_id: await deep.id("@deep-foundation/core", "Any"),
        to_id: await deep.id("@deep-foundation/core", "Any")
      })

  In this case instances of your type may go from instances of any link to instances of any link without restrictions

  #### Insert Type with from Package to Any

      await deep.insert({
        type_id: await deep.id("@deep-foundation/core", "Type"),
        from_id: await deep.id("@deep-foundation/core", "Package"),
        to_id: await deep.id("@deep-foundation/core", "Any")
      })

  In this case instances of your type may go from instances of Package to instances of any link without restrictions

  #### Insert Type with from Any to Package

      await deep.insert({
        type_id: await deep.id("@deep-foundation/core", "Type"),
        from_id: await deep.id("@deep-foundation/core", "Any"),
        to_id: await deep.id("@deep-foundation/core", "Package")
      })

  In this case instances of your type may go from instances of any link without restrictions to instances of Package

  #### Insert string

      await deep.insert({
        link_id: 888,
        value: 'MyString'
      }, {
        table: 'strings'
      })

  Note: If a link already has value you should update its value, not insert

  #### Insert number

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

  Note: If a link already has value you should update its value, not insert

  #### Insert object

      await deep.insert({
        link_id: 888,
        value: {
          myFieldName: 'myFieldValue'
        }
      }, {
        table: 'objects'
      })

  Note: If a link already has value you should update its value, not insert

  Implementation of DeepClientInstance.insert

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

### jwt

- jwt(options): Promise<DeepClientAuthResult>

- #### Parameters

  - options: DeepClientJWTOptions

  #### Returns Promise<DeepClientAuthResult>

  Implementation of DeepClientInstance.jwt

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

### 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 DeepClientInstance.login

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

### logout

- logout(): Promise<DeepClientAuthResult>

- Performs a logout operation

  #### Returns Promise<DeepClientAuthResult>

  A promsie that resolves to the result of the logout operation

  Implementation of DeepClientInstance.logout

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

### 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 DeepClientInstance.name

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

### 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 DeepClientInstance.nameLocal

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

### reserve

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

- #### Type Parameters

  - LL = L

  #### Parameters

  - count: number

  #### Returns Promise<Id[]>

  Implementation of DeepClientInstance.reserve

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

### 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 DeepClientInstance.select

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

### 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 DeepClientInstance.serial

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

### serializeQuery

- serializeQuery(exp, env?): any

- #### Parameters

  - exp: any
  - `Optional` env: string

  #### Returns any

  Implementation of DeepClientInstance.serializeQuery

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

### serializeWhere

- serializeWhere(exp, env?): any

- #### Parameters

  - exp: any
  - `Optional` env: string

  #### Returns any

  Implementation of DeepClientInstance.serializeWhere

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

### stringify

- stringify(any?): string

- #### Parameters

  - `Optional` any: any

  #### Returns string

  Implementation of DeepClientInstance.stringify

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

### 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 DeepClientInstance.subscribe

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

### 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 DeepClientInstance.update

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

### value

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

- #### Parameters

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

  #### Returns Promise<any>

  Implementation of DeepClientInstance.value

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

### whoami

- whoami(): Promise<number>

- Returns id of the current user

  #### Returns Promise<number>

  #### Example

      const myLinkId = await deep.whoami()

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