# Class MinilinkCollection<MGO, L>

#### Type Parameters

- MGO extends MinilinksGeneratorOptions = typeof MinilinksGeneratorOptionsDefault
- L extends Link<Id> = Link<Id>

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:309

#####
Index

### Constructors

constructor

### Properties

_updating
byFrom
byId
byTo
byType
deep?
emitter
links
options
toPlain
types
useMinilinksApply
useMinilinksFilter
useMinilinksHandle
useMinilinksQuery
useMinilinksSubscription
virtual
virtualCounter
virtualInverted

### Methods

_toPlainLinksArray
_traveled
add
apply
id
name
query
remove
select
subscribe
symbol
update

##
Constructors

### constructor

- new MinilinkCollection<MGO, L>(options?, memory?): MinilinkCollection<MGO, L>

- #### Type Parameters

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

  #### Parameters

  - `Optional` options: MGO
  - `Optional` memory: any

  #### Returns MinilinkCollection<MGO, L>

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:904

##
Properties

### _updating

_updating: boolean = false

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

### byFrom

byFrom: {
[id: Id]: Links<Id, L>;
} = {}

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:324

### byId

byId: {
[id: Id]: L;
} = {}

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:323

### byTo

byTo: {
[id: Id]: Links<Id, L>;
} = {}

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:325

### byType

byType: {
[id: Id]: Links<Id, L>;
} = {}

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:326

### `Optional` deep

deep?: DeepClient<Link<Id>>

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:310

### emitter

emitter: EventEmitter<DefaultEventMap>

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:329

### links

links: Links<Id, L> = ...

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

### options

options: MGO

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:328

### toPlain

toPlain: (<Ref>(link: any) => LinkPlain<Ref>) = toPlain

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:317

### types

types: {
[id: Id]: Links<Id, L>;
} = {}

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:322

### useMinilinksApply

useMinilinksApply: (<L>(ml: any, name: string, data?: MinilinksApplyInput | Links<Id, L>) => {
anomalies?: MinilinkError[];
data: L[];
errors?: MinilinkError[];
plainLinks: L[];
}) = useMinilinksApply

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:314

### useMinilinksFilter

useMinilinksFilter: (<L, R>(ml: any, filter: ((currentLink: L, oldLink: L, newLink: L) => boolean), results: ((l?: L, ml?: any, oldLink?: L, newLink?: L) => R), interval?: number) => R) = useMinilinksFilter

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:313

### useMinilinksHandle

useMinilinksHandle: (<L>(ml: any, handler: ((event: any, oldLink: any, newLink: any) => any)) => void) = useMinilinksHandle

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:316

### useMinilinksQuery

useMinilinksQuery: (<L>(ml: any, query: Id | QueryLink, options?: MinilinksQueryOptions<MinilinksQueryOptionAggregate>) => any) = useMinilinksQuery

#### Type declaration

- - <L>(ml, query, options?): any

  - React hook. Returns reactiviely links from minilinks, by query in deeplinks dialect. Recalculates when query changes. (Take query into useMemo!).

    #### Type Parameters

    - L extends Link<Id>

    #### Parameters

    - ml: any
    - query: Id | QueryLink
    - `Optional` options: MinilinksQueryOptions<MinilinksQueryOptionAggregate>

    #### Returns any

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:312

### useMinilinksSubscription

useMinilinksSubscription: (<L>(ml: any, query: Id | QueryLink, options?: MinilinksQueryOptions<MinilinksQueryOptionAggregate>) => any) = useMinilinksSubscription

#### Type declaration

- - <L>(ml, query, options?): any

  - React hook. Returns reactiviely links from minilinks, by query in deeplinks dialect. Recalculates when data in minilinks changes. (Take query into useMemo!).

    #### Type Parameters

    - L extends Link<Id>

    #### Parameters

    - ml: any
    - query: Id | QueryLink
    - `Optional` options: MinilinksQueryOptions<MinilinksQueryOptionAggregate>

    #### Returns any

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:315

### virtual

virtual: {
[id: Id]: Id;
} = {}

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:319

### virtualCounter

virtualCounter: number = -1

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:321

### virtualInverted

virtualInverted: {
[id: Id]: Id;
} = {}

- Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:320

##
Methods

### _toPlainLinksArray

- _toPlainLinksArray(linkOrLinks, applyOptions, plainLinksArray, returnLinksPathsById): void

- #### Parameters

  - linkOrLinks: any
  - applyOptions: any
  - plainLinksArray: any
  - returnLinksPathsById: any

  #### Returns void

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

### _traveled

- _traveled(array): Links<Id, L>

- #### Parameters

  - array: any[]

  #### Returns Links<Id, L>

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:916

### add

- add(linksArray, applyName?): {
  anomalies?: MinilinkError[];
  errors?: MinilinkError[];
  }

- #### Parameters

  - linksArray: any[]
  - applyName: string = ''

  #### Returns {
  anomalies?: MinilinkError[];
  errors?: MinilinkError[];
  }

  - ##### `Optional` anomalies?: MinilinkError[]

  - ##### `Optional` errors?: MinilinkError[]

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:479

### apply

- apply(_input, applyName?, applyOptions?): {
  anomalies?: MinilinkError[];
  data: L[];
  errors?: MinilinkError[];
  plainLinks: L[];
  }

- #### Parameters

  - _input: any[] | MinilinksApplyInput
  - applyName: string = ''
  - `Optional` applyOptions: ApplyOptions

  #### Returns {
  anomalies?: MinilinkError[];
  data: L[];
  errors?: MinilinkError[];
  plainLinks: L[];
  }

  - ##### `Optional` anomalies?: MinilinkError[]

  - ##### data: L[]

  - ##### `Optional` errors?: MinilinkError[]

  - ##### plainLinks: L[]

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:689

### id

- id(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.minilinks.id("@deep-foundation/core")

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

      const userTypeLinkId = deep.minilinks.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 = deep.minilinks.id(deep.linkId, 'My Link Name', 'My Nested Link Name')

  #### Get Admin Link Id

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

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:378

### name

- name(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.minilinks.name(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/minilinks.tsx:416

### query

- query<A>(query, options?): A extends string
  ? any
  : Links<Id, L>

- #### Type Parameters

  - A

  #### Parameters

  - query: Id | QueryLink
  - `Optional` options: MinilinksQueryOptions<A>

  #### Returns A extends string
  ? any
  : Links<Id, L>

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:331

### remove

- remove(idsArray, applyName?): {
  anomalies?: MinilinkError[];
  errors?: MinilinkError[];
  }

- #### Parameters

  - idsArray: any[]
  - `Optional` applyName: string

  #### Returns {
  anomalies?: MinilinkError[];
  errors?: MinilinkError[];
  }

  - ##### `Optional` anomalies?: MinilinkError[]

  - ##### `Optional` errors?: MinilinkError[]

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:601

### select

- select(query, options?): any

- #### Parameters

  - query: Id | QueryLink
  - `Optional` options: MinilinksQueryOptions<MinilinksQueryOptionAggregate>

  #### Returns any

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:347

### subscribe

- subscribe(query, options?): Observable<any>

- minilinks.subscribe

  #### Parameters

  - query: Id | QueryLink
  - `Optional` options: MinilinksQueryOptions<MinilinksQueryOptionAggregate>

  #### Returns Observable<any>

  #### Example

      minilinks.subscribe({ type_id: 2 }).subscribe({ next: (links) => {}, error: (err) => {} });

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

### symbol

- symbol(input): string

- Returns a symbol 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.minilinks.name(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/minilinks.tsx:435

### update

- update(linksArray, applyName?): {
  anomalies?: MinilinkError[];
  errors?: MinilinkError[];
  }

- #### Parameters

  - linksArray: any[]
  - `Optional` applyName: string

  #### Returns {
  anomalies?: MinilinkError[];
  errors?: MinilinkError[];
  }

  - ##### `Optional` anomalies?: MinilinkError[]

  - ##### `Optional` errors?: MinilinkError[]

  - Defined in work/deeplinks/deeplinks/imports/minilinks.tsx:850