-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathcreate_types.sql
106 lines (93 loc) · 2.94 KB
/
create_types.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
prompt create_types.sql
-- types used by mailgun v0.6
create type t_mailgun_recipient is object
( send_by varchar2(3)
, email_spec varchar2(1000)
, email varchar2(512)
, name varchar2(200)
, first_name varchar2(200)
, last_name varchar2(200)
, id varchar2(200)
);
/
create type t_mailgun_attachment is object
( file_name varchar2(512)
, blob_content blob
, clob_content clob
, header varchar2(4000)
);
/
create type t_mailgun_recipient_arr is table of t_mailgun_recipient;
/
create type t_mailgun_attachment_arr is table of t_mailgun_attachment;
/
create type t_mailgun_email is object
( requested_ts timestamp
, from_name varchar2(4000)
, from_email varchar2(4000)
, reply_to varchar2(4000)
, to_name varchar2(4000)
, to_email varchar2(4000)
, cc varchar2(4000)
, bcc varchar2(4000)
, subject varchar2(4000)
, message clob
, tag varchar2(4000)
, mail_headers varchar2(4000)
, recipient t_mailgun_recipient_arr
, attachment t_mailgun_attachment_arr
);
/
create type t_mailgun_stat is object
( stat_datetime date
, resolution varchar2(10) --"hour" / "day" / "month"
, stat_name varchar2(100) --e.g. "accepted", "delivered", "failed-permanent"
, stat_detail varchar2(100) --e.g. "suppress-bounce", "espblock", "total"
, val number
);
/
create type t_mailgun_stat_arr is table of t_mailgun_stat;
/
create type t_mailgun_event is object
( event varchar2(100)
, event_ts date
, event_id varchar2(200)
, message_id varchar2(200)
, sender varchar2(4000)
, recipient varchar2(4000)
, subject varchar2(4000)
, attachments varchar2(4000)
, size_bytes number
, method varchar2(100)
, tags varchar2(4000)
, user_variables varchar2(4000)
, log_level varchar2(100)
, failed_severity varchar2(100)
, failed_reason varchar2(100)
, delivery_status varchar2(4000)
, geolocation varchar2(4000)
, recipient_ip varchar2(100)
, client_info varchar2(4000)
, client_user_agent varchar2(4000)
);
/
create type t_mailgun_event_arr is table of t_mailgun_event;
/
create type t_mailgun_tag is object
( tag_name varchar2(4000)
, description varchar2(4000)
);
/
create type t_mailgun_tag_arr is table of t_mailgun_tag;
/
create type t_mailgun_suppression is object
( suppression_type varchar2(100) -- bounce, unsubscribe, or complaint
, email_address varchar2(4000)
, unsubscribe_tag varchar2(4000) -- unsubscribed from a particular tag
, bounce_code varchar2(255)
, bounce_error varchar2(4000)
, created_dt date
);
/
create type t_mailgun_suppression_arr is table of t_mailgun_suppression;
/