@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.
- package/README.md +59 -111
- package/dist/credential-sets/index.d.mts +2 -0
- package/dist/credential-sets/index.mjs +3 -0
- package/dist/index.d.mts +4 -1
- package/dist/index.mjs +5 -1
- package/dist/operations/index.d.mts +2 -0
- package/dist/operations/index.mjs +3 -0
- package/dist/schemas/index.d.mts +5 -5
- package/dist/schemas/index.mjs +1 -1
- package/dist/{integration-DHWfpe0w.mjs → sendgrid.credential-set-CzYmlJ2Y.mjs} +9 -8
- package/dist/sendgrid.credential-set-ivRIiUDy.d.mts +32 -0
- package/dist/validate-email.operation-CCCDxLjH.mjs +4301 -0
- package/dist/validate-email.operation-DY4rCHFE.d.mts +5436 -0
- package/package.json +11 -99
- package/dist/_official/index.d.mts +0 -2
- package/dist/_official/index.mjs +0 -3
- package/dist/_runtime/index.d.mts +0 -2
- package/dist/_runtime/index.mjs +0 -3
- package/dist/alerts.d.mts +0 -147
- package/dist/alerts.mjs +0 -101
- package/dist/api-keys.d.mts +0 -105
- package/dist/api-keys.mjs +0 -113
- package/dist/client.d.mts +0 -73
- package/dist/client.mjs +0 -261
- package/dist/connection.d.mts +0 -2
- package/dist/connection.mjs +0 -3
- package/dist/domains.d.mts +0 -86
- package/dist/domains.mjs +0 -62
- package/dist/email-validation.d.mts +0 -97
- package/dist/email-validation.mjs +0 -73
- package/dist/events.d.mts +0 -69
- package/dist/events.mjs +0 -28
- package/dist/factory-7q6CQ75J.mjs +0 -25
- package/dist/integration-Cj4Xzfq_.d.mts +0 -48
- package/dist/mail-send.d.mts +0 -242
- package/dist/mail-send.mjs +0 -218
- package/dist/marketing-contacts.d.mts +0 -462
- package/dist/marketing-contacts.mjs +0 -277
- package/dist/marketing-customfields.d.mts +0 -66
- package/dist/marketing-customfields.mjs +0 -70
- package/dist/marketing-lists.d.mts +0 -120
- package/dist/marketing-lists.mjs +0 -130
- package/dist/marketing-segments.d.mts +0 -249
- package/dist/marketing-segments.mjs +0 -179
- package/dist/marketing-singlesends.d.mts +0 -521
- package/dist/marketing-singlesends.mjs +0 -277
- package/dist/operations.d.mts +0 -25
- package/dist/operations.mjs +0 -69
- package/dist/sender-identities.d.mts +0 -163
- package/dist/sender-identities.mjs +0 -109
- package/dist/senders.d.mts +0 -181
- package/dist/senders.mjs +0 -83
- package/dist/shared-CQ8JFNXi.mjs +0 -13
- package/dist/stats.d.mts +0 -169
- package/dist/stats.mjs +0 -107
- package/dist/suppressions.d.mts +0 -505
- package/dist/suppressions.mjs +0 -539
- package/dist/templates.d.mts +0 -351
- package/dist/templates.mjs +0 -238
- package/dist/user-account.d.mts +0 -71
- package/dist/user-account.mjs +0 -59
- package/dist/verification.d.mts +0 -67
- package/dist/verification.mjs +0 -72
- package/dist/webhooks/event.d.mts +0 -214
- package/dist/webhooks/event.mjs +0 -147
- package/dist/webhooks/parse.d.mts +0 -117
- package/dist/webhooks/parse.mjs +0 -125
- /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.
|
|
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
|
-
"./
|
|
13
|
-
"types": "./dist/
|
|
14
|
-
"default": "./dist/
|
|
12
|
+
"./credential-sets": {
|
|
13
|
+
"types": "./dist/credential-sets/index.d.mts",
|
|
14
|
+
"default": "./dist/credential-sets/index.mjs"
|
|
15
15
|
},
|
|
16
|
-
"./
|
|
17
|
-
"types": "./dist/
|
|
18
|
-
"default": "./dist/
|
|
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": [
|
|
@@ -116,20 +28,20 @@
|
|
|
116
28
|
"LICENSE"
|
|
117
29
|
],
|
|
118
30
|
"dependencies": {
|
|
119
|
-
"@keystrokehq/integration-authoring": "^0.0.9",
|
|
120
31
|
"zod": "^4.3.6"
|
|
121
32
|
},
|
|
122
33
|
"peerDependencies": {
|
|
123
|
-
"@keystrokehq/core": ">=0.0.
|
|
34
|
+
"@keystrokehq/core": ">=0.0.8 <0.1.0"
|
|
124
35
|
},
|
|
125
36
|
"devDependencies": {
|
|
126
37
|
"@types/node": "^22.19.11",
|
|
127
38
|
"tsdown": "^0.20.3",
|
|
128
39
|
"typescript": "^5.9.3",
|
|
129
40
|
"vitest": "^4.0.18",
|
|
130
|
-
"@keystrokehq/core": "^0.0.
|
|
41
|
+
"@keystrokehq/core": "^0.0.12",
|
|
131
42
|
"@keystrokehq/test-utils": "0.0.0",
|
|
132
|
-
"@keystrokehq/typescript-config": "0.0.0"
|
|
43
|
+
"@keystrokehq/typescript-config": "0.0.0",
|
|
44
|
+
"@keystrokehq/integration-authoring": "0.0.9"
|
|
133
45
|
},
|
|
134
46
|
"keywords": [
|
|
135
47
|
"sendgrid",
|
package/dist/_official/index.mjs
DELETED
package/dist/_runtime/index.mjs
DELETED
package/dist/alerts.d.mts
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
|
-
|
|
4
|
-
//#region src/alerts.d.ts
|
|
5
|
-
declare const createAlert: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
6
|
-
type: z.ZodEnum<{
|
|
7
|
-
usage_limit: "usage_limit";
|
|
8
|
-
stats_notification: "stats_notification";
|
|
9
|
-
}>;
|
|
10
|
-
emailTo: z.ZodString;
|
|
11
|
-
frequency: z.ZodOptional<z.ZodEnum<{
|
|
12
|
-
daily: "daily";
|
|
13
|
-
weekly: "weekly";
|
|
14
|
-
monthly: "monthly";
|
|
15
|
-
}>>;
|
|
16
|
-
percentage: z.ZodOptional<z.ZodNumber>;
|
|
17
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
18
|
-
id: z.ZodNumber;
|
|
19
|
-
type: z.ZodEnum<{
|
|
20
|
-
usage_limit: "usage_limit";
|
|
21
|
-
stats_notification: "stats_notification";
|
|
22
|
-
}>;
|
|
23
|
-
email_to: z.ZodOptional<z.ZodString>;
|
|
24
|
-
frequency: z.ZodOptional<z.ZodEnum<{
|
|
25
|
-
daily: "daily";
|
|
26
|
-
weekly: "weekly";
|
|
27
|
-
monthly: "monthly";
|
|
28
|
-
}>>;
|
|
29
|
-
percentage: z.ZodOptional<z.ZodNumber>;
|
|
30
|
-
created_at: z.ZodOptional<z.ZodNumber>;
|
|
31
|
-
updated_at: z.ZodOptional<z.ZodNumber>;
|
|
32
|
-
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
|
|
33
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
34
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
35
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
36
|
-
global: "global";
|
|
37
|
-
eu: "eu";
|
|
38
|
-
}>>;
|
|
39
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
40
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
41
|
-
}, z.core.$strip>>], undefined>;
|
|
42
|
-
declare const updateAlert: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
43
|
-
type: z.ZodOptional<z.ZodEnum<{
|
|
44
|
-
usage_limit: "usage_limit";
|
|
45
|
-
stats_notification: "stats_notification";
|
|
46
|
-
}>>;
|
|
47
|
-
emailTo: z.ZodOptional<z.ZodString>;
|
|
48
|
-
frequency: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
49
|
-
daily: "daily";
|
|
50
|
-
weekly: "weekly";
|
|
51
|
-
monthly: "monthly";
|
|
52
|
-
}>>>;
|
|
53
|
-
percentage: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
54
|
-
alertId: z.ZodNumber;
|
|
55
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
-
id: z.ZodNumber;
|
|
57
|
-
type: z.ZodEnum<{
|
|
58
|
-
usage_limit: "usage_limit";
|
|
59
|
-
stats_notification: "stats_notification";
|
|
60
|
-
}>;
|
|
61
|
-
email_to: z.ZodOptional<z.ZodString>;
|
|
62
|
-
frequency: z.ZodOptional<z.ZodEnum<{
|
|
63
|
-
daily: "daily";
|
|
64
|
-
weekly: "weekly";
|
|
65
|
-
monthly: "monthly";
|
|
66
|
-
}>>;
|
|
67
|
-
percentage: z.ZodOptional<z.ZodNumber>;
|
|
68
|
-
created_at: z.ZodOptional<z.ZodNumber>;
|
|
69
|
-
updated_at: z.ZodOptional<z.ZodNumber>;
|
|
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 deleteAlert: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
81
|
-
alertId: z.ZodNumber;
|
|
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 getAlert: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
95
|
-
alertId: z.ZodNumber;
|
|
96
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
97
|
-
id: z.ZodNumber;
|
|
98
|
-
type: z.ZodEnum<{
|
|
99
|
-
usage_limit: "usage_limit";
|
|
100
|
-
stats_notification: "stats_notification";
|
|
101
|
-
}>;
|
|
102
|
-
email_to: z.ZodOptional<z.ZodString>;
|
|
103
|
-
frequency: z.ZodOptional<z.ZodEnum<{
|
|
104
|
-
daily: "daily";
|
|
105
|
-
weekly: "weekly";
|
|
106
|
-
monthly: "monthly";
|
|
107
|
-
}>>;
|
|
108
|
-
percentage: z.ZodOptional<z.ZodNumber>;
|
|
109
|
-
created_at: z.ZodOptional<z.ZodNumber>;
|
|
110
|
-
updated_at: z.ZodOptional<z.ZodNumber>;
|
|
111
|
-
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
|
|
112
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
113
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
114
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
115
|
-
global: "global";
|
|
116
|
-
eu: "eu";
|
|
117
|
-
}>>;
|
|
118
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
119
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
120
|
-
}, z.core.$strip>>], undefined>;
|
|
121
|
-
declare const listAlerts: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodArray<z.ZodObject<{
|
|
122
|
-
id: z.ZodNumber;
|
|
123
|
-
type: z.ZodEnum<{
|
|
124
|
-
usage_limit: "usage_limit";
|
|
125
|
-
stats_notification: "stats_notification";
|
|
126
|
-
}>;
|
|
127
|
-
email_to: z.ZodOptional<z.ZodString>;
|
|
128
|
-
frequency: z.ZodOptional<z.ZodEnum<{
|
|
129
|
-
daily: "daily";
|
|
130
|
-
weekly: "weekly";
|
|
131
|
-
monthly: "monthly";
|
|
132
|
-
}>>;
|
|
133
|
-
percentage: z.ZodOptional<z.ZodNumber>;
|
|
134
|
-
created_at: z.ZodOptional<z.ZodNumber>;
|
|
135
|
-
updated_at: z.ZodOptional<z.ZodNumber>;
|
|
136
|
-
}, z.core.$catchall<z.ZodUnknown>>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
|
|
137
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
138
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
139
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
140
|
-
global: "global";
|
|
141
|
-
eu: "eu";
|
|
142
|
-
}>>;
|
|
143
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
144
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
145
|
-
}, z.core.$strip>>], undefined>;
|
|
146
|
-
//#endregion
|
|
147
|
-
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-7q6CQ75J.mjs";
|
|
2
|
-
import { n as omitUndefined } from "./shared-CQ8JFNXi.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 };
|
package/dist/api-keys.d.mts
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
3
|
-
|
|
4
|
-
//#region src/api-keys.d.ts
|
|
5
|
-
declare const createApiKey: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
6
|
-
name: z.ZodString;
|
|
7
|
-
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
8
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
9
|
-
api_key_id: z.ZodString;
|
|
10
|
-
name: z.ZodString;
|
|
11
|
-
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12
|
-
api_key: z.ZodOptional<z.ZodString>;
|
|
13
|
-
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
|
|
14
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
15
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
16
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
17
|
-
global: "global";
|
|
18
|
-
eu: "eu";
|
|
19
|
-
}>>;
|
|
20
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
21
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
22
|
-
}, z.core.$strip>>], undefined>;
|
|
23
|
-
declare const listApiKeys: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
|
|
24
|
-
result: z.ZodArray<z.ZodObject<{
|
|
25
|
-
api_key_id: z.ZodString;
|
|
26
|
-
name: z.ZodString;
|
|
27
|
-
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
28
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
29
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
|
|
30
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
31
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
32
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
33
|
-
global: "global";
|
|
34
|
-
eu: "eu";
|
|
35
|
-
}>>;
|
|
36
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
37
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
38
|
-
}, z.core.$strip>>], undefined>;
|
|
39
|
-
declare const getApiKey: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
40
|
-
apiKeyId: z.ZodString;
|
|
41
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
42
|
-
api_key_id: z.ZodString;
|
|
43
|
-
name: z.ZodString;
|
|
44
|
-
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
45
|
-
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
|
|
46
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
47
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
48
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
49
|
-
global: "global";
|
|
50
|
-
eu: "eu";
|
|
51
|
-
}>>;
|
|
52
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
53
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
54
|
-
}, z.core.$strip>>], undefined>;
|
|
55
|
-
declare const updateApiKeyName: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
56
|
-
apiKeyId: z.ZodString;
|
|
57
|
-
name: z.ZodString;
|
|
58
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
-
api_key_id: z.ZodString;
|
|
60
|
-
name: z.ZodString;
|
|
61
|
-
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
62
|
-
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
|
|
63
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
64
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
65
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
66
|
-
global: "global";
|
|
67
|
-
eu: "eu";
|
|
68
|
-
}>>;
|
|
69
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
70
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
71
|
-
}, z.core.$strip>>], undefined>;
|
|
72
|
-
declare const updateApiKeyNameAndScopes: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
73
|
-
apiKeyId: z.ZodString;
|
|
74
|
-
name: z.ZodString;
|
|
75
|
-
scopes: z.ZodArray<z.ZodString>;
|
|
76
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
77
|
-
api_key_id: z.ZodString;
|
|
78
|
-
name: z.ZodString;
|
|
79
|
-
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
80
|
-
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke: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>>], undefined>;
|
|
90
|
-
declare const deleteApiKey: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
91
|
-
apiKeyId: z.ZodString;
|
|
92
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
93
|
-
success: z.ZodBoolean;
|
|
94
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
|
|
95
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
96
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
97
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
98
|
-
global: "global";
|
|
99
|
-
eu: "eu";
|
|
100
|
-
}>>;
|
|
101
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
102
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
103
|
-
}, z.core.$strip>>], undefined>;
|
|
104
|
-
//#endregion
|
|
105
|
-
export { createApiKey, deleteApiKey, getApiKey, listApiKeys, updateApiKeyName, updateApiKeyNameAndScopes };
|
package/dist/api-keys.mjs
DELETED
|
@@ -1,113 +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 { Qt as sendgridApiKeyWithKeySchema, Xt as sendgridApiKeySchema, Yt as sendgridApiKeyListSchema, on as sendgridIdSchema } from "./webhooks-CKdsIikb.mjs";
|
|
5
|
-
import { z } from "zod";
|
|
6
|
-
|
|
7
|
-
//#region src/api-keys.ts
|
|
8
|
-
var api_keys_exports = /* @__PURE__ */ __exportAll({
|
|
9
|
-
createApiKey: () => createApiKey,
|
|
10
|
-
deleteApiKey: () => deleteApiKey,
|
|
11
|
-
getApiKey: () => getApiKey,
|
|
12
|
-
listApiKeys: () => listApiKeys,
|
|
13
|
-
updateApiKeyName: () => updateApiKeyName,
|
|
14
|
-
updateApiKeyNameAndScopes: () => updateApiKeyNameAndScopes
|
|
15
|
-
});
|
|
16
|
-
const createApiKey = sendgridOperation({
|
|
17
|
-
id: "sendgrid.create-api-key",
|
|
18
|
-
name: "Create API Key",
|
|
19
|
-
description: "Create a new SendGrid API key. Returns the full key value only at creation time — store it safely.",
|
|
20
|
-
input: z.object({
|
|
21
|
-
name: z.string().min(1),
|
|
22
|
-
scopes: z.array(z.string()).optional()
|
|
23
|
-
}),
|
|
24
|
-
output: sendgridApiKeyWithKeySchema,
|
|
25
|
-
needsApproval: true,
|
|
26
|
-
run: async (input, credentials) => {
|
|
27
|
-
const response = await createSendGridClient(credentials).request("/api_keys", {
|
|
28
|
-
method: "POST",
|
|
29
|
-
body: omitUndefined({
|
|
30
|
-
name: input.name,
|
|
31
|
-
scopes: input.scopes
|
|
32
|
-
})
|
|
33
|
-
});
|
|
34
|
-
return sendgridApiKeyWithKeySchema.parse(response);
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
const listApiKeys = sendgridOperation({
|
|
38
|
-
id: "sendgrid.list-api-keys",
|
|
39
|
-
name: "List API Keys",
|
|
40
|
-
description: "List all API keys on the account (values are not returned).",
|
|
41
|
-
input: z.object({}).optional(),
|
|
42
|
-
output: sendgridApiKeyListSchema,
|
|
43
|
-
run: async (_input, credentials) => {
|
|
44
|
-
const response = await createSendGridClient(credentials).request("/api_keys");
|
|
45
|
-
return sendgridApiKeyListSchema.parse(response ?? { result: [] });
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
const getApiKey = sendgridOperation({
|
|
49
|
-
id: "sendgrid.get-api-key",
|
|
50
|
-
name: "Get API Key",
|
|
51
|
-
description: "Retrieve an API key record by ID (the secret value is never returned).",
|
|
52
|
-
input: z.object({ apiKeyId: sendgridIdSchema }),
|
|
53
|
-
output: sendgridApiKeySchema,
|
|
54
|
-
run: async (input, credentials) => {
|
|
55
|
-
const response = await createSendGridClient(credentials).request(`/api_keys/${encodeURIComponent(input.apiKeyId)}`);
|
|
56
|
-
return sendgridApiKeySchema.parse(response);
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
const updateApiKeyName = sendgridOperation({
|
|
60
|
-
id: "sendgrid.update-api-key-name",
|
|
61
|
-
name: "Update API Key Name",
|
|
62
|
-
description: "Rename an API key without changing its scopes.",
|
|
63
|
-
input: z.object({
|
|
64
|
-
apiKeyId: sendgridIdSchema,
|
|
65
|
-
name: z.string().min(1)
|
|
66
|
-
}),
|
|
67
|
-
output: sendgridApiKeySchema,
|
|
68
|
-
needsApproval: true,
|
|
69
|
-
run: async (input, credentials) => {
|
|
70
|
-
const response = await createSendGridClient(credentials).request(`/api_keys/${encodeURIComponent(input.apiKeyId)}`, {
|
|
71
|
-
method: "PATCH",
|
|
72
|
-
body: { name: input.name }
|
|
73
|
-
});
|
|
74
|
-
return sendgridApiKeySchema.parse(response);
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
const updateApiKeyNameAndScopes = sendgridOperation({
|
|
78
|
-
id: "sendgrid.update-api-key-name-and-scopes",
|
|
79
|
-
name: "Update API Key Name and Scopes",
|
|
80
|
-
description: "Update an API key by replacing the full set of scopes.",
|
|
81
|
-
input: z.object({
|
|
82
|
-
apiKeyId: sendgridIdSchema,
|
|
83
|
-
name: z.string().min(1),
|
|
84
|
-
scopes: z.array(z.string()).min(1)
|
|
85
|
-
}),
|
|
86
|
-
output: sendgridApiKeySchema,
|
|
87
|
-
needsApproval: true,
|
|
88
|
-
run: async (input, credentials) => {
|
|
89
|
-
const response = await createSendGridClient(credentials).request(`/api_keys/${encodeURIComponent(input.apiKeyId)}`, {
|
|
90
|
-
method: "PUT",
|
|
91
|
-
body: {
|
|
92
|
-
name: input.name,
|
|
93
|
-
scopes: input.scopes
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
return sendgridApiKeySchema.parse(response);
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
const deleteApiKey = sendgridOperation({
|
|
100
|
-
id: "sendgrid.delete-api-key",
|
|
101
|
-
name: "Delete API Key",
|
|
102
|
-
description: "Delete (revoke) an API key.",
|
|
103
|
-
input: z.object({ apiKeyId: sendgridIdSchema }),
|
|
104
|
-
output: z.object({ success: z.boolean() }),
|
|
105
|
-
needsApproval: true,
|
|
106
|
-
run: async (input, credentials) => {
|
|
107
|
-
await createSendGridClient(credentials).request(`/api_keys/${encodeURIComponent(input.apiKeyId)}`, { method: "DELETE" });
|
|
108
|
-
return { success: true };
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
//#endregion
|
|
113
|
-
export { createApiKey, deleteApiKey, getApiKey, listApiKeys, api_keys_exports as t, updateApiKeyName, updateApiKeyNameAndScopes };
|