@keystrokehq/sendgrid 0.0.7 → 0.0.9

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 (49) hide show
  1. package/dist/_official/index.d.mts +1 -1
  2. package/dist/_official/index.mjs +1 -1
  3. package/dist/alerts.d.mts +6 -6
  4. package/dist/alerts.mjs +7 -7
  5. package/dist/api-keys.d.mts +7 -7
  6. package/dist/api-keys.mjs +8 -8
  7. package/dist/client.d.mts +1 -1
  8. package/dist/client.mjs +2 -3
  9. package/dist/connection.d.mts +1 -1
  10. package/dist/connection.mjs +1 -1
  11. package/dist/domains.d.mts +4 -4
  12. package/dist/domains.mjs +5 -5
  13. package/dist/email-validation.d.mts +6 -6
  14. package/dist/email-validation.mjs +6 -6
  15. package/dist/{factory-BSL0D2L0.mjs → factory-CToXR1jp.mjs} +1 -2
  16. package/dist/integration-C9EALG65.mjs +113 -0
  17. package/dist/{integration-DpbPKcSF.d.mts → integration-zx-jmybs.d.mts} +3 -4
  18. package/dist/mail-send.d.mts +9 -9
  19. package/dist/mail-send.mjs +10 -10
  20. package/dist/marketing-contacts.d.mts +17 -17
  21. package/dist/marketing-contacts.mjs +18 -18
  22. package/dist/marketing-customfields.d.mts +4 -4
  23. package/dist/marketing-customfields.mjs +4 -4
  24. package/dist/marketing-lists.d.mts +8 -8
  25. package/dist/marketing-lists.mjs +9 -9
  26. package/dist/marketing-segments.d.mts +11 -11
  27. package/dist/marketing-segments.mjs +12 -12
  28. package/dist/marketing-singlesends.d.mts +17 -17
  29. package/dist/marketing-singlesends.mjs +16 -16
  30. package/dist/sender-identities.d.mts +7 -7
  31. package/dist/sender-identities.mjs +7 -7
  32. package/dist/senders.d.mts +6 -6
  33. package/dist/senders.mjs +6 -6
  34. package/dist/shared-BayZ0Lt6.mjs +46 -0
  35. package/dist/stats.d.mts +7 -7
  36. package/dist/stats.mjs +7 -7
  37. package/dist/suppressions.d.mts +32 -32
  38. package/dist/suppressions.mjs +33 -33
  39. package/dist/templates.d.mts +12 -12
  40. package/dist/templates.mjs +13 -13
  41. package/dist/user-account.d.mts +5 -5
  42. package/dist/user-account.mjs +5 -5
  43. package/dist/webhooks/event.d.mts +9 -9
  44. package/dist/webhooks/event.mjs +10 -10
  45. package/dist/webhooks/parse.d.mts +7 -7
  46. package/dist/webhooks/parse.mjs +8 -8
  47. package/package.json +4 -4
  48. package/dist/integration-37BovSeK.mjs +0 -23
  49. package/dist/shared-CQ8JFNXi.mjs +0 -13
@@ -1,2 +1,2 @@
1
- import { i as sendgridOfficialIntegration, r as sendgridBundle } from "../integration-DpbPKcSF.mjs";
1
+ import { i as sendgridOfficialIntegration, r as sendgridBundle } from "../integration-zx-jmybs.mjs";
2
2
  export { sendgridBundle, sendgridOfficialIntegration };
@@ -1,3 +1,3 @@
1
- import { n as sendgridBundle, r as sendgridOfficialIntegration } from "../integration-37BovSeK.mjs";
1
+ import { n as sendgridBundle, r as sendgridOfficialIntegration } from "../integration-C9EALG65.mjs";
2
2
 
3
3
  export { sendgridBundle, sendgridOfficialIntegration };
package/dist/alerts.d.mts CHANGED
@@ -1,6 +1,6 @@
1
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
1
2
  import { z } from "zod";
2
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
- import * as _keystrokehq_core0 from "@keystrokehq/core";
4
4
 
5
5
  //#region src/alerts.d.ts
6
6
  declare const createAlert: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -30,7 +30,7 @@ declare const createAlert: _keystrokehq_core0.Operation<z.ZodObject<{
30
30
  percentage: z.ZodOptional<z.ZodNumber>;
31
31
  created_at: z.ZodOptional<z.ZodNumber>;
32
32
  updated_at: z.ZodOptional<z.ZodNumber>;
33
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
33
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
34
34
  SENDGRID_API_KEY: z.ZodString;
35
35
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
36
36
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -77,7 +77,7 @@ declare const updateAlert: _keystrokehq_core0.Operation<z.ZodObject<{
77
77
  percentage: z.ZodOptional<z.ZodNumber>;
78
78
  created_at: z.ZodOptional<z.ZodNumber>;
79
79
  updated_at: z.ZodOptional<z.ZodNumber>;
80
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
80
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
81
81
  SENDGRID_API_KEY: z.ZodString;
82
82
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
83
83
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -100,7 +100,7 @@ declare const deleteAlert: _keystrokehq_core0.Operation<z.ZodObject<{
100
100
  alertId: z.ZodNumber;
101
101
  }, z.core.$strip>, z.ZodObject<{
102
102
  success: z.ZodBoolean;
103
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
103
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
104
104
  SENDGRID_API_KEY: z.ZodString;
105
105
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
106
106
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -136,7 +136,7 @@ declare const getAlert: _keystrokehq_core0.Operation<z.ZodObject<{
136
136
  percentage: z.ZodOptional<z.ZodNumber>;
137
137
  created_at: z.ZodOptional<z.ZodNumber>;
138
138
  updated_at: z.ZodOptional<z.ZodNumber>;
139
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
139
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
140
140
  SENDGRID_API_KEY: z.ZodString;
141
141
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
142
142
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -170,7 +170,7 @@ declare const listAlerts: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject
170
170
  percentage: z.ZodOptional<z.ZodNumber>;
171
171
  created_at: z.ZodOptional<z.ZodNumber>;
172
172
  updated_at: z.ZodOptional<z.ZodNumber>;
173
- }, z.core.$catchall<z.ZodUnknown>>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
173
+ }, z.core.$catchall<z.ZodUnknown>>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
174
174
  SENDGRID_API_KEY: z.ZodString;
175
175
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
176
176
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
package/dist/alerts.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { n as __exportAll, t as sendgridOperation } from "./factory-BSL0D2L0.mjs";
2
- import { n as omitUndefined } from "./shared-CQ8JFNXi.mjs";
1
+ import { n as __exportAll, t as sendgridOperation } from "./factory-CToXR1jp.mjs";
2
+ import { n as omitUndefined } from "./shared-BayZ0Lt6.mjs";
3
3
  import { createSendGridClient } from "./client.mjs";
4
4
  import { $t as sendgridAlertFrequencySchema, en as sendgridAlertListSchema, in as sendgridEmailSchema, nn as sendgridAlertTypeSchema, tn as sendgridAlertSchema } from "./webhooks-CKdsIikb.mjs";
5
5
  import { z } from "zod";
@@ -28,7 +28,7 @@ function mapAlertInput(input) {
28
28
  });
29
29
  }
30
30
  const createAlert = sendgridOperation({
31
- id: "create_alert",
31
+ id: "sendgrid.create-alert",
32
32
  name: "Create Alert",
33
33
  description: "Create a stats-notification or usage-limit alert.",
34
34
  input: alertInput,
@@ -43,7 +43,7 @@ const createAlert = sendgridOperation({
43
43
  }
44
44
  });
45
45
  const updateAlert = sendgridOperation({
46
- id: "update_alert",
46
+ id: "sendgrid.update-alert",
47
47
  name: "Update Alert",
48
48
  description: "Update an alert.",
49
49
  input: alertInput.partial().extend({ alertId }),
@@ -63,7 +63,7 @@ const updateAlert = sendgridOperation({
63
63
  }
64
64
  });
65
65
  const deleteAlert = sendgridOperation({
66
- id: "delete_alert",
66
+ id: "sendgrid.delete-alert",
67
67
  name: "Delete Alert",
68
68
  description: "Delete an alert.",
69
69
  input: z.object({ alertId }),
@@ -75,7 +75,7 @@ const deleteAlert = sendgridOperation({
75
75
  }
76
76
  });
77
77
  const getAlert = sendgridOperation({
78
- id: "get_alert",
78
+ id: "sendgrid.get-alert",
79
79
  name: "Get Alert",
80
80
  description: "Retrieve a single alert by ID.",
81
81
  input: z.object({ alertId }),
@@ -86,7 +86,7 @@ const getAlert = sendgridOperation({
86
86
  }
87
87
  });
88
88
  const listAlerts = sendgridOperation({
89
- id: "list_alerts",
89
+ id: "sendgrid.list-alerts",
90
90
  name: "List Alerts",
91
91
  description: "List all configured alerts.",
92
92
  input: z.object({}).optional(),
@@ -1,6 +1,6 @@
1
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
1
2
  import { z } from "zod";
2
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
- import * as _keystrokehq_core0 from "@keystrokehq/core";
4
4
 
5
5
  //#region src/api-keys.d.ts
6
6
  declare const createApiKey: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -11,7 +11,7 @@ declare const createApiKey: _keystrokehq_core0.Operation<z.ZodObject<{
11
11
  name: z.ZodString;
12
12
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
13
13
  api_key: z.ZodOptional<z.ZodString>;
14
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
14
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
15
15
  SENDGRID_API_KEY: z.ZodString;
16
16
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
17
17
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -36,7 +36,7 @@ declare const listApiKeys: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObjec
36
36
  name: z.ZodString;
37
37
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
38
38
  }, z.core.$catchall<z.ZodUnknown>>>;
39
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
39
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
40
40
  SENDGRID_API_KEY: z.ZodString;
41
41
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
42
42
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -61,7 +61,7 @@ declare const getApiKey: _keystrokehq_core0.Operation<z.ZodObject<{
61
61
  api_key_id: z.ZodString;
62
62
  name: z.ZodString;
63
63
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
64
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
64
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
65
65
  SENDGRID_API_KEY: z.ZodString;
66
66
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
67
67
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -87,7 +87,7 @@ declare const updateApiKeyName: _keystrokehq_core0.Operation<z.ZodObject<{
87
87
  api_key_id: z.ZodString;
88
88
  name: z.ZodString;
89
89
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
90
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
90
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
91
91
  SENDGRID_API_KEY: z.ZodString;
92
92
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
93
93
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -114,7 +114,7 @@ declare const updateApiKeyNameAndScopes: _keystrokehq_core0.Operation<z.ZodObjec
114
114
  api_key_id: z.ZodString;
115
115
  name: z.ZodString;
116
116
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
117
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
117
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
118
118
  SENDGRID_API_KEY: z.ZodString;
119
119
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
120
120
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -137,7 +137,7 @@ declare const deleteApiKey: _keystrokehq_core0.Operation<z.ZodObject<{
137
137
  apiKeyId: z.ZodString;
138
138
  }, z.core.$strip>, z.ZodObject<{
139
139
  success: z.ZodBoolean;
140
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
140
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
141
141
  SENDGRID_API_KEY: z.ZodString;
142
142
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
143
143
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
package/dist/api-keys.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { n as __exportAll, t as sendgridOperation } from "./factory-BSL0D2L0.mjs";
2
- import { n as omitUndefined } from "./shared-CQ8JFNXi.mjs";
1
+ import { n as __exportAll, t as sendgridOperation } from "./factory-CToXR1jp.mjs";
2
+ import { n as omitUndefined } from "./shared-BayZ0Lt6.mjs";
3
3
  import { createSendGridClient } from "./client.mjs";
4
4
  import { Qt as sendgridApiKeyWithKeySchema, Xt as sendgridApiKeySchema, Yt as sendgridApiKeyListSchema, on as sendgridIdSchema } from "./webhooks-CKdsIikb.mjs";
5
5
  import { z } from "zod";
@@ -14,7 +14,7 @@ var api_keys_exports = /* @__PURE__ */ __exportAll({
14
14
  updateApiKeyNameAndScopes: () => updateApiKeyNameAndScopes
15
15
  });
16
16
  const createApiKey = sendgridOperation({
17
- id: "create_api_key",
17
+ id: "sendgrid.create-api-key",
18
18
  name: "Create API Key",
19
19
  description: "Create a new SendGrid API key. Returns the full key value only at creation time — store it safely.",
20
20
  input: z.object({
@@ -35,7 +35,7 @@ const createApiKey = sendgridOperation({
35
35
  }
36
36
  });
37
37
  const listApiKeys = sendgridOperation({
38
- id: "list_api_keys",
38
+ id: "sendgrid.list-api-keys",
39
39
  name: "List API Keys",
40
40
  description: "List all API keys on the account (values are not returned).",
41
41
  input: z.object({}).optional(),
@@ -46,7 +46,7 @@ const listApiKeys = sendgridOperation({
46
46
  }
47
47
  });
48
48
  const getApiKey = sendgridOperation({
49
- id: "get_api_key",
49
+ id: "sendgrid.get-api-key",
50
50
  name: "Get API Key",
51
51
  description: "Retrieve an API key record by ID (the secret value is never returned).",
52
52
  input: z.object({ apiKeyId: sendgridIdSchema }),
@@ -57,7 +57,7 @@ const getApiKey = sendgridOperation({
57
57
  }
58
58
  });
59
59
  const updateApiKeyName = sendgridOperation({
60
- id: "update_api_key_name",
60
+ id: "sendgrid.update-api-key-name",
61
61
  name: "Update API Key Name",
62
62
  description: "Rename an API key without changing its scopes.",
63
63
  input: z.object({
@@ -75,7 +75,7 @@ const updateApiKeyName = sendgridOperation({
75
75
  }
76
76
  });
77
77
  const updateApiKeyNameAndScopes = sendgridOperation({
78
- id: "update_api_key_name_and_scopes",
78
+ id: "sendgrid.update-api-key-name-and-scopes",
79
79
  name: "Update API Key Name and Scopes",
80
80
  description: "Update an API key by replacing the full set of scopes.",
81
81
  input: z.object({
@@ -97,7 +97,7 @@ const updateApiKeyNameAndScopes = sendgridOperation({
97
97
  }
98
98
  });
99
99
  const deleteApiKey = sendgridOperation({
100
- id: "delete_api_key",
100
+ id: "sendgrid.delete-api-key",
101
101
  name: "Delete API Key",
102
102
  description: "Delete (revoke) an API key.",
103
103
  input: z.object({ apiKeyId: sendgridIdSchema }),
package/dist/client.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as SendGridCredentials } from "./integration-DpbPKcSF.mjs";
1
+ import { t as SendGridCredentials } from "./integration-zx-jmybs.mjs";
2
2
 
3
3
  //#region src/client.d.ts
4
4
  type Primitive = string | number | boolean;
package/dist/client.mjs CHANGED
@@ -1,7 +1,6 @@
1
- import { t as sendgrid } from "./integration-37BovSeK.mjs";
2
- import { r as stringIfPresent, t as asRecord } from "./shared-CQ8JFNXi.mjs";
1
+ import { t as sendgrid } from "./integration-C9EALG65.mjs";
2
+ import { i as createErrorNormalizingProxy, r as stringIfPresent, t as asRecord } from "./shared-BayZ0Lt6.mjs";
3
3
  import { CredentialRevokedError } from "@keystrokehq/core/errors";
4
- import { createErrorNormalizingProxy } from "@keystrokehq/integration-authoring";
5
4
 
6
5
  //#region src/client.ts
7
6
  const SENDGRID_GLOBAL_BASE = "https://api.sendgrid.com/v3";
@@ -1,2 +1,2 @@
1
- import { i as sendgridOfficialIntegration, n as sendgrid, t as SendGridCredentials } from "./integration-DpbPKcSF.mjs";
1
+ import { i as sendgridOfficialIntegration, n as sendgrid, t as SendGridCredentials } from "./integration-zx-jmybs.mjs";
2
2
  export { type SendGridCredentials, sendgrid, sendgridOfficialIntegration };
@@ -1,3 +1,3 @@
1
- import { r as sendgridOfficialIntegration, t as sendgrid } from "./integration-37BovSeK.mjs";
1
+ import { r as sendgridOfficialIntegration, t as sendgrid } from "./integration-C9EALG65.mjs";
2
2
 
3
3
  export { sendgrid, sendgridOfficialIntegration };
@@ -1,6 +1,6 @@
1
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
1
2
  import { z } from "zod";
2
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
- import * as _keystrokehq_core0 from "@keystrokehq/core";
4
4
 
5
5
  //#region src/domains.d.ts
6
6
  declare const listAuthenticatedDomains: _keystrokehq_core0.Operation<z.ZodOptional<z.ZodObject<{
@@ -27,7 +27,7 @@ declare const listAuthenticatedDomains: _keystrokehq_core0.Operation<z.ZodOption
27
27
  host: z.ZodOptional<z.ZodString>;
28
28
  data: z.ZodOptional<z.ZodString>;
29
29
  }, z.core.$catchall<z.ZodUnknown>>>>;
30
- }, z.core.$catchall<z.ZodUnknown>>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
30
+ }, z.core.$catchall<z.ZodUnknown>>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
31
31
  SENDGRID_API_KEY: z.ZodString;
32
32
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
33
33
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -66,7 +66,7 @@ declare const getAuthenticatedDomain: _keystrokehq_core0.Operation<z.ZodObject<{
66
66
  host: z.ZodOptional<z.ZodString>;
67
67
  data: z.ZodOptional<z.ZodString>;
68
68
  }, z.core.$catchall<z.ZodUnknown>>>>;
69
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
69
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
70
70
  SENDGRID_API_KEY: z.ZodString;
71
71
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
72
72
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -91,7 +91,7 @@ declare const validateAuthenticatedDomain: _keystrokehq_core0.Operation<z.ZodObj
91
91
  id: z.ZodNumber;
92
92
  valid: z.ZodBoolean;
93
93
  validation_results: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
94
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
94
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
95
95
  SENDGRID_API_KEY: z.ZodString;
96
96
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
97
97
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
package/dist/domains.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { n as __exportAll, t as sendgridOperation } from "./factory-BSL0D2L0.mjs";
2
- import { n as omitUndefined } from "./shared-CQ8JFNXi.mjs";
1
+ import { n as __exportAll, t as sendgridOperation } from "./factory-CToXR1jp.mjs";
2
+ import { n as omitUndefined } from "./shared-BayZ0Lt6.mjs";
3
3
  import { createSendGridClient } from "./client.mjs";
4
4
  import { At as sendgridAuthenticatedDomainListSchema, Nt as sendgridDomainValidateResultSchema, jt as sendgridAuthenticatedDomainSchema } from "./webhooks-CKdsIikb.mjs";
5
5
  import { z } from "zod";
@@ -12,7 +12,7 @@ var domains_exports = /* @__PURE__ */ __exportAll({
12
12
  });
13
13
  const domainId = z.number().int().positive();
14
14
  const listAuthenticatedDomains = sendgridOperation({
15
- id: "list_authenticated_domains",
15
+ id: "sendgrid.list-authenticated-domains",
16
16
  name: "List Authenticated Domains",
17
17
  description: "List all domains set up for Sender Authentication.",
18
18
  input: z.object({
@@ -35,7 +35,7 @@ const listAuthenticatedDomains = sendgridOperation({
35
35
  }
36
36
  });
37
37
  const getAuthenticatedDomain = sendgridOperation({
38
- id: "get_authenticated_domain",
38
+ id: "sendgrid.get-authenticated-domain",
39
39
  name: "Get Authenticated Domain",
40
40
  description: "Retrieve a single authenticated-domain record including its DNS rows.",
41
41
  input: z.object({ domainId }),
@@ -46,7 +46,7 @@ const getAuthenticatedDomain = sendgridOperation({
46
46
  }
47
47
  });
48
48
  const validateAuthenticatedDomain = sendgridOperation({
49
- id: "validate_authenticated_domain",
49
+ id: "sendgrid.validate-authenticated-domain",
50
50
  name: "Validate Authenticated Domain",
51
51
  description: "Ask SendGrid to re-check the DNS records of an authenticated domain.",
52
52
  input: z.object({ domainId }),
@@ -1,6 +1,6 @@
1
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
1
2
  import { z } from "zod";
2
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
3
- import * as _keystrokehq_core0 from "@keystrokehq/core";
4
4
 
5
5
  //#region src/email-validation.d.ts
6
6
  declare const validateEmail: _keystrokehq_core0.Operation<z.ZodObject<{
@@ -22,7 +22,7 @@ declare const validateEmail: _keystrokehq_core0.Operation<z.ZodObject<{
22
22
  source: z.ZodOptional<z.ZodString>;
23
23
  ip_address: z.ZodOptional<z.ZodString>;
24
24
  }, z.core.$catchall<z.ZodUnknown>>;
25
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
25
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
26
26
  SENDGRID_API_KEY: z.ZodString;
27
27
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
28
28
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -51,7 +51,7 @@ declare const listBulkEmailValidationJobs: _keystrokehq_core0.Operation<z.ZodOpt
51
51
  finished_at: z.ZodOptional<z.ZodString>;
52
52
  submitted_at: z.ZodOptional<z.ZodString>;
53
53
  }, z.core.$catchall<z.ZodUnknown>>>;
54
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
54
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
55
55
  SENDGRID_API_KEY: z.ZodString;
56
56
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
57
57
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -80,7 +80,7 @@ declare const getBulkEmailValidationJob: _keystrokehq_core0.Operation<z.ZodObjec
80
80
  started_at: z.ZodOptional<z.ZodString>;
81
81
  finished_at: z.ZodOptional<z.ZodString>;
82
82
  submitted_at: z.ZodOptional<z.ZodString>;
83
- }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
83
+ }, z.core.$catchall<z.ZodUnknown>>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
84
84
  SENDGRID_API_KEY: z.ZodString;
85
85
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
86
86
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -101,8 +101,8 @@ declare const getBulkEmailValidationJob: _keystrokehq_core0.Operation<z.ZodObjec
101
101
  }, z.core.$strip>>[] | undefined>], undefined>;
102
102
  declare const createBulkEmailValidationPresignedUrl: _keystrokehq_core0.Operation<z.ZodObject<{
103
103
  fileType: z.ZodDefault<z.ZodEnum<{
104
- csv: "csv";
105
104
  zip: "zip";
105
+ csv: "csv";
106
106
  }>>;
107
107
  }, z.core.$strip>, z.ZodObject<{
108
108
  job_id: z.ZodString;
@@ -111,7 +111,7 @@ declare const createBulkEmailValidationPresignedUrl: _keystrokehq_core0.Operatio
111
111
  header: z.ZodString;
112
112
  value: z.ZodString;
113
113
  }, z.core.$strip>>;
114
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
114
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
115
115
  SENDGRID_API_KEY: z.ZodString;
116
116
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
117
117
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -1,5 +1,5 @@
1
- import { n as __exportAll, t as sendgridOperation } from "./factory-BSL0D2L0.mjs";
2
- import { n as omitUndefined } from "./shared-CQ8JFNXi.mjs";
1
+ import { n as __exportAll, t as sendgridOperation } from "./factory-CToXR1jp.mjs";
2
+ import { n as omitUndefined } from "./shared-BayZ0Lt6.mjs";
3
3
  import { createSendGridClient } from "./client.mjs";
4
4
  import { Dt as sendgridEmailValidationResponseSchema, Et as sendgridBulkEmailValidationPresignedUrlSchema, Tt as sendgridBulkEmailValidationJobSchema, in as sendgridEmailSchema, on as sendgridIdSchema, wt as sendgridBulkEmailValidationJobListSchema } from "./webhooks-CKdsIikb.mjs";
5
5
  import { z } from "zod";
@@ -12,7 +12,7 @@ var email_validation_exports = /* @__PURE__ */ __exportAll({
12
12
  validateEmail: () => validateEmail
13
13
  });
14
14
  const validateEmail = sendgridOperation({
15
- id: "validate_email",
15
+ id: "sendgrid.validate-email",
16
16
  name: "Validate Email",
17
17
  description: "Validate a single email address using SendGrid Email Validation. Requires the Email Validation add-on.",
18
18
  input: z.object({
@@ -32,7 +32,7 @@ const validateEmail = sendgridOperation({
32
32
  }
33
33
  });
34
34
  const listBulkEmailValidationJobs = sendgridOperation({
35
- id: "list_bulk_email_validation_jobs",
35
+ id: "sendgrid.list-bulk-email-validation-jobs",
36
36
  name: "List Bulk Email Validation Jobs",
37
37
  description: "List bulk email validation jobs.",
38
38
  input: z.object({}).optional(),
@@ -43,7 +43,7 @@ const listBulkEmailValidationJobs = sendgridOperation({
43
43
  }
44
44
  });
45
45
  const getBulkEmailValidationJob = sendgridOperation({
46
- id: "get_bulk_email_validation_job",
46
+ id: "sendgrid.get-bulk-email-validation-job",
47
47
  name: "Get Bulk Email Validation Job",
48
48
  description: "Retrieve status and results for a bulk validation job.",
49
49
  input: z.object({ jobId: sendgridIdSchema }),
@@ -54,7 +54,7 @@ const getBulkEmailValidationJob = sendgridOperation({
54
54
  }
55
55
  });
56
56
  const createBulkEmailValidationPresignedUrl = sendgridOperation({
57
- id: "create_bulk_email_validation_presigned_url",
57
+ id: "sendgrid.create-bulk-email-validation-presigned-url",
58
58
  name: "Create Bulk Email Validation Upload URL",
59
59
  description: "Allocate a presigned upload URL for a bulk email-validation CSV.",
60
60
  input: z.object({ fileType: z.enum(["csv", "zip"]).default("csv") }),
@@ -1,5 +1,4 @@
1
- import { t as sendgrid } from "./integration-37BovSeK.mjs";
2
- import { createOfficialOperationFactory } from "@keystrokehq/integration-authoring/official";
1
+ import { i as createOfficialOperationFactory, t as sendgrid } from "./integration-C9EALG65.mjs";
3
2
 
4
3
  //#region \0rolldown/runtime.js
5
4
  var __defProp = Object.defineProperty;
@@ -0,0 +1,113 @@
1
+ import { CredentialSet, Operation } from "@keystrokehq/core";
2
+ import { z } from "zod";
3
+
4
+ //#region ../../packages/integration-authoring/dist/official/runtime.mjs
5
+ const REGISTRY_KEY = "__ks_official_integration_metadata_registry";
6
+ function getRegistry() {
7
+ const globalStore = globalThis;
8
+ if (!globalStore[REGISTRY_KEY]) globalStore[REGISTRY_KEY] = /* @__PURE__ */ new WeakMap();
9
+ return globalStore[REGISTRY_KEY];
10
+ }
11
+ function registerOfficialOperation(operation, metadata) {
12
+ getRegistry().set(operation, Object.freeze({ ...metadata }));
13
+ }
14
+
15
+ //#endregion
16
+ //#region ../../packages/integration-authoring/dist/official/index.mjs
17
+ const OFFICIAL_CREDENTIAL_SET_ID_PREFIX = "keystroke:";
18
+ function stripOfficialCredentialSetIdPrefix(id) {
19
+ return id.startsWith(OFFICIAL_CREDENTIAL_SET_ID_PREFIX) ? id.slice(10) : id;
20
+ }
21
+ /**
22
+ * Creates a factory for Keystroke-official integration operations.
23
+ *
24
+ * It keeps the same flat `run(input, credentials)` ergonomics as the generic
25
+ * operation factory, while registering official metadata for builder/runtime
26
+ * operation metadata.
27
+ */
28
+ function createOfficialOperationFactory(credentialSet) {
29
+ const integrationId = stripOfficialCredentialSetIdPrefix(credentialSet.id);
30
+ return (config) => {
31
+ const wrappedRun = async (input, ctx) => {
32
+ const creds = ctx.credentials[credentialSet.id];
33
+ return config.run(input, creds);
34
+ };
35
+ const operation = new Operation({
36
+ id: config.id,
37
+ name: config.name,
38
+ description: config.description,
39
+ input: config.input,
40
+ output: config.output,
41
+ credentialSets: [credentialSet],
42
+ ...config.tags !== void 0 ? { tags: config.tags } : {},
43
+ ...config.needsApproval !== void 0 ? { needsApproval: config.needsApproval } : {},
44
+ ...config.requiredOAuthScopes !== void 0 ? { requiredOAuthScopes: config.requiredOAuthScopes } : {},
45
+ ...config.retries !== void 0 ? { retries: config.retries } : {},
46
+ ...config.timeout !== void 0 ? { timeout: config.timeout } : {},
47
+ ...config.maxDurationMs !== void 0 ? { maxDurationMs: config.maxDurationMs } : {},
48
+ run: wrappedRun
49
+ });
50
+ registerOfficialOperation(operation, { integrationId });
51
+ return operation;
52
+ };
53
+ }
54
+ /**
55
+ * Creates an official integration bundle from a single config object.
56
+ *
57
+ * - Creates the public `CredentialSet` internally.
58
+ * - Accepts optional `internal` fields for Keystroke-owned platform credentials.
59
+ */
60
+ function defineOfficialIntegration(config) {
61
+ const internalCredentialSets = config.internal ?? {};
62
+ const allInternalCredentialSets = [
63
+ ...internalCredentialSets.providerApp ? [internalCredentialSets.providerApp] : [],
64
+ ...internalCredentialSets.providerAppVariants ?? [],
65
+ ...internalCredentialSets.webhookVerification ? [internalCredentialSets.webhookVerification] : [],
66
+ ...internalCredentialSets.other ?? []
67
+ ];
68
+ const credentialSet = new CredentialSet({
69
+ id: config.id,
70
+ name: config.name,
71
+ description: config.description,
72
+ auth: config.auth,
73
+ ...config.connections ? { connections: config.connections } : {},
74
+ ...config.proxy ? { proxy: config.proxy } : {},
75
+ ...config.needsRawSecret === true ? { needsRawSecret: true } : {}
76
+ });
77
+ return Object.freeze({
78
+ integration: {
79
+ id: config.id,
80
+ name: config.name,
81
+ ...config.description !== void 0 ? { description: config.description } : {},
82
+ auth: config.auth,
83
+ ...config.proxy ? { proxy: config.proxy } : {},
84
+ ...config.needsRawSecret === true ? { needsRawSecret: true } : {},
85
+ ...config.connections ? { connections: config.connections } : {}
86
+ },
87
+ credentialSet,
88
+ internalCredentialSets,
89
+ allInternalCredentialSets
90
+ });
91
+ }
92
+
93
+ //#endregion
94
+ //#region src/integration.ts
95
+ const sendgridAuthSchema = z.object({
96
+ SENDGRID_API_KEY: z.string().min(1).regex(/^SG\./u, "SendGrid API keys start with \"SG.\""),
97
+ SENDGRID_SUBUSER: z.string().min(1).optional(),
98
+ SENDGRID_ACCOUNT_REGION: z.enum(["global", "eu"]).default("global"),
99
+ SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.string().min(1).optional(),
100
+ SENDGRID_INBOUND_PARSE_TOKEN: z.string().min(1).optional()
101
+ });
102
+ const sendgridOfficialIntegration = {
103
+ id: "sendgrid",
104
+ name: "SendGrid",
105
+ description: "SendGrid (Twilio) transactional + marketing email, templates, contacts, lists, segments, deliverability, and webhook helpers for Keystroke workflows",
106
+ auth: sendgridAuthSchema,
107
+ proxy: { hosts: ["api.sendgrid.com", "api.eu.sendgrid.com"] }
108
+ };
109
+ const sendgridBundle = defineOfficialIntegration(sendgridOfficialIntegration);
110
+ const sendgrid = sendgridBundle.credentialSet;
111
+
112
+ //#endregion
113
+ export { createOfficialOperationFactory as i, sendgridBundle as n, sendgridOfficialIntegration as r, sendgrid as t };
@@ -1,8 +1,7 @@
1
- import * as _keystrokehq_integration_authoring_official0 from "@keystrokehq/integration-authoring/official";
1
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
2
2
  import { z } from "zod";
3
3
  import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
4
4
  import { InferCredentialSetAuth } from "@keystrokehq/core/credential-set";
5
- import * as _keystrokehq_core0 from "@keystrokehq/core";
6
5
 
7
6
  //#region src/integration.d.ts
8
7
  declare const sendgridOfficialIntegration: {
@@ -23,7 +22,7 @@ declare const sendgridOfficialIntegration: {
23
22
  hosts: string[];
24
23
  };
25
24
  };
26
- declare const sendgridBundle: _keystrokehq_integration_authoring_official0.OfficialIntegrationBundle<"sendgrid", z.ZodObject<{
25
+ declare const sendgridBundle: undefined<"sendgrid", z.ZodObject<{
27
26
  SENDGRID_API_KEY: z.ZodString;
28
27
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
29
28
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{
@@ -33,7 +32,7 @@ declare const sendgridBundle: _keystrokehq_integration_authoring_official0.Offic
33
32
  SENDGRID_EVENT_WEBHOOK_PUBLIC_KEY: z.ZodOptional<z.ZodString>;
34
33
  SENDGRID_INBOUND_PARSE_TOKEN: z.ZodOptional<z.ZodString>;
35
34
  }, z.core.$strip>>;
36
- declare const sendgrid: _keystrokehq_core0.CredentialSet<"keystroke:sendgrid", z.ZodObject<{
35
+ declare const sendgrid: _keystrokehq_core0.CredentialSet<"sendgrid", z.ZodObject<{
37
36
  SENDGRID_API_KEY: z.ZodString;
38
37
  SENDGRID_SUBUSER: z.ZodOptional<z.ZodString>;
39
38
  SENDGRID_ACCOUNT_REGION: z.ZodDefault<z.ZodEnum<{