# Class Packager<L>

#### Type Parameters

- #### L extends Link<any>

- Defined in work/deeplinks/deeplinks/imports/packager.ts:111

#####
Index

### Constructors

constructor

### Properties

client
pckg

### Methods

deserialize
export
fetchDependenciedLinkId
fetchPackageNamespaceId
globalizeIds
import
insertItem
insertItems
selectLinks
serialize
validate

## Constructors

### constructor

- new Packager<L>(client): Packager<L>

- #### Type Parameters

  - #### L extends Link<any>

  #### Parameters

  - ##### client: DeepClient<L>

  #### Returns Packager<L>

  - Defined in work/deeplinks/deeplinks/imports/packager.ts:114

## Properties

### client

client: DeepClient<any>

- Defined in work/deeplinks/deeplinks/imports/packager.ts:113

### pckg

pckg: Package

- Defined in work/deeplinks/deeplinks/imports/packager.ts:112

## Methods

### deserialize

- deserialize(pckg, errors?): Promise<{
  counter: number;
  data: PackageItem[];
  dependedLinks: PackageItem[];
  errors?: any[];
  namespaceId: number;
  packageId: number;
  }>

- Deserialize pckg data to links list with local numerical ids.

  #### Parameters

  - ##### pckg: Package

  - ##### errors: any[] = []

  #### Returns Promise<{
  counter: number;
  data: PackageItem[];
  dependedLinks: PackageItem[];
  errors?: any[];
  namespaceId: number;
  packageId: number;
  }>

  - Defined in work/deeplinks/deeplinks/imports/packager.ts:457

### export

- export(options): Promise<Package>

- Export from system pckg by package link id.

  #### Parameters

  - ##### options: PackagerExportOptions

  #### Returns Promise<Package>

  - Defined in work/deeplinks/deeplinks/imports/packager.ts:769

### fetchDependenciedLinkId

- fetchDependenciedLinkId(pckg, dependedLink): Promise<number>

- Fetch package namespace.

  #### Parameters

  - ##### pckg: Package

  - ##### dependedLink: PackageItem

  #### Returns Promise<number>

  - Defined in work/deeplinks/deeplinks/imports/packager.ts:146

### fetchPackageNamespaceId

- fetchPackageNamespaceId(name, deep): Promise<{
  error: any;
  namespaceId: number;
  }>

- Fetch package namespace.

  #### Parameters

  - ##### name: string

  - ##### deep: DeepClient<Link<number>>

  #### Returns Promise<{
  error: any;
  namespaceId: number;
  }>

  - Defined in work/deeplinks/deeplinks/imports/packager.ts:123

### globalizeIds

- globalizeIds(pckg, ids, links): Promise<{
  difference: {
  [id: number]: number;
  };
  global: PackageItem[];
  }>

- #### Parameters

  - ##### pckg: Package

  - ##### ids: number[]

  - ##### links: PackageItem[]

  #### Returns Promise<{
  difference: {
  [id: number]: number;
  };
  global: PackageItem[];
  }>

  - Defined in work/deeplinks/deeplinks/imports/packager.ts:271

### import

- import(pckg): Promise<PackagerImportResult>

- Import into system pckg.

  #### Parameters

  - ##### pckg: Package

  #### Returns Promise<PackagerImportResult>

  - Defined in work/deeplinks/deeplinks/imports/packager.ts:356

### insertItem

- insertItem(items, item, errors, mutated): Promise<void>

- #### Parameters

  - ##### items: PackageItem[]

  - ##### item: PackageItem

  - ##### errors: any[]

  - ##### mutated: PackagerMutated

  #### Returns Promise<void>

  - Defined in work/deeplinks/deeplinks/imports/packager.ts:168

### insertItems

- insertItems(pckg, data, counter, dependedLinks, errors?, mutated?): Promise<any>

- #### Parameters

  - ##### pckg: Package

  - ##### data: PackageItem[]

  - ##### counter: number

  - ##### dependedLinks: PackageItem[]

  - ##### errors: any[] = []

  - ##### mutated: {
    [index: number]: boolean;
    } = {}

    - ##### [index: number]: boolean

  #### Returns Promise<any>

  - Defined in work/deeplinks/deeplinks/imports/packager.ts:241

### selectLinks

- selectLinks(options): Promise<MinilinksResult<PackagerLink>>

- #### Parameters

  - ##### options: PackagerExportOptions

  #### Returns Promise<MinilinksResult<PackagerLink>>

  - Defined in work/deeplinks/deeplinks/imports/packager.ts:386

### serialize

- serialize(globalLinks, options, pckg): Promise<Package>

- #### Parameters

  - ##### globalLinks: MinilinksResult<PackagerLink>

  - ##### options: PackagerExportOptions

  - ##### pckg: Package

  #### Returns Promise<Package>

  - Defined in work/deeplinks/deeplinks/imports/packager.ts:614

### validate

- validate(pckg, errors): void

- #### Parameters

  - ##### pckg: Package

  - ##### errors: any[]

  #### Returns void

  - Defined in work/deeplinks/deeplinks/imports/packager.ts:310

Generated using TypeDoc