@jambonz/time-series 0.2.14 → 0.2.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +3 -3
- package/.github/workflows/publish.yml +3 -3
- package/index.js +8 -5
- package/package.json +1 -1
package/.github/workflows/ci.yml
CHANGED
|
@@ -8,10 +8,10 @@ jobs:
|
|
|
8
8
|
build:
|
|
9
9
|
runs-on: ubuntu-latest
|
|
10
10
|
steps:
|
|
11
|
-
- uses: actions/checkout@
|
|
12
|
-
- uses: actions/setup-node@
|
|
11
|
+
- uses: actions/checkout@v3
|
|
12
|
+
- uses: actions/setup-node@v3
|
|
13
13
|
with:
|
|
14
|
-
node-version:
|
|
14
|
+
node-version: 22
|
|
15
15
|
- name: Install Docker Compose
|
|
16
16
|
run: |
|
|
17
17
|
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
|
@@ -12,10 +12,10 @@ jobs:
|
|
|
12
12
|
runs-on: ubuntu-latest
|
|
13
13
|
|
|
14
14
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
16
|
-
- uses: actions/setup-node@
|
|
15
|
+
- uses: actions/checkout@v3
|
|
16
|
+
- uses: actions/setup-node@v3
|
|
17
17
|
with:
|
|
18
|
-
node-version: '
|
|
18
|
+
node-version: '22.x'
|
|
19
19
|
registry-url: 'https://registry.npmjs.org'
|
|
20
20
|
- run: npm install
|
|
21
21
|
- run: npm publish --access public
|
package/index.js
CHANGED
|
@@ -261,7 +261,7 @@ const createCdrCountQuery = ({trunk, direction, answered, filter, days, start, e
|
|
|
261
261
|
/* for Service Provider */
|
|
262
262
|
const createAlertsQuerySP = ({target_sid, alert_type, page, page_size, days, start, end}) => {
|
|
263
263
|
// eslint-disable-next-line max-len
|
|
264
|
-
let sql = 'SELECT
|
|
264
|
+
let sql = 'SELECT * FROM alerts WHERE service_provider_sid = $service_provider_sid ';
|
|
265
265
|
if (target_sid) sql += 'AND target_sid = $target_sid ';
|
|
266
266
|
if (alert_type) sql += 'AND alert_type = $alert_type ';
|
|
267
267
|
if (days) sql += 'AND time > $timestamp ';
|
|
@@ -611,6 +611,7 @@ const writeAlerts = async(client, alerts) => {
|
|
|
611
611
|
url,
|
|
612
612
|
status,
|
|
613
613
|
vendor,
|
|
614
|
+
label,
|
|
614
615
|
count,
|
|
615
616
|
detail,
|
|
616
617
|
timestamp
|
|
@@ -634,16 +635,18 @@ const writeAlerts = async(client, alerts) => {
|
|
|
634
635
|
message = `${url} return invalid app payload`;
|
|
635
636
|
break;
|
|
636
637
|
case AlertType.TTS_NOT_PROVISIONED:
|
|
637
|
-
message = `text to speech credentials for ${vendor} have not been provisioned`;
|
|
638
|
+
message = `text to speech credentials for ${vendor} (label: ${label || 'none'}) have not been provisioned`;
|
|
638
639
|
break;
|
|
639
640
|
case AlertType.STT_NOT_PROVISIONED:
|
|
640
|
-
message = `speech to text credentials for ${vendor} have not been provisioned`;
|
|
641
|
+
message = `speech to text credentials for ${vendor} (label: ${label || 'none'}) have not been provisioned`;
|
|
641
642
|
break;
|
|
642
643
|
case AlertType.TTS_FAILURE:
|
|
643
|
-
|
|
644
|
+
// eslint-disable-next-line max-len
|
|
645
|
+
message = `text to speech request to ${vendor} (label: ${label || 'none'}) failed; please check your speech credentials`;
|
|
644
646
|
break;
|
|
645
647
|
case AlertType.STT_FAILURE:
|
|
646
|
-
|
|
648
|
+
// eslint-disable-next-line max-len
|
|
649
|
+
message = `speech to text request to ${vendor} (label: ${label || 'none'}) failed; please check your speech credentials`;
|
|
647
650
|
break;
|
|
648
651
|
case AlertType.CARRIER_NOT_PROVISIONED:
|
|
649
652
|
message = 'outbound call failure: no carriers have been provisioned';
|