@ndustrial/contxt-sdk 5.8.0 → 5.8.1

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.
Files changed (209) hide show
  1. package/.nvmrc +1 -1
  2. package/esm/bus/channels.js +0 -1
  3. package/esm/bus/channels.js.map +1 -1
  4. package/esm/bus/index.js +0 -1
  5. package/esm/bus/index.js.map +1 -1
  6. package/esm/bus/webSocketConnection.js +46 -47
  7. package/esm/bus/webSocketConnection.js.map +1 -1
  8. package/esm/config/index.js +27 -27
  9. package/esm/config/index.js.map +1 -1
  10. package/esm/coordinator/applications.js +0 -2
  11. package/esm/coordinator/applications.js.map +1 -1
  12. package/esm/coordinator/consent.js +0 -1
  13. package/esm/coordinator/consent.js.map +1 -1
  14. package/esm/coordinator/edgeNodes.js +0 -1
  15. package/esm/coordinator/edgeNodes.js.map +1 -1
  16. package/esm/coordinator/organizations.js +0 -2
  17. package/esm/coordinator/organizations.js.map +1 -1
  18. package/esm/coordinator/permissions.js +0 -1
  19. package/esm/coordinator/permissions.js.map +1 -1
  20. package/esm/coordinator/roles.js +0 -3
  21. package/esm/coordinator/roles.js.map +1 -1
  22. package/esm/coordinator/users.js +0 -2
  23. package/esm/coordinator/users.js.map +1 -1
  24. package/esm/events/index.js +0 -1
  25. package/esm/events/index.js.map +1 -1
  26. package/esm/files/index.js +20 -31
  27. package/esm/files/index.js.map +1 -1
  28. package/esm/index.js +7 -8
  29. package/esm/index.js.map +1 -1
  30. package/esm/iot/feeds.js +0 -1
  31. package/esm/iot/feeds.js.map +1 -1
  32. package/esm/iot/fieldCategories.js +0 -1
  33. package/esm/iot/fieldCategories.js.map +1 -1
  34. package/esm/iot/fieldGroupings.js +0 -1
  35. package/esm/iot/fieldGroupings.js.map +1 -1
  36. package/esm/iot/fields.js +0 -1
  37. package/esm/iot/fields.js.map +1 -1
  38. package/esm/iot/outputs.js +0 -1
  39. package/esm/iot/outputs.js.map +1 -1
  40. package/esm/nionic/index.js +12 -15
  41. package/esm/nionic/index.js.map +1 -1
  42. package/esm/request.js +8 -9
  43. package/esm/request.js.map +1 -1
  44. package/esm/sessionTypes/auth0WebAuth.js +10 -19
  45. package/esm/sessionTypes/auth0WebAuth.js.map +1 -1
  46. package/esm/sessionTypes/index.js +0 -1
  47. package/esm/sessionTypes/index.js.map +1 -1
  48. package/esm/sessionTypes/machineAuth.js +7 -16
  49. package/esm/sessionTypes/machineAuth.js.map +1 -1
  50. package/esm/sessionTypes/passwordGrantAuth.js +3 -6
  51. package/esm/sessionTypes/passwordGrantAuth.js.map +1 -1
  52. package/esm/utils/iot/formatOutputFieldDataFromServer.js +6 -13
  53. package/esm/utils/iot/formatOutputFieldDataFromServer.js.map +1 -1
  54. package/esm/utils/iot/parseOutputFieldNextPageUrlMetadata.js +0 -2
  55. package/esm/utils/iot/parseOutputFieldNextPageUrlMetadata.js.map +1 -1
  56. package/esm/utils/objects/createCaseChangeFn.js +4 -14
  57. package/esm/utils/objects/createCaseChangeFn.js.map +1 -1
  58. package/esm/utils/objects/map.js +5 -29
  59. package/esm/utils/objects/map.js.map +1 -1
  60. package/esm/utils/pagination/formatPaginatedDataFromServer.js +0 -1
  61. package/esm/utils/pagination/formatPaginatedDataFromServer.js.map +1 -1
  62. package/esm/utils/url/index.js +2 -2
  63. package/lib/bus/channels.js +0 -1
  64. package/lib/bus/channels.js.map +1 -1
  65. package/lib/bus/index.js +0 -1
  66. package/lib/bus/index.js.map +1 -1
  67. package/lib/bus/webSocketConnection.js +46 -47
  68. package/lib/bus/webSocketConnection.js.map +1 -1
  69. package/lib/config/index.js +27 -27
  70. package/lib/config/index.js.map +1 -1
  71. package/lib/coordinator/applications.js +0 -2
  72. package/lib/coordinator/applications.js.map +1 -1
  73. package/lib/coordinator/consent.js +0 -1
  74. package/lib/coordinator/consent.js.map +1 -1
  75. package/lib/coordinator/edgeNodes.js +0 -1
  76. package/lib/coordinator/edgeNodes.js.map +1 -1
  77. package/lib/coordinator/organizations.js +0 -2
  78. package/lib/coordinator/organizations.js.map +1 -1
  79. package/lib/coordinator/permissions.js +0 -1
  80. package/lib/coordinator/permissions.js.map +1 -1
  81. package/lib/coordinator/roles.js +0 -3
  82. package/lib/coordinator/roles.js.map +1 -1
  83. package/lib/coordinator/users.js +0 -2
  84. package/lib/coordinator/users.js.map +1 -1
  85. package/lib/events/index.js +0 -1
  86. package/lib/events/index.js.map +1 -1
  87. package/lib/files/index.js +20 -31
  88. package/lib/files/index.js.map +1 -1
  89. package/lib/index.js +7 -8
  90. package/lib/index.js.map +1 -1
  91. package/lib/iot/feeds.js +0 -1
  92. package/lib/iot/feeds.js.map +1 -1
  93. package/lib/iot/fieldCategories.js +0 -1
  94. package/lib/iot/fieldCategories.js.map +1 -1
  95. package/lib/iot/fieldGroupings.js +0 -1
  96. package/lib/iot/fieldGroupings.js.map +1 -1
  97. package/lib/iot/fields.js +0 -1
  98. package/lib/iot/fields.js.map +1 -1
  99. package/lib/iot/outputs.js +0 -1
  100. package/lib/iot/outputs.js.map +1 -1
  101. package/lib/nionic/index.js +12 -15
  102. package/lib/nionic/index.js.map +1 -1
  103. package/lib/request.js +8 -9
  104. package/lib/request.js.map +1 -1
  105. package/lib/sessionTypes/auth0WebAuth.js +10 -19
  106. package/lib/sessionTypes/auth0WebAuth.js.map +1 -1
  107. package/lib/sessionTypes/index.js +0 -1
  108. package/lib/sessionTypes/index.js.map +1 -1
  109. package/lib/sessionTypes/machineAuth.js +7 -16
  110. package/lib/sessionTypes/machineAuth.js.map +1 -1
  111. package/lib/sessionTypes/passwordGrantAuth.js +3 -6
  112. package/lib/sessionTypes/passwordGrantAuth.js.map +1 -1
  113. package/lib/utils/iot/formatOutputFieldDataFromServer.js +6 -13
  114. package/lib/utils/iot/formatOutputFieldDataFromServer.js.map +1 -1
  115. package/lib/utils/iot/parseOutputFieldNextPageUrlMetadata.js +0 -2
  116. package/lib/utils/iot/parseOutputFieldNextPageUrlMetadata.js.map +1 -1
  117. package/lib/utils/objects/createCaseChangeFn.js +4 -14
  118. package/lib/utils/objects/createCaseChangeFn.js.map +1 -1
  119. package/lib/utils/objects/map.js +5 -29
  120. package/lib/utils/objects/map.js.map +1 -1
  121. package/lib/utils/pagination/formatPaginatedDataFromServer.js +0 -1
  122. package/lib/utils/pagination/formatPaginatedDataFromServer.js.map +1 -1
  123. package/lib/utils/url/index.js +2 -2
  124. package/package.json +6 -3
  125. package/src/bus/index.spec.js +1 -1
  126. package/src/bus/webSocketConnection.spec.js +53 -53
  127. package/src/config/index.spec.js +5 -5
  128. package/src/coordinator/applications.spec.js +7 -7
  129. package/src/coordinator/consent.spec.js +1 -1
  130. package/src/coordinator/edgeNodes.spec.js +2 -2
  131. package/src/coordinator/organizations.spec.js +3 -3
  132. package/src/coordinator/permissions.spec.js +3 -3
  133. package/src/coordinator/roles.spec.js +3 -3
  134. package/src/coordinator/users.spec.js +17 -17
  135. package/src/events/index.spec.js +15 -15
  136. package/src/files/index.spec.js +8 -8
  137. package/src/index.spec.js +8 -8
  138. package/src/iot/feeds.spec.js +3 -3
  139. package/src/iot/fieldCategories.spec.js +3 -3
  140. package/src/iot/fieldGroupings.spec.js +4 -4
  141. package/src/iot/outputs.spec.js +6 -6
  142. package/src/request.spec.js +3 -3
  143. package/src/sessionTypes/auth0WebAuth.spec.js +16 -14
  144. package/src/sessionTypes/index.spec.js +1 -1
  145. package/src/sessionTypes/machineAuth.spec.js +5 -5
  146. package/src/sessionTypes/passwordGrantAuth.spec.js +1 -1
  147. package/src/utils/iot/formatOutputFieldDataFromServer.spec.js +6 -6
  148. package/src/utils/iot/parseOutputFieldNextPageUrlMetadata.spec.js +3 -3
  149. package/src/utils/pagination/formatPaginatedDataFromServer.spec.js +2 -2
  150. package/src/utils/url/stringifyParams.spec.js +3 -3
  151. package/support/fixtures/factories/IOSDevice.js +4 -4
  152. package/support/fixtures/factories/applicationGrouping.js +6 -6
  153. package/support/fixtures/factories/applicationModule.js +3 -3
  154. package/support/fixtures/factories/asset.js +2 -2
  155. package/support/fixtures/factories/assetAttribute.js +4 -4
  156. package/support/fixtures/factories/assetAttributeValue.js +3 -3
  157. package/support/fixtures/factories/assetMetric.js +3 -3
  158. package/support/fixtures/factories/assetMetricValue.js +4 -4
  159. package/support/fixtures/factories/assetMetricValueCompact.js +3 -3
  160. package/support/fixtures/factories/assetType.js +2 -2
  161. package/support/fixtures/factories/audience.js +1 -1
  162. package/support/fixtures/factories/authResults.js +4 -4
  163. package/support/fixtures/factories/channel.js +2 -2
  164. package/support/fixtures/factories/contxtApplication.js +10 -10
  165. package/support/fixtures/factories/contxtOrganization.js +3 -3
  166. package/support/fixtures/factories/contxtOrganizationFeaturedApplication.js +4 -4
  167. package/support/fixtures/factories/contxtProject.js +7 -7
  168. package/support/fixtures/factories/contxtProjectEnvironment.js +7 -7
  169. package/support/fixtures/factories/contxtRole.js +5 -5
  170. package/support/fixtures/factories/contxtRoleApplication.js +2 -2
  171. package/support/fixtures/factories/contxtRoleProjectEnvironment.js +3 -3
  172. package/support/fixtures/factories/contxtUser.js +6 -6
  173. package/support/fixtures/factories/contxtUserApplication.js +2 -2
  174. package/support/fixtures/factories/contxtUserFavoriteApplication.js +3 -3
  175. package/support/fixtures/factories/contxtUserPermissions.js +6 -6
  176. package/support/fixtures/factories/contxtUserProjectEnvironment.js +3 -3
  177. package/support/fixtures/factories/contxtUserRole.js +3 -3
  178. package/support/fixtures/factories/costCenter.js +3 -3
  179. package/support/fixtures/factories/costCenterFacility.js +4 -4
  180. package/support/fixtures/factories/edgeNode.js +2 -2
  181. package/support/fixtures/factories/event.js +7 -7
  182. package/support/fixtures/factories/eventType.js +6 -6
  183. package/support/fixtures/factories/eventUser.js +8 -8
  184. package/support/fixtures/factories/facility.js +12 -12
  185. package/support/fixtures/factories/facilityGrouping.js +5 -5
  186. package/support/fixtures/factories/facilityGroupingFacility.js +4 -4
  187. package/support/fixtures/factories/facilityInfo.js +6 -6
  188. package/support/fixtures/factories/facilityTag.js +2 -2
  189. package/support/fixtures/factories/feedStatus.js +3 -3
  190. package/support/fixtures/factories/feedType.js +2 -2
  191. package/support/fixtures/factories/feeds.js +8 -8
  192. package/support/fixtures/factories/fieldCategory.js +4 -4
  193. package/support/fixtures/factories/fieldGrouping.js +6 -6
  194. package/support/fixtures/factories/fieldGroupingField.js +4 -4
  195. package/support/fixtures/factories/fieldGroupingStatus.js +3 -3
  196. package/support/fixtures/factories/file.js +3 -3
  197. package/support/fixtures/factories/fileToDownload.js +1 -1
  198. package/support/fixtures/factories/fileUploadInfo.js +3 -3
  199. package/support/fixtures/factories/organization.js +3 -3
  200. package/support/fixtures/factories/outputField.js +18 -18
  201. package/support/fixtures/factories/outputFieldData.js +2 -2
  202. package/support/fixtures/factories/owner.js +5 -5
  203. package/support/fixtures/factories/paginationMetadata.js +3 -3
  204. package/support/fixtures/factories/triggeredEvent.js +5 -5
  205. package/support/fixtures/factories/userEventSubscription.js +3 -3
  206. package/support/fixtures/factories/userMobileNumber.js +4 -4
  207. package/support/fixtures/factories/userPermissionsMap.js +3 -3
  208. package/support/fixtures/factories/userProfile.js +3 -3
  209. package/support/globals.js +11 -1
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "stringifyParams", {
7
7
  enumerable: true,
8
- get: function get() {
8
+ get: function () {
9
9
  return _stringifyParams.stringifyParams;
10
10
  }
11
11
  });
12
12
  Object.defineProperty(exports, "stringifyParamsWithCommaSeparatedArrays", {
13
13
  enumerable: true,
14
- get: function get() {
14
+ get: function () {
15
15
  return _stringifyParams.stringifyParamsWithCommaSeparatedArrays;
16
16
  }
17
17
  });
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@ndustrial/contxt-sdk",
3
- "version": "5.8.0",
3
+ "version": "5.8.1",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "esm/index.js",
7
7
  "type": "commonjs",
8
+ "engines": {
9
+ "node": ">=24 <25"
10
+ },
8
11
  "publishConfig": {
9
12
  "access": "public"
10
13
  },
@@ -39,7 +42,7 @@
39
42
  {
40
43
  "targets": {
41
44
  "browsers": "> 0.5%, last 2 versions, Firefox ESR, not dead",
42
- "node": "6"
45
+ "node": "24"
43
46
  },
44
47
  "useBuiltIns": "usage",
45
48
  "corejs": "3.6.4"
@@ -74,6 +77,7 @@
74
77
  "@babel/preset-env": "^7.26.0",
75
78
  "@babel/register": "^7.25.9",
76
79
  "@eslint/compat": "^1.3.1",
80
+ "@faker-js/faker": "^10.5.0",
77
81
  "babel-plugin-istanbul": "^8.0.0",
78
82
  "chai": "^4.1.2",
79
83
  "chai-as-promised": "^7.1.1",
@@ -83,7 +87,6 @@
83
87
  "eslint-formatter-visualstudio": "^8.40.0",
84
88
  "eslint-plugin-prettier": "^5.5.3",
85
89
  "eslint-plugin-simple-import-sort": "^12.1.1",
86
- "faker": "^5.5.3",
87
90
  "fast-glob": "^3.2.4",
88
91
  "globals": "^15.13.0",
89
92
  "gulp": "^5.0.0",
@@ -400,7 +400,7 @@ describe('Bus', function() {
400
400
 
401
401
  beforeEach(function() {
402
402
  webSocketConnection = bus.getWebSocketConnection(
403
- faker.datatype.uuid()
403
+ faker.string.uuid()
404
404
  );
405
405
  });
406
406
 
@@ -312,13 +312,13 @@ describe('Bus/WebSocketConnection', function() {
312
312
  let ws;
313
313
 
314
314
  beforeEach(function() {
315
- expectedError = faker.random.words();
315
+ expectedError = faker.lorem.words();
316
316
  expectedOrganization = fixture.build('organization');
317
317
 
318
318
  ws = new WebSocketConnection(expectedWebSocket, expectedOrganization.id);
319
319
 
320
320
  ws._messageHandlers = {
321
- [faker.datatype.uuid()]: sinon.stub()
321
+ [faker.string.uuid()]: sinon.stub()
322
322
  };
323
323
 
324
324
  ws._onError(expectedError);
@@ -340,7 +340,7 @@ describe('Bus/WebSocketConnection', function() {
340
340
 
341
341
  beforeEach(function() {
342
342
  expectedOrganization = fixture.build('organization');
343
- expectedUUID = faker.datatype.uuid();
343
+ expectedUUID = faker.string.uuid();
344
344
  expectedMessage = {
345
345
  jsonrpc: '2.0',
346
346
  id: expectedUUID,
@@ -376,7 +376,7 @@ describe('Bus/WebSocketConnection', function() {
376
376
  beforeEach(function() {
377
377
  expectedMessage = {
378
378
  jsonrpc: '2.0',
379
- id: faker.datatype.uuid(),
379
+ id: faker.string.uuid(),
380
380
  result: null
381
381
  };
382
382
  expectedOrganization = fixture.build('organization');
@@ -407,11 +407,11 @@ describe('Bus/WebSocketConnection', function() {
407
407
  beforeEach(function() {
408
408
  expectedMessage = {
409
409
  jsonrpc: '2.0',
410
- id: faker.datatype.uuid(),
410
+ id: faker.string.uuid(),
411
411
  result: null
412
412
  };
413
413
  expectedOrganization = fixture.build('organization');
414
- expectedUUID = faker.datatype.uuid();
414
+ expectedUUID = faker.string.uuid();
415
415
  expectedMessageHandlers = {
416
416
  [expectedUUID]: sinon.stub()
417
417
  };
@@ -447,13 +447,13 @@ describe('Bus/WebSocketConnection', function() {
447
447
  let ws;
448
448
 
449
449
  beforeEach(function() {
450
- channel = faker.random.word();
450
+ channel = faker.lorem.word();
451
451
  expectedOrganization = fixture.build('organization');
452
452
  message = {
453
453
  example: 1
454
454
  };
455
455
  send = sinon.spy(expectedWebSocket, 'send');
456
- serviceId = faker.datatype.uuid();
456
+ serviceId = faker.string.uuid();
457
457
 
458
458
  ws = new WebSocketConnection(
459
459
  expectedWebSocket,
@@ -544,11 +544,11 @@ describe('Bus/WebSocketConnection', function() {
544
544
  clock = sinon.useFakeTimers();
545
545
  expectedMessage = {
546
546
  jsonrpc: '2.0',
547
- id: faker.datatype.uuid(),
547
+ id: faker.string.uuid(),
548
548
  result: null
549
549
  };
550
550
  resolvedIndicator = Symbol(faker.hacker.noun());
551
- serviceId = faker.datatype.uuid();
551
+ serviceId = faker.string.uuid();
552
552
  waitTime = 1 * 60 * 1000; // 1 minute
553
553
 
554
554
  promise = Promise.race([
@@ -560,7 +560,7 @@ describe('Bus/WebSocketConnection', function() {
560
560
 
561
561
  ws._messageHandlers[jsonRpcId]({
562
562
  jsonrpc: '2.0',
563
- id: faker.datatype.uuid(),
563
+ id: faker.string.uuid(),
564
564
  result: null
565
565
  });
566
566
  });
@@ -601,13 +601,13 @@ describe('Bus/WebSocketConnection', function() {
601
601
  let ws;
602
602
 
603
603
  beforeEach(function() {
604
- channel = faker.random.word();
604
+ channel = faker.lorem.word();
605
605
  expectedOrganization = fixture.build('organization');
606
606
  message = {
607
607
  example: 1
608
608
  };
609
609
  send = sinon.spy(expectedWebSocket, 'send');
610
- serviceId = faker.datatype.uuid();
610
+ serviceId = faker.string.uuid();
611
611
 
612
612
  ws = new WebSocketConnection(null, expectedOrganization.id);
613
613
 
@@ -646,13 +646,13 @@ describe('Bus/WebSocketConnection', function() {
646
646
  let ws;
647
647
 
648
648
  beforeEach(function(done) {
649
- channel = faker.random.word();
649
+ channel = faker.lorem.word();
650
650
  expectedOrganization = fixture.build('organization');
651
651
  message = {
652
652
  example: 1
653
653
  };
654
654
  send = sinon.spy(expectedWebSocket, 'send');
655
- serviceId = faker.datatype.uuid();
655
+ serviceId = faker.string.uuid();
656
656
 
657
657
  ws = new WebSocketConnection(
658
658
  expectedWebSocket,
@@ -698,7 +698,7 @@ describe('Bus/WebSocketConnection', function() {
698
698
  let ws;
699
699
 
700
700
  beforeEach(function() {
701
- channel = faker.random.word();
701
+ channel = faker.lorem.word();
702
702
  expectedOrganization = fixture.build('organization');
703
703
  message = {
704
704
  example: 1
@@ -752,7 +752,7 @@ describe('Bus/WebSocketConnection', function() {
752
752
  example: 1
753
753
  };
754
754
  send = sinon.spy(expectedWebSocket, 'send');
755
- serviceId = faker.datatype.uuid();
755
+ serviceId = faker.string.uuid();
756
756
 
757
757
  ws = new WebSocketConnection(
758
758
  expectedWebSocket,
@@ -794,11 +794,11 @@ describe('Bus/WebSocketConnection', function() {
794
794
  let ws;
795
795
 
796
796
  beforeEach(function() {
797
- channel = faker.random.word();
797
+ channel = faker.lorem.word();
798
798
  expectedOrganization = fixture.build('organization');
799
799
  message = null;
800
800
  send = sinon.spy(expectedWebSocket, 'send');
801
- serviceId = faker.datatype.uuid();
801
+ serviceId = faker.string.uuid();
802
802
 
803
803
  ws = new WebSocketConnection(
804
804
  expectedWebSocket,
@@ -845,11 +845,11 @@ describe('Bus/WebSocketConnection', function() {
845
845
  let ws;
846
846
 
847
847
  beforeEach(function() {
848
- channel = faker.random.word();
849
- group = faker.random.word();
848
+ channel = faker.lorem.word();
849
+ group = faker.lorem.word();
850
850
  expectedOrganization = fixture.build('organization');
851
851
  send = sinon.spy(expectedWebSocket, 'send');
852
- serviceId = faker.datatype.uuid();
852
+ serviceId = faker.string.uuid();
853
853
 
854
854
  ws = new WebSocketConnection(
855
855
  expectedWebSocket,
@@ -885,7 +885,7 @@ describe('Bus/WebSocketConnection', function() {
885
885
  let subscription;
886
886
 
887
887
  beforeEach(function() {
888
- subscription = faker.datatype.uuid();
888
+ subscription = faker.string.uuid();
889
889
  ws._messageHandlers[jsonRpcId]({
890
890
  jsonrpc: '2.0',
891
891
  id: jsonRpcId,
@@ -949,9 +949,9 @@ describe('Bus/WebSocketConnection', function() {
949
949
 
950
950
  beforeEach(function() {
951
951
  clock = sinon.useFakeTimers();
952
- subscription = faker.datatype.uuid();
952
+ subscription = faker.string.uuid();
953
953
  resolvedIndicator = Symbol(faker.hacker.noun());
954
- serviceId = faker.datatype.uuid();
954
+ serviceId = faker.string.uuid();
955
955
  waitTime = 1 * 60 * 1000; // 1 minute
956
956
 
957
957
  promise = Promise.race([
@@ -963,7 +963,7 @@ describe('Bus/WebSocketConnection', function() {
963
963
 
964
964
  ws._messageHandlers[jsonRpcId]({
965
965
  jsonrpc: '2.0',
966
- id: faker.datatype.uuid(),
966
+ id: faker.string.uuid(),
967
967
  result: {
968
968
  subscription
969
969
  }
@@ -1006,11 +1006,11 @@ describe('Bus/WebSocketConnection', function() {
1006
1006
  let ws;
1007
1007
 
1008
1008
  beforeEach(function() {
1009
- channel = faker.random.word();
1009
+ channel = faker.lorem.word();
1010
1010
  expectedOrganization = fixture.build('organization');
1011
- group = faker.random.word();
1011
+ group = faker.lorem.word();
1012
1012
  send = sinon.spy(expectedWebSocket, 'send');
1013
- serviceId = faker.datatype.uuid();
1013
+ serviceId = faker.string.uuid();
1014
1014
 
1015
1015
  ws = new WebSocketConnection(null, expectedOrganization.id);
1016
1016
 
@@ -1049,11 +1049,11 @@ describe('Bus/WebSocketConnection', function() {
1049
1049
  let ws;
1050
1050
 
1051
1051
  beforeEach(function(done) {
1052
- channel = faker.random.word();
1052
+ channel = faker.lorem.word();
1053
1053
  expectedOrganization = fixture.build('organization');
1054
- group = faker.random.word();
1054
+ group = faker.lorem.word();
1055
1055
  send = sinon.spy(expectedWebSocket, 'send');
1056
- serviceId = faker.datatype.uuid();
1056
+ serviceId = faker.string.uuid();
1057
1057
 
1058
1058
  ws = new WebSocketConnection(
1059
1059
  expectedWebSocket,
@@ -1099,9 +1099,9 @@ describe('Bus/WebSocketConnection', function() {
1099
1099
  let ws;
1100
1100
 
1101
1101
  beforeEach(function() {
1102
- channel = faker.random.word();
1102
+ channel = faker.lorem.word();
1103
1103
  expectedOrganization = fixture.build('organization');
1104
- group = faker.random.word();
1104
+ group = faker.lorem.word();
1105
1105
  send = sinon.spy(expectedWebSocket, 'send');
1106
1106
  serviceId = null;
1107
1107
 
@@ -1147,9 +1147,9 @@ describe('Bus/WebSocketConnection', function() {
1147
1147
  beforeEach(function() {
1148
1148
  channel = null;
1149
1149
  expectedOrganization = fixture.build('organization');
1150
- group = faker.random.word();
1150
+ group = faker.lorem.word();
1151
1151
  send = sinon.spy(expectedWebSocket, 'send');
1152
- serviceId = faker.datatype.uuid();
1152
+ serviceId = faker.string.uuid();
1153
1153
 
1154
1154
  ws = new WebSocketConnection(
1155
1155
  expectedWebSocket,
@@ -1191,11 +1191,11 @@ describe('Bus/WebSocketConnection', function() {
1191
1191
  let ws;
1192
1192
 
1193
1193
  beforeEach(function() {
1194
- channel = faker.random.word();
1194
+ channel = faker.lorem.word();
1195
1195
  expectedOrganization = fixture.build('organization');
1196
1196
  group = null;
1197
1197
  send = sinon.spy(expectedWebSocket, 'send');
1198
- serviceId = faker.datatype.uuid();
1198
+ serviceId = faker.string.uuid();
1199
1199
 
1200
1200
  ws = new WebSocketConnection(
1201
1201
  expectedWebSocket,
@@ -1232,10 +1232,10 @@ describe('Bus/WebSocketConnection', function() {
1232
1232
 
1233
1233
  context('with a group', function() {
1234
1234
  beforeEach(function() {
1235
- channel = faker.random.word();
1235
+ channel = faker.lorem.word();
1236
1236
  expectedOrganization = fixture.build('organization');
1237
1237
  group = null;
1238
- serviceId = faker.datatype.uuid();
1238
+ serviceId = faker.string.uuid();
1239
1239
 
1240
1240
  ws = new WebSocketConnection(
1241
1241
  expectedWebSocket,
@@ -1254,10 +1254,10 @@ describe('Bus/WebSocketConnection', function() {
1254
1254
 
1255
1255
  context('without a group', function() {
1256
1256
  beforeEach(function() {
1257
- channel = faker.random.word();
1257
+ channel = faker.lorem.word();
1258
1258
  expectedOrganization = fixture.build('organization');
1259
1259
  group = null;
1260
- serviceId = faker.datatype.uuid();
1260
+ serviceId = faker.string.uuid();
1261
1261
 
1262
1262
  ws = new WebSocketConnection(
1263
1263
  expectedWebSocket,
@@ -1285,10 +1285,10 @@ describe('Bus/WebSocketConnection', function() {
1285
1285
 
1286
1286
  context('with a group', function() {
1287
1287
  beforeEach(function() {
1288
- channel = faker.random.word();
1288
+ channel = faker.lorem.word();
1289
1289
  expectedOrganization = fixture.build('organization');
1290
1290
  group = null;
1291
- serviceId = faker.datatype.uuid();
1291
+ serviceId = faker.string.uuid();
1292
1292
 
1293
1293
  ws = new WebSocketConnection(
1294
1294
  expectedWebSocket,
@@ -1307,10 +1307,10 @@ describe('Bus/WebSocketConnection', function() {
1307
1307
 
1308
1308
  context('without a group', function() {
1309
1309
  beforeEach(function() {
1310
- channel = faker.random.word();
1310
+ channel = faker.lorem.word();
1311
1311
  expectedOrganization = fixture.build('organization');
1312
1312
  group = null;
1313
- serviceId = faker.datatype.uuid();
1313
+ serviceId = faker.string.uuid();
1314
1314
 
1315
1315
  ws = new WebSocketConnection(
1316
1316
  expectedWebSocket,
@@ -1342,13 +1342,13 @@ describe('Bus/WebSocketConnection', function() {
1342
1342
  let ws;
1343
1343
 
1344
1344
  beforeEach(function() {
1345
- channel = faker.random.word();
1345
+ channel = faker.lorem.word();
1346
1346
  expectedOrganization = fixture.build('organization');
1347
1347
  group = null;
1348
1348
  handler = sinon.stub().returns(null);
1349
- serviceId = faker.datatype.uuid();
1350
- message = faker.random.word();
1351
- subscription = faker.datatype.uuid();
1349
+ serviceId = faker.string.uuid();
1350
+ message = faker.lorem.word();
1351
+ subscription = faker.string.uuid();
1352
1352
 
1353
1353
  ws = new WebSocketConnection(
1354
1354
  expectedWebSocket,
@@ -2180,7 +2180,7 @@ describe('Bus/WebSocketConnection', function() {
2180
2180
  beforeEach(function() {
2181
2181
  expectedOrganization = fixture.build('organization');
2182
2182
  send = sinon.spy(expectedWebSocket, 'send');
2183
- messageId = faker.datatype.uuid();
2183
+ messageId = faker.string.uuid();
2184
2184
 
2185
2185
  ws = new WebSocketConnection(
2186
2186
  expectedWebSocket,
@@ -2219,7 +2219,7 @@ describe('Bus/WebSocketConnection', function() {
2219
2219
  beforeEach(function() {
2220
2220
  expectedOrganization = fixture.build('organization');
2221
2221
  send = sinon.spy(expectedWebSocket, 'send');
2222
- messageId = faker.datatype.uuid();
2222
+ messageId = faker.string.uuid();
2223
2223
 
2224
2224
  ws = new WebSocketConnection(
2225
2225
  expectedWebSocket,
@@ -2255,7 +2255,7 @@ describe('Bus/WebSocketConnection', function() {
2255
2255
  beforeEach(function() {
2256
2256
  expectedOrganization = fixture.build('organization');
2257
2257
  send = sinon.spy(expectedWebSocket, 'send');
2258
- messageId = faker.datatype.uuid();
2258
+ messageId = faker.string.uuid();
2259
2259
 
2260
2260
  ws = new WebSocketConnection(
2261
2261
  expectedWebSocket,
@@ -112,7 +112,7 @@ describe('Config', function() {
112
112
  audienceName = faker.hacker.adjective();
113
113
 
114
114
  existingDynamicAudiences = times(
115
- faker.datatype.number({ min: 1, max: 3 })
115
+ faker.number.int({ min: 1, max: 3 })
116
116
  ).reduce((memo, index) => {
117
117
  memo[`${faker.lorem.word()}-${index}`] = fixture.build('audience');
118
118
 
@@ -258,7 +258,7 @@ describe('Config', function() {
258
258
  expectedReaddedAudience = fixture.build('audience');
259
259
  expectedRemovedAudience = fixture.build('audience');
260
260
  remainingDynamicAudiences = times(
261
- faker.datatype.number({ min: 1, max: 3 })
261
+ faker.number.int({ min: 1, max: 3 })
262
262
  ).reduce((memo, index) => {
263
263
  memo[`${faker.hacker.adjective()}-${index}`] = fixture.build(
264
264
  'audience'
@@ -331,7 +331,7 @@ describe('Config', function() {
331
331
 
332
332
  beforeEach(function() {
333
333
  dynamicAudiences = times(
334
- faker.datatype.number({ min: 1, max: 3 })
334
+ faker.number.int({ min: 1, max: 3 })
335
335
  ).reduce((memo, index) => {
336
336
  memo[`${faker.hacker.adjective()}-${index}`] = fixture.build(
337
337
  'audience'
@@ -667,7 +667,7 @@ describe('Config', function() {
667
667
  const externalModules = {};
668
668
  expectedAudiences = {};
669
669
 
670
- times(faker.datatype.number({ min: 1, max: 10 }))
670
+ times(faker.number.int({ min: 1, max: 10 }))
671
671
  .map(() => faker.hacker.adjective())
672
672
  .forEach((moduleName) => {
673
673
  const audience = fixture.build('audience');
@@ -699,7 +699,7 @@ describe('Config', function() {
699
699
  const externalModules = {};
700
700
  expectedAudiences = {};
701
701
 
702
- times(faker.datatype.number({ min: 1, max: 10 }))
702
+ times(faker.number.int({ min: 1, max: 10 }))
703
703
  .map(() => faker.hacker.adjective())
704
704
  .forEach((moduleName) => {
705
705
  const audience = fixture.build('audience', {
@@ -163,7 +163,7 @@ describe('Coordinator/Applications', function() {
163
163
  let toCamelCase;
164
164
 
165
165
  beforeEach(function() {
166
- const numberOfApplications = faker.datatype.number({
166
+ const numberOfApplications = faker.number.int({
167
167
  min: 1,
168
168
  max: 10
169
169
  });
@@ -219,7 +219,7 @@ describe('Coordinator/Applications', function() {
219
219
  beforeEach(function() {
220
220
  expectedFavoriteApplications = fixture.buildList(
221
221
  'contxtUserFavoriteApplication',
222
- faker.datatype.number({
222
+ faker.number.int({
223
223
  min: 1,
224
224
  max: 10
225
225
  })
@@ -270,10 +270,10 @@ describe('Coordinator/Applications', function() {
270
270
  let toCamelCase;
271
271
 
272
272
  beforeEach(function() {
273
- expectedApplicationId = faker.datatype.uuid();
273
+ expectedApplicationId = faker.string.uuid();
274
274
  expectedGroupings = fixture.buildList(
275
275
  'applicationGrouping',
276
- faker.datatype.number({ min: 1, max: 10 })
276
+ faker.number.int({ min: 1, max: 10 })
277
277
  );
278
278
  groupingsFromServer = expectedGroupings.map((grouping) =>
279
279
  fixture.build('applicationGrouping', grouping, { fromServer: true })
@@ -321,10 +321,10 @@ describe('Coordinator/Applications', function() {
321
321
  let toCamelCase;
322
322
 
323
323
  beforeEach(function() {
324
- expectedOrganizationId = faker.datatype.uuid();
324
+ expectedOrganizationId = faker.string.uuid();
325
325
  expectedFeaturedApplications = fixture.buildList(
326
326
  'contxtOrganizationFeaturedApplication',
327
- faker.datatype.number({
327
+ faker.number.int({
328
328
  min: 1,
329
329
  max: 10
330
330
  }),
@@ -401,7 +401,7 @@ describe('Coordinator/Applications', function() {
401
401
  expectedOrganizationId = fixture.build('organization').id;
402
402
  expectedFeaturedApplications = fixture.buildList(
403
403
  'contxtOrganizationFeaturedApplication',
404
- faker.datatype.number({
404
+ faker.number.int({
405
405
  min: 1,
406
406
  max: 10
407
407
  }),
@@ -95,7 +95,7 @@ describe('Coordinator/Consent', function() {
95
95
  let expectedConsentId;
96
96
 
97
97
  beforeEach(function() {
98
- expectedConsentId = faker.datatype.uuid();
98
+ expectedConsentId = faker.string.uuid();
99
99
  consent = new Consent(baseSdk, baseRequest, expectedHost);
100
100
  });
101
101
 
@@ -143,7 +143,7 @@ describe('edgeNodes', function() {
143
143
  context('the organization ID is not provided', function() {
144
144
  it('throws an error', function() {
145
145
  const edgeNodes = new EdgeNodes(baseSdk, baseRequest);
146
- const promise = edgeNodes.get(null, faker.datatype.uuid());
146
+ const promise = edgeNodes.get(null, faker.string.uuid());
147
147
 
148
148
  return expect(promise).to.be.rejectedWith(
149
149
  'An organizationId is required for getting an edge node.'
@@ -154,7 +154,7 @@ describe('edgeNodes', function() {
154
154
  context('the edge node client ID is not provided', function() {
155
155
  it('throws an error', function() {
156
156
  const edgeNodes = new EdgeNodes(baseSdk, baseRequest);
157
- const promise = edgeNodes.get(faker.datatype.uuid());
157
+ const promise = edgeNodes.get(faker.string.uuid());
158
158
 
159
159
  return expect(promise).to.be.rejectedWith(
160
160
  'An edgeNodeClientId is required for getting an edge node.'
@@ -96,7 +96,7 @@ describe('Coordinator/Organizations', function() {
96
96
  let toCamelCase;
97
97
 
98
98
  beforeEach(function() {
99
- expectedOrganizationId = faker.datatype.uuid();
99
+ expectedOrganizationId = faker.string.uuid();
100
100
  organizationFromServerAfterFormat = fixture.build(
101
101
  'contxtOrganization',
102
102
  {
@@ -172,7 +172,7 @@ describe('Coordinator/Organizations', function() {
172
172
  let toCamelCase;
173
173
 
174
174
  beforeEach(function() {
175
- expectedOrganizationId = faker.datatype.uuid();
175
+ expectedOrganizationId = faker.string.uuid();
176
176
  organizationFromServerAfterFormat = fixture.build(
177
177
  'contxtOrganization',
178
178
  {
@@ -263,7 +263,7 @@ describe('Coordinator/Organizations', function() {
263
263
  let toCamelCase;
264
264
 
265
265
  beforeEach(function() {
266
- const numberOfOrganizations = faker.datatype.number({
266
+ const numberOfOrganizations = faker.number.int({
267
267
  min: 1,
268
268
  max: 10
269
269
  });
@@ -99,7 +99,7 @@ describe('Coordinator/Permissions', function() {
99
99
  expectedOrganizationId = fixture.build('contxtOrganization').id;
100
100
  expectedUsersPermissions = fixture.buildList(
101
101
  'contxtUserPermissions',
102
- faker.datatype.number({
102
+ faker.number.int({
103
103
  min: 1,
104
104
  max: 10
105
105
  }),
@@ -173,7 +173,7 @@ describe('Coordinator/Permissions', function() {
173
173
  expectedOrganizationId = fixture.build('organization').id;
174
174
  expectedUsersPermissions = fixture.buildList(
175
175
  'contxtUserPermissions',
176
- faker.datatype.number({
176
+ faker.number.int({
177
177
  min: 1,
178
178
  max: 10
179
179
  }),
@@ -481,7 +481,7 @@ describe('Coordinator/Permissions', function() {
481
481
 
482
482
  beforeEach(function() {
483
483
  expectedPermissionsMap = fixture.build('userPermissionsMap');
484
- expectedUserId = faker.datatype.uuid();
484
+ expectedUserId = faker.string.uuid();
485
485
 
486
486
  request = {
487
487
  ...baseRequest,
@@ -296,7 +296,7 @@ describe('Coordinator/Roles', function() {
296
296
  const promise = roles.addProjectEnvironment(
297
297
  role.id,
298
298
  projectEnvironment.id,
299
- faker.random.word()
299
+ faker.lorem.word()
300
300
  );
301
301
 
302
302
  return expect(promise).to.be.rejectedWith(
@@ -691,7 +691,7 @@ describe('Coordinator/Roles', function() {
691
691
  expectedOrganizationId = fixture.build('contxtOrganization').id;
692
692
  expectedRoles = fixture.buildList(
693
693
  'contxtRole',
694
- faker.datatype.number({
694
+ faker.number.int({
695
695
  min: 1,
696
696
  max: 10
697
697
  }),
@@ -761,7 +761,7 @@ describe('Coordinator/Roles', function() {
761
761
  expectedOrganizationId = fixture.build('organization').id;
762
762
  expectedRoles = fixture.buildList(
763
763
  'contxtRole',
764
- faker.datatype.number({
764
+ faker.number.int({
765
765
  min: 1,
766
766
  max: 10
767
767
  }),