@meetploy/types 1.18.1 → 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
@@ -7,6 +7,8 @@ export type { CacheBinding, CacheSetOptions } from "./cache.js";
7
7
  export type { KVNamespace, KVNamespaceGetOptions, KVNamespaceGetMethodOptions, KVNamespaceGetWithMetadataResult, KVNamespaceListKey, KVNamespaceListOptions, KVNamespaceListResult, KVNamespacePutOptions, StateBinding, StateUpdateDoc, } from "./state.js";
8
8
  export type { FileStorageBinding, FileStorageObject, FileStorageKey, FileStorageListResult, FileStoragePutOptions, FileStorageListOptions, } from "./fs.js";
9
9
  export type { SandboxBinding, SandboxClient, SandboxSession, SandboxSessionOptions, SandboxExecResult, SandboxExecOptions, SandboxFileEntry, SandboxGitCheckoutOptions, SandboxProcessInfo, } from "./sandbox.js";
10
+ export type { ServiceBinding } from "./service.js";
10
11
  export type { ScheduledEvent, ScheduledHandler } from "./scheduled.js";
11
12
  export type { PloyAuth, PloyUser } from "./auth.js";
13
+ export type { EmailBinding, EmailError, EmailErrorCode, EmailSendOptions, EmailSendResult, } from "./email.js";
12
14
  export type { Ai, AiGateway, AiGatewayOptions, AiGatewayRetries, AiRunOptions, } from "./ai.js";
@@ -0,0 +1,3 @@
1
+ export interface ServiceBinding {
2
+ fetch: (input: Request | URL | string, init?: RequestInit) => Promise<Response>;
3
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.js","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":""}
package/globals.d.ts CHANGED
@@ -42,10 +42,14 @@ declare global {
42
42
  type FileStorageBinding = import("@meetploy/types").FileStorageBinding;
43
43
  type TimerBinding = import("@meetploy/types").TimerBinding;
44
44
  type SandboxBinding = import("@meetploy/types").SandboxBinding;
45
+ type ServiceBinding = import("@meetploy/types").ServiceBinding;
45
46
  type SandboxClient = import("@meetploy/types").SandboxClient;
46
47
  type SandboxSession = import("@meetploy/types").SandboxSession;
47
48
  type PloyAuth = import("@meetploy/types").PloyAuth;
48
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;
49
53
  type Ai = import("@meetploy/types").Ai;
50
54
  type AiGateway = import("@meetploy/types").AiGateway;
51
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.18.1",
3
+ "version": "1.20.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",