@mobilerun/sdk 5.3.0 → 5.4.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 (61) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/client.d.mts +3 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/index.d.mts +1 -0
  12. package/resources/index.d.mts.map +1 -1
  13. package/resources/index.d.ts +1 -0
  14. package/resources/index.d.ts.map +1 -1
  15. package/resources/index.js +3 -1
  16. package/resources/index.js.map +1 -1
  17. package/resources/index.mjs +1 -0
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/mailboxes/index.d.mts +3 -0
  20. package/resources/mailboxes/index.d.mts.map +1 -0
  21. package/resources/mailboxes/index.d.ts +3 -0
  22. package/resources/mailboxes/index.d.ts.map +1 -0
  23. package/resources/mailboxes/index.js +9 -0
  24. package/resources/mailboxes/index.js.map +1 -0
  25. package/resources/mailboxes/index.mjs +4 -0
  26. package/resources/mailboxes/index.mjs.map +1 -0
  27. package/resources/mailboxes/mailboxes.d.mts +366 -0
  28. package/resources/mailboxes/mailboxes.d.mts.map +1 -0
  29. package/resources/mailboxes/mailboxes.d.ts +366 -0
  30. package/resources/mailboxes/mailboxes.d.ts.map +1 -0
  31. package/resources/mailboxes/mailboxes.js +146 -0
  32. package/resources/mailboxes/mailboxes.js.map +1 -0
  33. package/resources/mailboxes/mailboxes.mjs +141 -0
  34. package/resources/mailboxes/mailboxes.mjs.map +1 -0
  35. package/resources/mailboxes/messages.d.mts +82 -0
  36. package/resources/mailboxes/messages.d.mts.map +1 -0
  37. package/resources/mailboxes/messages.d.ts +82 -0
  38. package/resources/mailboxes/messages.d.ts.map +1 -0
  39. package/resources/mailboxes/messages.js +39 -0
  40. package/resources/mailboxes/messages.js.map +1 -0
  41. package/resources/mailboxes/messages.mjs +35 -0
  42. package/resources/mailboxes/messages.mjs.map +1 -0
  43. package/resources/mailboxes.d.mts +2 -0
  44. package/resources/mailboxes.d.mts.map +1 -0
  45. package/resources/mailboxes.d.ts +2 -0
  46. package/resources/mailboxes.d.ts.map +1 -0
  47. package/resources/mailboxes.js +6 -0
  48. package/resources/mailboxes.js.map +1 -0
  49. package/resources/mailboxes.mjs +3 -0
  50. package/resources/mailboxes.mjs.map +1 -0
  51. package/src/client.ts +37 -0
  52. package/src/resources/index.ts +17 -0
  53. package/src/resources/mailboxes/index.ts +26 -0
  54. package/src/resources/mailboxes/mailboxes.ts +618 -0
  55. package/src/resources/mailboxes/messages.ts +134 -0
  56. package/src/resources/mailboxes.ts +3 -0
  57. package/src/version.ts +1 -1
  58. package/version.d.mts +1 -1
  59. package/version.d.ts +1 -1
  60. package/version.js +1 -1
  61. package/version.mjs +1 -1
@@ -0,0 +1,134 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { RequestOptions } from '../../internal/request-options';
6
+ import { path } from '../../internal/utils/path';
7
+
8
+ export class Messages extends APIResource {
9
+ /**
10
+ * Get a mailbox message
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const message = await client.mailboxes.messages.retrieve(
15
+ * 'x',
16
+ * { mailboxId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
17
+ * );
18
+ * ```
19
+ */
20
+ retrieve(
21
+ messageID: string,
22
+ params: MessageRetrieveParams,
23
+ options?: RequestOptions,
24
+ ): APIPromise<MessageRetrieveResponse> {
25
+ const { mailboxId } = params;
26
+ return this._client.get(path`/mailboxes/${mailboxId}/messages/${messageID}`, options);
27
+ }
28
+
29
+ /**
30
+ * Lists messages for a mailbox with keyset pagination and time/sender/hasOtp
31
+ * filters for polling.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * const messages = await client.mailboxes.messages.list(
36
+ * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
37
+ * );
38
+ * ```
39
+ */
40
+ list(
41
+ mailboxID: string,
42
+ query: MessageListParams | null | undefined = {},
43
+ options?: RequestOptions,
44
+ ): APIPromise<MessageListResponse> {
45
+ return this._client.get(path`/mailboxes/${mailboxID}/messages`, { query, ...options });
46
+ }
47
+ }
48
+
49
+ export interface MessageRetrieveResponse {
50
+ data: MessageRetrieveResponse.Data;
51
+ }
52
+
53
+ export namespace MessageRetrieveResponse {
54
+ export interface Data {
55
+ id: string;
56
+
57
+ attachmentCount: number;
58
+
59
+ attachments: Array<Data.Attachment>;
60
+
61
+ fromAddress: string | null;
62
+
63
+ fromName: string | null;
64
+
65
+ hasOtp: boolean;
66
+
67
+ mailboxId: string;
68
+
69
+ receivedAt: string;
70
+
71
+ subject: string | null;
72
+
73
+ textBody: string | null;
74
+ }
75
+
76
+ export namespace Data {
77
+ export interface Attachment {
78
+ contentType: string | null;
79
+
80
+ name: string | null;
81
+
82
+ size: number;
83
+ }
84
+ }
85
+ }
86
+
87
+ export interface MessageListResponse {
88
+ items: Array<MessageListResponse.Item>;
89
+
90
+ nextCursor: string | null;
91
+ }
92
+
93
+ export namespace MessageListResponse {
94
+ export interface Item {
95
+ id: string;
96
+
97
+ fromAddress: string | null;
98
+
99
+ hasOtp: boolean;
100
+
101
+ mailboxId: string;
102
+
103
+ preview: string | null;
104
+
105
+ receivedAt: string;
106
+
107
+ subject: string | null;
108
+ }
109
+ }
110
+
111
+ export interface MessageRetrieveParams {
112
+ mailboxId: string;
113
+ }
114
+
115
+ export interface MessageListParams {
116
+ after?: string;
117
+
118
+ cursor?: string;
119
+
120
+ hasOtp?: 'true' | 'false';
121
+
122
+ limit?: number;
123
+
124
+ sender?: string;
125
+ }
126
+
127
+ export declare namespace Messages {
128
+ export {
129
+ type MessageRetrieveResponse as MessageRetrieveResponse,
130
+ type MessageListResponse as MessageListResponse,
131
+ type MessageRetrieveParams as MessageRetrieveParams,
132
+ type MessageListParams as MessageListParams,
133
+ };
134
+ }
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ export * from './mailboxes/index';
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '5.3.0'; // x-release-please-version
1
+ export const VERSION = '5.4.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "5.3.0";
1
+ export declare const VERSION = "5.4.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "5.3.0";
1
+ export declare const VERSION = "5.4.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '5.3.0'; // x-release-please-version
4
+ exports.VERSION = '5.4.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '5.3.0'; // x-release-please-version
1
+ export const VERSION = '5.4.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map