Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listPolicyRules: actions object missing in PolicyRule #423

Open
AdrienPoupa opened this issue Aug 14, 2024 · 0 comments
Open

listPolicyRules: actions object missing in PolicyRule #423

AdrienPoupa opened this issue Aug 14, 2024 · 0 comments
Labels

Comments

@AdrienPoupa
Copy link

Describe the bug

I'm upgrading from v6, I saw that all the types were regenerated in v7. I'm calling client.policyApi.listPolicyRules and I want to access rules actions.

v6 PolicyRule type: https://github.com/okta/okta-sdk-nodejs/blob/okta-sdk-nodejs-6.0.0/src/types/models/PolicyRule.d.ts

declare class PolicyRule extends Resource {
  constructor(resourceJson: Record<string, unknown>, client: Client);

  actions: PolicyRuleActions;

In v7: https://github.com/okta/okta-sdk-nodejs/blob/okta-sdk-nodejs-7.0.0/src/types/generated/models/PolicyRule.d.ts

export declare class PolicyRule {
  'created'?: Date;
  'id'?: string;
  'lastUpdated'?: Date;
  'name'?: string;
  'priority'?: number;
  'status'?: LifecycleStatus;
  'system'?: boolean;
  'type'?: PolicyRuleType;
  static readonly discriminator: string | undefined;
  static readonly attributeTypeMap: Array<{
        name: string;
        baseName: string;
        type: string;
        format: string;
    }>;
  static getAttributeTypeMap(): {
        name: string;
        baseName: string;
        type: string;
        format: string;
    }[];
  constructor();
}

The actions object is gone. I don't see why, as the API documentation states the listPolicyRules endpoint returns a Rules object that contain an actions key which is a Rules Actions Objects.

https://developer.okta.com/docs/reference/api/policy/#list-policy-rules
https://developer.okta.com/docs/reference/api/policy/#rules-object

Could you please correct the type? Thank you.

Reproduction Steps?

n/a

SDK Versions

7.0.0 and up

Additional Information

No response

@AdrienPoupa AdrienPoupa changed the title actions object missing in PolicyRule listPolicyRules: actions object missing in PolicyRule Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant