Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a stream and can be used to get it's data.

The example below uses:

  • Stream.getRepository method returns Repository
  • Stream.getEntries method returns Criteria
    const repository = await stream.getRepository()
    const client = await repository.find(2);
    const clients = await stream.getEntries()
    .where('age', '>', 5)
    .where('age', '<', 50)
    .orderBy('age', 'asc')
    .get();
    for(const client of clients){
    client.email;
    client.age;
    }
    }

Type parameters

Hierarchy

Index

Constructors

constructor

  • new Stream<ID>(streams: Streams, stream: IBaseStream<ID>, meta?: ApiMeta<"get" | "post", any>, links?: Partial<Record<"stream" | "entries" | "self" | "location", string>>): Stream<ID>

Properties

Private #fields

Private Optional #links

#links?: Partial<Record<"stream" | "entries" | "self" | "location", string>>

Private Optional #meta

#meta?: ApiMeta<"get" | "post", any>

Private #proxy

#proxy: ProxyHandler<Stream<ID>>

Private #repository

#repository: Repository<ID>

Private #stream

#stream: IBaseStream<ID>

Private #streams

#streams: Streams

Optional config

Optional created_at

created_at?: string

description

description: string

Optional entries

entries?: IBaseEntry[]

Optional fields

fields?: IStreamFields

Optional handle

handle?: ID

Optional id

id?: ID

name

name: string

Optional routes

routes?: any[]

Optional updated_at

updated_at?: string

Optional validators

validators?: any[]

Methods

delete

  • delete(): Promise<boolean>

getEntries

getFields

getLinks

  • getLinks(): Partial<Record<"stream" | "entries" | "self" | "location", string>>

getMeta

  • getMeta(): ApiMeta<"get" | "post", any>

getRepository

getStreams

save

  • save(): Promise<boolean>

serialize

Protected unserialize

  • unserialize(stream: IStream<ID>): void