@mobilerun/sdk 5.2.1 → 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.
- package/CHANGELOG.md +20 -0
- package/client.d.mts +13 -7
- package/client.d.mts.map +1 -1
- package/client.d.ts +13 -7
- package/client.d.ts.map +1 -1
- package/client.js +9 -3
- package/client.js.map +1 -1
- package/client.mjs +9 -3
- package/client.mjs.map +1 -1
- package/core/streaming.d.mts +33 -0
- package/core/streaming.d.mts.map +1 -0
- package/core/streaming.d.ts +33 -0
- package/core/streaming.d.ts.map +1 -0
- package/core/streaming.js +263 -0
- package/core/streaming.js.map +1 -0
- package/core/streaming.mjs +258 -0
- package/core/streaming.mjs.map +1 -0
- package/internal/decoders/line.d.mts +17 -0
- package/internal/decoders/line.d.mts.map +1 -0
- package/internal/decoders/line.d.ts +17 -0
- package/internal/decoders/line.d.ts.map +1 -0
- package/internal/decoders/line.js +113 -0
- package/internal/decoders/line.js.map +1 -0
- package/internal/decoders/line.mjs +108 -0
- package/internal/decoders/line.mjs.map +1 -0
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +10 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +10 -0
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts +2 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +2 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/tslib.js +18 -18
- package/package.json +11 -1
- package/resources/apps.d.mts +2 -2
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +2 -2
- package/resources/apps.d.ts.map +1 -1
- package/resources/assistant/assistant.d.mts +10 -0
- package/resources/assistant/assistant.d.mts.map +1 -0
- package/resources/assistant/assistant.d.ts +10 -0
- package/resources/assistant/assistant.d.ts.map +1 -0
- package/resources/assistant/assistant.js +17 -0
- package/resources/assistant/assistant.js.map +1 -0
- package/resources/assistant/assistant.mjs +12 -0
- package/resources/assistant/assistant.mjs.map +1 -0
- package/resources/assistant/conversations.d.mts +295 -0
- package/resources/assistant/conversations.d.mts.map +1 -0
- package/resources/assistant/conversations.d.ts +295 -0
- package/resources/assistant/conversations.d.ts.map +1 -0
- package/resources/assistant/conversations.js +109 -0
- package/resources/assistant/conversations.js.map +1 -0
- package/resources/assistant/conversations.mjs +105 -0
- package/resources/assistant/conversations.mjs.map +1 -0
- package/resources/assistant/index.d.mts +3 -0
- package/resources/assistant/index.d.mts.map +1 -0
- package/resources/assistant/index.d.ts +3 -0
- package/resources/assistant/index.d.ts.map +1 -0
- package/resources/assistant/index.js +9 -0
- package/resources/assistant/index.js.map +1 -0
- package/resources/assistant/index.mjs +4 -0
- package/resources/assistant/index.mjs.map +1 -0
- package/resources/assistant.d.mts +2 -0
- package/resources/assistant.d.mts.map +1 -0
- package/resources/assistant.d.ts +2 -0
- package/resources/assistant.d.ts.map +1 -0
- package/resources/assistant.js +6 -0
- package/resources/assistant.js.map +1 -0
- package/resources/assistant.mjs +3 -0
- package/resources/assistant.mjs.map +1 -0
- package/resources/devices/clipboard.d.mts +40 -0
- package/resources/devices/clipboard.d.mts.map +1 -0
- package/resources/devices/clipboard.d.ts +40 -0
- package/resources/devices/clipboard.d.ts.map +1 -0
- package/resources/devices/clipboard.js +50 -0
- package/resources/devices/clipboard.js.map +1 -0
- package/resources/devices/clipboard.mjs +46 -0
- package/resources/devices/clipboard.mjs.map +1 -0
- package/resources/devices/devices.d.mts +5 -0
- package/resources/devices/devices.d.mts.map +1 -1
- package/resources/devices/devices.d.ts +5 -0
- package/resources/devices/devices.d.ts.map +1 -1
- package/resources/devices/devices.js +4 -0
- package/resources/devices/devices.js.map +1 -1
- package/resources/devices/devices.mjs +4 -0
- package/resources/devices/devices.mjs.map +1 -1
- package/resources/devices/index.d.mts +1 -0
- package/resources/devices/index.d.mts.map +1 -1
- package/resources/devices/index.d.ts +1 -0
- package/resources/devices/index.d.ts.map +1 -1
- package/resources/devices/index.js +3 -1
- package/resources/devices/index.js.map +1 -1
- package/resources/devices/index.mjs +1 -0
- package/resources/devices/index.mjs.map +1 -1
- package/resources/esims/esims.d.mts +45 -45
- package/resources/esims/esims.d.mts.map +1 -1
- package/resources/esims/esims.d.ts +45 -45
- package/resources/esims/esims.d.ts.map +1 -1
- package/resources/esims/esims.js +3 -3
- package/resources/esims/esims.js.map +1 -1
- package/resources/esims/esims.mjs +3 -3
- package/resources/esims/esims.mjs.map +1 -1
- package/resources/esims/index.d.mts +1 -1
- package/resources/esims/index.d.mts.map +1 -1
- package/resources/esims/index.d.ts +1 -1
- package/resources/esims/index.d.ts.map +1 -1
- package/resources/esims/index.js.map +1 -1
- package/resources/esims/index.mjs.map +1 -1
- package/resources/esims/messages.d.mts +15 -20
- package/resources/esims/messages.d.mts.map +1 -1
- package/resources/esims/messages.d.ts +15 -20
- package/resources/esims/messages.d.ts.map +1 -1
- package/resources/files.d.mts +126 -0
- package/resources/files.d.mts.map +1 -0
- package/resources/files.d.ts +126 -0
- package/resources/files.d.ts.map +1 -0
- package/resources/files.js +68 -0
- package/resources/files.js.map +1 -0
- package/resources/files.mjs +64 -0
- package/resources/files.mjs.map +1 -0
- package/resources/index.d.mts +5 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -1
- package/resources/index.mjs.map +1 -1
- package/resources/mailboxes/index.d.mts +3 -0
- package/resources/mailboxes/index.d.mts.map +1 -0
- package/resources/mailboxes/index.d.ts +3 -0
- package/resources/mailboxes/index.d.ts.map +1 -0
- package/resources/mailboxes/index.js +9 -0
- package/resources/mailboxes/index.js.map +1 -0
- package/resources/mailboxes/index.mjs +4 -0
- package/resources/mailboxes/index.mjs.map +1 -0
- package/resources/mailboxes/mailboxes.d.mts +366 -0
- package/resources/mailboxes/mailboxes.d.mts.map +1 -0
- package/resources/mailboxes/mailboxes.d.ts +366 -0
- package/resources/mailboxes/mailboxes.d.ts.map +1 -0
- package/resources/mailboxes/mailboxes.js +146 -0
- package/resources/mailboxes/mailboxes.js.map +1 -0
- package/resources/mailboxes/mailboxes.mjs +141 -0
- package/resources/mailboxes/mailboxes.mjs.map +1 -0
- package/resources/mailboxes/messages.d.mts +82 -0
- package/resources/mailboxes/messages.d.mts.map +1 -0
- package/resources/mailboxes/messages.d.ts +82 -0
- package/resources/mailboxes/messages.d.ts.map +1 -0
- package/resources/mailboxes/messages.js +39 -0
- package/resources/mailboxes/messages.js.map +1 -0
- package/resources/mailboxes/messages.mjs +35 -0
- package/resources/mailboxes/messages.mjs.map +1 -0
- package/resources/mailboxes.d.mts +2 -0
- package/resources/mailboxes.d.mts.map +1 -0
- package/resources/mailboxes.d.ts +2 -0
- package/resources/mailboxes.d.ts.map +1 -0
- package/resources/mailboxes.js +6 -0
- package/resources/mailboxes.js.map +1 -0
- package/resources/mailboxes.mjs +3 -0
- package/resources/mailboxes.mjs.map +1 -0
- package/resources/messages/conversations.d.mts +18 -23
- package/resources/messages/conversations.d.mts.map +1 -1
- package/resources/messages/conversations.d.ts +18 -23
- package/resources/messages/conversations.d.ts.map +1 -1
- package/resources/messages/messages.d.mts +15 -20
- package/resources/messages/messages.d.mts.map +1 -1
- package/resources/messages/messages.d.ts +15 -20
- package/resources/messages/messages.d.ts.map +1 -1
- package/resources/messages/messages.js.map +1 -1
- package/resources/messages/messages.mjs.map +1 -1
- package/resources/models.d.mts +20 -5
- package/resources/models.d.mts.map +1 -1
- package/resources/models.d.ts +20 -5
- package/resources/models.d.ts.map +1 -1
- package/resources/models.js +1 -1
- package/resources/models.mjs +1 -1
- package/resources/numbers/index.d.mts +1 -1
- package/resources/numbers/index.d.mts.map +1 -1
- package/resources/numbers/index.d.ts +1 -1
- package/resources/numbers/index.d.ts.map +1 -1
- package/resources/numbers/index.js.map +1 -1
- package/resources/numbers/index.mjs.map +1 -1
- package/resources/numbers/messages.d.mts +15 -27
- package/resources/numbers/messages.d.mts.map +1 -1
- package/resources/numbers/messages.d.ts +15 -27
- package/resources/numbers/messages.d.ts.map +1 -1
- package/resources/numbers/messages.js.map +1 -1
- package/resources/numbers/messages.mjs.map +1 -1
- package/resources/numbers/numbers.d.mts +70 -22
- package/resources/numbers/numbers.d.mts.map +1 -1
- package/resources/numbers/numbers.d.ts +70 -22
- package/resources/numbers/numbers.d.ts.map +1 -1
- package/resources/numbers/numbers.js +17 -0
- package/resources/numbers/numbers.js.map +1 -1
- package/resources/numbers/numbers.mjs +17 -0
- package/resources/numbers/numbers.mjs.map +1 -1
- package/resources/store/apps.d.mts +2 -2
- package/resources/store/apps.d.mts.map +1 -1
- package/resources/store/apps.d.ts +2 -2
- package/resources/store/apps.d.ts.map +1 -1
- package/resources/workflows/events.d.mts +1 -0
- package/resources/workflows/events.d.mts.map +1 -1
- package/resources/workflows/events.d.ts +1 -0
- package/resources/workflows/events.d.ts.map +1 -1
- package/resources/workflows/executions.d.mts +21 -0
- package/resources/workflows/executions.d.mts.map +1 -1
- package/resources/workflows/executions.d.ts +21 -0
- package/resources/workflows/executions.d.ts.map +1 -1
- package/resources/workflows/flows/flows.d.mts +8 -0
- package/resources/workflows/flows/flows.d.mts.map +1 -1
- package/resources/workflows/flows/flows.d.ts +8 -0
- package/resources/workflows/flows/flows.d.ts.map +1 -1
- package/resources/workflows/flows/flows.js.map +1 -1
- package/resources/workflows/flows/flows.mjs.map +1 -1
- package/src/client.ts +74 -4
- package/src/core/streaming.ts +315 -0
- package/src/internal/decoders/line.ts +135 -0
- package/src/internal/parse.ts +14 -0
- package/src/internal/request-options.ts +2 -0
- package/src/resources/apps.ts +2 -2
- package/src/resources/assistant/assistant.ts +59 -0
- package/src/resources/assistant/conversations.ts +524 -0
- package/src/resources/assistant/index.ts +26 -0
- package/src/resources/assistant.ts +3 -0
- package/src/resources/devices/clipboard.ts +87 -0
- package/src/resources/devices/devices.ts +13 -0
- package/src/resources/devices/index.ts +6 -0
- package/src/resources/esims/esims.ts +63 -57
- package/src/resources/esims/index.ts +1 -0
- package/src/resources/esims/messages.ts +24 -30
- package/src/resources/files.ts +225 -0
- package/src/resources/index.ts +33 -1
- package/src/resources/mailboxes/index.ts +26 -0
- package/src/resources/mailboxes/mailboxes.ts +618 -0
- package/src/resources/mailboxes/messages.ts +134 -0
- package/src/resources/mailboxes.ts +3 -0
- package/src/resources/messages/conversations.ts +28 -34
- package/src/resources/messages/messages.ts +24 -30
- package/src/resources/models.ts +22 -7
- package/src/resources/numbers/index.ts +2 -0
- package/src/resources/numbers/messages.ts +24 -43
- package/src/resources/numbers/numbers.ts +97 -21
- package/src/resources/store/apps.ts +2 -2
- package/src/resources/workflows/events.ts +2 -0
- package/src/resources/workflows/executions.ts +27 -0
- package/src/resources/workflows/flows/flows.ts +16 -0
- package/src/streaming.ts +2 -0
- package/src/version.ts +1 -1
- package/streaming.d.mts +3 -0
- package/streaming.d.mts.map +1 -0
- package/streaming.d.ts +3 -0
- package/streaming.d.ts.map +1 -0
- package/streaming.js +6 -0
- package/streaming.js.map +1 -0
- package/streaming.mjs +3 -0
- package/streaming.mjs.map +1 -0
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/agents.d.mts +0 -27
- package/resources/agents.d.mts.map +0 -1
- package/resources/agents.d.ts +0 -27
- package/resources/agents.d.ts.map +0 -1
- package/resources/agents.js +0 -15
- package/resources/agents.js.map +0 -1
- package/resources/agents.mjs +0 -11
- package/resources/agents.mjs.map +0 -1
- package/src/resources/agents.ts +0 -42
|
@@ -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
|
+
}
|
|
@@ -40,54 +40,48 @@ export class Conversations extends APIResource {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export interface ConversationListResponse {
|
|
43
|
-
|
|
43
|
+
items: Array<ConversationListResponse.Item>;
|
|
44
|
+
|
|
45
|
+
nextCursor: ConversationListResponse.NextCursor | null;
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
export namespace ConversationListResponse {
|
|
47
|
-
export interface
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
nextCursor: Data.NextCursor | null;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export namespace Data {
|
|
54
|
-
export interface Item {
|
|
55
|
-
esimIds: Array<string>;
|
|
49
|
+
export interface Item {
|
|
50
|
+
esimIds: Array<string>;
|
|
56
51
|
|
|
57
|
-
|
|
52
|
+
lastMessage: Item.LastMessage;
|
|
58
53
|
|
|
59
|
-
|
|
54
|
+
peerKey: string;
|
|
60
55
|
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
unreadCount: number;
|
|
57
|
+
}
|
|
63
58
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
59
|
+
export namespace Item {
|
|
60
|
+
export interface LastMessage {
|
|
61
|
+
id: string;
|
|
67
62
|
|
|
68
|
-
|
|
63
|
+
body: string | null;
|
|
69
64
|
|
|
70
|
-
|
|
65
|
+
direction: 'inbound' | 'outbound';
|
|
71
66
|
|
|
72
|
-
|
|
67
|
+
occurredAt: string;
|
|
73
68
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
69
|
+
status:
|
|
70
|
+
| 'received'
|
|
71
|
+
| 'queued'
|
|
72
|
+
| 'claimed'
|
|
73
|
+
| 'sending'
|
|
74
|
+
| 'sent'
|
|
75
|
+
| 'sent_unconfirmed'
|
|
76
|
+
| 'delivered'
|
|
77
|
+
| 'failed';
|
|
84
78
|
}
|
|
79
|
+
}
|
|
85
80
|
|
|
86
|
-
|
|
87
|
-
|
|
81
|
+
export interface NextCursor {
|
|
82
|
+
lastMessageId: string;
|
|
88
83
|
|
|
89
|
-
|
|
90
|
-
}
|
|
84
|
+
lastOccurredAt: string;
|
|
91
85
|
}
|
|
92
86
|
}
|
|
93
87
|
|
|
@@ -31,50 +31,44 @@ export class Messages extends APIResource {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export interface MessageListResponse {
|
|
34
|
-
|
|
34
|
+
items: Array<MessageListResponse.Item>;
|
|
35
|
+
|
|
36
|
+
pagination: Shared.Pagination;
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
export namespace MessageListResponse {
|
|
38
|
-
export interface
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
pagination: Shared.Pagination;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export namespace Data {
|
|
45
|
-
export interface Item {
|
|
46
|
-
id: string;
|
|
40
|
+
export interface Item {
|
|
41
|
+
id: string;
|
|
47
42
|
|
|
48
|
-
|
|
43
|
+
body: string | null;
|
|
49
44
|
|
|
50
|
-
|
|
45
|
+
createdAt: string;
|
|
51
46
|
|
|
52
|
-
|
|
47
|
+
deliveryStatus: string | null;
|
|
53
48
|
|
|
54
|
-
|
|
49
|
+
detectedSender: string | null;
|
|
55
50
|
|
|
56
|
-
|
|
51
|
+
direction: 'inbound' | 'outbound';
|
|
57
52
|
|
|
58
|
-
|
|
53
|
+
esimId: string | null;
|
|
59
54
|
|
|
60
|
-
|
|
55
|
+
occurredAt: string;
|
|
61
56
|
|
|
62
|
-
|
|
57
|
+
peerKey: string | null;
|
|
63
58
|
|
|
64
|
-
|
|
59
|
+
peerNumber: string | null;
|
|
65
60
|
|
|
66
|
-
|
|
61
|
+
providerCode: string | null;
|
|
67
62
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
63
|
+
status:
|
|
64
|
+
| 'received'
|
|
65
|
+
| 'queued'
|
|
66
|
+
| 'claimed'
|
|
67
|
+
| 'sending'
|
|
68
|
+
| 'sent'
|
|
69
|
+
| 'sent_unconfirmed'
|
|
70
|
+
| 'delivered'
|
|
71
|
+
| 'failed';
|
|
78
72
|
}
|
|
79
73
|
}
|
|
80
74
|
|
package/src/resources/models.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
9
9
|
*/
|
|
10
10
|
export class Models extends APIResource {
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* List available LLM models.
|
|
13
13
|
*/
|
|
14
14
|
list(options?: RequestOptions): APIPromise<ModelListResponse> {
|
|
15
15
|
return this._client.get('/models', options);
|
|
@@ -17,23 +17,38 @@ export class Models extends APIResource {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export interface ModelListResponse {
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Available models
|
|
22
|
+
*/
|
|
23
|
+
data: Array<ModelListResponse.Data>;
|
|
21
24
|
|
|
22
25
|
/**
|
|
23
|
-
*
|
|
26
|
+
* Object type
|
|
24
27
|
*/
|
|
25
28
|
object?: string;
|
|
26
29
|
}
|
|
27
30
|
|
|
28
31
|
export namespace ModelListResponse {
|
|
29
32
|
export interface Data {
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Model identifier
|
|
35
|
+
*/
|
|
36
|
+
id: string;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Model owner/provider
|
|
40
|
+
*/
|
|
41
|
+
owned_by: string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Creation timestamp
|
|
45
|
+
*/
|
|
32
46
|
created?: number;
|
|
33
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Object type
|
|
50
|
+
*/
|
|
34
51
|
object?: string;
|
|
35
|
-
|
|
36
|
-
owned_by?: string;
|
|
37
52
|
}
|
|
38
53
|
}
|
|
39
54
|
|
|
@@ -5,10 +5,12 @@ export {
|
|
|
5
5
|
Numbers,
|
|
6
6
|
type NumberCreateResponse,
|
|
7
7
|
type NumberRetrieveResponse,
|
|
8
|
+
type NumberUpdateResponse,
|
|
8
9
|
type NumberListResponse,
|
|
9
10
|
type NumberDeleteResponse,
|
|
10
11
|
type NumberCountriesResponse,
|
|
11
12
|
type NumberPurposesResponse,
|
|
12
13
|
type NumberCreateParams,
|
|
14
|
+
type NumberUpdateParams,
|
|
13
15
|
type NumberListParams,
|
|
14
16
|
} from './numbers';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
+
import * as Shared from '../shared';
|
|
4
5
|
import { APIPromise } from '../../core/api-promise';
|
|
5
6
|
import { RequestOptions } from '../../internal/request-options';
|
|
6
7
|
import { path } from '../../internal/utils/path';
|
|
@@ -28,62 +29,42 @@ export class Messages extends APIResource {
|
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
export interface MessageListResponse {
|
|
31
|
-
|
|
32
|
+
items: Array<MessageListResponse.Item>;
|
|
33
|
+
|
|
34
|
+
pagination: Shared.Pagination;
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
export namespace MessageListResponse {
|
|
35
|
-
export interface
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
pagination: Data.Pagination;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export namespace Data {
|
|
42
|
-
export interface Item {
|
|
43
|
-
id: string;
|
|
44
|
-
|
|
45
|
-
body: string | null;
|
|
46
|
-
|
|
47
|
-
createdAt: string;
|
|
48
|
-
|
|
49
|
-
deliveryStatus: string | null;
|
|
50
|
-
|
|
51
|
-
detectedSender: string | null;
|
|
52
|
-
|
|
53
|
-
direction: 'inbound' | 'outbound';
|
|
54
|
-
|
|
55
|
-
esimId: string | null;
|
|
38
|
+
export interface Item {
|
|
39
|
+
id: string;
|
|
56
40
|
|
|
57
|
-
|
|
41
|
+
body: string | null;
|
|
58
42
|
|
|
59
|
-
|
|
43
|
+
createdAt: string;
|
|
60
44
|
|
|
61
|
-
|
|
45
|
+
deliveryStatus: string | null;
|
|
62
46
|
|
|
63
|
-
|
|
64
|
-
| 'received'
|
|
65
|
-
| 'queued'
|
|
66
|
-
| 'claimed'
|
|
67
|
-
| 'sending'
|
|
68
|
-
| 'sent'
|
|
69
|
-
| 'sent_unconfirmed'
|
|
70
|
-
| 'delivered'
|
|
71
|
-
| 'failed';
|
|
72
|
-
}
|
|
47
|
+
detectedSender: string | null;
|
|
73
48
|
|
|
74
|
-
|
|
75
|
-
hasNext: boolean;
|
|
49
|
+
direction: 'inbound' | 'outbound';
|
|
76
50
|
|
|
77
|
-
|
|
51
|
+
esimId: string | null;
|
|
78
52
|
|
|
79
|
-
|
|
53
|
+
occurredAt: string;
|
|
80
54
|
|
|
81
|
-
|
|
55
|
+
peerKey: string | null;
|
|
82
56
|
|
|
83
|
-
|
|
57
|
+
peerNumber: string | null;
|
|
84
58
|
|
|
85
|
-
|
|
86
|
-
|
|
59
|
+
status:
|
|
60
|
+
| 'received'
|
|
61
|
+
| 'queued'
|
|
62
|
+
| 'claimed'
|
|
63
|
+
| 'sending'
|
|
64
|
+
| 'sent'
|
|
65
|
+
| 'sent_unconfirmed'
|
|
66
|
+
| 'delivered'
|
|
67
|
+
| 'failed';
|
|
87
68
|
}
|
|
88
69
|
}
|
|
89
70
|
|
|
@@ -51,6 +51,28 @@ export class Numbers extends APIResource {
|
|
|
51
51
|
return this._client.get(path`/numbers/phones/${id}`, options);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Updates the phone number's user-defined display label. Omitting `label` leaves
|
|
56
|
+
* it unchanged; setting it to null or an empty string clears it. The label is
|
|
57
|
+
* capped at 100 characters, is display-only, and never affects routing. It also
|
|
58
|
+
* seeds the billing entity name when set at purchase time; a later change here
|
|
59
|
+
* does not rename the already-created billing entity.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* const number = await client.numbers.update(
|
|
64
|
+
* '550e8400-e29b-41d4-a716-446655440000',
|
|
65
|
+
* );
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
update(
|
|
69
|
+
id: string,
|
|
70
|
+
body: NumberUpdateParams | null | undefined = {},
|
|
71
|
+
options?: RequestOptions,
|
|
72
|
+
): APIPromise<NumberUpdateResponse> {
|
|
73
|
+
return this._client.patch(path`/numbers/phones/${id}`, { body, ...options });
|
|
74
|
+
}
|
|
75
|
+
|
|
54
76
|
/**
|
|
55
77
|
* Lists phone numbers owned by the authenticated user — both BYO (`user`) and
|
|
56
78
|
* provisioned (`mobilerun`) numbers.
|
|
@@ -161,6 +183,8 @@ export namespace NumberRetrieveResponse {
|
|
|
161
183
|
|
|
162
184
|
currentPeriodEnd: string | null;
|
|
163
185
|
|
|
186
|
+
label: string | null;
|
|
187
|
+
|
|
164
188
|
phoneNumber: string | null;
|
|
165
189
|
|
|
166
190
|
purpose: string | null;
|
|
@@ -171,45 +195,77 @@ export namespace NumberRetrieveResponse {
|
|
|
171
195
|
}
|
|
172
196
|
}
|
|
173
197
|
|
|
174
|
-
export interface
|
|
175
|
-
data:
|
|
198
|
+
export interface NumberUpdateResponse {
|
|
199
|
+
data: NumberUpdateResponse.Data;
|
|
176
200
|
}
|
|
177
201
|
|
|
178
|
-
export namespace
|
|
202
|
+
export namespace NumberUpdateResponse {
|
|
179
203
|
export interface Data {
|
|
180
|
-
|
|
204
|
+
id: string;
|
|
205
|
+
|
|
206
|
+
cancelAtPeriodEnd: boolean;
|
|
181
207
|
|
|
182
|
-
|
|
208
|
+
cancellable: boolean;
|
|
209
|
+
|
|
210
|
+
canSend: boolean;
|
|
211
|
+
|
|
212
|
+
capabilities: Array<'sms' | 'voice'> | null;
|
|
213
|
+
|
|
214
|
+
checkoutUrl: string | null;
|
|
215
|
+
|
|
216
|
+
countryCode: string | null;
|
|
217
|
+
|
|
218
|
+
createdAt: string | null;
|
|
219
|
+
|
|
220
|
+
currentPeriodEnd: string | null;
|
|
221
|
+
|
|
222
|
+
label: string | null;
|
|
223
|
+
|
|
224
|
+
phoneNumber: string | null;
|
|
225
|
+
|
|
226
|
+
purpose: string | null;
|
|
227
|
+
|
|
228
|
+
state: 'awaiting_payment' | 'provisioning' | 'active' | 'cancel_scheduled' | 'expired' | 'failed';
|
|
229
|
+
|
|
230
|
+
updatedAt: string | null;
|
|
183
231
|
}
|
|
232
|
+
}
|
|
184
233
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
id: string;
|
|
234
|
+
export interface NumberListResponse {
|
|
235
|
+
items: Array<NumberListResponse.Item>;
|
|
188
236
|
|
|
189
|
-
|
|
237
|
+
pagination: Shared.Pagination;
|
|
238
|
+
}
|
|
190
239
|
|
|
191
|
-
|
|
240
|
+
export namespace NumberListResponse {
|
|
241
|
+
export interface Item {
|
|
242
|
+
id: string;
|
|
192
243
|
|
|
193
|
-
|
|
244
|
+
cancelAtPeriodEnd: boolean;
|
|
194
245
|
|
|
195
|
-
|
|
246
|
+
cancellable: boolean;
|
|
196
247
|
|
|
197
|
-
|
|
248
|
+
canSend: boolean;
|
|
198
249
|
|
|
199
|
-
|
|
250
|
+
capabilities: Array<'sms' | 'voice'> | null;
|
|
200
251
|
|
|
201
|
-
|
|
252
|
+
checkoutUrl: string | null;
|
|
202
253
|
|
|
203
|
-
|
|
254
|
+
countryCode: string | null;
|
|
204
255
|
|
|
205
|
-
|
|
256
|
+
createdAt: string | null;
|
|
206
257
|
|
|
207
|
-
|
|
258
|
+
currentPeriodEnd: string | null;
|
|
208
259
|
|
|
209
|
-
|
|
260
|
+
label: string | null;
|
|
210
261
|
|
|
211
|
-
|
|
212
|
-
|
|
262
|
+
phoneNumber: string | null;
|
|
263
|
+
|
|
264
|
+
purpose: string | null;
|
|
265
|
+
|
|
266
|
+
state: 'awaiting_payment' | 'provisioning' | 'active' | 'cancel_scheduled' | 'expired' | 'failed';
|
|
267
|
+
|
|
268
|
+
updatedAt: string | null;
|
|
213
269
|
}
|
|
214
270
|
}
|
|
215
271
|
|
|
@@ -237,6 +293,8 @@ export namespace NumberDeleteResponse {
|
|
|
237
293
|
|
|
238
294
|
currentPeriodEnd: string | null;
|
|
239
295
|
|
|
296
|
+
label: string | null;
|
|
297
|
+
|
|
240
298
|
phoneNumber: string | null;
|
|
241
299
|
|
|
242
300
|
purpose: string | null;
|
|
@@ -300,6 +358,13 @@ export interface NumberCreateParams {
|
|
|
300
358
|
*/
|
|
301
359
|
country?: string;
|
|
302
360
|
|
|
361
|
+
/**
|
|
362
|
+
* Body param: User-defined display label — NFC-normalized, up to 100 GRAPHEMES
|
|
363
|
+
* (not UTF-16 code units; an emoji/flag may span several). Display-only, never
|
|
364
|
+
* used for routing. Also seeds the billing entity name at purchase.
|
|
365
|
+
*/
|
|
366
|
+
label?: string | null;
|
|
367
|
+
|
|
303
368
|
/**
|
|
304
369
|
* Body param: Optional Mobilerun Phone purpose slug from GET /numbers/purposes.
|
|
305
370
|
*/
|
|
@@ -311,6 +376,15 @@ export interface NumberCreateParams {
|
|
|
311
376
|
'Idempotency-Key'?: string;
|
|
312
377
|
}
|
|
313
378
|
|
|
379
|
+
export interface NumberUpdateParams {
|
|
380
|
+
/**
|
|
381
|
+
* User-defined display label — NFC-normalized, up to 100 GRAPHEMES (not UTF-16
|
|
382
|
+
* code units; an emoji/flag may span several). Display-only, never used for
|
|
383
|
+
* routing. Also seeds the billing entity name at purchase.
|
|
384
|
+
*/
|
|
385
|
+
label?: string | null;
|
|
386
|
+
}
|
|
387
|
+
|
|
314
388
|
export interface NumberListParams {
|
|
315
389
|
page?: number;
|
|
316
390
|
|
|
@@ -323,11 +397,13 @@ export declare namespace Numbers {
|
|
|
323
397
|
export {
|
|
324
398
|
type NumberCreateResponse as NumberCreateResponse,
|
|
325
399
|
type NumberRetrieveResponse as NumberRetrieveResponse,
|
|
400
|
+
type NumberUpdateResponse as NumberUpdateResponse,
|
|
326
401
|
type NumberListResponse as NumberListResponse,
|
|
327
402
|
type NumberDeleteResponse as NumberDeleteResponse,
|
|
328
403
|
type NumberCountriesResponse as NumberCountriesResponse,
|
|
329
404
|
type NumberPurposesResponse as NumberPurposesResponse,
|
|
330
405
|
type NumberCreateParams as NumberCreateParams,
|
|
406
|
+
type NumberUpdateParams as NumberUpdateParams,
|
|
331
407
|
type NumberListParams as NumberListParams,
|
|
332
408
|
};
|
|
333
409
|
|
|
@@ -335,7 +335,7 @@ export namespace AppRetrieveResponse {
|
|
|
335
335
|
|
|
336
336
|
sizeBytes: number | null;
|
|
337
337
|
|
|
338
|
-
source: 'user' | 'system' | 'portal' | 'store';
|
|
338
|
+
source: 'user' | 'system' | 'portal' | 'store' | 'catalog';
|
|
339
339
|
|
|
340
340
|
status: 'queued' | 'available' | 'failed';
|
|
341
341
|
|
|
@@ -658,7 +658,7 @@ export namespace AppListResponse {
|
|
|
658
658
|
|
|
659
659
|
sizeBytes: number | null;
|
|
660
660
|
|
|
661
|
-
source: 'user' | 'system' | 'portal' | 'store';
|
|
661
|
+
source: 'user' | 'system' | 'portal' | 'store' | 'catalog';
|
|
662
662
|
|
|
663
663
|
status: 'queued' | 'available' | 'failed';
|
|
664
664
|
|