@lowdefy/connection-sendgrid 0.0.0-experimental-20251010122007 → 0.0.0-experimental-20251203145918

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/connection-sendgrid",
3
- "version": "0.0.0-experimental-20251010122007",
3
+ "version": "0.0.0-experimental-20251203145918",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -35,12 +35,12 @@
35
35
  "dist/*"
36
36
  ],
37
37
  "dependencies": {
38
- "@lowdefy/helpers": "0.0.0-experimental-20251010122007",
38
+ "@lowdefy/helpers": "0.0.0-experimental-20251203145918",
39
39
  "@sendgrid/mail": "7.7.0"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@jest/globals": "28.1.3",
43
- "@lowdefy/ajv": "0.0.0-experimental-20251010122007",
43
+ "@lowdefy/ajv": "0.0.0-experimental-20251203145918",
44
44
  "@swc/cli": "0.1.63",
45
45
  "@swc/core": "1.3.99",
46
46
  "@swc/jest": "0.2.29",
@@ -1,267 +0,0 @@
1
- <TITLE>
2
- SendGridMailSend
3
- </TITLE>
4
-
5
- <DESCRIPTION>
6
-
7
- ### Properties
8
-
9
- #### object
10
-
11
- A `mail description`:
12
- - `to: email | email[]`: __Required__ - Email address or addresses to send to.
13
- - `cc: email | email[]`: Email address to cc in communication.
14
- - `bcc: email | email[]`: Email address to bcc in communication.
15
- - `replyTo: email | email[]`: Email address to reply to.
16
- - `subject: string`: Email subject.
17
- - `text: string`: Email message in plain text format.
18
- - `html: string`: Email message in html format.
19
- - `dynamicTemplateData: object`: SendGrid template data to render into email template.
20
- - `sendAt: integer`: 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.
21
- - `attachments: object[]`: List of email attachments to include with email. See [SendGrid API-Reference](https://d2w67tjf43xwdp.cloudfront.net/Classroom/Build/Add_Content/attachments.html]).
22
- - `content: string`: __Required__ - Base 64 encoded attachment content.
23
- - `filename: string`: __Required__ - Name of the attachment file.
24
- - `type: string`: The mime type of the content you are attaching. For example, `text/plain` or `text/html`.
25
-
26
- #### array
27
-
28
- An array of `mail description` objects can also be provided.
29
-
30
- </DESCRIPTION>
31
-
32
- <CONNECTION>
33
- SendGridMail
34
- </CONNECTION>
35
-
36
- <SCHEMA>
37
-
38
- ```js
39
- export default {
40
- $schema: 'http://json-schema.org/draft-07/schema#',
41
- title: 'Lowdefy Request Schema - SendGridMailSend',
42
- type: 'object',
43
- definitions: {
44
- email: {
45
- anyOf: [
46
- {
47
- type: 'string',
48
- examples: ['someone@example.org', 'Name One <someone@example.org>'],
49
- errorMessage: {
50
- type: 'SendGridMailSend request property "{{ dataPath }}" should be a string.',
51
- },
52
- },
53
- {
54
- type: 'object',
55
- required: ['name', 'email'],
56
- properties: {
57
- name: {
58
- type: 'string',
59
- examples: ['Some One'],
60
- errorMessage: {
61
- type: 'SendGridMailSend request property "{{ dataPath }}" should be a string.',
62
- },
63
- },
64
- email: {
65
- type: 'string',
66
- examples: ['someone@example.org'],
67
- errorMessage: {
68
- type: 'SendGridMailSend request property "{{ dataPath }}" should be a string.',
69
- },
70
- },
71
- },
72
- errorMessage: {
73
- type: 'SendGridMailSend request property "{{ dataPath }}" should be an object with properties "name" and "email".',
74
- },
75
- },
76
- ],
77
- errorMessage: {
78
- anyOf:
79
- 'SendGridMailSend request property "{{ dataPath }}" should be an email address, or an object with properties "name" and "email".',
80
- },
81
- },
82
- emails: {
83
- anyOf: [
84
- {
85
- $ref: '#/definitions/email',
86
- },
87
- {
88
- type: 'array',
89
- items: {
90
- $ref: '#/definitions/email',
91
- },
92
- errorMessage: {
93
- type: 'SendGridMailSend request property "{{ dataPath }}" should be a list of email addresses',
94
- },
95
- },
96
- ],
97
- errorMessage: {
98
- anyOf:
99
- 'SendGridMailSend request property "{{ dataPath }}" should be an email address, or a list of email addresses.',
100
- },
101
- },
102
- oneRequest: {
103
- type: 'object',
104
- required: ['to'],
105
- properties: {
106
- to: {
107
- $ref: '#/definitions/emails',
108
- description: 'Email address to send to.',
109
- },
110
- cc: {
111
- $ref: '#/definitions/emails',
112
- description: 'Email address to cc in communication.',
113
- },
114
- bcc: {
115
- $ref: '#/definitions/emails',
116
- description: 'Email address to bcc in communication.',
117
- },
118
- replyTo: {
119
- $ref: '#/definitions/emails',
120
- description: 'Email address to reply to.',
121
- },
122
- subject: {
123
- type: 'string',
124
- description: 'Email subject.',
125
- errorMessage: {
126
- type: 'SendGridMailSend request property "subject" should be a string.',
127
- },
128
- },
129
- text: {
130
- type: 'string',
131
- description: 'Email message in plain text format.',
132
- errorMessage: {
133
- type: 'SendGridMailSend request property "text" should be a string.',
134
- },
135
- },
136
- html: {
137
- type: 'string',
138
- description: 'Email message in html format.',
139
- errorMessage: {
140
- type: 'SendGridMailSend request property "html" should be a string.',
141
- },
142
- },
143
- dynamicTemplateData: {
144
- type: 'object',
145
- description: 'SendGrid template data to render into email template.',
146
- errorMessage: {
147
- type: 'SendGridMailSend request property "dynamicTemplateData" should be an object.',
148
- },
149
- },
150
- attachments: {
151
- type: 'array',
152
- description: 'List of email attachments to include with email.',
153
- items: {
154
- type: 'object',
155
- properties: {
156
- content: {
157
- type: 'string',
158
- description: 'Base 64 encoded attachment content.',
159
- errorMessage: {
160
- type: 'SendGridMailSend request property "content" should be a string.',
161
- },
162
- },
163
- filename: {
164
- type: 'string',
165
- description: 'Name of the attachment file.',
166
- errorMessage: {
167
- type: 'SendGridMailSend request property "filename" should be a string.',
168
- },
169
- },
170
- type: {
171
- type: 'string',
172
- description:
173
- "The mime type of the content you are attaching. For example, 'text/plain' or 'text/html'.",
174
- errorMessage: {
175
- type: 'SendGridMailSend request property "type" should be a string.',
176
- },
177
- },
178
- disposition: {
179
- type: 'string',
180
- errorMessage: {
181
- type: 'SendGridMailSend request property "disposition" should be a string.',
182
- },
183
- },
184
- contentId: {
185
- type: 'string',
186
- errorMessage: {
187
- type: 'SendGridMailSend request property "contentId" should be a string.',
188
- },
189
- },
190
- },
191
- errorMessage: {
192
- type: 'SendGridMailSend request property "attachments" should be an array of objects.',
193
- },
194
- },
195
- errorMessage: {
196
- type: 'SendGridMailSend request property "attachments" should be an array.',
197
- },
198
- },
199
- categories: {
200
- type: 'array',
201
- items: {
202
- type: 'string',
203
- errorMessage: {
204
- type: 'SendGridMailSend request property "categories" should be an array of strings.',
205
- },
206
- },
207
- errorMessage: {
208
- type: 'SendGridMailSend request property "categories" should be an array.',
209
- },
210
- },
211
- sendAt: {
212
- type: 'integer',
213
- description:
214
- "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.",
215
- },
216
- templateId: {
217
- type: 'string',
218
- description: 'SendGrid email template ID to render email when sending.',
219
- },
220
- },
221
- errorMessage: {
222
- required: {
223
- to: 'SendGridMailSend request should have required property "to".',
224
- },
225
- },
226
- },
227
- },
228
- anyOf: [
229
- {
230
- $ref: '#/definitions/oneRequest',
231
- },
232
- {
233
- type: 'array',
234
- items: {
235
- $ref: '#/definitions/oneRequest',
236
- },
237
- },
238
- ],
239
- errorMessage: {
240
- anyOf:
241
- 'SendGridMailSend request properties should be an object or a array describing emails to send.',
242
- },
243
- };
244
- ```
245
-
246
- </SCHEMA>
247
-
248
- <EXAMPLES>
249
-
250
- ### Send a reminder email
251
-
252
- ```yaml
253
- id: send_reminder
254
- type: SendGridMailSend
255
- connectionId: my_sendgrid
256
- properties:
257
- to: Harry Potter <harry@example.org>
258
- subject: Reminder for Mr. Potter to water the 🌱
259
- text: |
260
- Hi Harry
261
-
262
- Please remember to water the magic plants today :)
263
-
264
- Thank you
265
- ```
266
-
267
- </EXAMPLES>
@@ -1,176 +0,0 @@
1
- <TITLE>
2
- SendGridMail
3
- </TITLE>
4
-
5
- <DESCRIPTION>
6
-
7
- [SendGrid](https://sendgrid.com/) is a popular email API provider which allows you to easily setup a email service. The `SendGridMail` connection can be used to connect to an existing SendGrid API account.
8
-
9
- The `SendGridMail` connector uses the [@sendgrid/mail](https://github.com/@sendgrid/mail) library.
10
-
11
- In order to use the `SendGridMail` connector, you first need to create a [SendGrid](https://sendgrid.com/) account and setup an API key.
12
-
13
- > Secrets like API keys should be stored using the [`_secret`](operators/secret.md) operator.
14
-
15
- In order to send from your custom domain your will need to [authenticate your domain](https://app.sendgrid.com/settings/sender_auth) through SendGrid. See the [SendGrid Docs](https://sendgrid.com/docs) for help on getting started with SendGrid.
16
-
17
- ### Types
18
-
19
- - `email: string | object`: SendGrid accepts emails as either a `string` or an `object`.
20
- - `string`: Can be in the following format; `someone@example.org` or `Some One <someone@example.org>`.
21
- - `object`: With `name' and `email` properties, for example: `{"name": "Some One", "email": "someone@example.org"}`.
22
-
23
- ### Properties
24
-
25
- - `apiKey: string`: __Required__ - SendGrid API key.
26
- - `from: email`: __Required__ - Email address to send email from.
27
- - `mailSettings: object`: SendGrid mail settings. See [SendGrid API-Reference](https://sendgrid.com/docs/api-reference/)
28
- - `sandboxMode: object`: SendGrid mail sandbox mode settings.
29
- - `enable: boolean`: Sandbox mode enabled when `true`.
30
- - `templateId: string`: SendGrid email template ID to render email when sending.
31
-
32
- </DESCRIPTION>
33
-
34
- <REQUESTS>
35
-
36
- - SendGridMailSend
37
-
38
- </REQUESTS>
39
-
40
- <SCHEMA>
41
-
42
- ```js
43
- export default {
44
- $schema: 'http://json-schema.org/draft-07/schema#',
45
- title: 'Lowdefy Connection Schema - SendGridMail',
46
- type: 'object',
47
- definitions: {
48
- email: {
49
- anyOf: [
50
- {
51
- type: 'string',
52
- examples: ['someone@example.org', 'Name One <someone@example.org>'],
53
- errorMessage: {
54
- type: 'SendGridMail connection property "{{ instancePath }}" should be a string.',
55
- },
56
- },
57
- {
58
- type: 'object',
59
- required: ['name', 'email'],
60
- properties: {
61
- name: {
62
- type: 'string',
63
- examples: ['Some One'],
64
- errorMessage: {
65
- type: 'SendGridMail connection property "{{ instancePath }}" should be a string.',
66
- },
67
- },
68
- email: {
69
- type: 'string',
70
- examples: ['someone@example.org'],
71
- errorMessage: {
72
- type: 'SendGridMail connection property "{{ instancePath }}" should be a string.',
73
- },
74
- },
75
- },
76
- errorMessage: {
77
- type: 'SendGridMail connection property "{{ instancePath }}" should be an object with properties "name" and "email".',
78
- },
79
- },
80
- ],
81
- errorMessage: {
82
- anyOf:
83
- 'SendGridMail connection property "{{ instancePath }}" should be an email address, or an object with properties "name" and "email".',
84
- },
85
- },
86
- emails: {
87
- anyOf: [
88
- {
89
- $ref: '#/definitions/email',
90
- },
91
- {
92
- type: 'array',
93
- items: {
94
- $ref: '#/definitions/email',
95
- },
96
- errorMessage: {
97
- type: 'SendGridMail connection property "{{ instancePath }}" should be a list of email addresses',
98
- },
99
- },
100
- ],
101
- errorMessage: {
102
- anyOf:
103
- 'SendGridMail connection property "{{ instancePath }}" should be an email address, or a list of email addresses.',
104
- },
105
- },
106
- },
107
- required: ['apiKey', 'from'],
108
- properties: {
109
- from: {
110
- $ref: '#/definitions/emails',
111
- description: 'Email address to send email from.',
112
- },
113
- apiKey: {
114
- type: 'string',
115
- description: 'SendGrid API key.',
116
- errorMessage: {
117
- type: 'SendGridMail connection property "apiKey" should be a string.',
118
- },
119
- },
120
- templateId: {
121
- type: 'string',
122
- description: 'SendGrid email template ID to render email when sending.',
123
- errorMessage: {
124
- type: 'SendGridMail connection property "templateId" should be a string.',
125
- },
126
- },
127
- mailSettings: {
128
- type: 'object',
129
- properties: {
130
- sandboxMode: {
131
- type: 'object',
132
- properties: {
133
- enable: {
134
- type: 'boolean',
135
- errorMessage: {
136
- type: 'SendGridMail connection property "mailSettings.sandboxMode.enable" should be a boolean.',
137
- },
138
- },
139
- },
140
- errorMessage: {
141
- type: 'SendGridMail connection property "mailSettings.sandboxMode" should be an object.',
142
- },
143
- },
144
- },
145
- errorMessage: {
146
- type: 'SendGridMail connection property "mailSettings" should be an object.',
147
- },
148
- },
149
- },
150
- errorMessage: {
151
- type: 'SendGridMail connection properties should be an object.',
152
- required: {
153
- apiKey: 'SendGridMail connection should have required property "apiKey".',
154
- from: 'SendGridMail connection should have required property "from".',
155
- },
156
- },
157
- };
158
- ```
159
-
160
- </SCHEMA>
161
-
162
- <EXAMPLES>
163
-
164
- ### Send a reminder email
165
-
166
- ```yaml
167
- connections:
168
- - id: my_sendgrid
169
- type: SendGridMail
170
- properties:
171
- apiKey:
172
- _secret: SENDGRID_API_KEY
173
- from: reminders@example.org
174
- ```
175
-
176
- </EXAMPLES>