Compare commits
51 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d223831ce | ||
|
c1c8eda3b2
|
|||
| a8e03e5912 | |||
|
421821f1ee
|
|||
|
|
ae34160b12 | ||
|
61ac47fd05
|
|||
|
1ea099ff98
|
|||
|
93716ba3f8
|
|||
|
98cd99e27a
|
|||
|
|
f4f6046b78 | ||
|
d66c54d25d
|
|||
|
85663272c4
|
|||
|
4f6015a0c2
|
|||
|
5e4645097a
|
|||
|
|
9b88ae87cc | ||
|
|
8d711af84d | ||
|
143796f817
|
|||
|
37fdebdcab
|
|||
|
609e6dc507
|
|||
|
6d2743e7e8
|
|||
|
15beebf196
|
|||
|
5cfbc8d441
|
|||
|
f9385c9cf0
|
|||
|
64829441e5
|
|||
|
b09b0bcdae
|
|||
|
2007e906a4
|
|||
|
65524da6dc
|
|||
|
52b11eeffb
|
|||
|
6a8cf528e3
|
|||
|
2106734b88
|
|||
|
a72a2c3358
|
|||
|
e5a3e04e0c
|
|||
|
d520d52da8
|
|||
|
f48bd35319
|
|||
|
ac239fd090
|
|||
|
09645c30e6
|
|||
|
4750b3baf9
|
|||
|
7db7cad18f
|
|||
|
df8d0a65d3
|
|||
|
13ee710c74
|
|||
|
418f857298
|
|||
|
8f11bdc43e
|
|||
|
|
4f308f07f6 | ||
|
937358558d
|
|||
|
f61558cb18
|
|||
|
c55da7b33a
|
|||
|
782ac97028
|
|||
|
1f1762ff0c
|
|||
|
e57a9cb309
|
|||
|
4d4706c4ba
|
|||
|
e91ce19c03
|
32
.github/workflows/docs.yaml
vendored
32
.github/workflows/docs.yaml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: get the gh-pages repo
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: gh-pages
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
tar -cvf documentation.tar ./docs
|
||||
|
||||
- name: create a document artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: documentation
|
||||
path: documentation.tar
|
||||
@@ -29,31 +29,29 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout src
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- run: mkdir -p ./docs
|
||||
- name: Download the existing documents artifact
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: documentation
|
||||
- run: tar -xf documentation.tar ./docs -C ./docs
|
||||
|
||||
- name: Build
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16.x
|
||||
cache: 'npm'
|
||||
- run: npm ci
|
||||
- run: npm run build # set up 'build' script in your package.json
|
||||
- name: Install Deps
|
||||
run: npm install -g pnpm && pnpm install
|
||||
|
||||
- name: Build documents
|
||||
run: npm run docs #set up 'docs' build script in your package.json
|
||||
- name: Build lib
|
||||
run: pnpm run build
|
||||
|
||||
- name: Build docs
|
||||
run: pnpm run docs:generate
|
||||
|
||||
- name: tar the new docs
|
||||
run: tar -cvf newdocumentation.tar ./docs
|
||||
|
||||
- name: create a new document artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: newdocumentation
|
||||
path: newdocumentation.tar
|
||||
@@ -63,13 +61,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout the gh-pages repo
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: gh-pages
|
||||
|
||||
- run: mkdir -p ./docs
|
||||
- name: Download the new documents artifact
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: newdocumentation
|
||||
- run: tar -xf newdocumentation.tar ./docs -C ./docs
|
||||
@@ -78,6 +76,6 @@ jobs:
|
||||
run: |
|
||||
git config --global user.email "cis-oss@users.noreply.github.com"
|
||||
git config --global user.name "Continuous Integration"
|
||||
git add .
|
||||
git add docs/ -f
|
||||
git commit -m "CI updated the documentation"
|
||||
git push
|
||||
@@ -1 +1 @@
|
||||
npx lint-staged
|
||||
pnpm exec lint-staged
|
||||
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 Alix von Schirp
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
32
README.md
32
README.md
@@ -1,24 +1,48 @@
|
||||
# CIS Pushover Client
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
A client for Pushover, a service for sending notifications. Typesafe.
|
||||
Supports sending the same message to multiple users.
|
||||
|
||||
## Installation
|
||||
|
||||
⚠️ This package is **not yet published** to npm.
|
||||
|
||||
```bash
|
||||
pnpm add @cis-oss/pushover
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Or using npm</summary>
|
||||
|
||||
```bash
|
||||
npm install @cis-oss/pushover
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Or use our meta-packages</summary>
|
||||
|
||||
```bash
|
||||
yarn add @cis-oss/pushover
|
||||
pnpm add @cis-oss/notify
|
||||
```
|
||||
|
||||
```bash
|
||||
bun add @cis-oss/pushover
|
||||
pnpm add @cis-oss/notify-push
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
# Documentation
|
||||
|
||||
Documentation can be found at [https://cis-oss.github.io/pushover](https://cis-oss.github.io/pushover).
|
||||
|
||||
# Contributing
|
||||
|
||||
Contributions are welcome! Please see [CONTRIBUTING.md](https://github.com/cis-oss/.github/blob/main/CONTRIBUTING.md) for details.
|
||||
|
||||
Please make sure to read our [Code of Conduct](https://github.com/cis-oss/.github/blob/main/CODE_OF_CONDUCT.md) and [Support Policy](https://github.com/cis-oss/.github/blob/main/SUPPORT.md).
|
||||
|
||||
Disclose security issues responsibly by following our [Security Policy](https://github.com/cis-oss/.github/blob/main/SECURITY.md).
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
|
||||
@@ -1 +0,0 @@
|
||||
{"versions":["v0.1.0","v0.0.1"],"dev":"v0.1.0"}
|
||||
@@ -1 +0,0 @@
|
||||
<meta http-equiv="refresh" content="0; url=dev/"/>
|
||||
@@ -1 +0,0 @@
|
||||
/home/runner/work/pushover/pushover/docs/v0.1.0
|
||||
@@ -1 +0,0 @@
|
||||
window.hierarchyData = "eJyrVirKzy8pVrKKjtVRKkpNy0lNLsnMzytWsqqurQUAmx4Kpg=="
|
||||
@@ -1,43 +0,0 @@
|
||||
:root {
|
||||
--light-hl-0: #795E26;
|
||||
--dark-hl-0: #DCDCAA;
|
||||
--light-hl-1: #000000;
|
||||
--dark-hl-1: #D4D4D4;
|
||||
--light-hl-2: #A31515;
|
||||
--dark-hl-2: #CE9178;
|
||||
--light-code-background: #FFFFFF;
|
||||
--dark-code-background: #1E1E1E;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) { :root {
|
||||
--hl-0: var(--light-hl-0);
|
||||
--hl-1: var(--light-hl-1);
|
||||
--hl-2: var(--light-hl-2);
|
||||
--code-background: var(--light-code-background);
|
||||
} }
|
||||
|
||||
@media (prefers-color-scheme: dark) { :root {
|
||||
--hl-0: var(--dark-hl-0);
|
||||
--hl-1: var(--dark-hl-1);
|
||||
--hl-2: var(--dark-hl-2);
|
||||
--code-background: var(--dark-code-background);
|
||||
} }
|
||||
|
||||
:root[data-theme='light'] {
|
||||
--hl-0: var(--light-hl-0);
|
||||
--hl-1: var(--light-hl-1);
|
||||
--hl-2: var(--light-hl-2);
|
||||
--code-background: var(--light-code-background);
|
||||
}
|
||||
|
||||
:root[data-theme='dark'] {
|
||||
--hl-0: var(--dark-hl-0);
|
||||
--hl-1: var(--dark-hl-1);
|
||||
--hl-2: var(--dark-hl-2);
|
||||
--code-background: var(--dark-code-background);
|
||||
}
|
||||
|
||||
.hl-0 { color: var(--hl-0); }
|
||||
.hl-1 { color: var(--hl-1); }
|
||||
.hl-2 { color: var(--hl-2); }
|
||||
pre, code { background: var(--code-background); }
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 12 KiB |
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
window.navigationData = "eJyLrlYqSa0oUbJSCigtzsgvSy1S0lEqSCzJULJSKqksSC3Wh4nrZZTk5ijpKGVn5qUoWRkZWJobmhrV6mDo900tLk5MT8VlDFSakGmhxZguAYlh1xcLADETQZo="
|
||||
@@ -1 +0,0 @@
|
||||
window.searchData = "eJytmFuP2zYQhf/L9JVwPOOr9NaiD+1DgQBJ+iIYC8did4X4IkjypoHh/15Qls2hOLbHqZ92YfGcw8tHjsQDVLvvNaTZAb4V2xxSGiYznJCB7XJjIYWP+/pt926rv2xdL18tGNhXa0ih+VHa+kPv6eCt2azBwGq9rGtbQwpwNGdnHNL4YrtR2/3y8uIeegEzN1AuK7tt4n4OTqpr8U3RrB8IPzd/RrSLVAefGj8jtqyKXVU0P/TZTPGMDtS7/TbXp5+bP2e1N7ZulpvykRX3kmd0odsYyvR4G/108LJplqu3jZOq4wPNU5ivbVU/QH3X/CnjL8vPu292+8Doy7LpFD/ZgWtn6JU+6E/NV9t8cvvi2lzyYbzapj63vT2OOzP4apvf7XuxssrU/NL4f8XW9upxEZwTVnFM3In6XjRvt+sbT3SttdVIEfz5Rinqx+rqkCL0y9Ui1I/UVCBF4Mfb5aefqq49iuhPNwpPP1dXdVSrervkxCurrTeK8D+uF5t+rqrSKCJ/vVdm+sEP1BhF/G/L2k7HD3fiayt7XleWef7lRqkLqkye68rc/fLiInuJ7id9WWn/XDHouts1kbvaNr7zCibU4H7G7aqrCMnFMtWPuVefgqCFgWKb238hPcC7repit4UUaDAaJGDgn8Kuc/f1dJ7C1W7TcZTvVvv230XX7G+7anaVa3xq/WEIJhsaSgbJZLZYmOwsbh+0P5w9/C+tEMFkKAkxEmIgJDAZSUKKhBQIR2CykSQcRcJRIByDycaScBwJx4FwAiabSMJJJJwEwimYbCoJp5FwGghnYLKZJJxFwlkgnIPJ5pJwHgnngTABkyWSMImESQiA4wFFdjCGB3v0tPjI/AgAhQSh4wJFhjCGCEOK0LGBIkcYg4QhSej4QJEljGHCkCZ0jKDIE8ZAYUgUOk5QZApjqDCkCh0rKHKFMVgYkoWOFxTZwhguDOlCxwyKfGEMGIaEkWOGRMIoJoxCwsgxQyJhFBNGvTOqPaTkU0o4pkLCyDFDImEUE0YhYeSYIZEwigmjkDByzJBIGMWEUUgYOWZIJIxiwigkjBwzJBJGMWEUEkaOGRIJo5iw7qe2Jr7bqrH5n6famGXg32cO8NKVTF+aD0BjSA/Hoy+R6eHIqqR75rL8x7e3waG3waHOhr3SeaO595mrbC6vCmxMzIR0LvybmI1qxEY10hqdP+mZDzEfUvmcXgy9xcw7zFQGl89f1g3WC5XH6Y2JTeyUTexUZeG/Er0NQ05HXHm5nGGD4aPRDedsI0wNw1dH7+lOg3WHDQp1o+o+ZL3HxFtMVA7si9S7sDXSLVF3Y8GWma2yzqF/HBDDlXS8tpcY3oHtPN3G29chH8Rmk3TTGR2OibdIVA79r2bWHT6pulmVv36ZJZsj0k2Sv05gNmwjkW4jBddrbA+wKUfdlIcXScyKHeGoO8LZ3RDzYUuI+jUUNxaxQ4J0pwS7EGR9YjsUdVv0csvHXNgWQ8UWWxgoi9Kui62FNFscj/8BeVZMUA==";
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,21 +0,0 @@
|
||||
import { DOC_VERSIONS } from '../../versions.js';
|
||||
|
||||
const select = document.getElementById('plugin-versions-select');
|
||||
|
||||
DOC_VERSIONS.forEach((version) => {
|
||||
const option = document.createElement('option');
|
||||
option.value = version;
|
||||
option.innerHTML = version;
|
||||
select.appendChild(option);
|
||||
});
|
||||
|
||||
const locationSplit = location.pathname.split('/');
|
||||
const thisVersion = locationSplit.find((path) => ['stable', 'dev', ...DOC_VERSIONS].includes(path));
|
||||
select.value = DOC_VERSIONS.includes(thisVersion)
|
||||
? thisVersion
|
||||
: DOC_VERSIONS[0];
|
||||
select.onchange = () => {
|
||||
const newPaths = window.location.pathname.replace(`/${thisVersion}/`, `/${select.value}/`);
|
||||
const newUrl = new URL(newPaths, window.location.origin);
|
||||
window.location.assign(newUrl);
|
||||
};
|
||||
@@ -1 +0,0 @@
|
||||
{"percent":19,"expected":42,"actual":8,"notDocumented":["PushoverMessage","PushoverMessage.__type.priority","PushoverMessage.__type.priority.__type.level","PushoverMessage.__type.priority.__type.retry","PushoverMessage.__type.priority.__type.expire","PushoverMessage.__type.priority.__type.callback","PushoverMessage.__type.sound","PushoverMessage.__type.timestamp","PushoverMessage.__type.html","PushoverMessage.__type.attachment","PushoverMessage.__type.attachment.__type.type","PushoverMessage.__type.attachment.__type.data","PushoverMessage.__type.users","PushoverMessage.__type.users.__type.name","PushoverMessage.__type.users.__type.token","PushoverMessage.__type.users.__type.devices","PushoverMessage.__type.appToken","Pushover","Pushover.__type.getSounds.__type.__type.__type.sounds","Pushover.__type.getDevices.__type.__type.__type.devices","Pushover.__type.withMessage","Pushover.__type.withTitle","Pushover.__type.withUrl","Pushover.__type.withPriority","Pushover.__type.withSound","Pushover.__type.withTimestamp","Pushover.__type.withHtml","Pushover.__type.withAttachment","Pushover.__type.withBase64Attachment","Pushover.__type.addUsers","User","User.__type.name","User.__type.token","User.__type.devices"]}
|
||||
@@ -1,21 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="130" height="20">
|
||||
<script/>
|
||||
<linearGradient id="a" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<rect rx="3" width="130" height="20" fill="#555"/>
|
||||
<rect rx="3" x="90" width="40" height="20" fill="#db654f"/>
|
||||
<path fill="#db654f" d="M90 0h4v20h-4z"/>
|
||||
<rect rx="3" width="130" height="20" fill="url(#a)"/>
|
||||
<g fill="#fff" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||
<g text-anchor="left">
|
||||
<text x="5" y="15" fill="#010101" fill-opacity=".3">Docs Coverage</text>
|
||||
<text x="5" y="14">Docs Coverage</text>
|
||||
</g>
|
||||
<g text-anchor="middle">
|
||||
<text x="110" y="15" fill="#010101" fill-opacity=".3">19%</text>
|
||||
<text x="110" y="14">19%</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 861 B |
@@ -1,57 +0,0 @@
|
||||
<!DOCTYPE html><html class="default" lang="en" data-base="."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@cis-oss/pushover</title><meta name="description" content="Documentation for @cis-oss/pushover"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script><style>
|
||||
.tsd-ext-version-select .settings-label {
|
||||
margin: 0.75rem 0.75rem 0 0;
|
||||
</style></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">@cis-oss/pushover</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h1>@cis-oss/pushover</h1></div><div class="tsd-panel tsd-typography"><a id="cis-pushover-client" class="tsd-anchor"></a><h1 class="tsd-anchor-link">CIS Pushover Client<a href="#cis-pushover-client" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h1><p>A client for Pushover, a service for sending notifications. Typesafe.
|
||||
Supports sending the same message to multiple users.</p>
|
||||
<a id="installation" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Installation<a href="#installation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><p>⚠️ This package is <strong>not yet published</strong> to npm.</p>
|
||||
<pre><code class="bash"><span class="hl-0">pnpm</span><span class="hl-1"> </span><span class="hl-2">add</span><span class="hl-1"> </span><span class="hl-2">@cis-oss/pushover</span>
|
||||
</code><button type="button">Copy</button></pre>
|
||||
|
||||
<pre><code class="bash"><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">install</span><span class="hl-1"> </span><span class="hl-2">@cis-oss/pushover</span>
|
||||
</code><button type="button">Copy</button></pre>
|
||||
|
||||
<pre><code class="bash"><span class="hl-0">yarn</span><span class="hl-1"> </span><span class="hl-2">add</span><span class="hl-1"> </span><span class="hl-2">@cis-oss/pushover</span>
|
||||
</code><button type="button">Copy</button></pre>
|
||||
|
||||
<pre><code class="bash"><span class="hl-0">bun</span><span class="hl-1"> </span><span class="hl-2">add</span><span class="hl-1"> </span><span class="hl-2">@cis-oss/pushover</span>
|
||||
</code><button type="button">Copy</button></pre>
|
||||
|
||||
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-ext-version-select"><label class="settings-label" for="plugin-versions-select">Version</label><select id="plugin-versions-select" name="versions"></select></div><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#cis-pushover-client"><span>CIS <wbr/>Pushover <wbr/>Client</span></a><ul><li><a href="#installation"><span>Installation</span></a></li></ul></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html">@cis-oss/pushover</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a> v0.27.9<br>
|
||||
<span id="generation-date"></span>
|
||||
<script>
|
||||
window.GENERATION_DATE = 1741642047113;
|
||||
|
||||
(() => {
|
||||
|
||||
const formatter = new Intl.RelativeTimeFormat('en', {
|
||||
numeric: 'auto',
|
||||
style: 'short',
|
||||
});
|
||||
|
||||
const divisions = [
|
||||
{ amount: 60, name: 'seconds' },
|
||||
{ amount: 60, name: 'minutes' },
|
||||
{ amount: 24, name: 'hours' },
|
||||
{ amount: 7, name: 'days' },
|
||||
{ amount: 4.34524, name: 'weeks' },
|
||||
{ amount: 12, name: 'months' },
|
||||
{ amount: Number.POSITIVE_INFINITY, name: 'years' }
|
||||
];
|
||||
|
||||
function formatTimeAgo(date) {
|
||||
let duration = (date - new Date()) / 1000;
|
||||
|
||||
for (const division of divisions) {
|
||||
if (Math.abs(duration) < division.amount) {
|
||||
return formatter.format(Math.round(duration), division.name);
|
||||
}
|
||||
duration /= division.amount;
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById('generation-date').title = new Date(window.GENERATION_DATE).toLocaleString();
|
||||
document.getElementById('generation-date').innerText = `Last modified ${formatTimeAgo(window.GENERATION_DATE)}`;
|
||||
|
||||
})();
|
||||
</script>
|
||||
</p></footer><div class="overlay"></div><script src="assets/versionsMenu.js" type="module"></script></body></html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
window.hierarchyData = "eJyrVirKzy8pVrKKjtVRKkpNy0lNLsnMzytWsqqurQUAmx4Kpg=="
|
||||
@@ -1,99 +0,0 @@
|
||||
:root {
|
||||
--light-hl-0: #795E26;
|
||||
--dark-hl-0: #DCDCAA;
|
||||
--light-hl-1: #000000;
|
||||
--dark-hl-1: #D4D4D4;
|
||||
--light-hl-2: #A31515;
|
||||
--dark-hl-2: #CE9178;
|
||||
--light-hl-3: #AF00DB;
|
||||
--dark-hl-3: #C586C0;
|
||||
--light-hl-4: #001080;
|
||||
--dark-hl-4: #9CDCFE;
|
||||
--light-hl-5: #008000;
|
||||
--dark-hl-5: #6A9955;
|
||||
--light-hl-6: #0000FF;
|
||||
--dark-hl-6: #569CD6;
|
||||
--light-hl-7: #0070C1;
|
||||
--dark-hl-7: #4FC1FF;
|
||||
--light-hl-8: #098658;
|
||||
--dark-hl-8: #B5CEA8;
|
||||
--light-hl-9: #000000FF;
|
||||
--dark-hl-9: #D4D4D4;
|
||||
--light-hl-10: #267F99;
|
||||
--dark-hl-10: #4EC9B0;
|
||||
--light-code-background: #FFFFFF;
|
||||
--dark-code-background: #1E1E1E;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) { :root {
|
||||
--hl-0: var(--light-hl-0);
|
||||
--hl-1: var(--light-hl-1);
|
||||
--hl-2: var(--light-hl-2);
|
||||
--hl-3: var(--light-hl-3);
|
||||
--hl-4: var(--light-hl-4);
|
||||
--hl-5: var(--light-hl-5);
|
||||
--hl-6: var(--light-hl-6);
|
||||
--hl-7: var(--light-hl-7);
|
||||
--hl-8: var(--light-hl-8);
|
||||
--hl-9: var(--light-hl-9);
|
||||
--hl-10: var(--light-hl-10);
|
||||
--code-background: var(--light-code-background);
|
||||
} }
|
||||
|
||||
@media (prefers-color-scheme: dark) { :root {
|
||||
--hl-0: var(--dark-hl-0);
|
||||
--hl-1: var(--dark-hl-1);
|
||||
--hl-2: var(--dark-hl-2);
|
||||
--hl-3: var(--dark-hl-3);
|
||||
--hl-4: var(--dark-hl-4);
|
||||
--hl-5: var(--dark-hl-5);
|
||||
--hl-6: var(--dark-hl-6);
|
||||
--hl-7: var(--dark-hl-7);
|
||||
--hl-8: var(--dark-hl-8);
|
||||
--hl-9: var(--dark-hl-9);
|
||||
--hl-10: var(--dark-hl-10);
|
||||
--code-background: var(--dark-code-background);
|
||||
} }
|
||||
|
||||
:root[data-theme='light'] {
|
||||
--hl-0: var(--light-hl-0);
|
||||
--hl-1: var(--light-hl-1);
|
||||
--hl-2: var(--light-hl-2);
|
||||
--hl-3: var(--light-hl-3);
|
||||
--hl-4: var(--light-hl-4);
|
||||
--hl-5: var(--light-hl-5);
|
||||
--hl-6: var(--light-hl-6);
|
||||
--hl-7: var(--light-hl-7);
|
||||
--hl-8: var(--light-hl-8);
|
||||
--hl-9: var(--light-hl-9);
|
||||
--hl-10: var(--light-hl-10);
|
||||
--code-background: var(--light-code-background);
|
||||
}
|
||||
|
||||
:root[data-theme='dark'] {
|
||||
--hl-0: var(--dark-hl-0);
|
||||
--hl-1: var(--dark-hl-1);
|
||||
--hl-2: var(--dark-hl-2);
|
||||
--hl-3: var(--dark-hl-3);
|
||||
--hl-4: var(--dark-hl-4);
|
||||
--hl-5: var(--dark-hl-5);
|
||||
--hl-6: var(--dark-hl-6);
|
||||
--hl-7: var(--dark-hl-7);
|
||||
--hl-8: var(--dark-hl-8);
|
||||
--hl-9: var(--dark-hl-9);
|
||||
--hl-10: var(--dark-hl-10);
|
||||
--code-background: var(--dark-code-background);
|
||||
}
|
||||
|
||||
.hl-0 { color: var(--hl-0); }
|
||||
.hl-1 { color: var(--hl-1); }
|
||||
.hl-2 { color: var(--hl-2); }
|
||||
.hl-3 { color: var(--hl-3); }
|
||||
.hl-4 { color: var(--hl-4); }
|
||||
.hl-5 { color: var(--hl-5); }
|
||||
.hl-6 { color: var(--hl-6); }
|
||||
.hl-7 { color: var(--hl-7); }
|
||||
.hl-8 { color: var(--hl-8); }
|
||||
.hl-9 { color: var(--hl-9); }
|
||||
.hl-10 { color: var(--hl-10); }
|
||||
pre, code { background: var(--code-background); }
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 12 KiB |
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
window.navigationData = "eJyN0k0LgkAQBuD/MmfpQ7APr52jsOgSHQYdc2lbF2eKIvzvEUkfmrbneed5d2G2NxC6CISQUIonLeCBRckghFgjM3G/GvQyOWrw4KBMAuHQn5Tea3d54iw/UzEnZtxTRGxzw/S2lBEqUoyJ+y3Zb94PRj/4iGJSVpz4WtaRV1aRkX/wM+VCrnE/QxOT1igqN04vb9lxqdugVol7UzPeVbIikyzsI80/1Y95F1OVUhdVy7h8vTqnNydX27y2mjSYjoeBX+7uzVYSdw=="
|
||||
@@ -1 +0,0 @@
|
||||
window.searchData = "eJy1m01zozgQhv+LfGUy1pe/jrunPezOVnZqLq5UimAloWKDF3BmUqn89y3xYVpWgxvCnjJjq1+9Ek+3QMLvLEt/5myzfWcvcbJjG6EXAUvCg2Eb9vcpf05fTXZrovgYm6RgATtle7ZhcVKY7DGMTP7Va3TzXBz2LGDRPsxzk7MNYx9BI8/nQp314x1dcFY2BpoBO4aZ9YT57OhwZ17jyOQDem0jhnct5usl18Kbzj9NnodP5uyieDsCA/W39Fk8kOVm9/f2yzagf0xNaBXV1X0RF/sBnTfNp+h6Hycv9J7r1lN0fMziNIuLN3rnIGIKA+ZgsieTRG/fjkVOd3EOS6uwKazk6SnZ0S00zadB72DyIjwch+DXhkxhoc5SYu9+To/u+JAmaX4MoyF5D0Immf5iwNCrxiO7xRaluvGtyY9pkpu+mn7RlF5aMxOZ+Ni77GHaszaONODzGLpSrAiLU++qhbo4h7Uminz3Jc6/xMmzyeLC7D5hKjP/nkw+Zm6auP/FlsmyNBs+V+ewqUxhyP4I9/EuLOI0oVDrt6aDS7jR6ZAn3/Egg+lcpiOT5OPcgNip7FzPpi4zIxOKbo2QU13exqYV3dz1zOryNjK5eq11PKfYsktJroum9MwKo5ck/bk3uydz7enF62B2EXz1kcIZDcHQfXjtEa3fUxU/va2Ht8/Zerh+3zzO1n1V7T7rrpWZxOQ+zIv7ndnHryYbd1ExhUmsmV/HOBtBfhs3pY0xU+OETmImCvd7i0EYvQx248ZObWfM/Hjhk5i6vuiiZkauuERThOUWdTV2raXCfXWhxcEet8p2m8KW2O/h0+9hEpn9nnwf2xFCX3KjMrq/6PR1MgMC/TB3jW401L22RsI90CQB8l6XY2EfaPM69L0uR8J/3SRMgvqG1Hw72sao2YsmdMhPucmogrO6MQ7zpcveR8S/7H+o3VYhSRXyqc5fTfaQ4mUD7bltP7RbeP3+Mcmu59qBrwdtEVUb/yTJmdMcHwt0OXz6vB6vTV1Hd2IFSHkMT/u2gtQ6X+vPe+dK8/b8I0qTvMhOUZFmvVoztyFuuzEFj1tU6zk3YFMa7aRuMUr9tcatvwfQalQv0bOJXm4vtiDxCbMtr206XuutrIO3pshisFWDd1c2zc5NP9/fb2/fw6cBnT68FWX7Kz3fBSxOduYX27zbnMnjNGEbJm7kzZoF7DE2+509+2RNSUsPh+qUc5dGp/Kfd3WzH8bSaBtXrb/OWbCdB3Jxo/XdXbBtYsvPyw8aifaTMo6zYMuROO7FcSdOsGArAslvlBJOoPAChRMoWbCVSIfSi5NOnGLBViFxyotTTpxmwVYjcdqL007cggXbBRK38OIWTtySBdslErf04pZO3IoF2xUSt/LiVk7cmgXbNRK39uLW7oW3HHAMGe4zwy+gKalBsUG4ccHhFgcusFgfHe6ywy0SHKOH+/hwlx9useAYQdxHiLsMcYsGxyjiPkbc5YhbPPgiEPpGL5Qb7LPEXZi4ZYQv0WAfKO4SxS0ofIUG+1RxFytuaeEYWNwni7toiXlncfDREi5awtIiMCyFj5a4qEmic6oFUpZctoTsnGrhwyVcuITqnGrh0yVcuoQFRmDZJHy6hEuXsLwILJuED5dw4RIWF4Flk/DZEi5bwtIisGwSPlrCRUtYWgSWTcJHS7hoyRItrC5LHy3poiVLtLDaLH20pIuWLNc7rD5Lnyx5seJZVgSWShJZ9FywpEVFYukgfa6ky5XUnekgfbCkC5ZcdKaD9MmSLlly2ZkO0kdLumhJS4vE0kH6aEkXLWlpkVg6SB8t6aKl5p3TpXy2lMuW4p3TpXy4lAuXEp3TpXy6lEuXKm+osCxWPl3q4p6qpAu9q0Juq1y6lOVFYlmsfLiUC5eyuMgFtkIoHy7lwqUsLhJLY+WzpVy2VMkWlsbKZ0u5bKl1t2kfLuXCpS0uEqsB2mdLu2xpS4vCaoD20dIuWtrCorBk0j5Z2iVLW1gUlkzaJ0u7ZOnydh2jUvtk6Ys7dguLwqjUyE27S5a2rCj0ft8Hq/6ofCp7NVlhdn9UT2fb7cW56ju7rx/cxHn/4J2JBdu8f3y0D2qb9w/wrGa/s/15J5pATQK15XA1exAJ1BRQW41ROx8cAlENRNckUecQCSitWyUphypdzJycAzFFFGu23YEMuJySOjpnt6HVUmD6tR6uVW8iAEEw9ZrGmrvzAqQAaJo4XXDXCyiBidecpHTesAPzDljQc6JKu9sLhMAcKdqkn98oAmgCxqsoQTN18QZrq7hqFWmZ2JwYtBIcaPBVbUtVf+Wy+qsETbw57gZDXgLyadcRHlUDIWBT0uxUO7RgpByMlOYldgYD40nhyAsJYEQLMCIaB+17YUAGZIog2irfCW8lgBFa/p/fpQcJCxKEptG+lwtmGKQIp13l9h3zVgZAR1vujvXJGDIwUNJoq8mFVnY+LAbDBLPFadPVqNZVF1MVgE9BK1JAtfmtS6sHwKLh2agV4VMEzhcxrxJ4lbTS1ai/nl+QQ6cWlHxOW2qRhYyDes9pUwnPuMA4QdlStHGej56BHQA0r2uykHWNXtQ1mpb71QEQyFtwITQt46xE2hwogqECk4qWdvXPIloNcPFo1655mwDMFahmvJ4bUS+3UtdzReMZ/GwC6IO04FSd8tc/rQa846IpFO5KBooSp1Wl6vAcXC1YsGklqD3ZA/iAgq1pThoZDCEwLkVUaw56gQogQDXZQcDpLmDHuPzFlGGb7d3Hx3+6WKkP";
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,430 +0,0 @@
|
||||
/*
|
||||
* Define colors
|
||||
*/
|
||||
|
||||
:root {
|
||||
/* GitHub "Light default" */
|
||||
--light-color-background: #ffffff;
|
||||
--light-color-background-secondary: #f6f8fa;
|
||||
--light-color-background-navbar: #f6f8fa;
|
||||
|
||||
--light-color-accent: #eff2f5;
|
||||
|
||||
--light-color-text: #1f2328;
|
||||
--light-color-text-aside: #59636e;
|
||||
|
||||
--light-color-link: #0969da;
|
||||
|
||||
--light-color-warning-border: #f7ebba;
|
||||
--light-color-background-warning: #fff8c5;
|
||||
|
||||
--light-color-alert-note: #0969da;
|
||||
--light-color-alert-tip: #1a7f37;
|
||||
--light-color-alert-important: #8250df;
|
||||
--light-color-alert-warning: #9a6700;
|
||||
--light-color-alert-caution: #cf222e;
|
||||
|
||||
/* GitHub "Dark default" */
|
||||
--dark-color-background: #0d1117;
|
||||
--dark-color-background-secondary: #151b23;
|
||||
--dark-color-background-navbar: #010409;
|
||||
|
||||
--dark-color-accent: #262c36;
|
||||
|
||||
--dark-color-text: #f0f6fc;
|
||||
--dark-color-text-aside: #9198a1;
|
||||
|
||||
--dark-color-link: #4493f8;
|
||||
|
||||
--dark-color-warning-border: #3a2d12;
|
||||
--dark-color-background-warning: #282215;
|
||||
|
||||
--dark-color-alert-note: #1f6feb;
|
||||
--dark-color-alert-tip: #238636;
|
||||
--dark-color-alert-important: #8957e5;
|
||||
--dark-color-alert-warning: #9e6a03;
|
||||
--dark-color-alert-caution: #da3633;
|
||||
|
||||
/* Link colors */
|
||||
--color-warning-text: var(--color-text);
|
||||
--color-icon-background: var(--color-background);
|
||||
--color-focus-outline: var(--color-accent);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root {
|
||||
--color-background-navbar: var(--light-color-background-navbar);
|
||||
--color-warning-border: var(--light-color-warning-border);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--color-background-navbar: var(--dark-color-background-navbar);
|
||||
--color-warning-border: var(--dark-color-warning-border);
|
||||
}
|
||||
}
|
||||
|
||||
:root[data-theme='light'] {
|
||||
--color-background-navbar: var(--light-color-background-navbar);
|
||||
--color-warning-border: var(--light-color-warning-border);
|
||||
}
|
||||
|
||||
:root[data-theme='dark'] {
|
||||
--color-background-navbar: var(--dark-color-background-navbar);
|
||||
--color-warning-border: var(--dark-color-warning-border);
|
||||
}
|
||||
|
||||
/*
|
||||
* Define fonts
|
||||
*/
|
||||
|
||||
:root {
|
||||
--font-family-text: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
|
||||
'Segoe UI Emoji';
|
||||
--font-family-code: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: var(--font-family-text);
|
||||
}
|
||||
|
||||
/*
|
||||
* Headlines
|
||||
*/
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin-top: 1em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
/*
|
||||
* Links
|
||||
*/
|
||||
|
||||
.tsd-accordion-details a,
|
||||
.tsd-accordion a,
|
||||
.tsd-page-toolbar a.title {
|
||||
color: var(--color-text);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.tsd-accordion-details a:hover,
|
||||
.tsd-page-toolbar a.title:hover,
|
||||
.tsd-accordion a:hover,
|
||||
.tsd-anchor-icon {
|
||||
color: var(--color-text-aside);
|
||||
}
|
||||
|
||||
.tsd-kind-class {
|
||||
color: var(--color-link);
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 3px;
|
||||
}
|
||||
|
||||
.tsd-index-link,
|
||||
.tsd-page-navigation a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.tsd-index-link:hover {
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 3px;
|
||||
}
|
||||
|
||||
a code,
|
||||
.tsd-sources a,
|
||||
.tsd-page-navigation a:hover {
|
||||
color: var(--color-link);
|
||||
}
|
||||
|
||||
a.external[target='_blank'] {
|
||||
background-image: none;
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Tables
|
||||
*/
|
||||
|
||||
table {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.tsd-typography th,
|
||||
.tsd-typography td {
|
||||
padding: 8px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.tsd-typography th {
|
||||
background-color: var(--color-background);
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.tsd-typography tr:nth-child(2n) {
|
||||
background-color: var(--color-background-code);
|
||||
}
|
||||
|
||||
/*
|
||||
* Horizontal line
|
||||
*/
|
||||
|
||||
.tsd-typography hr {
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
/*
|
||||
* Buttons
|
||||
*/
|
||||
|
||||
button {
|
||||
background-color: var(--color-background-navbar);
|
||||
color: var(--color-text);
|
||||
border: 1px solid var(--color-accent);
|
||||
border-radius: 6px;
|
||||
padding: 8px 16px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.1s ease-in-out;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background-color: var(--color-accent);
|
||||
}
|
||||
|
||||
pre > button {
|
||||
background-color: transparent;
|
||||
transition: background-color 0.1s ease-in-out;
|
||||
border: none;
|
||||
opacity: 1;
|
||||
top: 8px;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Checkbox
|
||||
*/
|
||||
|
||||
.tsd-filter-input input[type='checkbox'],
|
||||
.tsd-filter-input svg {
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
}
|
||||
|
||||
.tsd-filter-input svg {
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.tsd-checkbox-background {
|
||||
fill: var(--color-background);
|
||||
stroke: var(--color-accent);
|
||||
stroke-width: 6px;
|
||||
}
|
||||
|
||||
input[type='checkbox']:checked ~ svg .tsd-checkbox-background {
|
||||
fill: var(--color-accent);
|
||||
}
|
||||
|
||||
.tsd-checkbox-checkmark {
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
/*
|
||||
* Select
|
||||
*/
|
||||
|
||||
select {
|
||||
background-color: var(--color-background);
|
||||
border: 1px solid var(--color-accent);
|
||||
border-radius: 6px;
|
||||
padding: 8px;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
/*
|
||||
* Code blocks
|
||||
*/
|
||||
|
||||
code,
|
||||
pre {
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
margin: 1em 0;
|
||||
background-color: var(--color-background-secondary);
|
||||
color: var(--color-text);
|
||||
font-family: var(--font-family-code);
|
||||
}
|
||||
|
||||
code.tsd-tag {
|
||||
background-color: var(--color-accent);
|
||||
border: unset;
|
||||
}
|
||||
|
||||
/*
|
||||
* Warnings
|
||||
*/
|
||||
|
||||
.warning {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: var(--color-warning-border);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Topbar
|
||||
*/
|
||||
|
||||
.tsd-page-toolbar {
|
||||
background-color: var(--color-background-navbar);
|
||||
border-bottom-color: var(--color-accent);
|
||||
}
|
||||
|
||||
#tsd-search.has-focus {
|
||||
background-color: var(--color-background-navbar);
|
||||
}
|
||||
|
||||
#tsd-search .results,
|
||||
#tsd-search .results li,
|
||||
#tsd-search .results li:nth-child(2n) {
|
||||
background-color: var(--color-background-navbar);
|
||||
}
|
||||
|
||||
#tsd-search .results li {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
#tsd-search .results li a {
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
#tsd-search .results li:hover:not(.no-results) {
|
||||
background-color: var(--color-accent);
|
||||
}
|
||||
|
||||
#tsd-search .results {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: var(--color-accent);
|
||||
border-radius: 0px 0px 6px 6px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#tsd-search .results .no-results {
|
||||
padding: calc(4px + 0.25rem);
|
||||
}
|
||||
|
||||
/*
|
||||
* Baseboard
|
||||
*/
|
||||
|
||||
footer {
|
||||
border-top-color: var(--color-accent);
|
||||
}
|
||||
|
||||
/*
|
||||
* Side navigations
|
||||
*/
|
||||
|
||||
.site-menu {
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.tsd-navigation a {
|
||||
color: var(--color-text);
|
||||
border-radius: 6px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.tsd-navigation a,
|
||||
.tsd-navigation a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.tsd-navigation a:hover:not(.current) {
|
||||
background-color: color-mix(in srgb, var(--color-text-aside), #0000 88%);
|
||||
}
|
||||
|
||||
.tsd-navigation a.current {
|
||||
background-color: color-mix(in srgb, var(--color-text-aside), #0000 92%);
|
||||
}
|
||||
|
||||
/*
|
||||
* Type definition groups
|
||||
*/
|
||||
|
||||
.tsd-index-panel,
|
||||
.tsd-member-group {
|
||||
background-color: var(--color-background);
|
||||
padding: 16px;
|
||||
border: 1px var(--color-accent) solid;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.tsd-panel > h1,
|
||||
.tsd-panel > h2,
|
||||
.tsd-panel > h3 {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.tsd-panel-group.tsd-index-group details {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.tsd-member-group .tsd-member:last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.tsd-signature {
|
||||
border: 1px solid var(--color-accent);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.tsd-signatures .tsd-signature {
|
||||
border-color: var(--color-accent);
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.tsd-description .tsd-signatures .tsd-signature {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.tsd-full-hierarchy:not(:last-child) {
|
||||
border-bottom: var(--color-accent);
|
||||
}
|
||||
|
||||
/*
|
||||
* Footer
|
||||
*/
|
||||
|
||||
footer p {
|
||||
font-size: 1rem;
|
||||
text-align: center;
|
||||
color: var(--color-text-aside);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fix collapsed margin
|
||||
*/
|
||||
|
||||
.tsd-accordion-summary > h3 {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.tsd-page-navigation:not([open]) > .tsd-accordion-summary {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Fix collapse arrow position
|
||||
*/
|
||||
|
||||
.tsd-accordion-summary svg {
|
||||
transition: transform 0.1s ease-in-out;
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
import { DOC_VERSIONS } from '../../versions.js';
|
||||
|
||||
const select = document.getElementById('plugin-versions-select');
|
||||
|
||||
DOC_VERSIONS.forEach((version) => {
|
||||
const option = document.createElement('option');
|
||||
option.value = version;
|
||||
option.innerHTML = version;
|
||||
select.appendChild(option);
|
||||
});
|
||||
|
||||
const locationSplit = location.pathname.split('/');
|
||||
const thisVersion = locationSplit.find((path) => ['stable', 'dev', ...DOC_VERSIONS].includes(path));
|
||||
select.value = DOC_VERSIONS.includes(thisVersion)
|
||||
? thisVersion
|
||||
: DOC_VERSIONS[0];
|
||||
select.onchange = () => {
|
||||
const newPaths = window.location.pathname.replace(`/${thisVersion}/`, `/${select.value}/`);
|
||||
const newUrl = new URL(newPaths, window.location.origin);
|
||||
window.location.assign(newUrl);
|
||||
};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"percent":100,"expected":62,"actual":62,"notDocumented":[]}
|
||||
@@ -1,31 +0,0 @@
|
||||
<!DOCTYPE html><html class="default" lang="en" data-base="."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@cis-oss/pushover</title><meta name="description" content="Documentation for @cis-oss/pushover"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="assets/style.css"/><link rel="stylesheet" href="assets/highlight.css"/><script defer src="assets/main.js"></script><script async src="assets/icons.js" id="tsd-icons-script"></script><script async src="assets/search.js" id="tsd-search-script"></script><script async src="assets/navigation.js" id="tsd-nav-script"></script><style>
|
||||
.tsd-ext-version-select .settings-label {
|
||||
margin: 0.75rem 0.75rem 0 0;
|
||||
</style><link rel="stylesheet" href="assets/typedoc-github-style.css"/></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">@cis-oss/pushover</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><h1>@cis-oss/pushover</h1></div><div class="tsd-panel tsd-typography"><a id="cis-pushover-client" class="tsd-anchor"></a><h1 class="tsd-anchor-link">CIS Pushover Client<a href="#cis-pushover-client" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h1><p><img src="https://img.shields.io/github/license/cis-oss/pushover" alt="GitHub License">
|
||||
<img src="https://img.shields.io/npm/v/%40cis-oss%2Fpushover" alt="NPM Version">
|
||||
<img src="https://img.shields.io/bundlephobia/min/cis-oss/pushover?label=bundle%20size" alt="npm bundle size (scoped)"></p>
|
||||
<p>A client for Pushover, a service for sending notifications. Typesafe.
|
||||
Supports sending the same message to multiple users.</p>
|
||||
<a id="installation" class="tsd-anchor"></a><h2 class="tsd-anchor-link">Installation<a href="#installation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2><pre><code class="bash"><span class="hl-0">pnpm</span><span class="hl-1"> </span><span class="hl-2">add</span><span class="hl-1"> </span><span class="hl-2">@cis-oss/pushover</span>
|
||||
</code><button type="button">Copy</button></pre>
|
||||
|
||||
<details>
|
||||
<summary>Or using npm</summary>
|
||||
<pre><code class="bash"><span class="hl-0">npm</span><span class="hl-1"> </span><span class="hl-2">install</span><span class="hl-1"> </span><span class="hl-2">@cis-oss/pushover</span>
|
||||
</code><button type="button">Copy</button></pre>
|
||||
|
||||
</details>
|
||||
<details>
|
||||
<summary>Or use our meta-packages</summary>
|
||||
<pre><code class="bash"><span class="hl-0">pnpm</span><span class="hl-1"> </span><span class="hl-2">add</span><span class="hl-1"> </span><span class="hl-2">@cis-oss/notify</span>
|
||||
</code><button type="button">Copy</button></pre>
|
||||
|
||||
<pre><code class="bash"><span class="hl-0">pnpm</span><span class="hl-1"> </span><span class="hl-2">add</span><span class="hl-1"> </span><span class="hl-2">@cis-oss/notify-push</span>
|
||||
</code><button type="button">Copy</button></pre>
|
||||
|
||||
</details>
|
||||
<a id="documentation" class="tsd-anchor"></a><h1 class="tsd-anchor-link">Documentation<a href="#documentation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h1><p>Documentation can be found at <a href="https://cis-oss.github.io/pushover">https://cis-oss.github.io/pushover</a>.</p>
|
||||
<a id="contributing" class="tsd-anchor"></a><h1 class="tsd-anchor-link">Contributing<a href="#contributing" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h1><p>Contributions are welcome! Please see <a href="https://github.com/cis-oss/.github/blob/main/CONTRIBUTING.md">CONTRIBUTING.md</a> for details.</p>
|
||||
<p>Please make sure to read our <a href="https://github.com/cis-oss/.github/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a> and <a href="https://github.com/cis-oss/.github/blob/main/SUPPORT.md">Support Policy</a>.</p>
|
||||
<p>Disclose security issues responsibly by following our <a href="https://github.com/cis-oss/.github/blob/main/SECURITY.md">Security Policy</a>.</p>
|
||||
</div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-ext-version-select"><label class="settings-label" for="plugin-versions-select">Version</label><select id="plugin-versions-select" name="versions"></select></div><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#cis-pushover-client"><span>CIS <wbr/>Pushover <wbr/>Client</span></a><ul><li><a href="#installation"><span>Installation</span></a></li></ul><a href="#documentation"><span>Documentation</span></a><a href="#contributing"><span>Contributing</span></a></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="modules.html">@cis-oss/pushover</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p><p class="tsd-generator" style="display: inline-flex; flex-direction: row; justify-content: space-around; width: 100%;"> <span> Made with ❤ by <a href="https://b00tload.space">Alix von Schirp</a> @ <a href="https://github.com/cis-oss">CISLabs OSS</a> </span> <span> <a href="https://github.com/cis-oss/pushover" target="_blank">GitHub</a> | <a href="https://github.com/cis-oss/pushover/issues" target="_blank">Issues</a> | <a href="https://github.com/cis-oss/pushover/blob/main/LICENSE" target="_blank">License</a> </span> <span>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc </a> with <a href="https://github.com/JulianWowra/typedoc-github-theme" target="_blank">typedoc-github-theme</a></span></p></p></footer><div class="overlay"></div><script src="assets/versionsMenu.js" type="module"></script></body></html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,9 +0,0 @@
|
||||
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>PushoverRecipient | @cis-oss/pushover</title><meta name="description" content="Documentation for @cis-oss/pushover"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><style>
|
||||
.tsd-ext-version-select .settings-label {
|
||||
margin: 0.75rem 0.75rem 0 0;
|
||||
</style><link rel="stylesheet" href="../assets/typedoc-github-style.css"/></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@cis-oss/pushover</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@cis-oss/pushover</a></li><li><a href="PushoverRecipient.html">PushoverRecipient</a></li></ul><h1>Interface PushoverRecipient</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Represents a single Pushover recipient, which can be a user or a group.</p>
|
||||
</div><div class="tsd-comment tsd-typography"></div></section><div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">PushoverRecipient</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="PushoverRecipient.html#devices">devices</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="PushoverRecipient.html#id">id</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/cis-oss/pushover/blob/5d223831ce363827b196d9e1016b2ae33c7d3140/src/Pushover.ts#L271">src/Pushover.ts:271</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="PushoverRecipient.html#devices" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>devices?</span></a>
|
||||
<a href="PushoverRecipient.html#id" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>id</span></a>
|
||||
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="devices" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Optional</code><span>devices</span><a href="#devices" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">devices</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div><div class="tsd-comment tsd-typography"><p>An optional array of specific device names belonging to the user to send the notification to. If omitted, sends to all user's devices.</p>
|
||||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/cis-oss/pushover/blob/5d223831ce363827b196d9e1016b2ae33c7d3140/src/Pushover.ts#L275">src/Pushover.ts:275</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="id" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>id</span><a href="#id" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">id</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>The Pushover user key or group key.</p>
|
||||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/cis-oss/pushover/blob/5d223831ce363827b196d9e1016b2ae33c7d3140/src/Pushover.ts#L273">src/Pushover.ts:273</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-ext-version-select"><label class="settings-label" for="plugin-versions-select">Version</label><select id="plugin-versions-select" name="versions"></select></div><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#devices" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>devices</span></a><a href="#id" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>id</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@cis-oss/pushover</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p><p class="tsd-generator" style="display: inline-flex; flex-direction: row; justify-content: space-around; width: 100%;"> <span> Made with ❤ by <a href="https://b00tload.space">Alix von Schirp</a> @ <a href="https://github.com/cis-oss">CISLabs OSS</a> </span> <span> <a href="https://github.com/cis-oss/pushover" target="_blank">GitHub</a> | <a href="https://github.com/cis-oss/pushover/issues" target="_blank">Issues</a> | <a href="https://github.com/cis-oss/pushover/blob/main/LICENSE" target="_blank">License</a> </span> <span>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc </a> with <a href="https://github.com/JulianWowra/typedoc-github-theme" target="_blank">typedoc-github-theme</a></span></p></p></footer><div class="overlay"></div><script src="../assets/versionsMenu.js" type="module"></script></body></html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,9 +0,0 @@
|
||||
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SendOptions | @cis-oss/pushover</title><meta name="description" content="Documentation for @cis-oss/pushover"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><style>
|
||||
.tsd-ext-version-select .settings-label {
|
||||
margin: 0.75rem 0.75rem 0 0;
|
||||
</style><link rel="stylesheet" href="../assets/typedoc-github-style.css"/></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@cis-oss/pushover</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@cis-oss/pushover</a></li><li><a href="SendOptions.html">SendOptions</a></li></ul><h1>Interface SendOptions</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Defines the options for the <code>send</code> method, primarily specifying the recipients.</p>
|
||||
</div><div class="tsd-comment tsd-typography"></div></section><div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">SendOptions</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="SendOptions.html#recipients">recipients</a><span class="tsd-signature-symbol">:</span> <a href="PushoverRecipient.html" class="tsd-signature-type tsd-kind-interface">PushoverRecipient</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="SendOptions.html#verbose">verbose</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/cis-oss/pushover/blob/5d223831ce363827b196d9e1016b2ae33c7d3140/src/Pushover.ts#L249">src/Pushover.ts:249</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="SendOptions.html#recipients" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>recipients</span></a>
|
||||
<a href="SendOptions.html#verbose" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>verbose?</span></a>
|
||||
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="recipients" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>recipients</span><a href="#recipients" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">recipients</span><span class="tsd-signature-symbol">:</span> <a href="PushoverRecipient.html" class="tsd-signature-type tsd-kind-interface">PushoverRecipient</a><span class="tsd-signature-symbol">[]</span></div><div class="tsd-comment tsd-typography"><p>An array of <code>PushoverRecipient</code> objects, each specifying a user/group and optional devices.</p>
|
||||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/cis-oss/pushover/blob/5d223831ce363827b196d9e1016b2ae33c7d3140/src/Pushover.ts#L251">src/Pushover.ts:251</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="verbose" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Optional</code><span>verbose</span><a href="#verbose" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">verbose</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>If true, enables verbose logging to the console during the send operation. Defaults to false.</p>
|
||||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/cis-oss/pushover/blob/5d223831ce363827b196d9e1016b2ae33c7d3140/src/Pushover.ts#L253">src/Pushover.ts:253</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-ext-version-select"><label class="settings-label" for="plugin-versions-select">Version</label><select id="plugin-versions-select" name="versions"></select></div><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#recipients" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>recipients</span></a><a href="#verbose" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>verbose</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@cis-oss/pushover</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p><p class="tsd-generator" style="display: inline-flex; flex-direction: row; justify-content: space-around; width: 100%;"> <span> Made with ❤ by <a href="https://b00tload.space">Alix von Schirp</a> @ <a href="https://github.com/cis-oss">CISLabs OSS</a> </span> <span> <a href="https://github.com/cis-oss/pushover" target="_blank">GitHub</a> | <a href="https://github.com/cis-oss/pushover/issues" target="_blank">Issues</a> | <a href="https://github.com/cis-oss/pushover/blob/main/LICENSE" target="_blank">License</a> </span> <span>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc </a> with <a href="https://github.com/JulianWowra/typedoc-github-theme" target="_blank">typedoc-github-theme</a></span></p></p></footer><div class="overlay"></div><script src="../assets/versionsMenu.js" type="module"></script></body></html>
|
||||
@@ -1,11 +0,0 @@
|
||||
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ValidateOptions | @cis-oss/pushover</title><meta name="description" content="Documentation for @cis-oss/pushover"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><style>
|
||||
.tsd-ext-version-select .settings-label {
|
||||
margin: 0.75rem 0.75rem 0 0;
|
||||
</style><link rel="stylesheet" href="../assets/typedoc-github-style.css"/></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@cis-oss/pushover</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@cis-oss/pushover</a></li><li><a href="ValidateOptions.html">ValidateOptions</a></li></ul><h1>Interface ValidateOptions</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Defines the options for the <code>validate</code> method.</p>
|
||||
</div><div class="tsd-comment tsd-typography"></div></section><div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">ValidateOptions</span> <span class="tsd-signature-symbol">{</span><br/> <a class="tsd-kind-property" href="ValidateOptions.html#devicename">deviceName</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="ValidateOptions.html#user">user</a><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/> <a class="tsd-kind-property" href="ValidateOptions.html#verbose">verbose</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/cis-oss/pushover/blob/5d223831ce363827b196d9e1016b2ae33c7d3140/src/Pushover.ts#L259">src/Pushover.ts:259</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="ValidateOptions.html#devicename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>device<wbr/>Name?</span></a>
|
||||
<a href="ValidateOptions.html#user" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>user</span></a>
|
||||
<a href="ValidateOptions.html#verbose" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>verbose?</span></a>
|
||||
</div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="devicename" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Optional</code><span>device<wbr/>Name</span><a href="#devicename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">deviceName</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>An optional device name to validate along with the user key.</p>
|
||||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/cis-oss/pushover/blob/5d223831ce363827b196d9e1016b2ae33c7d3140/src/Pushover.ts#L263">src/Pushover.ts:263</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="user" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>user</span><a href="#user" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">user</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>The Pushover user key to validate.</p>
|
||||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/cis-oss/pushover/blob/5d223831ce363827b196d9e1016b2ae33c7d3140/src/Pushover.ts#L261">src/Pushover.ts:261</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="verbose" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Optional</code><span>verbose</span><a href="#verbose" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">verbose</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>If true, enables verbose logging to the console during the send operation. Defaults to false.</p>
|
||||
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/cis-oss/pushover/blob/5d223831ce363827b196d9e1016b2ae33c7d3140/src/Pushover.ts#L265">src/Pushover.ts:265</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-ext-version-select"><label class="settings-label" for="plugin-versions-select">Version</label><select id="plugin-versions-select" name="versions"></select></div><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#devicename" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>device<wbr/>Name</span></a><a href="#user" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>user</span></a><a href="#verbose" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>verbose</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@cis-oss/pushover</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p><p class="tsd-generator" style="display: inline-flex; flex-direction: row; justify-content: space-around; width: 100%;"> <span> Made with ❤ by <a href="https://b00tload.space">Alix von Schirp</a> @ <a href="https://github.com/cis-oss">CISLabs OSS</a> </span> <span> <a href="https://github.com/cis-oss/pushover" target="_blank">GitHub</a> | <a href="https://github.com/cis-oss/pushover/issues" target="_blank">Issues</a> | <a href="https://github.com/cis-oss/pushover/blob/main/LICENSE" target="_blank">License</a> </span> <span>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc </a> with <a href="https://github.com/JulianWowra/typedoc-github-theme" target="_blank">typedoc-github-theme</a></span></p></p></footer><div class="overlay"></div><script src="../assets/versionsMenu.js" type="module"></script></body></html>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,6 +0,0 @@
|
||||
"use strict"
|
||||
export const DOC_VERSIONS = [
|
||||
'dev',
|
||||
'v0.1',
|
||||
'v0.0',
|
||||
];
|
||||
@@ -2,6 +2,7 @@ import globals from "globals";
|
||||
import pluginJs from "@eslint/js";
|
||||
import tseslint from "typescript-eslint";
|
||||
import eslintConfigPrettier from "eslint-config-prettier";
|
||||
import onlyWarn from "eslint-plugin-only-warn";
|
||||
|
||||
/** @type {import('eslint').Linter.Config[]} */
|
||||
export default [
|
||||
@@ -11,4 +12,9 @@ export default [
|
||||
pluginJs.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
eslintConfigPrettier,
|
||||
{
|
||||
plugins: {
|
||||
onlyWarn,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
7
jest.config.js
Normal file
7
jest.config.js
Normal file
@@ -0,0 +1,7 @@
|
||||
/** @type {import('ts-jest').JestConfigWithTsJest} **/
|
||||
export default {
|
||||
testEnvironment: "node",
|
||||
transform: {
|
||||
"^.+\.tsx?$": ["ts-jest", {}],
|
||||
},
|
||||
};
|
||||
Binary file not shown.
102
package.json
102
package.json
@@ -1,48 +1,50 @@
|
||||
{
|
||||
"name": "@cis-oss/pushover",
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"description": "A client for Pushover, a service for sending notifications. Written in TypeScript. Supports sending to multiple users.",
|
||||
"keywords": [
|
||||
"pushover",
|
||||
"notifications",
|
||||
"mobile",
|
||||
"push",
|
||||
"notification"
|
||||
],
|
||||
"homepage": "https://github.com/cis-oss/pushover#readme",
|
||||
"bugs": "https://github.com/cis-oss/pushover/issues",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "github:cis-oss/pushover"
|
||||
},
|
||||
"homepage": "https://cis-oss.github.io/pushover",
|
||||
"version": "0.1.0",
|
||||
"main": "src/index.ts",
|
||||
"author": {
|
||||
"name": "Alix von Schirp",
|
||||
"email": "hi@b00tload.space",
|
||||
"name": "Alix von Schirp",
|
||||
"url": "https://b00tload.space"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"build": "tsc && typedoc",
|
||||
"lint": "eslint --cache .",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"format:check": "prettier --check .",
|
||||
"check": "pnpm lint && pnpm typecheck && pnpm format:check",
|
||||
"prepare": "husky",
|
||||
"docs:create": "typedoc"
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/cis-oss/pushover.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/cis-oss/pushover/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"mobile",
|
||||
"notification",
|
||||
"notifications",
|
||||
"push",
|
||||
"pushover"
|
||||
],
|
||||
"dependencies": {
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.22.0",
|
||||
"@shipgirl/typedoc-plugin-versions": "^0.3.0",
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/node": "^22.13.10",
|
||||
"eslint": "^9.22.0",
|
||||
"eslint-config-prettier": "^10.1.1",
|
||||
"eslint-plugin-only-warn": "^1.1.0",
|
||||
"finepack": "^2.12.7",
|
||||
"globals": "^16.0.0",
|
||||
"husky": "^9.1.7",
|
||||
"jest": "^29.7.0",
|
||||
"lint-staged": "^15.4.3",
|
||||
"prettier": "3.5.3",
|
||||
"shx": "^0.4.0",
|
||||
"ts-jest": "^29.2.6",
|
||||
"tsx": "^4.19.3",
|
||||
"typedoc": "^0.27.9",
|
||||
"typedoc-github-theme": "^0.2.1",
|
||||
"typedoc-plugin-coverage": "^3.4.1",
|
||||
"typedoc-plugin-extras": "^4.0.0",
|
||||
"typedoc-plugin-include-example": "^2.0.2",
|
||||
@@ -52,15 +54,47 @@
|
||||
"typescript": "^5.5.3",
|
||||
"typescript-eslint": "^8.26.0"
|
||||
},
|
||||
"private": true,
|
||||
"lint-staged": {
|
||||
"*.{js,ts,jsx,tsx}": "eslint --cache --fix . || true",
|
||||
"*.{js,ts,jsx,tsx,json,css,md}": "prettier --write"
|
||||
},
|
||||
"dependencies": {
|
||||
"zod": "^3.24.2"
|
||||
"files": [
|
||||
"dist/**/*.{js,ts,map}"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build:watch": "tsc --watch",
|
||||
"check": "pnpm run lint && pnpm run typecheck",
|
||||
"clean": "shx rm -rf dist/",
|
||||
"docs:generate": "typedoc",
|
||||
"format:check": "prettier --check .",
|
||||
"lint": "eslint --cache .",
|
||||
"prepare": "husky",
|
||||
"prepublishOnly": "pnpm run clean && pnpm run build",
|
||||
"test": "jest",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"license": "MIT",
|
||||
"husky": {
|
||||
"shell": "bash"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"package.json": "finepack",
|
||||
"*.{js,ts,jsx,tsx}": "eslint --cache --fix .",
|
||||
"*.{js,ts,jsx,tsx,json,css,md}": "prettier --write"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "Alix von Schirp",
|
||||
"email": "hi@b00tload.space",
|
||||
"url": "https://b00tload.space"
|
||||
},
|
||||
{
|
||||
"name": "Ole",
|
||||
"email": "jateute123@gmail.com",
|
||||
"url": "https://github.com/jateute"
|
||||
}
|
||||
],
|
||||
"packageManager": "pnpm@10.6.5",
|
||||
"publishConfig": {
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts"
|
||||
},
|
||||
"type": "module"
|
||||
}
|
||||
|
||||
3484
pnpm-lock.yaml
generated
3484
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
718
src/Pushover.ts
Normal file
718
src/Pushover.ts
Normal file
@@ -0,0 +1,718 @@
|
||||
import https from "node:https";
|
||||
import { URLSearchParams } from "node:url";
|
||||
import { z } from "zod";
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Defines the internal Zod schema for validating Pushover message payloads.
|
||||
* This ensures messages conform to the Pushover API requirements before sending.
|
||||
* Includes validation rules for required fields, formats, and conditional requirements.
|
||||
*/
|
||||
const MessageSchema = z
|
||||
.object({
|
||||
/**
|
||||
* The message content sent to the user. Must be at least 3 characters long.
|
||||
*/
|
||||
message: z.string().min(3),
|
||||
/**
|
||||
* An optional title for the message.
|
||||
*/
|
||||
title: z.string().optional(),
|
||||
/**
|
||||
* An optional link attached to the message.
|
||||
* Can be either a simple URL string or an object containing the URL and an optional display title.
|
||||
*/
|
||||
link: z
|
||||
.string()
|
||||
.url()
|
||||
.or(
|
||||
z.object({
|
||||
/**
|
||||
* The URL of the link.
|
||||
*/
|
||||
url: z.string().url(),
|
||||
/**
|
||||
* The title displayed for the link.
|
||||
*/
|
||||
title: z.string().optional(),
|
||||
}),
|
||||
)
|
||||
.optional(),
|
||||
/**
|
||||
* Sets the notification priority for the message.
|
||||
* Defaults to 0 (normal priority).
|
||||
*
|
||||
* - -2: Message only, no notification sound/vibration. May increment the notification bubble.
|
||||
* - -1: Silent notification (no sound/vibration).
|
||||
* - 0: Default notification behavior.
|
||||
* - 1: High priority, ignores user's quiet hours.
|
||||
* - 2: Emergency priority, requires acknowledgement. Requires `emergencyOpts`.
|
||||
*/
|
||||
priority: z
|
||||
.union([
|
||||
z.literal(-2),
|
||||
z.literal(-1),
|
||||
z.literal(0),
|
||||
z.literal(1),
|
||||
z.literal(2),
|
||||
])
|
||||
.optional()
|
||||
.default(0),
|
||||
/**
|
||||
* Emergency priority options, required when `priority` is 2.
|
||||
*/
|
||||
emergencyOpts: z
|
||||
.object({
|
||||
/**
|
||||
* Specifies how often (in seconds) the Pushover servers will send the same notification to the user.
|
||||
* Minimum value is 30 seconds.
|
||||
*/
|
||||
retry: z.number().min(30),
|
||||
/**
|
||||
* Specifies how long (in seconds) the notification will continue to be resent.
|
||||
* Maximum value is 10800 seconds (3 hours).
|
||||
*/
|
||||
expire: z.number().max(10800),
|
||||
/**
|
||||
* An optional callback URL that Pushover servers will send a request to when the notification has been acknowledged.
|
||||
*/
|
||||
callback: z.string().url().optional(),
|
||||
/**
|
||||
* Optional tags for emergency notifications. Helps with cancelling retries.
|
||||
*/
|
||||
tags: z.string().array().optional(),
|
||||
})
|
||||
.optional(),
|
||||
/**
|
||||
* The name of one of the predefined Pushover sounds or a custom sound uploaded by the user to be played for the notification.
|
||||
*/
|
||||
sound: z.string().optional(),
|
||||
/**
|
||||
* An optional Unix timestamp representing the message's date and time to display to the user, rather than the time Pushover received it.
|
||||
*/
|
||||
timestamp: z.number().optional(),
|
||||
/**
|
||||
* If set to true, the message content will be treated as HTML.
|
||||
* Mutually exclusive with `monospace`.
|
||||
*/
|
||||
html: z.boolean().optional().default(false),
|
||||
/**
|
||||
* If set to true, the message content will be displayed using a monospace font.
|
||||
* Mutually exclusive with `html`.
|
||||
*/
|
||||
monospace: z.boolean().optional().default(false),
|
||||
/**
|
||||
* Time To Live in seconds. Specifies how long the message will be kept until disappearing.
|
||||
*/
|
||||
ttl: z.number().optional(),
|
||||
})
|
||||
/**
|
||||
* Validation rule: Ensures that if the priority is set to 2 (emergency),
|
||||
* the `emergencyOpts` object must be provided.
|
||||
*/
|
||||
.refine(
|
||||
(data) => {
|
||||
// If priority is 2, emergencyOpts must exist.
|
||||
return !(data.priority === 2 && !data.emergencyOpts);
|
||||
},
|
||||
{
|
||||
path: ["priority", "emergencyOpts"], // Path related to the error
|
||||
message: "If priority is set to 2, emergencyOpts must be included.",
|
||||
},
|
||||
)
|
||||
/**
|
||||
* Validation rule: Ensures that `html` and `monospace` formatting options
|
||||
* are mutually exclusive and cannot be enabled simultaneously.
|
||||
*/
|
||||
.refine(
|
||||
(data) => {
|
||||
// Cannot have both html and monospace set to true.
|
||||
return !(data.html && data.monospace);
|
||||
},
|
||||
{
|
||||
path: ["html", "monospace"], // Path related to the error
|
||||
message: "html and monospace are mutually exclusive.",
|
||||
},
|
||||
);
|
||||
|
||||
/**
|
||||
* Defines the structure for a Pushover message object used when calling the `send` method.
|
||||
*
|
||||
* This type represents the complete set of parameters you can provide for a
|
||||
* Pushover notification. It includes the required `message` field and various
|
||||
* optional fields to customize the notification's appearance, behavior, priority,
|
||||
* sound, and delivery options.
|
||||
*
|
||||
* Refer to the official Pushover API documentation for detailed explanations of each field.
|
||||
* Note the specific constraints:
|
||||
* - `emergencyOpts` must be provided if `priority` is set to `2`.
|
||||
* - `html` and `monospace` formatting options cannot be used together.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* import type { PushoverMessage } from '@cis-oss/pushover';
|
||||
*
|
||||
* const standardMessage: PushoverMessage = {
|
||||
* message: "Deployment successful!",
|
||||
* title: "Server Update",
|
||||
* priority: 1, // High priority
|
||||
* sound: "pushover",
|
||||
* link: {
|
||||
* url: "https://example.com/deployment/status",
|
||||
* title: "View Status"
|
||||
* }
|
||||
* };
|
||||
*
|
||||
* const emergencyMessage: PushoverMessage = {
|
||||
* message: "System critical: Service down!",
|
||||
* priority: 2,
|
||||
* emergencyOpts: {
|
||||
* retry: 60, // Retry every 60 seconds
|
||||
* expire: 3600, // Expire after 1 hour
|
||||
* tags: ["critical", "infra"]
|
||||
* },
|
||||
* };
|
||||
* ```
|
||||
*/
|
||||
export type PushoverMessage = z.input<typeof MessageSchema>;
|
||||
|
||||
type PushoverMessageParsed = z.output<typeof MessageSchema>;
|
||||
|
||||
/**
|
||||
* Base interface for all Pushover API responses
|
||||
*/
|
||||
interface PushoverResponse {
|
||||
/** Indicates the status of the request. `1` for success, `0` for failure. */
|
||||
status: 0 | 1;
|
||||
/** A unique identifier for the API request, generated by Pushover. */
|
||||
request: string;
|
||||
/** An array of error messages if the request failed (`status` is `0`). */
|
||||
errors?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the response received after successfully sending a Pushover message.
|
||||
*/
|
||||
export interface PushoverMessageResponse extends PushoverResponse {
|
||||
/**
|
||||
* A receipt ID, returned only for messages sent with emergency priority (`priority: 2`).
|
||||
* This ID can be used to check the acknowledgement status or cancel retries.
|
||||
*/
|
||||
receipt?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the response received after validating a user or user/device combination.
|
||||
*/
|
||||
export interface PushoverValidationResponse extends PushoverResponse {
|
||||
/** A list of the user's registered device names, returned on successful validation. */
|
||||
devices?: string[];
|
||||
/** A list of the user's Pushover license types (e.g., 'Android', 'iOS', 'Desktop'). */
|
||||
licenses?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the response received when checking the status of an emergency message receipt.
|
||||
*/
|
||||
export interface PushoverReceiptResponse extends PushoverResponse {
|
||||
/** `true` if the emergency notification has been acknowledged by the user, `false` otherwise. */
|
||||
acknowledged: boolean;
|
||||
/** A Unix timestamp indicating when the notification was acknowledged. `0` if not acknowledged. */
|
||||
acknowledged_at: number;
|
||||
/** The user key of the user who first acknowledged the notification. Empty if not acknowledged. */
|
||||
acknowledged_by: string;
|
||||
/** The name of the device that first acknowledged the notification. Empty if not acknowledged. */
|
||||
acknowledged_by_device: string;
|
||||
/** A Unix timestamp indicating the last time the notification was delivered (due to retries). `0` if not delivered. */
|
||||
last_delivered_at: number;
|
||||
/** `true` if the notification has expired without acknowledgement, `false` otherwise. */
|
||||
expired: boolean;
|
||||
/** A Unix timestamp indicating when the notification expired. `0` if not expired. */
|
||||
expired_at: number;
|
||||
/** `true` if the optional callback URL was successfully contacted, `false` otherwise. */
|
||||
called_back: boolean;
|
||||
/** A Unix timestamp indicating when the callback URL was contacted. `0` if not called back. */
|
||||
called_back_at: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the response received when cancelling emergency message retries by tag.
|
||||
*/
|
||||
export interface PushoverTagCancellationResponse extends PushoverResponse {
|
||||
/** The number of emergency message retries that were successfully cancelled for the given tag. */
|
||||
canceled: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the options for the `send` method, primarily specifying the recipients.
|
||||
*/
|
||||
export interface SendOptions {
|
||||
/** An array of `PushoverRecipient` objects, each specifying a user/group and optional devices. */
|
||||
recipients: PushoverRecipient[];
|
||||
/** If true, enables verbose logging to the console during the send operation. Defaults to false. */
|
||||
verbose?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Defines the options for the `validate` method.
|
||||
*/
|
||||
export interface ValidateOptions {
|
||||
/** The Pushover user key to validate. */
|
||||
user: string;
|
||||
/** An optional device name to validate along with the user key. */
|
||||
deviceName?: string;
|
||||
/** If true, enables verbose logging to the console during the send operation. Defaults to false. */
|
||||
verbose?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a single Pushover recipient, which can be a user or a group.
|
||||
*/
|
||||
export interface PushoverRecipient {
|
||||
/** The Pushover user key or group key. */
|
||||
id: string;
|
||||
/** An optional array of specific device names belonging to the user to send the notification to. If omitted, sends to all user's devices. */
|
||||
devices?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Main class for interacting with the Pushover API (v1).
|
||||
* Provides methods for sending notifications, validating users/devices,
|
||||
* and managing emergency priority messages.
|
||||
*
|
||||
* @param token - Your Pushover application's API token.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* import { Pushover } from "@cis-oss/pushover";
|
||||
*
|
||||
* // Initialize the client
|
||||
* const pushover = new Pushover("YOUR_APP_API_TOKEN");
|
||||
*
|
||||
* // Define recipients
|
||||
* const recipients = [
|
||||
* { id: "USER_KEY_1" },
|
||||
* { id: "USER_KEY_2", devices: ["DEVICE_1", "DEVICE_2"] },
|
||||
* { id: "GROUP_KEY_1" },
|
||||
* ];
|
||||
*
|
||||
* // Send a basic message
|
||||
* const responses = pushover.send(
|
||||
* {
|
||||
* message: "Hello from the library!",
|
||||
* title: "Test Message",
|
||||
* },
|
||||
* { recipients },
|
||||
* );
|
||||
*
|
||||
* responses
|
||||
* .then((responses) => {
|
||||
* console.log("Messages sent:", responses);
|
||||
* })
|
||||
* .catch((error) => {
|
||||
* console.error("Failed to send messages:", error);
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
export class Pushover {
|
||||
private token: string;
|
||||
private apiUrl = "https://api.pushover.net/1/";
|
||||
|
||||
/**
|
||||
* Creates an instance of the Pushover client.
|
||||
* @param token - Your Pushover application's API token. Found on your Pushover dashboard.
|
||||
*/
|
||||
constructor(token: string) {
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a Pushover notification to one or more recipients.
|
||||
*
|
||||
* @param message - A `PushoverMessage` object containing the notification details.
|
||||
* @param options - A `SendOptions` object specifying the recipients and optional settings.
|
||||
* @returns A Promise resolving to an array of `PushoverMessageResponse` objects, one for each recipient.
|
||||
* Rejects if message validation fails or if there's a fundamental issue sending to all recipients.
|
||||
* Individual recipient failures are indicated within their respective response objects (`status: 0`).
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* // Send a message to a specific user and device
|
||||
* const userRecipient: PushoverRecipient = { id: "user-key", devices: ["phone"] };
|
||||
* await pushover.send(
|
||||
* { message: "Targeted message" },
|
||||
* { recipients: [userRecipient] },
|
||||
* );
|
||||
*
|
||||
* // Send an emergency priority message and handle the receipt
|
||||
* const responses = pushover.send(
|
||||
* {
|
||||
* message: "Emergency alert!",
|
||||
* priority: 2,
|
||||
* emergencyOpts: { retry: 30, expire: 3600 },
|
||||
* },
|
||||
* { recipients: [userRecipient] },
|
||||
* );
|
||||
*
|
||||
* responses
|
||||
* .then((responses) => {
|
||||
* console.log(
|
||||
* `Emergency message sent. Receipts: ${responses.map((response) => response.receipt).join(", ")}`,
|
||||
* );
|
||||
* // Store the receipt to check status or cancel later
|
||||
* })
|
||||
* .catch((error) => {
|
||||
* console.error("Failed to send emergency message:", error);
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
public async send(
|
||||
message: PushoverMessage,
|
||||
options: SendOptions,
|
||||
): Promise<PushoverMessageResponse[]> {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (options.recipients.length === 0) {
|
||||
reject(new Error("No recipients specified."));
|
||||
return;
|
||||
}
|
||||
|
||||
const {
|
||||
success,
|
||||
error,
|
||||
data: parsedMessage,
|
||||
} = MessageSchema.safeParse(message);
|
||||
|
||||
if (!success) {
|
||||
reject(new Error(`Message validation failed: ${error}`));
|
||||
return;
|
||||
}
|
||||
|
||||
if (options.verbose) {
|
||||
console.log("Verbose mode enabled. Logging message and options:");
|
||||
console.log(parsedMessage);
|
||||
console.log(options);
|
||||
console.log("----------------------");
|
||||
console.log("Sending message...");
|
||||
}
|
||||
|
||||
const promises = options.recipients.map((recipient) =>
|
||||
this.sendToSingleRecipient(
|
||||
parsedMessage,
|
||||
recipient,
|
||||
options.verbose ?? false,
|
||||
),
|
||||
);
|
||||
|
||||
resolve(Promise.all(promises));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Sends the validated message payload to a single recipient.
|
||||
*
|
||||
* @param message - The validated PushoverMessage object.
|
||||
* @param recipient - The PushoverRecipient object.
|
||||
* @param verbose - Optional flag for logging.
|
||||
* @returns A Promise resolving to the PushoverMessageResponse.
|
||||
*/
|
||||
private async sendToSingleRecipient(
|
||||
message: PushoverMessageParsed,
|
||||
recipient: PushoverRecipient,
|
||||
verbose?: boolean,
|
||||
): Promise<PushoverMessageResponse> {
|
||||
const params = new URLSearchParams();
|
||||
|
||||
// Add token and user
|
||||
params.append("token", this.token);
|
||||
params.append("user", recipient.id);
|
||||
params.append("device", recipient.devices?.join(",") ?? "");
|
||||
|
||||
// Add message properties
|
||||
params.append("message", message.message);
|
||||
if (message.title) params.append("title", message.title);
|
||||
params.append("priority", "" + message.priority);
|
||||
if (message.priority === 2 && message.emergencyOpts) {
|
||||
params.append("retry", String(message.emergencyOpts.retry));
|
||||
params.append("expire", String(message.emergencyOpts.expire));
|
||||
if (message.emergencyOpts.callback)
|
||||
params.append("callback", message.emergencyOpts.callback);
|
||||
if (message.emergencyOpts.tags)
|
||||
params.append("tags", message.emergencyOpts.tags.join());
|
||||
}
|
||||
if (message.link) {
|
||||
if (typeof message.link === "string") {
|
||||
params.append("url", message.link);
|
||||
} else {
|
||||
params.append("url", message.link.url);
|
||||
if (message.link.title) params.append("url_title", message.link.title);
|
||||
}
|
||||
}
|
||||
if (message.html) params.append("html", "1");
|
||||
if (message.monospace) params.append("monospace", "1");
|
||||
if (message.sound) params.append("sound", message.sound);
|
||||
if (message.timestamp)
|
||||
params.append("timestamp", String(message.timestamp));
|
||||
if (message.ttl) params.append("ttl", String(message.ttl));
|
||||
|
||||
return this.makeRequest<PushoverMessageResponse>(
|
||||
"messages.json",
|
||||
"POST",
|
||||
params,
|
||||
verbose ?? false,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Makes an HTTPS request to the Pushover API.
|
||||
*
|
||||
* @param endpoint - The API endpoint path (e.g., "messages.json").
|
||||
* @param method - The HTTP method ("POST" or "GET").
|
||||
* @param params - URLSearchParams for POST body or query string.
|
||||
* @param verbose - Optional flag for logging request/response details.
|
||||
* @returns A Promise resolving to the parsed JSON response.
|
||||
*/
|
||||
private makeRequest<T extends PushoverResponse>(
|
||||
endpoint: string,
|
||||
method: "POST" | "GET",
|
||||
params: URLSearchParams,
|
||||
verbose?: boolean,
|
||||
): Promise<T> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const url = this.apiUrl + endpoint;
|
||||
let requestBody: string | null = null;
|
||||
let requestUrl = url;
|
||||
|
||||
const options: https.RequestOptions = {
|
||||
method: method,
|
||||
headers: {},
|
||||
};
|
||||
|
||||
if (method === "POST") {
|
||||
requestBody = params.toString();
|
||||
options.headers!["Content-Type"] = "application/x-www-form-urlencoded";
|
||||
options.headers!["Content-Length"] = Buffer.byteLength(requestBody);
|
||||
} else {
|
||||
// Append params to URL for GET requests
|
||||
const queryString = params.toString();
|
||||
if (queryString) {
|
||||
requestUrl += "?" + queryString;
|
||||
}
|
||||
}
|
||||
|
||||
if (verbose) {
|
||||
console.log(`Making ${method} request to ${requestUrl}`);
|
||||
if (requestBody) {
|
||||
console.log("Request Body:", requestBody);
|
||||
}
|
||||
}
|
||||
|
||||
const req = https.request(requestUrl, options, (res) => {
|
||||
let data = "";
|
||||
res.setEncoding("utf8"); // Ensure correct encoding
|
||||
|
||||
res.on("data", (chunk) => {
|
||||
data += chunk;
|
||||
});
|
||||
|
||||
res.on("end", () => {
|
||||
if (verbose) {
|
||||
console.log("Received response status:", res.statusCode);
|
||||
console.log("Received response headers:", res.headers);
|
||||
console.log(
|
||||
`Received response body (length: ${data.length}): ${data}`,
|
||||
);
|
||||
}
|
||||
try {
|
||||
// Handle potential empty responses or non-JSON responses gracefully
|
||||
if (!data) {
|
||||
// Reject promise on empty response
|
||||
reject(
|
||||
new Error(
|
||||
`Request failed with status ${res.statusCode} and empty response.`,
|
||||
),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const response = JSON.parse(data) as T;
|
||||
// Basic check for expected structure
|
||||
if (
|
||||
typeof response.status === "undefined" ||
|
||||
typeof response.request === "undefined"
|
||||
) {
|
||||
reject(new Error(`Invalid response structure received: ${data}`));
|
||||
return;
|
||||
}
|
||||
|
||||
resolve(response);
|
||||
} catch (error) {
|
||||
if (verbose) console.error("Failed to parse JSON response:", error);
|
||||
reject(
|
||||
new Error(`Failed to parse API response. Raw data: ${data}`),
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
req.on("error", (error) => {
|
||||
if (verbose)
|
||||
console.error(`HTTPS request error to ${endpoint}:`, error);
|
||||
reject(new Error(`API request failed: ${error.message}`));
|
||||
});
|
||||
|
||||
if (method === "POST" && requestBody) {
|
||||
req.write(requestBody);
|
||||
}
|
||||
|
||||
req.end();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates a Pushover user key and optionally a specific device name associated with that user.
|
||||
* Useful for verifying recipient details before sending messages.
|
||||
*
|
||||
* @param options - A `ValidateOptions` object containing the `user` key and optional `deviceName`.
|
||||
* @returns A Promise resolving to a `PushoverValidationResponse` object.
|
||||
* Check the `status` field (1 for valid, 0 for invalid) and `errors` for details on failure.
|
||||
* On success, `devices` and `licenses` may be populated.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* // Validate a user key
|
||||
* const validation = await pushover.validate({ user: "user-key" });
|
||||
* if (validation.status === 1) {
|
||||
* console.log(
|
||||
* "User is valid. Devices:",
|
||||
* validation.devices,
|
||||
* ", Licenses:",
|
||||
* validation.licenses,
|
||||
* );
|
||||
* } else {
|
||||
* console.error("Validation failed:", validation.errors);
|
||||
* }
|
||||
*
|
||||
* // Validate a user and device
|
||||
* const deviceValidation = await pushover.validate({
|
||||
* user: "user-key",
|
||||
* deviceName: "phone",
|
||||
* });
|
||||
* console.log("Device validation status:", deviceValidation.status);
|
||||
* ```
|
||||
*/
|
||||
validate(options: ValidateOptions): Promise<PushoverValidationResponse> {
|
||||
const params = new URLSearchParams();
|
||||
|
||||
params.append("token", this.token);
|
||||
params.append("user", options.user);
|
||||
if (options.deviceName) params.append("device", options.deviceName);
|
||||
|
||||
return this.makeRequest<PushoverValidationResponse>(
|
||||
"users/validate.json",
|
||||
"POST",
|
||||
params,
|
||||
options.verbose ?? false,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks the status of an emergency priority message using its receipt ID.
|
||||
* Allows querying whether the message has been acknowledged, expired, or if the callback was triggered.
|
||||
*
|
||||
* @param receipt - The receipt ID obtained from the `PushoverMessageResponse` when sending an emergency message.
|
||||
* @param verbose - Optional flag for logging.
|
||||
* @returns A Promise resolving to a `PushoverReceiptResponse` object containing the status details.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* const receiptId = "RECEIPT_ID_FROM_SEND_RESPONSE";
|
||||
* const status = await pushover.checkReceipt(receiptId);
|
||||
* if (status.status === 1) {
|
||||
* console.log(
|
||||
* `Acknowledged: ${status.acknowledged} by ${status.acknowledged_by}`,
|
||||
* );
|
||||
* console.log(`Expired: ${status.expired}`);
|
||||
* } else {
|
||||
* console.error("Failed to check receipt:", status.errors);
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
checkReceipt(
|
||||
receipt: string,
|
||||
verbose?: boolean,
|
||||
): Promise<PushoverReceiptResponse> {
|
||||
const params = new URLSearchParams();
|
||||
return this.makeRequest<PushoverReceiptResponse>(
|
||||
`receipts/${receipt}.json?token=${this.token}`,
|
||||
"GET",
|
||||
params,
|
||||
verbose ?? false,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels the retries for an emergency priority message that has not yet been acknowledged.
|
||||
*
|
||||
* @param receipt - The receipt ID of the emergency message whose retries should be cancelled.
|
||||
* @param verbose - Optional flag for logging.
|
||||
* @returns A Promise resolving to a basic `PushoverResponse`. Check `status` for success (1) or failure (0).
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* const receiptId = "RECEIPT_ID_TO_CANCEL";
|
||||
* const cancelResponse = await pushover.cancelRetries(receiptId);
|
||||
* if (cancelResponse.status === 1) {
|
||||
* console.log("Successfully cancelled retries for receipt:", receiptId);
|
||||
* } else {
|
||||
* console.error("Failed to cancel retries:", cancelResponse.errors);
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
cancelRetries(receipt: string, verbose?: boolean): Promise<PushoverResponse> {
|
||||
const params = new URLSearchParams();
|
||||
params.append("token", this.token);
|
||||
return this.makeRequest<PushoverResponse>(
|
||||
`receipts/${receipt}/cancel.json`,
|
||||
"POST",
|
||||
params,
|
||||
verbose ?? false,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels the retries for all emergency priority messages associated with a specific tag
|
||||
* that have not yet been acknowledged.
|
||||
*
|
||||
* @param tag - The tag associated with the emergency messages (set in `emergencyOpts.tags` during send).
|
||||
* @param verbose - Optional flag for logging.
|
||||
* @returns A Promise resolving to a `PushoverTagCancellationResponse` indicating the number of messages cancelled.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* const tagName = "critical-db-alert";
|
||||
* const cancelByTagResponse = await pushover.cancelRetriesByTag(tagName);
|
||||
* if (cancelByTagResponse.status === 1) {
|
||||
* console.log(
|
||||
* `Successfully cancelled ${cancelByTagResponse.canceled} messages with tag: ${tagName}`,
|
||||
* );
|
||||
* } else {
|
||||
* console.error("Failed to cancel by tag:", cancelByTagResponse.errors);
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
cancelRetriesByTag(
|
||||
tag: string,
|
||||
verbose?: boolean,
|
||||
): Promise<PushoverTagCancellationResponse> {
|
||||
const params = new URLSearchParams();
|
||||
params.append("token", this.token);
|
||||
return this.makeRequest<PushoverTagCancellationResponse>(
|
||||
`receipts/cancel_by_tag/${tag}.json`,
|
||||
"POST",
|
||||
params,
|
||||
verbose ?? false,
|
||||
);
|
||||
}
|
||||
}
|
||||
128
src/index.ts
128
src/index.ts
@@ -1,111 +1,25 @@
|
||||
import { z } from "zod";
|
||||
import { Pushover } from "./Pushover";
|
||||
|
||||
const messageSchema = z.object({
|
||||
/**
|
||||
* The message to send.
|
||||
*/
|
||||
message: z.string(),
|
||||
/**
|
||||
* The title of the message.
|
||||
*/
|
||||
title: z.string().optional(),
|
||||
/**
|
||||
* The URL to open when the notification is clicked.
|
||||
*/
|
||||
url: z
|
||||
.object({
|
||||
/**
|
||||
* The URL itself.
|
||||
*/
|
||||
url: z.string(),
|
||||
/**
|
||||
* The title of the URL to be displayed.
|
||||
*/
|
||||
title: z.string().optional(),
|
||||
})
|
||||
.optional(),
|
||||
priority: z
|
||||
.object({
|
||||
level: z.number().default(0),
|
||||
retry: z.number().optional(),
|
||||
expire: z.number().optional(),
|
||||
callback: z.string().optional(),
|
||||
})
|
||||
.optional(),
|
||||
sound: z.string().optional(),
|
||||
timestamp: z.date().optional(),
|
||||
html: z.boolean().default(false),
|
||||
attachment: z
|
||||
.object({
|
||||
data: z.string().or(z.instanceof(File)),
|
||||
type: z.string(),
|
||||
})
|
||||
.optional(),
|
||||
users: z.array(
|
||||
z.object({
|
||||
name: z.string(),
|
||||
token: z.string(),
|
||||
devices: z.array(z.string()),
|
||||
}),
|
||||
),
|
||||
appToken: z.string(),
|
||||
});
|
||||
import type {
|
||||
PushoverRecipient,
|
||||
PushoverMessage,
|
||||
PushoverMessageResponse,
|
||||
PushoverValidationResponse,
|
||||
PushoverReceiptResponse,
|
||||
PushoverTagCancellationResponse,
|
||||
ValidateOptions,
|
||||
SendOptions,
|
||||
} from "./Pushover";
|
||||
|
||||
export type PushoverMessage = z.infer<typeof messageSchema>;
|
||||
export default Pushover;
|
||||
|
||||
export type Pushover = {
|
||||
// #################################
|
||||
// # Helpers #
|
||||
// #################################
|
||||
|
||||
/**
|
||||
* Get all available sounds.
|
||||
*/
|
||||
getSounds: () => { sounds: string[] };
|
||||
|
||||
/**
|
||||
* Get all available devices for a user.
|
||||
*/
|
||||
getDevices: (userToken: string) => { devices: string[] };
|
||||
|
||||
// #################################
|
||||
// # Sending #
|
||||
// #################################
|
||||
|
||||
/**
|
||||
* Send the notification.
|
||||
*/
|
||||
send: () => void;
|
||||
|
||||
// #################################
|
||||
// # Options #
|
||||
// #################################
|
||||
withMessage: (message: string) => Pushover;
|
||||
withTitle: (title: string) => Pushover;
|
||||
withUrl: (url: { url: string; title: string }) => Pushover;
|
||||
withPriority: (priority: {
|
||||
level: number;
|
||||
retry?: number;
|
||||
expire?: number;
|
||||
callback?: string;
|
||||
}) => Pushover;
|
||||
withSound: (sound: string) => Pushover;
|
||||
withTimestamp: (timestamp: number) => Pushover;
|
||||
withHtml: (enable: boolean) => Pushover;
|
||||
withAttachment: (attachment: File) => Pushover;
|
||||
withBase64Attachment: (attachment: {
|
||||
data: string;
|
||||
type: string;
|
||||
}) => Pushover;
|
||||
addUsers: (users: User[]) => Pushover;
|
||||
export type {
|
||||
PushoverRecipient,
|
||||
PushoverMessage,
|
||||
PushoverMessageResponse,
|
||||
PushoverValidationResponse,
|
||||
PushoverReceiptResponse,
|
||||
PushoverTagCancellationResponse,
|
||||
ValidateOptions,
|
||||
SendOptions,
|
||||
};
|
||||
|
||||
export type User = {
|
||||
name: string;
|
||||
token: string;
|
||||
devices: string[];
|
||||
};
|
||||
|
||||
console.log(
|
||||
"this is indented obnoxiously far and has no semi at the end. (testing previous commits",
|
||||
);
|
||||
|
||||
11
tests/index.spec.ts
Normal file
11
tests/index.spec.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import Pushover from "../src";
|
||||
|
||||
test("Pushover is exported", () => {
|
||||
expect(Pushover).toBeDefined();
|
||||
expect(Pushover).toBeInstanceOf(Object);
|
||||
});
|
||||
|
||||
test("Pushover has expected functions", () => {
|
||||
expect(Pushover).toHaveProperty("prototype.constructor");
|
||||
expect(Pushover).toHaveProperty("prototype.send");
|
||||
});
|
||||
@@ -4,6 +4,7 @@
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"target": "es2022",
|
||||
"sourceMap": true,
|
||||
"allowJs": true,
|
||||
"resolveJsonModule": true,
|
||||
"moduleDetection": "force",
|
||||
@@ -11,6 +12,7 @@
|
||||
|
||||
/* Strictness */
|
||||
"strict": true,
|
||||
"strictNullChecks": true,
|
||||
"noUncheckedIndexedAccess": true,
|
||||
"checkJs": true,
|
||||
|
||||
@@ -20,6 +22,7 @@
|
||||
"moduleResolution": "node",
|
||||
"incremental": true,
|
||||
"outDir": "dist",
|
||||
"declaration": true,
|
||||
|
||||
/* Path Aliases */
|
||||
"baseUrl": "./src",
|
||||
@@ -27,6 +30,6 @@
|
||||
"~/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["**/*.ts", "**/*.tsx", "**/*.cjs", "**/*.js"],
|
||||
"exclude": ["node_modules", "docs", "dist"]
|
||||
"include": ["src/**/*.ts", "src/**/*.tsx"],
|
||||
"exclude": ["node_modules/**/*", "docs/**/*", "dist/**/*"]
|
||||
}
|
||||
|
||||
@@ -19,12 +19,11 @@ const config = {
|
||||
"typedoc-plugin-zod",
|
||||
"typedoc-plugin-include-example",
|
||||
"@shipgirl/typedoc-plugin-versions",
|
||||
"typedoc-github-theme",
|
||||
],
|
||||
footerTypedocVersion: true,
|
||||
footerLastModified: true,
|
||||
coverageLabel: "Docs Coverage",
|
||||
coverageOutputType: "all",
|
||||
coverageSvgWidth: 130,
|
||||
customFooterHtml: '<p class="tsd-generator" style="display: inline-flex; flex-direction: row; justify-content: space-around; width: 100%;"> <span> Made with ❤ by <a href="https://b00tload.space">Alix von Schirp</a> @ <a href="https://github.com/cis-oss">CISLabs OSS</a> </span> <span> <a href="https://github.com/cis-oss/pushover" target="_blank">GitHub</a> | <a href="https://github.com/cis-oss/pushover/issues" target="_blank">Issues</a> | <a href="https://github.com/cis-oss/pushover/blob/main/LICENSE" target="_blank">License</a> </span> <span>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc </a> with <a href="https://github.com/JulianWowra/typedoc-github-theme" target="_blank">typedoc-github-theme</a></span></p>',
|
||||
coverageOutputType: "json",
|
||||
hideGenerator: true,
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
Reference in New Issue
Block a user