@keystrokehq/sendgrid 0.0.7 → 0.0.9
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/dist/_official/index.d.mts +1 -1
- package/dist/_official/index.mjs +1 -1
- package/dist/alerts.d.mts +6 -6
- package/dist/alerts.mjs +7 -7
- package/dist/api-keys.d.mts +7 -7
- package/dist/api-keys.mjs +8 -8
- package/dist/client.d.mts +1 -1
- package/dist/client.mjs +2 -3
- package/dist/connection.d.mts +1 -1
- package/dist/connection.mjs +1 -1
- package/dist/domains.d.mts +4 -4
- package/dist/domains.mjs +5 -5
- package/dist/email-validation.d.mts +6 -6
- package/dist/email-validation.mjs +6 -6
- package/dist/{factory-BSL0D2L0.mjs → factory-CToXR1jp.mjs} +1 -2
- package/dist/integration-C9EALG65.mjs +113 -0
- package/dist/{integration-DpbPKcSF.d.mts → integration-zx-jmybs.d.mts} +3 -4
- package/dist/mail-send.d.mts +9 -9
- package/dist/mail-send.mjs +10 -10
- package/dist/marketing-contacts.d.mts +17 -17
- package/dist/marketing-contacts.mjs +18 -18
- package/dist/marketing-customfields.d.mts +4 -4
- package/dist/marketing-customfields.mjs +4 -4
- package/dist/marketing-lists.d.mts +8 -8
- package/dist/marketing-lists.mjs +9 -9
- package/dist/marketing-segments.d.mts +11 -11
- package/dist/marketing-segments.mjs +12 -12
- package/dist/marketing-singlesends.d.mts +17 -17
- package/dist/marketing-singlesends.mjs +16 -16
- package/dist/sender-identities.d.mts +7 -7
- package/dist/sender-identities.mjs +7 -7
- package/dist/senders.d.mts +6 -6
- package/dist/senders.mjs +6 -6
- package/dist/shared-BayZ0Lt6.mjs +46 -0
- package/dist/stats.d.mts +7 -7
- package/dist/stats.mjs +7 -7
- package/dist/suppressions.d.mts +32 -32
- package/dist/suppressions.mjs +33 -33
- package/dist/templates.d.mts +12 -12
- package/dist/templates.mjs +13 -13
- package/dist/user-account.d.mts +5 -5
- package/dist/user-account.mjs +5 -5
- package/dist/webhooks/event.d.mts +9 -9
- package/dist/webhooks/event.mjs +10 -10
- package/dist/webhooks/parse.d.mts +7 -7
- package/dist/webhooks/parse.mjs +8 -8
- package/package.json +4 -4
- package/dist/integration-37BovSeK.mjs +0 -23
- package/dist/shared-CQ8JFNXi.mjs +0 -13
package/dist/webhooks/event.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __exportAll, t as sendgridOperation } from "../factory-
|
|
2
|
-
import { n as omitUndefined } from "../shared-
|
|
1
|
+
import { n as __exportAll, t as sendgridOperation } from "../factory-CToXR1jp.mjs";
|
|
2
|
+
import { n as omitUndefined } from "../shared-BayZ0Lt6.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";
|
|
@@ -36,7 +36,7 @@ const eventWebhookInputSchema = z.object({
|
|
|
36
36
|
oauth_token_url: z.string().optional()
|
|
37
37
|
});
|
|
38
38
|
const createEventWebhook = sendgridOperation({
|
|
39
|
-
id: "
|
|
39
|
+
id: "sendgrid.create-event-webhook",
|
|
40
40
|
name: "Create Event Webhook",
|
|
41
41
|
description: "Register a new Event Webhook endpoint.",
|
|
42
42
|
input: eventWebhookInputSchema,
|
|
@@ -51,7 +51,7 @@ const createEventWebhook = sendgridOperation({
|
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
const updateEventWebhook = sendgridOperation({
|
|
54
|
-
id: "
|
|
54
|
+
id: "sendgrid.update-event-webhook",
|
|
55
55
|
name: "Update Event Webhook",
|
|
56
56
|
description: "Update an Event Webhook endpoint.",
|
|
57
57
|
input: eventWebhookInputSchema.partial().extend({ webhookId }),
|
|
@@ -68,7 +68,7 @@ const updateEventWebhook = sendgridOperation({
|
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
70
|
const deleteEventWebhook = sendgridOperation({
|
|
71
|
-
id: "
|
|
71
|
+
id: "sendgrid.delete-event-webhook",
|
|
72
72
|
name: "Delete Event Webhook",
|
|
73
73
|
description: "Delete an Event Webhook endpoint.",
|
|
74
74
|
input: z.object({ webhookId }),
|
|
@@ -80,7 +80,7 @@ const deleteEventWebhook = sendgridOperation({
|
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
const listEventWebhooks = sendgridOperation({
|
|
83
|
-
id: "
|
|
83
|
+
id: "sendgrid.list-event-webhooks",
|
|
84
84
|
name: "List Event Webhooks",
|
|
85
85
|
description: "List all Event Webhook endpoints configured on the account.",
|
|
86
86
|
input: z.object({}).optional(),
|
|
@@ -91,7 +91,7 @@ const listEventWebhooks = sendgridOperation({
|
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
const getEventWebhook = sendgridOperation({
|
|
94
|
-
id: "
|
|
94
|
+
id: "sendgrid.get-event-webhook",
|
|
95
95
|
name: "Get Event Webhook",
|
|
96
96
|
description: "Retrieve a single Event Webhook endpoint by ID.",
|
|
97
97
|
input: z.object({ webhookId }),
|
|
@@ -102,7 +102,7 @@ const getEventWebhook = sendgridOperation({
|
|
|
102
102
|
}
|
|
103
103
|
});
|
|
104
104
|
const getSignedPublicKey = sendgridOperation({
|
|
105
|
-
id: "
|
|
105
|
+
id: "sendgrid.get-signed-public-key",
|
|
106
106
|
name: "Get Signed Event Webhook Public Key",
|
|
107
107
|
description: "Retrieve the Ed25519 public key used to verify signed Event Webhook POSTs. Cache + rotate on `toggle_webhook_signature`.",
|
|
108
108
|
input: z.object({}).optional(),
|
|
@@ -113,7 +113,7 @@ const getSignedPublicKey = sendgridOperation({
|
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
115
|
const toggleWebhookSignature = sendgridOperation({
|
|
116
|
-
id: "
|
|
116
|
+
id: "sendgrid.toggle-webhook-signature",
|
|
117
117
|
name: "Toggle Webhook Signature",
|
|
118
118
|
description: "Enable or disable Ed25519 signing on Event Webhook deliveries.",
|
|
119
119
|
input: z.object({ enabled: z.boolean() }),
|
|
@@ -128,7 +128,7 @@ const toggleWebhookSignature = sendgridOperation({
|
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
130
|
const testEventWebhook = sendgridOperation({
|
|
131
|
-
id: "
|
|
131
|
+
id: "sendgrid.test-event-webhook",
|
|
132
132
|
name: "Test Event Webhook",
|
|
133
133
|
description: "Ask SendGrid to POST a test payload to the configured Event Webhook URL.",
|
|
134
134
|
input: z.object({ url: z.string().url() }),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
|
|
3
|
-
import * as _keystrokehq_core0 from "@keystrokehq/core";
|
|
4
4
|
|
|
5
5
|
//#region src/webhooks/parse.d.ts
|
|
6
6
|
declare const createParseSetting: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
@@ -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<"
|
|
16
|
+
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"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<"
|
|
45
|
+
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"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<"
|
|
68
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"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<"
|
|
94
|
+
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"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<"
|
|
120
|
+
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"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<"
|
|
152
|
+
}, z.core.$catchall<z.ZodUnknown>>>, readonly [_keystrokehq_core0.CredentialSet<"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/dist/webhooks/parse.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __exportAll, t as sendgridOperation } from "../factory-
|
|
2
|
-
import { n as omitUndefined } from "../shared-
|
|
1
|
+
import { n as __exportAll, t as sendgridOperation } from "../factory-CToXR1jp.mjs";
|
|
2
|
+
import { n as omitUndefined } from "../shared-BayZ0Lt6.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";
|
|
@@ -21,7 +21,7 @@ const parseInputSchema = z.object({
|
|
|
21
21
|
sendRaw: z.boolean().optional()
|
|
22
22
|
});
|
|
23
23
|
const createParseSetting = sendgridOperation({
|
|
24
|
-
id: "
|
|
24
|
+
id: "sendgrid.create-parse-setting",
|
|
25
25
|
name: "Create Inbound Parse Setting",
|
|
26
26
|
description: "Configure an Inbound Parse hostname + receiver URL.",
|
|
27
27
|
input: parseInputSchema,
|
|
@@ -41,7 +41,7 @@ const createParseSetting = sendgridOperation({
|
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
const updateParseSetting = sendgridOperation({
|
|
44
|
-
id: "
|
|
44
|
+
id: "sendgrid.update-parse-setting",
|
|
45
45
|
name: "Update Inbound Parse Setting",
|
|
46
46
|
description: "Update an Inbound Parse configuration (by hostname).",
|
|
47
47
|
input: parseInputSchema.partial().extend({ hostname }),
|
|
@@ -60,7 +60,7 @@ const updateParseSetting = sendgridOperation({
|
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
const deleteParseSetting = sendgridOperation({
|
|
63
|
-
id: "
|
|
63
|
+
id: "sendgrid.delete-parse-setting",
|
|
64
64
|
name: "Delete Inbound Parse Setting",
|
|
65
65
|
description: "Remove an Inbound Parse configuration by hostname.",
|
|
66
66
|
input: z.object({ hostname }),
|
|
@@ -72,7 +72,7 @@ const deleteParseSetting = sendgridOperation({
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
const listParseSettings = sendgridOperation({
|
|
75
|
-
id: "
|
|
75
|
+
id: "sendgrid.list-parse-settings",
|
|
76
76
|
name: "List Inbound Parse Settings",
|
|
77
77
|
description: "List all Inbound Parse configurations on the account.",
|
|
78
78
|
input: z.object({}).optional(),
|
|
@@ -83,7 +83,7 @@ const listParseSettings = sendgridOperation({
|
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
const getParseSetting = sendgridOperation({
|
|
86
|
-
id: "
|
|
86
|
+
id: "sendgrid.get-parse-setting",
|
|
87
87
|
name: "Get Inbound Parse Setting",
|
|
88
88
|
description: "Retrieve a single Inbound Parse configuration.",
|
|
89
89
|
input: z.object({ hostname }),
|
|
@@ -94,7 +94,7 @@ const getParseSetting = sendgridOperation({
|
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
const getParseStats = sendgridOperation({
|
|
97
|
-
id: "
|
|
97
|
+
id: "sendgrid.get-parse-stats",
|
|
98
98
|
name: "Get Inbound Parse Stats",
|
|
99
99
|
description: "Retrieve Inbound Parse statistics.",
|
|
100
100
|
input: z.object({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keystrokehq/sendgrid",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -116,7 +116,6 @@
|
|
|
116
116
|
"LICENSE"
|
|
117
117
|
],
|
|
118
118
|
"dependencies": {
|
|
119
|
-
"@keystrokehq/integration-authoring": "^0.0.7",
|
|
120
119
|
"zod": "^4.3.6"
|
|
121
120
|
},
|
|
122
121
|
"peerDependencies": {
|
|
@@ -127,9 +126,10 @@
|
|
|
127
126
|
"tsdown": "^0.20.3",
|
|
128
127
|
"typescript": "^5.9.3",
|
|
129
128
|
"vitest": "^4.0.18",
|
|
130
|
-
"@keystrokehq/core": "^0.0.
|
|
129
|
+
"@keystrokehq/core": "^0.0.12",
|
|
130
|
+
"@keystrokehq/typescript-config": "0.0.0",
|
|
131
131
|
"@keystrokehq/test-utils": "0.0.0",
|
|
132
|
-
"@keystrokehq/
|
|
132
|
+
"@keystrokehq/integration-authoring": "0.0.9"
|
|
133
133
|
},
|
|
134
134
|
"keywords": [
|
|
135
135
|
"sendgrid",
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { defineOfficialIntegration } from "@keystrokehq/integration-authoring/official";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
//#region src/integration.ts
|
|
5
|
-
const sendgridAuthSchema = z.object({
|
|
6
|
-
SENDGRID_API_KEY: z.string().min(1).regex(/^SG\./u, "SendGrid API keys start with \"SG.\""),
|
|
7
|
-
SENDGRID_SUBUSER: z.string().min(1).optional(),
|
|
8
|
-
SENDGRID_ACCOUNT_REGION: z.enum(["global", "eu"]).default("global"),
|
|
9
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.string().min(1).optional(),
|
|
10
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.string().min(1).optional()
|
|
11
|
-
});
|
|
12
|
-
const sendgridOfficialIntegration = {
|
|
13
|
-
id: "sendgrid",
|
|
14
|
-
name: "SendGrid",
|
|
15
|
-
description: "SendGrid (Twilio) transactional + marketing email, templates, contacts, lists, segments, deliverability, and webhook helpers for Keystroke workflows",
|
|
16
|
-
auth: sendgridAuthSchema,
|
|
17
|
-
proxy: { hosts: ["api.sendgrid.com", "api.eu.sendgrid.com"] }
|
|
18
|
-
};
|
|
19
|
-
const sendgridBundle = defineOfficialIntegration(sendgridOfficialIntegration);
|
|
20
|
-
const sendgrid = sendgridBundle.credentialSet;
|
|
21
|
-
|
|
22
|
-
//#endregion
|
|
23
|
-
export { sendgridBundle as n, sendgridOfficialIntegration as r, sendgrid as t };
|
package/dist/shared-CQ8JFNXi.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
//#region src/shared.ts
|
|
2
|
-
function asRecord(value) {
|
|
3
|
-
return typeof value === "object" && value !== null ? value : {};
|
|
4
|
-
}
|
|
5
|
-
function stringIfPresent(value) {
|
|
6
|
-
return typeof value === "string" && value.length > 0 ? value : void 0;
|
|
7
|
-
}
|
|
8
|
-
function omitUndefined(value) {
|
|
9
|
-
return Object.fromEntries(Object.entries(value).filter(([, entry]) => entry !== void 0));
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
export { omitUndefined as n, stringIfPresent as r, asRecord as t };
|