@remit/data-ports 0.0.71 → 0.0.73

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/data-ports",
3
- "version": "0.0.71",
3
+ "version": "0.0.73",
4
4
  "type": "module",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
package/src/index.ts CHANGED
@@ -100,6 +100,7 @@ export type {
100
100
  CreateFilterInput,
101
101
  CreateLabelInput,
102
102
  CreateMailboxInput,
103
+ CreateMailboxResult,
103
104
  CreateMessageFlagInput,
104
105
  CreateMessageInput,
105
106
  CreateMessageLabelInput,
@@ -1,5 +1,6 @@
1
1
  import type {
2
2
  CreateMailboxInput,
3
+ CreateMailboxResult,
3
4
  MailboxItem,
4
5
  MailboxSubtreeTransitionIntent,
5
6
  MailboxTransitionIntent,
@@ -8,7 +9,7 @@ import type {
8
9
  } from "../types.js";
9
10
 
10
11
  export interface IMailboxRepository {
11
- create(input: CreateMailboxInput): Promise<MailboxItem>;
12
+ create(input: CreateMailboxInput): Promise<CreateMailboxResult>;
12
13
  get(accountId: string, mailboxId: string): Promise<MailboxItem>;
13
14
  get(accountId: string, mailboxIds: string[]): Promise<MailboxItem[]>;
14
15
  /**
package/src/types.ts CHANGED
@@ -208,10 +208,12 @@ export type CreateAccountInput = Omit<
208
208
  | "smtpStartTls"
209
209
  | "smtpUsername"
210
210
  | "syncedServices"
211
+ | "grantedScopes"
211
212
  > & {
212
213
  accountId?: string;
213
214
  authType?: AccountItem["authType"];
214
215
  syncedServices?: AccountItem["syncedServices"];
216
+ grantedScopes?: AccountItem["grantedScopes"];
215
217
  smtpEnabled?: AccountItem["smtpEnabled"];
216
218
  smtpHost?: AccountItem["smtpHost"];
217
219
  smtpPort?: AccountItem["smtpPort"];
@@ -386,6 +388,10 @@ export type CreateMailboxInput = Omit<
386
388
  syncStatus?: MailboxItem["syncStatus"];
387
389
  };
388
390
 
391
+ export type CreateMailboxResult =
392
+ | { outcome: "Created"; mailbox: MailboxItem }
393
+ | { outcome: "PathTaken" };
394
+
389
395
  /**
390
396
  * Everything about a mailbox that is not its mutation state.
391
397
  *