@pageproof/sdk-pr 604.0.1765226823517 → 606.0.1757017085927
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/CHANGELOG.md +0 -48
- package/lib/adapters/AngularEnhancementAdapter.d.ts +20 -6
- package/lib/adapters/ICryptoAdapter.d.ts +0 -21
- package/lib/adapters/ICryptoAdapter.js +1 -1
- package/lib/adapters/IEnhancementAdapter.d.ts +1 -1
- package/lib/adapters/IndexedDBCacheAdapter.d.ts +13 -3
- package/lib/adapters/NodeRequestAdapter.d.ts +8 -2
- package/lib/adapters/SchedulerCryptoAdapter.d.ts +116 -0
- package/lib/adapters/SchedulerCryptoAdapter.js +1 -1
- package/lib/adapters/SyncCryptoAdapter.d.ts +101 -0
- package/lib/adapters/SyncCryptoAdapter.js +1 -1
- package/lib/adapters/WorkerCryptoAdapter.d.ts +4 -4
- package/lib/adapters/WorkerThreadsCryptoAdapter.d.ts +3 -3
- package/lib/adapters/XHRRequestAdapter.d.ts +6 -2
- package/lib/angular-enhancement-adapter.js +1 -1
- package/lib/api/API.d.ts +2 -2
- package/lib/api/Accounts.d.ts +4 -21
- package/lib/api/Accounts.js +1 -1
- package/lib/api/AccountsMFA.d.ts +1 -1
- package/lib/api/AccountsSSO.d.ts +5 -50
- package/lib/api/AccountsSSO.js +1 -1
- package/lib/api/Briefs.d.ts +4 -5
- package/lib/api/Briefs.js +1 -1
- package/lib/api/ChecklistTemplates.d.ts +4 -4
- package/lib/api/ChecklistTemplatesEntities.d.ts +2 -2
- package/lib/api/Comments.d.ts +17 -18
- package/lib/api/Comments.js +1 -1
- package/lib/api/CommentsImport.d.ts +10 -7
- package/lib/api/Dashboard.d.ts +13 -13
- package/lib/api/DashboardGroups.d.ts +4 -4
- package/lib/api/Encryption.d.ts +2 -2
- package/lib/api/Files.d.ts +52 -27
- package/lib/api/FreeTrial.d.ts +2 -2
- package/lib/api/GroupsOwners.d.ts +2 -2
- package/lib/api/GroupsWorkflows.d.ts +2 -2
- package/lib/api/Integrations.d.ts +4 -4
- package/lib/api/Live.d.ts +1 -1
- package/lib/api/Preferences.d.ts +5 -5
- package/lib/api/Printing.d.ts +2 -2
- package/lib/api/Profile.d.ts +2 -2
- package/lib/api/Proofs.d.ts +20 -17
- package/lib/api/Proofs.js +1 -1
- package/lib/api/ProofsAssets.d.ts +1 -1
- package/lib/api/ProofsAssetsColorSeparations.d.ts +3 -3
- package/lib/api/ProofsAssetsExtractedText.d.ts +3 -3
- package/lib/api/ProofsAudit.d.ts +1 -1
- package/lib/api/ProofsCustomTools.d.ts +1 -1
- package/lib/api/ProofsDecisions.d.ts +4 -4
- package/lib/api/ProofsEditors.d.ts +6 -6
- package/lib/api/ProofsGroups.d.ts +3 -3
- package/lib/api/ProofsIntegrationReferences.d.ts +4 -4
- package/lib/api/ProofsLinkCheck.d.ts +1 -1
- package/lib/api/ProofsOwners.d.ts +3 -3
- package/lib/api/ProofsReviewers.d.ts +2 -2
- package/lib/api/ProofsVersions.d.ts +2 -2
- package/lib/api/Reminders.d.ts +4 -4
- package/lib/api/Reports.d.ts +2 -2
- package/lib/api/Sessions.d.ts +1 -1
- package/lib/api/Teams.d.ts +1 -1
- package/lib/api/TeamsInvitations.d.ts +1 -1
- package/lib/api/Users.d.ts +1 -10
- package/lib/api/Users.js +1 -1
- package/lib/api/Workflows.d.ts +30 -186
- package/lib/api/Workflows.js +1 -1
- package/lib/api/WorkflowsSteps.d.ts +4 -4
- package/lib/api/admin/Admin.d.ts +1 -1
- package/lib/api/admin/Team.d.ts +1 -1
- package/lib/api/admin/TeamCustomTools.d.ts +1 -1
- package/lib/api/admin/TeamDashboard.d.ts +6 -6
- package/lib/api/admin/TeamDashboardGroups.d.ts +4 -4
- package/lib/api/admin/TeamFeatures.d.ts +5 -14
- package/lib/api/admin/TeamFeatures.js +2 -18
- package/lib/api/admin/TeamNotifications.d.ts +1 -1
- package/lib/api/admin/TeamPreferences.d.ts +1 -1
- package/lib/api/admin/TeamSCIM.d.ts +1 -1
- package/lib/api/admin/TeamUsers.d.ts +7 -7
- package/lib/api/admin/TeamWorkflows.d.ts +3 -3
- package/lib/api/brian/Brian.d.ts +1 -1
- package/lib/bluffer/Uint8ArrayBluffer.d.ts +1 -1
- package/lib/core/AdapterRepository.d.ts +3 -3
- package/lib/core/Cache.d.ts +2 -2
- package/lib/core/KeyPairs.d.ts +2 -2
- package/lib/core/PageProof.d.ts +45 -21
- package/lib/core/PageProof.js +1 -1
- package/lib/crypto/encryptComment.d.ts +1 -1
- package/lib/crypto/encryptFileBlock.js +1 -1
- package/lib/crypto/envelopes.d.ts +1 -1
- package/lib/crypto/index.d.ts +1 -4
- package/lib/crypto/index.js +1 -1
- package/lib/events/EventEmitter.d.ts +1 -1
- package/lib/indexeddb-cache-adapter.js +1 -1
- package/lib/models/Comment.d.ts +4 -4
- package/lib/models/DecisionSummary.d.ts +2 -2
- package/lib/models/File.d.ts +5 -5
- package/lib/models/Preference.d.ts +1 -1
- package/lib/models/Proof.d.ts +11 -19
- package/lib/models/Proof.js +1 -1
- package/lib/models/ProofChecklist.d.ts +1 -1
- package/lib/models/ProofGroup.d.ts +1 -1
- package/lib/models/ProofIntegrationReference.d.ts +1 -1
- package/lib/models/ProofVersion.d.ts +1 -1
- package/lib/models/Reminder.d.ts +3 -3
- package/lib/models/ReportConfiguration.d.ts +1 -1
- package/lib/models/ReportField.d.ts +1 -1
- package/lib/models/Session.d.ts +9 -5
- package/lib/models/TeamAccountFeatures.d.ts +1 -1
- package/lib/models/TeamAddressBookFeatures.d.ts +1 -1
- package/lib/models/TeamCommentFeatures.d.ts +2 -2
- package/lib/models/TeamEmailFeatures.d.ts +1 -1
- package/lib/models/TeamFeatures.d.ts +1 -7
- package/lib/models/TeamFeatures.js +1 -1
- package/lib/models/TeamIntelligenceFeatures.d.ts +1 -1
- package/lib/models/TeamInvitation.d.ts +1 -1
- package/lib/models/TeamNotifications.d.ts +1 -1
- package/lib/models/TeamProofFeatures.d.ts +1 -25
- package/lib/models/TeamProofFeatures.js +1 -1
- package/lib/models/TeamUserGroupsFeatures.d.ts +1 -1
- package/lib/models/TeamWebhookFeatures.d.ts +1 -1
- package/lib/models/TeamWorkflowFeatures.d.ts +1 -1
- package/lib/models/User.d.ts +3 -3
- package/lib/models/Workflow.d.ts +3 -3
- package/lib/models/WorkflowStep.d.ts +3 -7
- package/lib/models/WorkflowUser.d.ts +7 -14
- package/lib/network/Request.d.ts +1 -1
- package/lib/network/Response.d.ts +8 -39
- package/lib/network/Response.js +1 -1
- package/lib/network/endpoints.json +3 -33
- package/lib/pageproof.js +1 -1
- package/lib/protobuf-adapter.js +1 -1
- package/lib/sync-crypto-adapter.js +1 -1
- package/lib/types/Comment.d.ts +6 -6
- package/lib/types/CommentImport.d.ts +3 -3
- package/lib/types/CommentTokenDefinition.d.ts +1 -1
- package/lib/types/DecisionOptions.d.ts +2 -2
- package/lib/types/Endpoint.d.ts +2 -2
- package/lib/types/FileV2.d.ts +3 -3
- package/lib/types/NudgedWorkflow.d.ts +1 -1
- package/lib/types/NudgedWorkflowsResult.d.ts +2 -2
- package/lib/types/Pin.d.ts +5 -5
- package/lib/types/PrintingJobOptions.d.ts +1 -1
- package/lib/types/PrintingOption.d.ts +2 -2
- package/lib/types/ReturnProofsResult.d.ts +2 -2
- package/lib/types/TeamDashboardPagination.d.ts +1 -1
- package/lib/types/TeamSenderEmail.d.ts +1 -1
- package/lib/types/WorkflowMetrics.d.ts +2 -2
- package/lib/types/WorkflowStepDefinition.d.ts +2 -2
- package/lib/types/WorkflowUserDefinition.d.ts +4 -1
- package/lib/util/Scheduler.d.ts +5 -5
- package/lib/util/comments/extractMentions.d.ts +1 -1
- package/lib/util/comments/v1-to-v2.d.ts +0 -1
- package/lib/util/comments/v1-to-v2.js +0 -1
- package/lib/util/creationToken.d.ts +0 -1
- package/lib/util/creationToken.js +1 -1
- package/lib/util/errorMessages.d.ts +1 -9
- package/lib/util/errorMessages.js +1 -1
- package/lib/util/exports.js +1 -1
- package/lib/util/pins/parsePins.d.ts +0 -1
- package/lib/util/pins/parsePins.js +1 -9
- package/lib/util/pins/serializePins.d.ts +0 -1
- package/lib/util/pins/serializePins.js +1 -4
- package/lib/worker-crypto-adapter.js +1 -1
- package/lib/{worker.c898e379.js → worker.959d0daf.js} +2 -2
- package/lib/xhr-request-adapter.js +1 -1
- package/package.json +19 -19
- package/lib/crypto/authServerEncryption.d.ts +0 -21
- package/lib/crypto/authServerEncryption.js +0 -1
- package/lib/models/TeamGeneralFeatures.d.ts +0 -11
- package/lib/models/TeamGeneralFeatures.js +0 -1
- package/lib/types/IsolatedLoginStatusResult.d.ts +0 -22
- package/lib/types/IsolatedLoginStatusResult.js +0 -1
- package/lib/util/isolatedAuthCert.d.ts +0 -2
- package/lib/util/isolatedAuthCert.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,51 +1,3 @@
|
|
|
1
|
-
## 2.10.0
|
|
2
|
-
|
|
3
|
-
Released on the 9th of December 2025.
|
|
4
|
-
|
|
5
|
-
- Added support for digital signing, including team settings for licensing, enabling, and setting default signing preferences, as well as re-authentication options.
|
|
6
|
-
|
|
7
|
-
## 2.9.0
|
|
8
|
-
|
|
9
|
-
Released on the 1st of December 2025.
|
|
10
|
-
|
|
11
|
-
- [[PP-9177](https://pageproof.atlassian.net/browse/PP-9177)] Added support for team admin granular controls, allowing users to request specific role access permissions.
|
|
12
|
-
|
|
13
|
-
## 2.8.1
|
|
14
|
-
|
|
15
|
-
Released on the 21st of November 2025.
|
|
16
|
-
|
|
17
|
-
- [[PP-9287](https://pageproof.atlassian.net/browse/PP-9287)] Bug fixes for scheduled proofs feature.
|
|
18
|
-
|
|
19
|
-
## 2.8.0
|
|
20
|
-
|
|
21
|
-
Released on the 19th of November 2025.
|
|
22
|
-
|
|
23
|
-
- [[PP-9243](https://pageproof.atlassian.net/browse/PP-9243)] Updated core dependencies to the latest versions to improve stability, security, and performance.
|
|
24
|
-
|
|
25
|
-
## 2.7.0
|
|
26
|
-
|
|
27
|
-
Released on the 11th of November 2025.
|
|
28
|
-
|
|
29
|
-
- [[PP-9168](https://pageproof.atlassian.net/browse/PP-9168)] Extended workflow user management capabilities to support adding multiple approvers and adding users to specific workflow steps with role-based permissions.
|
|
30
|
-
|
|
31
|
-
## 2.6.0
|
|
32
|
-
|
|
33
|
-
Released on the 16th of October 2025.
|
|
34
|
-
|
|
35
|
-
- [[PP-4742](https://pageproof.atlassian.net/browse/PP-4742)] Added support for scheduled proofs. Proofs and briefs can now be scheduled for future delivery by setting a `scheduledDate` when creating or updating them.
|
|
36
|
-
|
|
37
|
-
## 2.5.1
|
|
38
|
-
|
|
39
|
-
Released on the 13th of October 2025.
|
|
40
|
-
|
|
41
|
-
- [[PP-7200](https://pageproof.atlassian.net/browse/PP-7200)] Add support for team celebrations feature.
|
|
42
|
-
|
|
43
|
-
## 2.5.0
|
|
44
|
-
|
|
45
|
-
Released on the 12th of September 2025.
|
|
46
|
-
|
|
47
|
-
- [[PP-8750](https://pageproof.atlassian.net/browse/PP-8750)] Support device flow for SSO logins for third party apps.
|
|
48
|
-
|
|
49
1
|
## 2.4.1
|
|
50
2
|
|
|
51
3
|
Released on the 14th of August 2025.
|
|
@@ -49,15 +49,29 @@ declare class AngularEnhancementAdapter extends IEnhancementAdapter {
|
|
|
49
49
|
* @param {object} [options.$scope] The $scope to re-digest
|
|
50
50
|
*/
|
|
51
51
|
constructor(options: {
|
|
52
|
-
module
|
|
53
|
-
$exceptionHandler
|
|
54
|
-
$scope
|
|
52
|
+
module?: any;
|
|
53
|
+
$exceptionHandler?: Function;
|
|
54
|
+
$scope?: any;
|
|
55
55
|
});
|
|
56
56
|
/** @private */
|
|
57
|
-
|
|
57
|
+
options: {
|
|
58
|
+
module: any;
|
|
59
|
+
$exceptionHandler: any;
|
|
60
|
+
$scope: any;
|
|
61
|
+
};
|
|
62
|
+
/** @private */
|
|
63
|
+
$scope: any;
|
|
64
|
+
/** @private */
|
|
65
|
+
$exceptionHandler: any;
|
|
66
|
+
/** @private */
|
|
67
|
+
onMethodFinally(): void;
|
|
58
68
|
/** @private */
|
|
59
|
-
|
|
69
|
+
onMethodReject({ rejected }: {
|
|
70
|
+
rejected: any;
|
|
71
|
+
}): void;
|
|
60
72
|
/** @private */
|
|
61
|
-
|
|
73
|
+
onMethodThrown({ error }: {
|
|
74
|
+
error: any;
|
|
75
|
+
}): void;
|
|
62
76
|
}
|
|
63
77
|
import IEnhancementAdapter from "./IEnhancementAdapter";
|
|
@@ -139,25 +139,4 @@ declare class ICryptoAdapter {
|
|
|
139
139
|
* @returns {Promise<string>} The encrypted block, base64 encoded
|
|
140
140
|
*/
|
|
141
141
|
encryptCommentImportFile(): Promise<string>;
|
|
142
|
-
/**
|
|
143
|
-
* @abstract
|
|
144
|
-
* @param {string} sessionToken The session token to encrypt
|
|
145
|
-
* @param {Object} nonce The nonce object containing key and IV
|
|
146
|
-
* @returns {Promise<string>} The encrypted session token (base64 encoded)
|
|
147
|
-
*/
|
|
148
|
-
encryptSessionToken(): Promise<string>;
|
|
149
|
-
/**
|
|
150
|
-
* @abstract
|
|
151
|
-
* @param {string} encryptedToken The encrypted session token (base64 encoded)
|
|
152
|
-
* @param {string} privateKeyPEM The private key PEM string
|
|
153
|
-
* @returns {Promise<string>} The decrypted session token
|
|
154
|
-
*/
|
|
155
|
-
decryptSessionToken(): Promise<string>;
|
|
156
|
-
/**
|
|
157
|
-
* @abstract
|
|
158
|
-
* @param {Object} encryptedData The encrypted session data (hybrid payload object)
|
|
159
|
-
* @param {string} privateKeyPEM The private key PEM string
|
|
160
|
-
* @returns {Promise<string>} The decrypted session data
|
|
161
|
-
*/
|
|
162
|
-
decryptSessionData(): Promise<string>;
|
|
163
142
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.__esModule=true;var _class,_temp;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function notImplementedStub(name){return new Error(name+" is not implemented on ICryptoAdapter.")}var ICryptoAdapter=(_temp=_class=function(){function ICryptoAdapter(){_classCallCheck(this,ICryptoAdapter)}ICryptoAdapter.prototype.decryptBytes=function decryptBytes(){throw notImplementedStub("decryptBytes(comment$: string, envelope$: string, privateKeyPEMs: string[], before: string[], after: string[]): Promise<string>")};ICryptoAdapter.prototype.decryptComment=function decryptComment(){throw notImplementedStub("decryptComment(comment$: string, envelope: string, privateKeyPEMs: string[]): Promise<string>")};ICryptoAdapter.prototype.decryptData=function decryptData(){throw notImplementedStub("decryptData(version: number, data$: string, envelope$: string, privateKeyPEMs: string[]): Promise<string>")};ICryptoAdapter.prototype.decryptFileBlock=function decryptFileBlock(){throw notImplementedStub("decryptFileBlock(data$: string, privateKeyPEMs: string[]): Promise<string>")};ICryptoAdapter.prototype.decryptImage=function decryptImage(){throw notImplementedStub("decryptImage(data$: string, privateKeyPEMs: string[]): Promise<string>")};ICryptoAdapter.prototype.decryptPrivateKey=function decryptPrivateKey(){throw notImplementedStub("decryptPrivateKey(privateKey$: string, password: string): Promise<string>")};ICryptoAdapter.prototype.encryptFileBlock=function encryptFileBlock(){throw notImplementedStub("encryptFileBlock(keyIV: {key: string, iv: string}, fileBlockBase64: string): Promise<string>")};ICryptoAdapter.prototype.encryptPrivateKey=function encryptPrivateKey(){throw notImplementedStub("encryptPrivateKey(privateKeyPEM: string, password: string): Promise<string>")};ICryptoAdapter.prototype.envelopeSeal=function envelopeSeal(){throw notImplementedStub("envelopeSeal(secret: string, publicKeyPEMs: Array<string>): Promise<string>")};ICryptoAdapter.prototype.envelopeUnseal=function envelopeUnseal(){throw notImplementedStub("envelopeUnseal(envelope: string, privateKeyPEMs: string[]): Promise<string>")};ICryptoAdapter.prototype.generateAuthorizationHeaders=function generateAuthorizationHeaders(){throw notImplementedStub("generateAuthorizationHeaders(method: string, path: string, session: Session): Promise<Object<string, string>>")};ICryptoAdapter.prototype.generateKeyIV=function generateKeyIV(){throw notImplementedStub("generateKeyIV(): Promise<{KeyIV}>")};ICryptoAdapter.prototype.generateKeyPair=function generateKeyPair(){throw notImplementedStub("generateKeyPair(): Promise<{KeyPair}>")};ICryptoAdapter.prototype.generatePasswordHash=function generatePasswordHash(){throw notImplementedStub("generatePasswordHash(password: string): Promise<string>")};ICryptoAdapter.prototype.generateWrappedSymmetricKey=function generateWrappedSymmetricKey(){throw notImplementedStub("generateWrappedSymmetricKey(serverPublicKeyPEM: string): Promise<WrappedSymmetricKey>")};ICryptoAdapter.prototype.decryptManagedPrivateKey=function decryptManagedPrivateKey(){throw notImplementedStub("decryptManagedPrivateKey(privateKey$: string, keyBase64: string): Promise<string>")};ICryptoAdapter.prototype.encryptComment=function encryptComment(){throw notImplementedStub("encryptComment(comment: string, publicKeyPEMs: Array<string>): Promise<EncryptedComment>")};ICryptoAdapter.prototype.generateCommentImportKey=function generateCommentImportKey(){throw notImplementedStub("generateCommentImportKey(serverPublicKeyPEM: string): Promise<{ key: string, key$: string }>")};ICryptoAdapter.prototype.encryptCommentImportFile=function encryptCommentImportFile(){throw notImplementedStub("encryptCommentImportFile(key: string, fileBase64: string): Promise<string>")};
|
|
1
|
+
"use strict";exports.__esModule=true;var _class,_temp;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function notImplementedStub(name){return new Error(name+" is not implemented on ICryptoAdapter.")}var ICryptoAdapter=(_temp=_class=function(){function ICryptoAdapter(){_classCallCheck(this,ICryptoAdapter)}ICryptoAdapter.prototype.decryptBytes=function decryptBytes(){throw notImplementedStub("decryptBytes(comment$: string, envelope$: string, privateKeyPEMs: string[], before: string[], after: string[]): Promise<string>")};ICryptoAdapter.prototype.decryptComment=function decryptComment(){throw notImplementedStub("decryptComment(comment$: string, envelope: string, privateKeyPEMs: string[]): Promise<string>")};ICryptoAdapter.prototype.decryptData=function decryptData(){throw notImplementedStub("decryptData(version: number, data$: string, envelope$: string, privateKeyPEMs: string[]): Promise<string>")};ICryptoAdapter.prototype.decryptFileBlock=function decryptFileBlock(){throw notImplementedStub("decryptFileBlock(data$: string, privateKeyPEMs: string[]): Promise<string>")};ICryptoAdapter.prototype.decryptImage=function decryptImage(){throw notImplementedStub("decryptImage(data$: string, privateKeyPEMs: string[]): Promise<string>")};ICryptoAdapter.prototype.decryptPrivateKey=function decryptPrivateKey(){throw notImplementedStub("decryptPrivateKey(privateKey$: string, password: string): Promise<string>")};ICryptoAdapter.prototype.encryptFileBlock=function encryptFileBlock(){throw notImplementedStub("encryptFileBlock(keyIV: {key: string, iv: string}, fileBlockBase64: string): Promise<string>")};ICryptoAdapter.prototype.encryptPrivateKey=function encryptPrivateKey(){throw notImplementedStub("encryptPrivateKey(privateKeyPEM: string, password: string): Promise<string>")};ICryptoAdapter.prototype.envelopeSeal=function envelopeSeal(){throw notImplementedStub("envelopeSeal(secret: string, publicKeyPEMs: Array<string>): Promise<string>")};ICryptoAdapter.prototype.envelopeUnseal=function envelopeUnseal(){throw notImplementedStub("envelopeUnseal(envelope: string, privateKeyPEMs: string[]): Promise<string>")};ICryptoAdapter.prototype.generateAuthorizationHeaders=function generateAuthorizationHeaders(){throw notImplementedStub("generateAuthorizationHeaders(method: string, path: string, session: Session): Promise<Object<string, string>>")};ICryptoAdapter.prototype.generateKeyIV=function generateKeyIV(){throw notImplementedStub("generateKeyIV(): Promise<{KeyIV}>")};ICryptoAdapter.prototype.generateKeyPair=function generateKeyPair(){throw notImplementedStub("generateKeyPair(): Promise<{KeyPair}>")};ICryptoAdapter.prototype.generatePasswordHash=function generatePasswordHash(){throw notImplementedStub("generatePasswordHash(password: string): Promise<string>")};ICryptoAdapter.prototype.generateWrappedSymmetricKey=function generateWrappedSymmetricKey(){throw notImplementedStub("generateWrappedSymmetricKey(serverPublicKeyPEM: string): Promise<WrappedSymmetricKey>")};ICryptoAdapter.prototype.decryptManagedPrivateKey=function decryptManagedPrivateKey(){throw notImplementedStub("decryptManagedPrivateKey(privateKey$: string, keyBase64: string): Promise<string>")};ICryptoAdapter.prototype.encryptComment=function encryptComment(){throw notImplementedStub("encryptComment(comment: string, publicKeyPEMs: Array<string>): Promise<EncryptedComment>")};ICryptoAdapter.prototype.generateCommentImportKey=function generateCommentImportKey(){throw notImplementedStub("generateCommentImportKey(serverPublicKeyPEM: string): Promise<{ key: string, key$: string }>")};ICryptoAdapter.prototype.encryptCommentImportFile=function encryptCommentImportFile(){throw notImplementedStub("encryptCommentImportFile(key: string, fileBase64: string): Promise<string>")};return ICryptoAdapter}(),_class.__adapter__="ICryptoAdapter",_temp);exports.default=ICryptoAdapter;
|
|
@@ -30,12 +30,22 @@ declare class IndexedDBCacheAdapter extends ICacheAdapter {
|
|
|
30
30
|
* @param {string} [options.database] The name of the IndexedDB database
|
|
31
31
|
*/
|
|
32
32
|
constructor(options?: {
|
|
33
|
-
database
|
|
33
|
+
database?: string;
|
|
34
34
|
});
|
|
35
35
|
/** @private */
|
|
36
|
-
|
|
36
|
+
options: {
|
|
37
|
+
database: string;
|
|
38
|
+
};
|
|
39
|
+
/** @private */
|
|
40
|
+
cache: any;
|
|
41
|
+
/** @private */
|
|
42
|
+
set(key: any, value: any): any;
|
|
43
|
+
/** @private */
|
|
44
|
+
has(key: any): any;
|
|
45
|
+
/** @private */
|
|
46
|
+
get(key: any): any;
|
|
37
47
|
/** @private */
|
|
38
|
-
|
|
48
|
+
clear(): any;
|
|
39
49
|
/**
|
|
40
50
|
* Purges any expired entries from the cache.
|
|
41
51
|
*
|
|
@@ -33,9 +33,15 @@ declare class NodeRequestAdapter extends IRequestAdapter {
|
|
|
33
33
|
* @param {string|boolean} [options.proxy] The proxy URL to send all requests through. This option is only required if you want to manually override the system level proxy settings. Setting this option to `false` will disable all proxy settings. Omitting the setting (which is set to `true` by default) will attempt to proxy requests using the system level proxy settings.
|
|
34
34
|
*/
|
|
35
35
|
constructor(options?: {
|
|
36
|
-
proxy
|
|
36
|
+
proxy?: string | boolean;
|
|
37
37
|
});
|
|
38
38
|
/** @private */
|
|
39
|
-
|
|
39
|
+
options: {
|
|
40
|
+
proxy: string | boolean;
|
|
41
|
+
};
|
|
42
|
+
/** @private */
|
|
43
|
+
send(request: any, options?: {}, state?: {
|
|
44
|
+
attempt: number;
|
|
45
|
+
}): Promise<any>;
|
|
40
46
|
}
|
|
41
47
|
import IRequestAdapter from "./IRequestAdapter";
|
|
@@ -2,6 +2,122 @@ export default SchedulerCryptoAdapter;
|
|
|
2
2
|
declare class SchedulerCryptoAdapter extends ICryptoAdapter {
|
|
3
3
|
constructor(options: any);
|
|
4
4
|
scheduler: Scheduler;
|
|
5
|
+
/**
|
|
6
|
+
* @param {string} data$ The encrypted (and encoded) data
|
|
7
|
+
* @param {string} envelope$ The envelope containing the key
|
|
8
|
+
* @param {string[]} privateKeyPEMs The user's private keys used to decrypt the envelope
|
|
9
|
+
* @param {string[]} before Any pre-processing to do on the encrypted data
|
|
10
|
+
* @param {string[]} after Any post-processing to do on the newly-decrypted data
|
|
11
|
+
* @returns {Promise<string>} The decrypted (and encoded) data
|
|
12
|
+
*/
|
|
13
|
+
decryptBytes(comment$: any, envelope$: string, privateKeyPEMs: string[], before: string[], after: string[]): Promise<string>;
|
|
14
|
+
/**
|
|
15
|
+
* @param {string} comment$ The encrypted comment
|
|
16
|
+
* @param {string} envelope The comment envelope containing the key
|
|
17
|
+
* @param {string[]} privateKeyPEMs The user's private keys used to decrypt the envelope
|
|
18
|
+
* @returns {Promise<string>} The original, raw comment text
|
|
19
|
+
*/
|
|
20
|
+
decryptComment(comment$: string, envelope: string, privateKeyPEMs: string[]): Promise<string>;
|
|
21
|
+
/**
|
|
22
|
+
* @abstract
|
|
23
|
+
* @param {number} version The encryption version number
|
|
24
|
+
* @param {string} data$ The encrypted data
|
|
25
|
+
* @param {string} envelope$ The envelope to use for decrypting the data
|
|
26
|
+
* @param {string[]} privateKeyPEMs The user's private keys (in PEM format)
|
|
27
|
+
* @returns {Promise<string>} The decrypted data
|
|
28
|
+
*/
|
|
29
|
+
decryptData(version: number, data$: string, envelope$: string, privateKeyPEMs: string[]): Promise<string>;
|
|
30
|
+
/**
|
|
31
|
+
* @param {string} data$ The encrypted file block (and envelope)
|
|
32
|
+
* @param {string[]} privateKeyPEMs The user's private keys used to decrypt the embedded envelope
|
|
33
|
+
* @returns {Promise<string>} A base64 representation of the original block
|
|
34
|
+
*/
|
|
35
|
+
decryptFileBlock(data$: string, privateKeyPEMs: string[]): Promise<string>;
|
|
36
|
+
/**
|
|
37
|
+
* @param {string} data$ The encrypted image (and envelope)
|
|
38
|
+
* @param {string[]} privateKeyPEMs The user's private keys used to decrypt the embedded envelope
|
|
39
|
+
* @returns {Promise<string>} A base64 representation of the original image
|
|
40
|
+
*/
|
|
41
|
+
decryptImage(data$: string, privateKeyPEMs: string[]): Promise<string>;
|
|
42
|
+
/**
|
|
43
|
+
* @param {string} privateKey$ The user's encrypted private key
|
|
44
|
+
* @param {string} password The user's original password, used to decrypt the private key
|
|
45
|
+
* @returns {Promise<string>} The user's private key (in PEM format)
|
|
46
|
+
*/
|
|
47
|
+
decryptPrivateKey(privateKey$: string, password: string): Promise<string>;
|
|
48
|
+
/**
|
|
49
|
+
* @param {{key: string, iv: string}} keyIV The key & iv to encrypt the block with
|
|
50
|
+
* @param {string} fileBlock The file block
|
|
51
|
+
* @param {boolean} decodeBlock Whether the `fileBlock` should be decoded before encrypting
|
|
52
|
+
* @returns {Promise<string>} The encrypted block, base64 encoded
|
|
53
|
+
*/
|
|
54
|
+
encryptFileBlock(keyIV: {
|
|
55
|
+
key: string;
|
|
56
|
+
iv: string;
|
|
57
|
+
}, fileBlock: string, decodeBlock: boolean): Promise<string>;
|
|
58
|
+
/**
|
|
59
|
+
* @param {string} privateKeyPEM The user's private key (in PEM format)
|
|
60
|
+
* @param {string} password The user's original password, used to encrypt the private key
|
|
61
|
+
* @returns {Promise<string>} The user's encrypted private key
|
|
62
|
+
*/
|
|
63
|
+
encryptPrivateKey(privateKeyPEM: string, password: string): Promise<string>;
|
|
64
|
+
/**
|
|
65
|
+
* @param {string} secret The secret to seal within an envelope
|
|
66
|
+
* @param {Array<string>} publicKeyPEMs The list of public keys to encrypt the envelope for
|
|
67
|
+
* @returns {Promise<string>} The full envelope
|
|
68
|
+
*/
|
|
69
|
+
envelopeSeal(secret: string, publicKeyPEMs: string[]): Promise<string>;
|
|
70
|
+
/**
|
|
71
|
+
* @param {string} envelope The full envelope to unseal
|
|
72
|
+
* @param {string[]} privateKeyPEMs The user's private keys (in PEM format), used to decrypt the envelope
|
|
73
|
+
* @returns {Promise<string>} The secret within the envelope
|
|
74
|
+
*/
|
|
75
|
+
envelopeUnseal(envelope: string, privateKeyPEMs: string[]): Promise<string>;
|
|
76
|
+
/**
|
|
77
|
+
* @param {string} method The request method/verb (eg. GET, POST)
|
|
78
|
+
* @param {string} path The endpoint (pathname)
|
|
79
|
+
* @param {Session} session The Session object used to sign the request
|
|
80
|
+
* @returns {Promise<Object<string, string>>} The additional headers to add to the request for it to be signed
|
|
81
|
+
*/
|
|
82
|
+
generateAuthorizationHeaders(method: string, path: string, session: any): Promise<{
|
|
83
|
+
[x: string]: string;
|
|
84
|
+
}>;
|
|
85
|
+
/**
|
|
86
|
+
* @param {string} password The user's original password
|
|
87
|
+
* @returns {Promise<string>} The hashed password
|
|
88
|
+
*/
|
|
89
|
+
generatePasswordHash(password: string): Promise<string>;
|
|
90
|
+
/**
|
|
91
|
+
* @param {string} serverPublicKeyPEM The server's public key (in PEM format)
|
|
92
|
+
* @returns {Promise<WrappedSymmetricKey>} The wrapped symmetric key
|
|
93
|
+
*/
|
|
94
|
+
generateWrappedSymmetricKey(serverPublicKeyPEM: string): Promise<WrappedSymmetricKey>;
|
|
95
|
+
/**
|
|
96
|
+
* @param {string} privateKey$ The encrypted (and base64 encoded) private key
|
|
97
|
+
* @param {string} keyBase64 The key (base64 encoded) for decrypting the private key
|
|
98
|
+
* @returns {Promise<string>} The private pem (in PEM format)
|
|
99
|
+
*/
|
|
100
|
+
decryptManagedPrivateKey(privateKey$: string, keyBase64: string): Promise<string>;
|
|
101
|
+
/**
|
|
102
|
+
* @param {string} comment The raw comment text
|
|
103
|
+
* @param {Array<string>} publicKeyPEMs The public keys of recipients who can decrypt the comment (in PEM format)
|
|
104
|
+
* @returns {Promise<EncryptedComment>} The encrypted comment and envelope
|
|
105
|
+
*/
|
|
106
|
+
encryptComment(comment: string, publicKeyPEMs: string[]): Promise<EncryptedComment>;
|
|
107
|
+
/**
|
|
108
|
+
* @param {string} serverPublicKeyPEM The server's public key (in PEM format)
|
|
109
|
+
* @returns {Promise<{ key: string, key$: string }>}
|
|
110
|
+
*/
|
|
111
|
+
generateCommentImportKey(serverPublicKeyPEM: string): Promise<{
|
|
112
|
+
key: string;
|
|
113
|
+
key$: string;
|
|
114
|
+
}>;
|
|
115
|
+
/**
|
|
116
|
+
* @param {string} key The key (encoded) to encrypt the file with
|
|
117
|
+
* @param {string} fileBase64 The base64 encoded file contents
|
|
118
|
+
* @returns {Promise<string>} The encrypted block, base64 encoded
|
|
119
|
+
*/
|
|
120
|
+
encryptCommentImportFile(key: string, fileBase64: string): Promise<string>;
|
|
5
121
|
}
|
|
6
122
|
import ICryptoAdapter from "./ICryptoAdapter";
|
|
7
123
|
import Scheduler from "../util/Scheduler";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.__esModule=true;var _Scheduler=require("../util/Scheduler");var _Scheduler2=_interopRequireDefault(_Scheduler);var _ICryptoAdapter2=require("./ICryptoAdapter");var _ICryptoAdapter3=_interopRequireDefault(_ICryptoAdapter2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var SchedulerCryptoAdapter=function(_ICryptoAdapter){_inherits(SchedulerCryptoAdapter,_ICryptoAdapter);function SchedulerCryptoAdapter(options){_classCallCheck(this,SchedulerCryptoAdapter);var _this=_possibleConstructorReturn(this,_ICryptoAdapter.call(this));_this.scheduler=new _Scheduler2.default(options);return _this}SchedulerCryptoAdapter.prototype.decryptBytes=function decryptBytes(comment$,envelope$,privateKeyPEMs,before,after){return this.scheduler.send({type:"decryptBytes",args:[comment$,envelope$,privateKeyPEMs,before,after]})};SchedulerCryptoAdapter.prototype.decryptComment=function decryptComment(comment$,envelope,privateKeyPEMs){return this.scheduler.send({type:"decryptComment",args:[comment$,envelope,privateKeyPEMs]})};SchedulerCryptoAdapter.prototype.decryptData=function decryptData(version,data$,envelope$,privateKeyPEMs){return this.scheduler.send({type:"decryptData",args:[version,data$,envelope$,privateKeyPEMs]})};SchedulerCryptoAdapter.prototype.decryptFileBlock=function decryptFileBlock(data$,privateKeyPEMs){return this.scheduler.send({type:"decryptFileBlock",args:[data$,privateKeyPEMs]})};SchedulerCryptoAdapter.prototype.decryptImage=function decryptImage(data$,privateKeyPEMs){return this.scheduler.send({type:"decryptImage",args:[data$,privateKeyPEMs]})};SchedulerCryptoAdapter.prototype.decryptPrivateKey=function decryptPrivateKey(privateKey$,password){return this.scheduler.send({type:"decryptPrivateKey",args:[privateKey$,password]})};SchedulerCryptoAdapter.prototype.encryptFileBlock=function encryptFileBlock(keyIV,fileBlock,decodeBlock){return this.scheduler.send({type:"encryptFileBlock",args:[keyIV,fileBlock,decodeBlock]})};SchedulerCryptoAdapter.prototype.encryptPrivateKey=function encryptPrivateKey(privateKeyPEM,password){return this.scheduler.send({type:"encryptPrivateKey",args:[privateKeyPEM,password]})};SchedulerCryptoAdapter.prototype.envelopeSeal=function envelopeSeal(secret,publicKeyPEMs){return this.scheduler.send({type:"envelopeSeal",args:[secret,publicKeyPEMs]})};SchedulerCryptoAdapter.prototype.envelopeUnseal=function envelopeUnseal(envelope,privateKeyPEMs){return this.scheduler.send({type:"envelopeUnseal",args:[envelope,privateKeyPEMs]})};SchedulerCryptoAdapter.prototype.generateAuthorizationHeaders=function generateAuthorizationHeaders(method,path,session){return this.scheduler.send({type:"generateAuthorizationHeaders",args:[method,path,session]})};SchedulerCryptoAdapter.prototype.generateKeyIV=function generateKeyIV(){return this.scheduler.send({type:"generateKeyIV"})};SchedulerCryptoAdapter.prototype.generateKeyPair=function generateKeyPair(){return this.scheduler.send({type:"generateKeyPair"})};SchedulerCryptoAdapter.prototype.generatePasswordHash=function generatePasswordHash(password){return this.scheduler.send({type:"generatePasswordHash",args:[password]})};SchedulerCryptoAdapter.prototype.generateWrappedSymmetricKey=function generateWrappedSymmetricKey(serverPublicKeyPEM){return this.scheduler.send({type:"generateWrappedSymmetricKey",args:[serverPublicKeyPEM]})};SchedulerCryptoAdapter.prototype.decryptManagedPrivateKey=function decryptManagedPrivateKey(privateKey$,keyBase64){return this.scheduler.send({type:"decryptManagedPrivateKey",args:[privateKey$,keyBase64]})};SchedulerCryptoAdapter.prototype.encryptComment=function encryptComment(comment,publicKeyPEMs){return this.scheduler.send({type:"encryptComment",args:[comment,publicKeyPEMs]})};SchedulerCryptoAdapter.prototype.generateCommentImportKey=function generateCommentImportKey(serverPublicKeyPEM){return this.scheduler.send({type:"generateCommentImportKey",args:[serverPublicKeyPEM]})};SchedulerCryptoAdapter.prototype.encryptCommentImportFile=function encryptCommentImportFile(key,fileBase64){return this.scheduler.send({type:"encryptCommentImportFile",args:[key,fileBase64]})};
|
|
1
|
+
"use strict";exports.__esModule=true;var _Scheduler=require("../util/Scheduler");var _Scheduler2=_interopRequireDefault(_Scheduler);var _ICryptoAdapter2=require("./ICryptoAdapter");var _ICryptoAdapter3=_interopRequireDefault(_ICryptoAdapter2);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var SchedulerCryptoAdapter=function(_ICryptoAdapter){_inherits(SchedulerCryptoAdapter,_ICryptoAdapter);function SchedulerCryptoAdapter(options){_classCallCheck(this,SchedulerCryptoAdapter);var _this=_possibleConstructorReturn(this,_ICryptoAdapter.call(this));_this.scheduler=new _Scheduler2.default(options);return _this}SchedulerCryptoAdapter.prototype.decryptBytes=function decryptBytes(comment$,envelope$,privateKeyPEMs,before,after){return this.scheduler.send({type:"decryptBytes",args:[comment$,envelope$,privateKeyPEMs,before,after]})};SchedulerCryptoAdapter.prototype.decryptComment=function decryptComment(comment$,envelope,privateKeyPEMs){return this.scheduler.send({type:"decryptComment",args:[comment$,envelope,privateKeyPEMs]})};SchedulerCryptoAdapter.prototype.decryptData=function decryptData(version,data$,envelope$,privateKeyPEMs){return this.scheduler.send({type:"decryptData",args:[version,data$,envelope$,privateKeyPEMs]})};SchedulerCryptoAdapter.prototype.decryptFileBlock=function decryptFileBlock(data$,privateKeyPEMs){return this.scheduler.send({type:"decryptFileBlock",args:[data$,privateKeyPEMs]})};SchedulerCryptoAdapter.prototype.decryptImage=function decryptImage(data$,privateKeyPEMs){return this.scheduler.send({type:"decryptImage",args:[data$,privateKeyPEMs]})};SchedulerCryptoAdapter.prototype.decryptPrivateKey=function decryptPrivateKey(privateKey$,password){return this.scheduler.send({type:"decryptPrivateKey",args:[privateKey$,password]})};SchedulerCryptoAdapter.prototype.encryptFileBlock=function encryptFileBlock(keyIV,fileBlock,decodeBlock){return this.scheduler.send({type:"encryptFileBlock",args:[keyIV,fileBlock,decodeBlock]})};SchedulerCryptoAdapter.prototype.encryptPrivateKey=function encryptPrivateKey(privateKeyPEM,password){return this.scheduler.send({type:"encryptPrivateKey",args:[privateKeyPEM,password]})};SchedulerCryptoAdapter.prototype.envelopeSeal=function envelopeSeal(secret,publicKeyPEMs){return this.scheduler.send({type:"envelopeSeal",args:[secret,publicKeyPEMs]})};SchedulerCryptoAdapter.prototype.envelopeUnseal=function envelopeUnseal(envelope,privateKeyPEMs){return this.scheduler.send({type:"envelopeUnseal",args:[envelope,privateKeyPEMs]})};SchedulerCryptoAdapter.prototype.generateAuthorizationHeaders=function generateAuthorizationHeaders(method,path,session){return this.scheduler.send({type:"generateAuthorizationHeaders",args:[method,path,session]})};SchedulerCryptoAdapter.prototype.generateKeyIV=function generateKeyIV(){return this.scheduler.send({type:"generateKeyIV"})};SchedulerCryptoAdapter.prototype.generateKeyPair=function generateKeyPair(){return this.scheduler.send({type:"generateKeyPair"})};SchedulerCryptoAdapter.prototype.generatePasswordHash=function generatePasswordHash(password){return this.scheduler.send({type:"generatePasswordHash",args:[password]})};SchedulerCryptoAdapter.prototype.generateWrappedSymmetricKey=function generateWrappedSymmetricKey(serverPublicKeyPEM){return this.scheduler.send({type:"generateWrappedSymmetricKey",args:[serverPublicKeyPEM]})};SchedulerCryptoAdapter.prototype.decryptManagedPrivateKey=function decryptManagedPrivateKey(privateKey$,keyBase64){return this.scheduler.send({type:"decryptManagedPrivateKey",args:[privateKey$,keyBase64]})};SchedulerCryptoAdapter.prototype.encryptComment=function encryptComment(comment,publicKeyPEMs){return this.scheduler.send({type:"encryptComment",args:[comment,publicKeyPEMs]})};SchedulerCryptoAdapter.prototype.generateCommentImportKey=function generateCommentImportKey(serverPublicKeyPEM){return this.scheduler.send({type:"generateCommentImportKey",args:[serverPublicKeyPEM]})};SchedulerCryptoAdapter.prototype.encryptCommentImportFile=function encryptCommentImportFile(key,fileBase64){return this.scheduler.send({type:"encryptCommentImportFile",args:[key,fileBase64]})};return SchedulerCryptoAdapter}(_ICryptoAdapter3.default);exports.default=SchedulerCryptoAdapter;
|
|
@@ -1,4 +1,105 @@
|
|
|
1
1
|
export default SyncCryptoAdapter;
|
|
2
2
|
declare class SyncCryptoAdapter extends ICryptoAdapter {
|
|
3
|
+
/**
|
|
4
|
+
* @param {string} data$ The encrypted (and encoded) data
|
|
5
|
+
* @param {string} envelope$ The envelope containing the key
|
|
6
|
+
* @param {string[]} privateKeyPEMs The user's private keys used to decrypt the envelope
|
|
7
|
+
* @param {string[]} before Any pre-processing to do on the encrypted data
|
|
8
|
+
* @param {string[]} after Any post-processing to do on the newly-decrypted data
|
|
9
|
+
* @returns {Promise<string>} The decrypted (and encoded) data
|
|
10
|
+
*/
|
|
11
|
+
decryptBytes(comment$: any, envelope$: string, privateKeyPEMs: string[], before: string[], after: string[]): Promise<string>;
|
|
12
|
+
/**
|
|
13
|
+
* @param {string} comment$ The encrypted comment
|
|
14
|
+
* @param {string} envelope The comment envelope containing the key
|
|
15
|
+
* @param {string[]} privateKeyPEMs The user's private keys used to decrypt the envelope
|
|
16
|
+
* @returns {Promise<string>} The original, raw comment text
|
|
17
|
+
*/
|
|
18
|
+
decryptComment(comment$: string, envelope: string, privateKeyPEMs: string[]): Promise<string>;
|
|
19
|
+
/**
|
|
20
|
+
* @param {number} version The encryption version number
|
|
21
|
+
* @param {string} data$ The encrypted data
|
|
22
|
+
* @param {string} envelope$ The envelope to use for decrypting the data
|
|
23
|
+
* @param {string[]} privateKeyPEMs The user's private keys (in PEM format)
|
|
24
|
+
* @returns {Promise<string>} The decrypted data
|
|
25
|
+
*/
|
|
26
|
+
decryptData(version: number, data$: string, envelope$: string, privateKeyPEMs: string[]): Promise<string>;
|
|
27
|
+
/**
|
|
28
|
+
* @param {string} data$ The encrypted file block (and envelope)
|
|
29
|
+
* @param {string[]} privateKeyPEMs The user's private keys used to decrypt the embedded envelope
|
|
30
|
+
* @returns {Promise<string>} A base64 representation of the original block
|
|
31
|
+
*/
|
|
32
|
+
decryptFileBlock(data$: string, privateKeyPEMs: string[]): Promise<string>;
|
|
33
|
+
/**
|
|
34
|
+
* @param {string} data$ The encrypted image (and envelope)
|
|
35
|
+
* @param {string[]} privateKeyPEMs The user's private keys used to decrypt the embedded envelope
|
|
36
|
+
* @returns {Promise<string>} A base64 representation of the original image
|
|
37
|
+
*/
|
|
38
|
+
decryptImage(data$: string, privateKeyPEMs: string[]): Promise<string>;
|
|
39
|
+
/**
|
|
40
|
+
* @param {string} privateKey$ The user's encrypted private key
|
|
41
|
+
* @param {string} password The user's original password, used to decrypt the private key
|
|
42
|
+
* @returns {Promise<string>} The user's private key (in PEM format)
|
|
43
|
+
*/
|
|
44
|
+
decryptPrivateKey(privateKey$: string, password: string): Promise<string>;
|
|
45
|
+
/**
|
|
46
|
+
* @param {{key: string, iv: string}} keyIV The key & iv to encrypt the block with
|
|
47
|
+
* @param {string} fileBlock The file block
|
|
48
|
+
* @param {boolean} decodeBlock Whether the `fileBlock` should be decoded before encrypting
|
|
49
|
+
* @returns {Promise<string>} The encrypted block, base64 encoded
|
|
50
|
+
*/
|
|
51
|
+
encryptFileBlock(keyIV: {
|
|
52
|
+
key: string;
|
|
53
|
+
iv: string;
|
|
54
|
+
}, fileBlock: string, decodeBlock: boolean): Promise<string>;
|
|
55
|
+
/**
|
|
56
|
+
* @param {string} privateKeyPEM The user's private key (in PEM format)
|
|
57
|
+
* @param {string} password The user's original password, used to encrypt the private key
|
|
58
|
+
* @returns {Promise<string>} The user's encrypted private key
|
|
59
|
+
*/
|
|
60
|
+
encryptPrivateKey(privateKeyPEM: string, password: string): Promise<string>;
|
|
61
|
+
/**
|
|
62
|
+
* @param {string} secret The secret to seal within an envelope
|
|
63
|
+
* @param {Array<string>} publicKeyPEMs The list of public keys to encrypt the envelope for
|
|
64
|
+
* @returns {Promise<string>} The full envelope
|
|
65
|
+
*/
|
|
66
|
+
envelopeSeal(secret: string, publicKeyPEMs: string[]): Promise<string>;
|
|
67
|
+
/**
|
|
68
|
+
* @param {string} envelope The full envelope to unseal
|
|
69
|
+
* @param {string[]} privateKeyPEMs The user's private keys (in PEM format), used to decrypt the envelope
|
|
70
|
+
* @returns {Promise<string>} The secret within the envelope
|
|
71
|
+
*/
|
|
72
|
+
envelopeUnseal(envelope: string, privateKeyPEMs: string[]): Promise<string>;
|
|
73
|
+
/**
|
|
74
|
+
* @param {string} method The request method/verb (eg. GET, POST)
|
|
75
|
+
* @param {string} path The endpoint (pathname)
|
|
76
|
+
* @param {Session} session The Session object used to sign the request
|
|
77
|
+
* @returns {Promise<Object<string, string>>} The additional headers to add to the request for it to be signed
|
|
78
|
+
*/
|
|
79
|
+
generateAuthorizationHeaders(method: string, path: string, session: any): Promise<{
|
|
80
|
+
[x: string]: string;
|
|
81
|
+
}>;
|
|
82
|
+
/**
|
|
83
|
+
* @param {string} password The user's original password
|
|
84
|
+
* @returns {Promise<string>} The hashed password
|
|
85
|
+
*/
|
|
86
|
+
generatePasswordHash(password: string): Promise<string>;
|
|
87
|
+
/**
|
|
88
|
+
* @param {string} serverPublicKeyPEM The server's public key (in PEM format)
|
|
89
|
+
* @returns {Promise<WrappedSymmetricKey>} The wrapped symmetric key
|
|
90
|
+
*/
|
|
91
|
+
generateWrappedSymmetricKey(serverPublicKeyPEM: string): Promise<WrappedSymmetricKey>;
|
|
92
|
+
/**
|
|
93
|
+
* @param {string} privateKey$ The encrypted (and base64 encoded) private key
|
|
94
|
+
* @param {string} keyBase64 The key (base64 encoded) for decrypting the private key
|
|
95
|
+
* @returns {Promise<string>} The private pem (in PEM format)
|
|
96
|
+
*/
|
|
97
|
+
decryptManagedPrivateKey(privateKey$: string, keyBase64: string): Promise<string>;
|
|
98
|
+
/**
|
|
99
|
+
* @param {string} comment The raw comment text
|
|
100
|
+
* @param {Array<string>} publicKeyPEMs The public keys of recipients who can decrypt the comment (in PEM format)
|
|
101
|
+
* @returns {Promise<EncryptedComment>} The encrypted comment and envelope
|
|
102
|
+
*/
|
|
103
|
+
encryptComment(comment: string, publicKeyPEMs: string[]): Promise<EncryptedComment>;
|
|
3
104
|
}
|
|
4
105
|
import ICryptoAdapter from "./ICryptoAdapter";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";exports.__esModule=true;var _ICryptoAdapter2=require("./ICryptoAdapter");var _ICryptoAdapter3=_interopRequireDefault(_ICryptoAdapter2);var _crypto=require("../crypto");var crypto=_interopRequireWildcard(_crypto);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var SyncCryptoAdapter=function(_ICryptoAdapter){_inherits(SyncCryptoAdapter,_ICryptoAdapter);function SyncCryptoAdapter(){_classCallCheck(this,SyncCryptoAdapter);return _possibleConstructorReturn(this,_ICryptoAdapter.apply(this,arguments))}SyncCryptoAdapter.prototype.decryptBytes=function decryptBytes(comment$,envelope$,privateKeyPEMs,before,after){return crypto.decryptBytes(comment$,envelope$,privateKeyPEMs,before,after)};SyncCryptoAdapter.prototype.decryptComment=function decryptComment(comment$,envelope,privateKeyPEMs){return crypto.decryptComment(comment$,envelope,privateKeyPEMs)};SyncCryptoAdapter.prototype.decryptData=function decryptData(version,data$,envelope$,privateKeyPEMs){return crypto.decryptData(version,data$,envelope$,privateKeyPEMs)};SyncCryptoAdapter.prototype.decryptFileBlock=function decryptFileBlock(data$,privateKeyPEMs){return crypto.decryptFileBlock(data$,privateKeyPEMs)};SyncCryptoAdapter.prototype.decryptImage=function decryptImage(data$,privateKeyPEMs){return crypto.decryptImage(data$,privateKeyPEMs)};SyncCryptoAdapter.prototype.decryptPrivateKey=function decryptPrivateKey(privateKey$,password){return crypto.decryptPrivateKey(privateKey$,password)};SyncCryptoAdapter.prototype.encryptFileBlock=function encryptFileBlock(keyIV,fileBlock,decodeBlock){return crypto.encryptFileBlock(keyIV,fileBlock,decodeBlock)};SyncCryptoAdapter.prototype.encryptPrivateKey=function encryptPrivateKey(privateKeyPEM,password){return crypto.encryptPrivateKey(privateKeyPEM,password)};SyncCryptoAdapter.prototype.envelopeSeal=function envelopeSeal(secret,publicKeyPEMs){return crypto.envelopeSeal(secret,publicKeyPEMs)};SyncCryptoAdapter.prototype.envelopeUnseal=function envelopeUnseal(envelope,privateKeyPEMs){return crypto.envelopeUnseal(envelope,privateKeyPEMs)};SyncCryptoAdapter.prototype.generateAuthorizationHeaders=function generateAuthorizationHeaders(method,path,session){return crypto.generateAuthorizationHeaders(method,path,session)};SyncCryptoAdapter.prototype.generateKeyIV=function generateKeyIV(){return crypto.generateKeyIV()};SyncCryptoAdapter.prototype.generateKeyPair=function generateKeyPair(){return crypto.generateKeyPair()};SyncCryptoAdapter.prototype.generatePasswordHash=function generatePasswordHash(password){return crypto.generatePasswordHash(password)};SyncCryptoAdapter.prototype.generateWrappedSymmetricKey=function generateWrappedSymmetricKey(serverPublicKeyPEM){return crypto.generateWrappedSymmetricKey(serverPublicKeyPEM)};SyncCryptoAdapter.prototype.decryptManagedPrivateKey=function decryptManagedPrivateKey(privateKey$,keyBase64){return crypto.decryptManagedPrivateKey(privateKey$,keyBase64)};SyncCryptoAdapter.prototype.encryptComment=function encryptComment(comment,publicKeyPEMs){return crypto.encryptComment(comment,publicKeyPEMs)};
|
|
1
|
+
"use strict";exports.__esModule=true;var _ICryptoAdapter2=require("./ICryptoAdapter");var _ICryptoAdapter3=_interopRequireDefault(_ICryptoAdapter2);var _crypto=require("../crypto");var crypto=_interopRequireWildcard(_crypto);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj.default=obj;return newObj}}function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return call&&(typeof call==="object"||typeof call==="function")?call:self}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass)}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass}var SyncCryptoAdapter=function(_ICryptoAdapter){_inherits(SyncCryptoAdapter,_ICryptoAdapter);function SyncCryptoAdapter(){_classCallCheck(this,SyncCryptoAdapter);return _possibleConstructorReturn(this,_ICryptoAdapter.apply(this,arguments))}SyncCryptoAdapter.prototype.decryptBytes=function decryptBytes(comment$,envelope$,privateKeyPEMs,before,after){return crypto.decryptBytes(comment$,envelope$,privateKeyPEMs,before,after)};SyncCryptoAdapter.prototype.decryptComment=function decryptComment(comment$,envelope,privateKeyPEMs){return crypto.decryptComment(comment$,envelope,privateKeyPEMs)};SyncCryptoAdapter.prototype.decryptData=function decryptData(version,data$,envelope$,privateKeyPEMs){return crypto.decryptData(version,data$,envelope$,privateKeyPEMs)};SyncCryptoAdapter.prototype.decryptFileBlock=function decryptFileBlock(data$,privateKeyPEMs){return crypto.decryptFileBlock(data$,privateKeyPEMs)};SyncCryptoAdapter.prototype.decryptImage=function decryptImage(data$,privateKeyPEMs){return crypto.decryptImage(data$,privateKeyPEMs)};SyncCryptoAdapter.prototype.decryptPrivateKey=function decryptPrivateKey(privateKey$,password){return crypto.decryptPrivateKey(privateKey$,password)};SyncCryptoAdapter.prototype.encryptFileBlock=function encryptFileBlock(keyIV,fileBlock,decodeBlock){return crypto.encryptFileBlock(keyIV,fileBlock,decodeBlock)};SyncCryptoAdapter.prototype.encryptPrivateKey=function encryptPrivateKey(privateKeyPEM,password){return crypto.encryptPrivateKey(privateKeyPEM,password)};SyncCryptoAdapter.prototype.envelopeSeal=function envelopeSeal(secret,publicKeyPEMs){return crypto.envelopeSeal(secret,publicKeyPEMs)};SyncCryptoAdapter.prototype.envelopeUnseal=function envelopeUnseal(envelope,privateKeyPEMs){return crypto.envelopeUnseal(envelope,privateKeyPEMs)};SyncCryptoAdapter.prototype.generateAuthorizationHeaders=function generateAuthorizationHeaders(method,path,session){return crypto.generateAuthorizationHeaders(method,path,session)};SyncCryptoAdapter.prototype.generateKeyIV=function generateKeyIV(){return crypto.generateKeyIV()};SyncCryptoAdapter.prototype.generateKeyPair=function generateKeyPair(){return crypto.generateKeyPair()};SyncCryptoAdapter.prototype.generatePasswordHash=function generatePasswordHash(password){return crypto.generatePasswordHash(password)};SyncCryptoAdapter.prototype.generateWrappedSymmetricKey=function generateWrappedSymmetricKey(serverPublicKeyPEM){return crypto.generateWrappedSymmetricKey(serverPublicKeyPEM)};SyncCryptoAdapter.prototype.decryptManagedPrivateKey=function decryptManagedPrivateKey(privateKey$,keyBase64){return crypto.decryptManagedPrivateKey(privateKey$,keyBase64)};SyncCryptoAdapter.prototype.encryptComment=function encryptComment(comment,publicKeyPEMs){return crypto.encryptComment(comment,publicKeyPEMs)};return SyncCryptoAdapter}(_ICryptoAdapter3.default);exports.default=SyncCryptoAdapter;
|
|
@@ -8,10 +8,10 @@ declare class WorkerCryptoAdapter extends SchedulerCryptoAdapter {
|
|
|
8
8
|
* @param {boolean} [options.optimistic]
|
|
9
9
|
*/
|
|
10
10
|
constructor(options?: {
|
|
11
|
-
url
|
|
12
|
-
create
|
|
13
|
-
limit
|
|
14
|
-
optimistic
|
|
11
|
+
url?: string;
|
|
12
|
+
create?: Function;
|
|
13
|
+
limit?: number;
|
|
14
|
+
optimistic?: boolean;
|
|
15
15
|
});
|
|
16
16
|
options: {
|
|
17
17
|
url?: string;
|
|
@@ -6,11 +6,11 @@ declare class WorkerThreadsCryptoAdapter extends SchedulerCryptoAdapter {
|
|
|
6
6
|
* @param {boolean} [options.optimistic] Whether to immediately create the maximum number of worker threads (reduces cold start times).
|
|
7
7
|
*/
|
|
8
8
|
constructor(options?: {
|
|
9
|
-
limit
|
|
10
|
-
optimistic
|
|
9
|
+
limit?: number;
|
|
10
|
+
optimistic?: boolean;
|
|
11
11
|
});
|
|
12
12
|
options: {
|
|
13
|
-
limit?: number
|
|
13
|
+
limit?: number;
|
|
14
14
|
optimistic?: boolean;
|
|
15
15
|
};
|
|
16
16
|
}
|
|
@@ -23,9 +23,13 @@ declare class XHRRequestAdapter extends IRequestAdapter {
|
|
|
23
23
|
* @param {boolean} [options.async=true] Whether to send request asynchronously
|
|
24
24
|
*/
|
|
25
25
|
constructor(options?: {
|
|
26
|
-
async
|
|
26
|
+
async?: boolean;
|
|
27
27
|
});
|
|
28
28
|
/** @private */
|
|
29
|
-
|
|
29
|
+
options: {
|
|
30
|
+
async: boolean;
|
|
31
|
+
};
|
|
32
|
+
/** @private */
|
|
33
|
+
send(request: any, options?: {}): Promise<any>;
|
|
30
34
|
}
|
|
31
35
|
import IRequestAdapter from "./IRequestAdapter";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.PageProofAngularEnhancementAdapter=t():e.PageProofAngularEnhancementAdapter=t()}(
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.PageProofAngularEnhancementAdapter=t():e.PageProofAngularEnhancementAdapter=t()}(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},c=n(1),a=function(e){return e&&e.__esModule?e:{default:e}}(c),p=n(2)("AngularEnhancementAdapter"),f={$scope:null,$exceptionHandler:null,module:null},s=function(e){function t(n){o(this,t);var i=r(this,e.call(this));return i.options=u({},f,n),i.$scope=i.options.$scope,i.$exceptionHandler=i.options.$exceptionHandler,i.options.module&&i.options.module.run(["$rootScope","$exceptionHandler",function(e,t){p("Extracting the $rootScope and $exceptionHandler from Angular module"),i.$scope=i.$scope||e,i.$exceptionHandler=i.$exceptionHandler||t}]),i}return i(t,e),t.prototype.onMethodFinally=function(){this.$scope&&!this.$scope.$$phase&&this.$scope.$apply(),this.$scope||p("Unable to tell $scope to re-digest, either module hasn't booted, or no $scope was provided")},t.prototype.onMethodReject=function(e){var t=e.rejected;this.$exceptionHandler?this.$exceptionHandler(t):p("Unable to invoke $exceptionHandler of rejected Promise, check configuration")},t.prototype.onMethodThrown=function(e){var t=e.error;this.$exceptionHandler?this.$exceptionHandler(t):p("Unable to invoke $exceptionHandler of uncaught error, check configuration")},t}(a.default);t.default=s},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n){var o=e[t];e[t]=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=o.bind.apply(o,[this].concat(t));return n(i,this,t).apply(this,t)}}function i(e){function t(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],u=Object.getOwnPropertyNames(r).filter(function(t){return r[t].client===e}),c=Object.getPrototypeOf(r),a=Object.keys(c).filter(function(e){return"function"==typeof c[e]&&0!==e.indexOf("_")});if(i.length||n){var p=i.join(".");0===p.indexOf("__")&&(p=p.substring(2)),a.forEach(function(e){o.push({namespace:p,name:e,api:r})})}u.forEach(function(e){t(r[e],i.concat(e))})}var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=[];return t(e),o}t.__esModule=!0;var u,c,a=(c=u=function(){function e(){o(this,e)}return e.prototype.onClientReady=function(e){var t=this;i(e).forEach(function(e){var n={api:e.api,namespace:e.namespace,name:e.name,displayName:e.namespace+"."+e.name};t.onMethodEnhance(n),r(e.api,e.name,function(e){return t.onMethodBefore(n),function(){var o=void 0;try{o=e()}catch(e){throw n.error=e,t.onMethodThrown(n),e}finally{n.value=o,t.onMethodAfter(n),o&&"function"==typeof o.then&&o.then(function(e){n.resolved=e,t.onMethodResolve(n)},function(e){n.rejected=e,t.onMethodReject(n)}).then(function(){t.onMethodFinally(n)})}return o}})}),e.on("experimental.request.before",function(e){return t.onRequestBefore(e.data)}),e.on("experimental.request.after",function(e){return t.onRequestAfter(e.data)}),e.on("error.response",function(e){return t.onRequestReject(e.data)}),e.on("error.throttled",function(e){return t.onRequestThrottled(e.data)}),e.on("experimental.request.retry",function(e){return t.onRequestRetry(e.data)}),e.on("error.unauthorized",function(e){return t.onRequestUnauthorized(e.data)}),e.on("error.deprecated",function(e){return t.onRequestDeprecated(e.data)}),e.on("experimental.request.resolve",function(e){return t.onRequestResolve(e.data)}),e.on("experimental.request.finally",function(e){return t.onRequestFinally(e.data)})},e.prototype.onMethodEnhance=function(e){},e.prototype.onMethodBefore=function(e){},e.prototype.onMethodAfter=function(e){},e.prototype.onMethodReject=function(e){},e.prototype.onMethodResolve=function(e){},e.prototype.onMethodFinally=function(e){},e.prototype.onMethodThrown=function(e){},e.prototype.onRequestBefore=function(e){},e.prototype.onRequestAfter=function(e){},e.prototype.onRequestReject=function(e){},e.prototype.onRequestThrottled=function(e){},e.prototype.onRequestRetry=function(e){},e.prototype.onRequestUnauthorized=function(e){},e.prototype.onRequestDeprecated=function(e){},e.prototype.onRequestResolve=function(e){},e.prototype.onRequestFinally=function(e){},e}(),u.__adapter__="IEnhancementAdapter",c);t.default=a},function(e,t,n){"use strict";e.exports=function e(){return e}}])});
|
|
2
2
|
//# sourceMappingURL=angular-enhancement-adapter.js.map
|
package/lib/api/API.d.ts
CHANGED
package/lib/api/Accounts.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default Accounts;
|
|
2
2
|
declare class Accounts extends API {
|
|
3
3
|
/** @private */
|
|
4
|
-
|
|
4
|
+
constructor(client: any);
|
|
5
5
|
/**
|
|
6
6
|
* The Accounts SSO API.
|
|
7
7
|
*
|
|
@@ -15,7 +15,7 @@ declare class Accounts extends API {
|
|
|
15
15
|
*/
|
|
16
16
|
mfa: AccountsMFA;
|
|
17
17
|
/** @private */
|
|
18
|
-
|
|
18
|
+
_generateCredentials(password: any): any;
|
|
19
19
|
/**
|
|
20
20
|
* Creates a new PageProof account.
|
|
21
21
|
*
|
|
@@ -57,8 +57,8 @@ declare class Accounts extends API {
|
|
|
57
57
|
* @returns {Promise<Session>}
|
|
58
58
|
*/
|
|
59
59
|
register(email: string, password: string, options?: {
|
|
60
|
-
activationCode
|
|
61
|
-
referrer
|
|
60
|
+
activationCode?: string;
|
|
61
|
+
referrer?: string;
|
|
62
62
|
}): Promise<Session>;
|
|
63
63
|
/**
|
|
64
64
|
* Generates a new activation code for a newly created account. The activation code is sent to the user's email
|
|
@@ -111,23 +111,6 @@ declare class Accounts extends API {
|
|
|
111
111
|
* @returns {Promise<Session>}
|
|
112
112
|
*/
|
|
113
113
|
login(email: string, password: string, totp?: string, _decryptPrivateKey?: boolean): Promise<Session>;
|
|
114
|
-
/**
|
|
115
|
-
* Re-authenticates the user with PageProof.
|
|
116
|
-
* Required when the user requests access to certain privileged actions.
|
|
117
|
-
* The user must be logged in to call this method, so we don't pass in the email address.
|
|
118
|
-
*
|
|
119
|
-
* @example <caption>Re-authenticating the user</caption>
|
|
120
|
-
* await client.accounts.reauthenticate('password', '<totp>');
|
|
121
|
-
*
|
|
122
|
-
* @param {string} password The user's password
|
|
123
|
-
* @param {string} [totp] The user's timed one time passcode produced from their authenticator app (if enabled)
|
|
124
|
-
* @returns {Promise<{success: boolean, error: string | null, data: string | null}>}
|
|
125
|
-
*/
|
|
126
|
-
reauthenticate(password: string, totp?: string): Promise<{
|
|
127
|
-
success: boolean;
|
|
128
|
-
error: string | null;
|
|
129
|
-
data: string | null;
|
|
130
|
-
}>;
|
|
131
114
|
/**
|
|
132
115
|
* Resets the password for an account.
|
|
133
116
|
*
|