@meetploy/types 1.19.0 → 1.20.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.
@@ -0,0 +1,22 @@
1
+ export interface EmailSendOptions {
2
+ from?: string;
3
+ to: string | string[];
4
+ cc?: string | string[];
5
+ bcc?: string | string[];
6
+ replyTo?: string;
7
+ subject: string;
8
+ html?: string;
9
+ text?: string;
10
+ headers?: Record<string, string>;
11
+ }
12
+ export interface EmailSendResult {
13
+ id: string;
14
+ }
15
+ export type EmailErrorCode = "invalid_request" | "invalid_sender" | "sender_not_allowed" | "invalid_recipient" | "too_many_recipients" | "access_not_approved" | "domain_not_verified" | "recipient_suppressed" | "quota_exceeded" | "recipient_rate_limited" | "email_not_configured" | "send_failed";
16
+ export interface EmailError extends Error {
17
+ name: "EmailError";
18
+ code: EmailErrorCode;
19
+ }
20
+ export interface EmailBinding {
21
+ send: (message: EmailSendOptions) => Promise<EmailSendResult>;
22
+ }
package/dist/email.js ADDED
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=email.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email.js","sourceRoot":"","sources":["../src/email.ts"],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -10,4 +10,5 @@ export type { SandboxBinding, SandboxClient, SandboxSession, SandboxSessionOptio
10
10
  export type { ServiceBinding } from "./service.js";
11
11
  export type { ScheduledEvent, ScheduledHandler } from "./scheduled.js";
12
12
  export type { PloyAuth, PloyUser } from "./auth.js";
13
+ export type { EmailBinding, EmailError, EmailErrorCode, EmailSendOptions, EmailSendResult, } from "./email.js";
13
14
  export type { Ai, AiGateway, AiGatewayOptions, AiGatewayRetries, AiRunOptions, } from "./ai.js";
package/globals.d.ts CHANGED
@@ -47,6 +47,9 @@ declare global {
47
47
  type SandboxSession = import("@meetploy/types").SandboxSession;
48
48
  type PloyAuth = import("@meetploy/types").PloyAuth;
49
49
  type PloyUser = import("@meetploy/types").PloyUser;
50
+ type EmailBinding = import("@meetploy/types").EmailBinding;
51
+ type EmailSendOptions = import("@meetploy/types").EmailSendOptions;
52
+ type EmailSendResult = import("@meetploy/types").EmailSendResult;
50
53
  type Ai = import("@meetploy/types").Ai;
51
54
  type AiGateway = import("@meetploy/types").AiGateway;
52
55
  type AiGatewayOptions = import("@meetploy/types").AiGatewayOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetploy/types",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",