opengate-js 10.2.1 → 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.
- package/bower.json +1 -1
- package/dist/{opengate-api-bower-10.2.1.js → opengate-api-bower-10.5.0.js} +1198 -384
- package/dist/opengate-api-bower-10.5.0.js.map +1 -0
- package/dist/{opengate-api-bower-10.2.1.min.js → opengate-api-bower-10.5.0.min.js} +31 -31
- package/dist/{opengate-api-bower-10.2.1.min.js.map → opengate-api-bower-10.5.0.min.js.map} +1 -1
- package/dist/opengate-api-npm.js +1 -1
- package/dist/opengate-api-npm.js.map +1 -1
- package/dist/src/InternalOpenGateAPI.js +96 -1
- package/dist/src/InternalOpenGateAPI.js.map +1 -1
- package/dist/src/bulk/BulkExecutionFinder.js +133 -0
- package/dist/src/bulk/BulkExecutionFinder.js.map +1 -0
- package/dist/src/bundles/Bundles.js +2 -10
- package/dist/src/bundles/Bundles.js.map +1 -1
- package/dist/src/operations/catalog/AppendEntitiesBy.js +22 -3
- package/dist/src/operations/catalog/AppendEntitiesBy.js.map +1 -1
- package/dist/src/provision/bulk/BulkExecutionBuilder.js +174 -0
- package/dist/src/provision/bulk/BulkExecutionBuilder.js.map +1 -0
- package/dist/src/provisionProcessors/provisionProcessors.js +135 -0
- package/dist/src/provisionProcessors/provisionProcessors.js.map +1 -0
- package/dist/src/provisionProcessors/provisionProcessorsFinder.js +75 -0
- package/dist/src/provisionProcessors/provisionProcessorsFinder.js.map +1 -0
- package/dist/src/searching/AssetSearch.js +1 -1
- package/dist/src/searching/BaseSearch.js +1 -1
- package/dist/src/searching/BaseSearch.js.map +1 -1
- package/dist/src/searching/DeviceSearch.js +1 -1
- package/dist/src/searching/Search.js +1 -1
- package/dist/src/searching/Search.js.map +1 -1
- package/dist/src/searching/WPSearch.js +69 -0
- package/dist/src/searching/WPSearch.js.map +1 -0
- package/dist/src/searching/builder/BulkExecutionSearchBuilder.js +71 -0
- package/dist/src/searching/builder/BulkExecutionSearchBuilder.js.map +1 -0
- package/dist/src/util/NorthAmpliaREST.js +33 -5
- package/dist/src/util/NorthAmpliaREST.js.map +1 -1
- package/dist/src/util/formats/check_types.js +8 -3
- package/dist/src/util/formats/check_types.js.map +1 -1
- package/docs/ast/source/InternalOpenGateAPI.js.json +30062 -20928
- package/docs/ast/source/bulk/BulkExecutionFinder.js.json +14859 -0
- package/docs/ast/source/bundles/Bundles.js.json +75587 -0
- package/docs/ast/source/operations/catalog/AppendEntitiesBy.js.json +9575 -3724
- package/docs/ast/source/provision/bulk/BulkExecutionBuilder.js.json +21759 -0
- package/docs/ast/source/provisionProcessors/provisionProcessors.js.json +9915 -0
- package/docs/ast/source/provisionProcessors/provisionProcessorsFinder.js.json +3784 -0
- package/docs/ast/source/searching/AssetSearch.js.json +696 -696
- package/docs/ast/source/searching/BaseSearch.js.json +3497 -3587
- package/docs/ast/source/searching/DeviceSearch.js.json +1308 -1308
- package/docs/ast/source/searching/Search.js.json +326 -236
- package/docs/ast/source/searching/WPSearch.js.json +4459 -0
- package/docs/ast/source/searching/builder/BulkExecutionSearchBuilder.js.json +4744 -0
- package/docs/ast/source/util/NorthAmpliaREST.js.json +21289 -14658
- package/docs/ast/source/util/formats/check_types.js.json +3332 -2034
- package/docs/class/src/GenericFinder.js~GenericFinder.html +11 -2
- package/docs/class/src/InternalOpenGateAPI.js~InternalOpenGateAPI.html +569 -112
- package/docs/class/src/ProvisionGenericFinder.js~ProvisionGenericFinder.html +10 -1
- package/docs/class/src/alarms/AlarmActions.js~AlarmActions.html +10 -1
- package/docs/class/src/alarms/actions/Alarm.js~Operation.html +10 -1
- package/docs/class/src/alarms/actions/AlarmActionBuilder.js~AlarmActionBuilder.html +10 -1
- package/docs/class/src/alarms/actions/AlarmAttendBuilder.js~AlarmAttendBuilder.html +10 -1
- package/docs/class/src/alarms/actions/AlarmCloseBuilder.js~AlarmCloseBuilder.html +10 -1
- package/docs/class/src/areas/AreaFinder.js~AreaFinder.html +10 -1
- package/docs/class/src/areas/Areas.js~Areas.html +10 -1
- package/docs/class/src/bulk/BulkExecutionFinder.js~BulkExecutionFinder.html +529 -0
- package/docs/class/src/bulk/BulkFinder.js~BulkFinder.html +10 -1
- package/docs/class/src/bundles/BundleFinder.js~BundleFinder.html +10 -1
- package/docs/class/src/bundles/Bundles.js~Bundles.html +2123 -0
- package/docs/class/src/bundles/deployment/DeploymentElement.js~DeploymentElement.html +13 -4
- package/docs/class/src/channels/ChannelFinder.js~ChannelFinder.html +10 -1
- package/docs/class/src/channels/Channels.js~Channels.html +10 -1
- package/docs/class/src/collection/devices/DeviceMessage.js~DeviceMessage.html +10 -1
- package/docs/class/src/collection/devices/collect/CommsModuleMessage.js~CommsModuleMessage.html +10 -1
- package/docs/class/src/collection/devices/collect/Datapoint.js~Datapoint.html +10 -1
- package/docs/class/src/collection/devices/collect/Datastreams.js~Datastream.html +10 -1
- package/docs/class/src/collection/devices/collect/Event.js~Event.html +10 -1
- package/docs/class/src/collection/devices/collect/Hardware.js~Hardware.html +10 -1
- package/docs/class/src/collection/devices/collect/Location.js~Location.html +10 -1
- package/docs/class/src/collection/devices/collect/Mobile.js~Mobile.html +10 -1
- package/docs/class/src/collection/devices/collect/PowerSupply.js~PowerSupply.html +10 -1
- package/docs/class/src/collection/devices/collect/Software.js~Software.html +10 -1
- package/docs/class/src/collection/devices/collect/Storage.js~Storage.html +10 -1
- package/docs/class/src/collection/devices/collect/Subscriber.js~Subscriber.html +10 -1
- package/docs/class/src/collection/devices/collect/Subscription.js~Subscription.html +10 -1
- package/docs/class/src/collection/devices/collect/Temperature.js~Temperature.html +10 -1
- package/docs/class/src/collection/devices/collect/Usage.js~Usage.html +10 -1
- package/docs/class/src/domains/Domains.js~Domains.html +10 -1
- package/docs/class/src/domains/DomainsFinder.js~DomainFinder.html +10 -1
- package/docs/class/src/entities/DeviceFinder.js~DeviceFinder.html +10 -1
- package/docs/class/src/entities/EntityFinder.js~EntityFinder.html +10 -1
- package/docs/class/src/entities/SubscribersFinder.js~SubscribersFinder.html +10 -1
- package/docs/class/src/entities/SubscriptionsFinder.js~SubscriptionsFinder.html +10 -1
- package/docs/class/src/entities/TicketFinder.js~TicketFinder.html +10 -1
- package/docs/class/src/iot/catalog/Category.js~Category.html +10 -1
- package/docs/class/src/iot/catalog/Datastream.js~Datastream.html +10 -1
- package/docs/class/src/iot/catalog/Qrating.js~Qrating.html +10 -1
- package/docs/class/src/iot/datamodels/Datamodels.js~Datamodels.html +10 -1
- package/docs/class/src/iot/datamodels/DatamodelsFinder.js~DatamodelsFinder.html +10 -1
- package/docs/class/src/iot/datamodels/DatamodelsHelper.js~DatamodelsHelper.html +10 -1
- package/docs/class/src/operations/OperationActions.js~OperationActions.html +10 -1
- package/docs/class/src/operations/OperationFinder.js~OperationFinder.html +10 -1
- package/docs/class/src/operations/Operations.js~Operations.html +10 -1
- package/docs/class/src/operations/PeriodicityActions.js~PeriodicityActions.html +10 -1
- package/docs/class/src/operations/catalog/AppendEntitiesBy.js~AppendEntitiesBy.html +12 -3
- package/docs/class/src/operations/catalog/BaseOperationBuilder.js~BaseOperationBuilder.html +10 -1
- package/docs/class/src/operations/catalog/Operation.js~Operation.html +10 -1
- package/docs/class/src/operations/catalog/parameters/BaseParameterBuilderWithParent.js~BaseParameterBuilderWithParent.html +10 -1
- package/docs/class/src/operations/catalog/parameters/ParameterBuilderFactory.js~ParameterBuilderFactory.html +10 -1
- package/docs/class/src/operations/catalog/period/ExecuteEachBuilder.js~ExecuteEachBuilder.html +10 -1
- package/docs/class/src/operations/catalog/period/ExecuteEveryBuilder.js~ExecuteEveryBuilder.html +10 -1
- package/docs/class/src/operations/catalog/period/PeriodicityUpdateBuilder.js~PeriodicityUpdateBuilder.html +10 -1
- package/docs/class/src/operations/catalog/period/pattern/ByGeneric.js~ByGeneric.html +10 -1
- package/docs/class/src/operations/catalog/period/pattern/ByMonth.js~ByMonth.html +10 -1
- package/docs/class/src/operations/catalog/period/pattern/ByWeek.js~ByWeek.html +10 -1
- package/docs/class/src/operations/catalog/period/pattern/ByYear.js~ByYear.html +10 -1
- package/docs/class/src/organizations/OrganizationFinder.js~OrganizationFinder.html +10 -1
- package/docs/class/src/organizations/Organizations.js~Organizations.html +10 -1
- package/docs/class/src/provision/BaseProvision.js~BaseProvision.html +11 -2
- package/docs/class/src/provision/bulk/BulkExecutionBuilder.js~BulkExecutionBuilder.html +766 -0
- package/docs/class/src/provision/entities/AssetBuilder.js~AssetBuilder.html +10 -1
- package/docs/class/src/provision/entities/BulkBuilder.js~BulkBuilder.html +10 -1
- package/docs/class/src/provision/entities/ComplexBuilder.js~ComplexBuilder.html +10 -1
- package/docs/class/src/provision/entities/CsvBulkBuilder.js~CsvBulkBuilder.html +10 -1
- package/docs/class/src/provision/entities/DeviceBuilder.js~DeviceBuilder.html +10 -1
- package/docs/class/src/provision/entities/EntityBuilder.js~EntityBuilder.html +10 -1
- package/docs/class/src/provision/entities/JsonBulkBuilder.js~JsonBulkBuilder.html +10 -1
- package/docs/class/src/provision/entities/JsonFlattenedBulkBuilder.js~JsonFlattenedBulkBuilder.html +10 -1
- package/docs/class/src/provision/entities/SimpleBuilder.js~SimpleBuilder.html +10 -1
- package/docs/class/src/provision/entities/SubscriberBuilder.js~SubscriberBuilder.html +10 -1
- package/docs/class/src/provision/entities/SubscriptionBuilder.js~SubscriptionBuilder.html +10 -1
- package/docs/class/src/provision/entities/TicketBuilder.js~TicketBuilder.html +10 -1
- package/docs/class/src/provisionProcessors/provisionProcessors.js~ProvisionProcessors.html +1012 -0
- package/docs/class/src/provisionProcessors/provisionProcessorsFinder.js~provisionProcessorsFinder.html +623 -0
- package/docs/class/src/rulesConfiguration/RuleConfigurations.js~RuleConfigurations.html +10 -1
- package/docs/class/src/rulesConfiguration/RuleConfigurationsActions.js~RuleConfigurationsActions.html +10 -1
- package/docs/class/src/rulesConfiguration/RuleConfigurationsCatalog.js~RuleConfigurationsCatalog.html +10 -1
- package/docs/class/src/rulesConfiguration/RuleConfigurationsFinder.js~RuleConfigurationsFinder.html +10 -1
- package/docs/class/src/searching/AssetSearch.js~AssetSearch.html +11 -2
- package/docs/class/src/searching/BaseSearch.js~BaseSearch.html +11 -2
- package/docs/class/src/searching/DeviceSearch.js~DeviceSearch.html +11 -2
- package/docs/class/src/searching/EntitySearch.js~EntitySearch.html +10 -1
- package/docs/class/src/searching/FilterBuilder.js~FilterBuilder.html +10 -1
- package/docs/class/src/searching/QuickSearch.js~QuickSearch.html +10 -1
- package/docs/class/src/searching/Search.js~Search.html +10 -1
- package/docs/class/src/searching/SelectBuilder.js~SelectBuilder.html +10 -1
- package/docs/class/src/searching/StaticSearch.js~StaticSearch.html +10 -1
- package/docs/class/src/searching/WPSearch.js~WPSearch.html +599 -0
- package/docs/class/src/searching/builder/AdministrativeStateSearchBuilder.js~AdministrativeStateSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/AlarmsSearchBuilder.js~AlarmsSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/AllowedResourceTypeSearchBuilder.js~AllowedResourceTypeSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/AreasSearchBuilder.js~AreasSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/AssetsSearchBuilder.js~AssetsSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/BasicTypesSearchBuilder.js~BasicTypesSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/BulkExecutionSearchBuilder.js~BulkExecutionSearchBuilder.html +865 -0
- package/docs/class/src/searching/builder/BulkSearchBuilder.js~BulkSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/BundlesSearchBuilder.js~BundlesSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/CertificatesSearchBuilder.js~CertificatesSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/ChannelsSearchBuilder.js~ChannelsSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/CommunicationsModuleTypeSearchBuilder.js~CommunicationsModuleTypeSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/CountryCodesSearchBuilder.js~CountryCodesSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/DatamodelsSearchBuilder.js~DatamodelsSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/DatapointsSearchBuilder.js~DatapointsSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/DatasetEntitiesSearchBuilder.js~DatasetEntitiesSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/DatasetsCatalogSearchBuilder.js~DatasetsCatalogSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/DatastreamsSearchBuilder.js~DatastreamsSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/DevicesSearchBuilder.js~DevicesSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/DomainsSearchBuilder.js~DomainsSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/EntitiesSearchBuilder.js~EntitiesSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/ExecutionsSearchBuilder.js~ExecutionsSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/FeedsSearchBuilder.js~FeedsSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/FieldsDefinitionSearchBuilder.js~FieldsDefinitionSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/FlattenedSearchBuilder.js~FlattenedSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/HardwaresSearchBuilder.js~HardwaresSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/IoTDatastreamAccessSearchBuilder.js~IoTDatastreamAccessSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/IoTDatastreamPeriodSearchBuilder.js~IoTDatastreamPeriodSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/IoTDatastreamStoragePeriodSearchBuilder.js~IoTDatastreamStoragePeriodSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/MobilePhoneProviderSearchBuilder.js~MobilePhoneProviderSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/OperationalStatusSearchBuilder.js~OperationalStatusSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/OperationsSearchBuilder.js~OperationsSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/OrganizationsSearchBuilder.js~OrganizationsSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/PlansSearchBuilder.js~PlansSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/PreFilteredSearchBuilder.js~PreFilteredSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/RawSearchBuilder.js~RawSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/ResourceTypeSearchBuilder.js~ResourceTypeSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/RuleConfigurationSeveritySearchBuilder.js~RuleConfigurationSeveritySearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/RuleModeSearchBuilder.js~RuleModeSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/RuleTypeSearchBuilder.js~RuleTypeSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/RulesSearchBuilder.js~RulesSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/SearchBuilder.js~SearchBuilder.html +11 -2
- package/docs/class/src/searching/builder/SearchWithSummaryBuilder.js~SearchWithSummaryBuilder.html +10 -1
- package/docs/class/src/searching/builder/ServiceGroupSearchBuilder.js~ServiceGroupSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/SoftwaresSearchBuilder.js~SoftwaresSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/SubscribersSearchBuilder.js~SubscribersSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/SubscriptionsSearchBuilder.js~SubscriptionsSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/TasksSearchBuilder.js~TasksSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/TicketPrioritySearchBuilder.js~TicketPrioritySearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/TicketSeveritySearchBuilder.js~TicketSeveritySearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/TicketStatusSearchBuilder.js~TicketStatusSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/TicketsSearchBuilder.js~TicketsSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/TimezoneSearchBuilder.js~TimezoneSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/UserLanguagesSearchBuilder.js~UserLanguagesSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/UserProfilesSearchBuilder.js~UserProfilesSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/UsersSearchBuilder.js~UsersSearchBuilder.html +10 -1
- package/docs/class/src/searching/builder/WorkgroupsSearchBuilder.js~WorkgroupsSearchBuilder.html +10 -1
- package/docs/class/src/searching/error/SearchBuilderError.js~SearchBuilderError.html +10 -1
- package/docs/class/src/security/CertificateFinder.js~CertificateFinder.html +10 -1
- package/docs/class/src/security/Certificates.js~Certificates.html +10 -1
- package/docs/class/src/security/Security.js~Security.html +10 -1
- package/docs/class/src/users/UserFinder.js~UserFinder.html +10 -1
- package/docs/class/src/users/Users.js~User.html +10 -1
- package/docs/class/src/util/Expression.js~Expression.html +10 -1
- package/docs/class/src/util/NorthAmpliaREST.js~NorthAmpliaREST.html +25 -9
- package/docs/class/src/util/SelectElement.js~SelectElement.html +10 -1
- package/docs/class/src/util/SouthAmpliaREST.js~SouthAmpliaREST.html +11 -2
- package/docs/class/src/util/searchingFields/FieldFinder.js~FieldFinder.html +10 -1
- package/docs/class/src/workgroups/WorkgroupFinder.js~WorkgroupFinder.html +10 -1
- package/docs/class/src/workgroups/WorkgroupRelations.js~WorkgroupRelations.html +10 -1
- package/docs/class/src/workgroups/WorkgroupRelationsFinder.js~WorkgroupRelationsFinder.html +10 -1
- package/docs/class/src/workgroups/Workgroups.js~Workgroups.html +10 -1
- package/docs/coverage.json +59 -20
- package/docs/dump.json +18942 -16182
- package/docs/file/src/GenericFinder.js.html +10 -1
- package/docs/file/src/InternalOpenGateAPI.js.html +78 -3
- package/docs/file/src/ProvisionGenericFinder.js.html +10 -1
- package/docs/file/src/alarms/AlarmActions.js.html +10 -1
- package/docs/file/src/alarms/actions/Alarm.js.html +10 -1
- package/docs/file/src/alarms/actions/AlarmActionBuilder.js.html +10 -1
- package/docs/file/src/alarms/actions/AlarmAttendBuilder.js.html +10 -1
- package/docs/file/src/alarms/actions/AlarmCloseBuilder.js.html +10 -1
- package/docs/file/src/areas/AreaFinder.js.html +10 -1
- package/docs/file/src/areas/Areas.js.html +10 -1
- package/docs/file/src/areas/TYPE_ENUM.js.html +10 -1
- package/docs/file/src/bulk/BulkExecutionFinder.js.html +355 -0
- package/docs/file/src/bulk/BulkFinder.js.html +10 -1
- package/docs/file/src/bundles/ACTION_ENUM.js.html +10 -1
- package/docs/file/src/bundles/BundleFinder.js.html +10 -1
- package/docs/file/src/bundles/Bundles.js.html +742 -0
- package/docs/file/src/bundles/deployment/DeploymentElement.js.html +10 -1
- package/docs/file/src/bundles/deployment/MODE_VALIDATORS_ENUM.js.html +10 -1
- package/docs/file/src/bundles/deployment/OPERATION_ENUM.js.html +10 -1
- package/docs/file/src/bundles/deployment/OPTION_ENUM.js.html +10 -1
- package/docs/file/src/bundles/deployment/TYPE_ENUM.js.html +10 -1
- package/docs/file/src/bundles/deployment/TYPE_VALIDATORS_ENUM.js.html +10 -1
- package/docs/file/src/channels/ChannelFinder.js.html +10 -1
- package/docs/file/src/channels/Channels.js.html +10 -1
- package/docs/file/src/collection/devices/DeviceMessage.js.html +10 -1
- package/docs/file/src/collection/devices/collect/CommsModuleMessage.js.html +10 -1
- package/docs/file/src/collection/devices/collect/Datapoint.js.html +10 -1
- package/docs/file/src/collection/devices/collect/Datastreams.js.html +10 -1
- package/docs/file/src/collection/devices/collect/Event.js.html +10 -1
- package/docs/file/src/collection/devices/collect/Hardware.js.html +10 -1
- package/docs/file/src/collection/devices/collect/Location.js.html +10 -1
- package/docs/file/src/collection/devices/collect/Mobile.js.html +10 -1
- package/docs/file/src/collection/devices/collect/PowerSupply.js.html +10 -1
- package/docs/file/src/collection/devices/collect/Software.js.html +10 -1
- package/docs/file/src/collection/devices/collect/Storage.js.html +10 -1
- package/docs/file/src/collection/devices/collect/Subscriber.js.html +10 -1
- package/docs/file/src/collection/devices/collect/Subscription.js.html +10 -1
- package/docs/file/src/collection/devices/collect/Temperature.js.html +10 -1
- package/docs/file/src/collection/devices/collect/Usage.js.html +10 -1
- package/docs/file/src/collection/devices/collect/enum/ADDRESS_TYPE_ENUM.js.html +10 -1
- package/docs/file/src/collection/devices/collect/enum/ANTENNA_STATUS_ENUM.js.html +10 -1
- package/docs/file/src/collection/devices/collect/enum/BATTERY_CHARGE_LEVEL_STATUS_ENUM.js.html +10 -1
- package/docs/file/src/collection/devices/collect/enum/BATTERY_CHARGE_STATUS_ENUM.js.html +10 -1
- package/docs/file/src/collection/devices/collect/enum/LEVEL_TREND_ENUM.js.html +10 -1
- package/docs/file/src/collection/devices/collect/enum/POWER_SUPPLY_SOURCE_ENUM.js.html +10 -1
- package/docs/file/src/collection/devices/collect/enum/SOFTWARE_TYPE_ENUM.js.html +10 -1
- package/docs/file/src/collection/devices/collect/enum/TEMPERATURE_STATUS_ENUM.js.html +10 -1
- package/docs/file/src/domains/Domains.js.html +10 -1
- package/docs/file/src/domains/DomainsFinder.js.html +10 -1
- package/docs/file/src/entities/DeviceFinder.js.html +10 -1
- package/docs/file/src/entities/EntityFinder.js.html +10 -1
- package/docs/file/src/entities/SubscribersFinder.js.html +10 -1
- package/docs/file/src/entities/SubscriptionsFinder.js.html +10 -1
- package/docs/file/src/entities/TicketFinder.js.html +10 -1
- package/docs/file/src/iot/catalog/Category.js.html +10 -1
- package/docs/file/src/iot/catalog/Datastream.js.html +10 -1
- package/docs/file/src/iot/catalog/Qrating.js.html +10 -1
- package/docs/file/src/iot/datamodels/Datamodels.js.html +10 -1
- package/docs/file/src/iot/datamodels/DatamodelsFinder.js.html +10 -1
- package/docs/file/src/iot/datamodels/DatamodelsHelper.js.html +10 -1
- package/docs/file/src/operations/OperationActions.js.html +10 -1
- package/docs/file/src/operations/OperationFinder.js.html +10 -1
- package/docs/file/src/operations/Operations.js.html +10 -1
- package/docs/file/src/operations/PeriodicityActions.js.html +10 -1
- package/docs/file/src/operations/catalog/AppendEntitiesBy.js.html +33 -4
- package/docs/file/src/operations/catalog/BaseOperationBuilder.js.html +10 -1
- package/docs/file/src/operations/catalog/Operation.js.html +10 -1
- package/docs/file/src/operations/catalog/parameters/BaseParameterBuilderWithParent.js.html +10 -1
- package/docs/file/src/operations/catalog/parameters/ParameterBuilderFactory.js.html +10 -1
- package/docs/file/src/operations/catalog/period/DAYS_ENUM.js.html +10 -1
- package/docs/file/src/operations/catalog/period/ExecuteEachBuilder.js.html +10 -1
- package/docs/file/src/operations/catalog/period/ExecuteEveryBuilder.js.html +10 -1
- package/docs/file/src/operations/catalog/period/MONTHS_ENUM.js.html +10 -1
- package/docs/file/src/operations/catalog/period/PeriodicityUpdateBuilder.js.html +10 -1
- package/docs/file/src/operations/catalog/period/pattern/ByGeneric.js.html +10 -1
- package/docs/file/src/operations/catalog/period/pattern/ByMonth.js.html +10 -1
- package/docs/file/src/operations/catalog/period/pattern/ByWeek.js.html +10 -1
- package/docs/file/src/operations/catalog/period/pattern/ByYear.js.html +10 -1
- package/docs/file/src/organizations/OrganizationFinder.js.html +10 -1
- package/docs/file/src/organizations/Organizations.js.html +10 -1
- package/docs/file/src/provision/BaseProvision.js.html +10 -1
- package/docs/file/src/provision/bulk/BulkExecutionBuilder.js.html +396 -0
- package/docs/file/src/provision/entities/AssetBuilder.js.html +10 -1
- package/docs/file/src/provision/entities/BulkBuilder.js.html +10 -1
- package/docs/file/src/provision/entities/ComplexBuilder.js.html +10 -1
- package/docs/file/src/provision/entities/CsvBulkBuilder.js.html +10 -1
- package/docs/file/src/provision/entities/DeviceBuilder.js.html +10 -1
- package/docs/file/src/provision/entities/EntityBuilder.js.html +10 -1
- package/docs/file/src/provision/entities/JsonBulkBuilder.js.html +10 -1
- package/docs/file/src/provision/entities/JsonFlattenedBulkBuilder.js.html +10 -1
- package/docs/file/src/provision/entities/SimpleBuilder.js.html +10 -1
- package/docs/file/src/provision/entities/SubscriberBuilder.js.html +10 -1
- package/docs/file/src/provision/entities/SubscriptionBuilder.js.html +10 -1
- package/docs/file/src/provision/entities/TicketBuilder.js.html +10 -1
- package/docs/file/src/provisionProcessors/provisionProcessors.js.html +349 -0
- package/docs/file/src/provisionProcessors/provisionProcessorsFinder.js.html +302 -0
- package/docs/file/src/rulesConfiguration/RuleConfigurations.js.html +10 -1
- package/docs/file/src/rulesConfiguration/RuleConfigurationsActions.js.html +10 -1
- package/docs/file/src/rulesConfiguration/RuleConfigurationsCatalog.js.html +10 -1
- package/docs/file/src/rulesConfiguration/RuleConfigurationsFinder.js.html +10 -1
- package/docs/file/src/rulesConfiguration/_RuleCondition.js.html +10 -1
- package/docs/file/src/rulesConfiguration/_RuleNotification.js.html +10 -1
- package/docs/file/src/searching/AssetSearch.js.html +11 -2
- package/docs/file/src/searching/BaseSearch.js.html +11 -2
- package/docs/file/src/searching/DeviceSearch.js.html +11 -2
- package/docs/file/src/searching/EntitySearch.js.html +10 -1
- package/docs/file/src/searching/FilterBuilder.js.html +10 -1
- package/docs/file/src/searching/QuickSearch.js.html +10 -1
- package/docs/file/src/searching/Search.js.html +11 -2
- package/docs/file/src/searching/SelectBuilder.js.html +10 -1
- package/docs/file/src/searching/StaticSearch.js.html +10 -1
- package/docs/file/src/searching/WPSearch.js.html +294 -0
- package/docs/file/src/searching/builder/AdministrativeStateSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/AlarmsSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/AllowedResourceTypeSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/AreasSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/AssetsSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/BasicTypesSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/BulkExecutionSearchBuilder.js.html +300 -0
- package/docs/file/src/searching/builder/BulkSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/BundlesSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/CertificatesSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/ChannelsSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/CommunicationsModuleTypeSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/CountryCodesSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/DatamodelsSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/DatapointsSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/DatasetEntitiesSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/DatasetsCatalogSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/DatastreamsSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/DevicesSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/DomainsSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/EntitiesSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/ExecutionsSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/FeedsSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/FieldsDefinitionSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/FlattenedSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/HardwaresSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/IoTDatastreamAccessSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/IoTDatastreamPeriodSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/IoTDatastreamStoragePeriodSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/MobilePhoneProviderSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/OperationalStatusSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/OperationsSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/OrganizationsSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/PlansSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/PreFilteredSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/RawSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/ResourceTypeSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/RuleConfigurationSeveritySearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/RuleModeSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/RuleTypeSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/RulesSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/SearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/SearchWithSummaryBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/ServiceGroupSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/SoftwaresSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/SubscribersSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/SubscriptionsSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/TasksSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/TicketPrioritySearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/TicketSeveritySearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/TicketStatusSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/TicketsSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/TimezoneSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/UserLanguagesSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/UserProfilesSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/UsersSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/builder/WorkgroupsSearchBuilder.js.html +10 -1
- package/docs/file/src/searching/error/SearchBuilderError.js.html +10 -1
- package/docs/file/src/security/ADMINISTRATIVE_STATE_ENUM.js.html +10 -1
- package/docs/file/src/security/CertificateFinder.js.html +10 -1
- package/docs/file/src/security/Certificates.js.html +10 -1
- package/docs/file/src/security/MIME_TYPES_ENUM.js.html +10 -1
- package/docs/file/src/security/Security.js.html +10 -1
- package/docs/file/src/security/USAGES_ENUM.js.html +10 -1
- package/docs/file/src/users/UserFinder.js.html +10 -1
- package/docs/file/src/users/Users.js.html +10 -1
- package/docs/file/src/util/DATE_FORMAT.js.html +10 -1
- package/docs/file/src/util/Expression.js.html +10 -1
- package/docs/file/src/util/NorthAmpliaREST.js.html +44 -9
- package/docs/file/src/util/SelectElement.js.html +10 -1
- package/docs/file/src/util/SouthAmpliaREST.js.html +10 -1
- package/docs/file/src/util/formats/check_types.js.html +17 -3
- package/docs/file/src/util/searchingFields/FieldFinder.js.html +10 -1
- package/docs/file/src/util/searchingFields/IotFields.js.html +10 -1
- package/docs/file/src/util/searchingFields/source-precompiled/Fields.js.html +10 -1
- package/docs/file/src/workgroups/WorkgroupFinder.js.html +10 -1
- package/docs/file/src/workgroups/WorkgroupRelations.js.html +10 -1
- package/docs/file/src/workgroups/WorkgroupRelationsFinder.js.html +10 -1
- package/docs/file/src/workgroups/Workgroups.js.html +10 -1
- package/docs/identifiers.html +262 -3
- package/docs/index.html +10 -1
- package/docs/manual/index.html +252 -2
- package/docs/package.json +1 -1
- package/docs/script/search_index.js +357 -27
- package/docs/source.html +267 -200
- package/docs/test-file/client/autogeneratedFields/fields.spec.js.html +10 -1
- package/docs/test-file/client/bundles/bundles.spec.js.html +10 -1
- package/docs/test-file/client/collection/iot.spec.js.html +10 -1
- package/docs/test-file/client/device/device.spec.js.html +10 -1
- package/docs/test-file/client/provision/devices.provision.spec.js.html +10 -1
- package/docs/test-file/client/searching/FilterBuilder.spec.js.html +10 -1
- package/docs/test-file/client/searching/datapoints.search.spec.js.html +10 -1
- package/docs/test-file/client/searching/module.searching.spec.js.html +10 -1
- package/docs/test-file/client/searching/quicksearch.spec.js.html +10 -1
- package/docs/test-file/client/searching/rawsearch.spec.js.html +10 -1
- package/docs/test-file/client/searching/search.spec.js.html +10 -1
- package/docs/test-file/client/security/certificates.spec.js.html +10 -1
- package/docs/test-file/client/users/find.spec.js.html +10 -1
- package/docs/test-file/client/users/user.spec.js.html +10 -1
- package/docs/test.html +10 -1
- package/docs/variable/index.html +166 -17
- package/features/features/provision/bulk/execute_bulk.feature +60 -0
- package/features/features/provision/bulk/find_bulk_execution.feature +93 -0
- package/features/features/provision/processors/create_delete_processors.feature +49 -0
- package/features/features/provision/processors/find_provision_processors.feature +59 -0
- package/features/features/provision/processors/update_provision_processors.feature +32 -0
- package/features/features/searching/bulk/searching_bulk_executions.feature +68 -0
- package/features/step_definitions/file_test/bulk_execution_simple.xls +0 -0
- package/features/step_definitions/given_step_definitions.js +2 -2
- package/features/step_definitions/given_step_definitions_using_model.js +58 -12
- package/features/step_definitions/then_step_definitions.js +1 -0
- package/features/step_definitions/then_step_definitions_using_model.js +12 -0
- package/features/step_definitions/when_step_definitions.js +49 -5
- package/features/step_definitions/when_step_definitions_using_model.js +1 -0
- package/features/support/create_provision_model.js +7 -1
- package/features/support/delete_provision_model.js +3 -0
- package/features/support/find_model.js +10 -1
- package/features/support/utils_model.js +15 -0
- package/features/support/world.js +2 -2
- package/opengate-api-bower.js +2 -1
- package/opengate-api-npm.js +2 -1
- package/package.json +1 -1
- package/scripts/execute_tests.js +2 -2
- package/scripts/release_version.js +8 -8
- package/src/InternalOpenGateAPI.js +68 -2
- package/src/bulk/BulkExecutionFinder.js +95 -0
- package/src/bundles/Bundles.js +4 -12
- package/src/operations/catalog/AppendEntitiesBy.js +23 -3
- package/src/provision/bulk/BulkExecutionBuilder.js +136 -0
- package/src/provisionProcessors/provisionProcessors.js +89 -0
- package/src/provisionProcessors/provisionProcessorsFinder.js +42 -0
- package/src/searching/AssetSearch.js +1 -1
- package/src/searching/BaseSearch.js +1 -1
- package/src/searching/DeviceSearch.js +1 -1
- package/src/searching/Search.js +1 -1
- package/src/searching/WPSearch.js +34 -0
- package/src/searching/builder/BulkExecutionSearchBuilder.js +40 -0
- package/src/util/NorthAmpliaREST.js +34 -8
- package/src/util/formats/check_types.js +7 -2
- package/dist/opengate-api-bower-10.2.1.js.map +0 -1
|
@@ -10,7 +10,9 @@ import AreasSearchBuilder from './searching/builder/AreasSearchBuilder';
|
|
|
10
10
|
import DatasetsCatalogSearchBuilder from './searching/builder/DatasetsCatalogSearchBuilder';
|
|
11
11
|
import AreaFinder from './areas/AreaFinder';
|
|
12
12
|
import BulkSearchBuilder from './searching/builder/BulkSearchBuilder';
|
|
13
|
+
import BulkExecutionSearchBuilder from './searching/builder/BulkExecutionSearchBuilder';
|
|
13
14
|
import BulkFinder from './bulk/BulkFinder';
|
|
15
|
+
import BulkExecutionFinder from './bulk/BulkExecutionFinder'
|
|
14
16
|
import Channels from './channels/Channels';
|
|
15
17
|
import Areas from './areas/Areas';
|
|
16
18
|
import ChannelsSearchBuilder from './searching/builder/ChannelsSearchBuilder';
|
|
@@ -98,14 +100,36 @@ import DatamodelsFinder from './iot/datamodels/DatamodelsFinder';
|
|
|
98
100
|
import DatastreamsBuilder from './iot/catalog/Datastream';
|
|
99
101
|
import QratingsBuilder from './iot/catalog/Qrating';
|
|
100
102
|
import EntityBuilder from './provision/entities/EntityBuilder';
|
|
103
|
+
import BulkExecutionBuilder from './provision/bulk/BulkExecutionBuilder'
|
|
101
104
|
import EntitiesSearchBuilder from './searching/builder/EntitiesSearchBuilder';
|
|
102
105
|
import DatasetEntitiesSearchBuilder from './searching/builder/DatasetEntitiesSearchBuilder';
|
|
103
106
|
import CountryCodesSearchBuilder from './searching/builder/CountryCodesSearchBuilder';
|
|
104
107
|
import TimezoneSearchBuilder from './searching/builder/TimezoneSearchBuilder';
|
|
105
108
|
import UserLanguagesSearchBuilder from './searching/builder/UserLanguagesSearchBuilder';
|
|
109
|
+
import ProvisionProcessors from './provisionProcessors/provisionProcessors';
|
|
110
|
+
import ProvisionProcessorsFinder from './provisionProcessors/provisionProcessorsFinder';
|
|
106
111
|
import EntityFinder from './entities/EntityFinder';
|
|
107
112
|
import AlarmActions from './alarms/AlarmActions';
|
|
108
|
-
|
|
113
|
+
import _superagent from 'superagent';
|
|
114
|
+
|
|
115
|
+
const RequestEndMonkeyPatching = (function(){
|
|
116
|
+
let beforeStart
|
|
117
|
+
const end = _superagent.Request.prototype.end;
|
|
118
|
+
|
|
119
|
+
_superagent.Request.prototype.end = function (cb) {
|
|
120
|
+
if (beforeStart && beforeStart.call) beforeStart(this)
|
|
121
|
+
return end.call(this, function (err, res) {
|
|
122
|
+
if (typeof cb !== 'function') {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
cb(err, res);
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
return function setCallback(cb){
|
|
130
|
+
beforeStart = cb
|
|
131
|
+
}
|
|
132
|
+
})()
|
|
109
133
|
/**
|
|
110
134
|
* This is a abstract class, it must be extended to another class that defined the backend, it will be used on request to Opengate North API by browser or nodejs server
|
|
111
135
|
*/
|
|
@@ -114,7 +138,7 @@ export default class InternalOpenGateAPI {
|
|
|
114
138
|
* @param {{ url: string,port: string,version: string,apiKey: string}} _options - this is configuration about Opengate North API.
|
|
115
139
|
* @param {AmpliaREST} ampliaREST - this is a backend selected to manage a request to Opengate North API.
|
|
116
140
|
*/
|
|
117
|
-
constructor(northAmpliaREST, southAmpliaREST) {
|
|
141
|
+
constructor(northAmpliaREST, southAmpliaREST, _options) {
|
|
118
142
|
if (this.constructor === InternalOpenGateAPI) {
|
|
119
143
|
throw new Error("Cannot construct Abstract instances directly");
|
|
120
144
|
}
|
|
@@ -124,6 +148,9 @@ export default class InternalOpenGateAPI {
|
|
|
124
148
|
if (typeof southAmpliaREST !== "object") {
|
|
125
149
|
throw new Error("Must instance mandatory parameter: southAmpliaREST");
|
|
126
150
|
}
|
|
151
|
+
if (_options.hooks && _options.hooks.beforeStart && typeof _options.hooks.beforeStart === 'function'){
|
|
152
|
+
RequestEndMonkeyPatching(_options.hooks.beforeStart)
|
|
153
|
+
}
|
|
127
154
|
this.Napi = northAmpliaREST;
|
|
128
155
|
this.Sapi = southAmpliaREST;
|
|
129
156
|
this.EX = Expression;
|
|
@@ -181,6 +208,14 @@ export default class InternalOpenGateAPI {
|
|
|
181
208
|
return new BulkSearchBuilder(this);
|
|
182
209
|
}
|
|
183
210
|
|
|
211
|
+
/**
|
|
212
|
+
* This return a BulkExecutionSearchBuilder to build a specific bulk
|
|
213
|
+
* @return {BulkExecutionSearchBuilder}
|
|
214
|
+
*/
|
|
215
|
+
bulkExecutionSearchBuilder() {
|
|
216
|
+
return new BulkExecutionSearchBuilder(this);
|
|
217
|
+
}
|
|
218
|
+
|
|
184
219
|
/**
|
|
185
220
|
* This return a util to find and download a bulk
|
|
186
221
|
* @return {BulkFinder}
|
|
@@ -189,6 +224,14 @@ export default class InternalOpenGateAPI {
|
|
|
189
224
|
return new BulkFinder(this);
|
|
190
225
|
}
|
|
191
226
|
|
|
227
|
+
/**
|
|
228
|
+
* This return a util to find summary and download a bulk executions
|
|
229
|
+
* @return {BulkFinder}
|
|
230
|
+
*/
|
|
231
|
+
newBulkExecutionFinder(){
|
|
232
|
+
return new BulkExecutionFinder(this)
|
|
233
|
+
}
|
|
234
|
+
|
|
192
235
|
/**
|
|
193
236
|
* This return a util to find a area
|
|
194
237
|
* @return {AreaFinder}
|
|
@@ -896,6 +939,14 @@ export default class InternalOpenGateAPI {
|
|
|
896
939
|
return new DatastreamsBuilder(this);
|
|
897
940
|
}
|
|
898
941
|
|
|
942
|
+
/**
|
|
943
|
+
* This return a util to create a bulk execution
|
|
944
|
+
* @return {BulkExecutionBuilder}
|
|
945
|
+
*/
|
|
946
|
+
bulkExecutionBuilder(organization, processorId, timeout) {
|
|
947
|
+
return new BulkExecutionBuilder(this, organization, processorId, timeout)
|
|
948
|
+
}
|
|
949
|
+
|
|
899
950
|
/**
|
|
900
951
|
* This return a Qrating to build a specific Qrating
|
|
901
952
|
* @return {QratingsBuilder}
|
|
@@ -927,4 +978,19 @@ export default class InternalOpenGateAPI {
|
|
|
927
978
|
userLanguagesSearchBuilder() {
|
|
928
979
|
return new UserLanguagesSearchBuilder(this);
|
|
929
980
|
}
|
|
981
|
+
|
|
982
|
+
/**
|
|
983
|
+
* This return a ProvisionsProcesorsBuilder to build a specific ProvisionsProcesorsBuilder
|
|
984
|
+
* @return {provisionProcessorsBuilder}
|
|
985
|
+
*/
|
|
986
|
+
provisionProcessorsBuilder() {
|
|
987
|
+
return new ProvisionProcessors(this);
|
|
988
|
+
}
|
|
989
|
+
/**
|
|
990
|
+
* This return a util to find a provision procesor
|
|
991
|
+
* @return {ProvisionProcessorsFinder}
|
|
992
|
+
*/
|
|
993
|
+
newProvisionProcessorsFinder() {
|
|
994
|
+
return new ProvisionProcessorsFinder(this);
|
|
995
|
+
}
|
|
930
996
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
import GenericFinder from '../GenericFinder';
|
|
4
|
+
|
|
5
|
+
import q from 'q';
|
|
6
|
+
import HttpStatus from 'http-status-codes';
|
|
7
|
+
export const MIME_TYPES_ENUM = ['application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* This class allow make get request to bulk executions resource into Opengate North API.
|
|
11
|
+
*/
|
|
12
|
+
export default class BulkExecutionFinder extends GenericFinder {
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @param {InternalOpenGateAPI} Reference to the API object.
|
|
16
|
+
*/
|
|
17
|
+
constructor(ogapi) {
|
|
18
|
+
super(ogapi, 'provisionProcessors/provision/organizations', 'value', 'Bulk not found');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @return {String} This returns a string with the URL of the request.
|
|
23
|
+
* @private
|
|
24
|
+
*/
|
|
25
|
+
_composeUrl() {
|
|
26
|
+
return this._baseUrl + '/' + this._organization + '/bulk/' + this._id + (this._details ? "/details" : '');
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Download a specific entity by its organization and id. This execute a GET http method
|
|
30
|
+
* @test
|
|
31
|
+
* ogapi.newBulkExecutionFinder().findByOrganizationAndId('orgname', xxx-xx-xxx-xxx').then().catch();
|
|
32
|
+
* ogapi.newBulkExecutionFinder().findByOrganizationAndId('orgname', xxx-xx-xxx-xxx', true).then().catch();
|
|
33
|
+
* @param {string} organization - organization.
|
|
34
|
+
* @param {string} id - bulk id.
|
|
35
|
+
* @param {string} mimetype - Format of file when get the result details of previously created bulk process.
|
|
36
|
+
* @return {Promise}
|
|
37
|
+
*/
|
|
38
|
+
findByOrganizationAndId(organization, id, mimetype) {
|
|
39
|
+
this._organization = organization;
|
|
40
|
+
this._id = id;
|
|
41
|
+
this._details = false
|
|
42
|
+
|
|
43
|
+
if (mimetype) {
|
|
44
|
+
let not_found = '';
|
|
45
|
+
let found = MIME_TYPES_ENUM.find(function (mime_type) {
|
|
46
|
+
return mime_type == this;
|
|
47
|
+
}, mimetype)
|
|
48
|
+
if (typeof found === "undefined") {
|
|
49
|
+
not_found = mimetype;
|
|
50
|
+
}
|
|
51
|
+
if (not_found !== '') {
|
|
52
|
+
throw new Error("Parameter mimetype is not allowed. Parameter value <'" +
|
|
53
|
+
JSON.stringify(not_found) + "'>, mimetype allowed <'" + JSON.stringify(MIME_TYPES_ENUM) + "'>");
|
|
54
|
+
}
|
|
55
|
+
this._details = true
|
|
56
|
+
this._setExtraHeaders({
|
|
57
|
+
'accept': mimetype
|
|
58
|
+
});
|
|
59
|
+
return this._download();
|
|
60
|
+
}
|
|
61
|
+
this._details = false
|
|
62
|
+
this._setExtraHeaders({
|
|
63
|
+
'accept': undefined
|
|
64
|
+
});
|
|
65
|
+
return this._execute();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @return {Promise}* @private
|
|
70
|
+
*/
|
|
71
|
+
_download() {
|
|
72
|
+
let defered = q.defer();
|
|
73
|
+
let promise = defered.promise;
|
|
74
|
+
let _error_not_found = this._error_not_found;
|
|
75
|
+
this._api.get(this._composeUrl(), undefined, this._getExtraHeaders(), this._getUrlParameters(), true)
|
|
76
|
+
.then((req) => {
|
|
77
|
+
if (req.statusCode === 204) {
|
|
78
|
+
defered.reject({
|
|
79
|
+
data: _error_not_found,
|
|
80
|
+
statusCode: HttpStatus.NOT_FOUND
|
|
81
|
+
});
|
|
82
|
+
} else {
|
|
83
|
+
defered.resolve({
|
|
84
|
+
data: req,
|
|
85
|
+
statusCode: req.statusCode
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
.catch((error) => {
|
|
90
|
+
defered.reject(error);
|
|
91
|
+
});
|
|
92
|
+
return promise;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
}
|
package/src/bundles/Bundles.js
CHANGED
|
@@ -392,15 +392,11 @@ export default class Bundles extends BaseProvision {
|
|
|
392
392
|
this._hardware === undefined || this._workgroup === undefined)
|
|
393
393
|
throw new Error('Parameters name, version, hardware and workgroup must be defined');
|
|
394
394
|
|
|
395
|
-
//console.log("CREANDO");
|
|
396
|
-
let _this = this;
|
|
397
|
-
|
|
398
395
|
let defered = q.defer();
|
|
399
396
|
let promise = defered.promise;
|
|
400
397
|
|
|
401
398
|
let onCreateBundle = function(res) {
|
|
402
399
|
if (res.statusCode === 201) {
|
|
403
|
-
//console.log("OK1: " + JSON.stringify(res));
|
|
404
400
|
defered.resolve(res);
|
|
405
401
|
} else {
|
|
406
402
|
onCreateBundleError({
|
|
@@ -410,16 +406,13 @@ export default class Bundles extends BaseProvision {
|
|
|
410
406
|
};
|
|
411
407
|
|
|
412
408
|
let onCreateBundleError = function(err) {
|
|
413
|
-
//console.log(JSON.stringify(err));
|
|
414
|
-
//console.log('borrando bundle')
|
|
415
409
|
defered.reject(err);
|
|
416
410
|
};
|
|
417
411
|
|
|
418
412
|
// Se intenta crear primero el bundle
|
|
419
|
-
|
|
420
|
-
.then(
|
|
421
|
-
if (
|
|
422
|
-
//console.log("asdhflkasdfj 1");
|
|
413
|
+
this._ogapi.newBundleFinder().findByNameAndVersion(this._name, this._version)
|
|
414
|
+
.then((response) => {
|
|
415
|
+
if (response.statusCode === 204) {
|
|
423
416
|
super.create().then(onCreateBundle).catch(onCreateBundleError);
|
|
424
417
|
} else {
|
|
425
418
|
defered.reject({
|
|
@@ -430,9 +423,8 @@ export default class Bundles extends BaseProvision {
|
|
|
430
423
|
"statusCode": 400
|
|
431
424
|
});
|
|
432
425
|
}
|
|
433
|
-
}).catch(
|
|
426
|
+
}).catch((err) => {
|
|
434
427
|
if (err.statusCode === 404) {
|
|
435
|
-
//console.log("asdhflkasdfj 2");
|
|
436
428
|
super.create().then(onCreateBundle).catch(onCreateBundleError);
|
|
437
429
|
} else {
|
|
438
430
|
defered.reject({
|
|
@@ -41,6 +41,7 @@ export default class AppendEntitiesBy {
|
|
|
41
41
|
}
|
|
42
42
|
return this._parent;
|
|
43
43
|
}
|
|
44
|
+
|
|
44
45
|
/**
|
|
45
46
|
* Append entity list to operation target
|
|
46
47
|
* @param {!EntityListBuilder} entities
|
|
@@ -53,13 +54,32 @@ export default class AppendEntitiesBy {
|
|
|
53
54
|
if (typeof this._parent._build.target !== "undefined")
|
|
54
55
|
console.warn("An Operation only allow one kind of way to append entities. "+
|
|
55
56
|
"Filter | Tag | List of entities. Now List of entities will remove the last way appended .");
|
|
57
|
+
|
|
58
|
+
|
|
56
59
|
this._parent._build.target = {
|
|
57
|
-
append:{
|
|
58
|
-
entities:entities
|
|
59
|
-
}
|
|
60
|
+
append:{}
|
|
60
61
|
};
|
|
62
|
+
|
|
63
|
+
entities.forEach((entity) => {
|
|
64
|
+
if (entity.constructor === String) {
|
|
65
|
+
if (!this._parent._build.target.append.entities) {
|
|
66
|
+
this._parent._build.target.append.entities = [];
|
|
67
|
+
}
|
|
68
|
+
this._parent._build.target.append.entities.push(entity);
|
|
69
|
+
} else {
|
|
70
|
+
if (entity.id && entity.parameters) {
|
|
71
|
+
if (!this._parent._build.target.append.entitiesWithParameters) {
|
|
72
|
+
this._parent._build.target.append.entitiesWithParameters = [];
|
|
73
|
+
}
|
|
74
|
+
this._parent._build.target.append.entitiesWithParameters.push(entity);
|
|
75
|
+
} else {
|
|
76
|
+
throw new Error("Entity parameters must include id and parameters: " + JSON.stringify(entity));
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
})
|
|
61
80
|
return this._parent;
|
|
62
81
|
}
|
|
82
|
+
|
|
63
83
|
/**
|
|
64
84
|
* Set tag to operation target
|
|
65
85
|
* @param {!string} tag
|
|
@@ -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
|
|
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
|
/**
|
|
@@ -2,7 +2,7 @@ import Search from './Search';
|
|
|
2
2
|
import q from 'q';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* This extends
|
|
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
|
/**
|
package/src/searching/Search.js
CHANGED
|
@@ -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
|
+
}
|