diff --git a/src/client.js b/src/client.js index dc1c7d118..5fb1f9e77 100644 --- a/src/client.js +++ b/src/client.js @@ -20,8 +20,7 @@ const { Http } = require('./http'); const DEFAULT_USER_AGENT = `${packageJson.name}/${packageJson.version} node/${process.versions.node} ${os.platform()}/${os.release()}`; const repoUrl = 'https://github.com/okta/okta-sdk-nodejs'; const { OAuth } = require('./oauth'); -const { UserTypeApi } = require('./v3/apis/user-type-api'); -const { AuthenticatorApi } = require('./v3/apis/authenticator-api'); +const { AuthenticatorApi, SchemaApi, UserTypeApi } = require('./v3/api'); @@ -94,7 +93,7 @@ class Client extends GeneratedApiClient { this.userTypeApi = new UserTypeApi(config, parsedConfig.client.orgUrl, this.http); this.authenticatorApi = new AuthenticatorApi(config, parsedConfig.client.orgUrl, this.http); - + this.schemaApi = new SchemaApi(config, parsedConfig.client.orgUrl, this.http); } } diff --git a/src/collection.js b/src/collection.js index 3366e8f0c..64eb51c4b 100644 --- a/src/collection.js +++ b/src/collection.js @@ -41,7 +41,7 @@ class Collection { const item = self.currentItems.length && self.currentItems.shift(); const done = !self.currentItems.length && !self.nextUri && !item; const result = { - value: item ? self.factory.createInstance(item, self.client) : null, + value: item ? (self.factory ? self.factory.createInstance(item, self.client) : item) : null, done, }; resolve(result); diff --git a/src/generated-client.js b/src/generated-client.js index 837fb3eee..f2d2fc933 100644 --- a/src/generated-client.js +++ b/src/generated-client.js @@ -5831,18 +5831,7 @@ class GeneratedApiClient { if (!appInstanceId) { return Promise.reject(new Error('OKTA API getApplicationUserSchema parameter appInstanceId is required.')); } - let url = `${this.baseUrl}/api/v1/meta/schemas/apps/${appInstanceId}/default`; - - const resources = [ - `${this.baseUrl}/api/v1/meta/schemas/apps/${appInstanceId}` - ]; - - const request = this.http.getJson( - url, - null, - { resources } - ); - return request.then(jsonRes => new models.UserSchema(jsonRes, this)); + return this.schemaApi.getApplicationUserSchema(appInstanceId); } /** @@ -5857,20 +5846,7 @@ class GeneratedApiClient { if (!appInstanceId) { return Promise.reject(new Error('OKTA API updateApplicationUserProfile parameter appInstanceId is required.')); } - let url = `${this.baseUrl}/api/v1/meta/schemas/apps/${appInstanceId}/default`; - - const resources = [ - `${this.baseUrl}/api/v1/meta/schemas/apps/${appInstanceId}` - ]; - - const request = this.http.postJson( - url, - { - body: userSchema - }, - { resources } - ); - return request.then(jsonRes => new models.UserSchema(jsonRes, this)); + return this.schemaApi.updateApplicationUserProfile(appInstanceId, userSchema); } /** @@ -5880,16 +5856,7 @@ class GeneratedApiClient { * @returns {Promise} */ getGroupSchema() { - let url = `${this.baseUrl}/api/v1/meta/schemas/group/default`; - - const resources = []; - - const request = this.http.getJson( - url, - null, - { resources } - ); - return request.then(jsonRes => new models.GroupSchema(jsonRes, this)); + return this.schemaApi.getGroupSchema(); } /** @@ -5900,18 +5867,7 @@ class GeneratedApiClient { * @returns {Promise} */ updateGroupSchema(groupSchema) { - let url = `${this.baseUrl}/api/v1/meta/schemas/group/default`; - - const resources = []; - - const request = this.http.postJson( - url, - { - body: groupSchema - }, - { resources } - ); - return request.then(jsonRes => new models.GroupSchema(jsonRes, this)); + return this.schemaApi.updateGroupSchema(groupSchema); } /** @@ -6015,18 +5971,7 @@ class GeneratedApiClient { if (!schemaId) { return Promise.reject(new Error('OKTA API getUserSchema parameter schemaId is required.')); } - let url = `${this.baseUrl}/api/v1/meta/schemas/user/${schemaId}`; - - const resources = [ - `${this.baseUrl}/api/v1/meta/schemas/user/${schemaId}` - ]; - - const request = this.http.getJson( - url, - null, - { resources } - ); - return request.then(jsonRes => new models.UserSchema(jsonRes, this)); + return this.schemaApi.getUserSchema(schemaId); } /** @@ -6044,20 +5989,7 @@ class GeneratedApiClient { if (!userSchema) { return Promise.reject(new Error('OKTA API updateUserProfile parameter userSchema is required.')); } - let url = `${this.baseUrl}/api/v1/meta/schemas/user/${schemaId}`; - - const resources = [ - `${this.baseUrl}/api/v1/meta/schemas/user/${schemaId}` - ]; - - const request = this.http.postJson( - url, - { - body: userSchema - }, - { resources } - ); - return request.then(jsonRes => new models.UserSchema(jsonRes, this)); + return this.schemaApi.updateUserProfile(userSchema, schemaId); } /** diff --git a/src/types/collection.d.ts b/src/types/collection.d.ts index e351e346a..010a53f54 100644 --- a/src/types/collection.d.ts +++ b/src/types/collection.d.ts @@ -16,7 +16,7 @@ import { ModelResolutionFactory } from './resolution-factory'; import { Client } from './client'; export declare class Collection { - constructor(client: Client, uri: string, factory: ModelFactory | ModelResolutionFactory, request?: RequestOptions); + constructor(client: Client, uri: string, factory?: ModelFactory | ModelResolutionFactory, request?: RequestOptions); nextUri: string; client: Client; diff --git a/src/types/generated-client.d.ts b/src/types/generated-client.d.ts index 92ca4b330..db5ecc8ad 100644 --- a/src/types/generated-client.d.ts +++ b/src/types/generated-client.d.ts @@ -85,9 +85,9 @@ import { InlineHookResponse } from './models/InlineHookResponse'; import { LogEvent } from './models/LogEvent'; import { ProfileMapping } from './models/ProfileMapping'; import { ProfileMappingOptions } from './models/ProfileMapping'; -import { UserSchema } from './models/UserSchema'; +import { UserSchema } from './v3/models'; import { UserSchemaOptions } from './models/UserSchema'; -import { GroupSchema } from './models/GroupSchema'; +import { GroupSchema } from './v3/models'; import { GroupSchemaOptions } from './models/GroupSchema'; import { LinkedObject } from './models/LinkedObject'; import { LinkedObjectOptions } from './models/LinkedObject'; diff --git a/src/types/v3/apis/schema-api.d.ts b/src/types/v3/apis/schema-api.d.ts new file mode 100644 index 000000000..32c6ef8f9 --- /dev/null +++ b/src/types/v3/apis/schema-api.d.ts @@ -0,0 +1,256 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { RequestArgs, BaseAPI } from '../base'; +import { GroupSchema } from '../models'; +import { UserSchema } from '../models'; +import { Http } from '../../http'; +import type { V2Configuration } from '../../configuration'; +import type { Configuration } from '../configuration'; +/** + * SchemaApi - request parameter creator + * @export + */ +export declare const SchemaApiRequestParamCreator: (configuration?: Configuration & V2Configuration) => { + http: Http; + /** + * Fetches the Schema for an App User + * @summary Fetches the Schema for an App User + * @param {string} appInstanceId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getApplicationUserSchema: (appInstanceId: string, options?: any) => RequestArgs; + /** + * Fetches the group schema + * @summary Fetches the group schema + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getGroupSchema: (options?: any) => RequestArgs; + /** + * Fetches the schema for a Schema Id. + * @summary Fetches the schema for a Schema Id. + * @param {string} schemaId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserSchema: (schemaId: string, options?: any) => RequestArgs; + /** + * Partial updates on the User Profile properties of the Application User Schema. + * @summary Partial updates on the User Profile properties of the Application User Schema. + * @param {string} appInstanceId + * @param {UserSchema} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateApplicationUserProfile: (appInstanceId: string, body?: UserSchema, options?: any) => RequestArgs; + /** + * Updates, adds ore removes one or more custom Group Profile properties in the schema + * @summary Updates, adds ore removes one or more custom Group Profile properties in the schema + * @param {GroupSchema} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateGroupSchema: (body?: GroupSchema, options?: any) => RequestArgs; + /** + * Partial updates on the User Profile properties of the user schema. + * @summary Update User Profile + * @param {UserSchema} body + * @param {string} schemaId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateUserProfile: (body: UserSchema, schemaId: string, options?: any) => RequestArgs; +}; +/** + * SchemaApi - functional programming interface + * @export + */ +export declare const SchemaApiFp: (configuration?: Configuration & V2Configuration) => { + /** + * Fetches the Schema for an App User + * @summary Fetches the Schema for an App User + * @param {string} appInstanceId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getApplicationUserSchema(appInstanceId: string, options?: any): (http?: Http, basePath?: string) => Promise; + /** + * Fetches the group schema + * @summary Fetches the group schema + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getGroupSchema(options?: any): (http?: Http, basePath?: string) => Promise; + /** + * Fetches the schema for a Schema Id. + * @summary Fetches the schema for a Schema Id. + * @param {string} schemaId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserSchema(schemaId: string, options?: any): (http?: Http, basePath?: string) => Promise; + /** + * Partial updates on the User Profile properties of the Application User Schema. + * @summary Partial updates on the User Profile properties of the Application User Schema. + * @param {string} appInstanceId + * @param {UserSchema} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateApplicationUserProfile(appInstanceId: string, body?: UserSchema, options?: any): (http?: Http, basePath?: string) => Promise; + /** + * Updates, adds ore removes one or more custom Group Profile properties in the schema + * @summary Updates, adds ore removes one or more custom Group Profile properties in the schema + * @param {GroupSchema} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateGroupSchema(body?: GroupSchema, options?: any): (http?: Http, basePath?: string) => Promise; + /** + * Partial updates on the User Profile properties of the user schema. + * @summary Update User Profile + * @param {UserSchema} body + * @param {string} schemaId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateUserProfile(body: UserSchema, schemaId: string, options?: any): (http?: Http, basePath?: string) => Promise; +}; +/** + * SchemaApi - factory interface + * @export + */ +export declare const SchemaApiFactory: (configuration?: Configuration, basePath?: string, http?: Http) => { + /** + * Fetches the Schema for an App User + * @summary Fetches the Schema for an App User + * @param {string} appInstanceId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getApplicationUserSchema(appInstanceId: string, options?: any): Promise; + /** + * Fetches the group schema + * @summary Fetches the group schema + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getGroupSchema(options?: any): Promise; + /** + * Fetches the schema for a Schema Id. + * @summary Fetches the schema for a Schema Id. + * @param {string} schemaId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserSchema(schemaId: string, options?: any): Promise; + /** + * Partial updates on the User Profile properties of the Application User Schema. + * @summary Partial updates on the User Profile properties of the Application User Schema. + * @param {string} appInstanceId + * @param {UserSchema} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateApplicationUserProfile(appInstanceId: string, body?: UserSchema, options?: any): Promise; + /** + * Updates, adds ore removes one or more custom Group Profile properties in the schema + * @summary Updates, adds ore removes one or more custom Group Profile properties in the schema + * @param {GroupSchema} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateGroupSchema(body?: GroupSchema, options?: any): Promise; + /** + * Partial updates on the User Profile properties of the user schema. + * @summary Update User Profile + * @param {UserSchema} body + * @param {string} schemaId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateUserProfile(body: UserSchema, schemaId: string, options?: any): Promise; +}; +/** + * SchemaApi - object-oriented interface + * @export + * @class SchemaApi + * @extends {BaseAPI} + */ +export declare class SchemaApi extends BaseAPI { + /** + * Fetches the Schema for an App User + * @summary Fetches the Schema for an App User + * @param {string} appInstanceId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SchemaApi + */ + getApplicationUserSchema(appInstanceId: string, options?: any): Promise; + /** + * Fetches the group schema + * @summary Fetches the group schema + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SchemaApi + */ + getGroupSchema(options?: any): Promise; + /** + * Fetches the schema for a Schema Id. + * @summary Fetches the schema for a Schema Id. + * @param {string} schemaId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SchemaApi + */ + getUserSchema(schemaId: string, options?: any): Promise; + /** + * Partial updates on the User Profile properties of the Application User Schema. + * @summary Partial updates on the User Profile properties of the Application User Schema. + * @param {string} appInstanceId + * @param {UserSchema} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SchemaApi + */ + updateApplicationUserProfile(appInstanceId: string, body?: UserSchema, options?: any): Promise; + /** + * Updates, adds ore removes one or more custom Group Profile properties in the schema + * @summary Updates, adds ore removes one or more custom Group Profile properties in the schema + * @param {GroupSchema} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SchemaApi + */ + updateGroupSchema(body?: GroupSchema, options?: any): Promise; + /** + * Partial updates on the User Profile properties of the user schema. + * @summary Update User Profile + * @param {UserSchema} body + * @param {string} schemaId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SchemaApi + */ + updateUserProfile(body: UserSchema, schemaId: string, options?: any): Promise; +} diff --git a/src/types/v3/models/authenticator-provider-configuration-user-name-template.d.ts b/src/types/v3/models/authenticator-provider-configuration-user-name-template.d.ts index 5657456d0..54cd095f7 100644 --- a/src/types/v3/models/authenticator-provider-configuration-user-name-template.d.ts +++ b/src/types/v3/models/authenticator-provider-configuration-user-name-template.d.ts @@ -24,12 +24,11 @@ * @export * @class AuthenticatorProviderConfigurationUserNameTemplate */ -export declare class AuthenticatorProviderConfigurationUserNameTemplate { - constructor(resourceJson: Record); - /** +export interface AuthenticatorProviderConfigurationUserNameTemplate { + /** * * @type {string} * @memberof AuthenticatorProviderConfigurationUserNameTemplate */ - template?: string; + template?: string; } diff --git a/src/types/v3/models/authenticator-provider-configuration.d.ts b/src/types/v3/models/authenticator-provider-configuration.d.ts index 7b1c6d92f..ceeebb58e 100644 --- a/src/types/v3/models/authenticator-provider-configuration.d.ts +++ b/src/types/v3/models/authenticator-provider-configuration.d.ts @@ -25,36 +25,35 @@ import { AuthenticatorProviderConfigurationUserNameTemplate } from './authentica * @export * @class AuthenticatorProviderConfiguration */ -export declare class AuthenticatorProviderConfiguration { - constructor(resourceJson: Record); - /** +export interface AuthenticatorProviderConfiguration { + /** * * @type {number} * @memberof AuthenticatorProviderConfiguration */ - authPort?: number; - /** + authPort?: number; + /** * * @type {string} * @memberof AuthenticatorProviderConfiguration */ - hostName?: string; - /** + hostName?: string; + /** * * @type {string} * @memberof AuthenticatorProviderConfiguration */ - instanceId?: string; - /** + instanceId?: string; + /** * * @type {string} * @memberof AuthenticatorProviderConfiguration */ - sharedSecret?: string; - /** + sharedSecret?: string; + /** * * @type {AuthenticatorProviderConfigurationUserNameTemplate} * @memberof AuthenticatorProviderConfiguration */ - userNameTemplate?: AuthenticatorProviderConfigurationUserNameTemplate; + userNameTemplate?: AuthenticatorProviderConfigurationUserNameTemplate; } diff --git a/src/types/v3/models/authenticator-provider.d.ts b/src/types/v3/models/authenticator-provider.d.ts index 984a89ae6..b6bde8454 100644 --- a/src/types/v3/models/authenticator-provider.d.ts +++ b/src/types/v3/models/authenticator-provider.d.ts @@ -25,18 +25,17 @@ import { AuthenticatorProviderConfiguration } from './authenticator-provider-con * @export * @class AuthenticatorProvider */ -export declare class AuthenticatorProvider { - constructor(resourceJson: Record); - /** +export interface AuthenticatorProvider { + /** * * @type {AuthenticatorProviderConfiguration} * @memberof AuthenticatorProvider */ - configuration?: AuthenticatorProviderConfiguration; - /** + configuration?: AuthenticatorProviderConfiguration; + /** * * @type {string} * @memberof AuthenticatorProvider */ - type?: string; + type?: string; } diff --git a/src/types/v3/models/authenticator-settings.d.ts b/src/types/v3/models/authenticator-settings.d.ts index 3afaf3a9b..cfa1caefb 100644 --- a/src/types/v3/models/authenticator-settings.d.ts +++ b/src/types/v3/models/authenticator-settings.d.ts @@ -28,42 +28,41 @@ import { UserVerificationEnum } from './user-verification-enum'; * @export * @class AuthenticatorSettings */ -export declare class AuthenticatorSettings { - constructor(resourceJson: Record); - /** +export interface AuthenticatorSettings { + /** * * @type {AllowedForEnum} * @memberof AuthenticatorSettings */ - allowedFor?: AllowedForEnum; - /** + allowedFor?: AllowedForEnum; + /** * * @type {string} * @memberof AuthenticatorSettings */ - appInstanceId?: string; - /** + appInstanceId?: string; + /** * * @type {ChannelBinding} * @memberof AuthenticatorSettings */ - channelBinding?: ChannelBinding; - /** + channelBinding?: ChannelBinding; + /** * * @type {Compliance} * @memberof AuthenticatorSettings */ - compliance?: Compliance; - /** + compliance?: Compliance; + /** * * @type {number} * @memberof AuthenticatorSettings */ - tokenLifetimeInMinutes?: number; - /** + tokenLifetimeInMinutes?: number; + /** * * @type {UserVerificationEnum} * @memberof AuthenticatorSettings */ - userVerification?: UserVerificationEnum; + userVerification?: UserVerificationEnum; } diff --git a/src/types/v3/models/authenticator.d.ts b/src/types/v3/models/authenticator.d.ts index 0bea5a039..427afcd83 100644 --- a/src/types/v3/models/authenticator.d.ts +++ b/src/types/v3/models/authenticator.d.ts @@ -28,14 +28,13 @@ import { AuthenticatorType } from './authenticator-type'; * @export * @class Authenticator */ -export declare class Authenticator { - constructor(resourceJson: Record); - /** +export interface Authenticator { + /** * * @type {{ [key: string]: any; }} * @memberof Authenticator */ - links?: { + links?: { [key: string]: any; }; /** @@ -43,53 +42,53 @@ export declare class Authenticator { * @type {Date} * @memberof Authenticator */ - created?: Date; - /** + created?: Date; + /** * * @type {string} * @memberof Authenticator */ - id?: string; - /** + id?: string; + /** * * @type {string} * @memberof Authenticator */ - key?: string; - /** + key?: string; + /** * * @type {AuthenticatorStatus} * @memberof Authenticator */ - status?: AuthenticatorStatus; - /** + status?: AuthenticatorStatus; + /** * * @type {Date} * @memberof Authenticator */ - lastUpdated?: Date; - /** + lastUpdated?: Date; + /** * * @type {string} * @memberof Authenticator */ - name?: string; - /** + name?: string; + /** * * @type {AuthenticatorProvider} * @memberof Authenticator */ - provider?: AuthenticatorProvider; - /** + provider?: AuthenticatorProvider; + /** * * @type {AuthenticatorType} * @memberof Authenticator */ - type?: AuthenticatorType; - /** + type?: AuthenticatorType; + /** * * @type {AuthenticatorSettings} * @memberof Authenticator */ - settings?: AuthenticatorSettings; + settings?: AuthenticatorSettings; } diff --git a/src/types/v3/models/channel-binding.d.ts b/src/types/v3/models/channel-binding.d.ts index 32d1c53b7..3e6b586a8 100644 --- a/src/types/v3/models/channel-binding.d.ts +++ b/src/types/v3/models/channel-binding.d.ts @@ -25,18 +25,17 @@ import { RequiredEnum } from './required-enum'; * @export * @class ChannelBinding */ -export declare class ChannelBinding { - constructor(resourceJson: Record); - /** +export interface ChannelBinding { + /** * * @type {RequiredEnum} * @memberof ChannelBinding */ - required?: RequiredEnum; - /** + required?: RequiredEnum; + /** * * @type {string} * @memberof ChannelBinding */ - style?: string; + style?: string; } diff --git a/src/types/v3/models/compliance.d.ts b/src/types/v3/models/compliance.d.ts index fda10d105..3beab2e55 100644 --- a/src/types/v3/models/compliance.d.ts +++ b/src/types/v3/models/compliance.d.ts @@ -25,12 +25,11 @@ import { FipsEnum } from './fips-enum'; * @export * @class Compliance */ -export declare class Compliance { - constructor(resourceJson: Record); - /** +export interface Compliance { + /** * * @type {FipsEnum} * @memberof Compliance */ - fips?: FipsEnum; + fips?: FipsEnum; } diff --git a/src/types/v3/models/group-schema-attribute.d.ts b/src/types/v3/models/group-schema-attribute.d.ts new file mode 100644 index 000000000..b92f8e9d9 --- /dev/null +++ b/src/types/v3/models/group-schema-attribute.d.ts @@ -0,0 +1,137 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { UserSchemaAttributeEnum } from './user-schema-attribute-enum'; +import { UserSchemaAttributeItems } from './user-schema-attribute-items'; +import { UserSchemaAttributeMaster } from './user-schema-attribute-master'; +import { UserSchemaAttributePermission } from './user-schema-attribute-permission'; +import { UserSchemaAttributeScope } from './user-schema-attribute-scope'; +import { UserSchemaAttributeType } from './user-schema-attribute-type'; +import { UserSchemaAttributeUnion } from './user-schema-attribute-union'; +/** + * + * @export + * @class GroupSchemaAttribute + */ +export interface GroupSchemaAttribute { + /** + * + * @type {string} + * @memberof GroupSchemaAttribute + */ + description?: string; + /** + * + * @type {Array} + * @memberof GroupSchemaAttribute + */ + _enum?: Array; + /** + * + * @type {string} + * @memberof GroupSchemaAttribute + */ + externalName?: string; + /** + * + * @type {string} + * @memberof GroupSchemaAttribute + */ + externalNamespace?: string; + /** + * + * @type {UserSchemaAttributeItems} + * @memberof GroupSchemaAttribute + */ + items?: UserSchemaAttributeItems; + /** + * + * @type {UserSchemaAttributeMaster} + * @memberof GroupSchemaAttribute + */ + master?: UserSchemaAttributeMaster; + /** + * + * @type {number} + * @memberof GroupSchemaAttribute + */ + maxLength?: number; + /** + * + * @type {number} + * @memberof GroupSchemaAttribute + */ + minLength?: number; + /** + * + * @type {string} + * @memberof GroupSchemaAttribute + */ + mutability?: string; + /** + * + * @type {Array} + * @memberof GroupSchemaAttribute + */ + oneOf?: Array; + /** + * + * @type {Array} + * @memberof GroupSchemaAttribute + */ + permissions?: Array; + /** + * + * @type {boolean} + * @memberof GroupSchemaAttribute + */ + required?: boolean; + /** + * + * @type {UserSchemaAttributeScope} + * @memberof GroupSchemaAttribute + */ + scope?: UserSchemaAttributeScope; + /** + * + * @type {string} + * @memberof GroupSchemaAttribute + */ + title?: string; + /** + * + * @type {UserSchemaAttributeType} + * @memberof GroupSchemaAttribute + */ + type?: UserSchemaAttributeType; + /** + * + * @type {UserSchemaAttributeUnion} + * @memberof GroupSchemaAttribute + */ + union?: UserSchemaAttributeUnion; + /** + * + * @type {string} + * @memberof GroupSchemaAttribute + */ + unique?: string; +} diff --git a/src/types/v3/models/group-schema-base-properties.d.ts b/src/types/v3/models/group-schema-base-properties.d.ts new file mode 100644 index 000000000..f55dfcf6e --- /dev/null +++ b/src/types/v3/models/group-schema-base-properties.d.ts @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { GroupSchemaAttribute } from './group-schema-attribute'; +/** + * + * @export + * @class GroupSchemaBaseProperties + */ +export interface GroupSchemaBaseProperties { + /** + * + * @type {GroupSchemaAttribute} + * @memberof GroupSchemaBaseProperties + */ + description?: GroupSchemaAttribute; + /** + * + * @type {GroupSchemaAttribute} + * @memberof GroupSchemaBaseProperties + */ + name?: GroupSchemaAttribute; +} diff --git a/src/types/v3/models/group-schema-base.d.ts b/src/types/v3/models/group-schema-base.d.ts new file mode 100644 index 000000000..fa5652301 --- /dev/null +++ b/src/types/v3/models/group-schema-base.d.ts @@ -0,0 +1,53 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { GroupSchemaBaseProperties } from './group-schema-base-properties'; +/** + * + * @export + * @class GroupSchemaBase + */ +export interface GroupSchemaBase { + /** + * + * @type {string} + * @memberof GroupSchemaBase + */ + id?: string; + /** + * + * @type {GroupSchemaBaseProperties} + * @memberof GroupSchemaBase + */ + properties?: GroupSchemaBaseProperties; + /** + * + * @type {Array} + * @memberof GroupSchemaBase + */ + required?: Array; + /** + * + * @type {string} + * @memberof GroupSchemaBase + */ + type?: string; +} diff --git a/src/types/v3/models/group-schema-custom.d.ts b/src/types/v3/models/group-schema-custom.d.ts new file mode 100644 index 000000000..f844e0b29 --- /dev/null +++ b/src/types/v3/models/group-schema-custom.d.ts @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { GroupSchemaAttribute } from './group-schema-attribute'; +/** + * + * @export + * @class GroupSchemaCustom + */ +export interface GroupSchemaCustom { + /** + * + * @type {string} + * @memberof GroupSchemaCustom + */ + id?: string; + /** + * + * @type {{ [key: string]: GroupSchemaAttribute; }} + * @memberof GroupSchemaCustom + */ + properties?: { + [key: string]: GroupSchemaAttribute; + }; + /** + * + * @type {Array} + * @memberof GroupSchemaCustom + */ + required?: Array; + /** + * + * @type {string} + * @memberof GroupSchemaCustom + */ + type?: string; +} diff --git a/src/types/v3/models/group-schema-definitions.d.ts b/src/types/v3/models/group-schema-definitions.d.ts new file mode 100644 index 000000000..75f730dfa --- /dev/null +++ b/src/types/v3/models/group-schema-definitions.d.ts @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { GroupSchemaBase } from './group-schema-base'; +import { GroupSchemaCustom } from './group-schema-custom'; +/** + * + * @export + * @class GroupSchemaDefinitions + */ +export interface GroupSchemaDefinitions { + /** + * + * @type {GroupSchemaBase} + * @memberof GroupSchemaDefinitions + */ + base?: GroupSchemaBase; + /** + * + * @type {GroupSchemaCustom} + * @memberof GroupSchemaDefinitions + */ + custom?: GroupSchemaCustom; +} diff --git a/src/types/v3/models/group-schema.d.ts b/src/types/v3/models/group-schema.d.ts new file mode 100644 index 000000000..31e7a9a4c --- /dev/null +++ b/src/types/v3/models/group-schema.d.ts @@ -0,0 +1,98 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { GroupSchemaDefinitions } from './group-schema-definitions'; +import { UserSchemaProperties } from './user-schema-properties'; +/** + * + * @export + * @class GroupSchema + */ +export interface GroupSchema { + /** + * + * @type {string} + * @memberof GroupSchema + */ + schema?: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof GroupSchema + */ + links?: { + [key: string]: any; + }; + /** + * + * @type {string} + * @memberof GroupSchema + */ + created?: string; + /** + * + * @type {GroupSchemaDefinitions} + * @memberof GroupSchema + */ + definitions?: GroupSchemaDefinitions; + /** + * + * @type {string} + * @memberof GroupSchema + */ + description?: string; + /** + * + * @type {string} + * @memberof GroupSchema + */ + id?: string; + /** + * + * @type {string} + * @memberof GroupSchema + */ + lastUpdated?: string; + /** + * + * @type {string} + * @memberof GroupSchema + */ + name?: string; + /** + * + * @type {UserSchemaProperties} + * @memberof GroupSchema + */ + properties?: UserSchemaProperties; + /** + * + * @type {string} + * @memberof GroupSchema + */ + title?: string; + /** + * + * @type {string} + * @memberof GroupSchema + */ + type?: string; +} diff --git a/src/types/v3/models/index.d.ts b/src/types/v3/models/index.d.ts index 113fde2b2..7595ab7cd 100644 --- a/src/types/v3/models/index.d.ts +++ b/src/types/v3/models/index.d.ts @@ -20,16 +20,40 @@ * Do not edit the class manually. */ export * from './allowed-for-enum'; +export * from './authenticator'; +export * from './authenticator-provider'; export * from './authenticator-provider-configuration'; export * from './authenticator-provider-configuration-user-name-template'; -export * from './authenticator-provider'; export * from './authenticator-settings'; export * from './authenticator-status'; export * from './authenticator-type'; -export * from './authenticator'; export * from './channel-binding'; export * from './compliance'; export * from './fips-enum'; +export * from './group-schema'; +export * from './group-schema-attribute'; +export * from './group-schema-base'; +export * from './group-schema-base-properties'; +export * from './group-schema-custom'; +export * from './group-schema-definitions'; export * from './required-enum'; +export * from './user-schema'; +export * from './user-schema-attribute'; +export * from './user-schema-attribute-enum'; +export * from './user-schema-attribute-items'; +export * from './user-schema-attribute-master'; +export * from './user-schema-attribute-master-priority'; +export * from './user-schema-attribute-master-type'; +export * from './user-schema-attribute-permission'; +export * from './user-schema-attribute-scope'; +export * from './user-schema-attribute-type'; +export * from './user-schema-attribute-union'; +export * from './user-schema-base'; +export * from './user-schema-base-properties'; +export * from './user-schema-definitions'; +export * from './user-schema-properties'; +export * from './user-schema-properties-profile'; +export * from './user-schema-properties-profile-item'; +export * from './user-schema-public'; export * from './user-type'; export * from './user-verification-enum'; diff --git a/src/types/v3/models/user-schema-attribute-enum.d.ts b/src/types/v3/models/user-schema-attribute-enum.d.ts new file mode 100644 index 000000000..36efbc928 --- /dev/null +++ b/src/types/v3/models/user-schema-attribute-enum.d.ts @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * + * @export + * @class UserSchemaAttributeEnum + */ +export interface UserSchemaAttributeEnum { + /** + * + * @type {string} + * @memberof UserSchemaAttributeEnum + */ + _const?: string; + /** + * + * @type {string} + * @memberof UserSchemaAttributeEnum + */ + title?: string; +} diff --git a/src/types/v3/models/user-schema-attribute-items.d.ts b/src/types/v3/models/user-schema-attribute-items.d.ts new file mode 100644 index 000000000..baaae5a1f --- /dev/null +++ b/src/types/v3/models/user-schema-attribute-items.d.ts @@ -0,0 +1,47 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { UserSchemaAttributeEnum } from './user-schema-attribute-enum'; +/** + * + * @export + * @class UserSchemaAttributeItems + */ +export interface UserSchemaAttributeItems { + /** + * + * @type {Array} + * @memberof UserSchemaAttributeItems + */ + _enum?: Array; + /** + * + * @type {Array} + * @memberof UserSchemaAttributeItems + */ + oneOf?: Array; + /** + * + * @type {string} + * @memberof UserSchemaAttributeItems + */ + type?: string; +} diff --git a/src/types/v3/models/user-schema-attribute-master-priority.d.ts b/src/types/v3/models/user-schema-attribute-master-priority.d.ts new file mode 100644 index 000000000..33a02cf92 --- /dev/null +++ b/src/types/v3/models/user-schema-attribute-master-priority.d.ts @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * + * @export + * @class UserSchemaAttributeMasterPriority + */ +export interface UserSchemaAttributeMasterPriority { + /** + * + * @type {string} + * @memberof UserSchemaAttributeMasterPriority + */ + type?: string; + /** + * + * @type {string} + * @memberof UserSchemaAttributeMasterPriority + */ + value?: string; +} diff --git a/src/types/v3/models/user-schema-attribute-master-type.d.ts b/src/types/v3/models/user-schema-attribute-master-type.d.ts new file mode 100644 index 000000000..520ef72e8 --- /dev/null +++ b/src/types/v3/models/user-schema-attribute-master-type.d.ts @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * + * @export + * @enum {string} + */ +export declare enum UserSchemaAttributeMasterType { + PROFILEMASTER = 'PROFILE_MASTER', + OKTA = 'OKTA', + OVERRIDE = 'OVERRIDE' +} diff --git a/src/types/v3/models/user-schema-attribute-master.d.ts b/src/types/v3/models/user-schema-attribute-master.d.ts new file mode 100644 index 000000000..a3e843fa8 --- /dev/null +++ b/src/types/v3/models/user-schema-attribute-master.d.ts @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { UserSchemaAttributeMasterPriority } from './user-schema-attribute-master-priority'; +import { UserSchemaAttributeMasterType } from './user-schema-attribute-master-type'; +/** + * + * @export + * @class UserSchemaAttributeMaster + */ +export interface UserSchemaAttributeMaster { + /** + * + * @type {UserSchemaAttributeMasterType} + * @memberof UserSchemaAttributeMaster + */ + type?: UserSchemaAttributeMasterType; + /** + * + * @type {Array} + * @memberof UserSchemaAttributeMaster + */ + priority?: Array; +} diff --git a/src/types/v3/models/user-schema-attribute-permission.d.ts b/src/types/v3/models/user-schema-attribute-permission.d.ts new file mode 100644 index 000000000..1ed280a9e --- /dev/null +++ b/src/types/v3/models/user-schema-attribute-permission.d.ts @@ -0,0 +1,40 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * + * @export + * @class UserSchemaAttributePermission + */ +export interface UserSchemaAttributePermission { + /** + * + * @type {string} + * @memberof UserSchemaAttributePermission + */ + principal?: string; + /** + * + * @type {string} + * @memberof UserSchemaAttributePermission + */ + action?: string; +} diff --git a/src/types/v3/models/user-schema-attribute-scope.d.ts b/src/types/v3/models/user-schema-attribute-scope.d.ts new file mode 100644 index 000000000..704c16d66 --- /dev/null +++ b/src/types/v3/models/user-schema-attribute-scope.d.ts @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * + * @export + * @enum {string} + */ +export declare enum UserSchemaAttributeScope { + SELF = 'SELF', + NONE = 'NONE' +} diff --git a/src/types/v3/models/user-schema-attribute-type.d.ts b/src/types/v3/models/user-schema-attribute-type.d.ts new file mode 100644 index 000000000..d111cd82b --- /dev/null +++ b/src/types/v3/models/user-schema-attribute-type.d.ts @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * + * @export + * @enum {string} + */ +export declare enum UserSchemaAttributeType { + String = 'string', + Boolean = 'boolean', + Number = 'number', + Integer = 'integer', + Array = 'array' +} diff --git a/src/types/v3/models/user-schema-attribute-union.d.ts b/src/types/v3/models/user-schema-attribute-union.d.ts new file mode 100644 index 000000000..ceda89dc6 --- /dev/null +++ b/src/types/v3/models/user-schema-attribute-union.d.ts @@ -0,0 +1,30 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * + * @export + * @enum {string} + */ +export declare enum UserSchemaAttributeUnion { + DISABLE = 'DISABLE', + ENABLE = 'ENABLE' +} diff --git a/src/types/v3/models/user-schema-attribute.d.ts b/src/types/v3/models/user-schema-attribute.d.ts new file mode 100644 index 000000000..942c2e320 --- /dev/null +++ b/src/types/v3/models/user-schema-attribute.d.ts @@ -0,0 +1,143 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { UserSchemaAttributeEnum } from './user-schema-attribute-enum'; +import { UserSchemaAttributeItems } from './user-schema-attribute-items'; +import { UserSchemaAttributeMaster } from './user-schema-attribute-master'; +import { UserSchemaAttributePermission } from './user-schema-attribute-permission'; +import { UserSchemaAttributeScope } from './user-schema-attribute-scope'; +import { UserSchemaAttributeType } from './user-schema-attribute-type'; +import { UserSchemaAttributeUnion } from './user-schema-attribute-union'; +/** + * + * @export + * @class UserSchemaAttribute + */ +export interface UserSchemaAttribute { + /** + * + * @type {string} + * @memberof UserSchemaAttribute + */ + title?: string; + /** + * + * @type {UserSchemaAttributeType} + * @memberof UserSchemaAttribute + */ + type?: UserSchemaAttributeType; + /** + * + * @type {boolean} + * @memberof UserSchemaAttribute + */ + required?: boolean; + /** + * + * @type {string} + * @memberof UserSchemaAttribute + */ + mutability?: string; + /** + * + * @type {UserSchemaAttributeScope} + * @memberof UserSchemaAttribute + */ + scope?: UserSchemaAttributeScope; + /** + * + * @type {Array} + * @memberof UserSchemaAttribute + */ + _enum?: Array; + /** + * + * @type {Array} + * @memberof UserSchemaAttribute + */ + oneOf?: Array; + /** + * + * @type {number} + * @memberof UserSchemaAttribute + */ + minLength?: number; + /** + * + * @type {number} + * @memberof UserSchemaAttribute + */ + maxLength?: number; + /** + * + * @type {string} + * @memberof UserSchemaAttribute + */ + description?: string; + /** + * + * @type {Array} + * @memberof UserSchemaAttribute + */ + permissions?: Array; + /** + * + * @type {UserSchemaAttributeMaster} + * @memberof UserSchemaAttribute + */ + master?: UserSchemaAttributeMaster; + /** + * + * @type {UserSchemaAttributeUnion} + * @memberof UserSchemaAttribute + */ + union?: UserSchemaAttributeUnion; + /** + * + * @type {UserSchemaAttributeItems} + * @memberof UserSchemaAttribute + */ + items?: UserSchemaAttributeItems; + /** + * + * @type {string} + * @memberof UserSchemaAttribute + */ + pattern?: string; + /** + * + * @type {string} + * @memberof UserSchemaAttribute + */ + unique?: string; + /** + * + * @type {string} + * @memberof UserSchemaAttribute + */ + externalName?: string; + /** + * + * @type {string} + * @memberof UserSchemaAttribute + */ + externalNamespace?: string; +} diff --git a/src/types/v3/models/user-schema-base-properties.d.ts b/src/types/v3/models/user-schema-base-properties.d.ts new file mode 100644 index 000000000..ba320442d --- /dev/null +++ b/src/types/v3/models/user-schema-base-properties.d.ts @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { UserSchemaAttribute } from './user-schema-attribute'; +/** + * + * @export + * @class UserSchemaBaseProperties + */ +export interface UserSchemaBaseProperties { + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + login?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + firstName?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + lastName?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + middleName?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + honorificPrefix?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + honorificSuffix?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + email?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + title?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + displayName?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + nickName?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + profileUrl?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + secondEmail?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + mobilePhone?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + primaryPhone?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + streetAddress?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + city?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + state?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + zipCode?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + countryCode?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + postalAddress?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + preferredLanguage?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + locale?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + timezone?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + userType?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + employeeNumber?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + costCenter?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + organization?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + division?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + department?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + managerId?: UserSchemaAttribute; + /** + * + * @type {UserSchemaAttribute} + * @memberof UserSchemaBaseProperties + */ + manager?: UserSchemaAttribute; +} diff --git a/src/types/v3/models/user-schema-base.d.ts b/src/types/v3/models/user-schema-base.d.ts new file mode 100644 index 000000000..40807858d --- /dev/null +++ b/src/types/v3/models/user-schema-base.d.ts @@ -0,0 +1,53 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { UserSchemaBaseProperties } from './user-schema-base-properties'; +/** + * + * @export + * @class UserSchemaBase + */ +export interface UserSchemaBase { + /** + * + * @type {string} + * @memberof UserSchemaBase + */ + id?: string; + /** + * + * @type {string} + * @memberof UserSchemaBase + */ + type?: string; + /** + * + * @type {UserSchemaBaseProperties} + * @memberof UserSchemaBase + */ + properties?: UserSchemaBaseProperties; + /** + * + * @type {Array} + * @memberof UserSchemaBase + */ + required?: Array; +} diff --git a/src/types/v3/models/user-schema-definitions.d.ts b/src/types/v3/models/user-schema-definitions.d.ts new file mode 100644 index 000000000..0c36bda1d --- /dev/null +++ b/src/types/v3/models/user-schema-definitions.d.ts @@ -0,0 +1,42 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { UserSchemaBase } from './user-schema-base'; +import { UserSchemaPublic } from './user-schema-public'; +/** + * + * @export + * @class UserSchemaDefinitions + */ +export interface UserSchemaDefinitions { + /** + * + * @type {UserSchemaBase} + * @memberof UserSchemaDefinitions + */ + base?: UserSchemaBase; + /** + * + * @type {UserSchemaPublic} + * @memberof UserSchemaDefinitions + */ + custom?: UserSchemaPublic; +} diff --git a/src/types/v3/models/user-schema-properties-profile-item.d.ts b/src/types/v3/models/user-schema-properties-profile-item.d.ts new file mode 100644 index 000000000..09915de45 --- /dev/null +++ b/src/types/v3/models/user-schema-properties-profile-item.d.ts @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * + * @export + * @class UserSchemaPropertiesProfileItem + */ +export interface UserSchemaPropertiesProfileItem { + /** + * + * @type {string} + * @memberof UserSchemaPropertiesProfileItem + */ + ref?: string; +} diff --git a/src/types/v3/models/user-schema-properties-profile.d.ts b/src/types/v3/models/user-schema-properties-profile.d.ts new file mode 100644 index 000000000..c5e8da030 --- /dev/null +++ b/src/types/v3/models/user-schema-properties-profile.d.ts @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { UserSchemaPropertiesProfileItem } from './user-schema-properties-profile-item'; +/** + * + * @export + * @class UserSchemaPropertiesProfile + */ +export interface UserSchemaPropertiesProfile { + /** + * + * @type {Array} + * @memberof UserSchemaPropertiesProfile + */ + allOf?: Array; +} diff --git a/src/types/v3/models/user-schema-properties.d.ts b/src/types/v3/models/user-schema-properties.d.ts new file mode 100644 index 000000000..bfeff344d --- /dev/null +++ b/src/types/v3/models/user-schema-properties.d.ts @@ -0,0 +1,35 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { UserSchemaPropertiesProfile } from './user-schema-properties-profile'; +/** + * + * @export + * @class UserSchemaProperties + */ +export interface UserSchemaProperties { + /** + * + * @type {UserSchemaPropertiesProfile} + * @memberof UserSchemaProperties + */ + profile?: UserSchemaPropertiesProfile; +} diff --git a/src/types/v3/models/user-schema-public.d.ts b/src/types/v3/models/user-schema-public.d.ts new file mode 100644 index 000000000..448624f00 --- /dev/null +++ b/src/types/v3/models/user-schema-public.d.ts @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { UserSchemaAttribute } from './user-schema-attribute'; +/** + * + * @export + * @class UserSchemaPublic + */ +export interface UserSchemaPublic { + /** + * + * @type {string} + * @memberof UserSchemaPublic + */ + id?: string; + /** + * + * @type {string} + * @memberof UserSchemaPublic + */ + type?: string; + /** + * + * @type {{ [key: string]: UserSchemaAttribute; }} + * @memberof UserSchemaPublic + */ + properties?: { + [key: string]: UserSchemaAttribute; + }; + /** + * + * @type {Array} + * @memberof UserSchemaPublic + */ + required?: Array; +} diff --git a/src/types/v3/models/user-schema.d.ts b/src/types/v3/models/user-schema.d.ts new file mode 100644 index 000000000..58a9c80e2 --- /dev/null +++ b/src/types/v3/models/user-schema.d.ts @@ -0,0 +1,92 @@ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { UserSchemaDefinitions } from './user-schema-definitions'; +import { UserSchemaProperties } from './user-schema-properties'; +/** + * + * @export + * @class UserSchema + */ +export interface UserSchema { + /** + * + * @type {string} + * @memberof UserSchema + */ + id?: string; + /** + * + * @type {string} + * @memberof UserSchema + */ + schema?: string; + /** + * + * @type {string} + * @memberof UserSchema + */ + name?: string; + /** + * + * @type {string} + * @memberof UserSchema + */ + title?: string; + /** + * + * @type {string} + * @memberof UserSchema + */ + lastUpdated?: string; + /** + * + * @type {string} + * @memberof UserSchema + */ + created?: string; + /** + * + * @type {UserSchemaDefinitions} + * @memberof UserSchema + */ + definitions?: UserSchemaDefinitions; + /** + * + * @type {string} + * @memberof UserSchema + */ + type?: string; + /** + * + * @type {UserSchemaProperties} + * @memberof UserSchema + */ + properties?: UserSchemaProperties; + /** + * + * @type {{ [key: string]: any; }} + * @memberof UserSchema + */ + links?: { + [key: string]: any; + }; +} diff --git a/src/types/v3/models/user-type.d.ts b/src/types/v3/models/user-type.d.ts index 72457df5b..14abb6237 100644 --- a/src/types/v3/models/user-type.d.ts +++ b/src/types/v3/models/user-type.d.ts @@ -24,14 +24,13 @@ * @export * @class UserType */ -export declare class UserType { - constructor(resourceJson: Record); - /** +export interface UserType { + /** * * @type {{ [key: string]: any; }} * @memberof UserType */ - links?: { + links?: { [key: string]: any; }; /** @@ -39,53 +38,53 @@ export declare class UserType { * @type {Date} * @memberof UserType */ - created?: Date; - /** + created?: Date; + /** * * @type {string} * @memberof UserType */ - createdBy?: string; - /** + createdBy?: string; + /** * * @type {boolean} * @memberof UserType */ - _default?: boolean; - /** + _default?: boolean; + /** * * @type {string} * @memberof UserType */ - description?: string; - /** + description?: string; + /** * * @type {string} * @memberof UserType */ - displayName?: string; - /** + displayName?: string; + /** * * @type {string} * @memberof UserType */ - id?: string; - /** + id?: string; + /** * * @type {Date} * @memberof UserType */ - lastUpdated?: Date; - /** + lastUpdated?: Date; + /** * * @type {string} * @memberof UserType */ - lastUpdatedBy?: string; - /** + lastUpdatedBy?: string; + /** * * @type {string} * @memberof UserType */ - name?: string; + name?: string; } diff --git a/src/v3/api.js b/src/v3/api.js index 5551f2d4b..5b8769e3d 100644 --- a/src/v3/api.js +++ b/src/v3/api.js @@ -34,4 +34,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./apis/authenticator-api"), exports); +__exportStar(require("./apis/schema-api"), exports); __exportStar(require("./apis/user-type-api"), exports); diff --git a/src/v3/apis/authenticator-api.js b/src/v3/apis/authenticator-api.js index 844a521b7..3f32a316a 100644 --- a/src/v3/apis/authenticator-api.js +++ b/src/v3/apis/authenticator-api.js @@ -27,12 +27,10 @@ exports.AuthenticatorApi = exports.AuthenticatorApiFactory = exports.Authenticat // Some imports not used depending on template conditions // @ts-ignore const base_1 = require("../base"); -const models_1 = require("../models"); const oauth_1 = require("../../oauth"); const http_1 = require("../../http"); const config_loader_1 = require("../../config-loader"); const default_request_executor_1 = require("../../default-request-executor"); -const model_factory_1 = require("../../model-factory"); const collection_1 = require("../../collection"); const os = require('os'); const packageJson = require('../../../package.json'); @@ -389,7 +387,7 @@ const AuthenticatorApiFp = function (configuration) { const localVarRequestArgs = api.activateAuthenticator(authenticatorId, options); return (http = api.http, basePath = configuration.basePath || configuration.orgUrl) => { const requestArgs = { ...localVarRequestArgs.options, url: basePath + localVarRequestArgs.url }; - return http.http(requestArgs.url, requestArgs).then(res => res.json().then(data => new models_1.Authenticator(data))); + return http.http(requestArgs.url, requestArgs).then(res => res.json().then((data) => data)); }; }, /** @@ -404,7 +402,7 @@ const AuthenticatorApiFp = function (configuration) { const localVarRequestArgs = api.deactivateAuthenticator(authenticatorId, options); return (http = api.http, basePath = configuration.basePath || configuration.orgUrl) => { const requestArgs = { ...localVarRequestArgs.options, url: basePath + localVarRequestArgs.url }; - return http.http(requestArgs.url, requestArgs).then(res => res.json().then(data => new models_1.Authenticator(data))); + return http.http(requestArgs.url, requestArgs).then(res => res.json().then((data) => data)); }; }, /** @@ -419,7 +417,7 @@ const AuthenticatorApiFp = function (configuration) { const localVarRequestArgs = api.getAuthenticator(authenticatorId, options); return (http = api.http, basePath = configuration.basePath || configuration.orgUrl) => { const requestArgs = { ...localVarRequestArgs.options, url: basePath + localVarRequestArgs.url }; - return http.http(requestArgs.url, requestArgs).then(res => res.json().then(data => new models_1.Authenticator(data))); + return http.http(requestArgs.url, requestArgs).then(res => res.json().then((data) => data)); }; }, /** @@ -433,7 +431,7 @@ const AuthenticatorApiFp = function (configuration) { const localVarRequestArgs = api.listAuthenticators(options); return (http = api.http, basePath = configuration.basePath || configuration.orgUrl) => { const requestArgs = { ...localVarRequestArgs.options, url: basePath + localVarRequestArgs.url }; - return new collection_1.Collection({ http }, `${requestArgs.url}`, new model_factory_1.ModelFactory(models_1.Authenticator)); + return new collection_1.Collection({ http }, `${requestArgs.url}`); }; }, /** @@ -449,7 +447,7 @@ const AuthenticatorApiFp = function (configuration) { const localVarRequestArgs = api.updateAuthenticator(body, authenticatorId, options); return (http = api.http, basePath = configuration.basePath || configuration.orgUrl) => { const requestArgs = { ...localVarRequestArgs.options, url: basePath + localVarRequestArgs.url }; - return http.http(requestArgs.url, requestArgs).then(res => res.json().then(data => new models_1.Authenticator(data))); + return http.http(requestArgs.url, requestArgs).then(res => res.json().then((data) => data)); }; }, }; diff --git a/src/v3/apis/schema-api.js b/src/v3/apis/schema-api.js new file mode 100644 index 000000000..7a75ae7c3 --- /dev/null +++ b/src/v3/apis/schema-api.js @@ -0,0 +1,671 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SchemaApi = exports.SchemaApiFactory = exports.SchemaApiFp = exports.SchemaApiRequestParamCreator = void 0; +// Some imports not used depending on template conditions +// @ts-ignore +const base_1 = require("../base"); +const oauth_1 = require("../../oauth"); +const http_1 = require("../../http"); +const config_loader_1 = require("../../config-loader"); +const default_request_executor_1 = require("../../default-request-executor"); +const os = require('os'); +const packageJson = require('../../../package.json'); +const DEFAULT_USER_AGENT = `${packageJson.name}/${packageJson.version} node/${process.versions.node} ${os.platform()}/${os.release()}`; +const repoUrl = 'https://github.com/okta/okta-sdk-nodejs'; +/** + * SchemaApi - request parameter creator + * @export + */ +const SchemaApiRequestParamCreator = function (configuration) { + const configLoader = new config_loader_1.ConfigLoader(); + const clientConfig = Object.assign({}, configuration); + configLoader.applyDefaults(); + configLoader.apply({ + client: clientConfig || {} + }); + const parsedConfig = configLoader.config; + const requestExecutor = clientConfig.requestExecutor || new default_request_executor_1.DefaultRequestExecutor(); + const errors = []; + if (!parsedConfig.client.orgUrl) { + errors.push('Okta Org URL not provided'); + } + if (!parsedConfig.client.token && parsedConfig.client.authorizationMode !== 'PrivateKey') { + errors.push('Okta API token not provided'); + } + if (parsedConfig.client.authorizationMode === 'PrivateKey') { + if (!parsedConfig.client.clientId) { + errors.push('Okta Client ID not provided'); + } + if (!parsedConfig.client.scopes) { + errors.push('Scopes not provided'); + } + if (!parsedConfig.client.privateKey) { + errors.push('Private Key not provided'); + } + } + else if (parsedConfig.client.authorizationMode !== 'SSWS') { + errors.push('Unknown Authorization Mode'); + } + if (errors.length) { + throw new Error(`Found ${errors.length} errors:\n${errors.join('\n')}\nSee ${repoUrl} for usage.`); + } + const authorizationMode = parsedConfig.client.authorizationMode; + const baseUrl = parsedConfig.client.orgUrl.replace(/\/$/, ''); + const apiToken = parsedConfig.client.token; + let clientId; + let scopes; + let privateKey; + let oauth; + if (authorizationMode === 'PrivateKey') { + clientId = parsedConfig.client.clientId; + scopes = parsedConfig.client.scopes.split(' '); + privateKey = parsedConfig.client.privateKey; + oauth = new oauth_1.OAuth(this); + } + const http = new http_1.Http({ + cacheStore: clientConfig.cacheStore, + cacheMiddleware: clientConfig.cacheMiddleware, + defaultCacheMiddlewareResponseBufferSize: clientConfig.defaultCacheMiddlewareResponseBufferSize, + requestExecutor: requestExecutor, + oauth: oauth + }); + if (authorizationMode === 'SSWS') { + http.defaultHeaders.Authorization = `SSWS ${apiToken}`; + } + http.defaultHeaders['User-Agent'] = parsedConfig.client.userAgent ? parsedConfig.client.userAgent + ' ' + DEFAULT_USER_AGENT : DEFAULT_USER_AGENT; + return { + http, + /** + * Fetches the Schema for an App User + * @summary Fetches the Schema for an App User + * @param {string} appInstanceId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getApplicationUserSchema: (appInstanceId, options = {}) => { + // verify required parameter 'appInstanceId' is not null or undefined + if (appInstanceId === null || appInstanceId === undefined) { + throw new base_1.RequiredError('appInstanceId', 'Required parameter appInstanceId was null or undefined when calling getApplicationUserSchema.'); + } + const localVarPath = `/api/v1/meta/schemas/apps/{appInstanceId}/default` + .replace(`{${"appInstanceId"}}`, encodeURIComponent(String(appInstanceId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + // authentication api_token required + if (configuration && configuration.apiToken) { + const localVarApiKeyValue = typeof configuration.apiToken === 'function' + ? configuration.apiToken("Authorization") + : configuration.apiToken; + localVarHeaderParameter["Authorization"] = localVarApiKeyValue; + } + // authentication oauth2 required + // oauth required + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? configuration.accessToken("oauth2", ["okta.apps.read", "okta.apps.manage", "okta.authenticators.read", "okta.authenticators.manage", "okta.authorizationServers.read", "okta.authorizationServers.manage", "okta.brands.read", "okta.brands.manage", "okta.captchas.manage", "okta.captchas.read", "okta.domains.read", "okta.domains.manage", "okta.eventHooks.read", "okta.eventHooks.manage", "okta.groups.read", "okta.groups.manage", "okta.roles.read", "okta.roles.manage", "okta.idps.read", "okta.idps.manage", "okta.users.manage", "okta.inlineHooks.read", "okta.inlineHooks.manage", "okta.logs.read", "okta.profileMappings.read", "okta.profileMappings.manage", "okta.schemas.read", "okta.schemas.manage", "okta.linkedObjects.read", "okta.linkedObjects.manage", "okta.userTypes.read", "okta.userTypes.manage", "okta.orgs.read", "okta.orgs.manage", "okta.policies.read", "okta.policies.manage", "okta.sessions.read", "okta.sessions.manage", "okta.templates.read", "okta.templates.manage", "okta.trustedOrigins.read", "okta.trustedOrigins.manage", "okta.users.read.self", "okta.users.read"]) + : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + query.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Fetches the group schema + * @summary Fetches the group schema + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getGroupSchema: (options = {}) => { + const localVarPath = `/api/v1/meta/schemas/group/default`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + // authentication api_token required + if (configuration && configuration.apiToken) { + const localVarApiKeyValue = typeof configuration.apiToken === 'function' + ? configuration.apiToken("Authorization") + : configuration.apiToken; + localVarHeaderParameter["Authorization"] = localVarApiKeyValue; + } + // authentication oauth2 required + // oauth required + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? configuration.accessToken("oauth2", ["okta.apps.read", "okta.apps.manage", "okta.authenticators.read", "okta.authenticators.manage", "okta.authorizationServers.read", "okta.authorizationServers.manage", "okta.brands.read", "okta.brands.manage", "okta.captchas.manage", "okta.captchas.read", "okta.domains.read", "okta.domains.manage", "okta.eventHooks.read", "okta.eventHooks.manage", "okta.groups.read", "okta.groups.manage", "okta.roles.read", "okta.roles.manage", "okta.idps.read", "okta.idps.manage", "okta.users.manage", "okta.inlineHooks.read", "okta.inlineHooks.manage", "okta.logs.read", "okta.profileMappings.read", "okta.profileMappings.manage", "okta.schemas.read", "okta.schemas.manage", "okta.linkedObjects.read", "okta.linkedObjects.manage", "okta.userTypes.read", "okta.userTypes.manage", "okta.orgs.read", "okta.orgs.manage", "okta.policies.read", "okta.policies.manage", "okta.sessions.read", "okta.sessions.manage", "okta.templates.read", "okta.templates.manage", "okta.trustedOrigins.read", "okta.trustedOrigins.manage", "okta.users.read.self", "okta.users.read"]) + : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + query.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Fetches the schema for a Schema Id. + * @summary Fetches the schema for a Schema Id. + * @param {string} schemaId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserSchema: (schemaId, options = {}) => { + // verify required parameter 'schemaId' is not null or undefined + if (schemaId === null || schemaId === undefined) { + throw new base_1.RequiredError('schemaId', 'Required parameter schemaId was null or undefined when calling getUserSchema.'); + } + const localVarPath = `/api/v1/meta/schemas/user/{schemaId}` + .replace(`{${"schemaId"}}`, encodeURIComponent(String(schemaId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + // authentication api_token required + if (configuration && configuration.apiToken) { + const localVarApiKeyValue = typeof configuration.apiToken === 'function' + ? configuration.apiToken("Authorization") + : configuration.apiToken; + localVarHeaderParameter["Authorization"] = localVarApiKeyValue; + } + // authentication oauth2 required + // oauth required + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? configuration.accessToken("oauth2", ["okta.apps.read", "okta.apps.manage", "okta.authenticators.read", "okta.authenticators.manage", "okta.authorizationServers.read", "okta.authorizationServers.manage", "okta.brands.read", "okta.brands.manage", "okta.captchas.manage", "okta.captchas.read", "okta.domains.read", "okta.domains.manage", "okta.eventHooks.read", "okta.eventHooks.manage", "okta.groups.read", "okta.groups.manage", "okta.roles.read", "okta.roles.manage", "okta.idps.read", "okta.idps.manage", "okta.users.manage", "okta.inlineHooks.read", "okta.inlineHooks.manage", "okta.logs.read", "okta.profileMappings.read", "okta.profileMappings.manage", "okta.schemas.read", "okta.schemas.manage", "okta.linkedObjects.read", "okta.linkedObjects.manage", "okta.userTypes.read", "okta.userTypes.manage", "okta.orgs.read", "okta.orgs.manage", "okta.policies.read", "okta.policies.manage", "okta.sessions.read", "okta.sessions.manage", "okta.templates.read", "okta.templates.manage", "okta.trustedOrigins.read", "okta.trustedOrigins.manage", "okta.users.read.self", "okta.users.read"]) + : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + query.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Partial updates on the User Profile properties of the Application User Schema. + * @summary Partial updates on the User Profile properties of the Application User Schema. + * @param {string} appInstanceId + * @param {UserSchema} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateApplicationUserProfile: (appInstanceId, body, options = {}) => { + // verify required parameter 'appInstanceId' is not null or undefined + if (appInstanceId === null || appInstanceId === undefined) { + throw new base_1.RequiredError('appInstanceId', 'Required parameter appInstanceId was null or undefined when calling updateApplicationUserProfile.'); + } + const localVarPath = `/api/v1/meta/schemas/apps/{appInstanceId}/default` + .replace(`{${"appInstanceId"}}`, encodeURIComponent(String(appInstanceId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + // authentication api_token required + if (configuration && configuration.apiToken) { + const localVarApiKeyValue = typeof configuration.apiToken === 'function' + ? configuration.apiToken("Authorization") + : configuration.apiToken; + localVarHeaderParameter["Authorization"] = localVarApiKeyValue; + } + // authentication oauth2 required + // oauth required + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? configuration.accessToken("oauth2", ["okta.apps.read", "okta.apps.manage", "okta.authenticators.read", "okta.authenticators.manage", "okta.authorizationServers.read", "okta.authorizationServers.manage", "okta.brands.read", "okta.brands.manage", "okta.captchas.manage", "okta.captchas.read", "okta.domains.read", "okta.domains.manage", "okta.eventHooks.read", "okta.eventHooks.manage", "okta.groups.read", "okta.groups.manage", "okta.roles.read", "okta.roles.manage", "okta.idps.read", "okta.idps.manage", "okta.users.manage", "okta.inlineHooks.read", "okta.inlineHooks.manage", "okta.logs.read", "okta.profileMappings.read", "okta.profileMappings.manage", "okta.schemas.read", "okta.schemas.manage", "okta.linkedObjects.read", "okta.linkedObjects.manage", "okta.userTypes.read", "okta.userTypes.manage", "okta.orgs.read", "okta.orgs.manage", "okta.policies.read", "okta.policies.manage", "okta.sessions.read", "okta.sessions.manage", "okta.templates.read", "okta.templates.manage", "okta.trustedOrigins.read", "okta.trustedOrigins.manage", "okta.users.read.self", "okta.users.read"]) + : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + query.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Updates, adds ore removes one or more custom Group Profile properties in the schema + * @summary Updates, adds ore removes one or more custom Group Profile properties in the schema + * @param {GroupSchema} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateGroupSchema: (body, options = {}) => { + const localVarPath = `/api/v1/meta/schemas/group/default`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + // authentication api_token required + if (configuration && configuration.apiToken) { + const localVarApiKeyValue = typeof configuration.apiToken === 'function' + ? configuration.apiToken("Authorization") + : configuration.apiToken; + localVarHeaderParameter["Authorization"] = localVarApiKeyValue; + } + // authentication oauth2 required + // oauth required + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? configuration.accessToken("oauth2", ["okta.apps.read", "okta.apps.manage", "okta.authenticators.read", "okta.authenticators.manage", "okta.authorizationServers.read", "okta.authorizationServers.manage", "okta.brands.read", "okta.brands.manage", "okta.captchas.manage", "okta.captchas.read", "okta.domains.read", "okta.domains.manage", "okta.eventHooks.read", "okta.eventHooks.manage", "okta.groups.read", "okta.groups.manage", "okta.roles.read", "okta.roles.manage", "okta.idps.read", "okta.idps.manage", "okta.users.manage", "okta.inlineHooks.read", "okta.inlineHooks.manage", "okta.logs.read", "okta.profileMappings.read", "okta.profileMappings.manage", "okta.schemas.read", "okta.schemas.manage", "okta.linkedObjects.read", "okta.linkedObjects.manage", "okta.userTypes.read", "okta.userTypes.manage", "okta.orgs.read", "okta.orgs.manage", "okta.policies.read", "okta.policies.manage", "okta.sessions.read", "okta.sessions.manage", "okta.templates.read", "okta.templates.manage", "okta.trustedOrigins.read", "okta.trustedOrigins.manage", "okta.users.read.self", "okta.users.read"]) + : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + query.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Partial updates on the User Profile properties of the user schema. + * @summary Update User Profile + * @param {UserSchema} body + * @param {string} schemaId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateUserProfile: (body, schemaId, options = {}) => { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling updateUserProfile.'); + } + // verify required parameter 'schemaId' is not null or undefined + if (schemaId === null || schemaId === undefined) { + throw new base_1.RequiredError('schemaId', 'Required parameter schemaId was null or undefined when calling updateUserProfile.'); + } + const localVarPath = `/api/v1/meta/schemas/user/{schemaId}` + .replace(`{${"schemaId"}}`, encodeURIComponent(String(schemaId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options }; + const localVarHeaderParameter = {}; + const localVarQueryParameter = {}; + // authentication api_token required + if (configuration && configuration.apiToken) { + const localVarApiKeyValue = typeof configuration.apiToken === 'function' + ? configuration.apiToken("Authorization") + : configuration.apiToken; + localVarHeaderParameter["Authorization"] = localVarApiKeyValue; + } + // authentication oauth2 required + // oauth required + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? configuration.accessToken("oauth2", ["okta.apps.read", "okta.apps.manage", "okta.authenticators.read", "okta.authenticators.manage", "okta.authorizationServers.read", "okta.authorizationServers.manage", "okta.brands.read", "okta.brands.manage", "okta.captchas.manage", "okta.captchas.read", "okta.domains.read", "okta.domains.manage", "okta.eventHooks.read", "okta.eventHooks.manage", "okta.groups.read", "okta.groups.manage", "okta.roles.read", "okta.roles.manage", "okta.idps.read", "okta.idps.manage", "okta.users.manage", "okta.inlineHooks.read", "okta.inlineHooks.manage", "okta.logs.read", "okta.profileMappings.read", "okta.profileMappings.manage", "okta.schemas.read", "okta.schemas.manage", "okta.linkedObjects.read", "okta.linkedObjects.manage", "okta.userTypes.read", "okta.userTypes.manage", "okta.orgs.read", "okta.orgs.manage", "okta.policies.read", "okta.policies.manage", "okta.sessions.read", "okta.sessions.manage", "okta.templates.read", "okta.templates.manage", "okta.trustedOrigins.read", "okta.trustedOrigins.manage", "okta.users.read.self", "okta.users.read"]) + : configuration.accessToken; + localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue; + } + localVarHeaderParameter['Content-Type'] = 'application/json'; + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.query) { + query.set(key, options.query[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.body = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + }; +}; +exports.SchemaApiRequestParamCreator = SchemaApiRequestParamCreator; +/** + * SchemaApi - functional programming interface + * @export + */ +const SchemaApiFp = function (configuration) { + return { + /** + * Fetches the Schema for an App User + * @summary Fetches the Schema for an App User + * @param {string} appInstanceId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getApplicationUserSchema(appInstanceId, options) { + const api = exports.SchemaApiRequestParamCreator(configuration); + const localVarRequestArgs = api.getApplicationUserSchema(appInstanceId, options); + return (http = api.http, basePath = configuration.basePath || configuration.orgUrl) => { + const requestArgs = { ...localVarRequestArgs.options, url: basePath + localVarRequestArgs.url }; + return http.http(requestArgs.url, requestArgs).then(res => res.json().then((data) => data)); + }; + }, + /** + * Fetches the group schema + * @summary Fetches the group schema + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getGroupSchema(options) { + const api = exports.SchemaApiRequestParamCreator(configuration); + const localVarRequestArgs = api.getGroupSchema(options); + return (http = api.http, basePath = configuration.basePath || configuration.orgUrl) => { + const requestArgs = { ...localVarRequestArgs.options, url: basePath + localVarRequestArgs.url }; + return http.http(requestArgs.url, requestArgs).then(res => res.json().then((data) => data)); + }; + }, + /** + * Fetches the schema for a Schema Id. + * @summary Fetches the schema for a Schema Id. + * @param {string} schemaId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserSchema(schemaId, options) { + const api = exports.SchemaApiRequestParamCreator(configuration); + const localVarRequestArgs = api.getUserSchema(schemaId, options); + return (http = api.http, basePath = configuration.basePath || configuration.orgUrl) => { + const requestArgs = { ...localVarRequestArgs.options, url: basePath + localVarRequestArgs.url }; + return http.http(requestArgs.url, requestArgs).then(res => res.json().then((data) => data)); + }; + }, + /** + * Partial updates on the User Profile properties of the Application User Schema. + * @summary Partial updates on the User Profile properties of the Application User Schema. + * @param {string} appInstanceId + * @param {UserSchema} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateApplicationUserProfile(appInstanceId, body, options) { + const api = exports.SchemaApiRequestParamCreator(configuration); + const localVarRequestArgs = api.updateApplicationUserProfile(appInstanceId, body, options); + return (http = api.http, basePath = configuration.basePath || configuration.orgUrl) => { + const requestArgs = { ...localVarRequestArgs.options, url: basePath + localVarRequestArgs.url }; + return http.http(requestArgs.url, requestArgs).then(res => res.json().then((data) => data)); + }; + }, + /** + * Updates, adds ore removes one or more custom Group Profile properties in the schema + * @summary Updates, adds ore removes one or more custom Group Profile properties in the schema + * @param {GroupSchema} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateGroupSchema(body, options) { + const api = exports.SchemaApiRequestParamCreator(configuration); + const localVarRequestArgs = api.updateGroupSchema(body, options); + return (http = api.http, basePath = configuration.basePath || configuration.orgUrl) => { + const requestArgs = { ...localVarRequestArgs.options, url: basePath + localVarRequestArgs.url }; + return http.http(requestArgs.url, requestArgs).then(res => res.json().then((data) => data)); + }; + }, + /** + * Partial updates on the User Profile properties of the user schema. + * @summary Update User Profile + * @param {UserSchema} body + * @param {string} schemaId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateUserProfile(body, schemaId, options) { + const api = exports.SchemaApiRequestParamCreator(configuration); + const localVarRequestArgs = api.updateUserProfile(body, schemaId, options); + return (http = api.http, basePath = configuration.basePath || configuration.orgUrl) => { + const requestArgs = { ...localVarRequestArgs.options, url: basePath + localVarRequestArgs.url }; + return http.http(requestArgs.url, requestArgs).then(res => res.json().then((data) => data)); + }; + }, + }; +}; +exports.SchemaApiFp = SchemaApiFp; +/** + * SchemaApi - factory interface + * @export + */ +const SchemaApiFactory = function (configuration, basePath, http) { + return { + /** + * Fetches the Schema for an App User + * @summary Fetches the Schema for an App User + * @param {string} appInstanceId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getApplicationUserSchema(appInstanceId, options) { + return exports.SchemaApiFp(configuration).getApplicationUserSchema(appInstanceId, options)(http, basePath); + }, + /** + * Fetches the group schema + * @summary Fetches the group schema + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getGroupSchema(options) { + return exports.SchemaApiFp(configuration).getGroupSchema(options)(http, basePath); + }, + /** + * Fetches the schema for a Schema Id. + * @summary Fetches the schema for a Schema Id. + * @param {string} schemaId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserSchema(schemaId, options) { + return exports.SchemaApiFp(configuration).getUserSchema(schemaId, options)(http, basePath); + }, + /** + * Partial updates on the User Profile properties of the Application User Schema. + * @summary Partial updates on the User Profile properties of the Application User Schema. + * @param {string} appInstanceId + * @param {UserSchema} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateApplicationUserProfile(appInstanceId, body, options) { + return exports.SchemaApiFp(configuration).updateApplicationUserProfile(appInstanceId, body, options)(http, basePath); + }, + /** + * Updates, adds ore removes one or more custom Group Profile properties in the schema + * @summary Updates, adds ore removes one or more custom Group Profile properties in the schema + * @param {GroupSchema} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateGroupSchema(body, options) { + return exports.SchemaApiFp(configuration).updateGroupSchema(body, options)(http, basePath); + }, + /** + * Partial updates on the User Profile properties of the user schema. + * @summary Update User Profile + * @param {UserSchema} body + * @param {string} schemaId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + updateUserProfile(body, schemaId, options) { + return exports.SchemaApiFp(configuration).updateUserProfile(body, schemaId, options)(http, basePath); + }, + }; +}; +exports.SchemaApiFactory = SchemaApiFactory; +/** + * SchemaApi - object-oriented interface + * @export + * @class SchemaApi + * @extends {BaseAPI} + */ +class SchemaApi extends base_1.BaseAPI { + /** + * Fetches the Schema for an App User + * @summary Fetches the Schema for an App User + * @param {string} appInstanceId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SchemaApi + */ + getApplicationUserSchema(appInstanceId, options) { + return exports.SchemaApiFp(this.configuration).getApplicationUserSchema(appInstanceId, options)(this.httpClient, this.basePath); + } + /** + * Fetches the group schema + * @summary Fetches the group schema + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SchemaApi + */ + getGroupSchema(options) { + return exports.SchemaApiFp(this.configuration).getGroupSchema(options)(this.httpClient, this.basePath); + } + /** + * Fetches the schema for a Schema Id. + * @summary Fetches the schema for a Schema Id. + * @param {string} schemaId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SchemaApi + */ + getUserSchema(schemaId, options) { + return exports.SchemaApiFp(this.configuration).getUserSchema(schemaId, options)(this.httpClient, this.basePath); + } + /** + * Partial updates on the User Profile properties of the Application User Schema. + * @summary Partial updates on the User Profile properties of the Application User Schema. + * @param {string} appInstanceId + * @param {UserSchema} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SchemaApi + */ + updateApplicationUserProfile(appInstanceId, body, options) { + return exports.SchemaApiFp(this.configuration).updateApplicationUserProfile(appInstanceId, body, options)(this.httpClient, this.basePath); + } + /** + * Updates, adds ore removes one or more custom Group Profile properties in the schema + * @summary Updates, adds ore removes one or more custom Group Profile properties in the schema + * @param {GroupSchema} [body] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SchemaApi + */ + updateGroupSchema(body, options) { + return exports.SchemaApiFp(this.configuration).updateGroupSchema(body, options)(this.httpClient, this.basePath); + } + /** + * Partial updates on the User Profile properties of the user schema. + * @summary Update User Profile + * @param {UserSchema} body + * @param {string} schemaId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof SchemaApi + */ + updateUserProfile(body, schemaId, options) { + return exports.SchemaApiFp(this.configuration).updateUserProfile(body, schemaId, options)(this.httpClient, this.basePath); + } +} +exports.SchemaApi = SchemaApi; diff --git a/src/v3/apis/user-type-api.js b/src/v3/apis/user-type-api.js index b5a1ce78b..7ed12b463 100644 --- a/src/v3/apis/user-type-api.js +++ b/src/v3/apis/user-type-api.js @@ -27,12 +27,10 @@ exports.UserTypeApi = exports.UserTypeApiFactory = exports.UserTypeApiFp = expor // Some imports not used depending on template conditions // @ts-ignore const base_1 = require("../base"); -const models_1 = require("../models"); const oauth_1 = require("../../oauth"); const http_1 = require("../../http"); const config_loader_1 = require("../../config-loader"); const default_request_executor_1 = require("../../default-request-executor"); -const model_factory_1 = require("../../model-factory"); const collection_1 = require("../../collection"); const os = require('os'); const packageJson = require('../../../package.json'); @@ -452,7 +450,7 @@ const UserTypeApiFp = function (configuration) { const localVarRequestArgs = api.createUserType(body, options); return (http = api.http, basePath = configuration.basePath || configuration.orgUrl) => { const requestArgs = { ...localVarRequestArgs.options, url: basePath + localVarRequestArgs.url }; - return http.http(requestArgs.url, requestArgs).then(res => res.json().then(data => new models_1.UserType(data))); + return http.http(requestArgs.url, requestArgs).then(res => res.json().then((data) => data)); }; }, /** @@ -482,7 +480,7 @@ const UserTypeApiFp = function (configuration) { const localVarRequestArgs = api.getUserType(typeId, options); return (http = api.http, basePath = configuration.basePath || configuration.orgUrl) => { const requestArgs = { ...localVarRequestArgs.options, url: basePath + localVarRequestArgs.url }; - return http.http(requestArgs.url, requestArgs).then(res => res.json().then(data => new models_1.UserType(data))); + return http.http(requestArgs.url, requestArgs).then(res => res.json().then((data) => data)); }; }, /** @@ -496,7 +494,7 @@ const UserTypeApiFp = function (configuration) { const localVarRequestArgs = api.listUserTypes(options); return (http = api.http, basePath = configuration.basePath || configuration.orgUrl) => { const requestArgs = { ...localVarRequestArgs.options, url: basePath + localVarRequestArgs.url }; - return new collection_1.Collection({ http }, `${requestArgs.url}`, new model_factory_1.ModelFactory(models_1.UserType)); + return new collection_1.Collection({ http }, `${requestArgs.url}`); }; }, /** @@ -512,7 +510,7 @@ const UserTypeApiFp = function (configuration) { const localVarRequestArgs = api.replaceUserType(body, typeId, options); return (http = api.http, basePath = configuration.basePath || configuration.orgUrl) => { const requestArgs = { ...localVarRequestArgs.options, url: basePath + localVarRequestArgs.url }; - return http.http(requestArgs.url, requestArgs).then(res => res.json().then(data => new models_1.UserType(data))); + return http.http(requestArgs.url, requestArgs).then(res => res.json().then((data) => data)); }; }, /** @@ -528,7 +526,7 @@ const UserTypeApiFp = function (configuration) { const localVarRequestArgs = api.updateUserType(body, typeId, options); return (http = api.http, basePath = configuration.basePath || configuration.orgUrl) => { const requestArgs = { ...localVarRequestArgs.options, url: basePath + localVarRequestArgs.url }; - return http.http(requestArgs.url, requestArgs).then(res => res.json().then(data => new models_1.UserType(data))); + return http.http(requestArgs.url, requestArgs).then(res => res.json().then((data) => data)); }; }, }; diff --git a/src/v3/models/authenticator-provider-configuration-user-name-template.js b/src/v3/models/authenticator-provider-configuration-user-name-template.js index dccaf7004..2752d7aa3 100644 --- a/src/v3/models/authenticator-provider-configuration-user-name-template.js +++ b/src/v3/models/authenticator-provider-configuration-user-name-template.js @@ -23,15 +23,3 @@ * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.AuthenticatorProviderConfigurationUserNameTemplate = void 0; -/** - * - * @export - * @class AuthenticatorProviderConfigurationUserNameTemplate - */ -class AuthenticatorProviderConfigurationUserNameTemplate { - constructor(resourceJson) { - Object.assign(this, resourceJson); - } -} -exports.AuthenticatorProviderConfigurationUserNameTemplate = AuthenticatorProviderConfigurationUserNameTemplate; diff --git a/src/v3/models/authenticator-provider-configuration.js b/src/v3/models/authenticator-provider-configuration.js index bae03120d..2752d7aa3 100644 --- a/src/v3/models/authenticator-provider-configuration.js +++ b/src/v3/models/authenticator-provider-configuration.js @@ -23,15 +23,3 @@ * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.AuthenticatorProviderConfiguration = void 0; -/** - * - * @export - * @class AuthenticatorProviderConfiguration - */ -class AuthenticatorProviderConfiguration { - constructor(resourceJson) { - Object.assign(this, resourceJson); - } -} -exports.AuthenticatorProviderConfiguration = AuthenticatorProviderConfiguration; diff --git a/src/v3/models/authenticator-provider.js b/src/v3/models/authenticator-provider.js index 631b4ffc0..2752d7aa3 100644 --- a/src/v3/models/authenticator-provider.js +++ b/src/v3/models/authenticator-provider.js @@ -23,15 +23,3 @@ * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.AuthenticatorProvider = void 0; -/** - * - * @export - * @class AuthenticatorProvider - */ -class AuthenticatorProvider { - constructor(resourceJson) { - Object.assign(this, resourceJson); - } -} -exports.AuthenticatorProvider = AuthenticatorProvider; diff --git a/src/v3/models/authenticator-settings.js b/src/v3/models/authenticator-settings.js index c0e2cdbe8..2752d7aa3 100644 --- a/src/v3/models/authenticator-settings.js +++ b/src/v3/models/authenticator-settings.js @@ -23,15 +23,3 @@ * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.AuthenticatorSettings = void 0; -/** - * - * @export - * @class AuthenticatorSettings - */ -class AuthenticatorSettings { - constructor(resourceJson) { - Object.assign(this, resourceJson); - } -} -exports.AuthenticatorSettings = AuthenticatorSettings; diff --git a/src/v3/models/authenticator.js b/src/v3/models/authenticator.js index b5ee6bba8..2752d7aa3 100644 --- a/src/v3/models/authenticator.js +++ b/src/v3/models/authenticator.js @@ -23,15 +23,3 @@ * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.Authenticator = void 0; -/** - * - * @export - * @class Authenticator - */ -class Authenticator { - constructor(resourceJson) { - Object.assign(this, resourceJson); - } -} -exports.Authenticator = Authenticator; diff --git a/src/v3/models/channel-binding.js b/src/v3/models/channel-binding.js index db99d60bb..2752d7aa3 100644 --- a/src/v3/models/channel-binding.js +++ b/src/v3/models/channel-binding.js @@ -23,15 +23,3 @@ * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.ChannelBinding = void 0; -/** - * - * @export - * @class ChannelBinding - */ -class ChannelBinding { - constructor(resourceJson) { - Object.assign(this, resourceJson); - } -} -exports.ChannelBinding = ChannelBinding; diff --git a/src/v3/models/compliance.js b/src/v3/models/compliance.js index 2f8d17583..2752d7aa3 100644 --- a/src/v3/models/compliance.js +++ b/src/v3/models/compliance.js @@ -23,15 +23,3 @@ * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.Compliance = void 0; -/** - * - * @export - * @class Compliance - */ -class Compliance { - constructor(resourceJson) { - Object.assign(this, resourceJson); - } -} -exports.Compliance = Compliance; diff --git a/src/v3/models/group-schema-attribute.js b/src/v3/models/group-schema-attribute.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/group-schema-attribute.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/group-schema-base-properties.js b/src/v3/models/group-schema-base-properties.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/group-schema-base-properties.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/group-schema-base.js b/src/v3/models/group-schema-base.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/group-schema-base.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/group-schema-custom.js b/src/v3/models/group-schema-custom.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/group-schema-custom.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/group-schema-definitions.js b/src/v3/models/group-schema-definitions.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/group-schema-definitions.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/group-schema.js b/src/v3/models/group-schema.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/group-schema.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/index.js b/src/v3/models/index.js index 0f1cfcebe..24eca9b8f 100644 --- a/src/v3/models/index.js +++ b/src/v3/models/index.js @@ -52,7 +52,30 @@ __exportStar(require('./authenticator-type'), exports); __exportStar(require('./channel-binding'), exports); __exportStar(require('./compliance'), exports); __exportStar(require('./fips-enum'), exports); +__exportStar(require('./group-schema'), exports); +__exportStar(require('./group-schema-attribute'), exports); +__exportStar(require('./group-schema-base'), exports); +__exportStar(require('./group-schema-base-properties'), exports); +__exportStar(require('./group-schema-custom'), exports); +__exportStar(require('./group-schema-definitions'), exports); __exportStar(require('./required-enum'), exports); +__exportStar(require('./user-schema'), exports); +__exportStar(require('./user-schema-attribute'), exports); +__exportStar(require('./user-schema-attribute-enum'), exports); +__exportStar(require('./user-schema-attribute-items'), exports); +__exportStar(require('./user-schema-attribute-master'), exports); +__exportStar(require('./user-schema-attribute-master-priority'), exports); +__exportStar(require('./user-schema-attribute-master-type'), exports); +__exportStar(require('./user-schema-attribute-permission'), exports); +__exportStar(require('./user-schema-attribute-scope'), exports); +__exportStar(require('./user-schema-attribute-type'), exports); +__exportStar(require('./user-schema-attribute-union'), exports); +__exportStar(require('./user-schema-base'), exports); +__exportStar(require('./user-schema-base-properties'), exports); +__exportStar(require('./user-schema-definitions'), exports); +__exportStar(require('./user-schema-properties'), exports); +__exportStar(require('./user-schema-properties-profile'), exports); +__exportStar(require('./user-schema-properties-profile-item'), exports); +__exportStar(require('./user-schema-public'), exports); __exportStar(require('./user-type'), exports); __exportStar(require('./user-verification-enum'), exports); - diff --git a/src/v3/models/user-schema-attribute-enum.js b/src/v3/models/user-schema-attribute-enum.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/user-schema-attribute-enum.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/user-schema-attribute-items.js b/src/v3/models/user-schema-attribute-items.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/user-schema-attribute-items.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/user-schema-attribute-master-priority.js b/src/v3/models/user-schema-attribute-master-priority.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/user-schema-attribute-master-priority.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/user-schema-attribute-master-type.js b/src/v3/models/user-schema-attribute-master-type.js new file mode 100644 index 000000000..ca5c33640 --- /dev/null +++ b/src/v3/models/user-schema-attribute-master-type.js @@ -0,0 +1,37 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UserSchemaAttributeMasterType = void 0; +/** + * + * @export + * @enum {string} + */ +var UserSchemaAttributeMasterType; +(function (UserSchemaAttributeMasterType) { + UserSchemaAttributeMasterType["PROFILEMASTER"] = "PROFILE_MASTER"; + UserSchemaAttributeMasterType["OKTA"] = "OKTA"; + UserSchemaAttributeMasterType["OVERRIDE"] = "OVERRIDE"; +})(UserSchemaAttributeMasterType = exports.UserSchemaAttributeMasterType || (exports.UserSchemaAttributeMasterType = {})); diff --git a/src/v3/models/user-schema-attribute-master.js b/src/v3/models/user-schema-attribute-master.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/user-schema-attribute-master.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/user-schema-attribute-permission.js b/src/v3/models/user-schema-attribute-permission.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/user-schema-attribute-permission.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/user-schema-attribute-scope.js b/src/v3/models/user-schema-attribute-scope.js new file mode 100644 index 000000000..ec60a1cc4 --- /dev/null +++ b/src/v3/models/user-schema-attribute-scope.js @@ -0,0 +1,36 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UserSchemaAttributeScope = void 0; +/** + * + * @export + * @enum {string} + */ +var UserSchemaAttributeScope; +(function (UserSchemaAttributeScope) { + UserSchemaAttributeScope["SELF"] = "SELF"; + UserSchemaAttributeScope["NONE"] = "NONE"; +})(UserSchemaAttributeScope = exports.UserSchemaAttributeScope || (exports.UserSchemaAttributeScope = {})); diff --git a/src/v3/models/user-schema-attribute-type.js b/src/v3/models/user-schema-attribute-type.js new file mode 100644 index 000000000..59f4cfdca --- /dev/null +++ b/src/v3/models/user-schema-attribute-type.js @@ -0,0 +1,39 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UserSchemaAttributeType = void 0; +/** + * + * @export + * @enum {string} + */ +var UserSchemaAttributeType; +(function (UserSchemaAttributeType) { + UserSchemaAttributeType["String"] = "string"; + UserSchemaAttributeType["Boolean"] = "boolean"; + UserSchemaAttributeType["Number"] = "number"; + UserSchemaAttributeType["Integer"] = "integer"; + UserSchemaAttributeType["Array"] = "array"; +})(UserSchemaAttributeType = exports.UserSchemaAttributeType || (exports.UserSchemaAttributeType = {})); diff --git a/src/v3/models/user-schema-attribute-union.js b/src/v3/models/user-schema-attribute-union.js new file mode 100644 index 000000000..4c9ba5bbc --- /dev/null +++ b/src/v3/models/user-schema-attribute-union.js @@ -0,0 +1,36 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UserSchemaAttributeUnion = void 0; +/** + * + * @export + * @enum {string} + */ +var UserSchemaAttributeUnion; +(function (UserSchemaAttributeUnion) { + UserSchemaAttributeUnion["DISABLE"] = "DISABLE"; + UserSchemaAttributeUnion["ENABLE"] = "ENABLE"; +})(UserSchemaAttributeUnion = exports.UserSchemaAttributeUnion || (exports.UserSchemaAttributeUnion = {})); diff --git a/src/v3/models/user-schema-attribute.js b/src/v3/models/user-schema-attribute.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/user-schema-attribute.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/user-schema-base-properties.js b/src/v3/models/user-schema-base-properties.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/user-schema-base-properties.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/user-schema-base.js b/src/v3/models/user-schema-base.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/user-schema-base.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/user-schema-definitions.js b/src/v3/models/user-schema-definitions.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/user-schema-definitions.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/user-schema-properties-profile-item.js b/src/v3/models/user-schema-properties-profile-item.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/user-schema-properties-profile-item.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/user-schema-properties-profile.js b/src/v3/models/user-schema-properties-profile.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/user-schema-properties-profile.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/user-schema-properties.js b/src/v3/models/user-schema-properties.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/user-schema-properties.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/user-schema-public.js b/src/v3/models/user-schema-public.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/user-schema-public.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/user-schema.js b/src/v3/models/user-schema.js new file mode 100644 index 000000000..2752d7aa3 --- /dev/null +++ b/src/v3/models/user-schema.js @@ -0,0 +1,25 @@ +'use strict'; +/* tslint:disable */ +/* eslint-disable */ +/** + * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. + * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.") + * + * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * + * See the License for the specific language governing permissions and limitations under the License. + * + * Okta API + * Allows customers to easily access the Okta API + * + * OpenAPI spec version: 2.10.0 + * Contact: devex-public@okta.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/src/v3/models/user-type.js b/src/v3/models/user-type.js index 1a252b1d3..2752d7aa3 100644 --- a/src/v3/models/user-type.js +++ b/src/v3/models/user-type.js @@ -23,15 +23,3 @@ * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); -exports.UserType = void 0; -/** - * - * @export - * @class UserType - */ -class UserType { - constructor(resourceJson) { - Object.assign(this, resourceJson); - } -} -exports.UserType = UserType; diff --git a/templates/helpers/operation-v3.js b/templates/helpers/operation-v3.js index 05771ee4a..2db52bcb6 100644 --- a/templates/helpers/operation-v3.js +++ b/templates/helpers/operation-v3.js @@ -13,6 +13,14 @@ const V3ApiOperations = { 'getAuthenticator', 'listAuthenticators', 'updateAuthenticator', + ], + SchemaApi: [ + 'getApplicationUserSchema', + 'getGroupSchema', + 'getUserSchema', + 'updateApplicationUserProfile', + 'updateGroupSchema', + 'updateUserProfile', ] }; @@ -31,7 +39,31 @@ const V3Models = [ 'FipsEnum', 'RequiredEnum', 'UserType', - 'UserVerificationEnum' + 'UserVerificationEnum', + 'GroupSchemaAttribute', + 'GroupSchemaBaseProperties', + 'GroupSchemaBase', + 'GroupSchemaCustom', + 'GroupSchemaDefinitions', + 'GroupSchema', + 'UserSchemaAttributeEnum', + 'UserSchemaAttributeItems', + 'UserSchemaAttributeMasterPriority', + 'UserSchemaAttributeMasterType', + 'UserSchemaAttributeMaster', + 'UserSchemaAttributePermission', + 'UserSchemaAttributeScope', + 'UserSchemaAttributeType', + 'UserSchemaAttributeUnion', + 'UserSchemaAttribute', + 'UserSchemaBaseProperties', + 'UserSchemaBase', + 'UserSchemaDefinitions', + 'UserSchemaPropertiesProfileItem', + 'UserSchemaPropertiesProfile', + 'UserSchemaProperties', + 'UserSchemaPublic', + 'UserSchema', ]; function isV3Model(modelName) { diff --git a/templates/swagger-codegen/apiInner.mustache b/templates/swagger-codegen/apiInner.mustache index 1fbc000d3..581f5304c 100644 --- a/templates/swagger-codegen/apiInner.mustache +++ b/templates/swagger-codegen/apiInner.mustache @@ -7,6 +7,7 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '{{apiRelativeToRoot}}base'; {{#imports}} import { {{import}} } from '{{apiRelativeToRoot}}{{tsModelPackage}}'; +{{/imports}} import { Response } from 'node-fetch'; import { OAuth } from '../../oauth'; import { Http } from '../../http'; @@ -25,7 +26,6 @@ const DEFAULT_USER_AGENT = `${packageJson.name}/${packageJson.version} node/${pr const repoUrl = 'https://github.com/okta/okta-sdk-nodejs'; -{{/imports}} {{#operations}} /** @@ -318,13 +318,13 @@ export const {{classname}}Fp = function(configuration?: Configuration & V2Config const requestArgs = {...localVarRequestArgs.options, url: basePath + localVarRequestArgs.url}; {{#returnType}} {{#eq (substring returnType 0 3) 'Arr'}} - return new Collection<{{{substring returnType 6}}}({http}, `${requestArgs.url}`, new ModelFactory({{{replace (substring returnType 6) '>' ''}}})); + return new Collection<{{{substring returnType 6}}}({http}, `${requestArgs.url}`); {{else}} - return http.http(requestArgs.url, requestArgs).then(res => res.json().then(data => new {{returnType}}(data))) as Promise<{{{returnType}}}>; + return http.http(requestArgs.url, requestArgs).then(res => res.json().then((data: {{returnType}}) => data)); {{/eq}} {{/returnType}} {{^returnType}} - return http.http(requestArgs.url, requestArgs) as Promise; + return http.http(requestArgs.url, requestArgs); {{/returnType}} } }, diff --git a/templates/swagger-codegen/modelGeneric.mustache b/templates/swagger-codegen/modelGeneric.mustache index 16b9a0cad..72570726b 100644 --- a/templates/swagger-codegen/modelGeneric.mustache +++ b/templates/swagger-codegen/modelGeneric.mustache @@ -3,10 +3,7 @@ * @export * @class {{classname}} */ -export class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ - constructor(resourceJson: Record) { - Object.assign(this, resourceJson); - } +export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ {{#additionalPropertiesType}} [key: string]: {{{additionalPropertiesType}}}{{#hasVars}} | any{{/hasVars}}; @@ -14,7 +11,7 @@ export class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ {{#vars}} /** * {{{description}}} - * @type {{braces "left"}}{{datatype}}{{braces "right"}} + * @type {{braces "left"}}{{{datatype}}}{{braces "right"}} * @memberof {{classname}} {{#deprecated}} * @deprecated diff --git a/test/it/application-user-schema.ts b/test/it/application-user-schema.ts index e4c1922fe..eceaa19e4 100644 --- a/test/it/application-user-schema.ts +++ b/test/it/application-user-schema.ts @@ -1,7 +1,13 @@ import { expect } from 'chai'; import utils = require('../utils'); -import { Client, BookmarkApplication, UserSchema, DefaultRequestExecutor } from '@okta/okta-sdk-nodejs'; +import { + Client, + BookmarkApplication, + UserSchema, + DefaultRequestExecutor, + v3 +} from '@okta/okta-sdk-nodejs'; import getMockSchemaProperty = require('./mocks/user-schema-property'); @@ -32,8 +38,8 @@ describe('App User Schema', () => { }); it('gets UserSchema for application', async () => { - const userSchema = await client.getApplicationUserSchema(createdApplication.id); - expect(userSchema).to.be.instanceOf(UserSchema); + const userSchema: v3.model.UserSchema = await client.getApplicationUserSchema(createdApplication.id); + expect(userSchema.definitions).is.not.null; }); it('adds property to application\'s UserSchema', async () => { diff --git a/test/it/type-user.ts b/test/it/type-user.ts index d5d92abc2..04fdd8617 100644 --- a/test/it/type-user.ts +++ b/test/it/type-user.ts @@ -1,10 +1,13 @@ +import { UserType } from './../../src/types/v3/models/user-type.d'; import { expect } from 'chai'; import faker = require('@faker-js/faker'); import { Client, Collection, DefaultRequestExecutor, - v3 } from '@okta/okta-sdk-nodejs'; + v3 +} from '@okta/okta-sdk-nodejs'; + import getMockUserType = require('./mocks/user-type'); let orgUrl = process.env.OKTA_CLIENT_ORGURL; @@ -31,11 +34,10 @@ describe('User Type API', () => { }); it('should return a Collection of UserType', async () => { - const userTypes = await client.listUserTypes(); + const userTypes = client.listUserTypes(); expect(userTypes).to.be.instanceOf(Collection); - await userTypes.each(userType => { - expect(userType).to.be.instanceOf(v3.model.UserType); - }); + const {value: userType } = await userTypes.next(); + expect(userType.name.length).to.be.greaterThan(0); }); }); @@ -48,7 +50,6 @@ describe('User Type API', () => { it('should return UserType instance', async () => { const mockUserType = getMockUserType(); userType = await client.createUserType(mockUserType); - expect(userType).to.be.instanceOf(v3.model.UserType); expect(userType).to.have.property('id'); expect(userType.name).to.equal(mockUserType.name); }); @@ -65,7 +66,6 @@ describe('User Type API', () => { it('should get userType by id', async () => { const userTypeFromGet = await client.getUserType(userType.id); - expect(userTypeFromGet).to.be.instanceOf(v3.model.UserType); expect(userTypeFromGet.name).to.equal(userType.name); }); }); @@ -92,7 +92,6 @@ describe('User Type API', () => { it('should replace userType with a new resource', async () => { mockType.displayName = faker.random.word(); const replacedUserType = await client.replaceUserType(userType.id, mockType); - expect(replacedUserType).to.be.instanceOf(v3.model.UserType); expect(replacedUserType.id).to.be.equal(userType.id); expect(replacedUserType.name).to.be.equal(mockType.name); }); diff --git a/test/it/user-schema.ts b/test/it/user-schema.ts index 8a0dd3776..5165e3582 100644 --- a/test/it/user-schema.ts +++ b/test/it/user-schema.ts @@ -2,9 +2,9 @@ import { expect } from 'chai'; import { Client, DefaultRequestExecutor, - UserSchema, - UserSchemaDefinitions, - v3 } from '@okta/okta-sdk-nodejs'; + v3 +} from '@okta/okta-sdk-nodejs'; + import getMockUserType = require('./mocks/user-type'); import getMockSchemaProperty = require('./mocks/user-schema-property'); @@ -38,8 +38,7 @@ describe('User Schema API', () => { it('gets UserSchema for custom user type', async () => { const userSchema = await client.getUserSchema(schemaId); - expect(userSchema).to.be.instanceOf(UserSchema); - expect(userSchema.definitions).to.be.instanceOf(UserSchemaDefinitions); + expect(userSchema.definitions.custom.id).to.equal('#custom'); }); it('adds property to UserSchema for custom user type', async () => {