@assinafy/cli 2.5.2 → 2.5.3
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.cjs +26 -12
- package/dist/api.cjs.map +1 -1
- package/dist/api.js +26 -12
- package/dist/api.js.map +1 -1
- package/dist/cli.cjs +29 -15
- package/dist/types/api/resources/signer-documents.d.ts +16 -7
- package/dist/types/api/resources/signer-documents.d.ts.map +1 -1
- package/docs/sdk-reference.md +5 -3
- package/package.json +1 -1
package/dist/api.cjs
CHANGED
|
@@ -1508,32 +1508,46 @@ var SignerDocumentsResource = class extends BaseResource {
|
|
|
1508
1508
|
() => this.http.get(`/signers/${sid}/document`, signerAccessConfig(code))
|
|
1509
1509
|
);
|
|
1510
1510
|
}
|
|
1511
|
+
/** `GET /signers/{signer_id}/documents?signer-access-code=…` */
|
|
1512
|
+
async list(signerId, signerAccessCode, params = {}) {
|
|
1513
|
+
const code = this.requireId(signerAccessCode, "signer-access-code");
|
|
1514
|
+
return this.listDocuments(signerId, signerAccessConfig(code, { ...params }));
|
|
1515
|
+
}
|
|
1511
1516
|
/**
|
|
1512
|
-
* `GET /signers/{signer_id}/documents`
|
|
1513
|
-
*
|
|
1514
|
-
*
|
|
1517
|
+
* `GET /signers/{signer_id}/documents` with the client's owner credentials
|
|
1518
|
+
* (API key or token) instead of a signer access code. The signer must belong
|
|
1519
|
+
* to that workspace.
|
|
1515
1520
|
*/
|
|
1516
|
-
async
|
|
1521
|
+
async listAsOwner(signerId, params = {}) {
|
|
1522
|
+
return this.listDocuments(signerId, { params: cleanParams({ ...params }) });
|
|
1523
|
+
}
|
|
1524
|
+
/** `GET /signers/{signer_id}/documents/search?search=…&signer-access-code=…` */
|
|
1525
|
+
async search(signerId, search, signerAccessCode) {
|
|
1526
|
+
const code = this.requireId(signerAccessCode, "signer-access-code");
|
|
1527
|
+
return this.searchDocuments(signerId, signerAccessConfig(code, { search }));
|
|
1528
|
+
}
|
|
1529
|
+
/**
|
|
1530
|
+
* `GET /signers/{signer_id}/documents/search?search=…` with the client's owner
|
|
1531
|
+
* credentials instead of a signer access code. The signer must belong to that
|
|
1532
|
+
* workspace.
|
|
1533
|
+
*/
|
|
1534
|
+
async searchAsOwner(signerId, search) {
|
|
1535
|
+
return this.searchDocuments(signerId, { params: cleanParams({ search }) });
|
|
1536
|
+
}
|
|
1537
|
+
listDocuments(signerId, config) {
|
|
1517
1538
|
const sid = this.requireId(signerId, "Signer ID");
|
|
1518
|
-
const config = this.signerOrOwnerConfig(signerAccessCode, { ...params });
|
|
1519
1539
|
return this.callList(
|
|
1520
1540
|
"Failed to list signer documents",
|
|
1521
1541
|
() => this.http.get(`/signers/${sid}/documents`, config)
|
|
1522
1542
|
);
|
|
1523
1543
|
}
|
|
1524
|
-
|
|
1525
|
-
async search(signerId, search, signerAccessCode) {
|
|
1544
|
+
searchDocuments(signerId, config) {
|
|
1526
1545
|
const sid = this.requireId(signerId, "Signer ID");
|
|
1527
|
-
const config = this.signerOrOwnerConfig(signerAccessCode, { search });
|
|
1528
1546
|
return this.callList(
|
|
1529
1547
|
"Failed to search signer documents",
|
|
1530
1548
|
() => this.http.get(`/signers/${sid}/documents/search`, config)
|
|
1531
1549
|
);
|
|
1532
1550
|
}
|
|
1533
|
-
signerOrOwnerConfig(signerAccessCode, params) {
|
|
1534
|
-
if (signerAccessCode === void 0) return { params: cleanParams(params) };
|
|
1535
|
-
return signerAccessConfig(this.requireId(signerAccessCode, "signer-access-code"), params);
|
|
1536
|
-
}
|
|
1537
1551
|
/**
|
|
1538
1552
|
* Public `GET /signers/{signer_id}/documents/{document_id}/download/{artifact}`.
|
|
1539
1553
|
* When an access code is supplied, the SDK first verifies that it belongs to
|