default
@nishans/core / Exports / default
#
Class: default#
HierarchyCache
↳ default
#
Index#
Constructors#
Properties#
Methods- #initializeCache
- getNotionUser
- getNotionUsers
- initializeCache
- initializeCacheForSpecificData
- returnNonCachedData
- saveToCache
- updateCacheIfNotPresent
- updateCacheManually
#
Constructors#
constructor+ new default(arg
: Pick<NishanArg, token> & { interval?
: undefined | number ; logger?
: undefined | false | (method
: TMethodType, subject
: block | collection | collection_view | space | notion_user | space_view | user_root | user_settings, id
: string) => void }): default
#
Parameters:Name | Type |
---|---|
arg | Pick<NishanArg, token> & { interval? : undefined | number ; logger? : undefined | false | (method : TMethodType, subject : block | collection | collection_view | space | notion_user | space_view | user_root | user_settings, id : string) => void } |
Returns: default
Defined in: core/src/index.ts:26
#
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
#
init_cache• init_cache: boolean
Defined in: core/src/index.ts:25
#
interval• interval: number
Defined in: core/src/index.ts:24
#
logger• logger: Logger
Defined in: core/src/index.ts:26
#
token• token: string
Defined in: core/src/index.ts:23
#
user_id• user_id: string
Defined in: endpoints/dist/src/Cache.d.ts:13
#
Methods#
#initializeCacheâ–¸ #initializeCache(): Promise<void>
Returns: Promise<void>
Defined in: core/src/index.ts:38
#
getNotionUserâ–¸ getNotionUser(arg?
: FilterType<INotionUser>): Promise<NotionUser>
Get INotionUser
and return NotionUser
by the args
param
#
Parameters:Name | Type |
---|---|
arg? | FilterType<INotionUser> |
Returns: Promise<NotionUser>
Defined in: core/src/index.ts:54
#
getNotionUsersâ–¸ getNotionUsers(args?
: FilterTypes<INotionUser>, multiple?
: boolean): Promise<NotionUser[]>
Get INotionUser[]
and return NotionUser[]
by the args
param
#
Parameters:Name | Type | Description |
---|---|---|
args? | FilterTypes<INotionUser> | An array of string ids, a predicate passed the INotionUser or undefined to indicate everything |
multiple? | boolean | - |
Returns: Promise<NotionUser[]>
Defined in: core/src/index.ts:62
#
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
#
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
#
updateCacheIfNotPresentâ–¸ updateCacheIfNotPresent(arg
: UpdateCacheManuallyParam): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | UpdateCacheManuallyParam |
Returns: Promise<void>
Defined in: endpoints/dist/src/Cache.d.ts:24
#
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