opengate-js 14.0.0 → 14.2.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 (48) hide show
  1. package/bower.json +1 -1
  2. package/dist/{opengate-api-bower-14.0.0.js → opengate-api-bower-14.2.0.js} +26 -21
  3. package/dist/opengate-api-bower-14.2.0.js.map +1 -0
  4. package/dist/{opengate-api-bower-14.0.0.min.js → opengate-api-bower-14.2.0.min.js} +2 -2
  5. package/dist/{opengate-api-bower-14.0.0.min.js.map → opengate-api-bower-14.2.0.min.js.map} +1 -1
  6. package/dist/src/operations/OperationActions.js +2 -0
  7. package/dist/src/operations/OperationActions.js.map +1 -1
  8. package/dist/src/operations/catalog/BaseOperationBuilder.js +14 -11
  9. package/dist/src/operations/catalog/BaseOperationBuilder.js.map +1 -1
  10. package/dist/src/searching/StaticSearch.js +4 -4
  11. package/dist/src/searching/StaticSearch.js.map +1 -1
  12. package/docs/ast/source/operations/OperationActions.js.json +8300 -7782
  13. package/docs/ast/source/operations/catalog/BaseOperationBuilder.js.json +10013 -9786
  14. package/docs/ast/source/searching/StaticSearch.js.json +18177 -18127
  15. package/docs/class/src/operations/OperationActions.js~OperationActions.html +2 -2
  16. package/docs/class/src/operations/catalog/BaseOperationBuilder.js~BaseOperationBuilder.html +22 -15
  17. package/docs/coverage.json +1 -1
  18. package/docs/dump.json +1971 -1915
  19. package/docs/file/src/operations/OperationActions.js.html +2 -0
  20. package/docs/file/src/operations/catalog/BaseOperationBuilder.js.html +12 -11
  21. package/docs/file/src/searching/StaticSearch.js.html +4 -4
  22. package/docs/package.json +1 -1
  23. package/docs/source.html +240 -240
  24. package/features/features/provision/operations/actions_execution.feature +105 -52
  25. package/features/features/provision/operations/execute_operations.feature +152 -112
  26. package/features/features/provision/operations/execute_periodic_operations.feature +115 -64
  27. package/features/features/provision/operations/find_execution.feature +49 -11
  28. package/features/features/provision/operations/find_executions.feature +51 -11
  29. package/features/features/provision/operations/find_periodic_execution.feature +48 -11
  30. package/features/features/provision/operations/setting_up_period-each_operation.feature +88 -23
  31. package/features/features/provision/operations/update_periodic_operation.feature +88 -46
  32. package/features/features/provision/users/update_password.feature +0 -1
  33. package/features/features/provision/users/update_user.feature +0 -1
  34. package/features/features/searching/operations/searching_executions.feature +47 -7
  35. package/features/features/searching/operations/searching_periodic_operations.feature +51 -10
  36. package/features/step_definitions/given_step_definitions.js +12 -5
  37. package/features/step_definitions/then_step_definitions.js +44 -35
  38. package/features/step_definitions/when_step_definitions.js +16 -10
  39. package/features/support/create_provision_model.js +6 -0
  40. package/features/support/find_model.js +4 -0
  41. package/features/support/utils_model.js +26 -20
  42. package/features/support/world.js +2 -2
  43. package/package.json +1 -1
  44. package/src/operations/OperationActions.js +2 -0
  45. package/src/operations/catalog/BaseOperationBuilder.js +12 -11
  46. package/src/searching/StaticSearch.js +4 -4
  47. package/yarn-error.log +7437 -0
  48. package/dist/opengate-api-bower-14.0.0.js.map +0 -1
@@ -451,6 +451,7 @@ export default class OperationActions {
451
451
  }
452
452
  }
453
453
  };
454
+ this._key = "job";
454
455
  return this._readAndUpdate(config, true);
455
456
  }
456
457
 
@@ -478,6 +479,7 @@ export default class OperationActions {
478
479
  }
479
480
  }
480
481
  };
482
+ this._key = "job";
481
483
  return this._readAndUpdate(config);
482
484
  }
483
485
 
@@ -600,21 +600,22 @@ export default class BaseOperationBuilder {
600
600
  /**
601
601
  * Set a timeout of job.
602
602
  * @example
603
- * ogapi.operations.builderFactory.newXXXBuilder().withJobTimeout(3)
604
- * @param {number} minutes - if null then parameter will be removed into builder
605
- * @throws {Error} throw error when minutes is not typeof number
603
+ * ogapi.operations.builderFactory.newXXXBuilder().withJobTimeout(180)
604
+ * @param {!number} milliseconds - if null then parameter will be removed into builder
605
+ * @param {string} format - Can be 'milliseconds' || 'ms' ,'seconds' || 's', 'mintutes' || 'm', 'hours' || 'h', 'days' || 'd', 'weeks' || 'w', 'months' || 'M'
606
+ * @throws {Error} throw error when milliseconds is not typeof number
606
607
  * @return {BaseOperationBuilder}
607
608
  */
608
- withJobTimeout(minutes) {
609
- if (minutes === null) {
609
+ withJobTimeout(milliseconds, format = "milliseconds") {
610
+ if (milliseconds === null) {
610
611
  delete this._build.schedule.stop;
611
612
  return this;
612
613
  }
613
- if (typeof minutes !== "number") {
614
- throw new Error("Parameter minutes must be a number");
614
+ if (typeof milliseconds !== "number") {
615
+ throw new Error("Parameter milliseconds must be a number");
615
616
  }
616
617
  this._build.schedule.stop = {
617
- delayed: moment.duration(minutes, 'minutes').asMilliseconds()
618
+ delayed: moment.duration(milliseconds, format).asMilliseconds()
618
619
  };
619
620
  return this;
620
621
  }
@@ -779,9 +780,9 @@ export default class BaseOperationBuilder {
779
780
  errors.push("You can not execute an operation with a job timeout greater than the repetition period.");
780
781
  }
781
782
  } else {
782
- jobTimeout = moment.duration(maxJobTimeout, 'milliseconds').asMinutes() - 1;
783
- console.info("Not specified the job timeout. By default, timeout will be " + jobTimeout + " minutes");
784
- this.withJobTimeout(jobTimeout);
783
+ jobTimeout = moment.duration(maxJobTimeout, 'milliseconds').asSeconds() - 1;
784
+ console.info("Not specified the job timeout. By default, timeout will be " + jobTimeout + " seconds");
785
+ this.withJobTimeout(jobTimeout, 'seconds');
785
786
  }
786
787
 
787
788
  }
@@ -817,12 +817,12 @@ export default class StaticSearch extends Search {
817
817
  'optional': ['IMEI', 'HARDWARE', 'SOFTWARE']
818
818
  },
819
819
  'SUBSCRIPTION': {
820
- 'mandatory': ['generatedEntityKey'],
821
- 'optional': ['administrativeState', 'subscriptionName', 'description', 'IMSI', 'ADDRESS', 'HOME_OPERATOR', 'REGISTER_OPERATOR', 'LOCATION']
820
+ 'mandatory': [],
821
+ 'optional': ['generatedEntityKey', 'administrativeState', 'subscriptionName', 'description', 'IMSI', 'ADDRESS', 'HOME_OPERATOR', 'REGISTER_OPERATOR', 'LOCATION']
822
822
  },
823
823
  'SUBSCRIBER': {
824
- 'mandatory': ['generatedEntityKey'],
825
- 'optional': ['administrativeState', 'subscriberName', 'description', 'ICC']
824
+ 'mandatory': [],
825
+ 'optional': ['generatedEntityKey', 'administrativeState', 'subscriberName', 'description', 'ICC']
826
826
  }
827
827
  },
828
828
  'PLC': {
package/docs/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opengate-js",
3
- "version": "14.0.0",
3
+ "version": "14.2.0",
4
4
  "description": "",
5
5
  "main": "dist/opengate-api-npm.js",
6
6
  "repository": {