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.
- checksums.yaml +4 -4
- data/README.md +103 -19
- data/kinde_api/README.md +58 -23
- data/kinde_api/docs/AddOrganizationUsersRequest.md +1 -1
- data/kinde_api/docs/AddOrganizationUsersRequestUsersInner.md +22 -0
- data/kinde_api/docs/{AddOrganizationUsers200Response.md → AddOrganizationUsersResponse.md} +2 -2
- data/kinde_api/docs/Application.md +20 -0
- data/kinde_api/docs/CallbacksApi.md +219 -0
- data/kinde_api/docs/ConnectedAppsApi.md +9 -9
- data/kinde_api/docs/CreateOrganizationRequest.md +11 -1
- data/kinde_api/docs/CreateOrganizationResponse.md +22 -0
- data/kinde_api/docs/CreateOrganizationResponseOrganization.md +18 -0
- data/kinde_api/docs/CreateOrganizationUserRoleRequest.md +18 -0
- data/kinde_api/docs/CreatePermissionRequest.md +22 -0
- data/kinde_api/docs/CreateRoleRequest.md +24 -0
- data/kinde_api/docs/CreateSubscriberSuccessResponse.md +18 -0
- data/kinde_api/docs/CreateSubscriberSuccessResponseSubscriber.md +18 -0
- data/kinde_api/docs/{CreateUser200Response.md → CreateUserResponse.md} +2 -2
- data/kinde_api/docs/EnvironmentsApi.md +71 -4
- data/kinde_api/docs/FeatureFlagsApi.md +9 -11
- data/kinde_api/docs/GetApplicationsResponse.md +24 -0
- data/kinde_api/docs/GetEnvironmentFeatureFlagsResponse.md +24 -0
- data/kinde_api/docs/GetOrganizationFeatureFlagsResponse.md +22 -0
- data/kinde_api/docs/GetOrganizationFeatureFlagsResponseFeatureFlagsValue.md +20 -0
- data/kinde_api/docs/{GetOrganizations200Response.md → GetOrganizationsResponse.md} +2 -2
- data/kinde_api/docs/GetOrganizationsUserRolesResponse.md +24 -0
- data/kinde_api/docs/{GetOrganizationUsers200Response.md → GetOrganizationsUsersResponse.md} +2 -2
- data/kinde_api/docs/GetRedirectCallbackUrlsResponse.md +18 -0
- data/kinde_api/docs/OrganizationUser.md +3 -1
- data/kinde_api/docs/OrganizationUserRole.md +22 -0
- data/kinde_api/docs/OrganizationsApi.md +494 -59
- data/kinde_api/docs/Permissions.md +22 -0
- data/kinde_api/docs/PermissionsApi.md +229 -0
- data/kinde_api/docs/RedirectCallbackUrls.md +18 -0
- data/kinde_api/docs/Roles.md +22 -0
- data/kinde_api/docs/RolesApi.md +229 -0
- data/kinde_api/docs/SubscribersApi.md +229 -0
- data/kinde_api/docs/UpdateOrganizationRequest.md +28 -0
- data/kinde_api/docs/UpdateOrganizationUsersRequest.md +18 -0
- data/kinde_api/docs/UpdateOrganizationUsersRequestUsersInner.md +24 -0
- data/kinde_api/docs/UpdateOrganizationUsersResponse.md +24 -0
- data/kinde_api/docs/UpdateUserRequest.md +3 -1
- data/kinde_api/docs/User.md +15 -1
- data/kinde_api/docs/UserIdentityResult.md +1 -3
- data/kinde_api/docs/UserProfile.md +3 -1
- data/kinde_api/docs/UserProfileV2.md +6 -2
- data/kinde_api/docs/UsersApi.md +31 -259
- data/kinde_api/docs/{GetUsers200Response.md → UsersResponse.md} +2 -2
- data/kinde_api/lib/kinde_api/api/callbacks_api.rb +221 -0
- data/kinde_api/lib/kinde_api/api/connected_apps_api.rb +8 -8
- data/kinde_api/lib/kinde_api/api/environments_api.rb +61 -4
- data/kinde_api/lib/kinde_api/api/feature_flags_api.rb +8 -15
- data/kinde_api/lib/kinde_api/api/organizations_api.rb +492 -57
- data/kinde_api/lib/kinde_api/api/permissions_api.rb +226 -0
- data/kinde_api/lib/kinde_api/api/roles_api.rb +226 -0
- data/kinde_api/lib/kinde_api/api/subscribers_api.rb +228 -0
- data/kinde_api/lib/kinde_api/api/users_api.rb +30 -233
- data/kinde_api/lib/kinde_api/api_client.rb +1 -13
- data/kinde_api/lib/kinde_api/configuration.rb +3 -77
- data/kinde_api/lib/kinde_api/models/add_organization_users_request.rb +2 -2
- data/kinde_api/lib/kinde_api/models/add_organization_users_request_users_inner.rb +242 -0
- data/kinde_api/lib/kinde_api/models/{add_organization_users200_response.rb → add_organization_users_response.rb} +3 -3
- data/kinde_api/lib/kinde_api/models/application.rb +226 -0
- data/kinde_api/lib/kinde_api/models/create_organization_request.rb +54 -4
- data/kinde_api/lib/kinde_api/models/{remove_organization_users200_response.rb → create_organization_response.rb} +19 -12
- data/kinde_api/lib/kinde_api/models/{create_organization201_response.rb → create_organization_response_organization.rb} +8 -18
- data/kinde_api/lib/kinde_api/models/create_organization_user_role_request.rb +218 -0
- data/kinde_api/lib/kinde_api/models/create_permission_request.rb +238 -0
- data/kinde_api/lib/kinde_api/models/create_role_request.rb +248 -0
- data/kinde_api/lib/kinde_api/models/create_subscriber_success_response.rb +217 -0
- data/kinde_api/lib/kinde_api/models/create_subscriber_success_response_subscriber.rb +218 -0
- data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner.rb +34 -0
- data/kinde_api/lib/kinde_api/models/{create_user200_response.rb → create_user_response.rb} +3 -3
- data/kinde_api/lib/kinde_api/models/get_applications_response.rb +249 -0
- data/kinde_api/lib/kinde_api/models/get_environment_feature_flags_response.rb +250 -0
- data/kinde_api/lib/kinde_api/models/get_organization_feature_flags_response.rb +240 -0
- data/kinde_api/lib/kinde_api/models/get_organization_feature_flags_response_feature_flags_value.rb +260 -0
- data/kinde_api/lib/kinde_api/models/{get_organizations200_response.rb → get_organizations_response.rb} +3 -3
- data/kinde_api/lib/kinde_api/models/get_organizations_user_roles_response.rb +249 -0
- data/kinde_api/lib/kinde_api/models/{get_organization_users200_response.rb → get_organizations_users_response.rb} +3 -3
- data/kinde_api/lib/kinde_api/models/get_redirect_callback_urls_response.rb +220 -0
- data/kinde_api/lib/kinde_api/models/organization_user.rb +15 -4
- data/kinde_api/lib/kinde_api/models/organization_user_role.rb +235 -0
- data/kinde_api/lib/kinde_api/models/permissions.rb +238 -0
- data/kinde_api/lib/kinde_api/models/redirect_callback_urls.rb +220 -0
- data/kinde_api/lib/kinde_api/models/roles.rb +238 -0
- data/kinde_api/lib/kinde_api/models/update_organization_request.rb +268 -0
- data/kinde_api/lib/kinde_api/models/{remove_organization_users_request.rb → update_organization_users_request.rb} +5 -5
- data/kinde_api/lib/kinde_api/models/update_organization_users_request_users_inner.rb +252 -0
- data/kinde_api/lib/kinde_api/models/update_organization_users_response.rb +250 -0
- data/kinde_api/lib/kinde_api/models/update_user_request.rb +14 -4
- data/kinde_api/lib/kinde_api/models/user.rb +79 -5
- data/kinde_api/lib/kinde_api/models/user_identity_result.rb +4 -14
- data/kinde_api/lib/kinde_api/models/user_profile.rb +14 -4
- data/kinde_api/lib/kinde_api/models/user_profile_v2.rb +25 -5
- data/kinde_api/lib/kinde_api/models/{get_users200_response.rb → users_response.rb} +3 -3
- data/kinde_api/lib/kinde_api.rb +32 -8
- data/kinde_api/spec/api/callbacks_api_spec.rb +73 -0
- data/kinde_api/spec/api/connected_apps_api_spec.rb +1 -1
- data/kinde_api/spec/api/environments_api_spec.rb +11 -0
- data/kinde_api/spec/api/feature_flags_api_spec.rb +1 -2
- data/kinde_api/spec/api/organizations_api_spec.rb +93 -14
- data/kinde_api/spec/api/permissions_api_spec.rb +74 -0
- data/kinde_api/spec/api/roles_api_spec.rb +74 -0
- data/kinde_api/spec/api/subscribers_api_spec.rb +76 -0
- data/kinde_api/spec/api/users_api_spec.rb +6 -47
- data/kinde_api/spec/api_client_spec.rb +0 -12
- data/kinde_api/spec/models/add_organization_users_request_users_inner_spec.rb +46 -0
- data/kinde_api/spec/models/{add_organization_users200_response_spec.rb → add_organization_users_response_spec.rb} +6 -6
- data/kinde_api/spec/models/{remove_organization_users200_response_spec.rb → application_spec.rb} +8 -8
- data/kinde_api/spec/models/create_organization_request_spec.rb +30 -0
- data/kinde_api/spec/models/create_organization_response_organization_spec.rb +34 -0
- data/kinde_api/spec/models/{create_organization201_response_spec.rb → create_organization_response_spec.rb} +13 -7
- data/kinde_api/spec/models/create_organization_user_role_request_spec.rb +34 -0
- data/kinde_api/spec/models/create_permission_request_spec.rb +46 -0
- data/kinde_api/spec/models/create_role_request_spec.rb +52 -0
- data/kinde_api/spec/models/create_subscriber_success_response_spec.rb +34 -0
- data/kinde_api/spec/models/create_subscriber_success_response_subscriber_spec.rb +34 -0
- data/kinde_api/spec/models/create_user_request_identities_inner_spec.rb +4 -0
- data/kinde_api/spec/models/{create_user200_response_spec.rb → create_user_response_spec.rb} +6 -6
- data/kinde_api/spec/models/get_applications_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_environment_feature_flags_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_organization_feature_flags_response_feature_flags_value_spec.rb +44 -0
- data/kinde_api/spec/models/get_organization_feature_flags_response_spec.rb +46 -0
- data/kinde_api/spec/models/{get_organizations200_response_spec.rb → get_organizations_response_spec.rb} +6 -6
- data/kinde_api/spec/models/get_organizations_user_roles_response_spec.rb +52 -0
- data/kinde_api/spec/models/{get_organization_users200_response_spec.rb → get_organizations_users_response_spec.rb} +6 -6
- data/kinde_api/spec/models/get_redirect_callback_urls_response_spec.rb +34 -0
- data/kinde_api/spec/models/organization_user_role_spec.rb +46 -0
- data/kinde_api/spec/models/organization_user_spec.rb +6 -0
- data/kinde_api/spec/models/permissions_spec.rb +46 -0
- data/kinde_api/spec/models/redirect_callback_urls_spec.rb +34 -0
- data/kinde_api/spec/models/roles_spec.rb +46 -0
- data/kinde_api/spec/models/update_organization_request_spec.rb +64 -0
- data/kinde_api/spec/models/{remove_organization_users_request_spec.rb → update_organization_users_request_spec.rb} +6 -6
- data/kinde_api/spec/models/update_organization_users_request_users_inner_spec.rb +52 -0
- data/kinde_api/spec/models/update_organization_users_response_spec.rb +52 -0
- data/kinde_api/spec/models/update_user_request_spec.rb +6 -0
- data/kinde_api/spec/models/user_identity_result_spec.rb +0 -6
- data/kinde_api/spec/models/user_profile_spec.rb +6 -0
- data/kinde_api/spec/models/user_profile_v2_spec.rb +12 -0
- data/kinde_api/spec/models/user_spec.rb +42 -0
- data/kinde_api/spec/models/{get_users200_response_spec.rb → users_response_spec.rb} +6 -6
- data/kinde_sdk.gemspec +1 -1
- data/lib/kinde_sdk/client/feature_flags.rb +64 -0
- data/lib/kinde_sdk/client/permissions.rb +20 -0
- data/lib/kinde_sdk/client.rb +33 -18
- data/lib/kinde_sdk/configuration.rb +0 -2
- data/lib/kinde_sdk/version.rb +1 -1
- data/lib/kinde_sdk.rb +27 -12
- data/spec/kinde_sdk_spec.rb +131 -5
- data/spec/spec_helper.rb +2 -0
- metadata +134 -36
- data/kinde_api/docs/CreateOrganization201Response.md +0 -20
- data/kinde_api/docs/RemoveOrganizationUsers200Response.md +0 -20
- data/kinde_api/docs/RemoveOrganizationUsersRequest.md +0 -18
@@ -19,78 +19,11 @@ module KindeApi
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
# Assign Users to an Organization
|
23
|
-
# Add existing users to an organization.
|
24
|
-
# @param [Hash] opts the optional parameters
|
25
|
-
# @option opts [String] :code The organization's code.
|
26
|
-
# @option opts [AddOrganizationUsersRequest] :add_organization_users_request
|
27
|
-
# @return [AddOrganizationUsers200Response]
|
28
|
-
def add_organization_users(opts = {})
|
29
|
-
data, _status_code, _headers = add_organization_users_with_http_info(opts)
|
30
|
-
data
|
31
|
-
end
|
32
|
-
|
33
|
-
# Assign Users to an Organization
|
34
|
-
# Add existing users to an organization.
|
35
|
-
# @param [Hash] opts the optional parameters
|
36
|
-
# @option opts [String] :code The organization's code.
|
37
|
-
# @option opts [AddOrganizationUsersRequest] :add_organization_users_request
|
38
|
-
# @return [Array<(AddOrganizationUsers200Response, Integer, Hash)>] AddOrganizationUsers200Response data, response status code and response headers
|
39
|
-
def add_organization_users_with_http_info(opts = {})
|
40
|
-
if @api_client.config.debugging
|
41
|
-
@api_client.config.logger.debug 'Calling API: UsersApi.add_organization_users ...'
|
42
|
-
end
|
43
|
-
# resource path
|
44
|
-
local_var_path = '/api/v1/organization/users'
|
45
|
-
|
46
|
-
# query parameters
|
47
|
-
query_params = opts[:query_params] || {}
|
48
|
-
query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
|
49
|
-
|
50
|
-
# header parameters
|
51
|
-
header_params = opts[:header_params] || {}
|
52
|
-
# HTTP header 'Accept' (if needed)
|
53
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
54
|
-
# HTTP header 'Content-Type'
|
55
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
56
|
-
if !content_type.nil?
|
57
|
-
header_params['Content-Type'] = content_type
|
58
|
-
end
|
59
|
-
|
60
|
-
# form parameters
|
61
|
-
form_params = opts[:form_params] || {}
|
62
|
-
|
63
|
-
# http body (model)
|
64
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'add_organization_users_request'])
|
65
|
-
|
66
|
-
# return_type
|
67
|
-
return_type = opts[:debug_return_type] || 'AddOrganizationUsers200Response'
|
68
|
-
|
69
|
-
# auth_names
|
70
|
-
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
71
|
-
|
72
|
-
new_options = opts.merge(
|
73
|
-
:operation => :"UsersApi.add_organization_users",
|
74
|
-
:header_params => header_params,
|
75
|
-
:query_params => query_params,
|
76
|
-
:form_params => form_params,
|
77
|
-
:body => post_body,
|
78
|
-
:auth_names => auth_names,
|
79
|
-
:return_type => return_type
|
80
|
-
)
|
81
|
-
|
82
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
83
|
-
if @api_client.config.debugging
|
84
|
-
@api_client.config.logger.debug "API called: UsersApi#add_organization_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
|
-
end
|
86
|
-
return data, status_code, headers
|
87
|
-
end
|
88
|
-
|
89
22
|
# Create User
|
90
23
|
# Creates a user record and optionally zero or more identities for the user. An example identity could be the email address of the user.
|
91
24
|
# @param [Hash] opts the optional parameters
|
92
25
|
# @option opts [CreateUserRequest] :create_user_request The details of the user to create.
|
93
|
-
# @return [
|
26
|
+
# @return [CreateUserResponse]
|
94
27
|
def create_user(opts = {})
|
95
28
|
data, _status_code, _headers = create_user_with_http_info(opts)
|
96
29
|
data
|
@@ -100,7 +33,7 @@ module KindeApi
|
|
100
33
|
# Creates a user record and optionally zero or more identities for the user. An example identity could be the email address of the user.
|
101
34
|
# @param [Hash] opts the optional parameters
|
102
35
|
# @option opts [CreateUserRequest] :create_user_request The details of the user to create.
|
103
|
-
# @return [Array<(
|
36
|
+
# @return [Array<(CreateUserResponse, Integer, Hash)>] CreateUserResponse data, response status code and response headers
|
104
37
|
def create_user_with_http_info(opts = {})
|
105
38
|
if @api_client.config.debugging
|
106
39
|
@api_client.config.logger.debug 'Calling API: UsersApi.create_user ...'
|
@@ -114,7 +47,7 @@ module KindeApi
|
|
114
47
|
# header parameters
|
115
48
|
header_params = opts[:header_params] || {}
|
116
49
|
# HTTP header 'Accept' (if needed)
|
117
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
118
51
|
# HTTP header 'Content-Type'
|
119
52
|
content_type = @api_client.select_header_content_type(['application/json'])
|
120
53
|
if !content_type.nil?
|
@@ -128,7 +61,7 @@ module KindeApi
|
|
128
61
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_user_request'])
|
129
62
|
|
130
63
|
# return_type
|
131
|
-
return_type = opts[:debug_return_type] || '
|
64
|
+
return_type = opts[:debug_return_type] || 'CreateUserResponse'
|
132
65
|
|
133
66
|
# auth_names
|
134
67
|
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
@@ -155,8 +88,8 @@ module KindeApi
|
|
155
88
|
# @param [Hash] opts the optional parameters
|
156
89
|
# @option opts [String] :id The user's id.
|
157
90
|
# @return [SuccessResponse]
|
158
|
-
def
|
159
|
-
data, _status_code, _headers =
|
91
|
+
def delete_user(opts = {})
|
92
|
+
data, _status_code, _headers = delete_user_with_http_info(opts)
|
160
93
|
data
|
161
94
|
end
|
162
95
|
|
@@ -165,9 +98,9 @@ module KindeApi
|
|
165
98
|
# @param [Hash] opts the optional parameters
|
166
99
|
# @option opts [String] :id The user's id.
|
167
100
|
# @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
|
168
|
-
def
|
101
|
+
def delete_user_with_http_info(opts = {})
|
169
102
|
if @api_client.config.debugging
|
170
|
-
@api_client.config.logger.debug 'Calling API: UsersApi.
|
103
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.delete_user ...'
|
171
104
|
end
|
172
105
|
# resource path
|
173
106
|
local_var_path = '/api/v1/user'
|
@@ -179,7 +112,7 @@ module KindeApi
|
|
179
112
|
# header parameters
|
180
113
|
header_params = opts[:header_params] || {}
|
181
114
|
# HTTP header 'Accept' (if needed)
|
182
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
115
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
183
116
|
|
184
117
|
# form parameters
|
185
118
|
form_params = opts[:form_params] || {}
|
@@ -194,7 +127,7 @@ module KindeApi
|
|
194
127
|
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
195
128
|
|
196
129
|
new_options = opts.merge(
|
197
|
-
:operation => :"UsersApi.
|
130
|
+
:operation => :"UsersApi.delete_user",
|
198
131
|
:header_params => header_params,
|
199
132
|
:query_params => query_params,
|
200
133
|
:form_params => form_params,
|
@@ -205,117 +138,45 @@ module KindeApi
|
|
205
138
|
|
206
139
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
207
140
|
if @api_client.config.debugging
|
208
|
-
@api_client.config.logger.debug "API called: UsersApi#
|
209
|
-
end
|
210
|
-
return data, status_code, headers
|
211
|
-
end
|
212
|
-
|
213
|
-
# List Organization Users
|
214
|
-
# Get users in an organization.
|
215
|
-
# @param [Hash] opts the optional parameters
|
216
|
-
# @option opts [String] :sort Field and order to sort the result by.
|
217
|
-
# @option opts [Integer] :page_size Number of results per page. Defaults to 10 if parameter not sent.
|
218
|
-
# @option opts [String] :next_token A string to get the next page of results if there are more results.
|
219
|
-
# @option opts [String] :code The organization's code.
|
220
|
-
# @option opts [String] :permissions Filter by user permissions
|
221
|
-
# @return [GetOrganizationUsers200Response]
|
222
|
-
def get_organization_users(opts = {})
|
223
|
-
data, _status_code, _headers = get_organization_users_with_http_info(opts)
|
224
|
-
data
|
225
|
-
end
|
226
|
-
|
227
|
-
# List Organization Users
|
228
|
-
# Get users in an organization.
|
229
|
-
# @param [Hash] opts the optional parameters
|
230
|
-
# @option opts [String] :sort Field and order to sort the result by.
|
231
|
-
# @option opts [Integer] :page_size Number of results per page. Defaults to 10 if parameter not sent.
|
232
|
-
# @option opts [String] :next_token A string to get the next page of results if there are more results.
|
233
|
-
# @option opts [String] :code The organization's code.
|
234
|
-
# @option opts [String] :permissions Filter by user permissions
|
235
|
-
# @return [Array<(GetOrganizationUsers200Response, Integer, Hash)>] GetOrganizationUsers200Response data, response status code and response headers
|
236
|
-
def get_organization_users_with_http_info(opts = {})
|
237
|
-
if @api_client.config.debugging
|
238
|
-
@api_client.config.logger.debug 'Calling API: UsersApi.get_organization_users ...'
|
239
|
-
end
|
240
|
-
allowable_values = ["name_asc", "name_desc", "email_asc", "email_desc"]
|
241
|
-
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
242
|
-
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
243
|
-
end
|
244
|
-
# resource path
|
245
|
-
local_var_path = '/api/v1/organization/users'
|
246
|
-
|
247
|
-
# query parameters
|
248
|
-
query_params = opts[:query_params] || {}
|
249
|
-
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
250
|
-
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
251
|
-
query_params[:'next_token'] = opts[:'next_token'] if !opts[:'next_token'].nil?
|
252
|
-
query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
|
253
|
-
query_params[:'permissions'] = opts[:'permissions'] if !opts[:'permissions'].nil?
|
254
|
-
|
255
|
-
# header parameters
|
256
|
-
header_params = opts[:header_params] || {}
|
257
|
-
# HTTP header 'Accept' (if needed)
|
258
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
259
|
-
|
260
|
-
# form parameters
|
261
|
-
form_params = opts[:form_params] || {}
|
262
|
-
|
263
|
-
# http body (model)
|
264
|
-
post_body = opts[:debug_body]
|
265
|
-
|
266
|
-
# return_type
|
267
|
-
return_type = opts[:debug_return_type] || 'GetOrganizationUsers200Response'
|
268
|
-
|
269
|
-
# auth_names
|
270
|
-
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
271
|
-
|
272
|
-
new_options = opts.merge(
|
273
|
-
:operation => :"UsersApi.get_organization_users",
|
274
|
-
:header_params => header_params,
|
275
|
-
:query_params => query_params,
|
276
|
-
:form_params => form_params,
|
277
|
-
:body => post_body,
|
278
|
-
:auth_names => auth_names,
|
279
|
-
:return_type => return_type
|
280
|
-
)
|
281
|
-
|
282
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
283
|
-
if @api_client.config.debugging
|
284
|
-
@api_client.config.logger.debug "API called: UsersApi#get_organization_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
141
|
+
@api_client.config.logger.debug "API called: UsersApi#delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
285
142
|
end
|
286
143
|
return data, status_code, headers
|
287
144
|
end
|
288
145
|
|
289
146
|
# Get User
|
290
147
|
# Retrieve a user record.
|
148
|
+
# @param id [String] The user's id.
|
291
149
|
# @param [Hash] opts the optional parameters
|
292
|
-
# @option opts [String] :id The user's id.
|
293
150
|
# @return [User]
|
294
|
-
def get_user_data(opts = {})
|
295
|
-
data, _status_code, _headers = get_user_data_with_http_info(opts)
|
151
|
+
def get_user_data(id, opts = {})
|
152
|
+
data, _status_code, _headers = get_user_data_with_http_info(id, opts)
|
296
153
|
data
|
297
154
|
end
|
298
155
|
|
299
156
|
# Get User
|
300
157
|
# Retrieve a user record.
|
158
|
+
# @param id [String] The user's id.
|
301
159
|
# @param [Hash] opts the optional parameters
|
302
|
-
# @option opts [String] :id The user's id.
|
303
160
|
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
304
|
-
def get_user_data_with_http_info(opts = {})
|
161
|
+
def get_user_data_with_http_info(id, opts = {})
|
305
162
|
if @api_client.config.debugging
|
306
163
|
@api_client.config.logger.debug 'Calling API: UsersApi.get_user_data ...'
|
307
164
|
end
|
165
|
+
# verify the required parameter 'id' is set
|
166
|
+
if @api_client.config.client_side_validation && id.nil?
|
167
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.get_user_data"
|
168
|
+
end
|
308
169
|
# resource path
|
309
170
|
local_var_path = '/api/v1/user'
|
310
171
|
|
311
172
|
# query parameters
|
312
173
|
query_params = opts[:query_params] || {}
|
313
|
-
query_params[:'id'] =
|
174
|
+
query_params[:'id'] = id
|
314
175
|
|
315
176
|
# header parameters
|
316
177
|
header_params = opts[:header_params] || {}
|
317
178
|
# HTTP header 'Accept' (if needed)
|
318
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
179
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
319
180
|
|
320
181
|
# form parameters
|
321
182
|
form_params = opts[:form_params] || {}
|
@@ -353,7 +214,8 @@ module KindeApi
|
|
353
214
|
# @option opts [Integer] :page_size Number of results per page. Defaults to 10 if parameter not sent.
|
354
215
|
# @option opts [String] :user_id ID of the user to filter by.
|
355
216
|
# @option opts [String] :next_token A string to get the next page of results if there are more results.
|
356
|
-
# @
|
217
|
+
# @option opts [String] :email Filter the results by email address. The query string should be comma separated and url encoded.
|
218
|
+
# @return [UsersResponse]
|
357
219
|
def get_users(opts = {})
|
358
220
|
data, _status_code, _headers = get_users_with_http_info(opts)
|
359
221
|
data
|
@@ -366,7 +228,8 @@ module KindeApi
|
|
366
228
|
# @option opts [Integer] :page_size Number of results per page. Defaults to 10 if parameter not sent.
|
367
229
|
# @option opts [String] :user_id ID of the user to filter by.
|
368
230
|
# @option opts [String] :next_token A string to get the next page of results if there are more results.
|
369
|
-
# @
|
231
|
+
# @option opts [String] :email Filter the results by email address. The query string should be comma separated and url encoded.
|
232
|
+
# @return [Array<(UsersResponse, Integer, Hash)>] UsersResponse data, response status code and response headers
|
370
233
|
def get_users_with_http_info(opts = {})
|
371
234
|
if @api_client.config.debugging
|
372
235
|
@api_client.config.logger.debug 'Calling API: UsersApi.get_users ...'
|
@@ -384,11 +247,12 @@ module KindeApi
|
|
384
247
|
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
385
248
|
query_params[:'user_id'] = opts[:'user_id'] if !opts[:'user_id'].nil?
|
386
249
|
query_params[:'next_token'] = opts[:'next_token'] if !opts[:'next_token'].nil?
|
250
|
+
query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
|
387
251
|
|
388
252
|
# header parameters
|
389
253
|
header_params = opts[:header_params] || {}
|
390
254
|
# HTTP header 'Accept' (if needed)
|
391
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
255
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
392
256
|
|
393
257
|
# form parameters
|
394
258
|
form_params = opts[:form_params] || {}
|
@@ -397,7 +261,7 @@ module KindeApi
|
|
397
261
|
post_body = opts[:debug_body]
|
398
262
|
|
399
263
|
# return_type
|
400
|
-
return_type = opts[:debug_return_type] || '
|
264
|
+
return_type = opts[:debug_return_type] || 'UsersResponse'
|
401
265
|
|
402
266
|
# auth_names
|
403
267
|
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
@@ -419,73 +283,6 @@ module KindeApi
|
|
419
283
|
return data, status_code, headers
|
420
284
|
end
|
421
285
|
|
422
|
-
# Remove Users from an Organization
|
423
|
-
# Remove existing users from an organization.
|
424
|
-
# @param [Hash] opts the optional parameters
|
425
|
-
# @option opts [String] :code The organization's code.
|
426
|
-
# @option opts [RemoveOrganizationUsersRequest] :remove_organization_users_request
|
427
|
-
# @return [RemoveOrganizationUsers200Response]
|
428
|
-
def remove_organization_users(opts = {})
|
429
|
-
data, _status_code, _headers = remove_organization_users_with_http_info(opts)
|
430
|
-
data
|
431
|
-
end
|
432
|
-
|
433
|
-
# Remove Users from an Organization
|
434
|
-
# Remove existing users from an organization.
|
435
|
-
# @param [Hash] opts the optional parameters
|
436
|
-
# @option opts [String] :code The organization's code.
|
437
|
-
# @option opts [RemoveOrganizationUsersRequest] :remove_organization_users_request
|
438
|
-
# @return [Array<(RemoveOrganizationUsers200Response, Integer, Hash)>] RemoveOrganizationUsers200Response data, response status code and response headers
|
439
|
-
def remove_organization_users_with_http_info(opts = {})
|
440
|
-
if @api_client.config.debugging
|
441
|
-
@api_client.config.logger.debug 'Calling API: UsersApi.remove_organization_users ...'
|
442
|
-
end
|
443
|
-
# resource path
|
444
|
-
local_var_path = '/api/v1/organization/users'
|
445
|
-
|
446
|
-
# query parameters
|
447
|
-
query_params = opts[:query_params] || {}
|
448
|
-
query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
|
449
|
-
|
450
|
-
# header parameters
|
451
|
-
header_params = opts[:header_params] || {}
|
452
|
-
# HTTP header 'Accept' (if needed)
|
453
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
454
|
-
# HTTP header 'Content-Type'
|
455
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
456
|
-
if !content_type.nil?
|
457
|
-
header_params['Content-Type'] = content_type
|
458
|
-
end
|
459
|
-
|
460
|
-
# form parameters
|
461
|
-
form_params = opts[:form_params] || {}
|
462
|
-
|
463
|
-
# http body (model)
|
464
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'remove_organization_users_request'])
|
465
|
-
|
466
|
-
# return_type
|
467
|
-
return_type = opts[:debug_return_type] || 'RemoveOrganizationUsers200Response'
|
468
|
-
|
469
|
-
# auth_names
|
470
|
-
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
471
|
-
|
472
|
-
new_options = opts.merge(
|
473
|
-
:operation => :"UsersApi.remove_organization_users",
|
474
|
-
:header_params => header_params,
|
475
|
-
:query_params => query_params,
|
476
|
-
:form_params => form_params,
|
477
|
-
:body => post_body,
|
478
|
-
:auth_names => auth_names,
|
479
|
-
:return_type => return_type
|
480
|
-
)
|
481
|
-
|
482
|
-
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
483
|
-
if @api_client.config.debugging
|
484
|
-
@api_client.config.logger.debug "API called: UsersApi#remove_organization_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
485
|
-
end
|
486
|
-
return data, status_code, headers
|
487
|
-
end
|
488
|
-
|
489
286
|
# Update User
|
490
287
|
# Update a user record.
|
491
288
|
# @param update_user_request [UpdateUserRequest] The user to update.
|
@@ -521,7 +318,7 @@ module KindeApi
|
|
521
318
|
# header parameters
|
522
319
|
header_params = opts[:header_params] || {}
|
523
320
|
# HTTP header 'Accept' (if needed)
|
524
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
321
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
525
322
|
# HTTP header 'Content-Type'
|
526
323
|
content_type = @api_client.select_header_content_type(['application/json'])
|
527
324
|
if !content_type.nil?
|
@@ -1,15 +1,3 @@
|
|
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
1
|
require 'date'
|
14
2
|
require 'json'
|
15
3
|
require 'logger'
|
@@ -300,7 +288,7 @@ module KindeApi
|
|
300
288
|
def build_request_url(path, opts = {})
|
301
289
|
# Add leading and trailing slashes to path
|
302
290
|
path = "/#{path}".gsub(/\/+/, '/')
|
303
|
-
@config.base_url
|
291
|
+
@config.base_url + path
|
304
292
|
end
|
305
293
|
|
306
294
|
# Update header and query params based on authentication settings.
|
@@ -21,18 +21,6 @@ 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
|
-
|
36
24
|
# Defines API keys used with API Key authentications.
|
37
25
|
#
|
38
26
|
# @return [Hash] key: parameter name, value: parameter value (API key)
|
@@ -138,7 +126,6 @@ module KindeApi
|
|
138
126
|
# https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
|
139
127
|
attr_accessor :params_encoding
|
140
128
|
|
141
|
-
|
142
129
|
attr_accessor :inject_format
|
143
130
|
|
144
131
|
attr_accessor :force_ending_format
|
@@ -147,10 +134,6 @@ module KindeApi
|
|
147
134
|
@scheme = 'https'
|
148
135
|
@host = 'app.kinde.com'
|
149
136
|
@base_path = ''
|
150
|
-
@server_index = 0
|
151
|
-
@server_operation_index = {}
|
152
|
-
@server_variables = {}
|
153
|
-
@server_operation_variables = {}
|
154
137
|
@api_key = {}
|
155
138
|
@api_key_prefix = {}
|
156
139
|
@client_side_validation = true
|
@@ -194,11 +177,8 @@ module KindeApi
|
|
194
177
|
end
|
195
178
|
|
196
179
|
# Returns base URL for specified operation based on server settings
|
197
|
-
def base_url
|
198
|
-
|
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])
|
180
|
+
def base_url
|
181
|
+
"#{scheme}://#{host}"
|
202
182
|
end
|
203
183
|
|
204
184
|
# Gets API key (with prefix if set).
|
@@ -234,62 +214,8 @@ module KindeApi
|
|
234
214
|
format: 'JWT',
|
235
215
|
key: 'Authorization',
|
236
216
|
value: "Bearer #{access_token_with_refresh}"
|
237
|
-
}
|
217
|
+
}
|
238
218
|
}
|
239
219
|
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
|
-
{}
|
259
|
-
end
|
260
|
-
|
261
|
-
# Returns URL based on server settings
|
262
|
-
#
|
263
|
-
# @param index array index of the server settings
|
264
|
-
# @param variables hash of variable and the corresponding value
|
265
|
-
def server_url(index, variables = {}, servers = nil)
|
266
|
-
servers = server_settings if servers == nil
|
267
|
-
|
268
|
-
# check array index out of bound
|
269
|
-
if (index < 0 || index >= servers.size)
|
270
|
-
fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
|
271
|
-
end
|
272
|
-
|
273
|
-
server = servers[index]
|
274
|
-
url = server[:url]
|
275
|
-
|
276
|
-
return url unless server.key? :variables
|
277
|
-
|
278
|
-
# go through variable and assign a value
|
279
|
-
server[:variables].each do |name, variable|
|
280
|
-
if variables.key?(name)
|
281
|
-
if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name]))
|
282
|
-
url.gsub! "{" + name.to_s + "}", variables[name]
|
283
|
-
else
|
284
|
-
fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
|
285
|
-
end
|
286
|
-
else
|
287
|
-
# use default value
|
288
|
-
url.gsub! "{" + name.to_s + "}", server[:variables][name][:default_value]
|
289
|
-
end
|
290
|
-
end
|
291
|
-
|
292
|
-
url
|
293
|
-
end
|
294
220
|
end
|
295
221
|
end
|
@@ -15,7 +15,7 @@ require 'time'
|
|
15
15
|
|
16
16
|
module KindeApi
|
17
17
|
class AddOrganizationUsersRequest
|
18
|
-
#
|
18
|
+
# Users to be added to the organization.
|
19
19
|
attr_accessor :users
|
20
20
|
|
21
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -33,7 +33,7 @@ module KindeApi
|
|
33
33
|
# Attribute type mapping.
|
34
34
|
def self.openapi_types
|
35
35
|
{
|
36
|
-
:'users' => :'Array<
|
36
|
+
:'users' => :'Array<AddOrganizationUsersRequestUsersInner>'
|
37
37
|
}
|
38
38
|
end
|
39
39
|
|