@keystrokehq/resend 0.0.9 → 0.0.15

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/dist/topics.d.mts CHANGED
@@ -1,6 +1,5 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
1
  import { z } from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
2
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
4
3
 
5
4
  //#region src/topics.d.ts
6
5
  declare const topicSchema: z.ZodObject<{
@@ -31,13 +30,10 @@ declare const createTopic: _keystrokehq_core0.Operation<z.ZodObject<{
31
30
  }>>;
32
31
  created_at: z.ZodOptional<z.ZodString>;
33
32
  updated_at: z.ZodOptional<z.ZodString>;
34
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"resend", z.ZodObject<{
35
- RESEND_API_KEY: z.ZodString;
36
- RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
37
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
33
+ }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:resend", z.ZodObject<{
38
34
  RESEND_API_KEY: z.ZodString;
39
35
  RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
40
- }, z.core.$strip>>[] | undefined>], undefined>;
36
+ }, z.core.$strip>>], undefined>;
41
37
  declare const listTopics: _keystrokehq_core0.Operation<z.ZodObject<{
42
38
  limit: z.ZodOptional<z.ZodNumber>;
43
39
  after: z.ZodOptional<z.ZodString>;
@@ -56,13 +52,10 @@ declare const listTopics: _keystrokehq_core0.Operation<z.ZodObject<{
56
52
  created_at: z.ZodOptional<z.ZodString>;
57
53
  updated_at: z.ZodOptional<z.ZodString>;
58
54
  }, z.core.$loose>>;
59
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"resend", z.ZodObject<{
60
- RESEND_API_KEY: z.ZodString;
61
- RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
62
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
55
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:resend", z.ZodObject<{
63
56
  RESEND_API_KEY: z.ZodString;
64
57
  RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
65
- }, z.core.$strip>>[] | undefined>], undefined>;
58
+ }, z.core.$strip>>], undefined>;
66
59
  declare const retrieveTopic: _keystrokehq_core0.Operation<z.ZodObject<{
67
60
  id: z.ZodString;
68
61
  }, z.core.$strip>, z.ZodObject<{
@@ -75,13 +68,10 @@ declare const retrieveTopic: _keystrokehq_core0.Operation<z.ZodObject<{
75
68
  }>>;
76
69
  created_at: z.ZodOptional<z.ZodString>;
77
70
  updated_at: z.ZodOptional<z.ZodString>;
78
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"resend", z.ZodObject<{
71
+ }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:resend", z.ZodObject<{
79
72
  RESEND_API_KEY: z.ZodString;
80
73
  RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
81
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
82
- RESEND_API_KEY: z.ZodString;
83
- RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
84
- }, z.core.$strip>>[] | undefined>], undefined>;
74
+ }, z.core.$strip>>], undefined>;
85
75
  declare const updateTopic: _keystrokehq_core0.Operation<z.ZodObject<{
86
76
  id: z.ZodString;
87
77
  name: z.ZodOptional<z.ZodString>;
@@ -100,26 +90,20 @@ declare const updateTopic: _keystrokehq_core0.Operation<z.ZodObject<{
100
90
  }>>;
101
91
  created_at: z.ZodOptional<z.ZodString>;
102
92
  updated_at: z.ZodOptional<z.ZodString>;
103
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"resend", z.ZodObject<{
104
- RESEND_API_KEY: z.ZodString;
105
- RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
106
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
93
+ }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:resend", z.ZodObject<{
107
94
  RESEND_API_KEY: z.ZodString;
108
95
  RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
109
- }, z.core.$strip>>[] | undefined>], undefined>;
96
+ }, z.core.$strip>>], undefined>;
110
97
  declare const deleteTopic: _keystrokehq_core0.Operation<z.ZodObject<{
111
98
  id: z.ZodString;
112
99
  }, z.core.$strip>, z.ZodObject<{
113
100
  object: z.ZodOptional<z.ZodLiteral<"topic">>;
114
101
  id: z.ZodString;
115
102
  deleted: z.ZodOptional<z.ZodBoolean>;
116
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"resend", z.ZodObject<{
117
- RESEND_API_KEY: z.ZodString;
118
- RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
119
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
103
+ }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:resend", z.ZodObject<{
120
104
  RESEND_API_KEY: z.ZodString;
121
105
  RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
122
- }, z.core.$strip>>[] | undefined>], undefined>;
106
+ }, z.core.$strip>>], undefined>;
123
107
  type ResendTopic = z.infer<typeof topicSchema>;
124
108
  //#endregion
125
109
  export { ResendTopic, createTopic, deleteTopic, listTopics, retrieveTopic, updateTopic };
package/dist/topics.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createResendClient } from "./client.mjs";
2
2
  import { paginationQuerySchema, resendListEnvelope } from "./schemas.mjs";
3
- import { t as resendOperation } from "./factory-CE4vHYLx.mjs";
3
+ import { t as resendOperation } from "./factory-C91g4Zm2.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/topics.ts
@@ -1,6 +1,5 @@
1
- import * as _keystrokehq_core0 from "@keystrokehq/core";
2
1
  import { z } from "zod";
3
- import * as _keystrokehq_core_credential_set0 from "@keystrokehq/core/credential-set";
2
+ import * as _keystrokehq_core0 from "@keystrokehq/core";
4
3
 
5
4
  //#region src/webhooks.d.ts
6
5
  declare const webhookSummarySchema: z.ZodObject<{
@@ -116,13 +115,10 @@ declare const createWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
116
115
  created_at: z.ZodOptional<z.ZodString>;
117
116
  updated_at: z.ZodOptional<z.ZodString>;
118
117
  signing_secret: z.ZodOptional<z.ZodString>;
119
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"resend", z.ZodObject<{
120
- RESEND_API_KEY: z.ZodString;
121
- RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
122
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
118
+ }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:resend", z.ZodObject<{
123
119
  RESEND_API_KEY: z.ZodString;
124
120
  RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
125
- }, z.core.$strip>>[] | undefined>], undefined>;
121
+ }, z.core.$strip>>], undefined>;
126
122
  declare const listWebhooks: _keystrokehq_core0.Operation<z.ZodObject<{
127
123
  limit: z.ZodOptional<z.ZodNumber>;
128
124
  after: z.ZodOptional<z.ZodString>;
@@ -159,13 +155,10 @@ declare const listWebhooks: _keystrokehq_core0.Operation<z.ZodObject<{
159
155
  created_at: z.ZodOptional<z.ZodString>;
160
156
  updated_at: z.ZodOptional<z.ZodString>;
161
157
  }, z.core.$loose>>;
162
- }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"resend", z.ZodObject<{
163
- RESEND_API_KEY: z.ZodString;
164
- RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
165
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
158
+ }, z.core.$strip>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:resend", z.ZodObject<{
166
159
  RESEND_API_KEY: z.ZodString;
167
160
  RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
168
- }, z.core.$strip>>[] | undefined>], undefined>;
161
+ }, z.core.$strip>>], undefined>;
169
162
  declare const retrieveWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
170
163
  id: z.ZodString;
171
164
  }, z.core.$strip>, z.ZodObject<{
@@ -197,13 +190,10 @@ declare const retrieveWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
197
190
  created_at: z.ZodOptional<z.ZodString>;
198
191
  updated_at: z.ZodOptional<z.ZodString>;
199
192
  signing_secret: z.ZodOptional<z.ZodString>;
200
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"resend", z.ZodObject<{
193
+ }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:resend", z.ZodObject<{
201
194
  RESEND_API_KEY: z.ZodString;
202
195
  RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
203
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
204
- RESEND_API_KEY: z.ZodString;
205
- RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
206
- }, z.core.$strip>>[] | undefined>], undefined>;
196
+ }, z.core.$strip>>], undefined>;
207
197
  declare const updateWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
208
198
  id: z.ZodString;
209
199
  endpoint_url: z.ZodOptional<z.ZodURL>;
@@ -259,26 +249,20 @@ declare const updateWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
259
249
  created_at: z.ZodOptional<z.ZodString>;
260
250
  updated_at: z.ZodOptional<z.ZodString>;
261
251
  signing_secret: z.ZodOptional<z.ZodString>;
262
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"resend", z.ZodObject<{
263
- RESEND_API_KEY: z.ZodString;
264
- RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
265
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
252
+ }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:resend", z.ZodObject<{
266
253
  RESEND_API_KEY: z.ZodString;
267
254
  RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
268
- }, z.core.$strip>>[] | undefined>], undefined>;
255
+ }, z.core.$strip>>], undefined>;
269
256
  declare const deleteWebhook: _keystrokehq_core0.Operation<z.ZodObject<{
270
257
  id: z.ZodString;
271
258
  }, z.core.$strip>, z.ZodObject<{
272
259
  object: z.ZodOptional<z.ZodLiteral<"webhook">>;
273
260
  id: z.ZodString;
274
261
  deleted: z.ZodOptional<z.ZodBoolean>;
275
- }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"resend", z.ZodObject<{
276
- RESEND_API_KEY: z.ZodString;
277
- RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
278
- }, z.core.$strip>, readonly _keystrokehq_core_credential_set0.CredentialConnection<z.ZodObject<{
262
+ }, z.core.$loose>, readonly [_keystrokehq_core0.CredentialSet<"keystroke:resend", z.ZodObject<{
279
263
  RESEND_API_KEY: z.ZodString;
280
264
  RESEND_WEBHOOK_SIGNING_SECRETS: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
281
- }, z.core.$strip>>[] | undefined>], undefined>;
265
+ }, z.core.$strip>>], undefined>;
282
266
  type ResendWebhookSummary = z.infer<typeof webhookSummarySchema>;
283
267
  type ResendWebhookDetail = z.infer<typeof webhookDetailSchema>;
284
268
  //#endregion
package/dist/webhooks.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { createResendClient } from "./client.mjs";
2
2
  import { paginationQuerySchema, resendListEnvelope } from "./schemas.mjs";
3
3
  import { RESEND_WEBHOOK_EVENT_NAMES } from "./events.mjs";
4
- import { t as resendOperation } from "./factory-CE4vHYLx.mjs";
4
+ import { t as resendOperation } from "./factory-C91g4Zm2.mjs";
5
5
  import { z } from "zod";
6
6
 
7
7
  //#region src/webhooks.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/resend",
3
- "version": "0.0.9",
3
+ "version": "0.0.15",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -92,20 +92,20 @@
92
92
  "LICENSE"
93
93
  ],
94
94
  "dependencies": {
95
+ "@keystrokehq/integration-authoring": "^0.0.9",
95
96
  "zod": "^4.3.6"
96
97
  },
97
98
  "peerDependencies": {
98
- "@keystrokehq/core": ">=0.0.8 <0.1.0"
99
+ "@keystrokehq/core": ">=0.0.13 <0.1.0"
99
100
  },
100
101
  "devDependencies": {
101
102
  "@types/node": "^22.19.11",
102
103
  "tsdown": "^0.20.3",
103
104
  "typescript": "^5.9.3",
104
105
  "vitest": "^4.0.18",
105
- "@keystrokehq/core": "^0.0.12",
106
- "@keystrokehq/typescript-config": "0.0.0",
107
- "@keystrokehq/integration-authoring": "0.0.9",
108
- "@keystrokehq/test-utils": "0.0.0"
106
+ "@keystrokehq/core": "^0.0.13",
107
+ "@keystrokehq/test-utils": "0.0.0",
108
+ "@keystrokehq/typescript-config": "0.0.0"
109
109
  },
110
110
  "keywords": [
111
111
  "resend",
@@ -1,7 +0,0 @@
1
- import { a as createOfficialOperationFactory, t as resend } from "./integration-C5YM61yl.mjs";
2
-
3
- //#region src/factory.ts
4
- const resendOperation = createOfficialOperationFactory(resend);
5
-
6
- //#endregion
7
- export { resendOperation as t };
@@ -1,84 +0,0 @@
1
- //#region ../../packages/integration-authoring/dist/http.mjs
2
- /**
3
- * Typed error thrown by `createJsonRestClient` for non-2xx responses.
4
- *
5
- * Includes the full HTTP status, status text, response headers, raw body
6
- * string, and request URL/method so callers can make structured decisions
7
- * (retry on 5xx, map 401/403 to `CredentialRevokedError`, read
8
- * `Retry-After`, etc.) instead of parsing error messages.
9
- */
10
- var JsonRestError = class extends Error {
11
- name = "JsonRestError";
12
- status;
13
- statusText;
14
- body;
15
- headers;
16
- url;
17
- method;
18
- constructor(init) {
19
- super(`${init.errorPrefix}: ${init.status} ${init.statusText}${init.body ? ` — ${init.body}` : ""}`);
20
- this.status = init.status;
21
- this.statusText = init.statusText;
22
- this.body = init.body;
23
- this.headers = init.headers;
24
- this.url = init.url;
25
- this.method = init.method;
26
- }
27
- /** True for 401 and 403 responses (auth / permission failures). */
28
- static isAuthError(error) {
29
- return isJsonRestError(error) && (error.status === 401 || error.status === 403);
30
- }
31
- };
32
- /**
33
- * Structural type guard for `JsonRestError`. Tolerates cross-realm errors by
34
- * checking the `name` property instead of relying on `instanceof`.
35
- */
36
- function isJsonRestError(error) {
37
- if (!error || typeof error !== "object") return false;
38
- const candidate = error;
39
- return candidate.name === "JsonRestError" && typeof candidate.status === "number" && typeof candidate.body === "string";
40
- }
41
- function buildQueryString(query) {
42
- if (!query) return "";
43
- const params = new URLSearchParams();
44
- for (const [key, value] of Object.entries(query)) if (value !== void 0 && value !== null) params.set(key, String(value));
45
- const qs = params.toString();
46
- return qs ? `?${qs}` : "";
47
- }
48
- function createJsonRestClient(config) {
49
- const fetchImpl = config.fetchImpl ?? fetch;
50
- const request = async (options) => {
51
- const { method, path, body, query, headers: requestHeaders } = options;
52
- const url = `${config.baseUrl}${path}${buildQueryString(query)}`;
53
- const headers = {
54
- Accept: "application/json",
55
- ...config.defaultHeaders,
56
- ...config.authHeaders(),
57
- ...requestHeaders
58
- };
59
- if (body !== void 0) headers["Content-Type"] ??= "application/json";
60
- const response = await fetchImpl(url, {
61
- method,
62
- headers,
63
- body: body !== void 0 ? JSON.stringify(body) : void 0
64
- });
65
- if (!response.ok) {
66
- const errorBody = await response.text().catch(() => "");
67
- throw new JsonRestError({
68
- errorPrefix: config.errorPrefix,
69
- status: response.status,
70
- statusText: response.statusText,
71
- body: errorBody,
72
- headers: response.headers,
73
- url,
74
- method
75
- });
76
- }
77
- if (response.status === 204) return;
78
- return await response.json();
79
- };
80
- return { request };
81
- }
82
-
83
- //#endregion
84
- export { createJsonRestClient as t };
@@ -1,118 +0,0 @@
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 resendAuthSchema = z.object({
96
- RESEND_API_KEY: z.string().min(1).regex(/^re_/, "Resend API keys start with \"re_\"."),
97
- RESEND_WEBHOOK_SIGNING_SECRETS: z.record(z.string().min(1), z.string().regex(/^whsec_/, "Svix signing secrets start with \"whsec_\".")).optional()
98
- });
99
- /**
100
- * Resend integration — manual API-key auth.
101
- *
102
- * All requests use `Authorization: Bearer re_…`. A mandatory
103
- * `User-Agent` header is attached by the client. Optional
104
- * webhook signing secrets are stored per-endpoint so webhook
105
- * triggers can verify inbound Svix-signed payloads.
106
- */
107
- const resendOfficialIntegration = {
108
- id: "resend",
109
- name: "Resend",
110
- description: "Resend transactional + receiving + broadcast email, contacts, segments, templates, domains, and Svix-signed webhook helpers.",
111
- auth: resendAuthSchema,
112
- proxy: { hosts: ["api.resend.com"] }
113
- };
114
- const resendBundle = defineOfficialIntegration(resendOfficialIntegration);
115
- const resend = resendBundle.credentialSet;
116
-
117
- //#endregion
118
- export { createOfficialOperationFactory as a, resendOfficialIntegration as i, resendAuthSchema as n, resendBundle as r, resend as t };