okta / okta-sdk-nodejs

Node.js API Client for the Okta Platform API
Other
102 stars 60 forks source link

Incorrect types for inlineHookApi #406

Open eatplaysleep opened 9 months ago

eatplaysleep commented 9 months ago

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 commented 9 months ago

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';