@jambonz/time-series 0.1.4 → 0.1.7

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/index.js CHANGED
@@ -3,6 +3,7 @@ const Influx = require('influx');
3
3
  const AlertType = {
4
4
  WEBHOOK_STATUS_FAILURE: 'webhook-failure',
5
5
  WEBHOOK_CONNECTION_FAILURE: 'webhook-connection-failure',
6
+ WEBHOOK_URL_NOTFOUND: 'webhook-url-notfound',
6
7
  WEBHOOK_AUTH_FAILURE: 'webhook-auth-failure',
7
8
  TTS_NOT_PROVISIONED: 'no-tts',
8
9
  STT_NOT_PROVISIONED: 'no-stt',
@@ -11,7 +12,8 @@ const AlertType = {
11
12
  CARRIER_NOT_PROVISIONED: 'no-carrier',
12
13
  CALL_LIMIT: 'call-limit',
13
14
  DEVICE_LIMIT: 'device-limit',
14
- API_LIMIT: 'api-limit'
15
+ API_LIMIT: 'api-limit',
16
+ ACCOUNT_INACTIVE: 'account is inactive or suspended'
15
17
  };
16
18
 
17
19
  const schemas = {
@@ -26,7 +28,8 @@ const schemas = {
26
28
  duration: Influx.FieldType.INTEGER,
27
29
  terminated_at: Influx.FieldType.INTEGER,
28
30
  termination_reason: Influx.FieldType.STRING,
29
- remote_host: Influx.FieldType.STRING
31
+ remote_host: Influx.FieldType.STRING,
32
+ trace_id: Influx.FieldType.STRING
30
33
  },
31
34
  tags: [
32
35
  'account_sid',
@@ -210,6 +213,9 @@ const writeAlerts = async(client, alerts) => {
210
213
  case AlertType.WEBHOOK_AUTH_FAILURE:
211
214
  message = `authentication failure: ${url}`;
212
215
  break;
216
+ case AlertType.WEBHOOK_URL_NOTFOUND:
217
+ message = `webhook url not found: ${url}`;
218
+ break;
213
219
  case AlertType.TTS_NOT_PROVISIONED:
214
220
  message = `text to speech credentials for ${vendor} have not been provisioned`;
215
221
  break;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@jambonz/time-series",
3
- "version": "0.1.4",
3
+ "version": "0.1.7",
4
4
  "description": "write and query data to time series daetabase",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "test": "node test/ | ./node_modules/.bin/tap-spec",
7
+ "test": "node test/",
8
8
  "coverage": "./node_modules/.bin/nyc --reporter html --report-dir ./coverage npm run test",
9
9
  "jslint": "eslint index.js"
10
10
  },
@@ -18,7 +18,6 @@
18
18
  "eslint": "^7.23.0",
19
19
  "eslint-plugin-promise": "^4.3.1",
20
20
  "nyc": "^15.1.0",
21
- "tap-spec": "^5.0.0",
22
21
  "tape": "^5.2.2"
23
22
  }
24
23
  }
@@ -2,6 +2,6 @@ version: '3'
2
2
 
3
3
  services:
4
4
  influxdb:
5
- image: influxdb:1.8-alpine
5
+ image: influxdb:1.8
6
6
  ports:
7
7
  - "8086:8086"