├── .babelrc ├── .github └── workflows │ └── run-tests.yml ├── .gitignore ├── .openapi-generator-ignore ├── .openapi-generator ├── FILES └── VERSION ├── .travis.yml ├── LICENSE ├── README.md ├── docs ├── AddOrganizationUsers200Response.md ├── AddOrganizationUsersRequest.md ├── AddOrganizationUsersResponse.md ├── ApiResult.md ├── ConnectedAppsAccessToken.md ├── ConnectedAppsApi.md ├── ConnectedAppsAuthUrl.md ├── CreateOrganizationRequest.md ├── CreateOrganizationResponse.md ├── CreateUser200Response.md ├── CreateUserRequest.md ├── CreateUserRequestIdentitiesInner.md ├── CreateUserRequestIdentitiesInnerDetails.md ├── CreateUserRequestProfile.md ├── CreateUserResponse.md ├── EnvironmentsApi.md ├── Error.md ├── ErrorResponse.md ├── FeatureFlagsApi.md ├── GetOrganizationsResponse.md ├── GetOrganizationsUsersResponse.md ├── OAuthApi.md ├── Organization.md ├── OrganizationUser.md ├── OrganizationsApi.md ├── RemoveOrganizationUsers200Response.md ├── RemoveOrganizationUsersRequest.md ├── RemoveOrganizationUsersResponse.md ├── SuccessResponse.md ├── UpdateOrganizationRequest.md ├── UpdateUserRequest.md ├── User.md ├── UserIdentity.md ├── UserIdentityResult.md ├── UserProfile.md ├── UserProfileV2.md ├── UsersApi.md └── UsersResponse.md ├── git_push.sh ├── mocha.opts ├── package-lock.json ├── package.json ├── src ├── ApiClient.js ├── KindeClient.js ├── api │ ├── CallbacksApi.js │ ├── ConnectedAppsApi.js │ ├── EnvironmentsApi.js │ ├── FeatureFlagsApi.js │ ├── OAuthApi.js │ ├── OrganizationsApi.js │ ├── PermissionsApi.js │ ├── RolesApi.js │ └── UsersApi.js ├── index.js ├── model │ ├── AddOrganizationUsersRequest.js │ ├── AddOrganizationUsersRequestUsersInner.js │ ├── AddOrganizationUsersResponse.js │ ├── ApiResult.js │ ├── Application.js │ ├── ConnectedAppsAccessToken.js │ ├── ConnectedAppsAuthUrl.js │ ├── CreateOrganizationRequest.js │ ├── CreateOrganizationResponse.js │ ├── CreateOrganizationResponseOrganization.js │ ├── CreateOrganizationUserRoleRequest.js │ ├── CreatePermissionRequest.js │ ├── CreateRoleRequest.js │ ├── CreateUserRequest.js │ ├── CreateUserRequestIdentitiesInner.js │ ├── CreateUserRequestIdentitiesInnerDetails.js │ ├── CreateUserRequestProfile.js │ ├── CreateUserResponse.js │ ├── Error.js │ ├── ErrorResponse.js │ ├── GetApplicationsResponse.js │ ├── GetOrganizationsResponse.js │ ├── GetOrganizationsUserRolesResponse.js │ ├── GetOrganizationsUsersResponse.js │ ├── GetRedirectCallbackUrlsResponse.js │ ├── Organization.js │ ├── OrganizationUser.js │ ├── OrganizationUserRole.js │ ├── Permissions.js │ ├── RedirectCallbackUrls.js │ ├── RemoveOrganizationUsersResponse.js │ ├── Roles.js │ ├── SuccessResponse.js │ ├── UpdateOrganizationRequest.js │ ├── UpdateOrganizationUsersRequest.js │ ├── UpdateOrganizationUsersRequestUsersInner.js │ ├── UpdateUserRequest.js │ ├── User.js │ ├── UserIdentity.js │ ├── UserIdentityResult.js │ ├── UserProfile.js │ ├── UserProfileV2.js │ └── UsersResponse.js └── sdk │ ├── constant │ ├── CookieOptions.js │ ├── FlagDataTypeMap.js │ └── GrantType.js │ ├── oauth2 │ ├── AuthorizationCode.js │ ├── ClientCredentials.js │ ├── PKCE.js │ └── RefreshToken.js │ ├── store │ └── SessionStore.js │ └── utils │ ├── SDKVersion.js │ └── Utils.js └── test ├── api ├── CallbacksApi.spec.js ├── ConnectedAppsApi.spec.js ├── EnvironmentsApi.spec.js ├── FeatureFlagsApi.spec.js ├── OAuthApi.spec.js ├── OrganizationsApi.spec.js ├── PermissionsApi.spec.js ├── RolesApi.spec.js └── UsersApi.spec.js ├── model ├── AddOrganizationUsersRequest.spec.js ├── AddOrganizationUsersRequestUsersInner.spec.js ├── AddOrganizationUsersResponse.spec.js ├── ApiResult.spec.js ├── Application.spec.js ├── ConnectedAppsAccessToken.spec.js ├── ConnectedAppsAuthUrl.spec.js ├── CreateOrganizationRequest.spec.js ├── CreateOrganizationResponse.spec.js ├── CreateOrganizationResponseOrganization.spec.js ├── CreateOrganizationUserRoleRequest.spec.js ├── CreatePermissionRequest.spec.js ├── CreateRoleRequest.spec.js ├── CreateUserRequest.spec.js ├── CreateUserRequestIdentitiesInner.spec.js ├── CreateUserRequestIdentitiesInnerDetails.spec.js ├── CreateUserRequestProfile.spec.js ├── CreateUserResponse.spec.js ├── Error.spec.js ├── ErrorResponse.spec.js ├── GetApplicationsResponse.spec.js ├── GetOrganizationsResponse.spec.js ├── GetOrganizationsUserRolesResponse.spec.js ├── GetOrganizationsUsersResponse.spec.js ├── GetRedirectCallbackUrlsResponse.spec.js ├── Organization.spec.js ├── OrganizationUser.spec.js ├── OrganizationUserRole.spec.js ├── Permissions.spec.js ├── RedirectCallbackUrls.spec.js ├── RemoveOrganizationUsersResponse.spec.js ├── Roles.spec.js ├── SuccessResponse.spec.js ├── UpdateOrganizationRequest.spec.js ├── UpdateOrganizationUsersRequest.spec.js ├── UpdateOrganizationUsersRequestUsersInner.spec.js ├── UpdateUserRequest.spec.js ├── User.spec.js ├── UserIdentity.spec.js ├── UserIdentityResult.spec.js ├── UserProfile.spec.js ├── UserProfileV2.spec.js └── UsersResponse.spec.js └── sdk ├── KindeClient.spec.js ├── OAuth2AuthorizationCode.spec.js ├── OAuth2ClientCredentials.spec.js ├── OAuth2PKCE.spec.js └── OAuth2RefreshToken.spec.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env" 4 | ], 5 | "plugins": [ 6 | "@babel/plugin-syntax-dynamic-import", 7 | "@babel/plugin-syntax-import-meta", 8 | "@babel/plugin-proposal-class-properties", 9 | "@babel/plugin-proposal-json-strings", 10 | [ 11 | "@babel/plugin-proposal-decorators", 12 | { 13 | "legacy": true 14 | } 15 | ], 16 | "@babel/plugin-proposal-function-sent", 17 | "@babel/plugin-proposal-export-namespace-from", 18 | "@babel/plugin-proposal-numeric-separator", 19 | "@babel/plugin-proposal-throw-expressions", 20 | "@babel/plugin-proposal-export-default-from", 21 | "@babel/plugin-proposal-logical-assignment-operators", 22 | "@babel/plugin-proposal-optional-chaining", 23 | [ 24 | "@babel/plugin-proposal-pipeline-operator", 25 | { 26 | "proposal": "minimal" 27 | } 28 | ], 29 | "@babel/plugin-proposal-nullish-coalescing-operator", 30 | "@babel/plugin-proposal-do-expressions", 31 | "@babel/plugin-proposal-function-bind" 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /.github/workflows/run-tests.yml: -------------------------------------------------------------------------------- 1 | name: Run Tests 2 | 3 | on: 4 | pull_request: # Trigger the action when a PR is opened or updated 5 | 6 | jobs: 7 | test: 8 | runs-on: ubuntu-latest # Use an Ubuntu environment 9 | 10 | steps: 11 | - uses: actions/checkout@v4 # Check out repository code 12 | 13 | - name: Set up Node.js # Example for Node.js - adapt for your language 14 | uses: actions/setup-node@v4 15 | 16 | - name: Install dependencies 17 | run: npm ci 18 | 19 | - name: Run tests 20 | run: npm test 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | .pnpm-debug.log* 9 | 10 | # Diagnostic reports (https://nodejs.org/api/report.html) 11 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 12 | 13 | # Runtime data 14 | pids 15 | *.pid 16 | *.seed 17 | *.pid.lock 18 | 19 | # Directory for instrumented libs generated by jscoverage/JSCover 20 | lib-cov 21 | 22 | # Coverage directory used by tools like istanbul 23 | coverage 24 | *.lcov 25 | 26 | # nyc test coverage 27 | .nyc_output 28 | 29 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 30 | .grunt 31 | 32 | # Bower dependency directory (https://bower.io/) 33 | bower_components 34 | 35 | # node-waf configuration 36 | .lock-wscript 37 | 38 | # Compiled binary addons (https://nodejs.org/api/addons.html) 39 | build/Release 40 | 41 | # Dependency directories 42 | node_modules/ 43 | jspm_packages/ 44 | 45 | # Snowpack dependency directory (https://snowpack.dev/) 46 | web_modules/ 47 | 48 | # TypeScript cache 49 | *.tsbuildinfo 50 | 51 | # Optional npm cache directory 52 | .npm 53 | 54 | # Optional eslint cache 55 | .eslintcache 56 | 57 | # Optional stylelint cache 58 | .stylelintcache 59 | 60 | # Microbundle cache 61 | .rpt2_cache/ 62 | .rts2_cache_cjs/ 63 | .rts2_cache_es/ 64 | .rts2_cache_umd/ 65 | 66 | # Optional REPL history 67 | .node_repl_history 68 | 69 | # Output of 'npm pack' 70 | *.tgz 71 | 72 | # Yarn Integrity file 73 | .yarn-integrity 74 | 75 | # dotenv environment variable files 76 | .env 77 | .env.development.local 78 | .env.test.local 79 | .env.production.local 80 | .env.local 81 | 82 | # parcel-bundler cache (https://parceljs.org/) 83 | .cache 84 | .parcel-cache 85 | 86 | # Next.js build output 87 | .next 88 | out 89 | 90 | # Nuxt.js build / generate output 91 | .nuxt 92 | dist 93 | 94 | # Gatsby files 95 | .cache/ 96 | # Comment in the public line in if your project uses Gatsby and not Next.js 97 | # https://nextjs.org/blog/next-9-1#public-directory-support 98 | # public 99 | 100 | # vuepress build output 101 | .vuepress/dist 102 | 103 | # vuepress v2.x temp and cache directory 104 | .temp 105 | .cache 106 | 107 | # Docusaurus cache and generated files 108 | .docusaurus 109 | 110 | # Serverless directories 111 | .serverless/ 112 | 113 | # FuseBox cache 114 | .fusebox/ 115 | 116 | # DynamoDB Local files 117 | .dynamodb/ 118 | 119 | # TernJS port file 120 | .tern-port 121 | 122 | # Stores VSCode versions used for testing VSCode extensions 123 | .vscode-test 124 | 125 | # yarn v2 126 | .yarn/cache 127 | .yarn/unplugged 128 | .yarn/build-state.yml 129 | .yarn/install-state.gz 130 | .pnp.* -------------------------------------------------------------------------------- /.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 6.6.0 -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | cache: npm 3 | node_js: 4 | - "6" 5 | - "6.1" 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Kinde 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Kinde Node.JS 2 | 3 | The Kinde SDK for Node.JS 4 | 5 | You can also view the [NodeJS starter kit here](https://github.com/kinde-starter-kits/kinde-nodejs-starter-kit). 6 | 7 | [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com) [![Kinde Docs](https://img.shields.io/badge/Kinde-Docs-eee?style=flat-square)](https://kinde.com/docs/developer-tools/nodejs-sdk) [![Kinde Community](https://img.shields.io/badge/Kinde-Community-eee?style=flat-square)](https://thekindecommunity.slack.com) 8 | 9 | ## Documentation 10 | 11 | Please refer to the Kinde [Node.JS SDK document](https://kinde.com/docs/developer-tools/nodejs-sdk). 12 | 13 | ## Publishing 14 | 15 | The core team handles publishing. 16 | 17 | ## Contributing 18 | 19 | Please refer to Kinde’s [contributing guidelines](https://github.com/kinde-oss/.github/blob/489e2ca9c3307c2b2e098a885e22f2239116394a/CONTRIBUTING.md). 20 | 21 | ## License 22 | 23 | By contributing to Kinde, you agree that your contributions will be licensed under its MIT License. 24 | -------------------------------------------------------------------------------- /docs/AddOrganizationUsers200Response.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.AddOrganizationUsers200Response 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **message** | **String** | | [optional] 8 | **usersAdd** | **[String]** | | [optional] 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/AddOrganizationUsersRequest.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.AddOrganizationUsersRequest 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **users** | **[String]** | List of user ids to be added to the organization. | [optional] 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/AddOrganizationUsersResponse.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.AddOrganizationUsersResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **code** | **String** | Response code. | [optional] 8 | **message** | **String** | Response message. | [optional] 9 | **usersAdded** | **[String]** | | [optional] 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/ApiResult.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.ApiResult 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **result** | **String** | The result of the api operation. | [optional] 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/ConnectedAppsAccessToken.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.ConnectedAppsAccessToken 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **accessToken** | **String** | The access token to access a third-party provider. | [optional] 8 | **accessTokenExpiry** | **String** | The date and time that the access token expires. | [optional] 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/ConnectedAppsAuthUrl.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.ConnectedAppsAuthUrl 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **url** | **String** | A URL that is used to authenticate an end-user against a connected app. | [optional] 8 | **sessionId** | **String** | A unique identifier for the login session. | [optional] 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/CreateOrganizationRequest.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.CreateOrganizationRequest 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **name** | **String** | The organization's name. | [optional] 8 | **featureFlags** | **{String: String}** | The organization's feature flag settings. | [optional] 9 | **externalId** | **String** | The organization's ID. | [optional] 10 | **backgroundColor** | **String** | The organization's brand settings - background color. | [optional] 11 | **buttonColor** | **String** | The organization's brand settings - button color. | [optional] 12 | **buttonTextColor** | **String** | The organization's brand settings - button text color. | [optional] 13 | **linkColor** | **String** | The organization's brand settings - link color. | [optional] 14 | 15 | 16 | 17 | ## Enum: {String: String} 18 | 19 | 20 | * `str` (value: `"str"`) 21 | 22 | * `int` (value: `"int"`) 23 | 24 | * `bool` (value: `"bool"`) 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /docs/CreateOrganizationResponse.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.CreateOrganizationResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **code** | **String** | The organization's code. | [optional] 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/CreateUser200Response.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.CreateUser200Response 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **String** | Unique id of the user in Kinde | [optional] 8 | **created** | **Boolean** | True if the user was successfully created | [optional] 9 | **identities** | [**[UserIdentity]**](UserIdentity.md) | | [optional] 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/CreateUserRequest.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.CreateUserRequest 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **profile** | [**CreateUserRequestProfile**](CreateUserRequestProfile.md) | | [optional] 8 | **identities** | [**[CreateUserRequestIdentitiesInner]**](CreateUserRequestIdentitiesInner.md) | Array of identities to assign to the created user | [optional] 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/CreateUserRequestIdentitiesInner.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.CreateUserRequestIdentitiesInner 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **type** | **String** | The type of identity to create, for e.g. email. | [optional] 8 | **details** | [**CreateUserRequestIdentitiesInnerDetails**](CreateUserRequestIdentitiesInnerDetails.md) | | [optional] 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/CreateUserRequestIdentitiesInnerDetails.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.CreateUserRequestIdentitiesInnerDetails 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **email** | **String** | The email address of the user. | [optional] 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/CreateUserRequestProfile.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.CreateUserRequestProfile 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **givenName** | **String** | User's first name. | [optional] 8 | **familyName** | **String** | User's last name. | [optional] 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/CreateUserResponse.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.CreateUserResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **String** | Unique id of the user in Kinde. | [optional] 8 | **created** | **Boolean** | True if the user was successfully created. | [optional] 9 | **identities** | [**[UserIdentity]**](UserIdentity.md) | | [optional] 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/Error.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.Error 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **code** | **String** | Error code. | [optional] 8 | **message** | **String** | Error message. | [optional] 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/ErrorResponse.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.ErrorResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **errors** | [**[Error]**](Error.md) | | [optional] 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/GetOrganizationsResponse.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.GetOrganizationsResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **code** | **String** | Response code. | [optional] 8 | **message** | **String** | Response message. | [optional] 9 | **organizations** | [**[Organization]**](Organization.md) | | [optional] 10 | **nextToken** | **String** | Pagination token. | [optional] 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/GetOrganizationsUsersResponse.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.GetOrganizationsUsersResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **code** | **String** | Response code. | [optional] 8 | **message** | **String** | Response message. | [optional] 9 | **organizationUsers** | [**[OrganizationUser]**](OrganizationUser.md) | | [optional] 10 | **nextToken** | **String** | Pagination token. | [optional] 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/OAuthApi.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.OAuthApi 2 | 3 | All URIs are relative to *https://app.kinde.com* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**getUser**](OAuthApi.md#getUser) | **GET** /oauth2/user_profile | Returns the details of the currently logged in user 8 | [**getUserProfileV2**](OAuthApi.md#getUserProfileV2) | **GET** /oauth2/v2/user_profile | Returns the details of the currently logged in user 9 | 10 | 11 | 12 | ## getUser 13 | 14 | > UserProfile getUser() 15 | 16 | Returns the details of the currently logged in user 17 | 18 | Contains the id, names and email of the currently logged in user. 19 | 20 | ### Example 21 | 22 | ```javascript 23 | import KindeManagementApi from 'kinde_management_api'; 24 | let defaultClient = KindeManagementApi.ApiClient.instance; 25 | // Configure Bearer (JWT) access token for authorization: kindeBearerAuth 26 | let kindeBearerAuth = defaultClient.authentications['kindeBearerAuth']; 27 | kindeBearerAuth.accessToken = "YOUR ACCESS TOKEN" 28 | 29 | let apiInstance = new KindeManagementApi.OAuthApi(); 30 | apiInstance.getUser((error, data, response) => { 31 | if (error) { 32 | console.error(error); 33 | } else { 34 | console.log('API called successfully. Returned data: ' + data); 35 | } 36 | }); 37 | ``` 38 | 39 | ### Parameters 40 | 41 | This endpoint does not need any parameter. 42 | 43 | ### Return type 44 | 45 | [**UserProfile**](UserProfile.md) 46 | 47 | ### Authorization 48 | 49 | [kindeBearerAuth](../README.md#kindeBearerAuth) 50 | 51 | ### HTTP request headers 52 | 53 | - **Content-Type**: Not defined 54 | - **Accept**: application/json 55 | 56 | 57 | ## getUserProfileV2 58 | 59 | > UserProfileV2 getUserProfileV2() 60 | 61 | Returns the details of the currently logged in user 62 | 63 | Contains the id, names, profile picture URL and email of the currently logged in user. 64 | 65 | ### Example 66 | 67 | ```javascript 68 | import KindeManagementApi from 'kinde_management_api'; 69 | let defaultClient = KindeManagementApi.ApiClient.instance; 70 | // Configure Bearer (JWT) access token for authorization: kindeBearerAuth 71 | let kindeBearerAuth = defaultClient.authentications['kindeBearerAuth']; 72 | kindeBearerAuth.accessToken = "YOUR ACCESS TOKEN" 73 | 74 | let apiInstance = new KindeManagementApi.OAuthApi(); 75 | apiInstance.getUserProfileV2((error, data, response) => { 76 | if (error) { 77 | console.error(error); 78 | } else { 79 | console.log('API called successfully. Returned data: ' + data); 80 | } 81 | }); 82 | ``` 83 | 84 | ### Parameters 85 | 86 | This endpoint does not need any parameter. 87 | 88 | ### Return type 89 | 90 | [**UserProfileV2**](UserProfileV2.md) 91 | 92 | ### Authorization 93 | 94 | [kindeBearerAuth](../README.md#kindeBearerAuth) 95 | 96 | ### HTTP request headers 97 | 98 | - **Content-Type**: Not defined 99 | - **Accept**: application/json 100 | 101 | -------------------------------------------------------------------------------- /docs/Organization.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.Organization 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **code** | **String** | | [optional] 8 | **name** | **String** | | [optional] 9 | **isDefault** | **Boolean** | | [optional] 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/OrganizationUser.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.OrganizationUser 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **String** | | [optional] 8 | **email** | **String** | | [optional] 9 | **fullName** | **String** | | [optional] 10 | **lastName** | **String** | | [optional] 11 | **firstName** | **String** | | [optional] 12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/RemoveOrganizationUsers200Response.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.RemoveOrganizationUsers200Response 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **message** | **String** | | [optional] 8 | **usersAdded** | **[String]** | | [optional] 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/RemoveOrganizationUsersRequest.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.RemoveOrganizationUsersRequest 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **users** | **[String]** | List of user ids to be removed from the organization. | [optional] 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/RemoveOrganizationUsersResponse.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.RemoveOrganizationUsersResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **message** | **String** | | [optional] 8 | **usersAdded** | **[String]** | | [optional] 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/SuccessResponse.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.SuccessResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **message** | **String** | | [optional] 8 | **code** | **String** | | [optional] 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/UpdateOrganizationRequest.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.UpdateOrganizationRequest 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **name** | **String** | The organization's name. | [optional] 8 | **externalId** | **String** | The organization's ID. | [optional] 9 | **backgroundColor** | **String** | The organization's brand settings - background color. | [optional] 10 | **buttonColor** | **String** | The organization's brand settings - button color. | [optional] 11 | **buttonTextColor** | **String** | The organization's brand settings - button text color. | [optional] 12 | **linkColor** | **String** | The organization's brand settings - link color. | [optional] 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/UpdateUserRequest.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.UpdateUserRequest 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **givenName** | **String** | User's first name. | [optional] 8 | **familyName** | **String** | User's last name. | [optional] 9 | **isSuspended** | **Boolean** | Whether the user is currently suspended or not. | [optional] 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/User.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.User 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **String** | Unique id of the user in Kinde. | [optional] 8 | **email** | **String** | Default email address of the user in Kinde. | [optional] 9 | **lastName** | **String** | User's last name. | [optional] 10 | **firstName** | **String** | User's first name. | [optional] 11 | **isSuspended** | **Boolean** | Whether the user is currently suspended or not. | [optional] 12 | **picture** | **String** | User's profile picture URL. | [optional] 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/UserIdentity.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.UserIdentity 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **type** | **String** | The type of identity object created. | [optional] 8 | **result** | [**UserIdentityResult**](UserIdentityResult.md) | | [optional] 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/UserIdentityResult.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.UserIdentityResult 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **created** | **Boolean** | True if the user identity was successfully created. | [optional] 8 | **identityId** | **Number** | Unique id of the user's identity in Kinde. | [optional] 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/UserProfile.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.UserProfile 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **String** | Unique id of the user in Kinde. | [optional] 8 | **preferredEmail** | **String** | Default email address of the user in Kinde. | [optional] 9 | **providedId** | **String** | Value of the user's id in a third-party system when the user is imported into Kinde. | [optional] 10 | **lastName** | **String** | User's last name. | [optional] 11 | **firstName** | **String** | User's first name. | [optional] 12 | **picture** | **String** | URL that point's to the user's picture or avatar | [optional] 13 | 14 | 15 | -------------------------------------------------------------------------------- /docs/UserProfileV2.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.UserProfileV2 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **String** | Unique id of the user in Kinde (deprecated). | [optional] 8 | **sub** | **String** | Unique id of the user in Kinde. | [optional] 9 | **providedId** | **String** | Value of the user's id in a third-party system when the user is imported into Kinde. | [optional] 10 | **name** | **String** | Users's first and last name separated by a space. | [optional] 11 | **givenName** | **String** | User's first name. | [optional] 12 | **familyName** | **String** | User's last name. | [optional] 13 | **updatedAt** | **Number** | Date the user was last updated at (In Unix time). | [optional] 14 | **email** | **String** | User's email address if available. | [optional] 15 | **picture** | **String** | URL that point's to the user's picture or avatar | [optional] 16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/UsersResponse.md: -------------------------------------------------------------------------------- 1 | # KindeManagementApi.UsersResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **code** | **String** | Response code. | [optional] 8 | **message** | **String** | Response message. | [optional] 9 | **users** | [**[User]**](User.md) | | [optional] 10 | **nextToken** | **String** | Pagination token. | [optional] 11 | 12 | 13 | -------------------------------------------------------------------------------- /git_push.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ 3 | # 4 | # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" 5 | 6 | git_user_id=$1 7 | git_repo_id=$2 8 | release_note=$3 9 | git_host=$4 10 | 11 | if [ "$git_host" = "" ]; then 12 | git_host="github.com" 13 | echo "[INFO] No command line input provided. Set \$git_host to $git_host" 14 | fi 15 | 16 | if [ "$git_user_id" = "" ]; then 17 | git_user_id="GIT_USER_ID" 18 | echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" 19 | fi 20 | 21 | if [ "$git_repo_id" = "" ]; then 22 | git_repo_id="GIT_REPO_ID" 23 | echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" 24 | fi 25 | 26 | if [ "$release_note" = "" ]; then 27 | release_note="Minor update" 28 | echo "[INFO] No command line input provided. Set \$release_note to $release_note" 29 | fi 30 | 31 | # Initialize the local directory as a Git repository 32 | git init 33 | 34 | # Adds the files in the local repository and stages them for commit. 35 | git add . 36 | 37 | # Commits the tracked changes and prepares them to be pushed to a remote repository. 38 | git commit -m "$release_note" 39 | 40 | # Sets the new remote 41 | git_remote=$(git remote) 42 | if [ "$git_remote" = "" ]; then # git remote not defined 43 | 44 | if [ "$GIT_TOKEN" = "" ]; then 45 | echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." 46 | git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git 47 | else 48 | git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git 49 | fi 50 | 51 | fi 52 | 53 | git pull origin master 54 | 55 | # Pushes (Forces) the changes in the local repository up to the remote repository 56 | echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" 57 | git push origin master 2>&1 | grep -v 'To https' 58 | -------------------------------------------------------------------------------- /mocha.opts: -------------------------------------------------------------------------------- 1 | --timeout 10000 2 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@kinde-oss/kinde-nodejs-sdk", 3 | "version": "1.2.4", 4 | "description": "Kinde Nodejs SDK allows integrate with Express server using middleware, helpers function", 5 | "license": "MIT", 6 | "main": "dist/index.js", 7 | "scripts": { 8 | "build": "npm run genversion && babel src -d dist", 9 | "prepare": "npm run build", 10 | "test": "mocha --require @babel/register --recursive", 11 | "genversion": "node -p \"'export const SDK_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/sdk/utils/SDKVersion.js" 12 | }, 13 | "browser": { 14 | "fs": false 15 | }, 16 | "dependencies": { 17 | "@babel/cli": "^7.25.6", 18 | "superagent": "^9.0.2" 19 | }, 20 | "devDependencies": { 21 | "@babel/core": "^7.0.0", 22 | "@babel/plugin-proposal-class-properties": "^7.0.0", 23 | "@babel/plugin-proposal-decorators": "^7.0.0", 24 | "@babel/plugin-proposal-do-expressions": "^7.0.0", 25 | "@babel/plugin-proposal-export-default-from": "^7.0.0", 26 | "@babel/plugin-proposal-export-namespace-from": "^7.0.0", 27 | "@babel/plugin-proposal-function-bind": "^7.0.0", 28 | "@babel/plugin-proposal-function-sent": "^7.0.0", 29 | "@babel/plugin-proposal-json-strings": "^7.0.0", 30 | "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0", 31 | "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", 32 | "@babel/plugin-proposal-numeric-separator": "^7.0.0", 33 | "@babel/plugin-proposal-optional-chaining": "^7.0.0", 34 | "@babel/plugin-proposal-pipeline-operator": "^7.0.0", 35 | "@babel/plugin-proposal-throw-expressions": "^7.0.0", 36 | "@babel/plugin-syntax-dynamic-import": "^7.0.0", 37 | "@babel/plugin-syntax-import-meta": "^7.0.0", 38 | "@babel/preset-env": "^7.0.0", 39 | "@babel/register": "^7.0.0", 40 | "expect.js": "^0.3.1", 41 | "mocha": "^8.0.1", 42 | "sinon": "^7.2.0" 43 | }, 44 | "keywords": [ 45 | "Kinde", 46 | "login", 47 | "Authorization Code Grant Flow", 48 | "PKCE", 49 | "Single Page Application authentication", 50 | "SPA authentication", 51 | "NodeJs" 52 | ], 53 | "files": [ 54 | "dist", 55 | "LICENSE" 56 | ], 57 | "engines": { 58 | "node": ">=18.x.x" 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/model/AddOrganizationUsersRequest.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | import ApiClient from '../ApiClient'; 15 | import AddOrganizationUsersRequestUsersInner from './AddOrganizationUsersRequestUsersInner'; 16 | 17 | /** 18 | * The AddOrganizationUsersRequest model module. 19 | * @module model/AddOrganizationUsersRequest 20 | * @version 1 21 | */ 22 | class AddOrganizationUsersRequest { 23 | /** 24 | * Constructs a new AddOrganizationUsersRequest. 25 | * @alias module:model/AddOrganizationUsersRequest 26 | */ 27 | constructor() { 28 | 29 | AddOrganizationUsersRequest.initialize(this); 30 | } 31 | 32 | /** 33 | * Initializes the fields of this object. 34 | * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 35 | * Only for internal use. 36 | */ 37 | static initialize(obj) { 38 | } 39 | 40 | /** 41 | * Constructs a AddOrganizationUsersRequest from a plain JavaScript object, optionally creating a new instance. 42 | * Copies all relevant properties from data to obj if supplied or a new instance if not. 43 | * @param {Object} data The plain JavaScript object bearing properties of interest. 44 | * @param {module:model/AddOrganizationUsersRequest} obj Optional instance to populate. 45 | * @return {module:model/AddOrganizationUsersRequest} The populated AddOrganizationUsersRequest instance. 46 | */ 47 | static constructFromObject(data, obj) { 48 | if (data) { 49 | obj = obj || new AddOrganizationUsersRequest(); 50 | 51 | if (data.hasOwnProperty('users')) { 52 | obj['users'] = ApiClient.convertToType(data['users'], [AddOrganizationUsersRequestUsersInner]); 53 | } 54 | } 55 | return obj; 56 | } 57 | 58 | /** 59 | * Validates the JSON data with respect to AddOrganizationUsersRequest. 60 | * @param {Object} data The plain JavaScript object bearing properties of interest. 61 | * @return {boolean} to indicate whether the JSON data is valid with respect to AddOrganizationUsersRequest. 62 | */ 63 | static validateJSON(data) { 64 | if (data['users']) { // data not null 65 | // ensure the json data is an array 66 | if (!Array.isArray(data['users'])) { 67 | throw new Error("Expected the field `users` to be an array in the JSON data but got " + data['users']); 68 | } 69 | // validate the optional field `users` (array) 70 | for (const item of data['users']) { 71 | AddOrganizationUsersRequestUsersInner.validateJsonObject(item); 72 | }; 73 | } 74 | 75 | return true; 76 | } 77 | 78 | 79 | } 80 | 81 | 82 | 83 | /** 84 | * Users to be added to the organization. 85 | * @member {Array.} users 86 | */ 87 | AddOrganizationUsersRequest.prototype['users'] = undefined; 88 | 89 | 90 | 91 | 92 | 93 | 94 | export default AddOrganizationUsersRequest; 95 | 96 | -------------------------------------------------------------------------------- /src/model/ApiResult.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | import ApiClient from '../ApiClient'; 15 | 16 | /** 17 | * The ApiResult model module. 18 | * @module model/ApiResult 19 | * @version 1 20 | */ 21 | class ApiResult { 22 | /** 23 | * Constructs a new ApiResult. 24 | * @alias module:model/ApiResult 25 | */ 26 | constructor() { 27 | 28 | ApiResult.initialize(this); 29 | } 30 | 31 | /** 32 | * Initializes the fields of this object. 33 | * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 34 | * Only for internal use. 35 | */ 36 | static initialize(obj) { 37 | } 38 | 39 | /** 40 | * Constructs a ApiResult from a plain JavaScript object, optionally creating a new instance. 41 | * Copies all relevant properties from data to obj if supplied or a new instance if not. 42 | * @param {Object} data The plain JavaScript object bearing properties of interest. 43 | * @param {module:model/ApiResult} obj Optional instance to populate. 44 | * @return {module:model/ApiResult} The populated ApiResult instance. 45 | */ 46 | static constructFromObject(data, obj) { 47 | if (data) { 48 | obj = obj || new ApiResult(); 49 | 50 | if (data.hasOwnProperty('result')) { 51 | obj['result'] = ApiClient.convertToType(data['result'], 'String'); 52 | } 53 | } 54 | return obj; 55 | } 56 | 57 | /** 58 | * Validates the JSON data with respect to ApiResult. 59 | * @param {Object} data The plain JavaScript object bearing properties of interest. 60 | * @return {boolean} to indicate whether the JSON data is valid with respect to ApiResult. 61 | */ 62 | static validateJSON(data) { 63 | // ensure the json data is a string 64 | if (data['result'] && !(typeof data['result'] === 'string' || data['result'] instanceof String)) { 65 | throw new Error("Expected the field `result` to be a primitive type in the JSON string but got " + data['result']); 66 | } 67 | 68 | return true; 69 | } 70 | 71 | 72 | } 73 | 74 | 75 | 76 | /** 77 | * The result of the api operation. 78 | * @member {String} result 79 | */ 80 | ApiResult.prototype['result'] = undefined; 81 | 82 | 83 | 84 | 85 | 86 | 87 | export default ApiResult; 88 | 89 | -------------------------------------------------------------------------------- /src/model/Application.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | import ApiClient from '../ApiClient'; 15 | 16 | /** 17 | * The Application model module. 18 | * @module model/Application 19 | * @version 1 20 | */ 21 | class Application { 22 | /** 23 | * Constructs a new Application. 24 | * @alias module:model/Application 25 | */ 26 | constructor() { 27 | 28 | Application.initialize(this); 29 | } 30 | 31 | /** 32 | * Initializes the fields of this object. 33 | * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 34 | * Only for internal use. 35 | */ 36 | static initialize(obj) { 37 | } 38 | 39 | /** 40 | * Constructs a Application from a plain JavaScript object, optionally creating a new instance. 41 | * Copies all relevant properties from data to obj if supplied or a new instance if not. 42 | * @param {Object} data The plain JavaScript object bearing properties of interest. 43 | * @param {module:model/Application} obj Optional instance to populate. 44 | * @return {module:model/Application} The populated Application instance. 45 | */ 46 | static constructFromObject(data, obj) { 47 | if (data) { 48 | obj = obj || new Application(); 49 | 50 | if (data.hasOwnProperty('app_id')) { 51 | obj['app_id'] = ApiClient.convertToType(data['app_id'], 'String'); 52 | } 53 | if (data.hasOwnProperty('name')) { 54 | obj['name'] = ApiClient.convertToType(data['name'], 'String'); 55 | } 56 | } 57 | return obj; 58 | } 59 | 60 | /** 61 | * Validates the JSON data with respect to Application. 62 | * @param {Object} data The plain JavaScript object bearing properties of interest. 63 | * @return {boolean} to indicate whether the JSON data is valid with respect to Application. 64 | */ 65 | static validateJSON(data) { 66 | // ensure the json data is a string 67 | if (data['app_id'] && !(typeof data['app_id'] === 'string' || data['app_id'] instanceof String)) { 68 | throw new Error("Expected the field `app_id` to be a primitive type in the JSON string but got " + data['app_id']); 69 | } 70 | // ensure the json data is a string 71 | if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { 72 | throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); 73 | } 74 | 75 | return true; 76 | } 77 | 78 | 79 | } 80 | 81 | 82 | 83 | /** 84 | * @member {String} app_id 85 | */ 86 | Application.prototype['app_id'] = undefined; 87 | 88 | /** 89 | * @member {String} name 90 | */ 91 | Application.prototype['name'] = undefined; 92 | 93 | 94 | 95 | 96 | 97 | 98 | export default Application; 99 | 100 | -------------------------------------------------------------------------------- /src/model/CreateOrganizationResponseOrganization.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | import ApiClient from '../ApiClient'; 15 | 16 | /** 17 | * The CreateOrganizationResponseOrganization model module. 18 | * @module model/CreateOrganizationResponseOrganization 19 | * @version 1 20 | */ 21 | class CreateOrganizationResponseOrganization { 22 | /** 23 | * Constructs a new CreateOrganizationResponseOrganization. 24 | * @alias module:model/CreateOrganizationResponseOrganization 25 | */ 26 | constructor() { 27 | 28 | CreateOrganizationResponseOrganization.initialize(this); 29 | } 30 | 31 | /** 32 | * Initializes the fields of this object. 33 | * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 34 | * Only for internal use. 35 | */ 36 | static initialize(obj) { 37 | } 38 | 39 | /** 40 | * Constructs a CreateOrganizationResponseOrganization from a plain JavaScript object, optionally creating a new instance. 41 | * Copies all relevant properties from data to obj if supplied or a new instance if not. 42 | * @param {Object} data The plain JavaScript object bearing properties of interest. 43 | * @param {module:model/CreateOrganizationResponseOrganization} obj Optional instance to populate. 44 | * @return {module:model/CreateOrganizationResponseOrganization} The populated CreateOrganizationResponseOrganization instance. 45 | */ 46 | static constructFromObject(data, obj) { 47 | if (data) { 48 | obj = obj || new CreateOrganizationResponseOrganization(); 49 | 50 | if (data.hasOwnProperty('code')) { 51 | obj['code'] = ApiClient.convertToType(data['code'], 'String'); 52 | } 53 | } 54 | return obj; 55 | } 56 | 57 | /** 58 | * Validates the JSON data with respect to CreateOrganizationResponseOrganization. 59 | * @param {Object} data The plain JavaScript object bearing properties of interest. 60 | * @return {boolean} to indicate whether the JSON data is valid with respect to CreateOrganizationResponseOrganization. 61 | */ 62 | static validateJSON(data) { 63 | // ensure the json data is a string 64 | if (data['code'] && !(typeof data['code'] === 'string' || data['code'] instanceof String)) { 65 | throw new Error("Expected the field `code` to be a primitive type in the JSON string but got " + data['code']); 66 | } 67 | 68 | return true; 69 | } 70 | 71 | 72 | } 73 | 74 | 75 | 76 | /** 77 | * The organization's code. 78 | * @member {String} code 79 | */ 80 | CreateOrganizationResponseOrganization.prototype['code'] = undefined; 81 | 82 | 83 | 84 | 85 | 86 | 87 | export default CreateOrganizationResponseOrganization; 88 | 89 | -------------------------------------------------------------------------------- /src/model/CreateOrganizationUserRoleRequest.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | import ApiClient from '../ApiClient'; 15 | 16 | /** 17 | * The CreateOrganizationUserRoleRequest model module. 18 | * @module model/CreateOrganizationUserRoleRequest 19 | * @version 1 20 | */ 21 | class CreateOrganizationUserRoleRequest { 22 | /** 23 | * Constructs a new CreateOrganizationUserRoleRequest. 24 | * @alias module:model/CreateOrganizationUserRoleRequest 25 | */ 26 | constructor() { 27 | 28 | CreateOrganizationUserRoleRequest.initialize(this); 29 | } 30 | 31 | /** 32 | * Initializes the fields of this object. 33 | * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 34 | * Only for internal use. 35 | */ 36 | static initialize(obj) { 37 | } 38 | 39 | /** 40 | * Constructs a CreateOrganizationUserRoleRequest from a plain JavaScript object, optionally creating a new instance. 41 | * Copies all relevant properties from data to obj if supplied or a new instance if not. 42 | * @param {Object} data The plain JavaScript object bearing properties of interest. 43 | * @param {module:model/CreateOrganizationUserRoleRequest} obj Optional instance to populate. 44 | * @return {module:model/CreateOrganizationUserRoleRequest} The populated CreateOrganizationUserRoleRequest instance. 45 | */ 46 | static constructFromObject(data, obj) { 47 | if (data) { 48 | obj = obj || new CreateOrganizationUserRoleRequest(); 49 | 50 | if (data.hasOwnProperty('role_id')) { 51 | obj['role_id'] = ApiClient.convertToType(data['role_id'], 'String'); 52 | } 53 | } 54 | return obj; 55 | } 56 | 57 | /** 58 | * Validates the JSON data with respect to CreateOrganizationUserRoleRequest. 59 | * @param {Object} data The plain JavaScript object bearing properties of interest. 60 | * @return {boolean} to indicate whether the JSON data is valid with respect to CreateOrganizationUserRoleRequest. 61 | */ 62 | static validateJSON(data) { 63 | // ensure the json data is a string 64 | if (data['role_id'] && !(typeof data['role_id'] === 'string' || data['role_id'] instanceof String)) { 65 | throw new Error("Expected the field `role_id` to be a primitive type in the JSON string but got " + data['role_id']); 66 | } 67 | 68 | return true; 69 | } 70 | 71 | 72 | } 73 | 74 | 75 | 76 | /** 77 | * The role id. 78 | * @member {String} role_id 79 | */ 80 | CreateOrganizationUserRoleRequest.prototype['role_id'] = undefined; 81 | 82 | 83 | 84 | 85 | 86 | 87 | export default CreateOrganizationUserRoleRequest; 88 | 89 | -------------------------------------------------------------------------------- /src/model/CreateUserRequestIdentitiesInnerDetails.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | import ApiClient from '../ApiClient'; 15 | 16 | /** 17 | * The CreateUserRequestIdentitiesInnerDetails model module. 18 | * @module model/CreateUserRequestIdentitiesInnerDetails 19 | * @version 1 20 | */ 21 | class CreateUserRequestIdentitiesInnerDetails { 22 | /** 23 | * Constructs a new CreateUserRequestIdentitiesInnerDetails. 24 | * Additional details required to create the user. 25 | * @alias module:model/CreateUserRequestIdentitiesInnerDetails 26 | */ 27 | constructor() { 28 | 29 | CreateUserRequestIdentitiesInnerDetails.initialize(this); 30 | } 31 | 32 | /** 33 | * Initializes the fields of this object. 34 | * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 35 | * Only for internal use. 36 | */ 37 | static initialize(obj) { 38 | } 39 | 40 | /** 41 | * Constructs a CreateUserRequestIdentitiesInnerDetails from a plain JavaScript object, optionally creating a new instance. 42 | * Copies all relevant properties from data to obj if supplied or a new instance if not. 43 | * @param {Object} data The plain JavaScript object bearing properties of interest. 44 | * @param {module:model/CreateUserRequestIdentitiesInnerDetails} obj Optional instance to populate. 45 | * @return {module:model/CreateUserRequestIdentitiesInnerDetails} The populated CreateUserRequestIdentitiesInnerDetails instance. 46 | */ 47 | static constructFromObject(data, obj) { 48 | if (data) { 49 | obj = obj || new CreateUserRequestIdentitiesInnerDetails(); 50 | 51 | if (data.hasOwnProperty('email')) { 52 | obj['email'] = ApiClient.convertToType(data['email'], 'String'); 53 | } 54 | } 55 | return obj; 56 | } 57 | 58 | /** 59 | * Validates the JSON data with respect to CreateUserRequestIdentitiesInnerDetails. 60 | * @param {Object} data The plain JavaScript object bearing properties of interest. 61 | * @return {boolean} to indicate whether the JSON data is valid with respect to CreateUserRequestIdentitiesInnerDetails. 62 | */ 63 | static validateJSON(data) { 64 | // ensure the json data is a string 65 | if (data['email'] && !(typeof data['email'] === 'string' || data['email'] instanceof String)) { 66 | throw new Error("Expected the field `email` to be a primitive type in the JSON string but got " + data['email']); 67 | } 68 | 69 | return true; 70 | } 71 | 72 | 73 | } 74 | 75 | 76 | 77 | /** 78 | * The email address of the user. 79 | * @member {String} email 80 | */ 81 | CreateUserRequestIdentitiesInnerDetails.prototype['email'] = undefined; 82 | 83 | 84 | 85 | 86 | 87 | 88 | export default CreateUserRequestIdentitiesInnerDetails; 89 | 90 | -------------------------------------------------------------------------------- /src/model/Error.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | import ApiClient from '../ApiClient'; 15 | 16 | /** 17 | * The Error model module. 18 | * @module model/Error 19 | * @version 1 20 | */ 21 | class Error { 22 | /** 23 | * Constructs a new Error. 24 | * @alias module:model/Error 25 | */ 26 | constructor() { 27 | 28 | Error.initialize(this); 29 | } 30 | 31 | /** 32 | * Initializes the fields of this object. 33 | * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 34 | * Only for internal use. 35 | */ 36 | static initialize(obj) { 37 | } 38 | 39 | /** 40 | * Constructs a Error from a plain JavaScript object, optionally creating a new instance. 41 | * Copies all relevant properties from data to obj if supplied or a new instance if not. 42 | * @param {Object} data The plain JavaScript object bearing properties of interest. 43 | * @param {module:model/Error} obj Optional instance to populate. 44 | * @return {module:model/Error} The populated Error instance. 45 | */ 46 | static constructFromObject(data, obj) { 47 | if (data) { 48 | obj = obj || new Error(); 49 | 50 | if (data.hasOwnProperty('code')) { 51 | obj['code'] = ApiClient.convertToType(data['code'], 'String'); 52 | } 53 | if (data.hasOwnProperty('message')) { 54 | obj['message'] = ApiClient.convertToType(data['message'], 'String'); 55 | } 56 | } 57 | return obj; 58 | } 59 | 60 | /** 61 | * Validates the JSON data with respect to Error. 62 | * @param {Object} data The plain JavaScript object bearing properties of interest. 63 | * @return {boolean} to indicate whether the JSON data is valid with respect to Error. 64 | */ 65 | static validateJSON(data) { 66 | // ensure the json data is a string 67 | if (data['code'] && !(typeof data['code'] === 'string' || data['code'] instanceof String)) { 68 | throw new Error("Expected the field `code` to be a primitive type in the JSON string but got " + data['code']); 69 | } 70 | // ensure the json data is a string 71 | if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) { 72 | throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']); 73 | } 74 | 75 | return true; 76 | } 77 | 78 | 79 | } 80 | 81 | 82 | 83 | /** 84 | * Error code. 85 | * @member {String} code 86 | */ 87 | Error.prototype['code'] = undefined; 88 | 89 | /** 90 | * Error message. 91 | * @member {String} message 92 | */ 93 | Error.prototype['message'] = undefined; 94 | 95 | 96 | 97 | 98 | 99 | 100 | export default Error; 101 | 102 | -------------------------------------------------------------------------------- /src/model/ErrorResponse.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | import ApiClient from '../ApiClient'; 15 | import Error from './Error'; 16 | 17 | /** 18 | * The ErrorResponse model module. 19 | * @module model/ErrorResponse 20 | * @version 1 21 | */ 22 | class ErrorResponse { 23 | /** 24 | * Constructs a new ErrorResponse. 25 | * @alias module:model/ErrorResponse 26 | */ 27 | constructor() { 28 | 29 | ErrorResponse.initialize(this); 30 | } 31 | 32 | /** 33 | * Initializes the fields of this object. 34 | * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 35 | * Only for internal use. 36 | */ 37 | static initialize(obj) { 38 | } 39 | 40 | /** 41 | * Constructs a ErrorResponse from a plain JavaScript object, optionally creating a new instance. 42 | * Copies all relevant properties from data to obj if supplied or a new instance if not. 43 | * @param {Object} data The plain JavaScript object bearing properties of interest. 44 | * @param {module:model/ErrorResponse} obj Optional instance to populate. 45 | * @return {module:model/ErrorResponse} The populated ErrorResponse instance. 46 | */ 47 | static constructFromObject(data, obj) { 48 | if (data) { 49 | obj = obj || new ErrorResponse(); 50 | 51 | if (data.hasOwnProperty('errors')) { 52 | obj['errors'] = ApiClient.convertToType(data['errors'], [Error]); 53 | } 54 | } 55 | return obj; 56 | } 57 | 58 | /** 59 | * Validates the JSON data with respect to ErrorResponse. 60 | * @param {Object} data The plain JavaScript object bearing properties of interest. 61 | * @return {boolean} to indicate whether the JSON data is valid with respect to ErrorResponse. 62 | */ 63 | static validateJSON(data) { 64 | if (data['errors']) { // data not null 65 | // ensure the json data is an array 66 | if (!Array.isArray(data['errors'])) { 67 | throw new Error("Expected the field `errors` to be an array in the JSON data but got " + data['errors']); 68 | } 69 | // validate the optional field `errors` (array) 70 | for (const item of data['errors']) { 71 | Error.validateJsonObject(item); 72 | }; 73 | } 74 | 75 | return true; 76 | } 77 | 78 | 79 | } 80 | 81 | 82 | 83 | /** 84 | * @member {Array.} errors 85 | */ 86 | ErrorResponse.prototype['errors'] = undefined; 87 | 88 | 89 | 90 | 91 | 92 | 93 | export default ErrorResponse; 94 | 95 | -------------------------------------------------------------------------------- /src/model/GetRedirectCallbackUrlsResponse.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | import ApiClient from '../ApiClient'; 15 | import RedirectCallbackUrls from './RedirectCallbackUrls'; 16 | 17 | /** 18 | * The GetRedirectCallbackUrlsResponse model module. 19 | * @module model/GetRedirectCallbackUrlsResponse 20 | * @version 1 21 | */ 22 | class GetRedirectCallbackUrlsResponse { 23 | /** 24 | * Constructs a new GetRedirectCallbackUrlsResponse. 25 | * @alias module:model/GetRedirectCallbackUrlsResponse 26 | */ 27 | constructor() { 28 | 29 | GetRedirectCallbackUrlsResponse.initialize(this); 30 | } 31 | 32 | /** 33 | * Initializes the fields of this object. 34 | * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 35 | * Only for internal use. 36 | */ 37 | static initialize(obj) { 38 | } 39 | 40 | /** 41 | * Constructs a GetRedirectCallbackUrlsResponse from a plain JavaScript object, optionally creating a new instance. 42 | * Copies all relevant properties from data to obj if supplied or a new instance if not. 43 | * @param {Object} data The plain JavaScript object bearing properties of interest. 44 | * @param {module:model/GetRedirectCallbackUrlsResponse} obj Optional instance to populate. 45 | * @return {module:model/GetRedirectCallbackUrlsResponse} The populated GetRedirectCallbackUrlsResponse instance. 46 | */ 47 | static constructFromObject(data, obj) { 48 | if (data) { 49 | obj = obj || new GetRedirectCallbackUrlsResponse(); 50 | 51 | if (data.hasOwnProperty('redirect_urls')) { 52 | obj['redirect_urls'] = ApiClient.convertToType(data['redirect_urls'], [RedirectCallbackUrls]); 53 | } 54 | } 55 | return obj; 56 | } 57 | 58 | /** 59 | * Validates the JSON data with respect to GetRedirectCallbackUrlsResponse. 60 | * @param {Object} data The plain JavaScript object bearing properties of interest. 61 | * @return {boolean} to indicate whether the JSON data is valid with respect to GetRedirectCallbackUrlsResponse. 62 | */ 63 | static validateJSON(data) { 64 | if (data['redirect_urls']) { // data not null 65 | // ensure the json data is an array 66 | if (!Array.isArray(data['redirect_urls'])) { 67 | throw new Error("Expected the field `redirect_urls` to be an array in the JSON data but got " + data['redirect_urls']); 68 | } 69 | // validate the optional field `redirect_urls` (array) 70 | for (const item of data['redirect_urls']) { 71 | RedirectCallbackUrls.validateJsonObject(item); 72 | }; 73 | } 74 | 75 | return true; 76 | } 77 | 78 | 79 | } 80 | 81 | 82 | 83 | /** 84 | * An application's redirect callback URLs. 85 | * @member {Array.} redirect_urls 86 | */ 87 | GetRedirectCallbackUrlsResponse.prototype['redirect_urls'] = undefined; 88 | 89 | 90 | 91 | 92 | 93 | 94 | export default GetRedirectCallbackUrlsResponse; 95 | 96 | -------------------------------------------------------------------------------- /src/model/RedirectCallbackUrls.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | import ApiClient from '../ApiClient'; 15 | 16 | /** 17 | * The RedirectCallbackUrls model module. 18 | * @module model/RedirectCallbackUrls 19 | * @version 1 20 | */ 21 | class RedirectCallbackUrls { 22 | /** 23 | * Constructs a new RedirectCallbackUrls. 24 | * @alias module:model/RedirectCallbackUrls 25 | */ 26 | constructor() { 27 | 28 | RedirectCallbackUrls.initialize(this); 29 | } 30 | 31 | /** 32 | * Initializes the fields of this object. 33 | * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 34 | * Only for internal use. 35 | */ 36 | static initialize(obj) { 37 | } 38 | 39 | /** 40 | * Constructs a RedirectCallbackUrls from a plain JavaScript object, optionally creating a new instance. 41 | * Copies all relevant properties from data to obj if supplied or a new instance if not. 42 | * @param {Object} data The plain JavaScript object bearing properties of interest. 43 | * @param {module:model/RedirectCallbackUrls} obj Optional instance to populate. 44 | * @return {module:model/RedirectCallbackUrls} The populated RedirectCallbackUrls instance. 45 | */ 46 | static constructFromObject(data, obj) { 47 | if (data) { 48 | obj = obj || new RedirectCallbackUrls(); 49 | 50 | if (data.hasOwnProperty('redirect_urls')) { 51 | obj['redirect_urls'] = ApiClient.convertToType(data['redirect_urls'], ['String']); 52 | } 53 | } 54 | return obj; 55 | } 56 | 57 | /** 58 | * Validates the JSON data with respect to RedirectCallbackUrls. 59 | * @param {Object} data The plain JavaScript object bearing properties of interest. 60 | * @return {boolean} to indicate whether the JSON data is valid with respect to RedirectCallbackUrls. 61 | */ 62 | static validateJSON(data) { 63 | // ensure the json data is an array 64 | if (!Array.isArray(data['redirect_urls'])) { 65 | throw new Error("Expected the field `redirect_urls` to be an array in the JSON data but got " + data['redirect_urls']); 66 | } 67 | 68 | return true; 69 | } 70 | 71 | 72 | } 73 | 74 | 75 | 76 | /** 77 | * An application's redirect URLs. 78 | * @member {Array.} redirect_urls 79 | */ 80 | RedirectCallbackUrls.prototype['redirect_urls'] = undefined; 81 | 82 | 83 | 84 | 85 | 86 | 87 | export default RedirectCallbackUrls; 88 | 89 | -------------------------------------------------------------------------------- /src/model/SuccessResponse.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | import ApiClient from '../ApiClient'; 15 | 16 | /** 17 | * The SuccessResponse model module. 18 | * @module model/SuccessResponse 19 | * @version 1 20 | */ 21 | class SuccessResponse { 22 | /** 23 | * Constructs a new SuccessResponse. 24 | * @alias module:model/SuccessResponse 25 | */ 26 | constructor() { 27 | 28 | SuccessResponse.initialize(this); 29 | } 30 | 31 | /** 32 | * Initializes the fields of this object. 33 | * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 34 | * Only for internal use. 35 | */ 36 | static initialize(obj) { 37 | } 38 | 39 | /** 40 | * Constructs a SuccessResponse from a plain JavaScript object, optionally creating a new instance. 41 | * Copies all relevant properties from data to obj if supplied or a new instance if not. 42 | * @param {Object} data The plain JavaScript object bearing properties of interest. 43 | * @param {module:model/SuccessResponse} obj Optional instance to populate. 44 | * @return {module:model/SuccessResponse} The populated SuccessResponse instance. 45 | */ 46 | static constructFromObject(data, obj) { 47 | if (data) { 48 | obj = obj || new SuccessResponse(); 49 | 50 | if (data.hasOwnProperty('message')) { 51 | obj['message'] = ApiClient.convertToType(data['message'], 'String'); 52 | } 53 | if (data.hasOwnProperty('code')) { 54 | obj['code'] = ApiClient.convertToType(data['code'], 'String'); 55 | } 56 | } 57 | return obj; 58 | } 59 | 60 | /** 61 | * Validates the JSON data with respect to SuccessResponse. 62 | * @param {Object} data The plain JavaScript object bearing properties of interest. 63 | * @return {boolean} to indicate whether the JSON data is valid with respect to SuccessResponse. 64 | */ 65 | static validateJSON(data) { 66 | // ensure the json data is a string 67 | if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) { 68 | throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']); 69 | } 70 | // ensure the json data is a string 71 | if (data['code'] && !(typeof data['code'] === 'string' || data['code'] instanceof String)) { 72 | throw new Error("Expected the field `code` to be a primitive type in the JSON string but got " + data['code']); 73 | } 74 | 75 | return true; 76 | } 77 | 78 | 79 | } 80 | 81 | 82 | 83 | /** 84 | * @member {String} message 85 | */ 86 | SuccessResponse.prototype['message'] = undefined; 87 | 88 | /** 89 | * @member {String} code 90 | */ 91 | SuccessResponse.prototype['code'] = undefined; 92 | 93 | 94 | 95 | 96 | 97 | 98 | export default SuccessResponse; 99 | 100 | -------------------------------------------------------------------------------- /src/model/UpdateOrganizationUsersRequest.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | import ApiClient from '../ApiClient'; 15 | import UpdateOrganizationUsersRequestUsersInner from './UpdateOrganizationUsersRequestUsersInner'; 16 | 17 | /** 18 | * The UpdateOrganizationUsersRequest model module. 19 | * @module model/UpdateOrganizationUsersRequest 20 | * @version 1 21 | */ 22 | class UpdateOrganizationUsersRequest { 23 | /** 24 | * Constructs a new UpdateOrganizationUsersRequest. 25 | * @alias module:model/UpdateOrganizationUsersRequest 26 | */ 27 | constructor() { 28 | 29 | UpdateOrganizationUsersRequest.initialize(this); 30 | } 31 | 32 | /** 33 | * Initializes the fields of this object. 34 | * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 35 | * Only for internal use. 36 | */ 37 | static initialize(obj) { 38 | } 39 | 40 | /** 41 | * Constructs a UpdateOrganizationUsersRequest from a plain JavaScript object, optionally creating a new instance. 42 | * Copies all relevant properties from data to obj if supplied or a new instance if not. 43 | * @param {Object} data The plain JavaScript object bearing properties of interest. 44 | * @param {module:model/UpdateOrganizationUsersRequest} obj Optional instance to populate. 45 | * @return {module:model/UpdateOrganizationUsersRequest} The populated UpdateOrganizationUsersRequest instance. 46 | */ 47 | static constructFromObject(data, obj) { 48 | if (data) { 49 | obj = obj || new UpdateOrganizationUsersRequest(); 50 | 51 | if (data.hasOwnProperty('users')) { 52 | obj['users'] = ApiClient.convertToType(data['users'], [UpdateOrganizationUsersRequestUsersInner]); 53 | } 54 | } 55 | return obj; 56 | } 57 | 58 | /** 59 | * Validates the JSON data with respect to UpdateOrganizationUsersRequest. 60 | * @param {Object} data The plain JavaScript object bearing properties of interest. 61 | * @return {boolean} to indicate whether the JSON data is valid with respect to UpdateOrganizationUsersRequest. 62 | */ 63 | static validateJSON(data) { 64 | if (data['users']) { // data not null 65 | // ensure the json data is an array 66 | if (!Array.isArray(data['users'])) { 67 | throw new Error("Expected the field `users` to be an array in the JSON data but got " + data['users']); 68 | } 69 | // validate the optional field `users` (array) 70 | for (const item of data['users']) { 71 | UpdateOrganizationUsersRequestUsersInner.validateJsonObject(item); 72 | }; 73 | } 74 | 75 | return true; 76 | } 77 | 78 | 79 | } 80 | 81 | 82 | 83 | /** 84 | * Users to be added to the organization. 85 | * @member {Array.} users 86 | */ 87 | UpdateOrganizationUsersRequest.prototype['users'] = undefined; 88 | 89 | 90 | 91 | 92 | 93 | 94 | export default UpdateOrganizationUsersRequest; 95 | 96 | -------------------------------------------------------------------------------- /src/model/UserIdentity.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | import ApiClient from '../ApiClient'; 15 | import UserIdentityResult from './UserIdentityResult'; 16 | 17 | /** 18 | * The UserIdentity model module. 19 | * @module model/UserIdentity 20 | * @version 1 21 | */ 22 | class UserIdentity { 23 | /** 24 | * Constructs a new UserIdentity. 25 | * @alias module:model/UserIdentity 26 | */ 27 | constructor() { 28 | 29 | UserIdentity.initialize(this); 30 | } 31 | 32 | /** 33 | * Initializes the fields of this object. 34 | * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 35 | * Only for internal use. 36 | */ 37 | static initialize(obj) { 38 | } 39 | 40 | /** 41 | * Constructs a UserIdentity from a plain JavaScript object, optionally creating a new instance. 42 | * Copies all relevant properties from data to obj if supplied or a new instance if not. 43 | * @param {Object} data The plain JavaScript object bearing properties of interest. 44 | * @param {module:model/UserIdentity} obj Optional instance to populate. 45 | * @return {module:model/UserIdentity} The populated UserIdentity instance. 46 | */ 47 | static constructFromObject(data, obj) { 48 | if (data) { 49 | obj = obj || new UserIdentity(); 50 | 51 | if (data.hasOwnProperty('type')) { 52 | obj['type'] = ApiClient.convertToType(data['type'], 'String'); 53 | } 54 | if (data.hasOwnProperty('result')) { 55 | obj['result'] = UserIdentityResult.constructFromObject(data['result']); 56 | } 57 | } 58 | return obj; 59 | } 60 | 61 | /** 62 | * Validates the JSON data with respect to UserIdentity. 63 | * @param {Object} data The plain JavaScript object bearing properties of interest. 64 | * @return {boolean} to indicate whether the JSON data is valid with respect to UserIdentity. 65 | */ 66 | static validateJSON(data) { 67 | // ensure the json data is a string 68 | if (data['type'] && !(typeof data['type'] === 'string' || data['type'] instanceof String)) { 69 | throw new Error("Expected the field `type` to be a primitive type in the JSON string but got " + data['type']); 70 | } 71 | // validate the optional field `result` 72 | if (data['result']) { // data not null 73 | UserIdentityResult.validateJSON(data['result']); 74 | } 75 | 76 | return true; 77 | } 78 | 79 | 80 | } 81 | 82 | 83 | 84 | /** 85 | * The type of identity object created. 86 | * @member {String} type 87 | */ 88 | UserIdentity.prototype['type'] = undefined; 89 | 90 | /** 91 | * @member {module:model/UserIdentityResult} result 92 | */ 93 | UserIdentity.prototype['result'] = undefined; 94 | 95 | 96 | 97 | 98 | 99 | 100 | export default UserIdentity; 101 | 102 | -------------------------------------------------------------------------------- /src/model/UserIdentityResult.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | import ApiClient from '../ApiClient'; 15 | 16 | /** 17 | * The UserIdentityResult model module. 18 | * @module model/UserIdentityResult 19 | * @version 1 20 | */ 21 | class UserIdentityResult { 22 | /** 23 | * Constructs a new UserIdentityResult. 24 | * The result of the user creation operation. 25 | * @alias module:model/UserIdentityResult 26 | */ 27 | constructor() { 28 | 29 | UserIdentityResult.initialize(this); 30 | } 31 | 32 | /** 33 | * Initializes the fields of this object. 34 | * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). 35 | * Only for internal use. 36 | */ 37 | static initialize(obj) { 38 | } 39 | 40 | /** 41 | * Constructs a UserIdentityResult from a plain JavaScript object, optionally creating a new instance. 42 | * Copies all relevant properties from data to obj if supplied or a new instance if not. 43 | * @param {Object} data The plain JavaScript object bearing properties of interest. 44 | * @param {module:model/UserIdentityResult} obj Optional instance to populate. 45 | * @return {module:model/UserIdentityResult} The populated UserIdentityResult instance. 46 | */ 47 | static constructFromObject(data, obj) { 48 | if (data) { 49 | obj = obj || new UserIdentityResult(); 50 | 51 | if (data.hasOwnProperty('created')) { 52 | obj['created'] = ApiClient.convertToType(data['created'], 'Boolean'); 53 | } 54 | if (data.hasOwnProperty('identity_id')) { 55 | obj['identity_id'] = ApiClient.convertToType(data['identity_id'], 'Number'); 56 | } 57 | } 58 | return obj; 59 | } 60 | 61 | /** 62 | * Validates the JSON data with respect to UserIdentityResult. 63 | * @param {Object} data The plain JavaScript object bearing properties of interest. 64 | * @return {boolean} to indicate whether the JSON data is valid with respect to UserIdentityResult. 65 | */ 66 | static validateJSON(data) { 67 | 68 | return true; 69 | } 70 | 71 | 72 | } 73 | 74 | 75 | 76 | /** 77 | * True if the user identity was successfully created. 78 | * @member {Boolean} created 79 | */ 80 | UserIdentityResult.prototype['created'] = undefined; 81 | 82 | /** 83 | * Unique id of the user's identity in Kinde. 84 | * @member {Number} identity_id 85 | */ 86 | UserIdentityResult.prototype['identity_id'] = undefined; 87 | 88 | 89 | 90 | 91 | 92 | 93 | export default UserIdentityResult; 94 | 95 | -------------------------------------------------------------------------------- /src/sdk/constant/CookieOptions.js: -------------------------------------------------------------------------------- 1 | const CookieOptions = { 2 | maxAge: 29 * 86399 * 1000, 3 | secure: true, 4 | httpOnly: true, 5 | }; 6 | 7 | export default CookieOptions; -------------------------------------------------------------------------------- /src/sdk/constant/FlagDataTypeMap.js: -------------------------------------------------------------------------------- 1 | const FlagDataTypeMap = { 2 | 's': 'string', 3 | 'i': 'integer', 4 | 'b': 'boolean' 5 | }; 6 | 7 | export default FlagDataTypeMap; -------------------------------------------------------------------------------- /src/sdk/constant/GrantType.js: -------------------------------------------------------------------------------- 1 | const GrantType = { 2 | CLIENT_CREDENTIALS: 'client_credentials', 3 | AUTHORIZATION_CODE: 'authorization_code', 4 | PKCE: 'pkce', 5 | }; 6 | 7 | export default GrantType; 8 | -------------------------------------------------------------------------------- /src/sdk/oauth2/AuthorizationCode.js: -------------------------------------------------------------------------------- 1 | export default class AuthorizationCode { 2 | /** 3 | * Function to get the authorization URL and state to save in req.session 4 | * @param {Object} client - Kinde client instance 5 | * @param {Object} options - Additional options for the authorization process 6 | * @property {String} options.start_page - URL of the page that will initiate the authorization 7 | * @property {String} options.state - Optional parameter used to pass a value to the authorization server 8 | * @property {Boolean} options.is_create_org - Flag indicating if the user is creating a new organization 9 | * @property {String} options.org_code - Organization code 10 | * @property {String} options.org_name - Organization name 11 | * @property {String} options.lang - language to display for page 12 | * @property {String} options.login_hint - email or phone-number to pre-fill page 13 | * @property {String} options.connection_id - connection id string corresponding to social sign in 14 | * @returns {String} The authorization URL to redirect the user to 15 | */ 16 | generateAuthorizationURL(client, options) { 17 | const { 18 | start_page, 19 | state, 20 | is_create_org, 21 | org_code, 22 | org_name, 23 | lang, 24 | login_hint, 25 | connection_id, 26 | } = options; 27 | 28 | const searchParams = { 29 | client_id: client.clientId, 30 | response_type: 'code', 31 | scope: client.scope, 32 | state, 33 | start_page, 34 | redirect_uri: client.redirectUri, 35 | ...(!!client.audience && { audience: client.audience }), 36 | ...(!!is_create_org && { is_create_org, org_name }), 37 | ...(!!org_code && { org_code }), 38 | ...(!!lang && { lang }), 39 | ...(!!login_hint && { login_hint }), 40 | ...(!!connection_id && { connection_id }), 41 | }; 42 | 43 | return `${client.authorizationEndpoint}?${new URLSearchParams(searchParams).toString()}`; 44 | } 45 | 46 | /** 47 | * Function to get token from authorization code 48 | * @param {Object} client - KindeClient instance 49 | * @param {String} code - Authorization code obtained from authorization server 50 | * @returns {Object} JSON object with token information like access_token, refresh_token, expires_in etc. 51 | */ 52 | async getToken(client, code) { 53 | const searchParams = { 54 | grant_type: 'authorization_code', 55 | client_id: client.clientId, 56 | client_secret: client.clientSecret, 57 | code, 58 | redirect_uri: client.redirectUri, 59 | }; 60 | 61 | const res = await fetch(client.tokenEndpoint, { 62 | method: 'POST', 63 | headers: { 64 | 'Content-Type': 'application/x-www-form-urlencoded', 65 | 'Kinde-SDK': `${client.kindeSdkLanguage}/${client.kindeSdkLanguageVersion}`, 66 | }, 67 | body: new URLSearchParams(searchParams), 68 | }); 69 | const token = await res.json(); 70 | return token; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/sdk/oauth2/ClientCredentials.js: -------------------------------------------------------------------------------- 1 | export default class ClientCredentials { 2 | /** 3 | * getToken function to obtain an access token from the authorization server. 4 | * @param {Object} client - Kinde client instance 5 | * @returns {Object} JSON object with token information like access_token, refresh_token, expires_in etc. 6 | */ 7 | async getToken(client) { 8 | const searchParams = { 9 | grant_type: client.grantType, 10 | client_id: client.clientId, 11 | client_secret: client.clientSecret, 12 | scope: client.scope, 13 | ...(!!client.audience && { audience: client.audience }), 14 | }; 15 | 16 | const res = await fetch(client.tokenEndpoint, { 17 | method: 'POST', 18 | headers: { 19 | 'Content-Type': 'application/x-www-form-urlencoded', 20 | 'Kinde-SDK': `${client.kindeSdkLanguage}/${client.kindeSdkLanguageVersion}`, 21 | }, 22 | body: new URLSearchParams(searchParams), 23 | }); 24 | const token = await res.json(); 25 | return token; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/sdk/oauth2/PKCE.js: -------------------------------------------------------------------------------- 1 | export default class PKCE { 2 | /** 3 | * Function to get the authorization URL 4 | * @param {Object} client - Kinde client instance 5 | * @param {Object} options - Object containing options to include in the authorization URL 6 | * @property {String} options.start_page - Start page for authorization 7 | * @property {String} options.state - Optional parameter used to pass a value to the authorization server 8 | * @property {Boolean} options.is_create_org - Flag to indicate if the user wants to create an organization 9 | * @property {String} options.org_code - Organization code 10 | * @property {String} options.org_name - Organization name 11 | * @property {String} options.lang - language to display for page 12 | * @property {String} options.login_hint - email or phone-number to pre-fill page 13 | * @property {String} options.connection_id - connection id string corresponding to social sign in 14 | * @param {String} codeChallenge - Code challenge used in the PKCE flow. 15 | * @returns {String} url - The authorization URL to redirect the user to 16 | */ 17 | generateAuthorizationURL(client, options, codeChallenge) { 18 | const { 19 | start_page, 20 | state, 21 | is_create_org, 22 | org_code, 23 | org_name, 24 | lang, 25 | login_hint, 26 | connection_id, 27 | } = options; 28 | 29 | const searchParams = { 30 | client_id: client.clientId, 31 | response_type: 'code', 32 | scope: client.scope, 33 | state, 34 | start_page, 35 | redirect_uri: client.redirectUri, 36 | code_challenge: codeChallenge, 37 | code_challenge_method: 'S256', 38 | ...(!!client.audience && { audience: client.audience }), 39 | ...(!!is_create_org && { is_create_org, org_name }), 40 | ...(!!org_code && { org_code }), 41 | ...(!!lang && { lang }), 42 | ...(!!login_hint && { login_hint }), 43 | ...(!!connection_id && { connection_id }), 44 | }; 45 | 46 | return `${client.authorizationEndpoint}?${new URLSearchParams(searchParams).toString()}`; 47 | } 48 | 49 | /** 50 | * Function to get token from authorization code 51 | * @param {Object} client - KindeClient instance 52 | * @param {String} code - Authorization code obtained from authorization server 53 | * @param {String} codeVerifier - Code verifier generated during authorization request 54 | * @returns {Object} JSON object with token information like access_token, refresh_token, expires_in etc. 55 | */ 56 | async getToken(client, code, codeVerifier) { 57 | const searchParams = { 58 | grant_type: 'authorization_code', 59 | client_id: client.clientId, 60 | client_secret: client.clientSecret, 61 | redirect_uri: client.redirectUri, 62 | code, 63 | code_verifier: codeVerifier, 64 | }; 65 | 66 | const res = await fetch(client.tokenEndpoint, { 67 | method: 'POST', 68 | headers: { 69 | 'Content-Type': 'application/x-www-form-urlencoded', 70 | 'Kinde-SDK': `${client.kindeSdkLanguage}/${client.kindeSdkLanguageVersion}`, 71 | }, 72 | body: new URLSearchParams(searchParams), 73 | }); 74 | const token = await res.json(); 75 | return token; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/sdk/oauth2/RefreshToken.js: -------------------------------------------------------------------------------- 1 | export default class RefreshToken { 2 | /** 3 | * getToken function to obtain an access token from the authorization server. 4 | * @param {Object} client - Kinde client instance 5 | * @param {String} refreshToken - Refresh token 6 | * @returns {Object} JSON object with token information like access_token, refresh_token, expires_in etc. 7 | */ 8 | async getToken(client, refreshToken) { 9 | const searchParams = { 10 | grant_type: 'refresh_token', 11 | client_id: client.clientId, 12 | client_secret: client.clientSecret, 13 | refresh_token: refreshToken, 14 | }; 15 | 16 | const res = await fetch(client.tokenEndpoint, { 17 | method: 'POST', 18 | headers: { 19 | 'Content-Type': 'application/x-www-form-urlencoded', 20 | 'Kinde-SDK': `${client.kindeSdkLanguage}/${client.kindeSdkLanguageVersion}`, 21 | }, 22 | body: new URLSearchParams(searchParams), 23 | }); 24 | const token = await res.json(); 25 | return token; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/sdk/store/SessionStore.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Create a session store object. 3 | * @returns {Object} The session store object. 4 | */ 5 | const createSessionStore = () => { 6 | let store = {}; 7 | 8 | /** 9 | * Get data from the session store based on sessionId. 10 | * @param {string} sessionId - The session ID. 11 | * @returns {any} The data associated with the sessionId. 12 | */ 13 | const getData = (sessionId) => store[sessionId]; 14 | 15 | /** 16 | * Set data in the session store for a specific sessionId. 17 | * @param {string} sessionId - The session ID. 18 | * @param {any} data - The data to be stored. 19 | */ 20 | const setData = (sessionId, data) => { 21 | store[sessionId] = data; 22 | }; 23 | 24 | /** 25 | * Get data from the session store based on sessionId and key. 26 | * @param {string} sessionId - The session ID. 27 | * @param {string} key - The key to retrieve specific data. 28 | * @returns {any} The data associated with the sessionId and key. 29 | */ 30 | const getDataByKey = (sessionId, key) => store[sessionId] ? store[sessionId][key] : undefined; 31 | 32 | /** 33 | * Set data in the session store for a specific sessionId and key. 34 | * @param {string} sessionId - The session ID. 35 | * @param {string} key - The key to store the data. 36 | * @param {any} data - The data to be stored. 37 | */ 38 | const setDataByKey = (sessionId, key, data) => { 39 | if (!store[sessionId]) { 40 | store[sessionId] = {}; 41 | } 42 | store[sessionId][key] = data; 43 | }; 44 | 45 | /** 46 | * Remove data in the session store for a specific sessionId and key. 47 | * @param {string} sessionId - The session ID. 48 | * @param {string} key - The key to store the data. 49 | */ 50 | const removeDataByKey = (sessionId, key) => { 51 | if (store[sessionId] && store[sessionId][key]) { 52 | delete store[sessionId][key]; 53 | } 54 | } 55 | 56 | /** 57 | * Remove data from the session store for a specific sessionId. 58 | * @param {string} sessionId - The session ID. 59 | */ 60 | const removeData = (sessionId) => { 61 | if (store[sessionId]){ 62 | delete store[sessionId]; 63 | } 64 | }; 65 | 66 | return { 67 | getData, 68 | setData, 69 | getDataByKey, 70 | setDataByKey, 71 | removeDataByKey, 72 | removeData, 73 | }; 74 | }; 75 | 76 | export default createSessionStore(); -------------------------------------------------------------------------------- /src/sdk/utils/SDKVersion.js: -------------------------------------------------------------------------------- 1 | export const SDK_VERSION = "1.2.3"; 2 | -------------------------------------------------------------------------------- /src/sdk/utils/Utils.js: -------------------------------------------------------------------------------- 1 | import crypto from 'crypto'; 2 | 3 | /** 4 | * Generates a random string using the crypto module in Node.js 5 | * @returns {string} a random string of 28 hexadecimal characters 6 | */ 7 | export function randomString() { 8 | return crypto.randomBytes(28).toString('hex'); 9 | } 10 | 11 | /** 12 | * Generates SHA-256 hash of the input string. 13 | * @param {string} plain - The input string to be hashed. 14 | * @return {Buffer} - The generated hash as a buffer object. 15 | */ 16 | function sha256(plain) { 17 | const encoder = new TextEncoder(); 18 | const data = encoder.encode(plain); 19 | return crypto.createHash('sha256').update(data).digest(); 20 | } 21 | 22 | /** 23 | * Converts a binary string to a base64 URL encoded string 24 | * @param {string} str - The binary string to encode 25 | * @returns {string} The base64 URL encoded string 26 | */ 27 | function base64UrlEncode(str) { 28 | return Buffer.from(str).toString('base64') 29 | .replace(/\+/g, '-') 30 | .replace(/\//g, '_') 31 | .replace(/=+$/, ''); 32 | } 33 | 34 | /** 35 | * Function to generate a PKCE challenge from the codeVerifier 36 | * @param {string} codeVerifier - The verifier used to generate the PKCE challenge 37 | * @returns {string} A base64 URL encoded SHA-256 hash of the verifier 38 | */ 39 | export function pkceChallengeFromVerifier(codeVerifier) { 40 | const hashed = sha256(codeVerifier); 41 | return base64UrlEncode(hashed); 42 | } 43 | 44 | /** 45 | * parseJWT - a function to parse a JSON Web Token (JWT) 46 | * @param {string} token - the JWT to parse 47 | * @returns {Object|null} - the JSON object represented by the token or null if the parsing fails 48 | */ 49 | export function parseJWT(token) { 50 | if (typeof token !== 'string') { 51 | throw new Error('Token must be a string'); 52 | } 53 | 54 | const parts = token.split('.'); 55 | if (parts.length !== 3) { 56 | throw new Error('Invalid token format'); 57 | } 58 | 59 | const base64Payload = parts[1]; 60 | try { 61 | return JSON.parse(Buffer.from(base64Payload, 'base64').toString('utf8')); 62 | } catch (error) { 63 | return null; 64 | } 65 | } 66 | 67 | /** 68 | * Returns an object with key-value pairs of cookies extracted from the request headers 69 | * @param {Object} request - The HTTP request object that contains headers with cookie information 70 | * @returns {Object} - An object containing key-value pairs of cookies 71 | */ 72 | function getCookie(request) { 73 | const cookies = {}; 74 | const cookieString = request.headers && request.headers.cookie; 75 | if (cookieString) { 76 | cookieString.split(';').forEach((cookie) => { 77 | const [name, value] = cookie.trim().split('='); 78 | cookies[name] = value; 79 | }); 80 | } 81 | return cookies; 82 | } 83 | 84 | /** 85 | * Returns the session ID if it exists in the cookie header of the HTTP request object, otherwise generates a new session ID and returns it. 86 | * @param {Object} request - The HTTP request object 87 | * @returns {string} - A session ID string 88 | */ 89 | export function getSessionId(request) { 90 | if (!request.headers?.cookie){ 91 | const sessionId = crypto.randomBytes(16).toString('hex'); 92 | return sessionId; 93 | } 94 | const cookies = getCookie(request); 95 | return cookies.kindeSessionId || crypto.randomBytes(16).toString('hex'); 96 | } 97 | -------------------------------------------------------------------------------- /test/api/CallbacksApi.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.CallbacksApi(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('CallbacksApi', function() { 51 | describe('addRedirectCallbackURLs', function() { 52 | it('should call addRedirectCallbackURLs successfully', function(done) { 53 | //uncomment below and update the code to test addRedirectCallbackURLs 54 | //instance.addRedirectCallbackURLs(function(error) { 55 | // if (error) throw error; 56 | //expect().to.be(); 57 | //}); 58 | done(); 59 | }); 60 | }); 61 | describe('getCallbackURLs', function() { 62 | it('should call getCallbackURLs successfully', function(done) { 63 | //uncomment below and update the code to test getCallbackURLs 64 | //instance.getCallbackURLs(function(error) { 65 | // if (error) throw error; 66 | //expect().to.be(); 67 | //}); 68 | done(); 69 | }); 70 | }); 71 | describe('replaceRedirectCallbackURLs', function() { 72 | it('should call replaceRedirectCallbackURLs successfully', function(done) { 73 | //uncomment below and update the code to test replaceRedirectCallbackURLs 74 | //instance.replaceRedirectCallbackURLs(function(error) { 75 | // if (error) throw error; 76 | //expect().to.be(); 77 | //}); 78 | done(); 79 | }); 80 | }); 81 | }); 82 | 83 | })); 84 | -------------------------------------------------------------------------------- /test/api/ConnectedAppsApi.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.ConnectedAppsApi(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('ConnectedAppsApi', function() { 51 | describe('getConnectedAppAuthUrl', function() { 52 | it('should call getConnectedAppAuthUrl successfully', function(done) { 53 | //uncomment below and update the code to test getConnectedAppAuthUrl 54 | //instance.getConnectedAppAuthUrl(function(error) { 55 | // if (error) throw error; 56 | //expect().to.be(); 57 | //}); 58 | done(); 59 | }); 60 | }); 61 | describe('getConnectedAppToken', function() { 62 | it('should call getConnectedAppToken successfully', function(done) { 63 | //uncomment below and update the code to test getConnectedAppToken 64 | //instance.getConnectedAppToken(function(error) { 65 | // if (error) throw error; 66 | //expect().to.be(); 67 | //}); 68 | done(); 69 | }); 70 | }); 71 | describe('revokeConnectedAppToken', function() { 72 | it('should call revokeConnectedAppToken successfully', function(done) { 73 | //uncomment below and update the code to test revokeConnectedAppToken 74 | //instance.revokeConnectedAppToken(function(error) { 75 | // if (error) throw error; 76 | //expect().to.be(); 77 | //}); 78 | done(); 79 | }); 80 | }); 81 | }); 82 | 83 | })); 84 | -------------------------------------------------------------------------------- /test/api/EnvironmentsApi.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.EnvironmentsApi(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('EnvironmentsApi', function() { 51 | describe('deleteEnvironementFeatureFlagOverride', function() { 52 | it('should call deleteEnvironementFeatureFlagOverride successfully', function(done) { 53 | //uncomment below and update the code to test deleteEnvironementFeatureFlagOverride 54 | //instance.deleteEnvironementFeatureFlagOverride(function(error) { 55 | // if (error) throw error; 56 | //expect().to.be(); 57 | //}); 58 | done(); 59 | }); 60 | }); 61 | describe('deleteEnvironementFeatureFlagOverrides', function() { 62 | it('should call deleteEnvironementFeatureFlagOverrides successfully', function(done) { 63 | //uncomment below and update the code to test deleteEnvironementFeatureFlagOverrides 64 | //instance.deleteEnvironementFeatureFlagOverrides(function(error) { 65 | // if (error) throw error; 66 | //expect().to.be(); 67 | //}); 68 | done(); 69 | }); 70 | }); 71 | describe('updateEnvironementFeatureFlagOverride', function() { 72 | it('should call updateEnvironementFeatureFlagOverride successfully', function(done) { 73 | //uncomment below and update the code to test updateEnvironementFeatureFlagOverride 74 | //instance.updateEnvironementFeatureFlagOverride(function(error) { 75 | // if (error) throw error; 76 | //expect().to.be(); 77 | //}); 78 | done(); 79 | }); 80 | }); 81 | }); 82 | 83 | })); 84 | -------------------------------------------------------------------------------- /test/api/FeatureFlagsApi.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.FeatureFlagsApi(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('FeatureFlagsApi', function() { 51 | describe('createFeatureFlag', function() { 52 | it('should call createFeatureFlag successfully', function(done) { 53 | //uncomment below and update the code to test createFeatureFlag 54 | //instance.createFeatureFlag(function(error) { 55 | // if (error) throw error; 56 | //expect().to.be(); 57 | //}); 58 | done(); 59 | }); 60 | }); 61 | describe('deleteFeatureFlag', function() { 62 | it('should call deleteFeatureFlag successfully', function(done) { 63 | //uncomment below and update the code to test deleteFeatureFlag 64 | //instance.deleteFeatureFlag(function(error) { 65 | // if (error) throw error; 66 | //expect().to.be(); 67 | //}); 68 | done(); 69 | }); 70 | }); 71 | describe('updateFeatureFlag', function() { 72 | it('should call updateFeatureFlag successfully', function(done) { 73 | //uncomment below and update the code to test updateFeatureFlag 74 | //instance.updateFeatureFlag(function(error) { 75 | // if (error) throw error; 76 | //expect().to.be(); 77 | //}); 78 | done(); 79 | }); 80 | }); 81 | }); 82 | 83 | })); 84 | -------------------------------------------------------------------------------- /test/api/OAuthApi.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.OAuthApi(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('OAuthApi', function() { 51 | describe('getUser', function() { 52 | it('should call getUser successfully', function(done) { 53 | //uncomment below and update the code to test getUser 54 | //instance.getUser(function(error) { 55 | // if (error) throw error; 56 | //expect().to.be(); 57 | //}); 58 | done(); 59 | }); 60 | }); 61 | describe('getUserProfileV2', function() { 62 | it('should call getUserProfileV2 successfully', function(done) { 63 | //uncomment below and update the code to test getUserProfileV2 64 | //instance.getUserProfileV2(function(error) { 65 | // if (error) throw error; 66 | //expect().to.be(); 67 | //}); 68 | done(); 69 | }); 70 | }); 71 | }); 72 | 73 | })); 74 | -------------------------------------------------------------------------------- /test/api/PermissionsApi.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.PermissionsApi(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('PermissionsApi', function() { 51 | describe('createPermission', function() { 52 | it('should call createPermission successfully', function(done) { 53 | //uncomment below and update the code to test createPermission 54 | //instance.createPermission(function(error) { 55 | // if (error) throw error; 56 | //expect().to.be(); 57 | //}); 58 | done(); 59 | }); 60 | }); 61 | describe('getPermissions', function() { 62 | it('should call getPermissions successfully', function(done) { 63 | //uncomment below and update the code to test getPermissions 64 | //instance.getPermissions(function(error) { 65 | // if (error) throw error; 66 | //expect().to.be(); 67 | //}); 68 | done(); 69 | }); 70 | }); 71 | describe('updatePermissions', function() { 72 | it('should call updatePermissions successfully', function(done) { 73 | //uncomment below and update the code to test updatePermissions 74 | //instance.updatePermissions(function(error) { 75 | // if (error) throw error; 76 | //expect().to.be(); 77 | //}); 78 | done(); 79 | }); 80 | }); 81 | }); 82 | 83 | })); 84 | -------------------------------------------------------------------------------- /test/api/RolesApi.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.RolesApi(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('RolesApi', function() { 51 | describe('createRole', function() { 52 | it('should call createRole successfully', function(done) { 53 | //uncomment below and update the code to test createRole 54 | //instance.createRole(function(error) { 55 | // if (error) throw error; 56 | //expect().to.be(); 57 | //}); 58 | done(); 59 | }); 60 | }); 61 | describe('getRoles', function() { 62 | it('should call getRoles successfully', function(done) { 63 | //uncomment below and update the code to test getRoles 64 | //instance.getRoles(function(error) { 65 | // if (error) throw error; 66 | //expect().to.be(); 67 | //}); 68 | done(); 69 | }); 70 | }); 71 | describe('updateRoles', function() { 72 | it('should call updateRoles successfully', function(done) { 73 | //uncomment below and update the code to test updateRoles 74 | //instance.updateRoles(function(error) { 75 | // if (error) throw error; 76 | //expect().to.be(); 77 | //}); 78 | done(); 79 | }); 80 | }); 81 | }); 82 | 83 | })); 84 | -------------------------------------------------------------------------------- /test/model/AddOrganizationUsersRequest.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.AddOrganizationUsersRequest(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('AddOrganizationUsersRequest', function() { 51 | it('should create an instance of AddOrganizationUsersRequest', function() { 52 | // uncomment below and update the code to test AddOrganizationUsersRequest 53 | //var instance = new KindeManagementApi.AddOrganizationUsersRequest(); 54 | //expect(instance).to.be.a(KindeManagementApi.AddOrganizationUsersRequest); 55 | }); 56 | 57 | it('should have the property users (base name: "users")', function() { 58 | // uncomment below and update the code to test the property users 59 | //var instance = new KindeManagementApi.AddOrganizationUsersRequest(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | }); 64 | 65 | })); 66 | -------------------------------------------------------------------------------- /test/model/AddOrganizationUsersRequestUsersInner.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.AddOrganizationUsersRequestUsersInner(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('AddOrganizationUsersRequestUsersInner', function() { 51 | it('should create an instance of AddOrganizationUsersRequestUsersInner', function() { 52 | // uncomment below and update the code to test AddOrganizationUsersRequestUsersInner 53 | //var instance = new KindeManagementApi.AddOrganizationUsersRequestUsersInner(); 54 | //expect(instance).to.be.a(KindeManagementApi.AddOrganizationUsersRequestUsersInner); 55 | }); 56 | 57 | it('should have the property id (base name: "id")', function() { 58 | // uncomment below and update the code to test the property id 59 | //var instance = new KindeManagementApi.AddOrganizationUsersRequestUsersInner(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property roles (base name: "roles")', function() { 64 | // uncomment below and update the code to test the property roles 65 | //var instance = new KindeManagementApi.AddOrganizationUsersRequestUsersInner(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | it('should have the property permissions (base name: "permissions")', function() { 70 | // uncomment below and update the code to test the property permissions 71 | //var instance = new KindeManagementApi.AddOrganizationUsersRequestUsersInner(); 72 | //expect(instance).to.be(); 73 | }); 74 | 75 | }); 76 | 77 | })); 78 | -------------------------------------------------------------------------------- /test/model/AddOrganizationUsersResponse.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.AddOrganizationUsersResponse(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('AddOrganizationUsersResponse', function() { 51 | it('should create an instance of AddOrganizationUsersResponse', function() { 52 | // uncomment below and update the code to test AddOrganizationUsersResponse 53 | //var instance = new KindeManagementApi.AddOrganizationUsersResponse(); 54 | //expect(instance).to.be.a(KindeManagementApi.AddOrganizationUsersResponse); 55 | }); 56 | 57 | it('should have the property code (base name: "code")', function() { 58 | // uncomment below and update the code to test the property code 59 | //var instance = new KindeManagementApi.AddOrganizationUsersResponse(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property message (base name: "message")', function() { 64 | // uncomment below and update the code to test the property message 65 | //var instance = new KindeManagementApi.AddOrganizationUsersResponse(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | it('should have the property usersAdded (base name: "users_added")', function() { 70 | // uncomment below and update the code to test the property usersAdded 71 | //var instance = new KindeManagementApi.AddOrganizationUsersResponse(); 72 | //expect(instance).to.be(); 73 | }); 74 | 75 | }); 76 | 77 | })); 78 | -------------------------------------------------------------------------------- /test/model/ApiResult.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.ApiResult(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('ApiResult', function() { 51 | it('should create an instance of ApiResult', function() { 52 | // uncomment below and update the code to test ApiResult 53 | //var instance = new KindeManagementApi.ApiResult(); 54 | //expect(instance).to.be.a(KindeManagementApi.ApiResult); 55 | }); 56 | 57 | it('should have the property result (base name: "result")', function() { 58 | // uncomment below and update the code to test the property result 59 | //var instance = new KindeManagementApi.ApiResult(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | }); 64 | 65 | })); 66 | -------------------------------------------------------------------------------- /test/model/Application.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.Application(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('Application', function() { 51 | it('should create an instance of Application', function() { 52 | // uncomment below and update the code to test Application 53 | //var instance = new KindeManagementApi.Application(); 54 | //expect(instance).to.be.a(KindeManagementApi.Application); 55 | }); 56 | 57 | it('should have the property appId (base name: "app_id")', function() { 58 | // uncomment below and update the code to test the property appId 59 | //var instance = new KindeManagementApi.Application(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property name (base name: "name")', function() { 64 | // uncomment below and update the code to test the property name 65 | //var instance = new KindeManagementApi.Application(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | }); 70 | 71 | })); 72 | -------------------------------------------------------------------------------- /test/model/ConnectedAppsAccessToken.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.ConnectedAppsAccessToken(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('ConnectedAppsAccessToken', function() { 51 | it('should create an instance of ConnectedAppsAccessToken', function() { 52 | // uncomment below and update the code to test ConnectedAppsAccessToken 53 | //var instance = new KindeManagementApi.ConnectedAppsAccessToken(); 54 | //expect(instance).to.be.a(KindeManagementApi.ConnectedAppsAccessToken); 55 | }); 56 | 57 | it('should have the property accessToken (base name: "access_token")', function() { 58 | // uncomment below and update the code to test the property accessToken 59 | //var instance = new KindeManagementApi.ConnectedAppsAccessToken(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property accessTokenExpiry (base name: "access_token_expiry")', function() { 64 | // uncomment below and update the code to test the property accessTokenExpiry 65 | //var instance = new KindeManagementApi.ConnectedAppsAccessToken(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | }); 70 | 71 | })); 72 | -------------------------------------------------------------------------------- /test/model/ConnectedAppsAuthUrl.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.ConnectedAppsAuthUrl(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('ConnectedAppsAuthUrl', function() { 51 | it('should create an instance of ConnectedAppsAuthUrl', function() { 52 | // uncomment below and update the code to test ConnectedAppsAuthUrl 53 | //var instance = new KindeManagementApi.ConnectedAppsAuthUrl(); 54 | //expect(instance).to.be.a(KindeManagementApi.ConnectedAppsAuthUrl); 55 | }); 56 | 57 | it('should have the property url (base name: "url")', function() { 58 | // uncomment below and update the code to test the property url 59 | //var instance = new KindeManagementApi.ConnectedAppsAuthUrl(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property sessionId (base name: "session_id")', function() { 64 | // uncomment below and update the code to test the property sessionId 65 | //var instance = new KindeManagementApi.ConnectedAppsAuthUrl(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | }); 70 | 71 | })); 72 | -------------------------------------------------------------------------------- /test/model/CreateOrganizationResponse.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.CreateOrganizationResponse(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('CreateOrganizationResponse', function() { 51 | it('should create an instance of CreateOrganizationResponse', function() { 52 | // uncomment below and update the code to test CreateOrganizationResponse 53 | //var instance = new KindeManagementApi.CreateOrganizationResponse(); 54 | //expect(instance).to.be.a(KindeManagementApi.CreateOrganizationResponse); 55 | }); 56 | 57 | it('should have the property message (base name: "message")', function() { 58 | // uncomment below and update the code to test the property message 59 | //var instance = new KindeManagementApi.CreateOrganizationResponse(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property code (base name: "code")', function() { 64 | // uncomment below and update the code to test the property code 65 | //var instance = new KindeManagementApi.CreateOrganizationResponse(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | it('should have the property organization (base name: "organization")', function() { 70 | // uncomment below and update the code to test the property organization 71 | //var instance = new KindeManagementApi.CreateOrganizationResponse(); 72 | //expect(instance).to.be(); 73 | }); 74 | 75 | }); 76 | 77 | })); 78 | -------------------------------------------------------------------------------- /test/model/CreateOrganizationResponseOrganization.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.CreateOrganizationResponseOrganization(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('CreateOrganizationResponseOrganization', function() { 51 | it('should create an instance of CreateOrganizationResponseOrganization', function() { 52 | // uncomment below and update the code to test CreateOrganizationResponseOrganization 53 | //var instance = new KindeManagementApi.CreateOrganizationResponseOrganization(); 54 | //expect(instance).to.be.a(KindeManagementApi.CreateOrganizationResponseOrganization); 55 | }); 56 | 57 | it('should have the property code (base name: "code")', function() { 58 | // uncomment below and update the code to test the property code 59 | //var instance = new KindeManagementApi.CreateOrganizationResponseOrganization(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | }); 64 | 65 | })); 66 | -------------------------------------------------------------------------------- /test/model/CreateOrganizationUserRoleRequest.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.CreateOrganizationUserRoleRequest(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('CreateOrganizationUserRoleRequest', function() { 51 | it('should create an instance of CreateOrganizationUserRoleRequest', function() { 52 | // uncomment below and update the code to test CreateOrganizationUserRoleRequest 53 | //var instance = new KindeManagementApi.CreateOrganizationUserRoleRequest(); 54 | //expect(instance).to.be.a(KindeManagementApi.CreateOrganizationUserRoleRequest); 55 | }); 56 | 57 | it('should have the property roleId (base name: "role_id")', function() { 58 | // uncomment below and update the code to test the property roleId 59 | //var instance = new KindeManagementApi.CreateOrganizationUserRoleRequest(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | }); 64 | 65 | })); 66 | -------------------------------------------------------------------------------- /test/model/CreatePermissionRequest.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.CreatePermissionRequest(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('CreatePermissionRequest', function() { 51 | it('should create an instance of CreatePermissionRequest', function() { 52 | // uncomment below and update the code to test CreatePermissionRequest 53 | //var instance = new KindeManagementApi.CreatePermissionRequest(); 54 | //expect(instance).to.be.a(KindeManagementApi.CreatePermissionRequest); 55 | }); 56 | 57 | it('should have the property name (base name: "name")', function() { 58 | // uncomment below and update the code to test the property name 59 | //var instance = new KindeManagementApi.CreatePermissionRequest(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property description (base name: "description")', function() { 64 | // uncomment below and update the code to test the property description 65 | //var instance = new KindeManagementApi.CreatePermissionRequest(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | it('should have the property key (base name: "key")', function() { 70 | // uncomment below and update the code to test the property key 71 | //var instance = new KindeManagementApi.CreatePermissionRequest(); 72 | //expect(instance).to.be(); 73 | }); 74 | 75 | }); 76 | 77 | })); 78 | -------------------------------------------------------------------------------- /test/model/CreateRoleRequest.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.CreateRoleRequest(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('CreateRoleRequest', function() { 51 | it('should create an instance of CreateRoleRequest', function() { 52 | // uncomment below and update the code to test CreateRoleRequest 53 | //var instance = new KindeManagementApi.CreateRoleRequest(); 54 | //expect(instance).to.be.a(KindeManagementApi.CreateRoleRequest); 55 | }); 56 | 57 | it('should have the property name (base name: "name")', function() { 58 | // uncomment below and update the code to test the property name 59 | //var instance = new KindeManagementApi.CreateRoleRequest(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property description (base name: "description")', function() { 64 | // uncomment below and update the code to test the property description 65 | //var instance = new KindeManagementApi.CreateRoleRequest(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | it('should have the property key (base name: "key")', function() { 70 | // uncomment below and update the code to test the property key 71 | //var instance = new KindeManagementApi.CreateRoleRequest(); 72 | //expect(instance).to.be(); 73 | }); 74 | 75 | it('should have the property isDefaultRole (base name: "is_default_role")', function() { 76 | // uncomment below and update the code to test the property isDefaultRole 77 | //var instance = new KindeManagementApi.CreateRoleRequest(); 78 | //expect(instance).to.be(); 79 | }); 80 | 81 | }); 82 | 83 | })); 84 | -------------------------------------------------------------------------------- /test/model/CreateUserRequest.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.CreateUserRequest(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('CreateUserRequest', function() { 51 | it('should create an instance of CreateUserRequest', function() { 52 | // uncomment below and update the code to test CreateUserRequest 53 | //var instance = new KindeManagementApi.CreateUserRequest(); 54 | //expect(instance).to.be.a(KindeManagementApi.CreateUserRequest); 55 | }); 56 | 57 | it('should have the property profile (base name: "profile")', function() { 58 | // uncomment below and update the code to test the property profile 59 | //var instance = new KindeManagementApi.CreateUserRequest(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property identities (base name: "identities")', function() { 64 | // uncomment below and update the code to test the property identities 65 | //var instance = new KindeManagementApi.CreateUserRequest(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | }); 70 | 71 | })); 72 | -------------------------------------------------------------------------------- /test/model/CreateUserRequestIdentitiesInner.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.CreateUserRequestIdentitiesInner(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('CreateUserRequestIdentitiesInner', function() { 51 | it('should create an instance of CreateUserRequestIdentitiesInner', function() { 52 | // uncomment below and update the code to test CreateUserRequestIdentitiesInner 53 | //var instance = new KindeManagementApi.CreateUserRequestIdentitiesInner(); 54 | //expect(instance).to.be.a(KindeManagementApi.CreateUserRequestIdentitiesInner); 55 | }); 56 | 57 | it('should have the property type (base name: "type")', function() { 58 | // uncomment below and update the code to test the property type 59 | //var instance = new KindeManagementApi.CreateUserRequestIdentitiesInner(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property details (base name: "details")', function() { 64 | // uncomment below and update the code to test the property details 65 | //var instance = new KindeManagementApi.CreateUserRequestIdentitiesInner(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | }); 70 | 71 | })); 72 | -------------------------------------------------------------------------------- /test/model/CreateUserRequestIdentitiesInnerDetails.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.CreateUserRequestIdentitiesInnerDetails(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('CreateUserRequestIdentitiesInnerDetails', function() { 51 | it('should create an instance of CreateUserRequestIdentitiesInnerDetails', function() { 52 | // uncomment below and update the code to test CreateUserRequestIdentitiesInnerDetails 53 | //var instance = new KindeManagementApi.CreateUserRequestIdentitiesInnerDetails(); 54 | //expect(instance).to.be.a(KindeManagementApi.CreateUserRequestIdentitiesInnerDetails); 55 | }); 56 | 57 | it('should have the property email (base name: "email")', function() { 58 | // uncomment below and update the code to test the property email 59 | //var instance = new KindeManagementApi.CreateUserRequestIdentitiesInnerDetails(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | }); 64 | 65 | })); 66 | -------------------------------------------------------------------------------- /test/model/CreateUserRequestProfile.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.CreateUserRequestProfile(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('CreateUserRequestProfile', function() { 51 | it('should create an instance of CreateUserRequestProfile', function() { 52 | // uncomment below and update the code to test CreateUserRequestProfile 53 | //var instance = new KindeManagementApi.CreateUserRequestProfile(); 54 | //expect(instance).to.be.a(KindeManagementApi.CreateUserRequestProfile); 55 | }); 56 | 57 | it('should have the property givenName (base name: "given_name")', function() { 58 | // uncomment below and update the code to test the property givenName 59 | //var instance = new KindeManagementApi.CreateUserRequestProfile(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property familyName (base name: "family_name")', function() { 64 | // uncomment below and update the code to test the property familyName 65 | //var instance = new KindeManagementApi.CreateUserRequestProfile(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | }); 70 | 71 | })); 72 | -------------------------------------------------------------------------------- /test/model/CreateUserResponse.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.CreateUserResponse(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('CreateUserResponse', function() { 51 | it('should create an instance of CreateUserResponse', function() { 52 | // uncomment below and update the code to test CreateUserResponse 53 | //var instance = new KindeManagementApi.CreateUserResponse(); 54 | //expect(instance).to.be.a(KindeManagementApi.CreateUserResponse); 55 | }); 56 | 57 | it('should have the property id (base name: "id")', function() { 58 | // uncomment below and update the code to test the property id 59 | //var instance = new KindeManagementApi.CreateUserResponse(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property created (base name: "created")', function() { 64 | // uncomment below and update the code to test the property created 65 | //var instance = new KindeManagementApi.CreateUserResponse(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | it('should have the property identities (base name: "identities")', function() { 70 | // uncomment below and update the code to test the property identities 71 | //var instance = new KindeManagementApi.CreateUserResponse(); 72 | //expect(instance).to.be(); 73 | }); 74 | 75 | }); 76 | 77 | })); 78 | -------------------------------------------------------------------------------- /test/model/Error.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.Error(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('Error', function() { 51 | it('should create an instance of Error', function() { 52 | // uncomment below and update the code to test Error 53 | //var instance = new KindeManagementApi.Error(); 54 | //expect(instance).to.be.a(KindeManagementApi.Error); 55 | }); 56 | 57 | it('should have the property code (base name: "code")', function() { 58 | // uncomment below and update the code to test the property code 59 | //var instance = new KindeManagementApi.Error(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property message (base name: "message")', function() { 64 | // uncomment below and update the code to test the property message 65 | //var instance = new KindeManagementApi.Error(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | }); 70 | 71 | })); 72 | -------------------------------------------------------------------------------- /test/model/ErrorResponse.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.ErrorResponse(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('ErrorResponse', function() { 51 | it('should create an instance of ErrorResponse', function() { 52 | // uncomment below and update the code to test ErrorResponse 53 | //var instance = new KindeManagementApi.ErrorResponse(); 54 | //expect(instance).to.be.a(KindeManagementApi.ErrorResponse); 55 | }); 56 | 57 | it('should have the property errors (base name: "errors")', function() { 58 | // uncomment below and update the code to test the property errors 59 | //var instance = new KindeManagementApi.ErrorResponse(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | }); 64 | 65 | })); 66 | -------------------------------------------------------------------------------- /test/model/GetApplicationsResponse.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.GetApplicationsResponse(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('GetApplicationsResponse', function() { 51 | it('should create an instance of GetApplicationsResponse', function() { 52 | // uncomment below and update the code to test GetApplicationsResponse 53 | //var instance = new KindeManagementApi.GetApplicationsResponse(); 54 | //expect(instance).to.be.a(KindeManagementApi.GetApplicationsResponse); 55 | }); 56 | 57 | it('should have the property code (base name: "code")', function() { 58 | // uncomment below and update the code to test the property code 59 | //var instance = new KindeManagementApi.GetApplicationsResponse(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property message (base name: "message")', function() { 64 | // uncomment below and update the code to test the property message 65 | //var instance = new KindeManagementApi.GetApplicationsResponse(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | it('should have the property organizations (base name: "organizations")', function() { 70 | // uncomment below and update the code to test the property organizations 71 | //var instance = new KindeManagementApi.GetApplicationsResponse(); 72 | //expect(instance).to.be(); 73 | }); 74 | 75 | it('should have the property nextToken (base name: "next_token")', function() { 76 | // uncomment below and update the code to test the property nextToken 77 | //var instance = new KindeManagementApi.GetApplicationsResponse(); 78 | //expect(instance).to.be(); 79 | }); 80 | 81 | }); 82 | 83 | })); 84 | -------------------------------------------------------------------------------- /test/model/GetOrganizationsResponse.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.GetOrganizationsResponse(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('GetOrganizationsResponse', function() { 51 | it('should create an instance of GetOrganizationsResponse', function() { 52 | // uncomment below and update the code to test GetOrganizationsResponse 53 | //var instance = new KindeManagementApi.GetOrganizationsResponse(); 54 | //expect(instance).to.be.a(KindeManagementApi.GetOrganizationsResponse); 55 | }); 56 | 57 | it('should have the property code (base name: "code")', function() { 58 | // uncomment below and update the code to test the property code 59 | //var instance = new KindeManagementApi.GetOrganizationsResponse(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property message (base name: "message")', function() { 64 | // uncomment below and update the code to test the property message 65 | //var instance = new KindeManagementApi.GetOrganizationsResponse(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | it('should have the property organizations (base name: "organizations")', function() { 70 | // uncomment below and update the code to test the property organizations 71 | //var instance = new KindeManagementApi.GetOrganizationsResponse(); 72 | //expect(instance).to.be(); 73 | }); 74 | 75 | it('should have the property nextToken (base name: "next_token")', function() { 76 | // uncomment below and update the code to test the property nextToken 77 | //var instance = new KindeManagementApi.GetOrganizationsResponse(); 78 | //expect(instance).to.be(); 79 | }); 80 | 81 | }); 82 | 83 | })); 84 | -------------------------------------------------------------------------------- /test/model/GetOrganizationsUserRolesResponse.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.GetOrganizationsUserRolesResponse(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('GetOrganizationsUserRolesResponse', function() { 51 | it('should create an instance of GetOrganizationsUserRolesResponse', function() { 52 | // uncomment below and update the code to test GetOrganizationsUserRolesResponse 53 | //var instance = new KindeManagementApi.GetOrganizationsUserRolesResponse(); 54 | //expect(instance).to.be.a(KindeManagementApi.GetOrganizationsUserRolesResponse); 55 | }); 56 | 57 | it('should have the property code (base name: "code")', function() { 58 | // uncomment below and update the code to test the property code 59 | //var instance = new KindeManagementApi.GetOrganizationsUserRolesResponse(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property message (base name: "message")', function() { 64 | // uncomment below and update the code to test the property message 65 | //var instance = new KindeManagementApi.GetOrganizationsUserRolesResponse(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | it('should have the property roles (base name: "roles")', function() { 70 | // uncomment below and update the code to test the property roles 71 | //var instance = new KindeManagementApi.GetOrganizationsUserRolesResponse(); 72 | //expect(instance).to.be(); 73 | }); 74 | 75 | it('should have the property nextToken (base name: "next_token")', function() { 76 | // uncomment below and update the code to test the property nextToken 77 | //var instance = new KindeManagementApi.GetOrganizationsUserRolesResponse(); 78 | //expect(instance).to.be(); 79 | }); 80 | 81 | }); 82 | 83 | })); 84 | -------------------------------------------------------------------------------- /test/model/GetOrganizationsUsersResponse.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.GetOrganizationsUsersResponse(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('GetOrganizationsUsersResponse', function() { 51 | it('should create an instance of GetOrganizationsUsersResponse', function() { 52 | // uncomment below and update the code to test GetOrganizationsUsersResponse 53 | //var instance = new KindeManagementApi.GetOrganizationsUsersResponse(); 54 | //expect(instance).to.be.a(KindeManagementApi.GetOrganizationsUsersResponse); 55 | }); 56 | 57 | it('should have the property code (base name: "code")', function() { 58 | // uncomment below and update the code to test the property code 59 | //var instance = new KindeManagementApi.GetOrganizationsUsersResponse(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property message (base name: "message")', function() { 64 | // uncomment below and update the code to test the property message 65 | //var instance = new KindeManagementApi.GetOrganizationsUsersResponse(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | it('should have the property organizationUsers (base name: "organization_users")', function() { 70 | // uncomment below and update the code to test the property organizationUsers 71 | //var instance = new KindeManagementApi.GetOrganizationsUsersResponse(); 72 | //expect(instance).to.be(); 73 | }); 74 | 75 | it('should have the property nextToken (base name: "next_token")', function() { 76 | // uncomment below and update the code to test the property nextToken 77 | //var instance = new KindeManagementApi.GetOrganizationsUsersResponse(); 78 | //expect(instance).to.be(); 79 | }); 80 | 81 | }); 82 | 83 | })); 84 | -------------------------------------------------------------------------------- /test/model/GetRedirectCallbackUrlsResponse.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.GetRedirectCallbackUrlsResponse(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('GetRedirectCallbackUrlsResponse', function() { 51 | it('should create an instance of GetRedirectCallbackUrlsResponse', function() { 52 | // uncomment below and update the code to test GetRedirectCallbackUrlsResponse 53 | //var instance = new KindeManagementApi.GetRedirectCallbackUrlsResponse(); 54 | //expect(instance).to.be.a(KindeManagementApi.GetRedirectCallbackUrlsResponse); 55 | }); 56 | 57 | it('should have the property redirectUrls (base name: "redirect_urls")', function() { 58 | // uncomment below and update the code to test the property redirectUrls 59 | //var instance = new KindeManagementApi.GetRedirectCallbackUrlsResponse(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | }); 64 | 65 | })); 66 | -------------------------------------------------------------------------------- /test/model/Organization.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.Organization(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('Organization', function() { 51 | it('should create an instance of Organization', function() { 52 | // uncomment below and update the code to test Organization 53 | //var instance = new KindeManagementApi.Organization(); 54 | //expect(instance).to.be.a(KindeManagementApi.Organization); 55 | }); 56 | 57 | it('should have the property code (base name: "code")', function() { 58 | // uncomment below and update the code to test the property code 59 | //var instance = new KindeManagementApi.Organization(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property name (base name: "name")', function() { 64 | // uncomment below and update the code to test the property name 65 | //var instance = new KindeManagementApi.Organization(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | it('should have the property isDefault (base name: "is_default")', function() { 70 | // uncomment below and update the code to test the property isDefault 71 | //var instance = new KindeManagementApi.Organization(); 72 | //expect(instance).to.be(); 73 | }); 74 | 75 | }); 76 | 77 | })); 78 | -------------------------------------------------------------------------------- /test/model/OrganizationUserRole.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.OrganizationUserRole(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('OrganizationUserRole', function() { 51 | it('should create an instance of OrganizationUserRole', function() { 52 | // uncomment below and update the code to test OrganizationUserRole 53 | //var instance = new KindeManagementApi.OrganizationUserRole(); 54 | //expect(instance).to.be.a(KindeManagementApi.OrganizationUserRole); 55 | }); 56 | 57 | it('should have the property id (base name: "id")', function() { 58 | // uncomment below and update the code to test the property id 59 | //var instance = new KindeManagementApi.OrganizationUserRole(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property key (base name: "key")', function() { 64 | // uncomment below and update the code to test the property key 65 | //var instance = new KindeManagementApi.OrganizationUserRole(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | it('should have the property name (base name: "name")', function() { 70 | // uncomment below and update the code to test the property name 71 | //var instance = new KindeManagementApi.OrganizationUserRole(); 72 | //expect(instance).to.be(); 73 | }); 74 | 75 | }); 76 | 77 | })); 78 | -------------------------------------------------------------------------------- /test/model/Permissions.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.Permissions(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('Permissions', function() { 51 | it('should create an instance of Permissions', function() { 52 | // uncomment below and update the code to test Permissions 53 | //var instance = new KindeManagementApi.Permissions(); 54 | //expect(instance).to.be.a(KindeManagementApi.Permissions); 55 | }); 56 | 57 | it('should have the property id (base name: "id")', function() { 58 | // uncomment below and update the code to test the property id 59 | //var instance = new KindeManagementApi.Permissions(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property name (base name: "name")', function() { 64 | // uncomment below and update the code to test the property name 65 | //var instance = new KindeManagementApi.Permissions(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | it('should have the property description (base name: "description")', function() { 70 | // uncomment below and update the code to test the property description 71 | //var instance = new KindeManagementApi.Permissions(); 72 | //expect(instance).to.be(); 73 | }); 74 | 75 | }); 76 | 77 | })); 78 | -------------------------------------------------------------------------------- /test/model/RedirectCallbackUrls.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.RedirectCallbackUrls(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('RedirectCallbackUrls', function() { 51 | it('should create an instance of RedirectCallbackUrls', function() { 52 | // uncomment below and update the code to test RedirectCallbackUrls 53 | //var instance = new KindeManagementApi.RedirectCallbackUrls(); 54 | //expect(instance).to.be.a(KindeManagementApi.RedirectCallbackUrls); 55 | }); 56 | 57 | it('should have the property redirectUrls (base name: "redirect_urls")', function() { 58 | // uncomment below and update the code to test the property redirectUrls 59 | //var instance = new KindeManagementApi.RedirectCallbackUrls(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | }); 64 | 65 | })); 66 | -------------------------------------------------------------------------------- /test/model/RemoveOrganizationUsersResponse.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.RemoveOrganizationUsersResponse(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('RemoveOrganizationUsersResponse', function() { 51 | it('should create an instance of RemoveOrganizationUsersResponse', function() { 52 | // uncomment below and update the code to test RemoveOrganizationUsersResponse 53 | //var instance = new KindeManagementApi.RemoveOrganizationUsersResponse(); 54 | //expect(instance).to.be.a(KindeManagementApi.RemoveOrganizationUsersResponse); 55 | }); 56 | 57 | it('should have the property message (base name: "message")', function() { 58 | // uncomment below and update the code to test the property message 59 | //var instance = new KindeManagementApi.RemoveOrganizationUsersResponse(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property usersAdded (base name: "users_added")', function() { 64 | // uncomment below and update the code to test the property usersAdded 65 | //var instance = new KindeManagementApi.RemoveOrganizationUsersResponse(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | }); 70 | 71 | })); 72 | -------------------------------------------------------------------------------- /test/model/Roles.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.Roles(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('Roles', function() { 51 | it('should create an instance of Roles', function() { 52 | // uncomment below and update the code to test Roles 53 | //var instance = new KindeManagementApi.Roles(); 54 | //expect(instance).to.be.a(KindeManagementApi.Roles); 55 | }); 56 | 57 | it('should have the property key (base name: "key")', function() { 58 | // uncomment below and update the code to test the property key 59 | //var instance = new KindeManagementApi.Roles(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property name (base name: "name")', function() { 64 | // uncomment below and update the code to test the property name 65 | //var instance = new KindeManagementApi.Roles(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | it('should have the property description (base name: "description")', function() { 70 | // uncomment below and update the code to test the property description 71 | //var instance = new KindeManagementApi.Roles(); 72 | //expect(instance).to.be(); 73 | }); 74 | 75 | }); 76 | 77 | })); 78 | -------------------------------------------------------------------------------- /test/model/SuccessResponse.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.SuccessResponse(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('SuccessResponse', function() { 51 | it('should create an instance of SuccessResponse', function() { 52 | // uncomment below and update the code to test SuccessResponse 53 | //var instance = new KindeManagementApi.SuccessResponse(); 54 | //expect(instance).to.be.a(KindeManagementApi.SuccessResponse); 55 | }); 56 | 57 | it('should have the property message (base name: "message")', function() { 58 | // uncomment below and update the code to test the property message 59 | //var instance = new KindeManagementApi.SuccessResponse(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property code (base name: "code")', function() { 64 | // uncomment below and update the code to test the property code 65 | //var instance = new KindeManagementApi.SuccessResponse(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | }); 70 | 71 | })); 72 | -------------------------------------------------------------------------------- /test/model/UpdateOrganizationUsersRequest.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.UpdateOrganizationUsersRequest(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('UpdateOrganizationUsersRequest', function() { 51 | it('should create an instance of UpdateOrganizationUsersRequest', function() { 52 | // uncomment below and update the code to test UpdateOrganizationUsersRequest 53 | //var instance = new KindeManagementApi.UpdateOrganizationUsersRequest(); 54 | //expect(instance).to.be.a(KindeManagementApi.UpdateOrganizationUsersRequest); 55 | }); 56 | 57 | it('should have the property users (base name: "users")', function() { 58 | // uncomment below and update the code to test the property users 59 | //var instance = new KindeManagementApi.UpdateOrganizationUsersRequest(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | }); 64 | 65 | })); 66 | -------------------------------------------------------------------------------- /test/model/UpdateOrganizationUsersRequestUsersInner.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.UpdateOrganizationUsersRequestUsersInner(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('UpdateOrganizationUsersRequestUsersInner', function() { 51 | it('should create an instance of UpdateOrganizationUsersRequestUsersInner', function() { 52 | // uncomment below and update the code to test UpdateOrganizationUsersRequestUsersInner 53 | //var instance = new KindeManagementApi.UpdateOrganizationUsersRequestUsersInner(); 54 | //expect(instance).to.be.a(KindeManagementApi.UpdateOrganizationUsersRequestUsersInner); 55 | }); 56 | 57 | it('should have the property id (base name: "id")', function() { 58 | // uncomment below and update the code to test the property id 59 | //var instance = new KindeManagementApi.UpdateOrganizationUsersRequestUsersInner(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property operation (base name: "operation")', function() { 64 | // uncomment below and update the code to test the property operation 65 | //var instance = new KindeManagementApi.UpdateOrganizationUsersRequestUsersInner(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | it('should have the property roles (base name: "roles")', function() { 70 | // uncomment below and update the code to test the property roles 71 | //var instance = new KindeManagementApi.UpdateOrganizationUsersRequestUsersInner(); 72 | //expect(instance).to.be(); 73 | }); 74 | 75 | it('should have the property permissions (base name: "permissions")', function() { 76 | // uncomment below and update the code to test the property permissions 77 | //var instance = new KindeManagementApi.UpdateOrganizationUsersRequestUsersInner(); 78 | //expect(instance).to.be(); 79 | }); 80 | 81 | }); 82 | 83 | })); 84 | -------------------------------------------------------------------------------- /test/model/UpdateUserRequest.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.UpdateUserRequest(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('UpdateUserRequest', function() { 51 | it('should create an instance of UpdateUserRequest', function() { 52 | // uncomment below and update the code to test UpdateUserRequest 53 | //var instance = new KindeManagementApi.UpdateUserRequest(); 54 | //expect(instance).to.be.a(KindeManagementApi.UpdateUserRequest); 55 | }); 56 | 57 | it('should have the property givenName (base name: "given_name")', function() { 58 | // uncomment below and update the code to test the property givenName 59 | //var instance = new KindeManagementApi.UpdateUserRequest(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property familyName (base name: "family_name")', function() { 64 | // uncomment below and update the code to test the property familyName 65 | //var instance = new KindeManagementApi.UpdateUserRequest(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | it('should have the property isSuspended (base name: "is_suspended")', function() { 70 | // uncomment below and update the code to test the property isSuspended 71 | //var instance = new KindeManagementApi.UpdateUserRequest(); 72 | //expect(instance).to.be(); 73 | }); 74 | 75 | }); 76 | 77 | })); 78 | -------------------------------------------------------------------------------- /test/model/UserIdentity.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.UserIdentity(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('UserIdentity', function() { 51 | it('should create an instance of UserIdentity', function() { 52 | // uncomment below and update the code to test UserIdentity 53 | //var instance = new KindeManagementApi.UserIdentity(); 54 | //expect(instance).to.be.a(KindeManagementApi.UserIdentity); 55 | }); 56 | 57 | it('should have the property type (base name: "type")', function() { 58 | // uncomment below and update the code to test the property type 59 | //var instance = new KindeManagementApi.UserIdentity(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property result (base name: "result")', function() { 64 | // uncomment below and update the code to test the property result 65 | //var instance = new KindeManagementApi.UserIdentity(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | }); 70 | 71 | })); 72 | -------------------------------------------------------------------------------- /test/model/UserIdentityResult.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.UserIdentityResult(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('UserIdentityResult', function() { 51 | it('should create an instance of UserIdentityResult', function() { 52 | // uncomment below and update the code to test UserIdentityResult 53 | //var instance = new KindeManagementApi.UserIdentityResult(); 54 | //expect(instance).to.be.a(KindeManagementApi.UserIdentityResult); 55 | }); 56 | 57 | it('should have the property created (base name: "created")', function() { 58 | // uncomment below and update the code to test the property created 59 | //var instance = new KindeManagementApi.UserIdentityResult(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property identityId (base name: "identity_id")', function() { 64 | // uncomment below and update the code to test the property identityId 65 | //var instance = new KindeManagementApi.UserIdentityResult(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | }); 70 | 71 | })); 72 | -------------------------------------------------------------------------------- /test/model/UsersResponse.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | 14 | (function(root, factory) { 15 | if (typeof define === 'function' && define.amd) { 16 | // AMD. 17 | define(['expect.js', process.cwd()+'/src/index'], factory); 18 | } else if (typeof module === 'object' && module.exports) { 19 | // CommonJS-like environments that support module.exports, like Node. 20 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 21 | } else { 22 | // Browser globals (root is window) 23 | factory(root.expect, root.KindeManagementApi); 24 | } 25 | }(this, function(expect, KindeManagementApi) { 26 | 'use strict'; 27 | 28 | var instance; 29 | 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.UsersResponse(); 32 | }); 33 | 34 | var getProperty = function(object, getter, property) { 35 | // Use getter method if present; otherwise, get the property directly. 36 | if (typeof object[getter] === 'function') 37 | return object[getter](); 38 | else 39 | return object[property]; 40 | } 41 | 42 | var setProperty = function(object, setter, property, value) { 43 | // Use setter method if present; otherwise, set the property directly. 44 | if (typeof object[setter] === 'function') 45 | object[setter](value); 46 | else 47 | object[property] = value; 48 | } 49 | 50 | describe('UsersResponse', function() { 51 | it('should create an instance of UsersResponse', function() { 52 | // uncomment below and update the code to test UsersResponse 53 | //var instance = new KindeManagementApi.UsersResponse(); 54 | //expect(instance).to.be.a(KindeManagementApi.UsersResponse); 55 | }); 56 | 57 | it('should have the property code (base name: "code")', function() { 58 | // uncomment below and update the code to test the property code 59 | //var instance = new KindeManagementApi.UsersResponse(); 60 | //expect(instance).to.be(); 61 | }); 62 | 63 | it('should have the property message (base name: "message")', function() { 64 | // uncomment below and update the code to test the property message 65 | //var instance = new KindeManagementApi.UsersResponse(); 66 | //expect(instance).to.be(); 67 | }); 68 | 69 | it('should have the property users (base name: "users")', function() { 70 | // uncomment below and update the code to test the property users 71 | //var instance = new KindeManagementApi.UsersResponse(); 72 | //expect(instance).to.be(); 73 | }); 74 | 75 | it('should have the property nextToken (base name: "next_token")', function() { 76 | // uncomment below and update the code to test the property nextToken 77 | //var instance = new KindeManagementApi.UsersResponse(); 78 | //expect(instance).to.be(); 79 | }); 80 | 81 | }); 82 | 83 | })); 84 | -------------------------------------------------------------------------------- /test/sdk/OAuth2ClientCredentials.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | import sinon from 'sinon'; 14 | 15 | (function(root, factory) { 16 | if (typeof define === 'function' && define.amd) { 17 | // AMD. 18 | define(['expect.js', process.cwd()+'/src/index'], factory); 19 | } else if (typeof module === 'object' && module.exports) { 20 | // CommonJS-like environments that support module.exports, like Node. 21 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 22 | } else { 23 | // Browser globals (root is window) 24 | factory(root.expect, root.KindeManagementApi); 25 | } 26 | }(this, function(expect, KindeManagementApi) { 27 | 'use strict'; 28 | 29 | var instance; 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.ClientCredentials(); 32 | }); 33 | 34 | describe('ClientCredentials', function() { 35 | describe('getToken', async function() { 36 | let fetchStub; 37 | beforeEach(() => { 38 | fetchStub = sinon.stub(global, 'fetch'); 39 | }); 40 | 41 | afterEach(() => { 42 | fetchStub.restore(); 43 | }); 44 | 45 | it('should call getToken successfully', async () => { 46 | const client = { 47 | clientId: 'abc123', 48 | clientSecret: 'secret', 49 | redirectUri: 'https://example.com/redirect', 50 | tokenEndpoint: 'https://example.com/token', 51 | scope: 'scope', 52 | grantType: 'client_credentials', 53 | }; 54 | const expectedSearchParams = new URLSearchParams({ 55 | grant_type: 'client_credentials', 56 | client_id: client.clientId, 57 | client_secret: client.clientSecret, 58 | scope: client.scope, 59 | }); 60 | const fakeToken = { access_token: '123456' }; 61 | fetchStub.resolves({ json: sinon.stub().resolves(fakeToken) }); 62 | const token = await instance.getToken(client); 63 | expect(fetchStub.calledOnce).to.be(true); 64 | expect(fetchStub.args[0][0]).to.be(client.tokenEndpoint); 65 | expect(fetchStub.args[0][1].method).to.be('POST'); 66 | expect(fetchStub.args[0][1].headers['Content-Type']).to.be('application/x-www-form-urlencoded'); 67 | expect(fetchStub.args[0][1].body.toString()).to.be(expectedSearchParams.toString()); 68 | expect(token).to.eql(fakeToken); 69 | }) 70 | }); 71 | }); 72 | })); 73 | -------------------------------------------------------------------------------- /test/sdk/OAuth2RefreshToken.spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Kinde Management API 3 | * Provides endpoints to manage your Kinde Businesses 4 | * 5 | * The version of the OpenAPI document: 1 6 | * Contact: support@kinde.com 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | * 12 | */ 13 | import sinon from 'sinon'; 14 | 15 | (function(root, factory) { 16 | if (typeof define === 'function' && define.amd) { 17 | // AMD. 18 | define(['expect.js', process.cwd()+'/src/index'], factory); 19 | } else if (typeof module === 'object' && module.exports) { 20 | // CommonJS-like environments that support module.exports, like Node. 21 | factory(require('expect.js'), require(process.cwd()+'/src/index')); 22 | } else { 23 | // Browser globals (root is window) 24 | factory(root.expect, root.KindeManagementApi); 25 | } 26 | }(this, function(expect, KindeManagementApi) { 27 | 'use strict'; 28 | 29 | var instance; 30 | beforeEach(function() { 31 | instance = new KindeManagementApi.RefreshToken(); 32 | }); 33 | 34 | describe('RefreshToken', function() { 35 | describe('getToken', async function() { 36 | let fetchStub; 37 | beforeEach(() => { 38 | fetchStub = sinon.stub(global, 'fetch'); 39 | }); 40 | 41 | afterEach(() => { 42 | fetchStub.restore(); 43 | }); 44 | 45 | it('should call getToken successfully', async () => { 46 | const client = { 47 | clientId: 'abc123', 48 | clientSecret: 'secret', 49 | redirectUri: 'https://example.com/redirect', 50 | tokenEndpoint: 'https://example.com/token', 51 | scope: 'scope', 52 | grantType: 'pkce', 53 | }; 54 | const expectedSearchParams = new URLSearchParams({ 55 | grant_type: 'refresh_token', 56 | client_id: client.clientId, 57 | client_secret: client.clientSecret, 58 | refresh_token: 'WvW8UFBtkSHMeWSdAGbj6QCpqe8FELC-5vgz9jAzKdI.RXLURfidYMuzCUN0lHN_JMxP-fIahw3BhxOSEUJudJQ', 59 | }); 60 | const fakeToken = { access_token: '123456' }; 61 | fetchStub.resolves({ json: sinon.stub().resolves(fakeToken) }); 62 | const token = await instance.getToken(client, 'WvW8UFBtkSHMeWSdAGbj6QCpqe8FELC-5vgz9jAzKdI.RXLURfidYMuzCUN0lHN_JMxP-fIahw3BhxOSEUJudJQ'); 63 | expect(fetchStub.calledOnce).to.be(true); 64 | expect(fetchStub.args[0][0]).to.be(client.tokenEndpoint); 65 | expect(fetchStub.args[0][1].method).to.be('POST'); 66 | expect(fetchStub.args[0][1].headers['Content-Type']).to.be('application/x-www-form-urlencoded'); 67 | expect(fetchStub.args[0][1].body.toString()).to.be(expectedSearchParams.toString()); 68 | expect(token).to.eql(fakeToken); 69 | }) 70 | }); 71 | }); 72 | })); 73 | --------------------------------------------------------------------------------