passageidentity 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +21 -0
  4. data/docs/generated/Link.md +18 -0
  5. data/docs/generated/ListPaginatedUsersItem.md +38 -0
  6. data/docs/generated/ListPaginatedUsersResponse.md +28 -0
  7. data/docs/generated/Model403Error.md +20 -0
  8. data/docs/generated/Nonce.md +18 -0
  9. data/docs/generated/PaginatedLinks.md +26 -0
  10. data/docs/generated/README.md +8 -3
  11. data/docs/generated/UserEventStatus.md +15 -0
  12. data/docs/generated/UserRecentEvent.md +4 -0
  13. data/docs/generated/UsersApi.md +94 -0
  14. data/lib/openapi_client/api/users_api.rb +96 -0
  15. data/lib/openapi_client/models/link.rb +221 -0
  16. data/lib/openapi_client/models/list_paginated_users_item.rb +399 -0
  17. data/lib/openapi_client/models/list_paginated_users_response.rb +305 -0
  18. data/lib/openapi_client/models/magic_link_auth_method.rb +0 -7
  19. data/lib/openapi_client/models/model401_error.rb +2 -2
  20. data/lib/openapi_client/models/model403_error.rb +271 -0
  21. data/lib/openapi_client/models/nonce.rb +222 -0
  22. data/lib/openapi_client/models/otp_auth_method.rb +0 -7
  23. data/lib/openapi_client/models/paginated_links.rb +285 -0
  24. data/lib/openapi_client/models/passkeys_auth_method.rb +0 -7
  25. data/lib/openapi_client/models/user_event_status.rb +40 -0
  26. data/lib/openapi_client/models/user_recent_event.rb +51 -1
  27. data/lib/openapi_client.rb +10 -3
  28. data/lib/passageidentity/user_api.rb +40 -0
  29. data/lib/passageidentity/version.rb +1 -1
  30. data/tests/user_api_test.rb +41 -0
  31. metadata +19 -8
  32. data/docs/generated/UpdateMagicLinkAuthMethod.md +0 -22
  33. data/docs/generated/UpdateOtpAuthMethod.md +0 -22
  34. data/docs/generated/UpdatePasskeysAuthMethod.md +0 -18
  35. /data/lib/{openapi_client/models → models}/update_magic_link_auth_method.rb +0 -0
  36. /data/lib/{openapi_client/models → models}/update_otp_auth_method.rb +0 -0
  37. /data/lib/{openapi_client/models → models}/update_passkeys_auth_method.rb +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e054f6f2f16c809e2837abab2c504fdc74a72efc17637684fa16d7df46cb711
4
- data.tar.gz: 7a2fdf636d8c50c6608f6bdf8f136c738ebc4a5778994ee571feaa04d480e640
3
+ metadata.gz: 830011c410302a4a0a143717b50c48fdc6cf91ba113b04e4b47377935f90eb7c
4
+ data.tar.gz: 68fc45ff28793a2ccff8f6c481ce7d6759f98a77d724cdfb66cfe226b6f304db
5
5
  SHA512:
6
- metadata.gz: 4e2c9626cbf491d68743c64ec42559dcfff2f9e555775937f89ba63f56e42ab3f98517f9aebac6b93ec84a145260374934b98dab1041051470663e0b429c6285
7
- data.tar.gz: e4d50ed30523768f29e90fff59f864fbef471e59bc09dd33ad297ab287f2ff79966c187977212fd0ba8ff33bf63bc492150d96e9dd53266aa14c3414c49353c6
6
+ metadata.gz: 0b30cd3d8afd8a51ed8158682afd4988e714b22ee6946df2981afabde67d237a7280995f9f50f05508e21f6a1f1fe9041fd3471e3579bf5c318e8275e349aa98
7
+ data.tar.gz: a64f6fa42bfd4cb75e707a724ac7560a320dad8da61a2a43bb333dce39301fedeae66f23934b3e9fb8bfdeefba5b47403dfef7989e658bc283f0ab750b951057
data/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.6.0] - 2024-03-21
6
+
7
+ ### Added
8
+
9
+ - `GetUserByIdentifier` method has been added
10
+ - `ListPaginatedUsersItem` model has been added
11
+
5
12
  ## [0.5.0] - 2024-01-30
6
13
 
7
14
  ### Added
data/README.md CHANGED
@@ -87,6 +87,27 @@ class ApplicationController < ActionController::Base
87
87
  end
88
88
  ```
89
89
 
90
+ ## Retrieve User Info By Identifier
91
+
92
+ To retrieve information about a user, you can also use the `get_by_identifier` method. You will need to use a Passage API key, which can be created in the Passage Console under your Application Settings. This API key grants your web server access to the Passage management APIs to get and update information about users. This API key must be protected and stored in an appropriate secure storage location. It should never be hard-coded in the repository.
93
+
94
+ ```ruby
95
+ require 'passageidentity'
96
+
97
+ class ApplicationController < ActionController::Base
98
+ PassageClient =
99
+ Passage::Client.new(app_id: PASSAGE_APP_ID, api_key: PASSAGE_API_KEY)
100
+ def authorize!
101
+ begin
102
+ user_id = PassageClient.auth.authenticate_request(request)
103
+ user = PassageClient.user.get_by_identifier(identifier: @identifier)
104
+ # user is authorized
105
+ rescue Exception => e
106
+ # handle exception (user is not authorized)
107
+ end
108
+ end
109
+ end
110
+ ```
90
111
 
91
112
  ## Activate/Deactivate User
92
113
 
@@ -0,0 +1,18 @@
1
+ # OpenapiClient::Link
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **href** | **String** | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'openapi_client'
13
+
14
+ instance = OpenapiClient::Link.new(
15
+ href: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,38 @@
1
+ # OpenapiClient::ListPaginatedUsersItem
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **created_at** | **Time** | | |
8
+ | **email** | **String** | | |
9
+ | **email_verified** | **Boolean** | | |
10
+ | **id** | **String** | | |
11
+ | **last_login_at** | **Time** | | |
12
+ | **login_count** | **Integer** | | |
13
+ | **phone** | **String** | | |
14
+ | **phone_verified** | **Boolean** | | |
15
+ | **status** | [**UserStatus**](UserStatus.md) | | |
16
+ | **updated_at** | **Time** | | |
17
+ | **user_metadata** | **Object** | | |
18
+
19
+ ## Example
20
+
21
+ ```ruby
22
+ require 'openapi_client'
23
+
24
+ instance = OpenapiClient::ListPaginatedUsersItem.new(
25
+ created_at: null,
26
+ email: null,
27
+ email_verified: null,
28
+ id: null,
29
+ last_login_at: null,
30
+ login_count: null,
31
+ phone: null,
32
+ phone_verified: null,
33
+ status: null,
34
+ updated_at: null,
35
+ user_metadata: null
36
+ )
37
+ ```
38
+
@@ -0,0 +1,28 @@
1
+ # OpenapiClient::ListPaginatedUsersResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **_links** | [**PaginatedLinks**](PaginatedLinks.md) | | |
8
+ | **created_before** | **Integer** | time anchor (Unix timestamp) --&gt; all users returned created before this timestamp | |
9
+ | **limit** | **Integer** | | |
10
+ | **page** | **Integer** | | |
11
+ | **total_users** | **Integer** | total number of users for a particular query | |
12
+ | **users** | [**Array&lt;ListPaginatedUsersItem&gt;**](ListPaginatedUsersItem.md) | | |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'openapi_client'
18
+
19
+ instance = OpenapiClient::ListPaginatedUsersResponse.new(
20
+ _links: null,
21
+ created_before: null,
22
+ limit: null,
23
+ page: null,
24
+ total_users: null,
25
+ users: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,20 @@
1
+ # OpenapiClient::Model403Error
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **code** | **String** | | |
8
+ | **error** | **String** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'openapi_client'
14
+
15
+ instance = OpenapiClient::Model403Error.new(
16
+ code: null,
17
+ error: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,18 @@
1
+ # OpenapiClient::Nonce
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **nonce** | **String** | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'openapi_client'
13
+
14
+ instance = OpenapiClient::Nonce.new(
15
+ nonce: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,26 @@
1
+ # OpenapiClient::PaginatedLinks
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **first** | [**Link**](Link.md) | | |
8
+ | **last** | [**Link**](Link.md) | | |
9
+ | **_next** | [**Link**](Link.md) | | |
10
+ | **previous** | [**Link**](Link.md) | | |
11
+ | **_self** | [**Link**](Link.md) | | |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'openapi_client'
17
+
18
+ instance = OpenapiClient::PaginatedLinks.new(
19
+ first: null,
20
+ last: null,
21
+ _next: null,
22
+ previous: null,
23
+ _self: null
24
+ )
25
+ ```
26
+
@@ -96,6 +96,7 @@ Class | Method | HTTP request | Description
96
96
  *OpenapiClient::UsersApi* | [**deactivate_user**](docs/UsersApi.md#deactivate_user) | **PATCH** /apps/{app_id}/users/{user_id}/deactivate | Deactivate User
97
97
  *OpenapiClient::UsersApi* | [**delete_user**](docs/UsersApi.md#delete_user) | **DELETE** /apps/{app_id}/users/{user_id} | Delete User
98
98
  *OpenapiClient::UsersApi* | [**get_user**](docs/UsersApi.md#get_user) | **GET** /apps/{app_id}/users/{user_id} | Get User
99
+ *OpenapiClient::UsersApi* | [**list_paginated_users**](docs/UsersApi.md#list_paginated_users) | **GET** /apps/{app_id}/users | List Users
99
100
  *OpenapiClient::UsersApi* | [**update_user**](docs/UsersApi.md#update_user) | **PATCH** /apps/{app_id}/users/{user_id} | Update User
100
101
 
101
102
 
@@ -113,7 +114,10 @@ Class | Method | HTTP request | Description
113
114
  - [OpenapiClient::GoogleUserSocialConnection](docs/GoogleUserSocialConnection.md)
114
115
  - [OpenapiClient::LayoutConfig](docs/LayoutConfig.md)
115
116
  - [OpenapiClient::Layouts](docs/Layouts.md)
117
+ - [OpenapiClient::Link](docs/Link.md)
116
118
  - [OpenapiClient::ListDevicesResponse](docs/ListDevicesResponse.md)
119
+ - [OpenapiClient::ListPaginatedUsersItem](docs/ListPaginatedUsersItem.md)
120
+ - [OpenapiClient::ListPaginatedUsersResponse](docs/ListPaginatedUsersResponse.md)
117
121
  - [OpenapiClient::MagicLink](docs/MagicLink.md)
118
122
  - [OpenapiClient::MagicLinkAuthMethod](docs/MagicLinkAuthMethod.md)
119
123
  - [OpenapiClient::MagicLinkChannel](docs/MagicLinkChannel.md)
@@ -121,16 +125,17 @@ Class | Method | HTTP request | Description
121
125
  - [OpenapiClient::MagicLinkType](docs/MagicLinkType.md)
122
126
  - [OpenapiClient::Model400Error](docs/Model400Error.md)
123
127
  - [OpenapiClient::Model401Error](docs/Model401Error.md)
128
+ - [OpenapiClient::Model403Error](docs/Model403Error.md)
124
129
  - [OpenapiClient::Model404Error](docs/Model404Error.md)
125
130
  - [OpenapiClient::Model500Error](docs/Model500Error.md)
131
+ - [OpenapiClient::Nonce](docs/Nonce.md)
126
132
  - [OpenapiClient::OtpAuthMethod](docs/OtpAuthMethod.md)
133
+ - [OpenapiClient::PaginatedLinks](docs/PaginatedLinks.md)
127
134
  - [OpenapiClient::PasskeysAuthMethod](docs/PasskeysAuthMethod.md)
128
135
  - [OpenapiClient::Technologies](docs/Technologies.md)
129
136
  - [OpenapiClient::TtlDisplayUnit](docs/TtlDisplayUnit.md)
130
- - [OpenapiClient::UpdateMagicLinkAuthMethod](docs/UpdateMagicLinkAuthMethod.md)
131
- - [OpenapiClient::UpdateOtpAuthMethod](docs/UpdateOtpAuthMethod.md)
132
- - [OpenapiClient::UpdatePasskeysAuthMethod](docs/UpdatePasskeysAuthMethod.md)
133
137
  - [OpenapiClient::UpdateUserRequest](docs/UpdateUserRequest.md)
138
+ - [OpenapiClient::UserEventStatus](docs/UserEventStatus.md)
134
139
  - [OpenapiClient::UserInfo](docs/UserInfo.md)
135
140
  - [OpenapiClient::UserMetadataField](docs/UserMetadataField.md)
136
141
  - [OpenapiClient::UserMetadataFieldType](docs/UserMetadataFieldType.md)
@@ -0,0 +1,15 @@
1
+ # OpenapiClient::UserEventStatus
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'openapi_client'
12
+
13
+ instance = OpenapiClient::UserEventStatus.new()
14
+ ```
15
+
@@ -5,8 +5,10 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **created_at** | **Time** | | |
8
+ | **completed_at** | **Time** | | |
8
9
  | **id** | **String** | | |
9
10
  | **ip_addr** | **String** | | |
11
+ | **status** | [**UserEventStatus**](UserEventStatus.md) | | |
10
12
  | **type** | **String** | | |
11
13
  | **user_agent** | **String** | | |
12
14
 
@@ -17,8 +19,10 @@ require 'openapi_client'
17
19
 
18
20
  instance = OpenapiClient::UserRecentEvent.new(
19
21
  created_at: null,
22
+ completed_at: null,
20
23
  id: null,
21
24
  ip_addr: null,
25
+ status: null,
22
26
  type: null,
23
27
  user_agent: null
24
28
  )
@@ -9,6 +9,7 @@ All URIs are relative to *https://api.passage.id/v1*
9
9
  | [**deactivate_user**](UsersApi.md#deactivate_user) | **PATCH** /apps/{app_id}/users/{user_id}/deactivate | Deactivate User |
10
10
  | [**delete_user**](UsersApi.md#delete_user) | **DELETE** /apps/{app_id}/users/{user_id} | Delete User |
11
11
  | [**get_user**](UsersApi.md#get_user) | **GET** /apps/{app_id}/users/{user_id} | Get User |
12
+ | [**list_paginated_users**](UsersApi.md#list_paginated_users) | **GET** /apps/{app_id}/users | List Users |
12
13
  | [**update_user**](UsersApi.md#update_user) | **PATCH** /apps/{app_id}/users/{user_id} | Update User |
13
14
 
14
15
 
@@ -366,6 +367,99 @@ end
366
367
  - **Accept**: application/json
367
368
 
368
369
 
370
+ ## list_paginated_users
371
+
372
+ > <ListPaginatedUsersResponse> list_paginated_users(app_id, opts)
373
+
374
+ List Users
375
+
376
+ List users for an app.
377
+
378
+ ### Examples
379
+
380
+ ```ruby
381
+ require 'time'
382
+ require 'openapi_client'
383
+ # setup authorization
384
+ OpenapiClient.configure do |config|
385
+ # Configure Bearer authorization (JWT): bearerAuth
386
+ config.access_token = 'YOUR_BEARER_TOKEN'
387
+ end
388
+
389
+ api_instance = OpenapiClient::UsersApi.new
390
+ app_id = 'app_id_example' # String | App ID
391
+ opts = {
392
+ page: 56, # Integer | page to fetch (min=1)
393
+ limit: 56, # Integer | number of users to fetch per page (max=500)
394
+ created_before: 56, # Integer | Unix timestamp to anchor pagination results (fetches events that were created before the timestamp)
395
+ order_by: 'order_by_example', # String | Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier`
396
+ identifier: 'identifier_example', # String | search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>)
397
+ id: 'id_example', # String | search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>)
398
+ login_count: 56, # Integer | search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>)
399
+ status: 'status_example', # String | search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending)
400
+ created_at: 'created_at_example', # String | search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
401
+ updated_at: 'updated_at_example', # String | search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
402
+ last_login_at: 'last_login_at_example' # String | search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
403
+ }
404
+
405
+ begin
406
+ # List Users
407
+ result = api_instance.list_paginated_users(app_id, opts)
408
+ p result
409
+ rescue OpenapiClient::ApiError => e
410
+ puts "Error when calling UsersApi->list_paginated_users: #{e}"
411
+ end
412
+ ```
413
+
414
+ #### Using the list_paginated_users_with_http_info variant
415
+
416
+ This returns an Array which contains the response data, status code and headers.
417
+
418
+ > <Array(<ListPaginatedUsersResponse>, Integer, Hash)> list_paginated_users_with_http_info(app_id, opts)
419
+
420
+ ```ruby
421
+ begin
422
+ # List Users
423
+ data, status_code, headers = api_instance.list_paginated_users_with_http_info(app_id, opts)
424
+ p status_code # => 2xx
425
+ p headers # => { ... }
426
+ p data # => <ListPaginatedUsersResponse>
427
+ rescue OpenapiClient::ApiError => e
428
+ puts "Error when calling UsersApi->list_paginated_users_with_http_info: #{e}"
429
+ end
430
+ ```
431
+
432
+ ### Parameters
433
+
434
+ | Name | Type | Description | Notes |
435
+ | ---- | ---- | ----------- | ----- |
436
+ | **app_id** | **String** | App ID | |
437
+ | **page** | **Integer** | page to fetch (min&#x3D;1) | [optional] |
438
+ | **limit** | **Integer** | number of users to fetch per page (max&#x3D;500) | [optional] |
439
+ | **created_before** | **Integer** | Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) | [optional] |
440
+ | **order_by** | **String** | Comma separated list of &lt;field&gt;:&lt;ASC/DESC&gt; (example: order_by&#x3D;id:DESC,created_at:ASC) **cannot order_by &#x60;identifier&#x60; | [optional] |
441
+ | **identifier** | **String** | search users email OR phone (pagination prepended operators identifier&#x3D;&lt;val&gt;, identifier&#x3D;&lt;ne:val&gt;, identifier&#x3D;&lt;gt:val&gt;, identifier&#x3D;&lt;lt:val&gt;, identifier&#x3D;&lt;like:val&gt;, identifier&#x3D;&lt;not_like:val&gt;) | [optional] |
442
+ | **id** | **String** | search users id (pagination prepended operators id&#x3D;&lt;val&gt;, id&#x3D;&lt;ne:val&gt;, id&#x3D;&lt;gt:val&gt;, id&#x3D;&lt;lt:val&gt;, id&#x3D;&lt;like:val&gt;, id&#x3D;&lt;not_like:val&gt;) | [optional] |
443
+ | **login_count** | **Integer** | search users login_count (pagination prepended operators login_count&#x3D;&lt;val&gt;, login_count&#x3D;&lt;ne:val&gt;, login_count&#x3D;&lt;gt:val&gt;, login_count&#x3D;&lt;lt:val&gt;) | [optional] |
444
+ | **status** | **String** | search users by status (pagination prepended operators status&#x3D;&lt;val&gt;, status&#x3D;&lt;ne:val&gt;, status&#x3D;&lt;gt:val&gt;, status&#x3D;&lt;lt:val&gt;, status&#x3D;&lt;like:val&gt;, status&#x3D;&lt;not_like:val&gt;) -- valid values: (active, inactive, pending) | [optional] |
445
+ | **created_at** | **String** | search users created_at (pagination prepended operators created_at&#x3D;&lt;val&gt;, created_at&#x3D;&lt;ne:val&gt;, created_at&#x3D;&lt;gt:val&gt;, created_at&#x3D;&lt;lt:val&gt; -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required | [optional] |
446
+ | **updated_at** | **String** | search users updated_at (pagination prepended operators updated_at&#x3D;&lt;val&gt;, updated_at&#x3D;&lt;ne:val&gt;, updated_at&#x3D;&lt;gt:val&gt;, updated_at&#x3D;&lt;lt:val&gt; -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required | [optional] |
447
+ | **last_login_at** | **String** | search users last_login_at (pagination prepended operators last_login_at&#x3D;&lt;val&gt;, lat_login_at&#x3D;&lt;ne:val&gt;, last_login_at&#x3D;&lt;gt:val&gt;, last_login_at&#x3D;&lt;lt:val&gt; -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required | [optional] |
448
+
449
+ ### Return type
450
+
451
+ [**ListPaginatedUsersResponse**](ListPaginatedUsersResponse.md)
452
+
453
+ ### Authorization
454
+
455
+ [bearerAuth](../README.md#bearerAuth)
456
+
457
+ ### HTTP request headers
458
+
459
+ - **Content-Type**: Not defined
460
+ - **Accept**: application/json
461
+
462
+
369
463
  ## update_user
370
464
 
371
465
  > <UserResponse> update_user(app_id, user_id, update_user_request)
@@ -369,6 +369,102 @@ module OpenapiClient
369
369
  return data, status_code, headers
370
370
  end
371
371
 
372
+ # List Users
373
+ # List users for an app.
374
+ # @param app_id [String] App ID
375
+ # @param [Hash] opts the optional parameters
376
+ # @option opts [Integer] :page page to fetch (min&#x3D;1)
377
+ # @option opts [Integer] :limit number of users to fetch per page (max&#x3D;500)
378
+ # @option opts [Integer] :created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp)
379
+ # @option opts [String] :order_by Comma separated list of &lt;field&gt;:&lt;ASC/DESC&gt; (example: order_by&#x3D;id:DESC,created_at:ASC) **cannot order_by &#x60;identifier&#x60;
380
+ # @option opts [String] :identifier search users email OR phone (pagination prepended operators identifier&#x3D;&lt;val&gt;, identifier&#x3D;&lt;ne:val&gt;, identifier&#x3D;&lt;gt:val&gt;, identifier&#x3D;&lt;lt:val&gt;, identifier&#x3D;&lt;like:val&gt;, identifier&#x3D;&lt;not_like:val&gt;)
381
+ # @option opts [String] :id search users id (pagination prepended operators id&#x3D;&lt;val&gt;, id&#x3D;&lt;ne:val&gt;, id&#x3D;&lt;gt:val&gt;, id&#x3D;&lt;lt:val&gt;, id&#x3D;&lt;like:val&gt;, id&#x3D;&lt;not_like:val&gt;)
382
+ # @option opts [Integer] :login_count search users login_count (pagination prepended operators login_count&#x3D;&lt;val&gt;, login_count&#x3D;&lt;ne:val&gt;, login_count&#x3D;&lt;gt:val&gt;, login_count&#x3D;&lt;lt:val&gt;)
383
+ # @option opts [String] :status search users by status (pagination prepended operators status&#x3D;&lt;val&gt;, status&#x3D;&lt;ne:val&gt;, status&#x3D;&lt;gt:val&gt;, status&#x3D;&lt;lt:val&gt;, status&#x3D;&lt;like:val&gt;, status&#x3D;&lt;not_like:val&gt;) -- valid values: (active, inactive, pending)
384
+ # @option opts [String] :created_at search users created_at (pagination prepended operators created_at&#x3D;&lt;val&gt;, created_at&#x3D;&lt;ne:val&gt;, created_at&#x3D;&lt;gt:val&gt;, created_at&#x3D;&lt;lt:val&gt; -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
385
+ # @option opts [String] :updated_at search users updated_at (pagination prepended operators updated_at&#x3D;&lt;val&gt;, updated_at&#x3D;&lt;ne:val&gt;, updated_at&#x3D;&lt;gt:val&gt;, updated_at&#x3D;&lt;lt:val&gt; -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
386
+ # @option opts [String] :last_login_at search users last_login_at (pagination prepended operators last_login_at&#x3D;&lt;val&gt;, lat_login_at&#x3D;&lt;ne:val&gt;, last_login_at&#x3D;&lt;gt:val&gt;, last_login_at&#x3D;&lt;lt:val&gt; -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
387
+ # @return [ListPaginatedUsersResponse]
388
+ def list_paginated_users(app_id, opts = {})
389
+ data, _status_code, _headers = list_paginated_users_with_http_info(app_id, opts)
390
+ data
391
+ end
392
+
393
+ # List Users
394
+ # List users for an app.
395
+ # @param app_id [String] App ID
396
+ # @param [Hash] opts the optional parameters
397
+ # @option opts [Integer] :page page to fetch (min&#x3D;1)
398
+ # @option opts [Integer] :limit number of users to fetch per page (max&#x3D;500)
399
+ # @option opts [Integer] :created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp)
400
+ # @option opts [String] :order_by Comma separated list of &lt;field&gt;:&lt;ASC/DESC&gt; (example: order_by&#x3D;id:DESC,created_at:ASC) **cannot order_by &#x60;identifier&#x60;
401
+ # @option opts [String] :identifier search users email OR phone (pagination prepended operators identifier&#x3D;&lt;val&gt;, identifier&#x3D;&lt;ne:val&gt;, identifier&#x3D;&lt;gt:val&gt;, identifier&#x3D;&lt;lt:val&gt;, identifier&#x3D;&lt;like:val&gt;, identifier&#x3D;&lt;not_like:val&gt;)
402
+ # @option opts [String] :id search users id (pagination prepended operators id&#x3D;&lt;val&gt;, id&#x3D;&lt;ne:val&gt;, id&#x3D;&lt;gt:val&gt;, id&#x3D;&lt;lt:val&gt;, id&#x3D;&lt;like:val&gt;, id&#x3D;&lt;not_like:val&gt;)
403
+ # @option opts [Integer] :login_count search users login_count (pagination prepended operators login_count&#x3D;&lt;val&gt;, login_count&#x3D;&lt;ne:val&gt;, login_count&#x3D;&lt;gt:val&gt;, login_count&#x3D;&lt;lt:val&gt;)
404
+ # @option opts [String] :status search users by status (pagination prepended operators status&#x3D;&lt;val&gt;, status&#x3D;&lt;ne:val&gt;, status&#x3D;&lt;gt:val&gt;, status&#x3D;&lt;lt:val&gt;, status&#x3D;&lt;like:val&gt;, status&#x3D;&lt;not_like:val&gt;) -- valid values: (active, inactive, pending)
405
+ # @option opts [String] :created_at search users created_at (pagination prepended operators created_at&#x3D;&lt;val&gt;, created_at&#x3D;&lt;ne:val&gt;, created_at&#x3D;&lt;gt:val&gt;, created_at&#x3D;&lt;lt:val&gt; -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
406
+ # @option opts [String] :updated_at search users updated_at (pagination prepended operators updated_at&#x3D;&lt;val&gt;, updated_at&#x3D;&lt;ne:val&gt;, updated_at&#x3D;&lt;gt:val&gt;, updated_at&#x3D;&lt;lt:val&gt; -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
407
+ # @option opts [String] :last_login_at search users last_login_at (pagination prepended operators last_login_at&#x3D;&lt;val&gt;, lat_login_at&#x3D;&lt;ne:val&gt;, last_login_at&#x3D;&lt;gt:val&gt;, last_login_at&#x3D;&lt;lt:val&gt; -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
408
+ # @return [Array<(ListPaginatedUsersResponse, Integer, Hash)>] ListPaginatedUsersResponse data, response status code and response headers
409
+ def list_paginated_users_with_http_info(app_id, opts = {})
410
+ if @api_client.config.debugging
411
+ @api_client.config.logger.debug 'Calling API: UsersApi.list_paginated_users ...'
412
+ end
413
+ # verify the required parameter 'app_id' is set
414
+ if @api_client.config.client_side_validation && app_id.nil?
415
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.list_paginated_users"
416
+ end
417
+ # resource path
418
+ local_var_path = '/apps/{app_id}/users'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
419
+
420
+ # query parameters
421
+ query_params = opts[:query_params] || {}
422
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
423
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
424
+ query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
425
+ query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
426
+ query_params[:'identifier'] = opts[:'identifier'] if !opts[:'identifier'].nil?
427
+ query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
428
+ query_params[:'login_count'] = opts[:'login_count'] if !opts[:'login_count'].nil?
429
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
430
+ query_params[:'created_at'] = opts[:'created_at'] if !opts[:'created_at'].nil?
431
+ query_params[:'updated_at'] = opts[:'updated_at'] if !opts[:'updated_at'].nil?
432
+ query_params[:'last_login_at'] = opts[:'last_login_at'] if !opts[:'last_login_at'].nil?
433
+
434
+ # header parameters
435
+ header_params = opts[:header_params] || {}
436
+ # HTTP header 'Accept' (if needed)
437
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
438
+
439
+ # form parameters
440
+ form_params = opts[:form_params] || {}
441
+
442
+ # http body (model)
443
+ post_body = opts[:debug_body]
444
+
445
+ # return_type
446
+ return_type = opts[:debug_return_type] || 'ListPaginatedUsersResponse'
447
+
448
+ # auth_names
449
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
450
+
451
+ new_options = opts.merge(
452
+ :operation => :"UsersApi.list_paginated_users",
453
+ :header_params => header_params,
454
+ :query_params => query_params,
455
+ :form_params => form_params,
456
+ :body => post_body,
457
+ :auth_names => auth_names,
458
+ :return_type => return_type
459
+ )
460
+
461
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
462
+ if @api_client.config.debugging
463
+ @api_client.config.logger.debug "API called: UsersApi#list_paginated_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
464
+ end
465
+ return data, status_code, headers
466
+ end
467
+
372
468
  # Update User
373
469
  # Update a user's information.
374
470
  # @param app_id [String] App ID