Skip to content

Instantly share code, notes, and snippets.

@frencojobs
Last active July 15, 2023 09:40
Show Gist options
  • Save frencojobs/da87bbd2eb88c37309d6ff7df38422d1 to your computer and use it in GitHub Desktop.
Save frencojobs/da87bbd2eb88c37309d6ff7df38422d1 to your computer and use it in GitHub Desktop.
Vercel Deployment Types

I'm gonna assume the response from /v13/deployments/:id is the ideal response and compare it to the deployment interfaces responded from other endpoints.

Deployment from v6/deployments

  1. id is uid
  2. aliasAssignedAt is aliasAssigned, note that aliasAssigned is a boolean field in the ideal response
  3. createdAt is duplicated into created, there're two fields with the same value in there, created and createdAt
  4. the creator field returns two more properties, email and githubLogin
  5. readyState is renamed as state, the ideal response here is duplicating it though, the v13/deployments/:id respond with both status and readyState, they are the same
  6. it's missing a lot of fields, including the ones on aliases

Deployment from latestDeployments field of v9/projects

  1. aliasAssignedAt is aliasAssigned
  2. the creator field returns two more properties as well, email and githubLogin
  3. public field is flipped private field
  4. ownerId is userId
  5. returns teamId which the ideal response doesn't (or maybe it's undefined instead of null)
  6. ready is readyAt
  7. also missing a bunch of fields

I'm creating three separate interfaces due to these differences, VercelDeployment (the ideal one), VercelListedDeployment and VercelLatestDeployment. This isn't the case for projects though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment