mutations
@nishans/endpoints / Exports / Mutations
#
Class: Mutations#
Hierarchy↳ Mutations
#
Index#
Constructors#
Properties#
Methods- createSpace
- enqueueTask
- findUser
- getBacklinksForBlock
- getConfigs
- getGenericEmbedBlockData
- getGoogleDriveAccounts
- getJoinableSpaces
- getPageVisits
- getPublicPageData
- getPublicSpaceData
- getSpaces
- getSubscriptionData
- getTasks
- getUploadFileUrl
- getUserNotifications
- getUserSharedPages
- getUserTasks
- initializeCache
- initializeCacheForSpecificData
- initializeGoogleDriveBlock
- initializePageTemplate
- inviteGuestsToSpace
- isEmailEducation
- isUserDomainJoinable
- loadBlockSubtree
- loadPageChunk
- loadUserContent
- queryCollection
- recordPageVisit
- removeUsersFromSpace
- returnNonCachedData
- saveToCache
- saveTransactions
- setBookmarkMetadata
- setPageNotificationsAsRead
- setSpaceNotificationsAsRead
- syncRecordValues
- updateCacheIfNotPresent
- updateCacheManually
#
Constructors#
constructor+ new Mutations(__namedParameters
: CtorArgs): Mutations
#
Parameters:Name | Type |
---|---|
__namedParameters | CtorArgs |
Returns: Mutations
Inherited from: Queries
Defined in: src/Mutations.ts:33
#
Properties#
cache• cache: ICache
Defined in: src/Cache.ts:6
#
createTransaction• createTransaction: (operations
: IOperation[]) => SaveTransactionParams
Defined in: src/Mutations.ts:33
#
headers• headers: { headers
: { cookie
: string ; x-notion-active-user-header
: string } }
#
Type declaration:Name | Type |
---|---|
headers | { cookie : string ; x-notion-active-user-header : string } |
Inherited from: Queries.headers
Defined in: src/Cache.ts:9
#
interval• interval: number
Inherited from: Queries.interval
Defined in: src/Cache.ts:8
#
shard_id• shard_id: number
Defined in: src/Mutations.ts:32
#
space_id• space_id: string
Defined in: src/Mutations.ts:31
#
token• token: string
Defined in: src/Cache.ts:7
#
user_id• user_id: string
Inherited from: Queries.user_id
Defined in: src/Cache.ts:15
#
Methods#
createSpaceâ–¸ createSpace(arg
: CreateSpaceParams): Promise<CreateSpaceResult>
#
Parameters:Name | Type |
---|---|
arg | CreateSpaceParams |
Returns: Promise<CreateSpaceResult>
Defined in: src/Mutations.ts:60
#
enqueueTaskâ–¸ enqueueTask(params
: EnqueueTaskParams): Promise<EnqueueTaskResult>
#
Parameters:Name | Type |
---|---|
params | EnqueueTaskParams |
Returns: Promise<EnqueueTaskResult>
Defined in: src/Mutations.ts:68
#
findUserâ–¸ findUser(params
: FindUserParams): Promise<FindUserResult>
#
Parameters:Name | Type |
---|---|
params | FindUserParams |
Returns: Promise<FindUserResult>
Inherited from: Queries
Defined in: src/Queries.ts:111
#
getBacklinksForBlockâ–¸ getBacklinksForBlock(params
: GetBackLinksForBlockParams): Promise<GetBackLinksForBlockResult>
#
Parameters:Name | Type |
---|---|
params | GetBackLinksForBlockParams |
Returns: Promise<GetBackLinksForBlockResult>
Inherited from: Queries
Defined in: src/Queries.ts:105
#
getConfigsâ–¸ getConfigs(): Configs
Returns: Configs
Inherited from: Queries
Defined in: src/Cache.ts:39
#
getGenericEmbedBlockDataâ–¸ getGenericEmbedBlockData(arg
: GetGenericEmbedBlockDataParams): Promise<GetGenericEmbedBlockDataResult>
#
Parameters:Name | Type |
---|---|
arg | GetGenericEmbedBlockDataParams |
Returns: Promise<GetGenericEmbedBlockDataResult>
Inherited from: Queries
Defined in: src/Queries.ts:93
#
getGoogleDriveAccountsâ–¸ getGoogleDriveAccounts(): Promise<GetGoogleDriveAccountsResult>
Returns: Promise<GetGoogleDriveAccountsResult>
Inherited from: Queries
Defined in: src/Queries.ts:101
#
getJoinableSpacesâ–¸ getJoinableSpaces(): Promise<GetJoinableSpacesResult>
Returns: Promise<GetJoinableSpacesResult>
Inherited from: Queries
Defined in: src/Queries.ts:139
#
getPageVisitsâ–¸ getPageVisits(arg
: GetPageVisitsParams): Promise<GetPageVisitsResult>
#
Parameters:Name | Type |
---|---|
arg | GetPageVisitsParams |
Returns: Promise<GetPageVisitsResult>
Inherited from: Queries
Defined in: src/Queries.ts:57
#
getPublicPageDataâ–¸ getPublicPageData(arg
: GetPublicPageDataParams): Promise<GetPublicPageDataResult>
#
Parameters:Name | Type |
---|---|
arg | GetPublicPageDataParams |
Returns: Promise<GetPublicPageDataResult>
Inherited from: Queries
Defined in: src/Queries.ts:69
#
getPublicSpaceDataâ–¸ getPublicSpaceData(arg
: GetPublicSpaceDataParams): Promise<GetPublicSpaceDataResult>
#
Parameters:Name | Type |
---|---|
arg | GetPublicSpaceDataParams |
Returns: Promise<GetPublicSpaceDataResult>
Inherited from: Queries
Defined in: src/Queries.ts:73
#
getSpacesâ–¸ getSpaces(): Promise<GetSpacesResult>
Returns: Promise<GetSpacesResult>
Inherited from: Queries
Defined in: src/Queries.ts:87
#
getSubscriptionDataâ–¸ getSubscriptionData(arg
: GetSubscriptionDataParams): Promise<GetSubscriptionDataResult>
#
Parameters:Name | Type |
---|---|
arg | GetSubscriptionDataParams |
Returns: Promise<GetSubscriptionDataResult>
Inherited from: Queries
Defined in: src/Queries.ts:77
#
getTasksâ–¸ getTasks(params
: GetTasksParams): Promise<GetTasksResult>
#
Parameters:Name | Type |
---|---|
params | GetTasksParams |
Returns: Promise<GetTasksResult>
Inherited from: Queries
Defined in: src/Queries.ts:155
#
getUploadFileUrlâ–¸ getUploadFileUrl(arg
: GetUploadFileUrlParams): Promise<GetUploadFileUrlResult>
#
Parameters:Name | Type |
---|---|
arg | GetUploadFileUrlParams |
Returns: Promise<GetUploadFileUrlResult>
Inherited from: Queries
Defined in: src/Queries.ts:97
#
getUserNotificationsâ–¸ getUserNotifications(params
: GetUserNotificationsParams): Promise<GetUserNotificationsResult>
#
Parameters:Name | Type |
---|---|
params | GetUserNotificationsParams |
Returns: Promise<GetUserNotificationsResult>
Inherited from: Queries
Defined in: src/Queries.ts:151
#
getUserSharedPagesâ–¸ getUserSharedPages(arg
: GetUserSharedPagesParams): Promise<GetUserSharedPagesResult>
#
Parameters:Name | Type |
---|---|
arg | GetUserSharedPagesParams |
Returns: Promise<GetUserSharedPagesResult>
Inherited from: Queries
Defined in: src/Queries.ts:61
#
getUserTasksâ–¸ getUserTasks(): Promise<GetUserTasksResult>
Returns: Promise<GetUserTasksResult>
Inherited from: Queries
Defined in: src/Queries.ts:65
#
initializeCacheâ–¸ initializeCache(): Promise<void>
Returns: Promise<void>
Inherited from: Queries
Defined in: src/Cache.ts:66
#
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>
Inherited from: Queries
Defined in: src/Cache.ts:110
#
initializeGoogleDriveBlockâ–¸ initializeGoogleDriveBlock(arg
: InitializeGoogleDriveBlockParams): Promise<InitializeGoogleDriveBlockResult>
#
Parameters:Name | Type |
---|---|
arg | InitializeGoogleDriveBlockParams |
Returns: Promise<InitializeGoogleDriveBlockResult>
Defined in: src/Mutations.ts:76
#
initializePageTemplateâ–¸ initializePageTemplate(arg
: InitializePageTemplateParams): Promise<InitializePageTemplateResult>
#
Parameters:Name | Type |
---|---|
arg | InitializePageTemplateParams |
Returns: Promise<InitializePageTemplateResult>
Defined in: src/Mutations.ts:82
#
inviteGuestsToSpaceâ–¸ inviteGuestsToSpace(arg
: InviteGuestsToSpaceParams): Promise<unknown>
#
Parameters:Name | Type |
---|---|
arg | InviteGuestsToSpaceParams |
Returns: Promise<unknown>
Defined in: src/Mutations.ts:56
#
isEmailEducationâ–¸ isEmailEducation(): Promise<IsEmailEducationResult>
Returns: Promise<IsEmailEducationResult>
Inherited from: Queries
Defined in: src/Queries.ts:147
#
isUserDomainJoinableâ–¸ isUserDomainJoinable(): Promise<IsUserDomainJoinableResult>
Returns: Promise<IsUserDomainJoinableResult>
Inherited from: Queries
Defined in: src/Queries.ts:143
#
loadBlockSubtreeâ–¸ loadBlockSubtree(arg
: LoadBlockSubtreeParams): Promise<LoadBlockSubtreeResult>
#
Parameters:Name | Type |
---|---|
arg | LoadBlockSubtreeParams |
Returns: Promise<LoadBlockSubtreeResult>
Inherited from: Queries
Defined in: src/Queries.ts:81
#
loadPageChunkâ–¸ loadPageChunk(params
: LoadPageChunkParams): Promise<LoadPageChunkResult>
#
Parameters:Name | Type |
---|---|
params | LoadPageChunkParams |
Returns: Promise<LoadPageChunkResult>
Inherited from: Queries
Defined in: src/Queries.ts:133
#
loadUserContentâ–¸ loadUserContent(): Promise<LoadUserContentResult>
Returns: Promise<LoadUserContentResult>
Inherited from: Queries
Defined in: src/Queries.ts:127
#
queryCollectionâ–¸ queryCollection(params
: QueryCollectionParams): Promise<QueryCollectionResult>
#
Parameters:Name | Type |
---|---|
params | QueryCollectionParams |
Returns: Promise<QueryCollectionResult>
Inherited from: Queries
Defined in: src/Queries.ts:121
#
recordPageVisitâ–¸ recordPageVisit(params
: RecordPageVisitParams): Promise<GetPageVisitsResult>
#
Parameters:Name | Type |
---|---|
params | RecordPageVisitParams |
Returns: Promise<GetPageVisitsResult>
Inherited from: Queries
Defined in: src/Queries.ts:159
#
removeUsersFromSpaceâ–¸ removeUsersFromSpace(arg
: RemoveUsersFromSpaceParams): Promise<RemoveUsersFromSpaceResult>
#
Parameters:Name | Type |
---|---|
arg | RemoveUsersFromSpaceParams |
Returns: Promise<RemoveUsersFromSpaceResult>
Defined in: src/Mutations.ts:50
#
returnNonCachedDataâ–¸ returnNonCachedData(ids
: UpdateCacheManuallyParam): UpdateCacheManuallyParam
#
Parameters:Name | Type |
---|---|
ids | UpdateCacheManuallyParam |
Returns: UpdateCacheManuallyParam
Inherited from: Queries
Defined in: src/Cache.ts:60
#
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
Inherited from: Queries
Defined in: src/Cache.ts:51
#
saveTransactionsâ–¸ saveTransactions(Operations
: IOperation[]): Promise<unknown>
#
Parameters:Name | Type |
---|---|
Operations | IOperation[] |
Returns: Promise<unknown>
Defined in: src/Mutations.ts:64
#
setBookmarkMetadataâ–¸ setBookmarkMetadata(arg
: SetBookmarkMetadataParams): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | SetBookmarkMetadataParams |
Returns: Promise<void>
Defined in: src/Mutations.ts:72
#
setPageNotificationsAsReadâ–¸ setPageNotificationsAsRead(arg
: SetPageNotificationsAsReadParams): Promise<unknown>
#
Parameters:Name | Type |
---|---|
arg | SetPageNotificationsAsReadParams |
Returns: Promise<unknown>
Defined in: src/Mutations.ts:42
#
setSpaceNotificationsAsReadâ–¸ setSpaceNotificationsAsRead(arg
: SetSpaceNotificationsAsReadParams): Promise<unknown>
#
Parameters:Name | Type |
---|---|
arg | SetSpaceNotificationsAsReadParams |
Returns: Promise<unknown>
Defined in: src/Mutations.ts:46
#
syncRecordValuesâ–¸ syncRecordValues(params
: SyncRecordValuesParams): Promise<SyncRecordValuesResult>
#
Parameters:Name | Type |
---|---|
params | SyncRecordValuesParams |
Returns: Promise<SyncRecordValuesResult>
Inherited from: Queries
Defined in: src/Queries.ts:115
#
updateCacheIfNotPresentâ–¸ updateCacheIfNotPresent(arg
: UpdateCacheManuallyParam): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | UpdateCacheManuallyParam |
Returns: Promise<void>
Inherited from: Queries
Defined in: src/Cache.ts:96
#
updateCacheManuallyâ–¸ updateCacheManually(arg
: string | UpdateCacheManuallyParam): Promise<void>
#
Parameters:Name | Type |
---|---|
arg | string | UpdateCacheManuallyParam |
Returns: Promise<void>
Inherited from: Queries
Defined in: src/Cache.ts:82