mailgun.js 4.2.2 → 5.0.1

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/mailgun.js.d.ts +1572 -0
  3. package/dist/mailgun.node.js +2 -2
  4. package/dist/mailgun.node.js.LICENSE.txt +1 -1
  5. package/dist/mailgun.web.js +2 -2
  6. package/dist/mailgun.web.js.LICENSE.txt +1 -1
  7. package/dts-bundle.js +8 -0
  8. package/examples/addresses.js +1 -1
  9. package/examples/list-domains.js +1 -1
  10. package/lib/domains.ts +1 -1
  11. package/lib/events.ts +4 -4
  12. package/{index.ts → lib/index.ts} +3 -3
  13. package/lib/interfaces/Supressions.ts +61 -0
  14. package/lib/interfaces/Webhooks.ts +10 -0
  15. package/lib/stats.ts +3 -3
  16. package/lib/suppressions.ts +39 -18
  17. package/lib/webhooks.ts +7 -4
  18. package/package.json +11 -6
  19. package/tsconfig.json +2 -2
  20. package/webpack/webpack.common.config.js +2 -2
  21. package/dist/index.d.ts +0 -9
  22. package/dist/lib/client.d.ts +0 -28
  23. package/dist/lib/domains.d.ts +0 -53
  24. package/dist/lib/domainsCredentials.d.ts +0 -14
  25. package/dist/lib/domainsTags.d.ts +0 -34
  26. package/dist/lib/domainsTemplates.d.ts +0 -35
  27. package/dist/lib/error.d.ts +0 -7
  28. package/dist/lib/events.d.ts +0 -13
  29. package/dist/lib/interfaces/APIErrorOptions.d.ts +0 -11
  30. package/dist/lib/interfaces/ApiResponse.d.ts +0 -5
  31. package/dist/lib/interfaces/DomainCredentials.d.ts +0 -52
  32. package/dist/lib/interfaces/DomainTags.d.ts +0 -228
  33. package/dist/lib/interfaces/DomainTemplates.d.ts +0 -194
  34. package/dist/lib/interfaces/DomainTracking.d.ts +0 -48
  35. package/dist/lib/interfaces/Domains.d.ts +0 -121
  36. package/dist/lib/interfaces/Events.d.ts +0 -88
  37. package/dist/lib/interfaces/IFormData.d.ts +0 -7
  38. package/dist/lib/interfaces/IpPools.d.ts +0 -19
  39. package/dist/lib/interfaces/Ips.d.ts +0 -10
  40. package/dist/lib/interfaces/MultipleValidation.d.ts +0 -55
  41. package/dist/lib/interfaces/Options.d.ts +0 -8
  42. package/dist/lib/interfaces/RequestOptions.d.ts +0 -6
  43. package/dist/lib/interfaces/StatsOptions.d.ts +0 -21
  44. package/dist/lib/interfaces/Supressions.d.ts +0 -21
  45. package/dist/lib/interfaces/Validate.d.ts +0 -12
  46. package/dist/lib/interfaces/Webhooks.d.ts +0 -25
  47. package/dist/lib/interfaces/lists.d.ts +0 -25
  48. package/dist/lib/interfaces/mailListMembers.d.ts +0 -52
  49. package/dist/lib/interfaces/routes.d.ts +0 -25
  50. package/dist/lib/ip-pools.d.ts +0 -21
  51. package/dist/lib/ips.d.ts +0 -9
  52. package/dist/lib/lists.d.ts +0 -14
  53. package/dist/lib/mailListMembers.d.ts +0 -14
  54. package/dist/lib/messages.d.ts +0 -9
  55. package/dist/lib/multipleValidation.d.ts +0 -10
  56. package/dist/lib/parse.d.ts +0 -0
  57. package/dist/lib/request.d.ts +0 -31
  58. package/dist/lib/routes.d.ts +0 -11
  59. package/dist/lib/stats.d.ts +0 -20
  60. package/dist/lib/suppressions.d.ts +0 -67
  61. package/dist/lib/validate.d.ts +0 -9
  62. package/dist/lib/webhooks.d.ts +0 -32
@@ -1,88 +0,0 @@
1
- export interface EventsPage {
2
- id: string;
3
- number: string;
4
- url: string;
5
- }
6
- export interface PagesList {
7
- previous: string;
8
- first: string;
9
- last: string;
10
- next: string;
11
- }
12
- export interface EventsResponse {
13
- body: {
14
- items: [];
15
- paging: PagesList;
16
- };
17
- }
18
- export interface DomainEvent {
19
- severity: string;
20
- tags: string[];
21
- storage: {
22
- url: string;
23
- key: string;
24
- };
25
- 'delivery-status': {
26
- tls: boolean;
27
- 'mx-host': string;
28
- code: number;
29
- description: string;
30
- 'session-seconds': number;
31
- utf8: boolean;
32
- 'attempt-no': number;
33
- message: string;
34
- 'certificate-verified': boolean;
35
- };
36
- 'recipient-domain': string;
37
- id: string;
38
- campaigns: [];
39
- reason: string;
40
- 'user-variables': {
41
- [key: string]: any;
42
- };
43
- flags: {
44
- 'is-routed': boolean;
45
- 'is-authenticated': boolean;
46
- 'is-system-test': boolean;
47
- 'is-test-mode': boolean;
48
- };
49
- 'log-level': string;
50
- template?: any;
51
- timestamp: number;
52
- envelope: {
53
- transport: string;
54
- sender: string;
55
- 'sending-ip': string;
56
- targets: string;
57
- };
58
- message: {
59
- headers: {
60
- to: string;
61
- 'message-id': string;
62
- from: string;
63
- subject: string;
64
- };
65
- attachments: [];
66
- size: 308;
67
- };
68
- recipient: string;
69
- event: string;
70
- }
71
- export interface ParsedPage {
72
- id: string;
73
- number: string;
74
- url: string;
75
- }
76
- export interface ParsedPagesList {
77
- previous: ParsedPage;
78
- first: ParsedPage;
79
- last: ParsedPage;
80
- next: ParsedPage;
81
- }
82
- export interface EventsList {
83
- items: DomainEvent[];
84
- pages: ParsedPagesList;
85
- }
86
- export interface PagesListAccumulator {
87
- [index: string]: EventsPage;
88
- }
@@ -1,7 +0,0 @@
1
- import NodeFormData from 'form-data';
2
- export interface IFormDataOptions {
3
- [key: string]: any;
4
- }
5
- export interface InputFormData {
6
- new (options?: HTMLFormElement | IFormDataOptions): NodeFormData | FormData;
7
- }
@@ -1,19 +0,0 @@
1
- export interface IpPool {
2
- description: string;
3
- ips: string[];
4
- is_linked: boolean;
5
- name: string;
6
- pool_id: string;
7
- }
8
- export interface IpPoolListResponse {
9
- body: {
10
- ip_pools: IpPool;
11
- message: string;
12
- };
13
- }
14
- export interface IpPoolUpdateData {
15
- name: string;
16
- description: string;
17
- add_ip: string;
18
- remove_ip: string;
19
- }
@@ -1,10 +0,0 @@
1
- export interface IpsListResponseBody {
2
- assignable_to_pools: boolean;
3
- items: string[];
4
- total_count: number;
5
- }
6
- export interface IpData {
7
- ip: string;
8
- dedicated: boolean;
9
- rdns: string;
10
- }
@@ -1,55 +0,0 @@
1
- export interface MultipleValidationJob {
2
- created_at: number;
3
- download_url: {
4
- csv: string;
5
- json: string;
6
- };
7
- id: string;
8
- quantity: number;
9
- records_processed: number;
10
- status: string;
11
- summary: {
12
- result: {
13
- catch_all: number;
14
- deliverable: number;
15
- do_not_send: number;
16
- undeliverable: number;
17
- unknown: number;
18
- };
19
- risk: {
20
- high: number;
21
- low: number;
22
- medium: number;
23
- unknown: number;
24
- };
25
- };
26
- }
27
- export interface CreatedMultipleValidationJob {
28
- id: string;
29
- message: string;
30
- }
31
- export interface PagesList {
32
- prev: string;
33
- first: string;
34
- last: string;
35
- next: string;
36
- }
37
- export interface MultipleValidationJobsListResult {
38
- jobs: MultipleValidationJob[];
39
- paging: PagesList;
40
- total: number;
41
- }
42
- export interface MultipleValidationJobsListResponse {
43
- status: 200;
44
- body: MultipleValidationJobsListResult;
45
- }
46
- export interface CanceledMultipleValidationJob {
47
- body: string;
48
- status: number;
49
- }
50
- export interface IMultipleValidationClient {
51
- list(): Promise<MultipleValidationJobsListResult>;
52
- get(listId: string): Promise<MultipleValidationJob>;
53
- create(listId: string, file: any): Promise<CreatedMultipleValidationJob>;
54
- destroy(listId: string): Promise<CanceledMultipleValidationJob>;
55
- }
@@ -1,8 +0,0 @@
1
- interface Options {
2
- username: string;
3
- key: string;
4
- url?: string;
5
- public_key?: string;
6
- timeout?: number;
7
- }
8
- export default Options;
@@ -1,6 +0,0 @@
1
- import Options from './Options';
2
- interface RequestOptions extends Options {
3
- headers: any;
4
- timeout: number;
5
- }
6
- export default RequestOptions;
@@ -1,21 +0,0 @@
1
- export interface Stat {
2
- time: string | Date;
3
- delivered: {
4
- smtp: number;
5
- http: number;
6
- total: number;
7
- };
8
- }
9
- export interface StatsOptions {
10
- start: string | Date;
11
- end: string | Date;
12
- resolution: string;
13
- stats: Stat[];
14
- }
15
- export interface StatsQuery {
16
- event: string | string[];
17
- start: string | Date;
18
- end: string | Date;
19
- resolution: 'hour' | 'day' | 'month';
20
- duration: string;
21
- }
@@ -1,21 +0,0 @@
1
- export interface BounceData {
2
- address: string;
3
- code: number;
4
- error: string;
5
- created_at: string | Date;
6
- }
7
- export interface ComplaintData {
8
- address: string;
9
- created_at: string | Date;
10
- }
11
- export interface UnsubscribeData {
12
- address: string;
13
- tags: any;
14
- created_at: string | Date;
15
- }
16
- export interface WhiteListData {
17
- type: string;
18
- value: string;
19
- reason: string;
20
- createdAt: string | Date;
21
- }
@@ -1,12 +0,0 @@
1
- export interface ValidationResult {
2
- address: string;
3
- is_disposable_address: boolean;
4
- is_role_address: boolean;
5
- reason: string[];
6
- result: string;
7
- risk: string;
8
- }
9
- export interface ValidationResponse {
10
- status: number;
11
- body: ValidationResult;
12
- }
@@ -1,25 +0,0 @@
1
- export interface APIWebhook {
2
- url?: string;
3
- urls?: string[];
4
- }
5
- export interface WebhookResponseBody {
6
- message: string;
7
- webhook: APIWebhook;
8
- }
9
- export interface WebhookResponse {
10
- status: number;
11
- body: WebhookResponseBody;
12
- }
13
- export interface WebhookList {
14
- [id: string]: {
15
- urls: string[];
16
- };
17
- }
18
- export interface WebhooksQuery {
19
- limit?: number;
20
- skip?: number;
21
- }
22
- export interface ValidationResponse {
23
- code: number;
24
- message: string;
25
- }
@@ -1,25 +0,0 @@
1
- export interface ListsQuery {
2
- address?: string;
3
- limit?: number;
4
- skip?: number;
5
- }
6
- export interface CreateUpdateList {
7
- address: string;
8
- name?: string;
9
- description?: string;
10
- access_level?: 'readonly' | 'members' | 'everyone';
11
- reply_preference?: 'list' | 'sender';
12
- }
13
- export interface DestroyedList {
14
- address: string;
15
- message: string;
16
- }
17
- export interface MailingList {
18
- access_level: string;
19
- address: string;
20
- created_at: string;
21
- description: string;
22
- members_count: number;
23
- name: string;
24
- reply_preference: null | string;
25
- }
@@ -1,52 +0,0 @@
1
- import { MailingList } from './lists';
2
- export interface MailListMember {
3
- address: string;
4
- name: string;
5
- subscribed: boolean;
6
- vars: string | any;
7
- }
8
- export interface MailListMembersQuery {
9
- subscribed?: 'yes' | 'no';
10
- limit?: number;
11
- }
12
- export interface MultipleMembersData {
13
- members: Array<MailListMember>;
14
- upsert: 'yes' | 'no';
15
- }
16
- export interface MultipleMembersReqData {
17
- members: string;
18
- upsert: 'yes' | 'no';
19
- }
20
- export interface CreateUpdateMailListMembers {
21
- address: string;
22
- name?: string;
23
- vars?: string;
24
- subscribed?: 'yes' | 'no' | boolean;
25
- upsert?: 'yes' | 'no';
26
- }
27
- export interface CreateUpdateMailListMembersReq {
28
- address: string;
29
- name?: string;
30
- vars?: string;
31
- subscribed?: 'yes' | 'no' | boolean;
32
- upsert?: 'yes' | 'no';
33
- }
34
- export interface DeletedMember {
35
- member: {
36
- address: string;
37
- };
38
- message: string;
39
- }
40
- export interface NewMultipleMembersResponse {
41
- list: MailingList;
42
- message: string;
43
- 'task-id': string;
44
- }
45
- export interface IMailListsMembers {
46
- listMembers(mailListAddress: string, query?: MailListMembersQuery): Promise<MailListMember[]>;
47
- getMember(address: string, memberAddress: string): Promise<MailListMember>;
48
- createMember(mailListAddress: string, data: CreateUpdateMailListMembers): Promise<MailListMember>;
49
- createMembers(mailListAddress: string, data: MultipleMembersData): Promise<NewMultipleMembersResponse>;
50
- updateMember(address: string, memberAddress: string, data: CreateUpdateMailListMembers): Promise<MailListMember>;
51
- destroyMember(address: string, memberAddress: string): Promise<DeletedMember>;
52
- }
@@ -1,25 +0,0 @@
1
- export interface Route {
2
- actions: string[];
3
- created_at: string;
4
- description: string;
5
- expression: string;
6
- id: string;
7
- priority: number;
8
- }
9
- export interface UpdateRouteResponse extends Route {
10
- message: string;
11
- }
12
- export interface DestroyRouteResponse {
13
- id: string;
14
- message: string;
15
- }
16
- export interface CreateUpdateRouteData {
17
- priority?: number;
18
- description?: string;
19
- expression: string;
20
- action: string[];
21
- }
22
- export interface RoutesListQuery {
23
- limit?: number;
24
- skip?: number;
25
- }
@@ -1,21 +0,0 @@
1
- import Request from './request';
2
- import { IpPool, IpPoolUpdateData } from './interfaces/IpPools';
3
- export default class IpPoolsClient {
4
- request: Request;
5
- constructor(request: Request);
6
- list(query: any): Promise<IpPool[]>;
7
- create(data: {
8
- name: string;
9
- description?: string;
10
- ips?: string[];
11
- }): Promise<{
12
- message: string;
13
- pool_id: string;
14
- }>;
15
- update(poolId: string, data: IpPoolUpdateData): Promise<any>;
16
- delete(poolId: string, data: {
17
- id: string;
18
- pool_id: string;
19
- }): Promise<any>;
20
- private parseIpPoolsResponse;
21
- }
package/dist/lib/ips.d.ts DELETED
@@ -1,9 +0,0 @@
1
- import MgRequest from './request';
2
- import { IpData, IpsListResponseBody } from './interfaces/Ips';
3
- export default class IpsClient {
4
- request: MgRequest;
5
- constructor(request: MgRequest);
6
- list(query: any): Promise<IpsListResponseBody | IpData>;
7
- get(ip: string): Promise<IpsListResponseBody | IpData>;
8
- private parseIpsResponse;
9
- }
@@ -1,14 +0,0 @@
1
- import Request from './request';
2
- import { ListsQuery, CreateUpdateList, DestroyedList, MailingList } from './interfaces/lists';
3
- import { IMailListsMembers } from './interfaces/mailListMembers';
4
- export default class ListsClient {
5
- baseRoute: string;
6
- request: Request;
7
- members: IMailListsMembers;
8
- constructor(request: Request, members: IMailListsMembers);
9
- list(query?: ListsQuery): Promise<MailingList[]>;
10
- get(mailListAddress: string): Promise<MailingList>;
11
- create(data: CreateUpdateList): Promise<MailingList>;
12
- update(mailListAddress: string, data: CreateUpdateList): Promise<MailingList>;
13
- destroy(mailListAddress: string): Promise<DestroyedList>;
14
- }
@@ -1,14 +0,0 @@
1
- import Request from './request';
2
- import { MailListMembersQuery, IMailListsMembers, CreateUpdateMailListMembers, MailListMember, MultipleMembersData, DeletedMember, NewMultipleMembersResponse } from './interfaces/mailListMembers';
3
- export default class MailListsMembers implements IMailListsMembers {
4
- baseRoute: string;
5
- request: Request;
6
- constructor(request: Request);
7
- private checkAndUpdateData;
8
- listMembers(mailListAddress: string, query?: MailListMembersQuery): Promise<MailListMember[]>;
9
- getMember(mailListAddress: string, mailListMemberAddress: string): Promise<MailListMember>;
10
- createMember(mailListAddress: string, data: CreateUpdateMailListMembers): Promise<MailListMember>;
11
- createMembers(mailListAddress: string, data: MultipleMembersData): Promise<NewMultipleMembersResponse>;
12
- updateMember(mailListAddress: string, mailListMemberAddress: string, data: CreateUpdateMailListMembers): Promise<MailListMember>;
13
- destroyMember(mailListAddress: string, mailListMemberAddress: string): Promise<DeletedMember>;
14
- }
@@ -1,9 +0,0 @@
1
- import Request from './request';
2
- export default class MessagesClient {
3
- request: Request;
4
- constructor(request: Request);
5
- _parseResponse(response: {
6
- body: any;
7
- }): any;
8
- create(domain: string, data: any): Promise<any>;
9
- }
@@ -1,10 +0,0 @@
1
- import { CanceledMultipleValidationJob, CreatedMultipleValidationJob, IMultipleValidationClient, MultipleValidationJob, MultipleValidationJobsListResult } from './interfaces/MultipleValidation';
2
- import Request from './request';
3
- export default class MultipleValidationClient implements IMultipleValidationClient {
4
- request: Request;
5
- constructor(request: Request);
6
- list(): Promise<MultipleValidationJobsListResult>;
7
- get(listId: string): Promise<MultipleValidationJob>;
8
- create(listId: string, file: any): Promise<CreatedMultipleValidationJob>;
9
- destroy(listId: string): Promise<CanceledMultipleValidationJob>;
10
- }
File without changes
@@ -1,31 +0,0 @@
1
- import NodeFormData from 'form-data';
2
- import RequestOptions from './interfaces/RequestOptions';
3
- import { InputFormData } from './interfaces/IFormData';
4
- import APIResponse from './interfaces/ApiResponse';
5
- declare class Request {
6
- private username;
7
- private key;
8
- private url;
9
- private timeout;
10
- private headers;
11
- private FormDataConstructor;
12
- constructor(options: RequestOptions, formData: InputFormData);
13
- request(method: string, url: string, inputOptions?: any): Promise<APIResponse>;
14
- query(method: string, url: string, query: any, options?: any): Promise<APIResponse>;
15
- command(method: string, url: string, data: any, options?: any): Promise<APIResponse>;
16
- get(url: string, query?: any, options?: any): Promise<APIResponse>;
17
- head(url: string, query: any, options: any): Promise<APIResponse>;
18
- options(url: string, query: any, options: any): Promise<APIResponse>;
19
- post(url: string, data: any, options?: any): Promise<APIResponse>;
20
- postWithFD(url: string, data: any): Promise<APIResponse>;
21
- putWithFD(url: string, data: any): Promise<APIResponse>;
22
- patchWithFD(url: string, data: any): Promise<APIResponse>;
23
- createFormData(data: any): NodeFormData | FormData;
24
- private addMimeDataToFD;
25
- private addFilesToFD;
26
- private addCommonPropertyToFD;
27
- put(url: string, data: any, options?: any): Promise<APIResponse>;
28
- patch(url: string, data: any, options?: any): Promise<APIResponse>;
29
- delete(url: string, data?: any, options?: any): Promise<APIResponse>;
30
- }
31
- export default Request;
@@ -1,11 +0,0 @@
1
- import { CreateUpdateRouteData, DestroyRouteResponse, Route, RoutesListQuery, UpdateRouteResponse } from './interfaces/routes';
2
- import Request from './request';
3
- export default class RoutesClient {
4
- request: Request;
5
- constructor(request: Request);
6
- list(query: RoutesListQuery): Promise<Route[]>;
7
- get(id: string): Promise<Route>;
8
- create(data: CreateUpdateRouteData): Promise<Route>;
9
- update(id: string, data: CreateUpdateRouteData): Promise<UpdateRouteResponse>;
10
- destroy(id: string): Promise<DestroyRouteResponse>;
11
- }
@@ -1,20 +0,0 @@
1
- import Request from './request';
2
- import { StatsQuery, StatsOptions, Stat } from './interfaces/StatsOptions';
3
- declare class Stats {
4
- start: Date;
5
- end: Date;
6
- resolution: string;
7
- stats: Stat[];
8
- constructor(data: StatsOptions);
9
- }
10
- export default class StatsClient {
11
- request: Request;
12
- constructor(request: Request);
13
- private prepareSearchParams;
14
- _parseStats(response: {
15
- body: StatsOptions;
16
- }): Stats;
17
- getDomain(domain: string, query?: StatsQuery): Promise<Stats>;
18
- getAccount(query?: StatsQuery): Promise<Stats>;
19
- }
20
- export {};
@@ -1,67 +0,0 @@
1
- import Request from './request';
2
- import { BounceData, ComplaintData, UnsubscribeData, WhiteListData } from './interfaces/Supressions';
3
- declare class Bounce {
4
- type: string;
5
- address: string;
6
- code: number;
7
- error: string;
8
- created_at: Date;
9
- constructor(data: BounceData);
10
- }
11
- declare class Complaint {
12
- type: string;
13
- address: any;
14
- created_at: Date;
15
- constructor(data: ComplaintData);
16
- }
17
- declare class Unsubscribe {
18
- type: string;
19
- address: string;
20
- tags: any;
21
- created_at: Date;
22
- constructor(data: UnsubscribeData);
23
- }
24
- declare class WhiteList {
25
- type: string;
26
- value: string;
27
- reason: string;
28
- createdAt: Date;
29
- constructor(data: WhiteListData);
30
- }
31
- declare type TModel = typeof Bounce | typeof Complaint | typeof Unsubscribe | typeof WhiteList;
32
- export default class SuppressionClient {
33
- request: any;
34
- models: {
35
- bounces: typeof Bounce;
36
- complaints: typeof Complaint;
37
- unsubscribes: typeof Unsubscribe;
38
- whitelists: typeof WhiteList;
39
- };
40
- constructor(request: Request);
41
- _parsePage(id: string, pageUrl: string): {
42
- id: string;
43
- page: string | string[];
44
- address: string | string[];
45
- url: string;
46
- };
47
- _parsePageLinks(response: {
48
- body: {
49
- paging: any;
50
- };
51
- }): any;
52
- _parseList(response: {
53
- body: {
54
- items: any;
55
- paging: any;
56
- };
57
- }, Model: TModel): any;
58
- _parseItem(response: {
59
- body: any;
60
- }, Model: TModel): Bounce | Complaint | Unsubscribe | WhiteList;
61
- private createWhiteList;
62
- list(domain: string, type: string, query: any): any;
63
- get(domain: string, type: string, address: string): any;
64
- create(domain: string, type: string, data: any): any;
65
- destroy(domain: string, type: string, address: string): any;
66
- }
67
- export {};
@@ -1,9 +0,0 @@
1
- import { IMultipleValidationClient } from './interfaces/MultipleValidation';
2
- import { ValidationResult } from './interfaces/Validate';
3
- import Request from './request';
4
- export default class ValidateClient {
5
- multipleValidation: IMultipleValidationClient;
6
- request: Request;
7
- constructor(request: Request, multipleValidationClient: IMultipleValidationClient);
8
- get(address: string): Promise<ValidationResult>;
9
- }
@@ -1,32 +0,0 @@
1
- import { ValidationResponse, WebhookList, WebhookResponse, WebhooksQuery } from './interfaces/Webhooks';
2
- import Request from './request';
3
- declare class Webhook {
4
- id: string;
5
- url: string;
6
- constructor(id: string, url: string);
7
- }
8
- export default class WebhookClient {
9
- request: Request;
10
- constructor(request: Request);
11
- _parseWebhookList(response: {
12
- body: {
13
- webhooks: WebhookList;
14
- };
15
- }): WebhookList;
16
- _parseWebhookWithID(id: string): (response: WebhookResponse) => Webhook;
17
- _parseWebhookTest(response: {
18
- body: {
19
- code: number;
20
- message: string;
21
- };
22
- }): {
23
- code: number;
24
- message: string;
25
- };
26
- list(domain: string, query: WebhooksQuery): Promise<WebhookList>;
27
- get(domain: string, id: string): Promise<Webhook>;
28
- create(domain: string, id: string, url: string, test?: boolean): Promise<Webhook | ValidationResponse>;
29
- update(domain: string, id: string, url: string): Promise<Webhook>;
30
- destroy(domain: string, id: string): Promise<Webhook>;
31
- }
32
- export {};