@lowdefy/connection-sendgrid 4.0.0-alpha.1 → 4.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connections/SendGridMail/SendGridMail.js +2 -3
- package/dist/connections/SendGridMail/SendGridMailSend/SendGridMailSend.js +8 -3
- package/dist/connections/SendGridMail/SendGridMailSend/schema.js +226 -0
- package/dist/connections/SendGridMail/schema.js +140 -0
- package/dist/{connections/SendGridMail/SendGridMailSend/index.js → connections.js} +1 -10
- package/dist/types.js +20 -0
- package/package.json +13 -12
- package/dist/connections/SendGridMail/SendGridMailSchema.json +0 -113
- package/dist/connections/SendGridMail/SendGridMailSend/SendGridMailSendSchema.json +0 -200
- package/dist/index.js +0 -7
|
@@ -13,10 +13,9 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import SendGridMailSend from './SendGridMailSend/SendGridMailSend.js';
|
|
16
|
+
import schema from './schema.js';
|
|
16
17
|
export default {
|
|
17
|
-
|
|
18
|
-
schema: 'connections/SendGridMail/SendGridMailSchema.json'
|
|
19
|
-
},
|
|
18
|
+
schema,
|
|
20
19
|
requests: {
|
|
21
20
|
SendGridMailSend
|
|
22
21
|
}
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import sendgrid from '@sendgrid/mail';
|
|
16
16
|
import { type } from '@lowdefy/helpers';
|
|
17
|
-
import schema from './
|
|
17
|
+
import schema from './schema.js';
|
|
18
18
|
// https://sendgrid.api-docs.io/v3.0/how-to-use-the-sendgrid-v3-api/api-authentication
|
|
19
19
|
// https://github.com/sendgrid/sendgrid-nodejs/blob/master/docs/use-cases/README.md#email-use-cases
|
|
20
|
-
async function
|
|
20
|
+
async function SendGridMailSend({ request , connection }) {
|
|
21
21
|
const { apiKey , from , templateId , mailSettings } = connection;
|
|
22
22
|
sendgrid.setApiKey(apiKey);
|
|
23
23
|
const messages = (type.isArray(request) ? request : [
|
|
@@ -41,4 +41,9 @@ async function sendGridMailSend({ request , connection }) {
|
|
|
41
41
|
response: 'Mail sent successfully'
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
SendGridMailSend.schema = schema;
|
|
45
|
+
SendGridMailSend.meta = {
|
|
46
|
+
checkRead: false,
|
|
47
|
+
checkWrite: false
|
|
48
|
+
};
|
|
49
|
+
export default SendGridMailSend;
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ export default {
|
|
16
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
17
|
+
title: 'Lowdefy Request Schema - SendGridMailSend',
|
|
18
|
+
type: 'object',
|
|
19
|
+
definitions: {
|
|
20
|
+
email: {
|
|
21
|
+
anyOf: [
|
|
22
|
+
{
|
|
23
|
+
type: 'string',
|
|
24
|
+
examples: [
|
|
25
|
+
'someone@example.org',
|
|
26
|
+
'Name One <someone@example.org>'
|
|
27
|
+
],
|
|
28
|
+
errorMessage: {
|
|
29
|
+
type: 'SendGridMailSend request property "{{ dataPath }}" should be a string.'
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: 'object',
|
|
34
|
+
required: [
|
|
35
|
+
'name',
|
|
36
|
+
'email'
|
|
37
|
+
],
|
|
38
|
+
properties: {
|
|
39
|
+
name: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
examples: [
|
|
42
|
+
'Some One'
|
|
43
|
+
],
|
|
44
|
+
errorMessage: {
|
|
45
|
+
type: 'SendGridMailSend request property "{{ dataPath }}" should be a string.'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
email: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
examples: [
|
|
51
|
+
'someone@example.org'
|
|
52
|
+
],
|
|
53
|
+
errorMessage: {
|
|
54
|
+
type: 'SendGridMailSend request property "{{ dataPath }}" should be a string.'
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
errorMessage: {
|
|
59
|
+
type: 'SendGridMailSend request property "{{ dataPath }}" should be an object with properties "name" and "email".'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
errorMessage: {
|
|
64
|
+
anyOf: 'SendGridMailSend request property "{{ dataPath }}" should be an email address, or an object with properties "name" and "email".'
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
emails: {
|
|
68
|
+
anyOf: [
|
|
69
|
+
{
|
|
70
|
+
$ref: '#/definitions/email'
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
type: 'array',
|
|
74
|
+
items: {
|
|
75
|
+
$ref: '#/definitions/email'
|
|
76
|
+
},
|
|
77
|
+
errorMessage: {
|
|
78
|
+
type: 'SendGridMailSend request property "{{ dataPath }}" should be a list of email addresses'
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
errorMessage: {
|
|
83
|
+
anyOf: 'SendGridMailSend request property "{{ dataPath }}" should be an email address, or a list of email addresses.'
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
oneRequest: {
|
|
87
|
+
type: 'object',
|
|
88
|
+
required: [
|
|
89
|
+
'to'
|
|
90
|
+
],
|
|
91
|
+
properties: {
|
|
92
|
+
to: {
|
|
93
|
+
$ref: '#/definitions/emails',
|
|
94
|
+
description: 'Email address to send to.'
|
|
95
|
+
},
|
|
96
|
+
cc: {
|
|
97
|
+
$ref: '#/definitions/emails',
|
|
98
|
+
description: 'Email address to cc in communication.'
|
|
99
|
+
},
|
|
100
|
+
bcc: {
|
|
101
|
+
$ref: '#/definitions/emails',
|
|
102
|
+
description: 'Email address to bcc in communication.'
|
|
103
|
+
},
|
|
104
|
+
replyTo: {
|
|
105
|
+
$ref: '#/definitions/emails',
|
|
106
|
+
description: 'Email address to reply to.'
|
|
107
|
+
},
|
|
108
|
+
subject: {
|
|
109
|
+
type: 'string',
|
|
110
|
+
description: 'Email subject.',
|
|
111
|
+
errorMessage: {
|
|
112
|
+
type: 'SendGridMailSend request property "subject" should be a string.'
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
text: {
|
|
116
|
+
type: 'string',
|
|
117
|
+
description: 'Email message in plain text format.',
|
|
118
|
+
errorMessage: {
|
|
119
|
+
type: 'SendGridMailSend request property "text" should be a string.'
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
html: {
|
|
123
|
+
type: 'string',
|
|
124
|
+
description: 'Email message in html format.',
|
|
125
|
+
errorMessage: {
|
|
126
|
+
type: 'SendGridMailSend request property "html" should be a string.'
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
dynamicTemplateData: {
|
|
130
|
+
type: 'object',
|
|
131
|
+
description: 'SendGrid template data to render into email template.',
|
|
132
|
+
errorMessage: {
|
|
133
|
+
type: 'SendGridMailSend request property "dynamicTemplateData" should be an object.'
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
attachments: {
|
|
137
|
+
type: 'array',
|
|
138
|
+
description: 'List of email attachments to include with email.',
|
|
139
|
+
items: {
|
|
140
|
+
type: 'object',
|
|
141
|
+
properties: {
|
|
142
|
+
content: {
|
|
143
|
+
type: 'string',
|
|
144
|
+
description: 'Base 64 encoded attachment content.',
|
|
145
|
+
errorMessage: {
|
|
146
|
+
type: 'SendGridMailSend request property "content" should be a string.'
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
filename: {
|
|
150
|
+
type: 'string',
|
|
151
|
+
description: 'Name of the attachment file.',
|
|
152
|
+
errorMessage: {
|
|
153
|
+
type: 'SendGridMailSend request property "filename" should be a string.'
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
type: {
|
|
157
|
+
type: 'string',
|
|
158
|
+
description: "The mime type of the content you are attaching. For example, 'text/plain' or 'text/html'.",
|
|
159
|
+
errorMessage: {
|
|
160
|
+
type: 'SendGridMailSend request property "type" should be a string.'
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
disposition: {
|
|
164
|
+
type: 'string',
|
|
165
|
+
errorMessage: {
|
|
166
|
+
type: 'SendGridMailSend request property "disposition" should be a string.'
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
contentId: {
|
|
170
|
+
type: 'string',
|
|
171
|
+
errorMessage: {
|
|
172
|
+
type: 'SendGridMailSend request property "contentId" should be a string.'
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
errorMessage: {
|
|
177
|
+
type: 'SendGridMailSend request property "attachments" should be an array of objects.'
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
errorMessage: {
|
|
181
|
+
type: 'SendGridMailSend request property "attachments" should be an array.'
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
categories: {
|
|
185
|
+
type: 'array',
|
|
186
|
+
items: {
|
|
187
|
+
type: 'string',
|
|
188
|
+
errorMessage: {
|
|
189
|
+
type: 'SendGridMailSend request property "categories" should be an array of strings.'
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
errorMessage: {
|
|
193
|
+
type: 'SendGridMailSend request property "categories" should be an array.'
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
sendAt: {
|
|
197
|
+
type: 'integer',
|
|
198
|
+
description: "A unix timestamp allowing you to specify when you want your email to be delivered. You can't schedule more than 72 hours in advance."
|
|
199
|
+
},
|
|
200
|
+
templateId: {
|
|
201
|
+
type: 'string',
|
|
202
|
+
description: 'SendGrid email template ID to render email when sending.'
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
errorMessage: {
|
|
206
|
+
required: {
|
|
207
|
+
to: 'SendGridMailSend request should have required property "to".'
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
anyOf: [
|
|
213
|
+
{
|
|
214
|
+
$ref: '#/definitions/oneRequest'
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
type: 'array',
|
|
218
|
+
items: {
|
|
219
|
+
$ref: '#/definitions/oneRequest'
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
],
|
|
223
|
+
errorMessage: {
|
|
224
|
+
anyOf: 'SendGridMailSend request properties should be an object or a array describing emails to send.'
|
|
225
|
+
}
|
|
226
|
+
};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ export default {
|
|
16
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
17
|
+
title: 'Lowdefy Connection Schema - SendGridMail',
|
|
18
|
+
type: 'object',
|
|
19
|
+
definitions: {
|
|
20
|
+
email: {
|
|
21
|
+
anyOf: [
|
|
22
|
+
{
|
|
23
|
+
type: 'string',
|
|
24
|
+
examples: [
|
|
25
|
+
'someone@example.org',
|
|
26
|
+
'Name One <someone@example.org>'
|
|
27
|
+
],
|
|
28
|
+
errorMessage: {
|
|
29
|
+
type: 'SendGridMail connection property "{{ instancePath }}" should be a string.'
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: 'object',
|
|
34
|
+
required: [
|
|
35
|
+
'name',
|
|
36
|
+
'email'
|
|
37
|
+
],
|
|
38
|
+
properties: {
|
|
39
|
+
name: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
examples: [
|
|
42
|
+
'Some One'
|
|
43
|
+
],
|
|
44
|
+
errorMessage: {
|
|
45
|
+
type: 'SendGridMail connection property "{{ instancePath }}" should be a string.'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
email: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
examples: [
|
|
51
|
+
'someone@example.org'
|
|
52
|
+
],
|
|
53
|
+
errorMessage: {
|
|
54
|
+
type: 'SendGridMail connection property "{{ instancePath }}" should be a string.'
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
errorMessage: {
|
|
59
|
+
type: 'SendGridMail connection property "{{ instancePath }}" should be an object with properties "name" and "email".'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
errorMessage: {
|
|
64
|
+
anyOf: 'SendGridMail connection property "{{ instancePath }}" should be an email address, or an object with properties "name" and "email".'
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
emails: {
|
|
68
|
+
anyOf: [
|
|
69
|
+
{
|
|
70
|
+
$ref: '#/definitions/email'
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
type: 'array',
|
|
74
|
+
items: {
|
|
75
|
+
$ref: '#/definitions/email'
|
|
76
|
+
},
|
|
77
|
+
errorMessage: {
|
|
78
|
+
type: 'SendGridMail connection property "{{ instancePath }}" should be a list of email addresses'
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
errorMessage: {
|
|
83
|
+
anyOf: 'SendGridMail connection property "{{ instancePath }}" should be an email address, or a list of email addresses.'
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
required: [
|
|
88
|
+
'apiKey',
|
|
89
|
+
'from'
|
|
90
|
+
],
|
|
91
|
+
properties: {
|
|
92
|
+
from: {
|
|
93
|
+
$ref: '#/definitions/emails',
|
|
94
|
+
description: 'Email address to send email from.'
|
|
95
|
+
},
|
|
96
|
+
apiKey: {
|
|
97
|
+
type: 'string',
|
|
98
|
+
description: 'SendGrid API key.',
|
|
99
|
+
errorMessage: {
|
|
100
|
+
type: 'SendGridMail connection property "apiKey" should be a string.'
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
templateId: {
|
|
104
|
+
type: 'string',
|
|
105
|
+
description: 'SendGrid email template ID to render email when sending.',
|
|
106
|
+
errorMessage: {
|
|
107
|
+
type: 'SendGridMail connection property "templateId" should be a string.'
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
mailSettings: {
|
|
111
|
+
type: 'object',
|
|
112
|
+
properties: {
|
|
113
|
+
sandboxMode: {
|
|
114
|
+
type: 'object',
|
|
115
|
+
properties: {
|
|
116
|
+
enable: {
|
|
117
|
+
type: 'boolean',
|
|
118
|
+
errorMessage: {
|
|
119
|
+
type: 'SendGridMail connection property "mailSettings.sandboxMode.enable" should be a boolean.'
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
errorMessage: {
|
|
124
|
+
type: 'SendGridMail connection property "mailSettings.sandboxMode" should be an object.'
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
errorMessage: {
|
|
129
|
+
type: 'SendGridMail connection property "mailSettings" should be an object.'
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
errorMessage: {
|
|
134
|
+
type: 'SendGridMail connection properties should be an object.',
|
|
135
|
+
required: {
|
|
136
|
+
apiKey: 'SendGridMail connection should have required property "apiKey".',
|
|
137
|
+
from: 'SendGridMail connection should have required property "from".'
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
};
|
|
@@ -12,13 +12,4 @@
|
|
|
12
12
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
|
-
*/ export default
|
|
16
|
-
import: {
|
|
17
|
-
path: 'connections/SendGridMail/SendGridMailSend/SendGridMailSend.js',
|
|
18
|
-
schema: 'connections/SendGridMail/SendGridMailSend/SendGridMailSendSchema.json'
|
|
19
|
-
},
|
|
20
|
-
meta: {
|
|
21
|
-
checkRead: false,
|
|
22
|
-
checkWrite: false
|
|
23
|
-
}
|
|
24
|
-
};
|
|
15
|
+
*/ export { default as SendGridMail } from './connections/SendGridMail/SendGridMail.js';
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* eslint-disable import/namespace */ /*
|
|
2
|
+
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import * as connections from './connections.js';
|
|
16
|
+
export default {
|
|
17
|
+
connections: Object.keys(connections),
|
|
18
|
+
requests: Object.keys(connections).map((connection)=>Object.keys(connections[connection].requests)
|
|
19
|
+
).flat()
|
|
20
|
+
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/connection-sendgrid",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.7",
|
|
4
4
|
"licence": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"lowdefy",
|
|
9
|
-
"lowdefy connection"
|
|
9
|
+
"lowdefy connection",
|
|
10
|
+
"lowdefy plugin"
|
|
10
11
|
],
|
|
11
12
|
"bugs": {
|
|
12
13
|
"url": "https://github.com/lowdefy/lowdefy/issues"
|
|
@@ -27,8 +28,8 @@
|
|
|
27
28
|
},
|
|
28
29
|
"type": "module",
|
|
29
30
|
"exports": {
|
|
30
|
-
"
|
|
31
|
-
"./
|
|
31
|
+
"./connections": "./dist/connections.js",
|
|
32
|
+
"./types": "./dist/types.js"
|
|
32
33
|
},
|
|
33
34
|
"files": [
|
|
34
35
|
"dist/*"
|
|
@@ -41,18 +42,18 @@
|
|
|
41
42
|
"test": "jest --coverage"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
|
-
"@lowdefy/helpers": "4.0.0-alpha.
|
|
45
|
-
"@sendgrid/mail": "7.
|
|
45
|
+
"@lowdefy/helpers": "4.0.0-alpha.7",
|
|
46
|
+
"@sendgrid/mail": "7.6.0"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
|
-
"@lowdefy/ajv": "4.0.0-alpha.
|
|
49
|
-
"@swc/cli": "0.1.
|
|
50
|
-
"@swc/core": "1.2.
|
|
51
|
-
"@swc/jest": "0.2.
|
|
52
|
-
"jest": "27.
|
|
49
|
+
"@lowdefy/ajv": "4.0.0-alpha.7",
|
|
50
|
+
"@swc/cli": "0.1.55",
|
|
51
|
+
"@swc/core": "1.2.135",
|
|
52
|
+
"@swc/jest": "0.2.17",
|
|
53
|
+
"jest": "27.5.1"
|
|
53
54
|
},
|
|
54
55
|
"publishConfig": {
|
|
55
56
|
"access": "public"
|
|
56
57
|
},
|
|
57
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "52ec14639d00de910cf9b8ab25bf933ca891cff5"
|
|
58
59
|
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "Lowdefy Connection Schema - SendGridMail",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"definitions": {
|
|
6
|
-
"email": {
|
|
7
|
-
"anyOf": [
|
|
8
|
-
{
|
|
9
|
-
"type": "string",
|
|
10
|
-
"examples": ["someone@example.org", "Name One <someone@example.org>"],
|
|
11
|
-
"errorMessage": {
|
|
12
|
-
"type": "SendGridMail connection property \"{{ instancePath }}\" should be a string."
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"type": "object",
|
|
17
|
-
"required": ["name", "email"],
|
|
18
|
-
"properties": {
|
|
19
|
-
"name": {
|
|
20
|
-
"type": "string",
|
|
21
|
-
"examples": ["Some One"],
|
|
22
|
-
"errorMessage": {
|
|
23
|
-
"type": "SendGridMail connection property \"{{ instancePath }}\" should be a string."
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"email": {
|
|
27
|
-
"type": "string",
|
|
28
|
-
"examples": ["someone@example.org"],
|
|
29
|
-
"errorMessage": {
|
|
30
|
-
"type": "SendGridMail connection property \"{{ instancePath }}\" should be a string."
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"errorMessage": {
|
|
35
|
-
"type": "SendGridMail connection property \"{{ instancePath }}\" should be an object with properties \"name\" and \"email\"."
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
"errorMessage": {
|
|
40
|
-
"anyOf": "SendGridMail connection property \"{{ instancePath }}\" should be an email address, or an object with properties \"name\" and \"email\"."
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"emails": {
|
|
44
|
-
"anyOf": [
|
|
45
|
-
{
|
|
46
|
-
"$ref": "#/definitions/email"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"type": "array",
|
|
50
|
-
"items": {
|
|
51
|
-
"$ref": "#/definitions/email"
|
|
52
|
-
},
|
|
53
|
-
"errorMessage": {
|
|
54
|
-
"type": "SendGridMail connection property \"{{ instancePath }}\" should be a list of email addresses"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
"errorMessage": {
|
|
59
|
-
"anyOf": "SendGridMail connection property \"{{ instancePath }}\" should be an email address, or a list of email addresses."
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"required": ["apiKey", "from"],
|
|
64
|
-
"properties": {
|
|
65
|
-
"from": {
|
|
66
|
-
"$ref": "#/definitions/emails",
|
|
67
|
-
"description": "Email address to send email from."
|
|
68
|
-
},
|
|
69
|
-
"apiKey": {
|
|
70
|
-
"type": "string",
|
|
71
|
-
"description": "SendGrid API key.",
|
|
72
|
-
"errorMessage": {
|
|
73
|
-
"type": "SendGridMail connection property \"apiKey\" should be a string."
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
"templateId": {
|
|
77
|
-
"type": "string",
|
|
78
|
-
"description": "SendGrid email template ID to render email when sending.",
|
|
79
|
-
"errorMessage": {
|
|
80
|
-
"type": "SendGridMail connection property \"templateId\" should be a string."
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
"mailSettings": {
|
|
84
|
-
"type": "object",
|
|
85
|
-
"properties": {
|
|
86
|
-
"sandboxMode": {
|
|
87
|
-
"type": "object",
|
|
88
|
-
"properties": {
|
|
89
|
-
"enable": {
|
|
90
|
-
"type": "boolean",
|
|
91
|
-
"errorMessage": {
|
|
92
|
-
"type": "SendGridMail connection property \"mailSettings.sandboxMode.enable\" should be a boolean."
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
"errorMessage": {
|
|
97
|
-
"type": "SendGridMail connection property \"mailSettings.sandboxMode\" should be an object."
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
"errorMessage": {
|
|
102
|
-
"type": "SendGridMail connection property \"mailSettings\" should be an object."
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
"errorMessage": {
|
|
107
|
-
"type": "SendGridMail connection properties should be an object.",
|
|
108
|
-
"required": {
|
|
109
|
-
"apiKey": "SendGridMail connection should have required property \"apiKey\".",
|
|
110
|
-
"from": "SendGridMail connection should have required property \"from\"."
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"title": "Lowdefy Request Schema - SendGridMailSend",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"definitions": {
|
|
6
|
-
"email": {
|
|
7
|
-
"anyOf": [
|
|
8
|
-
{
|
|
9
|
-
"type": "string",
|
|
10
|
-
"examples": ["someone@example.org", "Name One <someone@example.org>"],
|
|
11
|
-
"errorMessage": {
|
|
12
|
-
"type": "SendGridMailSend request property \"{{ dataPath }}\" should be a string."
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"type": "object",
|
|
17
|
-
"required": ["name", "email"],
|
|
18
|
-
"properties": {
|
|
19
|
-
"name": {
|
|
20
|
-
"type": "string",
|
|
21
|
-
"examples": ["Some One"],
|
|
22
|
-
"errorMessage": {
|
|
23
|
-
"type": "SendGridMailSend request property \"{{ dataPath }}\" should be a string."
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"email": {
|
|
27
|
-
"type": "string",
|
|
28
|
-
"examples": ["someone@example.org"],
|
|
29
|
-
"errorMessage": {
|
|
30
|
-
"type": "SendGridMailSend request property \"{{ dataPath }}\" should be a string."
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"errorMessage": {
|
|
35
|
-
"type": "SendGridMailSend request property \"{{ dataPath }}\" should be an object with properties \"name\" and \"email\"."
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
"errorMessage": {
|
|
40
|
-
"anyOf": "SendGridMailSend request property \"{{ dataPath }}\" should be an email address, or an object with properties \"name\" and \"email\"."
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"emails": {
|
|
44
|
-
"anyOf": [
|
|
45
|
-
{
|
|
46
|
-
"$ref": "#/definitions/email"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"type": "array",
|
|
50
|
-
"items": {
|
|
51
|
-
"$ref": "#/definitions/email"
|
|
52
|
-
},
|
|
53
|
-
"errorMessage": {
|
|
54
|
-
"type": "SendGridMailSend request property \"{{ dataPath }}\" should be a list of email addresses"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
"errorMessage": {
|
|
59
|
-
"anyOf": "SendGridMailSend request property \"{{ dataPath }}\" should be an email address, or a list of email addresses."
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
"oneRequest": {
|
|
63
|
-
"type": "object",
|
|
64
|
-
"required": ["to"],
|
|
65
|
-
"properties": {
|
|
66
|
-
"to": {
|
|
67
|
-
"$ref": "#/definitions/emails",
|
|
68
|
-
"description": "Email address to send to."
|
|
69
|
-
},
|
|
70
|
-
"cc": {
|
|
71
|
-
"$ref": "#/definitions/emails",
|
|
72
|
-
"description": "Email address to cc in communication."
|
|
73
|
-
},
|
|
74
|
-
"bcc": {
|
|
75
|
-
"$ref": "#/definitions/emails",
|
|
76
|
-
"description": "Email address to bcc in communication."
|
|
77
|
-
},
|
|
78
|
-
"replyTo": {
|
|
79
|
-
"$ref": "#/definitions/emails",
|
|
80
|
-
"description": "Email address to reply to."
|
|
81
|
-
},
|
|
82
|
-
"subject": {
|
|
83
|
-
"type": "string",
|
|
84
|
-
"description": "Email subject.",
|
|
85
|
-
"errorMessage": {
|
|
86
|
-
"type": "SendGridMailSend request property \"subject\" should be a string."
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
"text": {
|
|
90
|
-
"type": "string",
|
|
91
|
-
"description": "Email message in plain text format.",
|
|
92
|
-
"errorMessage": {
|
|
93
|
-
"type": "SendGridMailSend request property \"text\" should be a string."
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
"html": {
|
|
97
|
-
"type": "string",
|
|
98
|
-
"description": "Email message in html format.",
|
|
99
|
-
"errorMessage": {
|
|
100
|
-
"type": "SendGridMailSend request property \"html\" should be a string."
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
"dynamicTemplateData": {
|
|
104
|
-
"type": "object",
|
|
105
|
-
"description": "SendGrid template data to render into email template.",
|
|
106
|
-
"errorMessage": {
|
|
107
|
-
"type": "SendGridMailSend request property \"dynamicTemplateData\" should be an object."
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
"attachments": {
|
|
111
|
-
"type": "array",
|
|
112
|
-
"description": "List of email attachments to include with email.",
|
|
113
|
-
"items": {
|
|
114
|
-
"type": "object",
|
|
115
|
-
"properties": {
|
|
116
|
-
"content": {
|
|
117
|
-
"type": "string",
|
|
118
|
-
"description": "Base 64 encoded attachment content.",
|
|
119
|
-
"errorMessage": {
|
|
120
|
-
"type": "SendGridMailSend request property \"content\" should be a string."
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
"filename": {
|
|
124
|
-
"type": "string",
|
|
125
|
-
"description": "Name of the attachment file.",
|
|
126
|
-
"errorMessage": {
|
|
127
|
-
"type": "SendGridMailSend request property \"filename\" should be a string."
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
"type": {
|
|
131
|
-
"type": "string",
|
|
132
|
-
"description": "The mime type of the content you are attaching. For example, 'text/plain' or 'text/html'.",
|
|
133
|
-
"errorMessage": {
|
|
134
|
-
"type": "SendGridMailSend request property \"type\" should be a string."
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
"disposition": {
|
|
138
|
-
"type": "string",
|
|
139
|
-
"errorMessage": {
|
|
140
|
-
"type": "SendGridMailSend request property \"disposition\" should be a string."
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
"contentId": {
|
|
144
|
-
"type": "string",
|
|
145
|
-
"errorMessage": {
|
|
146
|
-
"type": "SendGridMailSend request property \"contentId\" should be a string."
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
"errorMessage": {
|
|
151
|
-
"type": "SendGridMailSend request property \"attachments\" should be an array of objects."
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
"errorMessage": {
|
|
155
|
-
"type": "SendGridMailSend request property \"attachments\" should be an array."
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
"categories": {
|
|
159
|
-
"type": "array",
|
|
160
|
-
"items": {
|
|
161
|
-
"type": "string",
|
|
162
|
-
"errorMessage": {
|
|
163
|
-
"type": "SendGridMailSend request property \"categories\" should be an array of strings."
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
"errorMessage": {
|
|
167
|
-
"type": "SendGridMailSend request property \"categories\" should be an array."
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
"sendAt": {
|
|
171
|
-
"type": "integer",
|
|
172
|
-
"description": "A unix timestamp allowing you to specify when you want your email to be delivered. You can't schedule more than 72 hours in advance."
|
|
173
|
-
},
|
|
174
|
-
"templateId": {
|
|
175
|
-
"type": "string",
|
|
176
|
-
"description": "SendGrid email template ID to render email when sending."
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
"errorMessage": {
|
|
180
|
-
"required": {
|
|
181
|
-
"to": "SendGridMailSend request should have required property \"to\"."
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
"anyOf": [
|
|
187
|
-
{
|
|
188
|
-
"$ref": "#/definitions/oneRequest"
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
"type": "array",
|
|
192
|
-
"items": {
|
|
193
|
-
"$ref": "#/definitions/oneRequest"
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
],
|
|
197
|
-
"errorMessage": {
|
|
198
|
-
"anyOf": "SendGridMailSend request properties should be an object or a array describing emails to send."
|
|
199
|
-
}
|
|
200
|
-
}
|