kinde_sdk 1.2.1 → 1.2.2

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 (241) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +128 -0
  3. data/README.md +12 -434
  4. data/kinde_api/README.md +98 -27
  5. data/kinde_api/docs/APIsApi.md +356 -0
  6. data/kinde_api/docs/AddAPIsRequest.md +20 -0
  7. data/kinde_api/docs/Api.md +28 -0
  8. data/kinde_api/docs/ApiApplicationsInner.md +24 -0
  9. data/kinde_api/docs/Apis.md +24 -0
  10. data/kinde_api/docs/Applications.md +22 -0
  11. data/kinde_api/docs/ApplicationsApi.md +368 -0
  12. data/kinde_api/docs/BusinessApi.md +183 -0
  13. data/kinde_api/docs/CallbacksApi.md +385 -25
  14. data/kinde_api/docs/CreateApplicationRequest.md +20 -0
  15. data/kinde_api/docs/CreateApplicationResponse.md +22 -0
  16. data/kinde_api/docs/CreateApplicationResponseApplication.md +22 -0
  17. data/kinde_api/docs/CreateFeatureFlagRequest.md +28 -0
  18. data/kinde_api/docs/CreateOrganizationRequest.md +3 -1
  19. data/kinde_api/docs/CreateOrganizationUserPermissionRequest.md +18 -0
  20. data/kinde_api/docs/EnvironmentsApi.md +23 -23
  21. data/kinde_api/docs/FeatureFlagsApi.md +19 -29
  22. data/kinde_api/docs/GetApplicationResponse.md +22 -0
  23. data/kinde_api/docs/GetApplicationResponseApplication.md +26 -0
  24. data/kinde_api/docs/GetApplicationsResponse.md +2 -2
  25. data/kinde_api/docs/{GetOrganizationsUsersResponse.md → GetOrganizationUsersResponse.md} +2 -2
  26. data/kinde_api/docs/GetOrganizationsUserPermissionsResponse.md +22 -0
  27. data/kinde_api/docs/GetPermissionsResponse.md +24 -0
  28. data/kinde_api/docs/GetRolesResponse.md +24 -0
  29. data/kinde_api/docs/GetSubscriberResponse.md +22 -0
  30. data/kinde_api/docs/GetSubscribersResponse.md +24 -0
  31. data/kinde_api/docs/IndustriesApi.md +81 -0
  32. data/kinde_api/docs/LogoutRedirectUrls.md +18 -0
  33. data/kinde_api/docs/OAuthApi.md +153 -4
  34. data/kinde_api/docs/Organization.md +3 -1
  35. data/kinde_api/docs/OrganizationUserPermission.md +26 -0
  36. data/kinde_api/docs/OrganizationUserPermissionRolesInner.md +20 -0
  37. data/kinde_api/docs/OrganizationUserRolePermissions.md +22 -0
  38. data/kinde_api/docs/OrganizationUserRolePermissionsPermissions.md +18 -0
  39. data/kinde_api/docs/OrganizationsApi.md +328 -32
  40. data/kinde_api/docs/PermissionsApi.md +84 -14
  41. data/kinde_api/docs/ReplaceLogoutRedirectURLsRequest.md +18 -0
  42. data/kinde_api/docs/ReplaceRedirectCallbackURLsRequest.md +18 -0
  43. data/kinde_api/docs/Role.md +24 -0
  44. data/kinde_api/docs/Roles.md +2 -0
  45. data/kinde_api/docs/RolesApi.md +309 -17
  46. data/kinde_api/docs/RolesPermissionResponseInner.md +24 -0
  47. data/kinde_api/docs/Subscriber.md +24 -0
  48. data/kinde_api/docs/SubscribersApi.md +12 -14
  49. data/kinde_api/docs/SubscribersSubscriber.md +26 -0
  50. data/kinde_api/docs/TimezonesApi.md +81 -0
  51. data/kinde_api/docs/TokenErrorResponse.md +20 -0
  52. data/kinde_api/docs/TokenIntrospect.md +26 -0
  53. data/kinde_api/docs/UpdateAPIApplicationsRequest.md +18 -0
  54. data/kinde_api/docs/UpdateAPIApplicationsRequestApplicationsInner.md +20 -0
  55. data/kinde_api/docs/UpdateApplicationRequest.md +24 -0
  56. data/kinde_api/docs/UpdateEnvironementFeatureFlagOverrideRequest.md +18 -0
  57. data/kinde_api/docs/UpdateOrganizationRequest.md +3 -1
  58. data/kinde_api/docs/UpdateOrganizationUsersRequest.md +1 -1
  59. data/kinde_api/docs/UpdateRolePermissionsRequest.md +18 -0
  60. data/kinde_api/docs/UpdateRolePermissionsRequestPermissionsInner.md +20 -0
  61. data/kinde_api/docs/UpdateRolePermissionsResponse.md +24 -0
  62. data/kinde_api/docs/UpdateRolesRequest.md +24 -0
  63. data/kinde_api/docs/UpdateUserResponse.md +30 -0
  64. data/kinde_api/docs/User.md +7 -7
  65. data/kinde_api/docs/UserIdentitiesInner.md +20 -0
  66. data/kinde_api/docs/UsersApi.md +93 -15
  67. data/kinde_api/docs/UsersResponse.md +1 -1
  68. data/kinde_api/docs/UsersResponseUsersInner.md +42 -0
  69. data/kinde_api/lib/kinde_api/api/apis_api.rb +347 -0
  70. data/kinde_api/lib/kinde_api/api/applications_api.rb +352 -0
  71. data/kinde_api/lib/kinde_api/api/business_api.rb +210 -0
  72. data/kinde_api/lib/kinde_api/api/callbacks_api.rb +394 -31
  73. data/kinde_api/lib/kinde_api/api/environments_api.rb +22 -18
  74. data/kinde_api/lib/kinde_api/api/feature_flags_api.rb +20 -61
  75. data/kinde_api/lib/kinde_api/api/industries_api.rb +85 -0
  76. data/kinde_api/lib/kinde_api/api/o_auth_api.rb +141 -2
  77. data/kinde_api/lib/kinde_api/api/organizations_api.rb +318 -25
  78. data/kinde_api/lib/kinde_api/api/permissions_api.rb +75 -12
  79. data/kinde_api/lib/kinde_api/api/roles_api.rb +297 -15
  80. data/kinde_api/lib/kinde_api/api/subscribers_api.rb +8 -11
  81. data/kinde_api/lib/kinde_api/api/timezones_api.rb +85 -0
  82. data/kinde_api/lib/kinde_api/api/users_api.rb +87 -11
  83. data/kinde_api/lib/kinde_api/api_client.rb +14 -7
  84. data/kinde_api/lib/kinde_api/configuration.rb +81 -5
  85. data/kinde_api/lib/kinde_api/models/add_apis_request.rb +238 -0
  86. data/kinde_api/lib/kinde_api/models/add_organization_users_request.rb +2 -0
  87. data/kinde_api/lib/kinde_api/models/add_organization_users_request_users_inner.rb +2 -0
  88. data/kinde_api/lib/kinde_api/models/add_organization_users_response.rb +2 -0
  89. data/kinde_api/lib/kinde_api/models/api.rb +271 -0
  90. data/kinde_api/lib/kinde_api/models/api_applications_inner.rb +246 -0
  91. data/kinde_api/lib/kinde_api/models/api_result.rb +2 -0
  92. data/kinde_api/lib/kinde_api/models/apis.rb +250 -0
  93. data/kinde_api/lib/kinde_api/models/applications.rb +237 -0
  94. data/kinde_api/lib/kinde_api/models/connected_apps_access_token.rb +2 -0
  95. data/kinde_api/lib/kinde_api/models/connected_apps_auth_url.rb +2 -0
  96. data/kinde_api/lib/kinde_api/models/create_application_request.rb +264 -0
  97. data/kinde_api/lib/kinde_api/models/create_application_response.rb +239 -0
  98. data/kinde_api/lib/kinde_api/models/create_application_response_application.rb +240 -0
  99. data/kinde_api/lib/kinde_api/models/create_feature_flag_request.rb +336 -0
  100. data/kinde_api/lib/kinde_api/models/create_organization_request.rb +16 -4
  101. data/kinde_api/lib/kinde_api/models/create_organization_response.rb +2 -0
  102. data/kinde_api/lib/kinde_api/models/create_organization_response_organization.rb +2 -0
  103. data/kinde_api/lib/kinde_api/models/{application.rb → create_organization_user_permission_request.rb} +13 -19
  104. data/kinde_api/lib/kinde_api/models/create_organization_user_role_request.rb +2 -0
  105. data/kinde_api/lib/kinde_api/models/create_permission_request.rb +2 -0
  106. data/kinde_api/lib/kinde_api/models/create_role_request.rb +2 -0
  107. data/kinde_api/lib/kinde_api/models/create_subscriber_success_response.rb +2 -0
  108. data/kinde_api/lib/kinde_api/models/create_subscriber_success_response_subscriber.rb +2 -0
  109. data/kinde_api/lib/kinde_api/models/create_user_request.rb +2 -0
  110. data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner.rb +2 -0
  111. data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner_details.rb +2 -0
  112. data/kinde_api/lib/kinde_api/models/create_user_request_profile.rb +2 -0
  113. data/kinde_api/lib/kinde_api/models/create_user_response.rb +2 -0
  114. data/kinde_api/lib/kinde_api/models/error.rb +2 -0
  115. data/kinde_api/lib/kinde_api/models/error_response.rb +2 -0
  116. data/kinde_api/lib/kinde_api/models/get_application_response.rb +239 -0
  117. data/kinde_api/lib/kinde_api/models/get_application_response_application.rb +260 -0
  118. data/kinde_api/lib/kinde_api/models/get_applications_response.rb +10 -8
  119. data/kinde_api/lib/kinde_api/models/get_environment_feature_flags_response.rb +2 -0
  120. data/kinde_api/lib/kinde_api/models/get_organization_feature_flags_response.rb +2 -0
  121. data/kinde_api/lib/kinde_api/models/get_organization_feature_flags_response_feature_flags_value.rb +2 -0
  122. data/kinde_api/lib/kinde_api/models/{get_organizations_users_response.rb → get_organization_users_response.rb} +5 -3
  123. data/kinde_api/lib/kinde_api/models/get_organizations_response.rb +2 -0
  124. data/kinde_api/lib/kinde_api/models/get_organizations_user_permissions_response.rb +241 -0
  125. data/kinde_api/lib/kinde_api/models/get_organizations_user_roles_response.rb +2 -0
  126. data/kinde_api/lib/kinde_api/models/get_permissions_response.rb +251 -0
  127. data/kinde_api/lib/kinde_api/models/get_redirect_callback_urls_response.rb +2 -0
  128. data/kinde_api/lib/kinde_api/models/get_roles_response.rb +251 -0
  129. data/kinde_api/lib/kinde_api/models/get_subscriber_response.rb +241 -0
  130. data/kinde_api/lib/kinde_api/models/get_subscribers_response.rb +251 -0
  131. data/kinde_api/lib/kinde_api/models/logout_redirect_urls.rb +222 -0
  132. data/kinde_api/lib/kinde_api/models/organization.rb +15 -4
  133. data/kinde_api/lib/kinde_api/models/organization_user.rb +2 -0
  134. data/kinde_api/lib/kinde_api/models/organization_user_permission.rb +257 -0
  135. data/kinde_api/lib/kinde_api/models/organization_user_permission_roles_inner.rb +228 -0
  136. data/kinde_api/lib/kinde_api/models/organization_user_role.rb +2 -0
  137. data/kinde_api/lib/kinde_api/models/organization_user_role_permissions.rb +237 -0
  138. data/kinde_api/lib/kinde_api/models/organization_user_role_permissions_permissions.rb +219 -0
  139. data/kinde_api/lib/kinde_api/models/permissions.rb +2 -0
  140. data/kinde_api/lib/kinde_api/models/redirect_callback_urls.rb +2 -0
  141. data/kinde_api/lib/kinde_api/models/replace_logout_redirect_urls_request.rb +222 -0
  142. data/kinde_api/lib/kinde_api/models/replace_redirect_callback_urls_request.rb +222 -0
  143. data/kinde_api/lib/kinde_api/models/role.rb +246 -0
  144. data/kinde_api/lib/kinde_api/models/roles.rb +13 -1
  145. data/kinde_api/lib/kinde_api/models/roles_permission_response_inner.rb +246 -0
  146. data/kinde_api/lib/kinde_api/models/subscriber.rb +246 -0
  147. data/kinde_api/lib/kinde_api/models/subscribers_subscriber.rb +255 -0
  148. data/kinde_api/lib/kinde_api/models/success_response.rb +2 -0
  149. data/kinde_api/lib/kinde_api/models/token_error_response.rb +230 -0
  150. data/kinde_api/lib/kinde_api/models/token_introspect.rb +262 -0
  151. data/kinde_api/lib/kinde_api/models/update_api_applications_request.rb +226 -0
  152. data/kinde_api/lib/kinde_api/models/update_api_applications_request_applications_inner.rb +235 -0
  153. data/kinde_api/lib/kinde_api/models/update_application_request.rb +254 -0
  154. data/kinde_api/lib/kinde_api/models/update_environement_feature_flag_override_request.rb +225 -0
  155. data/kinde_api/lib/kinde_api/models/update_organization_request.rb +16 -4
  156. data/kinde_api/lib/kinde_api/models/update_organization_users_request.rb +3 -1
  157. data/kinde_api/lib/kinde_api/models/update_organization_users_request_users_inner.rb +2 -0
  158. data/kinde_api/lib/kinde_api/models/update_organization_users_response.rb +2 -0
  159. data/kinde_api/lib/kinde_api/models/update_role_permissions_request.rb +222 -0
  160. data/kinde_api/lib/kinde_api/models/update_role_permissions_request_permissions_inner.rb +230 -0
  161. data/kinde_api/lib/kinde_api/models/update_role_permissions_response.rb +250 -0
  162. data/kinde_api/lib/kinde_api/models/update_roles_request.rb +260 -0
  163. data/kinde_api/lib/kinde_api/models/update_user_request.rb +2 -0
  164. data/kinde_api/lib/kinde_api/models/update_user_response.rb +280 -0
  165. data/kinde_api/lib/kinde_api/models/user.rb +37 -32
  166. data/kinde_api/lib/kinde_api/models/user_identities_inner.rb +228 -0
  167. data/kinde_api/lib/kinde_api/models/user_identity.rb +2 -0
  168. data/kinde_api/lib/kinde_api/models/user_identity_result.rb +2 -0
  169. data/kinde_api/lib/kinde_api/models/user_profile.rb +2 -0
  170. data/kinde_api/lib/kinde_api/models/user_profile_v2.rb +2 -0
  171. data/kinde_api/lib/kinde_api/models/users_response.rb +3 -1
  172. data/kinde_api/lib/kinde_api/models/users_response_users_inner.rb +348 -0
  173. data/kinde_api/lib/kinde_api.rb +47 -2
  174. data/kinde_api/spec/api/apis_api_spec.rb +95 -0
  175. data/kinde_api/spec/api/applications_api_spec.rb +98 -0
  176. data/kinde_api/spec/api/business_api_spec.rb +75 -0
  177. data/kinde_api/spec/api/callbacks_api_spec.rb +69 -5
  178. data/kinde_api/spec/api/environments_api_spec.rb +5 -5
  179. data/kinde_api/spec/api/feature_flags_api_spec.rb +4 -9
  180. data/kinde_api/spec/api/industries_api_spec.rb +48 -0
  181. data/kinde_api/spec/api/o_auth_api_spec.rb +28 -1
  182. data/kinde_api/spec/api/organizations_api_spec.rb +63 -8
  183. data/kinde_api/spec/api/permissions_api_spec.rb +16 -4
  184. data/kinde_api/spec/api/roles_api_spec.rb +57 -4
  185. data/kinde_api/spec/api/subscribers_api_spec.rb +3 -4
  186. data/kinde_api/spec/api/timezones_api_spec.rb +48 -0
  187. data/kinde_api/spec/api/users_api_spec.rb +17 -2
  188. data/kinde_api/spec/api_client_spec.rb +13 -2
  189. data/kinde_api/spec/models/{application_spec.rb → add_apis_request_spec.rb} +8 -8
  190. data/kinde_api/spec/models/api_applications_inner_spec.rb +52 -0
  191. data/kinde_api/spec/models/api_spec.rb +64 -0
  192. data/kinde_api/spec/models/apis_spec.rb +52 -0
  193. data/kinde_api/spec/models/applications_spec.rb +46 -0
  194. data/kinde_api/spec/models/create_application_request_spec.rb +44 -0
  195. data/kinde_api/spec/models/create_application_response_application_spec.rb +46 -0
  196. data/kinde_api/spec/models/create_application_response_spec.rb +46 -0
  197. data/kinde_api/spec/models/create_feature_flag_request_spec.rb +72 -0
  198. data/kinde_api/spec/models/create_organization_request_spec.rb +6 -0
  199. data/kinde_api/spec/models/create_organization_user_permission_request_spec.rb +34 -0
  200. data/kinde_api/spec/models/get_application_response_application_spec.rb +58 -0
  201. data/kinde_api/spec/models/get_application_response_spec.rb +46 -0
  202. data/kinde_api/spec/models/get_applications_response_spec.rb +1 -1
  203. data/kinde_api/spec/models/{get_organizations_users_response_spec.rb → get_organization_users_response_spec.rb} +6 -6
  204. data/kinde_api/spec/models/get_organizations_user_permissions_response_spec.rb +46 -0
  205. data/kinde_api/spec/models/get_permissions_response_spec.rb +52 -0
  206. data/kinde_api/spec/models/get_roles_response_spec.rb +52 -0
  207. data/kinde_api/spec/models/get_subscriber_response_spec.rb +46 -0
  208. data/kinde_api/spec/models/get_subscribers_response_spec.rb +52 -0
  209. data/kinde_api/spec/models/logout_redirect_urls_spec.rb +34 -0
  210. data/kinde_api/spec/models/organization_spec.rb +6 -0
  211. data/kinde_api/spec/models/organization_user_permission_roles_inner_spec.rb +40 -0
  212. data/kinde_api/spec/models/organization_user_permission_spec.rb +58 -0
  213. data/kinde_api/spec/models/organization_user_role_permissions_permissions_spec.rb +34 -0
  214. data/kinde_api/spec/models/organization_user_role_permissions_spec.rb +46 -0
  215. data/kinde_api/spec/models/replace_logout_redirect_urls_request_spec.rb +34 -0
  216. data/kinde_api/spec/models/replace_redirect_callback_urls_request_spec.rb +34 -0
  217. data/kinde_api/spec/models/role_spec.rb +52 -0
  218. data/kinde_api/spec/models/roles_permission_response_inner_spec.rb +52 -0
  219. data/kinde_api/spec/models/roles_spec.rb +6 -0
  220. data/kinde_api/spec/models/subscriber_spec.rb +52 -0
  221. data/kinde_api/spec/models/subscribers_subscriber_spec.rb +58 -0
  222. data/kinde_api/spec/models/token_error_response_spec.rb +40 -0
  223. data/kinde_api/spec/models/token_introspect_spec.rb +58 -0
  224. data/kinde_api/spec/models/update_api_applications_request_applications_inner_spec.rb +40 -0
  225. data/kinde_api/spec/models/update_api_applications_request_spec.rb +34 -0
  226. data/kinde_api/spec/models/update_application_request_spec.rb +52 -0
  227. data/kinde_api/spec/models/update_environement_feature_flag_override_request_spec.rb +34 -0
  228. data/kinde_api/spec/models/update_organization_request_spec.rb +6 -0
  229. data/kinde_api/spec/models/update_role_permissions_request_permissions_inner_spec.rb +40 -0
  230. data/kinde_api/spec/models/update_role_permissions_request_spec.rb +34 -0
  231. data/kinde_api/spec/models/update_role_permissions_response_spec.rb +52 -0
  232. data/kinde_api/spec/models/update_roles_request_spec.rb +52 -0
  233. data/kinde_api/spec/models/update_user_response_spec.rb +70 -0
  234. data/kinde_api/spec/models/user_identities_inner_spec.rb +40 -0
  235. data/kinde_api/spec/models/user_spec.rb +9 -9
  236. data/kinde_api/spec/models/users_response_users_inner_spec.rb +106 -0
  237. data/kinde_sdk.gemspec +1 -1
  238. data/lib/kinde_sdk/version.rb +1 -1
  239. data/spec/kinde_sdk_spec.rb +0 -46
  240. metadata +193 -12
  241. data/kinde_api/docs/Application.md +0 -20
@@ -51,7 +51,7 @@ module KindeApi
51
51
  # HTTP header 'Content-Type'
52
52
  content_type = @api_client.select_header_content_type(['application/json'])
53
53
  if !content_type.nil?
54
- header_params['Content-Type'] = content_type
54
+ header_params['Content-Type'] = content_type
55
55
  end
56
56
 
57
57
  # form parameters
@@ -85,29 +85,36 @@ module KindeApi
85
85
 
86
86
  # Delete User
87
87
  # Delete a user record.
88
+ # @param id [String] The user's id.
88
89
  # @param [Hash] opts the optional parameters
89
- # @option opts [String] :id The user's id.
90
+ # @option opts [Boolean] :is_delete_profile Delete all data and remove the user's profile from all of Kinde, including the subscriber list
90
91
  # @return [SuccessResponse]
91
- def delete_user(opts = {})
92
- data, _status_code, _headers = delete_user_with_http_info(opts)
92
+ def delete_user(id, opts = {})
93
+ data, _status_code, _headers = delete_user_with_http_info(id, opts)
93
94
  data
94
95
  end
95
96
 
96
97
  # Delete User
97
98
  # Delete a user record.
99
+ # @param id [String] The user's id.
98
100
  # @param [Hash] opts the optional parameters
99
- # @option opts [String] :id The user's id.
101
+ # @option opts [Boolean] :is_delete_profile Delete all data and remove the user's profile from all of Kinde, including the subscriber list
100
102
  # @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
101
- def delete_user_with_http_info(opts = {})
103
+ def delete_user_with_http_info(id, opts = {})
102
104
  if @api_client.config.debugging
103
105
  @api_client.config.logger.debug 'Calling API: UsersApi.delete_user ...'
104
106
  end
107
+ # verify the required parameter 'id' is set
108
+ if @api_client.config.client_side_validation && id.nil?
109
+ fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.delete_user"
110
+ end
105
111
  # resource path
106
112
  local_var_path = '/api/v1/user'
107
113
 
108
114
  # query parameters
109
115
  query_params = opts[:query_params] || {}
110
- query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
116
+ query_params[:'id'] = id
117
+ query_params[:'is_delete_profile'] = opts[:'is_delete_profile'] if !opts[:'is_delete_profile'].nil?
111
118
 
112
119
  # header parameters
113
120
  header_params = opts[:header_params] || {}
@@ -147,6 +154,7 @@ module KindeApi
147
154
  # Retrieve a user record.
148
155
  # @param id [String] The user&#39;s id.
149
156
  # @param [Hash] opts the optional parameters
157
+ # @option opts [String] :expand Specify additional data to retrieve. Use \&quot;organizations\&quot; and/or \&quot;identities\&quot;.
150
158
  # @return [User]
151
159
  def get_user_data(id, opts = {})
152
160
  data, _status_code, _headers = get_user_data_with_http_info(id, opts)
@@ -157,6 +165,7 @@ module KindeApi
157
165
  # Retrieve a user record.
158
166
  # @param id [String] The user&#39;s id.
159
167
  # @param [Hash] opts the optional parameters
168
+ # @option opts [String] :expand Specify additional data to retrieve. Use \&quot;organizations\&quot; and/or \&quot;identities\&quot;.
160
169
  # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
161
170
  def get_user_data_with_http_info(id, opts = {})
162
171
  if @api_client.config.debugging
@@ -172,6 +181,7 @@ module KindeApi
172
181
  # query parameters
173
182
  query_params = opts[:query_params] || {}
174
183
  query_params[:'id'] = id
184
+ query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
175
185
 
176
186
  # header parameters
177
187
  header_params = opts[:header_params] || {}
@@ -215,6 +225,7 @@ module KindeApi
215
225
  # @option opts [String] :user_id ID of the user to filter by.
216
226
  # @option opts [String] :next_token A string to get the next page of results if there are more results.
217
227
  # @option opts [String] :email Filter the results by email address. The query string should be comma separated and url encoded.
228
+ # @option opts [String] :expand Specify additional data to retrieve. Use \&quot;organizations\&quot; and/or \&quot;identities\&quot;.
218
229
  # @return [UsersResponse]
219
230
  def get_users(opts = {})
220
231
  data, _status_code, _headers = get_users_with_http_info(opts)
@@ -229,6 +240,7 @@ module KindeApi
229
240
  # @option opts [String] :user_id ID of the user to filter by.
230
241
  # @option opts [String] :next_token A string to get the next page of results if there are more results.
231
242
  # @option opts [String] :email Filter the results by email address. The query string should be comma separated and url encoded.
243
+ # @option opts [String] :expand Specify additional data to retrieve. Use \&quot;organizations\&quot; and/or \&quot;identities\&quot;.
232
244
  # @return [Array<(UsersResponse, Integer, Hash)>] UsersResponse data, response status code and response headers
233
245
  def get_users_with_http_info(opts = {})
234
246
  if @api_client.config.debugging
@@ -248,6 +260,7 @@ module KindeApi
248
260
  query_params[:'user_id'] = opts[:'user_id'] if !opts[:'user_id'].nil?
249
261
  query_params[:'next_token'] = opts[:'next_token'] if !opts[:'next_token'].nil?
250
262
  query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
263
+ query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
251
264
 
252
265
  # header parameters
253
266
  header_params = opts[:header_params] || {}
@@ -283,12 +296,75 @@ module KindeApi
283
296
  return data, status_code, headers
284
297
  end
285
298
 
299
+ # Refresh User Claims and Invalidate Cache
300
+ # Refreshes the user's claims and invalidates the current cache.
301
+ # @param user_id [String] The id of the user whose claims needs to be updated.
302
+ # @param [Hash] opts the optional parameters
303
+ # @return [SuccessResponse]
304
+ def refresh_user_claims(user_id, opts = {})
305
+ data, _status_code, _headers = refresh_user_claims_with_http_info(user_id, opts)
306
+ data
307
+ end
308
+
309
+ # Refresh User Claims and Invalidate Cache
310
+ # Refreshes the user&#39;s claims and invalidates the current cache.
311
+ # @param user_id [String] The id of the user whose claims needs to be updated.
312
+ # @param [Hash] opts the optional parameters
313
+ # @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
314
+ def refresh_user_claims_with_http_info(user_id, opts = {})
315
+ if @api_client.config.debugging
316
+ @api_client.config.logger.debug 'Calling API: UsersApi.refresh_user_claims ...'
317
+ end
318
+ # verify the required parameter 'user_id' is set
319
+ if @api_client.config.client_side_validation && user_id.nil?
320
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.refresh_user_claims"
321
+ end
322
+ # resource path
323
+ local_var_path = '/api/v1/users/{user_id}/refresh_claims'.sub('{' + 'user_id' + '}', CGI.escape(user_id.to_s))
324
+
325
+ # query parameters
326
+ query_params = opts[:query_params] || {}
327
+
328
+ # header parameters
329
+ header_params = opts[:header_params] || {}
330
+ # HTTP header 'Accept' (if needed)
331
+ header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8', 'application/json'])
332
+
333
+ # form parameters
334
+ form_params = opts[:form_params] || {}
335
+
336
+ # http body (model)
337
+ post_body = opts[:debug_body]
338
+
339
+ # return_type
340
+ return_type = opts[:debug_return_type] || 'SuccessResponse'
341
+
342
+ # auth_names
343
+ auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
344
+
345
+ new_options = opts.merge(
346
+ :operation => :"UsersApi.refresh_user_claims",
347
+ :header_params => header_params,
348
+ :query_params => query_params,
349
+ :form_params => form_params,
350
+ :body => post_body,
351
+ :auth_names => auth_names,
352
+ :return_type => return_type
353
+ )
354
+
355
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
356
+ if @api_client.config.debugging
357
+ @api_client.config.logger.debug "API called: UsersApi#refresh_user_claims\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
358
+ end
359
+ return data, status_code, headers
360
+ end
361
+
286
362
  # Update User
287
363
  # Update a user record.
288
364
  # @param update_user_request [UpdateUserRequest] The user to update.
289
365
  # @param [Hash] opts the optional parameters
290
366
  # @option opts [String] :id The user&#39;s id.
291
- # @return [User]
367
+ # @return [UpdateUserResponse]
292
368
  def update_user(update_user_request, opts = {})
293
369
  data, _status_code, _headers = update_user_with_http_info(update_user_request, opts)
294
370
  data
@@ -299,7 +375,7 @@ module KindeApi
299
375
  # @param update_user_request [UpdateUserRequest] The user to update.
300
376
  # @param [Hash] opts the optional parameters
301
377
  # @option opts [String] :id The user&#39;s id.
302
- # @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
378
+ # @return [Array<(UpdateUserResponse, Integer, Hash)>] UpdateUserResponse data, response status code and response headers
303
379
  def update_user_with_http_info(update_user_request, opts = {})
304
380
  if @api_client.config.debugging
305
381
  @api_client.config.logger.debug 'Calling API: UsersApi.update_user ...'
@@ -322,7 +398,7 @@ module KindeApi
322
398
  # HTTP header 'Content-Type'
323
399
  content_type = @api_client.select_header_content_type(['application/json'])
324
400
  if !content_type.nil?
325
- header_params['Content-Type'] = content_type
401
+ header_params['Content-Type'] = content_type
326
402
  end
327
403
 
328
404
  # form parameters
@@ -332,7 +408,7 @@ module KindeApi
332
408
  post_body = opts[:debug_body] || @api_client.object_to_http_body(update_user_request)
333
409
 
334
410
  # return_type
335
- return_type = opts[:debug_return_type] || 'User'
411
+ return_type = opts[:debug_return_type] || 'UpdateUserResponse'
336
412
 
337
413
  # auth_names
338
414
  auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
@@ -1,3 +1,15 @@
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
+
1
13
  require 'date'
2
14
  require 'json'
3
15
  require 'logger'
@@ -21,7 +33,6 @@ module KindeApi
21
33
  @config = config
22
34
  @user_agent = "OpenAPI-Generator/#{VERSION}/ruby"
23
35
  @default_headers = {
24
- "Accept-Encoding" => "*",
25
36
  'Content-Type' => 'application/json',
26
37
  'User-Agent' => @user_agent
27
38
  }
@@ -190,15 +201,11 @@ module KindeApi
190
201
  # application/json
191
202
  # application/json; charset=UTF8
192
203
  # APPLICATION/JSON
193
- # text/plain
194
- # text/plain; charset=utf-8
195
204
  # */*
196
205
  # @param [String] mime MIME
197
206
  # @return [Boolean] True if the MIME is application/json
198
207
  def json_mime?(mime)
199
- prepared_mime = mime.to_s.downcase.strip.split(";")[0]
200
- result = %w[*/* application/json text/plain].find { |i| i == prepared_mime }
201
- result != nil
208
+ (mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
202
209
  end
203
210
 
204
211
  # Deserialize the response to the given return type.
@@ -288,7 +295,7 @@ module KindeApi
288
295
  def build_request_url(path, opts = {})
289
296
  # Add leading and trailing slashes to path
290
297
  path = "/#{path}".gsub(/\/+/, '/')
291
- @config.base_url + path
298
+ @config.base_url(opts[:operation]) + path
292
299
  end
293
300
 
294
301
  # Update header and query params based on authentication settings.
@@ -21,6 +21,18 @@ module KindeApi
21
21
  # Defines url base path
22
22
  attr_accessor :base_path
23
23
 
24
+ # Define server configuration index
25
+ attr_accessor :server_index
26
+
27
+ # Define server operation configuration index
28
+ attr_accessor :server_operation_index
29
+
30
+ # Default server variables
31
+ attr_accessor :server_variables
32
+
33
+ # Default server operation variables
34
+ attr_accessor :server_operation_variables
35
+
24
36
  # Defines API keys used with API Key authentications.
25
37
  #
26
38
  # @return [Hash] key: parameter name, value: parameter value (API key)
@@ -126,6 +138,7 @@ module KindeApi
126
138
  # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
127
139
  attr_accessor :params_encoding
128
140
 
141
+
129
142
  attr_accessor :inject_format
130
143
 
131
144
  attr_accessor :force_ending_format
@@ -134,6 +147,10 @@ module KindeApi
134
147
  @scheme = 'https'
135
148
  @host = 'app.kinde.com'
136
149
  @base_path = ''
150
+ @server_index = 0
151
+ @server_operation_index = {}
152
+ @server_variables = {}
153
+ @server_operation_variables = {}
137
154
  @api_key = {}
138
155
  @api_key_prefix = {}
139
156
  @client_side_validation = true
@@ -177,8 +194,11 @@ module KindeApi
177
194
  end
178
195
 
179
196
  # Returns base URL for specified operation based on server settings
180
- def base_url
181
- "#{scheme}://#{host}"
197
+ def base_url(operation = nil)
198
+ index = server_operation_index.fetch(operation, server_index)
199
+ return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil
200
+
201
+ server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
182
202
  end
183
203
 
184
204
  # Gets API key (with prefix if set).
@@ -195,8 +215,8 @@ module KindeApi
195
215
 
196
216
  # Gets access_token using access_token_getter or uses the static access_token
197
217
  def access_token_with_refresh
198
- return access_token if access_token_getter.nil?
199
- access_token_getter.call
218
+ return access_token if access_token_getter.nil?
219
+ access_token_getter.call
200
220
  end
201
221
 
202
222
  # Gets Basic Auth token string
@@ -214,8 +234,64 @@ module KindeApi
214
234
  format: 'JWT',
215
235
  key: 'Authorization',
216
236
  value: "Bearer #{access_token_with_refresh}"
217
- }
237
+ },
238
+ }
239
+ end
240
+
241
+ # Returns an array of Server setting
242
+ def server_settings
243
+ [
244
+ {
245
+ url: "https://{businessName}.kinde.com",
246
+ description: "No description provided",
247
+ variables: {
248
+ businessName: {
249
+ description: "Business name created in the Kinde admin area.",
250
+ default_value: "app",
251
+ }
252
+ }
253
+ }
254
+ ]
255
+ end
256
+
257
+ def operation_server_settings
258
+ {
218
259
  }
219
260
  end
261
+
262
+ # Returns URL based on server settings
263
+ #
264
+ # @param index array index of the server settings
265
+ # @param variables hash of variable and the corresponding value
266
+ def server_url(index, variables = {}, servers = nil)
267
+ servers = server_settings if servers == nil
268
+
269
+ # check array index out of bound
270
+ if (index < 0 || index >= servers.size)
271
+ fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
272
+ end
273
+
274
+ server = servers[index]
275
+ url = server[:url]
276
+
277
+ return url unless server.key? :variables
278
+
279
+ # go through variable and assign a value
280
+ server[:variables].each do |name, variable|
281
+ if variables.key?(name)
282
+ if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name]))
283
+ url.gsub! "{" + name.to_s + "}", variables[name]
284
+ else
285
+ fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
286
+ end
287
+ else
288
+ # use default value
289
+ url.gsub! "{" + name.to_s + "}", server[:variables][name][:default_value]
290
+ end
291
+ end
292
+
293
+ url
294
+ end
295
+
220
296
  end
221
297
  end
@@ -0,0 +1,238 @@
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 'date'
14
+ require 'time'
15
+
16
+ module KindeApi
17
+ class AddAPIsRequest
18
+ attr_accessor :name
19
+
20
+ attr_accessor :audience
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'name' => :'name',
26
+ :'audience' => :'audience'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'name' => :'String',
39
+ :'audience' => :'String'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `KindeApi::AddAPIsRequest` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `KindeApi::AddAPIsRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'name')
65
+ self.name = attributes[:'name']
66
+ end
67
+
68
+ if attributes.key?(:'audience')
69
+ self.audience = attributes[:'audience']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ if @name.nil?
78
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
79
+ end
80
+
81
+ if @audience.nil?
82
+ invalid_properties.push('invalid value for "audience", audience cannot be nil.')
83
+ end
84
+
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ return false if @name.nil?
92
+ return false if @audience.nil?
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ name == o.name &&
102
+ audience == o.audience
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Integer] Hash code
113
+ def hash
114
+ [name, audience].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def self.build_from_hash(attributes)
121
+ new.build_from_hash(attributes)
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ self.class.openapi_types.each_pair do |key, type|
131
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
132
+ self.send("#{key}=", nil)
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
137
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
138
+ end
139
+ elsif !attributes[self.class.attribute_map[key]].nil?
140
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
+ end
142
+ end
143
+
144
+ self
145
+ end
146
+
147
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def _deserialize(type, value)
152
+ case type.to_sym
153
+ when :Time
154
+ Time.parse(value)
155
+ when :Date
156
+ Date.parse(value)
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :Boolean
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else # model
184
+ # models (e.g. Pet) or oneOf
185
+ klass = KindeApi.const_get(type)
186
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.openapi_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ # Outputs non-array value in the form of hash
219
+ # For object, use to_hash. Otherwise, just return the value
220
+ # @param [Object] value Any valid value
221
+ # @return [Hash] Returns the value in the form of hash
222
+ def _to_hash(value)
223
+ if value.is_a?(Array)
224
+ value.compact.map { |v| _to_hash(v) }
225
+ elsif value.is_a?(Hash)
226
+ {}.tap do |hash|
227
+ value.each { |k, v| hash[k] = _to_hash(v) }
228
+ end
229
+ elsif value.respond_to? :to_hash
230
+ value.to_hash
231
+ else
232
+ value
233
+ end
234
+ end
235
+
236
+ end
237
+
238
+ end
@@ -216,5 +216,7 @@ module KindeApi
216
216
  value
217
217
  end
218
218
  end
219
+
219
220
  end
221
+
220
222
  end
@@ -235,5 +235,7 @@ module KindeApi
235
235
  value
236
236
  end
237
237
  end
238
+
238
239
  end
240
+
239
241
  end