@keystrokehq/sendgrid 0.0.9 → 0.0.15

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 (50) hide show
  1. package/dist/_official/index.d.mts +1 -1
  2. package/dist/_official/index.mjs +1 -1
  3. package/dist/alerts.d.mts +11 -57
  4. package/dist/alerts.mjs +2 -2
  5. package/dist/api-keys.d.mts +13 -68
  6. package/dist/api-keys.mjs +2 -2
  7. package/dist/client.d.mts +1 -1
  8. package/dist/client.mjs +3 -2
  9. package/dist/connection.d.mts +1 -1
  10. package/dist/connection.mjs +1 -1
  11. package/dist/domains.d.mts +7 -35
  12. package/dist/domains.mjs +2 -2
  13. package/dist/email-validation.d.mts +10 -47
  14. package/dist/email-validation.mjs +2 -2
  15. package/dist/{factory-CToXR1jp.mjs → factory-7q6CQ75J.mjs} +2 -1
  16. package/dist/{integration-zx-jmybs.d.mts → integration-Cj4Xzfq_.d.mts} +6 -14
  17. package/dist/integration-DHWfpe0w.mjs +24 -0
  18. package/dist/mail-send.d.mts +17 -90
  19. package/dist/mail-send.mjs +2 -2
  20. package/dist/marketing-contacts.d.mts +33 -178
  21. package/dist/marketing-contacts.mjs +2 -2
  22. package/dist/marketing-customfields.d.mts +7 -35
  23. package/dist/marketing-customfields.mjs +1 -1
  24. package/dist/marketing-lists.d.mts +15 -79
  25. package/dist/marketing-lists.mjs +2 -2
  26. package/dist/marketing-segments.d.mts +21 -112
  27. package/dist/marketing-segments.mjs +2 -2
  28. package/dist/marketing-singlesends.d.mts +31 -158
  29. package/dist/marketing-singlesends.mjs +2 -2
  30. package/dist/schemas/index.d.mts +3 -3
  31. package/dist/sender-identities.d.mts +13 -68
  32. package/dist/sender-identities.mjs +1 -1
  33. package/dist/senders.d.mts +11 -57
  34. package/dist/senders.mjs +1 -1
  35. package/dist/shared-CQ8JFNXi.mjs +13 -0
  36. package/dist/stats.d.mts +12 -58
  37. package/dist/stats.mjs +2 -2
  38. package/dist/suppressions.d.mts +63 -343
  39. package/dist/suppressions.mjs +2 -2
  40. package/dist/templates.d.mts +30 -130
  41. package/dist/templates.mjs +2 -2
  42. package/dist/user-account.d.mts +9 -46
  43. package/dist/user-account.mjs +1 -1
  44. package/dist/webhooks/event.d.mts +17 -90
  45. package/dist/webhooks/event.mjs +2 -2
  46. package/dist/webhooks/parse.d.mts +13 -68
  47. package/dist/webhooks/parse.mjs +2 -2
  48. package/package.json +5 -5
  49. package/dist/integration-C9EALG65.mjs +0 -113
  50. package/dist/shared-BayZ0Lt6.mjs +0 -46
@@ -1,6 +1,5 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
1
  import { z } from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
2
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
4
3
 
5
4
  //#region src/webhooks/event.d.ts
6
5
  declare const createEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -39,7 +38,7 @@ declare const createEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
39
38
  dropped: z.ZodOptional<z.ZodBoolean>;
40
39
  oauth_client_id: z.ZodOptional<z.ZodString>;
41
40
  oauth_token_url: z.ZodOptional<z.ZodString>;
42
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
41
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
43
42
  SENDGRID_API_KEY: z.ZodString;
44
43
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
45
44
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -48,16 +47,7 @@ declare const createEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
48
47
  }>>;
49
48
  SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
50
49
  SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
51
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
52
- SENDGRID_API_KEY: z.ZodString;
53
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
54
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
55
- global: "global";
56
- eu: "eu";
57
- }>>;
58
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
59
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
60
- }, z.core.$strip>>[] | undefined>], undefined>;
50
+ }, z.core.$strip>>], undefined>;
61
51
  declare const updateEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
62
52
  friendly_name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
63
53
  enabled: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
@@ -95,7 +85,7 @@ declare const updateEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
95
85
  dropped: z.ZodOptional<z.ZodBoolean>;
96
86
  oauth_client_id: z.ZodOptional<z.ZodString>;
97
87
  oauth_token_url: z.ZodOptional<z.ZodString>;
98
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
88
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
99
89
  SENDGRID_API_KEY: z.ZodString;
100
90
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
101
91
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -104,30 +94,12 @@ declare const updateEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
104
94
  }>>;
105
95
  SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
106
96
  SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
107
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
108
- SENDGRID_API_KEY: z.ZodString;
109
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
110
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
111
- global: "global";
112
- eu: "eu";
113
- }>>;
114
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
115
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
116
- }, z.core.$strip>>[] | undefined>], undefined>;
97
+ }, z.core.$strip>>], undefined>;
117
98
  declare const deleteEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
118
99
  webhookId: z.ZodString;
119
100
  }, z.core.$strip>, z.ZodObject<{
120
101
  success: z.ZodBoolean;
121
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
122
- SENDGRID_API_KEY: z.ZodString;
123
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
124
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
125
- global: "global";
126
- eu: "eu";
127
- }>>;
128
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
129
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
130
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
102
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
131
103
  SENDGRID_API_KEY: z.ZodString;
132
104
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
133
105
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -136,7 +108,7 @@ declare const deleteEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
136
108
  }>>;
137
109
  SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
138
110
  SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
139
- }, z.core.$strip>>[] | undefined>], undefined>;
111
+ }, z.core.$strip>>], undefined>;
140
112
  declare const listEventWebhooks: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
141
113
  max_allowed: z.ZodOptional<z.ZodNumber>;
142
114
  webhooks: z.ZodArray<z.ZodObject<{
@@ -158,16 +130,7 @@ declare const listEventWebhooks: _keystrokehq_core0.Operation<z.ZodOptional<z.Zo
158
130
  oauth_client_id: z.ZodOptional<z.ZodString>;
159
131
  oauth_token_url: z.ZodOptional<z.ZodString>;
160
132
  }, z.core.$catchall<z.ZodUnknown>>>;
161
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
162
- SENDGRID_API_KEY: z.ZodString;
163
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
164
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
165
- global: "global";
166
- eu: "eu";
167
- }>>;
168
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
169
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
170
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
133
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
171
134
  SENDGRID_API_KEY: z.ZodString;
172
135
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
173
136
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -176,7 +139,7 @@ declare const listEventWebhooks: _keystrokehq_core0.Operation<z.ZodOptional<z.Zo
176
139
  }>>;
177
140
  SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
178
141
  SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
179
- }, z.core.$strip>>[] | undefined>], undefined>;
142
+ }, z.core.$strip>>], undefined>;
180
143
  declare const getEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
181
144
  webhookId: z.ZodString;
182
145
  }, z.core.$strip>, z.ZodObject<{
@@ -197,16 +160,7 @@ declare const getEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
197
160
  dropped: z.ZodOptional<z.ZodBoolean>;
198
161
  oauth_client_id: z.ZodOptional<z.ZodString>;
199
162
  oauth_token_url: z.ZodOptional<z.ZodString>;
200
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
201
- SENDGRID_API_KEY: z.ZodString;
202
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
203
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
204
- global: "global";
205
- eu: "eu";
206
- }>>;
207
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
208
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
209
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
163
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
210
164
  SENDGRID_API_KEY: z.ZodString;
211
165
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
212
166
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -215,19 +169,10 @@ declare const getEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
215
169
  }>>;
216
170
  SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
217
171
  SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
218
- }, z.core.$strip>>[] | undefined>], undefined>;
172
+ }, z.core.$strip>>], undefined>;
219
173
  declare const getSignedPublicKey: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
220
174
  public_key: z.ZodString;
221
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
222
- SENDGRID_API_KEY: z.ZodString;
223
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
224
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
225
- global: "global";
226
- eu: "eu";
227
- }>>;
228
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
229
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
230
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
175
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
231
176
  SENDGRID_API_KEY: z.ZodString;
232
177
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
233
178
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -236,12 +181,12 @@ declare const getSignedPublicKey: _keystrokehq_core0.Operation<z.ZodOptional<z.Z
236
181
  }>>;
237
182
  SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
238
183
  SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
239
- }, z.core.$strip>>[] | undefined>], undefined>;
184
+ }, z.core.$strip>>], undefined>;
240
185
  declare const toggleWebhookSignature: _keystrokehq_core0.Operation<z.ZodObject<{
241
186
  enabled: z.ZodBoolean;
242
187
  }, z.core.$strip>, z.ZodObject<{
243
188
  enabled: z.ZodBoolean;
244
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
189
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
245
190
  SENDGRID_API_KEY: z.ZodString;
246
191
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
247
192
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -250,30 +195,12 @@ declare const toggleWebhookSignature: _keystrokehq_core0.Operation<z.ZodObject<{
250
195
  }>>;
251
196
  SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
252
197
  SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
253
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
254
- SENDGRID_API_KEY: z.ZodString;
255
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
256
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
257
- global: "global";
258
- eu: "eu";
259
- }>>;
260
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
261
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
262
- }, z.core.$strip>>[] | undefined>], undefined>;
198
+ }, z.core.$strip>>], undefined>;
263
199
  declare const testEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
264
200
  url: z.ZodString;
265
201
  }, z.core.$strip>, z.ZodObject<{
266
202
  success: z.ZodBoolean;
267
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
268
- SENDGRID_API_KEY: z.ZodString;
269
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
270
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
271
- global: "global";
272
- eu: "eu";
273
- }>>;
274
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
275
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
276
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
203
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
277
204
  SENDGRID_API_KEY: z.ZodString;
278
205
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
279
206
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -282,6 +209,6 @@ declare const testEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
282
209
  }>>;
283
210
  SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
284
211
  SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
285
- }, z.core.$strip>>[] | undefined>], undefined>;
212
+ }, z.core.$strip>>], undefined>;
286
213
  //#endregion
287
214
  export { createEventWebhook, deleteEventWebhook, getEventWebhook, getSignedPublicKey, listEventWebhooks, testEventWebhook, toggleWebhookSignature, updateEventWebhook };
@@ -1,5 +1,5 @@
1
- import { n as __exportAll, t as sendgridOperation } from "../factory-CToXR1jp.mjs";
2
- import { n as omitUndefined } from "../shared-BayZ0Lt6.mjs";
1
+ import { n as __exportAll, t as sendgridOperation } from "../factory-7q6CQ75J.mjs";
2
+ import { n as omitUndefined } from "../shared-CQ8JFNXi.mjs";
3
3
  import { createSendGridClient } from "../client.mjs";
4
4
  import { d as sendgridSignedPublicKeySchema, i as sendgridEventWebhookSettingsSchema, n as sendgridEventWebhookListSchema, u as sendgridSignatureToggleSchema } from "../webhooks-CKdsIikb.mjs";
5
5
  import { z } from "zod";
@@ -1,6 +1,5 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
1
  import { z } from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
2
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
4
3
 
5
4
  //#region src/webhooks/parse.d.ts
6
5
  declare const createParseSetting: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -13,7 +12,7 @@ declare const createParseSetting: _keystrokehq_core0.Operation<z.ZodObject<{
13
12
  hostname: z.ZodString;
14
13
  spam_check: z.ZodOptional<z.ZodBoolean>;
15
14
  send_raw: z.ZodOptional<z.ZodBoolean>;
16
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
15
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
17
16
  SENDGRID_API_KEY: z.ZodString;
18
17
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
19
18
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -22,16 +21,7 @@ declare const createParseSetting: _keystrokehq_core0.Operation<z.ZodObject<{
22
21
  }>>;
23
22
  SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
24
23
  SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
25
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
26
- SENDGRID_API_KEY: z.ZodString;
27
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
28
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
29
- global: "global";
30
- eu: "eu";
31
- }>>;
32
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
33
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
34
- }, z.core.$strip>>[] | undefined>], undefined>;
24
+ }, z.core.$strip>>], undefined>;
35
25
  declare const updateParseSetting: _keystrokehq_core0.Operation<z.ZodObject<{
36
26
  url: z.ZodOptional<z.ZodString>;
37
27
  spamCheck: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
@@ -42,7 +32,7 @@ declare const updateParseSetting: _keystrokehq_core0.Operation<z.ZodObject<{
42
32
  hostname: z.ZodString;
43
33
  spam_check: z.ZodOptional<z.ZodBoolean>;
44
34
  send_raw: z.ZodOptional<z.ZodBoolean>;
45
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
35
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
46
36
  SENDGRID_API_KEY: z.ZodString;
47
37
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
48
38
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -51,30 +41,12 @@ declare const updateParseSetting: _keystrokehq_core0.Operation<z.ZodObject<{
51
41
  }>>;
52
42
  SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
53
43
  SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
54
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
55
- SENDGRID_API_KEY: z.ZodString;
56
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
57
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
58
- global: "global";
59
- eu: "eu";
60
- }>>;
61
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
62
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
63
- }, z.core.$strip>>[] | undefined>], undefined>;
44
+ }, z.core.$strip>>], undefined>;
64
45
  declare const deleteParseSetting: _keystrokehq_core0.Operation<z.ZodObject<{
65
46
  hostname: z.ZodString;
66
47
  }, z.core.$strip>, z.ZodObject<{
67
48
  success: z.ZodBoolean;
68
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
69
- SENDGRID_API_KEY: z.ZodString;
70
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
71
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
72
- global: "global";
73
- eu: "eu";
74
- }>>;
75
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
76
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
77
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
49
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
78
50
  SENDGRID_API_KEY: z.ZodString;
79
51
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
80
52
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -83,7 +55,7 @@ declare const deleteParseSetting: _keystrokehq_core0.Operation<z.ZodObject<{
83
55
  }>>;
84
56
  SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
85
57
  SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
86
- }, z.core.$strip>>[] | undefined>], undefined>;
58
+ }, z.core.$strip>>], undefined>;
87
59
  declare const listParseSettings: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
88
60
  result: z.ZodArray<z.ZodObject<{
89
61
  url: z.ZodOptional<z.ZodString>;
@@ -91,7 +63,7 @@ declare const listParseSettings: _keystrokehq_core0.Operation<z.ZodOptional<z.Zo
91
63
  spam_check: z.ZodOptional<z.ZodBoolean>;
92
64
  send_raw: z.ZodOptional<z.ZodBoolean>;
93
65
  }, z.core.$catchall<z.ZodUnknown>>>;
94
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
66
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
95
67
  SENDGRID_API_KEY: z.ZodString;
96
68
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
97
69
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -100,16 +72,7 @@ declare const listParseSettings: _keystrokehq_core0.Operation<z.ZodOptional<z.Zo
100
72
  }>>;
101
73
  SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
102
74
  SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
103
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
104
- SENDGRID_API_KEY: z.ZodString;
105
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
106
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
107
- global: "global";
108
- eu: "eu";
109
- }>>;
110
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
111
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
112
- }, z.core.$strip>>[] | undefined>], undefined>;
75
+ }, z.core.$strip>>], undefined>;
113
76
  declare const getParseSetting: _keystrokehq_core0.Operation<z.ZodObject<{
114
77
  hostname: z.ZodString;
115
78
  }, z.core.$strip>, z.ZodObject<{
@@ -117,7 +80,7 @@ declare const getParseSetting: _keystrokehq_core0.Operation<z.ZodObject<{
117
80
  hostname: z.ZodString;
118
81
  spam_check: z.ZodOptional<z.ZodBoolean>;
119
82
  send_raw: z.ZodOptional<z.ZodBoolean>;
120
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
83
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
121
84
  SENDGRID_API_KEY: z.ZodString;
122
85
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
123
86
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -126,16 +89,7 @@ declare const getParseSetting: _keystrokehq_core0.Operation<z.ZodObject<{
126
89
  }>>;
127
90
  SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
128
91
  SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
129
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
130
- SENDGRID_API_KEY: z.ZodString;
131
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
132
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
133
- global: "global";
134
- eu: "eu";
135
- }>>;
136
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
137
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
138
- }, z.core.$strip>>[] | undefined>], undefined>;
92
+ }, z.core.$strip>>], undefined>;
139
93
  declare const getParseStats: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{
140
94
  startDate: z.ZodOptional<z.ZodISODate>;
141
95
  endDate: z.ZodOptional<z.ZodISODate>;
@@ -149,16 +103,7 @@ declare const getParseStats: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObj
149
103
  }, z.core.$strip>>, z.ZodArray<z.ZodObject<{
150
104
  date: z.ZodString;
151
105
  stats: z.ZodArray<z.ZodUnknown>;
152
- }, z.core.$catchall<z.ZodUnknown>>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
153
- SENDGRID_API_KEY: z.ZodString;
154
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
155
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
156
- global: "global";
157
- eu: "eu";
158
- }>>;
159
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
160
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
161
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
106
+ }, z.core.$catchall<z.ZodUnknown>>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
162
107
  SENDGRID_API_KEY: z.ZodString;
163
108
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
164
109
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -167,6 +112,6 @@ declare const getParseStats: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObj
167
112
  }>>;
168
113
  SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
169
114
  SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
170
- }, z.core.$strip>>[] | undefined>], undefined>;
115
+ }, z.core.$strip>>], undefined>;
171
116
  //#endregion
172
117
  export { createParseSetting, deleteParseSetting, getParseSetting, getParseStats, listParseSettings, updateParseSetting };
@@ -1,5 +1,5 @@
1
- import { n as __exportAll, t as sendgridOperation } from "../factory-CToXR1jp.mjs";
2
- import { n as omitUndefined } from "../shared-BayZ0Lt6.mjs";
1
+ import { n as __exportAll, t as sendgridOperation } from "../factory-7q6CQ75J.mjs";
2
+ import { n as omitUndefined } from "../shared-CQ8JFNXi.mjs";
3
3
  import { createSendGridClient } from "../client.mjs";
4
4
  import { l as sendgridParseStatsSchema, o as sendgridParseSettingListSchema, s as sendgridParseSettingSchema } from "../webhooks-CKdsIikb.mjs";
5
5
  import { z } from "zod";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/sendgrid",
3
- "version": "0.0.9",
3
+ "version": "0.0.15",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -116,20 +116,20 @@
116
116
  "LICENSE"
117
117
  ],
118
118
  "dependencies": {
119
+ "@keystrokehq/integration-authoring": "^0.0.9",
119
120
  "zod": "^4.3.6"
120
121
  },
121
122
  "peerDependencies": {
122
- "@keystrokehq/core": ">=0.0.8 <0.1.0"
123
+ "@keystrokehq/core": ">=0.0.13 <0.1.0"
123
124
  },
124
125
  "devDependencies": {
125
126
  "@types/node": "^22.19.11",
126
127
  "tsdown": "^0.20.3",
127
128
  "typescript": "^5.9.3",
128
129
  "vitest": "^4.0.18",
129
- "@keystrokehq/core": "^0.0.12",
130
- "@keystrokehq/typescript-config": "0.0.0",
130
+ "@keystrokehq/core": "^0.0.13",
131
131
  "@keystrokehq/test-utils": "0.0.0",
132
- "@keystrokehq/integration-authoring": "0.0.9"
132
+ "@keystrokehq/typescript-config": "0.0.0"
133
133
  },
134
134
  "keywords": [
135
135
  "sendgrid",
@@ -1,113 +0,0 @@
1
- import { CredentialSet, Operation } from "@keystrokehq/core";
2
- import { z } from "zod";
3
-
4
- //#region ../../packages/integration-authoring/dist/official/runtime.mjs
5
- const REGISTRY_KEY = "__ks_official_integration_metadata_registry";
6
- function getRegistry() {
7
- const globalStore = globalThis;
8
- if (!globalStore[REGISTRY_KEY]) globalStore[REGISTRY_KEY] = /* @__PURE__ */ new WeakMap();
9
- return globalStore[REGISTRY_KEY];
10
- }
11
- function registerOfficialOperation(operation, metadata) {
12
- getRegistry().set(operation, Object.freeze({ ...metadata }));
13
- }
14
-
15
- //#endregion
16
- //#region ../../packages/integration-authoring/dist/official/index.mjs
17
- const OFFICIAL_CREDENTIAL_SET_ID_PREFIX = "keystroke:";
18
- function stripOfficialCredentialSetIdPrefix(id) {
19
- return id.startsWith(OFFICIAL_CREDENTIAL_SET_ID_PREFIX) ? id.slice(10) : id;
20
- }
21
- /**
22
- * Creates a factory for Keystroke-official integration operations.
23
- *
24
- * It keeps the same flat `run(input, credentials)` ergonomics as the generic
25
- * operation factory, while registering official metadata for builder/runtime
26
- * operation metadata.
27
- */
28
- function createOfficialOperationFactory(credentialSet) {
29
- const integrationId = stripOfficialCredentialSetIdPrefix(credentialSet.id);
30
- return (config) => {
31
- const wrappedRun = async (input, ctx) => {
32
- const creds = ctx.credentials[credentialSet.id];
33
- return config.run(input, creds);
34
- };
35
- const operation = new Operation({
36
- id: config.id,
37
- name: config.name,
38
- description: config.description,
39
- input: config.input,
40
- output: config.output,
41
- credentialSets: [credentialSet],
42
- ...config.tags !== void 0 ? { tags: config.tags } : {},
43
- ...config.needsApproval !== void 0 ? { needsApproval: config.needsApproval } : {},
44
- ...config.requiredOAuthScopes !== void 0 ? { requiredOAuthScopes: config.requiredOAuthScopes } : {},
45
- ...config.retries !== void 0 ? { retries: config.retries } : {},
46
- ...config.timeout !== void 0 ? { timeout: config.timeout } : {},
47
- ...config.maxDurationMs !== void 0 ? { maxDurationMs: config.maxDurationMs } : {},
48
- run: wrappedRun
49
- });
50
- registerOfficialOperation(operation, { integrationId });
51
- return operation;
52
- };
53
- }
54
- /**
55
- * Creates an official integration bundle from a single config object.
56
- *
57
- * - Creates the public `CredentialSet` internally.
58
- * - Accepts optional `internal` fields for Keystroke-owned platform credentials.
59
- */
60
- function defineOfficialIntegration(config) {
61
- const internalCredentialSets = config.internal ?? {};
62
- const allInternalCredentialSets = [
63
- ...internalCredentialSets.providerApp ? [internalCredentialSets.providerApp] : [],
64
- ...internalCredentialSets.providerAppVariants ?? [],
65
- ...internalCredentialSets.webhookVerification ? [internalCredentialSets.webhookVerification] : [],
66
- ...internalCredentialSets.other ?? []
67
- ];
68
- const credentialSet = new CredentialSet({
69
- id: config.id,
70
- name: config.name,
71
- description: config.description,
72
- auth: config.auth,
73
- ...config.connections ? { connections: config.connections } : {},
74
- ...config.proxy ? { proxy: config.proxy } : {},
75
- ...config.needsRawSecret === true ? { needsRawSecret: true } : {}
76
- });
77
- return Object.freeze({
78
- integration: {
79
- id: config.id,
80
- name: config.name,
81
- ...config.description !== void 0 ? { description: config.description } : {},
82
- auth: config.auth,
83
- ...config.proxy ? { proxy: config.proxy } : {},
84
- ...config.needsRawSecret === true ? { needsRawSecret: true } : {},
85
- ...config.connections ? { connections: config.connections } : {}
86
- },
87
- credentialSet,
88
- internalCredentialSets,
89
- allInternalCredentialSets
90
- });
91
- }
92
-
93
- //#endregion
94
- //#region src/integration.ts
95
- const sendgridAuthSchema = z.object({
96
- SENDGRID_API_KEY: z.string().min(1).regex(/^SG\./u, "SendGrid API keys start with \"SG.\""),
97
- SENDGRID_SUBUSER: z.string().min(1).optional(),
98
- SENDGRID_ACCOUNT_REGION: z.enum(["global", "eu"]).default("global"),
99
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.string().min(1).optional(),
100
- SENDGRID_INBOUND_PARSE_TOKEN: z.string().min(1).optional()
101
- });
102
- const sendgridOfficialIntegration = {
103
- id: "sendgrid",
104
- name: "SendGrid",
105
- description: "SendGrid (Twilio) transactional + marketing email, templates, contacts, lists, segments, deliverability, and webhook helpers for Keystroke workflows",
106
- auth: sendgridAuthSchema,
107
- proxy: { hosts: ["api.sendgrid.com", "api.eu.sendgrid.com"] }
108
- };
109
- const sendgridBundle = defineOfficialIntegration(sendgridOfficialIntegration);
110
- const sendgrid = sendgridBundle.credentialSet;
111
-
112
- //#endregion
113
- export { createOfficialOperationFactory as i, sendgridBundle as n, sendgridOfficialIntegration as r, sendgrid as t };
@@ -1,46 +0,0 @@
1
- import { Operation } from "@keystrokehq/core";
2
- import { z } from "zod";
3
- import "@keystrokehq/core/trigger";
4
-
5
- //#region ../../packages/integration-authoring/dist/index.mjs
6
- function isThenable(value) {
7
- return !!value && typeof value === "object" && "then" in value && typeof value.then === "function";
8
- }
9
- function createErrorNormalizingProxy(target, normalizeError, path = []) {
10
- return new Proxy(target, { get(obj, property, receiver) {
11
- const value = Reflect.get(obj, property, receiver);
12
- if (typeof value === "function") return (...args) => {
13
- try {
14
- const result = value.apply(obj, args);
15
- if (isThenable(result)) return result.then(void 0, (error) => {
16
- throw normalizeError(error, { methodPath: [...path, String(property)].join(".") });
17
- });
18
- return result;
19
- } catch (error) {
20
- throw normalizeError(error, { methodPath: [...path, String(property)].join(".") });
21
- }
22
- };
23
- if (value && typeof value === "object") return createErrorNormalizingProxy(value, normalizeError, [...path, String(property)]);
24
- return value;
25
- } });
26
- }
27
- const IntegrationConfigSchema = z.object({
28
- id: z.string().min(1),
29
- name: z.string().min(1),
30
- description: z.string().optional()
31
- });
32
-
33
- //#endregion
34
- //#region src/shared.ts
35
- function asRecord(value) {
36
- return typeof value === "object" && value !== null ? value : {};
37
- }
38
- function stringIfPresent(value) {
39
- return typeof value === "string" && value.length > 0 ? value : void 0;
40
- }
41
- function omitUndefined(value) {
42
- return Object.fromEntries(Object.entries(value).filter(([, entry]) => entry !== void 0));
43
- }
44
-
45
- //#endregion
46
- export { createErrorNormalizingProxy as i, omitUndefined as n, stringIfPresent as r, asRecord as t };