@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
|
@@ -1,277 +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 { $ as sendgridSingleSendTestInputSchema, G as sendgridSingleSendListSchema, J as sendgridSingleSendSearchInputSchema, K as sendgridSingleSendScheduleInputSchema, U as sendgridSingleSendClicksSchema, W as sendgridSingleSendEmailConfigSchema, X as sendgridSingleSendStatsListSchema, Y as sendgridSingleSendSendToSchema, Z as sendgridSingleSendStatsSchema, on as sendgridIdSchema, q as sendgridSingleSendSchema } from "./webhooks-CKdsIikb.mjs";
|
|
5
|
-
import { z } from "zod";
|
|
6
|
-
|
|
7
|
-
//#region src/marketing-singlesends.ts
|
|
8
|
-
var marketing_singlesends_exports = /* @__PURE__ */ __exportAll({
|
|
9
|
-
bulkDeleteSingleSends: () => bulkDeleteSingleSends,
|
|
10
|
-
createSingleSend: () => createSingleSend,
|
|
11
|
-
deleteSingleSend: () => deleteSingleSend,
|
|
12
|
-
duplicateSingleSend: () => duplicateSingleSend,
|
|
13
|
-
getSingleSend: () => getSingleSend,
|
|
14
|
-
getSingleSendClickStats: () => getSingleSendClickStats,
|
|
15
|
-
getSingleSendStats: () => getSingleSendStats,
|
|
16
|
-
listSingleSendStats: () => listSingleSendStats,
|
|
17
|
-
listSingleSends: () => listSingleSends,
|
|
18
|
-
scheduleSingleSend: () => scheduleSingleSend,
|
|
19
|
-
searchSingleSends: () => searchSingleSends,
|
|
20
|
-
sendTestMarketingEmail: () => sendTestMarketingEmail,
|
|
21
|
-
unscheduleSingleSend: () => unscheduleSingleSend,
|
|
22
|
-
updateSingleSend: () => updateSingleSend
|
|
23
|
-
});
|
|
24
|
-
function base(path = "") {
|
|
25
|
-
return `/marketing/singlesends${path}`;
|
|
26
|
-
}
|
|
27
|
-
function stats(path = "") {
|
|
28
|
-
return `/marketing/stats/singlesends${path}`;
|
|
29
|
-
}
|
|
30
|
-
const singleSendBody = z.object({
|
|
31
|
-
name: z.string().min(1),
|
|
32
|
-
categories: z.array(z.string()).max(10).optional(),
|
|
33
|
-
sendAt: z.iso.datetime().optional(),
|
|
34
|
-
sendTo: sendgridSingleSendSendToSchema.optional(),
|
|
35
|
-
emailConfig: sendgridSingleSendEmailConfigSchema.optional()
|
|
36
|
-
});
|
|
37
|
-
function mapSingleSendBody(input) {
|
|
38
|
-
return omitUndefined({
|
|
39
|
-
name: input.name,
|
|
40
|
-
categories: input.categories,
|
|
41
|
-
send_at: input.sendAt,
|
|
42
|
-
send_to: input.sendTo,
|
|
43
|
-
email_config: input.emailConfig
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
const createSingleSend = sendgridOperation({
|
|
47
|
-
id: "sendgrid.create-single-send",
|
|
48
|
-
name: "Create Single Send",
|
|
49
|
-
description: "Create a marketing Single Send campaign.",
|
|
50
|
-
input: singleSendBody,
|
|
51
|
-
output: sendgridSingleSendSchema,
|
|
52
|
-
needsApproval: true,
|
|
53
|
-
run: async (input, credentials) => {
|
|
54
|
-
const response = await createSendGridClient(credentials).request(base(), {
|
|
55
|
-
method: "POST",
|
|
56
|
-
body: mapSingleSendBody(input)
|
|
57
|
-
});
|
|
58
|
-
return sendgridSingleSendSchema.parse(response);
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
const updateSingleSend = sendgridOperation({
|
|
62
|
-
id: "sendgrid.update-single-send",
|
|
63
|
-
name: "Update Single Send",
|
|
64
|
-
description: "Update a Single Send campaign.",
|
|
65
|
-
input: singleSendBody.partial().extend({ id: sendgridIdSchema }),
|
|
66
|
-
output: sendgridSingleSendSchema,
|
|
67
|
-
needsApproval: true,
|
|
68
|
-
run: async (input, credentials) => {
|
|
69
|
-
const response = await createSendGridClient(credentials).request(base(`/${encodeURIComponent(input.id)}`), {
|
|
70
|
-
method: "PATCH",
|
|
71
|
-
body: omitUndefined({
|
|
72
|
-
name: input.name,
|
|
73
|
-
categories: input.categories,
|
|
74
|
-
send_at: input.sendAt,
|
|
75
|
-
send_to: input.sendTo,
|
|
76
|
-
email_config: input.emailConfig
|
|
77
|
-
})
|
|
78
|
-
});
|
|
79
|
-
return sendgridSingleSendSchema.parse(response);
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
const duplicateSingleSend = sendgridOperation({
|
|
83
|
-
id: "sendgrid.duplicate-single-send",
|
|
84
|
-
name: "Duplicate Single Send",
|
|
85
|
-
description: "Duplicate a Single Send campaign.",
|
|
86
|
-
input: z.object({
|
|
87
|
-
id: sendgridIdSchema,
|
|
88
|
-
name: z.string().min(1).optional()
|
|
89
|
-
}),
|
|
90
|
-
output: sendgridSingleSendSchema,
|
|
91
|
-
needsApproval: true,
|
|
92
|
-
run: async (input, credentials) => {
|
|
93
|
-
const response = await createSendGridClient(credentials).request(base(`/${encodeURIComponent(input.id)}`), {
|
|
94
|
-
method: "POST",
|
|
95
|
-
body: omitUndefined({ name: input.name })
|
|
96
|
-
});
|
|
97
|
-
return sendgridSingleSendSchema.parse(response);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
const deleteSingleSend = sendgridOperation({
|
|
101
|
-
id: "sendgrid.delete-single-send",
|
|
102
|
-
name: "Delete Single Send",
|
|
103
|
-
description: "Delete a Single Send by ID.",
|
|
104
|
-
input: z.object({ id: sendgridIdSchema }),
|
|
105
|
-
output: z.object({ success: z.boolean() }),
|
|
106
|
-
needsApproval: true,
|
|
107
|
-
run: async (input, credentials) => {
|
|
108
|
-
await createSendGridClient(credentials).request(base(`/${encodeURIComponent(input.id)}`), { method: "DELETE" });
|
|
109
|
-
return { success: true };
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
|
-
const bulkDeleteSingleSends = sendgridOperation({
|
|
113
|
-
id: "sendgrid.bulk-delete-single-sends",
|
|
114
|
-
name: "Bulk Delete Single Sends",
|
|
115
|
-
description: "Delete multiple Single Sends at once.",
|
|
116
|
-
input: z.object({ ids: z.array(sendgridIdSchema).min(1).max(100) }),
|
|
117
|
-
output: z.object({ success: z.boolean() }),
|
|
118
|
-
needsApproval: true,
|
|
119
|
-
run: async (input, credentials) => {
|
|
120
|
-
await createSendGridClient(credentials).request(base(), {
|
|
121
|
-
method: "DELETE",
|
|
122
|
-
query: { ids: input.ids.join(",") }
|
|
123
|
-
});
|
|
124
|
-
return { success: true };
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
const getSingleSend = sendgridOperation({
|
|
128
|
-
id: "sendgrid.get-single-send",
|
|
129
|
-
name: "Get Single Send",
|
|
130
|
-
description: "Retrieve a Single Send by ID.",
|
|
131
|
-
input: z.object({ id: sendgridIdSchema }),
|
|
132
|
-
output: sendgridSingleSendSchema,
|
|
133
|
-
run: async (input, credentials) => {
|
|
134
|
-
const response = await createSendGridClient(credentials).request(base(`/${encodeURIComponent(input.id)}`));
|
|
135
|
-
return sendgridSingleSendSchema.parse(response);
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
const listSingleSends = sendgridOperation({
|
|
139
|
-
id: "sendgrid.list-single-sends",
|
|
140
|
-
name: "List Single Sends",
|
|
141
|
-
description: "List all Single Sends on the account.",
|
|
142
|
-
input: z.object({
|
|
143
|
-
pageSize: z.number().int().positive().max(100).optional(),
|
|
144
|
-
pageToken: z.string().min(1).optional()
|
|
145
|
-
}).optional(),
|
|
146
|
-
output: sendgridSingleSendListSchema,
|
|
147
|
-
run: async (input, credentials) => {
|
|
148
|
-
const response = await createSendGridClient(credentials).request(base(), { query: omitUndefined({
|
|
149
|
-
page_size: input?.pageSize,
|
|
150
|
-
page_token: input?.pageToken
|
|
151
|
-
}) });
|
|
152
|
-
return sendgridSingleSendListSchema.parse(response ?? { result: [] });
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
const searchSingleSends = sendgridOperation({
|
|
156
|
-
id: "sendgrid.search-single-sends",
|
|
157
|
-
name: "Search Single Sends",
|
|
158
|
-
description: "Search Single Sends by name, status, or categories.",
|
|
159
|
-
input: sendgridSingleSendSearchInputSchema,
|
|
160
|
-
output: sendgridSingleSendListSchema,
|
|
161
|
-
run: async (input, credentials) => {
|
|
162
|
-
const response = await createSendGridClient(credentials).request(base("/search"), {
|
|
163
|
-
method: "POST",
|
|
164
|
-
body: omitUndefined({
|
|
165
|
-
name: input.name,
|
|
166
|
-
status: input.status,
|
|
167
|
-
categories: input.categories
|
|
168
|
-
})
|
|
169
|
-
});
|
|
170
|
-
return sendgridSingleSendListSchema.parse(response ?? { result: [] });
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
const scheduleSingleSend = sendgridOperation({
|
|
174
|
-
id: "sendgrid.schedule-single-send",
|
|
175
|
-
name: "Schedule Single Send",
|
|
176
|
-
description: "Schedule a Single Send for future delivery (pass `send_at: \"now\"` to send immediately).",
|
|
177
|
-
input: z.object({ id: sendgridIdSchema }).and(sendgridSingleSendScheduleInputSchema),
|
|
178
|
-
output: sendgridSingleSendSchema,
|
|
179
|
-
needsApproval: true,
|
|
180
|
-
run: async (input, credentials) => {
|
|
181
|
-
const response = await createSendGridClient(credentials).request(base(`/${encodeURIComponent(input.id)}/schedule`), {
|
|
182
|
-
method: "PUT",
|
|
183
|
-
body: { send_at: input.send_at }
|
|
184
|
-
});
|
|
185
|
-
return sendgridSingleSendSchema.parse(response);
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
const unscheduleSingleSend = sendgridOperation({
|
|
189
|
-
id: "sendgrid.unschedule-single-send",
|
|
190
|
-
name: "Unschedule Single Send",
|
|
191
|
-
description: "Cancel a scheduled Single Send delivery.",
|
|
192
|
-
input: z.object({ id: sendgridIdSchema }),
|
|
193
|
-
output: z.object({ success: z.boolean() }),
|
|
194
|
-
needsApproval: true,
|
|
195
|
-
run: async (input, credentials) => {
|
|
196
|
-
await createSendGridClient(credentials).request(base(`/${encodeURIComponent(input.id)}/schedule`), { method: "DELETE" });
|
|
197
|
-
return { success: true };
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
const sendTestMarketingEmail = sendgridOperation({
|
|
201
|
-
id: "sendgrid.send-test-marketing-email",
|
|
202
|
-
name: "Send Test Marketing Email",
|
|
203
|
-
description: "Send a Marketing Campaigns test email to the given recipients.",
|
|
204
|
-
input: sendgridSingleSendTestInputSchema,
|
|
205
|
-
output: z.object({ success: z.boolean() }),
|
|
206
|
-
needsApproval: true,
|
|
207
|
-
run: async (input, credentials) => {
|
|
208
|
-
await createSendGridClient(credentials).request("/marketing/test/send_email", {
|
|
209
|
-
method: "POST",
|
|
210
|
-
body: omitUndefined({
|
|
211
|
-
template_id: input.template_id,
|
|
212
|
-
version_id_override: input.version_id_override,
|
|
213
|
-
sender_id: input.sender_id,
|
|
214
|
-
custom_unsubscribe_url: input.custom_unsubscribe_url,
|
|
215
|
-
suppression_group_id: input.suppression_group_id,
|
|
216
|
-
emails: input.emails,
|
|
217
|
-
from_address: input.from_address
|
|
218
|
-
})
|
|
219
|
-
});
|
|
220
|
-
return { success: true };
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
const listSingleSendStats = sendgridOperation({
|
|
224
|
-
id: "sendgrid.list-single-send-stats",
|
|
225
|
-
name: "List All Single Send Stats",
|
|
226
|
-
description: "Return aggregated engagement stats across all Single Sends.",
|
|
227
|
-
input: z.object({
|
|
228
|
-
aggregatedBy: z.enum([
|
|
229
|
-
"total",
|
|
230
|
-
"day",
|
|
231
|
-
"week",
|
|
232
|
-
"month"
|
|
233
|
-
]).optional(),
|
|
234
|
-
pageSize: z.number().int().positive().max(100).optional()
|
|
235
|
-
}).optional(),
|
|
236
|
-
output: sendgridSingleSendStatsListSchema,
|
|
237
|
-
run: async (input, credentials) => {
|
|
238
|
-
const response = await createSendGridClient(credentials).request(stats(), { query: omitUndefined({
|
|
239
|
-
aggregated_by: input?.aggregatedBy,
|
|
240
|
-
page_size: input?.pageSize
|
|
241
|
-
}) });
|
|
242
|
-
return sendgridSingleSendStatsListSchema.parse(response ?? { results: [] });
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
const getSingleSendStats = sendgridOperation({
|
|
246
|
-
id: "sendgrid.get-single-send-stats",
|
|
247
|
-
name: "Get Single Send Stats",
|
|
248
|
-
description: "Return engagement stats for a single Single Send.",
|
|
249
|
-
input: z.object({
|
|
250
|
-
id: sendgridIdSchema,
|
|
251
|
-
aggregatedBy: z.enum([
|
|
252
|
-
"total",
|
|
253
|
-
"day",
|
|
254
|
-
"week",
|
|
255
|
-
"month"
|
|
256
|
-
]).optional()
|
|
257
|
-
}),
|
|
258
|
-
output: sendgridSingleSendStatsSchema,
|
|
259
|
-
run: async (input, credentials) => {
|
|
260
|
-
const response = await createSendGridClient(credentials).request(stats(`/${encodeURIComponent(input.id)}`), { query: omitUndefined({ aggregated_by: input.aggregatedBy }) });
|
|
261
|
-
return sendgridSingleSendStatsSchema.parse(response);
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
const getSingleSendClickStats = sendgridOperation({
|
|
265
|
-
id: "sendgrid.get-single-send-click-stats",
|
|
266
|
-
name: "Get Single Send Click Tracking Stats",
|
|
267
|
-
description: "Return click-tracking breakdown for a Single Send.",
|
|
268
|
-
input: z.object({ id: sendgridIdSchema }),
|
|
269
|
-
output: sendgridSingleSendClicksSchema,
|
|
270
|
-
run: async (input, credentials) => {
|
|
271
|
-
const response = await createSendGridClient(credentials).request(stats(`/${encodeURIComponent(input.id)}/links`));
|
|
272
|
-
return sendgridSingleSendClicksSchema.parse(response);
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
//#endregion
|
|
277
|
-
export { bulkDeleteSingleSends, createSingleSend, deleteSingleSend, duplicateSingleSend, getSingleSend, getSingleSendClickStats, getSingleSendStats, listSingleSendStats, listSingleSends, scheduleSingleSend, searchSingleSends, sendTestMarketingEmail, marketing_singlesends_exports as t, unscheduleSingleSend, updateSingleSend };
|
package/dist/operations.d.mts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
//#region src/operations.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Registry of every featured operation exported by this package, indexed by
|
|
4
|
-
* its operation id. Use this for tooling that needs to enumerate the SendGrid
|
|
5
|
-
* surface (coverage matrices, runtime wiring, introspection).
|
|
6
|
-
*
|
|
7
|
-
* Phase-1 scope: the 153 operations covering Mail Send, Templates, Marketing
|
|
8
|
-
* Contacts/Lists/Segments/Single Sends/Custom Fields, Senders + Sender
|
|
9
|
-
* Identities, Suppressions, Email Validation, Stats, User Account, Alerts,
|
|
10
|
-
* Domains, API Keys, Event Webhook config, and Inbound Parse config.
|
|
11
|
-
*
|
|
12
|
-
* See `IMPLEMENTATION_NOTES.md` § 4 Q4 for the phase-1 scope rationale and
|
|
13
|
-
* the list of provider endpoints intentionally left unwrapped.
|
|
14
|
-
*/
|
|
15
|
-
type AnyOperation = {
|
|
16
|
-
readonly id: string;
|
|
17
|
-
readonly name: string;
|
|
18
|
-
readonly description: string;
|
|
19
|
-
readonly needsApproval?: boolean;
|
|
20
|
-
};
|
|
21
|
-
declare const sendgridOperations: Readonly<Record<string, AnyOperation>>;
|
|
22
|
-
declare const sendgridOperationIds: readonly string[];
|
|
23
|
-
declare const sendgridOperationCount: number;
|
|
24
|
-
//#endregion
|
|
25
|
-
export { sendgridOperationCount, sendgridOperationIds, sendgridOperations };
|
package/dist/operations.mjs
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { t as mail_send_exports } from "./mail-send.mjs";
|
|
2
|
-
import { t as templates_exports } from "./templates.mjs";
|
|
3
|
-
import { t as marketing_contacts_exports } from "./marketing-contacts.mjs";
|
|
4
|
-
import { t as marketing_lists_exports } from "./marketing-lists.mjs";
|
|
5
|
-
import { t as marketing_segments_exports } from "./marketing-segments.mjs";
|
|
6
|
-
import { t as marketing_singlesends_exports } from "./marketing-singlesends.mjs";
|
|
7
|
-
import { t as marketing_customfields_exports } from "./marketing-customfields.mjs";
|
|
8
|
-
import { t as senders_exports } from "./senders.mjs";
|
|
9
|
-
import { t as sender_identities_exports } from "./sender-identities.mjs";
|
|
10
|
-
import { t as suppressions_exports } from "./suppressions.mjs";
|
|
11
|
-
import { t as email_validation_exports } from "./email-validation.mjs";
|
|
12
|
-
import { t as stats_exports } from "./stats.mjs";
|
|
13
|
-
import { t as user_account_exports } from "./user-account.mjs";
|
|
14
|
-
import { t as alerts_exports } from "./alerts.mjs";
|
|
15
|
-
import { t as domains_exports } from "./domains.mjs";
|
|
16
|
-
import { t as api_keys_exports } from "./api-keys.mjs";
|
|
17
|
-
import { t as event_exports } from "./webhooks/event.mjs";
|
|
18
|
-
import { t as parse_exports } from "./webhooks/parse.mjs";
|
|
19
|
-
|
|
20
|
-
//#region src/operations.ts
|
|
21
|
-
/**
|
|
22
|
-
* Registry of every featured operation exported by this package, indexed by
|
|
23
|
-
* its operation id. Use this for tooling that needs to enumerate the SendGrid
|
|
24
|
-
* surface (coverage matrices, runtime wiring, introspection).
|
|
25
|
-
*
|
|
26
|
-
* Phase-1 scope: the 153 operations covering Mail Send, Templates, Marketing
|
|
27
|
-
* Contacts/Lists/Segments/Single Sends/Custom Fields, Senders + Sender
|
|
28
|
-
* Identities, Suppressions, Email Validation, Stats, User Account, Alerts,
|
|
29
|
-
* Domains, API Keys, Event Webhook config, and Inbound Parse config.
|
|
30
|
-
*
|
|
31
|
-
* See `IMPLEMENTATION_NOTES.md` § 4 Q4 for the phase-1 scope rationale and
|
|
32
|
-
* the list of provider endpoints intentionally left unwrapped.
|
|
33
|
-
*/
|
|
34
|
-
function collect(mod) {
|
|
35
|
-
return Object.values(mod).filter((value) => typeof value === "object" && value !== null && "id" in value && "name" in value && "description" in value && typeof value.id === "string");
|
|
36
|
-
}
|
|
37
|
-
const allOperations = [
|
|
38
|
-
...collect(mail_send_exports),
|
|
39
|
-
...collect(templates_exports),
|
|
40
|
-
...collect(marketing_contacts_exports),
|
|
41
|
-
...collect(marketing_lists_exports),
|
|
42
|
-
...collect(marketing_segments_exports),
|
|
43
|
-
...collect(marketing_singlesends_exports),
|
|
44
|
-
...collect(marketing_customfields_exports),
|
|
45
|
-
...collect(senders_exports),
|
|
46
|
-
...collect(sender_identities_exports),
|
|
47
|
-
...collect(suppressions_exports),
|
|
48
|
-
...collect(email_validation_exports),
|
|
49
|
-
...collect(stats_exports),
|
|
50
|
-
...collect(user_account_exports),
|
|
51
|
-
...collect(alerts_exports),
|
|
52
|
-
...collect(domains_exports),
|
|
53
|
-
...collect(api_keys_exports),
|
|
54
|
-
...collect(event_exports),
|
|
55
|
-
...collect(parse_exports)
|
|
56
|
-
];
|
|
57
|
-
const operationsById = Object.freeze(Object.fromEntries(allOperations.map((op) => [op.id, op])));
|
|
58
|
-
if (allOperations.length !== Object.keys(operationsById).length) {
|
|
59
|
-
const counts = /* @__PURE__ */ new Map();
|
|
60
|
-
for (const op of allOperations) counts.set(op.id, (counts.get(op.id) ?? 0) + 1);
|
|
61
|
-
const duplicates = [...counts.entries()].filter(([, n]) => n > 1).map(([id]) => id);
|
|
62
|
-
throw new Error(`Duplicate SendGrid operation ids detected: ${duplicates.join(", ")}. Each exported operation must have a unique id.`);
|
|
63
|
-
}
|
|
64
|
-
const sendgridOperations = operationsById;
|
|
65
|
-
const sendgridOperationIds = Object.freeze(Object.keys(operationsById).sort());
|
|
66
|
-
const sendgridOperationCount = sendgridOperationIds.length;
|
|
67
|
-
|
|
68
|
-
//#endregion
|
|
69
|
-
export { sendgridOperationCount, sendgridOperationIds, sendgridOperations };
|
|
@@ -1,218 +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/sender-identities.d.ts
|
|
6
|
-
declare const createSenderIdentity: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
7
|
-
nickname: z.ZodString;
|
|
8
|
-
from_email: z.ZodString;
|
|
9
|
-
from_name: z.ZodOptional<z.ZodString>;
|
|
10
|
-
reply_to: z.ZodOptional<z.ZodString>;
|
|
11
|
-
reply_to_name: z.ZodOptional<z.ZodString>;
|
|
12
|
-
address: z.ZodOptional<z.ZodString>;
|
|
13
|
-
address2: z.ZodOptional<z.ZodString>;
|
|
14
|
-
city: z.ZodOptional<z.ZodString>;
|
|
15
|
-
state: z.ZodOptional<z.ZodString>;
|
|
16
|
-
zip: z.ZodOptional<z.ZodString>;
|
|
17
|
-
country: z.ZodOptional<z.ZodString>;
|
|
18
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
19
|
-
id: z.ZodNumber;
|
|
20
|
-
nickname: z.ZodString;
|
|
21
|
-
from_email: z.ZodString;
|
|
22
|
-
from_name: z.ZodOptional<z.ZodString>;
|
|
23
|
-
reply_to: z.ZodOptional<z.ZodString>;
|
|
24
|
-
reply_to_name: z.ZodOptional<z.ZodString>;
|
|
25
|
-
address: z.ZodOptional<z.ZodString>;
|
|
26
|
-
address2: z.ZodOptional<z.ZodString>;
|
|
27
|
-
city: z.ZodOptional<z.ZodString>;
|
|
28
|
-
state: z.ZodOptional<z.ZodString>;
|
|
29
|
-
zip: z.ZodOptional<z.ZodString>;
|
|
30
|
-
country: z.ZodOptional<z.ZodString>;
|
|
31
|
-
verified: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
-
locked: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
-
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
|
|
34
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
35
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
36
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
37
|
-
global: "global";
|
|
38
|
-
eu: "eu";
|
|
39
|
-
}>>;
|
|
40
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
41
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
42
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<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>>[] | undefined>], undefined>;
|
|
52
|
-
declare const updateSenderIdentity: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
53
|
-
nickname: z.ZodOptional<z.ZodString>;
|
|
54
|
-
from_email: z.ZodOptional<z.ZodString>;
|
|
55
|
-
from_name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
56
|
-
reply_to: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
57
|
-
reply_to_name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
58
|
-
address: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
59
|
-
address2: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
60
|
-
city: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
61
|
-
state: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
62
|
-
zip: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
63
|
-
country: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
64
|
-
id: z.ZodNumber;
|
|
65
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
66
|
-
id: z.ZodNumber;
|
|
67
|
-
nickname: z.ZodString;
|
|
68
|
-
from_email: z.ZodString;
|
|
69
|
-
from_name: z.ZodOptional<z.ZodString>;
|
|
70
|
-
reply_to: z.ZodOptional<z.ZodString>;
|
|
71
|
-
reply_to_name: z.ZodOptional<z.ZodString>;
|
|
72
|
-
address: z.ZodOptional<z.ZodString>;
|
|
73
|
-
address2: z.ZodOptional<z.ZodString>;
|
|
74
|
-
city: z.ZodOptional<z.ZodString>;
|
|
75
|
-
state: z.ZodOptional<z.ZodString>;
|
|
76
|
-
zip: z.ZodOptional<z.ZodString>;
|
|
77
|
-
country: z.ZodOptional<z.ZodString>;
|
|
78
|
-
verified: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
-
locked: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
-
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"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>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
90
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
91
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
92
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
93
|
-
global: "global";
|
|
94
|
-
eu: "eu";
|
|
95
|
-
}>>;
|
|
96
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
97
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
98
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
99
|
-
declare const deleteSenderIdentity: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
100
|
-
id: z.ZodNumber;
|
|
101
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
102
|
-
success: z.ZodBoolean;
|
|
103
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
|
|
104
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
105
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
106
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
107
|
-
global: "global";
|
|
108
|
-
eu: "eu";
|
|
109
|
-
}>>;
|
|
110
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
111
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
112
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
113
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
114
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
115
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
116
|
-
global: "global";
|
|
117
|
-
eu: "eu";
|
|
118
|
-
}>>;
|
|
119
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
120
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
121
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
122
|
-
declare const getSenderIdentity: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
123
|
-
id: z.ZodNumber;
|
|
124
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
125
|
-
id: z.ZodNumber;
|
|
126
|
-
nickname: z.ZodString;
|
|
127
|
-
from_email: z.ZodString;
|
|
128
|
-
from_name: z.ZodOptional<z.ZodString>;
|
|
129
|
-
reply_to: z.ZodOptional<z.ZodString>;
|
|
130
|
-
reply_to_name: z.ZodOptional<z.ZodString>;
|
|
131
|
-
address: z.ZodOptional<z.ZodString>;
|
|
132
|
-
address2: z.ZodOptional<z.ZodString>;
|
|
133
|
-
city: z.ZodOptional<z.ZodString>;
|
|
134
|
-
state: z.ZodOptional<z.ZodString>;
|
|
135
|
-
zip: z.ZodOptional<z.ZodString>;
|
|
136
|
-
country: z.ZodOptional<z.ZodString>;
|
|
137
|
-
verified: z.ZodOptional<z.ZodBoolean>;
|
|
138
|
-
locked: z.ZodOptional<z.ZodBoolean>;
|
|
139
|
-
}, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
|
|
140
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
141
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
142
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
143
|
-
global: "global";
|
|
144
|
-
eu: "eu";
|
|
145
|
-
}>>;
|
|
146
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
147
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
148
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
149
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
150
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
151
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
152
|
-
global: "global";
|
|
153
|
-
eu: "eu";
|
|
154
|
-
}>>;
|
|
155
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
156
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
157
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
158
|
-
declare const listSenderIdentities: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{}, z.core.$strip>>, z.ZodObject<{
|
|
159
|
-
results: z.ZodArray<z.ZodObject<{
|
|
160
|
-
id: z.ZodNumber;
|
|
161
|
-
nickname: z.ZodString;
|
|
162
|
-
from_email: z.ZodString;
|
|
163
|
-
from_name: z.ZodOptional<z.ZodString>;
|
|
164
|
-
reply_to: z.ZodOptional<z.ZodString>;
|
|
165
|
-
reply_to_name: z.ZodOptional<z.ZodString>;
|
|
166
|
-
address: z.ZodOptional<z.ZodString>;
|
|
167
|
-
address2: z.ZodOptional<z.ZodString>;
|
|
168
|
-
city: z.ZodOptional<z.ZodString>;
|
|
169
|
-
state: z.ZodOptional<z.ZodString>;
|
|
170
|
-
zip: z.ZodOptional<z.ZodString>;
|
|
171
|
-
country: z.ZodOptional<z.ZodString>;
|
|
172
|
-
verified: z.ZodOptional<z.ZodBoolean>;
|
|
173
|
-
locked: z.ZodOptional<z.ZodBoolean>;
|
|
174
|
-
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
175
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
|
|
176
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
177
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
178
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
179
|
-
global: "global";
|
|
180
|
-
eu: "eu";
|
|
181
|
-
}>>;
|
|
182
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
183
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
184
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
185
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
186
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
187
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
188
|
-
global: "global";
|
|
189
|
-
eu: "eu";
|
|
190
|
-
}>>;
|
|
191
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
192
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
193
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
194
|
-
declare const resendSenderIdentityVerification: _keystrokehq_core0.Operation<z.ZodObject<{
|
|
195
|
-
id: z.ZodNumber;
|
|
196
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
197
|
-
success: z.ZodBoolean;
|
|
198
|
-
}, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
|
|
199
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
200
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
201
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
202
|
-
global: "global";
|
|
203
|
-
eu: "eu";
|
|
204
|
-
}>>;
|
|
205
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
206
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
207
|
-
}, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
|
|
208
|
-
SENDGRID_API_KEY: z.ZodString;
|
|
209
|
-
SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
|
|
210
|
-
SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
|
|
211
|
-
global: "global";
|
|
212
|
-
eu: "eu";
|
|
213
|
-
}>>;
|
|
214
|
-
SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
|
|
215
|
-
SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
|
|
216
|
-
}, z.core.$strip>>[] | undefined>], undefined>;
|
|
217
|
-
//#endregion
|
|
218
|
-
export { createSenderIdentity, deleteSenderIdentity, getSenderIdentity, listSenderIdentities, resendSenderIdentityVerification, updateSenderIdentity };
|