@keystrokehq/sendgrid 0.0.15 → 0.0.16-integration-id-canonicalization.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.
Files changed (68) hide show
  1. package/README.md +59 -111
  2. package/dist/credential-sets/index.d.mts +2 -0
  3. package/dist/credential-sets/index.mjs +3 -0
  4. package/dist/index.d.mts +4 -1
  5. package/dist/index.mjs +5 -1
  6. package/dist/operations/index.d.mts +2 -0
  7. package/dist/operations/index.mjs +3 -0
  8. package/dist/schemas/index.d.mts +5 -5
  9. package/dist/schemas/index.mjs +1 -1
  10. package/dist/{integration-DHWfpe0w.mjs → sendgrid.credential-set-CzYmlJ2Y.mjs} +9 -8
  11. package/dist/sendgrid.credential-set-ivRIiUDy.d.mts +32 -0
  12. package/dist/validate-email.operation-CCCDxLjH.mjs +4301 -0
  13. package/dist/validate-email.operation-DY4rCHFE.d.mts +5436 -0
  14. package/package.json +11 -99
  15. package/dist/_official/index.d.mts +0 -2
  16. package/dist/_official/index.mjs +0 -3
  17. package/dist/_runtime/index.d.mts +0 -2
  18. package/dist/_runtime/index.mjs +0 -3
  19. package/dist/alerts.d.mts +0 -147
  20. package/dist/alerts.mjs +0 -101
  21. package/dist/api-keys.d.mts +0 -105
  22. package/dist/api-keys.mjs +0 -113
  23. package/dist/client.d.mts +0 -73
  24. package/dist/client.mjs +0 -261
  25. package/dist/connection.d.mts +0 -2
  26. package/dist/connection.mjs +0 -3
  27. package/dist/domains.d.mts +0 -86
  28. package/dist/domains.mjs +0 -62
  29. package/dist/email-validation.d.mts +0 -97
  30. package/dist/email-validation.mjs +0 -73
  31. package/dist/events.d.mts +0 -69
  32. package/dist/events.mjs +0 -28
  33. package/dist/factory-7q6CQ75J.mjs +0 -25
  34. package/dist/integration-Cj4Xzfq_.d.mts +0 -48
  35. package/dist/mail-send.d.mts +0 -242
  36. package/dist/mail-send.mjs +0 -218
  37. package/dist/marketing-contacts.d.mts +0 -462
  38. package/dist/marketing-contacts.mjs +0 -277
  39. package/dist/marketing-customfields.d.mts +0 -66
  40. package/dist/marketing-customfields.mjs +0 -70
  41. package/dist/marketing-lists.d.mts +0 -120
  42. package/dist/marketing-lists.mjs +0 -130
  43. package/dist/marketing-segments.d.mts +0 -249
  44. package/dist/marketing-segments.mjs +0 -179
  45. package/dist/marketing-singlesends.d.mts +0 -521
  46. package/dist/marketing-singlesends.mjs +0 -277
  47. package/dist/operations.d.mts +0 -25
  48. package/dist/operations.mjs +0 -69
  49. package/dist/sender-identities.d.mts +0 -163
  50. package/dist/sender-identities.mjs +0 -109
  51. package/dist/senders.d.mts +0 -181
  52. package/dist/senders.mjs +0 -83
  53. package/dist/shared-CQ8JFNXi.mjs +0 -13
  54. package/dist/stats.d.mts +0 -169
  55. package/dist/stats.mjs +0 -107
  56. package/dist/suppressions.d.mts +0 -505
  57. package/dist/suppressions.mjs +0 -539
  58. package/dist/templates.d.mts +0 -351
  59. package/dist/templates.mjs +0 -238
  60. package/dist/user-account.d.mts +0 -71
  61. package/dist/user-account.mjs +0 -59
  62. package/dist/verification.d.mts +0 -67
  63. package/dist/verification.mjs +0 -72
  64. package/dist/webhooks/event.d.mts +0 -214
  65. package/dist/webhooks/event.mjs +0 -147
  66. package/dist/webhooks/parse.d.mts +0 -117
  67. package/dist/webhooks/parse.mjs +0 -125
  68. /package/dist/{webhooks-CKdsIikb.mjs → webhooks-dVOd93Hd.mjs} +0 -0
@@ -1,351 +0,0 @@
1
- import { z } from "zod";
2
- import * as _keystrokehq_core0 from "@keystrokehq/core";
3
-
4
- //#region src/templates.d.ts
5
- declare const createTemplate: _keystrokehq_core0.Operation<z.ZodObject<{
6
- name: z.ZodString;
7
- generation: z.ZodOptional<z.ZodEnum<{
8
- legacy: "legacy";
9
- dynamic: "dynamic";
10
- }>>;
11
- }, z.core.$strip>, z.ZodObject<{
12
- id: z.ZodString;
13
- name: z.ZodString;
14
- generation: z.ZodOptional<z.ZodEnum<{
15
- legacy: "legacy";
16
- dynamic: "dynamic";
17
- }>>;
18
- updated_at: z.ZodOptional<z.ZodString>;
19
- versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
20
- id: z.ZodString;
21
- template_id: z.ZodString;
22
- active: z.ZodOptional<z.ZodNumber>;
23
- name: z.ZodOptional<z.ZodString>;
24
- html_content: z.ZodOptional<z.ZodString>;
25
- plain_content: z.ZodOptional<z.ZodString>;
26
- generate_plain_content: z.ZodOptional<z.ZodBoolean>;
27
- subject: z.ZodOptional<z.ZodString>;
28
- editor: z.ZodOptional<z.ZodEnum<{
29
- code: "code";
30
- design: "design";
31
- }>>;
32
- updated_at: z.ZodOptional<z.ZodString>;
33
- }, z.core.$catchall<z.ZodUnknown>>>>;
34
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
35
- SENDGRID_API_KEY: z.ZodString;
36
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
37
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
38
- global: "global";
39
- eu: "eu";
40
- }>>;
41
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
42
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
43
- }, z.core.$strip>>], undefined>;
44
- declare const updateTemplate: _keystrokehq_core0.Operation<z.ZodObject<{
45
- templateId: z.ZodString;
46
- name: z.ZodString;
47
- }, z.core.$strip>, z.ZodObject<{
48
- id: z.ZodString;
49
- name: z.ZodString;
50
- generation: z.ZodOptional<z.ZodEnum<{
51
- legacy: "legacy";
52
- dynamic: "dynamic";
53
- }>>;
54
- updated_at: z.ZodOptional<z.ZodString>;
55
- versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
56
- id: z.ZodString;
57
- template_id: z.ZodString;
58
- active: z.ZodOptional<z.ZodNumber>;
59
- name: z.ZodOptional<z.ZodString>;
60
- html_content: z.ZodOptional<z.ZodString>;
61
- plain_content: z.ZodOptional<z.ZodString>;
62
- generate_plain_content: z.ZodOptional<z.ZodBoolean>;
63
- subject: z.ZodOptional<z.ZodString>;
64
- editor: z.ZodOptional<z.ZodEnum<{
65
- code: "code";
66
- design: "design";
67
- }>>;
68
- updated_at: z.ZodOptional<z.ZodString>;
69
- }, z.core.$catchall<z.ZodUnknown>>>>;
70
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
71
- SENDGRID_API_KEY: z.ZodString;
72
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
73
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
74
- global: "global";
75
- eu: "eu";
76
- }>>;
77
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
78
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
79
- }, z.core.$strip>>], undefined>;
80
- declare const deleteTemplate: _keystrokehq_core0.Operation<z.ZodObject<{
81
- templateId: z.ZodString;
82
- }, z.core.$strip>, z.ZodObject<{
83
- success: z.ZodBoolean;
84
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
85
- SENDGRID_API_KEY: z.ZodString;
86
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
87
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
88
- global: "global";
89
- eu: "eu";
90
- }>>;
91
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
92
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
93
- }, z.core.$strip>>], undefined>;
94
- declare const duplicateTemplate: _keystrokehq_core0.Operation<z.ZodObject<{
95
- templateId: z.ZodString;
96
- name: z.ZodOptional<z.ZodString>;
97
- }, z.core.$strip>, z.ZodObject<{
98
- id: z.ZodString;
99
- name: z.ZodString;
100
- generation: z.ZodOptional<z.ZodEnum<{
101
- legacy: "legacy";
102
- dynamic: "dynamic";
103
- }>>;
104
- updated_at: z.ZodOptional<z.ZodString>;
105
- versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
106
- id: z.ZodString;
107
- template_id: z.ZodString;
108
- active: z.ZodOptional<z.ZodNumber>;
109
- name: z.ZodOptional<z.ZodString>;
110
- html_content: z.ZodOptional<z.ZodString>;
111
- plain_content: z.ZodOptional<z.ZodString>;
112
- generate_plain_content: z.ZodOptional<z.ZodBoolean>;
113
- subject: z.ZodOptional<z.ZodString>;
114
- editor: z.ZodOptional<z.ZodEnum<{
115
- code: "code";
116
- design: "design";
117
- }>>;
118
- updated_at: z.ZodOptional<z.ZodString>;
119
- }, z.core.$catchall<z.ZodUnknown>>>>;
120
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
121
- SENDGRID_API_KEY: z.ZodString;
122
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
123
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
124
- global: "global";
125
- eu: "eu";
126
- }>>;
127
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
128
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
129
- }, z.core.$strip>>], undefined>;
130
- declare const getTemplate: _keystrokehq_core0.Operation<z.ZodObject<{
131
- templateId: z.ZodString;
132
- }, z.core.$strip>, z.ZodObject<{
133
- id: z.ZodString;
134
- name: z.ZodString;
135
- generation: z.ZodOptional<z.ZodEnum<{
136
- legacy: "legacy";
137
- dynamic: "dynamic";
138
- }>>;
139
- updated_at: z.ZodOptional<z.ZodString>;
140
- versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
141
- id: z.ZodString;
142
- template_id: z.ZodString;
143
- active: z.ZodOptional<z.ZodNumber>;
144
- name: z.ZodOptional<z.ZodString>;
145
- html_content: z.ZodOptional<z.ZodString>;
146
- plain_content: z.ZodOptional<z.ZodString>;
147
- generate_plain_content: z.ZodOptional<z.ZodBoolean>;
148
- subject: z.ZodOptional<z.ZodString>;
149
- editor: z.ZodOptional<z.ZodEnum<{
150
- code: "code";
151
- design: "design";
152
- }>>;
153
- updated_at: z.ZodOptional<z.ZodString>;
154
- }, z.core.$catchall<z.ZodUnknown>>>>;
155
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
156
- SENDGRID_API_KEY: z.ZodString;
157
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
158
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
159
- global: "global";
160
- eu: "eu";
161
- }>>;
162
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
163
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
164
- }, z.core.$strip>>], undefined>;
165
- declare const listTemplates: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{
166
- generations: z.ZodOptional<z.ZodEnum<{
167
- legacy: "legacy";
168
- dynamic: "dynamic";
169
- "legacy,dynamic": "legacy,dynamic";
170
- }>>;
171
- pageSize: z.ZodOptional<z.ZodNumber>;
172
- pageToken: z.ZodOptional<z.ZodString>;
173
- }, z.core.$strip>>, z.ZodObject<{
174
- result: z.ZodArray<z.ZodObject<{
175
- id: z.ZodString;
176
- name: z.ZodString;
177
- generation: z.ZodOptional<z.ZodEnum<{
178
- legacy: "legacy";
179
- dynamic: "dynamic";
180
- }>>;
181
- updated_at: z.ZodOptional<z.ZodString>;
182
- versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
183
- id: z.ZodString;
184
- template_id: z.ZodString;
185
- active: z.ZodOptional<z.ZodNumber>;
186
- name: z.ZodOptional<z.ZodString>;
187
- html_content: z.ZodOptional<z.ZodString>;
188
- plain_content: z.ZodOptional<z.ZodString>;
189
- generate_plain_content: z.ZodOptional<z.ZodBoolean>;
190
- subject: z.ZodOptional<z.ZodString>;
191
- editor: z.ZodOptional<z.ZodEnum<{
192
- code: "code";
193
- design: "design";
194
- }>>;
195
- updated_at: z.ZodOptional<z.ZodString>;
196
- }, z.core.$catchall<z.ZodUnknown>>>>;
197
- }, z.core.$catchall<z.ZodUnknown>>>;
198
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
199
- SENDGRID_API_KEY: z.ZodString;
200
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
201
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
202
- global: "global";
203
- eu: "eu";
204
- }>>;
205
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
206
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
207
- }, z.core.$strip>>], undefined>;
208
- declare const createTemplateVersion: _keystrokehq_core0.Operation<z.ZodObject<{
209
- templateId: z.ZodString;
210
- name: z.ZodString;
211
- subject: z.ZodOptional<z.ZodString>;
212
- htmlContent: z.ZodOptional<z.ZodString>;
213
- plainContent: z.ZodOptional<z.ZodString>;
214
- generatePlainContent: z.ZodOptional<z.ZodBoolean>;
215
- active: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
216
- editor: z.ZodOptional<z.ZodEnum<{
217
- code: "code";
218
- design: "design";
219
- }>>;
220
- }, z.core.$strip>, z.ZodObject<{
221
- id: z.ZodString;
222
- template_id: z.ZodString;
223
- active: z.ZodOptional<z.ZodNumber>;
224
- name: z.ZodOptional<z.ZodString>;
225
- html_content: z.ZodOptional<z.ZodString>;
226
- plain_content: z.ZodOptional<z.ZodString>;
227
- generate_plain_content: z.ZodOptional<z.ZodBoolean>;
228
- subject: z.ZodOptional<z.ZodString>;
229
- editor: z.ZodOptional<z.ZodEnum<{
230
- code: "code";
231
- design: "design";
232
- }>>;
233
- updated_at: z.ZodOptional<z.ZodString>;
234
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
235
- SENDGRID_API_KEY: z.ZodString;
236
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
237
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
238
- global: "global";
239
- eu: "eu";
240
- }>>;
241
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
242
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
243
- }, z.core.$strip>>], undefined>;
244
- declare const updateTemplateVersion: _keystrokehq_core0.Operation<z.ZodObject<{
245
- templateId: z.ZodString;
246
- versionId: z.ZodString;
247
- name: z.ZodOptional<z.ZodString>;
248
- subject: z.ZodOptional<z.ZodString>;
249
- htmlContent: z.ZodOptional<z.ZodString>;
250
- plainContent: z.ZodOptional<z.ZodString>;
251
- generatePlainContent: z.ZodOptional<z.ZodBoolean>;
252
- active: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>>;
253
- editor: z.ZodOptional<z.ZodEnum<{
254
- code: "code";
255
- design: "design";
256
- }>>;
257
- }, z.core.$strip>, z.ZodObject<{
258
- id: z.ZodString;
259
- template_id: z.ZodString;
260
- active: z.ZodOptional<z.ZodNumber>;
261
- name: z.ZodOptional<z.ZodString>;
262
- html_content: z.ZodOptional<z.ZodString>;
263
- plain_content: z.ZodOptional<z.ZodString>;
264
- generate_plain_content: z.ZodOptional<z.ZodBoolean>;
265
- subject: z.ZodOptional<z.ZodString>;
266
- editor: z.ZodOptional<z.ZodEnum<{
267
- code: "code";
268
- design: "design";
269
- }>>;
270
- updated_at: z.ZodOptional<z.ZodString>;
271
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
272
- SENDGRID_API_KEY: z.ZodString;
273
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
274
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
275
- global: "global";
276
- eu: "eu";
277
- }>>;
278
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
279
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
280
- }, z.core.$strip>>], undefined>;
281
- declare const deleteTemplateVersion: _keystrokehq_core0.Operation<z.ZodObject<{
282
- templateId: z.ZodString;
283
- versionId: z.ZodString;
284
- }, z.core.$strip>, z.ZodObject<{
285
- success: z.ZodBoolean;
286
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
287
- SENDGRID_API_KEY: z.ZodString;
288
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
289
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
290
- global: "global";
291
- eu: "eu";
292
- }>>;
293
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
294
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
295
- }, z.core.$strip>>], undefined>;
296
- declare const getTemplateVersion: _keystrokehq_core0.Operation<z.ZodObject<{
297
- templateId: z.ZodString;
298
- versionId: z.ZodString;
299
- }, z.core.$strip>, z.ZodObject<{
300
- id: z.ZodString;
301
- template_id: z.ZodString;
302
- active: z.ZodOptional<z.ZodNumber>;
303
- name: z.ZodOptional<z.ZodString>;
304
- html_content: z.ZodOptional<z.ZodString>;
305
- plain_content: z.ZodOptional<z.ZodString>;
306
- generate_plain_content: z.ZodOptional<z.ZodBoolean>;
307
- subject: z.ZodOptional<z.ZodString>;
308
- editor: z.ZodOptional<z.ZodEnum<{
309
- code: "code";
310
- design: "design";
311
- }>>;
312
- updated_at: z.ZodOptional<z.ZodString>;
313
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
314
- SENDGRID_API_KEY: z.ZodString;
315
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
316
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
317
- global: "global";
318
- eu: "eu";
319
- }>>;
320
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
321
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
322
- }, z.core.$strip>>], undefined>;
323
- declare const activateTemplateVersion: _keystrokehq_core0.Operation<z.ZodObject<{
324
- templateId: z.ZodString;
325
- versionId: z.ZodString;
326
- }, z.core.$strip>, z.ZodObject<{
327
- id: z.ZodString;
328
- template_id: z.ZodString;
329
- active: z.ZodOptional<z.ZodNumber>;
330
- name: z.ZodOptional<z.ZodString>;
331
- html_content: z.ZodOptional<z.ZodString>;
332
- plain_content: z.ZodOptional<z.ZodString>;
333
- generate_plain_content: z.ZodOptional<z.ZodBoolean>;
334
- subject: z.ZodOptional<z.ZodString>;
335
- editor: z.ZodOptional<z.ZodEnum<{
336
- code: "code";
337
- design: "design";
338
- }>>;
339
- updated_at: z.ZodOptional<z.ZodString>;
340
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
341
- SENDGRID_API_KEY: z.ZodString;
342
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
343
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
344
- global: "global";
345
- eu: "eu";
346
- }>>;
347
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
348
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
349
- }, z.core.$strip>>], undefined>;
350
- //#endregion
351
- export { activateTemplateVersion, createTemplate, createTemplateVersion, deleteTemplate, deleteTemplateVersion, duplicateTemplate, getTemplate, getTemplateVersion, listTemplates, updateTemplate, updateTemplateVersion };
@@ -1,238 +0,0 @@
1
- import { n as __exportAll, t as sendgridOperation } from "./factory-7q6CQ75J.mjs";
2
- import { n as omitUndefined } from "./shared-CQ8JFNXi.mjs";
3
- import { createSendGridClient } from "./client.mjs";
4
- import { _ as sendgridTemplateGenerationSchema, b as sendgridTemplateVersionSchema, on as sendgridIdSchema, v as sendgridTemplateListSchema, y as sendgridTemplateSchema } from "./webhooks-CKdsIikb.mjs";
5
- import { z } from "zod";
6
-
7
- //#region src/templates.ts
8
- var templates_exports = /* @__PURE__ */ __exportAll({
9
- activateTemplateVersion: () => activateTemplateVersion,
10
- createTemplate: () => createTemplate,
11
- createTemplateVersion: () => createTemplateVersion,
12
- deleteTemplate: () => deleteTemplate,
13
- deleteTemplateVersion: () => deleteTemplateVersion,
14
- duplicateTemplate: () => duplicateTemplate,
15
- getTemplate: () => getTemplate,
16
- getTemplateVersion: () => getTemplateVersion,
17
- listTemplates: () => listTemplates,
18
- updateTemplate: () => updateTemplate,
19
- updateTemplateVersion: () => updateTemplateVersion
20
- });
21
- function tpl(path) {
22
- return `/templates${path}`;
23
- }
24
- const createTemplate = sendgridOperation({
25
- id: "sendgrid.create-template",
26
- name: "Create Transactional Template",
27
- description: "Create a new transactional template.",
28
- input: z.object({
29
- name: z.string().min(1),
30
- generation: sendgridTemplateGenerationSchema.optional()
31
- }),
32
- output: sendgridTemplateSchema,
33
- needsApproval: true,
34
- run: async (input, credentials) => {
35
- const response = await createSendGridClient(credentials).request(tpl(""), {
36
- method: "POST",
37
- body: omitUndefined({
38
- name: input.name,
39
- generation: input.generation
40
- })
41
- });
42
- return sendgridTemplateSchema.parse(response);
43
- }
44
- });
45
- const updateTemplate = sendgridOperation({
46
- id: "sendgrid.update-template",
47
- name: "Edit Transactional Template",
48
- description: "Rename a transactional template.",
49
- input: z.object({
50
- templateId: sendgridIdSchema,
51
- name: z.string().min(1)
52
- }),
53
- output: sendgridTemplateSchema,
54
- needsApproval: true,
55
- run: async (input, credentials) => {
56
- const response = await createSendGridClient(credentials).request(tpl(`/${encodeURIComponent(input.templateId)}`), {
57
- method: "PATCH",
58
- body: { name: input.name }
59
- });
60
- return sendgridTemplateSchema.parse(response);
61
- }
62
- });
63
- const deleteTemplate = sendgridOperation({
64
- id: "sendgrid.delete-template",
65
- name: "Delete Transactional Template",
66
- description: "Delete a transactional template and all its versions.",
67
- input: z.object({ templateId: sendgridIdSchema }),
68
- output: z.object({ success: z.boolean() }),
69
- needsApproval: true,
70
- run: async (input, credentials) => {
71
- await createSendGridClient(credentials).request(tpl(`/${encodeURIComponent(input.templateId)}`), { method: "DELETE" });
72
- return { success: true };
73
- }
74
- });
75
- const duplicateTemplate = sendgridOperation({
76
- id: "sendgrid.duplicate-template",
77
- name: "Duplicate Transactional Template",
78
- description: "Duplicate a transactional template. Optionally rename the copy.",
79
- input: z.object({
80
- templateId: sendgridIdSchema,
81
- name: z.string().min(1).optional()
82
- }),
83
- output: sendgridTemplateSchema,
84
- needsApproval: true,
85
- run: async (input, credentials) => {
86
- const response = await createSendGridClient(credentials).request(tpl(`/${encodeURIComponent(input.templateId)}`), {
87
- method: "POST",
88
- body: omitUndefined({ name: input.name })
89
- });
90
- return sendgridTemplateSchema.parse(response);
91
- }
92
- });
93
- const getTemplate = sendgridOperation({
94
- id: "sendgrid.get-template",
95
- name: "Get Transactional Template",
96
- description: "Retrieve a single transactional template by ID.",
97
- input: z.object({ templateId: sendgridIdSchema }),
98
- output: sendgridTemplateSchema,
99
- run: async (input, credentials) => {
100
- const response = await createSendGridClient(credentials).request(tpl(`/${encodeURIComponent(input.templateId)}`));
101
- return sendgridTemplateSchema.parse(response);
102
- }
103
- });
104
- const listTemplates = sendgridOperation({
105
- id: "sendgrid.list-templates",
106
- name: "List Transactional Templates",
107
- description: "List transactional templates with optional generation filter and paging.",
108
- input: z.object({
109
- generations: z.enum([
110
- "legacy",
111
- "dynamic",
112
- "legacy,dynamic"
113
- ]).optional(),
114
- pageSize: z.number().int().positive().max(200).optional(),
115
- pageToken: z.string().min(1).optional()
116
- }).optional(),
117
- output: sendgridTemplateListSchema,
118
- run: async (input, credentials) => {
119
- const response = await createSendGridClient(credentials).request(tpl(""), { query: omitUndefined({
120
- generations: input?.generations,
121
- page_size: input?.pageSize,
122
- page_token: input?.pageToken
123
- }) });
124
- return sendgridTemplateListSchema.parse(response ?? { result: [] });
125
- }
126
- });
127
- const createTemplateVersion = sendgridOperation({
128
- id: "sendgrid.create-template-version",
129
- name: "Create Template Version",
130
- description: "Add a new version to a transactional template.",
131
- input: z.object({
132
- templateId: sendgridIdSchema,
133
- name: z.string().min(1),
134
- subject: z.string().optional(),
135
- htmlContent: z.string().optional(),
136
- plainContent: z.string().optional(),
137
- generatePlainContent: z.boolean().optional(),
138
- active: z.union([z.literal(0), z.literal(1)]).optional(),
139
- editor: z.enum(["code", "design"]).optional()
140
- }),
141
- output: sendgridTemplateVersionSchema,
142
- needsApproval: true,
143
- run: async (input, credentials) => {
144
- const response = await createSendGridClient(credentials).request(tpl(`/${encodeURIComponent(input.templateId)}/versions`), {
145
- method: "POST",
146
- body: omitUndefined({
147
- name: input.name,
148
- subject: input.subject,
149
- html_content: input.htmlContent,
150
- plain_content: input.plainContent,
151
- generate_plain_content: input.generatePlainContent,
152
- active: input.active,
153
- editor: input.editor
154
- })
155
- });
156
- return sendgridTemplateVersionSchema.parse(response);
157
- }
158
- });
159
- const updateTemplateVersion = sendgridOperation({
160
- id: "sendgrid.update-template-version",
161
- name: "Edit Template Version",
162
- description: "Update a version of a transactional template.",
163
- input: z.object({
164
- templateId: sendgridIdSchema,
165
- versionId: sendgridIdSchema,
166
- name: z.string().min(1).optional(),
167
- subject: z.string().optional(),
168
- htmlContent: z.string().optional(),
169
- plainContent: z.string().optional(),
170
- generatePlainContent: z.boolean().optional(),
171
- active: z.union([z.literal(0), z.literal(1)]).optional(),
172
- editor: z.enum(["code", "design"]).optional()
173
- }),
174
- output: sendgridTemplateVersionSchema,
175
- needsApproval: true,
176
- run: async (input, credentials) => {
177
- const response = await createSendGridClient(credentials).request(tpl(`/${encodeURIComponent(input.templateId)}/versions/${encodeURIComponent(input.versionId)}`), {
178
- method: "PATCH",
179
- body: omitUndefined({
180
- name: input.name,
181
- subject: input.subject,
182
- html_content: input.htmlContent,
183
- plain_content: input.plainContent,
184
- generate_plain_content: input.generatePlainContent,
185
- active: input.active,
186
- editor: input.editor
187
- })
188
- });
189
- return sendgridTemplateVersionSchema.parse(response);
190
- }
191
- });
192
- const deleteTemplateVersion = sendgridOperation({
193
- id: "sendgrid.delete-template-version",
194
- name: "Delete Template Version",
195
- description: "Delete a specific version of a transactional template.",
196
- input: z.object({
197
- templateId: sendgridIdSchema,
198
- versionId: sendgridIdSchema
199
- }),
200
- output: z.object({ success: z.boolean() }),
201
- needsApproval: true,
202
- run: async (input, credentials) => {
203
- await createSendGridClient(credentials).request(tpl(`/${encodeURIComponent(input.templateId)}/versions/${encodeURIComponent(input.versionId)}`), { method: "DELETE" });
204
- return { success: true };
205
- }
206
- });
207
- const getTemplateVersion = sendgridOperation({
208
- id: "sendgrid.get-template-version",
209
- name: "Get Template Version",
210
- description: "Retrieve a single transactional template version.",
211
- input: z.object({
212
- templateId: sendgridIdSchema,
213
- versionId: sendgridIdSchema
214
- }),
215
- output: sendgridTemplateVersionSchema,
216
- run: async (input, credentials) => {
217
- const response = await createSendGridClient(credentials).request(tpl(`/${encodeURIComponent(input.templateId)}/versions/${encodeURIComponent(input.versionId)}`));
218
- return sendgridTemplateVersionSchema.parse(response);
219
- }
220
- });
221
- const activateTemplateVersion = sendgridOperation({
222
- id: "sendgrid.activate-template-version",
223
- name: "Activate Template Version",
224
- description: "Make the specified version the active version of the template.",
225
- input: z.object({
226
- templateId: sendgridIdSchema,
227
- versionId: sendgridIdSchema
228
- }),
229
- output: sendgridTemplateVersionSchema,
230
- needsApproval: true,
231
- run: async (input, credentials) => {
232
- const response = await createSendGridClient(credentials).request(tpl(`/${encodeURIComponent(input.templateId)}/versions/${encodeURIComponent(input.versionId)}/activate`), { method: "POST" });
233
- return sendgridTemplateVersionSchema.parse(response);
234
- }
235
- });
236
-
237
- //#endregion
238
- export { activateTemplateVersion, createTemplate, createTemplateVersion, deleteTemplate, deleteTemplateVersion, duplicateTemplate, getTemplate, getTemplateVersion, listTemplates, templates_exports as t, updateTemplate, updateTemplateVersion };
@@ -1,71 +0,0 @@
1
- import { z } from "zod";
2
- import * as _keystrokehq_core0 from "@keystrokehq/core";
3
-
4
- //#region src/user-account.d.ts
5
- declare const getUserProfile: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
6
- address: z.ZodOptional<z.ZodString>;
7
- address2: z.ZodOptional<z.ZodString>;
8
- city: z.ZodOptional<z.ZodString>;
9
- company: z.ZodOptional<z.ZodString>;
10
- country: z.ZodOptional<z.ZodString>;
11
- first_name: z.ZodOptional<z.ZodString>;
12
- last_name: z.ZodOptional<z.ZodString>;
13
- phone: z.ZodOptional<z.ZodString>;
14
- state: z.ZodOptional<z.ZodString>;
15
- website: z.ZodOptional<z.ZodString>;
16
- zip: z.ZodOptional<z.ZodString>;
17
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
18
- SENDGRID_API_KEY: z.ZodString;
19
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
20
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
21
- global: "global";
22
- eu: "eu";
23
- }>>;
24
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
25
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
26
- }, z.core.$strip>>], undefined>;
27
- declare const getAccountInfo: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
28
- type: z.ZodString;
29
- reputation: z.ZodOptional<z.ZodNumber>;
30
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
31
- SENDGRID_API_KEY: z.ZodString;
32
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
33
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
34
- global: "global";
35
- eu: "eu";
36
- }>>;
37
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
38
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
39
- }, z.core.$strip>>], undefined>;
40
- declare const getUserScopes: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
41
- scopes: z.ZodArray<z.ZodString>;
42
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
43
- SENDGRID_API_KEY: z.ZodString;
44
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
45
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
46
- global: "global";
47
- eu: "eu";
48
- }>>;
49
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
50
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
51
- }, z.core.$strip>>], undefined>;
52
- declare const getCreditBalance: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
53
- remain: z.ZodOptional<z.ZodNumber>;
54
- total: z.ZodOptional<z.ZodNumber>;
55
- overage: z.ZodOptional<z.ZodNumber>;
56
- used: z.ZodOptional<z.ZodNumber>;
57
- last_reset: z.ZodOptional<z.ZodString>;
58
- next_reset: z.ZodOptional<z.ZodString>;
59
- reset_frequency: z.ZodOptional<z.ZodString>;
60
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
61
- SENDGRID_API_KEY: z.ZodString;
62
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
63
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
64
- global: "global";
65
- eu: "eu";
66
- }>>;
67
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
68
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
69
- }, z.core.$strip>>], undefined>;
70
- //#endregion
71
- export { getAccountInfo, getCreditBalance, getUserProfile, getUserScopes };