@assinafy/cli 2.9.1 → 2.10.1

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/api.js CHANGED
@@ -585,7 +585,7 @@ function normaliseSignerRef(ref, options) {
585
585
  throw new ValidationError("Invalid signer reference", { ref });
586
586
  }
587
587
  var AssignmentResource = class extends BaseResource {
588
- /** Keep a request for later; no invitation or charge until the server sends it (staging). */
588
+ /** Keep a request for later; no invitation or charge until the server sends it. */
589
589
  async schedule(documentId, payload) {
590
590
  const id = this.requireId(documentId, "Document ID");
591
591
  requireScheduledTime(payload?.send_at);
@@ -850,14 +850,6 @@ var AuthenticationResource = class extends BaseResource {
850
850
  () => this.http.post("/auth/link-social-login", payload)
851
851
  );
852
852
  }
853
- /** `POST /users/api-keys` — generate (and rotate) the current user's API key. */
854
- async createApiKey(password) {
855
- if (!password) throw new ValidationError("password is required");
856
- return this.call(
857
- "Failed to create API key",
858
- () => this.http.post("/users/api-keys", { password })
859
- );
860
- }
861
853
  /**
862
854
  * `GET /users/api-keys` — fetch a masked version of the current API key, or
863
855
  * `null` if no key has been generated yet.
@@ -1072,7 +1064,7 @@ var FAILED_STATUSES = /* @__PURE__ */ new Set([
1072
1064
  "expired"
1073
1065
  ]);
1074
1066
  var DocumentResource = class extends BaseResource {
1075
- /** Read contacts who receive a completion email without document access (staging). */
1067
+ /** Read contacts who receive a completion email without document access. */
1076
1068
  async listWatchers(documentId) {
1077
1069
  const id = this.requireId(documentId, "Document ID");
1078
1070
  return this.call(
@@ -1080,7 +1072,7 @@ var DocumentResource = class extends BaseResource {
1080
1072
  () => this.http.get(`/documents/${id}/watchers`)
1081
1073
  );
1082
1074
  }
1083
- /** Replace all watchers; an empty list clears them. Owner credentials required (staging). */
1075
+ /** Replace all watchers; an empty list clears them. Owner credentials required. */
1084
1076
  async setWatchers(documentId, watcherIds) {
1085
1077
  const id = this.requireId(documentId, "Document ID");
1086
1078
  if (!Array.isArray(watcherIds) || new Set(watcherIds).size > 10 || watcherIds.some((value) => typeof value !== "string" || !value.trim())) {
@@ -1295,6 +1287,11 @@ var DocumentResource = class extends BaseResource {
1295
1287
  const id = this.requireId(documentId, "Document ID");
1296
1288
  return this.call("Failed to delete document", () => this.http.delete(`/documents/${id}`));
1297
1289
  }
1290
+ /** Cancel an open document while retaining its files and history. */
1291
+ async cancel(documentId) {
1292
+ const id = this.requireId(documentId, "Document ID");
1293
+ return this.call("Failed to cancel document", () => this.http.put(`/documents/${id}/cancel`));
1294
+ }
1298
1295
  /** List the tags attached to a document. */
1299
1296
  async listTags(documentId, accountId) {
1300
1297
  const accId = this.accountId(accountId);
@@ -1621,7 +1618,7 @@ function validateOrigin(value) {
1621
1618
 
1622
1619
  // src/api/resources/envelopes.ts
1623
1620
  var EnvelopeResource = class extends BaseResource {
1624
- /** Schedule one envelope request; idempotency headers are not supported here (staging). */
1621
+ /** Schedule one envelope request; idempotency headers are not supported here. */
1625
1622
  async schedule(payload, accountId) {
1626
1623
  const id = this.accountId(accountId);
1627
1624
  validateCreate(payload);
@@ -1631,7 +1628,7 @@ var EnvelopeResource = class extends BaseResource {
1631
1628
  () => this.http.post(`/accounts/${id}/scheduled-sends`, payload)
1632
1629
  );
1633
1630
  }
1634
- /** Estimate one reminder for the whole envelope without sending or charging (staging). */
1631
+ /** Estimate one reminder for the whole envelope without sending or charging. */
1635
1632
  async estimateResendCost(envelopeId, signerId, accountId) {
1636
1633
  const id = this.accountId(accountId);
1637
1634
  const eid = this.requireId(envelopeId, "Envelope ID");