carlyemail 0.6.5 → 0.6.6
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/carlyemail.js +1 -1
- package/package.json +1 -1
- package/sdk.d.ts +51 -3
- package/sdk.js +18 -3
package/carlyemail.js
CHANGED
|
@@ -18,7 +18,7 @@ import { basename, extname, join } from "node:path";
|
|
|
18
18
|
import { fileURLToPath } from "node:url";
|
|
19
19
|
import { randomBytes } from "node:crypto";
|
|
20
20
|
|
|
21
|
-
export const VERSION = "0.6.
|
|
21
|
+
export const VERSION = "0.6.6";
|
|
22
22
|
|
|
23
23
|
const DEFAULT_API = "https://api.carlyemail.com";
|
|
24
24
|
const CONFIG_DIR = join(homedir(), ".carlyemail");
|
package/package.json
CHANGED
package/sdk.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
// Generated by scripts/build_sdk.py from the OpenAPI spec. Do not edit.
|
|
2
2
|
|
|
3
|
+
export interface Actor {
|
|
4
|
+
type: string;
|
|
5
|
+
member_id?: string | null;
|
|
6
|
+
api_key_id?: string | null;
|
|
7
|
+
name?: string | null;
|
|
8
|
+
email?: string | null;
|
|
9
|
+
}
|
|
10
|
+
|
|
3
11
|
export interface AgentSigninRequest {
|
|
4
12
|
human_email: string;
|
|
5
13
|
}
|
|
@@ -164,6 +172,10 @@ export interface CreateListEntryRequest {
|
|
|
164
172
|
reason?: string | null;
|
|
165
173
|
}
|
|
166
174
|
|
|
175
|
+
export interface CreateNoteRequest {
|
|
176
|
+
text: string;
|
|
177
|
+
}
|
|
178
|
+
|
|
167
179
|
export interface CreatePodRequest {
|
|
168
180
|
name?: string | null;
|
|
169
181
|
client_id?: string | null;
|
|
@@ -191,6 +203,14 @@ export interface DomainOut {
|
|
|
191
203
|
created_at: string;
|
|
192
204
|
}
|
|
193
205
|
|
|
206
|
+
export interface DraftInProgress {
|
|
207
|
+
draft_id: string;
|
|
208
|
+
created_by?: Actor | null;
|
|
209
|
+
updated_by?: Actor | null;
|
|
210
|
+
send_at?: string | null;
|
|
211
|
+
updated_at: string;
|
|
212
|
+
}
|
|
213
|
+
|
|
194
214
|
export interface DraftOut {
|
|
195
215
|
inbox_id: string;
|
|
196
216
|
draft_id: string;
|
|
@@ -210,6 +230,8 @@ export interface DraftOut {
|
|
|
210
230
|
references?: Array<string>;
|
|
211
231
|
send_status?: string | null;
|
|
212
232
|
send_at?: string | null;
|
|
233
|
+
created_by?: Actor | null;
|
|
234
|
+
updated_by?: Actor | null;
|
|
213
235
|
updated_at: string;
|
|
214
236
|
created_at: string;
|
|
215
237
|
}
|
|
@@ -270,6 +292,7 @@ export interface InboxEventOut {
|
|
|
270
292
|
event_type: "label.added" | "label.removed";
|
|
271
293
|
message_id?: string | null;
|
|
272
294
|
label?: string | null;
|
|
295
|
+
actor?: Actor | null;
|
|
273
296
|
event_at: string;
|
|
274
297
|
created_at: string;
|
|
275
298
|
}
|
|
@@ -365,6 +388,11 @@ export interface ListMessagesResponse {
|
|
|
365
388
|
messages: Array<MessageItem>;
|
|
366
389
|
}
|
|
367
390
|
|
|
391
|
+
export interface ListNotesResponse {
|
|
392
|
+
count: number;
|
|
393
|
+
notes: Array<NoteOut>;
|
|
394
|
+
}
|
|
395
|
+
|
|
368
396
|
export interface ListPodsResponse {
|
|
369
397
|
count: number;
|
|
370
398
|
limit?: number | null;
|
|
@@ -418,6 +446,7 @@ export interface MessageItem {
|
|
|
418
446
|
preview?: string | null;
|
|
419
447
|
attachments?: Array<AttachmentOut>;
|
|
420
448
|
size?: number;
|
|
449
|
+
sent_by?: Actor | null;
|
|
421
450
|
updated_at: string;
|
|
422
451
|
created_at: string;
|
|
423
452
|
}
|
|
@@ -437,6 +466,7 @@ export interface MessageOut {
|
|
|
437
466
|
preview?: string | null;
|
|
438
467
|
attachments?: Array<AttachmentOut>;
|
|
439
468
|
size?: number;
|
|
469
|
+
sent_by?: Actor | null;
|
|
440
470
|
updated_at: string;
|
|
441
471
|
created_at: string;
|
|
442
472
|
text?: string | null;
|
|
@@ -449,6 +479,15 @@ export interface MessageOut {
|
|
|
449
479
|
authentication?: Record<string, string>;
|
|
450
480
|
}
|
|
451
481
|
|
|
482
|
+
export interface NoteOut {
|
|
483
|
+
note_id: string;
|
|
484
|
+
thread_id: string;
|
|
485
|
+
inbox_id: string;
|
|
486
|
+
text: string;
|
|
487
|
+
author?: Actor | null;
|
|
488
|
+
created_at: string;
|
|
489
|
+
}
|
|
490
|
+
|
|
452
491
|
export interface OrganizationChoice {
|
|
453
492
|
organization_id: string;
|
|
454
493
|
name?: string | null;
|
|
@@ -575,6 +614,7 @@ export interface ThreadItem {
|
|
|
575
614
|
last_message_id?: string | null;
|
|
576
615
|
message_count?: number;
|
|
577
616
|
size?: number;
|
|
617
|
+
assignee?: Actor | null;
|
|
578
618
|
updated_at: string;
|
|
579
619
|
created_at: string;
|
|
580
620
|
}
|
|
@@ -594,9 +634,12 @@ export interface ThreadOut {
|
|
|
594
634
|
last_message_id?: string | null;
|
|
595
635
|
message_count?: number;
|
|
596
636
|
size?: number;
|
|
637
|
+
assignee?: Actor | null;
|
|
597
638
|
updated_at: string;
|
|
598
639
|
created_at: string;
|
|
599
640
|
messages?: Array<MessageOut>;
|
|
641
|
+
notes?: Array<NoteOut>;
|
|
642
|
+
drafts?: Array<DraftInProgress>;
|
|
600
643
|
}
|
|
601
644
|
|
|
602
645
|
export interface UpdateDomainRequest {
|
|
@@ -648,11 +691,13 @@ export interface UpdateMessageResponse {
|
|
|
648
691
|
export interface UpdateThreadRequest {
|
|
649
692
|
add_labels?: Array<string> | null;
|
|
650
693
|
remove_labels?: Array<string> | null;
|
|
694
|
+
assignee_id?: string | null;
|
|
651
695
|
}
|
|
652
696
|
|
|
653
697
|
export interface UpdateThreadResponse {
|
|
654
698
|
thread_id: string;
|
|
655
699
|
labels: Array<string>;
|
|
700
|
+
assignee?: Actor | null;
|
|
656
701
|
}
|
|
657
702
|
|
|
658
703
|
export interface UpdateWebhookHeadersRequest {
|
|
@@ -779,13 +824,16 @@ export declare class Messages {
|
|
|
779
824
|
}
|
|
780
825
|
|
|
781
826
|
export declare class Threads {
|
|
782
|
-
list(inboxId: string, query?: { limit?: number | null; pageToken?: string | null; labels?: Array<string> | null; before?: string | null; after?: string | null; ascending?: boolean; senders?: Array<string> | null; recipients?: Array<string> | null; subject?: string | null }): Promise<ListThreadsResponse>;
|
|
827
|
+
list(inboxId: string, query?: { limit?: number | null; pageToken?: string | null; labels?: Array<string> | null; before?: string | null; after?: string | null; ascending?: boolean; senders?: Array<string> | null; recipients?: Array<string> | null; subject?: string | null; assignee?: string | null }): Promise<ListThreadsResponse>;
|
|
783
828
|
search(inboxId: string, query?: { q?: string; limit?: number | null; pageToken?: string | null; before?: string | null; after?: string | null }): Promise<ListThreadsResponse>;
|
|
784
829
|
getAttachment(inboxId: string, threadId: string, attachmentId: string): Promise<AttachmentResponse>;
|
|
785
830
|
get(inboxId: string, threadId: string): Promise<ThreadOut>;
|
|
786
831
|
update(inboxId: string, threadId: string, body: UpdateThreadRequest): Promise<UpdateThreadResponse>;
|
|
787
832
|
delete(inboxId: string, threadId: string): Promise<void>;
|
|
788
|
-
|
|
833
|
+
listNotes(inboxId: string, threadId: string): Promise<ListNotesResponse>;
|
|
834
|
+
addNote(inboxId: string, threadId: string, body: CreateNoteRequest): Promise<NoteOut>;
|
|
835
|
+
deleteNote(inboxId: string, threadId: string, noteId: string): Promise<void>;
|
|
836
|
+
listOrg(query?: { limit?: number | null; pageToken?: string | null; labels?: Array<string> | null; before?: string | null; after?: string | null; ascending?: boolean; includeSpam?: boolean; includeBlocked?: boolean; includeUnauthenticated?: boolean; includeTrash?: boolean; senders?: Array<string> | null; recipients?: Array<string> | null; subject?: string | null; assignee?: string | null }): Promise<ListThreadsResponse>;
|
|
789
837
|
searchOrg(query?: { q?: string; limit?: number | null; pageToken?: string | null; before?: string | null; after?: string | null }): Promise<ListThreadsResponse>;
|
|
790
838
|
getOrg(threadId: string): Promise<ThreadOut>;
|
|
791
839
|
updateOrg(threadId: string, body: UpdateThreadRequest): Promise<UpdateThreadResponse>;
|
|
@@ -865,7 +913,7 @@ export declare class Pods {
|
|
|
865
913
|
getInbox(inboxId: string, podId: string): Promise<InboxOut>;
|
|
866
914
|
updateInbox(inboxId: string, podId: string, body: UpdateInboxRequest): Promise<InboxOut>;
|
|
867
915
|
deleteInbox(inboxId: string, podId: string, query?: { force?: boolean }): Promise<void>;
|
|
868
|
-
listThreads(podId: string, query?: { limit?: number | null; pageToken?: string | null; labels?: Array<string> | null; before?: string | null; after?: string | null; ascending?: boolean; includeSpam?: boolean; includeBlocked?: boolean; includeUnauthenticated?: boolean; includeTrash?: boolean; senders?: Array<string> | null; recipients?: Array<string> | null; subject?: string | null }): Promise<ListThreadsResponse>;
|
|
916
|
+
listThreads(podId: string, query?: { limit?: number | null; pageToken?: string | null; labels?: Array<string> | null; before?: string | null; after?: string | null; ascending?: boolean; includeSpam?: boolean; includeBlocked?: boolean; includeUnauthenticated?: boolean; includeTrash?: boolean; senders?: Array<string> | null; recipients?: Array<string> | null; subject?: string | null; assignee?: string | null }): Promise<ListThreadsResponse>;
|
|
869
917
|
searchThreads(podId: string, query?: { q?: string; limit?: number | null; pageToken?: string | null; before?: string | null; after?: string | null }): Promise<ListThreadsResponse>;
|
|
870
918
|
getThread(threadId: string, podId: string): Promise<ThreadOut>;
|
|
871
919
|
updateThread(threadId: string, podId: string, body: UpdateThreadRequest): Promise<UpdateThreadResponse>;
|
package/sdk.js
CHANGED
|
@@ -251,7 +251,7 @@ class Threads {
|
|
|
251
251
|
|
|
252
252
|
/** List Threads */
|
|
253
253
|
list(inboxId, query = {}) {
|
|
254
|
-
return this.$.request("GET", `/v0/inboxes/${encode(inboxId)}/threads`, { query: { "limit": query.limit, "page_token": query.pageToken, "labels": query.labels, "before": query.before, "after": query.after, "ascending": query.ascending, "senders": query.senders, "recipients": query.recipients, "subject": query.subject } });
|
|
254
|
+
return this.$.request("GET", `/v0/inboxes/${encode(inboxId)}/threads`, { query: { "limit": query.limit, "page_token": query.pageToken, "labels": query.labels, "before": query.before, "after": query.after, "ascending": query.ascending, "senders": query.senders, "recipients": query.recipients, "subject": query.subject, "assignee": query.assignee } });
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
/** Search Threads */
|
|
@@ -279,9 +279,24 @@ class Threads {
|
|
|
279
279
|
return this.$.request("DELETE", `/v0/inboxes/${encode(inboxId)}/threads/${encode(threadId)}`);
|
|
280
280
|
}
|
|
281
281
|
|
|
282
|
+
/** List Notes */
|
|
283
|
+
listNotes(inboxId, threadId) {
|
|
284
|
+
return this.$.request("GET", `/v0/inboxes/${encode(inboxId)}/threads/${encode(threadId)}/notes`);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/** Add Note */
|
|
288
|
+
addNote(inboxId, threadId, body) {
|
|
289
|
+
return this.$.request("POST", `/v0/inboxes/${encode(inboxId)}/threads/${encode(threadId)}/notes`, { body });
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/** Delete Note */
|
|
293
|
+
deleteNote(inboxId, threadId, noteId) {
|
|
294
|
+
return this.$.request("DELETE", `/v0/inboxes/${encode(inboxId)}/threads/${encode(threadId)}/notes/${encode(noteId)}`);
|
|
295
|
+
}
|
|
296
|
+
|
|
282
297
|
/** List Threads */
|
|
283
298
|
listOrg(query = {}) {
|
|
284
|
-
return this.$.request("GET", `/v0/threads`, { query: { "limit": query.limit, "page_token": query.pageToken, "labels": query.labels, "before": query.before, "after": query.after, "ascending": query.ascending, "include_spam": query.includeSpam, "include_blocked": query.includeBlocked, "include_unauthenticated": query.includeUnauthenticated, "include_trash": query.includeTrash, "senders": query.senders, "recipients": query.recipients, "subject": query.subject } });
|
|
299
|
+
return this.$.request("GET", `/v0/threads`, { query: { "limit": query.limit, "page_token": query.pageToken, "labels": query.labels, "before": query.before, "after": query.after, "ascending": query.ascending, "include_spam": query.includeSpam, "include_blocked": query.includeBlocked, "include_unauthenticated": query.includeUnauthenticated, "include_trash": query.includeTrash, "senders": query.senders, "recipients": query.recipients, "subject": query.subject, "assignee": query.assignee } });
|
|
285
300
|
}
|
|
286
301
|
|
|
287
302
|
/** Search Threads */
|
|
@@ -609,7 +624,7 @@ class Pods {
|
|
|
609
624
|
|
|
610
625
|
/** List Threads */
|
|
611
626
|
listThreads(podId, query = {}) {
|
|
612
|
-
return this.$.request("GET", `/v0/pods/${encode(podId)}/threads`, { query: { "limit": query.limit, "page_token": query.pageToken, "labels": query.labels, "before": query.before, "after": query.after, "ascending": query.ascending, "include_spam": query.includeSpam, "include_blocked": query.includeBlocked, "include_unauthenticated": query.includeUnauthenticated, "include_trash": query.includeTrash, "senders": query.senders, "recipients": query.recipients, "subject": query.subject } });
|
|
627
|
+
return this.$.request("GET", `/v0/pods/${encode(podId)}/threads`, { query: { "limit": query.limit, "page_token": query.pageToken, "labels": query.labels, "before": query.before, "after": query.after, "ascending": query.ascending, "include_spam": query.includeSpam, "include_blocked": query.includeBlocked, "include_unauthenticated": query.includeUnauthenticated, "include_trash": query.includeTrash, "senders": query.senders, "recipients": query.recipients, "subject": query.subject, "assignee": query.assignee } });
|
|
613
628
|
}
|
|
614
629
|
|
|
615
630
|
/** Search Threads */
|