@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/dist/webhooks/parse.mjs
DELETED
|
@@ -1,125 +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 { l as sendgridParseStatsSchema, o as sendgridParseSettingListSchema, s as sendgridParseSettingSchema } from "../webhooks-CKdsIikb.mjs";
|
|
5
|
-
import { z } from "zod";
|
|
6
|
-
|
|
7
|
-
//#region src/webhooks/parse.ts
|
|
8
|
-
var parse_exports = /* @__PURE__ */ __exportAll({
|
|
9
|
-
createParseSetting: () => createParseSetting,
|
|
10
|
-
deleteParseSetting: () => deleteParseSetting,
|
|
11
|
-
getParseSetting: () => getParseSetting,
|
|
12
|
-
getParseStats: () => getParseStats,
|
|
13
|
-
listParseSettings: () => listParseSettings,
|
|
14
|
-
updateParseSetting: () => updateParseSetting
|
|
15
|
-
});
|
|
16
|
-
const hostname = z.string().min(1);
|
|
17
|
-
const parseInputSchema = z.object({
|
|
18
|
-
url: z.string().url(),
|
|
19
|
-
hostname,
|
|
20
|
-
spamCheck: z.boolean().optional(),
|
|
21
|
-
sendRaw: z.boolean().optional()
|
|
22
|
-
});
|
|
23
|
-
const createParseSetting = sendgridOperation({
|
|
24
|
-
id: "sendgrid.create-parse-setting",
|
|
25
|
-
name: "Create Inbound Parse Setting",
|
|
26
|
-
description: "Configure an Inbound Parse hostname + receiver URL.",
|
|
27
|
-
input: parseInputSchema,
|
|
28
|
-
output: sendgridParseSettingSchema,
|
|
29
|
-
needsApproval: true,
|
|
30
|
-
run: async (input, credentials) => {
|
|
31
|
-
const response = await createSendGridClient(credentials).request("/user/webhooks/parse/settings", {
|
|
32
|
-
method: "POST",
|
|
33
|
-
body: omitUndefined({
|
|
34
|
-
url: input.url,
|
|
35
|
-
hostname: input.hostname,
|
|
36
|
-
spam_check: input.spamCheck,
|
|
37
|
-
send_raw: input.sendRaw
|
|
38
|
-
})
|
|
39
|
-
});
|
|
40
|
-
return sendgridParseSettingSchema.parse(response);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
const updateParseSetting = sendgridOperation({
|
|
44
|
-
id: "sendgrid.update-parse-setting",
|
|
45
|
-
name: "Update Inbound Parse Setting",
|
|
46
|
-
description: "Update an Inbound Parse configuration (by hostname).",
|
|
47
|
-
input: parseInputSchema.partial().extend({ hostname }),
|
|
48
|
-
output: sendgridParseSettingSchema,
|
|
49
|
-
needsApproval: true,
|
|
50
|
-
run: async (input, credentials) => {
|
|
51
|
-
const response = await createSendGridClient(credentials).request(`/user/webhooks/parse/settings/${encodeURIComponent(input.hostname)}`, {
|
|
52
|
-
method: "PATCH",
|
|
53
|
-
body: omitUndefined({
|
|
54
|
-
url: input.url,
|
|
55
|
-
spam_check: input.spamCheck,
|
|
56
|
-
send_raw: input.sendRaw
|
|
57
|
-
})
|
|
58
|
-
});
|
|
59
|
-
return sendgridParseSettingSchema.parse(response);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
const deleteParseSetting = sendgridOperation({
|
|
63
|
-
id: "sendgrid.delete-parse-setting",
|
|
64
|
-
name: "Delete Inbound Parse Setting",
|
|
65
|
-
description: "Remove an Inbound Parse configuration by hostname.",
|
|
66
|
-
input: z.object({ hostname }),
|
|
67
|
-
output: z.object({ success: z.boolean() }),
|
|
68
|
-
needsApproval: true,
|
|
69
|
-
run: async (input, credentials) => {
|
|
70
|
-
await createSendGridClient(credentials).request(`/user/webhooks/parse/settings/${encodeURIComponent(input.hostname)}`, { method: "DELETE" });
|
|
71
|
-
return { success: true };
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
const listParseSettings = sendgridOperation({
|
|
75
|
-
id: "sendgrid.list-parse-settings",
|
|
76
|
-
name: "List Inbound Parse Settings",
|
|
77
|
-
description: "List all Inbound Parse configurations on the account.",
|
|
78
|
-
input: z.object({}).optional(),
|
|
79
|
-
output: sendgridParseSettingListSchema,
|
|
80
|
-
run: async (_input, credentials) => {
|
|
81
|
-
const response = await createSendGridClient(credentials).request("/user/webhooks/parse/settings");
|
|
82
|
-
return sendgridParseSettingListSchema.parse(response ?? { result: [] });
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
const getParseSetting = sendgridOperation({
|
|
86
|
-
id: "sendgrid.get-parse-setting",
|
|
87
|
-
name: "Get Inbound Parse Setting",
|
|
88
|
-
description: "Retrieve a single Inbound Parse configuration.",
|
|
89
|
-
input: z.object({ hostname }),
|
|
90
|
-
output: sendgridParseSettingSchema,
|
|
91
|
-
run: async (input, credentials) => {
|
|
92
|
-
const response = await createSendGridClient(credentials).request(`/user/webhooks/parse/settings/${encodeURIComponent(input.hostname)}`);
|
|
93
|
-
return sendgridParseSettingSchema.parse(response);
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
const getParseStats = sendgridOperation({
|
|
97
|
-
id: "sendgrid.get-parse-stats",
|
|
98
|
-
name: "Get Inbound Parse Stats",
|
|
99
|
-
description: "Retrieve Inbound Parse statistics.",
|
|
100
|
-
input: z.object({
|
|
101
|
-
startDate: z.iso.date().optional(),
|
|
102
|
-
endDate: z.iso.date().optional(),
|
|
103
|
-
aggregatedBy: z.enum([
|
|
104
|
-
"day",
|
|
105
|
-
"week",
|
|
106
|
-
"month"
|
|
107
|
-
]).optional(),
|
|
108
|
-
limit: z.number().int().positive().max(500).optional(),
|
|
109
|
-
offset: z.number().int().nonnegative().optional()
|
|
110
|
-
}).optional(),
|
|
111
|
-
output: sendgridParseStatsSchema,
|
|
112
|
-
run: async (input, credentials) => {
|
|
113
|
-
const response = await createSendGridClient(credentials).request("/user/webhooks/parse/stats", { query: omitUndefined({
|
|
114
|
-
start_date: input?.startDate,
|
|
115
|
-
end_date: input?.endDate,
|
|
116
|
-
aggregated_by: input?.aggregatedBy,
|
|
117
|
-
limit: input?.limit,
|
|
118
|
-
offset: input?.offset
|
|
119
|
-
}) });
|
|
120
|
-
return sendgridParseStatsSchema.parse(response ?? []);
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
//#endregion
|
|
125
|
-
export { createParseSetting, deleteParseSetting, getParseSetting, getParseStats, listParseSettings, parse_exports as t, updateParseSetting };
|
|
File without changes
|