@openemail/sdk 0.0.4 → 0.0.5
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/index.cjs +72 -2
- package/index.d.cts +107 -2
- package/index.d.ts +107 -2
- package/index.js +69 -3
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
const AUDIENCE_MEMBER_STATUSES = {
|
|
6
|
+
SUBSCRIBED: 'subscribed',
|
|
7
|
+
UNSUBSCRIBED: 'unsubscribed'
|
|
8
|
+
};
|
|
9
|
+
|
|
5
10
|
const BROADCAST_STATUSES = {
|
|
6
11
|
SCHEDULED: 'scheduled',
|
|
7
12
|
QUEUED: 'queued',
|
|
@@ -23,7 +28,7 @@ const BROADCAST_RECIPIENT_FILTERS = {
|
|
|
23
28
|
UNSUBSCRIBED: 'unsubscribed'
|
|
24
29
|
};
|
|
25
30
|
|
|
26
|
-
var version = "0.0.
|
|
31
|
+
var version = "0.0.5";
|
|
27
32
|
|
|
28
33
|
const BUILD_BASE_URL = 'https://api.openemail.uk';
|
|
29
34
|
|
|
@@ -90,6 +95,18 @@ const CONTACT_PHOTO_TYPES = {
|
|
|
90
95
|
GIF: 'image/gif'
|
|
91
96
|
};
|
|
92
97
|
|
|
98
|
+
const DOMAIN_RECORD_STATUSES = {
|
|
99
|
+
FOUND: 'found',
|
|
100
|
+
MISSING: 'missing'
|
|
101
|
+
};
|
|
102
|
+
const DOMAIN_DMARC_STAGES = {
|
|
103
|
+
MISSING: 'missing',
|
|
104
|
+
INVALID: 'invalid',
|
|
105
|
+
MONITOR: 'monitor',
|
|
106
|
+
QUARANTINE: 'quarantine',
|
|
107
|
+
REJECT: 'reject'
|
|
108
|
+
};
|
|
109
|
+
|
|
93
110
|
const MESSAGE_ENCRYPTION_FORMATS = {
|
|
94
111
|
PGP_MIME: 'pgp-mime',
|
|
95
112
|
PGP_SIGNED: 'pgp-signed',
|
|
@@ -155,6 +172,10 @@ const FILE_USAGES = {
|
|
|
155
172
|
LINKED: 'linked',
|
|
156
173
|
SCHEDULED: 'scheduled'
|
|
157
174
|
};
|
|
175
|
+
const FILE_VISIBILITIES = {
|
|
176
|
+
PUBLIC: 'public',
|
|
177
|
+
PRIVATE: 'private'
|
|
178
|
+
};
|
|
158
179
|
|
|
159
180
|
const HTTP_METHODS = {
|
|
160
181
|
GET: 'GET',
|
|
@@ -593,6 +614,7 @@ const SEGMENTS = {
|
|
|
593
614
|
TRASH: 'trash',
|
|
594
615
|
UNSNOOZE: 'unsnooze',
|
|
595
616
|
UPLOAD: 'upload',
|
|
617
|
+
VERIFY: 'verify',
|
|
596
618
|
VERSIONS: 'versions'
|
|
597
619
|
};
|
|
598
620
|
|
|
@@ -1342,6 +1364,9 @@ const BroadcastPath = (id) => `${PATHS.BROADCASTS}/${Segment(id)}`;
|
|
|
1342
1364
|
const BroadcastChildPath = (id, segment) => `${BroadcastPath(id)}/${segment}`;
|
|
1343
1365
|
const BroadcastRecipientPath = (id, emailId) => `${BroadcastChildPath(id, SEGMENTS.RECIPIENTS)}/${Segment(emailId)}`;
|
|
1344
1366
|
const DomainPath = (id) => `${PATHS.DOMAINS}/${Segment(id)}`;
|
|
1367
|
+
const DomainChildPath = (id, segment) => `${DomainPath(id)}/${segment}`;
|
|
1368
|
+
const DomainAddressesPath = (id) => `${DomainPath(id)}/${SEGMENTS.ADDRESSES}`;
|
|
1369
|
+
const DomainAddressPath = (id, addressId) => `${DomainAddressesPath(id)}/${Segment(addressId)}`;
|
|
1345
1370
|
const WebhookPath = (id) => `${PATHS.WEBHOOKS}/${Segment(id)}`;
|
|
1346
1371
|
const WebhookChildPath = (id, segment) => `${WebhookPath(id)}/${segment}`;
|
|
1347
1372
|
const WebhookDeliveryPath = (id, deliveryId) => `${WebhookChildPath(id, SEGMENTS.DELIVERIES)}/${Segment(deliveryId)}`;
|
|
@@ -1414,7 +1439,8 @@ const Addresses = (transport) => {
|
|
|
1414
1439
|
const MemberQuery = (options) => ({
|
|
1415
1440
|
[QUERY_KEYS.Q]: options.q,
|
|
1416
1441
|
[QUERY_KEYS.SOURCE]: options.source,
|
|
1417
|
-
[QUERY_KEYS.SORT]: options.sort
|
|
1442
|
+
[QUERY_KEYS.SORT]: options.sort,
|
|
1443
|
+
[QUERY_KEYS.STATUS]: options.statuses?.length ? options.statuses.join(LIST_SEPARATOR) : undefined
|
|
1418
1444
|
});
|
|
1419
1445
|
const GrowthQuery = (options) => ({
|
|
1420
1446
|
[QUERY_KEYS.AUDIENCE_IDS]: options.audienceIds?.join(LIST_SEPARATOR),
|
|
@@ -1732,12 +1758,52 @@ const Domains = (transport) => ({
|
|
|
1732
1758
|
listAll: (options = {}) => CollectAll(transport, PATHS.DOMAINS, CURSOR_STYLES.CURSOR, options),
|
|
1733
1759
|
iterate: (options = {}) => IteratePages(transport, PATHS.DOMAINS, CURSOR_STYLES.CURSOR, options),
|
|
1734
1760
|
get: (id, options = {}) => transport.request(DomainPath(id), { signal: options.signal, apiKey: options.apiKey }),
|
|
1761
|
+
create: (body, options = {}) => transport.request(PATHS.DOMAINS, {
|
|
1762
|
+
method: HTTP_METHODS.POST,
|
|
1763
|
+
body,
|
|
1764
|
+
signal: options.signal,
|
|
1765
|
+
apiKey: options.apiKey
|
|
1766
|
+
}),
|
|
1767
|
+
verify: (id, options = {}) => transport.request(DomainChildPath(id, SEGMENTS.VERIFY), {
|
|
1768
|
+
method: HTTP_METHODS.POST,
|
|
1769
|
+
repeatable: true,
|
|
1770
|
+
signal: options.signal,
|
|
1771
|
+
apiKey: options.apiKey
|
|
1772
|
+
}),
|
|
1735
1773
|
update: (id, patch, options = {}) => transport.request(DomainPath(id), {
|
|
1736
1774
|
method: HTTP_METHODS.PATCH,
|
|
1737
1775
|
body: patch,
|
|
1738
1776
|
repeatable: true,
|
|
1739
1777
|
signal: options.signal,
|
|
1740
1778
|
apiKey: options.apiKey
|
|
1779
|
+
}),
|
|
1780
|
+
delete: (id, options = {}) => transport.request(DomainPath(id), {
|
|
1781
|
+
method: HTTP_METHODS.DELETE,
|
|
1782
|
+
signal: options.signal,
|
|
1783
|
+
apiKey: options.apiKey
|
|
1784
|
+
}),
|
|
1785
|
+
listAddresses: (id, options = {}) => FetchPage(transport, DomainAddressesPath(id), CURSOR_STYLES.CURSOR, options),
|
|
1786
|
+
listAllAddresses: (id, options = {}) => CollectAll(transport, DomainAddressesPath(id), CURSOR_STYLES.CURSOR, options),
|
|
1787
|
+
iterateAddresses: (id, options = {}) => IteratePages(transport, DomainAddressesPath(id), CURSOR_STYLES.CURSOR, options),
|
|
1788
|
+
createAddress: (id, body, options = {}) => transport.request(DomainAddressesPath(id), {
|
|
1789
|
+
method: HTTP_METHODS.POST,
|
|
1790
|
+
body,
|
|
1791
|
+
repeatable: true,
|
|
1792
|
+
signal: options.signal,
|
|
1793
|
+
apiKey: options.apiKey
|
|
1794
|
+
}),
|
|
1795
|
+
getAddress: (id, addressId, options = {}) => transport.request(DomainAddressPath(id, addressId), { signal: options.signal, apiKey: options.apiKey }),
|
|
1796
|
+
updateAddress: (id, addressId, patch, options = {}) => transport.request(DomainAddressPath(id, addressId), {
|
|
1797
|
+
method: HTTP_METHODS.PATCH,
|
|
1798
|
+
body: patch,
|
|
1799
|
+
repeatable: true,
|
|
1800
|
+
signal: options.signal,
|
|
1801
|
+
apiKey: options.apiKey
|
|
1802
|
+
}),
|
|
1803
|
+
deleteAddress: (id, addressId, options = {}) => transport.request(DomainAddressPath(id, addressId), {
|
|
1804
|
+
method: HTTP_METHODS.DELETE,
|
|
1805
|
+
signal: options.signal,
|
|
1806
|
+
apiKey: options.apiKey
|
|
1741
1807
|
})
|
|
1742
1808
|
});
|
|
1743
1809
|
|
|
@@ -2851,16 +2917,20 @@ const languageByCode = LanguageByCode;
|
|
|
2851
2917
|
const isRtlLanguage = IsRtlLanguage;
|
|
2852
2918
|
|
|
2853
2919
|
exports.API_SCOPES = API_SCOPES;
|
|
2920
|
+
exports.AUDIENCE_MEMBER_STATUSES = AUDIENCE_MEMBER_STATUSES;
|
|
2854
2921
|
exports.BROADCAST_RECIPIENT_FILTERS = BROADCAST_RECIPIENT_FILTERS;
|
|
2855
2922
|
exports.BROADCAST_STATUSES = BROADCAST_STATUSES;
|
|
2856
2923
|
exports.CONTACT_BLOCK_LISTS = CONTACT_BLOCK_LISTS;
|
|
2857
2924
|
exports.CONTACT_PHOTO_TYPES = CONTACT_PHOTO_TYPES;
|
|
2858
2925
|
exports.CONTACT_THREAD_SORTS = CONTACT_THREAD_SORTS;
|
|
2926
|
+
exports.DOMAIN_DMARC_STAGES = DOMAIN_DMARC_STAGES;
|
|
2927
|
+
exports.DOMAIN_RECORD_STATUSES = DOMAIN_RECORD_STATUSES;
|
|
2859
2928
|
exports.ERROR_TYPES = ERROR_TYPES;
|
|
2860
2929
|
exports.FILE_DIRECTIONS = FILE_DIRECTIONS;
|
|
2861
2930
|
exports.FILE_KINDS = FILE_KINDS;
|
|
2862
2931
|
exports.FILE_SORTS = FILE_SORTS;
|
|
2863
2932
|
exports.FILE_USAGES = FILE_USAGES;
|
|
2933
|
+
exports.FILE_VISIBILITIES = FILE_VISIBILITIES;
|
|
2864
2934
|
exports.LANGUAGES = LANGUAGES;
|
|
2865
2935
|
exports.MESSAGE_ENCRYPTION_FORMATS = MESSAGE_ENCRYPTION_FORMATS;
|
|
2866
2936
|
exports.OpenEmail = OpenEmail;
|
package/index.d.cts
CHANGED
|
@@ -50,6 +50,11 @@ declare const AUDIENCE_MEMBER_SORTS: {
|
|
|
50
50
|
readonly ADDED_OLDEST: "added-oldest";
|
|
51
51
|
readonly NAME: "name";
|
|
52
52
|
};
|
|
53
|
+
interface AudienceMemberStatuses {
|
|
54
|
+
SUBSCRIBED: 'subscribed';
|
|
55
|
+
UNSUBSCRIBED: 'unsubscribed';
|
|
56
|
+
}
|
|
57
|
+
declare const AUDIENCE_MEMBER_STATUSES: AudienceMemberStatuses;
|
|
53
58
|
|
|
54
59
|
type AudienceBuiltin = (typeof AUDIENCE_BUILTINS)[keyof typeof AUDIENCE_BUILTINS];
|
|
55
60
|
|
|
@@ -59,6 +64,8 @@ type AudienceContactAdd = {
|
|
|
59
64
|
|
|
60
65
|
type AudienceMemberSort = (typeof AUDIENCE_MEMBER_SORTS)[keyof typeof AUDIENCE_MEMBER_SORTS];
|
|
61
66
|
|
|
67
|
+
type AudienceMemberStatus = AudienceMemberStatuses[keyof AudienceMemberStatuses];
|
|
68
|
+
|
|
62
69
|
declare const CONTACT_SOURCES: {
|
|
63
70
|
readonly MANUAL: "manual";
|
|
64
71
|
readonly AUTO: "auto";
|
|
@@ -101,6 +108,7 @@ type AudienceContactListOptions = ListOptions & {
|
|
|
101
108
|
q?: string;
|
|
102
109
|
source?: ContactSource;
|
|
103
110
|
sort?: AudienceMemberSort;
|
|
111
|
+
statuses?: Array<AudienceMemberStatus>;
|
|
104
112
|
};
|
|
105
113
|
|
|
106
114
|
type ContactResource = {
|
|
@@ -995,7 +1003,17 @@ declare const Domains: (transport: Transport) => {
|
|
|
995
1003
|
listAll: (options?: ListOptions) => Promise<Array<DomainResource>>;
|
|
996
1004
|
iterate: (options?: ListOptions) => AsyncGenerator<DomainResource, void, undefined>;
|
|
997
1005
|
get: (id: string, options?: RequestScope) => Promise<DomainDetailResource>;
|
|
1006
|
+
create: (body: DomainCreate, options?: RequestScope) => Promise<DomainDetailResource>;
|
|
1007
|
+
verify: (id: string, options?: RequestScope) => Promise<DomainDetailResource>;
|
|
998
1008
|
update: (id: string, patch: DomainPatch, options?: RequestScope) => Promise<DomainDetailResource>;
|
|
1009
|
+
delete: (id: string, options?: RequestScope) => Promise<DeletedDomainResource>;
|
|
1010
|
+
listAddresses: (id: string, options?: ListOptions) => Promise<Page<DomainAddressResource>>;
|
|
1011
|
+
listAllAddresses: (id: string, options?: ListOptions) => Promise<Array<DomainAddressResource>>;
|
|
1012
|
+
iterateAddresses: (id: string, options?: ListOptions) => AsyncGenerator<DomainAddressResource, void, undefined>;
|
|
1013
|
+
createAddress: (id: string, body: DomainAddressCreate, options?: RequestScope) => Promise<DomainAddressResource>;
|
|
1014
|
+
getAddress: (id: string, addressId: string, options?: RequestScope) => Promise<DomainAddressResource>;
|
|
1015
|
+
updateAddress: (id: string, addressId: string, patch: DomainAddressPatch, options?: RequestScope) => Promise<DomainAddressResource>;
|
|
1016
|
+
deleteAddress: (id: string, addressId: string, options?: RequestScope) => Promise<DeletedDomainAddressResource>;
|
|
999
1017
|
};
|
|
1000
1018
|
|
|
1001
1019
|
declare const Drafts: (transport: Transport) => {
|
|
@@ -1328,6 +1346,48 @@ type TempMailOptions = Omit<TransportOptions, 'apiKey'> & {
|
|
|
1328
1346
|
inboxToken?: string;
|
|
1329
1347
|
};
|
|
1330
1348
|
|
|
1349
|
+
type DeletedDomainAddressResource = {
|
|
1350
|
+
object: 'address';
|
|
1351
|
+
id: string;
|
|
1352
|
+
address: string;
|
|
1353
|
+
deleted: true;
|
|
1354
|
+
};
|
|
1355
|
+
|
|
1356
|
+
type DeletedDomainResource = {
|
|
1357
|
+
object: 'domain';
|
|
1358
|
+
id: string;
|
|
1359
|
+
domain: string;
|
|
1360
|
+
deleted: true;
|
|
1361
|
+
leftBehind: Array<string>;
|
|
1362
|
+
};
|
|
1363
|
+
|
|
1364
|
+
type DomainAddressCreate = {
|
|
1365
|
+
localPart: string;
|
|
1366
|
+
label?: string | null;
|
|
1367
|
+
};
|
|
1368
|
+
|
|
1369
|
+
type DomainAddressPatch = {
|
|
1370
|
+
label?: string | null;
|
|
1371
|
+
enabled?: boolean;
|
|
1372
|
+
};
|
|
1373
|
+
|
|
1374
|
+
type DomainAddressResource = {
|
|
1375
|
+
object: 'address';
|
|
1376
|
+
id: string;
|
|
1377
|
+
domainId: string;
|
|
1378
|
+
address: string;
|
|
1379
|
+
localPart: string;
|
|
1380
|
+
label: string | null;
|
|
1381
|
+
enabled: boolean;
|
|
1382
|
+
lastReceivedAt: string | null;
|
|
1383
|
+
createdAt: string;
|
|
1384
|
+
updatedAt: string;
|
|
1385
|
+
};
|
|
1386
|
+
|
|
1387
|
+
type DomainCreate = {
|
|
1388
|
+
domain: string;
|
|
1389
|
+
};
|
|
1390
|
+
|
|
1331
1391
|
declare const DOMAIN_SENDING_STATES: {
|
|
1332
1392
|
readonly VERIFIED: "verified";
|
|
1333
1393
|
readonly PENDING: "pending";
|
|
@@ -1347,6 +1407,40 @@ declare const DOMAIN_STORAGE_STATES: {
|
|
|
1347
1407
|
readonly ACTIVE: "active";
|
|
1348
1408
|
readonly FAILED: "failed";
|
|
1349
1409
|
};
|
|
1410
|
+
interface DomainRecordStatuses {
|
|
1411
|
+
FOUND: 'found';
|
|
1412
|
+
MISSING: 'missing';
|
|
1413
|
+
}
|
|
1414
|
+
declare const DOMAIN_RECORD_STATUSES: DomainRecordStatuses;
|
|
1415
|
+
interface DomainDmarcStages {
|
|
1416
|
+
MISSING: 'missing';
|
|
1417
|
+
INVALID: 'invalid';
|
|
1418
|
+
MONITOR: 'monitor';
|
|
1419
|
+
QUARANTINE: 'quarantine';
|
|
1420
|
+
REJECT: 'reject';
|
|
1421
|
+
}
|
|
1422
|
+
declare const DOMAIN_DMARC_STAGES: DomainDmarcStages;
|
|
1423
|
+
|
|
1424
|
+
type DomainDmarcStage = DomainDmarcStages[keyof DomainDmarcStages];
|
|
1425
|
+
|
|
1426
|
+
type DomainDmarcResource = {
|
|
1427
|
+
stage: DomainDmarcStage;
|
|
1428
|
+
record: string | null;
|
|
1429
|
+
issues: Array<string>;
|
|
1430
|
+
alignmentPossible: boolean;
|
|
1431
|
+
caveat: string;
|
|
1432
|
+
};
|
|
1433
|
+
|
|
1434
|
+
type DomainRecordStatus = DomainRecordStatuses[keyof DomainRecordStatuses];
|
|
1435
|
+
|
|
1436
|
+
type DomainRecordResource = {
|
|
1437
|
+
type: string;
|
|
1438
|
+
name: string;
|
|
1439
|
+
value: string;
|
|
1440
|
+
priority: number | null;
|
|
1441
|
+
purpose: string | null;
|
|
1442
|
+
status: DomainRecordStatus | null;
|
|
1443
|
+
};
|
|
1350
1444
|
|
|
1351
1445
|
type DomainSendingState = (typeof DOMAIN_SENDING_STATES)[keyof typeof DOMAIN_SENDING_STATES];
|
|
1352
1446
|
|
|
@@ -1412,9 +1506,12 @@ type DomainDetailResource = DomainResource & {
|
|
|
1412
1506
|
address: string;
|
|
1413
1507
|
enabled: boolean;
|
|
1414
1508
|
}>;
|
|
1509
|
+
records: Array<DomainRecordResource>;
|
|
1510
|
+
dmarc: DomainDmarcResource | null;
|
|
1415
1511
|
};
|
|
1416
1512
|
|
|
1417
1513
|
type DomainPatch = {
|
|
1514
|
+
catchAll?: boolean;
|
|
1418
1515
|
trackingHost?: string | null;
|
|
1419
1516
|
storageHost?: string | null;
|
|
1420
1517
|
};
|
|
@@ -1702,6 +1799,12 @@ interface FileUsages {
|
|
|
1702
1799
|
}
|
|
1703
1800
|
type FileUsage = FileUsages[keyof FileUsages];
|
|
1704
1801
|
declare const FILE_USAGES: FileUsages;
|
|
1802
|
+
interface FileVisibilities {
|
|
1803
|
+
PUBLIC: 'public';
|
|
1804
|
+
PRIVATE: 'private';
|
|
1805
|
+
}
|
|
1806
|
+
type FileVisibility = FileVisibilities[keyof FileVisibilities];
|
|
1807
|
+
declare const FILE_VISIBILITIES: FileVisibilities;
|
|
1705
1808
|
|
|
1706
1809
|
type FileKept = {
|
|
1707
1810
|
id: string;
|
|
@@ -1782,6 +1885,8 @@ type FileResource = {
|
|
|
1782
1885
|
deliveredTo: string | null;
|
|
1783
1886
|
usage: FileUsage | null;
|
|
1784
1887
|
deletable: boolean;
|
|
1888
|
+
visibility: FileVisibility;
|
|
1889
|
+
publicUrl: string | null;
|
|
1785
1890
|
createdAt: string;
|
|
1786
1891
|
};
|
|
1787
1892
|
|
|
@@ -3600,5 +3705,5 @@ declare const resolveLanguage: (input: string | null | undefined) => LanguageRes
|
|
|
3600
3705
|
declare const languageByCode: (code: string | null | undefined) => LanguageResource | undefined;
|
|
3601
3706
|
declare const isRtlLanguage: (code: string | null | undefined) => boolean;
|
|
3602
3707
|
|
|
3603
|
-
export { API_SCOPES, BROADCAST_RECIPIENT_FILTERS, BROADCAST_STATUSES, CONTACT_BLOCK_LISTS, CONTACT_PHOTO_TYPES, CONTACT_THREAD_SORTS, ERROR_TYPES, FILE_DIRECTIONS, FILE_KINDS, FILE_SORTS, FILE_USAGES, LANGUAGES, MESSAGE_ENCRYPTION_FORMATS, OpenEmail, OpenEmailApiError, OpenEmailNetworkError, PAGE_LIMITS, PEOPLE_SORTS, PROVIDER_IMPORT_DOMAIN_STATES, PROVIDER_IMPORT_RESOURCES, PROVIDER_IMPORT_STATUSES, RULE_ACTIONS, RULE_FIELDS, RULE_OPERATORS, SUPPRESSION_REASONS, THREAD_SORTS, VERSION, WEBHOOK_EVENTS, WEBHOOK_REPLAY_ERROR_CODES, WEBHOOK_SIGNATURE_HEADERS, createClient, createOpenEmail, createTempMail, OpenEmail as default, getClient, init, isApiKey, isRtlLanguage, isSealed, languageByCode, openemail, resetClient, resolveLanguage, toBase64, verifyWebhookSignature };
|
|
3604
|
-
export type { AddressBookPage, AddressBookResource, AddressResource, ApiErrorPayload, ApiErrorProps, ApiKeyActivityListOptions, ApiKeyActivityResource, ApiKeyCreate, ApiKeyEventType, ApiKeyMode, ApiKeyPatch, ApiKeyRequestListOptions, ApiKeyRequestResource, ApiKeyResource, ApiKeyRevoke, ApiKeyStatus, ApiKeyWorkspaceActivityListOptions, ApiKeyWorkspaceRequestListOptions, ApiScope, AttachmentDeliveryMode, AttachmentInput, AttachmentResource, AudienceBatchAddResource, AudienceBatchRemoveResource, AudienceBuiltin, AudienceContactAdd, AudienceContactListOptions, AudienceContactResource, AudienceContactsBatch, AudienceCreate, AudienceGrowthBucket, AudienceGrowthOptions, AudienceGrowthResource, AudienceGrowthSeries, AudienceGrowthTotals, AudienceImport, AudienceImportResource, AudienceImportRow, AudienceListOptions, AudienceMemberResource, AudienceMemberSort, AudiencePatch, AudienceResource, AuditActorKind, AuditActorResource, BatchItemResource, BatchResultResource, BroadcastCounts, BroadcastCreate, BroadcastListOptions, BroadcastPreviewInput, BroadcastPreviewResource, BroadcastRecipientContentResource, BroadcastRecipientFilter, BroadcastRecipientListOptions, BroadcastRecipientResource, BroadcastResource, BroadcastStatsBucket, BroadcastStatsOptions, BroadcastStatsResource, BroadcastStatsTotals, BroadcastStatus, BuiltinRole, CalendarAttendeeResource, CalendarEventResource, CalendarOccurrenceResource, CalendarRangeOptions, ClientOptions, ConsolePermission, ContactActivityBucket, ContactActivityOptions, ContactActivityResource, ContactActivityTotals, ContactAudienceResource, ContactAudiencesSet, ContactBatchDeleteResource, ContactBlockList, ContactBlockResource, ContactBlockRule, ContactCreate, ContactDetailResource, ContactListOptions, ContactPatch, ContactPhotoOptions, ContactPhotoType, ContactReplyTime, ContactResource, ContactSave, ContactSource, ContactThreadListOptions, ContactThreadResource, ContactThreadSort, CreatedApiKeyResource, CreatedTempInboxResource, CreatedWebhookResource, DeletedApiKeyResource, DeletedAudienceResource, DeletedContactResource, DeletedDraftResource, DeletedFileResource, DeletedLabelResource, DeletedRoleResource, DeletedRuleResource, DeletedTempInboxResource, DeletedTempMessageResource, DeletedTemplateResource, DeletedTemplateVersionResource, DeletedWebhookResource, DomainDetailResource, DomainPatch, DomainResource, DomainSendingState, DomainStorage, DomainStorageState, DomainTracking, DomainTrackingState, DraftInput, DraftListOptions, DraftResource, DraftSummaryResource, EmailClickedData, EmailDownloadedData, EmailEventResource, EmailListOptions, EmailOpenedData, EmailRecipientResource, EmailResource, EmailSend, EmailSource, EmailStatus, EmailTrackingSummary, EmailTranslate, EmailTranslationResource, EmailTransport, EmptiedAudienceResource, ErrorType, FetchLike, FileAddressCount, FileBatchDeleteResource, FileCount, FileDayCount, FileDirection, FileEventData, FileKept, FileKind, FileLinkCount, FileLinkCreateOptions, FileLinkResource, FileListOptions, FileResource, FileSort, FileStatsResource, FileTypeCount, FileUploadOptions, FileUsage, HitKind, ImportChunkResource, ImportCounts, ImportCreate, ImportFailurePage, ImportFailureReason, ImportFailureResource, ImportFailuresOptions, ImportFileDescriptor, ImportFileInfo, ImportFilesInput, ImportFormat, ImportListOptions, ImportOptions, ImportProgress, ImportResource, ImportSource, ImportStatus, ImportUploadResource, InboxScope, InlineAttachmentInput, InvitationResource, KeyResource, LabelColor, LabelColorInput, LabelColorKind, LabelColorResource, LabelInput, LabelPatch, LabelResource, LanguageResource, ListOptions, LogWindow, MemberAccess, MemberAdd, MemberAddressGrant, MemberAddressResource, MemberDomainResource, MemberPatch, MemberResource, MessageEncryption, MessageEncryptionFormat, MessageEncryptionPartRole, MessageResource, Page, PeoplePage, PeopleSort, Permission, PermissionResource, PersonListOptions, PersonResource, PingResource, ProviderImportCount, ProviderImportCreate, ProviderImportDomainState, ProviderImportListOptions, ProviderImportReport, ProviderImportResource, ProviderImportResourceKind, ProviderImportStatus, ProviderInventoryResource, RawBody, RecipientInput, RecipientKind, RecipientStatus, RemovedAudienceContactResource, RemovedMemberResource, RemovedSuppressionResource, RequestOptions, RequestScope, RevokedInvitationResource, RoleCreate, RoleDeleteOptions, RolePatch, RoleResource, RotatedApiKeyResource, RotatedKeyResource, RuleAction, RuleActionType, RuleCondition, RuleConditionInput, RuleCreate, RuleField, RuleListOptions, RuleMatchMode, RuleOperator, RulePatch, RuleResource, RuleRunListOptions, RuleRunResource, RuleTestInput, RuleTestResource, RuleTestWarningCode, SavedDraftResource, SendScope, SendTranslateOptions, SendableDomainResource, SentBroadcastResource, SentEmailResource, SentTemplateEmailResource, SettingsOptions, SettingsPatch, SettingsResource, SnoozedThreadResource, StoredAttachmentInput, SuppressionAdd, SuppressionListOptions, SuppressionReason, SuppressionResource, TempDomainResource, TempInboxCreate, TempInboxResource, TempMailOptions, TempMessageDetailResource, TempMessageListOptions, TempMessageResource, TempMessagesResource, TemplateAnalyticsOptions, TemplateAnalyticsResource, TemplateBlock, TemplateBlockKind, TemplateCategory, TemplateContent, TemplateContentSource, TemplateCreate, TemplateDetailResource, TemplateDocument, TemplateDuplicate, TemplateEngine, TemplateFont, TemplateFontFormat, TemplateFontResource, TemplateFontStyle, TemplateListOptions, TemplatePatch, TemplatePreviewInput, TemplatePreviewResource, TemplatePreviewWarningCode, TemplateProp, TemplateRenderInput, TemplateRenderResource, TemplateResource, TemplateRestoreInput, TemplateRestoredResource, TemplateSend, TemplateSendListOptions, TemplateSendResource, TemplateSendsResource, TemplateSlot, TemplateSort, TemplateStarterDetailResource, TemplateStarterResource, TemplateStatus, TemplateValueKind, TemplateVersionResource, TemplateVersionState, ThreadListOptions, ThreadPatch, ThreadResource, ThreadSort, ThreadSummaryResource, TrackingClickResource, TrackingGrain, TrackingHitOptions, TrackingLinkResource, TrackingListOptions, TrackingOpenResource, TrackingRecipientResource, TrackingRequest, TrackingResource, TrackingStatsOptions, TrackingStatsResource, TrackingSummary, TranslateOptions, TranslationResource, TransportOptions, TrashedThreadResource, UpdatedThreadResource, VerifyWebhookProps, WebhookActivityListOptions, WebhookActivityResource, WebhookChangeType, WebhookCreate, WebhookDeliveryAttempt, WebhookDeliveryDetailResource, WebhookDeliveryListOptions, WebhookDeliveryResource, WebhookDeliveryStatus, WebhookEvent, WebhookPatch, WebhookPayload, WebhookReplayErrorCode, WebhookReplayRefusal, WebhookReplayResource, WebhookResource, WebhookSignatureHeaders, WebhookTestResource, WebhookWorkspaceActivityListOptions, WebhookWorkspaceDeliveryListOptions };
|
|
3708
|
+
export { API_SCOPES, AUDIENCE_MEMBER_STATUSES, BROADCAST_RECIPIENT_FILTERS, BROADCAST_STATUSES, CONTACT_BLOCK_LISTS, CONTACT_PHOTO_TYPES, CONTACT_THREAD_SORTS, DOMAIN_DMARC_STAGES, DOMAIN_RECORD_STATUSES, ERROR_TYPES, FILE_DIRECTIONS, FILE_KINDS, FILE_SORTS, FILE_USAGES, FILE_VISIBILITIES, LANGUAGES, MESSAGE_ENCRYPTION_FORMATS, OpenEmail, OpenEmailApiError, OpenEmailNetworkError, PAGE_LIMITS, PEOPLE_SORTS, PROVIDER_IMPORT_DOMAIN_STATES, PROVIDER_IMPORT_RESOURCES, PROVIDER_IMPORT_STATUSES, RULE_ACTIONS, RULE_FIELDS, RULE_OPERATORS, SUPPRESSION_REASONS, THREAD_SORTS, VERSION, WEBHOOK_EVENTS, WEBHOOK_REPLAY_ERROR_CODES, WEBHOOK_SIGNATURE_HEADERS, createClient, createOpenEmail, createTempMail, OpenEmail as default, getClient, init, isApiKey, isRtlLanguage, isSealed, languageByCode, openemail, resetClient, resolveLanguage, toBase64, verifyWebhookSignature };
|
|
3709
|
+
export type { AddressBookPage, AddressBookResource, AddressResource, ApiErrorPayload, ApiErrorProps, ApiKeyActivityListOptions, ApiKeyActivityResource, ApiKeyCreate, ApiKeyEventType, ApiKeyMode, ApiKeyPatch, ApiKeyRequestListOptions, ApiKeyRequestResource, ApiKeyResource, ApiKeyRevoke, ApiKeyStatus, ApiKeyWorkspaceActivityListOptions, ApiKeyWorkspaceRequestListOptions, ApiScope, AttachmentDeliveryMode, AttachmentInput, AttachmentResource, AudienceBatchAddResource, AudienceBatchRemoveResource, AudienceBuiltin, AudienceContactAdd, AudienceContactListOptions, AudienceContactResource, AudienceContactsBatch, AudienceCreate, AudienceGrowthBucket, AudienceGrowthOptions, AudienceGrowthResource, AudienceGrowthSeries, AudienceGrowthTotals, AudienceImport, AudienceImportResource, AudienceImportRow, AudienceListOptions, AudienceMemberResource, AudienceMemberSort, AudienceMemberStatus, AudiencePatch, AudienceResource, AuditActorKind, AuditActorResource, BatchItemResource, BatchResultResource, BroadcastCounts, BroadcastCreate, BroadcastListOptions, BroadcastPreviewInput, BroadcastPreviewResource, BroadcastRecipientContentResource, BroadcastRecipientFilter, BroadcastRecipientListOptions, BroadcastRecipientResource, BroadcastResource, BroadcastStatsBucket, BroadcastStatsOptions, BroadcastStatsResource, BroadcastStatsTotals, BroadcastStatus, BuiltinRole, CalendarAttendeeResource, CalendarEventResource, CalendarOccurrenceResource, CalendarRangeOptions, ClientOptions, ConsolePermission, ContactActivityBucket, ContactActivityOptions, ContactActivityResource, ContactActivityTotals, ContactAudienceResource, ContactAudiencesSet, ContactBatchDeleteResource, ContactBlockList, ContactBlockResource, ContactBlockRule, ContactCreate, ContactDetailResource, ContactListOptions, ContactPatch, ContactPhotoOptions, ContactPhotoType, ContactReplyTime, ContactResource, ContactSave, ContactSource, ContactThreadListOptions, ContactThreadResource, ContactThreadSort, CreatedApiKeyResource, CreatedTempInboxResource, CreatedWebhookResource, DeletedApiKeyResource, DeletedAudienceResource, DeletedContactResource, DeletedDomainAddressResource, DeletedDomainResource, DeletedDraftResource, DeletedFileResource, DeletedLabelResource, DeletedRoleResource, DeletedRuleResource, DeletedTempInboxResource, DeletedTempMessageResource, DeletedTemplateResource, DeletedTemplateVersionResource, DeletedWebhookResource, DomainAddressCreate, DomainAddressPatch, DomainAddressResource, DomainCreate, DomainDetailResource, DomainDmarcResource, DomainDmarcStage, DomainPatch, DomainRecordResource, DomainRecordStatus, DomainResource, DomainSendingState, DomainStorage, DomainStorageState, DomainTracking, DomainTrackingState, DraftInput, DraftListOptions, DraftResource, DraftSummaryResource, EmailClickedData, EmailDownloadedData, EmailEventResource, EmailListOptions, EmailOpenedData, EmailRecipientResource, EmailResource, EmailSend, EmailSource, EmailStatus, EmailTrackingSummary, EmailTranslate, EmailTranslationResource, EmailTransport, EmptiedAudienceResource, ErrorType, FetchLike, FileAddressCount, FileBatchDeleteResource, FileCount, FileDayCount, FileDirection, FileEventData, FileKept, FileKind, FileLinkCount, FileLinkCreateOptions, FileLinkResource, FileListOptions, FileResource, FileSort, FileStatsResource, FileTypeCount, FileUploadOptions, FileUsage, FileVisibility, HitKind, ImportChunkResource, ImportCounts, ImportCreate, ImportFailurePage, ImportFailureReason, ImportFailureResource, ImportFailuresOptions, ImportFileDescriptor, ImportFileInfo, ImportFilesInput, ImportFormat, ImportListOptions, ImportOptions, ImportProgress, ImportResource, ImportSource, ImportStatus, ImportUploadResource, InboxScope, InlineAttachmentInput, InvitationResource, KeyResource, LabelColor, LabelColorInput, LabelColorKind, LabelColorResource, LabelInput, LabelPatch, LabelResource, LanguageResource, ListOptions, LogWindow, MemberAccess, MemberAdd, MemberAddressGrant, MemberAddressResource, MemberDomainResource, MemberPatch, MemberResource, MessageEncryption, MessageEncryptionFormat, MessageEncryptionPartRole, MessageResource, Page, PeoplePage, PeopleSort, Permission, PermissionResource, PersonListOptions, PersonResource, PingResource, ProviderImportCount, ProviderImportCreate, ProviderImportDomainState, ProviderImportListOptions, ProviderImportReport, ProviderImportResource, ProviderImportResourceKind, ProviderImportStatus, ProviderInventoryResource, RawBody, RecipientInput, RecipientKind, RecipientStatus, RemovedAudienceContactResource, RemovedMemberResource, RemovedSuppressionResource, RequestOptions, RequestScope, RevokedInvitationResource, RoleCreate, RoleDeleteOptions, RolePatch, RoleResource, RotatedApiKeyResource, RotatedKeyResource, RuleAction, RuleActionType, RuleCondition, RuleConditionInput, RuleCreate, RuleField, RuleListOptions, RuleMatchMode, RuleOperator, RulePatch, RuleResource, RuleRunListOptions, RuleRunResource, RuleTestInput, RuleTestResource, RuleTestWarningCode, SavedDraftResource, SendScope, SendTranslateOptions, SendableDomainResource, SentBroadcastResource, SentEmailResource, SentTemplateEmailResource, SettingsOptions, SettingsPatch, SettingsResource, SnoozedThreadResource, StoredAttachmentInput, SuppressionAdd, SuppressionListOptions, SuppressionReason, SuppressionResource, TempDomainResource, TempInboxCreate, TempInboxResource, TempMailOptions, TempMessageDetailResource, TempMessageListOptions, TempMessageResource, TempMessagesResource, TemplateAnalyticsOptions, TemplateAnalyticsResource, TemplateBlock, TemplateBlockKind, TemplateCategory, TemplateContent, TemplateContentSource, TemplateCreate, TemplateDetailResource, TemplateDocument, TemplateDuplicate, TemplateEngine, TemplateFont, TemplateFontFormat, TemplateFontResource, TemplateFontStyle, TemplateListOptions, TemplatePatch, TemplatePreviewInput, TemplatePreviewResource, TemplatePreviewWarningCode, TemplateProp, TemplateRenderInput, TemplateRenderResource, TemplateResource, TemplateRestoreInput, TemplateRestoredResource, TemplateSend, TemplateSendListOptions, TemplateSendResource, TemplateSendsResource, TemplateSlot, TemplateSort, TemplateStarterDetailResource, TemplateStarterResource, TemplateStatus, TemplateValueKind, TemplateVersionResource, TemplateVersionState, ThreadListOptions, ThreadPatch, ThreadResource, ThreadSort, ThreadSummaryResource, TrackingClickResource, TrackingGrain, TrackingHitOptions, TrackingLinkResource, TrackingListOptions, TrackingOpenResource, TrackingRecipientResource, TrackingRequest, TrackingResource, TrackingStatsOptions, TrackingStatsResource, TrackingSummary, TranslateOptions, TranslationResource, TransportOptions, TrashedThreadResource, UpdatedThreadResource, VerifyWebhookProps, WebhookActivityListOptions, WebhookActivityResource, WebhookChangeType, WebhookCreate, WebhookDeliveryAttempt, WebhookDeliveryDetailResource, WebhookDeliveryListOptions, WebhookDeliveryResource, WebhookDeliveryStatus, WebhookEvent, WebhookPatch, WebhookPayload, WebhookReplayErrorCode, WebhookReplayRefusal, WebhookReplayResource, WebhookResource, WebhookSignatureHeaders, WebhookTestResource, WebhookWorkspaceActivityListOptions, WebhookWorkspaceDeliveryListOptions };
|
package/index.d.ts
CHANGED
|
@@ -50,6 +50,11 @@ declare const AUDIENCE_MEMBER_SORTS: {
|
|
|
50
50
|
readonly ADDED_OLDEST: "added-oldest";
|
|
51
51
|
readonly NAME: "name";
|
|
52
52
|
};
|
|
53
|
+
interface AudienceMemberStatuses {
|
|
54
|
+
SUBSCRIBED: 'subscribed';
|
|
55
|
+
UNSUBSCRIBED: 'unsubscribed';
|
|
56
|
+
}
|
|
57
|
+
declare const AUDIENCE_MEMBER_STATUSES: AudienceMemberStatuses;
|
|
53
58
|
|
|
54
59
|
type AudienceBuiltin = (typeof AUDIENCE_BUILTINS)[keyof typeof AUDIENCE_BUILTINS];
|
|
55
60
|
|
|
@@ -59,6 +64,8 @@ type AudienceContactAdd = {
|
|
|
59
64
|
|
|
60
65
|
type AudienceMemberSort = (typeof AUDIENCE_MEMBER_SORTS)[keyof typeof AUDIENCE_MEMBER_SORTS];
|
|
61
66
|
|
|
67
|
+
type AudienceMemberStatus = AudienceMemberStatuses[keyof AudienceMemberStatuses];
|
|
68
|
+
|
|
62
69
|
declare const CONTACT_SOURCES: {
|
|
63
70
|
readonly MANUAL: "manual";
|
|
64
71
|
readonly AUTO: "auto";
|
|
@@ -101,6 +108,7 @@ type AudienceContactListOptions = ListOptions & {
|
|
|
101
108
|
q?: string;
|
|
102
109
|
source?: ContactSource;
|
|
103
110
|
sort?: AudienceMemberSort;
|
|
111
|
+
statuses?: Array<AudienceMemberStatus>;
|
|
104
112
|
};
|
|
105
113
|
|
|
106
114
|
type ContactResource = {
|
|
@@ -995,7 +1003,17 @@ declare const Domains: (transport: Transport) => {
|
|
|
995
1003
|
listAll: (options?: ListOptions) => Promise<Array<DomainResource>>;
|
|
996
1004
|
iterate: (options?: ListOptions) => AsyncGenerator<DomainResource, void, undefined>;
|
|
997
1005
|
get: (id: string, options?: RequestScope) => Promise<DomainDetailResource>;
|
|
1006
|
+
create: (body: DomainCreate, options?: RequestScope) => Promise<DomainDetailResource>;
|
|
1007
|
+
verify: (id: string, options?: RequestScope) => Promise<DomainDetailResource>;
|
|
998
1008
|
update: (id: string, patch: DomainPatch, options?: RequestScope) => Promise<DomainDetailResource>;
|
|
1009
|
+
delete: (id: string, options?: RequestScope) => Promise<DeletedDomainResource>;
|
|
1010
|
+
listAddresses: (id: string, options?: ListOptions) => Promise<Page<DomainAddressResource>>;
|
|
1011
|
+
listAllAddresses: (id: string, options?: ListOptions) => Promise<Array<DomainAddressResource>>;
|
|
1012
|
+
iterateAddresses: (id: string, options?: ListOptions) => AsyncGenerator<DomainAddressResource, void, undefined>;
|
|
1013
|
+
createAddress: (id: string, body: DomainAddressCreate, options?: RequestScope) => Promise<DomainAddressResource>;
|
|
1014
|
+
getAddress: (id: string, addressId: string, options?: RequestScope) => Promise<DomainAddressResource>;
|
|
1015
|
+
updateAddress: (id: string, addressId: string, patch: DomainAddressPatch, options?: RequestScope) => Promise<DomainAddressResource>;
|
|
1016
|
+
deleteAddress: (id: string, addressId: string, options?: RequestScope) => Promise<DeletedDomainAddressResource>;
|
|
999
1017
|
};
|
|
1000
1018
|
|
|
1001
1019
|
declare const Drafts: (transport: Transport) => {
|
|
@@ -1328,6 +1346,48 @@ type TempMailOptions = Omit<TransportOptions, 'apiKey'> & {
|
|
|
1328
1346
|
inboxToken?: string;
|
|
1329
1347
|
};
|
|
1330
1348
|
|
|
1349
|
+
type DeletedDomainAddressResource = {
|
|
1350
|
+
object: 'address';
|
|
1351
|
+
id: string;
|
|
1352
|
+
address: string;
|
|
1353
|
+
deleted: true;
|
|
1354
|
+
};
|
|
1355
|
+
|
|
1356
|
+
type DeletedDomainResource = {
|
|
1357
|
+
object: 'domain';
|
|
1358
|
+
id: string;
|
|
1359
|
+
domain: string;
|
|
1360
|
+
deleted: true;
|
|
1361
|
+
leftBehind: Array<string>;
|
|
1362
|
+
};
|
|
1363
|
+
|
|
1364
|
+
type DomainAddressCreate = {
|
|
1365
|
+
localPart: string;
|
|
1366
|
+
label?: string | null;
|
|
1367
|
+
};
|
|
1368
|
+
|
|
1369
|
+
type DomainAddressPatch = {
|
|
1370
|
+
label?: string | null;
|
|
1371
|
+
enabled?: boolean;
|
|
1372
|
+
};
|
|
1373
|
+
|
|
1374
|
+
type DomainAddressResource = {
|
|
1375
|
+
object: 'address';
|
|
1376
|
+
id: string;
|
|
1377
|
+
domainId: string;
|
|
1378
|
+
address: string;
|
|
1379
|
+
localPart: string;
|
|
1380
|
+
label: string | null;
|
|
1381
|
+
enabled: boolean;
|
|
1382
|
+
lastReceivedAt: string | null;
|
|
1383
|
+
createdAt: string;
|
|
1384
|
+
updatedAt: string;
|
|
1385
|
+
};
|
|
1386
|
+
|
|
1387
|
+
type DomainCreate = {
|
|
1388
|
+
domain: string;
|
|
1389
|
+
};
|
|
1390
|
+
|
|
1331
1391
|
declare const DOMAIN_SENDING_STATES: {
|
|
1332
1392
|
readonly VERIFIED: "verified";
|
|
1333
1393
|
readonly PENDING: "pending";
|
|
@@ -1347,6 +1407,40 @@ declare const DOMAIN_STORAGE_STATES: {
|
|
|
1347
1407
|
readonly ACTIVE: "active";
|
|
1348
1408
|
readonly FAILED: "failed";
|
|
1349
1409
|
};
|
|
1410
|
+
interface DomainRecordStatuses {
|
|
1411
|
+
FOUND: 'found';
|
|
1412
|
+
MISSING: 'missing';
|
|
1413
|
+
}
|
|
1414
|
+
declare const DOMAIN_RECORD_STATUSES: DomainRecordStatuses;
|
|
1415
|
+
interface DomainDmarcStages {
|
|
1416
|
+
MISSING: 'missing';
|
|
1417
|
+
INVALID: 'invalid';
|
|
1418
|
+
MONITOR: 'monitor';
|
|
1419
|
+
QUARANTINE: 'quarantine';
|
|
1420
|
+
REJECT: 'reject';
|
|
1421
|
+
}
|
|
1422
|
+
declare const DOMAIN_DMARC_STAGES: DomainDmarcStages;
|
|
1423
|
+
|
|
1424
|
+
type DomainDmarcStage = DomainDmarcStages[keyof DomainDmarcStages];
|
|
1425
|
+
|
|
1426
|
+
type DomainDmarcResource = {
|
|
1427
|
+
stage: DomainDmarcStage;
|
|
1428
|
+
record: string | null;
|
|
1429
|
+
issues: Array<string>;
|
|
1430
|
+
alignmentPossible: boolean;
|
|
1431
|
+
caveat: string;
|
|
1432
|
+
};
|
|
1433
|
+
|
|
1434
|
+
type DomainRecordStatus = DomainRecordStatuses[keyof DomainRecordStatuses];
|
|
1435
|
+
|
|
1436
|
+
type DomainRecordResource = {
|
|
1437
|
+
type: string;
|
|
1438
|
+
name: string;
|
|
1439
|
+
value: string;
|
|
1440
|
+
priority: number | null;
|
|
1441
|
+
purpose: string | null;
|
|
1442
|
+
status: DomainRecordStatus | null;
|
|
1443
|
+
};
|
|
1350
1444
|
|
|
1351
1445
|
type DomainSendingState = (typeof DOMAIN_SENDING_STATES)[keyof typeof DOMAIN_SENDING_STATES];
|
|
1352
1446
|
|
|
@@ -1412,9 +1506,12 @@ type DomainDetailResource = DomainResource & {
|
|
|
1412
1506
|
address: string;
|
|
1413
1507
|
enabled: boolean;
|
|
1414
1508
|
}>;
|
|
1509
|
+
records: Array<DomainRecordResource>;
|
|
1510
|
+
dmarc: DomainDmarcResource | null;
|
|
1415
1511
|
};
|
|
1416
1512
|
|
|
1417
1513
|
type DomainPatch = {
|
|
1514
|
+
catchAll?: boolean;
|
|
1418
1515
|
trackingHost?: string | null;
|
|
1419
1516
|
storageHost?: string | null;
|
|
1420
1517
|
};
|
|
@@ -1702,6 +1799,12 @@ interface FileUsages {
|
|
|
1702
1799
|
}
|
|
1703
1800
|
type FileUsage = FileUsages[keyof FileUsages];
|
|
1704
1801
|
declare const FILE_USAGES: FileUsages;
|
|
1802
|
+
interface FileVisibilities {
|
|
1803
|
+
PUBLIC: 'public';
|
|
1804
|
+
PRIVATE: 'private';
|
|
1805
|
+
}
|
|
1806
|
+
type FileVisibility = FileVisibilities[keyof FileVisibilities];
|
|
1807
|
+
declare const FILE_VISIBILITIES: FileVisibilities;
|
|
1705
1808
|
|
|
1706
1809
|
type FileKept = {
|
|
1707
1810
|
id: string;
|
|
@@ -1782,6 +1885,8 @@ type FileResource = {
|
|
|
1782
1885
|
deliveredTo: string | null;
|
|
1783
1886
|
usage: FileUsage | null;
|
|
1784
1887
|
deletable: boolean;
|
|
1888
|
+
visibility: FileVisibility;
|
|
1889
|
+
publicUrl: string | null;
|
|
1785
1890
|
createdAt: string;
|
|
1786
1891
|
};
|
|
1787
1892
|
|
|
@@ -3600,5 +3705,5 @@ declare const resolveLanguage: (input: string | null | undefined) => LanguageRes
|
|
|
3600
3705
|
declare const languageByCode: (code: string | null | undefined) => LanguageResource | undefined;
|
|
3601
3706
|
declare const isRtlLanguage: (code: string | null | undefined) => boolean;
|
|
3602
3707
|
|
|
3603
|
-
export { API_SCOPES, BROADCAST_RECIPIENT_FILTERS, BROADCAST_STATUSES, CONTACT_BLOCK_LISTS, CONTACT_PHOTO_TYPES, CONTACT_THREAD_SORTS, ERROR_TYPES, FILE_DIRECTIONS, FILE_KINDS, FILE_SORTS, FILE_USAGES, LANGUAGES, MESSAGE_ENCRYPTION_FORMATS, OpenEmail, OpenEmailApiError, OpenEmailNetworkError, PAGE_LIMITS, PEOPLE_SORTS, PROVIDER_IMPORT_DOMAIN_STATES, PROVIDER_IMPORT_RESOURCES, PROVIDER_IMPORT_STATUSES, RULE_ACTIONS, RULE_FIELDS, RULE_OPERATORS, SUPPRESSION_REASONS, THREAD_SORTS, VERSION, WEBHOOK_EVENTS, WEBHOOK_REPLAY_ERROR_CODES, WEBHOOK_SIGNATURE_HEADERS, createClient, createOpenEmail, createTempMail, OpenEmail as default, getClient, init, isApiKey, isRtlLanguage, isSealed, languageByCode, openemail, resetClient, resolveLanguage, toBase64, verifyWebhookSignature };
|
|
3604
|
-
export type { AddressBookPage, AddressBookResource, AddressResource, ApiErrorPayload, ApiErrorProps, ApiKeyActivityListOptions, ApiKeyActivityResource, ApiKeyCreate, ApiKeyEventType, ApiKeyMode, ApiKeyPatch, ApiKeyRequestListOptions, ApiKeyRequestResource, ApiKeyResource, ApiKeyRevoke, ApiKeyStatus, ApiKeyWorkspaceActivityListOptions, ApiKeyWorkspaceRequestListOptions, ApiScope, AttachmentDeliveryMode, AttachmentInput, AttachmentResource, AudienceBatchAddResource, AudienceBatchRemoveResource, AudienceBuiltin, AudienceContactAdd, AudienceContactListOptions, AudienceContactResource, AudienceContactsBatch, AudienceCreate, AudienceGrowthBucket, AudienceGrowthOptions, AudienceGrowthResource, AudienceGrowthSeries, AudienceGrowthTotals, AudienceImport, AudienceImportResource, AudienceImportRow, AudienceListOptions, AudienceMemberResource, AudienceMemberSort, AudiencePatch, AudienceResource, AuditActorKind, AuditActorResource, BatchItemResource, BatchResultResource, BroadcastCounts, BroadcastCreate, BroadcastListOptions, BroadcastPreviewInput, BroadcastPreviewResource, BroadcastRecipientContentResource, BroadcastRecipientFilter, BroadcastRecipientListOptions, BroadcastRecipientResource, BroadcastResource, BroadcastStatsBucket, BroadcastStatsOptions, BroadcastStatsResource, BroadcastStatsTotals, BroadcastStatus, BuiltinRole, CalendarAttendeeResource, CalendarEventResource, CalendarOccurrenceResource, CalendarRangeOptions, ClientOptions, ConsolePermission, ContactActivityBucket, ContactActivityOptions, ContactActivityResource, ContactActivityTotals, ContactAudienceResource, ContactAudiencesSet, ContactBatchDeleteResource, ContactBlockList, ContactBlockResource, ContactBlockRule, ContactCreate, ContactDetailResource, ContactListOptions, ContactPatch, ContactPhotoOptions, ContactPhotoType, ContactReplyTime, ContactResource, ContactSave, ContactSource, ContactThreadListOptions, ContactThreadResource, ContactThreadSort, CreatedApiKeyResource, CreatedTempInboxResource, CreatedWebhookResource, DeletedApiKeyResource, DeletedAudienceResource, DeletedContactResource, DeletedDraftResource, DeletedFileResource, DeletedLabelResource, DeletedRoleResource, DeletedRuleResource, DeletedTempInboxResource, DeletedTempMessageResource, DeletedTemplateResource, DeletedTemplateVersionResource, DeletedWebhookResource, DomainDetailResource, DomainPatch, DomainResource, DomainSendingState, DomainStorage, DomainStorageState, DomainTracking, DomainTrackingState, DraftInput, DraftListOptions, DraftResource, DraftSummaryResource, EmailClickedData, EmailDownloadedData, EmailEventResource, EmailListOptions, EmailOpenedData, EmailRecipientResource, EmailResource, EmailSend, EmailSource, EmailStatus, EmailTrackingSummary, EmailTranslate, EmailTranslationResource, EmailTransport, EmptiedAudienceResource, ErrorType, FetchLike, FileAddressCount, FileBatchDeleteResource, FileCount, FileDayCount, FileDirection, FileEventData, FileKept, FileKind, FileLinkCount, FileLinkCreateOptions, FileLinkResource, FileListOptions, FileResource, FileSort, FileStatsResource, FileTypeCount, FileUploadOptions, FileUsage, HitKind, ImportChunkResource, ImportCounts, ImportCreate, ImportFailurePage, ImportFailureReason, ImportFailureResource, ImportFailuresOptions, ImportFileDescriptor, ImportFileInfo, ImportFilesInput, ImportFormat, ImportListOptions, ImportOptions, ImportProgress, ImportResource, ImportSource, ImportStatus, ImportUploadResource, InboxScope, InlineAttachmentInput, InvitationResource, KeyResource, LabelColor, LabelColorInput, LabelColorKind, LabelColorResource, LabelInput, LabelPatch, LabelResource, LanguageResource, ListOptions, LogWindow, MemberAccess, MemberAdd, MemberAddressGrant, MemberAddressResource, MemberDomainResource, MemberPatch, MemberResource, MessageEncryption, MessageEncryptionFormat, MessageEncryptionPartRole, MessageResource, Page, PeoplePage, PeopleSort, Permission, PermissionResource, PersonListOptions, PersonResource, PingResource, ProviderImportCount, ProviderImportCreate, ProviderImportDomainState, ProviderImportListOptions, ProviderImportReport, ProviderImportResource, ProviderImportResourceKind, ProviderImportStatus, ProviderInventoryResource, RawBody, RecipientInput, RecipientKind, RecipientStatus, RemovedAudienceContactResource, RemovedMemberResource, RemovedSuppressionResource, RequestOptions, RequestScope, RevokedInvitationResource, RoleCreate, RoleDeleteOptions, RolePatch, RoleResource, RotatedApiKeyResource, RotatedKeyResource, RuleAction, RuleActionType, RuleCondition, RuleConditionInput, RuleCreate, RuleField, RuleListOptions, RuleMatchMode, RuleOperator, RulePatch, RuleResource, RuleRunListOptions, RuleRunResource, RuleTestInput, RuleTestResource, RuleTestWarningCode, SavedDraftResource, SendScope, SendTranslateOptions, SendableDomainResource, SentBroadcastResource, SentEmailResource, SentTemplateEmailResource, SettingsOptions, SettingsPatch, SettingsResource, SnoozedThreadResource, StoredAttachmentInput, SuppressionAdd, SuppressionListOptions, SuppressionReason, SuppressionResource, TempDomainResource, TempInboxCreate, TempInboxResource, TempMailOptions, TempMessageDetailResource, TempMessageListOptions, TempMessageResource, TempMessagesResource, TemplateAnalyticsOptions, TemplateAnalyticsResource, TemplateBlock, TemplateBlockKind, TemplateCategory, TemplateContent, TemplateContentSource, TemplateCreate, TemplateDetailResource, TemplateDocument, TemplateDuplicate, TemplateEngine, TemplateFont, TemplateFontFormat, TemplateFontResource, TemplateFontStyle, TemplateListOptions, TemplatePatch, TemplatePreviewInput, TemplatePreviewResource, TemplatePreviewWarningCode, TemplateProp, TemplateRenderInput, TemplateRenderResource, TemplateResource, TemplateRestoreInput, TemplateRestoredResource, TemplateSend, TemplateSendListOptions, TemplateSendResource, TemplateSendsResource, TemplateSlot, TemplateSort, TemplateStarterDetailResource, TemplateStarterResource, TemplateStatus, TemplateValueKind, TemplateVersionResource, TemplateVersionState, ThreadListOptions, ThreadPatch, ThreadResource, ThreadSort, ThreadSummaryResource, TrackingClickResource, TrackingGrain, TrackingHitOptions, TrackingLinkResource, TrackingListOptions, TrackingOpenResource, TrackingRecipientResource, TrackingRequest, TrackingResource, TrackingStatsOptions, TrackingStatsResource, TrackingSummary, TranslateOptions, TranslationResource, TransportOptions, TrashedThreadResource, UpdatedThreadResource, VerifyWebhookProps, WebhookActivityListOptions, WebhookActivityResource, WebhookChangeType, WebhookCreate, WebhookDeliveryAttempt, WebhookDeliveryDetailResource, WebhookDeliveryListOptions, WebhookDeliveryResource, WebhookDeliveryStatus, WebhookEvent, WebhookPatch, WebhookPayload, WebhookReplayErrorCode, WebhookReplayRefusal, WebhookReplayResource, WebhookResource, WebhookSignatureHeaders, WebhookTestResource, WebhookWorkspaceActivityListOptions, WebhookWorkspaceDeliveryListOptions };
|
|
3708
|
+
export { API_SCOPES, AUDIENCE_MEMBER_STATUSES, BROADCAST_RECIPIENT_FILTERS, BROADCAST_STATUSES, CONTACT_BLOCK_LISTS, CONTACT_PHOTO_TYPES, CONTACT_THREAD_SORTS, DOMAIN_DMARC_STAGES, DOMAIN_RECORD_STATUSES, ERROR_TYPES, FILE_DIRECTIONS, FILE_KINDS, FILE_SORTS, FILE_USAGES, FILE_VISIBILITIES, LANGUAGES, MESSAGE_ENCRYPTION_FORMATS, OpenEmail, OpenEmailApiError, OpenEmailNetworkError, PAGE_LIMITS, PEOPLE_SORTS, PROVIDER_IMPORT_DOMAIN_STATES, PROVIDER_IMPORT_RESOURCES, PROVIDER_IMPORT_STATUSES, RULE_ACTIONS, RULE_FIELDS, RULE_OPERATORS, SUPPRESSION_REASONS, THREAD_SORTS, VERSION, WEBHOOK_EVENTS, WEBHOOK_REPLAY_ERROR_CODES, WEBHOOK_SIGNATURE_HEADERS, createClient, createOpenEmail, createTempMail, OpenEmail as default, getClient, init, isApiKey, isRtlLanguage, isSealed, languageByCode, openemail, resetClient, resolveLanguage, toBase64, verifyWebhookSignature };
|
|
3709
|
+
export type { AddressBookPage, AddressBookResource, AddressResource, ApiErrorPayload, ApiErrorProps, ApiKeyActivityListOptions, ApiKeyActivityResource, ApiKeyCreate, ApiKeyEventType, ApiKeyMode, ApiKeyPatch, ApiKeyRequestListOptions, ApiKeyRequestResource, ApiKeyResource, ApiKeyRevoke, ApiKeyStatus, ApiKeyWorkspaceActivityListOptions, ApiKeyWorkspaceRequestListOptions, ApiScope, AttachmentDeliveryMode, AttachmentInput, AttachmentResource, AudienceBatchAddResource, AudienceBatchRemoveResource, AudienceBuiltin, AudienceContactAdd, AudienceContactListOptions, AudienceContactResource, AudienceContactsBatch, AudienceCreate, AudienceGrowthBucket, AudienceGrowthOptions, AudienceGrowthResource, AudienceGrowthSeries, AudienceGrowthTotals, AudienceImport, AudienceImportResource, AudienceImportRow, AudienceListOptions, AudienceMemberResource, AudienceMemberSort, AudienceMemberStatus, AudiencePatch, AudienceResource, AuditActorKind, AuditActorResource, BatchItemResource, BatchResultResource, BroadcastCounts, BroadcastCreate, BroadcastListOptions, BroadcastPreviewInput, BroadcastPreviewResource, BroadcastRecipientContentResource, BroadcastRecipientFilter, BroadcastRecipientListOptions, BroadcastRecipientResource, BroadcastResource, BroadcastStatsBucket, BroadcastStatsOptions, BroadcastStatsResource, BroadcastStatsTotals, BroadcastStatus, BuiltinRole, CalendarAttendeeResource, CalendarEventResource, CalendarOccurrenceResource, CalendarRangeOptions, ClientOptions, ConsolePermission, ContactActivityBucket, ContactActivityOptions, ContactActivityResource, ContactActivityTotals, ContactAudienceResource, ContactAudiencesSet, ContactBatchDeleteResource, ContactBlockList, ContactBlockResource, ContactBlockRule, ContactCreate, ContactDetailResource, ContactListOptions, ContactPatch, ContactPhotoOptions, ContactPhotoType, ContactReplyTime, ContactResource, ContactSave, ContactSource, ContactThreadListOptions, ContactThreadResource, ContactThreadSort, CreatedApiKeyResource, CreatedTempInboxResource, CreatedWebhookResource, DeletedApiKeyResource, DeletedAudienceResource, DeletedContactResource, DeletedDomainAddressResource, DeletedDomainResource, DeletedDraftResource, DeletedFileResource, DeletedLabelResource, DeletedRoleResource, DeletedRuleResource, DeletedTempInboxResource, DeletedTempMessageResource, DeletedTemplateResource, DeletedTemplateVersionResource, DeletedWebhookResource, DomainAddressCreate, DomainAddressPatch, DomainAddressResource, DomainCreate, DomainDetailResource, DomainDmarcResource, DomainDmarcStage, DomainPatch, DomainRecordResource, DomainRecordStatus, DomainResource, DomainSendingState, DomainStorage, DomainStorageState, DomainTracking, DomainTrackingState, DraftInput, DraftListOptions, DraftResource, DraftSummaryResource, EmailClickedData, EmailDownloadedData, EmailEventResource, EmailListOptions, EmailOpenedData, EmailRecipientResource, EmailResource, EmailSend, EmailSource, EmailStatus, EmailTrackingSummary, EmailTranslate, EmailTranslationResource, EmailTransport, EmptiedAudienceResource, ErrorType, FetchLike, FileAddressCount, FileBatchDeleteResource, FileCount, FileDayCount, FileDirection, FileEventData, FileKept, FileKind, FileLinkCount, FileLinkCreateOptions, FileLinkResource, FileListOptions, FileResource, FileSort, FileStatsResource, FileTypeCount, FileUploadOptions, FileUsage, FileVisibility, HitKind, ImportChunkResource, ImportCounts, ImportCreate, ImportFailurePage, ImportFailureReason, ImportFailureResource, ImportFailuresOptions, ImportFileDescriptor, ImportFileInfo, ImportFilesInput, ImportFormat, ImportListOptions, ImportOptions, ImportProgress, ImportResource, ImportSource, ImportStatus, ImportUploadResource, InboxScope, InlineAttachmentInput, InvitationResource, KeyResource, LabelColor, LabelColorInput, LabelColorKind, LabelColorResource, LabelInput, LabelPatch, LabelResource, LanguageResource, ListOptions, LogWindow, MemberAccess, MemberAdd, MemberAddressGrant, MemberAddressResource, MemberDomainResource, MemberPatch, MemberResource, MessageEncryption, MessageEncryptionFormat, MessageEncryptionPartRole, MessageResource, Page, PeoplePage, PeopleSort, Permission, PermissionResource, PersonListOptions, PersonResource, PingResource, ProviderImportCount, ProviderImportCreate, ProviderImportDomainState, ProviderImportListOptions, ProviderImportReport, ProviderImportResource, ProviderImportResourceKind, ProviderImportStatus, ProviderInventoryResource, RawBody, RecipientInput, RecipientKind, RecipientStatus, RemovedAudienceContactResource, RemovedMemberResource, RemovedSuppressionResource, RequestOptions, RequestScope, RevokedInvitationResource, RoleCreate, RoleDeleteOptions, RolePatch, RoleResource, RotatedApiKeyResource, RotatedKeyResource, RuleAction, RuleActionType, RuleCondition, RuleConditionInput, RuleCreate, RuleField, RuleListOptions, RuleMatchMode, RuleOperator, RulePatch, RuleResource, RuleRunListOptions, RuleRunResource, RuleTestInput, RuleTestResource, RuleTestWarningCode, SavedDraftResource, SendScope, SendTranslateOptions, SendableDomainResource, SentBroadcastResource, SentEmailResource, SentTemplateEmailResource, SettingsOptions, SettingsPatch, SettingsResource, SnoozedThreadResource, StoredAttachmentInput, SuppressionAdd, SuppressionListOptions, SuppressionReason, SuppressionResource, TempDomainResource, TempInboxCreate, TempInboxResource, TempMailOptions, TempMessageDetailResource, TempMessageListOptions, TempMessageResource, TempMessagesResource, TemplateAnalyticsOptions, TemplateAnalyticsResource, TemplateBlock, TemplateBlockKind, TemplateCategory, TemplateContent, TemplateContentSource, TemplateCreate, TemplateDetailResource, TemplateDocument, TemplateDuplicate, TemplateEngine, TemplateFont, TemplateFontFormat, TemplateFontResource, TemplateFontStyle, TemplateListOptions, TemplatePatch, TemplatePreviewInput, TemplatePreviewResource, TemplatePreviewWarningCode, TemplateProp, TemplateRenderInput, TemplateRenderResource, TemplateResource, TemplateRestoreInput, TemplateRestoredResource, TemplateSend, TemplateSendListOptions, TemplateSendResource, TemplateSendsResource, TemplateSlot, TemplateSort, TemplateStarterDetailResource, TemplateStarterResource, TemplateStatus, TemplateValueKind, TemplateVersionResource, TemplateVersionState, ThreadListOptions, ThreadPatch, ThreadResource, ThreadSort, ThreadSummaryResource, TrackingClickResource, TrackingGrain, TrackingHitOptions, TrackingLinkResource, TrackingListOptions, TrackingOpenResource, TrackingRecipientResource, TrackingRequest, TrackingResource, TrackingStatsOptions, TrackingStatsResource, TrackingSummary, TranslateOptions, TranslationResource, TransportOptions, TrashedThreadResource, UpdatedThreadResource, VerifyWebhookProps, WebhookActivityListOptions, WebhookActivityResource, WebhookChangeType, WebhookCreate, WebhookDeliveryAttempt, WebhookDeliveryDetailResource, WebhookDeliveryListOptions, WebhookDeliveryResource, WebhookDeliveryStatus, WebhookEvent, WebhookPatch, WebhookPayload, WebhookReplayErrorCode, WebhookReplayRefusal, WebhookReplayResource, WebhookResource, WebhookSignatureHeaders, WebhookTestResource, WebhookWorkspaceActivityListOptions, WebhookWorkspaceDeliveryListOptions };
|
package/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
const AUDIENCE_MEMBER_STATUSES = {
|
|
2
|
+
SUBSCRIBED: 'subscribed',
|
|
3
|
+
UNSUBSCRIBED: 'unsubscribed'
|
|
4
|
+
};
|
|
5
|
+
|
|
1
6
|
const BROADCAST_STATUSES = {
|
|
2
7
|
SCHEDULED: 'scheduled',
|
|
3
8
|
QUEUED: 'queued',
|
|
@@ -19,7 +24,7 @@ const BROADCAST_RECIPIENT_FILTERS = {
|
|
|
19
24
|
UNSUBSCRIBED: 'unsubscribed'
|
|
20
25
|
};
|
|
21
26
|
|
|
22
|
-
var version = "0.0.
|
|
27
|
+
var version = "0.0.5";
|
|
23
28
|
|
|
24
29
|
const BUILD_BASE_URL = 'https://api.openemail.uk';
|
|
25
30
|
|
|
@@ -86,6 +91,18 @@ const CONTACT_PHOTO_TYPES = {
|
|
|
86
91
|
GIF: 'image/gif'
|
|
87
92
|
};
|
|
88
93
|
|
|
94
|
+
const DOMAIN_RECORD_STATUSES = {
|
|
95
|
+
FOUND: 'found',
|
|
96
|
+
MISSING: 'missing'
|
|
97
|
+
};
|
|
98
|
+
const DOMAIN_DMARC_STAGES = {
|
|
99
|
+
MISSING: 'missing',
|
|
100
|
+
INVALID: 'invalid',
|
|
101
|
+
MONITOR: 'monitor',
|
|
102
|
+
QUARANTINE: 'quarantine',
|
|
103
|
+
REJECT: 'reject'
|
|
104
|
+
};
|
|
105
|
+
|
|
89
106
|
const MESSAGE_ENCRYPTION_FORMATS = {
|
|
90
107
|
PGP_MIME: 'pgp-mime',
|
|
91
108
|
PGP_SIGNED: 'pgp-signed',
|
|
@@ -151,6 +168,10 @@ const FILE_USAGES = {
|
|
|
151
168
|
LINKED: 'linked',
|
|
152
169
|
SCHEDULED: 'scheduled'
|
|
153
170
|
};
|
|
171
|
+
const FILE_VISIBILITIES = {
|
|
172
|
+
PUBLIC: 'public',
|
|
173
|
+
PRIVATE: 'private'
|
|
174
|
+
};
|
|
154
175
|
|
|
155
176
|
const HTTP_METHODS = {
|
|
156
177
|
GET: 'GET',
|
|
@@ -589,6 +610,7 @@ const SEGMENTS = {
|
|
|
589
610
|
TRASH: 'trash',
|
|
590
611
|
UNSNOOZE: 'unsnooze',
|
|
591
612
|
UPLOAD: 'upload',
|
|
613
|
+
VERIFY: 'verify',
|
|
592
614
|
VERSIONS: 'versions'
|
|
593
615
|
};
|
|
594
616
|
|
|
@@ -1338,6 +1360,9 @@ const BroadcastPath = (id) => `${PATHS.BROADCASTS}/${Segment(id)}`;
|
|
|
1338
1360
|
const BroadcastChildPath = (id, segment) => `${BroadcastPath(id)}/${segment}`;
|
|
1339
1361
|
const BroadcastRecipientPath = (id, emailId) => `${BroadcastChildPath(id, SEGMENTS.RECIPIENTS)}/${Segment(emailId)}`;
|
|
1340
1362
|
const DomainPath = (id) => `${PATHS.DOMAINS}/${Segment(id)}`;
|
|
1363
|
+
const DomainChildPath = (id, segment) => `${DomainPath(id)}/${segment}`;
|
|
1364
|
+
const DomainAddressesPath = (id) => `${DomainPath(id)}/${SEGMENTS.ADDRESSES}`;
|
|
1365
|
+
const DomainAddressPath = (id, addressId) => `${DomainAddressesPath(id)}/${Segment(addressId)}`;
|
|
1341
1366
|
const WebhookPath = (id) => `${PATHS.WEBHOOKS}/${Segment(id)}`;
|
|
1342
1367
|
const WebhookChildPath = (id, segment) => `${WebhookPath(id)}/${segment}`;
|
|
1343
1368
|
const WebhookDeliveryPath = (id, deliveryId) => `${WebhookChildPath(id, SEGMENTS.DELIVERIES)}/${Segment(deliveryId)}`;
|
|
@@ -1410,7 +1435,8 @@ const Addresses = (transport) => {
|
|
|
1410
1435
|
const MemberQuery = (options) => ({
|
|
1411
1436
|
[QUERY_KEYS.Q]: options.q,
|
|
1412
1437
|
[QUERY_KEYS.SOURCE]: options.source,
|
|
1413
|
-
[QUERY_KEYS.SORT]: options.sort
|
|
1438
|
+
[QUERY_KEYS.SORT]: options.sort,
|
|
1439
|
+
[QUERY_KEYS.STATUS]: options.statuses?.length ? options.statuses.join(LIST_SEPARATOR) : undefined
|
|
1414
1440
|
});
|
|
1415
1441
|
const GrowthQuery = (options) => ({
|
|
1416
1442
|
[QUERY_KEYS.AUDIENCE_IDS]: options.audienceIds?.join(LIST_SEPARATOR),
|
|
@@ -1728,12 +1754,52 @@ const Domains = (transport) => ({
|
|
|
1728
1754
|
listAll: (options = {}) => CollectAll(transport, PATHS.DOMAINS, CURSOR_STYLES.CURSOR, options),
|
|
1729
1755
|
iterate: (options = {}) => IteratePages(transport, PATHS.DOMAINS, CURSOR_STYLES.CURSOR, options),
|
|
1730
1756
|
get: (id, options = {}) => transport.request(DomainPath(id), { signal: options.signal, apiKey: options.apiKey }),
|
|
1757
|
+
create: (body, options = {}) => transport.request(PATHS.DOMAINS, {
|
|
1758
|
+
method: HTTP_METHODS.POST,
|
|
1759
|
+
body,
|
|
1760
|
+
signal: options.signal,
|
|
1761
|
+
apiKey: options.apiKey
|
|
1762
|
+
}),
|
|
1763
|
+
verify: (id, options = {}) => transport.request(DomainChildPath(id, SEGMENTS.VERIFY), {
|
|
1764
|
+
method: HTTP_METHODS.POST,
|
|
1765
|
+
repeatable: true,
|
|
1766
|
+
signal: options.signal,
|
|
1767
|
+
apiKey: options.apiKey
|
|
1768
|
+
}),
|
|
1731
1769
|
update: (id, patch, options = {}) => transport.request(DomainPath(id), {
|
|
1732
1770
|
method: HTTP_METHODS.PATCH,
|
|
1733
1771
|
body: patch,
|
|
1734
1772
|
repeatable: true,
|
|
1735
1773
|
signal: options.signal,
|
|
1736
1774
|
apiKey: options.apiKey
|
|
1775
|
+
}),
|
|
1776
|
+
delete: (id, options = {}) => transport.request(DomainPath(id), {
|
|
1777
|
+
method: HTTP_METHODS.DELETE,
|
|
1778
|
+
signal: options.signal,
|
|
1779
|
+
apiKey: options.apiKey
|
|
1780
|
+
}),
|
|
1781
|
+
listAddresses: (id, options = {}) => FetchPage(transport, DomainAddressesPath(id), CURSOR_STYLES.CURSOR, options),
|
|
1782
|
+
listAllAddresses: (id, options = {}) => CollectAll(transport, DomainAddressesPath(id), CURSOR_STYLES.CURSOR, options),
|
|
1783
|
+
iterateAddresses: (id, options = {}) => IteratePages(transport, DomainAddressesPath(id), CURSOR_STYLES.CURSOR, options),
|
|
1784
|
+
createAddress: (id, body, options = {}) => transport.request(DomainAddressesPath(id), {
|
|
1785
|
+
method: HTTP_METHODS.POST,
|
|
1786
|
+
body,
|
|
1787
|
+
repeatable: true,
|
|
1788
|
+
signal: options.signal,
|
|
1789
|
+
apiKey: options.apiKey
|
|
1790
|
+
}),
|
|
1791
|
+
getAddress: (id, addressId, options = {}) => transport.request(DomainAddressPath(id, addressId), { signal: options.signal, apiKey: options.apiKey }),
|
|
1792
|
+
updateAddress: (id, addressId, patch, options = {}) => transport.request(DomainAddressPath(id, addressId), {
|
|
1793
|
+
method: HTTP_METHODS.PATCH,
|
|
1794
|
+
body: patch,
|
|
1795
|
+
repeatable: true,
|
|
1796
|
+
signal: options.signal,
|
|
1797
|
+
apiKey: options.apiKey
|
|
1798
|
+
}),
|
|
1799
|
+
deleteAddress: (id, addressId, options = {}) => transport.request(DomainAddressPath(id, addressId), {
|
|
1800
|
+
method: HTTP_METHODS.DELETE,
|
|
1801
|
+
signal: options.signal,
|
|
1802
|
+
apiKey: options.apiKey
|
|
1737
1803
|
})
|
|
1738
1804
|
});
|
|
1739
1805
|
|
|
@@ -2846,4 +2912,4 @@ const resolveLanguage = ResolveLanguage;
|
|
|
2846
2912
|
const languageByCode = LanguageByCode;
|
|
2847
2913
|
const isRtlLanguage = IsRtlLanguage;
|
|
2848
2914
|
|
|
2849
|
-
export { API_SCOPES, BROADCAST_RECIPIENT_FILTERS, BROADCAST_STATUSES, CONTACT_BLOCK_LISTS, CONTACT_PHOTO_TYPES, CONTACT_THREAD_SORTS, ERROR_TYPES, FILE_DIRECTIONS, FILE_KINDS, FILE_SORTS, FILE_USAGES, LANGUAGES, MESSAGE_ENCRYPTION_FORMATS, OpenEmail, OpenEmailApiError, OpenEmailNetworkError, PAGE_LIMITS, PEOPLE_SORTS, PROVIDER_IMPORT_DOMAIN_STATES, PROVIDER_IMPORT_RESOURCES, PROVIDER_IMPORT_STATUSES, RULE_ACTIONS, RULE_FIELDS, RULE_OPERATORS, SUPPRESSION_REASONS, THREAD_SORTS, VERSION, WEBHOOK_EVENTS, WEBHOOK_REPLAY_ERROR_CODES, WEBHOOK_SIGNATURE_HEADERS, createClient, createOpenEmail, createTempMail, OpenEmail as default, getClient, init, isApiKey, isRtlLanguage, isSealed, languageByCode, openemail, resetClient, resolveLanguage, toBase64, verifyWebhookSignature };
|
|
2915
|
+
export { API_SCOPES, AUDIENCE_MEMBER_STATUSES, BROADCAST_RECIPIENT_FILTERS, BROADCAST_STATUSES, CONTACT_BLOCK_LISTS, CONTACT_PHOTO_TYPES, CONTACT_THREAD_SORTS, DOMAIN_DMARC_STAGES, DOMAIN_RECORD_STATUSES, ERROR_TYPES, FILE_DIRECTIONS, FILE_KINDS, FILE_SORTS, FILE_USAGES, FILE_VISIBILITIES, LANGUAGES, MESSAGE_ENCRYPTION_FORMATS, OpenEmail, OpenEmailApiError, OpenEmailNetworkError, PAGE_LIMITS, PEOPLE_SORTS, PROVIDER_IMPORT_DOMAIN_STATES, PROVIDER_IMPORT_RESOURCES, PROVIDER_IMPORT_STATUSES, RULE_ACTIONS, RULE_FIELDS, RULE_OPERATORS, SUPPRESSION_REASONS, THREAD_SORTS, VERSION, WEBHOOK_EVENTS, WEBHOOK_REPLAY_ERROR_CODES, WEBHOOK_SIGNATURE_HEADERS, createClient, createOpenEmail, createTempMail, OpenEmail as default, getClient, init, isApiKey, isRtlLanguage, isSealed, languageByCode, openemail, resetClient, resolveLanguage, toBase64, verifyWebhookSignature };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openemail/sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"author": "OpenEmail",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "The official TypeScript SDK for the OpenEmail API. Send email and broadcasts, work with threads, drafts, labels, templates, rules, webhooks, tracking, contacts, audiences, domains, suppressions, files, API keys, roles, members, mailbox imports and disposable inboxes from code.",
|