Context
Everything an extension’s callbacks get, capability-gated by the manifest’s permissions.
Extended by
Section titled “Extended by”Properties
Section titled “Properties”extensionId
Section titled “extensionId”extensionId:
string
log:
Logger
oauth:
OAuth
Sign-in to the services your manifest declares in oauth, run by the app.
preferences
Section titled “preferences”preferences:
Preferences
secrets
Section titled “secrets”secrets:
Secrets
Keychain-backed; use for tokens, never storage (a plain file).
storage
Section titled “storage”storage:
Storage
trigger
Section titled “trigger”trigger:
Trigger
Methods
Section titled “Methods”emit()
Section titled “emit()”emit(
blip):void
Emits a full snapshot for one blip. Call once per changed item, not a diff.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
blip |
BlipInput |
Returns
Section titled “Returns”void
end(
key,options?):void
Marks a blip finished; surfaces show the final state, then dismiss it.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key |
string |
options? |
{ dismissAfter?: number; state?: "success" | "failure"; } |
options.dismissAfter? |
number |
options.state? |
"success" | "failure" |
Returns
Section titled “Returns”void
exec()
Section titled “exec()”exec(
file,args?,options?):Promise<ExecResult>
Runs an executable listed in permissions.exec. Rejects if it isn’t.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
file |
string |
args? |
string[] |
options? |
{ cwd?: string; timeoutMs?: number; } |
options.cwd? |
string |
options.timeoutMs? |
number |
Returns
Section titled “Returns”Promise<ExecResult>
notify()
Section titled “notify()”notify(
title,body?):Promise<void>
A line under the notch for a few seconds, for the result of something the user just did.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
title |
string |
body? |
string |
Returns
Section titled “Returns”Promise<void>
openURL()
Section titled “openURL()”openURL(
url):Promise<void>
Opens a URL with the user’s default handler.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
url |
string |
Returns
Section titled “Returns”Promise<void>
remove()
Section titled “remove()”remove(
key):void
Removes a blip immediately, with no final-state flourish.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
key |
string |
Returns
Section titled “Returns”void
requestFolderAccess()
Section titled “requestFolderAccess()”requestFolderAccess(
path):Promise<void>
Asks the person to let Blipbar read a folder that macOS keeps from other apps (another
app’s data, like the Stocks app’s watchlist, which is refused with no prompt of its
own): macOS’s Open dialog, already at path, where one press of Allow grants that
folder and nothing else, remembered from then on. The folder must be one of your
permissions.files. It resolves once the dialog is up; when they allow it, update()
runs again.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
path |
string |
Returns
Section titled “Returns”Promise<void>
respond()
Section titled “respond()”respond(
replyId,body,status?):void
Completes a webhook request that’s being held on event.replyId.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
replyId |
string |
body |
unknown |
status? |
number |
Returns
Section titled “Returns”void
setPreference()
Section titled “setPreference()”setPreference(
name,value):Promise<void>
Changes one of your own options (never a password), as if it were changed in
Settings: it’s saved, and update() runs again with it. For a button that sets
something up in one press (“Keep watching this repository”). undefined clears it.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
value |
string | number | boolean | undefined |
Returns
Section titled “Returns”Promise<void>
workingHours()
Section titled “workingHours()”workingHours():
Promise<WorkingHours|undefined>
The person’s working hours, or undefined when they haven’t set any (every hour is one).
Returns
Section titled “Returns”Promise<WorkingHours | undefined>