Send a Pushover message. Priority 2 repeats until the user acknowledges it, and gives a receipt.
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/notify/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["notify","pushover","send"], { message: "<message>" });
console.log(JSON.stringify(result));From the command line
$ mark notify pushover send --message <string>
As data, in a program
{
"$proc": ["notify", "pushover", "send"],
"input": { "message": "<message>" }
}JSON Schemas
{
"input": {
"type": "object",
"properties": {
"user": {
"description": "The user key or the group key of the recipient. Without it, the procedure reads userEnv.",
"type": "string"
},
"userEnv": {
"default": "PUSHOVER_USER_KEY",
"description": "The name of the environment variable with the user key (default: PUSHOVER_USER_KEY)",
"type": "string",
"pattern": "^PUSHOVER_[A-Z0-9_]+$"
},
"message": {
"type": "string",
"minLength": 1,
"description": "The text, 1024 characters at most"
},
"title": {
"description": "The title, 250 characters at most",
"type": "string"
},
"url": {
"description": "An address that the notification opens",
"type": "string"
},
"urlTitle": {
"description": "The text of the address",
"type": "string"
},
"priority": {
"default": 0,
"description": "-2 no notification, -1 no sound, 0 normal, 1 high, 2 emergency: it repeats until acknowledged (default: 0)",
"anyOf": [
{
"type": "number",
"const": -2
},
{
"type": "number",
"const": -1
},
{
"type": "number",
"const": 0
},
{
"type": "number",
"const": 1
},
{
"type": "number",
"const": 2
}
]
},
"retryMs": {
"description": "Priority 2: the time between two repeats, 30000 or more",
"type": "integer",
"minimum": 30000,
"maximum": 9007199254740991
},
"expireMs": {
"description": "Priority 2: the time after which the repeats stop, 10800000 at most",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 10800000
},
"callback": {
"description": "Priority 2: an address that gets a POST when the user acknowledges",
"type": "string",
"format": "uri"
},
"tags": {
"description": "Priority 2: tags, for notify.pushover.cancel with tag",
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"sound": {
"description": "The name of a sound",
"type": "string"
},
"devices": {
"description": "The names of the devices that get the message (default: each device)",
"type": "array",
"items": {
"type": "string"
}
},
"format": {
"default": "text",
"description": "The format of the text (default: text)",
"type": "string",
"enum": [
"text",
"html",
"monospace"
]
},
"ttlMs": {
"description": "The time after which the device deletes the message. Priority 2 ignores it.",
"type": "integer",
"minimum": 1000,
"maximum": 9007199254740991
},
"tokenEnv": {
"default": "PUSHOVER_APP_TOKEN",
"description": "The name of the environment variable with the API token of the application (default: PUSHOVER_APP_TOKEN)",
"type": "string",
"pattern": "^PUSHOVER_[A-Z0-9_]+$"
},
"timeoutMs": {
"default": 20000,
"description": "The time limit, in milliseconds (default: 20000)",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 120000
}
},
"required": [
"message"
]
},
"output": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
}
},
"required": [
"ok"
],
"additionalProperties": {}
}
}