镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

CreateDataAttributeRequest incorrectly typed #513

Description

@JordhanMadec

Currently this is typed as follow :

export type CreateDataAttributeRequest = {
    data_type?: "options" | undefined;
    options: {
        value?: string | undefined;
    }[];
} | {
    data_type?: ("string" | "integer" | "float" | "boolean" | "datetime" | "date") | undefined;
};

However, according to API docs, we should also be able to set the following fields : name, model, description and messenger_writable

Therefore, we should have something like this :

interface CreateDataAttributeRequestBase {
    name: string;
    model: 'company' | 'contact';
    description?: string;
    messenger_writable?: boolean;
}

export type CreateDataAttributeRequest = CreateDataAttributeRequestBase & {
    data_type?: "options" | undefined;
    options: {
        value?: string | undefined;
    }[];
} | CreateDataAttributeRequestBase & {
    data_type?: ("string" | "integer" | "float" | "boolean" | "datetime" | "date") | undefined;
};

Activity

  1. changed the title [-]CreateDataAttributeRequest incorrectly types[/-] [+]CreateDataAttributeRequest incorrectly typed[/+] on Feb 12, 2026
  2. changed the title [-]CreateDataAttributeRequest incorrectly typed[/-] [+]`CreateDataAttributeRequest` incorrectly typed[/+] on Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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