@3sixty/mailbox-models 0.0.0-stage → 0.20.0-next.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.
Files changed (175) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +24 -2
  3. package/dist/es/factories/emailConsumerFactory.js +9 -0
  4. package/dist/es/factories/emailConsumerFactory.js.map +1 -0
  5. package/dist/es/factories/emailProtocolConnectorConfigSchemaFactory.js +9 -0
  6. package/dist/es/factories/emailProtocolConnectorConfigSchemaFactory.js.map +1 -0
  7. package/dist/es/factories/emailProtocolConnectorFactory.js +9 -0
  8. package/dist/es/factories/emailProtocolConnectorFactory.js.map +1 -0
  9. package/dist/es/factories/emailProtocolConnectorStateSchemaFactory.js +11 -0
  10. package/dist/es/factories/emailProtocolConnectorStateSchemaFactory.js.map +1 -0
  11. package/dist/es/index.js +44 -0
  12. package/dist/es/index.js.map +1 -0
  13. package/dist/es/models/IEmail.js +2 -0
  14. package/dist/es/models/IEmail.js.map +1 -0
  15. package/dist/es/models/IEmailAddress.js +4 -0
  16. package/dist/es/models/IEmailAddress.js.map +1 -0
  17. package/dist/es/models/IEmailAttachment.js +4 -0
  18. package/dist/es/models/IEmailAttachment.js.map +1 -0
  19. package/dist/es/models/IEmailConsumer.js +2 -0
  20. package/dist/es/models/IEmailConsumer.js.map +1 -0
  21. package/dist/es/models/IEmailHeader.js +4 -0
  22. package/dist/es/models/IEmailHeader.js.map +1 -0
  23. package/dist/es/models/IEmailProtocolConnector.js +2 -0
  24. package/dist/es/models/IEmailProtocolConnector.js.map +1 -0
  25. package/dist/es/models/IEmailProtocolConnectorAuthCallback.js +2 -0
  26. package/dist/es/models/IEmailProtocolConnectorAuthCallback.js.map +1 -0
  27. package/dist/es/models/IEmailProtocolConnectorAuthState.js +4 -0
  28. package/dist/es/models/IEmailProtocolConnectorAuthState.js.map +1 -0
  29. package/dist/es/models/IEmailProtocolConnectorOptions.js +4 -0
  30. package/dist/es/models/IEmailProtocolConnectorOptions.js.map +1 -0
  31. package/dist/es/models/IEmailProtocolConnectorRetrievalCallback.js +2 -0
  32. package/dist/es/models/IEmailProtocolConnectorRetrievalCallback.js.map +1 -0
  33. package/dist/es/models/IMailStorageComponent.js +2 -0
  34. package/dist/es/models/IMailStorageComponent.js.map +1 -0
  35. package/dist/es/models/IMailbox.js +2 -0
  36. package/dist/es/models/IMailbox.js.map +1 -0
  37. package/dist/es/models/IMailboxComponent.js +2 -0
  38. package/dist/es/models/IMailboxComponent.js.map +1 -0
  39. package/dist/es/models/IMailboxConfigField.js +2 -0
  40. package/dist/es/models/IMailboxConfigField.js.map +1 -0
  41. package/dist/es/models/IMailboxCreateResult.js +4 -0
  42. package/dist/es/models/IMailboxCreateResult.js.map +1 -0
  43. package/dist/es/models/IMailboxUpdateResult.js +4 -0
  44. package/dist/es/models/IMailboxUpdateResult.js.map +1 -0
  45. package/dist/es/models/IStoredEmail.js +2 -0
  46. package/dist/es/models/IStoredEmail.js.map +1 -0
  47. package/dist/es/models/api/IMailStorageGetRequest.js +4 -0
  48. package/dist/es/models/api/IMailStorageGetRequest.js.map +1 -0
  49. package/dist/es/models/api/IMailStorageGetResponse.js +2 -0
  50. package/dist/es/models/api/IMailStorageGetResponse.js.map +1 -0
  51. package/dist/es/models/api/IMailStorageListRequest.js +4 -0
  52. package/dist/es/models/api/IMailStorageListRequest.js.map +1 -0
  53. package/dist/es/models/api/IMailStorageListResponse.js +2 -0
  54. package/dist/es/models/api/IMailStorageListResponse.js.map +1 -0
  55. package/dist/es/models/api/IMailStorageRemoveRequest.js +4 -0
  56. package/dist/es/models/api/IMailStorageRemoveRequest.js.map +1 -0
  57. package/dist/es/models/api/IMailboxCompleteAuthRequest.js +4 -0
  58. package/dist/es/models/api/IMailboxCompleteAuthRequest.js.map +1 -0
  59. package/dist/es/models/api/IMailboxConnectorSchemaRequest.js +4 -0
  60. package/dist/es/models/api/IMailboxConnectorSchemaRequest.js.map +1 -0
  61. package/dist/es/models/api/IMailboxConnectorSchemaResponse.js +2 -0
  62. package/dist/es/models/api/IMailboxConnectorSchemaResponse.js.map +1 -0
  63. package/dist/es/models/api/IMailboxCreateRequest.js +2 -0
  64. package/dist/es/models/api/IMailboxCreateRequest.js.map +1 -0
  65. package/dist/es/models/api/IMailboxCreateResponse.js +2 -0
  66. package/dist/es/models/api/IMailboxCreateResponse.js.map +1 -0
  67. package/dist/es/models/api/IMailboxGetRequest.js +4 -0
  68. package/dist/es/models/api/IMailboxGetRequest.js.map +1 -0
  69. package/dist/es/models/api/IMailboxGetResponse.js +2 -0
  70. package/dist/es/models/api/IMailboxGetResponse.js.map +1 -0
  71. package/dist/es/models/api/IMailboxListRequest.js +4 -0
  72. package/dist/es/models/api/IMailboxListRequest.js.map +1 -0
  73. package/dist/es/models/api/IMailboxListResponse.js +2 -0
  74. package/dist/es/models/api/IMailboxListResponse.js.map +1 -0
  75. package/dist/es/models/api/IMailboxRemoveRequest.js +4 -0
  76. package/dist/es/models/api/IMailboxRemoveRequest.js.map +1 -0
  77. package/dist/es/models/api/IMailboxUpdateRequest.js +2 -0
  78. package/dist/es/models/api/IMailboxUpdateRequest.js.map +1 -0
  79. package/dist/es/models/api/IMailboxUpdateResponse.js +2 -0
  80. package/dist/es/models/api/IMailboxUpdateResponse.js.map +1 -0
  81. package/dist/es/models/mailboxMetricIds.js +13 -0
  82. package/dist/es/models/mailboxMetricIds.js.map +1 -0
  83. package/dist/es/models/mailboxMetrics.js +16 -0
  84. package/dist/es/models/mailboxMetrics.js.map +1 -0
  85. package/dist/es/utils/mailHelper.js +92 -0
  86. package/dist/es/utils/mailHelper.js.map +1 -0
  87. package/dist/types/factories/emailConsumerFactory.d.ts +6 -0
  88. package/dist/types/factories/emailProtocolConnectorConfigSchemaFactory.d.ts +6 -0
  89. package/dist/types/factories/emailProtocolConnectorFactory.d.ts +6 -0
  90. package/dist/types/factories/emailProtocolConnectorStateSchemaFactory.d.ts +8 -0
  91. package/dist/types/index.d.ts +41 -0
  92. package/dist/types/models/IEmail.d.ts +80 -0
  93. package/dist/types/models/IEmailAddress.d.ts +13 -0
  94. package/dist/types/models/IEmailAttachment.d.ts +17 -0
  95. package/dist/types/models/IEmailConsumer.d.ts +11 -0
  96. package/dist/types/models/IEmailHeader.d.ts +17 -0
  97. package/dist/types/models/IEmailProtocolConnector.d.ts +50 -0
  98. package/dist/types/models/IEmailProtocolConnectorAuthCallback.d.ts +12 -0
  99. package/dist/types/models/IEmailProtocolConnectorAuthState.d.ts +12 -0
  100. package/dist/types/models/IEmailProtocolConnectorOptions.d.ts +19 -0
  101. package/dist/types/models/IEmailProtocolConnectorRetrievalCallback.d.ts +10 -0
  102. package/dist/types/models/IMailStorageComponent.d.ts +39 -0
  103. package/dist/types/models/IMailbox.d.ts +46 -0
  104. package/dist/types/models/IMailboxComponent.d.ts +71 -0
  105. package/dist/types/models/IMailboxConfigField.d.ts +30 -0
  106. package/dist/types/models/IMailboxCreateResult.d.ts +15 -0
  107. package/dist/types/models/IMailboxUpdateResult.d.ts +11 -0
  108. package/dist/types/models/IStoredEmail.d.ts +18 -0
  109. package/dist/types/models/api/IMailStorageGetRequest.d.ts +14 -0
  110. package/dist/types/models/api/IMailStorageGetResponse.d.ts +10 -0
  111. package/dist/types/models/api/IMailStorageListRequest.d.ts +26 -0
  112. package/dist/types/models/api/IMailStorageListResponse.d.ts +19 -0
  113. package/dist/types/models/api/IMailStorageRemoveRequest.d.ts +14 -0
  114. package/dist/types/models/api/IMailboxCompleteAuthRequest.d.ts +16 -0
  115. package/dist/types/models/api/IMailboxConnectorSchemaRequest.d.ts +14 -0
  116. package/dist/types/models/api/IMailboxConnectorSchemaResponse.d.ts +10 -0
  117. package/dist/types/models/api/IMailboxCreateRequest.d.ts +10 -0
  118. package/dist/types/models/api/IMailboxCreateResponse.d.ts +29 -0
  119. package/dist/types/models/api/IMailboxGetRequest.d.ts +14 -0
  120. package/dist/types/models/api/IMailboxGetResponse.d.ts +10 -0
  121. package/dist/types/models/api/IMailboxListRequest.d.ts +18 -0
  122. package/dist/types/models/api/IMailboxListResponse.d.ts +19 -0
  123. package/dist/types/models/api/IMailboxRemoveRequest.d.ts +14 -0
  124. package/dist/types/models/api/IMailboxUpdateRequest.d.ts +19 -0
  125. package/dist/types/models/api/IMailboxUpdateResponse.d.ts +20 -0
  126. package/dist/types/models/mailboxMetricIds.d.ts +13 -0
  127. package/dist/types/models/mailboxMetrics.d.ts +5 -0
  128. package/dist/types/utils/mailHelper.d.ts +41 -0
  129. package/docs/changelog.md +0 -0
  130. package/docs/examples.md +145 -0
  131. package/docs/reference/classes/MailHelper.md +118 -0
  132. package/docs/reference/index.md +55 -0
  133. package/docs/reference/interfaces/IEmail.md +151 -0
  134. package/docs/reference/interfaces/IEmailAddress.md +19 -0
  135. package/docs/reference/interfaces/IEmailAttachment.md +27 -0
  136. package/docs/reference/interfaces/IEmailConsumer.md +21 -0
  137. package/docs/reference/interfaces/IEmailHeader.md +27 -0
  138. package/docs/reference/interfaces/IEmailProtocolConnector.md +154 -0
  139. package/docs/reference/interfaces/IEmailProtocolConnectorAuthState.md +14 -0
  140. package/docs/reference/interfaces/IEmailProtocolConnectorOptions.md +25 -0
  141. package/docs/reference/interfaces/IMailStorageComponent.md +119 -0
  142. package/docs/reference/interfaces/IMailStorageGetRequest.md +17 -0
  143. package/docs/reference/interfaces/IMailStorageGetResponse.md +11 -0
  144. package/docs/reference/interfaces/IMailStorageListRequest.md +35 -0
  145. package/docs/reference/interfaces/IMailStorageListResponse.md +23 -0
  146. package/docs/reference/interfaces/IMailStorageRemoveRequest.md +17 -0
  147. package/docs/reference/interfaces/IMailbox.md +97 -0
  148. package/docs/reference/interfaces/IMailboxCompleteAuthRequest.md +22 -0
  149. package/docs/reference/interfaces/IMailboxComponent.md +191 -0
  150. package/docs/reference/interfaces/IMailboxConfigField.md +51 -0
  151. package/docs/reference/interfaces/IMailboxConnectorSchemaRequest.md +17 -0
  152. package/docs/reference/interfaces/IMailboxConnectorSchemaResponse.md +11 -0
  153. package/docs/reference/interfaces/IMailboxCreateRequest.md +11 -0
  154. package/docs/reference/interfaces/IMailboxCreateResponse.md +40 -0
  155. package/docs/reference/interfaces/IMailboxCreateResult.md +21 -0
  156. package/docs/reference/interfaces/IMailboxGetRequest.md +17 -0
  157. package/docs/reference/interfaces/IMailboxGetResponse.md +11 -0
  158. package/docs/reference/interfaces/IMailboxListRequest.md +23 -0
  159. package/docs/reference/interfaces/IMailboxListResponse.md +23 -0
  160. package/docs/reference/interfaces/IMailboxRemoveRequest.md +17 -0
  161. package/docs/reference/interfaces/IMailboxUpdateRequest.md +25 -0
  162. package/docs/reference/interfaces/IMailboxUpdateResponse.md +26 -0
  163. package/docs/reference/interfaces/IMailboxUpdateResult.md +13 -0
  164. package/docs/reference/interfaces/IStoredEmail.md +247 -0
  165. package/docs/reference/type-aliases/IEmailProtocolConnectorAuthCallback.md +48 -0
  166. package/docs/reference/type-aliases/IEmailProtocolConnectorRetrievalCallback.md +35 -0
  167. package/docs/reference/type-aliases/MailboxMetricIds.md +5 -0
  168. package/docs/reference/variables/EmailConsumerFactory.md +5 -0
  169. package/docs/reference/variables/EmailProtocolConnectorConfigSchemaFactory.md +5 -0
  170. package/docs/reference/variables/EmailProtocolConnectorFactory.md +5 -0
  171. package/docs/reference/variables/EmailProtocolConnectorStateSchemaFactory.md +7 -0
  172. package/docs/reference/variables/MailboxMetricIds.md +13 -0
  173. package/docs/reference/variables/MailboxMetrics.md +5 -0
  174. package/locales/en.json +1 -0
  175. package/package.json +54 -5
@@ -0,0 +1,191 @@
1
+ # Interface: IMailboxComponent
2
+
3
+ Interface describing the mailbox management component.
4
+
5
+ ## Extends
6
+
7
+ - `IComponent`
8
+
9
+ ## Methods
10
+
11
+ ### createMailbox() {#createmailbox}
12
+
13
+ > **createMailbox**(`mailbox`): `Promise`\<[`IMailboxCreateResult`](IMailboxCreateResult.md)\>
14
+
15
+ Create a new mailbox and begin polling for it.
16
+ Connectors whose credentials are issued by an external flow are asked to start it here, so
17
+ the URL the user has to open is returned to the caller which created the mailbox instead of
18
+ only surfacing once the first poll has run.
19
+
20
+ #### Parameters
21
+
22
+ ##### mailbox
23
+
24
+ `Pick`\<[`IMailbox`](IMailbox.md), `"name"` \| `"connectorType"` \| `"config"` \| `"enabled"`\>
25
+
26
+ The mailbox configuration to create.
27
+
28
+ #### Returns
29
+
30
+ `Promise`\<[`IMailboxCreateResult`](IMailboxCreateResult.md)\>
31
+
32
+ The identifier assigned to the new mailbox, with the URL to open when the mailbox
33
+ must be authenticated before it can be polled.
34
+
35
+ ***
36
+
37
+ ### updateMailbox() {#updatemailbox}
38
+
39
+ > **updateMailbox**(`mailbox`): `Promise`\<[`IMailboxUpdateResult`](IMailboxUpdateResult.md)\>
40
+
41
+ Update an existing mailbox.
42
+ An update replaces the credentials the mailbox authenticates with, so a connector whose
43
+ credentials are issued by an external flow is asked to start a new one, and the URL the
44
+ user has to open is returned the same way it is when the mailbox is created.
45
+
46
+ #### Parameters
47
+
48
+ ##### mailbox
49
+
50
+ [`IMailbox`](IMailbox.md)
51
+
52
+ The updated mailbox configuration.
53
+
54
+ #### Returns
55
+
56
+ `Promise`\<[`IMailboxUpdateResult`](IMailboxUpdateResult.md)\>
57
+
58
+ The URL to open when the mailbox must be authenticated before it can be polled.
59
+
60
+ ***
61
+
62
+ ### removeMailbox() {#removemailbox}
63
+
64
+ > **removeMailbox**(`id`): `Promise`\<`void`\>
65
+
66
+ Remove a mailbox and stop polling for it.
67
+
68
+ #### Parameters
69
+
70
+ ##### id
71
+
72
+ `string`
73
+
74
+ The identifier of the mailbox to remove.
75
+
76
+ #### Returns
77
+
78
+ `Promise`\<`void`\>
79
+
80
+ A promise that resolves when the mailbox has been removed.
81
+
82
+ ***
83
+
84
+ ### getMailbox() {#getmailbox}
85
+
86
+ > **getMailbox**(`id`): `Promise`\<[`IMailbox`](IMailbox.md)\<`unknown`, `unknown`, `unknown`\>\>
87
+
88
+ Retrieve a mailbox by its identifier.
89
+
90
+ #### Parameters
91
+
92
+ ##### id
93
+
94
+ `string`
95
+
96
+ The identifier of the mailbox to retrieve.
97
+
98
+ #### Returns
99
+
100
+ `Promise`\<[`IMailbox`](IMailbox.md)\<`unknown`, `unknown`, `unknown`\>\>
101
+
102
+ The mailbox.
103
+
104
+ ***
105
+
106
+ ### listMailboxes() {#listmailboxes}
107
+
108
+ > **listMailboxes**(`cursor?`, `limit?`): `Promise`\<\{ `mailboxes`: [`IMailbox`](IMailbox.md)\<`unknown`, `unknown`, `unknown`\>[]; `cursor?`: `string`; \}\>
109
+
110
+ List all mailboxes with optional cursor-based pagination.
111
+
112
+ #### Parameters
113
+
114
+ ##### cursor?
115
+
116
+ `string`
117
+
118
+ An optional cursor for paginated results.
119
+
120
+ ##### limit?
121
+
122
+ `number`
123
+
124
+ An optional maximum number of results to return.
125
+
126
+ #### Returns
127
+
128
+ `Promise`\<\{ `mailboxes`: [`IMailbox`](IMailbox.md)\<`unknown`, `unknown`, `unknown`\>[]; `cursor?`: `string`; \}\>
129
+
130
+ A page of mailboxes and an optional cursor for the next page.
131
+
132
+ ***
133
+
134
+ ### completeAuth() {#completeauth}
135
+
136
+ > **completeAuth**(`authPayload`): `Promise`\<`void`\>
137
+
138
+ Complete an authentication flow for a mailbox awaiting authentication.
139
+ The mailbox is correlated from the payload's state property, which the connector placed in
140
+ the external flow when it produced its auth state, and which names the partition as well as
141
+ the mailbox. The connector exchanges the payload for its credentials, which are stored on
142
+ the mailbox state, and polling restarts.
143
+
144
+ #### Parameters
145
+
146
+ ##### authPayload
147
+
148
+ `unknown`
149
+
150
+ The data handed to the callback URI, carrying the correlating state.
151
+
152
+ #### Returns
153
+
154
+ `Promise`\<`void`\>
155
+
156
+ A promise that resolves when the mailbox has been authenticated.
157
+
158
+ #### Throws
159
+
160
+ NotFoundError if the correlated mailbox does not exist.
161
+
162
+ #### Throws
163
+
164
+ GeneralError if the mailbox is not awaiting authentication, or its connector has no
165
+ authentication flow.
166
+
167
+ ***
168
+
169
+ ### getSchema() {#getschema}
170
+
171
+ > **getSchema**(`connectorType`): `Promise`\<[`IMailboxConfigField`](IMailboxConfigField.md)[]\>
172
+
173
+ Get the configuration schema for a connector type.
174
+
175
+ #### Parameters
176
+
177
+ ##### connectorType
178
+
179
+ `string`
180
+
181
+ The connector type to get the schema for.
182
+
183
+ #### Returns
184
+
185
+ `Promise`\<[`IMailboxConfigField`](IMailboxConfigField.md)[]\>
186
+
187
+ The configuration field definitions for the connector.
188
+
189
+ #### Throws
190
+
191
+ NotFoundError if no schema is registered for the connector type.
@@ -0,0 +1,51 @@
1
+ # Interface: IMailboxConfigField
2
+
3
+ Interface describing a single configuration field for a protocol connector.
4
+
5
+ ## Properties
6
+
7
+ ### labelKey {#labelkey}
8
+
9
+ > **labelKey**: `string`
10
+
11
+ The i18n key for the field label shown in the UI.
12
+
13
+ ***
14
+
15
+ ### propertyKey {#propertykey}
16
+
17
+ > **propertyKey**: `string`
18
+
19
+ The key of the property within the connector config object.
20
+
21
+ ***
22
+
23
+ ### type {#type}
24
+
25
+ > **type**: `EntitySchemaPropertyType`
26
+
27
+ The entity schema property type for this field.
28
+
29
+ ***
30
+
31
+ ### isSecure? {#issecure}
32
+
33
+ > `optional` **isSecure?**: `boolean`
34
+
35
+ Whether this field holds a sensitive value that should be stored in the vault.
36
+
37
+ ***
38
+
39
+ ### itemType? {#itemtype}
40
+
41
+ > `optional` **itemType?**: `EntitySchemaPropertyType`
42
+
43
+ The element type when `type` is `Array`.
44
+
45
+ ***
46
+
47
+ ### defaultValue? {#defaultvalue}
48
+
49
+ > `optional` **defaultValue?**: `unknown`
50
+
51
+ An optional default value for the field.
@@ -0,0 +1,17 @@
1
+ # Interface: IMailboxConnectorSchemaRequest
2
+
3
+ Request to retrieve the configuration schema for a connector.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams {#pathparams}
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters.
12
+
13
+ #### connectorType
14
+
15
+ > **connectorType**: `string`
16
+
17
+ The connector type identifier.
@@ -0,0 +1,11 @@
1
+ # Interface: IMailboxConnectorSchemaResponse
2
+
3
+ Response from retrieving a connector configuration schema.
4
+
5
+ ## Properties
6
+
7
+ ### body {#body}
8
+
9
+ > **body**: [`IMailboxConfigField`](IMailboxConfigField.md)[]
10
+
11
+ The schema fields for the connector.
@@ -0,0 +1,11 @@
1
+ # Interface: IMailboxCreateRequest
2
+
3
+ Request to create a new mailbox.
4
+
5
+ ## Properties
6
+
7
+ ### body {#body}
8
+
9
+ > **body**: `Pick`\<[`IMailbox`](IMailbox.md), `"name"` \| `"connectorType"` \| `"config"` \| `"enabled"`\>
10
+
11
+ The mailbox to create.
@@ -0,0 +1,40 @@
1
+ # Interface: IMailboxCreateResponse
2
+
3
+ Response to creating a new mailbox.
4
+
5
+ ## Properties
6
+
7
+ ### statusCode {#statuscode}
8
+
9
+ > **statusCode**: `201`
10
+
11
+ Response status code.
12
+
13
+ ***
14
+
15
+ ### headers {#headers}
16
+
17
+ > **headers**: `object`
18
+
19
+ Additional response headers.
20
+
21
+ #### location
22
+
23
+ > **location**: `string`
24
+
25
+ The location where the mailbox was created.
26
+
27
+ ***
28
+
29
+ ### body {#body}
30
+
31
+ > **body**: `object`
32
+
33
+ The body of the response.
34
+
35
+ #### authUrl?
36
+
37
+ > `optional` **authUrl?**: `string`
38
+
39
+ The URL to open for the user when the mailbox must complete an external authentication
40
+ flow, such as an OAuth consent URL, before it can be polled.
@@ -0,0 +1,21 @@
1
+ # Interface: IMailboxCreateResult
2
+
3
+ The outcome of creating a mailbox.
4
+
5
+ ## Properties
6
+
7
+ ### id {#id}
8
+
9
+ > **id**: `string`
10
+
11
+ The identifier assigned to the new mailbox.
12
+
13
+ ***
14
+
15
+ ### authUrl? {#authurl}
16
+
17
+ > `optional` **authUrl?**: `string`
18
+
19
+ The URL to open for the user when the mailbox cannot be polled until an external
20
+ authentication flow has completed, such as an OAuth consent URL. Absent when the supplied
21
+ configuration is already sufficient to poll the mailbox.
@@ -0,0 +1,17 @@
1
+ # Interface: IMailboxGetRequest
2
+
3
+ Request to retrieve a mailbox by ID.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams {#pathparams}
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters.
12
+
13
+ #### id
14
+
15
+ > **id**: `string`
16
+
17
+ The identifier of the mailbox to retrieve.
@@ -0,0 +1,11 @@
1
+ # Interface: IMailboxGetResponse
2
+
3
+ Response from retrieving a mailbox.
4
+
5
+ ## Properties
6
+
7
+ ### body {#body}
8
+
9
+ > **body**: [`IMailbox`](IMailbox.md)
10
+
11
+ The retrieved mailbox.
@@ -0,0 +1,23 @@
1
+ # Interface: IMailboxListRequest
2
+
3
+ Request to list mailboxes with optional pagination.
4
+
5
+ ## Properties
6
+
7
+ ### query? {#query}
8
+
9
+ > `optional` **query?**: `object`
10
+
11
+ The query parameters.
12
+
13
+ #### cursor?
14
+
15
+ > `optional` **cursor?**: `string`
16
+
17
+ The cursor for paginated results.
18
+
19
+ #### limit?
20
+
21
+ > `optional` **limit?**: `string`
22
+
23
+ The maximum number of results to return.
@@ -0,0 +1,23 @@
1
+ # Interface: IMailboxListResponse
2
+
3
+ Response from listing mailboxes.
4
+
5
+ ## Properties
6
+
7
+ ### body {#body}
8
+
9
+ > **body**: `object`
10
+
11
+ The result body.
12
+
13
+ #### mailboxes
14
+
15
+ > **mailboxes**: [`IMailbox`](IMailbox.md)\<`unknown`, `unknown`, `unknown`\>[]
16
+
17
+ The list of mailboxes.
18
+
19
+ #### cursor?
20
+
21
+ > `optional` **cursor?**: `string`
22
+
23
+ The cursor for the next page of results.
@@ -0,0 +1,17 @@
1
+ # Interface: IMailboxRemoveRequest
2
+
3
+ Request to remove a mailbox.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams {#pathparams}
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters.
12
+
13
+ #### id
14
+
15
+ > **id**: `string`
16
+
17
+ The identifier of the mailbox to remove.
@@ -0,0 +1,25 @@
1
+ # Interface: IMailboxUpdateRequest
2
+
3
+ Request to update an existing mailbox.
4
+
5
+ ## Properties
6
+
7
+ ### pathParams {#pathparams}
8
+
9
+ > **pathParams**: `object`
10
+
11
+ The path parameters.
12
+
13
+ #### id
14
+
15
+ > **id**: `string`
16
+
17
+ The identifier of the mailbox to update.
18
+
19
+ ***
20
+
21
+ ### body {#body}
22
+
23
+ > **body**: [`IMailbox`](IMailbox.md)
24
+
25
+ The updated mailbox configuration.
@@ -0,0 +1,26 @@
1
+ # Interface: IMailboxUpdateResponse
2
+
3
+ Response to updating a mailbox.
4
+
5
+ ## Properties
6
+
7
+ ### statusCode {#statuscode}
8
+
9
+ > **statusCode**: `200`
10
+
11
+ Response status code.
12
+
13
+ ***
14
+
15
+ ### body {#body}
16
+
17
+ > **body**: `object`
18
+
19
+ The body of the response.
20
+
21
+ #### authUrl?
22
+
23
+ > `optional` **authUrl?**: `string`
24
+
25
+ The URL to open for the user when the updated mailbox must complete an external
26
+ authentication flow, such as an OAuth consent URL, before it can be polled.
@@ -0,0 +1,13 @@
1
+ # Interface: IMailboxUpdateResult
2
+
3
+ The outcome of updating a mailbox.
4
+
5
+ ## Properties
6
+
7
+ ### authUrl? {#authurl}
8
+
9
+ > `optional` **authUrl?**: `string`
10
+
11
+ The URL to open for the user when the updated mailbox cannot be polled until an external
12
+ authentication flow has completed, such as an OAuth consent URL. Absent when the updated
13
+ configuration is already sufficient to poll the mailbox.