emailr 1.6.0 → 1.7.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/dist/index.d.mts CHANGED
@@ -644,6 +644,45 @@ interface EmailMetrics {
644
644
  bounced: number;
645
645
  complained: number;
646
646
  }
647
+ interface Topic {
648
+ id: string;
649
+ organization_id: string;
650
+ name: string;
651
+ description: string | null;
652
+ created_at: string;
653
+ updated_at: string;
654
+ }
655
+ interface CreateTopicRequest {
656
+ name: string;
657
+ description?: string;
658
+ }
659
+ interface UpdateTopicRequest {
660
+ name?: string;
661
+ description?: string;
662
+ }
663
+ interface ContactPropertyDefinition {
664
+ id: string;
665
+ organization_id: string;
666
+ name: string;
667
+ type: 'string' | 'number' | 'boolean' | 'date';
668
+ created_at: string;
669
+ updated_at: string;
670
+ }
671
+ interface CreateContactPropertyDefinitionRequest {
672
+ name: string;
673
+ type: 'string' | 'number' | 'boolean' | 'date';
674
+ }
675
+ interface EmailEvent {
676
+ id: string;
677
+ email_id: string;
678
+ event_type: string;
679
+ created_at: string;
680
+ metadata?: Record<string, unknown>;
681
+ }
682
+ interface ListLogsParams {
683
+ email_id?: string;
684
+ event_type?: string;
685
+ }
647
686
 
648
687
  declare class InboxesResource {
649
688
  private readonly http;
@@ -779,6 +818,13 @@ declare class TemplatesResource {
779
818
  * @returns The HTML content as a string
780
819
  */
781
820
  fetch(id: string, options?: FetchTemplateOptions): Promise<string>;
821
+ /**
822
+ * Publish a template, promoting preview_html to html_content
823
+ *
824
+ * @param id - The template ID
825
+ * @returns The published template
826
+ */
827
+ publish(id: string): Promise<Template>;
782
828
  }
783
829
 
784
830
  declare class DomainsResource {
@@ -944,6 +990,16 @@ declare class SegmentsResource {
944
990
  getCount(id: string): Promise<{
945
991
  count: number;
946
992
  }>;
993
+ /**
994
+ * Add a single contact to a manual segment
995
+ */
996
+ addContact(id: string, contactId: string): Promise<SuccessResponse>;
997
+ /**
998
+ * Bulk add contacts to a manual segment
999
+ */
1000
+ bulkAddContacts(id: string, contactIds: string[]): Promise<{
1001
+ added: number;
1002
+ }>;
947
1003
  }
948
1004
 
949
1005
  /**
@@ -1091,6 +1147,55 @@ declare class ThreadsResource {
1091
1147
  }>;
1092
1148
  }
1093
1149
 
1150
+ declare class TopicsResource {
1151
+ private readonly http;
1152
+ constructor(http: HttpClient);
1153
+ /**
1154
+ * List all topics
1155
+ */
1156
+ list(): Promise<{
1157
+ topics: Topic[];
1158
+ }>;
1159
+ /**
1160
+ * Create a new topic
1161
+ */
1162
+ create(data: CreateTopicRequest): Promise<Topic>;
1163
+ /**
1164
+ * Update a topic
1165
+ */
1166
+ update(id: string, data: UpdateTopicRequest): Promise<Topic>;
1167
+ /**
1168
+ * Delete a topic
1169
+ */
1170
+ delete(id: string): Promise<SuccessResponse>;
1171
+ }
1172
+
1173
+ declare class ContactPropertiesResource {
1174
+ private readonly http;
1175
+ constructor(http: HttpClient);
1176
+ /**
1177
+ * List all contact property definitions
1178
+ */
1179
+ list(): Promise<ContactPropertyDefinition[]>;
1180
+ /**
1181
+ * Create a new contact property definition
1182
+ */
1183
+ create(data: CreateContactPropertyDefinitionRequest): Promise<ContactPropertyDefinition>;
1184
+ /**
1185
+ * Delete a contact property definition
1186
+ */
1187
+ delete(id: string): Promise<SuccessResponse>;
1188
+ }
1189
+
1190
+ declare class LogsResource {
1191
+ private readonly http;
1192
+ constructor(http: HttpClient);
1193
+ /**
1194
+ * List email event logs with optional filtering
1195
+ */
1196
+ list(params?: ListLogsParams): Promise<EmailEvent[]>;
1197
+ }
1198
+
1094
1199
  /**
1095
1200
  * Configuration options for the Emailr client
1096
1201
  */
@@ -1186,6 +1291,18 @@ declare class Emailr {
1186
1291
  * Thread and label management
1187
1292
  */
1188
1293
  readonly threads: ThreadsResource;
1294
+ /**
1295
+ * Broadcast topic management
1296
+ */
1297
+ readonly topics: TopicsResource;
1298
+ /**
1299
+ * Contact property definitions
1300
+ */
1301
+ readonly contactProperties: ContactPropertiesResource;
1302
+ /**
1303
+ * Email event logs
1304
+ */
1305
+ readonly logs: LogsResource;
1189
1306
  private readonly http;
1190
1307
  constructor(config: EmailrConfig);
1191
1308
  }
@@ -1233,4 +1350,4 @@ declare class ValidationError extends EmailrError {
1233
1350
  constructor(message: string, details?: Record<string, unknown>, requestId?: string);
1234
1351
  }
1235
1352
 
1236
- export { type AddDomainRequest, type ApiKey, type Attachment, AuthenticationError, type Broadcast, type BulkCreateContactsRequest, type BulkCreateContactsResponse, type Contact, type ContactListResponse, type CreateApiKeyRequest, type CreateBroadcastRequest, type CreateContactRequest, type CreateForwardingRuleRequest, type CreateInboxRequest, type CreateSegmentRequest, type CreateTemplateRequest, type CreateWebhookRequest, type DnsRecord, type DnsVerificationStatus, type Domain, type DomainDnsRecords, type DomainVerificationStatus, type Email, Emailr, Emailr as EmailrClient, type EmailrConfig, EmailrError, type FetchTemplateOptions, type ForwardEmailRequest, type ForwardingRule, type Inbox, type ListApiKeysParams, type ListBroadcastsParams, type ListContactsParams, type ListEmailsParams, type ListInboxesParams, type ListSegmentsParams, type ListTemplatesParams, type ListThreadsParams, type ListWebhooksParams, NetworkError, NotFoundError, type PaginatedResponse, type PushPreviewResponse, RateLimitError, type ReplyTo, type Segment, type SendBroadcastResponse, type SendEmailRequest, type SendEmailResponse, type SuccessResponse, type Template, type Thread, type ThreadDetail, type ThreadDraft, type ThreadDraftRequest, type ThreadMessage, type ThreadReplyRequest, type ThreadReplyResponse, type UpdateBroadcastRequest, type UpdateContactRequest, type UpdateDomainRequest, type UpdateInboxRequest, type UpdateLabelsRequest, type UpdateLabelsResponse, type UpdateSegmentRequest, type UpdateTemplateRequest, type UpdateThreadLabelsResponse, type UpdateWebhookRequest, ValidationError, type Webhook, type WebhookDelivery, type WebhookToggleResponse };
1353
+ export { type AddDomainRequest, type ApiKey, type Attachment, AuthenticationError, type Broadcast, type BulkCreateContactsRequest, type BulkCreateContactsResponse, type Contact, type ContactListResponse, type ContactPropertyDefinition, type CreateApiKeyRequest, type CreateBroadcastRequest, type CreateContactPropertyDefinitionRequest, type CreateContactRequest, type CreateForwardingRuleRequest, type CreateInboxRequest, type CreateSegmentRequest, type CreateTemplateRequest, type CreateTopicRequest, type CreateWebhookRequest, type DnsRecord, type DnsVerificationStatus, type Domain, type DomainDnsRecords, type DomainVerificationStatus, type Email, type EmailEvent, Emailr, Emailr as EmailrClient, type EmailrConfig, EmailrError, type FetchTemplateOptions, type ForwardEmailRequest, type ForwardingRule, type Inbox, type ListApiKeysParams, type ListBroadcastsParams, type ListContactsParams, type ListEmailsParams, type ListInboxesParams, type ListLogsParams, type ListSegmentsParams, type ListTemplatesParams, type ListThreadsParams, type ListWebhooksParams, NetworkError, NotFoundError, type PaginatedResponse, type PushPreviewResponse, RateLimitError, type ReplyTo, type Segment, type SendBroadcastResponse, type SendEmailRequest, type SendEmailResponse, type SuccessResponse, type Template, type Thread, type ThreadDetail, type ThreadDraft, type ThreadDraftRequest, type ThreadMessage, type ThreadReplyRequest, type ThreadReplyResponse, type Topic, type UpdateBroadcastRequest, type UpdateContactRequest, type UpdateDomainRequest, type UpdateInboxRequest, type UpdateLabelsRequest, type UpdateLabelsResponse, type UpdateSegmentRequest, type UpdateTemplateRequest, type UpdateThreadLabelsResponse, type UpdateTopicRequest, type UpdateWebhookRequest, ValidationError, type Webhook, type WebhookDelivery, type WebhookToggleResponse };
package/dist/index.d.ts CHANGED
@@ -644,6 +644,45 @@ interface EmailMetrics {
644
644
  bounced: number;
645
645
  complained: number;
646
646
  }
647
+ interface Topic {
648
+ id: string;
649
+ organization_id: string;
650
+ name: string;
651
+ description: string | null;
652
+ created_at: string;
653
+ updated_at: string;
654
+ }
655
+ interface CreateTopicRequest {
656
+ name: string;
657
+ description?: string;
658
+ }
659
+ interface UpdateTopicRequest {
660
+ name?: string;
661
+ description?: string;
662
+ }
663
+ interface ContactPropertyDefinition {
664
+ id: string;
665
+ organization_id: string;
666
+ name: string;
667
+ type: 'string' | 'number' | 'boolean' | 'date';
668
+ created_at: string;
669
+ updated_at: string;
670
+ }
671
+ interface CreateContactPropertyDefinitionRequest {
672
+ name: string;
673
+ type: 'string' | 'number' | 'boolean' | 'date';
674
+ }
675
+ interface EmailEvent {
676
+ id: string;
677
+ email_id: string;
678
+ event_type: string;
679
+ created_at: string;
680
+ metadata?: Record<string, unknown>;
681
+ }
682
+ interface ListLogsParams {
683
+ email_id?: string;
684
+ event_type?: string;
685
+ }
647
686
 
648
687
  declare class InboxesResource {
649
688
  private readonly http;
@@ -779,6 +818,13 @@ declare class TemplatesResource {
779
818
  * @returns The HTML content as a string
780
819
  */
781
820
  fetch(id: string, options?: FetchTemplateOptions): Promise<string>;
821
+ /**
822
+ * Publish a template, promoting preview_html to html_content
823
+ *
824
+ * @param id - The template ID
825
+ * @returns The published template
826
+ */
827
+ publish(id: string): Promise<Template>;
782
828
  }
783
829
 
784
830
  declare class DomainsResource {
@@ -944,6 +990,16 @@ declare class SegmentsResource {
944
990
  getCount(id: string): Promise<{
945
991
  count: number;
946
992
  }>;
993
+ /**
994
+ * Add a single contact to a manual segment
995
+ */
996
+ addContact(id: string, contactId: string): Promise<SuccessResponse>;
997
+ /**
998
+ * Bulk add contacts to a manual segment
999
+ */
1000
+ bulkAddContacts(id: string, contactIds: string[]): Promise<{
1001
+ added: number;
1002
+ }>;
947
1003
  }
948
1004
 
949
1005
  /**
@@ -1091,6 +1147,55 @@ declare class ThreadsResource {
1091
1147
  }>;
1092
1148
  }
1093
1149
 
1150
+ declare class TopicsResource {
1151
+ private readonly http;
1152
+ constructor(http: HttpClient);
1153
+ /**
1154
+ * List all topics
1155
+ */
1156
+ list(): Promise<{
1157
+ topics: Topic[];
1158
+ }>;
1159
+ /**
1160
+ * Create a new topic
1161
+ */
1162
+ create(data: CreateTopicRequest): Promise<Topic>;
1163
+ /**
1164
+ * Update a topic
1165
+ */
1166
+ update(id: string, data: UpdateTopicRequest): Promise<Topic>;
1167
+ /**
1168
+ * Delete a topic
1169
+ */
1170
+ delete(id: string): Promise<SuccessResponse>;
1171
+ }
1172
+
1173
+ declare class ContactPropertiesResource {
1174
+ private readonly http;
1175
+ constructor(http: HttpClient);
1176
+ /**
1177
+ * List all contact property definitions
1178
+ */
1179
+ list(): Promise<ContactPropertyDefinition[]>;
1180
+ /**
1181
+ * Create a new contact property definition
1182
+ */
1183
+ create(data: CreateContactPropertyDefinitionRequest): Promise<ContactPropertyDefinition>;
1184
+ /**
1185
+ * Delete a contact property definition
1186
+ */
1187
+ delete(id: string): Promise<SuccessResponse>;
1188
+ }
1189
+
1190
+ declare class LogsResource {
1191
+ private readonly http;
1192
+ constructor(http: HttpClient);
1193
+ /**
1194
+ * List email event logs with optional filtering
1195
+ */
1196
+ list(params?: ListLogsParams): Promise<EmailEvent[]>;
1197
+ }
1198
+
1094
1199
  /**
1095
1200
  * Configuration options for the Emailr client
1096
1201
  */
@@ -1186,6 +1291,18 @@ declare class Emailr {
1186
1291
  * Thread and label management
1187
1292
  */
1188
1293
  readonly threads: ThreadsResource;
1294
+ /**
1295
+ * Broadcast topic management
1296
+ */
1297
+ readonly topics: TopicsResource;
1298
+ /**
1299
+ * Contact property definitions
1300
+ */
1301
+ readonly contactProperties: ContactPropertiesResource;
1302
+ /**
1303
+ * Email event logs
1304
+ */
1305
+ readonly logs: LogsResource;
1189
1306
  private readonly http;
1190
1307
  constructor(config: EmailrConfig);
1191
1308
  }
@@ -1233,4 +1350,4 @@ declare class ValidationError extends EmailrError {
1233
1350
  constructor(message: string, details?: Record<string, unknown>, requestId?: string);
1234
1351
  }
1235
1352
 
1236
- export { type AddDomainRequest, type ApiKey, type Attachment, AuthenticationError, type Broadcast, type BulkCreateContactsRequest, type BulkCreateContactsResponse, type Contact, type ContactListResponse, type CreateApiKeyRequest, type CreateBroadcastRequest, type CreateContactRequest, type CreateForwardingRuleRequest, type CreateInboxRequest, type CreateSegmentRequest, type CreateTemplateRequest, type CreateWebhookRequest, type DnsRecord, type DnsVerificationStatus, type Domain, type DomainDnsRecords, type DomainVerificationStatus, type Email, Emailr, Emailr as EmailrClient, type EmailrConfig, EmailrError, type FetchTemplateOptions, type ForwardEmailRequest, type ForwardingRule, type Inbox, type ListApiKeysParams, type ListBroadcastsParams, type ListContactsParams, type ListEmailsParams, type ListInboxesParams, type ListSegmentsParams, type ListTemplatesParams, type ListThreadsParams, type ListWebhooksParams, NetworkError, NotFoundError, type PaginatedResponse, type PushPreviewResponse, RateLimitError, type ReplyTo, type Segment, type SendBroadcastResponse, type SendEmailRequest, type SendEmailResponse, type SuccessResponse, type Template, type Thread, type ThreadDetail, type ThreadDraft, type ThreadDraftRequest, type ThreadMessage, type ThreadReplyRequest, type ThreadReplyResponse, type UpdateBroadcastRequest, type UpdateContactRequest, type UpdateDomainRequest, type UpdateInboxRequest, type UpdateLabelsRequest, type UpdateLabelsResponse, type UpdateSegmentRequest, type UpdateTemplateRequest, type UpdateThreadLabelsResponse, type UpdateWebhookRequest, ValidationError, type Webhook, type WebhookDelivery, type WebhookToggleResponse };
1353
+ export { type AddDomainRequest, type ApiKey, type Attachment, AuthenticationError, type Broadcast, type BulkCreateContactsRequest, type BulkCreateContactsResponse, type Contact, type ContactListResponse, type ContactPropertyDefinition, type CreateApiKeyRequest, type CreateBroadcastRequest, type CreateContactPropertyDefinitionRequest, type CreateContactRequest, type CreateForwardingRuleRequest, type CreateInboxRequest, type CreateSegmentRequest, type CreateTemplateRequest, type CreateTopicRequest, type CreateWebhookRequest, type DnsRecord, type DnsVerificationStatus, type Domain, type DomainDnsRecords, type DomainVerificationStatus, type Email, type EmailEvent, Emailr, Emailr as EmailrClient, type EmailrConfig, EmailrError, type FetchTemplateOptions, type ForwardEmailRequest, type ForwardingRule, type Inbox, type ListApiKeysParams, type ListBroadcastsParams, type ListContactsParams, type ListEmailsParams, type ListInboxesParams, type ListLogsParams, type ListSegmentsParams, type ListTemplatesParams, type ListThreadsParams, type ListWebhooksParams, NetworkError, NotFoundError, type PaginatedResponse, type PushPreviewResponse, RateLimitError, type ReplyTo, type Segment, type SendBroadcastResponse, type SendEmailRequest, type SendEmailResponse, type SuccessResponse, type Template, type Thread, type ThreadDetail, type ThreadDraft, type ThreadDraftRequest, type ThreadMessage, type ThreadReplyRequest, type ThreadReplyResponse, type Topic, type UpdateBroadcastRequest, type UpdateContactRequest, type UpdateDomainRequest, type UpdateInboxRequest, type UpdateLabelsRequest, type UpdateLabelsResponse, type UpdateSegmentRequest, type UpdateTemplateRequest, type UpdateThreadLabelsResponse, type UpdateTopicRequest, type UpdateWebhookRequest, ValidationError, type Webhook, type WebhookDelivery, type WebhookToggleResponse };
package/dist/index.js CHANGED
@@ -383,6 +383,15 @@ var TemplatesResource = class {
383
383
  }
384
384
  return template.html_content ?? "";
385
385
  }
386
+ /**
387
+ * Publish a template, promoting preview_html to html_content
388
+ *
389
+ * @param id - The template ID
390
+ * @returns The published template
391
+ */
392
+ async publish(id) {
393
+ return this.http.post(`/v1/templates/${id}/publish`);
394
+ }
386
395
  };
387
396
 
388
397
  // src/resources/domains.ts
@@ -618,6 +627,18 @@ var SegmentsResource = class {
618
627
  async getCount(id) {
619
628
  return this.http.get(`/v1/segments/${id}/count`);
620
629
  }
630
+ /**
631
+ * Add a single contact to a manual segment
632
+ */
633
+ async addContact(id, contactId) {
634
+ return this.http.post(`/v1/segments/${id}/contacts/${contactId}`);
635
+ }
636
+ /**
637
+ * Bulk add contacts to a manual segment
638
+ */
639
+ async bulkAddContacts(id, contactIds) {
640
+ return this.http.post(`/v1/segments/${id}/contacts/bulk`, { contact_ids: contactIds });
641
+ }
621
642
  };
622
643
 
623
644
  // src/resources/api-keys.ts
@@ -800,6 +821,77 @@ var ThreadsResource = class {
800
821
  }
801
822
  };
802
823
 
824
+ // src/resources/topics.ts
825
+ var TopicsResource = class {
826
+ constructor(http) {
827
+ this.http = http;
828
+ }
829
+ /**
830
+ * List all topics
831
+ */
832
+ async list() {
833
+ return this.http.get("/v1/topics");
834
+ }
835
+ /**
836
+ * Create a new topic
837
+ */
838
+ async create(data) {
839
+ return this.http.post("/v1/topics", data);
840
+ }
841
+ /**
842
+ * Update a topic
843
+ */
844
+ async update(id, data) {
845
+ return this.http.put(`/v1/topics/${id}`, data);
846
+ }
847
+ /**
848
+ * Delete a topic
849
+ */
850
+ async delete(id) {
851
+ return this.http.delete(`/v1/topics/${id}`);
852
+ }
853
+ };
854
+
855
+ // src/resources/contact-properties.ts
856
+ var ContactPropertiesResource = class {
857
+ constructor(http) {
858
+ this.http = http;
859
+ }
860
+ /**
861
+ * List all contact property definitions
862
+ */
863
+ async list() {
864
+ return this.http.get("/v1/contact-properties");
865
+ }
866
+ /**
867
+ * Create a new contact property definition
868
+ */
869
+ async create(data) {
870
+ return this.http.post("/v1/contact-properties", data);
871
+ }
872
+ /**
873
+ * Delete a contact property definition
874
+ */
875
+ async delete(id) {
876
+ return this.http.delete(`/v1/contact-properties/${id}`);
877
+ }
878
+ };
879
+
880
+ // src/resources/logs.ts
881
+ var LogsResource = class {
882
+ constructor(http) {
883
+ this.http = http;
884
+ }
885
+ /**
886
+ * List email event logs with optional filtering
887
+ */
888
+ async list(params) {
889
+ return this.http.get("/v1/logs", {
890
+ params
891
+ });
892
+ }
893
+ };
894
+
803
895
  // src/client.ts
804
896
  var Emailr = class {
805
897
  constructor(config) {
@@ -825,6 +917,9 @@ var Emailr = class {
825
917
  this.forwardingRules = new ForwardingRulesResource(this.http);
826
918
  this.inboxes = new InboxesResource(this.http);
827
919
  this.threads = new ThreadsResource(this.http);
920
+ this.topics = new TopicsResource(this.http);
921
+ this.contactProperties = new ContactPropertiesResource(this.http);
922
+ this.logs = new LogsResource(this.http);
828
923
  }
829
924
  };
830
925
  // Annotate the CommonJS export names for ESM import in node:
package/dist/index.mjs CHANGED
@@ -350,6 +350,15 @@ var TemplatesResource = class {
350
350
  }
351
351
  return template.html_content ?? "";
352
352
  }
353
+ /**
354
+ * Publish a template, promoting preview_html to html_content
355
+ *
356
+ * @param id - The template ID
357
+ * @returns The published template
358
+ */
359
+ async publish(id) {
360
+ return this.http.post(`/v1/templates/${id}/publish`);
361
+ }
353
362
  };
354
363
 
355
364
  // src/resources/domains.ts
@@ -585,6 +594,18 @@ var SegmentsResource = class {
585
594
  async getCount(id) {
586
595
  return this.http.get(`/v1/segments/${id}/count`);
587
596
  }
597
+ /**
598
+ * Add a single contact to a manual segment
599
+ */
600
+ async addContact(id, contactId) {
601
+ return this.http.post(`/v1/segments/${id}/contacts/${contactId}`);
602
+ }
603
+ /**
604
+ * Bulk add contacts to a manual segment
605
+ */
606
+ async bulkAddContacts(id, contactIds) {
607
+ return this.http.post(`/v1/segments/${id}/contacts/bulk`, { contact_ids: contactIds });
608
+ }
588
609
  };
589
610
 
590
611
  // src/resources/api-keys.ts
@@ -767,6 +788,77 @@ var ThreadsResource = class {
767
788
  }
768
789
  };
769
790
 
791
+ // src/resources/topics.ts
792
+ var TopicsResource = class {
793
+ constructor(http) {
794
+ this.http = http;
795
+ }
796
+ /**
797
+ * List all topics
798
+ */
799
+ async list() {
800
+ return this.http.get("/v1/topics");
801
+ }
802
+ /**
803
+ * Create a new topic
804
+ */
805
+ async create(data) {
806
+ return this.http.post("/v1/topics", data);
807
+ }
808
+ /**
809
+ * Update a topic
810
+ */
811
+ async update(id, data) {
812
+ return this.http.put(`/v1/topics/${id}`, data);
813
+ }
814
+ /**
815
+ * Delete a topic
816
+ */
817
+ async delete(id) {
818
+ return this.http.delete(`/v1/topics/${id}`);
819
+ }
820
+ };
821
+
822
+ // src/resources/contact-properties.ts
823
+ var ContactPropertiesResource = class {
824
+ constructor(http) {
825
+ this.http = http;
826
+ }
827
+ /**
828
+ * List all contact property definitions
829
+ */
830
+ async list() {
831
+ return this.http.get("/v1/contact-properties");
832
+ }
833
+ /**
834
+ * Create a new contact property definition
835
+ */
836
+ async create(data) {
837
+ return this.http.post("/v1/contact-properties", data);
838
+ }
839
+ /**
840
+ * Delete a contact property definition
841
+ */
842
+ async delete(id) {
843
+ return this.http.delete(`/v1/contact-properties/${id}`);
844
+ }
845
+ };
846
+
847
+ // src/resources/logs.ts
848
+ var LogsResource = class {
849
+ constructor(http) {
850
+ this.http = http;
851
+ }
852
+ /**
853
+ * List email event logs with optional filtering
854
+ */
855
+ async list(params) {
856
+ return this.http.get("/v1/logs", {
857
+ params
858
+ });
859
+ }
860
+ };
861
+
770
862
  // src/client.ts
771
863
  var Emailr = class {
772
864
  constructor(config) {
@@ -792,6 +884,9 @@ var Emailr = class {
792
884
  this.forwardingRules = new ForwardingRulesResource(this.http);
793
885
  this.inboxes = new InboxesResource(this.http);
794
886
  this.threads = new ThreadsResource(this.http);
887
+ this.topics = new TopicsResource(this.http);
888
+ this.contactProperties = new ContactPropertiesResource(this.http);
889
+ this.logs = new LogsResource(this.http);
795
890
  }
796
891
  };
797
892
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emailr",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "Official Emailr API SDK for TypeScript/JavaScript",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",