timelineview
@nishans/core / Exports / TimelineView
#
Class: TimelineViewA class to represent timeline view of Notion
noinheritdoc
#
HierarchyAggregator<ITimelineView>
↳ TimelineView
#
Index#
Constructors#
Properties#
Methods- addToChildArray
- createAggregation
- createAggregations
- createFilters
- createSorts
- deleteAggregation
- deleteAggregations
- deleteCachedData
- deleteFilter
- deleteFilters
- deleteIterate
- deleteSort
- deleteSorts
- emptyStack
- executeOperation
- getCachedData
- getCachedParentData
- getCollection
- getIterate
- getLastEditedProps
- getProps
- initializeCache
- initializeCacheForSpecificData
- initializeCacheForThisData
- printStack
- reposition
- returnNonCachedData
- saveToCache
- update
- updateAggregation
- updateAggregations
- updateCacheIfNotPresent
- updateCacheLocally
- updateCacheManually
- updateCachedData
- updateFilter
- updateFilters
- updateFormatPositionProperties
- updateFormatPositionProperty
- updateFormatProperties
- updateFormatProperty
- updateFormatVisibilityProperties
- updateFormatVisibilityProperty
- updateFormatWidthProperties
- updateFormatWidthProperty
- updateIterate
- updateLastEditedProps
- updateSort
- updateSorts
#
Constructors#
constructor+ new TimelineView(arg
: NishanArg): TimelineView
#
Parameters:Name | Type |
---|---|
arg | NishanArg |
Returns: TimelineView
Defined in: core/src/View/TimelineView.ts:10
#
Properties#
cache• cache: ICache
Defined in: endpoints/dist/src/Cache.d.ts:4
#
getConfigs• Protected
getConfigs: () => Configs
Defined in: endpoints/dist/src/Cache.d.ts:15
#
headers• headers: { headers
: { cookie
: string ; x-notion-active-user-header
: string } }
#
Type declaration:Name | Type |
---|---|
headers | { cookie : string ; x-notion-active-user-header : string } |
Defined in: endpoints/dist/src/Cache.d.ts:7
#
id• id: string
Defined in: core/src/Data.ts:33
#
init_cache• init_cache: boolean= false
Defined in: core/src/Data.ts:35
#
interval• interval: number
Defined in: endpoints/dist/src/Cache.d.ts:6
#
logger• Protected
logger: Logger
Defined in: core/src/Data.ts:36
#
shard_id• shard_id: number
Defined in: core/src/Operations.ts:9
#
space_id• space_id: string
Defined in: core/src/Operations.ts:8
#
stack• stack: IOperation[]
Defined in: core/src/Operations.ts:7
#
token• token: string
Defined in: endpoints/dist/src/Cache.d.ts:5
#
type• type: block | collection | collection_view | space | notion_user | space_view | user_root | user_settings
Defined in: core/src/Data.ts:34
#
user_id• user_id: string
Defined in: endpoints/dist/src/Cache.d.ts:13
#
Methods#
addToChildArrayâ–¸ Protected
addToChildArray(parent
: TData, position
: RepositionParams): void
Adds the passed block id in the child container array of parent
#
Parameters:Name | Type |
---|---|
parent | TData |
position | RepositionParams |
Returns: void
created Operation and a function to update the cache and the class data
Defined in: core/src/Data.ts:86
#
createAggregationâ–¸ createAggregation(arg
: TAggregationsCreateInput): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | TAggregationsCreateInput |
Returns: Promise<void>
Defined in: core/src/View/Aggregator.ts:15
#
createAggregationsâ–¸ createAggregations(args
: TAggregationsCreateInput[]): Promise<void>
#
Parameters:Name | Type |
---|---|
args | TAggregationsCreateInput[] |
Returns: Promise<void>
Defined in: core/src/View/Aggregator.ts:19
#
createFiltersâ–¸ createFilters(args
: TViewFilterCreateInput[]): void
#
Parameters:Name | Type |
---|---|
args | TViewFilterCreateInput[] |
Returns: void
Defined in: core/src/View/View.ts:171
#
createSortsâ–¸ createSorts(args
: TSortCreateInput[]): void
#
Parameters:Name | Type |
---|---|
args | TSortCreateInput[] |
Returns: void
Defined in: core/src/View/View.ts:84
#
deleteAggregationâ–¸ deleteAggregation(arg
: FilterType<ISchemaAggregationMapValue>): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | FilterType<ISchemaAggregationMapValue> |
Returns: Promise<void>
Defined in: core/src/View/Aggregator.ts:56
#
deleteAggregationsâ–¸ deleteAggregations(args
: FilterTypes<ISchemaAggregationMapValue>, multiple?
: boolean): Promise<void>
#
Parameters:Name | Type |
---|---|
args | FilterTypes<ISchemaAggregationMapValue> |
multiple? | boolean |
Returns: Promise<void>
Defined in: core/src/View/Aggregator.ts:60
#
deleteCachedDataâ–¸ Protected
deleteCachedData(): void
Delete the cached data using the id
Returns: void
Defined in: core/src/Data.ts:76
#
deleteFilterâ–¸ deleteFilter(arg
: FilterType<ISchemaFiltersMapValue>): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | FilterType<ISchemaFiltersMapValue> |
Returns: Promise<void>
Defined in: core/src/View/View.ts:220
#
deleteFiltersâ–¸ deleteFilters(args
: FilterTypes<ISchemaFiltersMapValue>, multiple?
: boolean): Promise<void>
#
Parameters:Name | Type |
---|---|
args | FilterTypes<ISchemaFiltersMapValue> |
multiple? | boolean |
Returns: Promise<void>
Defined in: core/src/View/View.ts:224
#
deleteIterateâ–¸ Protected
deleteIterate<TD>(args
: FilterTypes<TD>, options
: IterateAndDeleteOptions<ITimelineView>, transform
: (id
: string) => undefined | TD, cb?
: (id
: string, data
: TD) => void | Promise<any>): Promise<TD[]>
#
Type parameters:Name |
---|
TD |
#
Parameters:Name | Type |
---|---|
args | FilterTypes<TD> |
options | IterateAndDeleteOptions<ITimelineView> |
transform | (id : string) => undefined | TD |
cb? | (id : string, data : TD) => void | Promise<any> |
Returns: Promise<TD[]>
Defined in: core/src/Data.ts:118
#
deleteSortâ–¸ deleteSort(arg
: FilterTypes<ISchemaSortsMapValue>): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | FilterTypes<ISchemaSortsMapValue> |
Returns: Promise<void>
Defined in: core/src/View/View.ts:148
#
deleteSortsâ–¸ deleteSorts(args
: FilterTypes<ISchemaSortsMapValue>, multiple?
: boolean): Promise<void>
#
Parameters:Name | Type |
---|---|
args | FilterTypes<ISchemaSortsMapValue> |
multiple? | boolean |
Returns: Promise<void>
Defined in: core/src/View/View.ts:152
#
emptyStackâ–¸ emptyStack(): void
Returns: void
Defined in: core/src/Operations.ts:18
#
executeOperationâ–¸ executeOperation(): Promise<void>
Returns: Promise<void>
Defined in: core/src/Operations.ts:26
#
getCachedDataâ–¸ getCachedData(): ITimelineView
Get the cached data using the current data id
Returns: ITimelineView
Defined in: core/src/Data.ts:62
#
getCachedParentDataâ–¸ getCachedParentData(): TCollectionBlock
Returns: TCollectionBlock
Defined in: core/src/View/View.ts:54
#
getCollectionâ–¸ getCollection(): ICollection
Returns: ICollection
Defined in: core/src/View/View.ts:48
#
getIterateâ–¸ Protected
getIterate<RD, C>(args
: FilterTypes<RD>, options
: IterateAndGetOptions<ITimelineView, C>, transform
: (id
: string) => undefined | RD, cb?
: (id
: string, data
: RD, container
: C) => any): Promise<C>
#
Type parameters:Name |
---|
RD |
C |
#
Parameters:Name | Type |
---|---|
args | FilterTypes<RD> |
options | IterateAndGetOptions<ITimelineView, C> |
transform | (id : string) => undefined | RD |
cb? | (id : string, data : RD, container : C) => any |
Returns: Promise<C>
Defined in: core/src/Data.ts:138
#
getLastEditedPropsâ–¸ Protected
getLastEditedProps(): object
Returns: object
Name | Type |
---|---|
last_edited_by_id | string |
last_edited_by_table | string |
last_edited_time | number |
Defined in: core/src/Data.ts:48
#
getPropsâ–¸ getProps(): object
Returns: object
Name | Type |
---|---|
cache | ICache |
interval | number |
logger | Logger |
shard_id | number |
space_id | string |
stack | IOperation[] |
token | string |
user_id | string |
Defined in: core/src/Data.ts:148
#
initializeCacheâ–¸ initializeCache(): Promise<void>
Returns: Promise<void>
Defined in: endpoints/dist/src/Cache.d.ts:22
#
initializeCacheForSpecificDataâ–¸ initializeCacheForSpecificData(id
: string, type
: block | collection | collection_view | space | notion_user | space_view | user_root | user_settings): Promise<void>
#
Parameters:Name | Type |
---|---|
id | string |
type | block | collection | collection_view | space | notion_user | space_view | user_root | user_settings |
Returns: Promise<void>
Defined in: endpoints/dist/src/Cache.d.ts:25
#
initializeCacheForThisDataâ–¸ Protected
initializeCacheForThisData(): Promise<void>
Returns: Promise<void>
Defined in: core/src/Data.ts:111
#
printStackâ–¸ printStack(): void
Returns: void
Defined in: core/src/Operations.ts:22
#
repositionâ–¸ reposition(arg
: RepositionParams): void
#
Parameters:Name | Type |
---|---|
arg | RepositionParams |
Returns: void
Defined in: core/src/View/View.ts:58
#
returnNonCachedDataâ–¸ returnNonCachedData(ids
: UpdateCacheManuallyParam): UpdateCacheManuallyParam
#
Parameters:Name | Type |
---|---|
ids | UpdateCacheManuallyParam |
Returns: UpdateCacheManuallyParam
Defined in: endpoints/dist/src/Cache.d.ts:21
#
saveToCacheâ–¸ saveToCache(recordMap
: Partial<RecordMap>): void
Save the passed recordMap to cache
#
Parameters:Name | Type | Description |
---|---|---|
recordMap | Partial<RecordMap> | RecordMap map to save to cache |
Returns: void
Defined in: endpoints/dist/src/Cache.d.ts:20
#
updateâ–¸ update(param
: TViewCreateInput): ITView
Update the current view
#
Parameters:Name | Type |
---|---|
param | TViewCreateInput |
Returns: ITView
Defined in: core/src/View/View.ts:67
#
updateAggregationâ–¸ updateAggregation(arg
: UpdateType<ISchemaAggregationMapValue, TAggregationsUpdateInput>): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | UpdateType<ISchemaAggregationMapValue, TAggregationsUpdateInput> |
Returns: Promise<void>
Defined in: core/src/View/Aggregator.ts:35
#
updateAggregationsâ–¸ updateAggregations(args
: UpdateTypes<ISchemaAggregationMapValue, TAggregationsUpdateInput>, multiple?
: boolean): Promise<void>
#
Parameters:Name | Type |
---|---|
args | UpdateTypes<ISchemaAggregationMapValue, TAggregationsUpdateInput> |
multiple? | boolean |
Returns: Promise<void>
Defined in: core/src/View/Aggregator.ts:39
#
updateCacheIfNotPresentâ–¸ updateCacheIfNotPresent(arg
: UpdateCacheManuallyParam): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | UpdateCacheManuallyParam |
Returns: Promise<void>
Defined in: endpoints/dist/src/Cache.d.ts:24
#
updateCacheLocallyâ–¸ updateCacheLocally(arg
: Partial<ITimelineView>, keys
: readonly (id | name | type | format | alive | version | parent_id | parent_table | query2)[], appendToStack?
: boolean): void
Update the cache of the data using only the passed keys
#
Parameters:Name | Type | Description |
---|---|---|
arg | Partial<ITimelineView> | |
keys | readonly (id | name | type | format | alive | version | parent_id | parent_table | query2)[] | |
appendToStack? | boolean | - |
Returns: void
Defined in: core/src/Data.ts:95
#
updateCacheManuallyâ–¸ updateCacheManually(arg
: string | UpdateCacheManuallyParam): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | string | UpdateCacheManuallyParam |
Returns: Promise<void>
Defined in: endpoints/dist/src/Cache.d.ts:23
#
updateCachedDataâ–¸ updateCachedData(): Promise<void>
Returns: Promise<void>
Defined in: core/src/Data.ts:69
#
updateFilterâ–¸ updateFilter(arg
: UpdateType<ISchemaFiltersMapValue, TViewFilterUpdateInput>): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | UpdateType<ISchemaFiltersMapValue, TViewFilterUpdateInput> |
Returns: Promise<void>
Defined in: core/src/View/View.ts:184
#
updateFiltersâ–¸ updateFilters(args
: UpdateTypes<ISchemaFiltersMapValue, TViewFilterUpdateInput>, multiple?
: boolean): Promise<void>
#
Parameters:Name | Type |
---|---|
args | UpdateTypes<ISchemaFiltersMapValue, TViewFilterUpdateInput> |
multiple? | boolean |
Returns: Promise<void>
Defined in: core/src/View/View.ts:188
#
updateFormatPositionPropertiesâ–¸ updateFormatPositionProperties(args
: UpdateTypes<ISchemaFormatMapValue, number>, multiple?
: boolean): Promise<void>
#
Parameters:Name | Type |
---|---|
args | UpdateTypes<ISchemaFormatMapValue, number> |
multiple? | boolean |
Returns: Promise<void>
Defined in: core/src/View/View.ts:311
#
updateFormatPositionPropertyâ–¸ updateFormatPositionProperty(arg
: UpdateType<ISchemaFormatMapValue, number>): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | UpdateType<ISchemaFormatMapValue, number> |
Returns: Promise<void>
Defined in: core/src/View/View.ts:307
#
updateFormatPropertiesâ–¸ updateFormatProperties(args
: UpdateTypes<ISchemaFormatMapValue, Partial<{ position
: number ; visible
: boolean ; width
: number }>>, multiple?
: boolean): Promise<void>
#
Parameters:Name | Type |
---|---|
args | UpdateTypes<ISchemaFormatMapValue, Partial<{ position : number ; visible : boolean ; width : number }>> |
multiple? | boolean |
Returns: Promise<void>
Defined in: core/src/View/View.ts:345
#
updateFormatPropertyâ–¸ updateFormatProperty(arg
: UpdateType<ISchemaFormatMapValue, Partial<{ position
: number ; visible
: boolean ; width
: number }>>): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | UpdateType<ISchemaFormatMapValue, Partial<{ position : number ; visible : boolean ; width : number }>> |
Returns: Promise<void>
Defined in: core/src/View/View.ts:341
#
updateFormatVisibilityPropertiesâ–¸ updateFormatVisibilityProperties(args
: UpdateTypes<ISchemaFormatMapValue, boolean>, multiple?
: boolean): Promise<void>
#
Parameters:Name | Type |
---|---|
args | UpdateTypes<ISchemaFormatMapValue, boolean> |
multiple? | boolean |
Returns: Promise<void>
Defined in: core/src/View/View.ts:251
#
updateFormatVisibilityPropertyâ–¸ updateFormatVisibilityProperty(arg
: UpdateType<ISchemaFormatMapValue, boolean>): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | UpdateType<ISchemaFormatMapValue, boolean> |
Returns: Promise<void>
Defined in: core/src/View/View.ts:247
#
updateFormatWidthPropertiesâ–¸ updateFormatWidthProperties(args
: UpdateTypes<ISchemaFormatMapValue, number>, multiple?
: boolean): Promise<void>
#
Parameters:Name | Type |
---|---|
args | UpdateTypes<ISchemaFormatMapValue, number> |
multiple? | boolean |
Returns: Promise<void>
Defined in: core/src/View/View.ts:281
#
updateFormatWidthPropertyâ–¸ updateFormatWidthProperty(arg
: UpdateType<ISchemaFormatMapValue, number>): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | UpdateType<ISchemaFormatMapValue, number> |
Returns: Promise<void>
Defined in: core/src/View/View.ts:277
#
updateIterateâ–¸ Protected
updateIterate<TD, RD, C>(args
: UpdateTypes<TD, RD>, options
: IterateAndUpdateOptions<ITimelineView, C>, transform
: (id
: string) => undefined | TD, cb?
: (id
: string, data
: TD, updated\_data
: RD, container
: C) => any): Promise<C>
#
Type parameters:Name | Default |
---|---|
TD | - |
RD | - |
C | any |
#
Parameters:Name | Type |
---|---|
args | UpdateTypes<TD, RD> |
options | IterateAndUpdateOptions<ITimelineView, C> |
transform | (id : string) => undefined | TD |
cb? | (id : string, data : TD, updated\_data : RD, container : C) => any |
Returns: Promise<C>
Defined in: core/src/Data.ts:128
#
updateLastEditedPropsâ–¸ Protected
updateLastEditedProps(data?
: INotionUser | IText | ITodo | IHeader | ISubHeader | ISubSubHeader | IBulletedList | INumberedList | IToggle | IQuote | IDivider | ICallout | IPage | ICollectionView | ICollectionViewPage | ILinkToPage | IVideo | IAudio | IImage | IWebBookmark | ICode | IFile | ITOC | IEquation | IBreadcrumb | IFactory | IEmbed | ITweet | ICodepen | IMaps | IFigma | IDrive | IGist | IColumnList | IColumn | ICollection | ITableView | IListView | IBoardView | IGalleryView | ICalendarView | ITimelineView | ISpace | ISpaceView | IUserRoot | IUserSettings): void
#
Parameters:Name | Type |
---|---|
data? | INotionUser | IText | ITodo | IHeader | ISubHeader | ISubSubHeader | IBulletedList | INumberedList | IToggle | IQuote | IDivider | ICallout | IPage | ICollectionView | ICollectionViewPage | ILinkToPage | IVideo | IAudio | IImage | IWebBookmark | ICode | IFile | ITOC | IEquation | IBreadcrumb | IFactory | IEmbed | ITweet | ICodepen | IMaps | IFigma | IDrive | IGist | IColumnList | IColumn | ICollection | ITableView | IListView | IBoardView | IGalleryView | ICalendarView | ITimelineView | ISpace | ISpaceView | IUserRoot | IUserSettings |
Returns: void
Defined in: core/src/Data.ts:52
#
updateSortâ–¸ updateSort(arg
: UpdateType<ISchemaSortsMapValue, TSortUpdateInput>): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | UpdateType<ISchemaSortsMapValue, TSortUpdateInput> |
Returns: Promise<void>
Defined in: core/src/View/View.ts:112
#
updateSortsâ–¸ updateSorts(args
: UpdateTypes<ISchemaSortsMapValue, TSortUpdateInput>, multiple?
: boolean): Promise<void>
#
Parameters:Name | Type |
---|---|
args | UpdateTypes<ISchemaSortsMapValue, TSortUpdateInput> |
multiple? | boolean |
Returns: Promise<void>
Defined in: core/src/View/View.ts:116