Skip to content

Wrong type for CreateAuthorizationResourceOptions #1529

@mxp-qk

Description

@mxp-qk

Hello,

I think something is wrong with the types for Authorization.createResource options here

export interface CreateOptionsWithParentResourceId extends BaseCreateAuthorizationResourceOptions {
  parentResourceId: string;
}

export interface CreateOptionsWithParentExternalId extends BaseCreateAuthorizationResourceOptions {
  parentResourceExternalId: string;
  parentResourceTypeSlug: string;
}

export type CreateAuthorizationResourceOptions =
  | CreateOptionsWithParentResourceId
  | CreateOptionsWithParentExternalId;

Both types require setting a parent resource when the doc mentioned, it is optional. Ignoring the type error will result in a successful resource creation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions