-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mark inbox commands with 'use' directive
This is an example that shows how to use this directive.
- Loading branch information
Showing
2 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
""" | ||
Allow admin to flush the inbox bin". | ||
""" | ||
type InboxAdminMutation @protected{ | ||
type InboxAdminMutation @use(modules: ["mod_inbox"]) @protected{ | ||
"Flush the user's bin and return the number of deleted rows" | ||
flushUserBin( | ||
"User to clear a bin" | ||
user: JID!, | ||
"Remove older than given days or all if null" | ||
days: PosInt | ||
): Int @protected(type: DOMAIN, args: ["user"]) | ||
): Int @use(arg: "user") @protected(type: DOMAIN, args: ["user"]) | ||
|
||
"Flush the whole domain bin and return the number of deleted rows" | ||
flushDomainBin( | ||
"Domain to be cleared" | ||
domain: String!, | ||
"Remove older than given days or all if null" | ||
days: PosInt | ||
): Int @protected(type: Domain, args: ["domain"]) | ||
): Int @use(arg: "domain") @protected(type: Domain, args: ["domain"]) | ||
|
||
"Flush the global bin and return the number of deleted rows" | ||
flushGlobalBin( | ||
"Required to identify the DB backend" | ||
hostType: String!, | ||
"Remove older than given days or all if null" | ||
days: PosInt | ||
): Int @protected(type: GLOBAL) | ||
): Int @use(arg: "hostType") @protected(type: GLOBAL) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
""" | ||
Allow user to flush own inbox bin". | ||
""" | ||
type InboxUserMutation @protected{ | ||
type InboxUserMutation @use(modules: ["mod_inbox"]) @protected{ | ||
"Flush the user's bin and return the number of deleted rows" | ||
flushBin( | ||
"Remove older than given days or all if null" | ||
days: PosInt | ||
): Int | ||
): Int @use | ||
} |