Skip to content

Wrong type for search api #678

@johnretsas

Description

@johnretsas

What

The expected type for sorts is defined as Array<string>. Based off the docs and actual implementations that work differently, I don't think that's true.

The docs mention this:

curl https://api.hubapi.com/crm/v3/objects/contacts/search \
  --request POST \
  --header "Content-Type: application/json" \
  --header "authorization: Bearer YOUR_ACCESS_TOKEN" \
  --data '{
    "sorts": [
      {
        "propertyName": "createdate",
        "direction": "DESCENDING"
      }
    ]
  }'

This results in our having to do @ts-expect-error to pass any

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