unione 1.2.3 → 1.3.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/AGENTS.md +49 -60
- package/LICENSE +1 -1
- package/README.md +28 -8
- package/package.json +5 -2
- package/src/api/confirmed-email/ConfirmedEmailApi.d.ts +3 -3
- package/src/api/confirmed-email/models.d.ts +23 -2
- package/src/api/domain/DomainApi.d.ts +6 -6
- package/src/api/domain/models.d.ts +52 -3
- package/src/api/email/EmailApi.d.ts +3 -3
- package/src/api/email/models.d.ts +54 -8
- package/src/api/email-validation/EmailValidationApi.d.ts +2 -2
- package/src/api/email-validation/models.d.ts +6 -0
- package/src/api/event-dump/EventDumpApi.d.ts +4 -4
- package/src/api/event-dump/models.d.ts +51 -4
- package/src/api/obsolete/ObsoleteApi.d.ts +4 -4
- package/src/api/obsolete/models.d.ts +25 -1
- package/src/api/project/ProjectApi.d.ts +5 -5
- package/src/api/project/models.d.ts +42 -3
- package/src/api/suppression/SuppressionApi.d.ts +5 -5
- package/src/api/suppression/models.d.ts +34 -2
- package/src/api/system/models.d.ts +22 -2
- package/src/api/tag/TagApi.d.ts +2 -2
- package/src/api/tag/models.d.ts +13 -1
- package/src/api/template/TemplateApi.d.ts +5 -5
- package/src/api/template/models.d.ts +91 -13
- package/src/api/webhook/WebhookApi.d.ts +5 -5
- package/src/api/webhook/models.d.ts +102 -9
- package/src/client/ApiClient.js +43 -13
- package/src/client/ApiError.d.ts +34 -1
- package/src/client/ApiError.js +42 -3
- package/src/client/Configuration.js +1 -1
- package/src/client/errors.js +195 -0
- package/src/client/index.d.ts +1 -1
- package/src/client/index.js +1 -1
- package/src/common/models.d.ts +15 -0
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
// Types of the models of the Email section.
|
|
2
|
-
import type { AttachmentsArrayItem, AttachmentsArrayItemJSON, BodyObject, BodyObjectJSON, HeadersObject, HeadersObjectJSON, InlineAttachmentsArrayItem, InlineAttachmentsArrayItemJSON, TemplateEngine } from "../../common/models.js";
|
|
2
|
+
import type { AttachmentsArrayItem, AttachmentsArrayItemInput, AttachmentsArrayItemJSON, BodyObject, BodyObjectInput, BodyObjectJSON, HeadersObject, HeadersObjectInput, HeadersObjectJSON, InlineAttachmentsArrayItem, InlineAttachmentsArrayItemInput, InlineAttachmentsArrayItemJSON, TemplateEngine } from "../../common/models.js";
|
|
3
3
|
|
|
4
4
|
/** EmailSendRequest in the API format: the object sent and received as JSON. */
|
|
5
5
|
export interface EmailSendRequestJSON {
|
|
6
6
|
"message": MessageObjectJSON;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
/** EmailSendRequest in the API format as an argument: a nested model may also be given as a model. */
|
|
10
|
+
export interface EmailSendRequestInput {
|
|
11
|
+
"message": MessageObject | MessageObjectInput;
|
|
12
|
+
}
|
|
13
|
+
|
|
9
14
|
/** Fields of new EmailSendRequest(): a nested model may be a plain object in the API format. */
|
|
10
15
|
export interface EmailSendRequestInit {
|
|
11
16
|
/** Object containing all message properties. */
|
|
12
|
-
message: MessageObject |
|
|
17
|
+
message: MessageObject | MessageObjectInput;
|
|
13
18
|
}
|
|
14
19
|
|
|
15
20
|
/** EmailSendRequest */
|
|
@@ -52,10 +57,39 @@ export interface MessageObjectJSON {
|
|
|
52
57
|
"options"?: MessageObjectOptionsJSON;
|
|
53
58
|
}
|
|
54
59
|
|
|
60
|
+
/** MessageObject in the API format as an argument: a nested model may also be given as a model. */
|
|
61
|
+
export interface MessageObjectInput {
|
|
62
|
+
"recipients": Array<MessageObjectRecipientsItem | MessageObjectRecipientsItemInput>;
|
|
63
|
+
"template_id"?: string;
|
|
64
|
+
"tags"?: Array<string>;
|
|
65
|
+
"skip_unsubscribe"?: number;
|
|
66
|
+
"global_language"?: string;
|
|
67
|
+
"template_engine"?: TemplateEngine;
|
|
68
|
+
"global_substitutions"?: Record<string, string>;
|
|
69
|
+
"global_metadata"?: Record<string, string>;
|
|
70
|
+
"body": BodyObject | BodyObjectInput;
|
|
71
|
+
"subject": string;
|
|
72
|
+
"from_email"?: string;
|
|
73
|
+
"from_name"?: string;
|
|
74
|
+
"reply_to"?: string;
|
|
75
|
+
"reply_to_name"?: string;
|
|
76
|
+
"track_links"?: number;
|
|
77
|
+
"track_read"?: number;
|
|
78
|
+
"bypass_global"?: number;
|
|
79
|
+
"bypass_unavailable"?: number;
|
|
80
|
+
"bypass_unsubscribed"?: number;
|
|
81
|
+
"bypass_complained"?: number;
|
|
82
|
+
"idempotence_key"?: string;
|
|
83
|
+
"headers"?: HeadersObject | HeadersObjectInput;
|
|
84
|
+
"attachments"?: Array<AttachmentsArrayItem | AttachmentsArrayItemInput>;
|
|
85
|
+
"inline_attachments"?: Array<InlineAttachmentsArrayItem | InlineAttachmentsArrayItemInput>;
|
|
86
|
+
"options"?: MessageObjectOptions | MessageObjectOptionsInput;
|
|
87
|
+
}
|
|
88
|
+
|
|
55
89
|
/** Fields of new MessageObject(): a nested model may be a plain object in the API format. */
|
|
56
90
|
export interface MessageObjectInit {
|
|
57
91
|
/** Contains recipient emails, substitutions(merge tags) and metadata. */
|
|
58
|
-
recipients: Array<MessageObjectRecipientsItem |
|
|
92
|
+
recipients: Array<MessageObjectRecipientsItem | MessageObjectRecipientsItemInput>;
|
|
59
93
|
/**
|
|
60
94
|
* Optional identifier of the template that had been created by
|
|
61
95
|
* [template/set](https://docs.unione.io/en/web-api-ref#template-set) method. If template_id is passed
|
|
@@ -113,7 +147,7 @@ export interface MessageObjectInit {
|
|
|
113
147
|
*/
|
|
114
148
|
globalMetadata?: Record<string, string>;
|
|
115
149
|
/** Contains HTML/plaintext/AMP parts of the email. Either html or plaintext part is required. */
|
|
116
|
-
body: BodyObject |
|
|
150
|
+
body: BodyObject | BodyObjectInput;
|
|
117
151
|
/** Email subject. */
|
|
118
152
|
subject: string;
|
|
119
153
|
/** Sender's email. Required only if template_id parameter is empty. */
|
|
@@ -185,16 +219,16 @@ export interface MessageObjectInit {
|
|
|
185
219
|
* List-Unsubscribe, List-Subscribe, List-Help, List-Owner, List-Archive, In-Reply-To and References
|
|
186
220
|
* headers.
|
|
187
221
|
*/
|
|
188
|
-
headers?: HeadersObject |
|
|
222
|
+
headers?: HeadersObject | HeadersObjectInput;
|
|
189
223
|
/** Optional array of attachments */
|
|
190
|
-
attachments?: Array<AttachmentsArrayItem |
|
|
224
|
+
attachments?: Array<AttachmentsArrayItem | AttachmentsArrayItemInput>;
|
|
191
225
|
/**
|
|
192
226
|
* Optional array of inline attachments, e.g. for including images in email instead of loading them
|
|
193
227
|
* from external URL.
|
|
194
228
|
*/
|
|
195
|
-
inlineAttachments?: Array<InlineAttachmentsArrayItem |
|
|
229
|
+
inlineAttachments?: Array<InlineAttachmentsArrayItem | InlineAttachmentsArrayItemInput>;
|
|
196
230
|
/** Additional message options. */
|
|
197
|
-
options?: MessageObjectOptions |
|
|
231
|
+
options?: MessageObjectOptions | MessageObjectOptionsInput;
|
|
198
232
|
}
|
|
199
233
|
|
|
200
234
|
/** Object containing all message properties. */
|
|
@@ -354,6 +388,9 @@ export interface MessageObjectRecipientsItemJSON {
|
|
|
354
388
|
"metadata"?: Record<string, string>;
|
|
355
389
|
}
|
|
356
390
|
|
|
391
|
+
/** MessageObjectRecipientsItem in the API format as an argument: a nested model may also be given as a model. */
|
|
392
|
+
export type MessageObjectRecipientsItemInput = MessageObjectRecipientsItemJSON;
|
|
393
|
+
|
|
357
394
|
/** Fields of new MessageObjectRecipientsItem(): a nested model may be a plain object in the API format. */
|
|
358
395
|
export interface MessageObjectRecipientsItemInit {
|
|
359
396
|
/** Recipient email */
|
|
@@ -437,6 +474,9 @@ export interface MessageObjectOptionsJSON {
|
|
|
437
474
|
"smtp_pool_id"?: string;
|
|
438
475
|
}
|
|
439
476
|
|
|
477
|
+
/** MessageObjectOptions in the API format as an argument: a nested model may also be given as a model. */
|
|
478
|
+
export type MessageObjectOptionsInput = MessageObjectOptionsJSON;
|
|
479
|
+
|
|
440
480
|
/** Fields of new MessageObjectOptions(): a nested model may be a plain object in the API format. */
|
|
441
481
|
export interface MessageObjectOptionsInit {
|
|
442
482
|
/**
|
|
@@ -494,6 +534,9 @@ export interface EmailSendResponseJSON {
|
|
|
494
534
|
"failed_emails"?: Record<string, string>;
|
|
495
535
|
}
|
|
496
536
|
|
|
537
|
+
/** EmailSendResponse in the API format as an argument: a nested model may also be given as a model. */
|
|
538
|
+
export type EmailSendResponseInput = EmailSendResponseJSON;
|
|
539
|
+
|
|
497
540
|
/** Fields of new EmailSendResponse(): a nested model may be a plain object in the API format. */
|
|
498
541
|
export interface EmailSendResponseInit {
|
|
499
542
|
/**
|
|
@@ -572,6 +615,9 @@ export interface EmailSubscribeRequestJSON {
|
|
|
572
615
|
"to_email": string;
|
|
573
616
|
}
|
|
574
617
|
|
|
618
|
+
/** EmailSubscribeRequest in the API format as an argument: a nested model may also be given as a model. */
|
|
619
|
+
export type EmailSubscribeRequestInput = EmailSubscribeRequestJSON;
|
|
620
|
+
|
|
575
621
|
/** Fields of new EmailSubscribeRequest(): a nested model may be a plain object in the API format. */
|
|
576
622
|
export interface EmailSubscribeRequestInit {
|
|
577
623
|
/** Sender’s email on a confirmed domain. (Field alias "email_address_from" is supported, too). */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// EmailValidationApi: API methods of the EmailValidation section.
|
|
2
2
|
import type { ApiClient } from "../../client/ApiClient.js";
|
|
3
|
-
import type { EmailValidationSingleRequest,
|
|
3
|
+
import type { EmailValidationSingleRequest, EmailValidationSingleRequestInput, EmailValidationSingleResponse } from "./models.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Email validation methods. As a result of the check, you’ll get detailed information on email
|
|
@@ -22,5 +22,5 @@ export declare class EmailValidationApi {
|
|
|
22
22
|
* Documentation: https://docs.unione.io/en/web-api-ref#email-validation-single
|
|
23
23
|
* @throws {ApiError}
|
|
24
24
|
*/
|
|
25
|
-
single(request: EmailValidationSingleRequest |
|
|
25
|
+
single(request: EmailValidationSingleRequest | EmailValidationSingleRequestInput): Promise<EmailValidationSingleResponse>;
|
|
26
26
|
}
|
|
@@ -5,6 +5,9 @@ export interface EmailValidationSingleRequestJSON {
|
|
|
5
5
|
"email": string;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
/** EmailValidationSingleRequest in the API format as an argument: a nested model may also be given as a model. */
|
|
9
|
+
export type EmailValidationSingleRequestInput = EmailValidationSingleRequestJSON;
|
|
10
|
+
|
|
8
11
|
/** Fields of new EmailValidationSingleRequest(): a nested model may be a plain object in the API format. */
|
|
9
12
|
export interface EmailValidationSingleRequestInit {
|
|
10
13
|
/** Email address to be checked. */
|
|
@@ -37,6 +40,9 @@ export interface EmailValidationSingleResponseJSON {
|
|
|
37
40
|
"processed_at"?: string;
|
|
38
41
|
}
|
|
39
42
|
|
|
43
|
+
/** EmailValidationSingleResponse in the API format as an argument: a nested model may also be given as a model. */
|
|
44
|
+
export type EmailValidationSingleResponseInput = EmailValidationSingleResponseJSON;
|
|
45
|
+
|
|
40
46
|
/** Fields of new EmailValidationSingleResponse(): a nested model may be a plain object in the API format. */
|
|
41
47
|
export interface EmailValidationSingleResponseInit {
|
|
42
48
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// EventDumpApi: API methods of the EventDump section.
|
|
2
2
|
import type { ApiClient } from "../../client/ApiClient.js";
|
|
3
3
|
import type { SuccessResponse } from "../../common/models.js";
|
|
4
|
-
import type { EventDumpCreateRequest,
|
|
4
|
+
import type { EventDumpCreateRequest, EventDumpCreateRequestInput, EventDumpCreateResponse, EventDumpDeleteRequest, EventDumpDeleteRequestInput, EventDumpGetRequest, EventDumpGetRequestInput, EventDumpGetResponse, EventDumpListResponse } from "./models.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* These methods are used to obtain a list of events for a given period of time. The data is stored for
|
|
@@ -27,7 +27,7 @@ export declare class EventDumpApi {
|
|
|
27
27
|
* Documentation: https://docs.unione.io/en/web-api-ref#event-dump-create
|
|
28
28
|
* @throws {ApiError}
|
|
29
29
|
*/
|
|
30
|
-
create(request: EventDumpCreateRequest |
|
|
30
|
+
create(request: EventDumpCreateRequest | EventDumpCreateRequestInput): Promise<EventDumpCreateResponse>;
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Returns dump properties for a given identifier
|
|
@@ -35,7 +35,7 @@ export declare class EventDumpApi {
|
|
|
35
35
|
* Documentation: https://docs.unione.io/en/web-api-ref#event-dump-get
|
|
36
36
|
* @throws {ApiError}
|
|
37
37
|
*/
|
|
38
|
-
get(request: EventDumpGetRequest |
|
|
38
|
+
get(request: EventDumpGetRequest | EventDumpGetRequestInput): Promise<EventDumpGetResponse>;
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* This method does not require any parameters; returns the full list of existing dumps.
|
|
@@ -51,5 +51,5 @@ export declare class EventDumpApi {
|
|
|
51
51
|
* Documentation: https://docs.unione.io/en/web-api-ref#event-dump-delete
|
|
52
52
|
* @throws {ApiError}
|
|
53
53
|
*/
|
|
54
|
-
delete(request: EventDumpDeleteRequest |
|
|
54
|
+
delete(request: EventDumpDeleteRequest | EventDumpDeleteRequestInput): Promise<SuccessResponse>;
|
|
55
55
|
}
|
|
@@ -14,6 +14,19 @@ export interface EventDumpCreateRequestJSON {
|
|
|
14
14
|
"format"?: string;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
/** EventDumpCreateRequest in the API format as an argument: a nested model may also be given as a model. */
|
|
18
|
+
export interface EventDumpCreateRequestInput {
|
|
19
|
+
"start_time": string;
|
|
20
|
+
"end_time"?: string;
|
|
21
|
+
"limit"?: number;
|
|
22
|
+
"all_projects"?: boolean;
|
|
23
|
+
"filter"?: FilterObject | FilterObjectInput;
|
|
24
|
+
"dump_fields"?: Array<string>;
|
|
25
|
+
"aggregate"?: string;
|
|
26
|
+
"delimiter"?: string;
|
|
27
|
+
"format"?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
17
30
|
/** Fields of new EventDumpCreateRequest(): a nested model may be a plain object in the API format. */
|
|
18
31
|
export interface EventDumpCreateRequestInit {
|
|
19
32
|
/**
|
|
@@ -35,7 +48,7 @@ export interface EventDumpCreateRequestInit {
|
|
|
35
48
|
*/
|
|
36
49
|
allProjects?: boolean;
|
|
37
50
|
/** An object with the properties of the event dump filter. */
|
|
38
|
-
filter?: FilterObject |
|
|
51
|
+
filter?: FilterObject | FilterObjectInput;
|
|
39
52
|
/**
|
|
40
53
|
* An array of strings containing the names of columns you need in your report, in your preferred
|
|
41
54
|
* order. If the 'dump_fields' array is missing or empty, a default field list and order will be
|
|
@@ -124,6 +137,9 @@ export interface FilterObjectJSON {
|
|
|
124
137
|
"campaign_id"?: string;
|
|
125
138
|
}
|
|
126
139
|
|
|
140
|
+
/** FilterObject in the API format as an argument: a nested model may also be given as a model. */
|
|
141
|
+
export type FilterObjectInput = FilterObjectJSON;
|
|
142
|
+
|
|
127
143
|
/** Fields of new FilterObject(): a nested model may be a plain object in the API format. */
|
|
128
144
|
export interface FilterObjectInit {
|
|
129
145
|
/**
|
|
@@ -285,6 +301,9 @@ export interface EventDumpCreateResponseJSON {
|
|
|
285
301
|
"dump_id"?: string;
|
|
286
302
|
}
|
|
287
303
|
|
|
304
|
+
/** EventDumpCreateResponse in the API format as an argument: a nested model may also be given as a model. */
|
|
305
|
+
export type EventDumpCreateResponseInput = EventDumpCreateResponseJSON;
|
|
306
|
+
|
|
288
307
|
/** Fields of new EventDumpCreateResponse(): a nested model may be a plain object in the API format. */
|
|
289
308
|
export interface EventDumpCreateResponseInit {
|
|
290
309
|
/**
|
|
@@ -323,6 +342,9 @@ export interface EventDumpGetRequestJSON {
|
|
|
323
342
|
"dump_id": string;
|
|
324
343
|
}
|
|
325
344
|
|
|
345
|
+
/** EventDumpGetRequest in the API format as an argument: a nested model may also be given as a model. */
|
|
346
|
+
export type EventDumpGetRequestInput = EventDumpGetRequestJSON;
|
|
347
|
+
|
|
326
348
|
/** Fields of new EventDumpGetRequest(): a nested model may be a plain object in the API format. */
|
|
327
349
|
export interface EventDumpGetRequestInit {
|
|
328
350
|
/**
|
|
@@ -352,6 +374,12 @@ export interface EventDumpGetResponseJSON {
|
|
|
352
374
|
"event_dump"?: EventDumpObjectJSON;
|
|
353
375
|
}
|
|
354
376
|
|
|
377
|
+
/** EventDumpGetResponse in the API format as an argument: a nested model may also be given as a model. */
|
|
378
|
+
export interface EventDumpGetResponseInput {
|
|
379
|
+
"status"?: string;
|
|
380
|
+
"event_dump"?: EventDumpObject | EventDumpObjectInput;
|
|
381
|
+
}
|
|
382
|
+
|
|
355
383
|
/** Fields of new EventDumpGetResponse(): a nested model may be a plain object in the API format. */
|
|
356
384
|
export interface EventDumpGetResponseInit {
|
|
357
385
|
/**
|
|
@@ -360,7 +388,7 @@ export interface EventDumpGetResponseInit {
|
|
|
360
388
|
*/
|
|
361
389
|
status?: string;
|
|
362
390
|
/** An object with the properties of the event dump. */
|
|
363
|
-
eventDump?: EventDumpObject |
|
|
391
|
+
eventDump?: EventDumpObject | EventDumpObjectInput;
|
|
364
392
|
}
|
|
365
393
|
|
|
366
394
|
/** EventDumpGetResponse */
|
|
@@ -386,6 +414,13 @@ export interface EventDumpObjectJSON {
|
|
|
386
414
|
"files"?: Array<EventDumpFilesObjectJSON>;
|
|
387
415
|
}
|
|
388
416
|
|
|
417
|
+
/** EventDumpObject in the API format as an argument: a nested model may also be given as a model. */
|
|
418
|
+
export interface EventDumpObjectInput {
|
|
419
|
+
"dump_id"?: string;
|
|
420
|
+
"dump_status"?: string;
|
|
421
|
+
"files"?: Array<EventDumpFilesObject | EventDumpFilesObjectInput>;
|
|
422
|
+
}
|
|
423
|
+
|
|
389
424
|
/** Fields of new EventDumpObject(): a nested model may be a plain object in the API format. */
|
|
390
425
|
export interface EventDumpObjectInit {
|
|
391
426
|
/**
|
|
@@ -407,7 +442,7 @@ export interface EventDumpObjectInit {
|
|
|
407
442
|
* everything listed in “files” even if "dump_status" is still "in_process". If there are no events,
|
|
408
443
|
* according to the specified parameters, an empty array will be returned.
|
|
409
444
|
*/
|
|
410
|
-
files?: Array<EventDumpFilesObject |
|
|
445
|
+
files?: Array<EventDumpFilesObject | EventDumpFilesObjectInput>;
|
|
411
446
|
}
|
|
412
447
|
|
|
413
448
|
/** An object with the properties of the event dump. */
|
|
@@ -445,6 +480,9 @@ export interface EventDumpFilesObjectJSON {
|
|
|
445
480
|
"size"?: number;
|
|
446
481
|
}
|
|
447
482
|
|
|
483
|
+
/** EventDumpFilesObject in the API format as an argument: a nested model may also be given as a model. */
|
|
484
|
+
export type EventDumpFilesObjectInput = EventDumpFilesObjectJSON;
|
|
485
|
+
|
|
448
486
|
/** Fields of new EventDumpFilesObject(): a nested model may be a plain object in the API format. */
|
|
449
487
|
export interface EventDumpFilesObjectInit {
|
|
450
488
|
/**
|
|
@@ -478,6 +516,12 @@ export interface EventDumpListResponseJSON {
|
|
|
478
516
|
"event_dumps"?: Array<EventDumpObjectJSON>;
|
|
479
517
|
}
|
|
480
518
|
|
|
519
|
+
/** EventDumpListResponse in the API format as an argument: a nested model may also be given as a model. */
|
|
520
|
+
export interface EventDumpListResponseInput {
|
|
521
|
+
"status"?: string;
|
|
522
|
+
"event_dumps"?: Array<EventDumpObject | EventDumpObjectInput>;
|
|
523
|
+
}
|
|
524
|
+
|
|
481
525
|
/** Fields of new EventDumpListResponse(): a nested model may be a plain object in the API format. */
|
|
482
526
|
export interface EventDumpListResponseInit {
|
|
483
527
|
/**
|
|
@@ -489,7 +533,7 @@ export interface EventDumpListResponseInit {
|
|
|
489
533
|
* An array of objects describing event dumps. Each object is similar to 'event_dump' object returned
|
|
490
534
|
* by the [event-dump/get](https://docs.unione.io/en/web-api-ref#event-dump-get) method.
|
|
491
535
|
*/
|
|
492
|
-
eventDumps?: Array<EventDumpObject |
|
|
536
|
+
eventDumps?: Array<EventDumpObject | EventDumpObjectInput>;
|
|
493
537
|
}
|
|
494
538
|
|
|
495
539
|
/** EventDumpListResponse */
|
|
@@ -516,6 +560,9 @@ export interface EventDumpDeleteRequestJSON {
|
|
|
516
560
|
"dump_id": string;
|
|
517
561
|
}
|
|
518
562
|
|
|
563
|
+
/** EventDumpDeleteRequest in the API format as an argument: a nested model may also be given as a model. */
|
|
564
|
+
export type EventDumpDeleteRequestInput = EventDumpDeleteRequestJSON;
|
|
565
|
+
|
|
519
566
|
/** Fields of new EventDumpDeleteRequest(): a nested model may be a plain object in the API format. */
|
|
520
567
|
export interface EventDumpDeleteRequestInit {
|
|
521
568
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// ObsoleteApi: API methods of the Obsolete section.
|
|
2
2
|
import type { ApiClient } from "../../client/ApiClient.js";
|
|
3
|
-
import type { ObsoleteUnsubscribedCheckRequest,
|
|
3
|
+
import type { ObsoleteUnsubscribedCheckRequest, ObsoleteUnsubscribedCheckRequestInput, ObsoleteUnsubscribedCheckResponse, ObsoleteUnsubscribedListRequest, ObsoleteUnsubscribedListRequestInput, ObsoleteUnsubscribedListResponse, ObsoleteUnsubscribedSetRequest, ObsoleteUnsubscribedSetRequestInput, ObsoleteUnsubscribedSetResponse } from "./models.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Obsolete methods dealing with unsubscribes. We recommend using the more flexible
|
|
@@ -25,7 +25,7 @@ export declare class ObsoleteApi {
|
|
|
25
25
|
* Documentation: https://docs.unione.io/en/web-api-ref#unsubscribed-set
|
|
26
26
|
* @throws {ApiError}
|
|
27
27
|
*/
|
|
28
|
-
unsubscribedSet(request: ObsoleteUnsubscribedSetRequest |
|
|
28
|
+
unsubscribedSet(request: ObsoleteUnsubscribedSetRequest | ObsoleteUnsubscribedSetRequestInput): Promise<ObsoleteUnsubscribedSetResponse>;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Checks if an email is unsubscribed.
|
|
@@ -33,7 +33,7 @@ export declare class ObsoleteApi {
|
|
|
33
33
|
* Documentation: https://docs.unione.io/en/web-api-ref#unsubscribed-check
|
|
34
34
|
* @throws {ApiError}
|
|
35
35
|
*/
|
|
36
|
-
unsubscribedCheck(request: ObsoleteUnsubscribedCheckRequest |
|
|
36
|
+
unsubscribedCheck(request: ObsoleteUnsubscribedCheckRequest | ObsoleteUnsubscribedCheckRequestInput): Promise<ObsoleteUnsubscribedCheckResponse>;
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* Returns a list of all unsubscribed emails since provided date.
|
|
@@ -41,5 +41,5 @@ export declare class ObsoleteApi {
|
|
|
41
41
|
* Documentation: https://docs.unione.io/en/web-api-ref#unsubscribed-list
|
|
42
42
|
* @throws {ApiError}
|
|
43
43
|
*/
|
|
44
|
-
unsubscribedList(request?: ObsoleteUnsubscribedListRequest |
|
|
44
|
+
unsubscribedList(request?: ObsoleteUnsubscribedListRequest | ObsoleteUnsubscribedListRequestInput): Promise<ObsoleteUnsubscribedListResponse>;
|
|
45
45
|
}
|
|
@@ -29,6 +29,9 @@ export interface ObsoleteUnsubscribedSetRequestJSON {
|
|
|
29
29
|
"address": string;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
/** ObsoleteUnsubscribedSetRequest in the API format as an argument: a nested model may also be given as a model. */
|
|
33
|
+
export type ObsoleteUnsubscribedSetRequestInput = ObsoleteUnsubscribedSetRequestJSON;
|
|
34
|
+
|
|
32
35
|
/** Fields of new ObsoleteUnsubscribedSetRequest(): a nested model may be a plain object in the API format. */
|
|
33
36
|
export interface ObsoleteUnsubscribedSetRequestInit {
|
|
34
37
|
/** Email to be unsubscribed. */
|
|
@@ -53,6 +56,9 @@ export interface ObsoleteUnsubscribedSetResponseJSON {
|
|
|
53
56
|
"message"?: ObsoleteUnsubscribedSetMessage;
|
|
54
57
|
}
|
|
55
58
|
|
|
59
|
+
/** ObsoleteUnsubscribedSetResponse in the API format as an argument: a nested model may also be given as a model. */
|
|
60
|
+
export type ObsoleteUnsubscribedSetResponseInput = ObsoleteUnsubscribedSetResponseJSON;
|
|
61
|
+
|
|
56
62
|
/** Fields of new ObsoleteUnsubscribedSetResponse(): a nested model may be a plain object in the API format. */
|
|
57
63
|
export interface ObsoleteUnsubscribedSetResponseInit {
|
|
58
64
|
/**
|
|
@@ -103,6 +109,9 @@ export interface ObsoleteUnsubscribedCheckRequestJSON {
|
|
|
103
109
|
"address": string;
|
|
104
110
|
}
|
|
105
111
|
|
|
112
|
+
/** ObsoleteUnsubscribedCheckRequest in the API format as an argument: a nested model may also be given as a model. */
|
|
113
|
+
export type ObsoleteUnsubscribedCheckRequestInput = ObsoleteUnsubscribedCheckRequestJSON;
|
|
114
|
+
|
|
106
115
|
/** Fields of new ObsoleteUnsubscribedCheckRequest(): a nested model may be a plain object in the API format. */
|
|
107
116
|
export interface ObsoleteUnsubscribedCheckRequestInit {
|
|
108
117
|
/** Email to check. */
|
|
@@ -127,6 +136,9 @@ export interface ObsoleteUnsubscribedCheckResponseJSON {
|
|
|
127
136
|
"is_unsubscribed"?: boolean;
|
|
128
137
|
}
|
|
129
138
|
|
|
139
|
+
/** ObsoleteUnsubscribedCheckResponse in the API format as an argument: a nested model may also be given as a model. */
|
|
140
|
+
export type ObsoleteUnsubscribedCheckResponseInput = ObsoleteUnsubscribedCheckResponseJSON;
|
|
141
|
+
|
|
130
142
|
/** Fields of new ObsoleteUnsubscribedCheckResponse(): a nested model may be a plain object in the API format. */
|
|
131
143
|
export interface ObsoleteUnsubscribedCheckResponseInit {
|
|
132
144
|
/**
|
|
@@ -163,6 +175,9 @@ export interface ObsoleteUnsubscribedListRequestJSON {
|
|
|
163
175
|
"date_from"?: string;
|
|
164
176
|
}
|
|
165
177
|
|
|
178
|
+
/** ObsoleteUnsubscribedListRequest in the API format as an argument: a nested model may also be given as a model. */
|
|
179
|
+
export type ObsoleteUnsubscribedListRequestInput = ObsoleteUnsubscribedListRequestJSON;
|
|
180
|
+
|
|
166
181
|
/** Fields of new ObsoleteUnsubscribedListRequest(): a nested model may be a plain object in the API format. */
|
|
167
182
|
export interface ObsoleteUnsubscribedListRequestInit {
|
|
168
183
|
/**
|
|
@@ -192,6 +207,12 @@ export interface ObsoleteUnsubscribedListResponseJSON {
|
|
|
192
207
|
"unsubscribed"?: Array<ObsoleteUnsubscribedListResponseUnsubscribedItemJSON>;
|
|
193
208
|
}
|
|
194
209
|
|
|
210
|
+
/** ObsoleteUnsubscribedListResponse in the API format as an argument: a nested model may also be given as a model. */
|
|
211
|
+
export interface ObsoleteUnsubscribedListResponseInput {
|
|
212
|
+
"status"?: string;
|
|
213
|
+
"unsubscribed"?: Array<ObsoleteUnsubscribedListResponseUnsubscribedItem | ObsoleteUnsubscribedListResponseUnsubscribedItemInput>;
|
|
214
|
+
}
|
|
215
|
+
|
|
195
216
|
/** Fields of new ObsoleteUnsubscribedListResponse(): a nested model may be a plain object in the API format. */
|
|
196
217
|
export interface ObsoleteUnsubscribedListResponseInit {
|
|
197
218
|
/**
|
|
@@ -200,7 +221,7 @@ export interface ObsoleteUnsubscribedListResponseInit {
|
|
|
200
221
|
*/
|
|
201
222
|
status?: string;
|
|
202
223
|
/** Array of object describing unsubscribed emails. */
|
|
203
|
-
unsubscribed?: Array<ObsoleteUnsubscribedListResponseUnsubscribedItem |
|
|
224
|
+
unsubscribed?: Array<ObsoleteUnsubscribedListResponseUnsubscribedItem | ObsoleteUnsubscribedListResponseUnsubscribedItemInput>;
|
|
204
225
|
}
|
|
205
226
|
|
|
206
227
|
/** ObsoleteUnsubscribedListResponse */
|
|
@@ -225,6 +246,9 @@ export interface ObsoleteUnsubscribedListResponseUnsubscribedItemJSON {
|
|
|
225
246
|
"unsubscribed_on"?: string;
|
|
226
247
|
}
|
|
227
248
|
|
|
249
|
+
/** ObsoleteUnsubscribedListResponseUnsubscribedItem in the API format as an argument: a nested model may also be given as a model. */
|
|
250
|
+
export type ObsoleteUnsubscribedListResponseUnsubscribedItemInput = ObsoleteUnsubscribedListResponseUnsubscribedItemJSON;
|
|
251
|
+
|
|
228
252
|
/** Fields of new ObsoleteUnsubscribedListResponseUnsubscribedItem(): a nested model may be a plain object in the API format. */
|
|
229
253
|
export interface ObsoleteUnsubscribedListResponseUnsubscribedItemInit {
|
|
230
254
|
/** Unsubscribed email. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// ProjectApi: API methods of the Project section.
|
|
2
2
|
import type { ApiClient } from "../../client/ApiClient.js";
|
|
3
3
|
import type { SuccessResponse } from "../../common/models.js";
|
|
4
|
-
import type { ProjectCreateRequest,
|
|
4
|
+
import type { ProjectCreateRequest, ProjectCreateRequestInput, ProjectCreateResponse, ProjectDeleteRequest, ProjectDeleteRequestInput, ProjectListRequest, ProjectListRequestInput, ProjectListResponse, ProjectUpdateRequest, ProjectUpdateRequestInput, ProjectUpdateResponse } from "./models.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Projects allow you to group several independent domains, webhooks, templates, and unsubscription
|
|
@@ -27,7 +27,7 @@ export declare class ProjectApi {
|
|
|
27
27
|
* Documentation: https://docs.unione.io/en/web-api-ref#project-create
|
|
28
28
|
* @throws {ApiError}
|
|
29
29
|
*/
|
|
30
|
-
create(request: ProjectCreateRequest |
|
|
30
|
+
create(request: ProjectCreateRequest | ProjectCreateRequestInput): Promise<ProjectCreateResponse>;
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Updates a project.
|
|
@@ -35,7 +35,7 @@ export declare class ProjectApi {
|
|
|
35
35
|
* Documentation: https://docs.unione.io/en/web-api-ref#project-update
|
|
36
36
|
* @throws {ApiError}
|
|
37
37
|
*/
|
|
38
|
-
update(request: ProjectUpdateRequest |
|
|
38
|
+
update(request: ProjectUpdateRequest | ProjectUpdateRequestInput): Promise<ProjectUpdateResponse>;
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* Lists projects.
|
|
@@ -43,7 +43,7 @@ export declare class ProjectApi {
|
|
|
43
43
|
* Documentation: https://docs.unione.io/en/web-api-ref#project-list
|
|
44
44
|
* @throws {ApiError}
|
|
45
45
|
*/
|
|
46
|
-
list(request?: ProjectListRequest |
|
|
46
|
+
list(request?: ProjectListRequest | ProjectListRequestInput): Promise<ProjectListResponse>;
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* Deletes a project.
|
|
@@ -54,5 +54,5 @@ export declare class ProjectApi {
|
|
|
54
54
|
* Documentation: https://docs.unione.io/en/web-api-ref#project-delete
|
|
55
55
|
* @throws {ApiError}
|
|
56
56
|
*/
|
|
57
|
-
delete(request?: ProjectDeleteRequest |
|
|
57
|
+
delete(request?: ProjectDeleteRequest | ProjectDeleteRequestInput): Promise<SuccessResponse>;
|
|
58
58
|
}
|
|
@@ -6,10 +6,15 @@ export interface ProjectCreateRequestJSON {
|
|
|
6
6
|
"project": ProjectObjectJSON;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
/** ProjectCreateRequest in the API format as an argument: a nested model may also be given as a model. */
|
|
10
|
+
export interface ProjectCreateRequestInput {
|
|
11
|
+
"project": ProjectObject | ProjectObjectInput;
|
|
12
|
+
}
|
|
13
|
+
|
|
9
14
|
/** Fields of new ProjectCreateRequest(): a nested model may be a plain object in the API format. */
|
|
10
15
|
export interface ProjectCreateRequestInit {
|
|
11
16
|
/** Object with project properties. */
|
|
12
|
-
project: ProjectObject |
|
|
17
|
+
project: ProjectObject | ProjectObjectInput;
|
|
13
18
|
}
|
|
14
19
|
|
|
15
20
|
/** ProjectCreateRequest */
|
|
@@ -33,6 +38,9 @@ export interface ProjectObjectJSON {
|
|
|
33
38
|
"unsubscribe_page_id"?: number;
|
|
34
39
|
}
|
|
35
40
|
|
|
41
|
+
/** ProjectObject in the API format as an argument: a nested model may also be given as a model. */
|
|
42
|
+
export type ProjectObjectInput = ProjectObjectJSON;
|
|
43
|
+
|
|
36
44
|
/** Fields of new ProjectObject(): a nested model may be a plain object in the API format. */
|
|
37
45
|
export interface ProjectObjectInit {
|
|
38
46
|
/** Project name, unique for user account. */
|
|
@@ -121,6 +129,9 @@ export interface ProjectCreateResponseJSON {
|
|
|
121
129
|
"project_api_key"?: string;
|
|
122
130
|
}
|
|
123
131
|
|
|
132
|
+
/** ProjectCreateResponse in the API format as an argument: a nested model may also be given as a model. */
|
|
133
|
+
export type ProjectCreateResponseInput = ProjectCreateResponseJSON;
|
|
134
|
+
|
|
124
135
|
/** Fields of new ProjectCreateResponse(): a nested model may be a plain object in the API format. */
|
|
125
136
|
export interface ProjectCreateResponseInit {
|
|
126
137
|
/**
|
|
@@ -165,6 +176,13 @@ export interface ProjectUpdateRequestJSON {
|
|
|
165
176
|
"project": ProjectUpdateObjectJSON;
|
|
166
177
|
}
|
|
167
178
|
|
|
179
|
+
/** ProjectUpdateRequest in the API format as an argument: a nested model may also be given as a model. */
|
|
180
|
+
export interface ProjectUpdateRequestInput {
|
|
181
|
+
"project_id"?: string;
|
|
182
|
+
"project_api_key"?: string;
|
|
183
|
+
"project": ProjectUpdateObject | ProjectUpdateObjectInput;
|
|
184
|
+
}
|
|
185
|
+
|
|
168
186
|
/** Fields of new ProjectUpdateRequest(): a nested model may be a plain object in the API format. */
|
|
169
187
|
export interface ProjectUpdateRequestInit {
|
|
170
188
|
/**
|
|
@@ -178,7 +196,7 @@ export interface ProjectUpdateRequestInit {
|
|
|
178
196
|
*/
|
|
179
197
|
projectApiKey?: string;
|
|
180
198
|
/** Object with project properties. */
|
|
181
|
-
project: ProjectUpdateObject |
|
|
199
|
+
project: ProjectUpdateObject | ProjectUpdateObjectInput;
|
|
182
200
|
}
|
|
183
201
|
|
|
184
202
|
/** ProjectUpdateRequest */
|
|
@@ -215,6 +233,9 @@ export interface ProjectUpdateObjectJSON {
|
|
|
215
233
|
"email_counter_mode"?: EmailCounterMode;
|
|
216
234
|
}
|
|
217
235
|
|
|
236
|
+
/** ProjectUpdateObject in the API format as an argument: a nested model may also be given as a model. */
|
|
237
|
+
export type ProjectUpdateObjectInput = ProjectUpdateObjectJSON;
|
|
238
|
+
|
|
218
239
|
/** Fields of new ProjectUpdateObject(): a nested model may be a plain object in the API format. */
|
|
219
240
|
export interface ProjectUpdateObjectInit {
|
|
220
241
|
/** Project name, unique for user account. */
|
|
@@ -350,6 +371,9 @@ export interface ProjectUpdateResponseJSON {
|
|
|
350
371
|
"project_api_key"?: string;
|
|
351
372
|
}
|
|
352
373
|
|
|
374
|
+
/** ProjectUpdateResponse in the API format as an argument: a nested model may also be given as a model. */
|
|
375
|
+
export type ProjectUpdateResponseInput = ProjectUpdateResponseJSON;
|
|
376
|
+
|
|
353
377
|
/** Fields of new ProjectUpdateResponse(): a nested model may be a plain object in the API format. */
|
|
354
378
|
export interface ProjectUpdateResponseInit {
|
|
355
379
|
/**
|
|
@@ -389,6 +413,9 @@ export interface ProjectListRequestJSON {
|
|
|
389
413
|
"project_api_key"?: string;
|
|
390
414
|
}
|
|
391
415
|
|
|
416
|
+
/** ProjectListRequest in the API format as an argument: a nested model may also be given as a model. */
|
|
417
|
+
export type ProjectListRequestInput = ProjectListRequestJSON;
|
|
418
|
+
|
|
392
419
|
/** Fields of new ProjectListRequest(): a nested model may be a plain object in the API format. */
|
|
393
420
|
export interface ProjectListRequestInit {
|
|
394
421
|
/** Optional possibility to specify project_id to include only this project to list. */
|
|
@@ -416,6 +443,12 @@ export interface ProjectListResponseJSON {
|
|
|
416
443
|
"projects"?: Array<ProjectListObjectJSON>;
|
|
417
444
|
}
|
|
418
445
|
|
|
446
|
+
/** ProjectListResponse in the API format as an argument: a nested model may also be given as a model. */
|
|
447
|
+
export interface ProjectListResponseInput {
|
|
448
|
+
"status"?: string;
|
|
449
|
+
"projects"?: Array<ProjectListObject | ProjectListObjectInput>;
|
|
450
|
+
}
|
|
451
|
+
|
|
419
452
|
/** Fields of new ProjectListResponse(): a nested model may be a plain object in the API format. */
|
|
420
453
|
export interface ProjectListResponseInit {
|
|
421
454
|
/**
|
|
@@ -424,7 +457,7 @@ export interface ProjectListResponseInit {
|
|
|
424
457
|
*/
|
|
425
458
|
status?: string;
|
|
426
459
|
/** Array of objects where each object represents one project. */
|
|
427
|
-
projects?: Array<ProjectListObject |
|
|
460
|
+
projects?: Array<ProjectListObject | ProjectListObjectInput>;
|
|
428
461
|
}
|
|
429
462
|
|
|
430
463
|
/** ProjectListResponse */
|
|
@@ -459,6 +492,9 @@ export interface ProjectListObjectJSON {
|
|
|
459
492
|
"unsubscribe_page_id"?: number;
|
|
460
493
|
}
|
|
461
494
|
|
|
495
|
+
/** ProjectListObject in the API format as an argument: a nested model may also be given as a model. */
|
|
496
|
+
export type ProjectListObjectInput = ProjectListObjectJSON;
|
|
497
|
+
|
|
462
498
|
/** Fields of new ProjectListObject(): a nested model may be a plain object in the API format. */
|
|
463
499
|
export interface ProjectListObjectInit {
|
|
464
500
|
/** Unqiue project identifier, ASCII string up to 36 characters long. */
|
|
@@ -590,6 +626,9 @@ export interface ProjectDeleteRequestJSON {
|
|
|
590
626
|
"project_api_key"?: string;
|
|
591
627
|
}
|
|
592
628
|
|
|
629
|
+
/** ProjectDeleteRequest in the API format as an argument: a nested model may also be given as a model. */
|
|
630
|
+
export type ProjectDeleteRequestInput = ProjectDeleteRequestJSON;
|
|
631
|
+
|
|
593
632
|
/** Fields of new ProjectDeleteRequest(): a nested model may be a plain object in the API format. */
|
|
594
633
|
export interface ProjectDeleteRequestInit {
|
|
595
634
|
/**
|