kinde_sdk 1.2.3 → 1.7.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/app/assets/stylesheets/kinde/ruby/sdk/application.css +15 -0
- data/app/controllers/kinde_sdk/auth_controller.rb +301 -0
- data/app/helpers/auth_helper.rb +88 -0
- data/config/routes.rb +9 -0
- data/kinde_api/Gemfile +9 -0
- data/kinde_api/README.md +316 -47
- data/kinde_api/Rakefile +10 -0
- data/kinde_api/docs/APIsApi.md +569 -60
- data/kinde_api/docs/AddAPIScopeRequest.md +20 -0
- data/kinde_api/docs/AddAPIsRequest.md +4 -4
- data/kinde_api/docs/AddOrganizationUsersRequestUsersInner.md +1 -1
- data/kinde_api/docs/AddRoleScopeRequest.md +18 -0
- data/kinde_api/docs/AddRoleScopeResponse.md +20 -0
- data/kinde_api/docs/ApplicationsApi.md +465 -38
- data/kinde_api/docs/AuthorizeAppApiResponse.md +24 -0
- data/kinde_api/docs/BillingAgreementsApi.md +157 -0
- data/kinde_api/docs/BillingEntitlementsApi.md +89 -0
- data/kinde_api/docs/BillingMeterUsageApi.md +77 -0
- data/kinde_api/docs/BusinessApi.md +27 -66
- data/kinde_api/docs/CallbacksApi.md +25 -25
- data/kinde_api/docs/Category.md +20 -0
- data/kinde_api/docs/ConnectedAppsApi.md +8 -8
- data/kinde_api/docs/Connection.md +22 -0
- data/kinde_api/docs/ConnectionConnection.md +24 -0
- data/kinde_api/docs/ConnectionsApi.md +439 -0
- data/kinde_api/docs/CreateApiScopesResponse.md +22 -0
- data/kinde_api/docs/CreateApiScopesResponseScope.md +18 -0
- data/kinde_api/docs/CreateApisResponse.md +22 -0
- data/kinde_api/docs/CreateApisResponseApi.md +18 -0
- data/kinde_api/docs/CreateApplicationRequest.md +3 -3
- data/kinde_api/docs/CreateApplicationResponseApplication.md +4 -4
- data/kinde_api/docs/CreateBillingAgreementRequest.md +24 -0
- data/kinde_api/docs/CreateCategoryRequest.md +20 -0
- data/kinde_api/docs/CreateCategoryResponse.md +22 -0
- data/kinde_api/docs/CreateCategoryResponseCategory.md +18 -0
- data/kinde_api/docs/CreateConnectionRequest.md +28 -0
- data/kinde_api/docs/CreateConnectionRequestOptions.md +51 -0
- data/kinde_api/docs/CreateConnectionRequestOptionsOneOf.md +22 -0
- data/kinde_api/docs/CreateConnectionRequestOptionsOneOf1.md +34 -0
- data/kinde_api/docs/CreateConnectionRequestOptionsOneOf2.md +44 -0
- data/kinde_api/docs/CreateConnectionResponse.md +22 -0
- data/kinde_api/docs/CreateConnectionResponseConnection.md +18 -0
- data/kinde_api/docs/CreateEnvironmentVariableRequest.md +22 -0
- data/kinde_api/docs/CreateEnvironmentVariableResponse.md +22 -0
- data/kinde_api/docs/CreateEnvironmentVariableResponseEnvironmentVariable.md +18 -0
- data/kinde_api/docs/CreateIdentityResponse.md +22 -0
- data/kinde_api/docs/CreateIdentityResponseIdentity.md +18 -0
- data/kinde_api/docs/CreateMeterUsageRecordRequest.md +26 -0
- data/kinde_api/docs/CreateMeterUsageRecordResponse.md +20 -0
- data/kinde_api/docs/CreateOrganizationRequest.md +17 -7
- data/kinde_api/docs/CreateOrganizationResponse.md +4 -4
- data/kinde_api/docs/CreateOrganizationResponseOrganization.md +4 -2
- data/kinde_api/docs/CreatePropertyRequest.md +30 -0
- data/kinde_api/docs/CreatePropertyResponse.md +22 -0
- data/kinde_api/docs/CreatePropertyResponseProperty.md +18 -0
- data/kinde_api/docs/CreateRolesResponse.md +22 -0
- data/kinde_api/docs/CreateRolesResponseRole.md +18 -0
- data/kinde_api/docs/CreateUserIdentityRequest.md +24 -0
- data/kinde_api/docs/CreateUserRequest.md +3 -1
- data/kinde_api/docs/CreateUserRequestIdentitiesInner.md +3 -1
- data/kinde_api/docs/CreateUserRequestIdentitiesInnerDetails.md +7 -1
- data/kinde_api/docs/CreateUserRequestProfile.md +3 -1
- data/kinde_api/docs/CreateUserResponse.md +1 -1
- data/kinde_api/docs/CreateWebHookRequest.md +24 -0
- data/kinde_api/docs/CreateWebhookResponse.md +22 -0
- data/kinde_api/docs/CreateWebhookResponseWebhook.md +20 -0
- data/kinde_api/docs/DeleteApiResponse.md +20 -0
- data/kinde_api/docs/DeleteEnvironmentVariableResponse.md +20 -0
- data/kinde_api/docs/DeleteRoleScopeResponse.md +20 -0
- data/kinde_api/docs/DeleteWebhookResponse.md +20 -0
- data/kinde_api/docs/EnvironmentVariable.md +26 -0
- data/kinde_api/docs/EnvironmentVariablesApi.md +356 -0
- data/kinde_api/docs/EnvironmentsApi.md +281 -5
- data/kinde_api/docs/EventType.md +26 -0
- data/kinde_api/docs/FeatureFlagsApi.md +4 -4
- data/kinde_api/docs/GetApiResponse.md +22 -0
- data/kinde_api/docs/GetApiResponseApi.md +28 -0
- data/kinde_api/docs/GetApiResponseApiApplicationsInner.md +24 -0
- data/kinde_api/docs/GetApiResponseApiScopesInner.md +20 -0
- data/kinde_api/docs/GetApiScopeResponse.md +22 -0
- data/kinde_api/docs/GetApiScopesResponse.md +22 -0
- data/kinde_api/docs/GetApiScopesResponseScopesInner.md +22 -0
- data/kinde_api/docs/GetApisResponse.md +24 -0
- data/kinde_api/docs/GetApisResponseApisInner.md +26 -0
- data/kinde_api/docs/GetApisResponseApisInnerScopesInner.md +20 -0
- data/kinde_api/docs/GetApplicationResponseApplication.md +11 -5
- data/kinde_api/docs/GetBillingAgreementsResponse.md +24 -0
- data/kinde_api/docs/GetBillingAgreementsResponseAgreementsInner.md +26 -0
- data/kinde_api/docs/GetBillingAgreementsResponseAgreementsInnerEntitlementsInner.md +20 -0
- data/kinde_api/docs/GetBillingEntitlementsResponse.md +26 -0
- data/kinde_api/docs/GetBillingEntitlementsResponseEntitlementsInner.md +32 -0
- data/kinde_api/docs/GetBillingEntitlementsResponsePlansInner.md +20 -0
- data/kinde_api/docs/GetBusinessResponse.md +22 -0
- data/kinde_api/docs/GetBusinessResponseBusiness.md +38 -0
- data/kinde_api/docs/GetCategoriesResponse.md +24 -0
- data/kinde_api/docs/GetConnectionsResponse.md +24 -0
- data/kinde_api/docs/GetEnvironmentResponse.md +22 -0
- data/kinde_api/docs/GetEnvironmentResponseEnvironment.md +68 -0
- data/kinde_api/docs/GetEnvironmentResponseEnvironmentBackgroundColor.md +22 -0
- data/kinde_api/docs/GetEnvironmentResponseEnvironmentLinkColor.md +22 -0
- data/kinde_api/docs/GetEnvironmentVariableResponse.md +22 -0
- data/kinde_api/docs/GetEnvironmentVariablesResponse.md +24 -0
- data/kinde_api/docs/GetEventResponse.md +22 -0
- data/kinde_api/docs/GetEventResponseEvent.md +26 -0
- data/kinde_api/docs/GetEventTypesResponse.md +22 -0
- data/kinde_api/docs/GetIdentitiesResponse.md +24 -0
- data/kinde_api/docs/GetIndustriesResponse.md +22 -0
- data/kinde_api/docs/GetIndustriesResponseIndustriesInner.md +20 -0
- data/kinde_api/docs/GetOrganizationResponse.md +72 -0
- data/kinde_api/docs/GetOrganizationResponseBilling.md +20 -0
- data/kinde_api/docs/GetOrganizationResponseBillingAgreementsInner.md +20 -0
- data/kinde_api/docs/GetOrganizationUsersResponse.md +2 -2
- data/kinde_api/docs/GetOrganizationsResponse.md +4 -4
- data/kinde_api/docs/GetPropertiesResponse.md +24 -0
- data/kinde_api/docs/GetPropertyValuesResponse.md +24 -0
- data/kinde_api/docs/GetRoleResponse.md +22 -0
- data/kinde_api/docs/GetRoleResponseRole.md +26 -0
- data/kinde_api/docs/GetTimezonesResponse.md +22 -0
- data/kinde_api/docs/GetTimezonesResponseTimezonesInner.md +20 -0
- data/kinde_api/docs/GetUserMfaResponse.md +22 -0
- data/kinde_api/docs/GetUserMfaResponseMfa.md +30 -0
- data/kinde_api/docs/GetUserSessionsResponse.md +24 -0
- data/kinde_api/docs/GetUserSessionsResponseSessionsInner.md +40 -0
- data/kinde_api/docs/GetWebhooksResponse.md +22 -0
- data/kinde_api/docs/IdentitiesApi.md +219 -0
- data/kinde_api/docs/Identity.md +34 -0
- data/kinde_api/docs/IndustriesApi.md +14 -21
- data/kinde_api/docs/LogoutRedirectUrls.md +6 -2
- data/kinde_api/docs/MFAApi.md +77 -0
- data/kinde_api/docs/NotFoundResponse.md +18 -0
- data/kinde_api/docs/NotFoundResponseErrors.md +20 -0
- data/kinde_api/docs/OAuthApi.md +32 -97
- data/kinde_api/docs/OrganizationItemSchema.md +28 -0
- data/kinde_api/docs/OrganizationUser.md +17 -11
- data/kinde_api/docs/OrganizationsApi.md +1440 -210
- data/kinde_api/docs/Permissions.md +1 -1
- data/kinde_api/docs/PermissionsApi.md +7 -7
- data/kinde_api/docs/PropertiesApi.md +297 -0
- data/kinde_api/docs/Property.md +28 -0
- data/kinde_api/docs/PropertyCategoriesApi.md +227 -0
- data/kinde_api/docs/PropertyValue.md +26 -0
- data/kinde_api/docs/ReadEnvLogoResponse.md +22 -0
- data/kinde_api/docs/ReadEnvLogoResponseLogosInner.md +20 -0
- data/kinde_api/docs/ReadLogoResponse.md +22 -0
- data/kinde_api/docs/ReadLogoResponseLogosInner.md +22 -0
- data/kinde_api/docs/ReplaceConnectionRequest.md +24 -0
- data/kinde_api/docs/ReplaceConnectionRequestOptions.md +51 -0
- data/kinde_api/docs/ReplaceConnectionRequestOptionsOneOf.md +32 -0
- data/kinde_api/docs/ReplaceConnectionRequestOptionsOneOf1.md +40 -0
- data/kinde_api/docs/ReplaceMFARequest.md +20 -0
- data/kinde_api/docs/ReplaceOrganizationMFARequest.md +18 -0
- data/kinde_api/docs/RolePermissionsResponse.md +24 -0
- data/kinde_api/docs/RoleScopesResponse.md +22 -0
- data/kinde_api/docs/Roles.md +4 -2
- data/kinde_api/docs/RolesApi.md +338 -54
- data/kinde_api/docs/Scopes.md +24 -0
- data/kinde_api/docs/SearchApi.md +89 -0
- data/kinde_api/docs/SearchUsersResponse.md +22 -0
- data/kinde_api/docs/SearchUsersResponseResultsInner.md +46 -0
- data/kinde_api/docs/SetUserPasswordRequest.md +26 -0
- data/kinde_api/docs/SubscribersApi.md +4 -4
- data/kinde_api/docs/SuccessResponse.md +2 -2
- data/kinde_api/docs/TimezonesApi.md +14 -21
- data/kinde_api/docs/TokenIntrospect.md +5 -5
- data/kinde_api/docs/UpdateAPIApplicationsRequestApplicationsInner.md +4 -4
- data/kinde_api/docs/UpdateAPIScopeRequest.md +18 -0
- data/kinde_api/docs/UpdateApplicationRequest.md +5 -1
- data/kinde_api/docs/UpdateApplicationTokensRequest.md +26 -0
- data/kinde_api/docs/UpdateApplicationsPropertyRequest.md +18 -0
- data/kinde_api/docs/UpdateApplicationsPropertyRequestValue.md +49 -0
- data/kinde_api/docs/UpdateBusinessRequest.md +36 -0
- data/kinde_api/docs/UpdateCategoryRequest.md +18 -0
- data/kinde_api/docs/UpdateConnectionRequest.md +24 -0
- data/kinde_api/docs/UpdateEnvironmentVariableRequest.md +22 -0
- data/kinde_api/docs/UpdateEnvironmentVariableResponse.md +20 -0
- data/kinde_api/docs/UpdateIdentityRequest.md +18 -0
- data/kinde_api/docs/UpdateOrganizationPropertiesRequest.md +18 -0
- data/kinde_api/docs/UpdateOrganizationRequest.md +27 -15
- data/kinde_api/docs/UpdateOrganizationSessionsRequest.md +24 -0
- data/kinde_api/docs/UpdateOrganizationUsersRequestUsersInner.md +2 -2
- data/kinde_api/docs/UpdateOrganizationUsersResponse.md +3 -1
- data/kinde_api/docs/UpdatePropertyRequest.md +24 -0
- data/kinde_api/docs/UpdateUserRequest.md +5 -1
- data/kinde_api/docs/UpdateUserResponse.md +1 -1
- data/kinde_api/docs/UpdateWebHookRequest.md +22 -0
- data/kinde_api/docs/UpdateWebhookResponse.md +22 -0
- data/kinde_api/docs/UpdateWebhookResponseWebhook.md +18 -0
- data/kinde_api/docs/User.md +6 -2
- data/kinde_api/docs/UserProfileV2.md +17 -13
- data/kinde_api/docs/UsersApi.md +893 -99
- data/kinde_api/docs/UsersResponseUsersInner.md +6 -2
- data/kinde_api/docs/Webhook.md +28 -0
- data/kinde_api/docs/WebhooksApi.md +423 -0
- data/kinde_api/git_push.sh +57 -0
- data/kinde_api/kinde_api.gemspec +38 -0
- data/kinde_api/lib/kinde_api/api/apis_api.rb +640 -127
- data/kinde_api/lib/kinde_api/api/applications_api.rb +524 -112
- data/kinde_api/lib/kinde_api/api/billing_agreements_api.rb +166 -0
- data/kinde_api/lib/kinde_api/api/billing_entitlements_api.rb +105 -0
- data/kinde_api/lib/kinde_api/api/billing_meter_usage_api.rb +90 -0
- data/kinde_api/lib/kinde_api/api/business_api.rb +61 -126
- data/kinde_api/lib/kinde_api/api/callbacks_api.rb +152 -172
- data/kinde_api/lib/kinde_api/api/connected_apps_api.rb +57 -67
- data/kinde_api/lib/kinde_api/api/connections_api.rb +433 -0
- data/kinde_api/lib/kinde_api/api/environment_variables_api.rb +347 -0
- data/kinde_api/lib/kinde_api/api/environments_api.rb +327 -78
- data/kinde_api/lib/kinde_api/api/feature_flags_api.rb +68 -88
- data/kinde_api/lib/kinde_api/api/frontend/billing_api.rb +148 -0
- data/kinde_api/lib/kinde_api/api/frontend/feature_flags_api.rb +85 -0
- data/kinde_api/lib/kinde_api/api/frontend/o_auth_api.rb +241 -0
- data/kinde_api/lib/kinde_api/api/frontend/permissions_api.rb +85 -0
- data/kinde_api/lib/kinde_api/api/frontend/properties_api.rb +85 -0
- data/kinde_api/lib/kinde_api/api/frontend/roles_api.rb +85 -0
- data/kinde_api/lib/kinde_api/api/frontend/self_serve_portal_api.rb +89 -0
- data/kinde_api/lib/kinde_api/api/identities_api.rb +222 -0
- data/kinde_api/lib/kinde_api/api/industries_api.rb +29 -34
- data/kinde_api/lib/kinde_api/api/mfa_api.rb +90 -0
- data/kinde_api/lib/kinde_api/api/o_auth_api.rb +104 -129
- data/kinde_api/lib/kinde_api/api/organizations_api.rb +1689 -544
- data/kinde_api/lib/kinde_api/api/permissions_api.rb +76 -80
- data/kinde_api/lib/kinde_api/api/properties_api.rb +300 -0
- data/kinde_api/lib/kinde_api/api/property_categories_api.rb +237 -0
- data/kinde_api/lib/kinde_api/api/roles_api.rb +432 -166
- data/kinde_api/lib/kinde_api/api/search_api.rb +97 -0
- data/kinde_api/lib/kinde_api/api/subscribers_api.rb +59 -60
- data/kinde_api/lib/kinde_api/api/timezones_api.rb +29 -34
- data/kinde_api/lib/kinde_api/api/users_api.rb +900 -150
- data/kinde_api/lib/kinde_api/api/webhooks_api.rb +404 -0
- data/kinde_api/lib/kinde_api/api_client.rb +79 -68
- data/kinde_api/lib/kinde_api/api_error.rb +16 -16
- data/kinde_api/lib/kinde_api/configuration.rb +101 -24
- data/kinde_api/lib/kinde_api/models/add_api_scope_request.rb +235 -0
- data/kinde_api/lib/kinde_api/models/add_apis_request.rb +54 -49
- data/kinde_api/lib/kinde_api/models/add_organization_users_request.rb +40 -42
- data/kinde_api/lib/kinde_api/models/add_organization_users_request_users_inner.rb +53 -51
- data/kinde_api/lib/kinde_api/models/add_organization_users_response.rb +52 -50
- data/kinde_api/lib/kinde_api/models/add_role_scope_request.rb +225 -0
- data/kinde_api/lib/kinde_api/models/add_role_scope_response.rb +230 -0
- data/kinde_api/lib/kinde_api/models/api_result.rb +38 -40
- data/kinde_api/lib/kinde_api/models/applications.rb +55 -50
- data/kinde_api/lib/kinde_api/models/authorize_app_api_response.rb +250 -0
- data/kinde_api/lib/kinde_api/models/category.rb +228 -0
- data/kinde_api/lib/kinde_api/models/connected_apps_access_token.rb +44 -45
- data/kinde_api/lib/kinde_api/models/connected_apps_auth_url.rb +44 -45
- data/kinde_api/lib/kinde_api/models/connection.rb +239 -0
- data/kinde_api/lib/kinde_api/models/connection_connection.rb +246 -0
- data/kinde_api/lib/kinde_api/models/create_api_scopes_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/create_api_scopes_response_scope.rb +220 -0
- data/kinde_api/lib/kinde_api/models/create_apis_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/create_apis_response_api.rb +220 -0
- data/kinde_api/lib/kinde_api/models/create_application_request.rb +60 -52
- data/kinde_api/lib/kinde_api/models/create_application_response.rb +50 -49
- data/kinde_api/lib/kinde_api/models/create_application_response_application.rb +51 -50
- data/kinde_api/lib/kinde_api/models/create_billing_agreement_request.rb +260 -0
- data/kinde_api/lib/kinde_api/models/create_category_request.rb +274 -0
- data/kinde_api/lib/kinde_api/models/create_category_response.rb +237 -0
- data/kinde_api/lib/kinde_api/models/create_category_response_category.rb +220 -0
- data/kinde_api/lib/kinde_api/models/create_connection_request.rb +306 -0
- data/kinde_api/lib/kinde_api/models/create_connection_request_options.rb +106 -0
- data/kinde_api/lib/kinde_api/models/create_connection_request_options_one_of.rb +241 -0
- data/kinde_api/lib/kinde_api/models/create_connection_request_options_one_of1.rb +303 -0
- data/kinde_api/lib/kinde_api/models/create_connection_request_options_one_of2.rb +333 -0
- data/kinde_api/lib/kinde_api/models/create_connection_response.rb +237 -0
- data/kinde_api/lib/kinde_api/models/create_connection_response_connection.rb +220 -0
- data/kinde_api/lib/kinde_api/models/create_environment_variable_request.rb +250 -0
- data/kinde_api/lib/kinde_api/models/create_environment_variable_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/create_environment_variable_response_environment_variable.rb +220 -0
- data/kinde_api/lib/kinde_api/models/create_feature_flag_request.rb +87 -77
- data/kinde_api/lib/kinde_api/models/create_identity_response.rb +237 -0
- data/kinde_api/lib/kinde_api/models/create_identity_response_identity.rb +220 -0
- data/kinde_api/lib/kinde_api/models/create_meter_usage_record_request.rb +309 -0
- data/kinde_api/lib/kinde_api/models/create_meter_usage_record_response.rb +230 -0
- data/kinde_api/lib/kinde_api/models/create_organization_request.rb +175 -100
- data/kinde_api/lib/kinde_api/models/create_organization_response.rb +57 -50
- data/kinde_api/lib/kinde_api/models/create_organization_response_organization.rb +49 -42
- data/kinde_api/lib/kinde_api/models/create_organization_user_permission_request.rb +38 -41
- data/kinde_api/lib/kinde_api/models/create_organization_user_role_request.rb +38 -41
- data/kinde_api/lib/kinde_api/models/create_permission_request.rb +50 -49
- data/kinde_api/lib/kinde_api/models/create_property_request.rb +356 -0
- data/kinde_api/lib/kinde_api/models/create_property_response.rb +237 -0
- data/kinde_api/lib/kinde_api/models/create_property_response_property.rb +220 -0
- data/kinde_api/lib/kinde_api/models/create_role_request.rb +56 -53
- data/kinde_api/lib/kinde_api/models/create_roles_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/create_roles_response_role.rb +220 -0
- data/kinde_api/lib/kinde_api/models/create_subscriber_success_response.rb +38 -41
- data/kinde_api/lib/kinde_api/models/create_subscriber_success_response_subscriber.rb +38 -41
- data/kinde_api/lib/kinde_api/models/create_user_identity_request.rb +284 -0
- data/kinde_api/lib/kinde_api/models/create_user_request.rb +62 -50
- data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner.rb +60 -52
- data/kinde_api/lib/kinde_api/models/create_user_request_identities_inner_details.rb +67 -40
- data/kinde_api/lib/kinde_api/models/create_user_request_profile.rb +54 -45
- data/kinde_api/lib/kinde_api/models/create_user_response.rb +53 -51
- data/kinde_api/lib/kinde_api/models/create_web_hook_request.rb +268 -0
- data/kinde_api/lib/kinde_api/models/create_webhook_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/create_webhook_response_webhook.rb +228 -0
- data/kinde_api/lib/kinde_api/models/delete_api_response.rb +228 -0
- data/kinde_api/lib/kinde_api/models/delete_environment_variable_response.rb +230 -0
- data/kinde_api/lib/kinde_api/models/delete_role_scope_response.rb +230 -0
- data/kinde_api/lib/kinde_api/models/delete_webhook_response.rb +230 -0
- data/kinde_api/lib/kinde_api/models/environment_variable.rb +261 -0
- data/kinde_api/lib/kinde_api/models/error.rb +44 -44
- data/kinde_api/lib/kinde_api/models/error_response.rb +40 -42
- data/kinde_api/lib/kinde_api/models/event_type.rb +255 -0
- data/kinde_api/lib/kinde_api/models/frontend/error.rb +230 -0
- data/kinde_api/lib/kinde_api/models/frontend/error_response.rb +221 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_entitlement_response.rb +228 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_entitlement_response_data.rb +229 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_entitlement_response_data_entitlement.rb +295 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_entitlements_response.rb +228 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_entitlements_response_data.rb +244 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_entitlements_response_data_entitlements_inner.rb +294 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_entitlements_response_data_plans_inner.rb +240 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_entitlements_response_metadata.rb +230 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_feature_flags_response.rb +219 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_feature_flags_response_data.rb +222 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_feature_flags_response_data_feature_flags_inner.rb +259 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_feature_flags_response_data_feature_flags_inner_value.rb +108 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_user_permissions_response.rb +228 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_user_permissions_response_data.rb +232 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_user_permissions_response_data_permissions_inner.rb +240 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_user_permissions_response_metadata.rb +230 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_user_properties_response.rb +228 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_user_properties_response_data.rb +222 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_user_properties_response_data_properties_inner.rb +249 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_user_properties_response_data_properties_inner_value.rb +107 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_user_properties_response_metadata.rb +230 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_user_roles_response.rb +228 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_user_roles_response_data.rb +232 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_user_roles_response_data_roles_inner.rb +240 -0
- data/kinde_api/lib/kinde_api/models/frontend/get_user_roles_response_metadata.rb +230 -0
- data/kinde_api/lib/kinde_api/models/frontend/portal_link.rb +220 -0
- data/kinde_api/lib/kinde_api/models/frontend/token_error_response.rb +230 -0
- data/kinde_api/lib/kinde_api/models/frontend/token_introspect.rb +262 -0
- data/kinde_api/lib/kinde_api/models/frontend/user_profile_v2.rb +323 -0
- data/kinde_api/lib/kinde_api/models/get_api_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/get_api_response_api.rb +272 -0
- data/kinde_api/lib/kinde_api/models/get_api_response_api_applications_inner.rb +285 -0
- data/kinde_api/lib/kinde_api/models/get_api_response_api_scopes_inner.rb +230 -0
- data/kinde_api/lib/kinde_api/models/get_api_scope_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/get_api_scopes_response.rb +241 -0
- data/kinde_api/lib/kinde_api/models/get_api_scopes_response_scopes_inner.rb +240 -0
- data/kinde_api/lib/kinde_api/models/get_apis_response.rb +251 -0
- data/kinde_api/lib/kinde_api/models/get_apis_response_apis_inner.rb +261 -0
- data/kinde_api/lib/kinde_api/models/get_apis_response_apis_inner_scopes_inner.rb +228 -0
- data/kinde_api/lib/kinde_api/models/get_application_response.rb +50 -49
- data/kinde_api/lib/kinde_api/models/get_application_response_application.rb +126 -57
- data/kinde_api/lib/kinde_api/models/get_applications_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/get_billing_agreements_response.rb +252 -0
- data/kinde_api/lib/kinde_api/models/get_billing_agreements_response_agreements_inner.rb +262 -0
- data/kinde_api/lib/kinde_api/models/get_billing_agreements_response_agreements_inner_entitlements_inner.rb +230 -0
- data/kinde_api/lib/kinde_api/models/get_billing_entitlements_response.rb +264 -0
- data/kinde_api/lib/kinde_api/models/get_billing_entitlements_response_entitlements_inner.rb +290 -0
- data/kinde_api/lib/kinde_api/models/get_billing_entitlements_response_plans_inner.rb +229 -0
- data/kinde_api/lib/kinde_api/models/get_business_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/get_business_response_business.rb +326 -0
- data/kinde_api/lib/kinde_api/models/get_categories_response.rb +251 -0
- data/kinde_api/lib/kinde_api/models/get_connections_response.rb +251 -0
- data/kinde_api/lib/kinde_api/models/get_environment_feature_flags_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/get_environment_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/get_environment_response_environment.rb +526 -0
- data/kinde_api/lib/kinde_api/models/get_environment_response_environment_background_color.rb +237 -0
- data/kinde_api/lib/kinde_api/models/get_environment_response_environment_link_color.rb +237 -0
- data/kinde_api/lib/kinde_api/models/get_environment_variable_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/get_environment_variables_response.rb +251 -0
- data/kinde_api/lib/kinde_api/models/get_event_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/get_event_response_event.rb +257 -0
- data/kinde_api/lib/kinde_api/models/get_event_types_response.rb +241 -0
- data/kinde_api/lib/kinde_api/models/get_identities_response.rb +251 -0
- data/kinde_api/lib/kinde_api/models/get_industries_response.rb +241 -0
- data/kinde_api/lib/kinde_api/models/get_industries_response_industries_inner.rb +230 -0
- data/kinde_api/lib/kinde_api/models/get_organization_feature_flags_response.rb +52 -50
- 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_response.rb +547 -0
- data/kinde_api/lib/kinde_api/models/get_organization_response_billing.rb +232 -0
- data/kinde_api/lib/kinde_api/models/get_organization_response_billing_agreements_inner.rb +230 -0
- data/kinde_api/lib/kinde_api/models/get_organization_users_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/get_organizations_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/get_organizations_user_permissions_response.rb +52 -50
- data/kinde_api/lib/kinde_api/models/get_organizations_user_roles_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/get_permissions_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/get_properties_response.rb +251 -0
- data/kinde_api/lib/kinde_api/models/get_property_values_response.rb +251 -0
- data/kinde_api/lib/kinde_api/models/get_redirect_callback_urls_response.rb +40 -42
- data/kinde_api/lib/kinde_api/models/get_role_response.rb +239 -0
- data/kinde_api/lib/kinde_api/models/get_role_response_role.rb +260 -0
- data/kinde_api/lib/kinde_api/models/get_roles_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/get_subscriber_response.rb +52 -50
- data/kinde_api/lib/kinde_api/models/get_subscribers_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/get_timezones_response.rb +241 -0
- data/kinde_api/lib/kinde_api/models/get_timezones_response_timezones_inner.rb +230 -0
- data/kinde_api/lib/kinde_api/models/get_user_mfa_response.rb +237 -0
- data/kinde_api/lib/kinde_api/models/get_user_mfa_response_mfa.rb +280 -0
- data/kinde_api/lib/kinde_api/models/get_user_sessions_response.rb +248 -0
- data/kinde_api/lib/kinde_api/models/get_user_sessions_response_sessions_inner.rb +331 -0
- data/kinde_api/lib/kinde_api/models/get_webhooks_response.rb +241 -0
- data/kinde_api/lib/kinde_api/models/identity.rb +300 -0
- data/kinde_api/lib/kinde_api/models/logout_redirect_urls.rb +60 -42
- data/kinde_api/lib/kinde_api/models/not_found_response.rb +219 -0
- data/kinde_api/lib/kinde_api/models/not_found_response_errors.rb +228 -0
- data/kinde_api/lib/kinde_api/models/organization_item_schema.rb +272 -0
- data/kinde_api/lib/kinde_api/models/organization_user.rb +122 -62
- data/kinde_api/lib/kinde_api/models/organization_user_permission.rb +73 -59
- data/kinde_api/lib/kinde_api/models/organization_user_permission_roles_inner.rb +47 -46
- data/kinde_api/lib/kinde_api/models/organization_user_role.rb +55 -50
- data/kinde_api/lib/kinde_api/models/organization_user_role_permissions.rb +55 -50
- data/kinde_api/lib/kinde_api/models/organization_user_role_permissions_permissions.rb +38 -41
- data/kinde_api/lib/kinde_api/models/permissions.rb +57 -54
- data/kinde_api/lib/kinde_api/models/property.rb +264 -0
- data/kinde_api/lib/kinde_api/models/property_value.rb +257 -0
- data/kinde_api/lib/kinde_api/models/read_env_logo_response.rb +242 -0
- data/kinde_api/lib/kinde_api/models/read_env_logo_response_logos_inner.rb +230 -0
- data/kinde_api/lib/kinde_api/models/read_logo_response.rb +242 -0
- data/kinde_api/lib/kinde_api/models/read_logo_response_logos_inner.rb +240 -0
- data/kinde_api/lib/kinde_api/models/redirect_callback_urls.rb +40 -42
- data/kinde_api/lib/kinde_api/models/replace_connection_request.rb +251 -0
- data/kinde_api/lib/kinde_api/models/replace_connection_request_options.rb +106 -0
- data/kinde_api/lib/kinde_api/models/replace_connection_request_options_one_of.rb +293 -0
- data/kinde_api/lib/kinde_api/models/replace_connection_request_options_one_of1.rb +313 -0
- data/kinde_api/lib/kinde_api/models/replace_logout_redirect_urls_request.rb +40 -42
- data/kinde_api/lib/kinde_api/models/replace_mfa_request.rb +276 -0
- data/kinde_api/lib/kinde_api/models/replace_organization_mfa_request.rb +249 -0
- data/kinde_api/lib/kinde_api/models/replace_redirect_callback_urls_request.rb +40 -42
- data/kinde_api/lib/kinde_api/models/role.rb +63 -53
- data/kinde_api/lib/kinde_api/models/role_permissions_response.rb +251 -0
- data/kinde_api/lib/kinde_api/models/role_scopes_response.rb +241 -0
- data/kinde_api/lib/kinde_api/models/roles.rb +68 -53
- data/kinde_api/lib/kinde_api/models/scopes.rb +250 -0
- data/kinde_api/lib/kinde_api/models/search_users_response.rb +241 -0
- data/kinde_api/lib/kinde_api/models/search_users_response_results_inner.rb +374 -0
- data/kinde_api/lib/kinde_api/models/set_user_password_request.rb +311 -0
- data/kinde_api/lib/kinde_api/models/subscriber.rb +63 -54
- data/kinde_api/lib/kinde_api/models/subscribers_subscriber.rb +71 -58
- data/kinde_api/lib/kinde_api/models/success_response.rb +47 -46
- data/kinde_api/lib/kinde_api/models/token_error_response.rb +44 -45
- data/kinde_api/lib/kinde_api/models/token_introspect.rb +63 -58
- data/kinde_api/lib/kinde_api/models/update_api_applications_request.rb +42 -44
- data/kinde_api/lib/kinde_api/models/update_api_applications_request_applications_inner.rb +48 -49
- data/kinde_api/lib/kinde_api/models/update_api_scope_request.rb +220 -0
- data/kinde_api/lib/kinde_api/models/update_application_request.rb +78 -54
- data/kinde_api/lib/kinde_api/models/update_application_tokens_request.rb +260 -0
- data/kinde_api/lib/kinde_api/models/update_applications_property_request.rb +224 -0
- data/kinde_api/lib/kinde_api/models/update_applications_property_request_value.rb +106 -0
- data/kinde_api/lib/kinde_api/models/update_business_request.rb +320 -0
- data/kinde_api/lib/kinde_api/models/update_category_request.rb +220 -0
- data/kinde_api/lib/kinde_api/models/update_connection_request.rb +251 -0
- data/kinde_api/lib/kinde_api/models/update_environement_feature_flag_override_request.rb +40 -43
- data/kinde_api/lib/kinde_api/models/update_environment_variable_request.rb +240 -0
- data/kinde_api/lib/kinde_api/models/update_environment_variable_response.rb +230 -0
- data/kinde_api/lib/kinde_api/models/update_identity_request.rb +220 -0
- data/kinde_api/lib/kinde_api/models/update_organization_properties_request.rb +225 -0
- data/kinde_api/lib/kinde_api/models/update_organization_request.rb +209 -91
- data/kinde_api/lib/kinde_api/models/update_organization_sessions_request.rb +284 -0
- data/kinde_api/lib/kinde_api/models/update_organization_users_request.rb +40 -42
- data/kinde_api/lib/kinde_api/models/update_organization_users_request_users_inner.rb +59 -55
- data/kinde_api/lib/kinde_api/models/update_organization_users_response.rb +76 -57
- data/kinde_api/lib/kinde_api/models/update_property_request.rb +265 -0
- data/kinde_api/lib/kinde_api/models/update_role_permissions_request.rb +40 -42
- data/kinde_api/lib/kinde_api/models/update_role_permissions_request_permissions_inner.rb +44 -45
- data/kinde_api/lib/kinde_api/models/update_role_permissions_response.rb +66 -56
- data/kinde_api/lib/kinde_api/models/update_roles_request.rb +61 -56
- data/kinde_api/lib/kinde_api/models/update_user_request.rb +75 -52
- data/kinde_api/lib/kinde_api/models/update_user_response.rb +75 -67
- data/kinde_api/lib/kinde_api/models/update_web_hook_request.rb +243 -0
- data/kinde_api/lib/kinde_api/models/update_webhook_response.rb +237 -0
- data/kinde_api/lib/kinde_api/models/update_webhook_response_webhook.rb +219 -0
- data/kinde_api/lib/kinde_api/models/user.rb +138 -97
- data/kinde_api/lib/kinde_api/models/user_identities_inner.rb +47 -46
- data/kinde_api/lib/kinde_api/models/user_identity.rb +44 -45
- data/kinde_api/lib/kinde_api/models/user_identity_result.rb +38 -41
- data/kinde_api/lib/kinde_api/models/user_profile_v2.rb +113 -79
- data/kinde_api/lib/kinde_api/models/users_response.rb +57 -54
- data/kinde_api/lib/kinde_api/models/users_response_users_inner.rb +138 -98
- data/kinde_api/lib/kinde_api/models/webhook.rb +267 -0
- data/kinde_api/lib/kinde_api/version.rb +12 -12
- data/kinde_api/lib/kinde_api.rb +188 -36
- data/kinde_api/spec/api/billing_agreements_api_spec.rb +62 -0
- data/kinde_api/spec/api/billing_entitlements_api_spec.rb +52 -0
- data/kinde_api/spec/api/billing_meter_usage_api_spec.rb +47 -0
- data/kinde_api/spec/api/connections_api_spec.rb +112 -0
- data/kinde_api/spec/api/environment_variables_api_spec.rb +95 -0
- data/kinde_api/spec/api/identities_api_spec.rb +72 -0
- data/kinde_api/spec/api/mfa_api_spec.rb +47 -0
- data/kinde_api/spec/api/properties_api_spec.rb +87 -0
- data/kinde_api/spec/api/property_categories_api_spec.rb +75 -0
- data/kinde_api/spec/api/search_api_spec.rb +52 -0
- data/kinde_api/spec/api/webhooks_api_spec.rb +106 -0
- data/kinde_api/spec/api_client_spec.rb +27 -21
- data/kinde_api/spec/configuration_spec.rb +14 -14
- data/kinde_api/spec/models/add_api_scope_request_spec.rb +40 -0
- data/kinde_api/spec/models/add_role_scope_request_spec.rb +34 -0
- data/kinde_api/spec/models/add_role_scope_response_spec.rb +40 -0
- data/kinde_api/spec/models/authorize_app_api_response_spec.rb +52 -0
- data/kinde_api/spec/models/category_spec.rb +40 -0
- data/kinde_api/spec/models/connection_connection_spec.rb +52 -0
- data/kinde_api/spec/models/connection_spec.rb +46 -0
- data/kinde_api/spec/models/create_api_scopes_response_scope_spec.rb +34 -0
- data/kinde_api/spec/models/create_api_scopes_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_apis_response_api_spec.rb +34 -0
- data/kinde_api/spec/models/create_apis_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_billing_agreement_request_spec.rb +52 -0
- data/kinde_api/spec/models/create_category_request_spec.rb +44 -0
- data/kinde_api/spec/models/create_category_response_category_spec.rb +34 -0
- data/kinde_api/spec/models/create_category_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_connection_request_options_one_of1_spec.rb +82 -0
- data/kinde_api/spec/models/create_connection_request_options_one_of2_spec.rb +100 -0
- data/kinde_api/spec/models/create_connection_request_options_one_of_spec.rb +46 -0
- data/kinde_api/spec/models/create_connection_request_options_spec.rb +31 -0
- data/kinde_api/spec/models/create_connection_request_spec.rb +68 -0
- data/kinde_api/spec/models/create_connection_response_connection_spec.rb +34 -0
- data/kinde_api/spec/models/create_connection_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_environment_variable_request_spec.rb +46 -0
- data/kinde_api/spec/models/create_environment_variable_response_environment_variable_spec.rb +34 -0
- data/kinde_api/spec/models/create_environment_variable_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_identity_response_identity_spec.rb +34 -0
- data/kinde_api/spec/models/create_identity_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_meter_usage_record_request_spec.rb +62 -0
- data/kinde_api/spec/models/create_meter_usage_record_response_spec.rb +40 -0
- data/kinde_api/spec/models/create_property_request_spec.rb +78 -0
- data/kinde_api/spec/models/create_property_response_property_spec.rb +34 -0
- data/kinde_api/spec/models/create_property_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_roles_response_role_spec.rb +34 -0
- data/kinde_api/spec/models/create_roles_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_user_identity_request_spec.rb +56 -0
- data/kinde_api/spec/models/create_web_hook_request_spec.rb +52 -0
- data/kinde_api/spec/models/create_webhook_response_spec.rb +46 -0
- data/kinde_api/spec/models/create_webhook_response_webhook_spec.rb +40 -0
- data/kinde_api/spec/models/delete_api_response_spec.rb +40 -0
- data/kinde_api/spec/models/delete_environment_variable_response_spec.rb +40 -0
- data/kinde_api/spec/models/delete_role_scope_response_spec.rb +40 -0
- data/kinde_api/spec/models/delete_webhook_response_spec.rb +40 -0
- data/kinde_api/spec/models/environment_variable_spec.rb +58 -0
- data/kinde_api/spec/models/event_type_spec.rb +58 -0
- data/kinde_api/spec/models/get_api_response_api_applications_inner_spec.rb +56 -0
- data/kinde_api/spec/models/get_api_response_api_scopes_inner_spec.rb +40 -0
- data/kinde_api/spec/models/get_api_response_api_spec.rb +64 -0
- data/kinde_api/spec/models/get_api_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_api_scope_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_api_scopes_response_scopes_inner_spec.rb +46 -0
- data/kinde_api/spec/models/get_api_scopes_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_apis_response_apis_inner_scopes_inner_spec.rb +40 -0
- data/kinde_api/spec/models/get_apis_response_apis_inner_spec.rb +58 -0
- data/kinde_api/spec/models/get_apis_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_billing_agreements_response_agreements_inner_entitlements_inner_spec.rb +40 -0
- data/kinde_api/spec/models/get_billing_agreements_response_agreements_inner_spec.rb +58 -0
- data/kinde_api/spec/models/get_billing_agreements_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_billing_entitlements_response_entitlements_inner_spec.rb +76 -0
- data/kinde_api/spec/models/get_billing_entitlements_response_plans_inner_spec.rb +40 -0
- data/kinde_api/spec/models/get_billing_entitlements_response_spec.rb +58 -0
- data/kinde_api/spec/models/get_business_response_business_spec.rb +94 -0
- data/kinde_api/spec/models/get_business_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_categories_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_connections_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_environment_response_environment_background_color_spec.rb +46 -0
- data/kinde_api/spec/models/get_environment_response_environment_link_color_spec.rb +46 -0
- data/kinde_api/spec/models/get_environment_response_environment_spec.rb +192 -0
- data/kinde_api/spec/models/get_environment_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_environment_variable_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_environment_variables_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_event_response_event_spec.rb +58 -0
- data/kinde_api/spec/models/get_event_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_event_types_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_identities_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_industries_response_industries_inner_spec.rb +40 -0
- data/kinde_api/spec/models/get_industries_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_organization_response_billing_agreements_inner_spec.rb +40 -0
- data/kinde_api/spec/models/get_organization_response_billing_spec.rb +40 -0
- data/kinde_api/spec/models/get_organization_response_spec.rb +204 -0
- data/kinde_api/spec/models/get_properties_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_property_values_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_role_response_role_spec.rb +58 -0
- data/kinde_api/spec/models/get_role_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_timezones_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_timezones_response_timezones_inner_spec.rb +40 -0
- data/kinde_api/spec/models/get_user_mfa_response_mfa_spec.rb +70 -0
- data/kinde_api/spec/models/get_user_mfa_response_spec.rb +46 -0
- data/kinde_api/spec/models/get_user_sessions_response_sessions_inner_spec.rb +100 -0
- data/kinde_api/spec/models/get_user_sessions_response_spec.rb +52 -0
- data/kinde_api/spec/models/get_webhooks_response_spec.rb +46 -0
- data/kinde_api/spec/models/identity_spec.rb +82 -0
- data/kinde_api/spec/models/not_found_response_errors_spec.rb +40 -0
- data/kinde_api/spec/models/not_found_response_spec.rb +34 -0
- data/kinde_api/spec/models/organization_item_schema_spec.rb +64 -0
- data/kinde_api/spec/models/property_spec.rb +64 -0
- data/kinde_api/spec/models/property_value_spec.rb +58 -0
- data/kinde_api/spec/models/read_env_logo_response_logos_inner_spec.rb +40 -0
- data/kinde_api/spec/models/read_env_logo_response_spec.rb +46 -0
- data/kinde_api/spec/models/read_logo_response_logos_inner_spec.rb +46 -0
- data/kinde_api/spec/models/read_logo_response_spec.rb +46 -0
- data/kinde_api/spec/models/replace_connection_request_options_one_of1_spec.rb +88 -0
- data/kinde_api/spec/models/replace_connection_request_options_one_of_spec.rb +76 -0
- data/kinde_api/spec/models/replace_connection_request_options_spec.rb +31 -0
- data/kinde_api/spec/models/replace_connection_request_spec.rb +52 -0
- data/kinde_api/spec/models/replace_mfa_request_spec.rb +48 -0
- data/kinde_api/spec/models/replace_organization_mfa_request_spec.rb +38 -0
- data/kinde_api/spec/models/role_permissions_response_spec.rb +52 -0
- data/kinde_api/spec/models/role_scopes_response_spec.rb +46 -0
- data/kinde_api/spec/models/scopes_spec.rb +52 -0
- data/kinde_api/spec/models/search_users_response_results_inner_spec.rb +118 -0
- data/kinde_api/spec/models/search_users_response_spec.rb +46 -0
- data/kinde_api/spec/models/set_user_password_request_spec.rb +66 -0
- data/kinde_api/spec/models/update_api_scope_request_spec.rb +34 -0
- data/kinde_api/spec/models/update_application_tokens_request_spec.rb +58 -0
- data/kinde_api/spec/models/update_applications_property_request_spec.rb +34 -0
- data/kinde_api/spec/models/update_applications_property_request_value_spec.rb +31 -0
- data/kinde_api/spec/models/update_business_request_spec.rb +88 -0
- data/kinde_api/spec/models/update_category_request_spec.rb +34 -0
- data/kinde_api/spec/models/update_connection_request_spec.rb +52 -0
- data/kinde_api/spec/models/update_environment_variable_request_spec.rb +46 -0
- data/kinde_api/spec/models/update_environment_variable_response_spec.rb +40 -0
- data/kinde_api/spec/models/update_identity_request_spec.rb +34 -0
- data/kinde_api/spec/models/update_organization_properties_request_spec.rb +34 -0
- data/kinde_api/spec/models/update_organization_sessions_request_spec.rb +56 -0
- data/kinde_api/spec/models/update_property_request_spec.rb +52 -0
- data/kinde_api/spec/models/update_web_hook_request_spec.rb +46 -0
- data/kinde_api/spec/models/update_webhook_response_spec.rb +46 -0
- data/kinde_api/spec/models/update_webhook_response_webhook_spec.rb +34 -0
- data/kinde_api/spec/models/webhook_spec.rb +64 -0
- data/kinde_api/spec/spec_helper.rb +63 -61
- data/lib/kinde_sdk/client/entitlements.rb +86 -0
- data/lib/kinde_sdk/client/feature_flags.rb +246 -10
- data/lib/kinde_sdk/client/permissions.rb +197 -6
- data/lib/kinde_sdk/client/roles.rb +218 -0
- data/lib/kinde_sdk/client.rb +354 -14
- data/lib/kinde_sdk/configuration.rb +11 -1
- data/lib/kinde_sdk/current.rb +16 -0
- data/lib/kinde_sdk/engine.rb +11 -0
- data/lib/kinde_sdk/errors.rb +7 -0
- data/lib/kinde_sdk/internal/frontend_client.rb +111 -0
- data/lib/kinde_sdk/middleware.rb +16 -0
- data/lib/kinde_sdk/token_manager.rb +85 -0
- data/lib/kinde_sdk/token_store.rb +29 -0
- data/lib/kinde_sdk/version.rb +1 -1
- data/lib/kinde_sdk.rb +160 -25
- data/spec/examples.txt +29 -0
- data/spec/kinde_sdk_spec.rb +317 -98
- data/spec/spec_helper.rb +7 -4
- metadata +666 -10
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
=begin
|
|
2
|
+
#Kinde Management API
|
|
3
|
+
|
|
4
|
+
# Provides endpoints to manage your Kinde Businesses. ## Intro ## How to use 1. [Set up and authorize a machine-to-machine (M2M) application](https://docs.kinde.com/developer-tools/kinde-api/connect-to-kinde-api/). 2. [Generate a test access token](https://docs.kinde.com/developer-tools/kinde-api/access-token-for-api/) 3. Test request any endpoint using the test token
|
|
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
|
|
2
12
|
|
|
3
13
|
require 'date'
|
|
4
14
|
require 'json'
|
|
@@ -23,7 +33,6 @@ module KindeApi
|
|
|
23
33
|
@config = config
|
|
24
34
|
@user_agent = "OpenAPI-Generator/#{VERSION}/ruby"
|
|
25
35
|
@default_headers = {
|
|
26
|
-
'Accept-Encoding' => '*',
|
|
27
36
|
'Content-Type' => 'application/json',
|
|
28
37
|
'User-Agent' => @user_agent
|
|
29
38
|
}
|
|
@@ -41,25 +50,31 @@ module KindeApi
|
|
|
41
50
|
request = build_request(http_method, path, opts)
|
|
42
51
|
response = request.run
|
|
43
52
|
|
|
44
|
-
|
|
53
|
+
if @config.debugging
|
|
54
|
+
@config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
|
55
|
+
end
|
|
45
56
|
|
|
46
57
|
unless response.success?
|
|
47
58
|
if response.timed_out?
|
|
48
|
-
|
|
49
|
-
elsif response.code
|
|
59
|
+
fail ApiError.new('Connection timed out')
|
|
60
|
+
elsif response.code == 0
|
|
50
61
|
# Errors from libcurl will be made visible here
|
|
51
|
-
|
|
52
|
-
|
|
62
|
+
fail ApiError.new(:code => 0,
|
|
63
|
+
:message => response.return_message)
|
|
53
64
|
else
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
65
|
+
fail ApiError.new(:code => response.code,
|
|
66
|
+
:response_headers => response.headers,
|
|
67
|
+
:response_body => response.body),
|
|
68
|
+
response.status_message
|
|
58
69
|
end
|
|
59
70
|
end
|
|
60
71
|
|
|
61
|
-
|
|
62
|
-
|
|
72
|
+
if opts[:return_type]
|
|
73
|
+
data = deserialize(response, opts[:return_type])
|
|
74
|
+
else
|
|
75
|
+
data = nil
|
|
76
|
+
end
|
|
77
|
+
return data, response.code, response.headers
|
|
63
78
|
end
|
|
64
79
|
|
|
65
80
|
# Builds the HTTP request
|
|
@@ -86,26 +101,28 @@ module KindeApi
|
|
|
86
101
|
_verify_ssl_host = @config.verify_ssl_host ? 2 : 0
|
|
87
102
|
|
|
88
103
|
req_opts = {
|
|
89
|
-
method
|
|
90
|
-
headers
|
|
91
|
-
params
|
|
92
|
-
params_encoding
|
|
93
|
-
timeout
|
|
94
|
-
ssl_verifypeer
|
|
95
|
-
ssl_verifyhost
|
|
96
|
-
sslcert
|
|
97
|
-
sslkey
|
|
98
|
-
verbose
|
|
99
|
-
followlocation
|
|
104
|
+
:method => http_method,
|
|
105
|
+
:headers => header_params,
|
|
106
|
+
:params => query_params,
|
|
107
|
+
:params_encoding => @config.params_encoding,
|
|
108
|
+
:timeout => @config.timeout,
|
|
109
|
+
:ssl_verifypeer => @config.verify_ssl,
|
|
110
|
+
:ssl_verifyhost => _verify_ssl_host,
|
|
111
|
+
:sslcert => @config.cert_file,
|
|
112
|
+
:sslkey => @config.key_file,
|
|
113
|
+
:verbose => @config.debugging,
|
|
114
|
+
:followlocation => follow_location
|
|
100
115
|
}
|
|
101
116
|
|
|
102
117
|
# set custom cert, if provided
|
|
103
118
|
req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
|
|
104
119
|
|
|
105
|
-
if
|
|
120
|
+
if [:post, :patch, :put, :delete].include?(http_method)
|
|
106
121
|
req_body = build_request_body(header_params, form_params, opts[:body])
|
|
107
|
-
req_opts.update body
|
|
108
|
-
|
|
122
|
+
req_opts.update :body => req_body
|
|
123
|
+
if @config.debugging
|
|
124
|
+
@config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
|
|
125
|
+
end
|
|
109
126
|
end
|
|
110
127
|
|
|
111
128
|
request = Typhoeus::Request.new(url, req_opts)
|
|
@@ -122,16 +139,16 @@ module KindeApi
|
|
|
122
139
|
def build_request_body(header_params, form_params, body)
|
|
123
140
|
# http form
|
|
124
141
|
if header_params['Content-Type'] == 'application/x-www-form-urlencoded' ||
|
|
125
|
-
|
|
142
|
+
header_params['Content-Type'] == 'multipart/form-data'
|
|
126
143
|
data = {}
|
|
127
144
|
form_params.each do |key, value|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
145
|
+
case value
|
|
146
|
+
when ::File, ::Array, nil
|
|
147
|
+
# let typhoeus handle File, Array and nil parameters
|
|
148
|
+
data[key] = value
|
|
149
|
+
else
|
|
150
|
+
data[key] = value.to_s
|
|
151
|
+
end
|
|
135
152
|
end
|
|
136
153
|
elsif body
|
|
137
154
|
data = body.is_a?(String) ? body : body.to_json
|
|
@@ -159,22 +176,22 @@ module KindeApi
|
|
|
159
176
|
else
|
|
160
177
|
prefix = 'download-'
|
|
161
178
|
end
|
|
162
|
-
prefix
|
|
179
|
+
prefix = prefix + '-' unless prefix.end_with?('-')
|
|
163
180
|
encoding = response.body.encoding
|
|
164
|
-
tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding:)
|
|
181
|
+
tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
|
165
182
|
@tempfile = tempfile
|
|
166
183
|
end
|
|
167
184
|
request.on_body do |chunk|
|
|
168
185
|
chunk.force_encoding(encoding)
|
|
169
186
|
tempfile.write(chunk)
|
|
170
187
|
end
|
|
171
|
-
request.on_complete do |
|
|
188
|
+
request.on_complete do |response|
|
|
172
189
|
if tempfile
|
|
173
190
|
tempfile.close
|
|
174
191
|
@config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
|
|
175
192
|
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
|
176
193
|
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
|
177
|
-
|
|
194
|
+
"explicitly with `tempfile.delete`"
|
|
178
195
|
end
|
|
179
196
|
end
|
|
180
197
|
end
|
|
@@ -184,15 +201,11 @@ module KindeApi
|
|
|
184
201
|
# application/json
|
|
185
202
|
# application/json; charset=UTF8
|
|
186
203
|
# APPLICATION/JSON
|
|
187
|
-
# text/plain
|
|
188
|
-
# text/plain; charset=utf-8
|
|
189
204
|
# */*
|
|
190
205
|
# @param [String] mime MIME
|
|
191
206
|
# @return [Boolean] True if the MIME is application/json
|
|
192
207
|
def json_mime?(mime)
|
|
193
|
-
|
|
194
|
-
result = %w[*/* application/json text/plain].find { |i| i == prepared_mime }
|
|
195
|
-
result != nil
|
|
208
|
+
(mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
|
|
196
209
|
end
|
|
197
210
|
|
|
198
211
|
# Deserialize the response to the given return type.
|
|
@@ -214,14 +227,16 @@ module KindeApi
|
|
|
214
227
|
# ensuring a default content type
|
|
215
228
|
content_type = response.headers['Content-Type'] || 'application/json'
|
|
216
229
|
|
|
217
|
-
|
|
230
|
+
fail "Content-Type is not supported: #{content_type}" unless json_mime?(content_type)
|
|
218
231
|
|
|
219
232
|
begin
|
|
220
|
-
data = JSON.parse("[#{body}]", symbolize_names
|
|
233
|
+
data = JSON.parse("[#{body}]", :symbolize_names => true)[0]
|
|
221
234
|
rescue JSON::ParserError => e
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
235
|
+
if %w(String Date Time).include?(return_type)
|
|
236
|
+
data = body
|
|
237
|
+
else
|
|
238
|
+
raise e
|
|
239
|
+
end
|
|
225
240
|
end
|
|
226
241
|
|
|
227
242
|
convert_to_type data, return_type
|
|
@@ -233,7 +248,6 @@ module KindeApi
|
|
|
233
248
|
# @return [Mixed] Data in a particular type
|
|
234
249
|
def convert_to_type(data, return_type)
|
|
235
250
|
return nil if data.nil?
|
|
236
|
-
|
|
237
251
|
case return_type
|
|
238
252
|
when 'String'
|
|
239
253
|
data.to_s
|
|
@@ -254,11 +268,11 @@ module KindeApi
|
|
|
254
268
|
data
|
|
255
269
|
when /\AArray<(.+)>\z/
|
|
256
270
|
# e.g. Array<Pet>
|
|
257
|
-
sub_type =
|
|
271
|
+
sub_type = $1
|
|
258
272
|
data.map { |item| convert_to_type(item, sub_type) }
|
|
259
|
-
when /\AHash
|
|
273
|
+
when /\AHash\<String, (.+)\>\z/
|
|
260
274
|
# e.g. Hash<String, Integer>
|
|
261
|
-
sub_type =
|
|
275
|
+
sub_type = $1
|
|
262
276
|
{}.tap do |hash|
|
|
263
277
|
data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
|
|
264
278
|
end
|
|
@@ -275,13 +289,13 @@ module KindeApi
|
|
|
275
289
|
# @param [String] filename the filename to be sanitized
|
|
276
290
|
# @return [String] the sanitized filename
|
|
277
291
|
def sanitize_filename(filename)
|
|
278
|
-
filename.gsub(
|
|
292
|
+
filename.gsub(/.*[\/\\]/, '')
|
|
279
293
|
end
|
|
280
294
|
|
|
281
|
-
def build_request_url(path,
|
|
295
|
+
def build_request_url(path, opts = {})
|
|
282
296
|
# Add leading and trailing slashes to path
|
|
283
|
-
path = "/#{path}".gsub(
|
|
284
|
-
@config.base_url + path
|
|
297
|
+
path = "/#{path}".gsub(/\/+/, '/')
|
|
298
|
+
@config.base_url(opts[:operation]) + path
|
|
285
299
|
end
|
|
286
300
|
|
|
287
301
|
# Update header and query params based on authentication settings.
|
|
@@ -293,11 +307,10 @@ module KindeApi
|
|
|
293
307
|
Array(auth_names).each do |auth_name|
|
|
294
308
|
auth_setting = @config.auth_settings[auth_name]
|
|
295
309
|
next unless auth_setting
|
|
296
|
-
|
|
297
310
|
case auth_setting[:in]
|
|
298
311
|
when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
|
|
299
312
|
when 'query' then query_params[auth_setting[:key]] = auth_setting[:value]
|
|
300
|
-
else
|
|
313
|
+
else fail ArgumentError, 'Authentication token must be in `query` or `header`'
|
|
301
314
|
end
|
|
302
315
|
end
|
|
303
316
|
end
|
|
@@ -315,7 +328,6 @@ module KindeApi
|
|
|
315
328
|
# @return [String] the Accept header (e.g. application/json)
|
|
316
329
|
def select_header_accept(accepts)
|
|
317
330
|
return nil if accepts.nil? || accepts.empty?
|
|
318
|
-
|
|
319
331
|
# use JSON when present, otherwise use all of the provided
|
|
320
332
|
json_accept = accepts.find { |s| json_mime?(s) }
|
|
321
333
|
json_accept || accepts.join(',')
|
|
@@ -327,7 +339,6 @@ module KindeApi
|
|
|
327
339
|
def select_header_content_type(content_types)
|
|
328
340
|
# return nil by default
|
|
329
341
|
return if content_types.nil? || content_types.empty?
|
|
330
|
-
|
|
331
342
|
# use JSON when present, otherwise use the first one
|
|
332
343
|
json_content_type = content_types.find { |s| json_mime?(s) }
|
|
333
344
|
json_content_type || content_types.first
|
|
@@ -338,12 +349,12 @@ module KindeApi
|
|
|
338
349
|
# @return [String] JSON string representation of the object
|
|
339
350
|
def object_to_http_body(model)
|
|
340
351
|
return model if model.nil? || model.is_a?(String)
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
352
|
+
local_body = nil
|
|
353
|
+
if model.is_a?(Array)
|
|
354
|
+
local_body = model.map { |m| object_to_hash(m) }
|
|
355
|
+
else
|
|
356
|
+
local_body = object_to_hash(model)
|
|
357
|
+
end
|
|
347
358
|
local_body.to_json
|
|
348
359
|
end
|
|
349
360
|
|
|
@@ -374,7 +385,7 @@ module KindeApi
|
|
|
374
385
|
# return the array directly as typhoeus will handle it as expected
|
|
375
386
|
param
|
|
376
387
|
else
|
|
377
|
-
|
|
388
|
+
fail "unknown collection format: #{collection_format.inspect}"
|
|
378
389
|
end
|
|
379
390
|
end
|
|
380
391
|
end
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
#
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
=begin
|
|
2
|
+
#Kinde Management API
|
|
3
|
+
|
|
4
|
+
# Provides endpoints to manage your Kinde Businesses. ## Intro ## How to use 1. [Set up and authorize a machine-to-machine (M2M) application](https://docs.kinde.com/developer-tools/kinde-api/connect-to-kinde-api/). 2. [Generate a test access token](https://docs.kinde.com/developer-tools/kinde-api/access-token-for-api/) 3. Test request any endpoint using the test token
|
|
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
12
|
|
|
13
13
|
module KindeApi
|
|
14
14
|
class ApiError < StandardError
|
|
@@ -42,11 +42,11 @@ module KindeApi
|
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def message
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
if @message.nil?
|
|
46
|
+
msg = "Error message: the server returns an error"
|
|
47
|
+
else
|
|
48
|
+
msg = @message
|
|
49
|
+
end
|
|
50
50
|
|
|
51
51
|
msg += "\nHTTP status code: #{code}" if code
|
|
52
52
|
msg += "\nResponse headers: #{response_headers}" if response_headers
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
#
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
=begin
|
|
2
|
+
#Kinde Management API
|
|
3
|
+
|
|
4
|
+
# Provides endpoints to manage your Kinde Businesses. ## Intro ## How to use 1. [Set up and authorize a machine-to-machine (M2M) application](https://docs.kinde.com/developer-tools/kinde-api/connect-to-kinde-api/). 2. [Generate a test access token](https://docs.kinde.com/developer-tools/kinde-api/access-token-for-api/) 3. Test request any endpoint using the test token
|
|
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
12
|
|
|
13
13
|
module KindeApi
|
|
14
14
|
class Configuration
|
|
@@ -21,6 +21,18 @@ module KindeApi
|
|
|
21
21
|
# Defines url base path
|
|
22
22
|
attr_accessor :base_path
|
|
23
23
|
|
|
24
|
+
# Define server configuration index
|
|
25
|
+
attr_accessor :server_index
|
|
26
|
+
|
|
27
|
+
# Define server operation configuration index
|
|
28
|
+
attr_accessor :server_operation_index
|
|
29
|
+
|
|
30
|
+
# Default server variables
|
|
31
|
+
attr_accessor :server_variables
|
|
32
|
+
|
|
33
|
+
# Default server operation variables
|
|
34
|
+
attr_accessor :server_operation_variables
|
|
35
|
+
|
|
24
36
|
# Defines API keys used with API Key authentications.
|
|
25
37
|
#
|
|
26
38
|
# @return [Hash] key: parameter name, value: parameter value (API key)
|
|
@@ -126,12 +138,19 @@ module KindeApi
|
|
|
126
138
|
# https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
|
|
127
139
|
attr_accessor :params_encoding
|
|
128
140
|
|
|
129
|
-
|
|
141
|
+
|
|
142
|
+
attr_accessor :inject_format
|
|
143
|
+
|
|
144
|
+
attr_accessor :force_ending_format
|
|
130
145
|
|
|
131
146
|
def initialize
|
|
132
147
|
@scheme = 'https'
|
|
133
|
-
@host = '
|
|
148
|
+
@host = 'your_kinde_subdomain.kinde.com'
|
|
134
149
|
@base_path = ''
|
|
150
|
+
@server_index = 0
|
|
151
|
+
@server_operation_index = {}
|
|
152
|
+
@server_variables = {}
|
|
153
|
+
@server_operation_variables = {}
|
|
135
154
|
@api_key = {}
|
|
136
155
|
@api_key_prefix = {}
|
|
137
156
|
@client_side_validation = true
|
|
@@ -144,7 +163,7 @@ module KindeApi
|
|
|
144
163
|
@debugging = false
|
|
145
164
|
@inject_format = false
|
|
146
165
|
@force_ending_format = false
|
|
147
|
-
@logger = defined?(Rails) ? Rails.logger : Logger.new(
|
|
166
|
+
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
|
148
167
|
|
|
149
168
|
yield(self) if block_given?
|
|
150
169
|
end
|
|
@@ -160,23 +179,26 @@ module KindeApi
|
|
|
160
179
|
|
|
161
180
|
def scheme=(scheme)
|
|
162
181
|
# remove :// from scheme
|
|
163
|
-
@scheme = scheme.sub(
|
|
182
|
+
@scheme = scheme.sub(/:\/\//, '')
|
|
164
183
|
end
|
|
165
184
|
|
|
166
185
|
def host=(host)
|
|
167
186
|
# remove http(s):// and anything after a slash
|
|
168
|
-
@host = host.sub(
|
|
187
|
+
@host = host.sub(/https?:\/\//, '').split('/').first
|
|
169
188
|
end
|
|
170
189
|
|
|
171
190
|
def base_path=(base_path)
|
|
172
191
|
# Add leading and trailing slashes to base_path
|
|
173
|
-
@base_path = "/#{base_path}".gsub(
|
|
192
|
+
@base_path = "/#{base_path}".gsub(/\/+/, '/')
|
|
174
193
|
@base_path = '' if @base_path == '/'
|
|
175
194
|
end
|
|
176
195
|
|
|
177
196
|
# Returns base URL for specified operation based on server settings
|
|
178
|
-
def base_url
|
|
179
|
-
|
|
197
|
+
def base_url(operation = nil)
|
|
198
|
+
index = server_operation_index.fetch(operation, server_index)
|
|
199
|
+
return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if index == nil
|
|
200
|
+
|
|
201
|
+
server_url(index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
|
|
180
202
|
end
|
|
181
203
|
|
|
182
204
|
# Gets API key (with prefix if set).
|
|
@@ -193,14 +215,13 @@ module KindeApi
|
|
|
193
215
|
|
|
194
216
|
# Gets access_token using access_token_getter or uses the static access_token
|
|
195
217
|
def access_token_with_refresh
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
access_token_getter.call
|
|
218
|
+
return access_token if access_token_getter.nil?
|
|
219
|
+
access_token_getter.call
|
|
199
220
|
end
|
|
200
221
|
|
|
201
222
|
# Gets Basic Auth token string
|
|
202
223
|
def basic_auth_token
|
|
203
|
-
|
|
224
|
+
'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
|
|
204
225
|
end
|
|
205
226
|
|
|
206
227
|
# Returns Auth Settings hash for api client.
|
|
@@ -213,8 +234,64 @@ module KindeApi
|
|
|
213
234
|
format: 'JWT',
|
|
214
235
|
key: 'Authorization',
|
|
215
236
|
value: "Bearer #{access_token_with_refresh}"
|
|
216
|
-
}
|
|
237
|
+
},
|
|
217
238
|
}
|
|
218
239
|
end
|
|
240
|
+
|
|
241
|
+
# Returns an array of Server setting
|
|
242
|
+
def server_settings
|
|
243
|
+
[
|
|
244
|
+
{
|
|
245
|
+
url: "https://{subdomain}.kinde.com",
|
|
246
|
+
description: "No description provided",
|
|
247
|
+
variables: {
|
|
248
|
+
subdomain: {
|
|
249
|
+
description: "The subdomain generated for your business on Kinde.",
|
|
250
|
+
default_value: "your_kinde_subdomain",
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
def operation_server_settings
|
|
258
|
+
{
|
|
259
|
+
}
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Returns URL based on server settings
|
|
263
|
+
#
|
|
264
|
+
# @param index array index of the server settings
|
|
265
|
+
# @param variables hash of variable and the corresponding value
|
|
266
|
+
def server_url(index, variables = {}, servers = nil)
|
|
267
|
+
servers = server_settings if servers == nil
|
|
268
|
+
|
|
269
|
+
# check array index out of bound
|
|
270
|
+
if (index < 0 || index >= servers.size)
|
|
271
|
+
fail ArgumentError, "Invalid index #{index} when selecting the server. Must be less than #{servers.size}"
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
server = servers[index]
|
|
275
|
+
url = server[:url]
|
|
276
|
+
|
|
277
|
+
return url unless server.key? :variables
|
|
278
|
+
|
|
279
|
+
# go through variable and assign a value
|
|
280
|
+
server[:variables].each do |name, variable|
|
|
281
|
+
if variables.key?(name)
|
|
282
|
+
if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name]))
|
|
283
|
+
url.gsub! "{" + name.to_s + "}", variables[name]
|
|
284
|
+
else
|
|
285
|
+
fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
|
|
286
|
+
end
|
|
287
|
+
else
|
|
288
|
+
# use default value
|
|
289
|
+
url.gsub! "{" + name.to_s + "}", server[:variables][name][:default_value]
|
|
290
|
+
end
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
url
|
|
294
|
+
end
|
|
295
|
+
|
|
219
296
|
end
|
|
220
297
|
end
|