kinde_sdk 1.2.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/kinde_api/README.md +3 -1
- data/kinde_api/docs/ConnectedAppsApi.md +12 -6
- data/kinde_api/docs/CreateOrganizationRequest.md +14 -2
- data/kinde_api/docs/CreateUserRequest.md +2 -0
- data/kinde_api/docs/OrganizationsApi.md +6 -8
- data/kinde_api/docs/Permissions.md +3 -1
- data/kinde_api/docs/RolesApi.md +2 -2
- data/kinde_api/docs/UpdateOrganizationRequest.md +13 -1
- data/kinde_api/docs/UsersApi.md +80 -10
- data/kinde_api/lib/kinde_api/api/apis_api.rb +95 -96
- data/kinde_api/lib/kinde_api/api/applications_api.rb +95 -85
- data/kinde_api/lib/kinde_api/api/business_api.rb +58 -56
- data/kinde_api/lib/kinde_api/api/callbacks_api.rb +164 -144
- data/kinde_api/lib/kinde_api/api/connected_apps_api.rb +66 -54
- data/kinde_api/lib/kinde_api/api/environments_api.rb +71 -58
- data/kinde_api/lib/kinde_api/api/feature_flags_api.rb +82 -62
- data/kinde_api/lib/kinde_api/api/industries_api.rb +22 -23
- data/kinde_api/lib/kinde_api/api/o_auth_api.rb +63 -72
- data/kinde_api/lib/kinde_api/api/organizations_api.rb +376 -287
- data/kinde_api/lib/kinde_api/api/permissions_api.rb +72 -68
- data/kinde_api/lib/kinde_api/api/roles_api.rb +137 -134
- data/kinde_api/lib/kinde_api/api/subscribers_api.rb +58 -57
- data/kinde_api/lib/kinde_api/api/timezones_api.rb +22 -23
- data/kinde_api/lib/kinde_api/api/users_api.rb +204 -128
- data/kinde_api/lib/kinde_api/api_client.rb +68 -79
- data/kinde_api/lib/kinde_api/api_error.rb +16 -16
- data/kinde_api/lib/kinde_api/configuration.rb +23 -100
- data/kinde_api/lib/kinde_api/models/add_apis_request.rb +49 -52
- data/kinde_api/lib/kinde_api/models/add_organization_users_request.rb +42 -40
- data/kinde_api/lib/kinde_api/models/add_organization_users_request_users_inner.rb +51 -53
- data/kinde_api/lib/kinde_api/models/add_organization_users_response.rb +50 -52
- data/kinde_api/lib/kinde_api/models/api.rb +61 -70
- data/kinde_api/lib/kinde_api/models/api_applications_inner.rb +54 -63
- data/kinde_api/lib/kinde_api/models/api_result.rb +40 -38
- data/kinde_api/lib/kinde_api/models/apis.rb +52 -56
- data/kinde_api/lib/kinde_api/models/applications.rb +50 -55
- data/kinde_api/lib/kinde_api/models/connected_apps_access_token.rb +45 -44
- data/kinde_api/lib/kinde_api/models/connected_apps_auth_url.rb +45 -44
- data/kinde_api/lib/kinde_api/models/create_application_request.rb +51 -49
- data/kinde_api/lib/kinde_api/models/create_application_response.rb +49 -50
- data/kinde_api/lib/kinde_api/models/create_application_response_application.rb +49 -50
- data/kinde_api/lib/kinde_api/models/create_feature_flag_request.rb +77 -87
- data/kinde_api/lib/kinde_api/models/create_organization_request.rb +125 -83
- data/kinde_api/lib/kinde_api/models/create_organization_response.rb +50 -55
- data/kinde_api/lib/kinde_api/models/create_organization_response_organization.rb +41 -38
- data/kinde_api/lib/kinde_api/models/create_organization_user_permission_request.rb +41 -38
- data/kinde_api/lib/kinde_api/models/create_organization_user_role_request.rb +41 -38
- data/kinde_api/lib/kinde_api/models/create_permission_request.rb +49 -50
- data/kinde_api/lib/kinde_api/models/create_role_request.rb +53 -56
- data/kinde_api/lib/kinde_api/models/create_subscriber_success_response.rb +41 -38
- data/kinde_api/lib/kinde_api/models/create_subscriber_success_response_subscriber.rb +41 -38
- data/kinde_api/lib/kinde_api/models/create_user_request.rb +55 -47
- data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner.rb +51 -49
- data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner_details.rb +41 -38
- data/kinde_api/lib/kinde_api/models/create_user_request_profile.rb +45 -44
- data/kinde_api/lib/kinde_api/models/create_user_response.rb +50 -52
- data/kinde_api/lib/kinde_api/models/error.rb +44 -44
- data/kinde_api/lib/kinde_api/models/error_response.rb +42 -40
- data/kinde_api/lib/kinde_api/models/get_application_response.rb +49 -50
- data/kinde_api/lib/kinde_api/models/get_application_response_application.rb +57 -62
- data/kinde_api/lib/kinde_api/models/get_applications_response.rb +54 -57
- data/kinde_api/lib/kinde_api/models/get_environment_feature_flags_response.rb +54 -57
- data/kinde_api/lib/kinde_api/models/get_organization_feature_flags_response.rb +50 -52
- data/kinde_api/lib/kinde_api/models/get_organization_feature_flags_response_feature_flags_value.rb +52 -52
- data/kinde_api/lib/kinde_api/models/get_organization_users_response.rb +54 -57
- data/kinde_api/lib/kinde_api/models/get_organizations_response.rb +54 -57
- data/kinde_api/lib/kinde_api/models/get_organizations_user_permissions_response.rb +50 -52
- data/kinde_api/lib/kinde_api/models/get_organizations_user_roles_response.rb +54 -57
- data/kinde_api/lib/kinde_api/models/get_permissions_response.rb +54 -57
- data/kinde_api/lib/kinde_api/models/get_redirect_callback_urls_response.rb +42 -40
- data/kinde_api/lib/kinde_api/models/get_roles_response.rb +54 -57
- data/kinde_api/lib/kinde_api/models/get_subscriber_response.rb +50 -52
- data/kinde_api/lib/kinde_api/models/get_subscribers_response.rb +54 -57
- data/kinde_api/lib/kinde_api/models/logout_redirect_urls.rb +42 -40
- data/kinde_api/lib/kinde_api/models/organization.rb +54 -63
- data/kinde_api/lib/kinde_api/models/organization_user.rb +63 -81
- data/kinde_api/lib/kinde_api/models/organization_user_permission.rb +59 -73
- data/kinde_api/lib/kinde_api/models/organization_user_permission_roles_inner.rb +46 -47
- data/kinde_api/lib/kinde_api/models/organization_user_role.rb +50 -55
- data/kinde_api/lib/kinde_api/models/organization_user_role_permissions.rb +50 -55
- data/kinde_api/lib/kinde_api/models/organization_user_role_permissions_permissions.rb +41 -38
- data/kinde_api/lib/kinde_api/models/permissions.rb +59 -52
- data/kinde_api/lib/kinde_api/models/redirect_callback_urls.rb +42 -40
- data/kinde_api/lib/kinde_api/models/replace_logout_redirect_urls_request.rb +42 -40
- data/kinde_api/lib/kinde_api/models/replace_redirect_callback_urls_request.rb +42 -40
- data/kinde_api/lib/kinde_api/models/role.rb +53 -63
- data/kinde_api/lib/kinde_api/models/roles.rb +52 -56
- data/kinde_api/lib/kinde_api/models/roles_permission_response_inner.rb +54 -63
- data/kinde_api/lib/kinde_api/models/subscriber.rb +54 -63
- data/kinde_api/lib/kinde_api/models/subscribers_subscriber.rb +58 -71
- data/kinde_api/lib/kinde_api/models/success_response.rb +46 -47
- data/kinde_api/lib/kinde_api/models/token_error_response.rb +45 -44
- data/kinde_api/lib/kinde_api/models/token_introspect.rb +58 -63
- data/kinde_api/lib/kinde_api/models/update_api_applications_request.rb +44 -42
- data/kinde_api/lib/kinde_api/models/update_api_applications_request_applications_inner.rb +47 -46
- data/kinde_api/lib/kinde_api/models/update_application_request.rb +55 -59
- data/kinde_api/lib/kinde_api/models/update_environement_feature_flag_override_request.rb +43 -40
- data/kinde_api/lib/kinde_api/models/update_organization_request.rb +115 -75
- data/kinde_api/lib/kinde_api/models/update_organization_users_request.rb +42 -40
- data/kinde_api/lib/kinde_api/models/update_organization_users_request_users_inner.rb +55 -59
- data/kinde_api/lib/kinde_api/models/update_organization_users_response.rb +57 -67
- data/kinde_api/lib/kinde_api/models/update_role_permissions_request.rb +42 -40
- data/kinde_api/lib/kinde_api/models/update_role_permissions_request_permissions_inner.rb +45 -44
- data/kinde_api/lib/kinde_api/models/update_role_permissions_response.rb +56 -66
- data/kinde_api/lib/kinde_api/models/update_roles_request.rb +56 -61
- data/kinde_api/lib/kinde_api/models/update_user_request.rb +53 -56
- data/kinde_api/lib/kinde_api/models/update_user_response.rb +66 -73
- data/kinde_api/lib/kinde_api/models/user.rb +97 -118
- data/kinde_api/lib/kinde_api/models/user_identities_inner.rb +46 -47
- data/kinde_api/lib/kinde_api/models/user_identity.rb +45 -44
- data/kinde_api/lib/kinde_api/models/user_identity_result.rb +41 -38
- data/kinde_api/lib/kinde_api/models/user_profile.rb +62 -68
- data/kinde_api/lib/kinde_api/models/user_profile_v2.rb +74 -86
- data/kinde_api/lib/kinde_api/models/users_response.rb +54 -57
- data/kinde_api/lib/kinde_api/models/users_response_users_inner.rb +98 -118
- data/kinde_api/lib/kinde_api/version.rb +11 -11
- data/kinde_api/lib/kinde_api.rb +30 -20
- data/kinde_api/spec/api/apis_api_spec.rb +20 -21
- data/kinde_api/spec/api/applications_api_spec.rb +18 -19
- data/kinde_api/spec/api/business_api_spec.rb +12 -13
- data/kinde_api/spec/api/callbacks_api_spec.rb +27 -28
- data/kinde_api/spec/api/connected_apps_api_spec.rb +16 -15
- data/kinde_api/spec/api/environments_api_spec.rb +14 -15
- data/kinde_api/spec/api/feature_flags_api_spec.rb +13 -14
- data/kinde_api/spec/api/industries_api_spec.rb +12 -13
- data/kinde_api/spec/api/o_auth_api_spec.rb +16 -17
- data/kinde_api/spec/api/organizations_api_spec.rb +34 -35
- data/kinde_api/spec/api/permissions_api_spec.rb +15 -16
- data/kinde_api/spec/api/roles_api_spec.rb +20 -21
- data/kinde_api/spec/api/subscribers_api_spec.rb +15 -16
- data/kinde_api/spec/api/timezones_api_spec.rb +12 -13
- data/kinde_api/spec/api/users_api_spec.rb +36 -24
- data/kinde_api/spec/api_client_spec.rb +21 -27
- data/kinde_api/spec/configuration_spec.rb +11 -11
- data/kinde_api/spec/models/add_apis_request_spec.rb +13 -14
- data/kinde_api/spec/models/add_organization_users_request_spec.rb +11 -12
- data/kinde_api/spec/models/add_organization_users_request_users_inner_spec.rb +14 -15
- data/kinde_api/spec/models/add_organization_users_response_spec.rb +14 -15
- data/kinde_api/spec/models/api_applications_inner_spec.rb +15 -16
- data/kinde_api/spec/models/api_result_spec.rb +11 -12
- data/kinde_api/spec/models/api_spec.rb +17 -18
- data/kinde_api/spec/models/apis_spec.rb +15 -16
- data/kinde_api/spec/models/applications_spec.rb +14 -15
- data/kinde_api/spec/models/connected_apps_access_token_spec.rb +13 -14
- data/kinde_api/spec/models/connected_apps_auth_url_spec.rb +13 -14
- data/kinde_api/spec/models/create_application_request_spec.rb +13 -14
- data/kinde_api/spec/models/create_application_response_application_spec.rb +14 -15
- data/kinde_api/spec/models/create_application_response_spec.rb +14 -15
- data/kinde_api/spec/models/create_feature_flag_request_spec.rb +17 -18
- data/kinde_api/spec/models/create_organization_request_spec.rb +53 -18
- data/kinde_api/spec/models/create_organization_response_organization_spec.rb +11 -12
- data/kinde_api/spec/models/create_organization_response_spec.rb +14 -15
- data/kinde_api/spec/models/create_organization_user_permission_request_spec.rb +11 -12
- data/kinde_api/spec/models/create_organization_user_role_request_spec.rb +11 -12
- data/kinde_api/spec/models/create_permission_request_spec.rb +14 -15
- data/kinde_api/spec/models/create_role_request_spec.rb +15 -16
- data/kinde_api/spec/models/create_subscriber_success_response_spec.rb +11 -12
- data/kinde_api/spec/models/create_subscriber_success_response_subscriber_spec.rb +11 -12
- data/kinde_api/spec/models/create_user_request_identities_inner_details_spec.rb +11 -12
- data/kinde_api/spec/models/create_user_request_identities_inner_spec.rb +13 -14
- data/kinde_api/spec/models/create_user_request_profile_spec.rb +13 -14
- data/kinde_api/spec/models/create_user_request_spec.rb +19 -14
- data/kinde_api/spec/models/create_user_response_spec.rb +14 -15
- data/kinde_api/spec/models/error_response_spec.rb +11 -12
- data/kinde_api/spec/models/error_spec.rb +13 -14
- data/kinde_api/spec/models/get_application_response_application_spec.rb +16 -17
- data/kinde_api/spec/models/get_application_response_spec.rb +14 -15
- data/kinde_api/spec/models/get_applications_response_spec.rb +15 -16
- data/kinde_api/spec/models/get_environment_feature_flags_response_spec.rb +15 -16
- data/kinde_api/spec/models/get_organization_feature_flags_response_feature_flags_value_spec.rb +13 -14
- data/kinde_api/spec/models/get_organization_feature_flags_response_spec.rb +14 -15
- data/kinde_api/spec/models/get_organization_users_response_spec.rb +15 -16
- data/kinde_api/spec/models/get_organizations_response_spec.rb +15 -16
- data/kinde_api/spec/models/get_organizations_user_permissions_response_spec.rb +14 -15
- data/kinde_api/spec/models/get_organizations_user_roles_response_spec.rb +15 -16
- data/kinde_api/spec/models/get_permissions_response_spec.rb +15 -16
- data/kinde_api/spec/models/get_redirect_callback_urls_response_spec.rb +11 -12
- data/kinde_api/spec/models/get_roles_response_spec.rb +15 -16
- data/kinde_api/spec/models/get_subscriber_response_spec.rb +14 -15
- data/kinde_api/spec/models/get_subscribers_response_spec.rb +15 -16
- data/kinde_api/spec/models/logout_redirect_urls_spec.rb +11 -12
- data/kinde_api/spec/models/organization_spec.rb +15 -16
- data/kinde_api/spec/models/organization_user_permission_roles_inner_spec.rb +13 -14
- data/kinde_api/spec/models/organization_user_permission_spec.rb +16 -17
- data/kinde_api/spec/models/organization_user_role_permissions_permissions_spec.rb +11 -12
- data/kinde_api/spec/models/organization_user_role_permissions_spec.rb +14 -15
- data/kinde_api/spec/models/organization_user_role_spec.rb +14 -15
- data/kinde_api/spec/models/organization_user_spec.rb +17 -18
- data/kinde_api/spec/models/permissions_spec.rb +20 -15
- data/kinde_api/spec/models/redirect_callback_urls_spec.rb +11 -12
- data/kinde_api/spec/models/replace_logout_redirect_urls_request_spec.rb +11 -12
- data/kinde_api/spec/models/replace_redirect_callback_urls_request_spec.rb +11 -12
- data/kinde_api/spec/models/role_spec.rb +15 -16
- data/kinde_api/spec/models/roles_permission_response_inner_spec.rb +15 -16
- data/kinde_api/spec/models/roles_spec.rb +15 -16
- data/kinde_api/spec/models/subscriber_spec.rb +15 -16
- data/kinde_api/spec/models/subscribers_subscriber_spec.rb +16 -17
- data/kinde_api/spec/models/success_response_spec.rb +13 -14
- data/kinde_api/spec/models/token_error_response_spec.rb +13 -14
- data/kinde_api/spec/models/token_introspect_spec.rb +16 -17
- data/kinde_api/spec/models/update_api_applications_request_applications_inner_spec.rb +13 -14
- data/kinde_api/spec/models/update_api_applications_request_spec.rb +11 -12
- data/kinde_api/spec/models/update_application_request_spec.rb +15 -16
- data/kinde_api/spec/models/update_environement_feature_flag_override_request_spec.rb +11 -12
- data/kinde_api/spec/models/update_organization_request_spec.rb +52 -17
- data/kinde_api/spec/models/update_organization_users_request_spec.rb +11 -12
- data/kinde_api/spec/models/update_organization_users_request_users_inner_spec.rb +15 -16
- data/kinde_api/spec/models/update_organization_users_response_spec.rb +15 -16
- data/kinde_api/spec/models/update_role_permissions_request_permissions_inner_spec.rb +13 -14
- data/kinde_api/spec/models/update_role_permissions_request_spec.rb +11 -12
- data/kinde_api/spec/models/update_role_permissions_response_spec.rb +15 -16
- data/kinde_api/spec/models/update_roles_request_spec.rb +15 -16
- data/kinde_api/spec/models/update_user_request_spec.rb +15 -16
- data/kinde_api/spec/models/update_user_response_spec.rb +17 -18
- data/kinde_api/spec/models/user_identities_inner_spec.rb +13 -14
- data/kinde_api/spec/models/user_identity_result_spec.rb +11 -12
- data/kinde_api/spec/models/user_identity_spec.rb +13 -14
- data/kinde_api/spec/models/user_profile_spec.rb +17 -18
- data/kinde_api/spec/models/user_profile_v2_spec.rb +19 -20
- data/kinde_api/spec/models/user_spec.rb +24 -25
- data/kinde_api/spec/models/users_response_spec.rb +15 -16
- data/kinde_api/spec/models/users_response_users_inner_spec.rb +24 -25
- data/kinde_api/spec/spec_helper.rb +61 -63
- data/lib/kinde_sdk/configuration.rb +1 -1
- data/lib/kinde_sdk/version.rb +1 -1
- data/lib/kinde_sdk.rb +63 -16
- metadata +85 -94
- data/Gemfile +0 -15
- data/Gemfile.lock +0 -128
- data/LICENSE +0 -21
- data/README.md +0 -23
- data/Rakefile +0 -10
- data/kinde_api/.gitignore +0 -39
- data/kinde_api/.rspec +0 -2
- data/kinde_sdk.gemspec +0 -33
- data/openapitools.json +0 -7
@@ -1,14 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
#
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# #Kinde Management API
|
4
|
+
#
|
5
|
+
# Provides endpoints to manage your Kinde Businesses
|
6
|
+
#
|
7
|
+
# The version of the OpenAPI document: 1
|
8
|
+
# Contact: support@kinde.com
|
9
|
+
# Generated by: https://openapi-generator.tech
|
10
|
+
# OpenAPI Generator version: 7.0.0-SNAPSHOT
|
11
|
+
#
|
12
12
|
|
13
13
|
require 'cgi'
|
14
14
|
|
@@ -19,6 +19,7 @@ module KindeApi
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
|
22
23
|
# Create Role
|
23
24
|
# Create role.
|
24
25
|
# @param [Hash] opts the optional parameters
|
@@ -35,11 +36,9 @@ module KindeApi
|
|
35
36
|
# @option opts [CreateRoleRequest] :create_role_request Role details.
|
36
37
|
# @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
|
37
38
|
def create_role_with_http_info(opts = {})
|
38
|
-
if @api_client.config.debugging
|
39
|
-
@api_client.config.logger.debug 'Calling API: RolesApi.create_role ...'
|
40
|
-
end
|
39
|
+
@api_client.config.logger.debug 'Calling API: RolesApi.create_role ...' if @api_client.config.debugging
|
41
40
|
# resource path
|
42
|
-
local_var_path = '/api/v1/
|
41
|
+
local_var_path = '/api/v1/roles'
|
43
42
|
|
44
43
|
# query parameters
|
45
44
|
query_params = opts[:query_params] || {}
|
@@ -47,18 +46,17 @@ module KindeApi
|
|
47
46
|
# header parameters
|
48
47
|
header_params = opts[:header_params] || {}
|
49
48
|
# HTTP header 'Accept' (if needed)
|
50
|
-
header_params['Accept'] =
|
49
|
+
header_params['Accept'] =
|
50
|
+
@api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
51
51
|
# HTTP header 'Content-Type'
|
52
52
|
content_type = @api_client.select_header_content_type(['application/json'])
|
53
|
-
|
54
|
-
header_params['Content-Type'] = content_type
|
55
|
-
end
|
53
|
+
header_params['Content-Type'] = content_type unless content_type.nil?
|
56
54
|
|
57
55
|
# form parameters
|
58
56
|
form_params = opts[:form_params] || {}
|
59
57
|
|
60
58
|
# http body (model)
|
61
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:
|
59
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:create_role_request])
|
62
60
|
|
63
61
|
# return_type
|
64
62
|
return_type = opts[:debug_return_type] || 'SuccessResponse'
|
@@ -67,20 +65,20 @@ module KindeApi
|
|
67
65
|
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
68
66
|
|
69
67
|
new_options = opts.merge(
|
70
|
-
:
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
:
|
75
|
-
|
76
|
-
:
|
68
|
+
operation: :"RolesApi.create_role",
|
69
|
+
header_params:,
|
70
|
+
query_params:,
|
71
|
+
form_params:,
|
72
|
+
body: post_body,
|
73
|
+
auth_names:,
|
74
|
+
return_type:
|
77
75
|
)
|
78
76
|
|
79
77
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
80
78
|
if @api_client.config.debugging
|
81
79
|
@api_client.config.logger.debug "API called: RolesApi#create_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
80
|
end
|
83
|
-
|
81
|
+
[data, status_code, headers]
|
84
82
|
end
|
85
83
|
|
86
84
|
# Delete Role
|
@@ -99,15 +97,14 @@ module KindeApi
|
|
99
97
|
# @param [Hash] opts the optional parameters
|
100
98
|
# @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
|
101
99
|
def delete_role_with_http_info(role_id, opts = {})
|
102
|
-
if @api_client.config.debugging
|
103
|
-
@api_client.config.logger.debug 'Calling API: RolesApi.delete_role ...'
|
104
|
-
end
|
100
|
+
@api_client.config.logger.debug 'Calling API: RolesApi.delete_role ...' if @api_client.config.debugging
|
105
101
|
# verify the required parameter 'role_id' is set
|
106
102
|
if @api_client.config.client_side_validation && role_id.nil?
|
107
|
-
|
103
|
+
raise ArgumentError, "Missing the required parameter 'role_id' when calling RolesApi.delete_role"
|
108
104
|
end
|
105
|
+
|
109
106
|
# resource path
|
110
|
-
local_var_path = '/api/v1/roles/{role_id}'.sub('{
|
107
|
+
local_var_path = '/api/v1/roles/{role_id}'.sub('{role_id}', CGI.escape(role_id.to_s))
|
111
108
|
|
112
109
|
# query parameters
|
113
110
|
query_params = opts[:query_params] || {}
|
@@ -115,7 +112,8 @@ module KindeApi
|
|
115
112
|
# header parameters
|
116
113
|
header_params = opts[:header_params] || {}
|
117
114
|
# HTTP header 'Accept' (if needed)
|
118
|
-
header_params['Accept'] =
|
115
|
+
header_params['Accept'] =
|
116
|
+
@api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
119
117
|
|
120
118
|
# form parameters
|
121
119
|
form_params = opts[:form_params] || {}
|
@@ -130,20 +128,20 @@ module KindeApi
|
|
130
128
|
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
131
129
|
|
132
130
|
new_options = opts.merge(
|
133
|
-
:
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
:
|
138
|
-
|
139
|
-
:
|
131
|
+
operation: :"RolesApi.delete_role",
|
132
|
+
header_params:,
|
133
|
+
query_params:,
|
134
|
+
form_params:,
|
135
|
+
body: post_body,
|
136
|
+
auth_names:,
|
137
|
+
return_type:
|
140
138
|
)
|
141
139
|
|
142
140
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
143
141
|
if @api_client.config.debugging
|
144
142
|
@api_client.config.logger.debug "API called: RolesApi#delete_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
145
143
|
end
|
146
|
-
|
144
|
+
[data, status_code, headers]
|
147
145
|
end
|
148
146
|
|
149
147
|
# Get Role Permissions
|
@@ -168,30 +166,31 @@ module KindeApi
|
|
168
166
|
# @option opts [String] :next_token A string to get the next page of results if there are more results.
|
169
167
|
# @return [Array<(Array<RolesPermissionResponseInner>, Integer, Hash)>] Array<RolesPermissionResponseInner> data, response status code and response headers
|
170
168
|
def get_role_permission_with_http_info(role_id, opts = {})
|
171
|
-
if @api_client.config.debugging
|
172
|
-
@api_client.config.logger.debug 'Calling API: RolesApi.get_role_permission ...'
|
173
|
-
end
|
169
|
+
@api_client.config.logger.debug 'Calling API: RolesApi.get_role_permission ...' if @api_client.config.debugging
|
174
170
|
# verify the required parameter 'role_id' is set
|
175
171
|
if @api_client.config.client_side_validation && role_id.nil?
|
176
|
-
|
172
|
+
raise ArgumentError, "Missing the required parameter 'role_id' when calling RolesApi.get_role_permission"
|
177
173
|
end
|
178
|
-
|
179
|
-
|
180
|
-
|
174
|
+
|
175
|
+
allowable_values = %w[name_asc name_desc id_asc id_desc]
|
176
|
+
if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
|
177
|
+
raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
181
178
|
end
|
179
|
+
|
182
180
|
# resource path
|
183
|
-
local_var_path = '/api/v1/roles/{role_id}/permissions'.sub('{
|
181
|
+
local_var_path = '/api/v1/roles/{role_id}/permissions'.sub('{role_id}', CGI.escape(role_id.to_s))
|
184
182
|
|
185
183
|
# query parameters
|
186
184
|
query_params = opts[:query_params] || {}
|
187
|
-
query_params[:
|
188
|
-
query_params[:
|
189
|
-
query_params[:
|
185
|
+
query_params[:sort] = opts[:sort] unless opts[:sort].nil?
|
186
|
+
query_params[:page_size] = opts[:page_size] unless opts[:page_size].nil?
|
187
|
+
query_params[:next_token] = opts[:next_token] unless opts[:next_token].nil?
|
190
188
|
|
191
189
|
# header parameters
|
192
190
|
header_params = opts[:header_params] || {}
|
193
191
|
# HTTP header 'Accept' (if needed)
|
194
|
-
header_params['Accept'] =
|
192
|
+
header_params['Accept'] =
|
193
|
+
@api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
195
194
|
|
196
195
|
# form parameters
|
197
196
|
form_params = opts[:form_params] || {}
|
@@ -206,24 +205,24 @@ module KindeApi
|
|
206
205
|
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
207
206
|
|
208
207
|
new_options = opts.merge(
|
209
|
-
:
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
:
|
214
|
-
|
215
|
-
:
|
208
|
+
operation: :"RolesApi.get_role_permission",
|
209
|
+
header_params:,
|
210
|
+
query_params:,
|
211
|
+
form_params:,
|
212
|
+
body: post_body,
|
213
|
+
auth_names:,
|
214
|
+
return_type:
|
216
215
|
)
|
217
216
|
|
218
217
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
219
218
|
if @api_client.config.debugging
|
220
219
|
@api_client.config.logger.debug "API called: RolesApi#get_role_permission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
221
220
|
end
|
222
|
-
|
221
|
+
[data, status_code, headers]
|
223
222
|
end
|
224
223
|
|
225
224
|
# List Roles
|
226
|
-
# The returned list can be sorted by role name or role ID in ascending or descending order. The number of records to return at a time can also be controlled using the `page_size` query string parameter.
|
225
|
+
# The returned list can be sorted by role name or role ID in ascending or descending order. The number of records to return at a time can also be controlled using the `page_size` query string parameter.
|
227
226
|
# @param [Hash] opts the optional parameters
|
228
227
|
# @option opts [String] :sort Field and order to sort the result by.
|
229
228
|
# @option opts [Integer] :page_size Number of results per page. Defaults to 10 if parameter not sent.
|
@@ -235,33 +234,33 @@ module KindeApi
|
|
235
234
|
end
|
236
235
|
|
237
236
|
# List Roles
|
238
|
-
# The returned list can be sorted by role name or role ID in ascending or descending order. The number of records to return at a time can also be controlled using the `page_size` query string parameter.
|
237
|
+
# The returned list can be sorted by role name or role ID in ascending or descending order. The number of records to return at a time can also be controlled using the `page_size` query string parameter.
|
239
238
|
# @param [Hash] opts the optional parameters
|
240
239
|
# @option opts [String] :sort Field and order to sort the result by.
|
241
240
|
# @option opts [Integer] :page_size Number of results per page. Defaults to 10 if parameter not sent.
|
242
241
|
# @option opts [String] :next_token A string to get the next page of results if there are more results.
|
243
242
|
# @return [Array<(GetRolesResponse, Integer, Hash)>] GetRolesResponse data, response status code and response headers
|
244
243
|
def get_roles_with_http_info(opts = {})
|
245
|
-
if @api_client.config.debugging
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
250
|
-
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
244
|
+
@api_client.config.logger.debug 'Calling API: RolesApi.get_roles ...' if @api_client.config.debugging
|
245
|
+
allowable_values = %w[name_asc name_desc id_asc id_desc]
|
246
|
+
if @api_client.config.client_side_validation && opts[:sort] && !allowable_values.include?(opts[:sort])
|
247
|
+
raise ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
251
248
|
end
|
249
|
+
|
252
250
|
# resource path
|
253
251
|
local_var_path = '/api/v1/roles'
|
254
252
|
|
255
253
|
# query parameters
|
256
254
|
query_params = opts[:query_params] || {}
|
257
|
-
query_params[:
|
258
|
-
query_params[:
|
259
|
-
query_params[:
|
255
|
+
query_params[:sort] = opts[:sort] unless opts[:sort].nil?
|
256
|
+
query_params[:page_size] = opts[:page_size] unless opts[:page_size].nil?
|
257
|
+
query_params[:next_token] = opts[:next_token] unless opts[:next_token].nil?
|
260
258
|
|
261
259
|
# header parameters
|
262
260
|
header_params = opts[:header_params] || {}
|
263
261
|
# HTTP header 'Accept' (if needed)
|
264
|
-
header_params['Accept'] =
|
262
|
+
header_params['Accept'] =
|
263
|
+
@api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
265
264
|
|
266
265
|
# form parameters
|
267
266
|
form_params = opts[:form_params] || {}
|
@@ -276,20 +275,20 @@ module KindeApi
|
|
276
275
|
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
277
276
|
|
278
277
|
new_options = opts.merge(
|
279
|
-
:
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
:
|
284
|
-
|
285
|
-
:
|
278
|
+
operation: :"RolesApi.get_roles",
|
279
|
+
header_params:,
|
280
|
+
query_params:,
|
281
|
+
form_params:,
|
282
|
+
body: post_body,
|
283
|
+
auth_names:,
|
284
|
+
return_type:
|
286
285
|
)
|
287
286
|
|
288
287
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
289
288
|
if @api_client.config.debugging
|
290
289
|
@api_client.config.logger.debug "API called: RolesApi#get_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
291
290
|
end
|
292
|
-
|
291
|
+
[data, status_code, headers]
|
293
292
|
end
|
294
293
|
|
295
294
|
# Remove Role Permission
|
@@ -310,19 +309,22 @@ module KindeApi
|
|
310
309
|
# @param [Hash] opts the optional parameters
|
311
310
|
# @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
|
312
311
|
def remove_role_permission_with_http_info(role_id, permission_id, opts = {})
|
313
|
-
if @api_client.config.debugging
|
314
|
-
@api_client.config.logger.debug 'Calling API: RolesApi.remove_role_permission ...'
|
315
|
-
end
|
312
|
+
@api_client.config.logger.debug 'Calling API: RolesApi.remove_role_permission ...' if @api_client.config.debugging
|
316
313
|
# verify the required parameter 'role_id' is set
|
317
314
|
if @api_client.config.client_side_validation && role_id.nil?
|
318
|
-
|
315
|
+
raise ArgumentError, "Missing the required parameter 'role_id' when calling RolesApi.remove_role_permission"
|
319
316
|
end
|
317
|
+
|
320
318
|
# verify the required parameter 'permission_id' is set
|
321
319
|
if @api_client.config.client_side_validation && permission_id.nil?
|
322
|
-
|
320
|
+
raise ArgumentError,
|
321
|
+
"Missing the required parameter 'permission_id' when calling RolesApi.remove_role_permission"
|
323
322
|
end
|
323
|
+
|
324
324
|
# resource path
|
325
|
-
local_var_path = '/api/v1/roles/{role_id}/permissions/{permission_id}'.sub('{
|
325
|
+
local_var_path = '/api/v1/roles/{role_id}/permissions/{permission_id}'.sub('{role_id}', CGI.escape(role_id.to_s)).sub(
|
326
|
+
'{permission_id}', CGI.escape(permission_id.to_s)
|
327
|
+
)
|
326
328
|
|
327
329
|
# query parameters
|
328
330
|
query_params = opts[:query_params] || {}
|
@@ -330,7 +332,8 @@ module KindeApi
|
|
330
332
|
# header parameters
|
331
333
|
header_params = opts[:header_params] || {}
|
332
334
|
# HTTP header 'Accept' (if needed)
|
333
|
-
header_params['Accept'] =
|
335
|
+
header_params['Accept'] =
|
336
|
+
@api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
334
337
|
|
335
338
|
# form parameters
|
336
339
|
form_params = opts[:form_params] || {}
|
@@ -345,37 +348,38 @@ module KindeApi
|
|
345
348
|
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
346
349
|
|
347
350
|
new_options = opts.merge(
|
348
|
-
:
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
:
|
353
|
-
|
354
|
-
:
|
351
|
+
operation: :"RolesApi.remove_role_permission",
|
352
|
+
header_params:,
|
353
|
+
query_params:,
|
354
|
+
form_params:,
|
355
|
+
body: post_body,
|
356
|
+
auth_names:,
|
357
|
+
return_type:
|
355
358
|
)
|
356
359
|
|
357
360
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
358
361
|
if @api_client.config.debugging
|
359
362
|
@api_client.config.logger.debug "API called: RolesApi#remove_role_permission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
360
363
|
end
|
361
|
-
|
364
|
+
[data, status_code, headers]
|
362
365
|
end
|
363
366
|
|
364
367
|
# Update Role Permissions
|
365
|
-
# Update role permissions.
|
368
|
+
# Update role permissions.
|
366
369
|
# @param role_id [String] The identifier for the role.
|
367
|
-
# @param update_role_permissions_request [UpdateRolePermissionsRequest]
|
370
|
+
# @param update_role_permissions_request [UpdateRolePermissionsRequest]
|
368
371
|
# @param [Hash] opts the optional parameters
|
369
372
|
# @return [UpdateRolePermissionsResponse]
|
370
373
|
def update_role_permissions(role_id, update_role_permissions_request, opts = {})
|
371
|
-
data, _status_code, _headers = update_role_permissions_with_http_info(role_id, update_role_permissions_request,
|
374
|
+
data, _status_code, _headers = update_role_permissions_with_http_info(role_id, update_role_permissions_request,
|
375
|
+
opts)
|
372
376
|
data
|
373
377
|
end
|
374
378
|
|
375
379
|
# Update Role Permissions
|
376
|
-
# Update role permissions.
|
380
|
+
# Update role permissions.
|
377
381
|
# @param role_id [String] The identifier for the role.
|
378
|
-
# @param update_role_permissions_request [UpdateRolePermissionsRequest]
|
382
|
+
# @param update_role_permissions_request [UpdateRolePermissionsRequest]
|
379
383
|
# @param [Hash] opts the optional parameters
|
380
384
|
# @return [Array<(UpdateRolePermissionsResponse, Integer, Hash)>] UpdateRolePermissionsResponse data, response status code and response headers
|
381
385
|
def update_role_permissions_with_http_info(role_id, update_role_permissions_request, opts = {})
|
@@ -384,14 +388,17 @@ module KindeApi
|
|
384
388
|
end
|
385
389
|
# verify the required parameter 'role_id' is set
|
386
390
|
if @api_client.config.client_side_validation && role_id.nil?
|
387
|
-
|
391
|
+
raise ArgumentError, "Missing the required parameter 'role_id' when calling RolesApi.update_role_permissions"
|
388
392
|
end
|
393
|
+
|
389
394
|
# verify the required parameter 'update_role_permissions_request' is set
|
390
395
|
if @api_client.config.client_side_validation && update_role_permissions_request.nil?
|
391
|
-
|
396
|
+
raise ArgumentError,
|
397
|
+
"Missing the required parameter 'update_role_permissions_request' when calling RolesApi.update_role_permissions"
|
392
398
|
end
|
399
|
+
|
393
400
|
# resource path
|
394
|
-
local_var_path = '/api/v1/roles/{role_id}/permissions'.sub('{
|
401
|
+
local_var_path = '/api/v1/roles/{role_id}/permissions'.sub('{role_id}', CGI.escape(role_id.to_s))
|
395
402
|
|
396
403
|
# query parameters
|
397
404
|
query_params = opts[:query_params] || {}
|
@@ -399,12 +406,11 @@ module KindeApi
|
|
399
406
|
# header parameters
|
400
407
|
header_params = opts[:header_params] || {}
|
401
408
|
# HTTP header 'Accept' (if needed)
|
402
|
-
header_params['Accept'] =
|
409
|
+
header_params['Accept'] =
|
410
|
+
@api_client.select_header_accept(['application/json', 'application/json; charset=utf-8'])
|
403
411
|
# HTTP header 'Content-Type'
|
404
412
|
content_type = @api_client.select_header_content_type(['application/json'])
|
405
|
-
|
406
|
-
header_params['Content-Type'] = content_type
|
407
|
-
end
|
413
|
+
header_params['Content-Type'] = content_type unless content_type.nil?
|
408
414
|
|
409
415
|
# form parameters
|
410
416
|
form_params = opts[:form_params] || {}
|
@@ -419,20 +425,20 @@ module KindeApi
|
|
419
425
|
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
420
426
|
|
421
427
|
new_options = opts.merge(
|
422
|
-
:
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
:
|
427
|
-
|
428
|
-
:
|
428
|
+
operation: :"RolesApi.update_role_permissions",
|
429
|
+
header_params:,
|
430
|
+
query_params:,
|
431
|
+
form_params:,
|
432
|
+
body: post_body,
|
433
|
+
auth_names:,
|
434
|
+
return_type:
|
429
435
|
)
|
430
436
|
|
431
437
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
432
438
|
if @api_client.config.debugging
|
433
439
|
@api_client.config.logger.debug "API called: RolesApi#update_role_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
434
440
|
end
|
435
|
-
|
441
|
+
[data, status_code, headers]
|
436
442
|
end
|
437
443
|
|
438
444
|
# Update Role
|
@@ -453,15 +459,14 @@ module KindeApi
|
|
453
459
|
# @option opts [UpdateRolesRequest] :update_roles_request Role details.
|
454
460
|
# @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
|
455
461
|
def update_roles_with_http_info(role_id, opts = {})
|
456
|
-
if @api_client.config.debugging
|
457
|
-
@api_client.config.logger.debug 'Calling API: RolesApi.update_roles ...'
|
458
|
-
end
|
462
|
+
@api_client.config.logger.debug 'Calling API: RolesApi.update_roles ...' if @api_client.config.debugging
|
459
463
|
# verify the required parameter 'role_id' is set
|
460
464
|
if @api_client.config.client_side_validation && role_id.nil?
|
461
|
-
|
465
|
+
raise ArgumentError, "Missing the required parameter 'role_id' when calling RolesApi.update_roles"
|
462
466
|
end
|
467
|
+
|
463
468
|
# resource path
|
464
|
-
local_var_path = '/api/v1/roles/{role_id}'.sub('{
|
469
|
+
local_var_path = '/api/v1/roles/{role_id}'.sub('{role_id}', CGI.escape(role_id.to_s))
|
465
470
|
|
466
471
|
# query parameters
|
467
472
|
query_params = opts[:query_params] || {}
|
@@ -472,15 +477,13 @@ module KindeApi
|
|
472
477
|
header_params['Accept'] = @api_client.select_header_accept(['application/json; charset=utf-8'])
|
473
478
|
# HTTP header 'Content-Type'
|
474
479
|
content_type = @api_client.select_header_content_type(['application/json'])
|
475
|
-
|
476
|
-
header_params['Content-Type'] = content_type
|
477
|
-
end
|
480
|
+
header_params['Content-Type'] = content_type unless content_type.nil?
|
478
481
|
|
479
482
|
# form parameters
|
480
483
|
form_params = opts[:form_params] || {}
|
481
484
|
|
482
485
|
# http body (model)
|
483
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:
|
486
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:update_roles_request])
|
484
487
|
|
485
488
|
# return_type
|
486
489
|
return_type = opts[:debug_return_type] || 'SuccessResponse'
|
@@ -489,20 +492,20 @@ module KindeApi
|
|
489
492
|
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
490
493
|
|
491
494
|
new_options = opts.merge(
|
492
|
-
:
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
:
|
497
|
-
|
498
|
-
:
|
495
|
+
operation: :"RolesApi.update_roles",
|
496
|
+
header_params:,
|
497
|
+
query_params:,
|
498
|
+
form_params:,
|
499
|
+
body: post_body,
|
500
|
+
auth_names:,
|
501
|
+
return_type:
|
499
502
|
)
|
500
503
|
|
501
504
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
502
505
|
if @api_client.config.debugging
|
503
506
|
@api_client.config.logger.debug "API called: RolesApi#update_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
504
507
|
end
|
505
|
-
|
508
|
+
[data, status_code, headers]
|
506
509
|
end
|
507
510
|
end
|
508
511
|
end
|