A Collection
is a subtype of Object that represents ordered or
unordered sets of Object or Link instances.
Refer to the Activity Streams 2.0 Core specification for a complete description of the Collection type.
Collection(values: { id?: URL | null; attachments?: ()[]; attribution?: ; attributions?: ()[]; audience?: ; audiences?: (Object | URL)[]; content?: ; contents?: ((string | LanguageString))[]; contexts?: ()[]; name?: ; names?: ((string | LanguageString))[]; endTime?: Temporal.Instant | null; generators?: ()[]; icon?: ; icons?: (Image | URL)[]; image?: ; images?: (Image | URL)[]; replyTarget?: ; replyTargets?: ()[]; location?: ; locations?: ()[]; preview?: ; previews?: ()[]; published?: Temporal.Instant | null; replies?: ; startTime?: Temporal.Instant | null; summary?: ; summaries?: ((string | LanguageString))[]; tags?: ()[]; updated?: Temporal.Instant | null; url?: ; urls?: ((URL | Link))[]; to?: ; tos?: (Object | URL)[]; bto?: ; btos?: (Object | URL)[]; cc?: ; ccs?: (Object | URL)[]; bcc?: ; bccs?: (Object | URL)[]; mediaType?: string | null; duration?: Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: ; proofs?: (DataIntegrityProof | URL)[]; totalItems?: number | null; current?: ; first?: ; last?: ; items?: ()[]; },unnamed 1?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },)
Constructs a new instance of Collection with the given values.
Similar to
Collection.getCurrent,
but returns its @id
URL instead of the object itself.
Similar to
Collection.getFirst,
but returns its @id
URL instead of the object itself.
Similar to
Collection.getItems,
but returns their @id
s instead of the objects themselves.
Similar to
Collection.getLast,
but returns its @id
URL instead of the object itself.
totalItems: number | null
A non-negative integer specifying the total number of objects contained by the logical view of the collection. This number might not reflect the actual number of items serialized within the Collection object instance.
[Symbol.for("Deno.customInspect")](inspect: Deno.inspect,options: Deno.InspectOptions,): string
_getCustomInspectProxy(): Record<string, unknown>
clone(values?: { id?: URL | null; attachments?: ()[]; attribution?: ; attributions?: ()[]; audience?: ; audiences?: (Object | URL)[]; content?: ; contents?: ((string | LanguageString))[]; contexts?: ()[]; name?: ; names?: ((string | LanguageString))[]; endTime?: Temporal.Instant | null; generators?: ()[]; icon?: ; icons?: (Image | URL)[]; image?: ; images?: (Image | URL)[]; replyTarget?: ; replyTargets?: ()[]; location?: ; locations?: ()[]; preview?: ; previews?: ()[]; published?: Temporal.Instant | null; replies?: ; startTime?: Temporal.Instant | null; summary?: ; summaries?: ((string | LanguageString))[]; tags?: ()[]; updated?: Temporal.Instant | null; url?: ; urls?: ((URL | Link))[]; to?: ; tos?: (Object | URL)[]; bto?: ; btos?: (Object | URL)[]; cc?: ; ccs?: (Object | URL)[]; bcc?: ; bccs?: (Object | URL)[]; mediaType?: string | null; duration?: Temporal.Duration | null; sensitive?: boolean | null; source?: Source | null; proof?: ; proofs?: (DataIntegrityProof | URL)[]; totalItems?: number | null; current?: ; first?: ; last?: ; items?: ()[]; },options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },): Collection
Clones this instance, optionally updating it with the given values.
getCurrent(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; }): Promise<CollectionPage | null>
In a paged Collection, indicates the page that contains the most recently updated member items.
getFirst(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; }): Promise<CollectionPage | null>
In a paged Collection, indicates the furthest preceding page of items in the collection.
getItems(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; }): AsyncIterable<Object | Link>
Identifies the items contained in a collection. The items might be ordered or unordered.
getLast(options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; suppressError?: boolean; }): Promise<CollectionPage | null>
In a paged Collection, indicates the furthest proceeding page of the collection.
isCompactable(): boolean
The type URI of Collection: https://www.w3.org/ns/activitystreams#Collection
.
fromJsonLd(json: unknown,options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },): Promise<Collection>
Converts a JSON-LD structure to an object of this type.