opengate-js 14.3.0 → 14.4.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 (37) hide show
  1. package/bower.json +1 -1
  2. package/dist/{opengate-api-bower-14.3.0.js → opengate-api-bower-14.4.0.js} +22 -6
  3. package/dist/opengate-api-bower-14.4.0.js.map +1 -0
  4. package/dist/{opengate-api-bower-14.3.0.min.js → opengate-api-bower-14.4.0.min.js} +2 -2
  5. package/dist/opengate-api-bower-14.4.0.min.js.map +1 -0
  6. package/dist/src/users/Users.js +18 -2
  7. package/dist/src/users/Users.js.map +1 -1
  8. package/docs/ast/source/users/Users.js.json +8540 -6112
  9. package/docs/class/src/users/Users.js~User.html +106 -6
  10. package/docs/coverage.json +6 -6
  11. package/docs/dump.json +506 -450
  12. package/docs/file/src/users/Users.js.html +16 -2
  13. package/docs/package.json +1 -1
  14. package/docs/script/search_index.js +6 -0
  15. package/docs/source.html +238 -238
  16. package/features/features/provision/operations/actions_execution.feature +2 -1
  17. package/features/features/provision/operations/execute_operations.feature +2 -1
  18. package/features/features/provision/operations/execute_periodic_operations.feature +2 -1
  19. package/features/features/provision/operations/find_execution.feature +2 -1
  20. package/features/features/provision/operations/find_executions.feature +2 -1
  21. package/features/features/provision/operations/find_periodic_execution.feature +5 -4
  22. package/features/features/provision/operations/setting_up_period-each_operation.feature +2 -1
  23. package/features/features/provision/operations/update_periodic_operation.feature +2 -1
  24. package/features/features/provision/users/create_delete_user.feature +3 -1
  25. package/features/features/provision/users/find_user.feature +2 -1
  26. package/features/features/provision/users/reset_password.feature +2 -1
  27. package/features/features/provision/users/reset_password_mock.feature +2 -1
  28. package/features/features/provision/users/update_password.feature +4 -4
  29. package/features/features/provision/users/update_user.feature +5 -4
  30. package/features/features/searching/operations/searching_executions.feature +2 -1
  31. package/features/features/searching/operations/searching_periodic_operations.feature +2 -1
  32. package/features/support/create_provision_model.js +1 -0
  33. package/package.json +1 -1
  34. package/src/users/Users.js +16 -2
  35. package/yarn-error.log +1 -1
  36. package/dist/opengate-api-bower-14.3.0.js.map +0 -1
  37. package/dist/opengate-api-bower-14.3.0.min.js.map +0 -1
@@ -3,7 +3,7 @@
3
3
  @operations
4
4
  @actions_execution
5
5
  @urlParameters
6
-
6
+ @revisar
7
7
  Feature: Execute actions on a particular execution
8
8
  As a user of JsApi
9
9
  I want to execute actions on a particular operation
@@ -39,6 +39,7 @@ Feature: Execute actions on a particular execution
39
39
  And the "name" "test name"
40
40
  And the "surname" "test surname"
41
41
  And the "description" "user description"
42
+ And the "forcePasswordChange" false
42
43
  Then I delete it
43
44
  And I create it
44
45
  Then response code should be: 201
@@ -3,7 +3,7 @@
3
3
  @device_builder
4
4
  @execute_operations
5
5
  @operations
6
-
6
+ @done
7
7
  Feature: Execute ADMINISTRATIVE_STATUS_CHANGE operation
8
8
  As a user of JsApi
9
9
  I want to execute an ADMINISTRATIVE_STATUS_CHANGE operation
@@ -38,6 +38,7 @@ So that I can change the administrative status to some devices/subscriptions/sub
38
38
  And the "name" "test name"
39
39
  And the "surname" "test surname"
40
40
  And the "description" "user description"
41
+ And the "forcePasswordChange" false
41
42
  Then I delete it
42
43
  And I create it
43
44
  Then response code should be: 201
@@ -3,7 +3,7 @@
3
3
  @operations
4
4
  @periodic_operation
5
5
  @urlParameters
6
-
6
+ @done
7
7
  Feature: Execute ADMINISTRATIVE_STATUS_CHANGE periodic operation
8
8
  As a user of JsApi
9
9
  I want to execute an ADMINISTRATIVE_STATUS_CHANGE periodic operation
@@ -39,6 +39,7 @@ Feature: Execute ADMINISTRATIVE_STATUS_CHANGE periodic operation
39
39
  And the "name" "test name"
40
40
  And the "surname" "test surname"
41
41
  And the "description" "user description"
42
+ And the "forcePasswordChange" false
42
43
  Then I delete it
43
44
  And I create it
44
45
  Then response code should be: 201
@@ -5,7 +5,7 @@
5
5
  @finder
6
6
  @operation
7
7
  @urlParameters
8
-
8
+ @done
9
9
  Feature: Find an operation
10
10
  As a user of JsApi
11
11
  I want to find an opreation
@@ -41,6 +41,7 @@ Feature: Find an operation
41
41
  And the "name" "test name"
42
42
  And the "surname" "test surname"
43
43
  And the "description" "user description"
44
+ And the "forcePasswordChange" false
44
45
  Then I delete it
45
46
  And I create it
46
47
  Then response code should be: 201
@@ -4,7 +4,7 @@
4
4
  @executions
5
5
  @operations
6
6
  @urlParameters
7
-
7
+ @done
8
8
  Feature: Find a executions of an operation
9
9
  As a user of JsApi
10
10
  I want to find a executions of an operation
@@ -40,6 +40,7 @@ Feature: Find a executions of an operation
40
40
  And the "name" "test name"
41
41
  And the "surname" "test surname"
42
42
  And the "description" "user description"
43
+ And the "forcePasswordChange" false
43
44
  Then I delete it
44
45
  And I create it
45
46
  Then response code should be: 201
@@ -4,7 +4,7 @@
4
4
  @finder
5
5
  @periodic_operation
6
6
  @urlParameters
7
-
7
+ @done
8
8
  Feature: Find an operation
9
9
  As a user of JsApi
10
10
  I want to find an operation
@@ -41,6 +41,7 @@ Feature: Find an operation
41
41
  And the "name" "test name"
42
42
  And the "surname" "test surname"
43
43
  And the "description" "user description"
44
+ And the "forcePasswordChange" false
44
45
  Then I delete it
45
46
  And I create it
46
47
  Then response code should be: 201
@@ -65,7 +66,7 @@ Feature: Find an operation
65
66
  | provision.administration.channel | simple | default_channel | |
66
67
  | provision.administration.organization | simple | find_periodic_organization_10 | |
67
68
  | provision.administration.serviceGroup | simple | emptyServiceGroup | |
68
- | provision.device.identifier | simple | find_periodic_device | |
69
+ | provision.device.identifier | simple | find_periodic_device_1 | |
69
70
  | provision.device.operationalStatus | simple | NORMAL | |
70
71
  | provision.device.administrativeState | simple | ACTIVE | |
71
72
 
@@ -105,7 +106,7 @@ Feature: Find an operation
105
106
  And the parameters "{ \"admsts\" : \"ACTIVE\" }"
106
107
  And the job timeout by 300 seconds
107
108
  And append entities by:
108
- | find_periodic_device |
109
+ | find_periodic_device_1 |
109
110
  When I build it
110
111
  And I execute it
111
112
  Then response code should be: 201
@@ -122,7 +123,7 @@ Feature: Find an operation
122
123
  And I can found "provision.device.identifier" as datastream name
123
124
  When I try to define the entity with...
124
125
  | datastream | typeFunction | value | parent |
125
- | provision.device.identifier | simple | find_periodic_device | |
126
+ | provision.device.identifier | simple | find_periodic_device_1 | |
126
127
  And I delete it
127
128
  Then response code should be: 200
128
129
 
@@ -2,7 +2,7 @@
2
2
  @execute_each_operation
3
3
  @operations
4
4
  @provision
5
-
5
+ @done
6
6
  Feature: Setting up period with each pattern to operations
7
7
  As a user of JsApi
8
8
  I want to execute an FACTORY_RESET_TEST operation with a specific each pattern period configuration
@@ -38,6 +38,7 @@ So that I can execute FACTORY_RESET_TEST to some devices/subscriptions/subscribe
38
38
  And the "name" "test name"
39
39
  And the "surname" "test surname"
40
40
  And the "description" "user description"
41
+ And the "forcePasswordChange" false
41
42
  Then I delete it
42
43
  And I create it
43
44
  Then response code should be: 201
@@ -3,7 +3,7 @@
3
3
  @operations
4
4
  @update_periodic_operation
5
5
  @urlParameters
6
-
6
+ @done
7
7
  Feature: Update periodic operation
8
8
  As a user of JsApi
9
9
  I want to update periodic operation
@@ -40,6 +40,7 @@ Feature: Update periodic operation
40
40
  And the "name" "test name"
41
41
  And the "surname" "test surname"
42
42
  And the "description" "user description"
43
+ And the "forcePasswordChange" false
43
44
  Then I delete it
44
45
  And I create it
45
46
  Then response code should be: 201
@@ -4,7 +4,7 @@
4
4
  @users
5
5
  @create_delete_user
6
6
  @urlParameters
7
-
7
+ @done
8
8
  Feature: Delete and Create an user
9
9
  As a user of JsApi
10
10
  I want to create an user
@@ -40,6 +40,7 @@ Feature: Delete and Create an user
40
40
  And the "name" "test name"
41
41
  And the "surname" "test surname"
42
42
  And the "description" "user description"
43
+ And the "forcePasswordChange" false
43
44
  Then I delete it
44
45
  And I create it
45
46
  Then response code should be: 201
@@ -59,6 +60,7 @@ Feature: Delete and Create an user
59
60
  And the "name" "test name"
60
61
  And the "surname" "test surname"
61
62
  And the "description" "user description"
63
+ And the "forcePasswordChange" false
62
64
  Then I delete it
63
65
  And I create it
64
66
  Then response code should be: 201
@@ -4,7 +4,7 @@
4
4
  @find_provision
5
5
  @users
6
6
  @find_user
7
-
7
+ @done
8
8
  Feature: Find an user
9
9
  As a user of JsApi
10
10
  I want to find an user
@@ -40,6 +40,7 @@ Feature: Find an user
40
40
  And the "name" "test name"
41
41
  And the "surname" "test surname"
42
42
  And the "description" "user description"
43
+ And the "forcePasswordChange" false
43
44
  Then I delete it
44
45
  And I create it
45
46
  Then response code should be: 201
@@ -2,7 +2,7 @@
2
2
  @provision
3
3
  @users
4
4
  @resetpassword
5
-
5
+ @revisar
6
6
  Feature: Reset password when the user forgets it
7
7
  As a user of JsApi
8
8
  I want to reset password
@@ -35,6 +35,7 @@ Feature: Reset password when the user forgets it
35
35
  And the "name" "test name"
36
36
  And the "surname" "test surname"
37
37
  And the "description" "user description"
38
+ And the "forcePasswordChange" false
38
39
  Then I delete it
39
40
  And I create it
40
41
  Then response code should be: 201
@@ -2,7 +2,7 @@
2
2
  @provision
3
3
  @users
4
4
  @resetpassword
5
-
5
+ @revisar
6
6
  Feature: Reset password when the user forgets it
7
7
  As a user of JsApi
8
8
  I want to reset password
@@ -34,6 +34,7 @@ Feature: Reset password when the user forgets it
34
34
  And the "name" "test name"
35
35
  And the "surname" "test surname"
36
36
  And the "description" "user description"
37
+ And the "forcePasswordChange" false
37
38
  Then I delete it
38
39
  And I create it
39
40
  Then response code should be: 201
@@ -2,11 +2,11 @@
2
2
  @provision
3
3
  @users
4
4
  @update_password
5
-
5
+ @done
6
6
  Feature: Update password with logged in user or because it is not secure
7
7
  As a user of JsApi
8
8
  I want to reset password
9
- So, I can change the password while logged in or because it is insecure
9
+ So, I can change the password while logged in or because it is insecure: forcePasswordChange === true
10
10
 
11
11
 
12
12
  Scenario: Precondition - Prepare scenario
@@ -62,9 +62,9 @@ Feature: Update password with logged in user or because it is not secure
62
62
  Given an ogapi "users builder" util
63
63
  Then I want to update a "user"
64
64
  And the "email" "ogux_ogapi@amplia.com"
65
- And the "password" "Nvoiqewvouoiu32j@"
65
+ And the "password" "Nvoiqewvouoiu32j@#!!"
66
66
  #npx uuid v4 for generate UUID
67
- Then I update apiKey with "7d58d9e2-c372-4792-b87e-f9b368dc46b7"
67
+ Then I update apiKey with "502c0b9b-5ee7-494e-84de-d25f8fea8698"
68
68
  And response code should be: 200
69
69
 
70
70
  Scenario: Deleting an user and organization to use
@@ -4,7 +4,7 @@
4
4
  @users
5
5
  @update_user
6
6
  @urlParameters
7
-
7
+ @done
8
8
  Feature: Delete and Create an user
9
9
  As a user of JsApi
10
10
  I want to create an user
@@ -41,6 +41,7 @@ Feature: Delete and Create an user
41
41
  And the "surname" "test surname"
42
42
  And the "description" "user description"
43
43
  And the "2FaType" "TOTP"
44
+ And the "forcePasswordChange" false
44
45
  Then I delete it
45
46
  And I create it
46
47
  Then response code should be: 201
@@ -57,7 +58,7 @@ Feature: Delete and Create an user
57
58
  And the "surname" "surname updated"
58
59
  And the "description" "user description updated"
59
60
  And the "password" "Nvoiqewvouoiu32j@"
60
- And the "apiKey" "7d58d9e2-c372-4792-b87e-f9b368dc46b7"
61
+ And the "apiKey" "d12aae79-f74b-4713-856d-72c7817ddd1b"
61
62
  And the "2FaType" "NONE"
62
63
  Then I update it
63
64
  And response code should be: 200
@@ -67,8 +68,8 @@ Feature: Delete and Create an user
67
68
  Then I want to update a "user"
68
69
  And the "domain" "user_organization"
69
70
  And the "email" "ogux_ogapi@amplia.com"
70
- And the "password" "Nvoiqewvouoiu32j@#!!"
71
- Then I update password with "Nvoiqewvouoiu32j@"
71
+ And the "password" "Nvoiqewvouoiu32j@"
72
+ Then I update password with "Nvoiqewvouoiu32j@#!!"
72
73
  And response code should be: 200
73
74
 
74
75
  Scenario: Delete an user that already exists
@@ -3,7 +3,7 @@
3
3
  @operations
4
4
  @searching
5
5
  @searching_executions
6
-
6
+ @done
7
7
  Feature: Searching operation's executions
8
8
  As a user of JsApi
9
9
  I want to search operation's executions
@@ -38,6 +38,7 @@ I want to search operation's executions
38
38
  And the "name" "test name"
39
39
  And the "surname" "test surname"
40
40
  And the "description" "user description"
41
+ And the "forcePasswordChange" false
41
42
  Then I delete it
42
43
  And I create it
43
44
  Then response code should be: 201
@@ -3,7 +3,7 @@
3
3
  @operations
4
4
  @searching
5
5
  @searching_periodic_operations
6
-
6
+ @done
7
7
  Feature: Searching operation's executions
8
8
  As a user of JsApi
9
9
  I want to search periodic operations
@@ -38,6 +38,7 @@ I want to search periodic operations
38
38
  And the "name" "test name"
39
39
  And the "surname" "test surname"
40
40
  And the "description" "user description"
41
+ And the "forcePasswordChange" false
41
42
  Then I delete it
42
43
  And I create it
43
44
  Then response code should be: 201
@@ -36,6 +36,7 @@ module.exports = {
36
36
  'name': 'withName',
37
37
  'surname': 'withSurname',
38
38
  '2FaType': 'with2FaType',
39
+ 'forcePasswordChange': 'withForcePasswordChange',
39
40
  'apiKey': 'withApiKey',
40
41
  'password': 'withPassword',
41
42
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opengate-js",
3
- "version": "14.3.0",
3
+ "version": "14.4.0",
4
4
  "description": "",
5
5
  "main": "dist/opengate-api-npm.js",
6
6
  "repository": {
@@ -186,6 +186,18 @@ export default class User extends BaseProvision {
186
186
  return this;
187
187
  }
188
188
 
189
+ /**
190
+ * Set the forcePasswordChange: if true Forces you to reset your password on your next login attempt.
191
+ * @param {boolean} forcePasswordChange
192
+ * @return {User}
193
+ *
194
+ */
195
+ withForcePasswordChange(forcePasswordChange) {
196
+ if (typeof forcePasswordChange !== 'boolean')
197
+ throw new Error('Parameter forcePasswordChange must be a boolean');
198
+ this._forcePasswordChange = forcePasswordChange;
199
+ return this;
200
+ }
189
201
  /**
190
202
  * Compose url to delete an user
191
203
  * @return {String} This returns a string with the URL of the request.
@@ -220,7 +232,8 @@ export default class User extends BaseProvision {
220
232
  countryCode: this._countryCode || undefined,
221
233
  langCode: this._langCode || undefined,
222
234
  timezone: this._timezone || undefined,
223
- "2FaType": this._twoFaType || undefined
235
+ "2FaType": this._twoFaType || undefined,
236
+ forcePasswordChange: typeof this._forcePasswordChange === 'boolean' ? this._forcePasswordChange : undefined
224
237
  }
225
238
  };
226
239
 
@@ -251,7 +264,8 @@ export default class User extends BaseProvision {
251
264
  timezone: this._timezone || undefined,
252
265
  apiKey: this._apiKey || undefined,
253
266
  password: this._password || undefined,
254
- "2FaType": this._twoFaType || undefined
267
+ "2FaType": this._twoFaType || undefined,
268
+ forcePasswordChange: typeof this._forcePasswordChange === 'boolean' ? this._forcePasswordChange : undefined
255
269
  }
256
270
  };
257
271
  return data;
package/yarn-error.log CHANGED
@@ -60,7 +60,7 @@ npm manifest:
60
60
  "urlencode": "^1.1.0"
61
61
  },
62
62
  "scripts": {
63
- "test-wip": "export NODE_OPTIONS='--max-old-space-size=8192'; gulp cucumber --tags @wip"
63
+ "test-wip": "export NODE_OPTIONS='--max-old-space-size=8192'; gulp cucumber --tags #@wip"
64
64
  },
65
65
  "devDependencies": {
66
66
  "babel-core": "^6.26.3",
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"mappings":"","sources":["opengate-api-bower.js"],"file":"opengate-api-bower-14.3.0.js","sourceRoot":".."}