@edgeiq/edgeiq-api-js 1.8.6 → 1.8.8

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.
@@ -1,16 +1,5 @@
1
1
  import { Base, Filter, Filters, Pagination } from '../models';
2
- export declare enum SenderType {
3
- tcp_sender = "tcp_sender",
4
- http_sender = "http_sender",
5
- dev_sender = "dev_sender",
6
- rest_fwd_sender = "rest_fwd_sender",
7
- plugin_sender = "plugin_sender",
8
- shell_sender = "shell_sender",
9
- opcua_sender = "opcua_sender",
10
- modbus_sender = "modbus_sender",
11
- bacnet_sender = "bacnet_sender",
12
- gcp_pubsub_sender = "gcp_pubsub_sender"
13
- }
2
+ export declare type SenderType = 'bacnet_sender' | 'dev_sender' | 'gcp_pubsub_sender' | 'http_sender' | 'modbus_sender' | 'opcua_sender' | 'plugin_sender' | 'rest_fwd_sender' | 'shell_sender' | 'tcp_sender' | 'workflow_sender';
14
3
  export interface CommandInput {
15
4
  name: string;
16
5
  company_id: string;
@@ -1,13 +1 @@
1
- export var SenderType;
2
- (function (SenderType) {
3
- SenderType["tcp_sender"] = "tcp_sender";
4
- SenderType["http_sender"] = "http_sender";
5
- SenderType["dev_sender"] = "dev_sender";
6
- SenderType["rest_fwd_sender"] = "rest_fwd_sender";
7
- SenderType["plugin_sender"] = "plugin_sender";
8
- SenderType["shell_sender"] = "shell_sender";
9
- SenderType["opcua_sender"] = "opcua_sender";
10
- SenderType["modbus_sender"] = "modbus_sender";
11
- SenderType["bacnet_sender"] = "bacnet_sender";
12
- SenderType["gcp_pubsub_sender"] = "gcp_pubsub_sender";
13
- })(SenderType || (SenderType = {}));
1
+ export {};
@@ -183,30 +183,30 @@ export const Integrations = class extends BaseModelClass {
183
183
  });
184
184
  }
185
185
  };
186
- const checkRequiredValuesByType = (integraion) => {
186
+ const checkRequiredValuesByType = (integration) => {
187
187
  let missingValues = [];
188
- if (integraion.type === 'aws_device_integrations') {
189
- missingValues = getRequiredValues(integraion, [
188
+ if (integration.type === 'aws_device_integrations') {
189
+ missingValues = getRequiredValues(integration, [
190
190
  'region',
191
191
  'external_id',
192
192
  'role_arn',
193
193
  ]);
194
194
  }
195
- if (integraion.type === 'azure_device_integrations') {
196
- missingValues = getRequiredValues(integraion, [
195
+ if (integration.type === 'azure_device_integrations') {
196
+ missingValues = getRequiredValues(integration, [
197
197
  'iot_hub_hostname',
198
198
  'shared_access_key',
199
199
  'access_policy_name',
200
200
  ]);
201
201
  }
202
- if (integraion.type === 'gcp_cloud_native_device_integrations') {
203
- missingValues = getRequiredValues(integraion, [
202
+ if (integration.type === 'gcp_cloud_native_device_integrations') {
203
+ missingValues = getRequiredValues(integration, [
204
204
  'gcp_project_id',
205
205
  'gcp_service_account_key_secret_id',
206
206
  ]);
207
207
  }
208
- if (integraion.type === 'inmarsat_cloud_native_device_integrations') {
209
- missingValues = getRequiredValues(integraion, [
208
+ if (integration.type === 'inmarsat_cloud_native_device_integrations') {
209
+ missingValues = getRequiredValues(integration, [
210
210
  'inmarsat_client_id',
211
211
  'inmarsat_secret',
212
212
  'inmarsat_username',
@@ -217,32 +217,38 @@ const checkRequiredValuesByType = (integraion) => {
217
217
  'inmarsat_mailbox_id',
218
218
  ]);
219
219
  }
220
- if (integraion.type === 'orbcomm_cloud_native_device_integrations') {
221
- missingValues = getRequiredValues(integraion, [
220
+ if (integration.type === 'orbcomm_cloud_native_device_integrations') {
221
+ missingValues = getRequiredValues(integration, [
222
222
  'orbcomm_username',
223
223
  'orbcomm_password',
224
224
  'orbcomm_solution_provider_id',
225
225
  'orbcomm_gateway_account_id',
226
226
  ]);
227
227
  }
228
- if (integraion.type === 'postmark_rule_action_integrations') {
229
- missingValues = getRequiredValues(integraion, ['token']);
228
+ if (integration.type === 'postmark_rule_action_integrations') {
229
+ missingValues = getRequiredValues(integration, ['token']);
230
230
  }
231
- if (integraion.type === 'smtp_rule_action_integrations') {
232
- missingValues = getRequiredValues(integraion, [
231
+ if (integration.type === 'smtp_rule_action_integrations') {
232
+ missingValues = getRequiredValues(integration, [
233
233
  'server',
234
234
  'username',
235
235
  'password',
236
236
  ]);
237
237
  }
238
- if (integraion.type === 'twilio_rule_action_integrations') {
239
- missingValues = getRequiredValues(integraion, ['sid', 'token', 'from']);
238
+ if (integration.type === 'twilio_rule_action_integrations') {
239
+ missingValues = getRequiredValues(integration, ['sid', 'token', 'from']);
240
+ }
241
+ if (integration.type === 'generic_username_password_integrations') {
242
+ missingValues = getRequiredValues(integration, ['username', 'password']);
243
+ }
244
+ if (integration.type === 'generic_token_integrations') {
245
+ missingValues = getRequiredValues(integration, ['token']);
240
246
  }
241
247
  return missingValues;
242
248
  };
243
- const getRequiredValues = (integraion, requiredValues) => {
249
+ const getRequiredValues = (integration, requiredValues) => {
244
250
  return requiredValues.filter((value) => {
245
- if (!integraion[value]) {
251
+ if (!integration[value]) {
246
252
  return true;
247
253
  }
248
254
  return false;
@@ -1,5 +1,5 @@
1
1
  import { Base, Filter, Filters, Pagination } from '../models';
2
- export declare type IntegrationType = 'aws_device_integrations' | 'azure_device_integrations' | 'gcp_cloud_native_device_integrations' | 'gs_cloud_native_device_integrations' | 'inmarsat_cloud_native_device_integrations' | 'orbcomm_cloud_native_device_integrations' | 'postmark_rule_action_integrations' | 'smtp_rule_action_integrations' | 'twilio_rule_action_integrations';
2
+ export declare type IntegrationType = 'aws_device_integrations' | 'azure_device_integrations' | 'gcp_cloud_native_device_integrations' | 'gs_cloud_native_device_integrations' | 'inmarsat_cloud_native_device_integrations' | 'orbcomm_cloud_native_device_integrations' | 'postmark_rule_action_integrations' | 'smtp_rule_action_integrations' | 'twilio_rule_action_integrations' | 'generic_username_password_integrations' | 'generic_token_integrations';
3
3
  export declare type GreengrassVersion = '' | 'v1' | 'v2';
4
4
  export interface IntegrationInput {
5
5
  name: string;
@@ -1,4 +1,3 @@
1
- import { SenderType, } from '.';
2
1
  export const stageURL = {
3
2
  url: 'https://api.stage.edgeiq.io/api/v1/platform/',
4
3
  };
@@ -320,7 +319,7 @@ export const TestDiscoveredDevice = {
320
319
  export const TestCommand = {
321
320
  name: 'Test Command',
322
321
  company_id: parentCompanyId,
323
- sender_type: SenderType.shell_sender,
322
+ sender_type: 'shell_sender',
324
323
  sender: {
325
324
  command: "echo 'testing'",
326
325
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgeiq/edgeiq-api-js",
3
- "version": "1.8.6",
3
+ "version": "1.8.8",
4
4
  "author": "EdgeIQ",
5
5
  "license": "ISC",
6
6
  "description": "This project presents EdgeIQ API SDK.",