@keystrokehq/sendgrid 0.0.1 → 0.0.5

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.
@@ -32,7 +32,7 @@ declare const createTemplate: _keystrokehq_core0.Operation<z.ZodObject<{
32
32
  }>>;
33
33
  updated_at: z.ZodOptional<z.ZodString>;
34
34
  }, z.core.$catchall<z.ZodUnknown>>>>;
35
- }, 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<{
36
36
  SENDGRID_API_KEY: z.ZodString;
37
37
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
38
38
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -77,7 +77,7 @@ declare const updateTemplate: _keystrokehq_core0.Operation<z.ZodObject<{
77
77
  }>>;
78
78
  updated_at: z.ZodOptional<z.ZodString>;
79
79
  }, z.core.$catchall<z.ZodUnknown>>>>;
80
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
80
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
81
81
  SENDGRID_API_KEY: z.ZodString;
82
82
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
83
83
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -100,7 +100,7 @@ declare const deleteTemplate: _keystrokehq_core0.Operation<z.ZodObject<{
100
100
  templateId: z.ZodString;
101
101
  }, z.core.$strip>, z.ZodObject<{
102
102
  success: z.ZodBoolean;
103
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
103
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
104
104
  SENDGRID_API_KEY: z.ZodString;
105
105
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
106
106
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -145,7 +145,7 @@ declare const duplicateTemplate: _keystrokehq_core0.Operation<z.ZodObject<{
145
145
  }>>;
146
146
  updated_at: z.ZodOptional<z.ZodString>;
147
147
  }, z.core.$catchall<z.ZodUnknown>>>>;
148
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
148
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
149
149
  SENDGRID_API_KEY: z.ZodString;
150
150
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
151
151
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -189,7 +189,7 @@ declare const getTemplate: _keystrokehq_core0.Operation<z.ZodObject<{
189
189
  }>>;
190
190
  updated_at: z.ZodOptional<z.ZodString>;
191
191
  }, z.core.$catchall<z.ZodUnknown>>>>;
192
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
192
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
193
193
  SENDGRID_API_KEY: z.ZodString;
194
194
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
195
195
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -241,7 +241,7 @@ declare const listTemplates: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObj
241
241
  updated_at: z.ZodOptional<z.ZodString>;
242
242
  }, z.core.$catchall<z.ZodUnknown>>>>;
243
243
  }, z.core.$catchall<z.ZodUnknown>>>;
244
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
244
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
245
245
  SENDGRID_API_KEY: z.ZodString;
246
246
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
247
247
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -286,7 +286,7 @@ declare const createTemplateVersion: _keystrokehq_core0.Operation<z.ZodObject<{
286
286
  design: "design";
287
287
  }>>;
288
288
  updated_at: z.ZodOptional<z.ZodString>;
289
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
289
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
290
290
  SENDGRID_API_KEY: z.ZodString;
291
291
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
292
292
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -332,7 +332,7 @@ declare const updateTemplateVersion: _keystrokehq_core0.Operation<z.ZodObject<{
332
332
  design: "design";
333
333
  }>>;
334
334
  updated_at: z.ZodOptional<z.ZodString>;
335
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
335
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
336
336
  SENDGRID_API_KEY: z.ZodString;
337
337
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
338
338
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -356,7 +356,7 @@ declare const deleteTemplateVersion: _keystrokehq_core0.Operation<z.ZodObject<{
356
356
  versionId: z.ZodString;
357
357
  }, z.core.$strip>, z.ZodObject<{
358
358
  success: z.ZodBoolean;
359
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
359
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
360
360
  SENDGRID_API_KEY: z.ZodString;
361
361
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
362
362
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -392,7 +392,7 @@ declare const getTemplateVersion: _keystrokehq_core0.Operation<z.ZodObject<{
392
392
  design: "design";
393
393
  }>>;
394
394
  updated_at: z.ZodOptional<z.ZodString>;
395
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
395
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
396
396
  SENDGRID_API_KEY: z.ZodString;
397
397
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
398
398
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -428,7 +428,7 @@ declare const activateTemplateVersion: _keystrokehq_core0.Operation<z.ZodObject<
428
428
  design: "design";
429
429
  }>>;
430
430
  updated_at: z.ZodOptional<z.ZodString>;
431
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
431
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
432
432
  SENDGRID_API_KEY: z.ZodString;
433
433
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
434
434
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -15,7 +15,7 @@ declare const getUserProfile: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodOb
15
15
  state: z.ZodOptional<z.ZodString>;
16
16
  website: z.ZodOptional<z.ZodString>;
17
17
  zip: z.ZodOptional<z.ZodString>;
18
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
18
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
19
19
  SENDGRID_API_KEY: z.ZodString;
20
20
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
21
21
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -37,7 +37,7 @@ declare const getUserProfile: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodOb
37
37
  declare const getAccountInfo: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
38
38
  type: z.ZodString;
39
39
  reputation: z.ZodOptional<z.ZodNumber>;
40
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
40
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
41
41
  SENDGRID_API_KEY: z.ZodString;
42
42
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
43
43
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -58,7 +58,7 @@ declare const getAccountInfo: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodOb
58
58
  }, z.core.$strip>>[] | undefined>], undefined>;
59
59
  declare const getUserScopes: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
60
60
  scopes: z.ZodArray<z.ZodString>;
61
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
61
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
62
62
  SENDGRID_API_KEY: z.ZodString;
63
63
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
64
64
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -85,7 +85,7 @@ declare const getCreditBalance: _keystrokehq_core0.Operation<z.ZodOptional<z.Zod
85
85
  last_reset: z.ZodOptional<z.ZodString>;
86
86
  next_reset: z.ZodOptional<z.ZodString>;
87
87
  reset_frequency: z.ZodOptional<z.ZodString>;
88
- }, 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<{
89
89
  SENDGRID_API_KEY: z.ZodString;
90
90
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
91
91
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -39,7 +39,7 @@ declare const createEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
39
39
  dropped: z.ZodOptional<z.ZodBoolean>;
40
40
  oauth_client_id: z.ZodOptional<z.ZodString>;
41
41
  oauth_token_url: z.ZodOptional<z.ZodString>;
42
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
42
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
43
43
  SENDGRID_API_KEY: z.ZodString;
44
44
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
45
45
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -95,7 +95,7 @@ declare const updateEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
95
95
  dropped: z.ZodOptional<z.ZodBoolean>;
96
96
  oauth_client_id: z.ZodOptional<z.ZodString>;
97
97
  oauth_token_url: z.ZodOptional<z.ZodString>;
98
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
98
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
99
99
  SENDGRID_API_KEY: z.ZodString;
100
100
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
101
101
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -118,7 +118,7 @@ declare const deleteEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
118
118
  webhookId: z.ZodString;
119
119
  }, z.core.$strip>, z.ZodObject<{
120
120
  success: z.ZodBoolean;
121
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
121
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
122
122
  SENDGRID_API_KEY: z.ZodString;
123
123
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
124
124
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -158,7 +158,7 @@ declare const listEventWebhooks: _keystrokehq_core0.Operation<z.ZodOptional<z.Zo
158
158
  oauth_client_id: z.ZodOptional<z.ZodString>;
159
159
  oauth_token_url: z.ZodOptional<z.ZodString>;
160
160
  }, z.core.$catchall<z.ZodUnknown>>>;
161
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
161
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
162
162
  SENDGRID_API_KEY: z.ZodString;
163
163
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
164
164
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -197,7 +197,7 @@ declare const getEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
197
197
  dropped: z.ZodOptional<z.ZodBoolean>;
198
198
  oauth_client_id: z.ZodOptional<z.ZodString>;
199
199
  oauth_token_url: z.ZodOptional<z.ZodString>;
200
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
200
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
201
201
  SENDGRID_API_KEY: z.ZodString;
202
202
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
203
203
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -218,7 +218,7 @@ declare const getEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
218
218
  }, z.core.$strip>>[] | undefined>], undefined>;
219
219
  declare const getSignedPublicKey: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
220
220
  public_key: z.ZodString;
221
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
221
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
222
222
  SENDGRID_API_KEY: z.ZodString;
223
223
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
224
224
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -241,7 +241,7 @@ declare const toggleWebhookSignature: _keystrokehq_core0.Operation<z.ZodObject<{
241
241
  enabled: z.ZodBoolean;
242
242
  }, z.core.$strip>, z.ZodObject<{
243
243
  enabled: z.ZodBoolean;
244
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
244
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
245
245
  SENDGRID_API_KEY: z.ZodString;
246
246
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
247
247
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -264,7 +264,7 @@ declare const testEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
264
264
  url: z.ZodString;
265
265
  }, z.core.$strip>, z.ZodObject<{
266
266
  success: z.ZodBoolean;
267
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
267
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
268
268
  SENDGRID_API_KEY: z.ZodString;
269
269
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
270
270
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -13,7 +13,7 @@ declare const createParseSetting: _keystrokehq_core0.Operation<z.ZodObject<{
13
13
  hostname: z.ZodString;
14
14
  spam_check: z.ZodOptional<z.ZodBoolean>;
15
15
  send_raw: z.ZodOptional<z.ZodBoolean>;
16
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
16
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
17
17
  SENDGRID_API_KEY: z.ZodString;
18
18
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
19
19
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -42,7 +42,7 @@ declare const updateParseSetting: _keystrokehq_core0.Operation<z.ZodObject<{
42
42
  hostname: z.ZodString;
43
43
  spam_check: z.ZodOptional<z.ZodBoolean>;
44
44
  send_raw: z.ZodOptional<z.ZodBoolean>;
45
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
45
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
46
46
  SENDGRID_API_KEY: z.ZodString;
47
47
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
48
48
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -65,7 +65,7 @@ declare const deleteParseSetting: _keystrokehq_core0.Operation<z.ZodObject<{
65
65
  hostname: z.ZodString;
66
66
  }, z.core.$strip>, z.ZodObject<{
67
67
  success: z.ZodBoolean;
68
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
68
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
69
69
  SENDGRID_API_KEY: z.ZodString;
70
70
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
71
71
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -91,7 +91,7 @@ declare const listParseSettings: _keystrokehq_core0.Operation<z.ZodOptional<z.Zo
91
91
  spam_check: z.ZodOptional<z.ZodBoolean>;
92
92
  send_raw: z.ZodOptional<z.ZodBoolean>;
93
93
  }, z.core.$catchall<z.ZodUnknown>>>;
94
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
94
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
95
95
  SENDGRID_API_KEY: z.ZodString;
96
96
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
97
97
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -117,7 +117,7 @@ declare const getParseSetting: _keystrokehq_core0.Operation<z.ZodObject<{
117
117
  hostname: z.ZodString;
118
118
  spam_check: z.ZodOptional<z.ZodBoolean>;
119
119
  send_raw: z.ZodOptional<z.ZodBoolean>;
120
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
120
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
121
121
  SENDGRID_API_KEY: z.ZodString;
122
122
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
123
123
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -149,7 +149,7 @@ declare const getParseStats: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObj
149
149
  }, z.core.$strip>>, z.ZodArray<z.ZodObject<{
150
150
  date: z.ZodString;
151
151
  stats: z.ZodArray<z.ZodUnknown>;
152
- }, z.core.$catchall<z.ZodUnknown>>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
152
+ }, z.core.$catchall<z.ZodUnknown>>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
153
153
  SENDGRID_API_KEY: z.ZodString;
154
154
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
155
155
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/sendgrid",
3
- "version": "0.0.1",
3
+ "version": "0.0.5",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -29,10 +29,6 @@
29
29
  "types": "./dist/events.d.mts",
30
30
  "default": "./dist/events.mjs"
31
31
  },
32
- "./triggers": {
33
- "types": "./dist/triggers.d.mts",
34
- "default": "./dist/triggers.mjs"
35
- },
36
32
  "./verification": {
37
33
  "types": "./dist/verification.d.mts",
38
34
  "default": "./dist/verification.mjs"
@@ -119,27 +115,21 @@
119
115
  "README.md",
120
116
  "LICENSE"
121
117
  ],
122
- "scripts": {
123
- "typecheck": "tsgo --build",
124
- "build": "tsdown",
125
- "lint": "biome check .",
126
- "test:unit": "vitest run --passWithNoTests --project unit",
127
- "test:int": "vitest run --passWithNoTests --project int",
128
- "prepublishOnly": "pnpm build && pnpm test:unit",
129
- "lint:fix": "biome check --write ."
130
- },
131
118
  "dependencies": {
132
- "@keystrokehq/integration-authoring": "^0.0.1",
133
- "@keystrokehq/core": "^0.0.5",
119
+ "@keystrokehq/integration-authoring": "^0.0.5",
134
120
  "zod": "^4.3.6"
135
121
  },
122
+ "peerDependencies": {
123
+ "@keystrokehq/core": ">=0.0.7 <0.1.0"
124
+ },
136
125
  "devDependencies": {
137
- "@types/node": "catalog:",
138
- "@keystrokehq/test-utils": "workspace:*",
139
- "@keystrokehq/typescript-config": "workspace:*",
140
- "tsdown": "catalog:",
141
- "typescript": "catalog:",
142
- "vitest": "catalog:"
126
+ "@types/node": "^22.19.11",
127
+ "tsdown": "^0.20.3",
128
+ "typescript": "^5.9.3",
129
+ "vitest": "^4.0.18",
130
+ "@keystrokehq/core": "^0.0.7",
131
+ "@keystrokehq/test-utils": "0.0.0",
132
+ "@keystrokehq/typescript-config": "0.0.0"
143
133
  },
144
134
  "keywords": [
145
135
  "sendgrid",
@@ -158,5 +148,13 @@
158
148
  "publishConfig": {
159
149
  "access": "public",
160
150
  "registry": "https://registry.npmjs.org/"
151
+ },
152
+ "scripts": {
153
+ "typecheck": "tsgo --build",
154
+ "build": "tsdown",
155
+ "lint": "biome check .",
156
+ "test:unit": "vitest run --passWithNoTests --project unit",
157
+ "test:int": "vitest run --passWithNoTests --project int",
158
+ "lint:fix": "biome check --write ."
161
159
  }
162
- }
160
+ }
@@ -1,35 +0,0 @@
1
- import { n as sendgrid } from "./integration-CmJ2TILG.mjs";
2
- import { sendgridEventWebhookEventSchema, sendgridEventWebhookPayloadSchema, sendgridInboundParsePayloadSchema } from "./schemas/index.mjs";
3
- import { z } from "zod";
4
- import { IntegrationTriggerBindingOptions } from "@keystrokehq/integration-authoring";
5
- import { BoundTrigger, WebhookRequest } from "@keystrokehq/core";
6
- import { WebhookTriggerManifest } from "@keystrokehq/core/trigger";
7
-
8
- //#region src/triggers.d.ts
9
- type SendGridCredentialSets = readonly [typeof sendgrid];
10
- type EventPayload = z.output<typeof sendgridEventWebhookEventSchema>;
11
- type InboundParsePayload = z.output<typeof sendgridInboundParsePayloadSchema>;
12
- type EventBindingOptions<TOutput = EventPayload> = IntegrationTriggerBindingOptions<EventPayload, TOutput, WebhookRequest>;
13
- type EventBoundTrigger<TOutput = EventPayload> = BoundTrigger<z.output<typeof sendgridEventWebhookPayloadSchema>, SendGridCredentialSets, WebhookTriggerManifest, TOutput, WebhookRequest>;
14
- type InboundParseBindingOptions<TOutput = InboundParsePayload> = IntegrationTriggerBindingOptions<InboundParsePayload, TOutput, WebhookRequest>;
15
- type InboundParseBoundTrigger<TOutput = InboundParsePayload> = BoundTrigger<InboundParsePayload, SendGridCredentialSets, WebhookTriggerManifest, TOutput, WebhookRequest>;
16
- type EventBindingSurface = <TOutput = EventPayload>(options?: EventBindingOptions<TOutput>) => EventBoundTrigger<TOutput>;
17
- type InboundParseBindingSurface = <TOutput = InboundParsePayload>(options?: InboundParseBindingOptions<TOutput>) => InboundParseBoundTrigger<TOutput>;
18
- interface SendGridEventTriggerNamespace {
19
- readonly processed: EventBindingSurface;
20
- readonly dropped: EventBindingSurface;
21
- readonly deferred: EventBindingSurface;
22
- readonly delivered: EventBindingSurface;
23
- readonly bounce: EventBindingSurface;
24
- readonly open: EventBindingSurface;
25
- readonly click: EventBindingSurface;
26
- readonly spamReport: EventBindingSurface;
27
- readonly unsubscribe: EventBindingSurface;
28
- readonly groupUnsubscribe: EventBindingSurface;
29
- readonly groupResubscribe: EventBindingSurface;
30
- readonly inboundParseReceived: InboundParseBindingSurface;
31
- }
32
- declare const triggers: SendGridEventTriggerNamespace;
33
- declare const sendgridEventEventNames: readonly ["processed", "dropped", "deferred", "delivered", "bounce", "open", "click", "spam_report", "unsubscribe", "group_unsubscribe", "group_resubscribe"];
34
- //#endregion
35
- export { SendGridEventTriggerNamespace, sendgridEventEventNames, triggers };
package/dist/triggers.mjs DELETED
@@ -1,98 +0,0 @@
1
- import { t as sendgrid } from "./integration-37BovSeK.mjs";
2
- import { a as sendgridInboundParsePayloadSchema, r as sendgridEventWebhookPayloadSchema } from "./webhooks-CKdsIikb.mjs";
3
- import { sendgridEventWebhookEventNames } from "./events.mjs";
4
- import { verifyInboundParseRequest, verifySendGridEventWebhookRequest } from "./verification.mjs";
5
- import { createWebhookTriggerBindingFactory } from "@keystrokehq/integration-authoring";
6
-
7
- //#region src/triggers.ts
8
- const EVENT_ROUTE = "/sendgrid/events";
9
- const INBOUND_PARSE_ROUTE = "/sendgrid/inbound-parse";
10
- const SIGNATURE_HEADER = "x-twilio-email-event-webhook-signature";
11
- const TIMESTAMP_HEADER = "x-twilio-email-event-webhook-timestamp";
12
- function findHeader(headers, name) {
13
- const direct = headers[name] ?? headers[name.toLowerCase()];
14
- if (direct !== void 0) return direct;
15
- for (const [key, value] of Object.entries(headers)) if (key.toLowerCase() === name.toLowerCase()) return value;
16
- }
17
- function findFirstMatching(payload, event) {
18
- for (const entry of payload) if (entry.event === event) return entry;
19
- return null;
20
- }
21
- function createEventWebhookBinding(event, defaultName, defaultDescription) {
22
- return createWebhookTriggerBindingFactory({
23
- defaultName,
24
- defaultDescription,
25
- path: EVENT_ROUTE,
26
- method: "POST",
27
- payload: sendgridEventWebhookPayloadSchema,
28
- credentialSets: [sendgrid],
29
- verify: (request, ctx) => {
30
- const publicKeyPem = ctx.credentials[sendgrid.id].SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY;
31
- if (!publicKeyPem) throw new Error("SendGrid event-webhook signature key is not configured. Fetch the Ed25519 public key via `getSignedPublicKey` and store it on the connection as `SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY`.");
32
- const signature = findHeader(request.headers, SIGNATURE_HEADER);
33
- const timestamp = findHeader(request.headers, TIMESTAMP_HEADER);
34
- if (!signature || !timestamp) throw new Error("SendGrid event-webhook signature headers are missing.");
35
- if (!verifySendGridEventWebhookRequest({
36
- rawBody: request.rawBody,
37
- signature,
38
- timestamp,
39
- publicKeyPem
40
- })) throw new Error("Invalid SendGrid event-webhook signature.");
41
- },
42
- definitionFilter: (payload) => Array.isArray(payload) && payload.some((entry) => entry.event === event),
43
- mapPayload: (payload) => findFirstMatching(payload, event),
44
- idempotencyKey: (_payload, mapped) => mapped ? `${mapped.event}:${mapped.sg_event_id}` : void 0,
45
- response: { successStatus: 200 }
46
- });
47
- }
48
- const processedBinding = createEventWebhookBinding("processed", "SendGrid Event: Processed", "Fires when SendGrid accepts a message for delivery.");
49
- const droppedBinding = createEventWebhookBinding("dropped", "SendGrid Event: Dropped", "Fires when SendGrid drops a message (e.g. suppressed recipient, invalid email).");
50
- const deferredBinding = createEventWebhookBinding("deferred", "SendGrid Event: Deferred", "Fires when the receiving mail server temporarily rejects the message.");
51
- const deliveredBinding = createEventWebhookBinding("delivered", "SendGrid Event: Delivered", "Fires when the receiving mail server accepts the message.");
52
- const bounceBinding = createEventWebhookBinding("bounce", "SendGrid Event: Bounce", "Fires when the receiving mail server permanently rejects the message.");
53
- const openBinding = createEventWebhookBinding("open", "SendGrid Event: Open", "Fires when the recipient opens the message. Filter `sg_machine_open` to exclude Apple MPP cache-fetches.");
54
- const clickBinding = createEventWebhookBinding("click", "SendGrid Event: Click", "Fires when the recipient clicks a tracked link.");
55
- const spamReportBinding = createEventWebhookBinding("spam_report", "SendGrid Event: Spam Report", "Fires when the recipient marks the message as spam via the ISP feedback loop.");
56
- const unsubscribeBinding = createEventWebhookBinding("unsubscribe", "SendGrid Event: Unsubscribe", "Fires when the recipient uses one-click or List-Unsubscribe headers.");
57
- const groupUnsubscribeBinding = createEventWebhookBinding("group_unsubscribe", "SendGrid Event: Group Unsubscribe", "Fires when the recipient unsubscribes from a specific suppression group. Includes `asm_group_id`.");
58
- const groupResubscribeBinding = createEventWebhookBinding("group_resubscribe", "SendGrid Event: Group Resubscribe", "Fires when the recipient re-subscribes to a specific suppression group.");
59
- const inboundParseBinding = createWebhookTriggerBindingFactory({
60
- defaultName: "SendGrid Inbound Parse Received",
61
- defaultDescription: "Fires when SendGrid receives an email for a configured Inbound Parse hostname. Payload is multipart; key fields like `from`, `to`, `subject`, `html`, `text`, and parsed `envelope` pass through.",
62
- path: INBOUND_PARSE_ROUTE,
63
- method: "POST",
64
- payload: sendgridInboundParsePayloadSchema,
65
- credentialSets: [sendgrid],
66
- verify: (request, ctx) => {
67
- const token = ctx.credentials[sendgrid.id].SENDGRID_INBOUND_PARSE_TOKEN;
68
- if (!token) throw new Error("SendGrid Inbound Parse token is not configured. Generate one and store it on the connection as `SENDGRID_INBOUND_PARSE_TOKEN`; include it in the receiver URL path.");
69
- if (!verifyInboundParseRequest({
70
- path: request.path,
71
- expectedToken: token
72
- })) throw new Error("Invalid SendGrid Inbound Parse token in request path.");
73
- },
74
- idempotencyKey: (payload) => {
75
- const messageId = typeof payload.headers === "string" ? payload.headers.match(/Message-ID:\s*([^\r\n]+)/iu)?.[1] : void 0;
76
- if (messageId) return messageId.trim();
77
- return `${typeof payload.envelope === "string" ? payload.envelope : ""}:${typeof payload.subject === "string" ? payload.subject : ""}`.slice(0, 200);
78
- },
79
- response: { successStatus: 200 }
80
- });
81
- const triggers = Object.freeze({
82
- processed: processedBinding,
83
- dropped: droppedBinding,
84
- deferred: deferredBinding,
85
- delivered: deliveredBinding,
86
- bounce: bounceBinding,
87
- open: openBinding,
88
- click: clickBinding,
89
- spamReport: spamReportBinding,
90
- unsubscribe: unsubscribeBinding,
91
- groupUnsubscribe: groupUnsubscribeBinding,
92
- groupResubscribe: groupResubscribeBinding,
93
- inboundParseReceived: inboundParseBinding
94
- });
95
- const sendgridEventEventNames = sendgridEventWebhookEventNames;
96
-
97
- //#endregion
98
- export { sendgridEventEventNames, triggers };