@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.
- 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 +8 -8
- package/dist/schemas/index.mjs +1 -1
- package/dist/sendgrid.credential-set-CzYmlJ2Y.mjs +25 -0
- 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 +8 -96
- 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 -193
- package/dist/alerts.mjs +0 -101
- package/dist/api-keys.d.mts +0 -160
- package/dist/api-keys.mjs +0 -113
- package/dist/client.d.mts +0 -73
- package/dist/client.mjs +0 -260
- package/dist/connection.d.mts +0 -2
- package/dist/connection.mjs +0 -3
- package/dist/domains.d.mts +0 -114
- package/dist/domains.mjs +0 -62
- package/dist/email-validation.d.mts +0 -134
- package/dist/email-validation.mjs +0 -73
- package/dist/events.d.mts +0 -69
- package/dist/events.mjs +0 -28
- package/dist/factory-CToXR1jp.mjs +0 -24
- package/dist/integration-C9EALG65.mjs +0 -113
- package/dist/integration-zx-jmybs.d.mts +0 -56
- package/dist/mail-send.d.mts +0 -315
- package/dist/mail-send.mjs +0 -218
- package/dist/marketing-contacts.d.mts +0 -607
- package/dist/marketing-contacts.mjs +0 -277
- package/dist/marketing-customfields.d.mts +0 -94
- package/dist/marketing-customfields.mjs +0 -70
- package/dist/marketing-lists.d.mts +0 -184
- package/dist/marketing-lists.mjs +0 -130
- package/dist/marketing-segments.d.mts +0 -340
- package/dist/marketing-segments.mjs +0 -179
- package/dist/marketing-singlesends.d.mts +0 -648
- 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 -218
- package/dist/sender-identities.mjs +0 -109
- package/dist/senders.d.mts +0 -227
- package/dist/senders.mjs +0 -83
- package/dist/shared-BayZ0Lt6.mjs +0 -46
- package/dist/stats.d.mts +0 -215
- package/dist/stats.mjs +0 -107
- package/dist/suppressions.d.mts +0 -785
- package/dist/suppressions.mjs +0 -539
- package/dist/templates.d.mts +0 -451
- package/dist/templates.mjs +0 -238
- package/dist/user-account.d.mts +0 -108
- 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 -287
- package/dist/webhooks/event.mjs +0 -147
- package/dist/webhooks/parse.d.mts +0 -172
- package/dist/webhooks/parse.mjs +0 -125
- /package/dist/{webhooks-CKdsIikb.mjs → webhooks-dVOd93Hd.mjs} +0 -0
package/dist/user-account.d.mts
DELETED
|
@@ -1,108 +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/user-account.d.ts
|
|
6
|
-
declare const getUserProfile: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
|
|
7
|
-
address: z.ZodOptional<z.ZodString>;
|
|
8
|
-
address2: z.ZodOptional<z.ZodString>;
|
|
9
|
-
city: z.ZodOptional<z.ZodString>;
|
|
10
|
-
company: z.ZodOptional<z.ZodString>;
|
|
11
|
-
country: z.ZodOptional<z.ZodString>;
|
|
12
|
-
first_name: z.ZodOptional<z.ZodString>;
|
|
13
|
-
last_name: z.ZodOptional<z.ZodString>;
|
|
14
|
-
phone: z.ZodOptional<z.ZodString>;
|
|
15
|
-
state: z.ZodOptional<z.ZodString>;
|
|
16
|
-
website: z.ZodOptional<z.ZodString>;
|
|
17
|
-
zip: z.ZodOptional<z.ZodString>;
|
|
18
|
-
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
|
|
19
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
20
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
21
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
22
|
-
global: "global";
|
|
23
|
-
eu: "eu";
|
|
24
|
-
}>>;
|
|
25
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
26
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
27
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
28
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
29
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
30
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
31
|
-
global: "global";
|
|
32
|
-
eu: "eu";
|
|
33
|
-
}>>;
|
|
34
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
35
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
36
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
37
|
-
declare const getAccountInfo: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
|
|
38
|
-
type: z.ZodString;
|
|
39
|
-
reputation: z.ZodOptional<z.ZodNumber>;
|
|
40
|
-
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
|
|
41
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
42
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
43
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
44
|
-
global: "global";
|
|
45
|
-
eu: "eu";
|
|
46
|
-
}>>;
|
|
47
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
48
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
49
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
50
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
51
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
52
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
53
|
-
global: "global";
|
|
54
|
-
eu: "eu";
|
|
55
|
-
}>>;
|
|
56
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
57
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
58
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
59
|
-
declare const getUserScopes: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
|
|
60
|
-
scopes: z.ZodArray<z.ZodString>;
|
|
61
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
|
|
62
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
63
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
64
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
65
|
-
global: "global";
|
|
66
|
-
eu: "eu";
|
|
67
|
-
}>>;
|
|
68
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
69
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
70
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<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>], undefined>;
|
|
80
|
-
declare const getCreditBalance: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
|
|
81
|
-
remain: z.ZodOptional<z.ZodNumber>;
|
|
82
|
-
total: z.ZodOptional<z.ZodNumber>;
|
|
83
|
-
overage: z.ZodOptional<z.ZodNumber>;
|
|
84
|
-
used: z.ZodOptional<z.ZodNumber>;
|
|
85
|
-
last_reset: z.ZodOptional<z.ZodString>;
|
|
86
|
-
next_reset: z.ZodOptional<z.ZodString>;
|
|
87
|
-
reset_frequency: z.ZodOptional<z.ZodString>;
|
|
88
|
-
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
|
|
89
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
90
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
91
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
92
|
-
global: "global";
|
|
93
|
-
eu: "eu";
|
|
94
|
-
}>>;
|
|
95
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
96
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
97
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
98
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
99
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
100
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
101
|
-
global: "global";
|
|
102
|
-
eu: "eu";
|
|
103
|
-
}>>;
|
|
104
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
105
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
106
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
107
|
-
//#endregion
|
|
108
|
-
export { getAccountInfo, getCreditBalance, getUserProfile, getUserScopes };
|
package/dist/user-account.mjs
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { n as __exportAll, t as sendgridOperation } from "./factory-CToXR1jp.mjs";
|
|
2
|
-
import { createSendGridClient } from "./client.mjs";
|
|
3
|
-
import { f as sendgridAccountInfoSchema, g as sendgridUserProfileSchema, m as sendgridScopesSchema, p as sendgridCreditBalanceSchema } from "./webhooks-CKdsIikb.mjs";
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
|
|
6
|
-
//#region src/user-account.ts
|
|
7
|
-
var user_account_exports = /* @__PURE__ */ __exportAll({
|
|
8
|
-
getAccountInfo: () => getAccountInfo,
|
|
9
|
-
getCreditBalance: () => getCreditBalance,
|
|
10
|
-
getUserProfile: () => getUserProfile,
|
|
11
|
-
getUserScopes: () => getUserScopes
|
|
12
|
-
});
|
|
13
|
-
const getUserProfile = sendgridOperation({
|
|
14
|
-
id: "sendgrid.get-user-profile",
|
|
15
|
-
name: "Get User Profile",
|
|
16
|
-
description: "Retrieve the account profile (name, company, mailing address).",
|
|
17
|
-
input: z.object({}).optional(),
|
|
18
|
-
output: sendgridUserProfileSchema,
|
|
19
|
-
run: async (_input, credentials) => {
|
|
20
|
-
const response = await createSendGridClient(credentials).request("/user/profile");
|
|
21
|
-
return sendgridUserProfileSchema.parse(response);
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
const getAccountInfo = sendgridOperation({
|
|
25
|
-
id: "sendgrid.get-account-info",
|
|
26
|
-
name: "Get Account Info",
|
|
27
|
-
description: "Retrieve account type + reputation score.",
|
|
28
|
-
input: z.object({}).optional(),
|
|
29
|
-
output: sendgridAccountInfoSchema,
|
|
30
|
-
run: async (_input, credentials) => {
|
|
31
|
-
const response = await createSendGridClient(credentials).request("/user/account");
|
|
32
|
-
return sendgridAccountInfoSchema.parse(response);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
const getUserScopes = sendgridOperation({
|
|
36
|
-
id: "sendgrid.get-user-scopes",
|
|
37
|
-
name: "Get User Scopes",
|
|
38
|
-
description: "Retrieve the list of API scopes the current API key has access to.",
|
|
39
|
-
input: z.object({}).optional(),
|
|
40
|
-
output: sendgridScopesSchema,
|
|
41
|
-
run: async (_input, credentials) => {
|
|
42
|
-
const response = await createSendGridClient(credentials).request("/scopes");
|
|
43
|
-
return sendgridScopesSchema.parse(response);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
const getCreditBalance = sendgridOperation({
|
|
47
|
-
id: "sendgrid.get-credit-balance",
|
|
48
|
-
name: "Get Credit Balance",
|
|
49
|
-
description: "Retrieve the current SendGrid credit balance for the account.",
|
|
50
|
-
input: z.object({}).optional(),
|
|
51
|
-
output: sendgridCreditBalanceSchema,
|
|
52
|
-
run: async (_input, credentials) => {
|
|
53
|
-
const response = await createSendGridClient(credentials).request("/user/credits");
|
|
54
|
-
return sendgridCreditBalanceSchema.parse(response);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
//#endregion
|
|
59
|
-
export { getAccountInfo, getCreditBalance, getUserProfile, getUserScopes, user_account_exports as t };
|
package/dist/verification.d.mts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { sendgridEventWebhookPayloadSchema } from "./schemas/index.mjs";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
//#region src/verification.d.ts
|
|
5
|
-
declare const SENDGRID_EVENT_SIGNATURE_HEADER = "x-twilio-email-event-webhook-signature";
|
|
6
|
-
declare const SENDGRID_EVENT_TIMESTAMP_HEADER = "x-twilio-email-event-webhook-timestamp";
|
|
7
|
-
interface SendGridEventWebhookVerifyInput {
|
|
8
|
-
/** Raw request body bytes (not a JSON-reparsed string). */
|
|
9
|
-
readonly rawBody: string | Uint8Array;
|
|
10
|
-
/** Value of the `X-Twilio-Email-Event-Webhook-Signature` header. */
|
|
11
|
-
readonly signature: string;
|
|
12
|
-
/** Value of the `X-Twilio-Email-Event-Webhook-Timestamp` header. */
|
|
13
|
-
readonly timestamp: string;
|
|
14
|
-
/** Ed25519 public key in PEM form (as returned by `GET /v3/user/webhooks/event/settings/signed`). */
|
|
15
|
-
readonly publicKeyPem: string;
|
|
16
|
-
/** Maximum allowed clock skew between provider and verifier, in seconds. Defaults to 300s. */
|
|
17
|
-
readonly toleranceSeconds?: number;
|
|
18
|
-
/** Override `now` in tests. Defaults to `Date.now()`. */
|
|
19
|
-
readonly now?: () => number;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Verify a SendGrid Event Webhook request. Returns `true` for a valid signature.
|
|
23
|
-
*
|
|
24
|
-
* SendGrid signs `timestamp + rawBody` with Ed25519. The public key rotates when
|
|
25
|
-
* `TOGGLE_WEBHOOK_SIGNATURE` is toggled, so callers should cache + refresh on
|
|
26
|
-
* verification failures.
|
|
27
|
-
*/
|
|
28
|
-
declare function verifySendGridEventWebhookRequest(input: SendGridEventWebhookVerifyInput): boolean;
|
|
29
|
-
declare function parseSendGridEventWebhookBody(rawBody: string | Uint8Array): z.output<typeof sendgridEventWebhookPayloadSchema>;
|
|
30
|
-
interface SendGridInboundParseVerifyInput {
|
|
31
|
-
/** Full URL path the request arrived at (including any Keystroke-minted token). */
|
|
32
|
-
readonly path: string;
|
|
33
|
-
/** Expected Keystroke-minted parse token (from `SENDGRID_INBOUND_PARSE_TOKEN`). */
|
|
34
|
-
readonly expectedToken: string;
|
|
35
|
-
/** Optional IP allowlist (SendGrid publishes the IP range for Inbound Parse). */
|
|
36
|
-
readonly sourceIp?: string;
|
|
37
|
-
readonly allowedIps?: readonly string[];
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Verify an Inbound Parse request.
|
|
41
|
-
*
|
|
42
|
-
* SendGrid does NOT sign Inbound Parse payloads. Verification uses a Keystroke-minted
|
|
43
|
-
* token embedded in the receiver URL, plus an optional IP allowlist check. This is
|
|
44
|
-
* weaker than the Event Webhook's Ed25519 verification — callers are encouraged to
|
|
45
|
-
* rotate `expectedToken` periodically.
|
|
46
|
-
*/
|
|
47
|
-
declare function verifyInboundParseRequest(input: SendGridInboundParseVerifyInput): boolean;
|
|
48
|
-
declare const sendgridInboundParseBodySchema: z.ZodObject<{
|
|
49
|
-
headers: z.ZodOptional<z.ZodString>;
|
|
50
|
-
dkim: z.ZodOptional<z.ZodString>;
|
|
51
|
-
to: z.ZodOptional<z.ZodString>;
|
|
52
|
-
from: z.ZodOptional<z.ZodString>;
|
|
53
|
-
subject: z.ZodOptional<z.ZodString>;
|
|
54
|
-
html: z.ZodOptional<z.ZodString>;
|
|
55
|
-
text: z.ZodOptional<z.ZodString>;
|
|
56
|
-
envelope: z.ZodOptional<z.ZodString>;
|
|
57
|
-
charsets: z.ZodOptional<z.ZodString>;
|
|
58
|
-
SPF: z.ZodOptional<z.ZodString>;
|
|
59
|
-
spam_score: z.ZodOptional<z.ZodString>;
|
|
60
|
-
spam_report: z.ZodOptional<z.ZodString>;
|
|
61
|
-
sender_ip: z.ZodOptional<z.ZodString>;
|
|
62
|
-
attachments: z.ZodOptional<z.ZodString>;
|
|
63
|
-
'attachment-info': z.ZodOptional<z.ZodString>;
|
|
64
|
-
email: z.ZodOptional<z.ZodString>;
|
|
65
|
-
}, z.core.$catchall<z.ZodUnknown>>;
|
|
66
|
-
//#endregion
|
|
67
|
-
export { SENDGRID_EVENT_SIGNATURE_HEADER, SENDGRID_EVENT_TIMESTAMP_HEADER, SendGridEventWebhookVerifyInput, SendGridInboundParseVerifyInput, parseSendGridEventWebhookBody, sendgridInboundParseBodySchema, verifyInboundParseRequest, verifySendGridEventWebhookRequest };
|
package/dist/verification.mjs
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { a as sendgridInboundParsePayloadSchema, r as sendgridEventWebhookPayloadSchema } from "./webhooks-CKdsIikb.mjs";
|
|
2
|
-
import { createPublicKey, createVerify, verify } from "node:crypto";
|
|
3
|
-
|
|
4
|
-
//#region src/verification.ts
|
|
5
|
-
const SENDGRID_EVENT_SIGNATURE_HEADER = "x-twilio-email-event-webhook-signature";
|
|
6
|
-
const SENDGRID_EVENT_TIMESTAMP_HEADER = "x-twilio-email-event-webhook-timestamp";
|
|
7
|
-
/**
|
|
8
|
-
* Verify a SendGrid Event Webhook request. Returns `true` for a valid signature.
|
|
9
|
-
*
|
|
10
|
-
* SendGrid signs `timestamp + rawBody` with Ed25519. The public key rotates when
|
|
11
|
-
* `TOGGLE_WEBHOOK_SIGNATURE` is toggled, so callers should cache + refresh on
|
|
12
|
-
* verification failures.
|
|
13
|
-
*/
|
|
14
|
-
function verifySendGridEventWebhookRequest(input) {
|
|
15
|
-
const tolerance = input.toleranceSeconds ?? 300;
|
|
16
|
-
const nowMs = (input.now ?? Date.now)();
|
|
17
|
-
const timestampSeconds = Number(input.timestamp);
|
|
18
|
-
if (!Number.isFinite(timestampSeconds)) return false;
|
|
19
|
-
if (Math.abs(nowMs / 1e3 - timestampSeconds) > tolerance) return false;
|
|
20
|
-
let publicKey;
|
|
21
|
-
try {
|
|
22
|
-
publicKey = createPublicKey({
|
|
23
|
-
key: input.publicKeyPem,
|
|
24
|
-
format: "pem"
|
|
25
|
-
});
|
|
26
|
-
} catch {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
let signatureBytes;
|
|
30
|
-
try {
|
|
31
|
-
signatureBytes = Buffer.from(input.signature, "base64");
|
|
32
|
-
} catch {
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
const rawBodyBuffer = typeof input.rawBody === "string" ? Buffer.from(input.rawBody, "utf8") : Buffer.from(input.rawBody);
|
|
36
|
-
const payloadBuffer = Buffer.concat([Buffer.from(input.timestamp, "utf8"), rawBodyBuffer]);
|
|
37
|
-
try {
|
|
38
|
-
return verify(null, payloadBuffer, publicKey, signatureBytes);
|
|
39
|
-
} catch {
|
|
40
|
-
const verifier = createVerify("sha256");
|
|
41
|
-
verifier.update(payloadBuffer);
|
|
42
|
-
try {
|
|
43
|
-
return verifier.verify(publicKey, signatureBytes);
|
|
44
|
-
} catch {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
function parseSendGridEventWebhookBody(rawBody) {
|
|
50
|
-
const text = typeof rawBody === "string" ? rawBody : Buffer.from(rawBody).toString("utf8");
|
|
51
|
-
const json = JSON.parse(text);
|
|
52
|
-
return sendgridEventWebhookPayloadSchema.parse(json);
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Verify an Inbound Parse request.
|
|
56
|
-
*
|
|
57
|
-
* SendGrid does NOT sign Inbound Parse payloads. Verification uses a Keystroke-minted
|
|
58
|
-
* token embedded in the receiver URL, plus an optional IP allowlist check. This is
|
|
59
|
-
* weaker than the Event Webhook's Ed25519 verification — callers are encouraged to
|
|
60
|
-
* rotate `expectedToken` periodically.
|
|
61
|
-
*/
|
|
62
|
-
function verifyInboundParseRequest(input) {
|
|
63
|
-
if (!input.path.includes(input.expectedToken)) return false;
|
|
64
|
-
if (input.allowedIps && input.allowedIps.length > 0) {
|
|
65
|
-
if (!input.sourceIp || !input.allowedIps.includes(input.sourceIp)) return false;
|
|
66
|
-
}
|
|
67
|
-
return true;
|
|
68
|
-
}
|
|
69
|
-
const sendgridInboundParseBodySchema = sendgridInboundParsePayloadSchema;
|
|
70
|
-
|
|
71
|
-
//#endregion
|
|
72
|
-
export { SENDGRID_EVENT_SIGNATURE_HEADER, SENDGRID_EVENT_TIMESTAMP_HEADER, parseSendGridEventWebhookBody, sendgridInboundParseBodySchema, verifyInboundParseRequest, verifySendGridEventWebhookRequest };
|
|
@@ -1,287 +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/webhooks/event.d.ts
|
|
6
|
-
declare const createEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
7
|
-
friendly_name: z.ZodOptional<z.ZodString>;
|
|
8
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
-
url: z.ZodString;
|
|
10
|
-
group_resubscribe: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
-
delivered: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
-
group_unsubscribe: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
-
spam_report: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
-
bounce: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
-
deferred: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
-
unsubscribe: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
-
processed: z.ZodOptional<z.ZodBoolean>;
|
|
18
|
-
open: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
-
click: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
-
dropped: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
-
oauth_client_id: z.ZodOptional<z.ZodString>;
|
|
22
|
-
oauth_client_secret: z.ZodOptional<z.ZodString>;
|
|
23
|
-
oauth_token_url: z.ZodOptional<z.ZodString>;
|
|
24
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
-
id: z.ZodOptional<z.ZodString>;
|
|
26
|
-
friendly_name: z.ZodOptional<z.ZodString>;
|
|
27
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
-
url: z.ZodOptional<z.ZodString>;
|
|
29
|
-
group_resubscribe: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
-
delivered: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
-
group_unsubscribe: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
-
spam_report: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
-
bounce: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
-
deferred: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
-
unsubscribe: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
-
processed: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
-
open: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
-
click: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
-
dropped: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
-
oauth_client_id: z.ZodOptional<z.ZodString>;
|
|
41
|
-
oauth_token_url: z.ZodOptional<z.ZodString>;
|
|
42
|
-
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", 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>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
52
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
53
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
54
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
55
|
-
global: "global";
|
|
56
|
-
eu: "eu";
|
|
57
|
-
}>>;
|
|
58
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
59
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
60
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
61
|
-
declare const updateEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
62
|
-
friendly_name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
63
|
-
enabled: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
64
|
-
url: z.ZodOptional<z.ZodString>;
|
|
65
|
-
group_resubscribe: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
66
|
-
delivered: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
67
|
-
group_unsubscribe: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
68
|
-
spam_report: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
69
|
-
bounce: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
70
|
-
deferred: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
71
|
-
unsubscribe: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
72
|
-
processed: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
73
|
-
open: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
74
|
-
click: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
75
|
-
dropped: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
76
|
-
oauth_client_id: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
77
|
-
oauth_client_secret: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
78
|
-
oauth_token_url: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
79
|
-
webhookId: z.ZodString;
|
|
80
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
-
id: z.ZodOptional<z.ZodString>;
|
|
82
|
-
friendly_name: z.ZodOptional<z.ZodString>;
|
|
83
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
84
|
-
url: z.ZodOptional<z.ZodString>;
|
|
85
|
-
group_resubscribe: z.ZodOptional<z.ZodBoolean>;
|
|
86
|
-
delivered: z.ZodOptional<z.ZodBoolean>;
|
|
87
|
-
group_unsubscribe: z.ZodOptional<z.ZodBoolean>;
|
|
88
|
-
spam_report: z.ZodOptional<z.ZodBoolean>;
|
|
89
|
-
bounce: z.ZodOptional<z.ZodBoolean>;
|
|
90
|
-
deferred: z.ZodOptional<z.ZodBoolean>;
|
|
91
|
-
unsubscribe: z.ZodOptional<z.ZodBoolean>;
|
|
92
|
-
processed: z.ZodOptional<z.ZodBoolean>;
|
|
93
|
-
open: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
-
click: z.ZodOptional<z.ZodBoolean>;
|
|
95
|
-
dropped: z.ZodOptional<z.ZodBoolean>;
|
|
96
|
-
oauth_client_id: z.ZodOptional<z.ZodString>;
|
|
97
|
-
oauth_token_url: z.ZodOptional<z.ZodString>;
|
|
98
|
-
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
|
|
99
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
100
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
101
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
102
|
-
global: "global";
|
|
103
|
-
eu: "eu";
|
|
104
|
-
}>>;
|
|
105
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
106
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
107
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
108
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
109
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
110
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
111
|
-
global: "global";
|
|
112
|
-
eu: "eu";
|
|
113
|
-
}>>;
|
|
114
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
115
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
116
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
117
|
-
declare const deleteEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
118
|
-
webhookId: z.ZodString;
|
|
119
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
120
|
-
success: z.ZodBoolean;
|
|
121
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
|
|
122
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
123
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
124
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
125
|
-
global: "global";
|
|
126
|
-
eu: "eu";
|
|
127
|
-
}>>;
|
|
128
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
129
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
130
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
131
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
132
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
133
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
134
|
-
global: "global";
|
|
135
|
-
eu: "eu";
|
|
136
|
-
}>>;
|
|
137
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
138
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
139
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
140
|
-
declare const listEventWebhooks: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
|
|
141
|
-
max_allowed: z.ZodOptional<z.ZodNumber>;
|
|
142
|
-
webhooks: z.ZodArray<z.ZodObject<{
|
|
143
|
-
id: z.ZodOptional<z.ZodString>;
|
|
144
|
-
friendly_name: z.ZodOptional<z.ZodString>;
|
|
145
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
146
|
-
url: z.ZodOptional<z.ZodString>;
|
|
147
|
-
group_resubscribe: z.ZodOptional<z.ZodBoolean>;
|
|
148
|
-
delivered: z.ZodOptional<z.ZodBoolean>;
|
|
149
|
-
group_unsubscribe: z.ZodOptional<z.ZodBoolean>;
|
|
150
|
-
spam_report: z.ZodOptional<z.ZodBoolean>;
|
|
151
|
-
bounce: z.ZodOptional<z.ZodBoolean>;
|
|
152
|
-
deferred: z.ZodOptional<z.ZodBoolean>;
|
|
153
|
-
unsubscribe: z.ZodOptional<z.ZodBoolean>;
|
|
154
|
-
processed: z.ZodOptional<z.ZodBoolean>;
|
|
155
|
-
open: z.ZodOptional<z.ZodBoolean>;
|
|
156
|
-
click: z.ZodOptional<z.ZodBoolean>;
|
|
157
|
-
dropped: z.ZodOptional<z.ZodBoolean>;
|
|
158
|
-
oauth_client_id: z.ZodOptional<z.ZodString>;
|
|
159
|
-
oauth_token_url: z.ZodOptional<z.ZodString>;
|
|
160
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
161
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
|
|
162
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
163
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
164
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
165
|
-
global: "global";
|
|
166
|
-
eu: "eu";
|
|
167
|
-
}>>;
|
|
168
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
169
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
170
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
171
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
172
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
173
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
174
|
-
global: "global";
|
|
175
|
-
eu: "eu";
|
|
176
|
-
}>>;
|
|
177
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
178
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
179
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
180
|
-
declare const getEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
181
|
-
webhookId: z.ZodString;
|
|
182
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
183
|
-
id: z.ZodOptional<z.ZodString>;
|
|
184
|
-
friendly_name: z.ZodOptional<z.ZodString>;
|
|
185
|
-
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
186
|
-
url: z.ZodOptional<z.ZodString>;
|
|
187
|
-
group_resubscribe: z.ZodOptional<z.ZodBoolean>;
|
|
188
|
-
delivered: z.ZodOptional<z.ZodBoolean>;
|
|
189
|
-
group_unsubscribe: z.ZodOptional<z.ZodBoolean>;
|
|
190
|
-
spam_report: z.ZodOptional<z.ZodBoolean>;
|
|
191
|
-
bounce: z.ZodOptional<z.ZodBoolean>;
|
|
192
|
-
deferred: z.ZodOptional<z.ZodBoolean>;
|
|
193
|
-
unsubscribe: z.ZodOptional<z.ZodBoolean>;
|
|
194
|
-
processed: z.ZodOptional<z.ZodBoolean>;
|
|
195
|
-
open: z.ZodOptional<z.ZodBoolean>;
|
|
196
|
-
click: z.ZodOptional<z.ZodBoolean>;
|
|
197
|
-
dropped: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
-
oauth_client_id: z.ZodOptional<z.ZodString>;
|
|
199
|
-
oauth_token_url: z.ZodOptional<z.ZodString>;
|
|
200
|
-
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
|
|
201
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
202
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
203
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
204
|
-
global: "global";
|
|
205
|
-
eu: "eu";
|
|
206
|
-
}>>;
|
|
207
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
208
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
209
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
210
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
211
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
212
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
213
|
-
global: "global";
|
|
214
|
-
eu: "eu";
|
|
215
|
-
}>>;
|
|
216
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
217
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
218
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
219
|
-
declare const getSignedPublicKey: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
|
|
220
|
-
public_key: z.ZodString;
|
|
221
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
|
|
222
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
223
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
224
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
225
|
-
global: "global";
|
|
226
|
-
eu: "eu";
|
|
227
|
-
}>>;
|
|
228
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
229
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
230
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
231
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
232
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
233
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
234
|
-
global: "global";
|
|
235
|
-
eu: "eu";
|
|
236
|
-
}>>;
|
|
237
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
238
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
239
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
240
|
-
declare const toggleWebhookSignature: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
241
|
-
enabled: z.ZodBoolean;
|
|
242
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
243
|
-
enabled: z.ZodBoolean;
|
|
244
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
|
|
245
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
246
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
247
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
248
|
-
global: "global";
|
|
249
|
-
eu: "eu";
|
|
250
|
-
}>>;
|
|
251
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
252
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
253
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
254
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
255
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
256
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
257
|
-
global: "global";
|
|
258
|
-
eu: "eu";
|
|
259
|
-
}>>;
|
|
260
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
261
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
262
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
263
|
-
declare const testEventWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
264
|
-
url: z.ZodString;
|
|
265
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
266
|
-
success: z.ZodBoolean;
|
|
267
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
|
|
268
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
269
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
270
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
271
|
-
global: "global";
|
|
272
|
-
eu: "eu";
|
|
273
|
-
}>>;
|
|
274
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
275
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
276
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
277
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
278
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
279
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
280
|
-
global: "global";
|
|
281
|
-
eu: "eu";
|
|
282
|
-
}>>;
|
|
283
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
284
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
285
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
286
|
-
//#endregion
|
|
287
|
-
export { createEventWebhook, deleteEventWebhook, getEventWebhook, getSignedPublicKey, listEventWebhooks, testEventWebhook, toggleWebhookSignature, updateEventWebhook };
|