kinde_sdk 1.0.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 +7 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +119 -0
- data/LICENSE +21 -0
- data/README.md +342 -0
- data/Rakefile +10 -0
- data/kinde_api/.gitignore +39 -0
- data/kinde_api/.rspec +2 -0
- data/kinde_api/README.md +103 -0
- data/kinde_api/docs/AddOrganizationUsers200Response.md +22 -0
- data/kinde_api/docs/AddOrganizationUsersRequest.md +18 -0
- data/kinde_api/docs/ApiResult.md +18 -0
- data/kinde_api/docs/ConnectedAppsAccessToken.md +20 -0
- data/kinde_api/docs/ConnectedAppsApi.md +219 -0
- data/kinde_api/docs/ConnectedAppsAuthUrl.md +20 -0
- data/kinde_api/docs/CreateOrganization201Response.md +20 -0
- data/kinde_api/docs/CreateOrganizationRequest.md +20 -0
- data/kinde_api/docs/CreateUser200Response.md +22 -0
- data/kinde_api/docs/CreateUserRequest.md +20 -0
- data/kinde_api/docs/CreateUserRequestIdentitiesInner.md +20 -0
- data/kinde_api/docs/CreateUserRequestIdentitiesInnerDetails.md +18 -0
- data/kinde_api/docs/CreateUserRequestProfile.md +20 -0
- data/kinde_api/docs/EnvironmentsApi.md +216 -0
- data/kinde_api/docs/Error.md +20 -0
- data/kinde_api/docs/ErrorResponse.md +18 -0
- data/kinde_api/docs/FeatureFlagsApi.md +239 -0
- data/kinde_api/docs/GetOrganizationUsers200Response.md +24 -0
- data/kinde_api/docs/GetOrganizations200Response.md +24 -0
- data/kinde_api/docs/GetUsers200Response.md +24 -0
- data/kinde_api/docs/OAuthApi.md +141 -0
- data/kinde_api/docs/Organization.md +22 -0
- data/kinde_api/docs/OrganizationUser.md +26 -0
- data/kinde_api/docs/OrganizationsApi.md +671 -0
- data/kinde_api/docs/RemoveOrganizationUsers200Response.md +20 -0
- data/kinde_api/docs/RemoveOrganizationUsersRequest.md +18 -0
- data/kinde_api/docs/SuccessResponse.md +20 -0
- data/kinde_api/docs/UpdateUserRequest.md +22 -0
- data/kinde_api/docs/User.md +28 -0
- data/kinde_api/docs/UserIdentity.md +20 -0
- data/kinde_api/docs/UserIdentityResult.md +20 -0
- data/kinde_api/docs/UserProfile.md +26 -0
- data/kinde_api/docs/UserProfileV2.md +30 -0
- data/kinde_api/docs/UsersApi.md +603 -0
- data/kinde_api/lib/kinde_api/api/connected_apps_api.rb +221 -0
- data/kinde_api/lib/kinde_api/api/environments_api.rb +212 -0
- data/kinde_api/lib/kinde_api/api/feature_flags_api.rb +309 -0
- data/kinde_api/lib/kinde_api/api/o_auth_api.rb +136 -0
- data/kinde_api/lib/kinde_api/api/organizations_api.rb +634 -0
- data/kinde_api/lib/kinde_api/api/users_api.rb +560 -0
- data/kinde_api/lib/kinde_api/api_client.rb +397 -0
- data/kinde_api/lib/kinde_api/api_error.rb +58 -0
- data/kinde_api/lib/kinde_api/configuration.rb +295 -0
- data/kinde_api/lib/kinde_api/models/add_organization_users200_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/add_organization_users_request.rb +220 -0
- data/kinde_api/lib/kinde_api/models/api_result.rb +218 -0
- data/kinde_api/lib/kinde_api/models/connected_apps_access_token.rb +228 -0
- data/kinde_api/lib/kinde_api/models/connected_apps_auth_url.rb +228 -0
- data/kinde_api/lib/kinde_api/models/create_organization201_response.rb +228 -0
- data/kinde_api/lib/kinde_api/models/create_organization_request.rb +252 -0
- data/kinde_api/lib/kinde_api/models/create_user200_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/create_user_request.rb +229 -0
- data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner.rb +228 -0
- data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner_details.rb +219 -0
- data/kinde_api/lib/kinde_api/models/create_user_request_profile.rb +229 -0
- data/kinde_api/lib/kinde_api/models/error.rb +228 -0
- data/kinde_api/lib/kinde_api/models/error_response.rb +219 -0
- data/kinde_api/lib/kinde_api/models/get_organization_users200_response.rb +249 -0
- data/kinde_api/lib/kinde_api/models/get_organizations200_response.rb +249 -0
- data/kinde_api/lib/kinde_api/models/get_users200_response.rb +249 -0
- data/kinde_api/lib/kinde_api/models/organization.rb +235 -0
- data/kinde_api/lib/kinde_api/models/organization_user.rb +253 -0
- data/kinde_api/lib/kinde_api/models/remove_organization_users200_response.rb +228 -0
- data/kinde_api/lib/kinde_api/models/remove_organization_users_request.rb +220 -0
- data/kinde_api/lib/kinde_api/models/success_response.rb +226 -0
- data/kinde_api/lib/kinde_api/models/update_user_request.rb +238 -0
- data/kinde_api/lib/kinde_api/models/user.rb +269 -0
- data/kinde_api/lib/kinde_api/models/user_identity.rb +227 -0
- data/kinde_api/lib/kinde_api/models/user_identity_result.rb +229 -0
- data/kinde_api/lib/kinde_api/models/user_profile.rb +259 -0
- data/kinde_api/lib/kinde_api/models/user_profile_v2.rb +279 -0
- data/kinde_api/lib/kinde_api/version.rb +15 -0
- data/kinde_api/lib/kinde_api.rb +73 -0
- data/kinde_api/spec/api/connected_apps_api_spec.rb +72 -0
- data/kinde_api/spec/api/environments_api_spec.rb +71 -0
- data/kinde_api/spec/api/feature_flags_api_spec.rb +82 -0
- data/kinde_api/spec/api/o_auth_api_spec.rb +57 -0
- data/kinde_api/spec/api/organizations_api_spec.rb +154 -0
- data/kinde_api/spec/api/users_api_spec.rb +141 -0
- data/kinde_api/spec/api_client_spec.rb +229 -0
- data/kinde_api/spec/configuration_spec.rb +42 -0
- data/kinde_api/spec/models/add_organization_users200_response_spec.rb +46 -0
- data/kinde_api/spec/models/add_organization_users_request_spec.rb +34 -0
- data/kinde_api/spec/models/api_result_spec.rb +34 -0
- data/kinde_api/spec/models/connected_apps_access_token_spec.rb +40 -0
- data/kinde_api/spec/models/connected_apps_auth_url_spec.rb +40 -0
- data/kinde_api/spec/models/create_organization201_response_spec.rb +40 -0
- data/kinde_api/spec/models/create_organization_request_spec.rb +44 -0
- data/kinde_api/spec/models/create_user200_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_user_request_identities_inner_details_spec.rb +34 -0
- data/kinde_api/spec/models/create_user_request_identities_inner_spec.rb +40 -0
- data/kinde_api/spec/models/create_user_request_profile_spec.rb +40 -0
- data/kinde_api/spec/models/create_user_request_spec.rb +40 -0
- data/kinde_api/spec/models/error_response_spec.rb +34 -0
- data/kinde_api/spec/models/error_spec.rb +40 -0
- data/kinde_api/spec/models/get_organization_users200_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_organizations200_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_users200_response_spec.rb +52 -0
- data/kinde_api/spec/models/organization_spec.rb +46 -0
- data/kinde_api/spec/models/organization_user_spec.rb +58 -0
- data/kinde_api/spec/models/remove_organization_users200_response_spec.rb +40 -0
- data/kinde_api/spec/models/remove_organization_users_request_spec.rb +34 -0
- data/kinde_api/spec/models/success_response_spec.rb +40 -0
- data/kinde_api/spec/models/update_user_request_spec.rb +46 -0
- data/kinde_api/spec/models/user_identity_result_spec.rb +40 -0
- data/kinde_api/spec/models/user_identity_spec.rb +40 -0
- data/kinde_api/spec/models/user_profile_spec.rb +58 -0
- data/kinde_api/spec/models/user_profile_v2_spec.rb +70 -0
- data/kinde_api/spec/models/user_spec.rb +64 -0
- data/kinde_api/spec/spec_helper.rb +111 -0
- data/kinde_sdk.gemspec +33 -0
- data/lib/kinde_sdk/client.rb +49 -0
- data/lib/kinde_sdk/configuration.rb +50 -0
- data/lib/kinde_sdk/version.rb +3 -0
- data/lib/kinde_sdk.rb +109 -0
- data/openapitools.json +7 -0
- data/spec/kinde_sdk_spec.rb +105 -0
- data/spec/spec_helper.rb +82 -0
- metadata +291 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Kinde Management API
|
|
3
|
+
|
|
4
|
+
#Provides endpoints to manage your Kinde Businesses
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1
|
|
7
|
+
Contact: support@kinde.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 6.4.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module KindeApi
|
|
16
|
+
class FeatureFlagsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a new feature flag
|
|
23
|
+
# Create feature flag.
|
|
24
|
+
# @param name [String] The name of the flag.
|
|
25
|
+
# @param description [String] Description of the flag purpose.
|
|
26
|
+
# @param key [String] The flag identifier to use in code.
|
|
27
|
+
# @param type [String] The variable type.
|
|
28
|
+
# @param allow_override_level [String] Allow the flag to be overridden at a different level.
|
|
29
|
+
# @param default_value [String] Default value for the flag used by environments and organizations.
|
|
30
|
+
# @param [Hash] opts the optional parameters
|
|
31
|
+
# @return [SuccessResponse]
|
|
32
|
+
def create_feature_flag(name, description, key, type, allow_override_level, default_value, opts = {})
|
|
33
|
+
data, _status_code, _headers = create_feature_flag_with_http_info(name, description, key, type, allow_override_level, default_value, opts)
|
|
34
|
+
data
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Create a new feature flag
|
|
38
|
+
# Create feature flag.
|
|
39
|
+
# @param name [String] The name of the flag.
|
|
40
|
+
# @param description [String] Description of the flag purpose.
|
|
41
|
+
# @param key [String] The flag identifier to use in code.
|
|
42
|
+
# @param type [String] The variable type.
|
|
43
|
+
# @param allow_override_level [String] Allow the flag to be overridden at a different level.
|
|
44
|
+
# @param default_value [String] Default value for the flag used by environments and organizations.
|
|
45
|
+
# @param [Hash] opts the optional parameters
|
|
46
|
+
# @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
|
|
47
|
+
def create_feature_flag_with_http_info(name, description, key, type, allow_override_level, default_value, opts = {})
|
|
48
|
+
if @api_client.config.debugging
|
|
49
|
+
@api_client.config.logger.debug 'Calling API: FeatureFlagsApi.create_feature_flag ...'
|
|
50
|
+
end
|
|
51
|
+
# verify the required parameter 'name' is set
|
|
52
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
53
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling FeatureFlagsApi.create_feature_flag"
|
|
54
|
+
end
|
|
55
|
+
# verify the required parameter 'description' is set
|
|
56
|
+
if @api_client.config.client_side_validation && description.nil?
|
|
57
|
+
fail ArgumentError, "Missing the required parameter 'description' when calling FeatureFlagsApi.create_feature_flag"
|
|
58
|
+
end
|
|
59
|
+
# verify the required parameter 'key' is set
|
|
60
|
+
if @api_client.config.client_side_validation && key.nil?
|
|
61
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling FeatureFlagsApi.create_feature_flag"
|
|
62
|
+
end
|
|
63
|
+
# verify the required parameter 'type' is set
|
|
64
|
+
if @api_client.config.client_side_validation && type.nil?
|
|
65
|
+
fail ArgumentError, "Missing the required parameter 'type' when calling FeatureFlagsApi.create_feature_flag"
|
|
66
|
+
end
|
|
67
|
+
# verify enum value
|
|
68
|
+
allowable_values = ["str", "int", "bool"]
|
|
69
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(type)
|
|
70
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
|
|
71
|
+
end
|
|
72
|
+
# verify the required parameter 'allow_override_level' is set
|
|
73
|
+
if @api_client.config.client_side_validation && allow_override_level.nil?
|
|
74
|
+
fail ArgumentError, "Missing the required parameter 'allow_override_level' when calling FeatureFlagsApi.create_feature_flag"
|
|
75
|
+
end
|
|
76
|
+
# verify enum value
|
|
77
|
+
allowable_values = ["env", "org"]
|
|
78
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(allow_override_level)
|
|
79
|
+
fail ArgumentError, "invalid value for \"allow_override_level\", must be one of #{allowable_values}"
|
|
80
|
+
end
|
|
81
|
+
# verify the required parameter 'default_value' is set
|
|
82
|
+
if @api_client.config.client_side_validation && default_value.nil?
|
|
83
|
+
fail ArgumentError, "Missing the required parameter 'default_value' when calling FeatureFlagsApi.create_feature_flag"
|
|
84
|
+
end
|
|
85
|
+
# resource path
|
|
86
|
+
local_var_path = '/api/v1/feature_flags'
|
|
87
|
+
|
|
88
|
+
# query parameters
|
|
89
|
+
query_params = opts[:query_params] || {}
|
|
90
|
+
query_params[:'name'] = name
|
|
91
|
+
query_params[:'description'] = description
|
|
92
|
+
query_params[:'key'] = key
|
|
93
|
+
query_params[:'type'] = type
|
|
94
|
+
query_params[:'allow_override_level'] = allow_override_level
|
|
95
|
+
query_params[:'default_value'] = default_value
|
|
96
|
+
|
|
97
|
+
# header parameters
|
|
98
|
+
header_params = opts[:header_params] || {}
|
|
99
|
+
# HTTP header 'Accept' (if needed)
|
|
100
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
101
|
+
|
|
102
|
+
# form parameters
|
|
103
|
+
form_params = opts[:form_params] || {}
|
|
104
|
+
|
|
105
|
+
# http body (model)
|
|
106
|
+
post_body = opts[:debug_body]
|
|
107
|
+
|
|
108
|
+
# return_type
|
|
109
|
+
return_type = opts[:debug_return_type] || 'SuccessResponse'
|
|
110
|
+
|
|
111
|
+
# auth_names
|
|
112
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
|
113
|
+
|
|
114
|
+
new_options = opts.merge(
|
|
115
|
+
:operation => :"FeatureFlagsApi.create_feature_flag",
|
|
116
|
+
:header_params => header_params,
|
|
117
|
+
:query_params => query_params,
|
|
118
|
+
:form_params => form_params,
|
|
119
|
+
:body => post_body,
|
|
120
|
+
:auth_names => auth_names,
|
|
121
|
+
:return_type => return_type
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
125
|
+
if @api_client.config.debugging
|
|
126
|
+
@api_client.config.logger.debug "API called: FeatureFlagsApi#create_feature_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
127
|
+
end
|
|
128
|
+
return data, status_code, headers
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Delete a feature flag
|
|
132
|
+
# Delete feature flag
|
|
133
|
+
# @param feature_flag_key [String] The identifier for the feature flag.
|
|
134
|
+
# @param [Hash] opts the optional parameters
|
|
135
|
+
# @return [SuccessResponse]
|
|
136
|
+
def delete_feature_flag(feature_flag_key, opts = {})
|
|
137
|
+
data, _status_code, _headers = delete_feature_flag_with_http_info(feature_flag_key, opts)
|
|
138
|
+
data
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Delete a feature flag
|
|
142
|
+
# Delete feature flag
|
|
143
|
+
# @param feature_flag_key [String] The identifier for the feature flag.
|
|
144
|
+
# @param [Hash] opts the optional parameters
|
|
145
|
+
# @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
|
|
146
|
+
def delete_feature_flag_with_http_info(feature_flag_key, opts = {})
|
|
147
|
+
if @api_client.config.debugging
|
|
148
|
+
@api_client.config.logger.debug 'Calling API: FeatureFlagsApi.delete_feature_flag ...'
|
|
149
|
+
end
|
|
150
|
+
# verify the required parameter 'feature_flag_key' is set
|
|
151
|
+
if @api_client.config.client_side_validation && feature_flag_key.nil?
|
|
152
|
+
fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.delete_feature_flag"
|
|
153
|
+
end
|
|
154
|
+
# resource path
|
|
155
|
+
local_var_path = '/api/v1/feature_flags/{feature_flag_key}'.sub('{' + 'feature_flag_key' + '}', CGI.escape(feature_flag_key.to_s))
|
|
156
|
+
|
|
157
|
+
# query parameters
|
|
158
|
+
query_params = opts[:query_params] || {}
|
|
159
|
+
|
|
160
|
+
# header parameters
|
|
161
|
+
header_params = opts[:header_params] || {}
|
|
162
|
+
# HTTP header 'Accept' (if needed)
|
|
163
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
164
|
+
|
|
165
|
+
# form parameters
|
|
166
|
+
form_params = opts[:form_params] || {}
|
|
167
|
+
|
|
168
|
+
# http body (model)
|
|
169
|
+
post_body = opts[:debug_body]
|
|
170
|
+
|
|
171
|
+
# return_type
|
|
172
|
+
return_type = opts[:debug_return_type] || 'SuccessResponse'
|
|
173
|
+
|
|
174
|
+
# auth_names
|
|
175
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
|
176
|
+
|
|
177
|
+
new_options = opts.merge(
|
|
178
|
+
:operation => :"FeatureFlagsApi.delete_feature_flag",
|
|
179
|
+
:header_params => header_params,
|
|
180
|
+
:query_params => query_params,
|
|
181
|
+
:form_params => form_params,
|
|
182
|
+
:body => post_body,
|
|
183
|
+
:auth_names => auth_names,
|
|
184
|
+
:return_type => return_type
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
188
|
+
if @api_client.config.debugging
|
|
189
|
+
@api_client.config.logger.debug "API called: FeatureFlagsApi#delete_feature_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
190
|
+
end
|
|
191
|
+
return data, status_code, headers
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Update a feature flag
|
|
195
|
+
# Update feature flag.
|
|
196
|
+
# @param feature_flag_key [String] The identifier for the feature flag.
|
|
197
|
+
# @param name [String] The name of the flag.
|
|
198
|
+
# @param description [String] Description of the flag purpose.
|
|
199
|
+
# @param key [String] The flag identifier to use in code.
|
|
200
|
+
# @param type [String] The variable type
|
|
201
|
+
# @param allow_override_level [String] Allow the flag to be overridden at a different level.
|
|
202
|
+
# @param default_value [String] Default value for the flag used by environments and organizations.
|
|
203
|
+
# @param [Hash] opts the optional parameters
|
|
204
|
+
# @return [SuccessResponse]
|
|
205
|
+
def update_feature_flag(feature_flag_key, name, description, key, type, allow_override_level, default_value, opts = {})
|
|
206
|
+
data, _status_code, _headers = update_feature_flag_with_http_info(feature_flag_key, name, description, key, type, allow_override_level, default_value, opts)
|
|
207
|
+
data
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Update a feature flag
|
|
211
|
+
# Update feature flag.
|
|
212
|
+
# @param feature_flag_key [String] The identifier for the feature flag.
|
|
213
|
+
# @param name [String] The name of the flag.
|
|
214
|
+
# @param description [String] Description of the flag purpose.
|
|
215
|
+
# @param key [String] The flag identifier to use in code.
|
|
216
|
+
# @param type [String] The variable type
|
|
217
|
+
# @param allow_override_level [String] Allow the flag to be overridden at a different level.
|
|
218
|
+
# @param default_value [String] Default value for the flag used by environments and organizations.
|
|
219
|
+
# @param [Hash] opts the optional parameters
|
|
220
|
+
# @return [Array<(SuccessResponse, Integer, Hash)>] SuccessResponse data, response status code and response headers
|
|
221
|
+
def update_feature_flag_with_http_info(feature_flag_key, name, description, key, type, allow_override_level, default_value, opts = {})
|
|
222
|
+
if @api_client.config.debugging
|
|
223
|
+
@api_client.config.logger.debug 'Calling API: FeatureFlagsApi.update_feature_flag ...'
|
|
224
|
+
end
|
|
225
|
+
# verify the required parameter 'feature_flag_key' is set
|
|
226
|
+
if @api_client.config.client_side_validation && feature_flag_key.nil?
|
|
227
|
+
fail ArgumentError, "Missing the required parameter 'feature_flag_key' when calling FeatureFlagsApi.update_feature_flag"
|
|
228
|
+
end
|
|
229
|
+
# verify the required parameter 'name' is set
|
|
230
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
231
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling FeatureFlagsApi.update_feature_flag"
|
|
232
|
+
end
|
|
233
|
+
# verify the required parameter 'description' is set
|
|
234
|
+
if @api_client.config.client_side_validation && description.nil?
|
|
235
|
+
fail ArgumentError, "Missing the required parameter 'description' when calling FeatureFlagsApi.update_feature_flag"
|
|
236
|
+
end
|
|
237
|
+
# verify the required parameter 'key' is set
|
|
238
|
+
if @api_client.config.client_side_validation && key.nil?
|
|
239
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling FeatureFlagsApi.update_feature_flag"
|
|
240
|
+
end
|
|
241
|
+
# verify the required parameter 'type' is set
|
|
242
|
+
if @api_client.config.client_side_validation && type.nil?
|
|
243
|
+
fail ArgumentError, "Missing the required parameter 'type' when calling FeatureFlagsApi.update_feature_flag"
|
|
244
|
+
end
|
|
245
|
+
# verify enum value
|
|
246
|
+
allowable_values = ["str", "int", "bool"]
|
|
247
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(type)
|
|
248
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
|
|
249
|
+
end
|
|
250
|
+
# verify the required parameter 'allow_override_level' is set
|
|
251
|
+
if @api_client.config.client_side_validation && allow_override_level.nil?
|
|
252
|
+
fail ArgumentError, "Missing the required parameter 'allow_override_level' when calling FeatureFlagsApi.update_feature_flag"
|
|
253
|
+
end
|
|
254
|
+
# verify enum value
|
|
255
|
+
allowable_values = ["env", "org"]
|
|
256
|
+
if @api_client.config.client_side_validation && !allowable_values.include?(allow_override_level)
|
|
257
|
+
fail ArgumentError, "invalid value for \"allow_override_level\", must be one of #{allowable_values}"
|
|
258
|
+
end
|
|
259
|
+
# verify the required parameter 'default_value' is set
|
|
260
|
+
if @api_client.config.client_side_validation && default_value.nil?
|
|
261
|
+
fail ArgumentError, "Missing the required parameter 'default_value' when calling FeatureFlagsApi.update_feature_flag"
|
|
262
|
+
end
|
|
263
|
+
# resource path
|
|
264
|
+
local_var_path = '/api/v1/feature_flags/{feature_flag_key}'.sub('{' + 'feature_flag_key' + '}', CGI.escape(feature_flag_key.to_s))
|
|
265
|
+
|
|
266
|
+
# query parameters
|
|
267
|
+
query_params = opts[:query_params] || {}
|
|
268
|
+
query_params[:'name'] = name
|
|
269
|
+
query_params[:'description'] = description
|
|
270
|
+
query_params[:'key'] = key
|
|
271
|
+
query_params[:'type'] = type
|
|
272
|
+
query_params[:'allow_override_level'] = allow_override_level
|
|
273
|
+
query_params[:'default_value'] = default_value
|
|
274
|
+
|
|
275
|
+
# header parameters
|
|
276
|
+
header_params = opts[:header_params] || {}
|
|
277
|
+
# HTTP header 'Accept' (if needed)
|
|
278
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
279
|
+
|
|
280
|
+
# form parameters
|
|
281
|
+
form_params = opts[:form_params] || {}
|
|
282
|
+
|
|
283
|
+
# http body (model)
|
|
284
|
+
post_body = opts[:debug_body]
|
|
285
|
+
|
|
286
|
+
# return_type
|
|
287
|
+
return_type = opts[:debug_return_type] || 'SuccessResponse'
|
|
288
|
+
|
|
289
|
+
# auth_names
|
|
290
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
|
291
|
+
|
|
292
|
+
new_options = opts.merge(
|
|
293
|
+
:operation => :"FeatureFlagsApi.update_feature_flag",
|
|
294
|
+
:header_params => header_params,
|
|
295
|
+
:query_params => query_params,
|
|
296
|
+
:form_params => form_params,
|
|
297
|
+
:body => post_body,
|
|
298
|
+
:auth_names => auth_names,
|
|
299
|
+
:return_type => return_type
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
303
|
+
if @api_client.config.debugging
|
|
304
|
+
@api_client.config.logger.debug "API called: FeatureFlagsApi#update_feature_flag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
305
|
+
end
|
|
306
|
+
return data, status_code, headers
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
end
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Kinde Management API
|
|
3
|
+
|
|
4
|
+
#Provides endpoints to manage your Kinde Businesses
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1
|
|
7
|
+
Contact: support@kinde.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 6.4.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module KindeApi
|
|
16
|
+
class OAuthApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Returns the details of the currently logged in user
|
|
23
|
+
# Contains the id, names and email of the currently logged in user.
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [UserProfile]
|
|
26
|
+
def get_user(opts = {})
|
|
27
|
+
data, _status_code, _headers = get_user_with_http_info(opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns the details of the currently logged in user
|
|
32
|
+
# Contains the id, names and email of the currently logged in user.
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(UserProfile, Integer, Hash)>] UserProfile data, response status code and response headers
|
|
35
|
+
def get_user_with_http_info(opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: OAuthApi.get_user ...'
|
|
38
|
+
end
|
|
39
|
+
# resource path
|
|
40
|
+
local_var_path = '/oauth2/user_profile'
|
|
41
|
+
|
|
42
|
+
# query parameters
|
|
43
|
+
query_params = opts[:query_params] || {}
|
|
44
|
+
|
|
45
|
+
# header parameters
|
|
46
|
+
header_params = opts[:header_params] || {}
|
|
47
|
+
# HTTP header 'Accept' (if needed)
|
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
49
|
+
|
|
50
|
+
# form parameters
|
|
51
|
+
form_params = opts[:form_params] || {}
|
|
52
|
+
|
|
53
|
+
# http body (model)
|
|
54
|
+
post_body = opts[:debug_body]
|
|
55
|
+
|
|
56
|
+
# return_type
|
|
57
|
+
return_type = opts[:debug_return_type] || 'UserProfile'
|
|
58
|
+
|
|
59
|
+
# auth_names
|
|
60
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
|
61
|
+
|
|
62
|
+
new_options = opts.merge(
|
|
63
|
+
:operation => :"OAuthApi.get_user",
|
|
64
|
+
:header_params => header_params,
|
|
65
|
+
:query_params => query_params,
|
|
66
|
+
:form_params => form_params,
|
|
67
|
+
:body => post_body,
|
|
68
|
+
:auth_names => auth_names,
|
|
69
|
+
:return_type => return_type
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
73
|
+
if @api_client.config.debugging
|
|
74
|
+
@api_client.config.logger.debug "API called: OAuthApi#get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
75
|
+
end
|
|
76
|
+
return data, status_code, headers
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Returns the details of the currently logged in user
|
|
80
|
+
# Contains the id, names, profile picture URL and email of the currently logged in user.
|
|
81
|
+
# @param [Hash] opts the optional parameters
|
|
82
|
+
# @return [UserProfileV2]
|
|
83
|
+
def get_user_profile_v2(opts = {})
|
|
84
|
+
data, _status_code, _headers = get_user_profile_v2_with_http_info(opts)
|
|
85
|
+
data
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Returns the details of the currently logged in user
|
|
89
|
+
# Contains the id, names, profile picture URL and email of the currently logged in user.
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @return [Array<(UserProfileV2, Integer, Hash)>] UserProfileV2 data, response status code and response headers
|
|
92
|
+
def get_user_profile_v2_with_http_info(opts = {})
|
|
93
|
+
if @api_client.config.debugging
|
|
94
|
+
@api_client.config.logger.debug 'Calling API: OAuthApi.get_user_profile_v2 ...'
|
|
95
|
+
end
|
|
96
|
+
# resource path
|
|
97
|
+
local_var_path = '/oauth2/v2/user_profile'
|
|
98
|
+
|
|
99
|
+
# query parameters
|
|
100
|
+
query_params = opts[:query_params] || {}
|
|
101
|
+
|
|
102
|
+
# header parameters
|
|
103
|
+
header_params = opts[:header_params] || {}
|
|
104
|
+
# HTTP header 'Accept' (if needed)
|
|
105
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
106
|
+
|
|
107
|
+
# form parameters
|
|
108
|
+
form_params = opts[:form_params] || {}
|
|
109
|
+
|
|
110
|
+
# http body (model)
|
|
111
|
+
post_body = opts[:debug_body]
|
|
112
|
+
|
|
113
|
+
# return_type
|
|
114
|
+
return_type = opts[:debug_return_type] || 'UserProfileV2'
|
|
115
|
+
|
|
116
|
+
# auth_names
|
|
117
|
+
auth_names = opts[:debug_auth_names] || ['kindeBearerAuth']
|
|
118
|
+
|
|
119
|
+
new_options = opts.merge(
|
|
120
|
+
:operation => :"OAuthApi.get_user_profile_v2",
|
|
121
|
+
:header_params => header_params,
|
|
122
|
+
:query_params => query_params,
|
|
123
|
+
:form_params => form_params,
|
|
124
|
+
:body => post_body,
|
|
125
|
+
:auth_names => auth_names,
|
|
126
|
+
:return_type => return_type
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
130
|
+
if @api_client.config.debugging
|
|
131
|
+
@api_client.config.logger.debug "API called: OAuthApi#get_user_profile_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
132
|
+
end
|
|
133
|
+
return data, status_code, headers
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
end
|