@mobilerun/sdk 5.3.0 → 5.5.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 (274) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +5 -5
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +5 -5
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/apps.d.mts +10 -2
  12. package/resources/apps.d.mts.map +1 -1
  13. package/resources/apps.d.ts +10 -2
  14. package/resources/apps.d.ts.map +1 -1
  15. package/resources/apps.js +3 -1
  16. package/resources/apps.js.map +1 -1
  17. package/resources/apps.mjs +3 -1
  18. package/resources/apps.mjs.map +1 -1
  19. package/resources/assistant/conversations.d.mts +26 -4
  20. package/resources/assistant/conversations.d.mts.map +1 -1
  21. package/resources/assistant/conversations.d.ts +26 -4
  22. package/resources/assistant/conversations.d.ts.map +1 -1
  23. package/resources/assistant/conversations.js +12 -4
  24. package/resources/assistant/conversations.js.map +1 -1
  25. package/resources/assistant/conversations.mjs +12 -4
  26. package/resources/assistant/conversations.mjs.map +1 -1
  27. package/resources/connect/proxies.d.mts +36 -20
  28. package/resources/connect/proxies.d.mts.map +1 -1
  29. package/resources/connect/proxies.d.ts +36 -20
  30. package/resources/connect/proxies.d.ts.map +1 -1
  31. package/resources/connect/proxies.js +10 -2
  32. package/resources/connect/proxies.js.map +1 -1
  33. package/resources/connect/proxies.mjs +10 -2
  34. package/resources/connect/proxies.mjs.map +1 -1
  35. package/resources/devices/apps.d.mts +37 -17
  36. package/resources/devices/apps.d.mts.map +1 -1
  37. package/resources/devices/apps.d.ts +37 -17
  38. package/resources/devices/apps.d.ts.map +1 -1
  39. package/resources/devices/apps.js +15 -14
  40. package/resources/devices/apps.js.map +1 -1
  41. package/resources/devices/apps.mjs +15 -14
  42. package/resources/devices/apps.mjs.map +1 -1
  43. package/resources/devices/devices.d.mts +29 -4
  44. package/resources/devices/devices.d.mts.map +1 -1
  45. package/resources/devices/devices.d.ts +29 -4
  46. package/resources/devices/devices.d.ts.map +1 -1
  47. package/resources/devices/devices.js +7 -4
  48. package/resources/devices/devices.js.map +1 -1
  49. package/resources/devices/devices.mjs +7 -4
  50. package/resources/devices/devices.mjs.map +1 -1
  51. package/resources/devices/index.d.mts +1 -0
  52. package/resources/devices/index.d.mts.map +1 -1
  53. package/resources/devices/index.d.ts +1 -0
  54. package/resources/devices/index.d.ts.map +1 -1
  55. package/resources/devices/index.js +3 -1
  56. package/resources/devices/index.js.map +1 -1
  57. package/resources/devices/index.mjs +1 -0
  58. package/resources/devices/index.mjs.map +1 -1
  59. package/resources/devices/keyboard.d.mts +9 -3
  60. package/resources/devices/keyboard.d.mts.map +1 -1
  61. package/resources/devices/keyboard.d.ts +9 -3
  62. package/resources/devices/keyboard.d.ts.map +1 -1
  63. package/resources/devices/keyboard.js +3 -3
  64. package/resources/devices/keyboard.mjs +3 -3
  65. package/resources/devices/recordings.d.mts +11 -0
  66. package/resources/devices/recordings.d.mts.map +1 -1
  67. package/resources/devices/recordings.d.ts +11 -0
  68. package/resources/devices/recordings.d.ts.map +1 -1
  69. package/resources/devices/traffic-sessions.d.mts +173 -0
  70. package/resources/devices/traffic-sessions.d.mts.map +1 -0
  71. package/resources/devices/traffic-sessions.d.ts +173 -0
  72. package/resources/devices/traffic-sessions.d.ts.map +1 -0
  73. package/resources/devices/traffic-sessions.js +43 -0
  74. package/resources/devices/traffic-sessions.js.map +1 -0
  75. package/resources/devices/traffic-sessions.mjs +39 -0
  76. package/resources/devices/traffic-sessions.mjs.map +1 -0
  77. package/resources/files.d.mts +72 -0
  78. package/resources/files.d.mts.map +1 -1
  79. package/resources/files.d.ts +72 -0
  80. package/resources/files.d.ts.map +1 -1
  81. package/resources/index.d.mts +2 -2
  82. package/resources/index.d.mts.map +1 -1
  83. package/resources/index.d.ts +2 -2
  84. package/resources/index.d.ts.map +1 -1
  85. package/resources/index.js +3 -3
  86. package/resources/index.js.map +1 -1
  87. package/resources/index.mjs +1 -1
  88. package/resources/index.mjs.map +1 -1
  89. package/resources/mailboxes/index.d.mts +3 -0
  90. package/resources/mailboxes/index.d.mts.map +1 -0
  91. package/resources/mailboxes/index.d.ts +3 -0
  92. package/resources/mailboxes/index.d.ts.map +1 -0
  93. package/resources/{esims → mailboxes}/index.js +3 -3
  94. package/resources/mailboxes/index.js.map +1 -0
  95. package/resources/{esims → mailboxes}/index.mjs +1 -1
  96. package/resources/mailboxes/index.mjs.map +1 -0
  97. package/resources/mailboxes/mailboxes.d.mts +374 -0
  98. package/resources/mailboxes/mailboxes.d.mts.map +1 -0
  99. package/resources/mailboxes/mailboxes.d.ts +374 -0
  100. package/resources/mailboxes/mailboxes.d.ts.map +1 -0
  101. package/resources/mailboxes/mailboxes.js +139 -0
  102. package/resources/mailboxes/mailboxes.js.map +1 -0
  103. package/resources/mailboxes/mailboxes.mjs +134 -0
  104. package/resources/mailboxes/mailboxes.mjs.map +1 -0
  105. package/resources/mailboxes/messages.d.mts +82 -0
  106. package/resources/mailboxes/messages.d.mts.map +1 -0
  107. package/resources/mailboxes/messages.d.ts +82 -0
  108. package/resources/mailboxes/messages.d.ts.map +1 -0
  109. package/resources/mailboxes/messages.js +39 -0
  110. package/resources/mailboxes/messages.js.map +1 -0
  111. package/resources/mailboxes/messages.mjs +35 -0
  112. package/resources/mailboxes/messages.mjs.map +1 -0
  113. package/resources/mailboxes.d.mts +2 -0
  114. package/resources/mailboxes.d.mts.map +1 -0
  115. package/resources/mailboxes.d.ts +2 -0
  116. package/resources/mailboxes.d.ts.map +1 -0
  117. package/resources/{esims.js → mailboxes.js} +2 -2
  118. package/resources/mailboxes.js.map +1 -0
  119. package/resources/{esims.mjs → mailboxes.mjs} +2 -2
  120. package/resources/mailboxes.mjs.map +1 -0
  121. package/resources/messages/conversations.d.mts +4 -15
  122. package/resources/messages/conversations.d.mts.map +1 -1
  123. package/resources/messages/conversations.d.ts +4 -15
  124. package/resources/messages/conversations.d.ts.map +1 -1
  125. package/resources/messages/conversations.js +4 -15
  126. package/resources/messages/conversations.js.map +1 -1
  127. package/resources/messages/conversations.mjs +4 -15
  128. package/resources/messages/conversations.mjs.map +1 -1
  129. package/resources/messages/messages.d.mts +2 -4
  130. package/resources/messages/messages.d.mts.map +1 -1
  131. package/resources/messages/messages.d.ts +2 -4
  132. package/resources/messages/messages.d.ts.map +1 -1
  133. package/resources/messages/messages.js +2 -4
  134. package/resources/messages/messages.js.map +1 -1
  135. package/resources/messages/messages.mjs +2 -4
  136. package/resources/messages/messages.mjs.map +1 -1
  137. package/resources/numbers/index.d.mts +1 -1
  138. package/resources/numbers/index.d.mts.map +1 -1
  139. package/resources/numbers/index.d.ts +1 -1
  140. package/resources/numbers/index.d.ts.map +1 -1
  141. package/resources/numbers/index.js.map +1 -1
  142. package/resources/numbers/index.mjs.map +1 -1
  143. package/resources/numbers/numbers.d.mts +48 -35
  144. package/resources/numbers/numbers.d.mts.map +1 -1
  145. package/resources/numbers/numbers.d.ts +48 -35
  146. package/resources/numbers/numbers.d.ts.map +1 -1
  147. package/resources/numbers/numbers.js +23 -29
  148. package/resources/numbers/numbers.js.map +1 -1
  149. package/resources/numbers/numbers.mjs +23 -29
  150. package/resources/numbers/numbers.mjs.map +1 -1
  151. package/resources/tasks/tasks.d.mts +80 -32
  152. package/resources/tasks/tasks.d.mts.map +1 -1
  153. package/resources/tasks/tasks.d.ts +80 -32
  154. package/resources/tasks/tasks.d.ts.map +1 -1
  155. package/resources/tasks/tasks.js.map +1 -1
  156. package/resources/tasks/tasks.mjs.map +1 -1
  157. package/resources/webhooks/webhooks.d.mts +1 -0
  158. package/resources/webhooks/webhooks.d.mts.map +1 -1
  159. package/resources/webhooks/webhooks.d.ts +1 -0
  160. package/resources/webhooks/webhooks.d.ts.map +1 -1
  161. package/resources/webhooks/webhooks.js.map +1 -1
  162. package/resources/webhooks/webhooks.mjs.map +1 -1
  163. package/resources/workflows/events.d.mts +18 -0
  164. package/resources/workflows/events.d.mts.map +1 -1
  165. package/resources/workflows/events.d.ts +18 -0
  166. package/resources/workflows/events.d.ts.map +1 -1
  167. package/resources/workflows/executions.d.mts +84 -5
  168. package/resources/workflows/executions.d.mts.map +1 -1
  169. package/resources/workflows/executions.d.ts +84 -5
  170. package/resources/workflows/executions.d.ts.map +1 -1
  171. package/resources/workflows/executions.js +3 -2
  172. package/resources/workflows/executions.js.map +1 -1
  173. package/resources/workflows/executions.mjs +3 -2
  174. package/resources/workflows/executions.mjs.map +1 -1
  175. package/resources/workflows/flows/actions.d.mts +19 -0
  176. package/resources/workflows/flows/actions.d.mts.map +1 -1
  177. package/resources/workflows/flows/actions.d.ts +19 -0
  178. package/resources/workflows/flows/actions.d.ts.map +1 -1
  179. package/resources/workflows/flows/flows.d.mts +142 -2
  180. package/resources/workflows/flows/flows.d.mts.map +1 -1
  181. package/resources/workflows/flows/flows.d.ts +142 -2
  182. package/resources/workflows/flows/flows.d.ts.map +1 -1
  183. package/resources/workflows/flows/flows.js +11 -1
  184. package/resources/workflows/flows/flows.js.map +1 -1
  185. package/resources/workflows/flows/flows.mjs +11 -1
  186. package/resources/workflows/flows/flows.mjs.map +1 -1
  187. package/resources/workflows/flows/index.d.mts +1 -1
  188. package/resources/workflows/flows/index.d.mts.map +1 -1
  189. package/resources/workflows/flows/index.d.ts +1 -1
  190. package/resources/workflows/flows/index.d.ts.map +1 -1
  191. package/resources/workflows/flows/index.js.map +1 -1
  192. package/resources/workflows/flows/index.mjs.map +1 -1
  193. package/resources/workflows/index.d.mts +1 -1
  194. package/resources/workflows/index.d.mts.map +1 -1
  195. package/resources/workflows/index.d.ts +1 -1
  196. package/resources/workflows/index.d.ts.map +1 -1
  197. package/resources/workflows/index.js.map +1 -1
  198. package/resources/workflows/index.mjs.map +1 -1
  199. package/resources/workflows/triggers.d.mts +17 -3
  200. package/resources/workflows/triggers.d.mts.map +1 -1
  201. package/resources/workflows/triggers.d.ts +17 -3
  202. package/resources/workflows/triggers.d.ts.map +1 -1
  203. package/resources/workflows/workflows.d.mts +2 -2
  204. package/resources/workflows/workflows.d.mts.map +1 -1
  205. package/resources/workflows/workflows.d.ts +2 -2
  206. package/resources/workflows/workflows.d.ts.map +1 -1
  207. package/resources/workflows/workflows.js.map +1 -1
  208. package/resources/workflows/workflows.mjs.map +1 -1
  209. package/src/client.ts +40 -40
  210. package/src/resources/apps.ts +11 -2
  211. package/src/resources/assistant/conversations.ts +38 -4
  212. package/src/resources/connect/proxies.ts +49 -21
  213. package/src/resources/devices/apps.ts +41 -17
  214. package/src/resources/devices/devices.ts +58 -4
  215. package/src/resources/devices/index.ts +11 -0
  216. package/src/resources/devices/keyboard.ts +10 -3
  217. package/src/resources/devices/recordings.ts +12 -0
  218. package/src/resources/devices/traffic-sessions.ts +299 -0
  219. package/src/resources/files.ts +114 -0
  220. package/src/resources/index.ts +19 -19
  221. package/src/resources/mailboxes/index.ts +26 -0
  222. package/src/resources/mailboxes/mailboxes.ts +637 -0
  223. package/src/resources/mailboxes/messages.ts +134 -0
  224. package/src/resources/{esims.ts → mailboxes.ts} +1 -1
  225. package/src/resources/messages/conversations.ts +4 -15
  226. package/src/resources/messages/messages.ts +2 -4
  227. package/src/resources/numbers/index.ts +2 -0
  228. package/src/resources/numbers/numbers.ts +58 -34
  229. package/src/resources/tasks/tasks.ts +120 -40
  230. package/src/resources/webhooks/webhooks.ts +2 -0
  231. package/src/resources/workflows/events.ts +24 -0
  232. package/src/resources/workflows/executions.ts +121 -5
  233. package/src/resources/workflows/flows/actions.ts +26 -0
  234. package/src/resources/workflows/flows/flows.ts +182 -1
  235. package/src/resources/workflows/flows/index.ts +1 -0
  236. package/src/resources/workflows/index.ts +1 -0
  237. package/src/resources/workflows/triggers.ts +19 -3
  238. package/src/resources/workflows/workflows.ts +2 -0
  239. package/src/version.ts +1 -1
  240. package/version.d.mts +1 -1
  241. package/version.d.ts +1 -1
  242. package/version.js +1 -1
  243. package/version.mjs +1 -1
  244. package/resources/esims/esims.d.mts +0 -566
  245. package/resources/esims/esims.d.mts.map +0 -1
  246. package/resources/esims/esims.d.ts +0 -566
  247. package/resources/esims/esims.d.ts.map +0 -1
  248. package/resources/esims/esims.js +0 -205
  249. package/resources/esims/esims.js.map +0 -1
  250. package/resources/esims/esims.mjs +0 -200
  251. package/resources/esims/esims.mjs.map +0 -1
  252. package/resources/esims/index.d.mts +0 -3
  253. package/resources/esims/index.d.mts.map +0 -1
  254. package/resources/esims/index.d.ts +0 -3
  255. package/resources/esims/index.d.ts.map +0 -1
  256. package/resources/esims/index.js.map +0 -1
  257. package/resources/esims/index.mjs.map +0 -1
  258. package/resources/esims/messages.d.mts +0 -106
  259. package/resources/esims/messages.d.mts.map +0 -1
  260. package/resources/esims/messages.d.ts +0 -106
  261. package/resources/esims/messages.d.ts.map +0 -1
  262. package/resources/esims/messages.js +0 -37
  263. package/resources/esims/messages.js.map +0 -1
  264. package/resources/esims/messages.mjs +0 -33
  265. package/resources/esims/messages.mjs.map +0 -1
  266. package/resources/esims.d.mts +0 -2
  267. package/resources/esims.d.mts.map +0 -1
  268. package/resources/esims.d.ts +0 -2
  269. package/resources/esims.d.ts.map +0 -1
  270. package/resources/esims.js.map +0 -1
  271. package/resources/esims.mjs.map +0 -1
  272. package/src/resources/esims/esims.ts +0 -1019
  273. package/src/resources/esims/index.ts +0 -28
  274. package/src/resources/esims/messages.ts +0 -187
@@ -0,0 +1,374 @@
1
+ import { APIResource } from "../../core/resource.js";
2
+ import * as Shared from "../shared.js";
3
+ import * as MessagesAPI from "./messages.js";
4
+ import { MessageListParams, MessageListResponse, MessageRetrieveParams, MessageRetrieveResponse, Messages } from "./messages.js";
5
+ import { APIPromise } from "../../core/api-promise.js";
6
+ import { RequestOptions } from "../../internal/request-options.js";
7
+ export declare class Mailboxes extends APIResource {
8
+ messages: MessagesAPI.Messages;
9
+ /**
10
+ * Creates a mailbox on the default domain or a connected custom domain. An
11
+ * optional `localPart` selects the address. Replaying the same `clientRequestId`
12
+ * and payload returns the original mailbox. Poll the mailbox when a 202 response
13
+ * does not yet include a checkout URL.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const mailbox = await client.mailboxes.create({
18
+ * clientRequestId: 'x',
19
+ * });
20
+ * ```
21
+ */
22
+ create(body: MailboxCreateParams, options?: RequestOptions): APIPromise<MailboxCreateResponse>;
23
+ /**
24
+ * Get a mailbox
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const mailbox = await client.mailboxes.retrieve(
29
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
30
+ * );
31
+ * ```
32
+ */
33
+ retrieve(mailboxID: string, options?: RequestOptions): APIPromise<MailboxRetrieveResponse>;
34
+ /**
35
+ * Updates the label of a mailbox.
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const mailbox = await client.mailboxes.update(
40
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
41
+ * { label: 'label' },
42
+ * );
43
+ * ```
44
+ */
45
+ update(mailboxID: string, body: MailboxUpdateParams, options?: RequestOptions): APIPromise<MailboxUpdateResponse>;
46
+ /**
47
+ * Lists the caller-owned mailboxes with page-based pagination.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * const mailboxes = await client.mailboxes.list();
52
+ * ```
53
+ */
54
+ list(query?: MailboxListParams | null | undefined, options?: RequestOptions): APIPromise<MailboxListResponse>;
55
+ /**
56
+ * Cancels a pending mailbox or schedules an active paid mailbox for cancellation.
57
+ * Existing addresses and messages are retained. Repeating the request is safe.
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * const mailbox = await client.mailboxes.delete(
62
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
63
+ * );
64
+ * ```
65
+ */
66
+ delete(mailboxID: string, options?: RequestOptions): APIPromise<MailboxDeleteResponse>;
67
+ /**
68
+ * Returns the number of mailboxes currently available through included capacity.
69
+ *
70
+ * @example
71
+ * ```ts
72
+ * const response = await client.mailboxes.capacity();
73
+ * ```
74
+ */
75
+ capacity(options?: RequestOptions): APIPromise<MailboxCapacityResponse>;
76
+ /**
77
+ * Returns the most likely recent OTP for the mailbox. Returns 204 when no matching
78
+ * code is available.
79
+ *
80
+ * @example
81
+ * ```ts
82
+ * const response = await client.mailboxes.otp(
83
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
84
+ * );
85
+ * ```
86
+ */
87
+ otp(mailboxID: string, query?: MailboxOtpParams | null | undefined, options?: RequestOptions): APIPromise<MailboxOtpResponse>;
88
+ /**
89
+ * Restarts an archived mailbox with the same address. Uses included capacity when
90
+ * available unless paid service is requested.
91
+ *
92
+ * @example
93
+ * ```ts
94
+ * const response = await client.mailboxes.restart(
95
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
96
+ * );
97
+ * ```
98
+ */
99
+ restart(mailboxID: string, body?: MailboxRestartParams | null | undefined, options?: RequestOptions): APIPromise<MailboxRestartResponse>;
100
+ /**
101
+ * Withdraws a scheduled cancellation. Only available while cancellation is
102
+ * pending.
103
+ *
104
+ * @example
105
+ * ```ts
106
+ * const response = await client.mailboxes.uncancel(
107
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
108
+ * );
109
+ * ```
110
+ */
111
+ uncancel(mailboxID: string, options?: RequestOptions): APIPromise<MailboxUncancelResponse>;
112
+ }
113
+ export interface MailboxCreateResponse {
114
+ data: MailboxCreateResponse.Data;
115
+ }
116
+ export declare namespace MailboxCreateResponse {
117
+ interface Data {
118
+ id: string;
119
+ address: string | null;
120
+ billingMode: 'rent' | 'included' | 'domain';
121
+ cancelAtPeriodEnd: boolean;
122
+ checkoutExpiresAt: string | null;
123
+ checkoutUrl: string | null;
124
+ createdAt: string;
125
+ currentPeriodEnd: string | null;
126
+ domainId: string | null;
127
+ inboundMessages: Data.InboundMessages;
128
+ label: string | null;
129
+ status: 'provisioning' | 'awaiting_payment' | 'active' | 'cancel_scheduled' | 'archived' | 'billing_error';
130
+ }
131
+ namespace Data {
132
+ interface InboundMessages {
133
+ exhausted: boolean;
134
+ included: number;
135
+ resetsAt: string | null;
136
+ used: number;
137
+ }
138
+ }
139
+ }
140
+ export interface MailboxRetrieveResponse {
141
+ data: MailboxRetrieveResponse.Data;
142
+ }
143
+ export declare namespace MailboxRetrieveResponse {
144
+ interface Data {
145
+ id: string;
146
+ address: string | null;
147
+ billingMode: 'rent' | 'included' | 'domain';
148
+ cancelAtPeriodEnd: boolean;
149
+ checkoutExpiresAt: string | null;
150
+ checkoutUrl: string | null;
151
+ createdAt: string;
152
+ currentPeriodEnd: string | null;
153
+ domainId: string | null;
154
+ inboundMessages: Data.InboundMessages;
155
+ label: string | null;
156
+ status: 'provisioning' | 'awaiting_payment' | 'active' | 'cancel_scheduled' | 'archived' | 'billing_error';
157
+ }
158
+ namespace Data {
159
+ interface InboundMessages {
160
+ exhausted: boolean;
161
+ included: number;
162
+ resetsAt: string | null;
163
+ used: number;
164
+ }
165
+ }
166
+ }
167
+ export interface MailboxUpdateResponse {
168
+ data: MailboxUpdateResponse.Data;
169
+ }
170
+ export declare namespace MailboxUpdateResponse {
171
+ interface Data {
172
+ id: string;
173
+ address: string | null;
174
+ billingMode: 'rent' | 'included' | 'domain';
175
+ cancelAtPeriodEnd: boolean;
176
+ checkoutExpiresAt: string | null;
177
+ checkoutUrl: string | null;
178
+ createdAt: string;
179
+ currentPeriodEnd: string | null;
180
+ domainId: string | null;
181
+ inboundMessages: Data.InboundMessages;
182
+ label: string | null;
183
+ status: 'provisioning' | 'awaiting_payment' | 'active' | 'cancel_scheduled' | 'archived' | 'billing_error';
184
+ }
185
+ namespace Data {
186
+ interface InboundMessages {
187
+ exhausted: boolean;
188
+ included: number;
189
+ resetsAt: string | null;
190
+ used: number;
191
+ }
192
+ }
193
+ }
194
+ export interface MailboxListResponse {
195
+ items: Array<MailboxListResponse.Item>;
196
+ pagination: Shared.Pagination;
197
+ }
198
+ export declare namespace MailboxListResponse {
199
+ interface Item {
200
+ id: string;
201
+ address: string | null;
202
+ billingMode: 'rent' | 'included' | 'domain';
203
+ cancelAtPeriodEnd: boolean;
204
+ checkoutExpiresAt: string | null;
205
+ checkoutUrl: string | null;
206
+ createdAt: string;
207
+ currentPeriodEnd: string | null;
208
+ domainId: string | null;
209
+ inboundMessages: Item.InboundMessages;
210
+ label: string | null;
211
+ status: 'provisioning' | 'awaiting_payment' | 'active' | 'cancel_scheduled' | 'archived' | 'billing_error';
212
+ }
213
+ namespace Item {
214
+ interface InboundMessages {
215
+ exhausted: boolean;
216
+ included: number;
217
+ resetsAt: string | null;
218
+ used: number;
219
+ }
220
+ }
221
+ }
222
+ export interface MailboxDeleteResponse {
223
+ data: MailboxDeleteResponse.Data;
224
+ }
225
+ export declare namespace MailboxDeleteResponse {
226
+ interface Data {
227
+ id: string;
228
+ address: string | null;
229
+ billingMode: 'rent' | 'included' | 'domain';
230
+ cancelAtPeriodEnd: boolean;
231
+ checkoutExpiresAt: string | null;
232
+ checkoutUrl: string | null;
233
+ createdAt: string;
234
+ currentPeriodEnd: string | null;
235
+ domainId: string | null;
236
+ inboundMessages: Data.InboundMessages;
237
+ label: string | null;
238
+ status: 'provisioning' | 'awaiting_payment' | 'active' | 'cancel_scheduled' | 'archived' | 'billing_error';
239
+ }
240
+ namespace Data {
241
+ interface InboundMessages {
242
+ exhausted: boolean;
243
+ included: number;
244
+ resetsAt: string | null;
245
+ used: number;
246
+ }
247
+ }
248
+ }
249
+ export interface MailboxCapacityResponse {
250
+ data: MailboxCapacityResponse.Data;
251
+ }
252
+ export declare namespace MailboxCapacityResponse {
253
+ interface Data {
254
+ included: number;
255
+ includedRemaining: number;
256
+ remaining: number;
257
+ status: 'available' | 'exhausted' | 'not_included';
258
+ }
259
+ }
260
+ export interface MailboxOtpResponse {
261
+ data: MailboxOtpResponse.Data;
262
+ }
263
+ export declare namespace MailboxOtpResponse {
264
+ interface Data {
265
+ /**
266
+ * OTP code as text to preserve leading zeros.
267
+ */
268
+ code: string;
269
+ confidence: 'high' | 'medium' | 'low';
270
+ messageId: string;
271
+ receivedAt: string;
272
+ sender: string | null;
273
+ subject: string | null;
274
+ }
275
+ }
276
+ export interface MailboxRestartResponse {
277
+ data: MailboxRestartResponse.Data;
278
+ }
279
+ export declare namespace MailboxRestartResponse {
280
+ interface Data {
281
+ id: string;
282
+ address: string | null;
283
+ billingMode: 'rent' | 'included' | 'domain';
284
+ cancelAtPeriodEnd: boolean;
285
+ checkoutExpiresAt: string | null;
286
+ checkoutUrl: string | null;
287
+ createdAt: string;
288
+ currentPeriodEnd: string | null;
289
+ domainId: string | null;
290
+ inboundMessages: Data.InboundMessages;
291
+ label: string | null;
292
+ status: 'provisioning' | 'awaiting_payment' | 'active' | 'cancel_scheduled' | 'archived' | 'billing_error';
293
+ }
294
+ namespace Data {
295
+ interface InboundMessages {
296
+ exhausted: boolean;
297
+ included: number;
298
+ resetsAt: string | null;
299
+ used: number;
300
+ }
301
+ }
302
+ }
303
+ export interface MailboxUncancelResponse {
304
+ data: MailboxUncancelResponse.Data;
305
+ }
306
+ export declare namespace MailboxUncancelResponse {
307
+ interface Data {
308
+ id: string;
309
+ address: string | null;
310
+ billingMode: 'rent' | 'included' | 'domain';
311
+ cancelAtPeriodEnd: boolean;
312
+ checkoutExpiresAt: string | null;
313
+ checkoutUrl: string | null;
314
+ createdAt: string;
315
+ currentPeriodEnd: string | null;
316
+ domainId: string | null;
317
+ inboundMessages: Data.InboundMessages;
318
+ label: string | null;
319
+ status: 'provisioning' | 'awaiting_payment' | 'active' | 'cancel_scheduled' | 'archived' | 'billing_error';
320
+ }
321
+ namespace Data {
322
+ interface InboundMessages {
323
+ exhausted: boolean;
324
+ included: number;
325
+ resetsAt: string | null;
326
+ used: number;
327
+ }
328
+ }
329
+ }
330
+ export interface MailboxCreateParams {
331
+ clientRequestId: string;
332
+ /**
333
+ * included uses package capacity when available and otherwise starts paid
334
+ * checkout; included_only fails without creating a paid reservation when no
335
+ * included slot remains; rent always starts paid checkout.
336
+ */
337
+ billingPreference?: 'included' | 'included_only' | 'rent';
338
+ /**
339
+ * Optional active custom mailbox domain owned by the caller. Omit to use the
340
+ * system domain.
341
+ */
342
+ domainId?: string;
343
+ label?: string;
344
+ /**
345
+ * Optional mailbox name before the "@". Omit to generate a random address.
346
+ */
347
+ localPart?: string;
348
+ }
349
+ export interface MailboxUpdateParams {
350
+ label: string | null;
351
+ }
352
+ export interface MailboxListParams {
353
+ page?: number;
354
+ pageSize?: number;
355
+ }
356
+ export interface MailboxOtpParams {
357
+ after?: string;
358
+ maxLength?: number;
359
+ minLength?: number;
360
+ sender?: string;
361
+ }
362
+ export interface MailboxRestartParams {
363
+ /**
364
+ * included uses package capacity when available and otherwise starts paid
365
+ * checkout; included_only fails without creating a paid reservation when no
366
+ * included slot remains; rent always starts paid checkout.
367
+ */
368
+ billingPreference?: 'included' | 'included_only' | 'rent';
369
+ }
370
+ export declare namespace Mailboxes {
371
+ export { type MailboxCreateResponse as MailboxCreateResponse, type MailboxRetrieveResponse as MailboxRetrieveResponse, type MailboxUpdateResponse as MailboxUpdateResponse, type MailboxListResponse as MailboxListResponse, type MailboxDeleteResponse as MailboxDeleteResponse, type MailboxCapacityResponse as MailboxCapacityResponse, type MailboxOtpResponse as MailboxOtpResponse, type MailboxRestartResponse as MailboxRestartResponse, type MailboxUncancelResponse as MailboxUncancelResponse, type MailboxCreateParams as MailboxCreateParams, type MailboxUpdateParams as MailboxUpdateParams, type MailboxListParams as MailboxListParams, type MailboxOtpParams as MailboxOtpParams, type MailboxRestartParams as MailboxRestartParams, };
372
+ export { Messages as Messages, type MessageRetrieveResponse as MessageRetrieveResponse, type MessageListResponse as MessageListResponse, type MessageRetrieveParams as MessageRetrieveParams, type MessageListParams as MessageListParams, };
373
+ }
374
+ //# sourceMappingURL=mailboxes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mailboxes.d.ts","sourceRoot":"","sources":["../../src/resources/mailboxes/mailboxes.ts"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qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Mailboxes = void 0;
5
+ const tslib_1 = require("../../internal/tslib.js");
6
+ const resource_1 = require("../../core/resource.js");
7
+ const MessagesAPI = tslib_1.__importStar(require("./messages.js"));
8
+ const messages_1 = require("./messages.js");
9
+ const path_1 = require("../../internal/utils/path.js");
10
+ class Mailboxes extends resource_1.APIResource {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.messages = new MessagesAPI.Messages(this._client);
14
+ }
15
+ /**
16
+ * Creates a mailbox on the default domain or a connected custom domain. An
17
+ * optional `localPart` selects the address. Replaying the same `clientRequestId`
18
+ * and payload returns the original mailbox. Poll the mailbox when a 202 response
19
+ * does not yet include a checkout URL.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * const mailbox = await client.mailboxes.create({
24
+ * clientRequestId: 'x',
25
+ * });
26
+ * ```
27
+ */
28
+ create(body, options) {
29
+ return this._client.post('/mailboxes', { body, ...options });
30
+ }
31
+ /**
32
+ * Get a mailbox
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * const mailbox = await client.mailboxes.retrieve(
37
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
38
+ * );
39
+ * ```
40
+ */
41
+ retrieve(mailboxID, options) {
42
+ return this._client.get((0, path_1.path) `/mailboxes/${mailboxID}`, options);
43
+ }
44
+ /**
45
+ * Updates the label of a mailbox.
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const mailbox = await client.mailboxes.update(
50
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
51
+ * { label: 'label' },
52
+ * );
53
+ * ```
54
+ */
55
+ update(mailboxID, body, options) {
56
+ return this._client.patch((0, path_1.path) `/mailboxes/${mailboxID}`, { body, ...options });
57
+ }
58
+ /**
59
+ * Lists the caller-owned mailboxes with page-based pagination.
60
+ *
61
+ * @example
62
+ * ```ts
63
+ * const mailboxes = await client.mailboxes.list();
64
+ * ```
65
+ */
66
+ list(query = {}, options) {
67
+ return this._client.get('/mailboxes', { query, ...options });
68
+ }
69
+ /**
70
+ * Cancels a pending mailbox or schedules an active paid mailbox for cancellation.
71
+ * Existing addresses and messages are retained. Repeating the request is safe.
72
+ *
73
+ * @example
74
+ * ```ts
75
+ * const mailbox = await client.mailboxes.delete(
76
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
77
+ * );
78
+ * ```
79
+ */
80
+ delete(mailboxID, options) {
81
+ return this._client.delete((0, path_1.path) `/mailboxes/${mailboxID}`, options);
82
+ }
83
+ /**
84
+ * Returns the number of mailboxes currently available through included capacity.
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * const response = await client.mailboxes.capacity();
89
+ * ```
90
+ */
91
+ capacity(options) {
92
+ return this._client.get('/mailboxes/capacity', options);
93
+ }
94
+ /**
95
+ * Returns the most likely recent OTP for the mailbox. Returns 204 when no matching
96
+ * code is available.
97
+ *
98
+ * @example
99
+ * ```ts
100
+ * const response = await client.mailboxes.otp(
101
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
102
+ * );
103
+ * ```
104
+ */
105
+ otp(mailboxID, query = {}, options) {
106
+ return this._client.get((0, path_1.path) `/mailboxes/${mailboxID}/otp`, { query, ...options });
107
+ }
108
+ /**
109
+ * Restarts an archived mailbox with the same address. Uses included capacity when
110
+ * available unless paid service is requested.
111
+ *
112
+ * @example
113
+ * ```ts
114
+ * const response = await client.mailboxes.restart(
115
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
116
+ * );
117
+ * ```
118
+ */
119
+ restart(mailboxID, body = {}, options) {
120
+ return this._client.post((0, path_1.path) `/mailboxes/${mailboxID}/restart`, { body, ...options });
121
+ }
122
+ /**
123
+ * Withdraws a scheduled cancellation. Only available while cancellation is
124
+ * pending.
125
+ *
126
+ * @example
127
+ * ```ts
128
+ * const response = await client.mailboxes.uncancel(
129
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
130
+ * );
131
+ * ```
132
+ */
133
+ uncancel(mailboxID, options) {
134
+ return this._client.post((0, path_1.path) `/mailboxes/${mailboxID}/uncancel`, options);
135
+ }
136
+ }
137
+ exports.Mailboxes = Mailboxes;
138
+ Mailboxes.Messages = messages_1.Messages;
139
+ //# sourceMappingURL=mailboxes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mailboxes.js","sourceRoot":"","sources":["../../src/resources/mailboxes/mailboxes.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,mEAA0C;AAC1C,4CAMoB;AAGpB,uDAAiD;AAEjD,MAAa,SAAU,SAAQ,sBAAW;IAA1C;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkJ1E,CAAC;IAhJC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,SAAiB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,cAAc,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,SAAiB,EACjB,IAAyB,EACzB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,cAAc,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACj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@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../core/resource.mjs";
3
+ import * as MessagesAPI from "./messages.mjs";
4
+ import { Messages, } from "./messages.mjs";
5
+ import { path } from "../../internal/utils/path.mjs";
6
+ export class Mailboxes extends APIResource {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.messages = new MessagesAPI.Messages(this._client);
10
+ }
11
+ /**
12
+ * Creates a mailbox on the default domain or a connected custom domain. An
13
+ * optional `localPart` selects the address. Replaying the same `clientRequestId`
14
+ * and payload returns the original mailbox. Poll the mailbox when a 202 response
15
+ * does not yet include a checkout URL.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * const mailbox = await client.mailboxes.create({
20
+ * clientRequestId: 'x',
21
+ * });
22
+ * ```
23
+ */
24
+ create(body, options) {
25
+ return this._client.post('/mailboxes', { body, ...options });
26
+ }
27
+ /**
28
+ * Get a mailbox
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * const mailbox = await client.mailboxes.retrieve(
33
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
34
+ * );
35
+ * ```
36
+ */
37
+ retrieve(mailboxID, options) {
38
+ return this._client.get(path `/mailboxes/${mailboxID}`, options);
39
+ }
40
+ /**
41
+ * Updates the label of a mailbox.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * const mailbox = await client.mailboxes.update(
46
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
47
+ * { label: 'label' },
48
+ * );
49
+ * ```
50
+ */
51
+ update(mailboxID, body, options) {
52
+ return this._client.patch(path `/mailboxes/${mailboxID}`, { body, ...options });
53
+ }
54
+ /**
55
+ * Lists the caller-owned mailboxes with page-based pagination.
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * const mailboxes = await client.mailboxes.list();
60
+ * ```
61
+ */
62
+ list(query = {}, options) {
63
+ return this._client.get('/mailboxes', { query, ...options });
64
+ }
65
+ /**
66
+ * Cancels a pending mailbox or schedules an active paid mailbox for cancellation.
67
+ * Existing addresses and messages are retained. Repeating the request is safe.
68
+ *
69
+ * @example
70
+ * ```ts
71
+ * const mailbox = await client.mailboxes.delete(
72
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
73
+ * );
74
+ * ```
75
+ */
76
+ delete(mailboxID, options) {
77
+ return this._client.delete(path `/mailboxes/${mailboxID}`, options);
78
+ }
79
+ /**
80
+ * Returns the number of mailboxes currently available through included capacity.
81
+ *
82
+ * @example
83
+ * ```ts
84
+ * const response = await client.mailboxes.capacity();
85
+ * ```
86
+ */
87
+ capacity(options) {
88
+ return this._client.get('/mailboxes/capacity', options);
89
+ }
90
+ /**
91
+ * Returns the most likely recent OTP for the mailbox. Returns 204 when no matching
92
+ * code is available.
93
+ *
94
+ * @example
95
+ * ```ts
96
+ * const response = await client.mailboxes.otp(
97
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
98
+ * );
99
+ * ```
100
+ */
101
+ otp(mailboxID, query = {}, options) {
102
+ return this._client.get(path `/mailboxes/${mailboxID}/otp`, { query, ...options });
103
+ }
104
+ /**
105
+ * Restarts an archived mailbox with the same address. Uses included capacity when
106
+ * available unless paid service is requested.
107
+ *
108
+ * @example
109
+ * ```ts
110
+ * const response = await client.mailboxes.restart(
111
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
112
+ * );
113
+ * ```
114
+ */
115
+ restart(mailboxID, body = {}, options) {
116
+ return this._client.post(path `/mailboxes/${mailboxID}/restart`, { body, ...options });
117
+ }
118
+ /**
119
+ * Withdraws a scheduled cancellation. Only available while cancellation is
120
+ * pending.
121
+ *
122
+ * @example
123
+ * ```ts
124
+ * const response = await client.mailboxes.uncancel(
125
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
126
+ * );
127
+ * ```
128
+ */
129
+ uncancel(mailboxID, options) {
130
+ return this._client.post(path `/mailboxes/${mailboxID}/uncancel`, options);
131
+ }
132
+ }
133
+ Mailboxes.Messages = Messages;
134
+ //# sourceMappingURL=mailboxes.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mailboxes.mjs","sourceRoot":"","sources":["../../src/resources/mailboxes/mailboxes.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAElD,OAAO,KAAK,WAAW,uBAAmB;AAC1C,OAAO,EAKL,QAAQ,GACT,uBAAmB;AAGpB,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,SAAU,SAAQ,WAAW;IAA1C;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkJ1E,CAAC;IAhJC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;;;OASG;IACH,QAAQ,CAAC,SAAiB,EAAE,OAAwB;QAClD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,SAAS,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,SAAiB,EACjB,IAAyB,EACzB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,cAAc,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;IAED;;;;;;;OAOG;IACH,IAAI,CACF,QAA8C,EAAE,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;;;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