vercel-api-js 0.1.17 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -135,6 +135,10 @@ const artifactQuery = (variables, signal) => fetch$1({
135
135
  ...variables,
136
136
  signal
137
137
  });
138
+ /**
139
+ * Creates a new check. This endpoint must be called with an OAuth2 or it will produce a 400 error.
140
+ */
141
+ const createCheck = (variables, signal) => fetch$1({ url: '/v1/deployments/{deploymentId}/checks', method: 'post', ...variables, signal });
138
142
  /**
139
143
  * List all of the checks created for a deployment.
140
144
  */
@@ -144,10 +148,6 @@ const getAllChecks = (variables, signal) => fetch$1({
144
148
  ...variables,
145
149
  signal
146
150
  });
147
- /**
148
- * Creates a new check. This endpoint must be called with an OAuth2 or it will produce a 400 error.
149
- */
150
- const createCheck = (variables, signal) => fetch$1({ url: '/v1/deployments/{deploymentId}/checks', method: 'post', ...variables, signal });
151
151
  /**
152
152
  * Return a detailed response for a single check.
153
153
  */
@@ -170,6 +170,10 @@ const rerequestCheck = (variables, signal) => fetch$1({
170
170
  ...variables,
171
171
  signal
172
172
  });
173
+ /**
174
+ * Update the cron job feature on a project.
175
+ */
176
+ const updateProjectDataCache = (variables, signal) => fetch$1({ url: '/v1/data-cache/projects/{projectId}', method: 'patch', ...variables, signal });
173
177
  /**
174
178
  * Get the build logs of a deployment by deployment ID and build ID. It can work as an infinite stream of logs or as a JSON endpoint depending on the input parameters.
175
179
  */
@@ -204,14 +208,14 @@ const checkDomainPrice = (variables, signal) => fetch$1({
204
208
  ...variables,
205
209
  signal
206
210
  });
207
- /**
208
- * Creates a DNS record for a domain.
209
- */
210
- const createRecord = (variables, signal) => fetch$1({ url: '/v2/domains/{domain}/records', method: 'post', ...variables, signal });
211
211
  /**
212
212
  * Retrieves a list of DNS records created for a domain name. By default it returns 20 records if no limit is provided. The rest can be retrieved using the pagination options.
213
213
  */
214
214
  const getRecords = (variables, signal) => fetch$1({ url: '/v4/domains/{domain}/records', method: 'get', ...variables, signal });
215
+ /**
216
+ * Creates a DNS record for a domain.
217
+ */
218
+ const createRecord = (variables, signal) => fetch$1({ url: '/v2/domains/{domain}/records', method: 'post', ...variables, signal });
215
219
  /**
216
220
  * Updates an existing DNS record for a domain name.
217
221
  */
@@ -605,20 +609,20 @@ const deleteTeamInviteCode = (variables, signal) => fetch$1({
605
609
  */
606
610
  const uploadFile = (variables, signal) => fetch$1({ url: '/v2/files', method: 'post', ...variables, signal });
607
611
  /**
608
- * Initiates the deletion process for the currently authenticated User, by sending a deletion confirmation email. The email contains a link that the user needs to visit in order to proceed with the deletion process.
612
+ * Retrieves information related to the currently authenticated User.
609
613
  */
610
- const requestDelete = (variables, signal) => fetch$1({
611
- url: '/v1/user',
612
- method: 'delete',
614
+ const getAuthUser = (variables, signal) => fetch$1({
615
+ url: '/v2/user',
616
+ method: 'get',
613
617
  ...variables,
614
618
  signal
615
619
  });
616
620
  /**
617
- * Retrieves information related to the currently authenticated User.
621
+ * Initiates the deletion process for the currently authenticated User, by sending a deletion confirmation email. The email contains a link that the user needs to visit in order to proceed with the deletion process.
618
622
  */
619
- const getAuthUser = (variables, signal) => fetch$1({
620
- url: '/v2/user',
621
- method: 'get',
623
+ const requestDelete = (variables, signal) => fetch$1({
624
+ url: '/v1/user',
625
+ method: 'delete',
622
626
  ...variables,
623
627
  signal
624
628
  });
@@ -685,19 +689,19 @@ const deleteWebhook = (variables, signal) => fetch$1({
685
689
  signal
686
690
  });
687
691
  /**
688
- * Retrieves an Alias for the given host name or alias ID.
692
+ * Retrieves a list of aliases for the authenticated User or Team. When `domain` is provided, only aliases for that domain will be returned. When `projectId` is provided, it will only return the given project aliases.
689
693
  */
690
- const getAlias = (variables, signal) => fetch$1({
691
- url: '/v4/aliases/{idOrAlias}',
694
+ const listAliases = (variables, signal) => fetch$1({
695
+ url: '/v4/aliases',
692
696
  method: 'get',
693
697
  ...variables,
694
698
  signal
695
699
  });
696
700
  /**
697
- * Retrieves a list of aliases for the authenticated User or Team. When `domain` is provided, only aliases for that domain will be returned. When `projectId` is provided, it will only return the given project aliases.
701
+ * Retrieves an Alias for the given host name or alias ID.
698
702
  */
699
- const listAliases = (variables, signal) => fetch$1({
700
- url: '/v4/aliases',
703
+ const getAlias = (variables, signal) => fetch$1({
704
+ url: '/v4/aliases/{idOrAlias}',
701
705
  method: 'get',
702
706
  ...variables,
703
707
  signal
@@ -772,6 +776,15 @@ const getDeployments = (variables, signal) => fetch$1({
772
776
  ...variables,
773
777
  signal
774
778
  });
779
+ /**
780
+ * Verify the user accepted the login request and get a authentication token. The user email address and the token received after requesting the login must be added to the URL as a query string with the names `email` and `token`.
781
+ */
782
+ const verifyToken = (variables, signal) => fetch$1({
783
+ url: '/registration/verify',
784
+ method: 'get',
785
+ ...variables,
786
+ signal
787
+ });
775
788
  /**
776
789
  * Request a new login for a user to get a token. This will respond with a verification token and send an email to confirm the request. Once confirmed you can use the verification token to get an authentication token.
777
790
  */
@@ -782,18 +795,18 @@ const emailLogin = (variables, signal) => fetch$1({
782
795
  signal
783
796
  });
784
797
  /**
785
- * Verify the user accepted the login request and get a authentication token. The user email address and the token received after requesting the login must be added to the URL as a query string with the names `email` and `token`.
798
+ * This API allows you to delete a deployment, either by supplying its `id` in the URL or the `url` of the deployment as a query parameter. You can obtain the ID, for example, by listing all deployments.
786
799
  */
787
- const verifyToken = (variables, signal) => fetch$1({
788
- url: '/registration/verify',
800
+ const deleteDeployment = (variables, signal) => fetch$1({ url: '/v13/deployments/{id}', method: 'delete', ...variables, signal });
801
+ /**
802
+ * Retrieves the active Vercel secrets for the authenticated user. By default it returns 20 secrets. The rest can be retrieved using the pagination options. The body will contain an entry for each secret.
803
+ */
804
+ const getSecrets = (variables, signal) => fetch$1({
805
+ url: '/v3/secrets',
789
806
  method: 'get',
790
807
  ...variables,
791
808
  signal
792
809
  });
793
- /**
794
- * This API allows you to delete a deployment, either by supplying its `id` in the URL or the `url` of the deployment as a query parameter. You can obtain the ID, for example, by listing all deployments.
795
- */
796
- const deleteDeployment = (variables, signal) => fetch$1({ url: '/v13/deployments/{id}', method: 'delete', ...variables, signal });
797
810
  /**
798
811
  * Allows to create a new secret.
799
812
  */
@@ -807,15 +820,6 @@ const createSecret = (variables, signal) => fetch$1({
807
820
  * Enables to edit the name of a user's secret. The name has to be unique to that user's secrets.
808
821
  */
809
822
  const renameSecret = (variables, signal) => fetch$1({ url: '/v2/secrets/{name}', method: 'patch', ...variables, signal });
810
- /**
811
- * Retrieves the active Vercel secrets for the authenticated user. By default it returns 20 secrets. The rest can be retrieved using the pagination options. The body will contain an entry for each secret.
812
- */
813
- const getSecrets = (variables, signal) => fetch$1({
814
- url: '/v3/secrets',
815
- method: 'get',
816
- ...variables,
817
- signal
818
- });
819
823
  /**
820
824
  * Retrieves the information for a specific secret by passing either the secret id or name in the URL.
821
825
  */
@@ -836,7 +840,26 @@ const deleteSecret = (variables, signal) => fetch$1({
836
840
  });
837
841
  const operationsByTag = {
838
842
  artifacts: { recordEvents, status, uploadArtifact, downloadArtifact, artifactQuery },
839
- checks: { getAllChecks, createCheck, getCheck, updateCheck, rerequestCheck },
843
+ checks: { createCheck, getAllChecks, getCheck, updateCheck, rerequestCheck },
844
+ projects: {
845
+ updateProjectDataCache,
846
+ getProjects,
847
+ createProject,
848
+ getProject,
849
+ updateProject,
850
+ deleteProject,
851
+ getProjectDomains,
852
+ getProjectDomain,
853
+ updateProjectDomain,
854
+ removeProjectDomain,
855
+ addProjectDomain,
856
+ verifyProjectDomain,
857
+ filterProjectEnvs,
858
+ getProjectEnv,
859
+ createProjectEnv,
860
+ removeProjectEnv,
861
+ editProjectEnv
862
+ },
840
863
  deployments: {
841
864
  getDeploymentEvents,
842
865
  getDeployment,
@@ -858,7 +881,7 @@ const operationsByTag = {
858
881
  createOrTransferDomain,
859
882
  deleteDomain
860
883
  },
861
- dns: { createRecord, getRecords, updateRecord, removeRecord },
884
+ dns: { getRecords, createRecord, updateRecord, removeRecord },
862
885
  edgeConfig: {
863
886
  getEdgeConfigs,
864
887
  createEdgeConfig,
@@ -873,7 +896,7 @@ const operationsByTag = {
873
896
  getEdgeConfigToken,
874
897
  createEdgeConfigToken
875
898
  },
876
- user: { listUserEvents, requestDelete, getAuthUser },
899
+ user: { listUserEvents, getAuthUser, requestDelete },
877
900
  integrations: { getConfigurations, getConfiguration, deleteConfiguration, gitNamespaces, searchRepo },
878
901
  logDrains: {
879
902
  getIntegrationLogDrains,
@@ -884,24 +907,6 @@ const operationsByTag = {
884
907
  getConfigurableLogDrains,
885
908
  createConfigurableLogDrain
886
909
  },
887
- projects: {
888
- getProjects,
889
- createProject,
890
- getProject,
891
- updateProject,
892
- deleteProject,
893
- getProjectDomains,
894
- getProjectDomain,
895
- updateProjectDomain,
896
- removeProjectDomain,
897
- addProjectDomain,
898
- verifyProjectDomain,
899
- filterProjectEnvs,
900
- getProjectEnv,
901
- createProjectEnv,
902
- removeProjectEnv,
903
- editProjectEnv
904
- },
905
910
  teams: {
906
911
  getTeamMembers,
907
912
  inviteUserToTeam,
@@ -917,11 +922,11 @@ const operationsByTag = {
917
922
  deleteTeam,
918
923
  deleteTeamInviteCode
919
924
  },
920
- authentication: { listAuthTokens, createAuthToken, getAuthToken, deleteAuthToken, emailLogin, verifyToken },
925
+ authentication: { listAuthTokens, createAuthToken, getAuthToken, deleteAuthToken, verifyToken, emailLogin },
921
926
  webhooks: { createWebhook, getWebhooks, getWebhook, deleteWebhook },
922
- aliases: { getAlias, listAliases, deleteAlias, listDeploymentAliases, assignAlias },
927
+ aliases: { listAliases, getAlias, deleteAlias, listDeploymentAliases, assignAlias },
923
928
  certs: { getCertById, removeCert, issueCert, uploadCert },
924
- secrets: { createSecret, renameSecret, getSecrets, getSecret, deleteSecret }
929
+ secrets: { getSecrets, createSecret, renameSecret, getSecret, deleteSecret }
925
930
  };
926
931
 
927
932
  function formEncoded(data) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vercel-api-js",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "Vercel API client for Node.js",
5
5
  "author": "SferaDev",
6
6
  "license": "ISC",