# 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:647

#####
Index

### Constructors

constructor

### Properties

DeepClient
DeepContext
DeepProvider
apolloClient
client
deep
defaultDeleteName?
defaultInsertName?
defaultSelectName?
defaultUpdateName?
deleteReturning?
filesSelectReturning?
handleAuth?
insertReturning?
linkId?
linksSelectReturning?
local?
minilinks
namespace?
remote?
returning?
selectReturning?
selectorsSelectReturning?
silent
table?
token?
unsafe?
unvertualizeId
updateReturning?
useDeep
useDeepId
useDeepQuery
useDeepSubscription
useMinilinksQuery
useMinilinksSubscription
valuesSelectReturning?
resolveDependency?

### Methods

Traveler
_generateHooks
_generateQuery
_generateResult
_silent
await
can
delete
guest
id
idLocal
ids
import
insert
jwt
login
logout
name
nameLocal
reserve
select
serial
serializeQuery
serializeWhere
stringify
subscribe
update
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:701

##
Properties

### DeepClient

DeepClient: typeof DeepClient = DeepClient

Implementation of DeepClientInstance.DeepClient

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

### DeepContext

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

Implementation of DeepClientInstance.DeepContext

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

### 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:651

### apolloClient

apolloClient: IApolloClient<any>

Implementation of DeepClientInstance.apolloClient

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

### client

client: IApolloClient<any>

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

### deep

deep: DeepClientInstance<L>

Implementation of DeepClientInstance.deep

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

### `Optional` defaultDeleteName

defaultDeleteName?: string

Implementation of DeepClientInstance.defaultDeleteName

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

### `Optional` defaultInsertName

defaultInsertName?: string

Implementation of DeepClientInstance.defaultInsertName

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

### `Optional` defaultSelectName

defaultSelectName?: string

Implementation of DeepClientInstance.defaultSelectName

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

### `Optional` defaultUpdateName

defaultUpdateName?: string

Implementation of DeepClientInstance.defaultUpdateName

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

### `Optional` deleteReturning

deleteReturning?: string

Implementation of DeepClientInstance.deleteReturning

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

### `Optional` filesSelectReturning

filesSelectReturning?: string

Implementation of DeepClientInstance.filesSelectReturning

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

### `Optional` handleAuth

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

Implementation of DeepClientInstance.handleAuth

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

### `Optional` insertReturning

insertReturning?: string

Implementation of DeepClientInstance.insertReturning

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

### `Optional` linkId

linkId?: Id

Implementation of DeepClientInstance.linkId

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

### `Optional` linksSelectReturning

linksSelectReturning?: string

Implementation of DeepClientInstance.linksSelectReturning

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

### `Optional` local

local?: boolean

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

### minilinks

minilinks: MinilinksResult<L>

Implementation of DeepClientInstance.minilinks

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

### `Optional` namespace

namespace?: string

Implementation of DeepClientInstance.namespace

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

### `Optional` remote

remote?: boolean

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

### `Optional` returning

returning?: string

Implementation of DeepClientInstance.returning

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

### `Optional` selectReturning

selectReturning?: string

Implementation of DeepClientInstance.selectReturning

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

### `Optional` selectorsSelectReturning

selectorsSelectReturning?: string

Implementation of DeepClientInstance.selectorsSelectReturning

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

### silent

silent: boolean

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

### `Optional` table

table?: string

Implementation of DeepClientInstance.table

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

### `Optional` token

token?: string

Implementation of DeepClientInstance.token

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

### `Optional` unsafe

unsafe?: any

Implementation of DeepClientInstance.unsafe

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

### unvertualizeId

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

Implementation of DeepClientInstance.unvertualizeId

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

### `Optional` updateReturning

updateReturning?: string

Implementation of DeepClientInstance.updateReturning

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

### useDeep

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

Implementation of DeepClientInstance.useDeep

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

### 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:687

### 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:689

### useDeepSubscription

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

Implementation of DeepClientInstance.useDeepSubscription

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

### useMinilinksQuery

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

Implementation of DeepClientInstance.useMinilinksQuery

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

### useMinilinksSubscription

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

Implementation of DeepClientInstance.useMinilinksSubscription

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

### `Optional` valuesSelectReturning

valuesSelectReturning?: string

Implementation of DeepClientInstance.valuesSelectReturning

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

### `Static` `Optional` resolveDependency

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

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

##
Methods

### Traveler

- Traveler(links): Traveler

- #### Parameters

  - links: Link<Id>[]

  #### Returns Traveler

  Implementation of DeepClientInstance.Traveler

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

### _generateHooks

- _generateHooks(deep): void

- #### Parameters

  - deep: any

  #### Returns void

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

### _generateQuery

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

- #### Type Parameters

  - TTable extends
    | "links"
    | "can"
    | "tree"
    | "selectors"
    | "numbers"
    | "strings"
    | "objects"
    | "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:804

### _generateResult

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

- #### Type Parameters

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

  #### Parameters

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

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

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

### _silent

- _silent(options?): boolean

- #### Parameters

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

  #### Returns boolean

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

### 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:1447

### 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:1717

### 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:1319

### 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:1627

### 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:1485

### 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:1581

### 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:1536

### 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:1787

### 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:1054

### jwt

- jwt(options): Promise<DeepClientAuthResult>

- #### Parameters

  - options: DeepClientJWTOptions

  #### Returns Promise<DeepClientAuthResult>

  Implementation of DeepClientInstance.jwt

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

### 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:1695

### 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:1704

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

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

### nameLocal

- nameLocal(input): Id

- 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 Id

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

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

### 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:1427

### 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"
    | "can"
    | "tree"
    | "selectors"
    | "numbers"
    | "strings"
    | "objects"
    | "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:915

### 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:1363

### 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:801

### 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:802

### stringify

- stringify(any?): string

- #### Parameters

  - `Optional` any: any

  #### Returns string

  Implementation of DeepClientInstance.stringify

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

### subscribe

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

- Subscribes to data in the database

  #### Type Parameters

  - TTable extends
    | "links"
    | "can"
    | "tree"
    | "selectors"
    | "numbers"
    | "strings"
    | "objects"
    | "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:936

### 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:1173

### 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:1669