@internxt/sdk 1.15.11 → 1.15.13

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.
@@ -71,6 +71,12 @@ export type StoragePlan = {
71
71
  isTeam: boolean;
72
72
  isLifetime: boolean;
73
73
  renewalPeriod: RenewalPeriod;
74
+ commitment: {
75
+ enabled: boolean;
76
+ isFirstMonth?: boolean;
77
+ remainingMonths?: number;
78
+ cancellationDate?: string | null;
79
+ };
74
80
  storageLimit: number;
75
81
  amountOfSeats: number;
76
82
  isAppSumo?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { ApiSecurity, ApiUrl, AppDetails } from '../shared';
2
2
  import { EncryptedKeystore, KeystoreType, HybridEncryptedEmail, PwdProtectedEmail, RecipientWithPublicKey, EmailPublicParameters } from 'internxt-crypto';
3
- import { MailboxResponse, EmailListResponse, EmailResponse, EmailCreatedResponse, SendEmailRequest, DraftEmailRequest, UpdateEmailRequest, ListEmailsQuery, EmailDomainsResponse, SetupMailAccountPayload, SearchFiltersQuery } from './types';
3
+ import { MailboxResponse, EmailListResponse, EmailResponse, EmailCreatedResponse, SendEmailRequest, DraftEmailRequest, UpdateEmailRequest, ListEmailsQuery, EmailDomainsResponse, SetupMailAccountPayload, SearchFiltersQuery, MailAccountKeysResponse } from './types';
4
4
  export declare class MailApi {
5
5
  private readonly client;
6
6
  private readonly appDetails;
@@ -111,6 +111,13 @@ export declare class MailApi {
111
111
  setupMailAccount(payload: SetupMailAccountPayload): Promise<{
112
112
  address: string;
113
113
  }>;
114
+ /**
115
+ * Gets the mail account keys for the given address
116
+ *
117
+ * @param address - The mail address whose keys should be retrieved
118
+ * @returns The public, encrypted private and recovery keys plus the salt
119
+ */
120
+ getMailAccountKeys(address: string): Promise<MailAccountKeysResponse>;
114
121
  /**
115
122
  * Returns the needed headers for the module requests
116
123
  * @private
package/dist/mail/api.js CHANGED
@@ -257,6 +257,19 @@ var MailApi = /** @class */ (function () {
257
257
  });
258
258
  });
259
259
  };
260
+ /**
261
+ * Gets the mail account keys for the given address
262
+ *
263
+ * @param address - The mail address whose keys should be retrieved
264
+ * @returns The public, encrypted private and recovery keys plus the salt
265
+ */
266
+ MailApi.prototype.getMailAccountKeys = function (address) {
267
+ return __awaiter(this, void 0, void 0, function () {
268
+ return __generator(this, function (_a) {
269
+ return [2 /*return*/, this.client.getWithParams('/users/me/mail-account/keys', { address: address }, this.headers())];
270
+ });
271
+ });
272
+ };
260
273
  /**
261
274
  * Returns the needed headers for the module requests
262
275
  * @private
@@ -1,6 +1,6 @@
1
1
  import { ApiSecurity, ApiUrl, AppDetails } from '../shared';
2
2
  import { EncryptedKeystore, KeystoreType, HybridEncryptedEmail, PwdProtectedEmail, HybridKeyPair, Email, RecipientWithPublicKey, EmailPublicParameters } from 'internxt-crypto';
3
- import { MailboxResponse, EmailListResponse, EmailResponse, EmailCreatedResponse, SendEmailRequest, DraftEmailRequest, UpdateEmailRequest, ListEmailsQuery, SearchFiltersQuery, EmailDomainsResponse, SetupMailAccountPayload } from './types';
3
+ import { MailboxResponse, EmailListResponse, EmailResponse, EmailCreatedResponse, SendEmailRequest, DraftEmailRequest, UpdateEmailRequest, ListEmailsQuery, SearchFiltersQuery, EmailDomainsResponse, SetupMailAccountPayload, MailAccountKeysResponse } from './types';
4
4
  export declare class Mail {
5
5
  private readonly api;
6
6
  static client(apiUrl: ApiUrl, appDetails: AppDetails, apiSecurity: ApiSecurity): Mail;
@@ -152,4 +152,11 @@ export declare class Mail {
152
152
  setupMailAccount(payload: SetupMailAccountPayload): Promise<{
153
153
  address: string;
154
154
  }>;
155
+ /**
156
+ * Gets the mail account keys for the given address
157
+ *
158
+ * @param address - The mail address whose keys should be retrieved
159
+ * @returns The public, encrypted private and recovery keys plus the salt
160
+ */
161
+ getMailAccountKeys(address: string): Promise<MailAccountKeysResponse>;
155
162
  }
package/dist/mail/mail.js CHANGED
@@ -364,6 +364,19 @@ var Mail = /** @class */ (function () {
364
364
  });
365
365
  });
366
366
  };
367
+ /**
368
+ * Gets the mail account keys for the given address
369
+ *
370
+ * @param address - The mail address whose keys should be retrieved
371
+ * @returns The public, encrypted private and recovery keys plus the salt
372
+ */
373
+ Mail.prototype.getMailAccountKeys = function (address) {
374
+ return __awaiter(this, void 0, void 0, function () {
375
+ return __generator(this, function (_a) {
376
+ return [2 /*return*/, this.api.getMailAccountKeys(address)];
377
+ });
378
+ });
379
+ };
367
380
  return Mail;
368
381
  }());
369
382
  exports.Mail = Mail;
@@ -20,6 +20,11 @@ export type SetupMailAccountPayload = {
20
20
  publicKey: string;
21
21
  encryptionPrivateKey: string;
22
22
  recoveryPrivateKey: string;
23
- salt: string;
24
23
  };
25
24
  };
25
+ export type MailAccountKeysResponse = {
26
+ address: string;
27
+ publicKey: string;
28
+ encryptionPrivateKey: string;
29
+ recoveryPrivateKey: string;
30
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@internxt/sdk",
3
3
  "author": "Internxt <hello@internxt.com>",
4
- "version": "1.15.11",
4
+ "version": "1.15.13",
5
5
  "description": "An sdk for interacting with Internxt's services",
6
6
  "repository": {
7
7
  "type": "git",