Skip to content

Commit

Permalink
fix: persons search (#23)
Browse files Browse the repository at this point in the history
* chore: update flake.lock

Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/f4f322d1424aa547eba9cb092f905f5ceb9b639c' (2024-07-29)
  → 'github:NixOS/nixpkgs/3563397b2f10ffa1891e1a6ce99d13d960d73acd' (2024-07-30)

* fix: persons/search does not return `organization_ids`
  • Loading branch information
joscha authored Jul 30, 2024
1 parent 66ffd6f commit 449c7a2
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 449c7a2

Please sign in to comment.