kinde_sdk 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +103 -19
  3. data/kinde_api/README.md +58 -23
  4. data/kinde_api/docs/AddOrganizationUsersRequest.md +1 -1
  5. data/kinde_api/docs/AddOrganizationUsersRequestUsersInner.md +22 -0
  6. data/kinde_api/docs/{AddOrganizationUsers200Response.md → AddOrganizationUsersResponse.md} +2 -2
  7. data/kinde_api/docs/Application.md +20 -0
  8. data/kinde_api/docs/CallbacksApi.md +219 -0
  9. data/kinde_api/docs/ConnectedAppsApi.md +9 -9
  10. data/kinde_api/docs/CreateOrganizationRequest.md +11 -1
  11. data/kinde_api/docs/CreateOrganizationResponse.md +22 -0
  12. data/kinde_api/docs/CreateOrganizationResponseOrganization.md +18 -0
  13. data/kinde_api/docs/CreateOrganizationUserRoleRequest.md +18 -0
  14. data/kinde_api/docs/CreatePermissionRequest.md +22 -0
  15. data/kinde_api/docs/CreateRoleRequest.md +24 -0
  16. data/kinde_api/docs/CreateSubscriberSuccessResponse.md +18 -0
  17. data/kinde_api/docs/CreateSubscriberSuccessResponseSubscriber.md +18 -0
  18. data/kinde_api/docs/{CreateUser200Response.md → CreateUserResponse.md} +2 -2
  19. data/kinde_api/docs/EnvironmentsApi.md +71 -4
  20. data/kinde_api/docs/FeatureFlagsApi.md +9 -11
  21. data/kinde_api/docs/GetApplicationsResponse.md +24 -0
  22. data/kinde_api/docs/GetEnvironmentFeatureFlagsResponse.md +24 -0
  23. data/kinde_api/docs/GetOrganizationFeatureFlagsResponse.md +22 -0
  24. data/kinde_api/docs/GetOrganizationFeatureFlagsResponseFeatureFlagsValue.md +20 -0
  25. data/kinde_api/docs/{GetOrganizations200Response.md → GetOrganizationsResponse.md} +2 -2
  26. data/kinde_api/docs/GetOrganizationsUserRolesResponse.md +24 -0
  27. data/kinde_api/docs/{GetOrganizationUsers200Response.md → GetOrganizationsUsersResponse.md} +2 -2
  28. data/kinde_api/docs/GetRedirectCallbackUrlsResponse.md +18 -0
  29. data/kinde_api/docs/OrganizationUser.md +3 -1
  30. data/kinde_api/docs/OrganizationUserRole.md +22 -0
  31. data/kinde_api/docs/OrganizationsApi.md +494 -59
  32. data/kinde_api/docs/Permissions.md +22 -0
  33. data/kinde_api/docs/PermissionsApi.md +229 -0
  34. data/kinde_api/docs/RedirectCallbackUrls.md +18 -0
  35. data/kinde_api/docs/Roles.md +22 -0
  36. data/kinde_api/docs/RolesApi.md +229 -0
  37. data/kinde_api/docs/SubscribersApi.md +229 -0
  38. data/kinde_api/docs/UpdateOrganizationRequest.md +28 -0
  39. data/kinde_api/docs/UpdateOrganizationUsersRequest.md +18 -0
  40. data/kinde_api/docs/UpdateOrganizationUsersRequestUsersInner.md +24 -0
  41. data/kinde_api/docs/UpdateOrganizationUsersResponse.md +24 -0
  42. data/kinde_api/docs/UpdateUserRequest.md +3 -1
  43. data/kinde_api/docs/User.md +15 -1
  44. data/kinde_api/docs/UserIdentityResult.md +1 -3
  45. data/kinde_api/docs/UserProfile.md +3 -1
  46. data/kinde_api/docs/UserProfileV2.md +6 -2
  47. data/kinde_api/docs/UsersApi.md +31 -259
  48. data/kinde_api/docs/{GetUsers200Response.md → UsersResponse.md} +2 -2
  49. data/kinde_api/lib/kinde_api/api/callbacks_api.rb +221 -0
  50. data/kinde_api/lib/kinde_api/api/connected_apps_api.rb +8 -8
  51. data/kinde_api/lib/kinde_api/api/environments_api.rb +61 -4
  52. data/kinde_api/lib/kinde_api/api/feature_flags_api.rb +8 -15
  53. data/kinde_api/lib/kinde_api/api/organizations_api.rb +492 -57
  54. data/kinde_api/lib/kinde_api/api/permissions_api.rb +226 -0
  55. data/kinde_api/lib/kinde_api/api/roles_api.rb +226 -0
  56. data/kinde_api/lib/kinde_api/api/subscribers_api.rb +228 -0
  57. data/kinde_api/lib/kinde_api/api/users_api.rb +30 -233
  58. data/kinde_api/lib/kinde_api/api_client.rb +1 -13
  59. data/kinde_api/lib/kinde_api/configuration.rb +3 -77
  60. data/kinde_api/lib/kinde_api/models/add_organization_users_request.rb +2 -2
  61. data/kinde_api/lib/kinde_api/models/add_organization_users_request_users_inner.rb +242 -0
  62. data/kinde_api/lib/kinde_api/models/{add_organization_users200_response.rb → add_organization_users_response.rb} +3 -3
  63. data/kinde_api/lib/kinde_api/models/application.rb +226 -0
  64. data/kinde_api/lib/kinde_api/models/create_organization_request.rb +54 -4
  65. data/kinde_api/lib/kinde_api/models/{remove_organization_users200_response.rb → create_organization_response.rb} +19 -12
  66. data/kinde_api/lib/kinde_api/models/{create_organization201_response.rb → create_organization_response_organization.rb} +8 -18
  67. data/kinde_api/lib/kinde_api/models/create_organization_user_role_request.rb +218 -0
  68. data/kinde_api/lib/kinde_api/models/create_permission_request.rb +238 -0
  69. data/kinde_api/lib/kinde_api/models/create_role_request.rb +248 -0
  70. data/kinde_api/lib/kinde_api/models/create_subscriber_success_response.rb +217 -0
  71. data/kinde_api/lib/kinde_api/models/create_subscriber_success_response_subscriber.rb +218 -0
  72. data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner.rb +34 -0
  73. data/kinde_api/lib/kinde_api/models/{create_user200_response.rb → create_user_response.rb} +3 -3
  74. data/kinde_api/lib/kinde_api/models/get_applications_response.rb +249 -0
  75. data/kinde_api/lib/kinde_api/models/get_environment_feature_flags_response.rb +250 -0
  76. data/kinde_api/lib/kinde_api/models/get_organization_feature_flags_response.rb +240 -0
  77. data/kinde_api/lib/kinde_api/models/get_organization_feature_flags_response_feature_flags_value.rb +260 -0
  78. data/kinde_api/lib/kinde_api/models/{get_organizations200_response.rb → get_organizations_response.rb} +3 -3
  79. data/kinde_api/lib/kinde_api/models/get_organizations_user_roles_response.rb +249 -0
  80. data/kinde_api/lib/kinde_api/models/{get_organization_users200_response.rb → get_organizations_users_response.rb} +3 -3
  81. data/kinde_api/lib/kinde_api/models/get_redirect_callback_urls_response.rb +220 -0
  82. data/kinde_api/lib/kinde_api/models/organization_user.rb +15 -4
  83. data/kinde_api/lib/kinde_api/models/organization_user_role.rb +235 -0
  84. data/kinde_api/lib/kinde_api/models/permissions.rb +238 -0
  85. data/kinde_api/lib/kinde_api/models/redirect_callback_urls.rb +220 -0
  86. data/kinde_api/lib/kinde_api/models/roles.rb +238 -0
  87. data/kinde_api/lib/kinde_api/models/update_organization_request.rb +268 -0
  88. data/kinde_api/lib/kinde_api/models/{remove_organization_users_request.rb → update_organization_users_request.rb} +5 -5
  89. data/kinde_api/lib/kinde_api/models/update_organization_users_request_users_inner.rb +252 -0
  90. data/kinde_api/lib/kinde_api/models/update_organization_users_response.rb +250 -0
  91. data/kinde_api/lib/kinde_api/models/update_user_request.rb +14 -4
  92. data/kinde_api/lib/kinde_api/models/user.rb +79 -5
  93. data/kinde_api/lib/kinde_api/models/user_identity_result.rb +4 -14
  94. data/kinde_api/lib/kinde_api/models/user_profile.rb +14 -4
  95. data/kinde_api/lib/kinde_api/models/user_profile_v2.rb +25 -5
  96. data/kinde_api/lib/kinde_api/models/{get_users200_response.rb → users_response.rb} +3 -3
  97. data/kinde_api/lib/kinde_api.rb +32 -8
  98. data/kinde_api/spec/api/callbacks_api_spec.rb +73 -0
  99. data/kinde_api/spec/api/connected_apps_api_spec.rb +1 -1
  100. data/kinde_api/spec/api/environments_api_spec.rb +11 -0
  101. data/kinde_api/spec/api/feature_flags_api_spec.rb +1 -2
  102. data/kinde_api/spec/api/organizations_api_spec.rb +93 -14
  103. data/kinde_api/spec/api/permissions_api_spec.rb +74 -0
  104. data/kinde_api/spec/api/roles_api_spec.rb +74 -0
  105. data/kinde_api/spec/api/subscribers_api_spec.rb +76 -0
  106. data/kinde_api/spec/api/users_api_spec.rb +6 -47
  107. data/kinde_api/spec/api_client_spec.rb +0 -12
  108. data/kinde_api/spec/models/add_organization_users_request_users_inner_spec.rb +46 -0
  109. data/kinde_api/spec/models/{add_organization_users200_response_spec.rb → add_organization_users_response_spec.rb} +6 -6
  110. data/kinde_api/spec/models/{remove_organization_users200_response_spec.rb → application_spec.rb} +8 -8
  111. data/kinde_api/spec/models/create_organization_request_spec.rb +30 -0
  112. data/kinde_api/spec/models/create_organization_response_organization_spec.rb +34 -0
  113. data/kinde_api/spec/models/{create_organization201_response_spec.rb → create_organization_response_spec.rb} +13 -7
  114. data/kinde_api/spec/models/create_organization_user_role_request_spec.rb +34 -0
  115. data/kinde_api/spec/models/create_permission_request_spec.rb +46 -0
  116. data/kinde_api/spec/models/create_role_request_spec.rb +52 -0
  117. data/kinde_api/spec/models/create_subscriber_success_response_spec.rb +34 -0
  118. data/kinde_api/spec/models/create_subscriber_success_response_subscriber_spec.rb +34 -0
  119. data/kinde_api/spec/models/create_user_request_identities_inner_spec.rb +4 -0
  120. data/kinde_api/spec/models/{create_user200_response_spec.rb → create_user_response_spec.rb} +6 -6
  121. data/kinde_api/spec/models/get_applications_response_spec.rb +52 -0
  122. data/kinde_api/spec/models/get_environment_feature_flags_response_spec.rb +52 -0
  123. data/kinde_api/spec/models/get_organization_feature_flags_response_feature_flags_value_spec.rb +44 -0
  124. data/kinde_api/spec/models/get_organization_feature_flags_response_spec.rb +46 -0
  125. data/kinde_api/spec/models/{get_organizations200_response_spec.rb → get_organizations_response_spec.rb} +6 -6
  126. data/kinde_api/spec/models/get_organizations_user_roles_response_spec.rb +52 -0
  127. data/kinde_api/spec/models/{get_organization_users200_response_spec.rb → get_organizations_users_response_spec.rb} +6 -6
  128. data/kinde_api/spec/models/get_redirect_callback_urls_response_spec.rb +34 -0
  129. data/kinde_api/spec/models/organization_user_role_spec.rb +46 -0
  130. data/kinde_api/spec/models/organization_user_spec.rb +6 -0
  131. data/kinde_api/spec/models/permissions_spec.rb +46 -0
  132. data/kinde_api/spec/models/redirect_callback_urls_spec.rb +34 -0
  133. data/kinde_api/spec/models/roles_spec.rb +46 -0
  134. data/kinde_api/spec/models/update_organization_request_spec.rb +64 -0
  135. data/kinde_api/spec/models/{remove_organization_users_request_spec.rb → update_organization_users_request_spec.rb} +6 -6
  136. data/kinde_api/spec/models/update_organization_users_request_users_inner_spec.rb +52 -0
  137. data/kinde_api/spec/models/update_organization_users_response_spec.rb +52 -0
  138. data/kinde_api/spec/models/update_user_request_spec.rb +6 -0
  139. data/kinde_api/spec/models/user_identity_result_spec.rb +0 -6
  140. data/kinde_api/spec/models/user_profile_spec.rb +6 -0
  141. data/kinde_api/spec/models/user_profile_v2_spec.rb +12 -0
  142. data/kinde_api/spec/models/user_spec.rb +42 -0
  143. data/kinde_api/spec/models/{get_users200_response_spec.rb → users_response_spec.rb} +6 -6
  144. data/kinde_sdk.gemspec +1 -1
  145. data/lib/kinde_sdk/client/feature_flags.rb +64 -0
  146. data/lib/kinde_sdk/client/permissions.rb +20 -0
  147. data/lib/kinde_sdk/client.rb +33 -18
  148. data/lib/kinde_sdk/configuration.rb +0 -2
  149. data/lib/kinde_sdk/version.rb +1 -1
  150. data/lib/kinde_sdk.rb +27 -12
  151. data/spec/kinde_sdk_spec.rb +131 -5
  152. data/spec/spec_helper.rb +2 -0
  153. metadata +134 -36
  154. data/kinde_api/docs/CreateOrganization201Response.md +0 -20
  155. data/kinde_api/docs/RemoveOrganizationUsers200Response.md +0 -20
  156. data/kinde_api/docs/RemoveOrganizationUsersRequest.md +0 -18
@@ -4,92 +4,16 @@ All URIs are relative to *https://app.kinde.com*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
- | [**add_organization_users**](UsersApi.md#add_organization_users) | **POST** /api/v1/organization/users | Assign Users to an Organization |
8
7
  | [**create_user**](UsersApi.md#create_user) | **POST** /api/v1/user | Create User |
9
- | [**deleteuser**](UsersApi.md#deleteuser) | **DELETE** /api/v1/user | Delete User |
10
- | [**get_organization_users**](UsersApi.md#get_organization_users) | **GET** /api/v1/organization/users | List Organization Users |
8
+ | [**delete_user**](UsersApi.md#delete_user) | **DELETE** /api/v1/user | Delete User |
11
9
  | [**get_user_data**](UsersApi.md#get_user_data) | **GET** /api/v1/user | Get User |
12
10
  | [**get_users**](UsersApi.md#get_users) | **GET** /api/v1/users | List Users |
13
- | [**remove_organization_users**](UsersApi.md#remove_organization_users) | **PATCH** /api/v1/organization/users | Remove Users from an Organization |
14
11
  | [**update_user**](UsersApi.md#update_user) | **PATCH** /api/v1/user | Update User |
15
12
 
16
13
 
17
- ## add_organization_users
18
-
19
- > <AddOrganizationUsers200Response> add_organization_users(opts)
20
-
21
- Assign Users to an Organization
22
-
23
- Add existing users to an organization.
24
-
25
- ### Examples
26
-
27
- ```ruby
28
- require 'time'
29
- require 'kinde_api'
30
- # setup authorization
31
- KindeApi.configure do |config|
32
- # Configure Bearer authorization (JWT): kindeBearerAuth
33
- config.access_token = 'YOUR_BEARER_TOKEN'
34
- end
35
-
36
- api_instance = KindeApi::UsersApi.new
37
- opts = {
38
- code: 'code_example', # String | The organization's code.
39
- add_organization_users_request: KindeApi::AddOrganizationUsersRequest.new # AddOrganizationUsersRequest |
40
- }
41
-
42
- begin
43
- # Assign Users to an Organization
44
- result = api_instance.add_organization_users(opts)
45
- p result
46
- rescue KindeApi::ApiError => e
47
- puts "Error when calling UsersApi->add_organization_users: #{e}"
48
- end
49
- ```
50
-
51
- #### Using the add_organization_users_with_http_info variant
52
-
53
- This returns an Array which contains the response data, status code and headers.
54
-
55
- > <Array(<AddOrganizationUsers200Response>, Integer, Hash)> add_organization_users_with_http_info(opts)
56
-
57
- ```ruby
58
- begin
59
- # Assign Users to an Organization
60
- data, status_code, headers = api_instance.add_organization_users_with_http_info(opts)
61
- p status_code # => 2xx
62
- p headers # => { ... }
63
- p data # => <AddOrganizationUsers200Response>
64
- rescue KindeApi::ApiError => e
65
- puts "Error when calling UsersApi->add_organization_users_with_http_info: #{e}"
66
- end
67
- ```
68
-
69
- ### Parameters
70
-
71
- | Name | Type | Description | Notes |
72
- | ---- | ---- | ----------- | ----- |
73
- | **code** | **String** | The organization&#39;s code. | [optional] |
74
- | **add_organization_users_request** | [**AddOrganizationUsersRequest**](AddOrganizationUsersRequest.md) | | [optional] |
75
-
76
- ### Return type
77
-
78
- [**AddOrganizationUsers200Response**](AddOrganizationUsers200Response.md)
79
-
80
- ### Authorization
81
-
82
- [kindeBearerAuth](../README.md#kindeBearerAuth)
83
-
84
- ### HTTP request headers
85
-
86
- - **Content-Type**: application/json
87
- - **Accept**: application/json
88
-
89
-
90
14
  ## create_user
91
15
 
92
- > <CreateUser200Response> create_user(opts)
16
+ > <CreateUserResponse> create_user(opts)
93
17
 
94
18
  Create User
95
19
 
@@ -124,7 +48,7 @@ end
124
48
 
125
49
  This returns an Array which contains the response data, status code and headers.
126
50
 
127
- > <Array(<CreateUser200Response>, Integer, Hash)> create_user_with_http_info(opts)
51
+ > <Array(<CreateUserResponse>, Integer, Hash)> create_user_with_http_info(opts)
128
52
 
129
53
  ```ruby
130
54
  begin
@@ -132,7 +56,7 @@ begin
132
56
  data, status_code, headers = api_instance.create_user_with_http_info(opts)
133
57
  p status_code # => 2xx
134
58
  p headers # => { ... }
135
- p data # => <CreateUser200Response>
59
+ p data # => <CreateUserResponse>
136
60
  rescue KindeApi::ApiError => e
137
61
  puts "Error when calling UsersApi->create_user_with_http_info: #{e}"
138
62
  end
@@ -146,7 +70,7 @@ end
146
70
 
147
71
  ### Return type
148
72
 
149
- [**CreateUser200Response**](CreateUser200Response.md)
73
+ [**CreateUserResponse**](CreateUserResponse.md)
150
74
 
151
75
  ### Authorization
152
76
 
@@ -155,12 +79,12 @@ end
155
79
  ### HTTP request headers
156
80
 
157
81
  - **Content-Type**: application/json
158
- - **Accept**: application/json
82
+ - **Accept**: application/json, application/json; charset=utf-8
159
83
 
160
84
 
161
- ## deleteuser
85
+ ## delete_user
162
86
 
163
- > <SuccessResponse> deleteuser(opts)
87
+ > <SuccessResponse> delete_user(opts)
164
88
 
165
89
  Delete User
166
90
 
@@ -184,28 +108,28 @@ opts = {
184
108
 
185
109
  begin
186
110
  # Delete User
187
- result = api_instance.deleteuser(opts)
111
+ result = api_instance.delete_user(opts)
188
112
  p result
189
113
  rescue KindeApi::ApiError => e
190
- puts "Error when calling UsersApi->deleteuser: #{e}"
114
+ puts "Error when calling UsersApi->delete_user: #{e}"
191
115
  end
192
116
  ```
193
117
 
194
- #### Using the deleteuser_with_http_info variant
118
+ #### Using the delete_user_with_http_info variant
195
119
 
196
120
  This returns an Array which contains the response data, status code and headers.
197
121
 
198
- > <Array(<SuccessResponse>, Integer, Hash)> deleteuser_with_http_info(opts)
122
+ > <Array(<SuccessResponse>, Integer, Hash)> delete_user_with_http_info(opts)
199
123
 
200
124
  ```ruby
201
125
  begin
202
126
  # Delete User
203
- data, status_code, headers = api_instance.deleteuser_with_http_info(opts)
127
+ data, status_code, headers = api_instance.delete_user_with_http_info(opts)
204
128
  p status_code # => 2xx
205
129
  p headers # => { ... }
206
130
  p data # => <SuccessResponse>
207
131
  rescue KindeApi::ApiError => e
208
- puts "Error when calling UsersApi->deleteuser_with_http_info: #{e}"
132
+ puts "Error when calling UsersApi->delete_user_with_http_info: #{e}"
209
133
  end
210
134
  ```
211
135
 
@@ -226,91 +150,12 @@ end
226
150
  ### HTTP request headers
227
151
 
228
152
  - **Content-Type**: Not defined
229
- - **Accept**: application/json
230
-
231
-
232
- ## get_organization_users
233
-
234
- > <GetOrganizationUsers200Response> get_organization_users(opts)
235
-
236
- List Organization Users
237
-
238
- Get users in an organization.
239
-
240
- ### Examples
241
-
242
- ```ruby
243
- require 'time'
244
- require 'kinde_api'
245
- # setup authorization
246
- KindeApi.configure do |config|
247
- # Configure Bearer authorization (JWT): kindeBearerAuth
248
- config.access_token = 'YOUR_BEARER_TOKEN'
249
- end
250
-
251
- api_instance = KindeApi::UsersApi.new
252
- opts = {
253
- sort: 'name_asc', # String | Field and order to sort the result by.
254
- page_size: 56, # Integer | Number of results per page. Defaults to 10 if parameter not sent.
255
- next_token: 'next_token_example', # String | A string to get the next page of results if there are more results.
256
- code: 'code_example', # String | The organization's code.
257
- permissions: 'permissions_example' # String | Filter by user permissions
258
- }
259
-
260
- begin
261
- # List Organization Users
262
- result = api_instance.get_organization_users(opts)
263
- p result
264
- rescue KindeApi::ApiError => e
265
- puts "Error when calling UsersApi->get_organization_users: #{e}"
266
- end
267
- ```
268
-
269
- #### Using the get_organization_users_with_http_info variant
270
-
271
- This returns an Array which contains the response data, status code and headers.
272
-
273
- > <Array(<GetOrganizationUsers200Response>, Integer, Hash)> get_organization_users_with_http_info(opts)
274
-
275
- ```ruby
276
- begin
277
- # List Organization Users
278
- data, status_code, headers = api_instance.get_organization_users_with_http_info(opts)
279
- p status_code # => 2xx
280
- p headers # => { ... }
281
- p data # => <GetOrganizationUsers200Response>
282
- rescue KindeApi::ApiError => e
283
- puts "Error when calling UsersApi->get_organization_users_with_http_info: #{e}"
284
- end
285
- ```
286
-
287
- ### Parameters
288
-
289
- | Name | Type | Description | Notes |
290
- | ---- | ---- | ----------- | ----- |
291
- | **sort** | **String** | Field and order to sort the result by. | [optional] |
292
- | **page_size** | **Integer** | Number of results per page. Defaults to 10 if parameter not sent. | [optional] |
293
- | **next_token** | **String** | A string to get the next page of results if there are more results. | [optional] |
294
- | **code** | **String** | The organization&#39;s code. | [optional] |
295
- | **permissions** | **String** | Filter by user permissions | [optional] |
296
-
297
- ### Return type
298
-
299
- [**GetOrganizationUsers200Response**](GetOrganizationUsers200Response.md)
300
-
301
- ### Authorization
302
-
303
- [kindeBearerAuth](../README.md#kindeBearerAuth)
304
-
305
- ### HTTP request headers
306
-
307
- - **Content-Type**: Not defined
308
- - **Accept**: application/json
153
+ - **Accept**: application/json, application/json; charset=utf-8
309
154
 
310
155
 
311
156
  ## get_user_data
312
157
 
313
- > <User> get_user_data(opts)
158
+ > <User> get_user_data(id)
314
159
 
315
160
  Get User
316
161
 
@@ -328,13 +173,11 @@ KindeApi.configure do |config|
328
173
  end
329
174
 
330
175
  api_instance = KindeApi::UsersApi.new
331
- opts = {
332
- id: 'id_example' # String | The user's id.
333
- }
176
+ id = 'id_example' # String | The user's id.
334
177
 
335
178
  begin
336
179
  # Get User
337
- result = api_instance.get_user_data(opts)
180
+ result = api_instance.get_user_data(id)
338
181
  p result
339
182
  rescue KindeApi::ApiError => e
340
183
  puts "Error when calling UsersApi->get_user_data: #{e}"
@@ -345,12 +188,12 @@ end
345
188
 
346
189
  This returns an Array which contains the response data, status code and headers.
347
190
 
348
- > <Array(<User>, Integer, Hash)> get_user_data_with_http_info(opts)
191
+ > <Array(<User>, Integer, Hash)> get_user_data_with_http_info(id)
349
192
 
350
193
  ```ruby
351
194
  begin
352
195
  # Get User
353
- data, status_code, headers = api_instance.get_user_data_with_http_info(opts)
196
+ data, status_code, headers = api_instance.get_user_data_with_http_info(id)
354
197
  p status_code # => 2xx
355
198
  p headers # => { ... }
356
199
  p data # => <User>
@@ -363,7 +206,7 @@ end
363
206
 
364
207
  | Name | Type | Description | Notes |
365
208
  | ---- | ---- | ----------- | ----- |
366
- | **id** | **String** | The user&#39;s id. | [optional] |
209
+ | **id** | **String** | The user&#39;s id. | |
367
210
 
368
211
  ### Return type
369
212
 
@@ -376,12 +219,12 @@ end
376
219
  ### HTTP request headers
377
220
 
378
221
  - **Content-Type**: Not defined
379
- - **Accept**: application/json
222
+ - **Accept**: application/json, application/json; charset=utf-8
380
223
 
381
224
 
382
225
  ## get_users
383
226
 
384
- > <GetUsers200Response> get_users(opts)
227
+ > <UsersResponse> get_users(opts)
385
228
 
386
229
  List Users
387
230
 
@@ -403,7 +246,8 @@ opts = {
403
246
  sort: 'name_asc', # String | Field and order to sort the result by.
404
247
  page_size: 56, # Integer | Number of results per page. Defaults to 10 if parameter not sent.
405
248
  user_id: 'user_id_example', # String | ID of the user to filter by.
406
- next_token: 'next_token_example' # String | A string to get the next page of results if there are more results.
249
+ next_token: 'next_token_example', # String | A string to get the next page of results if there are more results.
250
+ email: 'email_example' # String | Filter the results by email address. The query string should be comma separated and url encoded.
407
251
  }
408
252
 
409
253
  begin
@@ -419,7 +263,7 @@ end
419
263
 
420
264
  This returns an Array which contains the response data, status code and headers.
421
265
 
422
- > <Array(<GetUsers200Response>, Integer, Hash)> get_users_with_http_info(opts)
266
+ > <Array(<UsersResponse>, Integer, Hash)> get_users_with_http_info(opts)
423
267
 
424
268
  ```ruby
425
269
  begin
@@ -427,7 +271,7 @@ begin
427
271
  data, status_code, headers = api_instance.get_users_with_http_info(opts)
428
272
  p status_code # => 2xx
429
273
  p headers # => { ... }
430
- p data # => <GetUsers200Response>
274
+ p data # => <UsersResponse>
431
275
  rescue KindeApi::ApiError => e
432
276
  puts "Error when calling UsersApi->get_users_with_http_info: #{e}"
433
277
  end
@@ -441,10 +285,11 @@ end
441
285
  | **page_size** | **Integer** | Number of results per page. Defaults to 10 if parameter not sent. | [optional] |
442
286
  | **user_id** | **String** | ID of the user to filter by. | [optional] |
443
287
  | **next_token** | **String** | A string to get the next page of results if there are more results. | [optional] |
288
+ | **email** | **String** | Filter the results by email address. The query string should be comma separated and url encoded. | [optional] |
444
289
 
445
290
  ### Return type
446
291
 
447
- [**GetUsers200Response**](GetUsers200Response.md)
292
+ [**UsersResponse**](UsersResponse.md)
448
293
 
449
294
  ### Authorization
450
295
 
@@ -453,80 +298,7 @@ end
453
298
  ### HTTP request headers
454
299
 
455
300
  - **Content-Type**: Not defined
456
- - **Accept**: application/json
457
-
458
-
459
- ## remove_organization_users
460
-
461
- > <RemoveOrganizationUsers200Response> remove_organization_users(opts)
462
-
463
- Remove Users from an Organization
464
-
465
- Remove existing users from an organization.
466
-
467
- ### Examples
468
-
469
- ```ruby
470
- require 'time'
471
- require 'kinde_api'
472
- # setup authorization
473
- KindeApi.configure do |config|
474
- # Configure Bearer authorization (JWT): kindeBearerAuth
475
- config.access_token = 'YOUR_BEARER_TOKEN'
476
- end
477
-
478
- api_instance = KindeApi::UsersApi.new
479
- opts = {
480
- code: 'code_example', # String | The organization's code.
481
- remove_organization_users_request: KindeApi::RemoveOrganizationUsersRequest.new # RemoveOrganizationUsersRequest |
482
- }
483
-
484
- begin
485
- # Remove Users from an Organization
486
- result = api_instance.remove_organization_users(opts)
487
- p result
488
- rescue KindeApi::ApiError => e
489
- puts "Error when calling UsersApi->remove_organization_users: #{e}"
490
- end
491
- ```
492
-
493
- #### Using the remove_organization_users_with_http_info variant
494
-
495
- This returns an Array which contains the response data, status code and headers.
496
-
497
- > <Array(<RemoveOrganizationUsers200Response>, Integer, Hash)> remove_organization_users_with_http_info(opts)
498
-
499
- ```ruby
500
- begin
501
- # Remove Users from an Organization
502
- data, status_code, headers = api_instance.remove_organization_users_with_http_info(opts)
503
- p status_code # => 2xx
504
- p headers # => { ... }
505
- p data # => <RemoveOrganizationUsers200Response>
506
- rescue KindeApi::ApiError => e
507
- puts "Error when calling UsersApi->remove_organization_users_with_http_info: #{e}"
508
- end
509
- ```
510
-
511
- ### Parameters
512
-
513
- | Name | Type | Description | Notes |
514
- | ---- | ---- | ----------- | ----- |
515
- | **code** | **String** | The organization&#39;s code. | [optional] |
516
- | **remove_organization_users_request** | [**RemoveOrganizationUsersRequest**](RemoveOrganizationUsersRequest.md) | | [optional] |
517
-
518
- ### Return type
519
-
520
- [**RemoveOrganizationUsers200Response**](RemoveOrganizationUsers200Response.md)
521
-
522
- ### Authorization
523
-
524
- [kindeBearerAuth](../README.md#kindeBearerAuth)
525
-
526
- ### HTTP request headers
527
-
528
- - **Content-Type**: application/json
529
- - **Accept**: application/json
301
+ - **Accept**: application/json, application/json; charset=utf-8
530
302
 
531
303
 
532
304
  ## update_user
@@ -599,5 +371,5 @@ end
599
371
  ### HTTP request headers
600
372
 
601
373
  - **Content-Type**: application/json
602
- - **Accept**: application/json
374
+ - **Accept**: application/json, application/json; charset=utf-8
603
375
 
@@ -1,4 +1,4 @@
1
- # KindeApi::GetUsers200Response
1
+ # KindeApi::UsersResponse
2
2
 
3
3
  ## Properties
4
4
 
@@ -14,7 +14,7 @@
14
14
  ```ruby
15
15
  require 'kinde_api'
16
16
 
17
- instance = KindeApi::GetUsers200Response.new(
17
+ instance = KindeApi::UsersResponse.new(
18
18
  code: null,
19
19
  message: null,
20
20
  users: null,
@@ -0,0 +1,221 @@
1
+ =begin
2
+ #Kinde Management API
3
+
4
+ #Provides endpoints to manage your Kinde Businesses
5
+
6
+ The version of the OpenAPI document: 1
7
+ Contact: support@kinde.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.4.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module KindeApi
16
+ class CallbacksApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Add Redirect Callback URLs
23
+ # Add additional redirect callback URLs.
24
+ # @param app_id [String] The identifier for the application.
25
+ # @param urls [Array<String>] Array of callback urls.
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [nil]
28
+ def add_redirect_callback_urls(app_id, urls, opts = {})
29
+ add_redirect_callback_urls_with_http_info(app_id, urls, opts)
30
+ nil
31
+ end
32
+
33
+ # Add Redirect Callback URLs
34
+ # Add additional redirect callback URLs.
35
+ # @param app_id [String] The identifier for the application.
36
+ # @param urls [Array<String>] Array of callback urls.
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
+ def add_redirect_callback_urls_with_http_info(app_id, urls, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: CallbacksApi.add_redirect_callback_urls ...'
42
+ end
43
+ # verify the required parameter 'app_id' is set
44
+ if @api_client.config.client_side_validation && app_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling CallbacksApi.add_redirect_callback_urls"
46
+ end
47
+ # verify the required parameter 'urls' is set
48
+ if @api_client.config.client_side_validation && urls.nil?
49
+ fail ArgumentError, "Missing the required parameter 'urls' when calling CallbacksApi.add_redirect_callback_urls"
50
+ end
51
+ # resource path
52
+ local_var_path = '/api/v1/applications/{app_id}/auth_redirect_urls'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+ query_params[:'urls'] = @api_client.build_collection_param(urls, :multi)
57
+
58
+ # header parameters
59
+ header_params = opts[:header_params] || {}
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body]
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type]
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"CallbacksApi.add_redirect_callback_urls",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: CallbacksApi#add_redirect_callback_urls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # List Callback URLs
91
+ # Returns an application's redirect callback URLs.
92
+ # @param app_id [String] The identifier for the application.
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [RedirectCallbackUrls]
95
+ def get_callback_urls(app_id, opts = {})
96
+ data, _status_code, _headers = get_callback_urls_with_http_info(app_id, opts)
97
+ data
98
+ end
99
+
100
+ # List Callback URLs
101
+ # Returns an application&#39;s redirect callback URLs.
102
+ # @param app_id [String] The identifier for the application.
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(RedirectCallbackUrls, Integer, Hash)>] RedirectCallbackUrls data, response status code and response headers
105
+ def get_callback_urls_with_http_info(app_id, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: CallbacksApi.get_callback_urls ...'
108
+ end
109
+ # verify the required parameter 'app_id' is set
110
+ if @api_client.config.client_side_validation && app_id.nil?
111
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling CallbacksApi.get_callback_urls"
112
+ end
113
+ # resource path
114
+ local_var_path = '/api/v1/applications/{app_id}/auth_redirect_urls'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
123
+
124
+ # form parameters
125
+ form_params = opts[:form_params] || {}
126
+
127
+ # http body (model)
128
+ post_body = opts[:debug_body]
129
+
130
+ # return_type
131
+ return_type = opts[:debug_return_type] || 'RedirectCallbackUrls'
132
+
133
+ # auth_names
134
+ auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
135
+
136
+ new_options = opts.merge(
137
+ :operation => :"CallbacksApi.get_callback_urls",
138
+ :header_params => header_params,
139
+ :query_params => query_params,
140
+ :form_params => form_params,
141
+ :body => post_body,
142
+ :auth_names => auth_names,
143
+ :return_type => return_type
144
+ )
145
+
146
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
147
+ if @api_client.config.debugging
148
+ @api_client.config.logger.debug "API called: CallbacksApi#get_callback_urls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
149
+ end
150
+ return data, status_code, headers
151
+ end
152
+
153
+ # Replace redirect callback URLs
154
+ # Replace all redirect callback URLs.
155
+ # @param app_id [String] The identifier for the application.
156
+ # @param urls [Array<String>] Array of callback urls.
157
+ # @param [Hash] opts the optional parameters
158
+ # @return [nil]
159
+ def replace_redirect_callback_urls(app_id, urls, opts = {})
160
+ replace_redirect_callback_urls_with_http_info(app_id, urls, opts)
161
+ nil
162
+ end
163
+
164
+ # Replace redirect callback URLs
165
+ # Replace all redirect callback URLs.
166
+ # @param app_id [String] The identifier for the application.
167
+ # @param urls [Array<String>] Array of callback urls.
168
+ # @param [Hash] opts the optional parameters
169
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
170
+ def replace_redirect_callback_urls_with_http_info(app_id, urls, opts = {})
171
+ if @api_client.config.debugging
172
+ @api_client.config.logger.debug 'Calling API: CallbacksApi.replace_redirect_callback_urls ...'
173
+ end
174
+ # verify the required parameter 'app_id' is set
175
+ if @api_client.config.client_side_validation && app_id.nil?
176
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling CallbacksApi.replace_redirect_callback_urls"
177
+ end
178
+ # verify the required parameter 'urls' is set
179
+ if @api_client.config.client_side_validation && urls.nil?
180
+ fail ArgumentError, "Missing the required parameter 'urls' when calling CallbacksApi.replace_redirect_callback_urls"
181
+ end
182
+ # resource path
183
+ local_var_path = '/api/v1/applications/{app_id}/auth_redirect_urls'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
184
+
185
+ # query parameters
186
+ query_params = opts[:query_params] || {}
187
+ query_params[:'urls'] = @api_client.build_collection_param(urls, :multi)
188
+
189
+ # header parameters
190
+ header_params = opts[:header_params] || {}
191
+
192
+ # form parameters
193
+ form_params = opts[:form_params] || {}
194
+
195
+ # http body (model)
196
+ post_body = opts[:debug_body]
197
+
198
+ # return_type
199
+ return_type = opts[:debug_return_type]
200
+
201
+ # auth_names
202
+ auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
203
+
204
+ new_options = opts.merge(
205
+ :operation => :"CallbacksApi.replace_redirect_callback_urls",
206
+ :header_params => header_params,
207
+ :query_params => query_params,
208
+ :form_params => form_params,
209
+ :body => post_body,
210
+ :auth_names => auth_names,
211
+ :return_type => return_type
212
+ )
213
+
214
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug "API called: CallbacksApi#replace_redirect_callback_urls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
217
+ end
218
+ return data, status_code, headers
219
+ end
220
+ end
221
+ end