Catchup before database change.
This commit is contained in:
parent
baed47e203
commit
126eab4df0
|
|
@ -0,0 +1,7 @@
|
|||
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
|
||||
QyNTUxOQAAACALxwbAx0YD+vylHhJmkJ5VL4EbbVie/q0qEs+soPNcMAAAAJjc6yGJ3Osh
|
||||
iQAAAAtzc2gtZWQyNTUxOQAAACALxwbAx0YD+vylHhJmkJ5VL4EbbVie/q0qEs+soPNcMA
|
||||
AAAEAp6uChFDWg2IRK7yeDwXVSQiVmfMA348kYSizORVY9sAvHBsDHRgP6/KUeEmaQnlUv
|
||||
gRttWJ7+rSoSz6yg81wwAAAAFWVydGZhc3RmaWxsZXJfZWQyNTUxOQ==
|
||||
-----END OPENSSH PRIVATE KEY-----
|
||||
|
|
@ -0,0 +1 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAvHBsDHRgP6/KUeEmaQnlUvgRttWJ7+rSoSz6yg81ww ertfastfiller_ed25519.pub
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAACFwAAAAdzc2gtcn
|
||||
NhAAAAAwEAAQAAAgEAp44cRaQJiLtzUzmCicHRPwnhjVEuMkW17YyjzDWlqmDRwgOVthLt
|
||||
LO/pFeUAAbjRx5dXNdRP744L2VpZyTCZgabpGoLyTxIJpRcUE1E12HvvsZRJlPil8w1dFo
|
||||
7v221DNXedXJXSHP8W8J1TB7oUzVRFp1+Uy9Ww+p8tsrndSt3rM047Ghp1ELkExIe8cr85
|
||||
kQ+kFJjfp9sP5skQgdfqUTldD3o3rk3Ylwn1RJ0UG8BzAnanB/WuMpsoFsL0724Rl1oYL+
|
||||
bEJYNUwsivZcBsJtcfP2a0D9LQ6BkPYoWxfbQ6Ielc68RLxOsnTHGXzJD4FBuY70KR5vJE
|
||||
4FKSnIa7wUjWLBtODyxRRe1kkaYz8O/wfT0zMgd6EoxLoWC2stmtutUjZKkBKCPP3yTKmJ
|
||||
0ADr1U9VcItkbT+eGS1up/6apPDqpbDe6ssGfxB8eJAdvzWqaohJ9VPfkD37NbCr5JApx+
|
||||
i/p7zS66heRD7YKOfzsdWX68cGw8SW5eSSJObeOYsmLkg2EPXm4/0IItoulAyJYaD/EEav
|
||||
5xVOwv+0YZScPlqWXVrOk2naeDKxSYv+dCBXTY/fBoTV4jT+scwDfX4QrfvDsgibctBqh9
|
||||
lmQ3L/achvWzLbiRjx3AOmgQROS7NSf4uw/sKOdFB0DN6o49DGLHIKJURkjPbeiLnfDwXI
|
||||
8AAAdIp6a8pKemvKQAAAAHc3NoLXJzYQAAAgEAp44cRaQJiLtzUzmCicHRPwnhjVEuMkW1
|
||||
7YyjzDWlqmDRwgOVthLtLO/pFeUAAbjRx5dXNdRP744L2VpZyTCZgabpGoLyTxIJpRcUE1
|
||||
E12HvvsZRJlPil8w1dFo7v221DNXedXJXSHP8W8J1TB7oUzVRFp1+Uy9Ww+p8tsrndSt3r
|
||||
M047Ghp1ELkExIe8cr85kQ+kFJjfp9sP5skQgdfqUTldD3o3rk3Ylwn1RJ0UG8BzAnanB/
|
||||
WuMpsoFsL0724Rl1oYL+bEJYNUwsivZcBsJtcfP2a0D9LQ6BkPYoWxfbQ6Ielc68RLxOsn
|
||||
THGXzJD4FBuY70KR5vJE4FKSnIa7wUjWLBtODyxRRe1kkaYz8O/wfT0zMgd6EoxLoWC2st
|
||||
mtutUjZKkBKCPP3yTKmJ0ADr1U9VcItkbT+eGS1up/6apPDqpbDe6ssGfxB8eJAdvzWqao
|
||||
hJ9VPfkD37NbCr5JApx+i/p7zS66heRD7YKOfzsdWX68cGw8SW5eSSJObeOYsmLkg2EPXm
|
||||
4/0IItoulAyJYaD/EEav5xVOwv+0YZScPlqWXVrOk2naeDKxSYv+dCBXTY/fBoTV4jT+sc
|
||||
wDfX4QrfvDsgibctBqh9lmQ3L/achvWzLbiRjx3AOmgQROS7NSf4uw/sKOdFB0DN6o49DG
|
||||
LHIKJURkjPbeiLnfDwXI8AAAADAQABAAACAEcHDYISAv6k48LcZrNJ549O+3/B8ZDbDz+H
|
||||
dmobNcKPb2vMxDqeNE9v1gFzhXi1ZawzwgLuIQKeVvSJAfWw9enJnRgheWE+drs2mMqFiw
|
||||
tdomLHRxfw/bwWJqdo6VG9tBdmwNzeH+ct1YYjUu68GZRfDHXipTtxNyhOsPsKIj5Z65ng
|
||||
qFos7AIuRFChb6e+20LcfARFN846pTeCdU5tfoV3CTWF7DOmCVIhpQi0g7Et+DMLpEvSAE
|
||||
mwjyJy+4zBvpBH32fy7aQvU4+Mrhm2o8IlQDhKq7rndapl8SklHnP4ogn9GGhTWoE74/la
|
||||
T+ymaZtwhXirYhkiC0OCjWbwEIeyvub40dLsN0w5FdP1O+8+ie4PJnj70mutsY+wjrR4HX
|
||||
HUPLHP8n7gaKj1KApg10WRM7HSKQW/qnIF9kMXZtMpoB2LyCTFFRcyn70V5+JsY4dXXXyd
|
||||
X3KBiDRYCqiYll+n1N4oCYdGG+CYJ9Bn5RBs+nSg/KFe2ueanlXxde/2rWsZJoSrRUEf9N
|
||||
mgsJz+MsdFMQVxxwFeratO0fq81vLqDcA9x5fLXtJcP/qibJ2tXPpK898uRE+BgAJ4C3Yx
|
||||
ANxU1blOW9Q6JjfPPz6WjOOhhbYB52tpWbAVTkCIT/khIbIRNgcorMcwf1Y1xuOKWQyV4Q
|
||||
6FhEtlyVkJatVdn3QlAAABAQC+ZehwYPMVo6/yrai1WCxGMeyGn3tyOGfh8Pb8vzTC2Wvl
|
||||
ZIzxZxpo+XffW+g+DOnKf14HvzUP0/0roRBYvV//VukpSKUCRSTKcopClx7evwp+VxJ6Jt
|
||||
cHR8zhWcq4H/XPz9JRc1GVGqUc3ZZM3/3BC3R/VpbeXENaAvaVursImh5w2ES8UO68BJ8Z
|
||||
gDnLEuNojduogh4O+IgiFMLWqmrA100aL1pEsTCGtVBYfniffgxrRrLzKpzfiHE70jiEyu
|
||||
APrV9HEpohJ38cGRjSyr7S0/thCcATlGs9DmDbNbDZQDRAreYbvL9Nvg9qt9veYYxdIiOP
|
||||
aEDpjM+lnO/4WU3FAAABAQDoRBeJ/x8atlpuSvGDqrea47zMu6cSY8T6HakEE6Q4zMb9Iw
|
||||
8If0pyvzfKranpw2+6/EZQAyResc6AzLXitThVwyxe0Fn8Jg0YGhir0E40QLmH8VD5F/ZA
|
||||
iKKqabyl+nNohc/9wFReANri77J4BsnaFbfKY6kuPjFwrM/P51+oc41DwU6KpbzYRRom/P
|
||||
dB1yXMDV8EHAqxfNLJX9fO17VgB8COeP5tLhS7+pa3F/9hDKa5ot01IADX0lW68MRPcJrH
|
||||
YGheYfzlrPwvCOBhgNrhINzXDJgR5BO/K+eFh+FO398p7AwZoUaoXssHXbPYDt2Po1apa4
|
||||
RfW8ZXd6k8OQGdAAABAQC4rTrJ1WbpRlMGg+T3+CuASKynjEUqqHVZoFhLslI3Pc9qhmsG
|
||||
503CBkUYvlVUp7KShdhVfdUrECl8ONtiPEck9XS5J4A6N9Snq7N1tDYOKD1qzbRTXaXsYb
|
||||
I8OjOo/idZyMDOs+5vmanJ3b8iA6O5H8JwwjqQqQhYFzV+bosUsWaBHfcA+fCjK6azMFwy
|
||||
X5eTPfht4yLfj8lWrPqkOPYlGVQG8apL9qRqj38NaRZsqxeC0fZONkD/reKtGzJ4AX6KgX
|
||||
8RzmrHeseYD+9qdiQAld79BtbPkTiI6d2tVfwaQ+5N2TmLsSxsCaLviiQh6yofDLrcAkA7
|
||||
ViaHqDR8f6UbAAAAEWVydGZhc3RmaWxsZXJfcnNhAQ==
|
||||
-----END OPENSSH PRIVATE KEY-----
|
||||
|
|
@ -0,0 +1 @@
|
|||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCnjhxFpAmIu3NTOYKJwdE/CeGNUS4yRbXtjKPMNaWqYNHCA5W2Eu0s7+kV5QABuNHHl1c11E/vjgvZWlnJMJmBpukagvJPEgmlFxQTUTXYe++xlEmU+KXzDV0Wju/bbUM1d51cldIc/xbwnVMHuhTNVEWnX5TL1bD6ny2yud1K3eszTjsaGnUQuQTEh7xyvzmRD6QUmN+n2w/myRCB1+pROV0PejeuTdiXCfVEnRQbwHMCdqcH9a4ymygWwvTvbhGXWhgv5sQlg1TCyK9lwGwm1x8/ZrQP0tDoGQ9ihbF9tDoh6VzrxEvE6ydMcZfMkPgUG5jvQpHm8kTgUpKchrvBSNYsG04PLFFF7WSRpjPw7/B9PTMyB3oSjEuhYLay2a261SNkqQEoI8/fJMqYnQAOvVT1Vwi2RtP54ZLW6n/pqk8OqlsN7qywZ/EHx4kB2/NapqiEn1U9+QPfs1sKvkkCnH6L+nvNLrqF5EPtgo5/Ox1ZfrxwbDxJbl5JIk5t45iyYuSDYQ9ebj/Qgi2i6UDIlhoP8QRq/nFU7C/7RhlJw+WpZdWs6Tadp4MrFJi/50IFdNj98GhNXiNP6xzAN9fhCt+8OyCJty0GqH2WZDcv9pyG9bMtuJGPHcA6aBBE5Ls1J/i7D+wo50UHQM3qjj0MYscgolRGSM9t6Iud8PBcjw== ertfastfiller_rsa.pub
|
||||
|
|
@ -39,7 +39,32 @@
|
|||
"webLoggingMaxFiles": "5",
|
||||
"webLoggingMaxFileSize": "10m",
|
||||
"dockerTimezone": "Etc/UTC",
|
||||
"databaseConnectionType": "none",
|
||||
"databaseConnectionType": "sqlite",
|
||||
"sqliteDbFile": "/public/ERTSQlite.db",
|
||||
"databaseLoggingMaxFiles": "5",
|
||||
"databaseLoggingMaxFileSize": "10m"
|
||||
},
|
||||
{
|
||||
"name": "DO-ertfastfiller-sfo3",
|
||||
"remoteURL": "http://64.23.170.170",
|
||||
"webServerPort": 80,
|
||||
"webServerLang": "node",
|
||||
"targetType": "docker",
|
||||
"webServer": "node",
|
||||
"NodeVersion": "lts",
|
||||
"NodeOS": "alpine",
|
||||
"webLoggingMaxFiles": "5",
|
||||
"webLoggingMaxFileSize": "10m",
|
||||
"dockerTimezone": "Etc/UTC",
|
||||
"databaseConnectionType": "sqlite",
|
||||
"usage": "production",
|
||||
"dockerType": "remote",
|
||||
"dockerProtocol": "ssh",
|
||||
"dockerHost": "64.23.170.170",
|
||||
"dockerServerName": "digitalocean / ertfastfiller-sfo3",
|
||||
"dockerProjectName": "ertfastfiller__do-ertfastfiller-sfo3",
|
||||
"NodeImageType": "slim",
|
||||
"sqliteDbFile": "/public/ERTSQlite.db",
|
||||
"databaseLoggingMaxFiles": "5",
|
||||
"databaseLoggingMaxFileSize": "10m"
|
||||
}
|
||||
|
|
@ -49,7 +74,89 @@
|
|||
"extensions": [
|
||||
{
|
||||
"name": "pdf-lib"
|
||||
},
|
||||
{
|
||||
"name": "@hyperbytes/wappler-onesignal"
|
||||
},
|
||||
{
|
||||
"name": "@hyperbytes/wappler-file-to-base64-with-save-option"
|
||||
},
|
||||
{
|
||||
"name": "@hyperbytes/wappler-all-in-one-ai"
|
||||
}
|
||||
],
|
||||
"userUploadsFolder": "/uploads"
|
||||
"userUploadsFolder": "/uploads",
|
||||
"resources": {
|
||||
"providers": {
|
||||
"digitalocean": {
|
||||
"provider-api-key": "dop_v1_30020b3307543b83214257a1774d41737f98a20e4d8e8ec49ba7c99ac2e32968",
|
||||
"ssh-key-id": 44250508,
|
||||
"ssh-key-file": "/.wappler/.ssh/ertfastfiller_ed25519.pub",
|
||||
"ssh_key": {
|
||||
"ertfastfiller_ed25519": {
|
||||
"id": 44250508,
|
||||
"ssh-key-file": "/.wappler/.ssh/ertfastfiller_ed25519.pub",
|
||||
"fingerprint": "64:50:e4:41:ed:26:78:df:fb:27:4a:cf:a7:58:02:2a",
|
||||
"type": "ed25519",
|
||||
"name": "ertfastfiller_ed25519"
|
||||
},
|
||||
"ertfastfiller_rsa": {
|
||||
"id": 44250710,
|
||||
"fingerprint": "9f:0e:25:d8:10:fc:e5:d4:94:38:92:74:8a:81:cd:16",
|
||||
"ssh-key-file": "/.wappler/.ssh/ertfastfiller_rsa.pub",
|
||||
"type": "rsa"
|
||||
}
|
||||
},
|
||||
"server": {
|
||||
"ertfastfiller-sfo3": {
|
||||
"id": 461271335,
|
||||
"status": "running",
|
||||
"access": true,
|
||||
"ip_address": "64.23.170.170",
|
||||
"region": "San Francisco 3",
|
||||
"price": 4,
|
||||
"vcpus": 1,
|
||||
"memory": 512,
|
||||
"disk": 10,
|
||||
"transfer": "0.5",
|
||||
"services": {},
|
||||
"ssh_keys": [
|
||||
{
|
||||
"id": 44250508,
|
||||
"ssh-key-file": "/.wappler/.ssh/ertfastfiller_ed25519.pub",
|
||||
"fingerprint": "64:50:e4:41:ed:26:78:df:fb:27:4a:cf:a7:58:02:2a",
|
||||
"type": "ed25519",
|
||||
"name": "ertfastfiller_ed25519"
|
||||
},
|
||||
{
|
||||
"id": 43691420,
|
||||
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK/IniPilvW2mZhH12xp+bw3GUKNtpQtZ8EMLQGkWT3z id_ed25519.pub",
|
||||
"name": "jndaned25519",
|
||||
"fingerprint": "6e:95:fc:ae:d5:d1:9c:a0:06:d8:99:98:f4:16:84:f4"
|
||||
},
|
||||
{
|
||||
"id": 44250710,
|
||||
"fingerprint": "9f:0e:25:d8:10:fc:e5:d4:94:38:92:74:8a:81:cd:16",
|
||||
"ssh-key-file": "/.wappler/.ssh/ertfastfiller_rsa.pub",
|
||||
"type": "rsa",
|
||||
"name": "ertfastfiller_rsa"
|
||||
},
|
||||
{
|
||||
"id": 38166791,
|
||||
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDixLL6TG8sd67jEkoHjtgXO1K9ScOHtGyX6n1mTl2CLoMeBE1ZwR6TOU7cjwcJ+crKUZMJfyB99h01qhD3DrBE388cE0NEu/ytUnbnys5ecD/NUiOAHL/ZMxJ7Yn6ceoband1C/Gz1GYA/guU2qMu1KA81jqDFA7ytR/riFoJq3fICuTy1++g6/T0EZqxaxzlM2OJNBn89UAhbAKWCRz7hYFhE53dXxI76rwiOm6Fyn9ksxA9G2zW31Ziy6JDUJVy9mahEzTjU4cJNALf61fblWLlxzTTh6c0Yjq2Ontwdp8xqr1NOERMKNraolXHcy7ml2T0spx9DAt13LtAfDubF\n",
|
||||
"name": "DODriverSignin-wappler-prod",
|
||||
"fingerprint": "f8:b4:24:a1:77:4f:02:4b:97:8a:c4:b1:12:88:4b:59"
|
||||
},
|
||||
{
|
||||
"id": 44250460,
|
||||
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGsEr/uTng6hsmeec9KZNZ/G5QMqynZ3bOpGm6r/FyXz jndan@DESKTOP-N026HO3",
|
||||
"name": "DO_Developer_12_2024",
|
||||
"fingerprint": "f2:60:83:0a:b3:4e:c7:7b:51:d1:a8:28:88:10:1b:07"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
services: {}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"name": "db",
|
||||
"module": "dbconnector",
|
||||
"action": "connect",
|
||||
"options": {
|
||||
"client": "sqlite3",
|
||||
"connection": {
|
||||
"filename": "/public/ERTSQlite.db"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"direct": true,
|
||||
"type": "sqlite3",
|
||||
"connection": {
|
||||
"filename": "/public/ERTSQlite.db"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
services:
|
||||
web:
|
||||
ports:
|
||||
- '80:3000'
|
||||
restart: 'always'
|
||||
stdin_open: true
|
||||
tty: true
|
||||
logging:
|
||||
options:
|
||||
max-file: '5'
|
||||
max-size: '10m'
|
||||
build:
|
||||
context: '../../../'
|
||||
dockerfile: '.wappler/targets/DO-ertfastfiller-sfo3/web/Dockerfile'
|
||||
volumes:
|
||||
- 'user_uploads:/opt/node_app/uploads:rw'
|
||||
volumes:
|
||||
user_uploads: ~
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
FROM node:lts-alpine
|
||||
|
||||
ARG NODE_ENV=production
|
||||
ENV NODE_ENV $NODE_ENV
|
||||
|
||||
ARG PORT=3000
|
||||
ENV PORT $PORT
|
||||
EXPOSE $PORT
|
||||
|
||||
RUN mkdir /opt/node_app
|
||||
ENV PATH /opt/node_app/node_modules/.bin:$PATH
|
||||
|
||||
WORKDIR /opt/node_app
|
||||
|
||||
COPY package.json ./
|
||||
|
||||
RUN npm install --no-package-lock
|
||||
|
||||
COPY . .
|
||||
|
||||
CMD [ "node", "./index.js" ]
|
||||
|
|
@ -1,16 +1,11 @@
|
|||
{
|
||||
"name": "DB",
|
||||
"name": "db",
|
||||
"module": "dbconnector",
|
||||
"action": "connect",
|
||||
"options": {
|
||||
"client": "sqlite3",
|
||||
"connection": {
|
||||
"filename": "/public/ERTSQlite.db"
|
||||
},
|
||||
"tz": "utc",
|
||||
"meta": {}
|
||||
},
|
||||
"fileName": "DB.json",
|
||||
"actionFilePath": "file:///Z:/temp/ERTFastFiller/app/modules/connections/DB.json",
|
||||
"serverType": "node"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "s3",
|
||||
"module": "s3",
|
||||
"action": "provider",
|
||||
"options": {
|
||||
"service": "digitalocean",
|
||||
"endpoint": "sfo3.digitaloceanspaces.com",
|
||||
"secretAccessKey": "lMI2BSf8dS+ZmWkyvsq9gTTjScr1SLEsd0OpsZZLAkc",
|
||||
"accessKeyId": "DO00RXH3C276N9Y9PQBG",
|
||||
"forcePathStyle": true
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
{
|
||||
"direct": true,
|
||||
"type": "sqlite3",
|
||||
"connection": {
|
||||
"filename": "/public/ERTSQlite.db"
|
||||
},
|
||||
"direct": true,
|
||||
"schema": {
|
||||
"tables": {
|
||||
"_da_old_20241029": {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"exec": {}
|
||||
}
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"name": "listBuckets",
|
||||
"module": "s3",
|
||||
"action": "listBuckets",
|
||||
"options": {
|
||||
"provider": "s3"
|
||||
},
|
||||
"outputType": "object",
|
||||
"meta": [
|
||||
{
|
||||
"name": "Buckets",
|
||||
"type": "array",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Name",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "CreationDate",
|
||||
"type": "date"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Owner",
|
||||
"type": "object",
|
||||
"sub": [
|
||||
{
|
||||
"name": "DisplayName",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"name": "ID",
|
||||
"type": "text"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"output": true
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"exec": {}
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"exec": {}
|
||||
}
|
||||
|
|
@ -45,6 +45,11 @@
|
|||
"path": "/da_index1",
|
||||
"page": "da_index1",
|
||||
"layout": "main"
|
||||
},
|
||||
{
|
||||
"path": "/buckets",
|
||||
"page": "buckets",
|
||||
"layout": "main"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,16 +1,11 @@
|
|||
{
|
||||
"name": "DB",
|
||||
"name": "db",
|
||||
"module": "dbconnector",
|
||||
"action": "connect",
|
||||
"options": {
|
||||
"client": "sqlite3",
|
||||
"connection": {
|
||||
"filename": "/public/ERTSQlite.db"
|
||||
},
|
||||
"tz": "utc",
|
||||
"meta": {}
|
||||
},
|
||||
"fileName": "DB.json",
|
||||
"actionFilePath": "file:///Z:/temp/ERTFastFiller/app/modules/connections/DB.json",
|
||||
"serverType": "node"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "s3",
|
||||
"module": "s3",
|
||||
"action": "provider",
|
||||
"options": {
|
||||
"service": "digitalocean",
|
||||
"endpoint": "sfo3.digitaloceanspaces.com",
|
||||
"secretAccessKey": "lMI2BSf8dS+ZmWkyvsq9gTTjScr1SLEsd0OpsZZLAkc",
|
||||
"accessKeyId": "DO00RXH3C276N9Y9PQBG",
|
||||
"forcePathStyle": true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,250 @@
|
|||
{
|
||||
// onesignal web push notification
|
||||
// not all properties added yet
|
||||
//v1.0.0
|
||||
type: 'onesignal_onesignal_create_push_notification_onesignal_onesignal_create_push_notification',
|
||||
module : 'onesignal_create_push_notification',
|
||||
action : 'onesignal_create_push_notification',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Web Push',
|
||||
icon : 'fas fa-solid fa-bullhorn comp_general',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [
|
||||
{name:'id', type: 'text'},
|
||||
{name:'external_id', type: 'text'},
|
||||
{name: 'status',type: 'number'} ],
|
||||
|
||||
properties : [
|
||||
{
|
||||
group: 'Message Details',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osp1"
|
||||
},
|
||||
{
|
||||
name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'Application ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{name: 'target_channel',
|
||||
optionName: 'target_channel',
|
||||
title: 'Target Channel',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: 'push'
|
||||
},
|
||||
{name: 'osname',
|
||||
optionName: 'osname',
|
||||
title: 'Internal Name',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: 'mymessage1'
|
||||
},
|
||||
{name: 'segment',
|
||||
optionName: 'segment',
|
||||
title: 'Segment (default "All")',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: 'All'
|
||||
},
|
||||
{name: 'template_id',
|
||||
optionName: 'template_id',
|
||||
title: 'template_id',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{
|
||||
name: "headings",
|
||||
optionName: "headings",
|
||||
key: "var",
|
||||
keyValue: "value",
|
||||
title: "Web Push headings",
|
||||
type: "grid",
|
||||
defaultValue: {},
|
||||
serverDataBindings: true,
|
||||
columns: [
|
||||
{
|
||||
field: "var",
|
||||
caption: "Language",
|
||||
size: "30%",
|
||||
editable: {
|
||||
type: "static"
|
||||
}
|
||||
},
|
||||
{
|
||||
field: "value",
|
||||
caption: "Text",
|
||||
size: "70%",
|
||||
editable: {
|
||||
type: "datapicker"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'os_title_prompt',
|
||||
optionName: 'os_title_prompt',
|
||||
title: 'Title ',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: ' Recommended about 60-80 characters limit'
|
||||
},
|
||||
{
|
||||
name: "bindings",
|
||||
optionName: "bindings",
|
||||
key: "var",
|
||||
keyValue: "value",
|
||||
title: "Web Push Messages",
|
||||
type: "grid",
|
||||
defaultValue: {},
|
||||
serverDataBindings: true,
|
||||
columns: [
|
||||
{
|
||||
field: "var",
|
||||
caption: "Language",
|
||||
size: "30%",
|
||||
editable: {
|
||||
type: "static"
|
||||
}
|
||||
},
|
||||
{
|
||||
field: "value",
|
||||
caption: "Text",
|
||||
size: "70%",
|
||||
editable: {
|
||||
type: "datapicker"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'os_msg_prompt',
|
||||
optionName: 'os_msg_prompt',
|
||||
title: 'Main Image',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: ' Recommended about 150 characters message limit unless email'
|
||||
},
|
||||
{ name: 'include_aliases',
|
||||
optionName: 'include_aliases',
|
||||
title: 'Include Aliases',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Include Aliases <a href="https://documentation.onesignal.com/reference/notification-parameters#include_aliases" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
|
||||
{ name: 'include_subscription_ids',
|
||||
optionName: 'include_subscription_ids',
|
||||
title: 'Include Subscription IDs',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Include Subscription IDs <a href="https://documentation.onesignal.com/reference/notification-parameters#include_subscription_ids" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
|
||||
{ name: 'imsg',
|
||||
optionName: 'imsg',
|
||||
title: 'Filters [ ]',
|
||||
type: 'static',
|
||||
required:false,
|
||||
help: 'Image Settings (will use default if not defined)'
|
||||
},
|
||||
|
||||
{
|
||||
name: 'os_image',
|
||||
optionName: 'os_image',
|
||||
title: 'Main Image',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{
|
||||
name: 'os_image_prompt',
|
||||
optionName: 'os_image_prompt',
|
||||
title: 'Main Image',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: ' Must be full http/https url, Ignored by Safari on Mac'
|
||||
},
|
||||
{
|
||||
name: 'os_icon',
|
||||
optionName: 'os_icon',
|
||||
title: 'Icon Image',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
|
||||
{ name: 'filters',
|
||||
optionName: 'filters',
|
||||
title: 'Filters [ ]',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Filters <a href="https://documentation.onesignal.com/reference/notification-parameters#filters" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{
|
||||
name: 'os_badge',
|
||||
optionName: 'os_badge',
|
||||
title: 'badge',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{
|
||||
name: 'os_badge_prompt',
|
||||
optionName: 'os_badge_prompt',
|
||||
title: 'badge',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: ' png, gif, webp, ico, cur, bmp. NOT jpg. 72x72 or larger'
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
} ,
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/push-notification" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>',
|
||||
} ]} ]
|
||||
}
|
||||
|
|
@ -0,0 +1,166 @@
|
|||
{
|
||||
// onesignal email notification
|
||||
//'v1.0.0'
|
||||
type: 'onesignal_create_email_notification_onesignal_create_email_notification',
|
||||
module : 'onesignal_create_email_notification',
|
||||
action : 'onesignal_create_email_notification',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Email Push',
|
||||
icon : 'fas fa-solid fa-at comp_general',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [
|
||||
{name:'id', type: 'text'},
|
||||
{name:'external_id', type: 'text'},
|
||||
{name: 'status',type: 'number'}
|
||||
],
|
||||
properties : [
|
||||
{
|
||||
group: 'Message Details',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osp1"
|
||||
},
|
||||
{
|
||||
name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'Application ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{name: 'osname',
|
||||
optionName: 'osname',
|
||||
title: 'Internal Name',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{name: 'email_subject',
|
||||
optionName: 'email_subject',
|
||||
title: 'Email Subject',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{name: 'email_body',
|
||||
optionName: 'email_body',
|
||||
title: 'Email Body',
|
||||
type: 'textarea',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{name: 'email_from_name',
|
||||
optionName: 'email_from_name',
|
||||
title: 'Email from name',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{name: 'email_from_address',
|
||||
optionName: 'email_from_address',
|
||||
title: 'Email from address',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{name: 'email_reply_to_address',
|
||||
optionName: 'email_reply_to_address',
|
||||
title: 'Email reply to address',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{name: 'email_preheader',
|
||||
optionName: 'email_preheader',
|
||||
title: 'Email Preheader',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{ name: 'disable_email_click_tracking',
|
||||
optionName: 'disable_email_click_tracking',
|
||||
title: 'Disable eMail click tracking',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{name: 'template_id',
|
||||
optionName: 'template_id',
|
||||
title: 'Optional Template_id',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{name: 'segment',
|
||||
optionName: 'segment',
|
||||
title: 'Segments',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: 'Default "All Email Subscriptions"'
|
||||
},
|
||||
{name: 'filter',
|
||||
optionName: 'filter',
|
||||
title: 'filter',
|
||||
type: 'textarea',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{name: 'include_aliases',
|
||||
optionName: 'include_aliases',
|
||||
title: 'Include Aliases',
|
||||
type: 'textarea',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{ name: 'include_unsubscribed',
|
||||
optionName: 'include_unsubscribed',
|
||||
title: 'Include Unsubscribed',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{name: 'include_email_tokens',
|
||||
optionName: 'include_email_tokens',
|
||||
title: 'include email tokens',
|
||||
type: 'textarea',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/email" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>',
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
|
||||
{
|
||||
// onesignal sms notification
|
||||
// not all properties added yet
|
||||
type: 'onesignal_create_sms_notification_onesignal_create_sms_notification',
|
||||
module : 'onesignal_create_sms_notification',
|
||||
action : 'onesignal_create_sms_notification',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal SMS Push',
|
||||
icon : 'fas fa-solid fa-sms comp_general',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [
|
||||
{name:'id', type: 'text'},
|
||||
{name:'external_id', type: 'text'},
|
||||
{name: 'status',type: 'number'}
|
||||
],
|
||||
usedModules : {}
|
||||
|
||||
properties : [
|
||||
{
|
||||
group: 'Message Details',
|
||||
variables: [
|
||||
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osp1"
|
||||
},
|
||||
{
|
||||
name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'Application ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{
|
||||
name: "contents",
|
||||
optionName: "contents",
|
||||
key: "var",
|
||||
keyValue: "value",
|
||||
title: "SMS Push Messages",
|
||||
type: "grid",
|
||||
defaultValue: {},
|
||||
serverDataBindings: true,
|
||||
columns: [
|
||||
{
|
||||
field: "var",
|
||||
caption: "Language",
|
||||
size: "30%",
|
||||
editable: {
|
||||
type: "static"
|
||||
}
|
||||
},
|
||||
{
|
||||
field: "value",
|
||||
caption: "Text",
|
||||
size: "70%",
|
||||
editable: {
|
||||
type: "datapicker"
|
||||
}}]
|
||||
},
|
||||
{name: 'sms_from',
|
||||
optionName: 'sms_from',
|
||||
title: 'SMS number from',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{name: 'osname',
|
||||
optionName: 'osname',
|
||||
title: 'Internal Name',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{name: 'segment',
|
||||
optionName: 'segment',
|
||||
title: 'Segments',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{name: 'filter',
|
||||
optionName: 'filter',
|
||||
title: 'filter',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{name: 'include_phone_numbers',
|
||||
optionName: 'include_phone_numbers',
|
||||
title: 'Include phone numbers',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
} ,
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/sms" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>',
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
type: 'onesignal_view_segments_onesignal_view_segments',
|
||||
module : 'onesignal_view_segments',
|
||||
action : 'onesignal_view_segments',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon: 'Onesignal View Segments',
|
||||
title : 'Onesignal View Segments',
|
||||
icon : 'far fa-solid fa-chart-pie comp-settings',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [
|
||||
{type: "number",name: "total_count"},
|
||||
{type: "number",name: "offset"},
|
||||
{type: "number",name: "limit"},
|
||||
{type: "array",name: "segments","sub": [
|
||||
{type: "text",name: "id" },
|
||||
{type: "text",name: "name" },
|
||||
{type: "text",name: "created_at" },
|
||||
{type: "text",name: "updated_at" },
|
||||
{type: "text",name: "app_id" },
|
||||
{typ": "boolean",name: "read_only" },
|
||||
{type: "boolean",name: "is_active" }
|
||||
]
|
||||
},
|
||||
{name: 'status', type: 'number'}
|
||||
],
|
||||
usedModules : {}
|
||||
properties : [
|
||||
{
|
||||
group: 'Settings',
|
||||
variables: [
|
||||
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "vt1"
|
||||
},
|
||||
{
|
||||
name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'Application ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'You App ID'
|
||||
},
|
||||
{
|
||||
name: 'limit',
|
||||
optionName: 'limit',
|
||||
title: 'Limit (max 300)',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Limit max and default 50'
|
||||
},
|
||||
{
|
||||
name: 'offset',
|
||||
optionName: 'offset',
|
||||
title: 'Offset',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Offset'
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/view-segments" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>'
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
{
|
||||
type: 'onesignal_create_segment_onesignal_create_segment',
|
||||
module : 'onesignal_create_segment',
|
||||
action : 'onesignal_create_segment',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Create Segment (BROKEN)',
|
||||
icon : 'fas fa-solid fa-pizza-slice comp-settings',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [
|
||||
{name: 'status',type: 'number'}
|
||||
],
|
||||
|
||||
properties : [
|
||||
{
|
||||
group: 'App Settings',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "csg1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App Id',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'App ID'
|
||||
},
|
||||
{ name: 'segname',
|
||||
optionName: 'segname',
|
||||
title: 'Segment Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Segment Name'
|
||||
},
|
||||
{ name: 'seguuid',
|
||||
optionName: 'seguuid',
|
||||
title: 'Optional UUID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Optional UUID'
|
||||
},
|
||||
{ name: 'filter',
|
||||
optionName: 'filter',
|
||||
title: 'Filters',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Filters'
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/create-subscription" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>',
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
type: 'onesignal_delete_segment_onesignal_delete_segment',
|
||||
module : 'onesignal_delete_segment',
|
||||
action : 'onesignal_delete_segment',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Delete Segment',
|
||||
icon : 'fas fa-solid fa-times-circle comp-settings',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [
|
||||
{"name": "success","type": "text"},
|
||||
{"name": "status", "type": "number"}
|
||||
],
|
||||
properties : [
|
||||
{
|
||||
group: 'App Settings',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "csg1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App Id',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'App ID'
|
||||
},
|
||||
{ name: 'segment_id',
|
||||
optionName: 'segment_id',
|
||||
title: 'Segment id',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Segment ID'
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/delete-segments" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>',
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,537 @@
|
|||
|
||||
{
|
||||
type: 'onesignal_getnotification_onesignal_getnotification',
|
||||
module : 'onesignal_getnotification',
|
||||
action : 'onesignal_getnotification',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Get Notification by ID',
|
||||
icon : 'far fa-solid fa-bell comp_general',
|
||||
serverModel : ['node'],
|
||||
|
||||
dataPickObject: true,
|
||||
|
||||
dataScheme: [
|
||||
{
|
||||
"type": "text",
|
||||
"name": "adm_big_picture"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "adm_group"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "adm_group_message"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "adm_large_icon"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "adm_small_icon"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "adm_sound"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "spoken_text"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "alexa_ssml"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "alexa_display_title"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "amazon_background_data"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "android_accent_color"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "android_group"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "android_group_message"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "android_led_color"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "android_sound"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "android_visibility"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "app_id"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "big_picture"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "buttons"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "canceled"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "chrome_big_picture"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "chrome_icon"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "chrome_web_icon"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "chrome_web_image"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "chrome_web_badge"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "content_available"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"name": "contents",
|
||||
"sub": [
|
||||
{
|
||||
"type": "text",
|
||||
"name": "en"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "converted"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"name": "data"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "delayed_option"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "delivery_time_of_day"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "errored"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"name": "excluded_segments"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "failed"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "firefox_icon"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "global_image"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"name": "headings",
|
||||
"sub": [
|
||||
{
|
||||
"type": "text",
|
||||
"name": "en"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "id"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "include_player_ids"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "include_external_user_ids"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "include_aliases"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"name": "included_segments",
|
||||
"sub": [
|
||||
{
|
||||
"type": "text",
|
||||
"name": "$value"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "thread_id"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "ios_badgeCount"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "ios_badgeType"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "ios_category"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "ios_interruption_level"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "ios_relevance_score"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "ios_sound"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"name": "apns_alert"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "target_content_identifier"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "isAdm"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "isAndroid"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "isChrome"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "isChromeWeb"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "isAlexa"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "isFirefox"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "isIos"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "isSafari"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "isWP"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "isWP_WNS"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "isEdge"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "isHuawei"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "isSMS"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "large_icon"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "priority"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "queued_at"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "remaining"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "send_after"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "completed_at"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "small_icon"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "successful"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "received"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "tags"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "filters"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "template_id"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "ttl"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "url"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "web_url"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "app_url"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "web_buttons"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "web_push_topic"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "wp_sound"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "wp_wns_sound"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"name": "platform_delivery_stats"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "ios_attachments"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "huawei_sound"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "huawei_led_color"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "huawei_accent_color"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "huawei_visibility"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "huawei_group"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "huawei_group_message"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "huawei_channel_id"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "huawei_existing_channel_id"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "huawei_small_icon"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "huawei_large_icon"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "huawei_big_picture"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "huawei_msg_type"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "throttle_rate_per_minute"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "fcap_group_ids"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "fcap_status"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "sms_from"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "sms_media_urls"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "subtitle"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "name"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "email_click_tracking_disabled"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "isEmail"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "email_subject"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "email_from_name"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "email_from_address"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "email_preheader"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "email_reply_to_address"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "include_unsubscribed"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "huawei_category"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "huawei_bi_tag"
|
||||
},
|
||||
{name: 'status',type: 'number'}
|
||||
],
|
||||
usedModules : {
|
||||
|
||||
}
|
||||
properties : [
|
||||
{
|
||||
group: 'Get Notification by ID',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osn1"
|
||||
},
|
||||
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App Id',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'App ID, if left blank default from ENV will be used'
|
||||
},
|
||||
|
||||
{ name: 'notification_id',
|
||||
optionName: 'notification_id',
|
||||
title: 'Notification ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Notification ID'
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,229 @@
|
|||
|
||||
|
||||
{
|
||||
type: 'onesignal_getnotifications_onesignal_getnotifications',
|
||||
module : 'onesignal_getnotifications',
|
||||
action : 'onesignal_getnotifications',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Get Notifications List*',
|
||||
icon : 'fas fa-solid fa-list comp_general',
|
||||
serverModel : ['node'],
|
||||
|
||||
dataPickObject: true,
|
||||
|
||||
dataScheme: [
|
||||
|
||||
{"type": "number","name": "total_count"},
|
||||
{"type": "number","name": "offset" },
|
||||
{"type": "number","name": "limit"},
|
||||
{ "type": "array", "name": "notifications",
|
||||
"sub": [
|
||||
{"type": "text","name": "app_id"},
|
||||
{"type": "text","name": "chrome_web_icon"},
|
||||
{"type": "text","name": "ios_interruption_level"},
|
||||
{"type": "number","name": "ios_relevance_score"},
|
||||
{"type": "text","name": "name"},
|
||||
{"type": "object","name": "contents",
|
||||
"sub": [
|
||||
{"type": "text", "name": "en"}
|
||||
]
|
||||
},
|
||||
{"type": "number","name": "converted"},
|
||||
{"type": "object","name": "data",
|
||||
"sub": [
|
||||
{"type": "text", "name": "your_data_key"}
|
||||
|
||||
]
|
||||
},
|
||||
{"type": "number",
|
||||
"name": "errored"
|
||||
},
|
||||
{"type": "array",
|
||||
"name": "excluded_segments",
|
||||
"sub": [
|
||||
{"type": "text",
|
||||
"name": "$value"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "failed"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"name": "headings",
|
||||
"sub": [
|
||||
{
|
||||
"type": "text",
|
||||
"name": "en"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "id"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"name": "included_segments",
|
||||
"sub": [
|
||||
{
|
||||
"type": "text",
|
||||
"name": "$value"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "queued_at"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "send_after"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "completed_at"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "successful"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "received"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "template_id"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "ttl"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "url"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "web_url"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"name": "app_url"
|
||||
},
|
||||
{
|
||||
"type": "key_array",
|
||||
"name": "platform_delivery_stats",
|
||||
"sub": [
|
||||
{
|
||||
"type": "number",
|
||||
"name": "successful"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "failed"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "errored"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "converted"
|
||||
},
|
||||
{
|
||||
"type": "number",
|
||||
"name": "received"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"name": "ios_attachments",
|
||||
"sub": [
|
||||
{
|
||||
"type": "text",
|
||||
"name": "id"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
{"name": "status", "type": "number"}
|
||||
|
||||
],
|
||||
usedModules : {
|
||||
node: {
|
||||
|
||||
}
|
||||
}
|
||||
properties : [
|
||||
{
|
||||
group: 'Get Notifications',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osn1"
|
||||
},
|
||||
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App Id',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
},
|
||||
|
||||
{ name: 'limit',
|
||||
optionName: 'limit',
|
||||
title: 'Record Limit (50 max)',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
},
|
||||
|
||||
{ name: 'offset',
|
||||
optionName: 'offset',
|
||||
title: 'Page Offset',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''},
|
||||
|
||||
|
||||
|
||||
{ name: 'kind'
|
||||
optionName: 'kind',
|
||||
title: 'Notiication kind (blank, 0,1,3)',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
},
|
||||
{ name: 'template_id'
|
||||
optionName: 'template_id',
|
||||
title: 'Filter by Template ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
type: 'onesignal_onesignal_delete_notification_onesignal_onesignal_delete_notification',
|
||||
module : 'onesignal_delete_notification',
|
||||
action : 'onesignal_delete_notification',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Delete Notification',
|
||||
icon : 'fas fa-solid fa-ban comp_general',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [
|
||||
{name:'success', type: 'text'},
|
||||
{name: 'status', type: 'number'}
|
||||
],
|
||||
|
||||
properties : [
|
||||
{
|
||||
group: 'Delete Notification',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osc1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App ID',
|
||||
type: 'text',
|
||||
serverDataBindings: true,
|
||||
required: true,
|
||||
defaultValue: ''
|
||||
|
||||
},
|
||||
{ name: 'notificationid',
|
||||
optionName: 'notificationid',
|
||||
title: 'Notification ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
|
||||
},
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/delete-notification" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>',
|
||||
}
|
||||
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
|
||||
{
|
||||
type: 'onesignal_getoutcomes_onesignal_getoutcomes',
|
||||
module : 'onesignal_getoutcomes',
|
||||
action : 'onesignal_getoutcomes',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Get Notification Outcomes',
|
||||
icon : 'fas fa-solid fa-chart-pie comp_general',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [
|
||||
{name:'successful', type: 'text'},
|
||||
{name:'failed', type: 'text'},
|
||||
{name:'errored', type: 'text'},
|
||||
{name:'converted', type: 'text'},
|
||||
{name:'received', type: 'text'},
|
||||
{name: 'status',type: 'number'}
|
||||
],
|
||||
|
||||
properties : [
|
||||
{
|
||||
group: 'Get Notification and outcomes',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osg1"
|
||||
},
|
||||
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
|
||||
},
|
||||
{ name: 'outcome_names',
|
||||
optionName: 'outcome_names',
|
||||
title: 'Outcome Names',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
|
||||
},
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/view-outcomes" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>',
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
type: 'onesignal_export_audience_activity_csv_onesignal_export_audience_activity_csv',
|
||||
module : 'onesignal_export_audience_activity_csv',
|
||||
action : 'onesignal_export_audience_activity_csv',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp-general',
|
||||
title : 'Onesignal Export Audience Activity (csv)',
|
||||
icon : 'fas fa-solid fa-file-csv comp-general',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [
|
||||
{type: "text",name: "csv_file_url"} ,
|
||||
{name: 'status', type: 'number'}
|
||||
],
|
||||
properties : [
|
||||
{
|
||||
group: 'Onesignal Settings',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osc1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Your App ID'
|
||||
},
|
||||
{ name: 'notification_id',
|
||||
optionName: 'notification_id',
|
||||
title: 'Notification ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Notification ID'
|
||||
},
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/export-csv-of-events" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>'
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
type: 'onesignal_notification_history_onesignal_notification_history',
|
||||
module : 'onesignal_notification_history',
|
||||
action : 'onesignal_notification_history',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Notification History (clicked) (UNTESTED)',
|
||||
icon : 'fas fa-solid fa-history comp_general',
|
||||
serverModel : ['node'],
|
||||
|
||||
dataPickObject: true,
|
||||
|
||||
dataScheme: [
|
||||
{name: 'status', type: 'number'}
|
||||
],
|
||||
properties : [
|
||||
{
|
||||
group: 'Onesignal Options',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osn1"
|
||||
},
|
||||
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App Id',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'App ID, if left blank default from ENV will be used'
|
||||
},
|
||||
|
||||
{ name: 'notification_id',
|
||||
optionName: 'notification_id',
|
||||
title: 'Notification ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Notification ID'
|
||||
},
|
||||
{ name: 'email',
|
||||
optionName: 'email',
|
||||
title: 'Email to receive report',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Email to receive report'
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/notification-history" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>'
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
type: 'onesignal_notification_history_sent_onesignal_notification_history_sent',
|
||||
module : 'onesignal_notification_history_sent',
|
||||
action : 'onesignal_notification_history_sent',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Notification History (sent) (UNTESTED)',
|
||||
icon : 'fas fa-solid fa-history comp_general',
|
||||
serverModel : ['node'],
|
||||
|
||||
dataPickObject: true,
|
||||
|
||||
dataScheme: [
|
||||
{name: 'status', type: 'number'}
|
||||
],
|
||||
properties : [
|
||||
{
|
||||
group: 'Onesignal Options',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osn1"
|
||||
},
|
||||
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App Id',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'App ID, if left blank default from ENV will be used'
|
||||
},
|
||||
|
||||
{ name: 'notification_id',
|
||||
optionName: 'notification_id',
|
||||
title: 'Notification ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Notification ID'
|
||||
},
|
||||
{ name: 'email',
|
||||
optionName: 'email',
|
||||
title: 'Email to receive report',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Email to receive report'
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/notification-history" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>'
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
// JavaScript Document
|
||||
exports.onesignal_copy_template_to_app = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
const template_id = this.parseRequired(options.template_id, '*', 'Template ID not specified')
|
||||
console.log('Template_id: ' + options.template_id + " => " + template_id)
|
||||
|
||||
const target_appid = this.parseRequired(options.target_appid, '*', 'Target APP ID not specified')
|
||||
console.log('target_appid: ' + options.target_appid + " => " + target_appid)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/templates/${template_id}/copy_to_app?app_id=${target_appid}`
|
||||
console.log(url)
|
||||
const os_options = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
accept: 'application/json',
|
||||
'content-type': 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_AUTH_KEY}`
|
||||
}
|
||||
};
|
||||
console.log(os_options)
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
exports.onesignal_create_alias_by_subscription = async function (options) {
|
||||
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
const subscription_id = this.parseRequired(options.subscription_id, '*', 'No Subscription ID specified')
|
||||
console.log('Subscription ID: ' + options.subscription_id + " => " + subscription_id)
|
||||
|
||||
const alias_label = this.parseRequired(options.alias_label.trim(), '*', 'No Alias Label specified')
|
||||
console.log(options.alias_label + " => " + alias_label)
|
||||
|
||||
const alias_id = this.parseOptional(options.alias_id, '*', 'No Alias ID specified')
|
||||
console.log(options.alias_id + " => " + alias_id)
|
||||
|
||||
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}/subscriptions/${subscription_id}/user/identity`;
|
||||
console.log('URL: ' + url)
|
||||
const os_options = {
|
||||
method: 'PATCH',
|
||||
headers: { accept: 'application/json', 'content-type': 'application/json', Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}` },
|
||||
body: JSON.stringify({
|
||||
identity: {
|
||||
alias_label: alias_label,
|
||||
alias_id: alias_id
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
//V1.0.0
|
||||
//include aliases notworking if blank
|
||||
exports.onesignal_create_email_notification = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
// get message internal name
|
||||
const osname = this.parseOptional(options.osname, '*', 'message_auto')
|
||||
console.log('Name: ' + options.osname + " => " + osname)
|
||||
|
||||
// get email subject
|
||||
const email_subject = this.parseOptional(options.email_subject, '*', ' ')
|
||||
console.log('Subject: ' + options.email_subject + " => " + email_subject)
|
||||
|
||||
const email_body = this.parseRequired(options.email_body, '*', 'No email_body specified ')
|
||||
console.log('Body: ' + options.email_body + " => " + email_body)
|
||||
|
||||
|
||||
const email_from_name = this.parseRequired(options.email_from_name, '*', 'No email_body specified ')
|
||||
console.log('From: ' + options.email_from_name + " => " + email_from_name)
|
||||
|
||||
const email_from_address = this.parseRequired(options.email_from_address, '*', 'No email_from_address specified')
|
||||
console.log('From Address: ' + options.email_from_address + " => " + email_from_address)
|
||||
|
||||
const email_reply_to_address = this.parseOptional(options.email_reply_to_address, '*', null)
|
||||
console.log('Reply to: ' + options.email_reply_to_address + " => " + email_reply_to_address)
|
||||
|
||||
const email_preheader = this.parseOptional(options.email_preheader, '*', null)
|
||||
console.log('Preheader: ' + options.email_preheader + " => " + email_preheader)
|
||||
|
||||
const include_email_tokens = this.parseOptional(options.include_email_tokens, '*', null)
|
||||
console.log('include_email_tokens: ' + options.include_email_tokens + " => " + include_email_tokens)
|
||||
|
||||
const segment = this.parseOptional(options.segment, '*', 'All Email Subscriptions')
|
||||
console.log("Segment: " + options.segment + " => " + segment)
|
||||
|
||||
const filter = this.parseOptional(options.filter, '*', null)
|
||||
console.log("Filter: " + options.filter + " => " + filter)
|
||||
|
||||
const include_aliases = this.parseOptional(options.include_aliases, '*', null)
|
||||
console.log("include_aliases: " + options.include_aliases + " => " + include_aliases)
|
||||
|
||||
const template_id = this.parseOptional(options.template_id, '*', null)
|
||||
console.log("Template ID: " + template_id + " => " + template_id)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = 'https://api.onesignal.com/notifications?c=email';
|
||||
const os_options = {
|
||||
method: 'POST',
|
||||
headers: { accept: 'application/json', 'content-type': 'application/json', Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}` },
|
||||
body: JSON.stringify({
|
||||
app_id: appid,
|
||||
email_subject: email_subject,
|
||||
email_body: email_body,
|
||||
template_id: template_id,
|
||||
name: osname,
|
||||
email_from_name: email_from_name,
|
||||
email_from_address: email_from_address,
|
||||
email_reply_to_address: email_reply_to_address,
|
||||
disable_email_click_tracking: options.disable_email_click_tracking,
|
||||
include_unsubscribed: options.include_unsubscribed,
|
||||
email_preheader: email_preheader,
|
||||
//include_aliases: include_aliases,
|
||||
included_segments: [segment],
|
||||
filters: filter,
|
||||
include_email_tokens: [include_email_tokens]
|
||||
}
|
||||
)
|
||||
};
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,109 @@
|
|||
// JavaScript Document
|
||||
exports.onesignal_create_push_notification = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
// get message internal name
|
||||
const osname = this.parseOptional(options.osname, '*', 'message_auto')
|
||||
console.log(options.osname + " => " + osname)
|
||||
// target_channel
|
||||
const target_channel = this.parseOptional(options.target_channel, '*', 'push')
|
||||
console.log(options.target_channel + " => " + target_channel)
|
||||
// get language
|
||||
const oslang = this.parseOptional(options.oslang, '*', 'en')
|
||||
console.log(options.oslang + " => " + oslang)
|
||||
|
||||
const segment = this.parseOptional(options.segment, '*', 'All')
|
||||
console.log("Segment: " + options.segment + " => " + segment)
|
||||
// gte message
|
||||
//const osmessage = this.parseOptional(options.os_message, '*', 'Hello world')
|
||||
//console.log(options.os_message + " => " + osmessage)
|
||||
|
||||
const osimage = this.parseOptional(options.os_image, '*', null)
|
||||
console.log("osimage: " + options.os_image + " => " + osimage)
|
||||
|
||||
const osicon = this.parseOptional(options.os_icon, '*', null)
|
||||
console.log("osicon: " + options.os_icon + " => " + osicon)
|
||||
|
||||
const osbadge = this.parseOptional(options.os_badge, '*', null)
|
||||
console.log("osbadge: " + options.os_badge + " => " + osbadge)
|
||||
|
||||
const ostitle = this.parseOptional(options.os_title, '*', null)
|
||||
console.log(options.os_title + " => " + ostitle)
|
||||
|
||||
const messages = this.parseRequired(options.bindings, '*', 'Bindings Required')
|
||||
console.log(options.bindings + " => " + messages)
|
||||
|
||||
const headings = this.parseRequired(options.headings, '*', 'Headings Required')
|
||||
console.log(options.headings + " => " + headings)
|
||||
|
||||
const template_id = this.parseOptional(options.template_id, '*', null)
|
||||
console.log(options.template_id + " => " + template_id)
|
||||
|
||||
const big_picture = this.parseOptional(options.big_picture, '*', null)
|
||||
console.log(options.big_picture + " => " + big_picture)
|
||||
|
||||
const turl = this.parseOptional(options.url, '*', null)
|
||||
console.log(options.url + " => " + turl)
|
||||
|
||||
//const data = this.parseOptional(options.data, '*', null)
|
||||
//console.log(options.data + " => " + data)
|
||||
|
||||
const filters = this.parseOptional(options.filters, '*', {})
|
||||
console.log(options.filters + " => " + filters)
|
||||
|
||||
//const include_aliases = this.parseOptional(options.include_aliases, '*', '{ external_id: [] }')
|
||||
//console.log(options.include_aliasess + " => " + include_aliases)
|
||||
|
||||
const include_subscription_ids = this.parseOptional(options.include_subscription_ids, '*', null)
|
||||
console.log(options.include_subscription_ids + " => " + include_subscription_ids)
|
||||
|
||||
const send_after = this.parseOptional(options.send_after, '*', null)
|
||||
console.log(options.send_after + " => " + send_after)
|
||||
|
||||
const delayed_option = this.parseOptional(options.delayed_option, '*', null)
|
||||
console.log(options.delayed_option + " => " + delayed_option)
|
||||
|
||||
const delivery_time_of_day = this.parseOptional(options.delivery_time_of_day, '*', null)
|
||||
console.log(options.delivery_time_of_day + " => " + delivery_time_of_day)
|
||||
|
||||
const throttle_rate_per_minute = this.parseOptional(options.throttle_rate_per_minute, '*', null)
|
||||
console.log(options.throttle_rate_per_minute + " => " + throttle_rate_per_minute)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = 'https://api.onesignal.com/notifications?c=push';
|
||||
const os_options = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
accept: 'application/json', 'content-type': 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`
|
||||
},
|
||||
body: JSON.stringify(
|
||||
Object.fromEntries(
|
||||
Object.entries({
|
||||
contents: messages,
|
||||
headings: headings, app_id: appid,
|
||||
included_segments: [segment],
|
||||
target_channel: target_channel,
|
||||
big_picture: osimage,
|
||||
chrome_big_picture: osimage,
|
||||
chrome_web_image: osimage,
|
||||
chrome_icon: osimage,
|
||||
chrome_web_icon: osimage,
|
||||
firefox_icon: osimage
|
||||
|
||||
}).filter(([_, v]) => v != null)
|
||||
))
|
||||
};
|
||||
console.log(os_options)
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
// JavaScript Document
|
||||
// throwing 500 error
|
||||
exports.onesignal_create_segment = async function (options) {
|
||||
const { v4: uuidv4 } = require("uuid");
|
||||
|
||||
const uuid = uuidv4();
|
||||
//console.log(`UUID: ${uuid}`);
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID);
|
||||
console.log(options.appid + " => " + appid);
|
||||
|
||||
const segname = this.parseRequired(options.segname, '*', 'No segment name specified');
|
||||
console.log(options.segname + " => " + segname);
|
||||
|
||||
const filter = this.parseOptional(options.filter, '*', null);
|
||||
console.log(options.filter + " => " + filter);
|
||||
|
||||
const seguuid = this.parseOptional(options.seguuid, '*', uuid);
|
||||
console.log("seguuid: " + options.seguuid + " => " + seguuid);
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}/segments`;
|
||||
const os_options = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
accept: 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`,
|
||||
'Content-Type': 'application/json; charset=utf-8'
|
||||
},
|
||||
body: JSON.stringify({ name: segname, filters: filter })
|
||||
};
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
// JavaScript Document
|
||||
//V1.0.0
|
||||
exports.onesignal_create_sms_notification = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
const contents = this.parseRequired(options.contents, '*', 'Bindings Required')
|
||||
console.log(options.contents + " => " + contents)
|
||||
|
||||
const sms_from = this.parseOptional(options.sms_from, '*', process.env.ONESIGNAL_SMS_DEFAULT)
|
||||
console.log(options.sms_from + " => " + sms_from)
|
||||
|
||||
// get message internal name
|
||||
const osname = this.parseOptional(options.osname, '*', 'osname')
|
||||
console.log('Name: ' + options.osname + " => " + osname)
|
||||
|
||||
const segment = this.parseOptional(options.segment, '*', 'All')
|
||||
console.log("Segment: " + options.segment + " => " + segment)
|
||||
|
||||
const filter = this.parseOptional(options.filter, '*', null)
|
||||
console.log("Filter: " + options.filter + " => " + filter)
|
||||
|
||||
const include_phone_numbers = this.parseOptional(options.include_phone_numbers, '*', null)
|
||||
console.log("include_phone_numbers: " + options.include_phone_numbers + " => " + include_phone_numbers)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = 'https://api.onesignal.com/notifications?c=sms';
|
||||
const os_options = {
|
||||
method: 'POST',
|
||||
headers: { accept: 'application/json', 'content-type': 'application/json', Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}` },
|
||||
body: JSON.stringify({
|
||||
contents: contents,
|
||||
app_id: appid,
|
||||
included_segments: [segment],
|
||||
target_channel: 'sms',
|
||||
sms_from: sms_from,
|
||||
name: osname,
|
||||
include_phone_numbers: [include_phone_numbers],
|
||||
filters: filter
|
||||
}
|
||||
)
|
||||
};
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
// JavaScript Document
|
||||
//v1.0.0
|
||||
// schema missing in response?
|
||||
exports.onesignal_create_subscription = async function (options) {
|
||||
// get appid parsed as options.appid, throw error is missing
|
||||
const appid = this.parseRequired(options.appid, '*', 'No app ID entered')
|
||||
// log before and after vlaues
|
||||
console.log('App id: ' + options.appid + " => " + appid)
|
||||
|
||||
//var subscription_id = this.parseRequired(options.subscription_id, '*', 'Subscription ID not specified')
|
||||
// console.log('Subscription_id: ' + options.subscription_id + " => " + subscription_id)
|
||||
|
||||
var token = this.parseRequired(options.token, '*', 'Token not specified')
|
||||
console.log('Token: ' + options.token + " => " + token)
|
||||
|
||||
var alias_label = this.parseOptional(options.alias_label, '*', null)
|
||||
console.log('alias_label: ' + options.alias_label + " => " + alias_label)
|
||||
|
||||
var alias_id = this.parseOptional(options.alias_id, '*', null)
|
||||
console.log('alias_id: ' + options.alias_id + " => " + alias_id)
|
||||
|
||||
const pushtype = this.parseRequired(options.pushtype, '*', 'No push type specified')
|
||||
console.log('Type: ' + options.pushtype)
|
||||
|
||||
const enabled = this.parseOptional(options.enabled, '*', false)
|
||||
console.log('Enabled: ' + options.enabled + " => " + enabled)
|
||||
|
||||
const notification_types = enabled ? 1 : -99
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}/users/by/${alias_label}/${alias_id}/subscriptions`;
|
||||
const os_options = {
|
||||
method: 'POST',
|
||||
headers: { accept: 'application/json', 'content-type': 'application/json', Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}` },
|
||||
body: JSON.stringify(
|
||||
Object.fromEntries(
|
||||
Object.entries({
|
||||
subscription: {
|
||||
type: pushtype,
|
||||
token: token,
|
||||
alias_label: alias_label,
|
||||
alias_id: alias_id,
|
||||
enabled: enabled,
|
||||
notification_types: notification_types
|
||||
}
|
||||
}).filter(([_, v]) => v != null)
|
||||
))
|
||||
};
|
||||
console.log(os_options)
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
// JavaScript Document
|
||||
// incomplete
|
||||
exports.onesignal_createuser = async function (options) {
|
||||
|
||||
// get appid
|
||||
const appid = this.parseRequired(options.appid, '*', 'No app ID entered')
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
const identity = this.parseRequired(options.identity, '*', 'No identity specified')
|
||||
console.log(options.identity + " => " + identity)
|
||||
|
||||
const pushtype = this.parseOptional(options.pushtype, '*', 'IOSPush')
|
||||
console.log(options.pushtype + " => " + pushtype)
|
||||
|
||||
const token = this.parseOptional(options.token, '*', null)
|
||||
console.log(options.token + " => " + token)
|
||||
|
||||
const tags = this.parseOptional(options.tags, '*', null)
|
||||
console.log(options.tags + " => " + tags)
|
||||
|
||||
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}/users`;
|
||||
const os_options = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
accept: 'application/json', 'content-type': 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`
|
||||
},
|
||||
body: JSON.stringify({
|
||||
properties: { tags: tags },
|
||||
subscriptions: [{
|
||||
type: pushtype,
|
||||
token: token,
|
||||
identity: identity,
|
||||
enabled: options.enable,
|
||||
notification_types: (options.enabled == true ? 1 : -99)
|
||||
}]
|
||||
})
|
||||
};
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
// JavaScript Document
|
||||
// V1.0.0
|
||||
|
||||
exports.onesignal_delete_notification = async function (options) {
|
||||
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
const notificationid = this.parseRequired(options.notificationid, '*', 'No notification ID specified')
|
||||
console.log(options.notificationid + " => " + notificationid)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/notifications/${notificationid}?app_id=${appid}`
|
||||
console.log(url)
|
||||
const os_options = {
|
||||
method: 'DELETE',
|
||||
headers: { accept: 'application/json', Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}` }
|
||||
};
|
||||
console.log(os_options)
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
// JavaScript Document
|
||||
// v1.0.0
|
||||
exports.onesignal_delete_segment = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
const segment_id = this.parseRequired(options.segment_id, '*', 'Segment ID missing')
|
||||
console.log(options.segment_id + " => " + segment_id)
|
||||
const fetch = require('node-fetch')
|
||||
const url = `https://api.onesignal.com/apps/${appid}/segments/${segment_id}`
|
||||
const os_options = {
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
accept: 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`
|
||||
}
|
||||
}
|
||||
console.log(os_options)
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
// JavaScript Document
|
||||
//v1.0.0
|
||||
// may return status 202 as deletion is not always immediate
|
||||
exports.onesignal_delete_subscription = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
const subscription_id = this.parseRequired(options.subscription_id, '*', 'Subscription ID not specified')
|
||||
console.log('Subscription_id: ' + options.subscription_id + " => " + subscription_id)
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}/subscriptions/${subscription_id}`;
|
||||
const os_options = { method: 'DELETE', headers: { accept: 'application/json', Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}` } };
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
// JavaScript Document
|
||||
exports.onesignal_delete_template = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
const template_id = this.parseRequired(options.template_id, '*', 'Template ID not specified')
|
||||
console.log('Template_id: ' + options.template_id + " => " + template_id)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/templates/${template_id}?app=id=${appid}`;
|
||||
const os_options = { method: 'DELETE', headers: { accept: 'application/json', Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}` } };
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
if (!res.ok) {
|
||||
throw new Error(`HTTP error! status: ${res.status}`);
|
||||
}
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
|
||||
// JavaScript Document
|
||||
exports.onesignal_delete_user_alias = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
const alias_id = this.parseRequired(options.alias_id, '*', 'No Alias ID specified')
|
||||
console.log(options.alias_id + " => " + alias_id)
|
||||
|
||||
const alias_label = this.parseRequired(options.alias_label, '*', 'No Alias Label specified')
|
||||
console.log(options.alias_label + " => " + alias_label)
|
||||
|
||||
const alias_label_to_delete = this.parseRequired(options.alias_label_to_delete, '*', 'No Alias Label to delete specified')
|
||||
console.log(options.alias_label_to_delete + " => " + alias_label_to_delete)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}/users/by/${alias_label}/${alias_id}/identity/${alias_label_to_delete}`;
|
||||
const os_options = {
|
||||
method: 'DELETE', headers: {
|
||||
accept: 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`
|
||||
}
|
||||
};
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
// JavaScript Document
|
||||
//V1.0.0
|
||||
exports.onesignal_deleteuser = async function (options) {
|
||||
|
||||
// get appid
|
||||
const appid = this.parseRequired(options.appid, '*', 'No app ID entered')
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
let aliasLabel = this.parseOptional(options.alias_label, '*', '')
|
||||
console.log(options.alias_label + " => " + aliasLabel)
|
||||
|
||||
let aliasId = this.parseOptional(options.alias_id, '*', '')
|
||||
console.log(options.alias_id + " => " + aliasId)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}/users/by/${aliasLabel}/${aliasId}`;
|
||||
const os_options = { method: 'DELETE', headers: { accept: 'application/json', Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}` } };
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
// JavaScript Document
|
||||
exports.onesignal_email_template = async function (options) {
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
// JavaScript Document
|
||||
//V1.0.0
|
||||
exports.onesignal_export_audience_activity_csv = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
const notification_id = this.parseRequired(options.notification_id, '*', 'No notificastion ID Specified')
|
||||
console.log(notification_id + " => " + notification_id)
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/notifications/${notification_id}/export_events?app_id=${appid}`;
|
||||
const os_options = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
accept: 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`
|
||||
}
|
||||
};
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
// JavaScript Document
|
||||
// v1.0.0
|
||||
exports.onesignal_export_subscriptions_csv = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
const extra_fields = this.parseOptional(options.extra_fields, '*', null)
|
||||
console.log(extra_fields + " => " + extra_fields)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/players/csv_export?app_id=${appid}`;
|
||||
const os_options = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
accept: 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`,
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({ extra_fields: [extra_fields] })
|
||||
};
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
// JavaScript Document
|
||||
// V1.0.0
|
||||
exports.onesignal_getapp = async function (options) {
|
||||
|
||||
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}`
|
||||
const os_options = {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
accept: 'text/plain',
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`
|
||||
}
|
||||
};
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
// JavaScript Document
|
||||
// V1.0.0 complete
|
||||
|
||||
// note uses auth key, not api key
|
||||
// no status returned! need to double check schema
|
||||
|
||||
exports.onesignal_getapps = async function (options) {
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = 'https://api.onesignal.com/apps';
|
||||
const os_options = {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
accept: 'text/plain',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_AUTH_KEY}`
|
||||
}
|
||||
};
|
||||
console.log(url)
|
||||
console.log(os_options)
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
//json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
// Node integration with wappler.io
|
||||
// v1.0.0
|
||||
exports.onesignal_getnotification = async function (options) {
|
||||
|
||||
// get appid parsed as options.appid, throw error is missing
|
||||
const appid = this.parseRequired(options.appid, '*', 'No app ID entered')
|
||||
// log before and after vlaues
|
||||
console.log(options.appid + " => " + appid)
|
||||
// get limit, if omitted set default of 50
|
||||
var notification_id = this.parseRequired(options.notification_id, '*', 'Notification ID not specified')
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/notifications/${notification_id}?app_id=${appid}`;
|
||||
const os_options = {
|
||||
method: 'GET',
|
||||
headers: { accept: 'application/json', Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}` }
|
||||
};
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
// Node integration with wappler.io
|
||||
// V1.0.0
|
||||
exports.onesignal_getnotifications = async function (options) {
|
||||
|
||||
// get appid parsed as options.appid, throw error is missing
|
||||
const appid = this.parseRequired(options.appid, '*', 'No app ID entered')
|
||||
// log before and after vlaues
|
||||
console.log(options.appid + " => " + appid)
|
||||
// get limit, if omitted set default of 50
|
||||
var limit = this.parseOptional(options.limit, '*', 50)
|
||||
// ensure it is positive
|
||||
limit = Math.abs(limit)
|
||||
// ensure not exceeeding 50
|
||||
limit = Math.min(limit, 50)
|
||||
// log before and after values
|
||||
console.log(options.limit + " => " + limit)
|
||||
// get offset, if omitted set default of 0
|
||||
const offset = this.parseOptional(options.offset, '*', 0)
|
||||
// log before and after values
|
||||
console.log(options.offset + " => " + offset)
|
||||
// get offset, if omitted set default of null
|
||||
const kind = this.parseOptional(options.kind, '*', null)
|
||||
console.log(options.kind + " => " + kind)
|
||||
// log before and after values
|
||||
const fetch = require('node-fetch');
|
||||
// set url
|
||||
const url = `https://api.onesignal.com/notifications?app_id=${appid}&limit=${limit}&offset=${offset}&kind=${kind}`;
|
||||
const os_options = {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
accept: 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`
|
||||
}
|
||||
};
|
||||
//log url to console
|
||||
console.log(os_options.headers)
|
||||
console.log(url)
|
||||
// log timestamp
|
||||
console.log("Timestamp: " + new Date().getTime());
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
// JavaScript Document
|
||||
// V1.0.0
|
||||
exports.onesignal_getoutcomes = async function (options) {
|
||||
|
||||
// get appid
|
||||
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
const outcome_names = this.parseOptional(options.outcome_names, '*', 'os__click.count')
|
||||
console.log(options.outcome_names + " => " + outcome_names)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}/outcomes?outcome_names=${outcome_names}`;
|
||||
const os_options = {
|
||||
method: 'GET',
|
||||
headers: { accept: 'application/json', Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}` }
|
||||
};
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
// JavaScript Document
|
||||
//V1.0.0
|
||||
exports.onesignal_getuser = async function (options) {
|
||||
|
||||
// get appid
|
||||
const appid = this.parseRequired(options.appid, '*', 'No app ID entered')
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
let aliasLabel = this.parseOptional(options.alias_label, '*', '')
|
||||
console.log(options.alias_label + " => " + aliasLabel)
|
||||
|
||||
let aliasId = this.parseOptional(options.alias_id, '*', '')
|
||||
console.log(options.alias_id + " => " + aliasId)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}/users/by/${aliasLabel}/${aliasId}`;
|
||||
const os_options = { method: 'GET', headers: { accept: 'application/json', Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}` } };
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
// JavaScript Document
|
||||
// V1.0.0
|
||||
exports.onesignal_makeapp = async function (options) {
|
||||
|
||||
|
||||
|
||||
const orgid = this.parseOptional(options.orgid, '*', null)
|
||||
console.log(options.orgid + " => " + orgid)
|
||||
|
||||
const chrome_web_default_notification_icon = this.parseOptional(options.chrome_web_default_notification_icon, '*', null)
|
||||
console.log(options.chrome_web_default_notification_icon + " => " + chrome_web_default_notification_icon)
|
||||
|
||||
const chrome_web_origin = this.parseOptional(options.chrome_web_origin, '*', process.env.ONESIGNAL_SITE_URL)
|
||||
console.log(options.chrome_web_origin + " => " + chrome_web_origin)
|
||||
|
||||
const appname = this.parseRequired(options.app_name, '*', 'You must specify an app name')
|
||||
console.log(options.app_name + " => " + appname)
|
||||
|
||||
const safari_site_origin = this.parseOptional(options.safari_site_origin, '*', process.env.ONESIGNAL_SITE_URL)
|
||||
console.log(options.safari_site_origin + " => " + safari_site_origin)
|
||||
|
||||
const site_name = this.parseOptional(options.site_name, '*', null)
|
||||
console.log(options.site_name + " => " + site_name)
|
||||
|
||||
const safari_apns_p12 = this.parseOptional(options.safari_apns_p12, '*', null)
|
||||
console.log(options.safari_apns_p12 + " => " + safari_apns_p12)
|
||||
|
||||
const safari_apns_p12_password = this.parseOptional(options.safari_apns_p12_password, '*', null)
|
||||
console.log(options.safari_apns_p12_password + " => " + safari_apns_p12_password)
|
||||
|
||||
const safari_icon_256_256 = this.parseOptional(options.safari_icon_256_256, '*', null)
|
||||
console.log(options.safari_icon_256_256 + " => " + safari_icon_256_256)
|
||||
|
||||
const fcm_v1_service_account_json = this.parseOptional(options.fcm_v1_service_account_json, '*', null)
|
||||
console.log(options.fcm_v1_service_account_json + " => " + fcm_v1_service_account_json)
|
||||
|
||||
const apns_p12 = this.parseOptional(options.apns_p12, '*', null)
|
||||
console.log(options.apns_p12 + " => " + apns_p12)
|
||||
|
||||
const apns_p12_password = this.parseOptional(options.apns_p12_password, '*', null)
|
||||
console.log(options.apns_p12_password + " => " + apns_p12_password)
|
||||
|
||||
const apns_env = this.parseOptional(options.apns_env, '*', null)
|
||||
console.log(options.apns_env + " => " + apns_env)
|
||||
|
||||
const apns_key_id = this.parseOptional(options.apns_key_id, '*', null)
|
||||
console.log(options.apns_key_id + " => " + apns_key_id)
|
||||
|
||||
const apns_team_id = this.parseOptional(options.apns_team_id, '*', null)
|
||||
console.log(options.apns_team_id + " => " + apns_team_id)
|
||||
|
||||
const apns_bundle_id = this.parseOptional(options.apns_bundle_id, '*', null)
|
||||
console.log(options.apns_bundle_id + " => " + apns_bundle_id)
|
||||
|
||||
const apns_p8 = this.parseOptional(options.apns_p8, '*', null)
|
||||
console.log(options.aapns_p8 + " => " + apns_p8)
|
||||
|
||||
const additional_data_is_root_payload = this.parseOptional(options.additional_data_is_root_payload, '*', false)
|
||||
console.log(options.additional_data_is_root_payload + " => " + additional_data_is_root_payload)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/`
|
||||
const os_options = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
accept: 'text/plain',
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`,
|
||||
},
|
||||
body: JSON.stringify({
|
||||
name: appname,
|
||||
organization_id: orgid,
|
||||
fcm_v1_service_account_json: fcm_v1_service_account_json,
|
||||
chrome_web_origin: chrome_web_origin,
|
||||
chrome_web_default_notification_icon: chrome_web_default_notification_icon,
|
||||
site_name: safari_site_origin,
|
||||
safari_site_origin: safari_site_origin,
|
||||
safari_apns_p12: safari_apns_p12,
|
||||
safari_apns_p12_password: safari_apns_p12_password,
|
||||
safari_icon_256_256: safari_icon_256_256,
|
||||
apns_p12: apns_p12,
|
||||
apns_p12_password: apns_p12_password,
|
||||
apns_env: apns_env,
|
||||
apns_key_id: apns_key_id,
|
||||
apns_team_id: apns_team_id,
|
||||
apns_bundle_id: apns_bundle_id,
|
||||
apns_p8: apns_p8,
|
||||
additional_data_is_root_payload: false
|
||||
})
|
||||
};
|
||||
console.log('Method: ' + os_options.method)
|
||||
console.log('Headers: ' + os_options.headers)
|
||||
console.log('Body: ' + os_options.body)
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
[
|
||||
//start
|
||||
{
|
||||
type: 'onesignal_update_user_onesignal_update_user',
|
||||
module : 'onesignal_update_user',
|
||||
action : 'onesignal_update_user',
|
||||
groupTitle : 'Onesignal Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp-general',
|
||||
title : 'Onesignal Update User',
|
||||
icon : 'fas fa-solid fa-bug comp-errors',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [ ],
|
||||
properties : [
|
||||
{
|
||||
group: 'Onesignal Settings',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osc1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'You App ID'
|
||||
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
}
|
||||
]}]},
|
||||
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
// Node integration with wappler.io
|
||||
// v1.0.0 - CURRENTLY UNTESTED
|
||||
exports.onesignal_notification_history = async function (options) {
|
||||
|
||||
// get appid parsed as options.appid, throw error is missing
|
||||
const appid = this.parseRequired(options.appid, '*', 'No app ID entered')
|
||||
// log before and after vlaues
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
var notification_id = this.parseRequired(options.notification_id, '*', 'Notification ID not specified')
|
||||
console.log(options.notification_id + " => " + notification_id)
|
||||
|
||||
var to_email = this.parseRequired(options.email, '*', 'eMail not specified')
|
||||
console.log(options.email + " => " + to_email)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/notifications/${notification_id}/history`;
|
||||
const os_options = {
|
||||
method: 'POST',
|
||||
headers: { accept: 'application/json', 'content-type': 'application/json', Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}` },
|
||||
body: JSON.stringify({ app_id: appid, events: 'clicked', email: to_email })
|
||||
};
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
// Node integration with wappler.io
|
||||
// v1.0.0 - CURRENTLY UNTESTED
|
||||
exports.onesignal_notification_history_sent = async function (options) {
|
||||
|
||||
// get appid parsed as options.appid, throw error is missing
|
||||
const appid = this.parseRequired(options.appid, '*', 'No app ID entered')
|
||||
// log before and after vlaues
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
var notification_id = this.parseRequired(options.notification_id, '*', 'Notification ID not specified')
|
||||
console.log(options.notification_id + " => " + notification_id)
|
||||
|
||||
var to_email = this.parseRequired(options.email, '*', 'eMail not specified')
|
||||
console.log(options.email + " => " + to_email)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/notifications/${notification_id}/history`;
|
||||
const os_options = {
|
||||
method: 'POST',
|
||||
headers: { accept: 'application/json', 'content-type': 'application/json', Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}` },
|
||||
body: JSON.stringify({ app_id: appid, events: 'sent', email: to_email })
|
||||
};
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
|
||||
// JavaScript Document
|
||||
// limited functionality
|
||||
exports.onesignal_push_template = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
|
||||
const tname = this.parseRequired(options.tname, '*', 'Template name is mandatory')
|
||||
console.log(options.tname + " => " + tname)
|
||||
|
||||
console.log('bindings: ' + JSON.stringify(options.bindings))
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = 'https://api.onesignal.com/templates';
|
||||
const os_options = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
accept: 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`,
|
||||
'Content-Type': 'application/json; charset=utf-8'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
"name": tname,
|
||||
"app_id": appid,
|
||||
"contents": options.bindings,
|
||||
"target_channel": "push"
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
// JavaScript Document
|
||||
exports.onesignal_sms_template = async function (options) {
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
// JavaScript Document
|
||||
exports.onesignal_transfer_subscription = async function (options) {
|
||||
// get appid parsed as options.appid, throw error is missing
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
// log before and after vlaues
|
||||
console.log('App id: ' + options.appid + " => " + appid)
|
||||
|
||||
var subscription_id = this.parseRequired(options.subscription_id, '*', 'Subscription ID not specified')
|
||||
console.log('Subscription_id: ' + options.subscription_id + " => " + subscription_id)
|
||||
|
||||
var alias_id = this.parseOptional(options.alias_id, '*', null)
|
||||
console.log('alias_id: ' + options.alias_id + " => " + alias_id)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}/subscriptions/${subscription_id}/owner`;
|
||||
const os_options = {
|
||||
method: 'PATCH',
|
||||
headers: { accept: 'application/json', 'content-type': 'application/json' },
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`,
|
||||
body: JSON.stringify({ identity: { onesignal_id: alias_id } })
|
||||
};
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
// JavaScript Document
|
||||
exports.onesignal_transfer_subscription_alias = async function (options) {
|
||||
// get appid parsed as options.appid, throw error is missing
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
// log before and after vlaues
|
||||
console.log('App id: ' + options.appid + " => " + appid)
|
||||
|
||||
var subscription_id = this.parseRequired(options.subscription_id, '*', 'Subscription ID not specified')
|
||||
console.log('Subscription_id: ' + options.subscription_id + " => " + subscription_id)
|
||||
|
||||
var alias_label = this.parseOptional(options.alias_label, '*', null)
|
||||
console.log('alias_label: ' + options.alias_label + " => " + alias_label)
|
||||
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}/subscriptions/${subscription_id}/owner`;
|
||||
const os_options = {
|
||||
method: 'PATCH',
|
||||
headers: { accept: 'application/json', 'content-type': 'application/json' },
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`,
|
||||
body: JSON.stringify({ identity: { external_id: alias_label } })
|
||||
};
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
// JavaScript Document
|
||||
exports.onesignal_unsubscribe_email = async function (options) {
|
||||
// get appid parsed as options.appid, throw error is missing
|
||||
const appid = this.parseRequired(options.appid, '*', 'No app ID entered')
|
||||
// log before and after vlaues
|
||||
console.log('App id: ' + options.appid + " => " + appid)
|
||||
|
||||
var notification_id = this.parseRequired(options.notification_id, '*', 'Notification ID not specified')
|
||||
console.log('notification_id: ' + options.notification_id + " => " + notification_id)
|
||||
|
||||
var token = this.parseRequired(options.token, '*', 'Token not specified')
|
||||
console.log('Token: ' + options.token + " => " + token)
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}/notifications/${notification_id}/unsubscribe?token=${token}`;
|
||||
const os_options = { method: 'POST', headers: { accept: 'application/json', Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`, } };
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
if (!res.ok) {
|
||||
throw new Error(`HTTP error! status: ${res.status}`);
|
||||
}
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
|
||||
// JavaScript Document
|
||||
// limited functionality
|
||||
exports.onesignal_push_template = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
|
||||
const tname = this.parseRequired(options.tname, '*', 'Template name is mandatory')
|
||||
console.log(options.tname + " => " + tname)
|
||||
|
||||
console.log('bindings: ' + JSON.stringify(options.bindings))
|
||||
console.log('headings: ' + JSON.stringify(options.headings))
|
||||
|
||||
const included_segments = this.parseOptional(options.included_segments, '*', null)
|
||||
console.log(options.included_segments + " => " + included_segments)
|
||||
|
||||
const push_type = this.parseOptional(options.push_type, '*', 'web')
|
||||
console.log(options.push_type + " => " + push_type)
|
||||
|
||||
const os_title_prompt = this.parseOptional(options.os_title_prompt, '*', null)
|
||||
console.log(options.os_title_prompt + " => " + os_title_prompt)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = 'https://api.onesignal.com/templates';
|
||||
const os_options = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
accept: 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`,
|
||||
'Content-Type': 'application/json; charset=utf-8'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
"name": tname,
|
||||
"app_id": appid,
|
||||
"contents": options.bindings,
|
||||
"target_channel": "push",
|
||||
"included_segments": [included_segments],
|
||||
"os_title_prompt": os_title_prompt,
|
||||
"headings": headings,
|
||||
|
||||
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
// JavaScript Document
|
||||
// v1.0.0
|
||||
// retruned undocumented property "offset" (currently added to schema)"
|
||||
exports.onesignal_update_subscription = async function (options) {
|
||||
// get appid parsed as options.appid, throw error is missing
|
||||
const appid = this.parseRequired(options.appid, '*', 'No app ID entered')
|
||||
// log before and after vlaues
|
||||
console.log('App id: ' + options.appid + " => " + appid)
|
||||
|
||||
var subscription_id = this.parseRequired(options.subscription_id, '*', 'Subscription ID not specified')
|
||||
console.log('Subscription_id: ' + options.subscription_id + " => " + subscription_id)
|
||||
|
||||
var token = this.parseRequired(options.token, '*', 'Token not specified')
|
||||
console.log('Token: ' + options.token + " => " + token)
|
||||
const pushtype = this.parseRequired(options.pushtype, '*', 'No push type specified')
|
||||
console.log('Type: ' + options.pushtype)
|
||||
const enabled = this.parseOptional(options.enabled, '*', false)
|
||||
console.log('Enabled: ' + options.enabled + " => " + enabled)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}/subscriptions/${subscription_id}`;
|
||||
const os_options = {
|
||||
method: 'PATCH',
|
||||
headers: { accept: 'application/json', 'content-type': 'application/json', Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}` },
|
||||
body: JSON.stringify({ subscription: { type: pushtype, token: token, enabled: enabled } })
|
||||
};
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
// JavaScript Document
|
||||
// V1.0.0
|
||||
exports.onesignal_updateapp = async function (options) {
|
||||
|
||||
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
const orgid = this.parseOptional(options.orgid, '*', null)
|
||||
console.log(options.orgid + " => " + orgid)
|
||||
|
||||
const chrome_web_default_notification_icon = this.parseOptional(options.chrome_web_default_notification_icon, '*', null)
|
||||
console.log(options.chrome_web_default_notification_icon + " => " + chrome_web_default_notification_icon)
|
||||
|
||||
const chrome_web_origin = this.parseOptional(options.chrome_web_origin, '*', process.env.ONESIGNAL_SITE_URL)
|
||||
console.log(options.chrome_web_origin + " => " + chrome_web_origin)
|
||||
|
||||
const appname = this.parseRequired(options.app_name, '*', 'You must specify an app name')
|
||||
console.log(options.app_name + " => " + appname)
|
||||
|
||||
const safari_site_origin = this.parseOptional(options.safari_site_origin, '*', null)
|
||||
console.log(options.safari_site_origin + " => " + safari_site_origin)
|
||||
|
||||
const safari_apns_p12 = this.parseOptional(options.safari_apns_p12, '*', null)
|
||||
console.log(options.safari_apns_p12 + " => " + safari_apns_p12)
|
||||
|
||||
const safari_apns_p12_password = this.parseOptional(options.safari_apns_p12_password, '*', null)
|
||||
console.log(options.safari_apns_p12_password + " => " + safari_apns_p12_password)
|
||||
|
||||
const safari_icon_256_256 = this.parseOptional(options.safari_icon_256_256, '*', '')
|
||||
console.log(options.safari_icon_256_256 + " => " + safari_icon_256_256)
|
||||
|
||||
const fcm_v1_service_account_json = this.parseOptional(options.fcm_v1_service_account_json, '*', null)
|
||||
console.log(options.fcm_v1_service_account_json + " => " + fcm_v1_service_account_json)
|
||||
|
||||
const apns_p12 = this.parseOptional(options.apns_p12, '*', null)
|
||||
console.log(options.apns_p12 + " => " + apns_p12)
|
||||
|
||||
const apns_p12_password = this.parseOptional(options.apns_p12_password, '*', null)
|
||||
console.log(options.apns_p12_password + " => " + apns_p12_password)
|
||||
|
||||
const apns_env = this.parseOptional(options.apns_env, '*', null)
|
||||
console.log(options.apns_env + " => " + apns_env)
|
||||
|
||||
const apns_key_id = this.parseOptional(options.apns_key_id, '*', null)
|
||||
console.log(options.apns_key_id + " => " + apns_key_id)
|
||||
|
||||
const apns_team_id = this.parseOptional(options.apns_team_id, '*', null)
|
||||
console.log(options.apns_team_id + " => " + apns_team_id)
|
||||
|
||||
const apns_bundle_id = this.parseOptional(options.apns_bundle_id, '*', null)
|
||||
console.log(options.apns_bundle_id + " => " + apns_bundle_id)
|
||||
|
||||
const apns_p8 = this.parseOptional(options.apns_p8, '*', null)
|
||||
console.log(options.aapns_p8 + " => " + apns_p8)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}`
|
||||
const os_options = {
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
accept: 'text/plain',
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`,
|
||||
},
|
||||
body: JSON.stringify({
|
||||
name: appname,
|
||||
fcm_v1_service_account_json: fcm_v1_service_account_json,
|
||||
chrome_web_origin: chrome_web_origin,
|
||||
chrome_web_default_notification_icon: chrome_web_default_notification_icon,
|
||||
site_name: safari_site_origin,
|
||||
safari_site_origin: safari_site_origin,
|
||||
safari_apns_p12: safari_apns_p12,
|
||||
safari_apns_p12_password: safari_apns_p12_password,
|
||||
safari_icon_256_256: safari_icon_256_256,
|
||||
apns_p12: apns_p12,
|
||||
apns_p12_password: apns_p12_password,
|
||||
apns_env: apns_env,
|
||||
apns_key_id: apns_key_id,
|
||||
apns_team_id: apns_team_id,
|
||||
apns_bundle_id: apns_bundle_id,
|
||||
apns_p8: apns_p8,
|
||||
additional_data_is_root_payload: false
|
||||
})
|
||||
};
|
||||
console.log('Method: ' + os_options.method)
|
||||
console.log('Headers: ' + os_options.headers)
|
||||
console.log('Body: ' + os_options.body)
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
// JavaScript Document
|
||||
// v1.0.0
|
||||
exports.onesignal_view_segments = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
let limit = this.parseOptional(options.limit, '*', '300')
|
||||
console.log(options.limit + " => " + limit)
|
||||
|
||||
let offset = this.parseOptional(options.offset, '*', '0')
|
||||
console.log(options.offset + " => " + offset)
|
||||
|
||||
let url = `https://api.onesignal.com/apps/${appid}/segments?offset=${offset}&limit=${limit}`;
|
||||
|
||||
// &channel=${channel}
|
||||
console.log(url)
|
||||
const os_options = {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
accept: 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`,
|
||||
'Content-Type': 'application/json; charset=utf-8'
|
||||
}
|
||||
};
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
// JavaScript Document
|
||||
exports.onesignal_view_subscription_iams = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
const subscription_id = this.parseRequired(options.subscription_id, '*', 'Subscription ID not specified')
|
||||
console.log('Subscription_id: ' + options.subscription_id + " => " + subscription_id)
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}/subscriptions/${subscription_id}/iams`;
|
||||
const os_options = { method: 'GET', headers: { accept: 'application/json' } };
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
|
||||
// JavaScript Document
|
||||
exports.onesignal_view_template = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
const template_id = this.parseRequired(options.template_id, '*', 'No Template ID specified')
|
||||
console.log(options.template_id + " => " + template_id)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/templates/${template_id}?app_id=${appid}`;
|
||||
const os_options = {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
accept: 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`,
|
||||
'Content-Type': 'application/json; charset=utf-8'
|
||||
}
|
||||
};
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
if (!res.ok) {
|
||||
throw new Error(`HTTP error! status: ${res.status}`);
|
||||
}
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
|
||||
// JavaScript Document
|
||||
exports.onesignal_view_templates = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
let limit = this.parseOptional(options.limit, '*', '50')
|
||||
console.log(options.limit + " => " + limit)
|
||||
|
||||
let offset = this.parseOptional(options.offset, '*', '0')
|
||||
console.log(options.offset + " => " + offset)
|
||||
|
||||
let channel = this.parseOptional(options.channel, '*', null)
|
||||
console.log(options.channel + " => " + channel)
|
||||
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
if (channel == 'all' || channel == null) {
|
||||
selected_channel = null
|
||||
}
|
||||
else {
|
||||
selected_channel = `&channel=${channel}`
|
||||
}
|
||||
let url = `https://api.onesignal.com/templates?app_id=${appid}&limit=${limit}${selected_channel}`;
|
||||
|
||||
// &channel=${channel}
|
||||
console.log(url)
|
||||
const os_options = {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
accept: 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`,
|
||||
'Content-Type': 'application/json; charset=utf-8'
|
||||
}
|
||||
};
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
// JavaScript Document
|
||||
exports.onesignal_view_user_identity = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
const alias_id = this.parseRequired(options.alias_id, '*', 'No Alias ID specified')
|
||||
console.log(options.alias_id + " => " + alias_id)
|
||||
|
||||
const alias_label = this.parseRequired(options.alias_label, '*', 'No Alias Label specified')
|
||||
console.log(options.alias_label + " => " + alias_label)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}/users/by/${alias_label}/${alias_id}/identity`;
|
||||
const os_options = {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
accept: 'application/json',
|
||||
Authorization: `Basic ${process.env.ONESIGNAL_REST_API_KEY}`,
|
||||
}
|
||||
};
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
// JavaScript Document
|
||||
exports.onesignal_view_user_identity_by_sub = async function (options) {
|
||||
// get appid
|
||||
const appid = this.parseOptional(options.appid, '*', process.env.ONESIGNAL_APP_ID)
|
||||
console.log(options.appid + " => " + appid)
|
||||
|
||||
const subscription_id = this.parseRequired(options.subscription_id, '*', 'No Subscription ID specified')
|
||||
console.log(options.subscription_id + " => " + subscription_id)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
||||
const url = `https://api.onesignal.com/apps/${appid}/subscriptions/${subscription_id}/user/identity`;
|
||||
const os_options = { method: 'GET', headers: { accept: 'application/json' } };
|
||||
|
||||
return fetch(url, os_options)
|
||||
.then(res => {
|
||||
|
||||
return res.json().then(json => {
|
||||
json.status = res.status; // Add status to json response
|
||||
return json;
|
||||
});
|
||||
})
|
||||
.catch(err => console.error('Error:', err));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,290 @@
|
|||
{
|
||||
type: 'onesignal_makeapp_onesignal_makeapp',
|
||||
module : 'onesignal_makeapp',
|
||||
action : 'onesignal_makeapp',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Create App',
|
||||
icon : 'fas fa-solid fa-pen comp-images',
|
||||
serverModel : ['node'],
|
||||
|
||||
dataPickObject: true,
|
||||
|
||||
dataScheme: [
|
||||
{"type": "text","name": "id"},
|
||||
{"type": "text","name": "name"},
|
||||
{"type": "text","name": "gcm_key"},
|
||||
{"type": "text","name": "fcm_v1_service_account_json"},
|
||||
{"type": "text","name": "fcm_sender_id"},
|
||||
{"type": "text","name": "chrome_key"},
|
||||
{"type": "text","name": "chrome_web_key"},
|
||||
{"type": "text","name": "chrome_web_origin"},
|
||||
{"type": "text","name": "chrome_web_gcm_sender_id"},
|
||||
{"type": "text","name": "chrome_web_default_notification_icon"},
|
||||
{"type": "text","name": "chrome_web_sub_domain"},
|
||||
{"type": "text","name": "apns_env"},
|
||||
{"type": "text","name": "apns_certificates"},
|
||||
{"type": "text","name": "apns_p8"},
|
||||
{"type": "text","name": "apns_team_id"},
|
||||
{"type": "text","name": "apns_key_id"},
|
||||
{"type": "text","name": "apns_bundle_id"},
|
||||
{"type": "text","name": "safari_apns_certificate"},
|
||||
{"type": "text","name": "safari_site_origin"},
|
||||
{"type": "text","name": "safari_push_id"},
|
||||
{"type": "text","name": "safari_icon_16_16"},
|
||||
{"type": "text","name": "safari_icon_32_32"},
|
||||
{"type": "text","name": "safari_icon_64_64"},
|
||||
{"type": "text","name": "safari_icon_128_128"},
|
||||
{"type": "text","name": "safari_icon_256_256"},
|
||||
{"type": "text","name": "site_name"},
|
||||
{"type": "text","name": "updated_at"},
|
||||
{"type": "text","name": "created_at"},
|
||||
{"type": "text","name": "players"},
|
||||
{"type": "text","name": "messageable_players"},
|
||||
{"type": "text","name": "basic_auth_key"},
|
||||
{"type": "boolean","name": "additional_data_is_root_payload"},
|
||||
{"type": "text","name": "organization_id"},
|
||||
{"name": "status","type": "number"}
|
||||
],
|
||||
usedModules : {
|
||||
node: {
|
||||
|
||||
}
|
||||
}
|
||||
properties : [
|
||||
{
|
||||
group: 'Make App',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osm1"
|
||||
},
|
||||
|
||||
|
||||
{ name: 'orgid',
|
||||
optionName: 'orgid',
|
||||
title: 'Organization ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Enter the Organization id, if omitted a new organization will be created'
|
||||
},
|
||||
|
||||
{
|
||||
name: 'app_name',
|
||||
optionName: 'app_name',
|
||||
title: 'New App Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
help: 'Enter an App name'
|
||||
defaultValue: ''
|
||||
},
|
||||
|
||||
{
|
||||
name: 'chrome_web_default_notification_icon',
|
||||
optionName: 'chrome_web_default_notification_icon',
|
||||
title: 'ChromeWeb Default Notification Icon',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{
|
||||
name: 'chrome_web_origin',
|
||||
optionName: 'chrome_web_origin',
|
||||
title: 'Default origin (defaults to ENV setting',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
|
||||
{ name: 'safari_push',
|
||||
optionName: 'safari_push',
|
||||
title: 'Safari: Tick if using web push',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
defaultValue: false,
|
||||
show:['safari_site_origin']
|
||||
},
|
||||
{ name: 'safari_site_origin',
|
||||
optionName: 'safari_site_origin',
|
||||
title: 'URL',
|
||||
type: 'text',
|
||||
defaultValue: '' ,
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
help:'Safari: Recommended if using web push. The URL to your website. Must use https:// and be the specific origin.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{
|
||||
name: 'safari_apns',
|
||||
optionName: 'safari_apns',
|
||||
title: 'Safari: Tick if using safari_apns',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
defaultValue: false ,
|
||||
show:['safari_apns_p12','safari_apns_p12', 'safari_apns_p12_password','safari_icon_256_256']
|
||||
},
|
||||
|
||||
{ name: 'safari_apns_p12',
|
||||
optionName: 'safari_apns_p12',
|
||||
title: 'CONVERTED P12',
|
||||
type: 'text',
|
||||
required: false,
|
||||
defaultValue: '' ,
|
||||
serverDataBindings: true,
|
||||
help:'Safari: Your push notification p12 certificate file for Safari Push Notifications, converted to base64 encoded format. If not provided, then we will assign one.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{ name: 'safari_apns_p12_password',
|
||||
optionName: 'safari_apns_p12_password',
|
||||
title: 'P12 PASSWORD',
|
||||
required: false,
|
||||
type: 'text',
|
||||
defaultValue: '' ,
|
||||
serverDataBindings: true,
|
||||
help:'Safari: Password for the safari_apns_p12 file. Omit if no password.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{ name: 'safari_icon_256_256',
|
||||
optionName: 'safari_icon_256_256',
|
||||
title: ' ICON URL',
|
||||
type: 'text',
|
||||
defaultValue: '' ,
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
help:'Safari: Your default notification icon as a 256x256px .png URL.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{ name: 'android_Push',
|
||||
optionName: 'android_Push',
|
||||
title: 'Android: Tick if using Android push notifications',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
defaultValue: false ,
|
||||
show:['fcm_v1_service_account_json']
|
||||
},
|
||||
{name: 'fcm_v1_service_account_json',
|
||||
optionName: 'fcm_v1_service_account_json',
|
||||
title: 'FCM Service Account JSON base64',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Android: Required if using Android push notifications.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
|
||||
{ name: 'apns',
|
||||
optionName: 'apns',
|
||||
title: 'iOS: Tick if using p12 APNS Authentication.',
|
||||
type: 'boolean',
|
||||
defaultValue: false ,
|
||||
required: false,
|
||||
show:['apns_p12','apns_p12_password','apns_env','apns_p12','apns_key_id','apns_team_id','apns_bundle_id','apns_p8']
|
||||
},
|
||||
|
||||
{name: 'apns_p12',
|
||||
optionName: 'apns_p12',
|
||||
title: 'Converted P12',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'iOS: Your apple push notification p12 certificate file, converted to Base64 encoded format.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{name: 'apns_p12_password',
|
||||
optionName: 'apns_p12_password',
|
||||
title: 'P12_PASSWORD',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'iOS: Your apple push notification p12 certificate file, converted to Base64 encoded format.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{name: 'apns_env',
|
||||
optionName: 'apns_env',
|
||||
title: 'APS Environment Entitlement.',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'iOS: Omit this field for Production environment (App Store & Test Flight builds). Or set either sandbox or production.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{name: 'apns_key_id',
|
||||
optionName: 'apns_key_id',
|
||||
title: 'KEY_ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'iOS: Required if using p8 APNS Authentication.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{name: 'apns_team_id',
|
||||
optionName: 'apns_team_id',
|
||||
title: 'TEAM_ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'iOS: Required if using p8 APNS Authentication.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{name: 'apns_bundle_id',
|
||||
optionName: 'apns_bundle_id',
|
||||
title: 'BUNDLE_ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'iOS: Required if using p8 APNS Authentication.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{name: 'apns_p8',
|
||||
optionName: 'apns_p8',
|
||||
title: 'ADD_BASE64_ENCODED_P8',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'iOS: Required if using p8 APNS Authentication. Must be base64 encoded format.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
|
||||
|
||||
|
||||
{ name: 'additional_data_is_root_payload',
|
||||
optionName: 'additional_data_is_root_payload',
|
||||
title: 'additional_data_is_root_payload',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/create-an-app" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>',
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
{
|
||||
type: 'onesignal_getapp_onesignal_getapp',
|
||||
module : 'onesignal_getapp',
|
||||
action : 'onesignal_getapp',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Get App Details',
|
||||
icon : 'fas fa-solid fa-info comp-images',
|
||||
serverModel : ['node'],
|
||||
|
||||
dataPickObject: true,
|
||||
|
||||
dataScheme: [
|
||||
{"type": "text","name": "id"},
|
||||
{"type": "text","name": "name"},
|
||||
{"type": "text","name": "gcm_key"},
|
||||
{"type": "text","name": "fcm_v1_service_account_json"},
|
||||
{"type": "text","name": "fcm_sender_id"},
|
||||
{"type": "text","name": "chrome_key"},
|
||||
{"type": "text","name": "chrome_web_key"},
|
||||
{"type": "text","name": "chrome_web_origin"},
|
||||
{"type": "text","name": "chrome_web_gcm_sender_id"},
|
||||
{"type": "text","name": "chrome_web_default_notification_icon"},
|
||||
{"type": "text","name": "chrome_web_sub_domain"},
|
||||
{"type": "text","name": "apns_env"},
|
||||
{"type": "text","name": "apns_certificates"},
|
||||
{"type": "text","name": "apns_p8"},
|
||||
{"type": "text","name": "apns_team_id"},
|
||||
{"type": "text","name": "apns_key_id"},
|
||||
{"type": "text","name": "apns_bundle_id"},
|
||||
{"type": "text","name": "safari_apns_certificate"},
|
||||
{"type": "text","name": "safari_site_origin"},
|
||||
{"type": "text","name": "safari_push_id"},
|
||||
{"type": "text","name": "safari_icon_16_16"},
|
||||
{"type": "text","name": "safari_icon_32_32"},
|
||||
{"type": "text","name": "safari_icon_64_64"},
|
||||
{"type": "text","name": "safari_icon_128_128"},
|
||||
{"type": "text","name": "safari_icon_256_256"},
|
||||
{"type": "text","name": "site_name"},
|
||||
{"type": "text","name": "updated_at"},
|
||||
{"type": "text","name": "created_at"},
|
||||
{"type": "text","name": "players"},
|
||||
{"type": "text","name": "messageable_players"},
|
||||
{"type": "text","name": "basic_auth_key"},
|
||||
{"type": "boolean","name": "additional_data_is_root_payload"},
|
||||
{"type": "text","name": "organization_id"},
|
||||
{"name": "status","type": "number"}
|
||||
],
|
||||
usedModules : {
|
||||
node: {
|
||||
|
||||
}}
|
||||
properties : [
|
||||
{
|
||||
group: 'App Settings',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osg1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App Id',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/view-an-app" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>',
|
||||
},
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
|
||||
{
|
||||
type: 'onesignal_getapps_onesignal_getapps',
|
||||
module : 'onesignal_getapps',
|
||||
action : 'onesignal_getapps',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Get All Apps',
|
||||
icon : 'fas fa-solid fa-list-ol comp-images',
|
||||
serverModel : ['node'],
|
||||
|
||||
dataPickObject: true,
|
||||
|
||||
dataScheme: [
|
||||
{"type": "text","name": "id"},
|
||||
{"type": "text","name": "name"},
|
||||
{"type": "text","name": "gcm_key"},
|
||||
{"type": "text","name": "fcm_v1_service_account_json"},
|
||||
{"type": "text","name": "fcm_sender_id"},
|
||||
{"type": "text","name": "chrome_key"},
|
||||
{"type": "text","name": "chrome_web_key"},
|
||||
{"type": "text","name": "chrome_web_origin"},
|
||||
{"type": "text","name": "chrome_web_gcm_sender_id"},
|
||||
{"type": "text","name": "chrome_web_default_notification_icon"},
|
||||
{"type": "text","name": "chrome_web_sub_domain"},
|
||||
{"type": "text","name": "apns_env"},
|
||||
{"type": "text","name": "apns_certificates"},
|
||||
{"type": "text","name": "apns_p8"},
|
||||
{"type": "text","name": "apns_team_id"},
|
||||
{"type": "text","name": "apns_key_id"},
|
||||
{"type": "text","name": "apns_bundle_id"},
|
||||
{"type": "text","name": "safari_apns_certificate"},
|
||||
{"type": "text","name": "safari_site_origin"},
|
||||
{"type": "text","name": "safari_push_id"},
|
||||
{"type": "text","name": "safari_icon_16_16"},
|
||||
{"type": "text","name": "safari_icon_32_32"},
|
||||
{"type": "text","name": "safari_icon_64_64"},
|
||||
{"type": "text","name": "safari_icon_128_128"},
|
||||
{"type": "text","name": "safari_icon_256_256"},
|
||||
{"type": "text","name": "site_name"},
|
||||
{"type": "text","name": "updated_at"},
|
||||
{"type": "text","name": "created_at"},
|
||||
{"type": "text","name": "players"},
|
||||
{"type": "text","name": "messageable_players"},
|
||||
{"type": "text","name": "basic_auth_key"},
|
||||
{"type": "boolean","name": "additional_data_is_root_payload"},
|
||||
{"type": "text","name": "organization_id"},
|
||||
{"name": "status","type": "number"}
|
||||
],
|
||||
usedModules : {
|
||||
node: {
|
||||
|
||||
}
|
||||
}
|
||||
properties : [
|
||||
{
|
||||
group: 'Get all Apps',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osga1"
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/view-apps-apps" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>',
|
||||
}
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
}
|
||||
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,279 @@
|
|||
{
|
||||
type: 'onesignal_updateapp_onesignal_updateapp',
|
||||
module : 'onesignal_updateapp',
|
||||
action : 'onesignal_updateapp',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Update App',
|
||||
icon : 'fas fa-solid fa-pen comp-images',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [
|
||||
{"type": "text","name": "id"},
|
||||
{"type": "text","name": "name"},
|
||||
{"type": "text","name": "gcm_key"},
|
||||
{"type": "text","name": "fcm_v1_service_account_json"},
|
||||
{"type": "text","name": "fcm_sender_id"},
|
||||
{"type": "text","name": "chrome_key"},
|
||||
{"type": "text","name": "chrome_web_key"},
|
||||
{"type": "text","name": "chrome_web_origin"},
|
||||
{"type": "text","name": "chrome_web_gcm_sender_id"},
|
||||
{"type": "text","name": "chrome_web_default_notification_icon"},
|
||||
{"type": "text","name": "chrome_web_sub_domain"},
|
||||
{"type": "text","name": "apns_env"},
|
||||
{"type": "text","name": "apns_certificates"},
|
||||
{"type": "text","name": "apns_p8"},
|
||||
{"type": "text","name": "apns_team_id"},
|
||||
{"type": "text","name": "apns_key_id"},
|
||||
{"type": "text","name": "apns_bundle_id"},
|
||||
{"type": "text","name": "safari_apns_certificate"},
|
||||
{"type": "text","name": "safari_site_origin"},
|
||||
{"type": "text","name": "safari_push_id"},
|
||||
{"type": "text","name": "safari_icon_16_16"},
|
||||
{"type": "text","name": "safari_icon_32_32"},
|
||||
{"type": "text","name": "safari_icon_64_64"},
|
||||
{"type": "text","name": "safari_icon_128_128"},
|
||||
{"type": "text","name": "safari_icon_256_256"},
|
||||
{"type": "text","name": "site_name"},
|
||||
{"type": "text","name": "updated_at"},
|
||||
{"type": "text","name": "created_at"},
|
||||
{"type": "text","name": "players"},
|
||||
{"type": "text","name": "messageable_players"},
|
||||
{"type": "text","name": "basic_auth_key"},
|
||||
{"type": "boolean","name": "additional_data_is_root_payload"},
|
||||
{"type": "text","name": "organization_id"},
|
||||
{"name": "status","type:":"number"}
|
||||
],
|
||||
usedModules : {
|
||||
node: {
|
||||
|
||||
}
|
||||
}
|
||||
properties : [
|
||||
{
|
||||
group: 'Update App',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osm1"
|
||||
},
|
||||
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Enter the App id'
|
||||
},
|
||||
|
||||
{
|
||||
name: 'app_name',
|
||||
optionName: 'app_name',
|
||||
title: 'New App Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
|
||||
{
|
||||
name: 'chrome_web_default_notification_icon',
|
||||
optionName: 'chrome_web_default_notification_icon',
|
||||
title: 'ChromeWeb Default Notification Icon',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
{
|
||||
name: 'chrome_web_origin',
|
||||
optionName: 'chrome_web_origin',
|
||||
title: 'Default origin (defaults to ENV setting',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
},
|
||||
|
||||
{ name: 'safari_push',
|
||||
optionName: 'safari_push',
|
||||
title: 'Safari: Tick if using web push',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
defaultValue: false,
|
||||
show:['safari_site_origin']
|
||||
},
|
||||
{ name: 'safari_site_origin',
|
||||
optionName: 'safari_site_origin',
|
||||
title: 'URL',
|
||||
type: 'text',
|
||||
defaultValue: '' ,
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
help:'Safari: Recommended if using web push. The URL to your website. Must use https:// and be the specific origin.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{
|
||||
name: 'safari_apns',
|
||||
optionName: 'safari_apns',
|
||||
title: 'Safari: Tick if using safari_apns',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
defaultValue: false ,
|
||||
show:['safari_apns_p12','safari_apns_p12', 'safari_apns_p12_password','safari_icon_256_256']
|
||||
},
|
||||
|
||||
{ name: 'safari_apns_p12',
|
||||
optionName: 'safari_apns_p12',
|
||||
title: 'CONVERTED P12',
|
||||
type: 'text',
|
||||
required: false,
|
||||
defaultValue: '' ,
|
||||
serverDataBindings: true,
|
||||
help:'Safari: Your push notification p12 certificate file for Safari Push Notifications, converted to base64 encoded format. If not provided, then we will assign one.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{ name: 'safari_apns_p12_password',
|
||||
optionName: 'safari_apns_p12_password',
|
||||
title: 'P12 PASSWORD',
|
||||
required: false,
|
||||
type: 'text',
|
||||
defaultValue: '' ,
|
||||
serverDataBindings: true,
|
||||
help:'Safari: Password for the safari_apns_p12 file. Omit if no password.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{ name: 'safari_icon_256_256',
|
||||
optionName: 'safari_icon_256_256',
|
||||
title: ' ICON URL',
|
||||
type: 'text',
|
||||
defaultValue: '' ,
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
help:'Safari: Your default notification icon as a 256x256px .png URL.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{ name: 'android_Push',
|
||||
optionName: 'android_Push',
|
||||
title: 'Android: Tick if using Android push notifications',
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
defaultValue: false ,
|
||||
show:['fcm_v1_service_account_json']
|
||||
},
|
||||
{name: 'fcm_v1_service_account_json',
|
||||
optionName: 'fcm_v1_service_account_json',
|
||||
title: 'FCM Service Account JSON base64',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Android: Required if using Android push notifications.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
|
||||
{ name: 'apns',
|
||||
optionName: 'apns',
|
||||
title: 'iOS: Tick if using p12 APNS Authentication.',
|
||||
type: 'boolean',
|
||||
defaultValue: false ,
|
||||
required: false,
|
||||
show:['apns_p12','apns_p12_password','apns_env','apns_p12','apns_key_id','apns_team_id','apns_bundle_id','apns_p8']
|
||||
},
|
||||
|
||||
{name: 'apns_p12',
|
||||
optionName: 'apns_p12',
|
||||
title: 'Converted P12',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'iOS: Your apple push notification p12 certificate file, converted to Base64 encoded format.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{name: 'apns_p12_password',
|
||||
optionName: 'apns_p12_password',
|
||||
title: 'P12_PASSWORD',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'iOS: Your apple push notification p12 certificate file, converted to Base64 encoded format.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{name: 'apns_env',
|
||||
optionName: 'apns_env',
|
||||
title: 'APS Environment Entitlement.',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'iOS: Omit this field for Production environment (App Store & Test Flight builds). Or set either sandbox or production.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{name: 'apns_key_id',
|
||||
optionName: 'apns_key_id',
|
||||
title: 'KEY_ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'iOS: Required if using p8 APNS Authentication.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{name: 'apns_team_id',
|
||||
optionName: 'apns_team_id',
|
||||
title: 'TEAM_ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'iOS: Required if using p8 APNS Authentication.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{name: 'apns_bundle_id',
|
||||
optionName: 'apns_bundle_id',
|
||||
title: 'BUNDLE_ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'iOS: Required if using p8 APNS Authentication.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
{name: 'apns_p8',
|
||||
optionName: 'apns_p8',
|
||||
title: 'ADD_BASE64_ENCODED_P8',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'iOS: Required if using p8 APNS Authentication. Must be base64 encoded format.',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '. <a target="_blank" href="https://documentation.onesignal.com/reference/update-an-app" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>',
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
{
|
||||
type: 'onesignal_create_subscription_onesignal_create_subscription',
|
||||
module : 'onesignal_create_subscription',
|
||||
action : 'onesignal_create_subscription',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Create subscription',
|
||||
icon : 'fas fa-solid fa-wrench comp-dialogs',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [ {name: 'status',type: 'number'}
|
||||
],
|
||||
properties : [
|
||||
{
|
||||
group: 'App Settings',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "cs1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App Id',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'App ID'
|
||||
},
|
||||
{ name: 'alias_label',
|
||||
optionName: 'alias_label',
|
||||
title: 'Alias Label',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Alias Label'
|
||||
},
|
||||
{ name: 'alias_id',
|
||||
optionName: 'alias_id',
|
||||
title: 'Alias ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Alias ID'
|
||||
},
|
||||
|
||||
{ name: 'pushtype',
|
||||
optionName: 'pushtype',
|
||||
title: 'Push Type'
|
||||
type: 'droplist',
|
||||
values: [
|
||||
{title: 'IOSPush', value: 'IOSPush' },
|
||||
{title: 'AndroidPush', value: 'AndroidPush'},
|
||||
{title: 'FireOSPush', value: 'FireOSPush'},
|
||||
{title: 'ChromeExtensionPush', value: 'ChromeExtensionPush' },
|
||||
{title: 'ChromePush', value: 'ChromePush'},
|
||||
{title: 'WindowsPush', value: 'WindowsPush'},
|
||||
{title: 'SafariLegacyPush', value: 'SafariLegacyPush' },
|
||||
{title: 'FirefoxPush', value: 'FirefoxPush'},
|
||||
{title: 'macOSPush', value: 'macOSPush'},
|
||||
{title: 'HuaweiPush', value: 'HuaweiPush' },
|
||||
{title: 'Email', value: 'Email'},
|
||||
{title: 'SMS', value: 'SMS'}
|
||||
],
|
||||
defaultValue: 'IOSPush',
|
||||
InitValue: 'IOSPush',
|
||||
help: 'Choose type of push.'
|
||||
},
|
||||
{ name: 'token',
|
||||
optionName: 'token',
|
||||
title: 'Token',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Push Token, email or SMS Phone Number'
|
||||
},
|
||||
{ name: 'enabled',
|
||||
optionName: 'enabled',
|
||||
title: 'Enable',
|
||||
type: 'boolean',
|
||||
defaultValue: false ,
|
||||
help: 'Enable this subscription'
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/create-subscription" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>',
|
||||
},
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
{
|
||||
type: 'onesignal_update_subscription_onesignal_update_subscription',
|
||||
module : 'onesignal_update_subscription',
|
||||
action : 'onesignal_update_subscription',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Update subscription',
|
||||
icon : 'fas fa-solid fa-random comp-dialogs',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [
|
||||
{"name": "offset","type": "number"}
|
||||
{"name": "status","type": "number"}
|
||||
],
|
||||
usedModules : {
|
||||
node: {
|
||||
|
||||
}}
|
||||
properties : [
|
||||
{
|
||||
group: 'App Settings',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "uds1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App Id',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'App ID'
|
||||
},
|
||||
{ name: 'subscription_id',
|
||||
optionName: 'subscription_id',
|
||||
title: 'Subscription ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Subscription ID'
|
||||
},
|
||||
{ name: 'alias_label',
|
||||
optionName: 'alias_label',
|
||||
title: 'Alias Label',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Target Alias Label'
|
||||
},
|
||||
{ name: 'alias_id',
|
||||
optionName: 'alias_id',
|
||||
title: 'Alias ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Target Alias ID'
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
}
|
||||
,
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/transfer-subscription" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>',
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
|
||||
{
|
||||
type: 'onesignal_delete_subscription_onesignal_delete_subscription',
|
||||
module : 'onesignal_delete_subscription',
|
||||
action : 'onesignal_delete_subscription',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Delete Subscription*',
|
||||
icon : 'fas fa-solid fa-backspace comp-dialogs',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [ {"name": "status","type": "number"} ],
|
||||
|
||||
properties : [
|
||||
{
|
||||
group: 'Delete Subscription',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "ds1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'You App ID'
|
||||
|
||||
},
|
||||
{ name: 'subscription_id',
|
||||
optionName: 'subscription_id',
|
||||
title: 'Subscription ID to delete',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Subscription ID to delete'
|
||||
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
}
|
||||
]}]}
|
||||
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
type: 'onesignal_export_subscriptions_csv_onesignal_export_subscriptions_csv',
|
||||
module : 'onesignal_export_subscriptions_csv',
|
||||
action : 'onesignal_export_subscriptions_csv',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp-general',
|
||||
title : 'Onesignal Export Subscriptions (csv)',
|
||||
icon : 'fas fa-solid fa-file-csv comp-flows',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [ {"name": "status","type": "number"} ],
|
||||
properties : [
|
||||
{
|
||||
group: 'Onesignal Settings',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osc1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'You App ID'
|
||||
|
||||
},
|
||||
{ name: 'extra_fields',
|
||||
optionName: 'extra_fields',
|
||||
title: 'extra_fields',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Extra Fields as comma separated list ( Currently supports location, country, rooted, notification_types, ip, external_user_id, web_auth, and web_p256.)'
|
||||
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/csv-export" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>'
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
type: 'onesignal_transfer_subscription_onesignal_transfer_subscription',
|
||||
module : 'onesignal_transfer_subscription',
|
||||
action : 'onesignal_transfer_subscription',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Transfer subscription by Onesignal_id',
|
||||
icon : 'fas fa-solid fa-exchange-alt comp-dialogs',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [ {name: 'status',type: 'number'}
|
||||
],
|
||||
usedModules : {
|
||||
node: {
|
||||
|
||||
}}
|
||||
properties : [
|
||||
{
|
||||
group: 'App Settings',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "ts1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App Id',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'App ID'
|
||||
},
|
||||
{ name: 'subscription_id',
|
||||
optionName: 'subscription_id',
|
||||
title: 'From Subscription ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Subscription ID'
|
||||
},
|
||||
|
||||
{ name: 'To alias_id',
|
||||
optionName: 'alias_id',
|
||||
title: 'Target Onesignal ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Target Onesignal ID'
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
}
|
||||
,
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/transfer-subscription" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>',
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
type: 'onesignal_transfer_subscription_alias_onesignal_transfer_subscription_alias',
|
||||
module : 'onesignal_transfer_subscription_alias',
|
||||
action : 'onesignal_transfer_subscription_alias',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Transfer subscription by Alias',
|
||||
icon : 'fas fa-solid fa-random comp-dialogs',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [ {name: 'status',type: 'number'}
|
||||
],
|
||||
usedModules : {
|
||||
node: {
|
||||
|
||||
}}
|
||||
properties : [
|
||||
{
|
||||
group: 'App Settings',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "ts1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App Id',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'App ID'
|
||||
},
|
||||
{ name: 'subscription_id',
|
||||
optionName: 'subscription_id',
|
||||
title: 'From Subscription ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Subscription ID'
|
||||
},
|
||||
{ name: 'alias_label',
|
||||
optionName: 'alias_label',
|
||||
title: 'Target Alias Label',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Target Alias Label'
|
||||
},
|
||||
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
}
|
||||
,
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/transfer-subscription" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>',
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
{
|
||||
type: 'onesignal_unsubscribe_email_onesignal_unsubscribe_email',
|
||||
module : 'onesignal_unsubscribe_email',
|
||||
action : 'onesignal_unsubscribe_email',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Unsubscribe Email (with token)',
|
||||
icon : 'far fa-solid fa-envelope-open comp_general',
|
||||
serverModel : ['node'],
|
||||
|
||||
dataPickObject: true,
|
||||
|
||||
dataScheme: [
|
||||
{name: 'status',type: 'number'}
|
||||
],
|
||||
usedModules : {
|
||||
|
||||
}
|
||||
properties : [
|
||||
{
|
||||
group: 'Get Notification by ID',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osn1"
|
||||
},
|
||||
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App Id',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'App ID, if left blank default from ENV will be used'
|
||||
},
|
||||
|
||||
{ name: 'notification_id',
|
||||
optionName: 'notification_id',
|
||||
title: 'Notification ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Notification ID'
|
||||
},
|
||||
{ name: 'token',
|
||||
optionName: 'token',
|
||||
title: 'Token',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email.'
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/unsubscribe-with-token" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>',
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
|
||||
{
|
||||
type: 'onesignal_view_subscription_iams_onesignal_view_subscription_iams',
|
||||
module : 'onesignal_view_subscription_iams',
|
||||
action : 'onesignal_view_subscription_iams',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal View Subscriptions IAMs',
|
||||
icon : 'fas fa-solid fa-comment comp-dialogs',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [ {name: 'status',type: 'number'} ],
|
||||
usedModules : {}
|
||||
properties : [
|
||||
{
|
||||
group: 'Onesignal Settings',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "siam1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'You App ID'
|
||||
|
||||
},
|
||||
{ name: 'subscription_id',
|
||||
optionName: 'subscription_id',
|
||||
title: 'Subscription ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Subscription ID'
|
||||
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,347 @@
|
|||
|
||||
{
|
||||
type: 'onesignal_update_push_template_onesignal_update_push_template',
|
||||
module : 'onesignal_update_push_template',
|
||||
action : 'onesignal_update_push_template',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Update Push Template ',
|
||||
icon : 'fab fa-solid fa-pushed comp-flows',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [
|
||||
|
||||
{"type": "text","name": "id" },
|
||||
{"type": "text","name": "name" },
|
||||
{"type": "text","name": "created_at" },
|
||||
{"type": "text","name": "updated_at" },
|
||||
{"type": "text","name": "channel" },
|
||||
{"type": "object","name": "content",
|
||||
"sub": [
|
||||
{"type": "boolean","name": "isAndroid" },
|
||||
{"type": "boolean","name": "isIos" },
|
||||
{"type": "boolean","name": "isMacOSX" },
|
||||
{"type": "boolean","name": "isAdm" },
|
||||
{"type": "text","name": "isAlexa" },
|
||||
{"type": "boolean","name": "isWP" },
|
||||
{"type": "boolean","name": "isWP_WNS" },
|
||||
{"type": "boolean","name": "isChrome" },
|
||||
{"type": "boolean","name": "isChromeWeb" },
|
||||
{"type": "boolean","name": "isSafari" },
|
||||
{"type": "boolean","name": "isFirefox" },
|
||||
{"type": "boolean","name": "isEdge" },
|
||||
{"type": "object","name": "headings",
|
||||
"sub": [
|
||||
{"type": "text","name": "en"}
|
||||
]
|
||||
},
|
||||
{"type": "text","name": "subtitle" },
|
||||
{"type": "object","name": "contents",
|
||||
"sub": [
|
||||
{"type": "text","name": "en"}
|
||||
]
|
||||
},
|
||||
{"type": "text","name": "global_image" },
|
||||
{"type": "text","name": "url" },
|
||||
{"type": "text","name": "isEmail" },
|
||||
{"type": "text","name": "email_body" },
|
||||
{"type": "text","name": "email_subject" },
|
||||
{"type": "text","name": "email_preheader" },
|
||||
{"type": "text","name": "isSMS" },
|
||||
{"type": "text","name": "sms_from" },
|
||||
{"type": "text","name": "sms_media_urls" },
|
||||
{"type": "text","name": "email_reply_to_address" },
|
||||
{"type": "text","name": "disable_email_click_tracking" }
|
||||
]
|
||||
}
|
||||
{name: 'status',type: 'number'}
|
||||
],
|
||||
usedModules : {}
|
||||
properties : [
|
||||
{
|
||||
group: 'Template Settings',
|
||||
variables: [
|
||||
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osc1"
|
||||
},
|
||||
{
|
||||
name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'Application ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'You App ID'
|
||||
},
|
||||
{
|
||||
name: 'tname',
|
||||
optionName: 'tname',
|
||||
title: 'Template Name',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Template Name'
|
||||
},
|
||||
{ name: 'included_segments',
|
||||
optionName: 'included_segments',
|
||||
title: 'Included Segments',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Included Segmants <a href="https://documentation.onesignal.com/reference/notification-parameters#included_segments" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'push_type', optionName: 'push_type', title: 'Push Type' type: 'text',
|
||||
type: 'droplist',
|
||||
values: [
|
||||
{title: 'web', value: 'web' },
|
||||
{title: 'email', value: 'email'},
|
||||
{title: 'sms', value: 'sms'},
|
||||
], defaultValue: 'web',
|
||||
help: 'Choose type of push.'
|
||||
},
|
||||
{
|
||||
name: "headings",
|
||||
optionName: "headings",
|
||||
key: "var",
|
||||
keyValue: "value",
|
||||
title: "Languages and Headings",
|
||||
type: "grid",
|
||||
defaultValue: {},
|
||||
serverDataBindings: true,
|
||||
columns: [
|
||||
{
|
||||
field: "var",
|
||||
caption: "Language",
|
||||
size: "30%",
|
||||
editable: {
|
||||
type: "static"
|
||||
}
|
||||
},
|
||||
{
|
||||
field: "value",
|
||||
caption: "Text",
|
||||
size: "70%",
|
||||
editable: {
|
||||
type: "datapicker"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'os_title_prompt',
|
||||
optionName: 'os_title_prompt',
|
||||
title: 'Title ',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: ' Recommended about 60-80 characters limit'
|
||||
},
|
||||
{
|
||||
name: "bindings",
|
||||
optionName: "bindings",
|
||||
key: "var",
|
||||
keyValue: "value",
|
||||
title: "Languages & Messages",
|
||||
type: "grid",
|
||||
defaultValue: {},
|
||||
serverDataBindings: true,
|
||||
columns: [
|
||||
{
|
||||
field: "var",
|
||||
caption: "Language",
|
||||
size: "30%",
|
||||
editable: {
|
||||
type: "static"
|
||||
}
|
||||
},
|
||||
{
|
||||
field: "value",
|
||||
caption: "Text",
|
||||
size: "70%",
|
||||
editable: {
|
||||
type: "datapicker"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
name: 'os_msg_prompt',
|
||||
optionName: 'os_msg_prompt',
|
||||
title: 'Main Image',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: ' Recommended about 150 characters message limit unless email'
|
||||
},
|
||||
{ name: 'target_channel',
|
||||
optionName: 'target_channel',
|
||||
title: 'Target Channel',
|
||||
serverDataBindings: true,
|
||||
type: 'textarea',
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Target Channel <a href="https://documentation.onesignal.com/reference/notification-parameters#target_channel" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{
|
||||
name: 'big_picture',
|
||||
optionName: 'big_picture',
|
||||
title: 'Big Picture',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Big Picture <a href="https://documentation.onesignal.com/reference/push-notification#big_picture" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{
|
||||
name: 'large_icon',
|
||||
optionName: 'large_icon',
|
||||
title: 'Icon Image',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Large Icon <a href="https://documentation.onesignal.com/reference/push-notification#large_icon" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
|
||||
{
|
||||
name: 'url',
|
||||
optionName: 'url',
|
||||
title: 'Target URL',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a href="https://documentation.onesignal.com/reference/push-notification#url" style="color: #ffffff" target="_blank">Refererence - URL Opened when Clicked</a>'
|
||||
},
|
||||
{
|
||||
name: 'web_url',
|
||||
optionName: 'web_url',
|
||||
title: 'Target URL (web push only)',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a href="https://documentation.onesignal.com/reference/push-notification#web_url" style="color: #ffffff" target="_blank">Refererence - URL Opened when Clicked</a>'
|
||||
},
|
||||
{ name: 'data',
|
||||
optionName: 'data',
|
||||
title: 'Data { }',
|
||||
type: 'textarea',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Data as JSON <a href="https://documentation.onesignal.com/reference/push-notification#data" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'custom_data',
|
||||
optionName: 'custom_data',
|
||||
title: 'Custom data { }',
|
||||
type: 'textarea',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Custom Data as JSON <a href="https://documentation.onesignal.com/reference/notification-parameters#custom_data" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'external_id',
|
||||
optionName: 'external_id',
|
||||
title: 'External ID [ ]',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'External ID <a href="https://documentation.onesignal.com/reference/notification-parameters#external_id" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
|
||||
{ name: 'filters',
|
||||
optionName: 'filters',
|
||||
title: 'Filters [ ]',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Filters <a href="https://documentation.onesignal.com/reference/notification-parameters#filters" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'include_aliases',
|
||||
optionName: 'include_aliases',
|
||||
title: 'Include Aliases',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Include Aliases <a href="https://documentation.onesignal.com/reference/notification-parameters#include_aliases" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
|
||||
{ name: 'include_subscription_ids',
|
||||
optionName: 'include_subscription_ids',
|
||||
title: 'Include Subscription IDs [ ]',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Include Subscription IDs <a href="https://documentation.onesignal.com/reference/notification-parameters#include_subscription_ids" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'target_channel',
|
||||
optionName: 'target_channel',
|
||||
title: 'Target Channel',
|
||||
serverDataBindings: true,
|
||||
type: 'textarea',
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Target Channel <a href="https://documentation.onesignal.com/reference/notification-parameters#target_channel" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'send_after',
|
||||
optionName: 'send_after',
|
||||
title: 'Send After',
|
||||
serverDataBindings: true,
|
||||
type: 'textarea',
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Send After <a href="https://documentation.onesignal.com/reference/notification-parameters#send_after" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
|
||||
{ name: 'delivery_time_of_day',
|
||||
optionName: 'delivery_time_of_day',
|
||||
title: 'Delivery time of day',
|
||||
serverDataBindings: true,
|
||||
type: 'textarea',
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Delivery time of day <a href="https://documentation.onesignal.com/reference/notification-parameters#delivery_time_of_day" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'throttle_rate_per_minute',
|
||||
optionName: 'throttle_rate_per_minute',
|
||||
title: 'Throttle rate per minute',
|
||||
serverDataBindings: true,
|
||||
type: 'textarea',
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Throttle rate per minute <a href="https://documentation.onesignal.com/reference/notification-parameters#throttle_rate_per_minute" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/update-template" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>'
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,355 @@
|
|||
|
||||
{
|
||||
type: 'onesignal_push_template_onesignal_push_template',
|
||||
module : 'onesignal_push_template',
|
||||
action : 'onesignal_push_template',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Create Push Template ',
|
||||
icon : 'fab fa-solid fa-pushed comp-flows',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [
|
||||
|
||||
{"type": "text","name": "id" },
|
||||
{"type": "text","name": "name" },
|
||||
{"type": "text","name": "created_at" },
|
||||
{"type": "text","name": "updated_at" },
|
||||
{"type": "text","name": "channel" },
|
||||
{"type": "object","name": "content",
|
||||
"sub": [
|
||||
{"type": "boolean","name": "isAndroid" },
|
||||
{"type": "boolean","name": "isIos" },
|
||||
{"type": "boolean","name": "isMacOSX" },
|
||||
{"type": "boolean","name": "isAdm" },
|
||||
{"type": "text","name": "isAlexa" },
|
||||
{"type": "boolean","name": "isWP" },
|
||||
{"type": "boolean","name": "isWP_WNS" },
|
||||
{"type": "boolean","name": "isChrome" },
|
||||
{"type": "boolean","name": "isChromeWeb" },
|
||||
{"type": "boolean","name": "isSafari" },
|
||||
{"type": "boolean","name": "isFirefox" },
|
||||
{"type": "boolean","name": "isEdge" },
|
||||
{"type": "object","name": "headings",
|
||||
"sub": [
|
||||
{"type": "text","name": "en"}
|
||||
]
|
||||
},
|
||||
{"type": "text","name": "subtitle" },
|
||||
{"type": "object","name": "contents",
|
||||
"sub": [
|
||||
{"type": "text","name": "en"}
|
||||
]
|
||||
},
|
||||
{"type": "text","name": "global_image" },
|
||||
{"type": "text","name": "url" },
|
||||
{"type": "text","name": "isEmail" },
|
||||
{"type": "text","name": "email_body" },
|
||||
{"type": "text","name": "email_subject" },
|
||||
{"type": "text","name": "email_preheader" },
|
||||
{"type": "text","name": "isSMS" },
|
||||
{"type": "text","name": "sms_from" },
|
||||
{"type": "text","name": "sms_media_urls" },
|
||||
{"type": "text","name": "email_reply_to_address" },
|
||||
{"type": "text","name": "disable_email_click_tracking" }
|
||||
]
|
||||
}
|
||||
{name: 'status',type: 'number'}
|
||||
],
|
||||
usedModules : {}
|
||||
properties : [
|
||||
{
|
||||
group: 'Template Settings',
|
||||
variables: [
|
||||
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osc1"
|
||||
},
|
||||
{
|
||||
name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'Application ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'You App ID'
|
||||
},
|
||||
{
|
||||
name: 'tname',
|
||||
optionName: 'tname',
|
||||
title: 'Template Name',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Template Name'
|
||||
},
|
||||
{ name: 'included_segments',
|
||||
optionName: 'included_segments',
|
||||
title: 'Included Segments',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Included Segmants <a href="https://documentation.onesignal.com/reference/notification-parameters#included_segments" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'push_type', optionName: 'push_type', title: 'Push Type' type: 'text',
|
||||
type: 'droplist',
|
||||
values: [
|
||||
{title: 'web', value: 'web' },
|
||||
{title: 'email', value: 'email'},
|
||||
{title: 'sms', value: 'sms'},
|
||||
], defaultValue: 'web',
|
||||
help: 'Choose type of push.'
|
||||
},
|
||||
{
|
||||
name: "headings",
|
||||
optionName: "headings",
|
||||
key: "var",
|
||||
keyValue: "value",
|
||||
title: "Languages and Headings",
|
||||
type: "grid",
|
||||
defaultValue: {},
|
||||
serverDataBindings: true,
|
||||
columns: [
|
||||
{
|
||||
field: "var",
|
||||
caption: "Language",
|
||||
size: "30%",
|
||||
editable: {
|
||||
type: "static"
|
||||
}
|
||||
},
|
||||
{
|
||||
field: "value",
|
||||
caption: "Text",
|
||||
size: "70%",
|
||||
editable: {
|
||||
type: "datapicker"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'os_title_prompt',
|
||||
optionName: 'os_title_prompt',
|
||||
title: 'Title ',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: ' Recommended about 60-80 characters limit'
|
||||
},
|
||||
{
|
||||
name: "bindings",
|
||||
optionName: "bindings",
|
||||
key: "var",
|
||||
keyValue: "value",
|
||||
title: "Languages & Messages",
|
||||
type: "grid",
|
||||
defaultValue: {},
|
||||
serverDataBindings: true,
|
||||
columns: [
|
||||
{
|
||||
field: "var",
|
||||
caption: "Language",
|
||||
size: "30%",
|
||||
editable: {
|
||||
type: "static"
|
||||
}
|
||||
},
|
||||
{
|
||||
field: "value",
|
||||
caption: "Text",
|
||||
size: "70%",
|
||||
editable: {
|
||||
type: "datapicker"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
name: 'os_msg_prompt',
|
||||
optionName: 'os_msg_prompt',
|
||||
title: 'Main Image',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: ' Recommended about 150 characters message limit unless email'
|
||||
},
|
||||
{ name: 'target_channel',
|
||||
optionName: 'target_channel',
|
||||
title: 'Target Channel',
|
||||
serverDataBindings: true,
|
||||
type: 'textarea',
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Target Channel <a href="https://documentation.onesignal.com/reference/notification-parameters#target_channel" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{
|
||||
name: 'big_picture',
|
||||
optionName: 'big_picture',
|
||||
title: 'Big Picture',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Big Picture <a href="https://documentation.onesignal.com/reference/push-notification#big_picture" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{
|
||||
name: 'large_icon',
|
||||
optionName: 'large_icon',
|
||||
title: 'Icon Image',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Large Icon <a href="https://documentation.onesignal.com/reference/push-notification#large_icon" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
|
||||
{
|
||||
name: 'url',
|
||||
optionName: 'url',
|
||||
title: 'Target URL',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a href="https://documentation.onesignal.com/reference/push-notification#url" style="color: #ffffff" target="_blank">Refererence - URL Opened when Clicked</a>'
|
||||
},
|
||||
{
|
||||
name: 'web_url',
|
||||
optionName: 'web_url',
|
||||
title: 'Target URL (web push only)',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a href="https://documentation.onesignal.com/reference/push-notification#web_url" style="color: #ffffff" target="_blank">Refererence - URL Opened when Clicked</a>'
|
||||
},
|
||||
{ name: 'data',
|
||||
optionName: 'data',
|
||||
title: 'Data { }',
|
||||
type: 'textarea',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Data as JSON <a href="https://documentation.onesignal.com/reference/push-notification#data" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'custom_data',
|
||||
optionName: 'custom_data',
|
||||
title: 'Custom data { }',
|
||||
type: 'textarea',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Custom Data as JSON <a href="https://documentation.onesignal.com/reference/notification-parameters#custom_data" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'external_id',
|
||||
optionName: 'external_id',
|
||||
title: 'External ID [ ]',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'External ID <a href="https://documentation.onesignal.com/reference/notification-parameters#external_id" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
|
||||
{ name: 'filters',
|
||||
optionName: 'filters',
|
||||
title: 'Filters [ ]',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Filters <a href="https://documentation.onesignal.com/reference/notification-parameters#filters" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'include_aliases',
|
||||
optionName: 'include_aliases',
|
||||
title: 'Include Aliases',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Include Aliases <a href="https://documentation.onesignal.com/reference/notification-parameters#include_aliases" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
|
||||
{ name: 'include_subscription_ids',
|
||||
optionName: 'include_subscription_ids',
|
||||
title: 'Include Subscription IDs [ ]',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Include Subscription IDs <a href="https://documentation.onesignal.com/reference/notification-parameters#include_subscription_ids" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'target_channel',
|
||||
optionName: 'target_channel',
|
||||
title: 'Target Channel',
|
||||
serverDataBindings: true,
|
||||
type: 'textarea',
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Target Channel <a href="https://documentation.onesignal.com/reference/notification-parameters#target_channel" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'send_after',
|
||||
optionName: 'send_after',
|
||||
title: 'Send After',
|
||||
serverDataBindings: true,
|
||||
type: 'textarea',
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Send After <a href="https://documentation.onesignal.com/reference/notification-parameters#send_after" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'delayed_option',
|
||||
optionName: 'delayed_option',
|
||||
title: 'Delayed Option',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Delayed Option <a href="https://documentation.onesignal.com/reference/notification-parameters#delayed_option" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'delivery_time_of_day',
|
||||
optionName: 'delivery_time_of_day',
|
||||
title: 'Delivery time of day',
|
||||
serverDataBindings: true,
|
||||
type: 'textarea',
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Delivery time of day <a href="https://documentation.onesignal.com/reference/notification-parameters#delivery_time_of_day" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'throttle_rate_per_minute',
|
||||
optionName: 'throttle_rate_per_minute',
|
||||
title: 'Throttle rate per minute',
|
||||
serverDataBindings: true,
|
||||
type: 'textarea',
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Throttle rate per minute <a href="https://documentation.onesignal.com/reference/notification-parameters#throttle_rate_per_minute" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/create-notification" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>'
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
|
||||
{
|
||||
type: 'onesignal_update_template_onesignal_update_template',
|
||||
module : 'onesignal_update_template',
|
||||
action : 'onesignal_update_template',
|
||||
groupTitle : 'Onesignal Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal update Template ',
|
||||
icon : 'fab fa-solid fa-pushed comp-flows',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [
|
||||
|
||||
{"type": "text","name": "id" },
|
||||
{"type": "text","name": "name" },
|
||||
{"type": "text","name": "created_at" },
|
||||
{"type": "text","name": "updated_at" },
|
||||
{"type": "text","name": "channel" },
|
||||
{"type": "object","name": "content",
|
||||
"sub": [
|
||||
{"type": "boolean","name": "isAndroid" },
|
||||
{"type": "boolean","name": "isIos" },
|
||||
{"type": "boolean","name": "isMacOSX" },
|
||||
{"type": "boolean","name": "isAdm" },
|
||||
{"type": "text","name": "isAlexa" },
|
||||
{"type": "boolean","name": "isWP" },
|
||||
{"type": "boolean","name": "isWP_WNS" },
|
||||
{"type": "boolean","name": "isChrome" },
|
||||
{"type": "boolean","name": "isChromeWeb" },
|
||||
{"type": "boolean","name": "isSafari" },
|
||||
{"type": "boolean","name": "isFirefox" },
|
||||
{"type": "boolean","name": "isEdge" },
|
||||
{"type": "object","name": "headings",
|
||||
"sub": [
|
||||
{"type": "text","name": "en"}
|
||||
]
|
||||
},
|
||||
{"type": "text","name": "subtitle" },
|
||||
{"type": "object","name": "contents",
|
||||
"sub": [
|
||||
{"type": "text","name": "en"}
|
||||
]
|
||||
},
|
||||
{"type": "text","name": "global_image" },
|
||||
{"type": "text","name": "url" },
|
||||
{"type": "text","name": "isEmail" },
|
||||
{"type": "text","name": "email_body" },
|
||||
{"type": "text","name": "email_subject" },
|
||||
{"type": "text","name": "email_preheader" },
|
||||
{"type": "text","name": "isSMS" },
|
||||
{"type": "text","name": "sms_from" },
|
||||
{"type": "text","name": "sms_media_urls" },
|
||||
{"type": "text","name": "email_reply_to_address" },
|
||||
{"type": "text","name": "disable_email_click_tracking" }
|
||||
]
|
||||
}
|
||||
{name: 'status',type: 'number'}
|
||||
],
|
||||
usedModules : {}
|
||||
properties : [
|
||||
{
|
||||
group: 'Template Settings',
|
||||
variables: [
|
||||
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osc1"
|
||||
},
|
||||
{
|
||||
name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'Application ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'You App ID'
|
||||
},
|
||||
{
|
||||
name: 'template_id',
|
||||
optionName: 'template_id',
|
||||
title: 'Template ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Template Name'
|
||||
},
|
||||
|
||||
|
||||
{ name: 'external_id',
|
||||
optionName: 'external_id',
|
||||
title: 'External ID [ ]',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'External ID <a href="https://documentation.onesignal.com/reference/notification-parameters#external_id" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
|
||||
{ name: 'tname',
|
||||
optionName: 'tname',
|
||||
title: 'Template name',
|
||||
type: 'text',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Template name <a href="https://documentation.onesignal.com/reference/notification-parameters#filters" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'include_aliases',
|
||||
optionName: 'include_aliases',
|
||||
title: 'Include Aliases',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Include Aliases <a href="https://documentation.onesignal.com/reference/notification-parameters#include_aliases" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
|
||||
{ name: 'include_subscription_ids',
|
||||
optionName: 'include_subscription_ids',
|
||||
title: 'Include Subscription IDs [ ]',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Include Subscription IDs <a href="https://documentation.onesignal.com/reference/notification-parameters#include_subscription_ids" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'target_channel',
|
||||
optionName: 'target_channel',
|
||||
title: 'Target Channel',
|
||||
serverDataBindings: true,
|
||||
type: 'textarea',
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Target Channel <a href="https://documentation.onesignal.com/reference/notification-parameters#target_channel" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'send_after',
|
||||
optionName: 'send_after',
|
||||
title: 'Send After',
|
||||
serverDataBindings: true,
|
||||
type: 'textarea',
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Send After <a href="https://documentation.onesignal.com/reference/notification-parameters#send_after" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'delayed_option',
|
||||
optionName: 'delayed_option',
|
||||
title: 'Delayed Option',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Delayed Option <a href="https://documentation.onesignal.com/reference/notification-parameters#delayed_option" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'delivery_time_of_day',
|
||||
optionName: 'delivery_time_of_day',
|
||||
title: 'Delivery time of day',
|
||||
serverDataBindings: true,
|
||||
type: 'textarea',
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Delivery time of day <a href="https://documentation.onesignal.com/reference/notification-parameters#delivery_time_of_day" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'throttle_rate_per_minute',
|
||||
optionName: 'throttle_rate_per_minute',
|
||||
title: 'Throttle rate per minute',
|
||||
serverDataBindings: true,
|
||||
type: 'textarea',
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'Throttle rate per minute <a href="https://documentation.onesignal.com/reference/notification-parameters#throttle_rate_per_minute" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/create-notification" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>'
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,149 @@
|
|||
{
|
||||
type: 'onesignal_view_templates_onesignal_view_templates',
|
||||
module : 'onesignal_view_templates',
|
||||
action : 'onesignal_view_templates',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal View Templates List',
|
||||
icon : 'far fa-solid fa-eye comp-flows',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [
|
||||
{"type": "number","name": "total_count"},
|
||||
{"type": "number","name": "offset"},
|
||||
{"type": "number","name": "limit"},
|
||||
{"type": "array","name": "notifications",
|
||||
"sub": [
|
||||
{"type": "text","name": "app_id"},
|
||||
{"type": "text","name": "chrome_web_icon"},
|
||||
{"type": "text","name": "ios_interruption_level"},
|
||||
{"type": "number","name": "ios_relevance_score"},
|
||||
{"type": "text","name": "name"},
|
||||
{"type": "object","name": "contents",
|
||||
"sub": [
|
||||
{"type": "text","name": "en" }
|
||||
]
|
||||
},
|
||||
{"type": "number","name": "converted"},
|
||||
{"type": "object","name": "data",
|
||||
"sub": [
|
||||
{"type": "text","name": "your_data_key"}
|
||||
]
|
||||
},
|
||||
{"type": "number","name": "errored"},
|
||||
{"type": "array","name": "excluded_segments",
|
||||
"sub": [
|
||||
{"type": "text","name": "$value"}
|
||||
]
|
||||
},
|
||||
{"type": "number","name": "failed"},
|
||||
{"type": "object","name": "headings",
|
||||
"sub": [
|
||||
{"type": "text","name": "en" }
|
||||
]
|
||||
},
|
||||
{"type": "text","name": "id" },
|
||||
{"type": "array","name": "included_segments",
|
||||
"sub": [
|
||||
{"type": "text","name": "$value" }
|
||||
]
|
||||
},
|
||||
{"type": "number","name": "queued_at"},
|
||||
{"type": "number","name": "send_after"},
|
||||
{"type": "number","name": "completed_at"},
|
||||
{"type": "number","name": "successful"},
|
||||
{"type": "number","name": "received"},
|
||||
{"type": "text","name": "template_id"},
|
||||
{"type": "number","name": "ttl"},
|
||||
{"type": "text","name": "url"},
|
||||
{"type": "text","name": "web_url"},
|
||||
{
|
||||
"type": "text","name": "app_url"},
|
||||
{"type": "key_array","name": "platform_delivery_stats",
|
||||
"sub": [
|
||||
{"type": "number","name": "successful"},
|
||||
{"type": "number","name": "failed"},
|
||||
{"type": "number","name": "errored"},
|
||||
{"type": "number","name": "converted"},
|
||||
{"type": "number","name": "received"}
|
||||
]
|
||||
},
|
||||
{"type": "object","name": "ios_attachments",
|
||||
"sub": [
|
||||
{"type": "text","name": "id"}
|
||||
]}]}
|
||||
{name: 'status',type: 'number'}
|
||||
],
|
||||
usedModules : {}
|
||||
properties : [
|
||||
{
|
||||
group: 'Settings',
|
||||
variables: [
|
||||
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "vt1"
|
||||
},
|
||||
{
|
||||
name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'Application ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'You App ID'
|
||||
},
|
||||
{
|
||||
name: 'limit',
|
||||
optionName: 'limit',
|
||||
title: 'Limit (max 50)',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '50',
|
||||
help: 'Limit max and default 50'
|
||||
},
|
||||
{
|
||||
name: 'offset',
|
||||
optionName: 'offset',
|
||||
title: 'Offset',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '0',
|
||||
help: 'Offset'
|
||||
},
|
||||
{ name: 'channel', optionName: 'channel', title: 'Channel' type: 'text',
|
||||
type: 'droplist',
|
||||
values: [
|
||||
{title: 'All', value: 'all' },
|
||||
{title: 'push', value: 'push' },
|
||||
{title: 'email', value: 'email'},
|
||||
{title: 'sms', value: 'sms'},
|
||||
], defaultValue: 'all',
|
||||
initValue: 'all',
|
||||
help: 'Choose type of push.'
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/view-templates" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>'
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
|
||||
{
|
||||
type: 'onesignal_view_template_onesignal_view_template',
|
||||
module : 'onesignal_view_template',
|
||||
action : 'onesignal_view_template',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp-general',
|
||||
title : 'Onesignal View Template',
|
||||
icon : 'fas fa-solid fa-eye comp-flows',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [
|
||||
|
||||
{"type": "text","name": "id"},
|
||||
{"type": "text","name": "name"},
|
||||
{"type": "text","name": "created_at"},
|
||||
{"type": "text","name": "updated_at"},
|
||||
{"type": "text","name": "channel"},
|
||||
{"type": "object","name": "content",
|
||||
"sub": [
|
||||
{"type": "boolean","name": "isAndroid" },
|
||||
{"type": "boolean","name": "isIos" },
|
||||
{"type": "boolean","name": "isMacOSX" },
|
||||
{"type": "boolean","name": "isAdm" },
|
||||
{"type": "text", "name": "isAlexa" },
|
||||
{"type": "boolean","name": "isWP" },
|
||||
{"type": "boolean","name": "isWP_WNS" },
|
||||
{"type": "boolean","name": "isChrome" },
|
||||
{"type": "boolean","name": "isChromeWeb" },
|
||||
{"type": "boolean","name": "isSafari" },
|
||||
{"type": "boolean","name": "isFirefox" },
|
||||
{"type": "boolean","name": "isEdge" },
|
||||
{"type": "object","name": "headings","sub": [
|
||||
{"type": "text","name": "en" }
|
||||
]
|
||||
},
|
||||
{"type": "text","name": "subtitle" },
|
||||
{"type": "object","name": "contents","sub": [
|
||||
{"type": "text","name": "en" }
|
||||
]
|
||||
},
|
||||
{"type": "text","name": "global_image" },
|
||||
{"type": "text","name": "url" },
|
||||
{"type": "text","name": "isEmail" },
|
||||
{"type": "text","name": "email_body" },
|
||||
{"type": "text","name": "email_subject" },
|
||||
{"type": "text","name": "email_preheader" },
|
||||
{"type": "text","name": "isSMS" },
|
||||
{"type": "text","name": "sms_from" },
|
||||
{"type": "text","name": "sms_media_urls" },
|
||||
{"type": "text","name": "email_reply_to_address" },
|
||||
{"type": "text","name": "disable_email_click_tracking" }
|
||||
]
|
||||
}
|
||||
{name: 'status',type: 'number'}
|
||||
],
|
||||
usedModules : {}
|
||||
properties : [
|
||||
{
|
||||
group: 'Settings',
|
||||
variables: [
|
||||
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "vtp1"
|
||||
},
|
||||
{
|
||||
name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'Application ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'You App ID'
|
||||
},
|
||||
|
||||
{
|
||||
name: 'template_id',
|
||||
optionName: 'template_id',
|
||||
title: 'Template ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Template id'
|
||||
},
|
||||
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/view-template" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>'
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
|
||||
{
|
||||
type: 'onesignal_delete_template_onesignal_delete_template',
|
||||
module : 'onesignal_delete_template',
|
||||
action : 'onesignal_delete_template',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Delete template',
|
||||
icon : 'far fa-solid fa-minus-square comp-flows',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [ {name: 'status',type: 'number'} ],
|
||||
usedModules : {}
|
||||
properties : [
|
||||
{
|
||||
group: 'Delete Template</i>',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "ds1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'You App ID'
|
||||
|
||||
},
|
||||
{ name: 'template_id',
|
||||
optionName: 'template_id',
|
||||
title: 'Template ID to delete',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Template ID to delete'
|
||||
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
|
||||
{
|
||||
type: 'onesignal_copy_template_to_app_onesignal_copy_template_to_app',
|
||||
module : 'onesignal_copy_template_to_app',
|
||||
action : 'onesignal_copy_template_to_app',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Copy Template to another APP',
|
||||
icon : 'fas fa-solid fa-copy comp-flows',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [{"type": "boolean","name": "success"},
|
||||
{name: 'status',type: 'number'} ],
|
||||
usedModules : {}
|
||||
properties : [
|
||||
{
|
||||
group: 'Onesignal Properties',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "ds1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'You App ID'
|
||||
|
||||
},
|
||||
{ name: 'template_id',
|
||||
optionName: 'template_id',
|
||||
title: 'Source Template ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Template ID to move'
|
||||
|
||||
},
|
||||
{ name: 'target_appid',
|
||||
optionName: 'target_appid',
|
||||
title: 'Target App ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Target App ID'
|
||||
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/copy-template-to-another-app" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>'
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
|
||||
{
|
||||
type: 'onesignal_createuser_onesignal_createuser',
|
||||
module : 'onesignal_createuser',
|
||||
action : 'onesignal_createuser',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Create User*',
|
||||
icon : 'fas fa-solid fa-user-plus comp-flows',
|
||||
serverModel : ['node'],
|
||||
|
||||
dataPickObject: true,
|
||||
|
||||
dataScheme: [
|
||||
{name: 'apps', type: 'array', sub: [
|
||||
{ name: 'id', type: 'text' },
|
||||
{ name: 'name', type: 'text' },
|
||||
{name: 'status',type: 'number'}
|
||||
]
|
||||
}
|
||||
],
|
||||
usedModules : {
|
||||
node: {
|
||||
}
|
||||
}
|
||||
properties : [
|
||||
{
|
||||
group: 'Create User',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "ospl1"
|
||||
},
|
||||
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App Id',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
},
|
||||
|
||||
|
||||
{ name: 'identity',
|
||||
optionName: 'identity',
|
||||
title: 'External Identity',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
},
|
||||
{ name: 'pushtype',
|
||||
optionName: 'pushtype',
|
||||
title: 'Push Type'
|
||||
type: 'droplist',
|
||||
values: [
|
||||
{title: 'IOSPush', value: 'IOSPush' },
|
||||
{title: 'AndroidPush', value: 'AndroidPush'},
|
||||
{title: 'FireOSPush', value: 'FireOSPush'},
|
||||
{title: 'ChromeExtensionPush', value: 'ChromeExtensionPush' },
|
||||
{title: 'ChromePush', value: 'ChromePush'},
|
||||
{title: 'WindowsPush', value: 'WindowsPush'},
|
||||
{title: 'SafariLegacyPush', value: 'SafariLegacyPush' },
|
||||
{title: 'FirefoxPush', value: 'FirefoxPush'},
|
||||
{title: 'macOSPush', value: 'macOSPush'},
|
||||
{title: 'HuaweiPush', value: 'HuaweiPush' },
|
||||
{title: 'Email', value: 'Email'},
|
||||
{title: 'SMS', value: 'SMS'}
|
||||
],
|
||||
defaultValue: 'IOSPush',
|
||||
InitValue: 'IOSPush',
|
||||
help: 'Choose type of push.'
|
||||
},
|
||||
|
||||
{ name: 'token',
|
||||
optionName: 'token',
|
||||
title: 'Token',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
},
|
||||
{ name: 'identity',
|
||||
optionName: 'Identity',
|
||||
title: 'Identities (key:value)',
|
||||
type: 'textarea',
|
||||
serverDataBindings: true,
|
||||
required:false,
|
||||
defaultValue: '',
|
||||
help: 'External ID <a href="https://documentation.onesignal.com/reference/create-user#identity" style="color: #ffffff" target="_blank">Refererence</a>'
|
||||
},
|
||||
{
|
||||
name: "tags",
|
||||
optionName: "tags",
|
||||
key: "var",
|
||||
keyValue: "value",
|
||||
title: "User Tags",
|
||||
type: "grid",
|
||||
defaultValue: {},
|
||||
serverDataBindings: true,
|
||||
columns: [
|
||||
{
|
||||
field: "var",
|
||||
caption: "Key",
|
||||
size: "30%",
|
||||
editable: {
|
||||
type: "static"
|
||||
}
|
||||
},
|
||||
{
|
||||
field: "value",
|
||||
caption: "Value",
|
||||
size: "70%",
|
||||
editable: {
|
||||
type: "datapicker"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{ name: 'enabled',
|
||||
optionName: 'enabled',
|
||||
title: 'Enable',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
}
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
|
||||
{
|
||||
type: 'onesignal_getuser_onesignal_getuser',
|
||||
module : 'onesignal_getuser',
|
||||
action : 'onesignal_getuser',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Get User*',
|
||||
icon : 'fas fa-solid fa-user comp-flows',
|
||||
serverModel : ['node'],
|
||||
|
||||
dataPickObject: true,
|
||||
|
||||
dataScheme: [
|
||||
{name: 'properties', type: 'object', sub: [
|
||||
{ name: 'language', type: 'text' },
|
||||
{ name: 'timezone_id', type: 'text' },
|
||||
{ name: 'first_active', type: 'text' },
|
||||
{ name: 'last_active', type: 'text' } ]},
|
||||
|
||||
{name: 'identity', type: 'object', sub: [
|
||||
{name: 'onesignal_id', type: 'text' },
|
||||
]},
|
||||
{name: 'subscriptions', type: 'array', sub: [
|
||||
{ name: 'id', type: 'text' },
|
||||
{ name: 'app_id', type: 'text' },
|
||||
{ name: 'type', type: 'text' },
|
||||
{ name: 'token', type: 'text' },
|
||||
{ name: 'enabled', type: 'text' },
|
||||
{ name: 'notification_types', type: 'text' },
|
||||
{ name: 'session_time', type: 'text' },
|
||||
{ name: 'session_count', type: 'text' },
|
||||
{ name: 'sdk', type: 'text' },
|
||||
{ name: 'device_model', type: 'text' },
|
||||
{ name: 'device_os', type: 'text' },
|
||||
{ name: 'rooted', type: 'text' },
|
||||
{ name: 'test_type', type: 'text' },
|
||||
{ name: 'app_version', type: 'text' },
|
||||
{ name: 'net_type', type: 'text' },
|
||||
{ name: 'carrier', type: 'text' },
|
||||
{ name: 'web_auth', type: 'text' },
|
||||
{ name: 'web_p256', type: 'text' }
|
||||
]},
|
||||
{name: 'status',type: 'number'}
|
||||
]
|
||||
,
|
||||
|
||||
properties : [
|
||||
{
|
||||
group: 'Get User',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osgu1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App Id',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
},
|
||||
{ name: 'prompt_text',
|
||||
optionName: 'prompt_text',
|
||||
title: 'prompt_text',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '(onesignal_id can be used as a special alias_label, using the string "onesignal_id" as the alias_label and the UUID as the alias_id.)'
|
||||
|
||||
},
|
||||
|
||||
{ name: 'alias_label',
|
||||
optionName: 'alias_label',
|
||||
title: 'Alias Label',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
|
||||
},
|
||||
{ name: 'alias_label_prompt',
|
||||
optionName: 'alias_label_prompt',
|
||||
title: 'Alias Label',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '(enter "onesignal_id" if using onesignal_id instead of alias)'
|
||||
},
|
||||
{ name: 'alias_id',
|
||||
optionName: 'alias_id',
|
||||
title: 'Alias ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
|
||||
},
|
||||
|
||||
|
||||
{ name: 'alias_id_prompt',
|
||||
optionName: 'alias_id_prompt',
|
||||
title: 'Alias ID prompt',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '(enter your onesignal_id UUID here if not using alias)'
|
||||
},
|
||||
{ name: 'os_id',
|
||||
optionName: 'os_id',
|
||||
title: 'Onesignal ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
initDisplay: 'none'
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
} ] } ] }
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
type: 'onesignal_delete_user_alias_onesignal_delete_user_alias',
|
||||
module : 'onesignal_delete_user_alias',
|
||||
action : 'onesignal_delete_user_alias',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp-general',
|
||||
title : 'Onesignal Delete User Alias',
|
||||
icon : 'fas fa-solid fa-user-ninja comp-flows',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [ {name: 'status',type: 'number'} ],
|
||||
properties : [
|
||||
{
|
||||
group: 'Onesignal Settings',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "dua1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'You App ID'
|
||||
|
||||
},
|
||||
{ name: 'alias_label',
|
||||
optionName: 'alias_label',
|
||||
title: 'Alias Label',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Alias Label'
|
||||
},
|
||||
|
||||
{ name: 'alias_id',
|
||||
optionName: 'alias_id',
|
||||
title: 'Alias ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Alias ID'
|
||||
},
|
||||
{ name: 'alias_label_to_delete',
|
||||
optionName: 'alias_label_to_delete',
|
||||
title: 'Alias Label to delete',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Alias Label to delete'
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/delete-alias" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>'
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
|
||||
{
|
||||
type: 'onesignal_deleteuser_onesignal_deleteuser',
|
||||
module : 'onesignal_deleteuser',
|
||||
action : 'onesignal_deleteuser',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp_general',
|
||||
title : 'Onesignal Delete User',
|
||||
icon : 'fas fa-solid fa-user-minus comp-flows',
|
||||
serverModel : ['node'],
|
||||
|
||||
dataPickObject: true,
|
||||
|
||||
dataScheme: [
|
||||
{name: 'status',type: 'number'}
|
||||
]
|
||||
,
|
||||
|
||||
properties : [
|
||||
{
|
||||
group: 'Delete User',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osgu1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App Id',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
},
|
||||
|
||||
{ name: 'alias_label',
|
||||
optionName: 'alias_label',
|
||||
title: 'Alias Label',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
|
||||
},
|
||||
{ name: 'alias_label_prompt',
|
||||
optionName: 'alias_label_prompt',
|
||||
title: 'Alias Label',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '(enter "onesignal_id" if using onesignal_id instead of alias)'
|
||||
},
|
||||
{ name: 'alias_id',
|
||||
optionName: 'alias_id',
|
||||
title: 'Alias ID',
|
||||
type: 'text',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: ''
|
||||
|
||||
},
|
||||
{ name: 'alias_id_prompt',
|
||||
optionName: 'alias_id_prompt',
|
||||
title: 'Alias ID prompt',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '(enter your onesignal_id UUID here if not using alias)'
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
} ] } ] }
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
type: 'onesignal_view_user_identity_onesignal_view_user_identity',
|
||||
module : 'onesignal_view_user_identity',
|
||||
action : 'onesignal_view_user_identity',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp-general',
|
||||
title : 'Onesignal view_user_identity',
|
||||
icon : 'fas fa-solid fa-user-secret comp-flows',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [ {name: 'status',type: 'number'} ],
|
||||
properties : [
|
||||
{
|
||||
group: 'Onesignal Settings',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "vui1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'You App ID'
|
||||
},
|
||||
{ name: 'alias_label',
|
||||
optionName: 'alias_label',
|
||||
title: 'Alias Label',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Alias Label'
|
||||
},
|
||||
|
||||
{ name: 'alias_id',
|
||||
optionName: 'alias_id',
|
||||
title: 'Alias ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Alias ID'
|
||||
},
|
||||
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/fetch-aliases" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>'
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
type: 'onesignal_view_user_identity_by_sub_onesignal_view_user_identity_by_sub',
|
||||
module : 'onesignal_view_user_identity_by_sub',
|
||||
action : 'onesignal_view_user_identity_by_sub',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp-flows',
|
||||
title : 'Onesignal View User Identity by Subscription',
|
||||
icon : 'fas fa-solid fa-user-tag comp-flows',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [ {name: 'status',type: 'number'} ],
|
||||
properties : [
|
||||
{
|
||||
group: 'Onesignal Settings',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "vi1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'You App ID'
|
||||
|
||||
},
|
||||
{ name: 'subscription_id',
|
||||
optionName: 'subscription_id',
|
||||
title: 'Subscription ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Subscription ID'
|
||||
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
}
|
||||
]}]}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
|
||||
{
|
||||
type: 'onesignal_create_alias_by_subscription_onesignal_create_alias_by_subscription',
|
||||
module : 'onesignal_create_alias_by_subscription',
|
||||
action : 'onesignal_create_alias_by_subscription',
|
||||
groupTitle : 'Notification Modules',
|
||||
groupIcon : 'fas fa-solid fa-satellite-dish comp-general',
|
||||
title : 'Onesignal create alias by subscription',
|
||||
icon : 'fas fa-solid fa-id-card comp-flows',
|
||||
serverModel : ['node'],
|
||||
dataPickObject: true,
|
||||
dataScheme: [ {name: 'status',type: 'number'} ],
|
||||
properties : [
|
||||
{
|
||||
group: 'Onesignal Settings',
|
||||
variables: [
|
||||
{ name: 'actionName',
|
||||
optionName: 'name',
|
||||
title: 'Name',
|
||||
type: 'text',
|
||||
required: true,
|
||||
defaultValue: '',
|
||||
baseName: "osc1"
|
||||
},
|
||||
{ name: 'appid',
|
||||
optionName: 'appid',
|
||||
title: 'App ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'You App ID'
|
||||
},
|
||||
|
||||
{ name: 'subscription_id',
|
||||
optionName: 'subscription_id',
|
||||
title: 'Subscription ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Subscription ID'
|
||||
},
|
||||
{ name: 'alias_label',
|
||||
optionName: 'alias_label',
|
||||
title: 'Alias Label',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Alias Label'
|
||||
},
|
||||
{ name: 'alias_id',
|
||||
optionName: 'alias_id',
|
||||
title: 'Alias ID',
|
||||
type: 'text',
|
||||
required: true,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: 'Alias ID'
|
||||
},
|
||||
|
||||
{ name: 'output',
|
||||
optionName: 'output',
|
||||
title: 'Output',
|
||||
type: 'boolean',
|
||||
defaultValue: false
|
||||
},
|
||||
{
|
||||
name: 'fcmlink',
|
||||
optionName: 'fcmlink',
|
||||
title: 'New App Name',
|
||||
type: 'static',
|
||||
required: false,
|
||||
serverDataBindings: true,
|
||||
defaultValue: '',
|
||||
help: '<a target="_blank" href="https://documentation.onesignal.com/reference/create-alias-by-subscription" style="color: #cc0000">Link to API reference for this module here (opens new browser windows)</a>',
|
||||
}
|
||||
]}]}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue