Skip to content

Commit

Permalink
fix: persons/search does not return organization_ids
Browse files Browse the repository at this point in the history
  • Loading branch information
joscha committed Jul 30, 2024
1 parent 1f62cc8 commit 138c6f8
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/v1/persons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ export type Person = {
emails: string[]
/** The email (automatically computed) that is most likely to the current active email address of the person. */
primary_email: string
/** An array of unique identifiers of organizations that the person is associated with. */
organization_ids: number[]
}

/**
Expand Down Expand Up @@ -106,18 +104,22 @@ export type PagedPersonResponse = Replace<PagedPersonResponseRaw, {

export type SinglePersonResponseRaw =
& {
/** An array of unique identifiers of organizations that the person is associated with. */
organization_ids: number[]
list_entries: ListEntryReferenceRaw[]
}
& PersonResponseRaw

export type SinglePersonResponse =
export type SinglePersonResponse = Replace<
SinglePersonResponseRaw,
& {
/**
* An array of list entry resources associated with the person, only returned as part of the {@link Persons.get} a specific person endpoint.
*/
list_entries: ListEntryReference[]
}
& PersonResponse
>

export type GetPersonRequest =
& PersonReference
Expand Down Expand Up @@ -183,12 +185,7 @@ export type UpdatePersonRequest =
}
& PersonReference

export type SimplePersonResponse =
& Person
& Pick<
PersonResponse,
'organization_ids'
>
export type SimplePersonResponse = Omit<SinglePersonResponse, 'list_entries'>

/**
* @module
Expand Down

0 comments on commit 138c6f8

Please sign in to comment.