@keystrokehq/sendgrid 0.0.9 → 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 (69) 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 +8 -8
  9. package/dist/schemas/index.mjs +1 -1
  10. package/dist/sendgrid.credential-set-CzYmlJ2Y.mjs +25 -0
  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 +8 -96
  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 -193
  20. package/dist/alerts.mjs +0 -101
  21. package/dist/api-keys.d.mts +0 -160
  22. package/dist/api-keys.mjs +0 -113
  23. package/dist/client.d.mts +0 -73
  24. package/dist/client.mjs +0 -260
  25. package/dist/connection.d.mts +0 -2
  26. package/dist/connection.mjs +0 -3
  27. package/dist/domains.d.mts +0 -114
  28. package/dist/domains.mjs +0 -62
  29. package/dist/email-validation.d.mts +0 -134
  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-CToXR1jp.mjs +0 -24
  34. package/dist/integration-C9EALG65.mjs +0 -113
  35. package/dist/integration-zx-jmybs.d.mts +0 -56
  36. package/dist/mail-send.d.mts +0 -315
  37. package/dist/mail-send.mjs +0 -218
  38. package/dist/marketing-contacts.d.mts +0 -607
  39. package/dist/marketing-contacts.mjs +0 -277
  40. package/dist/marketing-customfields.d.mts +0 -94
  41. package/dist/marketing-customfields.mjs +0 -70
  42. package/dist/marketing-lists.d.mts +0 -184
  43. package/dist/marketing-lists.mjs +0 -130
  44. package/dist/marketing-segments.d.mts +0 -340
  45. package/dist/marketing-segments.mjs +0 -179
  46. package/dist/marketing-singlesends.d.mts +0 -648
  47. package/dist/marketing-singlesends.mjs +0 -277
  48. package/dist/operations.d.mts +0 -25
  49. package/dist/operations.mjs +0 -69
  50. package/dist/sender-identities.d.mts +0 -218
  51. package/dist/sender-identities.mjs +0 -109
  52. package/dist/senders.d.mts +0 -227
  53. package/dist/senders.mjs +0 -83
  54. package/dist/shared-BayZ0Lt6.mjs +0 -46
  55. package/dist/stats.d.mts +0 -215
  56. package/dist/stats.mjs +0 -107
  57. package/dist/suppressions.d.mts +0 -785
  58. package/dist/suppressions.mjs +0 -539
  59. package/dist/templates.d.mts +0 -451
  60. package/dist/templates.mjs +0 -238
  61. package/dist/user-account.d.mts +0 -108
  62. package/dist/user-account.mjs +0 -59
  63. package/dist/verification.d.mts +0 -67
  64. package/dist/verification.mjs +0 -72
  65. package/dist/webhooks/event.d.mts +0 -287
  66. package/dist/webhooks/event.mjs +0 -147
  67. package/dist/webhooks/parse.d.mts +0 -172
  68. package/dist/webhooks/parse.mjs +0 -125
  69. /package/dist/{webhooks-CKdsIikb.mjs → webhooks-dVOd93Hd.mjs} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/sendgrid",
3
- "version": "0.0.9",
3
+ "version": "0.0.16-integration-id-canonicalization.0",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -9,105 +9,17 @@
9
9
  "types": "./dist/index.d.mts",
10
10
  "default": "./dist/index.mjs"
11
11
  },
12
- "./connection": {
13
- "types": "./dist/connection.d.mts",
14
- "default": "./dist/connection.mjs"
12
+ "./credential-sets": {
13
+ "types": "./dist/credential-sets/index.d.mts",
14
+ "default": "./dist/credential-sets/index.mjs"
15
15
  },
16
- "./client": {
17
- "types": "./dist/client.d.mts",
18
- "default": "./dist/client.mjs"
16
+ "./operations": {
17
+ "types": "./dist/operations/index.d.mts",
18
+ "default": "./dist/operations/index.mjs"
19
19
  },
20
20
  "./schemas": {
21
21
  "types": "./dist/schemas/index.d.mts",
22
22
  "default": "./dist/schemas/index.mjs"
23
- },
24
- "./_official": {
25
- "types": "./dist/_official/index.d.mts",
26
- "default": "./dist/_official/index.mjs"
27
- },
28
- "./events": {
29
- "types": "./dist/events.d.mts",
30
- "default": "./dist/events.mjs"
31
- },
32
- "./verification": {
33
- "types": "./dist/verification.d.mts",
34
- "default": "./dist/verification.mjs"
35
- },
36
- "./mail-send": {
37
- "types": "./dist/mail-send.d.mts",
38
- "default": "./dist/mail-send.mjs"
39
- },
40
- "./templates": {
41
- "types": "./dist/templates.d.mts",
42
- "default": "./dist/templates.mjs"
43
- },
44
- "./marketing-contacts": {
45
- "types": "./dist/marketing-contacts.d.mts",
46
- "default": "./dist/marketing-contacts.mjs"
47
- },
48
- "./marketing-lists": {
49
- "types": "./dist/marketing-lists.d.mts",
50
- "default": "./dist/marketing-lists.mjs"
51
- },
52
- "./marketing-segments": {
53
- "types": "./dist/marketing-segments.d.mts",
54
- "default": "./dist/marketing-segments.mjs"
55
- },
56
- "./marketing-singlesends": {
57
- "types": "./dist/marketing-singlesends.d.mts",
58
- "default": "./dist/marketing-singlesends.mjs"
59
- },
60
- "./marketing-customfields": {
61
- "types": "./dist/marketing-customfields.d.mts",
62
- "default": "./dist/marketing-customfields.mjs"
63
- },
64
- "./senders": {
65
- "types": "./dist/senders.d.mts",
66
- "default": "./dist/senders.mjs"
67
- },
68
- "./sender-identities": {
69
- "types": "./dist/sender-identities.d.mts",
70
- "default": "./dist/sender-identities.mjs"
71
- },
72
- "./suppressions": {
73
- "types": "./dist/suppressions.d.mts",
74
- "default": "./dist/suppressions.mjs"
75
- },
76
- "./email-validation": {
77
- "types": "./dist/email-validation.d.mts",
78
- "default": "./dist/email-validation.mjs"
79
- },
80
- "./stats": {
81
- "types": "./dist/stats.d.mts",
82
- "default": "./dist/stats.mjs"
83
- },
84
- "./user-account": {
85
- "types": "./dist/user-account.d.mts",
86
- "default": "./dist/user-account.mjs"
87
- },
88
- "./alerts": {
89
- "types": "./dist/alerts.d.mts",
90
- "default": "./dist/alerts.mjs"
91
- },
92
- "./domains": {
93
- "types": "./dist/domains.d.mts",
94
- "default": "./dist/domains.mjs"
95
- },
96
- "./api-keys": {
97
- "types": "./dist/api-keys.d.mts",
98
- "default": "./dist/api-keys.mjs"
99
- },
100
- "./webhooks/event": {
101
- "types": "./dist/webhooks/event.d.mts",
102
- "default": "./dist/webhooks/event.mjs"
103
- },
104
- "./webhooks/parse": {
105
- "types": "./dist/webhooks/parse.d.mts",
106
- "default": "./dist/webhooks/parse.mjs"
107
- },
108
- "./_runtime": {
109
- "types": "./dist/_runtime/index.d.mts",
110
- "default": "./dist/_runtime/index.mjs"
111
23
  }
112
24
  },
113
25
  "files": [
@@ -127,8 +39,8 @@
127
39
  "typescript": "^5.9.3",
128
40
  "vitest": "^4.0.18",
129
41
  "@keystrokehq/core": "^0.0.12",
130
- "@keystrokehq/typescript-config": "0.0.0",
131
42
  "@keystrokehq/test-utils": "0.0.0",
43
+ "@keystrokehq/typescript-config": "0.0.0",
132
44
  "@keystrokehq/integration-authoring": "0.0.9"
133
45
  },
134
46
  "keywords": [
@@ -1,2 +0,0 @@
1
- import { i as sendgridOfficialIntegration, r as sendgridBundle } from "../integration-zx-jmybs.mjs";
2
- export { sendgridBundle, sendgridOfficialIntegration };
@@ -1,3 +0,0 @@
1
- import { n as sendgridBundle, r as sendgridOfficialIntegration } from "../integration-C9EALG65.mjs";
2
-
3
- export { sendgridBundle, sendgridOfficialIntegration };
@@ -1,2 +0,0 @@
1
- import { sendgridOperationCount, sendgridOperationIds, sendgridOperations } from "../operations.mjs";
2
- export { sendgridOperationCount, sendgridOperationIds, sendgridOperations };
@@ -1,3 +0,0 @@
1
- import { sendgridOperationCount, sendgridOperationIds, sendgridOperations } from "../operations.mjs";
2
-
3
- export { sendgridOperationCount, sendgridOperationIds, sendgridOperations };
package/dist/alerts.d.mts DELETED
@@ -1,193 +0,0 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
- import { z } from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
-
5
- //#region src/alerts.d.ts
6
- declare const createAlert: _keystrokehq_core0.Operation<z.ZodObject<{
7
- type: z.ZodEnum<{
8
- usage_limit: "usage_limit";
9
- stats_notification: "stats_notification";
10
- }>;
11
- emailTo: z.ZodString;
12
- frequency: z.ZodOptional<z.ZodEnum<{
13
- daily: "daily";
14
- weekly: "weekly";
15
- monthly: "monthly";
16
- }>>;
17
- percentage: z.ZodOptional<z.ZodNumber>;
18
- }, z.core.$strip>, z.ZodObject<{
19
- id: z.ZodNumber;
20
- type: z.ZodEnum<{
21
- usage_limit: "usage_limit";
22
- stats_notification: "stats_notification";
23
- }>;
24
- email_to: z.ZodOptional<z.ZodString>;
25
- frequency: z.ZodOptional<z.ZodEnum<{
26
- daily: "daily";
27
- weekly: "weekly";
28
- monthly: "monthly";
29
- }>>;
30
- percentage: z.ZodOptional<z.ZodNumber>;
31
- created_at: z.ZodOptional<z.ZodNumber>;
32
- updated_at: z.ZodOptional<z.ZodNumber>;
33
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
34
- SENDGRID_API_KEY: z.ZodString;
35
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
36
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
37
- global: "global";
38
- eu: "eu";
39
- }>>;
40
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
41
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
42
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<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>], undefined>;
52
- declare const updateAlert: _keystrokehq_core0.Operation<z.ZodObject<{
53
- type: z.ZodOptional<z.ZodEnum<{
54
- usage_limit: "usage_limit";
55
- stats_notification: "stats_notification";
56
- }>>;
57
- emailTo: z.ZodOptional<z.ZodString>;
58
- frequency: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
59
- daily: "daily";
60
- weekly: "weekly";
61
- monthly: "monthly";
62
- }>>>;
63
- percentage: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
64
- alertId: z.ZodNumber;
65
- }, z.core.$strip>, z.ZodObject<{
66
- id: z.ZodNumber;
67
- type: z.ZodEnum<{
68
- usage_limit: "usage_limit";
69
- stats_notification: "stats_notification";
70
- }>;
71
- email_to: z.ZodOptional<z.ZodString>;
72
- frequency: z.ZodOptional<z.ZodEnum<{
73
- daily: "daily";
74
- weekly: "weekly";
75
- monthly: "monthly";
76
- }>>;
77
- percentage: z.ZodOptional<z.ZodNumber>;
78
- created_at: z.ZodOptional<z.ZodNumber>;
79
- updated_at: z.ZodOptional<z.ZodNumber>;
80
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
81
- SENDGRID_API_KEY: z.ZodString;
82
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
83
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
84
- global: "global";
85
- eu: "eu";
86
- }>>;
87
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
88
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
89
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
90
- SENDGRID_API_KEY: z.ZodString;
91
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
92
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
93
- global: "global";
94
- eu: "eu";
95
- }>>;
96
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
97
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
98
- }, z.core.$strip>>[] | undefined>], undefined>;
99
- declare const deleteAlert: _keystrokehq_core0.Operation<z.ZodObject<{
100
- alertId: z.ZodNumber;
101
- }, z.core.$strip>, z.ZodObject<{
102
- success: z.ZodBoolean;
103
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", 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>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
113
- SENDGRID_API_KEY: z.ZodString;
114
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
115
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
116
- global: "global";
117
- eu: "eu";
118
- }>>;
119
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
120
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
121
- }, z.core.$strip>>[] | undefined>], undefined>;
122
- declare const getAlert: _keystrokehq_core0.Operation<z.ZodObject<{
123
- alertId: z.ZodNumber;
124
- }, z.core.$strip>, z.ZodObject<{
125
- id: z.ZodNumber;
126
- type: z.ZodEnum<{
127
- usage_limit: "usage_limit";
128
- stats_notification: "stats_notification";
129
- }>;
130
- email_to: z.ZodOptional<z.ZodString>;
131
- frequency: z.ZodOptional<z.ZodEnum<{
132
- daily: "daily";
133
- weekly: "weekly";
134
- monthly: "monthly";
135
- }>>;
136
- percentage: z.ZodOptional<z.ZodNumber>;
137
- created_at: z.ZodOptional<z.ZodNumber>;
138
- updated_at: z.ZodOptional<z.ZodNumber>;
139
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
140
- SENDGRID_API_KEY: z.ZodString;
141
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
142
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
143
- global: "global";
144
- eu: "eu";
145
- }>>;
146
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
147
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
148
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
149
- SENDGRID_API_KEY: z.ZodString;
150
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
151
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
152
- global: "global";
153
- eu: "eu";
154
- }>>;
155
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
156
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
157
- }, z.core.$strip>>[] | undefined>], undefined>;
158
- declare const listAlerts: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodArray<z.ZodObject<{
159
- id: z.ZodNumber;
160
- type: z.ZodEnum<{
161
- usage_limit: "usage_limit";
162
- stats_notification: "stats_notification";
163
- }>;
164
- email_to: z.ZodOptional<z.ZodString>;
165
- frequency: z.ZodOptional<z.ZodEnum<{
166
- daily: "daily";
167
- weekly: "weekly";
168
- monthly: "monthly";
169
- }>>;
170
- percentage: z.ZodOptional<z.ZodNumber>;
171
- created_at: z.ZodOptional<z.ZodNumber>;
172
- updated_at: z.ZodOptional<z.ZodNumber>;
173
- }, z.core.$catchall<z.ZodUnknown>>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
174
- SENDGRID_API_KEY: z.ZodString;
175
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
176
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
177
- global: "global";
178
- eu: "eu";
179
- }>>;
180
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
181
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
182
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
183
- SENDGRID_API_KEY: z.ZodString;
184
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
185
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
186
- global: "global";
187
- eu: "eu";
188
- }>>;
189
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
190
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
191
- }, z.core.$strip>>[] | undefined>], undefined>;
192
- //#endregion
193
- export { createAlert, deleteAlert, getAlert, listAlerts, updateAlert };
package/dist/alerts.mjs DELETED
@@ -1,101 +0,0 @@
1
- import { n as __exportAll, t as sendgridOperation } from "./factory-CToXR1jp.mjs";
2
- import { n as omitUndefined } from "./shared-BayZ0Lt6.mjs";
3
- import { createSendGridClient } from "./client.mjs";
4
- import { $t as sendgridAlertFrequencySchema, en as sendgridAlertListSchema, in as sendgridEmailSchema, nn as sendgridAlertTypeSchema, tn as sendgridAlertSchema } from "./webhooks-CKdsIikb.mjs";
5
- import { z } from "zod";
6
-
7
- //#region src/alerts.ts
8
- var alerts_exports = /* @__PURE__ */ __exportAll({
9
- createAlert: () => createAlert,
10
- deleteAlert: () => deleteAlert,
11
- getAlert: () => getAlert,
12
- listAlerts: () => listAlerts,
13
- updateAlert: () => updateAlert
14
- });
15
- const alertId = z.number().int().positive();
16
- const alertInput = z.object({
17
- type: sendgridAlertTypeSchema,
18
- emailTo: sendgridEmailSchema,
19
- frequency: sendgridAlertFrequencySchema.optional(),
20
- percentage: z.number().int().min(1).max(100).optional()
21
- });
22
- function mapAlertInput(input) {
23
- return omitUndefined({
24
- type: input.type,
25
- email_to: input.emailTo,
26
- frequency: input.frequency,
27
- percentage: input.percentage
28
- });
29
- }
30
- const createAlert = sendgridOperation({
31
- id: "sendgrid.create-alert",
32
- name: "Create Alert",
33
- description: "Create a stats-notification or usage-limit alert.",
34
- input: alertInput,
35
- output: sendgridAlertSchema,
36
- needsApproval: true,
37
- run: async (input, credentials) => {
38
- const response = await createSendGridClient(credentials).request("/alerts", {
39
- method: "POST",
40
- body: mapAlertInput(input)
41
- });
42
- return sendgridAlertSchema.parse(response);
43
- }
44
- });
45
- const updateAlert = sendgridOperation({
46
- id: "sendgrid.update-alert",
47
- name: "Update Alert",
48
- description: "Update an alert.",
49
- input: alertInput.partial().extend({ alertId }),
50
- output: sendgridAlertSchema,
51
- needsApproval: true,
52
- run: async (input, credentials) => {
53
- const response = await createSendGridClient(credentials).request(`/alerts/${input.alertId}`, {
54
- method: "PATCH",
55
- body: omitUndefined({
56
- type: input.type,
57
- email_to: input.emailTo,
58
- frequency: input.frequency,
59
- percentage: input.percentage
60
- })
61
- });
62
- return sendgridAlertSchema.parse(response);
63
- }
64
- });
65
- const deleteAlert = sendgridOperation({
66
- id: "sendgrid.delete-alert",
67
- name: "Delete Alert",
68
- description: "Delete an alert.",
69
- input: z.object({ alertId }),
70
- output: z.object({ success: z.boolean() }),
71
- needsApproval: true,
72
- run: async (input, credentials) => {
73
- await createSendGridClient(credentials).request(`/alerts/${input.alertId}`, { method: "DELETE" });
74
- return { success: true };
75
- }
76
- });
77
- const getAlert = sendgridOperation({
78
- id: "sendgrid.get-alert",
79
- name: "Get Alert",
80
- description: "Retrieve a single alert by ID.",
81
- input: z.object({ alertId }),
82
- output: sendgridAlertSchema,
83
- run: async (input, credentials) => {
84
- const response = await createSendGridClient(credentials).request(`/alerts/${input.alertId}`);
85
- return sendgridAlertSchema.parse(response);
86
- }
87
- });
88
- const listAlerts = sendgridOperation({
89
- id: "sendgrid.list-alerts",
90
- name: "List Alerts",
91
- description: "List all configured alerts.",
92
- input: z.object({}).optional(),
93
- output: sendgridAlertListSchema,
94
- run: async (_input, credentials) => {
95
- const response = await createSendGridClient(credentials).request("/alerts");
96
- return sendgridAlertListSchema.parse(response ?? []);
97
- }
98
- });
99
-
100
- //#endregion
101
- export { createAlert, deleteAlert, getAlert, listAlerts, alerts_exports as t, updateAlert };
@@ -1,160 +0,0 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
- import { z } from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
-
5
- //#region src/api-keys.d.ts
6
- declare const createApiKey: _keystrokehq_core0.Operation<z.ZodObject<{
7
- name: z.ZodString;
8
- scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
9
- }, z.core.$strip>, z.ZodObject<{
10
- api_key_id: z.ZodString;
11
- name: z.ZodString;
12
- scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
13
- api_key: z.ZodOptional<z.ZodString>;
14
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
15
- SENDGRID_API_KEY: z.ZodString;
16
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
17
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
18
- global: "global";
19
- eu: "eu";
20
- }>>;
21
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
22
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
23
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
24
- SENDGRID_API_KEY: z.ZodString;
25
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
26
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
27
- global: "global";
28
- eu: "eu";
29
- }>>;
30
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
31
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
32
- }, z.core.$strip>>[] | undefined>], undefined>;
33
- declare const listApiKeys: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
34
- result: z.ZodArray<z.ZodObject<{
35
- api_key_id: z.ZodString;
36
- name: z.ZodString;
37
- scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
38
- }, z.core.$catchall<z.ZodUnknown>>>;
39
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
40
- SENDGRID_API_KEY: z.ZodString;
41
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
42
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
43
- global: "global";
44
- eu: "eu";
45
- }>>;
46
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
47
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
48
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
49
- SENDGRID_API_KEY: z.ZodString;
50
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
51
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
52
- global: "global";
53
- eu: "eu";
54
- }>>;
55
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
56
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
57
- }, z.core.$strip>>[] | undefined>], undefined>;
58
- declare const getApiKey: _keystrokehq_core0.Operation<z.ZodObject<{
59
- apiKeyId: z.ZodString;
60
- }, z.core.$strip>, z.ZodObject<{
61
- api_key_id: z.ZodString;
62
- name: z.ZodString;
63
- scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
64
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
65
- SENDGRID_API_KEY: z.ZodString;
66
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
67
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
68
- global: "global";
69
- eu: "eu";
70
- }>>;
71
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
72
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
73
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
74
- SENDGRID_API_KEY: z.ZodString;
75
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
76
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
77
- global: "global";
78
- eu: "eu";
79
- }>>;
80
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
81
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
82
- }, z.core.$strip>>[] | undefined>], undefined>;
83
- declare const updateApiKeyName: _keystrokehq_core0.Operation<z.ZodObject<{
84
- apiKeyId: z.ZodString;
85
- name: z.ZodString;
86
- }, z.core.$strip>, z.ZodObject<{
87
- api_key_id: z.ZodString;
88
- name: z.ZodString;
89
- scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
90
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
91
- SENDGRID_API_KEY: z.ZodString;
92
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
93
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
94
- global: "global";
95
- eu: "eu";
96
- }>>;
97
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
98
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
99
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
100
- SENDGRID_API_KEY: z.ZodString;
101
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
102
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
103
- global: "global";
104
- eu: "eu";
105
- }>>;
106
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
107
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
108
- }, z.core.$strip>>[] | undefined>], undefined>;
109
- declare const updateApiKeyNameAndScopes: _keystrokehq_core0.Operation<z.ZodObject<{
110
- apiKeyId: z.ZodString;
111
- name: z.ZodString;
112
- scopes: z.ZodArray<z.ZodString>;
113
- }, z.core.$strip>, z.ZodObject<{
114
- api_key_id: z.ZodString;
115
- name: z.ZodString;
116
- scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
117
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
118
- SENDGRID_API_KEY: z.ZodString;
119
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
120
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
121
- global: "global";
122
- eu: "eu";
123
- }>>;
124
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
125
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
126
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
127
- SENDGRID_API_KEY: z.ZodString;
128
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
129
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
130
- global: "global";
131
- eu: "eu";
132
- }>>;
133
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
134
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
135
- }, z.core.$strip>>[] | undefined>], undefined>;
136
- declare const deleteApiKey: _keystrokehq_core0.Operation<z.ZodObject<{
137
- apiKeyId: z.ZodString;
138
- }, z.core.$strip>, z.ZodObject<{
139
- success: z.ZodBoolean;
140
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
141
- SENDGRID_API_KEY: z.ZodString;
142
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
143
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
144
- global: "global";
145
- eu: "eu";
146
- }>>;
147
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
148
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
149
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
150
- SENDGRID_API_KEY: z.ZodString;
151
- SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
152
- SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
153
- global: "global";
154
- eu: "eu";
155
- }>>;
156
- SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
157
- SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
158
- }, z.core.$strip>>[] | undefined>], undefined>;
159
- //#endregion
160
- export { createApiKey, deleteApiKey, getApiKey, listApiKeys, updateApiKeyName, updateApiKeyNameAndScopes };