@remit/data-ports 0.0.71 → 0.0.72

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.72",
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
@@ -386,6 +386,10 @@ export type CreateMailboxInput = Omit<
386
386
  syncStatus?: MailboxItem["syncStatus"];
387
387
  };
388
388
 
389
+ export type CreateMailboxResult =
390
+ | { outcome: "Created"; mailbox: MailboxItem }
391
+ | { outcome: "PathTaken" };
392
+
389
393
  /**
390
394
  * Everything about a mailbox that is not its mutation state.
391
395
  *