hubSearchEvents

Function

Searches for events against the Events 3 API using the given query and options. Currently supported filters include:

  • access: 'public' | 'private' | 'org' | Array<'public' | 'org' | 'access'>;
  • canEdit: boolean
  • entityId: string | string[];
  • entityType: string | string[];
  • id: string | string[];
  • userId: string;
  • term: string;
  • categories: string | string[];
  • tags: string | string[];
  • group: string | string[];
  • notGroup: string | string[];
  • readGroupId: string | string[];
  • notReadGroupId: string | string[];
  • editGroupId: string | string[];
  • notEditGroupId: string | string[];
  • attendanceType: 'virtual' | 'in_person' | Array<'virtual' | 'in_person'>;
  • owner: string | string[];
  • status: 'planned' | 'canceled' | 'removed' | Array<'planned' | 'canceled' | 'removed'>;
  • startDateBefore: string | number;
  • startDateAfter: string | number;
  • startDateRange: IDateRange<string | number>;
  • endDateRange: IDateRange<string | number>;
  • endDateBefore: string | number;
  • endDateAfter: string | number;
  • orgId: string; Currently supported sort fields include:
  • created
  • modified
  • title
  • startDate

Parameters

Parameter Type Default Notes
query Required IQuery

An IQuery object

options Required IHubSearchOptions

An IHubSearchOptions object

Returns

a promise that resolves a <IHubSearchResponse object

Property Type Notes
hasNext boolean

Can more results be fetched?

next function(params: any) : Promise<IHubSearchResponse<>>

Function that fetches the next page of results

results []

Array if results

total number

Total number of matches for the query

aggregations Optional IHubAggregation[]

Array of requested aggregations

executedQuerySize Optional Kilobyte

The length of the query string that was just executed in the search, measured in kilobytes

messages Optional IMessage[]

Array of messages / warnings


Function defined in common/src/search/_internal/hubSearchEvents.ts:48