@internxt/sdk 1.16.1 → 1.16.2

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.
@@ -110,12 +110,13 @@ export declare class MailApi {
110
110
  address: string;
111
111
  }>;
112
112
  /**
113
- * Gets the mail account keys for the given address
113
+ * Gets the mail account keys for the given address. When omitted, the
114
+ * backend returns the keys for the caller's default address.
114
115
  *
115
- * @param address - The mail address whose keys should be retrieved
116
+ * @param address - Optional. The mail address whose keys should be retrieved
116
117
  * @returns The public, encrypted private and recovery keys plus the salt
117
118
  */
118
- getMailAccountKeys(address: string): Promise<MailAccountKeysResponse>;
119
+ getMailAccountKeys(address?: string): Promise<MailAccountKeysResponse>;
119
120
  /**
120
121
  * Returns the needed headers for the module requests
121
122
  * @private
@@ -147,13 +147,15 @@ class MailApi {
147
147
  return this.client.post('/users/me/mail-account', payload, this.headers());
148
148
  }
149
149
  /**
150
- * Gets the mail account keys for the given address
150
+ * Gets the mail account keys for the given address. When omitted, the
151
+ * backend returns the keys for the caller's default address.
151
152
  *
152
- * @param address - The mail address whose keys should be retrieved
153
+ * @param address - Optional. The mail address whose keys should be retrieved
153
154
  * @returns The public, encrypted private and recovery keys plus the salt
154
155
  */
155
156
  getMailAccountKeys(address) {
156
- return this.client.getWithParams('/users/me/mail-account/keys', { address }, this.headers());
157
+ const params = address ? { address } : {};
158
+ return this.client.getWithParams('/users/me/mail-account/keys', params, this.headers());
157
159
  }
158
160
  /**
159
161
  * Returns the needed headers for the module requests
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.16.1",
4
+ "version": "1.16.2",
5
5
  "description": "An sdk for interacting with Internxt's services",
6
6
  "repository": {
7
7
  "type": "git",
@@ -50,4 +50,4 @@
50
50
  "prettier --write"
51
51
  ]
52
52
  }
53
- }
53
+ }