@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.
Files changed (68) hide show
  1. package/README.md +59 -111
  2. package/dist/credential-sets/index.d.mts +2 -0
  3. package/dist/credential-sets/index.mjs +3 -0
  4. package/dist/index.d.mts +4 -1
  5. package/dist/index.mjs +5 -1
  6. package/dist/operations/index.d.mts +2 -0
  7. package/dist/operations/index.mjs +3 -0
  8. package/dist/schemas/index.d.mts +5 -5
  9. package/dist/schemas/index.mjs +1 -1
  10. package/dist/{integration-DHWfpe0w.mjs → sendgrid.credential-set-CzYmlJ2Y.mjs} +9 -8
  11. package/dist/sendgrid.credential-set-ivRIiUDy.d.mts +32 -0
  12. package/dist/validate-email.operation-CCCDxLjH.mjs +4301 -0
  13. package/dist/validate-email.operation-DY4rCHFE.d.mts +5436 -0
  14. package/package.json +11 -99
  15. package/dist/_official/index.d.mts +0 -2
  16. package/dist/_official/index.mjs +0 -3
  17. package/dist/_runtime/index.d.mts +0 -2
  18. package/dist/_runtime/index.mjs +0 -3
  19. package/dist/alerts.d.mts +0 -147
  20. package/dist/alerts.mjs +0 -101
  21. package/dist/api-keys.d.mts +0 -105
  22. package/dist/api-keys.mjs +0 -113
  23. package/dist/client.d.mts +0 -73
  24. package/dist/client.mjs +0 -261
  25. package/dist/connection.d.mts +0 -2
  26. package/dist/connection.mjs +0 -3
  27. package/dist/domains.d.mts +0 -86
  28. package/dist/domains.mjs +0 -62
  29. package/dist/email-validation.d.mts +0 -97
  30. package/dist/email-validation.mjs +0 -73
  31. package/dist/events.d.mts +0 -69
  32. package/dist/events.mjs +0 -28
  33. package/dist/factory-7q6CQ75J.mjs +0 -25
  34. package/dist/integration-Cj4Xzfq_.d.mts +0 -48
  35. package/dist/mail-send.d.mts +0 -242
  36. package/dist/mail-send.mjs +0 -218
  37. package/dist/marketing-contacts.d.mts +0 -462
  38. package/dist/marketing-contacts.mjs +0 -277
  39. package/dist/marketing-customfields.d.mts +0 -66
  40. package/dist/marketing-customfields.mjs +0 -70
  41. package/dist/marketing-lists.d.mts +0 -120
  42. package/dist/marketing-lists.mjs +0 -130
  43. package/dist/marketing-segments.d.mts +0 -249
  44. package/dist/marketing-segments.mjs +0 -179
  45. package/dist/marketing-singlesends.d.mts +0 -521
  46. package/dist/marketing-singlesends.mjs +0 -277
  47. package/dist/operations.d.mts +0 -25
  48. package/dist/operations.mjs +0 -69
  49. package/dist/sender-identities.d.mts +0 -163
  50. package/dist/sender-identities.mjs +0 -109
  51. package/dist/senders.d.mts +0 -181
  52. package/dist/senders.mjs +0 -83
  53. package/dist/shared-CQ8JFNXi.mjs +0 -13
  54. package/dist/stats.d.mts +0 -169
  55. package/dist/stats.mjs +0 -107
  56. package/dist/suppressions.d.mts +0 -505
  57. package/dist/suppressions.mjs +0 -539
  58. package/dist/templates.d.mts +0 -351
  59. package/dist/templates.mjs +0 -238
  60. package/dist/user-account.d.mts +0 -71
  61. package/dist/user-account.mjs +0 -59
  62. package/dist/verification.d.mts +0 -67
  63. package/dist/verification.mjs +0 -72
  64. package/dist/webhooks/event.d.mts +0 -214
  65. package/dist/webhooks/event.mjs +0 -147
  66. package/dist/webhooks/parse.d.mts +0 -117
  67. package/dist/webhooks/parse.mjs +0 -125
  68. /package/dist/{webhooks-CKdsIikb.mjs → webhooks-dVOd93Hd.mjs} +0 -0
@@ -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 };