revdoku 0.0.0-stage → 2.2.0
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/LICENSE +21 -0
- package/README.md +250 -2
- package/REFERENCE.md +654 -0
- package/dist/apis/DefaultApi.d.ts +1643 -0
- package/dist/apis/DefaultApi.js +3161 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +19 -0
- package/dist/client.d.ts +74 -0
- package/dist/client.js +241 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +22 -0
- package/dist/models/AccountIdentity.d.ts +77 -0
- package/dist/models/AccountIdentity.js +90 -0
- package/dist/models/AccountIdentityAgencyAccount.d.ts +34 -0
- package/dist/models/AccountIdentityAgencyAccount.js +50 -0
- package/dist/models/AccountIdentityPermissions.d.ts +55 -0
- package/dist/models/AccountIdentityPermissions.js +68 -0
- package/dist/models/AccountLimits.d.ts +106 -0
- package/dist/models/AccountLimits.js +126 -0
- package/dist/models/AccountList.d.ts +40 -0
- package/dist/models/AccountList.js +60 -0
- package/dist/models/ActionRequest.d.ts +34 -0
- package/dist/models/ActionRequest.js +50 -0
- package/dist/models/AddUploadSessionFilesRequest.d.ts +39 -0
- package/dist/models/AddUploadSessionFilesRequest.js +55 -0
- package/dist/models/AgentConnection.d.ts +99 -0
- package/dist/models/AgentConnection.js +93 -0
- package/dist/models/ApiError.d.ts +35 -0
- package/dist/models/ApiError.js +55 -0
- package/dist/models/ApiErrorError.d.ts +62 -0
- package/dist/models/ApiErrorError.js +69 -0
- package/dist/models/AppendText200Response.d.ts +35 -0
- package/dist/models/AppendText200Response.js +55 -0
- package/dist/models/AppendTextRequest.d.ts +50 -0
- package/dist/models/AppendTextRequest.js +62 -0
- package/dist/models/AppendTextResult.d.ts +52 -0
- package/dist/models/AppendTextResult.js +72 -0
- package/dist/models/BrowserLink.d.ts +46 -0
- package/dist/models/BrowserLink.js +60 -0
- package/dist/models/ChangeMailboxAddressRequest.d.ts +54 -0
- package/dist/models/ChangeMailboxAddressRequest.js +64 -0
- package/dist/models/CheckEmailDomain200Response.d.ts +35 -0
- package/dist/models/CheckEmailDomain200Response.js +55 -0
- package/dist/models/CodeRequested.d.ts +46 -0
- package/dist/models/CodeRequested.js +56 -0
- package/dist/models/Connection.d.ts +112 -0
- package/dist/models/Connection.js +99 -0
- package/dist/models/ConnectionPermissions.d.ts +38 -0
- package/dist/models/ConnectionPermissions.js +52 -0
- package/dist/models/ConnectionRenewal.d.ts +38 -0
- package/dist/models/ConnectionRenewal.js +52 -0
- package/dist/models/CreateBrowserLink201Response.d.ts +35 -0
- package/dist/models/CreateBrowserLink201Response.js +55 -0
- package/dist/models/CreateBrowserLinkRequest.d.ts +38 -0
- package/dist/models/CreateBrowserLinkRequest.js +52 -0
- package/dist/models/CreateClientAccount201Response.d.ts +35 -0
- package/dist/models/CreateClientAccount201Response.js +55 -0
- package/dist/models/CreateClientAccount201ResponseData.d.ts +31 -0
- package/dist/models/CreateClientAccount201ResponseData.js +51 -0
- package/dist/models/CreateClientAccountRequest.d.ts +42 -0
- package/dist/models/CreateClientAccountRequest.js +56 -0
- package/dist/models/CreateEmailAliasRequest.d.ts +42 -0
- package/dist/models/CreateEmailAliasRequest.js +56 -0
- package/dist/models/CreateEmailDomain201Response.d.ts +35 -0
- package/dist/models/CreateEmailDomain201Response.js +55 -0
- package/dist/models/CreateEmailDomain201ResponseData.d.ts +31 -0
- package/dist/models/CreateEmailDomain201ResponseData.js +51 -0
- package/dist/models/CreateEmailDomainRequest.d.ts +38 -0
- package/dist/models/CreateEmailDomainRequest.js +54 -0
- package/dist/models/CreateMailbox201Response.d.ts +35 -0
- package/dist/models/CreateMailbox201Response.js +55 -0
- package/dist/models/CreateMailbox201ResponseData.d.ts +31 -0
- package/dist/models/CreateMailbox201ResponseData.js +51 -0
- package/dist/models/CreateMailboxRequest.d.ts +39 -0
- package/dist/models/CreateMailboxRequest.js +53 -0
- package/dist/models/CreateUploadSession201Response.d.ts +35 -0
- package/dist/models/CreateUploadSession201Response.js +55 -0
- package/dist/models/CreateUploadSessionRequest.d.ts +63 -0
- package/dist/models/CreateUploadSessionRequest.js +69 -0
- package/dist/models/DecodedEmailAddress.d.ts +34 -0
- package/dist/models/DecodedEmailAddress.js +54 -0
- package/dist/models/DecodedIncomingMessage.d.ts +151 -0
- package/dist/models/DecodedIncomingMessage.js +142 -0
- package/dist/models/DecodedIncomingMessageAttachmentsInner.d.ts +56 -0
- package/dist/models/DecodedIncomingMessageAttachmentsInner.js +74 -0
- package/dist/models/DeleteEmailDomain200Response.d.ts +35 -0
- package/dist/models/DeleteEmailDomain200Response.js +55 -0
- package/dist/models/DeleteEmailDomainRequest.d.ts +42 -0
- package/dist/models/DeleteEmailDomainRequest.js +58 -0
- package/dist/models/DeleteMailboxRequest.d.ts +38 -0
- package/dist/models/DeleteMailboxRequest.js +54 -0
- package/dist/models/DeleteResult.d.ts +34 -0
- package/dist/models/DeleteResult.js +54 -0
- package/dist/models/DnsRecord.d.ts +50 -0
- package/dist/models/DnsRecord.js +70 -0
- package/dist/models/Download.d.ts +53 -0
- package/dist/models/Download.js +75 -0
- package/dist/models/EmailAlias.d.ts +38 -0
- package/dist/models/EmailAlias.js +58 -0
- package/dist/models/EmailAttachment.d.ts +60 -0
- package/dist/models/EmailAttachment.js +76 -0
- package/dist/models/EmailDelivery.d.ts +49 -0
- package/dist/models/EmailDelivery.js +67 -0
- package/dist/models/EmailDetail.d.ts +167 -0
- package/dist/models/EmailDetail.js +157 -0
- package/dist/models/EmailDomain.d.ts +101 -0
- package/dist/models/EmailDomain.js +92 -0
- package/dist/models/EmailDomainAssignedMailboxesInner.d.ts +35 -0
- package/dist/models/EmailDomainAssignedMailboxesInner.js +51 -0
- package/dist/models/EmailDomainAssignedMailboxesInnerEmail.d.ts +30 -0
- package/dist/models/EmailDomainAssignedMailboxesInnerEmail.js +48 -0
- package/dist/models/EmailDomainCheck.d.ts +42 -0
- package/dist/models/EmailDomainCheck.js +58 -0
- package/dist/models/EmailDomainError.d.ts +38 -0
- package/dist/models/EmailDomainError.js +52 -0
- package/dist/models/EmailDomainList.d.ts +44 -0
- package/dist/models/EmailDomainList.js +62 -0
- package/dist/models/EmailForwarding.d.ts +77 -0
- package/dist/models/EmailForwarding.js +89 -0
- package/dist/models/EmailForwardingContent.d.ts +95 -0
- package/dist/models/EmailForwardingContent.js +102 -0
- package/dist/models/EmailLabel.d.ts +51 -0
- package/dist/models/EmailLabel.js +71 -0
- package/dist/models/EmailList.d.ts +36 -0
- package/dist/models/EmailList.js +56 -0
- package/dist/models/EmailReceivedEvent.d.ts +50 -0
- package/dist/models/EmailReceivedEvent.js +73 -0
- package/dist/models/EmailReceivedEventData.d.ts +46 -0
- package/dist/models/EmailReceivedEventData.js +67 -0
- package/dist/models/EmailSenderAllowlist.d.ts +46 -0
- package/dist/models/EmailSenderAllowlist.js +66 -0
- package/dist/models/EmailSubscription.d.ts +64 -0
- package/dist/models/EmailSubscription.js +87 -0
- package/dist/models/EmailSummary.d.ts +158 -0
- package/dist/models/EmailSummary.js +146 -0
- package/dist/models/EmailSummaryFiles.d.ts +42 -0
- package/dist/models/EmailSummaryFiles.js +60 -0
- package/dist/models/ErrorCode.d.ts +172 -0
- package/dist/models/ErrorCode.js +198 -0
- package/dist/models/ExchangeConnectionGrantRequest.d.ts +42 -0
- package/dist/models/ExchangeConnectionGrantRequest.js +56 -0
- package/dist/models/FileActor.d.ts +38 -0
- package/dist/models/FileActor.js +52 -0
- package/dist/models/FileDownload.d.ts +40 -0
- package/dist/models/FileDownload.js +58 -0
- package/dist/models/FileKey.d.ts +38 -0
- package/dist/models/FileKey.js +52 -0
- package/dist/models/FileList.d.ts +36 -0
- package/dist/models/FileList.js +56 -0
- package/dist/models/FileUploadSkip.d.ts +52 -0
- package/dist/models/FileUploadSkip.js +58 -0
- package/dist/models/FileVersion.d.ts +128 -0
- package/dist/models/FileVersion.js +101 -0
- package/dist/models/FileVersionList.d.ts +36 -0
- package/dist/models/FileVersionList.js +56 -0
- package/dist/models/FileVersionReason.d.ts +46 -0
- package/dist/models/FileVersionReason.js +57 -0
- package/dist/models/FinalizeUploadSessionRequest.d.ts +38 -0
- package/dist/models/FinalizeUploadSessionRequest.js +52 -0
- package/dist/models/GetAccountLimits200Response.d.ts +35 -0
- package/dist/models/GetAccountLimits200Response.js +55 -0
- package/dist/models/GetAccountLimits200ResponseData.d.ts +40 -0
- package/dist/models/GetAccountLimits200ResponseData.js +58 -0
- package/dist/models/GetAccountLimits200ResponseDataUsage.d.ts +31 -0
- package/dist/models/GetAccountLimits200ResponseDataUsage.js +49 -0
- package/dist/models/GetAccountLimits200ResponseDataUsageMailboxCreations.d.ts +42 -0
- package/dist/models/GetAccountLimits200ResponseDataUsageMailboxCreations.js +55 -0
- package/dist/models/GetEmail200Response.d.ts +35 -0
- package/dist/models/GetEmail200Response.js +55 -0
- package/dist/models/GetEmail200ResponseData.d.ts +31 -0
- package/dist/models/GetEmail200ResponseData.js +51 -0
- package/dist/models/GetEmailDomainSetupLink200Response.d.ts +35 -0
- package/dist/models/GetEmailDomainSetupLink200Response.js +55 -0
- package/dist/models/GetEmailDomainSetupLink200ResponseData.d.ts +31 -0
- package/dist/models/GetEmailDomainSetupLink200ResponseData.js +51 -0
- package/dist/models/GetEmailDomainSetupLink200ResponseDataSetupLink.d.ts +34 -0
- package/dist/models/GetEmailDomainSetupLink200ResponseDataSetupLink.js +54 -0
- package/dist/models/GetEmailOriginalDownload200Response.d.ts +35 -0
- package/dist/models/GetEmailOriginalDownload200Response.js +55 -0
- package/dist/models/GetEmailOriginalDownload200ResponseData.d.ts +31 -0
- package/dist/models/GetEmailOriginalDownload200ResponseData.js +51 -0
- package/dist/models/GetEmailSubscription200Response.d.ts +35 -0
- package/dist/models/GetEmailSubscription200Response.js +55 -0
- package/dist/models/GetEmailSubscription200ResponseData.d.ts +31 -0
- package/dist/models/GetEmailSubscription200ResponseData.js +51 -0
- package/dist/models/GetEmailWebhook200Response.d.ts +35 -0
- package/dist/models/GetEmailWebhook200Response.js +55 -0
- package/dist/models/GetEmailWebhook200ResponseData.d.ts +31 -0
- package/dist/models/GetEmailWebhook200ResponseData.js +51 -0
- package/dist/models/GetFileByPath200Response.d.ts +35 -0
- package/dist/models/GetFileByPath200Response.js +55 -0
- package/dist/models/GetFileByPath200ResponseData.d.ts +31 -0
- package/dist/models/GetFileByPath200ResponseData.js +51 -0
- package/dist/models/GetFileDownload200Response.d.ts +35 -0
- package/dist/models/GetFileDownload200Response.js +55 -0
- package/dist/models/GetMailboxEmailSettings200Response.d.ts +35 -0
- package/dist/models/GetMailboxEmailSettings200Response.js +55 -0
- package/dist/models/GetStatus200Response.d.ts +35 -0
- package/dist/models/GetStatus200Response.js +55 -0
- package/dist/models/ListAccounts200Response.d.ts +35 -0
- package/dist/models/ListAccounts200Response.js +55 -0
- package/dist/models/ListEmailDomains200Response.d.ts +35 -0
- package/dist/models/ListEmailDomains200Response.js +55 -0
- package/dist/models/ListEmails200Response.d.ts +35 -0
- package/dist/models/ListEmails200Response.js +55 -0
- package/dist/models/ListFileVersions200Response.d.ts +35 -0
- package/dist/models/ListFileVersions200Response.js +55 -0
- package/dist/models/ListFiles200Response.d.ts +35 -0
- package/dist/models/ListFiles200Response.js +55 -0
- package/dist/models/ListMailboxes200Response.d.ts +35 -0
- package/dist/models/ListMailboxes200Response.js +55 -0
- package/dist/models/Mailbox.d.ts +111 -0
- package/dist/models/Mailbox.js +110 -0
- package/dist/models/MailboxAction.d.ts +42 -0
- package/dist/models/MailboxAction.js +56 -0
- package/dist/models/MailboxCounts.d.ts +38 -0
- package/dist/models/MailboxCounts.js +58 -0
- package/dist/models/MailboxCreate.d.ts +45 -0
- package/dist/models/MailboxCreate.js +55 -0
- package/dist/models/MailboxEmail.d.ts +58 -0
- package/dist/models/MailboxEmail.js +73 -0
- package/dist/models/MailboxEmailOptions.d.ts +34 -0
- package/dist/models/MailboxEmailOptions.js +50 -0
- package/dist/models/MailboxEmailSettings.d.ts +87 -0
- package/dist/models/MailboxEmailSettings.js +92 -0
- package/dist/models/MailboxEmailSettingsAssignment.d.ts +52 -0
- package/dist/models/MailboxEmailSettingsAssignment.js +64 -0
- package/dist/models/MailboxEmailSettingsAssignmentError.d.ts +38 -0
- package/dist/models/MailboxEmailSettingsAssignmentError.js +52 -0
- package/dist/models/MailboxEmailSettingsAvailableDomainsInner.d.ts +42 -0
- package/dist/models/MailboxEmailSettingsAvailableDomainsInner.js +58 -0
- package/dist/models/MailboxEmailSettingsCustomization.d.ts +38 -0
- package/dist/models/MailboxEmailSettingsCustomization.js +52 -0
- package/dist/models/MailboxFile.d.ts +128 -0
- package/dist/models/MailboxFile.js +99 -0
- package/dist/models/MailboxList.d.ts +41 -0
- package/dist/models/MailboxList.js +61 -0
- package/dist/models/MailboxLock.d.ts +58 -0
- package/dist/models/MailboxLock.js +65 -0
- package/dist/models/MailboxUpdate.d.ts +40 -0
- package/dist/models/MailboxUpdate.js +52 -0
- package/dist/models/MoveFileRequest.d.ts +46 -0
- package/dist/models/MoveFileRequest.js +56 -0
- package/dist/models/Pagination.d.ts +38 -0
- package/dist/models/Pagination.js +58 -0
- package/dist/models/PathOperationResult.d.ts +73 -0
- package/dist/models/PathOperationResult.js +81 -0
- package/dist/models/PrepareFileUpload201Response.d.ts +35 -0
- package/dist/models/PrepareFileUpload201Response.js +55 -0
- package/dist/models/PrepareFileUploadRequest.d.ts +59 -0
- package/dist/models/PrepareFileUploadRequest.js +73 -0
- package/dist/models/PreparedFileUpload.d.ts +79 -0
- package/dist/models/PreparedFileUpload.js +73 -0
- package/dist/models/RenameFile200Response.d.ts +35 -0
- package/dist/models/RenameFile200Response.js +55 -0
- package/dist/models/RenameFileRequest.d.ts +38 -0
- package/dist/models/RenameFileRequest.js +54 -0
- package/dist/models/RequestSignInCode200Response.d.ts +35 -0
- package/dist/models/RequestSignInCode200Response.js +55 -0
- package/dist/models/RequestSignInCodeRequest.d.ts +38 -0
- package/dist/models/RequestSignInCodeRequest.js +54 -0
- package/dist/models/RestoreFileVersion201Response.d.ts +35 -0
- package/dist/models/RestoreFileVersion201Response.js +55 -0
- package/dist/models/RestoredFileVersion.d.ts +40 -0
- package/dist/models/RestoredFileVersion.js +60 -0
- package/dist/models/SaveUploadSessionBatchRequest.d.ts +38 -0
- package/dist/models/SaveUploadSessionBatchRequest.js +52 -0
- package/dist/models/SaveUploadedFile201Response.d.ts +35 -0
- package/dist/models/SaveUploadedFile201Response.js +55 -0
- package/dist/models/SaveUploadedFileRequest.d.ts +78 -0
- package/dist/models/SaveUploadedFileRequest.js +85 -0
- package/dist/models/SavedFile.d.ts +49 -0
- package/dist/models/SavedFile.js +65 -0
- package/dist/models/SendEmail202Response.d.ts +35 -0
- package/dist/models/SendEmail202Response.js +55 -0
- package/dist/models/SendEmail202ResponseData.d.ts +31 -0
- package/dist/models/SendEmail202ResponseData.js +51 -0
- package/dist/models/SendEmailRequest.d.ts +62 -0
- package/dist/models/SendEmailRequest.js +66 -0
- package/dist/models/SetEmailWebhook200Response.d.ts +35 -0
- package/dist/models/SetEmailWebhook200Response.js +55 -0
- package/dist/models/SetEmailWebhook200ResponseData.d.ts +31 -0
- package/dist/models/SetEmailWebhook200ResponseData.js +51 -0
- package/dist/models/SetEmailWebhookRequest.d.ts +42 -0
- package/dist/models/SetEmailWebhookRequest.js +56 -0
- package/dist/models/Status.d.ts +73 -0
- package/dist/models/Status.js +75 -0
- package/dist/models/StatusFeatures.d.ts +30 -0
- package/dist/models/StatusFeatures.js +48 -0
- package/dist/models/StatusUser.d.ts +38 -0
- package/dist/models/StatusUser.js +52 -0
- package/dist/models/StorageUpload.d.ts +36 -0
- package/dist/models/StorageUpload.js +54 -0
- package/dist/models/UpdateEmailAllowlist200Response.d.ts +35 -0
- package/dist/models/UpdateEmailAllowlist200Response.js +55 -0
- package/dist/models/UpdateEmailAllowlist200ResponseData.d.ts +31 -0
- package/dist/models/UpdateEmailAllowlist200ResponseData.js +51 -0
- package/dist/models/UpdateEmailAllowlistRequest.d.ts +43 -0
- package/dist/models/UpdateEmailAllowlistRequest.js +59 -0
- package/dist/models/UpdateEmailAllowlistRequestSenderAllowlist.d.ts +34 -0
- package/dist/models/UpdateEmailAllowlistRequestSenderAllowlist.js +54 -0
- package/dist/models/UpdateEmailRequest.d.ts +46 -0
- package/dist/models/UpdateEmailRequest.js +56 -0
- package/dist/models/UpdateMailboxRequest.d.ts +43 -0
- package/dist/models/UpdateMailboxRequest.js +57 -0
- package/dist/models/UploadBlob.d.ts +57 -0
- package/dist/models/UploadBlob.js +79 -0
- package/dist/models/UploadSession.d.ts +94 -0
- package/dist/models/UploadSession.js +91 -0
- package/dist/models/UploadSessionFile.d.ts +46 -0
- package/dist/models/UploadSessionFile.js +66 -0
- package/dist/models/UploadSessionResult.d.ts +82 -0
- package/dist/models/UploadSessionResult.js +86 -0
- package/dist/models/UploadSessionUpload.d.ts +47 -0
- package/dist/models/UploadSessionUpload.js +61 -0
- package/dist/models/UploadedFile.d.ts +48 -0
- package/dist/models/UploadedFile.js +66 -0
- package/dist/models/VerifyEmailDomainRequest.d.ts +34 -0
- package/dist/models/VerifyEmailDomainRequest.js +50 -0
- package/dist/models/VerifySignInCode201Response.d.ts +35 -0
- package/dist/models/VerifySignInCode201Response.js +55 -0
- package/dist/models/VerifySignInCodeRequest.d.ts +89 -0
- package/dist/models/VerifySignInCodeRequest.js +91 -0
- package/dist/models/Webhook.d.ts +41 -0
- package/dist/models/Webhook.js +63 -0
- package/dist/models/WebhookWithSecret.d.ts +45 -0
- package/dist/models/WebhookWithSecret.js +65 -0
- package/dist/models/index.d.ts +158 -0
- package/dist/models/index.js +176 -0
- package/dist/runtime.d.ts +196 -0
- package/dist/runtime.js +421 -0
- package/package.json +54 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DefaultApi';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/* tslint:disable */
|
|
18
|
+
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./DefaultApi"), exports);
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { DefaultApi, ListEmailsRequest, ListMailboxesRequest, ListFilesRequest, GetMailboxRequest, GetEmailRequest, GetEmailAttachmentDownloadRequest } from './apis/DefaultApi';
|
|
2
|
+
import { MailboxCreate } from './models/MailboxCreate';
|
|
3
|
+
import { SaveUploadedFile201Response } from './models/SaveUploadedFile201Response';
|
|
4
|
+
export interface RevdokuOptions {
|
|
5
|
+
/** API key. Defaults to the REVDOKU_API_KEY environment variable. */
|
|
6
|
+
apiKey?: string;
|
|
7
|
+
accountId?: string;
|
|
8
|
+
/** API origin, without /v1. Defaults to https://api.revdoku.com. */
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
/** Timeout for each HTTP request, including its response body. Default: 30 seconds. */
|
|
11
|
+
timeoutMs?: number;
|
|
12
|
+
}
|
|
13
|
+
export interface RequestOptions {
|
|
14
|
+
signal?: AbortSignal;
|
|
15
|
+
}
|
|
16
|
+
/** Options of the calls that transfer file bytes to or from storage. */
|
|
17
|
+
export interface TransferOptions extends RequestOptions {
|
|
18
|
+
/** Timeout for each request of this call, including the storage transfer. Default: the client `timeoutMs`. */
|
|
19
|
+
timeoutMs?: number;
|
|
20
|
+
}
|
|
21
|
+
export declare class RevdokuError extends Error {
|
|
22
|
+
readonly status: number;
|
|
23
|
+
readonly code: string;
|
|
24
|
+
readonly details?: unknown;
|
|
25
|
+
readonly requestId?: string;
|
|
26
|
+
readonly retryAfter?: number;
|
|
27
|
+
/** `retryAfter` is the Retry-After header in seconds, when present. */
|
|
28
|
+
constructor(message: string, status: number, code: string, details?: unknown, requestId?: string, retryAfter?: number);
|
|
29
|
+
}
|
|
30
|
+
/** Node.js client. Mutations are never retried automatically. */
|
|
31
|
+
export declare class Revdoku {
|
|
32
|
+
/** Full generated API for less common operations and HTTP response access. */
|
|
33
|
+
readonly api: DefaultApi;
|
|
34
|
+
private readonly accountId?;
|
|
35
|
+
private readonly timeoutMs;
|
|
36
|
+
/** Local development storage can use HTTP only when the API itself does. */
|
|
37
|
+
private readonly localHttp;
|
|
38
|
+
constructor(options?: RevdokuOptions);
|
|
39
|
+
private signal;
|
|
40
|
+
/** Request options for the API calls of a transfer, with its timeout. */
|
|
41
|
+
private transfer;
|
|
42
|
+
private storageUrl;
|
|
43
|
+
private account;
|
|
44
|
+
listMailboxes(input?: ListMailboxesRequest, options?: RequestOptions): Promise<import("./models").ListMailboxes200Response>;
|
|
45
|
+
getMailbox(input: GetMailboxRequest, options?: RequestOptions): Promise<import("./models").CreateMailbox201Response>;
|
|
46
|
+
createMailbox(input?: Omit<MailboxCreate, 'email'> & {
|
|
47
|
+
username?: string;
|
|
48
|
+
domain?: string;
|
|
49
|
+
accountId?: string;
|
|
50
|
+
}, options?: RequestOptions): Promise<import("./models").CreateMailbox201Response>;
|
|
51
|
+
listEmails(input: ListEmailsRequest, options?: RequestOptions): Promise<import("./models").ListEmails200Response>;
|
|
52
|
+
getEmail(input: GetEmailRequest, options?: RequestOptions): Promise<import("./models").GetEmail200Response>;
|
|
53
|
+
listFiles(input: ListFilesRequest, options?: RequestOptions): Promise<import("./models").ListFiles200Response>;
|
|
54
|
+
getAttachmentDownload(input: GetEmailAttachmentDownloadRequest, options?: RequestOptions): Promise<import("./models").GetEmailOriginalDownload200Response>;
|
|
55
|
+
/**
|
|
56
|
+
* Returns attachment bytes. Does not change shared read status or write local files.
|
|
57
|
+
* `timeoutMs` applies to the API call and to the storage download.
|
|
58
|
+
*/
|
|
59
|
+
downloadAttachment(input: GetEmailAttachmentDownloadRequest, options?: TransferOptions & {
|
|
60
|
+
maxBytes?: number;
|
|
61
|
+
}): Promise<Uint8Array>;
|
|
62
|
+
/**
|
|
63
|
+
* Uploads bytes and commits a file version. Pass the mailbox version_id to protect concurrent edits.
|
|
64
|
+
* `timeoutMs` applies to each API call and to the storage upload.
|
|
65
|
+
*/
|
|
66
|
+
uploadFile(input: {
|
|
67
|
+
mailboxId: string;
|
|
68
|
+
path: string;
|
|
69
|
+
content: Uint8Array | string;
|
|
70
|
+
contentType?: string;
|
|
71
|
+
accountId?: string;
|
|
72
|
+
expectedMailboxVersion?: string;
|
|
73
|
+
}, options?: TransferOptions): Promise<SaveUploadedFile201Response>;
|
|
74
|
+
}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.Revdoku = exports.RevdokuError = void 0;
|
|
24
|
+
const node_crypto_1 = require("node:crypto");
|
|
25
|
+
const DefaultApi_1 = require("./apis/DefaultApi");
|
|
26
|
+
const runtime_1 = require("./runtime");
|
|
27
|
+
const LOCAL_HOSTS = ['localhost', '127.0.0.1', '[::1]'];
|
|
28
|
+
// Carries a per-call timeout from the request options to the fetch function.
|
|
29
|
+
const TIMEOUT = Symbol('timeoutMs');
|
|
30
|
+
function checkTimeout(value, name) {
|
|
31
|
+
if (!Number.isInteger(value) || value <= 0 || value > 2147483647)
|
|
32
|
+
throw new Error(`${name} must be an integer from 1 to 2147483647`);
|
|
33
|
+
return value;
|
|
34
|
+
}
|
|
35
|
+
const HTTP_DATE = /^[A-Za-z]{3}, \d{2} [A-Za-z]{3} \d{4} \d{2}:\d{2}:\d{2} GMT$/;
|
|
36
|
+
/** The Retry-After header in whole seconds: a number of seconds or an HTTP date. */
|
|
37
|
+
function retryAfterSeconds(value) {
|
|
38
|
+
var _a;
|
|
39
|
+
const text = (_a = value === null || value === void 0 ? void 0 : value.trim()) !== null && _a !== void 0 ? _a : '';
|
|
40
|
+
if (/^\d+$/.test(text))
|
|
41
|
+
return Number(text);
|
|
42
|
+
const date = HTTP_DATE.test(text) ? Date.parse(text) : NaN;
|
|
43
|
+
return Number.isNaN(date) ? undefined : Math.max(0, Math.ceil((date - Date.now()) / 1000));
|
|
44
|
+
}
|
|
45
|
+
class RevdokuError extends Error {
|
|
46
|
+
/** `retryAfter` is the Retry-After header in seconds, when present. */
|
|
47
|
+
constructor(message, status, code, details, requestId, retryAfter) {
|
|
48
|
+
super(message);
|
|
49
|
+
this.status = status;
|
|
50
|
+
this.code = code;
|
|
51
|
+
this.details = details;
|
|
52
|
+
this.requestId = requestId;
|
|
53
|
+
this.retryAfter = retryAfter;
|
|
54
|
+
this.name = 'RevdokuError';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.RevdokuError = RevdokuError;
|
|
58
|
+
class Api extends DefaultApi_1.DefaultApi {
|
|
59
|
+
request(options, overrides) {
|
|
60
|
+
const _super = Object.create(null, {
|
|
61
|
+
request: { get: () => super.request }
|
|
62
|
+
});
|
|
63
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
var _a, _b, _c, _d;
|
|
65
|
+
try {
|
|
66
|
+
return yield _super.request.call(this, options, overrides);
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
if (!(error instanceof runtime_1.ResponseError))
|
|
70
|
+
throw error;
|
|
71
|
+
const body = yield error.response.json().catch(() => undefined);
|
|
72
|
+
throw new RevdokuError(((_a = body === null || body === void 0 ? void 0 : body.error) === null || _a === void 0 ? void 0 : _a.message) || `HTTP ${error.response.status}`, error.response.status, ((_b = body === null || body === void 0 ? void 0 : body.error) === null || _b === void 0 ? void 0 : _b.code) || 'HTTP_ERROR', (_c = body === null || body === void 0 ? void 0 : body.error) === null || _c === void 0 ? void 0 : _c.details, (_d = body === null || body === void 0 ? void 0 : body.error) === null || _d === void 0 ? void 0 : _d.request_id, retryAfterSeconds(error.response.headers.get('Retry-After')));
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/** Node.js client. Mutations are never retried automatically. */
|
|
78
|
+
class Revdoku {
|
|
79
|
+
constructor(options = {}) {
|
|
80
|
+
var _a, _b;
|
|
81
|
+
const origin = new URL(options.baseUrl || 'https://api.revdoku.com');
|
|
82
|
+
if (origin.username || origin.password || origin.search || origin.hash || origin.pathname !== '/' ||
|
|
83
|
+
(origin.protocol !== 'https:' && !(origin.protocol === 'http:' && LOCAL_HOSTS.includes(origin.hostname))))
|
|
84
|
+
throw new Error('baseUrl must be an HTTPS origin without /v1; HTTP is allowed for localhost');
|
|
85
|
+
this.timeoutMs = checkTimeout((_a = options.timeoutMs) !== null && _a !== void 0 ? _a : 30000, 'timeoutMs');
|
|
86
|
+
this.localHttp = origin.protocol === 'http:';
|
|
87
|
+
const apiKey = (_b = options.apiKey) !== null && _b !== void 0 ? _b : process.env.REVDOKU_API_KEY;
|
|
88
|
+
if (!apiKey)
|
|
89
|
+
throw new Error('Set apiKey or REVDOKU_API_KEY');
|
|
90
|
+
this.accountId = options.accountId;
|
|
91
|
+
this.api = new Api(new runtime_1.Configuration({ basePath: origin.origin, accessToken: apiKey,
|
|
92
|
+
fetchApi: (url, init) => {
|
|
93
|
+
const _a = (init !== null && init !== void 0 ? init : {}), _b = TIMEOUT, timeoutMs = _a[_b], rest = __rest(_a, [typeof _b === "symbol" ? _b : _b + ""]);
|
|
94
|
+
return fetch(url, Object.assign(Object.assign({}, rest), { redirect: 'error', credentials: 'omit', signal: this.signal(rest.signal, timeoutMs) }));
|
|
95
|
+
} }));
|
|
96
|
+
}
|
|
97
|
+
signal(signal, timeoutMs = this.timeoutMs) {
|
|
98
|
+
const timeout = AbortSignal.timeout(timeoutMs);
|
|
99
|
+
return signal ? AbortSignal.any([signal, timeout]) : timeout;
|
|
100
|
+
}
|
|
101
|
+
/** Request options for the API calls of a transfer, with its timeout. */
|
|
102
|
+
transfer(options) {
|
|
103
|
+
const timeoutMs = options.timeoutMs === undefined ? this.timeoutMs : checkTimeout(options.timeoutMs, 'timeoutMs');
|
|
104
|
+
return { init: { signal: options.signal, [TIMEOUT]: timeoutMs }, timeoutMs };
|
|
105
|
+
}
|
|
106
|
+
storageUrl(value) {
|
|
107
|
+
const url = new URL(value);
|
|
108
|
+
const local = this.localHttp && url.protocol === 'http:' && LOCAL_HOSTS.includes(url.hostname);
|
|
109
|
+
if ((url.protocol !== 'https:' && !local) || url.username || url.password)
|
|
110
|
+
throw new Error('Expected an HTTPS storage URL without credentials');
|
|
111
|
+
return url;
|
|
112
|
+
}
|
|
113
|
+
account(input) {
|
|
114
|
+
var _a;
|
|
115
|
+
return Object.assign(Object.assign({}, input), { accountId: (_a = input.accountId) !== null && _a !== void 0 ? _a : this.accountId });
|
|
116
|
+
}
|
|
117
|
+
listMailboxes(input = {}, options = {}) {
|
|
118
|
+
return this.api.listMailboxes(this.account(input), options);
|
|
119
|
+
}
|
|
120
|
+
getMailbox(input, options = {}) {
|
|
121
|
+
return this.api.getMailbox(this.account(input), options);
|
|
122
|
+
}
|
|
123
|
+
createMailbox(input = {}, options = {}) {
|
|
124
|
+
const { username, domain, accountId } = input, mailbox = __rest(input, ["username", "domain", "accountId"]);
|
|
125
|
+
return this.api.createMailbox({ createMailboxRequest: {
|
|
126
|
+
accountId: accountId !== null && accountId !== void 0 ? accountId : this.accountId,
|
|
127
|
+
mailbox: Object.assign(Object.assign({}, mailbox), (username !== undefined || domain !== undefined ? { email: { username, domain } } : {}))
|
|
128
|
+
} }, options);
|
|
129
|
+
}
|
|
130
|
+
listEmails(input, options = {}) {
|
|
131
|
+
return this.api.listEmails(this.account(input), options);
|
|
132
|
+
}
|
|
133
|
+
getEmail(input, options = {}) {
|
|
134
|
+
return this.api.getEmail(this.account(input), options);
|
|
135
|
+
}
|
|
136
|
+
listFiles(input, options = {}) {
|
|
137
|
+
return this.api.listFiles(this.account(input), options);
|
|
138
|
+
}
|
|
139
|
+
getAttachmentDownload(input, options = {}) {
|
|
140
|
+
return this.api.getEmailAttachmentDownload(this.account(input), options);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Returns attachment bytes. Does not change shared read status or write local files.
|
|
144
|
+
* `timeoutMs` applies to the API call and to the storage download.
|
|
145
|
+
*/
|
|
146
|
+
downloadAttachment(input_1) {
|
|
147
|
+
return __awaiter(this, arguments, void 0, function* (input, options = {}) {
|
|
148
|
+
var _a, _b, _c;
|
|
149
|
+
const maxBytes = (_a = options.maxBytes) !== null && _a !== void 0 ? _a : 64 * 1024 * 1024;
|
|
150
|
+
if (!Number.isSafeInteger(maxBytes) || maxBytes < 0)
|
|
151
|
+
throw new Error('maxBytes must be a nonnegative safe integer');
|
|
152
|
+
const { init, timeoutMs } = this.transfer(options);
|
|
153
|
+
const { data: { download } } = yield this.api.getEmailAttachmentDownload(this.account(input), init);
|
|
154
|
+
if (download.sizeBytes != null && (!Number.isSafeInteger(download.sizeBytes) || download.sizeBytes < 0))
|
|
155
|
+
throw new Error('Invalid attachment size in download metadata');
|
|
156
|
+
if (download.sizeBytes != null && download.sizeBytes > maxBytes)
|
|
157
|
+
throw new Error('Attachment exceeds maxBytes');
|
|
158
|
+
const response = yield fetch(this.storageUrl(download.url), { redirect: 'error', credentials: 'omit',
|
|
159
|
+
signal: this.signal(options.signal, timeoutMs) });
|
|
160
|
+
if (response.status !== 200) {
|
|
161
|
+
yield ((_b = response.body) === null || _b === void 0 ? void 0 : _b.cancel());
|
|
162
|
+
throw new Error(`Attachment download failed: HTTP ${response.status}`);
|
|
163
|
+
}
|
|
164
|
+
const reader = (_c = response.body) === null || _c === void 0 ? void 0 : _c.getReader();
|
|
165
|
+
const chunks = [];
|
|
166
|
+
let length = 0;
|
|
167
|
+
if (reader) {
|
|
168
|
+
try {
|
|
169
|
+
for (;;) {
|
|
170
|
+
const { done, value } = yield reader.read();
|
|
171
|
+
if (done)
|
|
172
|
+
break;
|
|
173
|
+
length += value.length;
|
|
174
|
+
if (length > maxBytes)
|
|
175
|
+
throw new Error('Attachment exceeds maxBytes');
|
|
176
|
+
chunks.push(value);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
catch (error) {
|
|
180
|
+
yield reader.cancel().catch(() => { });
|
|
181
|
+
throw error;
|
|
182
|
+
}
|
|
183
|
+
finally {
|
|
184
|
+
reader.releaseLock();
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
if (download.sizeBytes != null && length !== download.sizeBytes)
|
|
188
|
+
throw new Error('Attachment size does not match the download metadata');
|
|
189
|
+
const bytes = new Uint8Array(length);
|
|
190
|
+
let offset = 0;
|
|
191
|
+
for (const chunk of chunks) {
|
|
192
|
+
bytes.set(chunk, offset);
|
|
193
|
+
offset += chunk.length;
|
|
194
|
+
}
|
|
195
|
+
return bytes;
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Uploads bytes and commits a file version. Pass the mailbox version_id to protect concurrent edits.
|
|
200
|
+
* `timeoutMs` applies to each API call and to the storage upload.
|
|
201
|
+
*/
|
|
202
|
+
uploadFile(input_1) {
|
|
203
|
+
return __awaiter(this, arguments, void 0, function* (input, options = {}) {
|
|
204
|
+
var _a, _b;
|
|
205
|
+
if (!input.path || input.path.startsWith('/') || input.path.includes('\\') ||
|
|
206
|
+
input.path.split('/').some(part => !part || part === '..' || part === '.'))
|
|
207
|
+
throw new Error('path must be a mailbox-relative file path');
|
|
208
|
+
if (typeof input.content !== 'string' && !(input.content instanceof Uint8Array))
|
|
209
|
+
throw new TypeError('content must be a string or a Uint8Array');
|
|
210
|
+
const { init, timeoutMs } = this.transfer(options);
|
|
211
|
+
const bytes = typeof input.content === 'string' ? Buffer.from(input.content, 'utf8') : Buffer.from(input.content);
|
|
212
|
+
const accountId = (_a = input.accountId) !== null && _a !== void 0 ? _a : this.accountId;
|
|
213
|
+
const prepared = yield this.api.prepareFileUpload({ prepareFileUploadRequest: {
|
|
214
|
+
mailboxId: input.mailboxId, accountId, path: input.path,
|
|
215
|
+
blob: { filename: input.path.split('/').pop(), byteSize: bytes.length,
|
|
216
|
+
contentType: input.contentType || 'application/octet-stream', purpose: 'mailbox_file',
|
|
217
|
+
checksum: (0, node_crypto_1.createHash)('md5').update(bytes).digest('base64'), sha256: (0, node_crypto_1.createHash)('sha256').update(bytes).digest('hex') }
|
|
218
|
+
} }, init);
|
|
219
|
+
if (prepared.data.skipped && prepared.data.duplicate && prepared.data.file && prepared.data.version) {
|
|
220
|
+
return { success: true, data: { file: prepared.data.file, version: prepared.data.version,
|
|
221
|
+
created: false, duplicate: true } };
|
|
222
|
+
}
|
|
223
|
+
const upload = prepared.data.directUpload;
|
|
224
|
+
if (!upload || !prepared.data.signedId)
|
|
225
|
+
throw new Error('Upload preparation did not return a storage destination');
|
|
226
|
+
const headers = new Headers(upload.headers);
|
|
227
|
+
if (headers.has('authorization') || headers.has('cookie'))
|
|
228
|
+
throw new Error('Unexpected credentials in storage upload headers');
|
|
229
|
+
const response = yield fetch(this.storageUrl(upload.url), { method: 'PUT', headers,
|
|
230
|
+
body: new Uint8Array(bytes).buffer, redirect: 'error', credentials: 'omit', signal: this.signal(options.signal, timeoutMs) });
|
|
231
|
+
yield ((_b = response.body) === null || _b === void 0 ? void 0 : _b.cancel());
|
|
232
|
+
if (!response.ok)
|
|
233
|
+
throw new Error(`Storage upload failed: HTTP ${response.status}`);
|
|
234
|
+
return this.api.saveUploadedFile({ mailboxId: input.mailboxId, saveUploadedFileRequest: {
|
|
235
|
+
accountId, path: input.path, signedBlobId: prepared.data.signedId,
|
|
236
|
+
expectedMailboxVersion: input.expectedMailboxVersion
|
|
237
|
+
} }, init);
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
exports.Revdoku = Revdoku;
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/* tslint:disable */
|
|
18
|
+
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./runtime"), exports);
|
|
20
|
+
__exportStar(require("./apis/index"), exports);
|
|
21
|
+
__exportStar(require("./models/index"), exports);
|
|
22
|
+
__exportStar(require("./client"), exports);
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Revdoku API
|
|
3
|
+
* Mailboxes for AI agents, with private file storage. Create mailboxes, read and reply to email, and store files. Guide: https://revdoku.com/api.md. Create an account at https://app.revdoku.com/users/sign_up.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.2.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { AccountIdentityPermissions } from './AccountIdentityPermissions';
|
|
13
|
+
import type { AccountIdentityAgencyAccount } from './AccountIdentityAgencyAccount';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface AccountIdentity
|
|
18
|
+
*/
|
|
19
|
+
export interface AccountIdentity {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
* Account name, separate from the client person or business.
|
|
26
|
+
*/
|
|
27
|
+
name: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
accountKind: AccountIdentityAccountKindEnum;
|
|
32
|
+
/**
|
|
33
|
+
* Client person or business name, or null when unset.
|
|
34
|
+
*/
|
|
35
|
+
clientName: string | null;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
agencyAccount: AccountIdentityAgencyAccount | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
region?: string | null;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
status?: AccountIdentityStatusEnum;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
permissions?: AccountIdentityPermissions;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* @export
|
|
55
|
+
*/
|
|
56
|
+
export declare const AccountIdentityAccountKindEnum: {
|
|
57
|
+
readonly Standard: "standard";
|
|
58
|
+
readonly Agency: "agency";
|
|
59
|
+
readonly Client: "client";
|
|
60
|
+
};
|
|
61
|
+
export type AccountIdentityAccountKindEnum = typeof AccountIdentityAccountKindEnum[keyof typeof AccountIdentityAccountKindEnum];
|
|
62
|
+
/**
|
|
63
|
+
* @export
|
|
64
|
+
*/
|
|
65
|
+
export declare const AccountIdentityStatusEnum: {
|
|
66
|
+
readonly Active: "active";
|
|
67
|
+
readonly ReadOnly: "read_only";
|
|
68
|
+
};
|
|
69
|
+
export type AccountIdentityStatusEnum = typeof AccountIdentityStatusEnum[keyof typeof AccountIdentityStatusEnum];
|
|
70
|
+
/**
|
|
71
|
+
* Check if a given object implements the AccountIdentity interface.
|
|
72
|
+
*/
|
|
73
|
+
export declare function instanceOfAccountIdentity(value: object): value is AccountIdentity;
|
|
74
|
+
export declare function AccountIdentityFromJSON(json: any): AccountIdentity;
|
|
75
|
+
export declare function AccountIdentityFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountIdentity;
|
|
76
|
+
export declare function AccountIdentityToJSON(json: any): AccountIdentity;
|
|
77
|
+
export declare function AccountIdentityToJSONTyped(value?: AccountIdentity | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Revdoku API
|
|
6
|
+
* Mailboxes for AI agents, with private file storage. Create mailboxes, read and reply to email, and store files. Guide: https://revdoku.com/api.md. Create an account at https://app.revdoku.com/users/sign_up.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.2.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.AccountIdentityStatusEnum = exports.AccountIdentityAccountKindEnum = void 0;
|
|
17
|
+
exports.instanceOfAccountIdentity = instanceOfAccountIdentity;
|
|
18
|
+
exports.AccountIdentityFromJSON = AccountIdentityFromJSON;
|
|
19
|
+
exports.AccountIdentityFromJSONTyped = AccountIdentityFromJSONTyped;
|
|
20
|
+
exports.AccountIdentityToJSON = AccountIdentityToJSON;
|
|
21
|
+
exports.AccountIdentityToJSONTyped = AccountIdentityToJSONTyped;
|
|
22
|
+
const AccountIdentityPermissions_1 = require("./AccountIdentityPermissions");
|
|
23
|
+
const AccountIdentityAgencyAccount_1 = require("./AccountIdentityAgencyAccount");
|
|
24
|
+
/**
|
|
25
|
+
* @export
|
|
26
|
+
*/
|
|
27
|
+
exports.AccountIdentityAccountKindEnum = {
|
|
28
|
+
Standard: 'standard',
|
|
29
|
+
Agency: 'agency',
|
|
30
|
+
Client: 'client',
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
exports.AccountIdentityStatusEnum = {
|
|
36
|
+
Active: 'active',
|
|
37
|
+
ReadOnly: 'read_only',
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Check if a given object implements the AccountIdentity interface.
|
|
41
|
+
*/
|
|
42
|
+
function instanceOfAccountIdentity(value) {
|
|
43
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
46
|
+
return false;
|
|
47
|
+
if ((!('accountKind' in value) && !('account_kind' in value)) || (value['accountKind'] === undefined && value['account_kind'] === undefined))
|
|
48
|
+
return false;
|
|
49
|
+
if ((!('clientName' in value) && !('client_name' in value)) || (value['clientName'] === undefined && value['client_name'] === undefined))
|
|
50
|
+
return false;
|
|
51
|
+
if ((!('agencyAccount' in value) && !('agency_account' in value)) || (value['agencyAccount'] === undefined && value['agency_account'] === undefined))
|
|
52
|
+
return false;
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
function AccountIdentityFromJSON(json) {
|
|
56
|
+
return AccountIdentityFromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
function AccountIdentityFromJSONTyped(json, ignoreDiscriminator) {
|
|
59
|
+
if (json == null) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
'id': json['id'],
|
|
64
|
+
'name': json['name'],
|
|
65
|
+
'accountKind': json['account_kind'],
|
|
66
|
+
'clientName': json['client_name'],
|
|
67
|
+
'agencyAccount': (0, AccountIdentityAgencyAccount_1.AccountIdentityAgencyAccountFromJSON)(json['agency_account']),
|
|
68
|
+
'region': json['region'] === undefined ? undefined : json['region'] === null ? null : json['region'],
|
|
69
|
+
'status': json['status'] == null ? undefined : json['status'],
|
|
70
|
+
'permissions': json['permissions'] == null ? undefined : (0, AccountIdentityPermissions_1.AccountIdentityPermissionsFromJSON)(json['permissions']),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function AccountIdentityToJSON(json) {
|
|
74
|
+
return AccountIdentityToJSONTyped(json, false);
|
|
75
|
+
}
|
|
76
|
+
function AccountIdentityToJSONTyped(value, ignoreDiscriminator = false) {
|
|
77
|
+
if (value == null) {
|
|
78
|
+
return value;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
'id': value['id'],
|
|
82
|
+
'name': value['name'],
|
|
83
|
+
'account_kind': value['accountKind'],
|
|
84
|
+
'client_name': value['clientName'],
|
|
85
|
+
'agency_account': (0, AccountIdentityAgencyAccount_1.AccountIdentityAgencyAccountToJSON)(value['agencyAccount']),
|
|
86
|
+
'region': value['region'],
|
|
87
|
+
'status': value['status'],
|
|
88
|
+
'permissions': (0, AccountIdentityPermissions_1.AccountIdentityPermissionsToJSON)(value['permissions']),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Revdoku API
|
|
3
|
+
* Mailboxes for AI agents, with private file storage. Create mailboxes, read and reply to email, and store files. Guide: https://revdoku.com/api.md. Create an account at https://app.revdoku.com/users/sign_up.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 2.2.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Parent agency only when granted to this credential. Null does not make a client independent.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface AccountIdentityAgencyAccount
|
|
16
|
+
*/
|
|
17
|
+
export interface AccountIdentityAgencyAccount {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
id?: string;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
name?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Check if a given object implements the AccountIdentityAgencyAccount interface.
|
|
29
|
+
*/
|
|
30
|
+
export declare function instanceOfAccountIdentityAgencyAccount(value: object): value is AccountIdentityAgencyAccount;
|
|
31
|
+
export declare function AccountIdentityAgencyAccountFromJSON(json: any): AccountIdentityAgencyAccount;
|
|
32
|
+
export declare function AccountIdentityAgencyAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccountIdentityAgencyAccount;
|
|
33
|
+
export declare function AccountIdentityAgencyAccountToJSON(json: any): AccountIdentityAgencyAccount;
|
|
34
|
+
export declare function AccountIdentityAgencyAccountToJSONTyped(value?: AccountIdentityAgencyAccount | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Revdoku API
|
|
6
|
+
* Mailboxes for AI agents, with private file storage. Create mailboxes, read and reply to email, and store files. Guide: https://revdoku.com/api.md. Create an account at https://app.revdoku.com/users/sign_up.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 2.2.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfAccountIdentityAgencyAccount = instanceOfAccountIdentityAgencyAccount;
|
|
17
|
+
exports.AccountIdentityAgencyAccountFromJSON = AccountIdentityAgencyAccountFromJSON;
|
|
18
|
+
exports.AccountIdentityAgencyAccountFromJSONTyped = AccountIdentityAgencyAccountFromJSONTyped;
|
|
19
|
+
exports.AccountIdentityAgencyAccountToJSON = AccountIdentityAgencyAccountToJSON;
|
|
20
|
+
exports.AccountIdentityAgencyAccountToJSONTyped = AccountIdentityAgencyAccountToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the AccountIdentityAgencyAccount interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfAccountIdentityAgencyAccount(value) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
function AccountIdentityAgencyAccountFromJSON(json) {
|
|
28
|
+
return AccountIdentityAgencyAccountFromJSONTyped(json, false);
|
|
29
|
+
}
|
|
30
|
+
function AccountIdentityAgencyAccountFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if (json == null) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
36
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function AccountIdentityAgencyAccountToJSON(json) {
|
|
40
|
+
return AccountIdentityAgencyAccountToJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function AccountIdentityAgencyAccountToJSONTyped(value, ignoreDiscriminator = false) {
|
|
43
|
+
if (value == null) {
|
|
44
|
+
return value;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'id': value['id'],
|
|
48
|
+
'name': value['name'],
|
|
49
|
+
};
|
|
50
|
+
}
|