opengate-js 10.4.0 → 10.5.0

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 (458) hide show
  1. package/bower.json +1 -1
  2. package/dist/{opengate-api-bower-10.4.0.js → opengate-api-bower-10.5.0.js} +1145 -367
  3. package/dist/opengate-api-bower-10.5.0.js.map +1 -0
  4. package/dist/{opengate-api-bower-10.4.0.min.js → opengate-api-bower-10.5.0.min.js} +31 -31
  5. package/dist/opengate-api-bower-10.5.0.min.js.map +1 -0
  6. package/dist/src/InternalOpenGateAPI.js +70 -0
  7. package/dist/src/InternalOpenGateAPI.js.map +1 -1
  8. package/dist/src/bulk/BulkExecutionFinder.js +133 -0
  9. package/dist/src/bulk/BulkExecutionFinder.js.map +1 -0
  10. package/dist/src/provision/bulk/BulkExecutionBuilder.js +174 -0
  11. package/dist/src/provision/bulk/BulkExecutionBuilder.js.map +1 -0
  12. package/dist/src/provisionProcessors/provisionProcessors.js +135 -0
  13. package/dist/src/provisionProcessors/provisionProcessors.js.map +1 -0
  14. package/dist/src/provisionProcessors/provisionProcessorsFinder.js +75 -0
  15. package/dist/src/provisionProcessors/provisionProcessorsFinder.js.map +1 -0
  16. package/dist/src/searching/AssetSearch.js +1 -1
  17. package/dist/src/searching/BaseSearch.js +1 -1
  18. package/dist/src/searching/BaseSearch.js.map +1 -1
  19. package/dist/src/searching/DeviceSearch.js +1 -1
  20. package/dist/src/searching/Search.js +1 -1
  21. package/dist/src/searching/Search.js.map +1 -1
  22. package/dist/src/searching/WPSearch.js +69 -0
  23. package/dist/src/searching/WPSearch.js.map +1 -0
  24. package/dist/src/searching/builder/BulkExecutionSearchBuilder.js +71 -0
  25. package/dist/src/searching/builder/BulkExecutionSearchBuilder.js.map +1 -0
  26. package/dist/src/util/NorthAmpliaREST.js +33 -5
  27. package/dist/src/util/NorthAmpliaREST.js.map +1 -1
  28. package/dist/src/util/formats/check_types.js +8 -3
  29. package/dist/src/util/formats/check_types.js.map +1 -1
  30. package/docs/ast/source/InternalOpenGateAPI.js.json +24399 -20584
  31. package/docs/ast/source/bulk/BulkExecutionFinder.js.json +14859 -0
  32. package/docs/ast/source/provision/bulk/BulkExecutionBuilder.js.json +21759 -0
  33. package/docs/ast/source/provisionProcessors/provisionProcessors.js.json +9915 -0
  34. package/docs/ast/source/provisionProcessors/provisionProcessorsFinder.js.json +3784 -0
  35. package/docs/ast/source/searching/AssetSearch.js.json +696 -696
  36. package/docs/ast/source/searching/BaseSearch.js.json +3497 -3587
  37. package/docs/ast/source/searching/DeviceSearch.js.json +1308 -1308
  38. package/docs/ast/source/searching/Search.js.json +326 -236
  39. package/docs/ast/source/searching/WPSearch.js.json +4459 -0
  40. package/docs/ast/source/searching/builder/BulkExecutionSearchBuilder.js.json +4744 -0
  41. package/docs/ast/source/util/NorthAmpliaREST.js.json +21289 -14658
  42. package/docs/ast/source/util/formats/check_types.js.json +3332 -2034
  43. package/docs/class/src/GenericFinder.js~GenericFinder.html +10 -2
  44. package/docs/class/src/InternalOpenGateAPI.js~InternalOpenGateAPI.html +565 -109
  45. package/docs/class/src/ProvisionGenericFinder.js~ProvisionGenericFinder.html +9 -1
  46. package/docs/class/src/alarms/AlarmActions.js~AlarmActions.html +9 -1
  47. package/docs/class/src/alarms/actions/Alarm.js~Operation.html +9 -1
  48. package/docs/class/src/alarms/actions/AlarmActionBuilder.js~AlarmActionBuilder.html +9 -1
  49. package/docs/class/src/alarms/actions/AlarmAttendBuilder.js~AlarmAttendBuilder.html +9 -1
  50. package/docs/class/src/alarms/actions/AlarmCloseBuilder.js~AlarmCloseBuilder.html +9 -1
  51. package/docs/class/src/areas/AreaFinder.js~AreaFinder.html +9 -1
  52. package/docs/class/src/areas/Areas.js~Areas.html +9 -1
  53. package/docs/class/src/bulk/BulkExecutionFinder.js~BulkExecutionFinder.html +529 -0
  54. package/docs/class/src/bulk/BulkFinder.js~BulkFinder.html +9 -1
  55. package/docs/class/src/bundles/BundleFinder.js~BundleFinder.html +9 -1
  56. package/docs/class/src/bundles/Bundles.js~Bundles.html +9 -1
  57. package/docs/class/src/bundles/deployment/DeploymentElement.js~DeploymentElement.html +9 -1
  58. package/docs/class/src/channels/ChannelFinder.js~ChannelFinder.html +9 -1
  59. package/docs/class/src/channels/Channels.js~Channels.html +9 -1
  60. package/docs/class/src/collection/devices/DeviceMessage.js~DeviceMessage.html +9 -1
  61. package/docs/class/src/collection/devices/collect/CommsModuleMessage.js~CommsModuleMessage.html +9 -1
  62. package/docs/class/src/collection/devices/collect/Datapoint.js~Datapoint.html +9 -1
  63. package/docs/class/src/collection/devices/collect/Datastreams.js~Datastream.html +9 -1
  64. package/docs/class/src/collection/devices/collect/Event.js~Event.html +9 -1
  65. package/docs/class/src/collection/devices/collect/Hardware.js~Hardware.html +9 -1
  66. package/docs/class/src/collection/devices/collect/Location.js~Location.html +9 -1
  67. package/docs/class/src/collection/devices/collect/Mobile.js~Mobile.html +9 -1
  68. package/docs/class/src/collection/devices/collect/PowerSupply.js~PowerSupply.html +9 -1
  69. package/docs/class/src/collection/devices/collect/Software.js~Software.html +9 -1
  70. package/docs/class/src/collection/devices/collect/Storage.js~Storage.html +9 -1
  71. package/docs/class/src/collection/devices/collect/Subscriber.js~Subscriber.html +9 -1
  72. package/docs/class/src/collection/devices/collect/Subscription.js~Subscription.html +9 -1
  73. package/docs/class/src/collection/devices/collect/Temperature.js~Temperature.html +9 -1
  74. package/docs/class/src/collection/devices/collect/Usage.js~Usage.html +9 -1
  75. package/docs/class/src/domains/Domains.js~Domains.html +9 -1
  76. package/docs/class/src/domains/DomainsFinder.js~DomainFinder.html +9 -1
  77. package/docs/class/src/entities/DeviceFinder.js~DeviceFinder.html +9 -1
  78. package/docs/class/src/entities/EntityFinder.js~EntityFinder.html +9 -1
  79. package/docs/class/src/entities/SubscribersFinder.js~SubscribersFinder.html +9 -1
  80. package/docs/class/src/entities/SubscriptionsFinder.js~SubscriptionsFinder.html +9 -1
  81. package/docs/class/src/entities/TicketFinder.js~TicketFinder.html +9 -1
  82. package/docs/class/src/iot/catalog/Category.js~Category.html +9 -1
  83. package/docs/class/src/iot/catalog/Datastream.js~Datastream.html +9 -1
  84. package/docs/class/src/iot/catalog/Qrating.js~Qrating.html +9 -1
  85. package/docs/class/src/iot/datamodels/Datamodels.js~Datamodels.html +9 -1
  86. package/docs/class/src/iot/datamodels/DatamodelsFinder.js~DatamodelsFinder.html +9 -1
  87. package/docs/class/src/iot/datamodels/DatamodelsHelper.js~DatamodelsHelper.html +9 -1
  88. package/docs/class/src/operations/OperationActions.js~OperationActions.html +9 -1
  89. package/docs/class/src/operations/OperationFinder.js~OperationFinder.html +9 -1
  90. package/docs/class/src/operations/Operations.js~Operations.html +9 -1
  91. package/docs/class/src/operations/PeriodicityActions.js~PeriodicityActions.html +9 -1
  92. package/docs/class/src/operations/catalog/AppendEntitiesBy.js~AppendEntitiesBy.html +9 -1
  93. package/docs/class/src/operations/catalog/BaseOperationBuilder.js~BaseOperationBuilder.html +9 -1
  94. package/docs/class/src/operations/catalog/Operation.js~Operation.html +9 -1
  95. package/docs/class/src/operations/catalog/parameters/BaseParameterBuilderWithParent.js~BaseParameterBuilderWithParent.html +9 -1
  96. package/docs/class/src/operations/catalog/parameters/ParameterBuilderFactory.js~ParameterBuilderFactory.html +9 -1
  97. package/docs/class/src/operations/catalog/period/ExecuteEachBuilder.js~ExecuteEachBuilder.html +9 -1
  98. package/docs/class/src/operations/catalog/period/ExecuteEveryBuilder.js~ExecuteEveryBuilder.html +9 -1
  99. package/docs/class/src/operations/catalog/period/PeriodicityUpdateBuilder.js~PeriodicityUpdateBuilder.html +9 -1
  100. package/docs/class/src/operations/catalog/period/pattern/ByGeneric.js~ByGeneric.html +9 -1
  101. package/docs/class/src/operations/catalog/period/pattern/ByMonth.js~ByMonth.html +9 -1
  102. package/docs/class/src/operations/catalog/period/pattern/ByWeek.js~ByWeek.html +9 -1
  103. package/docs/class/src/operations/catalog/period/pattern/ByYear.js~ByYear.html +9 -1
  104. package/docs/class/src/organizations/OrganizationFinder.js~OrganizationFinder.html +9 -1
  105. package/docs/class/src/organizations/Organizations.js~Organizations.html +9 -1
  106. package/docs/class/src/provision/BaseProvision.js~BaseProvision.html +10 -2
  107. package/docs/class/src/provision/bulk/BulkExecutionBuilder.js~BulkExecutionBuilder.html +766 -0
  108. package/docs/class/src/provision/entities/AssetBuilder.js~AssetBuilder.html +9 -1
  109. package/docs/class/src/provision/entities/BulkBuilder.js~BulkBuilder.html +9 -1
  110. package/docs/class/src/provision/entities/ComplexBuilder.js~ComplexBuilder.html +9 -1
  111. package/docs/class/src/provision/entities/CsvBulkBuilder.js~CsvBulkBuilder.html +9 -1
  112. package/docs/class/src/provision/entities/DeviceBuilder.js~DeviceBuilder.html +9 -1
  113. package/docs/class/src/provision/entities/EntityBuilder.js~EntityBuilder.html +9 -1
  114. package/docs/class/src/provision/entities/JsonBulkBuilder.js~JsonBulkBuilder.html +9 -1
  115. package/docs/class/src/provision/entities/JsonFlattenedBulkBuilder.js~JsonFlattenedBulkBuilder.html +9 -1
  116. package/docs/class/src/provision/entities/SimpleBuilder.js~SimpleBuilder.html +9 -1
  117. package/docs/class/src/provision/entities/SubscriberBuilder.js~SubscriberBuilder.html +9 -1
  118. package/docs/class/src/provision/entities/SubscriptionBuilder.js~SubscriptionBuilder.html +9 -1
  119. package/docs/class/src/provision/entities/TicketBuilder.js~TicketBuilder.html +9 -1
  120. package/docs/class/src/provisionProcessors/provisionProcessors.js~ProvisionProcessors.html +1012 -0
  121. package/docs/class/src/provisionProcessors/provisionProcessorsFinder.js~provisionProcessorsFinder.html +623 -0
  122. package/docs/class/src/rulesConfiguration/RuleConfigurations.js~RuleConfigurations.html +9 -1
  123. package/docs/class/src/rulesConfiguration/RuleConfigurationsActions.js~RuleConfigurationsActions.html +9 -1
  124. package/docs/class/src/rulesConfiguration/RuleConfigurationsCatalog.js~RuleConfigurationsCatalog.html +9 -1
  125. package/docs/class/src/rulesConfiguration/RuleConfigurationsFinder.js~RuleConfigurationsFinder.html +9 -1
  126. package/docs/class/src/searching/AssetSearch.js~AssetSearch.html +10 -2
  127. package/docs/class/src/searching/BaseSearch.js~BaseSearch.html +10 -2
  128. package/docs/class/src/searching/DeviceSearch.js~DeviceSearch.html +10 -2
  129. package/docs/class/src/searching/EntitySearch.js~EntitySearch.html +9 -1
  130. package/docs/class/src/searching/FilterBuilder.js~FilterBuilder.html +9 -1
  131. package/docs/class/src/searching/QuickSearch.js~QuickSearch.html +9 -1
  132. package/docs/class/src/searching/Search.js~Search.html +9 -1
  133. package/docs/class/src/searching/SelectBuilder.js~SelectBuilder.html +9 -1
  134. package/docs/class/src/searching/StaticSearch.js~StaticSearch.html +9 -1
  135. package/docs/class/src/searching/WPSearch.js~WPSearch.html +599 -0
  136. package/docs/class/src/searching/builder/AdministrativeStateSearchBuilder.js~AdministrativeStateSearchBuilder.html +9 -1
  137. package/docs/class/src/searching/builder/AlarmsSearchBuilder.js~AlarmsSearchBuilder.html +9 -1
  138. package/docs/class/src/searching/builder/AllowedResourceTypeSearchBuilder.js~AllowedResourceTypeSearchBuilder.html +9 -1
  139. package/docs/class/src/searching/builder/AreasSearchBuilder.js~AreasSearchBuilder.html +9 -1
  140. package/docs/class/src/searching/builder/AssetsSearchBuilder.js~AssetsSearchBuilder.html +9 -1
  141. package/docs/class/src/searching/builder/BasicTypesSearchBuilder.js~BasicTypesSearchBuilder.html +9 -1
  142. package/docs/class/src/searching/builder/BulkExecutionSearchBuilder.js~BulkExecutionSearchBuilder.html +865 -0
  143. package/docs/class/src/searching/builder/BulkSearchBuilder.js~BulkSearchBuilder.html +9 -1
  144. package/docs/class/src/searching/builder/BundlesSearchBuilder.js~BundlesSearchBuilder.html +9 -1
  145. package/docs/class/src/searching/builder/CertificatesSearchBuilder.js~CertificatesSearchBuilder.html +9 -1
  146. package/docs/class/src/searching/builder/ChannelsSearchBuilder.js~ChannelsSearchBuilder.html +9 -1
  147. package/docs/class/src/searching/builder/CommunicationsModuleTypeSearchBuilder.js~CommunicationsModuleTypeSearchBuilder.html +9 -1
  148. package/docs/class/src/searching/builder/CountryCodesSearchBuilder.js~CountryCodesSearchBuilder.html +9 -1
  149. package/docs/class/src/searching/builder/DatamodelsSearchBuilder.js~DatamodelsSearchBuilder.html +9 -1
  150. package/docs/class/src/searching/builder/DatapointsSearchBuilder.js~DatapointsSearchBuilder.html +9 -1
  151. package/docs/class/src/searching/builder/DatasetEntitiesSearchBuilder.js~DatasetEntitiesSearchBuilder.html +9 -1
  152. package/docs/class/src/searching/builder/DatasetsCatalogSearchBuilder.js~DatasetsCatalogSearchBuilder.html +9 -1
  153. package/docs/class/src/searching/builder/DatastreamsSearchBuilder.js~DatastreamsSearchBuilder.html +9 -1
  154. package/docs/class/src/searching/builder/DevicesSearchBuilder.js~DevicesSearchBuilder.html +9 -1
  155. package/docs/class/src/searching/builder/DomainsSearchBuilder.js~DomainsSearchBuilder.html +9 -1
  156. package/docs/class/src/searching/builder/EntitiesSearchBuilder.js~EntitiesSearchBuilder.html +9 -1
  157. package/docs/class/src/searching/builder/ExecutionsSearchBuilder.js~ExecutionsSearchBuilder.html +9 -1
  158. package/docs/class/src/searching/builder/FeedsSearchBuilder.js~FeedsSearchBuilder.html +9 -1
  159. package/docs/class/src/searching/builder/FieldsDefinitionSearchBuilder.js~FieldsDefinitionSearchBuilder.html +9 -1
  160. package/docs/class/src/searching/builder/FlattenedSearchBuilder.js~FlattenedSearchBuilder.html +9 -1
  161. package/docs/class/src/searching/builder/HardwaresSearchBuilder.js~HardwaresSearchBuilder.html +9 -1
  162. package/docs/class/src/searching/builder/IoTDatastreamAccessSearchBuilder.js~IoTDatastreamAccessSearchBuilder.html +9 -1
  163. package/docs/class/src/searching/builder/IoTDatastreamPeriodSearchBuilder.js~IoTDatastreamPeriodSearchBuilder.html +9 -1
  164. package/docs/class/src/searching/builder/IoTDatastreamStoragePeriodSearchBuilder.js~IoTDatastreamStoragePeriodSearchBuilder.html +9 -1
  165. package/docs/class/src/searching/builder/MobilePhoneProviderSearchBuilder.js~MobilePhoneProviderSearchBuilder.html +9 -1
  166. package/docs/class/src/searching/builder/OperationalStatusSearchBuilder.js~OperationalStatusSearchBuilder.html +9 -1
  167. package/docs/class/src/searching/builder/OperationsSearchBuilder.js~OperationsSearchBuilder.html +9 -1
  168. package/docs/class/src/searching/builder/OrganizationsSearchBuilder.js~OrganizationsSearchBuilder.html +9 -1
  169. package/docs/class/src/searching/builder/PlansSearchBuilder.js~PlansSearchBuilder.html +9 -1
  170. package/docs/class/src/searching/builder/PreFilteredSearchBuilder.js~PreFilteredSearchBuilder.html +9 -1
  171. package/docs/class/src/searching/builder/RawSearchBuilder.js~RawSearchBuilder.html +9 -1
  172. package/docs/class/src/searching/builder/ResourceTypeSearchBuilder.js~ResourceTypeSearchBuilder.html +9 -1
  173. package/docs/class/src/searching/builder/RuleConfigurationSeveritySearchBuilder.js~RuleConfigurationSeveritySearchBuilder.html +9 -1
  174. package/docs/class/src/searching/builder/RuleModeSearchBuilder.js~RuleModeSearchBuilder.html +9 -1
  175. package/docs/class/src/searching/builder/RuleTypeSearchBuilder.js~RuleTypeSearchBuilder.html +9 -1
  176. package/docs/class/src/searching/builder/RulesSearchBuilder.js~RulesSearchBuilder.html +9 -1
  177. package/docs/class/src/searching/builder/SearchBuilder.js~SearchBuilder.html +10 -2
  178. package/docs/class/src/searching/builder/SearchWithSummaryBuilder.js~SearchWithSummaryBuilder.html +9 -1
  179. package/docs/class/src/searching/builder/ServiceGroupSearchBuilder.js~ServiceGroupSearchBuilder.html +9 -1
  180. package/docs/class/src/searching/builder/SoftwaresSearchBuilder.js~SoftwaresSearchBuilder.html +9 -1
  181. package/docs/class/src/searching/builder/SubscribersSearchBuilder.js~SubscribersSearchBuilder.html +9 -1
  182. package/docs/class/src/searching/builder/SubscriptionsSearchBuilder.js~SubscriptionsSearchBuilder.html +9 -1
  183. package/docs/class/src/searching/builder/TasksSearchBuilder.js~TasksSearchBuilder.html +9 -1
  184. package/docs/class/src/searching/builder/TicketPrioritySearchBuilder.js~TicketPrioritySearchBuilder.html +9 -1
  185. package/docs/class/src/searching/builder/TicketSeveritySearchBuilder.js~TicketSeveritySearchBuilder.html +9 -1
  186. package/docs/class/src/searching/builder/TicketStatusSearchBuilder.js~TicketStatusSearchBuilder.html +9 -1
  187. package/docs/class/src/searching/builder/TicketsSearchBuilder.js~TicketsSearchBuilder.html +9 -1
  188. package/docs/class/src/searching/builder/TimezoneSearchBuilder.js~TimezoneSearchBuilder.html +9 -1
  189. package/docs/class/src/searching/builder/UserLanguagesSearchBuilder.js~UserLanguagesSearchBuilder.html +9 -1
  190. package/docs/class/src/searching/builder/UserProfilesSearchBuilder.js~UserProfilesSearchBuilder.html +9 -1
  191. package/docs/class/src/searching/builder/UsersSearchBuilder.js~UsersSearchBuilder.html +9 -1
  192. package/docs/class/src/searching/builder/WorkgroupsSearchBuilder.js~WorkgroupsSearchBuilder.html +9 -1
  193. package/docs/class/src/searching/error/SearchBuilderError.js~SearchBuilderError.html +9 -1
  194. package/docs/class/src/security/CertificateFinder.js~CertificateFinder.html +9 -1
  195. package/docs/class/src/security/Certificates.js~Certificates.html +9 -1
  196. package/docs/class/src/security/Security.js~Security.html +9 -1
  197. package/docs/class/src/users/UserFinder.js~UserFinder.html +9 -1
  198. package/docs/class/src/users/Users.js~User.html +9 -1
  199. package/docs/class/src/util/Expression.js~Expression.html +9 -1
  200. package/docs/class/src/util/NorthAmpliaREST.js~NorthAmpliaREST.html +24 -9
  201. package/docs/class/src/util/SelectElement.js~SelectElement.html +9 -1
  202. package/docs/class/src/util/SouthAmpliaREST.js~SouthAmpliaREST.html +10 -2
  203. package/docs/class/src/util/searchingFields/FieldFinder.js~FieldFinder.html +9 -1
  204. package/docs/class/src/workgroups/WorkgroupFinder.js~WorkgroupFinder.html +9 -1
  205. package/docs/class/src/workgroups/WorkgroupRelations.js~WorkgroupRelations.html +9 -1
  206. package/docs/class/src/workgroups/WorkgroupRelationsFinder.js~WorkgroupRelationsFinder.html +9 -1
  207. package/docs/class/src/workgroups/Workgroups.js~Workgroups.html +9 -1
  208. package/docs/coverage.json +45 -11
  209. package/docs/dump.json +6582 -4777
  210. package/docs/file/src/GenericFinder.js.html +9 -1
  211. package/docs/file/src/InternalOpenGateAPI.js.html +53 -1
  212. package/docs/file/src/ProvisionGenericFinder.js.html +9 -1
  213. package/docs/file/src/alarms/AlarmActions.js.html +9 -1
  214. package/docs/file/src/alarms/actions/Alarm.js.html +9 -1
  215. package/docs/file/src/alarms/actions/AlarmActionBuilder.js.html +9 -1
  216. package/docs/file/src/alarms/actions/AlarmAttendBuilder.js.html +9 -1
  217. package/docs/file/src/alarms/actions/AlarmCloseBuilder.js.html +9 -1
  218. package/docs/file/src/areas/AreaFinder.js.html +9 -1
  219. package/docs/file/src/areas/Areas.js.html +9 -1
  220. package/docs/file/src/areas/TYPE_ENUM.js.html +9 -1
  221. package/docs/file/src/bulk/BulkExecutionFinder.js.html +355 -0
  222. package/docs/file/src/bulk/BulkFinder.js.html +9 -1
  223. package/docs/file/src/bundles/ACTION_ENUM.js.html +9 -1
  224. package/docs/file/src/bundles/BundleFinder.js.html +9 -1
  225. package/docs/file/src/bundles/Bundles.js.html +9 -1
  226. package/docs/file/src/bundles/deployment/DeploymentElement.js.html +9 -1
  227. package/docs/file/src/bundles/deployment/MODE_VALIDATORS_ENUM.js.html +9 -1
  228. package/docs/file/src/bundles/deployment/OPERATION_ENUM.js.html +9 -1
  229. package/docs/file/src/bundles/deployment/OPTION_ENUM.js.html +9 -1
  230. package/docs/file/src/bundles/deployment/TYPE_ENUM.js.html +9 -1
  231. package/docs/file/src/bundles/deployment/TYPE_VALIDATORS_ENUM.js.html +9 -1
  232. package/docs/file/src/channels/ChannelFinder.js.html +9 -1
  233. package/docs/file/src/channels/Channels.js.html +9 -1
  234. package/docs/file/src/collection/devices/DeviceMessage.js.html +9 -1
  235. package/docs/file/src/collection/devices/collect/CommsModuleMessage.js.html +9 -1
  236. package/docs/file/src/collection/devices/collect/Datapoint.js.html +9 -1
  237. package/docs/file/src/collection/devices/collect/Datastreams.js.html +9 -1
  238. package/docs/file/src/collection/devices/collect/Event.js.html +9 -1
  239. package/docs/file/src/collection/devices/collect/Hardware.js.html +9 -1
  240. package/docs/file/src/collection/devices/collect/Location.js.html +9 -1
  241. package/docs/file/src/collection/devices/collect/Mobile.js.html +9 -1
  242. package/docs/file/src/collection/devices/collect/PowerSupply.js.html +9 -1
  243. package/docs/file/src/collection/devices/collect/Software.js.html +9 -1
  244. package/docs/file/src/collection/devices/collect/Storage.js.html +9 -1
  245. package/docs/file/src/collection/devices/collect/Subscriber.js.html +9 -1
  246. package/docs/file/src/collection/devices/collect/Subscription.js.html +9 -1
  247. package/docs/file/src/collection/devices/collect/Temperature.js.html +9 -1
  248. package/docs/file/src/collection/devices/collect/Usage.js.html +9 -1
  249. package/docs/file/src/collection/devices/collect/enum/ADDRESS_TYPE_ENUM.js.html +9 -1
  250. package/docs/file/src/collection/devices/collect/enum/ANTENNA_STATUS_ENUM.js.html +9 -1
  251. package/docs/file/src/collection/devices/collect/enum/BATTERY_CHARGE_LEVEL_STATUS_ENUM.js.html +9 -1
  252. package/docs/file/src/collection/devices/collect/enum/BATTERY_CHARGE_STATUS_ENUM.js.html +9 -1
  253. package/docs/file/src/collection/devices/collect/enum/LEVEL_TREND_ENUM.js.html +9 -1
  254. package/docs/file/src/collection/devices/collect/enum/POWER_SUPPLY_SOURCE_ENUM.js.html +9 -1
  255. package/docs/file/src/collection/devices/collect/enum/SOFTWARE_TYPE_ENUM.js.html +9 -1
  256. package/docs/file/src/collection/devices/collect/enum/TEMPERATURE_STATUS_ENUM.js.html +9 -1
  257. package/docs/file/src/domains/Domains.js.html +9 -1
  258. package/docs/file/src/domains/DomainsFinder.js.html +9 -1
  259. package/docs/file/src/entities/DeviceFinder.js.html +9 -1
  260. package/docs/file/src/entities/EntityFinder.js.html +9 -1
  261. package/docs/file/src/entities/SubscribersFinder.js.html +9 -1
  262. package/docs/file/src/entities/SubscriptionsFinder.js.html +9 -1
  263. package/docs/file/src/entities/TicketFinder.js.html +9 -1
  264. package/docs/file/src/iot/catalog/Category.js.html +9 -1
  265. package/docs/file/src/iot/catalog/Datastream.js.html +9 -1
  266. package/docs/file/src/iot/catalog/Qrating.js.html +9 -1
  267. package/docs/file/src/iot/datamodels/Datamodels.js.html +9 -1
  268. package/docs/file/src/iot/datamodels/DatamodelsFinder.js.html +9 -1
  269. package/docs/file/src/iot/datamodels/DatamodelsHelper.js.html +9 -1
  270. package/docs/file/src/operations/OperationActions.js.html +9 -1
  271. package/docs/file/src/operations/OperationFinder.js.html +9 -1
  272. package/docs/file/src/operations/Operations.js.html +9 -1
  273. package/docs/file/src/operations/PeriodicityActions.js.html +9 -1
  274. package/docs/file/src/operations/catalog/AppendEntitiesBy.js.html +9 -1
  275. package/docs/file/src/operations/catalog/BaseOperationBuilder.js.html +9 -1
  276. package/docs/file/src/operations/catalog/Operation.js.html +9 -1
  277. package/docs/file/src/operations/catalog/parameters/BaseParameterBuilderWithParent.js.html +9 -1
  278. package/docs/file/src/operations/catalog/parameters/ParameterBuilderFactory.js.html +9 -1
  279. package/docs/file/src/operations/catalog/period/DAYS_ENUM.js.html +9 -1
  280. package/docs/file/src/operations/catalog/period/ExecuteEachBuilder.js.html +9 -1
  281. package/docs/file/src/operations/catalog/period/ExecuteEveryBuilder.js.html +9 -1
  282. package/docs/file/src/operations/catalog/period/MONTHS_ENUM.js.html +9 -1
  283. package/docs/file/src/operations/catalog/period/PeriodicityUpdateBuilder.js.html +9 -1
  284. package/docs/file/src/operations/catalog/period/pattern/ByGeneric.js.html +9 -1
  285. package/docs/file/src/operations/catalog/period/pattern/ByMonth.js.html +9 -1
  286. package/docs/file/src/operations/catalog/period/pattern/ByWeek.js.html +9 -1
  287. package/docs/file/src/operations/catalog/period/pattern/ByYear.js.html +9 -1
  288. package/docs/file/src/organizations/OrganizationFinder.js.html +9 -1
  289. package/docs/file/src/organizations/Organizations.js.html +9 -1
  290. package/docs/file/src/provision/BaseProvision.js.html +9 -1
  291. package/docs/file/src/provision/bulk/BulkExecutionBuilder.js.html +396 -0
  292. package/docs/file/src/provision/entities/AssetBuilder.js.html +9 -1
  293. package/docs/file/src/provision/entities/BulkBuilder.js.html +9 -1
  294. package/docs/file/src/provision/entities/ComplexBuilder.js.html +9 -1
  295. package/docs/file/src/provision/entities/CsvBulkBuilder.js.html +9 -1
  296. package/docs/file/src/provision/entities/DeviceBuilder.js.html +9 -1
  297. package/docs/file/src/provision/entities/EntityBuilder.js.html +9 -1
  298. package/docs/file/src/provision/entities/JsonBulkBuilder.js.html +9 -1
  299. package/docs/file/src/provision/entities/JsonFlattenedBulkBuilder.js.html +9 -1
  300. package/docs/file/src/provision/entities/SimpleBuilder.js.html +9 -1
  301. package/docs/file/src/provision/entities/SubscriberBuilder.js.html +9 -1
  302. package/docs/file/src/provision/entities/SubscriptionBuilder.js.html +9 -1
  303. package/docs/file/src/provision/entities/TicketBuilder.js.html +9 -1
  304. package/docs/file/src/provisionProcessors/provisionProcessors.js.html +349 -0
  305. package/docs/file/src/provisionProcessors/provisionProcessorsFinder.js.html +302 -0
  306. package/docs/file/src/rulesConfiguration/RuleConfigurations.js.html +9 -1
  307. package/docs/file/src/rulesConfiguration/RuleConfigurationsActions.js.html +9 -1
  308. package/docs/file/src/rulesConfiguration/RuleConfigurationsCatalog.js.html +9 -1
  309. package/docs/file/src/rulesConfiguration/RuleConfigurationsFinder.js.html +9 -1
  310. package/docs/file/src/rulesConfiguration/_RuleCondition.js.html +9 -1
  311. package/docs/file/src/rulesConfiguration/_RuleNotification.js.html +9 -1
  312. package/docs/file/src/searching/AssetSearch.js.html +10 -2
  313. package/docs/file/src/searching/BaseSearch.js.html +10 -2
  314. package/docs/file/src/searching/DeviceSearch.js.html +10 -2
  315. package/docs/file/src/searching/EntitySearch.js.html +9 -1
  316. package/docs/file/src/searching/FilterBuilder.js.html +9 -1
  317. package/docs/file/src/searching/QuickSearch.js.html +9 -1
  318. package/docs/file/src/searching/Search.js.html +10 -2
  319. package/docs/file/src/searching/SelectBuilder.js.html +9 -1
  320. package/docs/file/src/searching/StaticSearch.js.html +9 -1
  321. package/docs/file/src/searching/WPSearch.js.html +294 -0
  322. package/docs/file/src/searching/builder/AdministrativeStateSearchBuilder.js.html +9 -1
  323. package/docs/file/src/searching/builder/AlarmsSearchBuilder.js.html +9 -1
  324. package/docs/file/src/searching/builder/AllowedResourceTypeSearchBuilder.js.html +9 -1
  325. package/docs/file/src/searching/builder/AreasSearchBuilder.js.html +9 -1
  326. package/docs/file/src/searching/builder/AssetsSearchBuilder.js.html +9 -1
  327. package/docs/file/src/searching/builder/BasicTypesSearchBuilder.js.html +9 -1
  328. package/docs/file/src/searching/builder/BulkExecutionSearchBuilder.js.html +300 -0
  329. package/docs/file/src/searching/builder/BulkSearchBuilder.js.html +9 -1
  330. package/docs/file/src/searching/builder/BundlesSearchBuilder.js.html +9 -1
  331. package/docs/file/src/searching/builder/CertificatesSearchBuilder.js.html +9 -1
  332. package/docs/file/src/searching/builder/ChannelsSearchBuilder.js.html +9 -1
  333. package/docs/file/src/searching/builder/CommunicationsModuleTypeSearchBuilder.js.html +9 -1
  334. package/docs/file/src/searching/builder/CountryCodesSearchBuilder.js.html +9 -1
  335. package/docs/file/src/searching/builder/DatamodelsSearchBuilder.js.html +9 -1
  336. package/docs/file/src/searching/builder/DatapointsSearchBuilder.js.html +9 -1
  337. package/docs/file/src/searching/builder/DatasetEntitiesSearchBuilder.js.html +9 -1
  338. package/docs/file/src/searching/builder/DatasetsCatalogSearchBuilder.js.html +9 -1
  339. package/docs/file/src/searching/builder/DatastreamsSearchBuilder.js.html +9 -1
  340. package/docs/file/src/searching/builder/DevicesSearchBuilder.js.html +9 -1
  341. package/docs/file/src/searching/builder/DomainsSearchBuilder.js.html +9 -1
  342. package/docs/file/src/searching/builder/EntitiesSearchBuilder.js.html +9 -1
  343. package/docs/file/src/searching/builder/ExecutionsSearchBuilder.js.html +9 -1
  344. package/docs/file/src/searching/builder/FeedsSearchBuilder.js.html +9 -1
  345. package/docs/file/src/searching/builder/FieldsDefinitionSearchBuilder.js.html +9 -1
  346. package/docs/file/src/searching/builder/FlattenedSearchBuilder.js.html +9 -1
  347. package/docs/file/src/searching/builder/HardwaresSearchBuilder.js.html +9 -1
  348. package/docs/file/src/searching/builder/IoTDatastreamAccessSearchBuilder.js.html +9 -1
  349. package/docs/file/src/searching/builder/IoTDatastreamPeriodSearchBuilder.js.html +9 -1
  350. package/docs/file/src/searching/builder/IoTDatastreamStoragePeriodSearchBuilder.js.html +9 -1
  351. package/docs/file/src/searching/builder/MobilePhoneProviderSearchBuilder.js.html +9 -1
  352. package/docs/file/src/searching/builder/OperationalStatusSearchBuilder.js.html +9 -1
  353. package/docs/file/src/searching/builder/OperationsSearchBuilder.js.html +9 -1
  354. package/docs/file/src/searching/builder/OrganizationsSearchBuilder.js.html +9 -1
  355. package/docs/file/src/searching/builder/PlansSearchBuilder.js.html +9 -1
  356. package/docs/file/src/searching/builder/PreFilteredSearchBuilder.js.html +9 -1
  357. package/docs/file/src/searching/builder/RawSearchBuilder.js.html +9 -1
  358. package/docs/file/src/searching/builder/ResourceTypeSearchBuilder.js.html +9 -1
  359. package/docs/file/src/searching/builder/RuleConfigurationSeveritySearchBuilder.js.html +9 -1
  360. package/docs/file/src/searching/builder/RuleModeSearchBuilder.js.html +9 -1
  361. package/docs/file/src/searching/builder/RuleTypeSearchBuilder.js.html +9 -1
  362. package/docs/file/src/searching/builder/RulesSearchBuilder.js.html +9 -1
  363. package/docs/file/src/searching/builder/SearchBuilder.js.html +9 -1
  364. package/docs/file/src/searching/builder/SearchWithSummaryBuilder.js.html +9 -1
  365. package/docs/file/src/searching/builder/ServiceGroupSearchBuilder.js.html +9 -1
  366. package/docs/file/src/searching/builder/SoftwaresSearchBuilder.js.html +9 -1
  367. package/docs/file/src/searching/builder/SubscribersSearchBuilder.js.html +9 -1
  368. package/docs/file/src/searching/builder/SubscriptionsSearchBuilder.js.html +9 -1
  369. package/docs/file/src/searching/builder/TasksSearchBuilder.js.html +9 -1
  370. package/docs/file/src/searching/builder/TicketPrioritySearchBuilder.js.html +9 -1
  371. package/docs/file/src/searching/builder/TicketSeveritySearchBuilder.js.html +9 -1
  372. package/docs/file/src/searching/builder/TicketStatusSearchBuilder.js.html +9 -1
  373. package/docs/file/src/searching/builder/TicketsSearchBuilder.js.html +9 -1
  374. package/docs/file/src/searching/builder/TimezoneSearchBuilder.js.html +9 -1
  375. package/docs/file/src/searching/builder/UserLanguagesSearchBuilder.js.html +9 -1
  376. package/docs/file/src/searching/builder/UserProfilesSearchBuilder.js.html +9 -1
  377. package/docs/file/src/searching/builder/UsersSearchBuilder.js.html +9 -1
  378. package/docs/file/src/searching/builder/WorkgroupsSearchBuilder.js.html +9 -1
  379. package/docs/file/src/searching/error/SearchBuilderError.js.html +9 -1
  380. package/docs/file/src/security/ADMINISTRATIVE_STATE_ENUM.js.html +9 -1
  381. package/docs/file/src/security/CertificateFinder.js.html +9 -1
  382. package/docs/file/src/security/Certificates.js.html +9 -1
  383. package/docs/file/src/security/MIME_TYPES_ENUM.js.html +9 -1
  384. package/docs/file/src/security/Security.js.html +9 -1
  385. package/docs/file/src/security/USAGES_ENUM.js.html +9 -1
  386. package/docs/file/src/users/UserFinder.js.html +9 -1
  387. package/docs/file/src/users/Users.js.html +9 -1
  388. package/docs/file/src/util/DATE_FORMAT.js.html +9 -1
  389. package/docs/file/src/util/Expression.js.html +9 -1
  390. package/docs/file/src/util/NorthAmpliaREST.js.html +43 -9
  391. package/docs/file/src/util/SelectElement.js.html +9 -1
  392. package/docs/file/src/util/SouthAmpliaREST.js.html +9 -1
  393. package/docs/file/src/util/formats/check_types.js.html +16 -3
  394. package/docs/file/src/util/searchingFields/FieldFinder.js.html +9 -1
  395. package/docs/file/src/util/searchingFields/IotFields.js.html +9 -1
  396. package/docs/file/src/util/searchingFields/source-precompiled/Fields.js.html +9 -1
  397. package/docs/file/src/workgroups/WorkgroupFinder.js.html +9 -1
  398. package/docs/file/src/workgroups/WorkgroupRelations.js.html +9 -1
  399. package/docs/file/src/workgroups/WorkgroupRelationsFinder.js.html +9 -1
  400. package/docs/file/src/workgroups/Workgroups.js.html +9 -1
  401. package/docs/identifiers.html +233 -3
  402. package/docs/index.html +9 -1
  403. package/docs/manual/index.html +224 -2
  404. package/docs/package.json +1 -1
  405. package/docs/script/search_index.js +216 -0
  406. package/docs/source.html +257 -199
  407. package/docs/test-file/client/autogeneratedFields/fields.spec.js.html +9 -1
  408. package/docs/test-file/client/bundles/bundles.spec.js.html +9 -1
  409. package/docs/test-file/client/collection/iot.spec.js.html +9 -1
  410. package/docs/test-file/client/device/device.spec.js.html +9 -1
  411. package/docs/test-file/client/provision/devices.provision.spec.js.html +9 -1
  412. package/docs/test-file/client/searching/FilterBuilder.spec.js.html +9 -1
  413. package/docs/test-file/client/searching/datapoints.search.spec.js.html +9 -1
  414. package/docs/test-file/client/searching/module.searching.spec.js.html +9 -1
  415. package/docs/test-file/client/searching/quicksearch.spec.js.html +9 -1
  416. package/docs/test-file/client/searching/rawsearch.spec.js.html +9 -1
  417. package/docs/test-file/client/searching/search.spec.js.html +9 -1
  418. package/docs/test-file/client/security/certificates.spec.js.html +9 -1
  419. package/docs/test-file/client/users/find.spec.js.html +9 -1
  420. package/docs/test-file/client/users/user.spec.js.html +9 -1
  421. package/docs/test.html +9 -1
  422. package/docs/variable/index.html +149 -1
  423. package/features/features/provision/bulk/execute_bulk.feature +60 -0
  424. package/features/features/provision/bulk/find_bulk_execution.feature +93 -0
  425. package/features/features/provision/processors/create_delete_processors.feature +49 -0
  426. package/features/features/provision/processors/find_provision_processors.feature +59 -0
  427. package/features/features/provision/processors/update_provision_processors.feature +32 -0
  428. package/features/features/searching/bulk/searching_bulk_executions.feature +68 -0
  429. package/features/step_definitions/file_test/bulk_execution_simple.xls +0 -0
  430. package/features/step_definitions/given_step_definitions.js +2 -2
  431. package/features/step_definitions/given_step_definitions_using_model.js +58 -12
  432. package/features/step_definitions/then_step_definitions.js +1 -0
  433. package/features/step_definitions/then_step_definitions_using_model.js +12 -0
  434. package/features/step_definitions/when_step_definitions.js +49 -5
  435. package/features/step_definitions/when_step_definitions_using_model.js +1 -0
  436. package/features/support/create_provision_model.js +7 -1
  437. package/features/support/delete_provision_model.js +3 -0
  438. package/features/support/find_model.js +10 -1
  439. package/features/support/utils_model.js +15 -0
  440. package/features/support/world.js +2 -2
  441. package/package.json +1 -1
  442. package/scripts/execute_tests.js +2 -2
  443. package/scripts/release_version.js +8 -8
  444. package/src/InternalOpenGateAPI.js +44 -0
  445. package/src/bulk/BulkExecutionFinder.js +95 -0
  446. package/src/provision/bulk/BulkExecutionBuilder.js +136 -0
  447. package/src/provisionProcessors/provisionProcessors.js +89 -0
  448. package/src/provisionProcessors/provisionProcessorsFinder.js +42 -0
  449. package/src/searching/AssetSearch.js +1 -1
  450. package/src/searching/BaseSearch.js +1 -1
  451. package/src/searching/DeviceSearch.js +1 -1
  452. package/src/searching/Search.js +1 -1
  453. package/src/searching/WPSearch.js +34 -0
  454. package/src/searching/builder/BulkExecutionSearchBuilder.js +40 -0
  455. package/src/util/NorthAmpliaREST.js +34 -8
  456. package/src/util/formats/check_types.js +7 -2
  457. package/dist/opengate-api-bower-10.4.0.js.map +0 -1
  458. package/dist/opengate-api-bower-10.4.0.min.js.map +0 -1
@@ -0,0 +1,136 @@
1
+ 'use strict';
2
+
3
+ import BaseProvision from '../BaseProvision';
4
+ import q from 'q';
5
+ export const TYPES = {
6
+ 'xls': 'application/vnd.ms-excel',
7
+ 'xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
8
+ }
9
+
10
+ /**
11
+ * This builder give you the necessary tools to create a bulk executions using our OpenGate REST
12
+ */
13
+ export default class BulkExecutionBuilder extends BaseProvision {
14
+
15
+ /**
16
+ * @param {InternalOpenGateAPI} ogapi - required field. This is ogapi instance
17
+ * @param {string} organization - required field. This is the organization name
18
+ * @param {string} processorId - required field. This is the provision processor use for bulk provision
19
+ * @param {number} [timeout] - timeout in millisecons. The request will have a specific time out if it will be exceeded then the promise throw an exception
20
+ */
21
+ constructor(ogapi, organization, processorId, timeout) {
22
+ super(ogapi, undefined, timeout, ['organization', 'processorId']);
23
+ this._timeout = timeout;
24
+ this._organization = organization;
25
+ this._processorId = processorId;
26
+ this._resource = 'provisionProcessors/provision/organizations/' + organization + '/' + processorId + '/'
27
+
28
+ }
29
+
30
+ _composeElement() {
31
+ return this;
32
+ }
33
+
34
+ _buildURL() {
35
+ return this._resource + this._type;
36
+ }
37
+
38
+ /**
39
+ * Instead of creating a bulk process, return the provision process planning for specified entries. This is is synch process that does not cause changes in the database
40
+ * @example
41
+ * ogapi.newBulkExecutionBuilder('orgname', 'processorId', 10000).plan(rawFile, extension)
42
+ * ogapi.newBulkExecutionBuilder('orgname', 'processorId', 10000).plan(rawFile, extension, numberOfEntriesToProcess)
43
+ * @param {string|Blob} rawFile - File with format string or Blob
44
+ * @param {string} [extension] - File format
45
+ * @param {number} [numberOfEntriesToProcess] - Number of entries to be processed.
46
+ */
47
+ plan(rawFile, extension, numberOfEntriesToProcess) {
48
+ if(typeof extension !== 'string')
49
+ throw new Error('Parameter extension must be a string (xls or xlsx) and cannot be empty')
50
+ this._extension = TYPES[extension]
51
+ this._setUrlParameters({
52
+ numberOfEntriesToProcess: numberOfEntriesToProcess || 1
53
+ });
54
+ this._type = 'plan'
55
+ this._setExtraHeaders({
56
+ 'accept': 'application/json'
57
+ });
58
+ return this._executeOperation(rawFile);
59
+ }
60
+
61
+ /**
62
+ * Do a bulk using specific Provision Processor.
63
+ * @example
64
+ * ogapi.newBulkExecutionBuilder('orgname', 'processorId', 10000).bulk(rawFile, extension)
65
+ * @param {File} rawFile - File with data
66
+ * @param {string} [extension] - File format
67
+ */
68
+ bulk(rawFile, extension) {
69
+ this._extension = TYPES[extension]
70
+ if(typeof this._extension !== 'string')
71
+ throw new Error('Parameter extension must be a string (xls or xlsx) and cannot be empty')
72
+ this._type = 'bulk'
73
+ this._setExtraHeaders({
74
+ 'accept': this._extension
75
+ });
76
+ return this._executeOperation(rawFile);
77
+ }
78
+ _executeOperation(rawFile) {
79
+ let form;
80
+ if (typeof rawFile !== 'string') {
81
+ form = new FormData();
82
+ const processorBulkFile = new Blob([rawFile ], {
83
+ type: this._extension
84
+ });
85
+ form.append('processorBulkFile', processorBulkFile);
86
+ } else {
87
+ form = {};
88
+ form.processorBulkFile = rawFile;
89
+ }
90
+ this._setExtraHeaders({
91
+ 'Content-Type': 'multipart/form-data'
92
+ })
93
+
94
+ const defer = q.defer();
95
+
96
+ var petitionUrl = this._buildURL();
97
+ //url, formData, events, timeout, headers, parameters
98
+ this._ogapi.Napi.post_multipart(petitionUrl, form, {}, this._timeout, this._getExtraHeaders(), this._getUrlParameters())
99
+ .then((response) => {
100
+ let statusCode = response.statusCode;
101
+ switch (statusCode) {
102
+ case 200:{
103
+ const resultQuery = response.text != "" ? JSON.parse(response.text) : {};
104
+ const _statusCode = response.status;
105
+ defer.resolve({
106
+ data: resultQuery,
107
+ statusCode: _statusCode
108
+ });
109
+ break
110
+ }
111
+ case 201:{
112
+ const _statusCode = response.status;
113
+ const location = response.location || response.headers.location || response.header.location
114
+ defer.resolve({
115
+ location: location,
116
+ statusCode: _statusCode
117
+ });
118
+ break
119
+ }
120
+ case 204:
121
+ defer.resolve(response);
122
+ break
123
+ default:
124
+ defer.reject({
125
+ errors: response.data.errors,
126
+ statusCode: response.statusCode
127
+ });
128
+ break
129
+ }
130
+ })
131
+ .catch((error) => {
132
+ defer.reject(error);
133
+ });
134
+ return defer.promise;
135
+ }
136
+ }
@@ -0,0 +1,89 @@
1
+ 'use strict';
2
+
3
+ import BaseProvision from '../provision/BaseProvision';
4
+ import checkType from '../util/formats/check_types'
5
+ /**
6
+ * This is a base object that contains all you can do about Provision Processors.
7
+ */
8
+
9
+ export default class ProvisionProcessors extends BaseProvision {
10
+
11
+ /**
12
+ * @param {InternalOpenGateAPI} Reference to the API object.
13
+ */
14
+ constructor(ogapi) {
15
+ super(ogapi, "organizations/", undefined, ['name', 'organization', 'configurationParams', 'scriptProcessor']);
16
+ }
17
+
18
+ //solo put o delete se llama
19
+ _buildURL() {
20
+ let url = "provisionProcessors/provision/organizations/" + this._organization + '/' + this._identifier;
21
+ return url;
22
+ }
23
+
24
+ /**
25
+ * Set the organization attribute
26
+ * @param {string} organization - required field
27
+ * @return {ProvisionPrecessors}
28
+ */
29
+ withOrganization(organization) {
30
+ checkType._checkString(organization, 50, 'organization');
31
+ this._organization = organization;
32
+ return this;
33
+ }
34
+
35
+ /**
36
+ * Set the identifier attribute
37
+ * @param {string} identifier - required field
38
+ * @return {ProvisionPrecessors}
39
+ */
40
+ withIdentifier(identifier) {
41
+ checkType._checkString(identifier, 50, 'identifier');
42
+ this._identifier = identifier;
43
+ return this;
44
+ }
45
+
46
+ /**
47
+ * Set the name attribute
48
+ * @param {string} name - required field
49
+ * @return {ProvisionPrecessors}
50
+ */
51
+ withName(name) {
52
+ checkType._checkString(name, 50, 'name');
53
+ this._name = name;
54
+ return this;
55
+ }
56
+
57
+ /**
58
+ * Set the columns attribute
59
+ * @param {object} configurationParams - required field
60
+ * @return {ProvisionPrecessors}
61
+ */
62
+ withConfigurationParams(configurationParams) {
63
+ checkType._checkObject(configurationParams, 'configurationParams');
64
+ this._configurationParams = configurationParams;
65
+ return this;
66
+ }
67
+
68
+ /**
69
+ * Set the columns attribute
70
+ * @param {object} scriptProcessor - required field
71
+ * @return {ProvisionPrecessors}
72
+ */
73
+ withScriptProcessor(scriptProcessor) {
74
+ checkType._checkObject(scriptProcessor, 'scriptProcessor');
75
+ this._scriptProcessor = scriptProcessor;
76
+ return this;
77
+ }
78
+
79
+ //create y update
80
+ _composeElement() {
81
+ this._resource = "provisionProcessors/provision/organizations/" + this._organization;
82
+ let provisionProcessor = {
83
+ name: this._name,
84
+ configurationParams: this._configurationParams,
85
+ scriptProcessor: this._scriptProcessor
86
+ };
87
+ return provisionProcessor;
88
+ }
89
+ }
@@ -0,0 +1,42 @@
1
+ 'use strict';
2
+
3
+ import GenericFinder from '../GenericFinder';
4
+
5
+ /**
6
+ * This class allow make get request to ProvisionProcessors Finder resource into Opengate North API.
7
+ */
8
+ export default class provisionProcessorsFinder extends GenericFinder {
9
+
10
+ /**
11
+ * @param {InternalOpenGateAPI} ogapi - Reference to the API object.
12
+ */
13
+ constructor(ogapi) {
14
+ super(ogapi, 'provisionProcessors/provision/organizations', 'provisionPrecessors');
15
+ }
16
+
17
+ /**
18
+ * Performs a get that returns list of provision processors
19
+ * @test
20
+ * ogapi.newProvisionProcessorsFinder().findByOrganization(organization);
21
+ * @param {string} organization - organization
22
+ * @return {Promise}
23
+ */
24
+ findByOrganization(organization) {
25
+ this._withId(organization);
26
+ return this._execute();
27
+ }
28
+
29
+ /**
30
+ * Performs a get that returns a definition of provision Processors
31
+ * @test
32
+ * ogapi.newProvisionProcessorsFinder().findByOrganizationAndProvisionProcessorId(organization, identifier);
33
+ * @param {string} organization - organization
34
+ * @param {string} identifier - Provision Processors identifier
35
+ * @return {Promise}
36
+ */
37
+ findByOrganizationAndProvisionProcessorId(organization, identifier) {
38
+ console.log('estoy aqui', organization + '/' + identifier)
39
+ this._withId(organization + '/' + identifier);
40
+ return this._execute();
41
+ }
42
+ }
@@ -4,7 +4,7 @@ import Search from './Search';
4
4
  import q from 'q';
5
5
 
6
6
  /**
7
- * This extends BaseSearch and allow make request to any available resource into Opengate North API.
7
+ * This extends Search and allow make request to any available resource into Opengate North API.
8
8
  */
9
9
  export default class AssetSearch extends Search {
10
10
  /**
@@ -28,7 +28,7 @@ export default class BaseSearch {
28
28
  this._timeout = timeout;
29
29
  }
30
30
  this._ogapi = ogapi;
31
- this._resource = 'search' + resource;
31
+ this._resource = resource;
32
32
  this._headers = undefined;
33
33
  this._urlParameters = undefined;
34
34
  }
@@ -2,7 +2,7 @@ import Search from './Search';
2
2
  import q from 'q';
3
3
 
4
4
  /**
5
- * This extends BaseSearch and allow make request to any available resource into Opengate North API.
5
+ * This extends Search and allow make request to any available resource into Opengate North API.
6
6
  */
7
7
  export default class DeviceSearch extends Search {
8
8
  /**
@@ -18,7 +18,7 @@ export default class Search extends BaseSearch {
18
18
  * @param {nubmer} timeout
19
19
  */
20
20
  constructor(ogapi, url, filter, limit = { limit: {} }, sort, group, select, timeout, urlParams) {
21
- super(ogapi, url, timeout);
21
+ super(ogapi, 'search' + url, timeout);
22
22
  this._setUrlParameters(urlParams);
23
23
  this._postObj = merge(filter, limit, group, select);
24
24
  if (typeof sort === 'object') {
@@ -0,0 +1,34 @@
1
+ 'use strict';
2
+
3
+ import BaseSearch from './BaseSearch';
4
+ import merge from 'merge';
5
+
6
+ /**
7
+ * This extends BaseSearch and allow make request to any available resource into Opengate North API.
8
+ * The resource does not have the 'search' prefix. For this, use class Search
9
+ */
10
+ export default class WPSearch extends BaseSearch {
11
+ /**
12
+ * @param {!InternalOpenGateAPI} ogapi - this is configuration about Opengate North API.
13
+ * @param {!string} url - this define a specific resource to make the search
14
+ * @param {object} filter - this is the filter
15
+ * @param {object} limit - this is the pagination about the search
16
+ * @param {object} sort - this defined parameters to order the result of search
17
+ * @param {object} group
18
+ * @param {object} select
19
+ * @param {nubmer} timeout
20
+ */
21
+ constructor(ogapi, url, filter, limit = { limit: {} }, sort, group, select, timeout, urlParams) {
22
+ super(ogapi, url, timeout);
23
+ this._setUrlParameters(urlParams);
24
+ this._postObj = merge(filter, limit, group, select);
25
+ if (typeof sort === 'object') {
26
+ this._postObj = merge(this._postObj, sort);
27
+ }
28
+ }
29
+
30
+ _filter() {
31
+ return this._postObj;
32
+ }
33
+
34
+ }
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ import SearchBuilder from './SearchBuilder';
4
+ import FieldFinder from '../../util/searchingFields/FieldFinder';
5
+ import WPSearch from '../WPSearch';
6
+ const BASE_URL = 'provisionProcessors/bulk/search';
7
+
8
+ /**
9
+ * Searching over all the created bulk process, which are already done or still in progress.
10
+ * @example ogapi.bulkExecutionSearchBuilder()
11
+ */
12
+ export default class BulkExecutionSearchBuilder extends SearchBuilder {
13
+ /**
14
+ * @param {!InternalOpenGateAPI} parent - Instance of our InternalOpenGateAPI
15
+ */
16
+ constructor(parent) {
17
+ super(parent, {}, new FieldFinder(parent, BASE_URL));
18
+ this._url = BASE_URL;
19
+ }
20
+
21
+ /**
22
+ * Build a instance of WPSearch
23
+ *
24
+ * @example
25
+ * ogapi.bulkExecutionSearchBuilder().build()
26
+ * @throws {SearchBuilderError} Throw error on url build
27
+ * @return {WPSearch}
28
+ */
29
+ build() {
30
+ return new WPSearch(this._parent,
31
+ this._buildUrl(),
32
+ this._buildFilter(),
33
+ this._buildLimit(),
34
+ this._buildSort(),
35
+ this._buildGroup(),
36
+ this._buildSelect(),
37
+ this._builderParams.timeout,
38
+ this._urlParams);
39
+ }
40
+ }
@@ -103,11 +103,12 @@ export default class NorthAmpliaREST {
103
103
  * @param {number} timeout - timeout in milliseconds
104
104
  * @param {object} headers - headers of request
105
105
  * @param {object} parameters - parameters of request
106
+ * @param {boolean} asBuffer - response body as buffer (Uint8Array)
106
107
  * @return {Promise}
107
108
  */
108
- get(url, timeout, headers, parameters) {
109
+ get(url, timeout, headers, parameters, asBuffer) {
109
110
  var req = request.get(this._createUrl(url, parameters));
110
- return this._createPromiseRequest(req, null, timeout, headers);
111
+ return this._createPromiseRequest(req, null, timeout, headers, asBuffer);
111
112
  }
112
113
 
113
114
  /**
@@ -175,14 +176,16 @@ export default class NorthAmpliaREST {
175
176
  req.attach('certificate', formData.certificate);
176
177
  delete formData.certificate;
177
178
  }
178
-
179
+ req.send(formData);
179
180
  } else if (formData.bulkFile) {
180
181
  req.set('Content-Type', formData.ext);
181
182
  formData = formData.bulkFile;
183
+ req.send(formData);
184
+ } else if(formData.processorBulkFile){
185
+ req.attach('file', formData.processorBulkFile);
186
+ delete formData.processorBulkFile;
182
187
  }
183
188
 
184
- req.send(formData);
185
-
186
189
  return this._createPromiseRequest(req, events, timeout, headers);
187
190
  }
188
191
 
@@ -196,8 +199,7 @@ export default class NorthAmpliaREST {
196
199
  * @return {Promise}
197
200
  */
198
201
  put(url, data, timeout, headers, parameters) {
199
- var req = request.put(this._createUrl(url, parameters))
200
- .send(data);
202
+ var req = request.put(this._createUrl(url, parameters)).send(data);
201
203
 
202
204
  if (headers) {
203
205
  headers['Content-Type'] = 'application/json';
@@ -256,10 +258,11 @@ export default class NorthAmpliaREST {
256
258
  }
257
259
  });
258
260
  var returnUrl = this._url(this._options) + "/" + encode.join("/");
261
+
259
262
  return returnUrl;
260
263
  }
261
264
 
262
- _createPromiseRequest(req, events, timeout, headers) {
265
+ _createPromiseRequest(req, events, timeout, headers, asBuffer) {
263
266
  let _timeout = timeout;
264
267
  if (typeof _timeout === "undefined" || _timeout === null) {
265
268
  _timeout = this._options.timeout;
@@ -315,6 +318,29 @@ export default class NorthAmpliaREST {
315
318
  'data': data
316
319
  });
317
320
  } else {
321
+ if(asBuffer){
322
+ var chunks = []
323
+ res.on("data", function (chunk) {
324
+ chunks.push(chunk);
325
+ });
326
+
327
+ res.on("end", function (chunk) {
328
+ let length = 0
329
+
330
+ for(let i = 0; i < chunks.length; i++){
331
+ length += chunks[i].length
332
+ }
333
+ const resultArray = new Uint8Array(length)
334
+ let offset = 0
335
+
336
+ for(let i = 0; i < chunks.length; i++){
337
+ const c = chunks[i]
338
+ resultArray.set(c, offset)
339
+ offset += c.length
340
+ }
341
+ res.body = resultArray
342
+ });
343
+ }
318
344
  defered.resolve(res);
319
345
  }
320
346
  });
@@ -6,11 +6,11 @@ module.exports = {
6
6
  return type == this;
7
7
  }, type);
8
8
 
9
- if (typeof found === "undefined") {
9
+ if (typeof found === 'undefined') {
10
10
  not_found.push(type);
11
11
  }
12
12
  if (not_found.length !== 0) {
13
- throw new Error({ message: "OGAPI_NOT_ALLOWED_PARAMETER", parameter: JSON.stringify(not_found), allowed: JSON.stringify(TYPE_ENUM) });
13
+ throw new Error({ message: 'OGAPI_NOT_ALLOWED_PARAMETER', parameter: JSON.stringify(not_found), allowed: JSON.stringify(TYPE_ENUM) });
14
14
  }
15
15
  return type;
16
16
  },
@@ -30,6 +30,11 @@ module.exports = {
30
30
  if (!Array.isArray(parameter) || parameter.length === 0) {
31
31
  throw new Error({ message: 'OGAPI_ARRAY_PARAMETER', parameter: name });
32
32
  }
33
+ },
34
+ _checkObject: function(parameter, name) {
35
+ if (typeof parameter !== 'object') {
36
+ throw new Error({ message: 'OGAPI_OBJECT_PARAMETER', parameter: name });
37
+ }
33
38
  }
34
39
 
35
40
  }
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"mappings":"","sources":["opengate-api-bower.js"],"file":"opengate-api-bower-10.4.0.js","sourceRoot":".."}