@vibesdotdev/integrations-resend 0.0.0-stage → 1.0.0-rc.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/LICENSE +126 -0
- package/README.md +21 -2
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +2 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/runtime-client.d.ts +12 -0
- package/dist/client/runtime-client.d.ts.map +1 -0
- package/dist/client/runtime-client.js +61 -0
- package/dist/client/runtime-client.js.map +1 -0
- package/dist/config/resend.config.descriptor.d.ts +46 -0
- package/dist/config/resend.config.descriptor.d.ts.map +1 -0
- package/dist/config/resend.config.descriptor.js +50 -0
- package/dist/config/resend.config.descriptor.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/resend/index.d.ts +10 -0
- package/dist/resend/index.d.ts.map +1 -0
- package/dist/resend/index.js +10 -0
- package/dist/resend/index.js.map +1 -0
- package/dist/resend/resend-events.descriptors.d.ts +62 -0
- package/dist/resend/resend-events.descriptors.d.ts.map +1 -0
- package/dist/resend/resend-events.descriptors.js +55 -0
- package/dist/resend/resend-events.descriptors.js.map +1 -0
- package/dist/resend/resend-events.impls.d.ts +35 -0
- package/dist/resend/resend-events.impls.d.ts.map +1 -0
- package/dist/resend/resend-events.impls.js +115 -0
- package/dist/resend/resend-events.impls.js.map +1 -0
- package/dist/resend/resend-message-source.descriptor.d.ts +30 -0
- package/dist/resend/resend-message-source.descriptor.d.ts.map +1 -0
- package/dist/resend/resend-message-source.descriptor.js +24 -0
- package/dist/resend/resend-message-source.descriptor.js.map +1 -0
- package/dist/resend/resend-normalize.d.ts +24 -0
- package/dist/resend/resend-normalize.d.ts.map +1 -0
- package/dist/resend/resend-normalize.js +22 -0
- package/dist/resend/resend-normalize.js.map +1 -0
- package/dist/resend/resend-received.d.ts +25 -0
- package/dist/resend/resend-received.d.ts.map +1 -0
- package/dist/resend/resend-received.js +26 -0
- package/dist/resend/resend-received.js.map +1 -0
- package/dist/resend/resend-response.d.ts +3 -0
- package/dist/resend/resend-response.d.ts.map +1 -0
- package/dist/resend/resend-response.js +14 -0
- package/dist/resend/resend-response.js.map +1 -0
- package/dist/resend/resend-signature-verifier.descriptor.d.ts +20 -0
- package/dist/resend/resend-signature-verifier.descriptor.d.ts.map +1 -0
- package/dist/resend/resend-signature-verifier.descriptor.js +20 -0
- package/dist/resend/resend-signature-verifier.descriptor.js.map +1 -0
- package/dist/resend/resend-signature-verifier.impl.d.ts +16 -0
- package/dist/resend/resend-signature-verifier.impl.d.ts.map +1 -0
- package/dist/resend/resend-signature-verifier.impl.js +19 -0
- package/dist/resend/resend-signature-verifier.impl.js.map +1 -0
- package/dist/resend/resend-signature.d.ts +32 -0
- package/dist/resend/resend-signature.d.ts.map +1 -0
- package/dist/resend/resend-signature.js +77 -0
- package/dist/resend/resend-signature.js.map +1 -0
- package/dist/resend/resend-webhook.descriptor.d.ts +39 -0
- package/dist/resend/resend-webhook.descriptor.d.ts.map +1 -0
- package/dist/resend/resend-webhook.descriptor.js +24 -0
- package/dist/resend/resend-webhook.descriptor.js.map +1 -0
- package/dist/resend/resend-webhook.impl.d.ts +19 -0
- package/dist/resend/resend-webhook.impl.d.ts.map +1 -0
- package/dist/resend/resend-webhook.impl.js +111 -0
- package/dist/resend/resend-webhook.impl.js.map +1 -0
- package/dist/resend/resend.descriptor.d.ts +37 -0
- package/dist/resend/resend.descriptor.d.ts.map +1 -0
- package/dist/resend/resend.descriptor.js +107 -0
- package/dist/resend/resend.descriptor.js.map +1 -0
- package/dist/resend/resend.impl.d.ts +24 -0
- package/dist/resend/resend.impl.d.ts.map +1 -0
- package/dist/resend/resend.impl.js +258 -0
- package/dist/resend/resend.impl.js.map +1 -0
- package/dist/resend.plugin.d.ts +19 -0
- package/dist/resend.plugin.d.ts.map +1 -0
- package/dist/resend.plugin.js +88 -0
- package/dist/resend.plugin.js.map +1 -0
- package/dist/schemas/resend.d.ts +421 -0
- package/dist/schemas/resend.d.ts.map +1 -0
- package/dist/schemas/resend.js +97 -0
- package/dist/schemas/resend.js.map +1 -0
- package/package.json +107 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
Parameters
|
|
4
|
+
|
|
5
|
+
Licensor: VIBES DEV LLC
|
|
6
|
+
Licensed Work: @vibesdotdev/integrations-resend
|
|
7
|
+
The Licensed Work is (c) 2026 VIBES DEV LLC.
|
|
8
|
+
Additional Use Grant: In this grant, "Vibes Platform" means the hosted services VIBES DEV LLC
|
|
9
|
+
operates at vibes.dev and its subdomains.
|
|
10
|
+
|
|
11
|
+
You may make production use of the Licensed Work, including commercial
|
|
12
|
+
use, subject to the limits below. Permitted production use includes:
|
|
13
|
+
building, operating and selling your own applications, agents and services
|
|
14
|
+
on or with the Vibes Platform; self-hosting the Licensed Work for use inside
|
|
15
|
+
your own organization; and providing consulting, integration or development
|
|
16
|
+
services to clients who build on the Vibes Platform.
|
|
17
|
+
|
|
18
|
+
The production use permitted above does not include use that:
|
|
19
|
+
|
|
20
|
+
(a) offers third parties a hosted, managed or embedded service that
|
|
21
|
+
substitutes for the Vibes Platform or a material part of it (including
|
|
22
|
+
agent hosting; fleet, sandbox or container provisioning; package
|
|
23
|
+
registry; source hosting and continuous integration; and managed AI,
|
|
24
|
+
storage, secrets or messaging), where the Licensed Work provides a
|
|
25
|
+
material part of that service's value and that service earns more than
|
|
26
|
+
US$1,000,000 in gross revenue in any twelve-month period;
|
|
27
|
+
(b) sells, rents, sublicenses or white-labels the Licensed Work, or access
|
|
28
|
+
to Vibes Platform functionality, as a product in its own right;
|
|
29
|
+
(c) removes, disables or works around entitlement checks, usage metering,
|
|
30
|
+
quotas or plan limits, or reaches Vibes Platform features the user's
|
|
31
|
+
account is not entitled to;
|
|
32
|
+
(d) scrapes, bulk-exports or harvests data or content from the Vibes
|
|
33
|
+
Platform or its users other than through documented interfaces and
|
|
34
|
+
within their terms, or uses outputs or data obtained from the Vibes
|
|
35
|
+
Platform to train or improve a product that competes with it;
|
|
36
|
+
(e) violates applicable law, infringes anyone's rights, commits fraud or
|
|
37
|
+
deception, conducts unlawful surveillance or harassment, distributes
|
|
38
|
+
malware, or accesses systems without authorization; or
|
|
39
|
+
(f) violates applicable antitrust or competition law.
|
|
40
|
+
|
|
41
|
+
A written permission from the Licensor extends this grant.
|
|
42
|
+
Change Date: Four years from the date the Licensed Work is published.
|
|
43
|
+
Change License: MIT
|
|
44
|
+
|
|
45
|
+
For information about alternative licensing arrangements for the Licensed Work,
|
|
46
|
+
contact VIBES DEV LLC through https://vibes.dev.
|
|
47
|
+
|
|
48
|
+
Notice
|
|
49
|
+
|
|
50
|
+
The Business Source License (this document, or the "License") is not an Open
|
|
51
|
+
Source license. However, the Licensed Work will eventually be made available
|
|
52
|
+
under an Open Source License, as stated in this License.
|
|
53
|
+
|
|
54
|
+
-----------------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
Business Source License 1.1
|
|
57
|
+
|
|
58
|
+
License text copyright © 2017 MariaDB Corporation Ab, All Rights Reserved.
|
|
59
|
+
"Business Source License" is a trademark of MariaDB Corporation Ab.
|
|
60
|
+
|
|
61
|
+
Terms
|
|
62
|
+
|
|
63
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
64
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
65
|
+
Licensor may make an Additional Use Grant, above, permitting limited
|
|
66
|
+
production use.
|
|
67
|
+
|
|
68
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
69
|
+
available distribution of a specific version of the Licensed Work under this
|
|
70
|
+
License, whichever comes first, the Licensor hereby grants you rights under
|
|
71
|
+
the terms of the Change License, and the rights granted in the paragraph
|
|
72
|
+
above terminate.
|
|
73
|
+
|
|
74
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
75
|
+
currently in effect as described in this License, you must purchase a
|
|
76
|
+
commercial license from the Licensor, its affiliated entities, or authorized
|
|
77
|
+
resellers, or you must refrain from using the Licensed Work.
|
|
78
|
+
|
|
79
|
+
All copies of the original and modified Licensed Work, and derivative works
|
|
80
|
+
of the Licensed Work, are subject to this License. This License applies
|
|
81
|
+
separately for each version of the Licensed Work and the Change Date may vary
|
|
82
|
+
for each version of the Licensed Work released by Licensor.
|
|
83
|
+
|
|
84
|
+
You must conspicuously display this License on each original or modified copy
|
|
85
|
+
of the Licensed Work. If you receive the Licensed Work in original or
|
|
86
|
+
modified form from a third party, the terms and conditions set forth in this
|
|
87
|
+
License apply to your use of that work.
|
|
88
|
+
|
|
89
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
90
|
+
terminate your rights under this License for the current and all other
|
|
91
|
+
versions of the Licensed Work.
|
|
92
|
+
|
|
93
|
+
This License does not grant you any right in any trademark or logo of
|
|
94
|
+
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
95
|
+
Licensor as expressly required by this License).
|
|
96
|
+
|
|
97
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
98
|
+
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
99
|
+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
100
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
101
|
+
TITLE.
|
|
102
|
+
|
|
103
|
+
MariaDB hereby grants you permission to use this License’s text to license
|
|
104
|
+
your works, and to refer to it using the trademark “Business Source License”,
|
|
105
|
+
as long as you comply with the Covenants of Licensor below.
|
|
106
|
+
|
|
107
|
+
Covenants of Licensor
|
|
108
|
+
|
|
109
|
+
In consideration of the right to use this License’s text and the “Business
|
|
110
|
+
Source License” name and trademark, Licensor covenants to MariaDB, and to all
|
|
111
|
+
other recipients of the licensed work to be provided by Licensor:
|
|
112
|
+
|
|
113
|
+
1. To specify as the Change License the GPL Version 2.0 or any later version,
|
|
114
|
+
or a license that is compatible with GPL Version 2.0 or a later version,
|
|
115
|
+
where “compatible” means that software provided under the Change License can
|
|
116
|
+
be included in a program with software provided under GPL Version 2.0 or a
|
|
117
|
+
later version. Licensor may specify additional Change Licenses without
|
|
118
|
+
limitation.
|
|
119
|
+
|
|
120
|
+
2. To either: (a) specify an additional grant of rights to use that does not
|
|
121
|
+
impose any additional restriction on the right granted in this License, as
|
|
122
|
+
the Additional Use Grant; or (b) insert the text “None”.
|
|
123
|
+
|
|
124
|
+
3. To specify a Change Date.
|
|
125
|
+
|
|
126
|
+
4. Not to modify this License in any other way.
|
package/README.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Resend integration
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Compose ./plugin after the Email, Integrations, Storage, Logging, Notifications,
|
|
4
|
+
Tools and runtime-client owners. Supply the integration/store and
|
|
5
|
+
system/settings-reader contexts. Use createResendPlugin({ defaultFrom }) for a
|
|
6
|
+
host sender, or pass from on each send.
|
|
7
|
+
|
|
8
|
+
The provider extends BaseIntegrationProvider. It supports send, status/health
|
|
9
|
+
checks, selected-account received-email hydration and attachment downloads.
|
|
10
|
+
String tags become name/value pairs (value 'true'); status timestamps normalize
|
|
11
|
+
to ISO UTC. Webhook envelopes validate identity and addressing before task creation.
|
|
12
|
+
Org credentials precede the host RESEND_API_KEY secret reference. Signed
|
|
13
|
+
webhooks read the current webhookSecret for every delivery.
|
|
14
|
+
|
|
15
|
+
Resolve ResendClient through getVibesClient('resend', runtime); account-aware
|
|
16
|
+
calls pass actor and connection identity on each invocation. Runtime consumers
|
|
17
|
+
resolve the provider and transport by kind. The explicit ./resend implementation
|
|
18
|
+
entrypoint remains available.
|
|
19
|
+
|
|
20
|
+
Run bun run check, bun test and bun run build, plus the configured package rules
|
|
21
|
+
and lint checks. See [SPEC.md](./SPEC.md) for contracts, refusal reasons, composition
|
|
22
|
+
requirements and the complete public surface.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,YAAY,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseRuntimeClient } from '@vibesdotdev/kernel/client';
|
|
2
|
+
import * as z from 'zod/v4';
|
|
3
|
+
import { type ResendInvokeIdentity, type ResendConnectionIdentity, type ResendOperationArgs, type ResendOperationResult } from '../schemas/resend.ts';
|
|
4
|
+
export type { ResendInvokeIdentity, ResendConnectionIdentity } from '../schemas/resend.ts';
|
|
5
|
+
/** Selection belongs to each invocation; the runtime owns this semantic client. */
|
|
6
|
+
export declare class ResendClient extends BaseRuntimeClient {
|
|
7
|
+
get integrationId(): string;
|
|
8
|
+
invoke<T = ResendOperationResult>(operationId: string, args?: ResendOperationArgs, identity?: ResendInvokeIdentity, resultSchema?: z.ZodType<T>): Promise<T | ResendOperationResult>;
|
|
9
|
+
invokeForConnection<T = ResendOperationResult>(operationId: string, args: ResendOperationArgs, identity: Readonly<ResendConnectionIdentity>, resultSchema?: z.ZodType<T>): Promise<T | ResendOperationResult>;
|
|
10
|
+
private dispatch;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=runtime-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-client.d.ts","sourceRoot":"","sources":["../../src/client/runtime-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAM/D,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAEN,KAAK,oBAAoB,EAAE,KAAK,wBAAwB,EAAE,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAC9G,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAE3F,mFAAmF;AACnF,qBAAa,YAAa,SAAQ,iBAAiB;IAClD,IAAI,aAAa,IAAI,MAAM,CAAuC;IAE5D,MAAM,CAAC,CAAC,GAAG,qBAAqB,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,mBAAmB,EAAE,QAAQ,CAAC,EAAE,oBAAoB,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,qBAAqB,CAAC;IAYpL,mBAAmB,CAAC,CAAC,GAAG,qBAAqB,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,QAAQ,CAAC,wBAAwB,CAAC,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,qBAAqB,CAAC;YAWrM,QAAQ;CAqBtB"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { BaseRuntimeClient } from '@vibesdotdev/kernel/client';
|
|
2
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
3
|
+
import { getVibesPlatformInternalClient } from '@vibesdotdev/platform/internal-api';
|
|
4
|
+
import { emailSendInputSchema, emailSendResultSchema, emailStatusResultSchema, emailHealthResultSchema } from '@vibesdotdev/email/schemas/email-data';
|
|
5
|
+
import { receivedInputSchema, attachmentInputSchema, attachmentResultSchema, normalizedReceivedSchema } from "../schemas/resend.js";
|
|
6
|
+
import * as z from 'zod/v4';
|
|
7
|
+
import { resendInvokeIdentitySchema, resendConnectionIdentitySchema, resendOperationResultSchema } from "../schemas/resend.js";
|
|
8
|
+
/** Selection belongs to each invocation; the runtime owns this semantic client. */
|
|
9
|
+
export class ResendClient extends BaseRuntimeClient {
|
|
10
|
+
get integrationId() { return 'integration.email.resend'; }
|
|
11
|
+
async invoke(operationId, args, identity, resultSchema) {
|
|
12
|
+
const parsed = resendInvokeIdentitySchema.safeParse(identity ?? {
|
|
13
|
+
userId: await this.runtime.context('userId'), organizationId: await this.runtime.context('orgId')
|
|
14
|
+
});
|
|
15
|
+
if (!parsed.success)
|
|
16
|
+
throw new CapabilityError('Resend operation requires authenticated userId and valid organizationId.', 'INVALID_INPUT', { reason: 'resend-identity-invalid' });
|
|
17
|
+
const caller = parsed.data;
|
|
18
|
+
return this.dispatch({
|
|
19
|
+
userId: caller.userId, organizationId: caller.organizationId, actorJwt: caller.jwt,
|
|
20
|
+
deploymentAuthority: caller.deploymentAuthority, integrationId: this.integrationId, operationId, args
|
|
21
|
+
}, resultSchema);
|
|
22
|
+
}
|
|
23
|
+
async invokeForConnection(operationId, args, identity, resultSchema) {
|
|
24
|
+
const parsed = resendConnectionIdentitySchema.safeParse(identity);
|
|
25
|
+
if (!parsed.success)
|
|
26
|
+
throw new CapabilityError('Resend operation requires connectionId and authenticated userId.', 'INVALID_INPUT', { reason: 'resend-identity-invalid' });
|
|
27
|
+
const caller = parsed.data;
|
|
28
|
+
return this.dispatch({
|
|
29
|
+
userId: caller.userId, organizationId: caller.organizationId, connectionId: caller.connectionId,
|
|
30
|
+
actorJwt: caller.jwt, deploymentAuthority: caller.deploymentAuthority,
|
|
31
|
+
integrationId: this.integrationId, operationId, args
|
|
32
|
+
}, resultSchema);
|
|
33
|
+
}
|
|
34
|
+
async dispatch(input, resultSchema) {
|
|
35
|
+
const client = await getVibesPlatformInternalClient(this.runtime);
|
|
36
|
+
const operationSchema = input.operationId === 'send' ? emailSendResultSchema
|
|
37
|
+
: input.operationId === 'check' ? z.union([emailStatusResultSchema, emailHealthResultSchema])
|
|
38
|
+
: input.operationId === 'get-received' ? normalizedReceivedSchema
|
|
39
|
+
: input.operationId === 'get-received-attachment' ? attachmentResultSchema : resendOperationResultSchema;
|
|
40
|
+
if (input.operationId === 'send')
|
|
41
|
+
input.args = emailSendInputSchema.parse(input.args);
|
|
42
|
+
if (input.operationId === 'get-received')
|
|
43
|
+
input.args = receivedInputSchema.parse(input.args);
|
|
44
|
+
if (input.operationId === 'get-received-attachment')
|
|
45
|
+
input.args = attachmentInputSchema.parse(input.args);
|
|
46
|
+
const schema = resultSchema ?? operationSchema;
|
|
47
|
+
// Platform's inferred return erases T via its unknown-schema fallback.
|
|
48
|
+
// Retain the owner-validated output without parsing transforms a second time.
|
|
49
|
+
const validated = { ok: true, data: null };
|
|
50
|
+
const result = await client.integrations.invoke(input, schema.transform(data => {
|
|
51
|
+
validated.data = data;
|
|
52
|
+
return data;
|
|
53
|
+
}));
|
|
54
|
+
if (!result.ok)
|
|
55
|
+
throw new CapabilityError('Resend operation was refused by Platform.', 'PERMISSION_DENIED', { reason: 'resend-operation-refused', details: { errorCount: result.errors.length } });
|
|
56
|
+
if (result.data == null || validated.data == null)
|
|
57
|
+
throw new CapabilityError('Resend operation returned null data.', 'UNAVAILABLE', { reason: 'resend-result-invalid' });
|
|
58
|
+
return validated.data;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=runtime-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-client.js","sourceRoot":"","sources":["../../src/client/runtime-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AAEpF,OAAO,EAAE,oBAAoB,EAAE,qBAA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
+
import { type ResendSettings } from '../schemas/resend.ts';
|
|
5
|
+
export { RESEND_DEFAULT_BASE_URL, ResendSettingsSchema, type ResendSettings } from '../schemas/resend.ts';
|
|
6
|
+
import { type RuntimeRef } from '@vibesdotdev/kernel';
|
|
7
|
+
export declare const RESEND_SETTINGS_MANIFEST_ID = "integrations.resend";
|
|
8
|
+
export declare function loadResendSettings(runtime: RuntimeRef): Promise<ResendSettings>;
|
|
9
|
+
export declare function resolveResendBaseUrl(runtime: RuntimeRef, declared?: string): Promise<string>;
|
|
10
|
+
export declare const resendSettingsDescriptor: {
|
|
11
|
+
kind: "config/manifest";
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
namespace: string;
|
|
15
|
+
description: string;
|
|
16
|
+
tier: string;
|
|
17
|
+
category: string;
|
|
18
|
+
schema: import("zod").ZodObject<{
|
|
19
|
+
baseUrl: import("zod").ZodDefault<import("zod").ZodURL>;
|
|
20
|
+
}, import("zod/v4/core").$strip>;
|
|
21
|
+
fields: {
|
|
22
|
+
baseUrl: {
|
|
23
|
+
ui: {
|
|
24
|
+
label: string;
|
|
25
|
+
component: string;
|
|
26
|
+
group: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
groups: {
|
|
31
|
+
id: string;
|
|
32
|
+
label: string;
|
|
33
|
+
}[];
|
|
34
|
+
allowedAdapters: string[];
|
|
35
|
+
defaultAdapter: string;
|
|
36
|
+
scope: string;
|
|
37
|
+
customTables: boolean;
|
|
38
|
+
version: number;
|
|
39
|
+
internal: boolean;
|
|
40
|
+
context: {
|
|
41
|
+
surfaces: string[];
|
|
42
|
+
};
|
|
43
|
+
enabled: true;
|
|
44
|
+
};
|
|
45
|
+
export default resendSettingsDescriptor;
|
|
46
|
+
//# sourceMappingURL=resend.config.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resend.config.descriptor.d.ts","sourceRoot":"","sources":["../../src/config/resend.config.descriptor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE1G,OAAO,EAAuC,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE3F,eAAO,MAAM,2BAA2B,wBAAwB,CAAC;AAEjE,wBAAsB,kBAAkB,CACvC,OAAO,EAAE,UAAU,GACjB,OAAO,CAAC,cAAc,CAAC,CAUzB;AAED,wBAAsB,oBAAoB,CACzC,OAAO,EAAE,UAAU,EACnB,QAAQ,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBnC,CAAC;AAEH,eAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resend settings — the `integrations.resend` config manifest.
|
|
3
|
+
*/
|
|
4
|
+
import { ResendSettingsSchema } from "../schemas/resend.js";
|
|
5
|
+
export { RESEND_DEFAULT_BASE_URL, ResendSettingsSchema } from "../schemas/resend.js";
|
|
6
|
+
import { ConfigManifest } from '@vibesdotdev/config/manifest/config-manifest';
|
|
7
|
+
import { CapabilityError, createRuntimeAsset } from '@vibesdotdev/kernel';
|
|
8
|
+
export const RESEND_SETTINGS_MANIFEST_ID = 'integrations.resend';
|
|
9
|
+
export async function loadResendSettings(runtime) {
|
|
10
|
+
if (!runtime.hasKind('config/manifest'))
|
|
11
|
+
return ResendSettingsSchema.parse({});
|
|
12
|
+
try {
|
|
13
|
+
return await ConfigManifest.forRuntime(runtime, RESEND_SETTINGS_MANIFEST_ID).load();
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
if (error instanceof CapabilityError && error.reason === 'config-manifest-unregistered') {
|
|
17
|
+
return ResendSettingsSchema.parse({});
|
|
18
|
+
}
|
|
19
|
+
throw error;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export async function resolveResendBaseUrl(runtime, declared) {
|
|
23
|
+
if (declared)
|
|
24
|
+
return declared.replace(/\/+$/, '');
|
|
25
|
+
return (await loadResendSettings(runtime)).baseUrl.replace(/\/+$/, '');
|
|
26
|
+
}
|
|
27
|
+
export const resendSettingsDescriptor = createRuntimeAsset({
|
|
28
|
+
kind: 'config/manifest',
|
|
29
|
+
id: RESEND_SETTINGS_MANIFEST_ID,
|
|
30
|
+
name: 'Resend',
|
|
31
|
+
namespace: 'integrations',
|
|
32
|
+
description: 'Resend Email API origin',
|
|
33
|
+
tier: 'user',
|
|
34
|
+
category: 'integrations',
|
|
35
|
+
schema: ResendSettingsSchema,
|
|
36
|
+
fields: {
|
|
37
|
+
baseUrl: { ui: { label: 'API origin', component: 'text', group: 'resend' } }
|
|
38
|
+
},
|
|
39
|
+
groups: [{ id: 'resend', label: 'Resend' }],
|
|
40
|
+
allowedAdapters: ['storage.localdb', 'storage.json'],
|
|
41
|
+
defaultAdapter: 'storage.localdb',
|
|
42
|
+
scope: 'auto',
|
|
43
|
+
customTables: false,
|
|
44
|
+
version: 1,
|
|
45
|
+
internal: false,
|
|
46
|
+
context: { surfaces: ['cli', 'tui'] },
|
|
47
|
+
enabled: true
|
|
48
|
+
});
|
|
49
|
+
export default resendSettingsDescriptor;
|
|
50
|
+
//# sourceMappingURL=resend.config.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resend.config.descriptor.js","sourceRoot":"","sources":["../../src/config/resend.config.descriptor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,oBAAoB,EAAuB,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAuB,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAE,MAAM,8CA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E,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;KAC5E;IACD,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IAC3C,eAAe,EAAE,CAAC,iBAAiB,EAAE,cAAc,CAAC;IACpD,cAAc,EAAE,iBAAiB;IACjC,KAAK,EAAE,MAAM;IACb,YAAY,EAAE,KAAK;IACnB,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE;IACrC,OAAO,EAAE,IAAI;CACb,CAAC,CAAC;AAEH,eAAe,wBAAwB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vibesdotdev/integrations-resend
|
|
3
|
+
*
|
|
4
|
+
* Resend HTTP email API vendor pack. Registers an `integration/provider`
|
|
5
|
+
* (`integration.email.resend`, `category: 'email'`) and a matching
|
|
6
|
+
* `email/webhook-handler` for Svix-signed inbound delivery events. Consumed
|
|
7
|
+
* automatically by `packages/email`'s `EmailClient` at dispatch time.
|
|
8
|
+
*/
|
|
9
|
+
export { default as resendPlugin, createResendPlugin } from './resend.plugin.ts';
|
|
10
|
+
export { default } from './resend.plugin.ts';
|
|
11
|
+
export { resendDescriptor, createHostResendDescriptor, type ResendHostOptions, resendWebhookDescriptor, createResendWebhookHandler } from './resend/index.ts';
|
|
12
|
+
export { verifyResendSignature } from './resend/resend-signature.ts';
|
|
13
|
+
export { default as resendSignatureVerifierDescriptor } from './resend/resend-signature-verifier.descriptor.ts';
|
|
14
|
+
export { resendEmailReceivedDescriptor, resendEmailBouncedDescriptor, resendEmailDeliveredDescriptor, resendEmailComplainedDescriptor, resendWebhookEventDescriptors } from './resend/resend-events.descriptors.ts';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EACN,gBAAgB,EAChB,0BAA0B,EAC1B,KAAK,iBAAiB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,iCAAiC,EAAE,MAAM,kDAAkD,CAAC;AAChH,OAAO,EACN,6BAA6B,EAC7B,4BAA4B,EAC5B,8BAA8B,EAC9B,+BAA+B,EAC/B,6BAA6B,EAC7B,MAAM,uCAAuC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @vibesdotdev/integrations-resend
|
|
3
|
+
*
|
|
4
|
+
* Resend HTTP email API vendor pack. Registers an `integration/provider`
|
|
5
|
+
* (`integration.email.resend`, `category: 'email'`) and a matching
|
|
6
|
+
* `email/webhook-handler` for Svix-signed inbound delivery events. Consumed
|
|
7
|
+
* automatically by `packages/email`'s `EmailClient` at dispatch time.
|
|
8
|
+
*/
|
|
9
|
+
export { default as resendPlugin, createResendPlugin } from "./resend.plugin.js";
|
|
10
|
+
export { default } from "./resend.plugin.js";
|
|
11
|
+
export { resendDescriptor, createHostResendDescriptor, resendWebhookDescriptor, createResendWebhookHandler } from "./resend/index.js";
|
|
12
|
+
export { verifyResendSignature } from "./resend/resend-signature.js";
|
|
13
|
+
export { default as resendSignatureVerifierDescriptor } from "./resend/resend-signature-verifier.descriptor.js";
|
|
14
|
+
export { resendEmailReceivedDescriptor, resendEmailBouncedDescriptor, resendEmailDeliveredDescriptor, resendEmailComplainedDescriptor, resendWebhookEventDescriptors } from "./resend/resend-events.descriptors.js";
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EACN,gBAAgB,EAChB,0BAA0B,EAE1B,uBAAuB,EACvB,0BAA0B,EAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,iCAAiC,EAAE,MAAM,kDAAkD,CAAC;AAChH,OAAO,EACN,6BAA6B,EAC7B,4BAA4B,EAC5B,8BAA8B,EAC9B,+BAA+B,EAC/B,6BAA6B,EAC7B,MAAM,uCAAuC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public surface for the Resend vendor pack. Consumers import the plugin;
|
|
3
|
+
* lower-level descriptors + impls are available for ad-hoc registration in
|
|
4
|
+
* tests or specialized bootstrap.
|
|
5
|
+
*/
|
|
6
|
+
export { default as resendDescriptor, createHostResendDescriptor, type ResendHostOptions } from './resend.descriptor.ts';
|
|
7
|
+
export { default as resendWebhookDescriptor } from './resend-webhook.descriptor.ts';
|
|
8
|
+
export { ResendEmailIntegration } from './resend.impl.ts';
|
|
9
|
+
export { createResendWebhookHandler } from './resend-webhook.impl.ts';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resend/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACN,OAAO,IAAI,gBAAgB,EAC3B,0BAA0B,EAC1B,KAAK,iBAAiB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public surface for the Resend vendor pack. Consumers import the plugin;
|
|
3
|
+
* lower-level descriptors + impls are available for ad-hoc registration in
|
|
4
|
+
* tests or specialized bootstrap.
|
|
5
|
+
*/
|
|
6
|
+
export { default as resendDescriptor, createHostResendDescriptor } from "./resend.descriptor.js";
|
|
7
|
+
export { default as resendWebhookDescriptor } from "./resend-webhook.descriptor.js";
|
|
8
|
+
export { ResendEmailIntegration } from "./resend.impl.js";
|
|
9
|
+
export { createResendWebhookHandler } from "./resend-webhook.impl.js";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resend/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACN,OAAO,IAAI,gBAAgB,EAC3B,0BAA0B,EAE1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `tools/webhook-event-definition` descriptors for Resend email events.
|
|
3
|
+
*
|
|
4
|
+
* Four events: received, bounced, delivered, complained. Each descriptor is
|
|
5
|
+
* data-only — the bound implementation (in `resend-events.impl.ts`) supplies
|
|
6
|
+
* the parser, task builder, and (where applicable) outbox builder.
|
|
7
|
+
*
|
|
8
|
+
* The router (in `@vibesdotdev/tools/webhooks/router`) resolves a descriptor
|
|
9
|
+
* by filtering on `source === 'resend'` + `event_type === <type>`, then calls
|
|
10
|
+
* the impl's `parse`, `buildTask`, and optional `buildOutbox`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const resendEmailReceivedDescriptor: {
|
|
13
|
+
id: string;
|
|
14
|
+
kind: "tools/webhook-event-definition";
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
source: string;
|
|
18
|
+
event_type: string;
|
|
19
|
+
dispatchMode?: "none" | "hook" | undefined;
|
|
20
|
+
tags?: string[] | undefined;
|
|
21
|
+
};
|
|
22
|
+
export declare const resendEmailBouncedDescriptor: {
|
|
23
|
+
id: string;
|
|
24
|
+
kind: "tools/webhook-event-definition";
|
|
25
|
+
name: string;
|
|
26
|
+
description: string;
|
|
27
|
+
source: string;
|
|
28
|
+
event_type: string;
|
|
29
|
+
dispatchMode?: "none" | "hook" | undefined;
|
|
30
|
+
tags?: string[] | undefined;
|
|
31
|
+
};
|
|
32
|
+
export declare const resendEmailDeliveredDescriptor: {
|
|
33
|
+
id: string;
|
|
34
|
+
kind: "tools/webhook-event-definition";
|
|
35
|
+
name: string;
|
|
36
|
+
description: string;
|
|
37
|
+
source: string;
|
|
38
|
+
event_type: string;
|
|
39
|
+
dispatchMode?: "none" | "hook" | undefined;
|
|
40
|
+
tags?: string[] | undefined;
|
|
41
|
+
};
|
|
42
|
+
export declare const resendEmailComplainedDescriptor: {
|
|
43
|
+
id: string;
|
|
44
|
+
kind: "tools/webhook-event-definition";
|
|
45
|
+
name: string;
|
|
46
|
+
description: string;
|
|
47
|
+
source: string;
|
|
48
|
+
event_type: string;
|
|
49
|
+
dispatchMode?: "none" | "hook" | undefined;
|
|
50
|
+
tags?: string[] | undefined;
|
|
51
|
+
};
|
|
52
|
+
export declare const resendWebhookEventDescriptors: {
|
|
53
|
+
id: string;
|
|
54
|
+
kind: "tools/webhook-event-definition";
|
|
55
|
+
name: string;
|
|
56
|
+
description: string;
|
|
57
|
+
source: string;
|
|
58
|
+
event_type: string;
|
|
59
|
+
dispatchMode?: "none" | "hook" | undefined;
|
|
60
|
+
tags?: string[] | undefined;
|
|
61
|
+
}[];
|
|
62
|
+
//# sourceMappingURL=resend-events.descriptors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resend-events.descriptors.d.ts","sourceRoot":"","sources":["../../src/resend/resend-events.descriptors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,eAAO,MAAM,6BAA6B;;;;;;;;;CAQxC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;CAQvC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;CAQzC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;CAQ1C,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;GAKzC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `tools/webhook-event-definition` descriptors for Resend email events.
|
|
3
|
+
*
|
|
4
|
+
* Four events: received, bounced, delivered, complained. Each descriptor is
|
|
5
|
+
* data-only — the bound implementation (in `resend-events.impl.ts`) supplies
|
|
6
|
+
* the parser, task builder, and (where applicable) outbox builder.
|
|
7
|
+
*
|
|
8
|
+
* The router (in `@vibesdotdev/tools/webhooks/router`) resolves a descriptor
|
|
9
|
+
* by filtering on `source === 'resend'` + `event_type === <type>`, then calls
|
|
10
|
+
* the impl's `parse`, `buildTask`, and optional `buildOutbox`.
|
|
11
|
+
*/
|
|
12
|
+
import { createRuntimeAsset } from '@vibesdotdev/kernel';
|
|
13
|
+
export const resendEmailReceivedDescriptor = createRuntimeAsset({
|
|
14
|
+
kind: 'tools/webhook-event-definition',
|
|
15
|
+
id: 'webhook-event.resend.email.received',
|
|
16
|
+
name: 'Resend Email Received',
|
|
17
|
+
description: 'Inbound email received via Resend.',
|
|
18
|
+
source: 'resend',
|
|
19
|
+
event_type: 'email.received',
|
|
20
|
+
tags: ['email', 'resend', 'inbound']
|
|
21
|
+
});
|
|
22
|
+
export const resendEmailBouncedDescriptor = createRuntimeAsset({
|
|
23
|
+
kind: 'tools/webhook-event-definition',
|
|
24
|
+
id: 'webhook-event.resend.email.bounced',
|
|
25
|
+
name: 'Resend Email Bounced',
|
|
26
|
+
description: 'Email bounced.',
|
|
27
|
+
source: 'resend',
|
|
28
|
+
event_type: 'email.bounced',
|
|
29
|
+
tags: ['email', 'resend', 'delivery']
|
|
30
|
+
});
|
|
31
|
+
export const resendEmailDeliveredDescriptor = createRuntimeAsset({
|
|
32
|
+
kind: 'tools/webhook-event-definition',
|
|
33
|
+
id: 'webhook-event.resend.email.delivered',
|
|
34
|
+
name: 'Resend Email Delivered',
|
|
35
|
+
description: 'Email delivered.',
|
|
36
|
+
source: 'resend',
|
|
37
|
+
event_type: 'email.delivered',
|
|
38
|
+
tags: ['email', 'resend', 'delivery']
|
|
39
|
+
});
|
|
40
|
+
export const resendEmailComplainedDescriptor = createRuntimeAsset({
|
|
41
|
+
kind: 'tools/webhook-event-definition',
|
|
42
|
+
id: 'webhook-event.resend.email.complained',
|
|
43
|
+
name: 'Resend Email Spam Complaint',
|
|
44
|
+
description: 'Spam complaint.',
|
|
45
|
+
source: 'resend',
|
|
46
|
+
event_type: 'email.complained',
|
|
47
|
+
tags: ['email', 'resend', 'delivery']
|
|
48
|
+
});
|
|
49
|
+
export const resendWebhookEventDescriptors = [
|
|
50
|
+
resendEmailReceivedDescriptor,
|
|
51
|
+
resendEmailBouncedDescriptor,
|
|
52
|
+
resendEmailDeliveredDescriptor,
|
|
53
|
+
resendEmailComplainedDescriptor
|
|
54
|
+
];
|
|
55
|
+
//# sourceMappingURL=resend-events.descriptors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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,kBAAkB;IAC9B,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC;CACrC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC5C,6BAA6B;IAC7B,4BAA4B;IAC5B,8BAA8B;IAC9B,+BAA+B;CAC/B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime implementations for the Resend `tools/webhook-event-definition`
|
|
3
|
+
* descriptors. Each impl extracts a normalized payload from Resend's raw
|
|
4
|
+
* webhook body, builds a marshal task spec, and (for `email.received`) builds
|
|
5
|
+
* the `update_lead` outbox entry.
|
|
6
|
+
*
|
|
7
|
+
* The received parser accepts both the provider envelope and an enriched
|
|
8
|
+
* received-email resource. RFC reply identity stays distinct from the API id.
|
|
9
|
+
*/
|
|
10
|
+
import type { JsonObject } from '@vibesdotdev/kernel/schemas/json';
|
|
11
|
+
import type { WebhookEventDefinitionDescriptor, WebhookEventDefinitionImplementation, WebhookOutboxSpec, WebhookTaskSpec } from '@vibesdotdev/tools/webhooks/schemas';
|
|
12
|
+
declare class ResendEmailReceived implements WebhookEventDefinitionImplementation {
|
|
13
|
+
readonly descriptor: WebhookEventDefinitionDescriptor;
|
|
14
|
+
idempotencyKey(parsed: JsonObject): string | null;
|
|
15
|
+
parse(raw: JsonObject): JsonObject;
|
|
16
|
+
buildTask(parsed: JsonObject): WebhookTaskSpec;
|
|
17
|
+
buildOutbox(parsed: JsonObject): WebhookOutboxSpec[];
|
|
18
|
+
}
|
|
19
|
+
declare class ResendEmailBounced implements WebhookEventDefinitionImplementation {
|
|
20
|
+
readonly descriptor: WebhookEventDefinitionDescriptor;
|
|
21
|
+
parse(raw: JsonObject): JsonObject;
|
|
22
|
+
buildTask(parsed: JsonObject): WebhookTaskSpec;
|
|
23
|
+
}
|
|
24
|
+
declare class ResendEmailDelivered implements WebhookEventDefinitionImplementation {
|
|
25
|
+
readonly descriptor: WebhookEventDefinitionDescriptor;
|
|
26
|
+
parse(raw: JsonObject): JsonObject;
|
|
27
|
+
buildTask(parsed: JsonObject): WebhookTaskSpec;
|
|
28
|
+
}
|
|
29
|
+
declare class ResendEmailComplained implements WebhookEventDefinitionImplementation {
|
|
30
|
+
readonly descriptor: WebhookEventDefinitionDescriptor;
|
|
31
|
+
parse(raw: JsonObject): JsonObject;
|
|
32
|
+
buildTask(parsed: JsonObject): WebhookTaskSpec;
|
|
33
|
+
}
|
|
34
|
+
export { ResendEmailReceived, ResendEmailBounced, ResendEmailDelivered, ResendEmailComplained };
|
|
35
|
+
//# sourceMappingURL=resend-events.impls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resend-events.impls.d.ts","sourceRoot":"","sources":["../../src/resend/resend-events.impls.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EACX,gCAAgC,EAChC,oCAAoC,EACpC,iBAAiB,EACjB,eAAe,EACf,MAAM,qCAAqC,CAAC;AAgB7C,cAAM,mBAAoB,YAAW,oCAAoC;IACxE,QAAQ,CAAC,UAAU,EAAE,gCAAgC,CAAiC;IAEtF,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI;IAMjD,KAAK,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU;IAOlC,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,eAAe;IAU9C,WAAW,CAAC,MAAM,EAAE,UAAU,GAAG,iBAAiB,EAAE;CAkBpD;AAeD,cAAM,kBAAmB,YAAW,oCAAoC;IACvE,QAAQ,CAAC,UAAU,EAAE,gCAAgC,CAAgC;IAErF,KAAK,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU;IAElC,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,eAAe;CAS9C;AAED,cAAM,oBAAqB,YAAW,oCAAoC;IACzE,QAAQ,CA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