okta-sdk-nodejs icon indicating copy to clipboard operation
okta-sdk-nodejs copied to clipboard

Incorrect types for inlineHookApi

Open eatplaysleep opened this issue 1 year ago • 1 comments

Describe the bug

Expected types (as an example):

	interface InlineHook {
		channel: InlineHookChannelObject;
		created: Date;
		id: string;
		lastUpdated: Date;
		name: string;
		status: InlineHookStatus;
		type: InlineHookType;
		version: string;
		_links?: Record<string, any>;
                ...
	}

	interface InlineHookChannelObject {
		type: 'HTTP' | 'OAUTH';
		version: string;
		config: InlineHookHTTPConfig | InlineHookOAuthConfig;
	}

	interface InlineHookHTTPConfig {
		uri: string;
		headers?: Record<string, string>;
		authScheme: InlineHookAuthScheme
	}

	interface InlineHookOAuthConfig {
		uri: string;
		headers?: Record<string, string>;
		method: 'POST';
		authType: 'client_secret_post' | 'private_key_jwt';
	}

	interface InlineHookAuthScheme {
		type: string;
		key: string;
		value: string;
	}

Actual types:

export declare class InlineHook {
  'channel'?: InlineHookChannel;
  'created'?: Date;
  'id'?: string;
  'lastUpdated'?: Date;
  'name'?: string;
  'status'?: InlineHookStatus;
  'type'?: InlineHookType;
  'version'?: string;
  '_links'?: {
        [key: string]: any;
  };
  ...
};

export declare class InlineHookChannel {
  'type'?: InlineHookChannelType;
  'version'?: string;
  ...
}

Reproduction Steps?

use the client.inlineHookApi.xxxInlineHook() method(s).

SDK Versions

7.0.1

Additional Information

No response

eatplaysleep avatar Jan 20 '24 00:01 eatplaysleep

Also...

Expected:

export declare type InlineHookType = 'com.okta.import.transform' | 'com.okta.oauth2.tokens.transform' | 'com.okta.saml.tokens.transform' | 'com.okta.user.credential.password.import' | 'com.okta.user.pre-registration' |'com.okta.telephony.provider';

Actual:

export declare type InlineHookType = 'com.okta.import.transform' | 'com.okta.oauth2.tokens.transform' | 'com.okta.saml.tokens.transform' | 'com.okta.user.credential.password.import' | 'com.okta.user.pre-registration';

eatplaysleep avatar Jan 20 '24 00:01 eatplaysleep