Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

AccessEvent

AccessEvent: { accessor: IdentityId; createdAt: Date; document: DocumentId }

Type declaration

DocumentId

DocumentId: Opaque<ResourceId, "DocumentId">

DocumentSearchParams

DocumentSearchParams: { accessibleInContext?: AccessContext; selectedByCondition?: Condition }

A very flexible document search interface.

Examples:

Search for documents you own

{
  selectedByCondition: { 'document.owner': { $eq: (await parcel.getCurrentIdentity()).id } },
}

Search for documents shared with you

let me = (await parcel.getCurrentIdentity()).id;
{
  selectedByCondition: { 'document.owner': { $ne: me } },
  accessibleInContext: { accessor: me },
}

Search for documents with tags

{
  selectedByCondition: {
    'document.tags': { $intersects: ['csv', 'json'] }
  },
}

Type declaration

  • Optional accessibleInContext?: AccessContext

    Searches for documents that can be accessed in the provided context. This field allows you to discover documents that you can access either yourself, or from a job.

  • Optional selectedByCondition?: Condition

    Searches for documents that would be selected if a grant with the specfified condition were created. Use this field for simulating a grant.

    If accessibleInContext is also specfified, this field selects documents both accessible in the context and selected by the condition (i.e. existing conditions apply).

DocumentUpdateParams

DocumentUpdateParams: WritableExcluding<Document, "creator" | "size" | "originatingJob">

DocumentUploadParams

DocumentUploadParams: SetOptional<DocumentUpdateParams, "owner" | "details"> & { toApp: AppId | undefined }

ListAccessLogFilter

ListAccessLogFilter: Partial<{ accessor: IdentityId; after: Date; before: Date }>

PODAccessEvent

PODAccessEvent: Readonly<{ accessor: ResourceId; createdAt: string; document: ResourceId }>

PODDocument

PODDocument: Readonly<PODModel & { creator: ResourceId; details: DocumentDetails; originatingJob?: JobId; owner: ResourceId; size: number }>

Storable

Storable: Uint8Array | Readable | ReadStream | Blob | string

Generated using TypeDoc