Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[BUG] In the Pipedream SDK, "app" is missing from the ConfigurableProp types #18956

@alexpareto

Description

@alexpareto

Describe the bug
In the Pipedream Typescript SDK, "app" is missing from the ConfigurableProp types, this causes linter errors despite the value being present in API responses

To Reproduce

export interface ConfigurableProp {
    /** When building `configuredProps`, make sure to use this field as the key when setting the prop value */
    name: string;
    type: Pipedream.ConfigurablePropType;
    /** Value to use as an input label. In cases where `type` is "app", should load the app via `getApp`, etc. and show `app.name` instead. */
    label?: string;
    /** A description of the prop, shown to the user when configuring the component. */
    description?: string;
    /** If true, this prop does not need to be specified. */
    optional?: boolean;
    /** If true, this prop will be ignored. */
    disabled?: boolean;
    /** If true, should not expose this prop to the user */
    hidden?: boolean;
    /** If true, call `configureComponent` for this prop to load remote options. It is safe, and preferred, given a returned list of { label: string; value: any } objects to set the prop value to { __lv: { label: string; value: any } }. This way, on load, you can access label for the value without necessarily reloading these options */
    remoteOptions?: boolean;
    /** If true, calls to `configureComponent` for this prop support receiving a `query` parameter to filter remote options */
    useQuery?: boolean;
    /** If true, after setting a value for this prop, a call to `reloadComponentProps` is required as the component has dynamic configurable props dependent on this one */
    reloadProps?: boolean;
    /** If true, you must save the configured prop value as a "label-value" object which should look like: { __lv: { label: string; value: any } } because the execution needs to access the label */
    withLabel?: boolean;
}

Note in API docs, how "app" is always returned in API responses for app type. This is important for later running pipedream SDK / connect to connect to said app, since it is the appId.

backend-1   | configuredProps [
backend-1   |   {
backend-1   |     "name": "schedule",
backend-1   |     "type": "app",
backend-1   |     "app": "schedule"
backend-1   |   },
backend-1   |   {
backend-1   |     "name": "cron",
backend-1   |     "label": "Cron Schedule",
backend-1   |     "type": "$.interface.timer",
backend-1   |     "description": "Enter a cron expression"
backend-1   |   }
backend-1   | ]

Expected behavior
Typescript types exist for "app"

Screenshots

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions