@agentuity/core 1.0.29 → 1.0.31
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/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/services/email.d.ts +507 -8
- package/dist/services/email.d.ts.map +1 -1
- package/dist/services/email.js +325 -1
- package/dist/services/email.js.map +1 -1
- package/dist/services/keyvalue.d.ts +5 -2
- package/dist/services/keyvalue.d.ts.map +1 -1
- package/dist/services/keyvalue.js +44 -1
- package/dist/services/keyvalue.js.map +1 -1
- package/dist/services/queue.d.ts +98 -0
- package/dist/services/queue.d.ts.map +1 -1
- package/dist/services/queue.js +100 -0
- package/dist/services/queue.js.map +1 -1
- package/dist/services/schedule.d.ts +413 -0
- package/dist/services/schedule.d.ts.map +1 -1
- package/dist/services/schedule.js +221 -0
- package/dist/services/schedule.js.map +1 -1
- package/dist/services/task.d.ts +1103 -11
- package/dist/services/task.d.ts.map +1 -1
- package/dist/services/task.js +589 -1
- package/dist/services/task.js.map +1 -1
- package/dist/services/webhook.d.ts +352 -0
- package/dist/services/webhook.d.ts.map +1 -1
- package/dist/services/webhook.js +254 -0
- package/dist/services/webhook.js.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +8 -0
- package/src/services/email.ts +560 -9
- package/src/services/keyvalue.ts +51 -3
- package/src/services/queue.ts +215 -0
- package/src/services/schedule.ts +442 -0
- package/src/services/task.ts +1329 -23
- package/src/services/webhook.ts +412 -0
package/dist/index.d.ts
CHANGED
|
@@ -8,11 +8,11 @@ export { type DataResult, type DataResultFound, type DataResultNotFound, type Ke
|
|
|
8
8
|
export { type SessionEventProvider, SessionStartEventSchema, SessionCompleteEventSchema, SessionStartEventDelayedSchema, SessionCompleteEventDelayedSchema, type SessionStartEvent, type SessionCompleteEvent, } from './services/session.ts';
|
|
9
9
|
export { type CreateStreamProps, type ListStreamsParams, type StreamInfo, type ListStreamsResponse, type Stream, type StreamStorage, type StreamSortField, STREAM_MIN_TTL_SECONDS, STREAM_MAX_TTL_SECONDS, STREAM_DEFAULT_TTL_SECONDS, StreamStorageService, } from './services/stream.ts';
|
|
10
10
|
export { type VectorUpsertBase, type VectorUpsertEmbeddings, type VectorUpsertText, type VectorUpsertParams, type VectorSearchParams, type VectorSearchResult, type VectorSearchResultWithDocument, type VectorUpsertResult, type VectorResultFound, type VectorResultNotFound, type VectorResult, type VectorNamespaceStats, type VectorItemStats, type VectorNamespaceStatsWithSamples, type VectorGetAllStatsParams, type VectorStatsPaginated, type VectorStorage, type VectorSortField, VECTOR_MIN_TTL_SECONDS, VECTOR_MAX_TTL_SECONDS, VECTOR_DEFAULT_TTL_SECONDS, VectorStorageService, } from './services/vector.ts';
|
|
11
|
-
export { type QueueService, type QueuePublishParams, type QueuePublishResult, QueueStorageService, QueuePublishError, QueueNotFoundError, QueueValidationError, } from './services/queue.ts';
|
|
11
|
+
export { type QueueService, type QueuePublishParams, type QueuePublishResult, type QueueCreateParams, type QueueCreateResult, QueueStorageService, QueuePublishError, QueueNotFoundError, QueueValidationError, } from './services/queue.ts';
|
|
12
12
|
export { type EmailAddress, type EmailDestination, type EmailProtocolConfig, type EmailConnectionConfig, type EmailInbound, type EmailOutbound, type EmailAttachment, type EmailStoredAttachment, type EmailSendParams, type EmailActivityParams, type EmailActivityDataPoint, type EmailActivityResult, type EmailService, EmailStorageService, } from './services/email.ts';
|
|
13
13
|
export { type Schedule, type ScheduleDestination, type ScheduleDelivery, type CreateScheduleParams, type CreateScheduleDestinationParams, type UpdateScheduleParams, type ScheduleListResult, type ScheduleGetResult, type ScheduleCreateResult, type ScheduleDeliveryListResult, ScheduleService, } from './services/schedule.ts';
|
|
14
14
|
export { type Webhook, type WebhookDestination, type WebhookReceipt, type WebhookDelivery, type CreateWebhookParams, type UpdateWebhookParams, type CreateWebhookDestinationParams, type WebhookListResult, type WebhookGetResult, type WebhookCreateResult, type WebhookReceiptListResult, type WebhookDeliveryListResult, WebhookService, } from './services/webhook.ts';
|
|
15
|
-
export { type TaskPriority, type TaskType, type TaskStatus, type Task, type Comment, type Tag, type TaskChangelogEntry, type CreateTaskParams, type UpdateTaskParams, type ListTasksParams, type ListTasksResult, type TaskChangelogResult, type ListCommentsResult, type ListTagsResult, type ListUsersResult, type ListProjectsResult, type TaskActivityParams, type TaskActivityDataPoint, type TaskActivityResult, type TaskStorage, type Attachment, type CreateAttachmentParams, type PresignUploadResponse, type PresignDownloadResponse, type ListAttachmentsResult, TaskStorageService, } from './services/task.ts';
|
|
15
|
+
export { type TaskPriority, type TaskType, type TaskStatus, type UserType, type EntityRef, type UserEntityRef, type Task, type Comment, type Tag, type TaskChangelogEntry, type CreateTaskParams, type UpdateTaskParams, type ListTasksParams, type ListTasksResult, type BatchDeleteTasksParams, type BatchDeletedTask, type BatchDeleteTasksResult, type TaskChangelogResult, type ListCommentsResult, type ListTagsResult, type ListUsersResult, type ListProjectsResult, type TaskActivityParams, type TaskActivityDataPoint, type TaskActivityResult, type TaskStorage, type Attachment, type CreateAttachmentParams, type PresignUploadResponse, type PresignDownloadResponse, type ListAttachmentsResult, TaskStorageService, } from './services/task.ts';
|
|
16
16
|
export { type EvalRunEventProvider, EvalRunStartEventSchema, EvalRunCompleteEventSchema, EvalRunStartEventDelayedSchema, EvalRunCompleteEventDelayedSchema, type EvalRunStartEvent, type EvalRunCompleteEvent, } from './services/evalrun.ts';
|
|
17
17
|
export { type SandboxResources, type SandboxStatus, type SandboxSortField, type SandboxRuntimeRequirements, type SandboxRuntime, type RuntimeSortField, type ExecutionStatus, type StreamReader, type SandboxStreamConfig, type SandboxCommand, type SandboxNetworkConfig, type SandboxTimeoutConfig, type SandboxCreateOptions, type Sandbox, type SandboxInfo, type SandboxRuntimeInfo, type SandboxSnapshotInfo, type SandboxSnapshotInfoPublic, type SandboxSnapshotInfoPrivate, type SandboxSnapshotUserInfo, type SandboxSnapshotOrgInfo, type SnapshotSortField, type SandboxUserInfo, type SandboxAgentInfo, type SandboxProjectInfo, type SandboxOrgInfo, type ListSandboxesParams, type ListSandboxesResponse, type ListRuntimesParams, type ListRuntimesResponse, type ExecuteOptions, type Execution, type SandboxRunOptions, type SandboxRunResult, type SandboxService, type FileToWrite, type SnapshotFileInfo, type SnapshotOrgInfo, type SnapshotUserInfo, type SnapshotInfo, type SnapshotCreateOptions, type SnapshotListParams, type SnapshotListResponse, type SnapshotService, SandboxError, } from './services/sandbox.ts';
|
|
18
18
|
export { buildUrl, toServiceException, toPayload, fromResponse } from './services/_util.ts';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAG3E,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGpD,YAAY,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,IAAI,EACJ,UAAU,GACV,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACX,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,aAAa,GACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EACN,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAClB,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,GACtB,MAAM,wBAAwB,CAAC;AAChC,O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,EAAE,MAAM,qBAAqB,CAAC;AAG5F,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGxD,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG/D,OAAO,EACN,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,KAAK,eAAe,GACpB,MAAM,uBAAuB,CAAC;AAG/B,YAAY,EACX,cAAc,EACd,YAAY,EACZ,aAAa,EACb,SAAS,EACT,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,wBAAwB,EACxB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,WAAW,GACX,MAAM,aAAa,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE3E,kBAAkB;AAClB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAsB1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAYN,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEN,uBAAuB,EACvB,0BAA0B,EAC1B,8BAA8B,EAC9B,iCAAiC,GAGjC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAQN,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,oBAAoB,GACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAmBN,sBAAsB,EACtB,sBAAsB,EACtB,0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AAkB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAK5F,oBAAoB;AACpB,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAKxD,oBAAoB;AACpB,OAAO,EACN,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,GAElB,MAAM,uBAAuB,CAAC;AAqB/B,4EAA4E"}
|
package/dist/services/email.d.ts
CHANGED
|
@@ -1,72 +1,238 @@
|
|
|
1
1
|
import { FetchAdapter } from './adapter.ts';
|
|
2
2
|
/**
|
|
3
|
-
* An email address registered with the Agentuity email service
|
|
3
|
+
* An email address registered with the Agentuity email service.
|
|
4
|
+
*
|
|
5
|
+
* Email addresses are created under the `@agentuity.email` domain and can receive
|
|
6
|
+
* inbound emails (forwarded to configured destinations) and send outbound emails.
|
|
4
7
|
*/
|
|
5
8
|
export interface EmailAddress {
|
|
9
|
+
/**
|
|
10
|
+
* Unique identifier for the email address.
|
|
11
|
+
*
|
|
12
|
+
* @remarks Prefixed with `eaddr_`.
|
|
13
|
+
*/
|
|
6
14
|
id: string;
|
|
15
|
+
/**
|
|
16
|
+
* The full email address (e.g., `support@agentuity.email`).
|
|
17
|
+
*/
|
|
7
18
|
email: string;
|
|
19
|
+
/**
|
|
20
|
+
* Provider-specific configuration (e.g., inbound routing config).
|
|
21
|
+
*
|
|
22
|
+
* @remarks Opaque to callers — the structure is managed by the platform.
|
|
23
|
+
*/
|
|
8
24
|
config?: Record<string, unknown>;
|
|
25
|
+
/**
|
|
26
|
+
* ID of the user who registered this address.
|
|
27
|
+
*/
|
|
9
28
|
created_by?: string;
|
|
29
|
+
/**
|
|
30
|
+
* ISO 8601 timestamp when the address was created.
|
|
31
|
+
*/
|
|
10
32
|
created_at: string;
|
|
33
|
+
/**
|
|
34
|
+
* ISO 8601 timestamp when the address was last updated.
|
|
35
|
+
*/
|
|
11
36
|
updated_at?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Total number of inbound emails received at this address.
|
|
39
|
+
*/
|
|
12
40
|
inbound_count?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Total number of outbound emails sent from this address.
|
|
43
|
+
*/
|
|
13
44
|
outbound_count?: number;
|
|
45
|
+
/**
|
|
46
|
+
* ISO 8601 timestamp of the most recent inbound or outbound email activity.
|
|
47
|
+
*/
|
|
14
48
|
last_activity?: string;
|
|
15
49
|
}
|
|
16
50
|
/**
|
|
17
|
-
* A destination configuration for an email address
|
|
51
|
+
* A destination configuration for an email address.
|
|
52
|
+
*
|
|
53
|
+
* When an inbound email is received at the parent address, the platform forwards
|
|
54
|
+
* it to each configured destination via an HTTP request.
|
|
18
55
|
*/
|
|
19
56
|
export interface EmailDestination {
|
|
57
|
+
/**
|
|
58
|
+
* Unique identifier for the destination.
|
|
59
|
+
*
|
|
60
|
+
* @remarks Prefixed with `edst_`.
|
|
61
|
+
*/
|
|
20
62
|
id: string;
|
|
63
|
+
/**
|
|
64
|
+
* The destination type. Currently only `'url'` is supported.
|
|
65
|
+
*/
|
|
21
66
|
type: string;
|
|
67
|
+
/**
|
|
68
|
+
* Destination-specific configuration.
|
|
69
|
+
*
|
|
70
|
+
* @remarks
|
|
71
|
+
* For `'url'` type the shape is:
|
|
72
|
+
* ```typescript
|
|
73
|
+
* {
|
|
74
|
+
* url: string; // Must use http or https; must not point to private/loopback addresses
|
|
75
|
+
* headers?: Record<string, string>;
|
|
76
|
+
* method?: 'POST' | 'PUT' | 'PATCH';
|
|
77
|
+
* }
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
22
80
|
config?: Record<string, unknown>;
|
|
81
|
+
/**
|
|
82
|
+
* ISO 8601 timestamp when the destination was created.
|
|
83
|
+
*/
|
|
23
84
|
created_at: string;
|
|
85
|
+
/**
|
|
86
|
+
* ISO 8601 timestamp when the destination was last updated.
|
|
87
|
+
*/
|
|
24
88
|
updated_at?: string;
|
|
25
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Connection settings for an email protocol (IMAP or POP3).
|
|
92
|
+
*
|
|
93
|
+
* Used to configure a mail client for accessing an Agentuity email address
|
|
94
|
+
* via standard mail protocols.
|
|
95
|
+
*/
|
|
26
96
|
export interface EmailProtocolConfig {
|
|
97
|
+
/**
|
|
98
|
+
* The mail server hostname.
|
|
99
|
+
*/
|
|
27
100
|
host: string;
|
|
101
|
+
/**
|
|
102
|
+
* The mail server port number.
|
|
103
|
+
*/
|
|
28
104
|
port: number;
|
|
105
|
+
/**
|
|
106
|
+
* TLS mode (e.g., `'starttls'`, `'ssl'`, `'none'`).
|
|
107
|
+
*/
|
|
29
108
|
tls: string;
|
|
109
|
+
/**
|
|
110
|
+
* The authentication username (typically the address ID).
|
|
111
|
+
*/
|
|
30
112
|
username: string;
|
|
113
|
+
/**
|
|
114
|
+
* The authentication password.
|
|
115
|
+
*/
|
|
31
116
|
password: string;
|
|
32
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Full connection configuration for accessing an email address via IMAP and POP3 protocols.
|
|
120
|
+
*
|
|
121
|
+
* Returned by {@link EmailService.getConnectionConfig} to allow external mail clients
|
|
122
|
+
* to connect to an Agentuity email address.
|
|
123
|
+
*/
|
|
33
124
|
export interface EmailConnectionConfig {
|
|
125
|
+
/**
|
|
126
|
+
* The full email address these settings are for.
|
|
127
|
+
*/
|
|
34
128
|
email: string;
|
|
129
|
+
/**
|
|
130
|
+
* IMAP protocol connection settings.
|
|
131
|
+
*/
|
|
35
132
|
imap: EmailProtocolConfig;
|
|
133
|
+
/**
|
|
134
|
+
* POP3 protocol connection settings.
|
|
135
|
+
*/
|
|
36
136
|
pop3: EmailProtocolConfig;
|
|
37
137
|
}
|
|
38
138
|
/**
|
|
39
|
-
* An inbound email message
|
|
139
|
+
* An inbound email message received at an Agentuity email address.
|
|
40
140
|
*/
|
|
41
141
|
export interface EmailInbound {
|
|
142
|
+
/**
|
|
143
|
+
* Unique identifier for the inbound email.
|
|
144
|
+
*
|
|
145
|
+
* @remarks Prefixed with `einb_`.
|
|
146
|
+
*/
|
|
42
147
|
id: string;
|
|
148
|
+
/**
|
|
149
|
+
* The sender's email address.
|
|
150
|
+
*/
|
|
43
151
|
from: string;
|
|
152
|
+
/**
|
|
153
|
+
* The recipient email address (comma-separated if multiple).
|
|
154
|
+
*/
|
|
44
155
|
to: string;
|
|
156
|
+
/**
|
|
157
|
+
* The email subject line.
|
|
158
|
+
*/
|
|
45
159
|
subject?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Plain text body of the email.
|
|
162
|
+
*/
|
|
46
163
|
text?: string;
|
|
164
|
+
/**
|
|
165
|
+
* HTML body of the email.
|
|
166
|
+
*/
|
|
47
167
|
html?: string;
|
|
168
|
+
/**
|
|
169
|
+
* ISO 8601 timestamp when the email was received.
|
|
170
|
+
*/
|
|
48
171
|
received_at?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Raw email headers as key-value pairs.
|
|
174
|
+
*/
|
|
49
175
|
headers?: Record<string, unknown>;
|
|
176
|
+
/**
|
|
177
|
+
* Array of stored attachment metadata with S3 locations.
|
|
178
|
+
*/
|
|
50
179
|
attachments?: EmailStoredAttachment[];
|
|
51
180
|
}
|
|
52
181
|
/**
|
|
53
|
-
* An outbound email message
|
|
182
|
+
* An outbound email message sent from an Agentuity email address.
|
|
54
183
|
*/
|
|
55
184
|
export interface EmailOutbound {
|
|
185
|
+
/**
|
|
186
|
+
* Unique identifier for the outbound email.
|
|
187
|
+
*
|
|
188
|
+
* @remarks Prefixed with `eout_`.
|
|
189
|
+
*/
|
|
56
190
|
id: string;
|
|
191
|
+
/**
|
|
192
|
+
* The sender's email address (must be owned by the organization).
|
|
193
|
+
*/
|
|
57
194
|
from: string;
|
|
195
|
+
/**
|
|
196
|
+
* The recipient email addresses (comma-separated).
|
|
197
|
+
*/
|
|
58
198
|
to: string;
|
|
199
|
+
/**
|
|
200
|
+
* The email subject line.
|
|
201
|
+
*/
|
|
59
202
|
subject?: string;
|
|
203
|
+
/**
|
|
204
|
+
* Plain text body of the email.
|
|
205
|
+
*/
|
|
60
206
|
text?: string;
|
|
207
|
+
/**
|
|
208
|
+
* HTML body of the email.
|
|
209
|
+
*/
|
|
61
210
|
html?: string;
|
|
211
|
+
/**
|
|
212
|
+
* Delivery status: `'pending'`, `'success'`, or `'failed'`.
|
|
213
|
+
*
|
|
214
|
+
* @remarks Emails are sent asynchronously, so the initial status is always `'pending'`.
|
|
215
|
+
*/
|
|
62
216
|
status?: string;
|
|
217
|
+
/**
|
|
218
|
+
* Error message if the delivery failed.
|
|
219
|
+
*/
|
|
63
220
|
error?: string;
|
|
221
|
+
/**
|
|
222
|
+
* ISO 8601 timestamp when the send was initiated.
|
|
223
|
+
*/
|
|
64
224
|
created_at?: string;
|
|
225
|
+
/**
|
|
226
|
+
* Custom email headers that were included.
|
|
227
|
+
*/
|
|
65
228
|
headers?: Record<string, unknown>;
|
|
229
|
+
/**
|
|
230
|
+
* Array of stored attachment metadata with S3 locations.
|
|
231
|
+
*/
|
|
66
232
|
attachments?: EmailStoredAttachment[];
|
|
67
233
|
}
|
|
68
234
|
/**
|
|
69
|
-
* An email attachment
|
|
235
|
+
* An email attachment to include when sending an outbound email.
|
|
70
236
|
*/
|
|
71
237
|
export interface EmailAttachment {
|
|
72
238
|
/**
|
|
@@ -134,24 +300,46 @@ export interface EmailSendParams {
|
|
|
134
300
|
headers?: Record<string, string>;
|
|
135
301
|
}
|
|
136
302
|
/**
|
|
137
|
-
* Parameters for email activity time-series
|
|
303
|
+
* Parameters for querying email activity time-series data.
|
|
138
304
|
*/
|
|
139
305
|
export interface EmailActivityParams {
|
|
306
|
+
/**
|
|
307
|
+
* Number of days of activity to retrieve.
|
|
308
|
+
*
|
|
309
|
+
* @remarks Values below 7 are clamped to 7; values above 365 are clamped to 365.
|
|
310
|
+
*
|
|
311
|
+
* @default 7
|
|
312
|
+
*/
|
|
140
313
|
days?: number;
|
|
141
314
|
}
|
|
142
315
|
/**
|
|
143
|
-
* A single data point in the email activity time-series
|
|
316
|
+
* A single data point in the email activity time-series.
|
|
144
317
|
*/
|
|
145
318
|
export interface EmailActivityDataPoint {
|
|
319
|
+
/**
|
|
320
|
+
* The date in `YYYY-MM-DD` format.
|
|
321
|
+
*/
|
|
146
322
|
date: string;
|
|
323
|
+
/**
|
|
324
|
+
* Number of inbound emails received on this date.
|
|
325
|
+
*/
|
|
147
326
|
inbound: number;
|
|
327
|
+
/**
|
|
328
|
+
* Number of outbound emails sent on this date.
|
|
329
|
+
*/
|
|
148
330
|
outbound: number;
|
|
149
331
|
}
|
|
150
332
|
/**
|
|
151
|
-
* Result of email activity query
|
|
333
|
+
* Result of an email activity query containing daily time-series data.
|
|
152
334
|
*/
|
|
153
335
|
export interface EmailActivityResult {
|
|
336
|
+
/**
|
|
337
|
+
* Array of daily activity data points, ordered chronologically.
|
|
338
|
+
*/
|
|
154
339
|
activity: EmailActivityDataPoint[];
|
|
340
|
+
/**
|
|
341
|
+
* The number of days of data returned.
|
|
342
|
+
*/
|
|
155
343
|
days: number;
|
|
156
344
|
}
|
|
157
345
|
/**
|
|
@@ -379,24 +567,335 @@ export interface EmailService {
|
|
|
379
567
|
*/
|
|
380
568
|
getActivity(params?: EmailActivityParams): Promise<EmailActivityResult>;
|
|
381
569
|
}
|
|
570
|
+
/**
|
|
571
|
+
* Client for the Agentuity Email service.
|
|
572
|
+
*
|
|
573
|
+
* Provides methods for managing email addresses, configuring inbound email
|
|
574
|
+
* destinations, sending outbound emails, and querying email history.
|
|
575
|
+
*
|
|
576
|
+
* Email addresses are created under the `@agentuity.email` domain. Inbound emails
|
|
577
|
+
* can be forwarded to URL destinations. Outbound emails are sent asynchronously
|
|
578
|
+
* and support attachments up to 25 MB total.
|
|
579
|
+
*
|
|
580
|
+
* All methods are instrumented with OpenTelemetry spans for observability.
|
|
581
|
+
*
|
|
582
|
+
* @example
|
|
583
|
+
* ```typescript
|
|
584
|
+
* const email = new EmailStorageService(baseUrl, adapter);
|
|
585
|
+
*
|
|
586
|
+
* // Create an address
|
|
587
|
+
* const addr = await email.createAddress('notifications');
|
|
588
|
+
*
|
|
589
|
+
* // Send an email
|
|
590
|
+
* await email.send({
|
|
591
|
+
* from: addr.email,
|
|
592
|
+
* to: ['user@example.com'],
|
|
593
|
+
* subject: 'Hello',
|
|
594
|
+
* text: 'Hello from Agentuity!',
|
|
595
|
+
* });
|
|
596
|
+
* ```
|
|
597
|
+
*/
|
|
382
598
|
export declare class EmailStorageService implements EmailService {
|
|
383
599
|
#private;
|
|
600
|
+
/**
|
|
601
|
+
* Create a new EmailStorageService instance.
|
|
602
|
+
*
|
|
603
|
+
* @param baseUrl - The base URL for the Agentuity Email API (e.g., `https://api.agentuity.com`)
|
|
604
|
+
* @param adapter - The HTTP fetch adapter used for making API requests
|
|
605
|
+
*/
|
|
384
606
|
constructor(baseUrl: string, adapter: FetchAdapter);
|
|
607
|
+
/**
|
|
608
|
+
* Create a new email address under the `@agentuity.email` domain.
|
|
609
|
+
*
|
|
610
|
+
* @param localPart - The local part of the email address (the part before the `@`).
|
|
611
|
+
* For example, passing `'support'` creates `support@agentuity.email`.
|
|
612
|
+
* @returns The newly created email address record
|
|
613
|
+
* @throws ServiceException on API errors (e.g., duplicate address, invalid local part)
|
|
614
|
+
*
|
|
615
|
+
* @example
|
|
616
|
+
* ```typescript
|
|
617
|
+
* const addr = await email.createAddress('support');
|
|
618
|
+
* console.log('Created:', addr.email); // support@agentuity.email
|
|
619
|
+
* ```
|
|
620
|
+
*/
|
|
385
621
|
createAddress(localPart: string): Promise<EmailAddress>;
|
|
622
|
+
/**
|
|
623
|
+
* List all email addresses owned by the current organization.
|
|
624
|
+
*
|
|
625
|
+
* @returns An array of email address records. Returns an empty array if none exist.
|
|
626
|
+
* @throws ServiceException on API errors
|
|
627
|
+
*
|
|
628
|
+
* @example
|
|
629
|
+
* ```typescript
|
|
630
|
+
* const addresses = await email.listAddresses();
|
|
631
|
+
* for (const addr of addresses) {
|
|
632
|
+
* console.log(`${addr.email} — ${addr.inbound_count ?? 0} received`);
|
|
633
|
+
* }
|
|
634
|
+
* ```
|
|
635
|
+
*/
|
|
386
636
|
listAddresses(): Promise<EmailAddress[]>;
|
|
637
|
+
/**
|
|
638
|
+
* Get an email address by its ID.
|
|
639
|
+
*
|
|
640
|
+
* @param id - The email address ID (prefixed with `eaddr_`)
|
|
641
|
+
* @returns The email address record, or `null` if no address with the given ID exists
|
|
642
|
+
* @throws ServiceException on API errors (other than 404)
|
|
643
|
+
*
|
|
644
|
+
* @example
|
|
645
|
+
* ```typescript
|
|
646
|
+
* const addr = await email.getAddress('eaddr_abc123');
|
|
647
|
+
* if (addr) {
|
|
648
|
+
* console.log('Found:', addr.email);
|
|
649
|
+
* }
|
|
650
|
+
* ```
|
|
651
|
+
*/
|
|
387
652
|
getAddress(id: string): Promise<EmailAddress | null>;
|
|
653
|
+
/**
|
|
654
|
+
* Get IMAP and POP3 connection settings for an email address.
|
|
655
|
+
*
|
|
656
|
+
* These settings can be used to configure an external mail client (e.g., Thunderbird, Outlook)
|
|
657
|
+
* to access the mailbox associated with the given address.
|
|
658
|
+
*
|
|
659
|
+
* @param id - The email address ID (prefixed with `eaddr_`)
|
|
660
|
+
* @returns The connection configuration with IMAP and POP3 settings, or `null` if the address is not found
|
|
661
|
+
* @throws ServiceException on API errors (other than 404)
|
|
662
|
+
*
|
|
663
|
+
* @example
|
|
664
|
+
* ```typescript
|
|
665
|
+
* const config = await email.getConnectionConfig('eaddr_abc123');
|
|
666
|
+
* if (config) {
|
|
667
|
+
* console.log('IMAP host:', config.imap.host);
|
|
668
|
+
* console.log('POP3 host:', config.pop3.host);
|
|
669
|
+
* }
|
|
670
|
+
* ```
|
|
671
|
+
*/
|
|
388
672
|
getConnectionConfig(id: string): Promise<EmailConnectionConfig | null>;
|
|
673
|
+
/**
|
|
674
|
+
* Delete an email address and all associated destinations.
|
|
675
|
+
*
|
|
676
|
+
* @remarks This operation is idempotent — deleting a non-existent address does not throw.
|
|
677
|
+
*
|
|
678
|
+
* @param id - The email address ID (prefixed with `eaddr_`)
|
|
679
|
+
* @throws ServiceException on API errors (other than 404)
|
|
680
|
+
*
|
|
681
|
+
* @example
|
|
682
|
+
* ```typescript
|
|
683
|
+
* await email.deleteAddress('eaddr_abc123');
|
|
684
|
+
* ```
|
|
685
|
+
*/
|
|
389
686
|
deleteAddress(id: string): Promise<void>;
|
|
687
|
+
/**
|
|
688
|
+
* Create a new destination for an email address.
|
|
689
|
+
*
|
|
690
|
+
* Destinations determine where inbound emails are forwarded when they arrive
|
|
691
|
+
* at the parent address.
|
|
692
|
+
*
|
|
693
|
+
* @param addressId - The email address ID (prefixed with `eaddr_`)
|
|
694
|
+
* @param type - The destination type (currently only `'url'` is supported)
|
|
695
|
+
* @param config - Type-specific destination configuration. For `'url'`:
|
|
696
|
+
* `{ url: string, headers?: Record<string, string>, method?: 'POST' | 'PUT' | 'PATCH' }`
|
|
697
|
+
* @returns The newly created destination record
|
|
698
|
+
* @throws ServiceException on API errors (e.g., invalid URL, address not found)
|
|
699
|
+
*
|
|
700
|
+
* @example
|
|
701
|
+
* ```typescript
|
|
702
|
+
* const dest = await email.createDestination('eaddr_abc123', 'url', {
|
|
703
|
+
* url: 'https://example.com/webhook',
|
|
704
|
+
* headers: { 'X-Secret': 'my-token' },
|
|
705
|
+
* });
|
|
706
|
+
* console.log('Destination created:', dest.id);
|
|
707
|
+
* ```
|
|
708
|
+
*/
|
|
390
709
|
createDestination(addressId: string, type: string, config: Record<string, unknown>): Promise<EmailDestination>;
|
|
710
|
+
/**
|
|
711
|
+
* List all destinations configured for an email address.
|
|
712
|
+
*
|
|
713
|
+
* @param addressId - The email address ID (prefixed with `eaddr_`)
|
|
714
|
+
* @returns An array of destination records. Returns an empty array if none exist.
|
|
715
|
+
* @throws ServiceException on API errors
|
|
716
|
+
*
|
|
717
|
+
* @example
|
|
718
|
+
* ```typescript
|
|
719
|
+
* const destinations = await email.listDestinations('eaddr_abc123');
|
|
720
|
+
* for (const dest of destinations) {
|
|
721
|
+
* console.log(`${dest.type}: ${dest.id}`);
|
|
722
|
+
* }
|
|
723
|
+
* ```
|
|
724
|
+
*/
|
|
391
725
|
listDestinations(addressId: string): Promise<EmailDestination[]>;
|
|
726
|
+
/**
|
|
727
|
+
* Delete a destination from an email address.
|
|
728
|
+
*
|
|
729
|
+
* @remarks This operation is idempotent — deleting a non-existent destination does not throw.
|
|
730
|
+
*
|
|
731
|
+
* @param addressId - The email address ID (prefixed with `eaddr_`)
|
|
732
|
+
* @param destinationId - The destination ID (prefixed with `edst_`)
|
|
733
|
+
* @throws ServiceException on API errors (other than 404)
|
|
734
|
+
*
|
|
735
|
+
* @example
|
|
736
|
+
* ```typescript
|
|
737
|
+
* await email.deleteDestination('eaddr_abc123', 'edst_xyz789');
|
|
738
|
+
* ```
|
|
739
|
+
*/
|
|
392
740
|
deleteDestination(addressId: string, destinationId: string): Promise<void>;
|
|
741
|
+
/**
|
|
742
|
+
* Send an outbound email from an Agentuity email address.
|
|
743
|
+
*
|
|
744
|
+
* Emails are sent asynchronously — this method returns immediately with an outbound
|
|
745
|
+
* record whose status is `'pending'`. Use {@link getOutbound} to poll for delivery status.
|
|
746
|
+
*
|
|
747
|
+
* @remarks
|
|
748
|
+
* - The `from` address must be owned by the current organization.
|
|
749
|
+
* - Maximum 50 recipients per send.
|
|
750
|
+
* - Maximum 25 MB for the full RFC 822 body (including attachments).
|
|
751
|
+
*
|
|
752
|
+
* @param params - The email send parameters including from, to, subject, and body
|
|
753
|
+
* @returns The outbound email record with initial status `'pending'`
|
|
754
|
+
* @throws ServiceException on API errors (e.g., invalid sender, too many recipients)
|
|
755
|
+
*
|
|
756
|
+
* @example
|
|
757
|
+
* ```typescript
|
|
758
|
+
* const result = await email.send({
|
|
759
|
+
* from: 'notifications@agentuity.email',
|
|
760
|
+
* to: ['user@example.com'],
|
|
761
|
+
* subject: 'Welcome!',
|
|
762
|
+
* text: 'Welcome to our platform.',
|
|
763
|
+
* html: '<h1>Welcome!</h1>',
|
|
764
|
+
* attachments: [{
|
|
765
|
+
* filename: 'guide.pdf',
|
|
766
|
+
* content: base64EncodedPdf,
|
|
767
|
+
* contentType: 'application/pdf',
|
|
768
|
+
* }],
|
|
769
|
+
* });
|
|
770
|
+
* console.log('Email queued:', result.id);
|
|
771
|
+
* ```
|
|
772
|
+
*/
|
|
393
773
|
send(params: EmailSendParams): Promise<EmailOutbound>;
|
|
774
|
+
/**
|
|
775
|
+
* List inbound emails, optionally filtered by email address.
|
|
776
|
+
*
|
|
777
|
+
* @param addressId - Optional email address ID (prefixed with `eaddr_`) to filter results.
|
|
778
|
+
* When omitted, returns inbound emails across all addresses in the organization.
|
|
779
|
+
* @returns An array of inbound email records. Returns an empty array if none exist.
|
|
780
|
+
* @throws ServiceException on API errors
|
|
781
|
+
*
|
|
782
|
+
* @example
|
|
783
|
+
* ```typescript
|
|
784
|
+
* // List all inbound emails
|
|
785
|
+
* const all = await email.listInbound();
|
|
786
|
+
*
|
|
787
|
+
* // List inbound for a specific address
|
|
788
|
+
* const filtered = await email.listInbound('eaddr_abc123');
|
|
789
|
+
* for (const msg of filtered) {
|
|
790
|
+
* console.log(`From: ${msg.from}, Subject: ${msg.subject}`);
|
|
791
|
+
* }
|
|
792
|
+
* ```
|
|
793
|
+
*/
|
|
394
794
|
listInbound(addressId?: string): Promise<EmailInbound[]>;
|
|
795
|
+
/**
|
|
796
|
+
* Get an inbound email by its ID.
|
|
797
|
+
*
|
|
798
|
+
* @param id - The inbound email ID (prefixed with `einb_`)
|
|
799
|
+
* @returns The inbound email record, or `null` if not found
|
|
800
|
+
* @throws ServiceException on API errors (other than 404)
|
|
801
|
+
*
|
|
802
|
+
* @example
|
|
803
|
+
* ```typescript
|
|
804
|
+
* const msg = await email.getInbound('einb_abc123');
|
|
805
|
+
* if (msg) {
|
|
806
|
+
* console.log('Subject:', msg.subject);
|
|
807
|
+
* console.log('Attachments:', msg.attachments?.length ?? 0);
|
|
808
|
+
* }
|
|
809
|
+
* ```
|
|
810
|
+
*/
|
|
395
811
|
getInbound(id: string): Promise<EmailInbound | null>;
|
|
812
|
+
/**
|
|
813
|
+
* Delete an inbound email by its ID.
|
|
814
|
+
*
|
|
815
|
+
* @remarks This operation is idempotent — deleting a non-existent email does not throw.
|
|
816
|
+
*
|
|
817
|
+
* @param id - The inbound email ID (prefixed with `einb_`)
|
|
818
|
+
* @throws ServiceException on API errors (other than 404)
|
|
819
|
+
*
|
|
820
|
+
* @example
|
|
821
|
+
* ```typescript
|
|
822
|
+
* await email.deleteInbound('einb_abc123');
|
|
823
|
+
* ```
|
|
824
|
+
*/
|
|
396
825
|
deleteInbound(id: string): Promise<void>;
|
|
826
|
+
/**
|
|
827
|
+
* List outbound emails, optionally filtered by email address.
|
|
828
|
+
*
|
|
829
|
+
* @param addressId - Optional email address ID (prefixed with `eaddr_`) to filter results.
|
|
830
|
+
* When omitted, returns outbound emails across all addresses in the organization.
|
|
831
|
+
* @returns An array of outbound email records. Returns an empty array if none exist.
|
|
832
|
+
* @throws ServiceException on API errors
|
|
833
|
+
*
|
|
834
|
+
* @example
|
|
835
|
+
* ```typescript
|
|
836
|
+
* // List all outbound emails
|
|
837
|
+
* const all = await email.listOutbound();
|
|
838
|
+
*
|
|
839
|
+
* // List outbound for a specific address
|
|
840
|
+
* const filtered = await email.listOutbound('eaddr_abc123');
|
|
841
|
+
* for (const msg of filtered) {
|
|
842
|
+
* console.log(`To: ${msg.to}, Status: ${msg.status}`);
|
|
843
|
+
* }
|
|
844
|
+
* ```
|
|
845
|
+
*/
|
|
397
846
|
listOutbound(addressId?: string): Promise<EmailOutbound[]>;
|
|
847
|
+
/**
|
|
848
|
+
* Get an outbound email by its ID.
|
|
849
|
+
*
|
|
850
|
+
* @param id - The outbound email ID (prefixed with `eout_`)
|
|
851
|
+
* @returns The outbound email record, or `null` if not found
|
|
852
|
+
* @throws ServiceException on API errors (other than 404)
|
|
853
|
+
*
|
|
854
|
+
* @example
|
|
855
|
+
* ```typescript
|
|
856
|
+
* const msg = await email.getOutbound('eout_abc123');
|
|
857
|
+
* if (msg) {
|
|
858
|
+
* console.log('Status:', msg.status);
|
|
859
|
+
* if (msg.error) {
|
|
860
|
+
* console.error('Delivery failed:', msg.error);
|
|
861
|
+
* }
|
|
862
|
+
* }
|
|
863
|
+
* ```
|
|
864
|
+
*/
|
|
398
865
|
getOutbound(id: string): Promise<EmailOutbound | null>;
|
|
866
|
+
/**
|
|
867
|
+
* Delete an outbound email by its ID.
|
|
868
|
+
*
|
|
869
|
+
* @remarks This operation is idempotent — deleting a non-existent email does not throw.
|
|
870
|
+
*
|
|
871
|
+
* @param id - The outbound email ID (prefixed with `eout_`)
|
|
872
|
+
* @throws ServiceException on API errors (other than 404)
|
|
873
|
+
*
|
|
874
|
+
* @example
|
|
875
|
+
* ```typescript
|
|
876
|
+
* await email.deleteOutbound('eout_abc123');
|
|
877
|
+
* ```
|
|
878
|
+
*/
|
|
399
879
|
deleteOutbound(id: string): Promise<void>;
|
|
880
|
+
/**
|
|
881
|
+
* Get email activity time-series data showing inbound and outbound counts per day.
|
|
882
|
+
*
|
|
883
|
+
* @param params - Optional query parameters. `days` controls the lookback window
|
|
884
|
+
* (minimum 7, maximum 365, server default 7).
|
|
885
|
+
* @returns An {@link EmailActivityResult} with daily data points ordered chronologically
|
|
886
|
+
* and the total number of days returned
|
|
887
|
+
* @throws ServiceException on API errors
|
|
888
|
+
*
|
|
889
|
+
* @example
|
|
890
|
+
* ```typescript
|
|
891
|
+
* // Get last 30 days of activity
|
|
892
|
+
* const result = await email.getActivity({ days: 30 });
|
|
893
|
+
* console.log(`Activity over ${result.days} days:`);
|
|
894
|
+
* for (const point of result.activity) {
|
|
895
|
+
* console.log(` ${point.date}: ${point.inbound} in, ${point.outbound} out`);
|
|
896
|
+
* }
|
|
897
|
+
* ```
|
|
898
|
+
*/
|
|
400
899
|
getActivity(params?: EmailActivityParams): Promise<EmailActivityResult>;
|
|
401
900
|
}
|
|
402
901
|
//# sourceMappingURL=email.d.ts.map
|