@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/stats.mjs
DELETED
|
@@ -1,107 +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 { F as sendgridAggregationSchema, I as sendgridAutomationStatsSchema, L as sendgridCategoryStatsSchema, R as sendgridEngagementQualitySchema, z as sendgridStatBucketListSchema } from "./webhooks-CKdsIikb.mjs";
|
|
5
|
-
import { z } from "zod";
|
|
6
|
-
|
|
7
|
-
//#region src/stats.ts
|
|
8
|
-
var stats_exports = /* @__PURE__ */ __exportAll({
|
|
9
|
-
getCategoryStats: () => getCategoryStats,
|
|
10
|
-
getEngagementQualityScores: () => getEngagementQualityScores,
|
|
11
|
-
getGlobalEmailStats: () => getGlobalEmailStats,
|
|
12
|
-
listAutomationStats: () => listAutomationStats,
|
|
13
|
-
listMailboxProviderStats: () => listMailboxProviderStats
|
|
14
|
-
});
|
|
15
|
-
const statsRange = z.object({
|
|
16
|
-
startDate: z.iso.date(),
|
|
17
|
-
endDate: z.iso.date().optional(),
|
|
18
|
-
aggregatedBy: sendgridAggregationSchema.optional()
|
|
19
|
-
});
|
|
20
|
-
function mapStatsQuery(input) {
|
|
21
|
-
return {
|
|
22
|
-
start_date: input.startDate,
|
|
23
|
-
end_date: input.endDate,
|
|
24
|
-
aggregated_by: input.aggregatedBy
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
const getGlobalEmailStats = sendgridOperation({
|
|
28
|
-
id: "sendgrid.get-global-email-stats",
|
|
29
|
-
name: "Get Global Email Statistics",
|
|
30
|
-
description: "Return aggregated global email stats over a date range.",
|
|
31
|
-
input: statsRange,
|
|
32
|
-
output: sendgridStatBucketListSchema,
|
|
33
|
-
run: async (input, credentials) => {
|
|
34
|
-
const response = await createSendGridClient(credentials).request("/stats", { query: omitUndefined(mapStatsQuery(input)) });
|
|
35
|
-
return sendgridStatBucketListSchema.parse(response ?? []);
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
const getCategoryStats = sendgridOperation({
|
|
39
|
-
id: "sendgrid.get-category-stats",
|
|
40
|
-
name: "Get Category Stats",
|
|
41
|
-
description: "Return email stats broken down by category.",
|
|
42
|
-
input: statsRange.extend({ categories: z.array(z.string().min(1)).min(1).max(10) }),
|
|
43
|
-
output: sendgridCategoryStatsSchema,
|
|
44
|
-
run: async (input, credentials) => {
|
|
45
|
-
const response = await createSendGridClient(credentials).request("/categories/stats", { query: omitUndefined({
|
|
46
|
-
...mapStatsQuery(input),
|
|
47
|
-
categories: input.categories.join(",")
|
|
48
|
-
}) });
|
|
49
|
-
return sendgridCategoryStatsSchema.parse(response ?? []);
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
const listAutomationStats = sendgridOperation({
|
|
53
|
-
id: "sendgrid.list-automation-stats",
|
|
54
|
-
name: "List Automation Stats",
|
|
55
|
-
description: "Return engagement stats for all Automations.",
|
|
56
|
-
input: z.object({
|
|
57
|
-
pageSize: z.number().int().positive().max(100).optional(),
|
|
58
|
-
aggregatedBy: z.enum([
|
|
59
|
-
"total",
|
|
60
|
-
"day",
|
|
61
|
-
"week",
|
|
62
|
-
"month"
|
|
63
|
-
]).optional()
|
|
64
|
-
}).optional(),
|
|
65
|
-
output: sendgridAutomationStatsSchema,
|
|
66
|
-
run: async (input, credentials) => {
|
|
67
|
-
const response = await createSendGridClient(credentials).request("/marketing/stats/automations", { query: omitUndefined({
|
|
68
|
-
page_size: input?.pageSize,
|
|
69
|
-
aggregated_by: input?.aggregatedBy
|
|
70
|
-
}) });
|
|
71
|
-
return sendgridAutomationStatsSchema.parse(response ?? { results: [] });
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
const getEngagementQualityScores = sendgridOperation({
|
|
75
|
-
id: "sendgrid.get-engagement-quality-scores",
|
|
76
|
-
name: "Get Engagement Quality Scores",
|
|
77
|
-
description: "Return engagement-quality (EQ) scores for the account. Plan-gated — requires Pro+.",
|
|
78
|
-
input: z.object({
|
|
79
|
-
from: z.iso.date(),
|
|
80
|
-
to: z.iso.date()
|
|
81
|
-
}),
|
|
82
|
-
output: sendgridEngagementQualitySchema,
|
|
83
|
-
run: async (input, credentials) => {
|
|
84
|
-
const response = await createSendGridClient(credentials).request("/user/eq", { query: {
|
|
85
|
-
from: input.from,
|
|
86
|
-
to: input.to
|
|
87
|
-
} });
|
|
88
|
-
return sendgridEngagementQualitySchema.parse(response);
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
const listMailboxProviderStats = sendgridOperation({
|
|
92
|
-
id: "sendgrid.list-mailbox-provider-stats",
|
|
93
|
-
name: "List Mailbox Provider Stats",
|
|
94
|
-
description: "Return email stats broken down by mailbox provider (Gmail, Outlook, etc.).",
|
|
95
|
-
input: statsRange.extend({ mailboxProviders: z.array(z.string().min(1)).optional() }),
|
|
96
|
-
output: sendgridStatBucketListSchema,
|
|
97
|
-
run: async (input, credentials) => {
|
|
98
|
-
const response = await createSendGridClient(credentials).request("/mailbox_providers/stats", { query: omitUndefined({
|
|
99
|
-
...mapStatsQuery(input),
|
|
100
|
-
mailbox_providers: input.mailboxProviders?.join(",")
|
|
101
|
-
}) });
|
|
102
|
-
return sendgridStatBucketListSchema.parse(response ?? []);
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
//#endregion
|
|
107
|
-
export { getCategoryStats, getEngagementQualityScores, getGlobalEmailStats, listAutomationStats, listMailboxProviderStats, stats_exports as t };
|