mirror of
https://github.com/xtr-dev/payload-mailing.git
synced 2025-12-10 16:23:23 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea87f14308 | ||
| 6886027727 | |||
| 965569be06 |
@@ -44,6 +44,8 @@ The plugin works with:
|
|||||||
- **String IDs**: `id: string`
|
- **String IDs**: `id: string`
|
||||||
- **Number IDs**: `id: number`
|
- **Number IDs**: `id: number`
|
||||||
- **Nullable fields**: Fields can be `null`, `undefined`, or have values
|
- **Nullable fields**: Fields can be `null`, `undefined`, or have values
|
||||||
|
- **Date fields**: Timestamp fields support both `Date` objects and `string` (ISO) formats
|
||||||
|
- **JSON variables**: Variables field supports any JSON-compatible value type
|
||||||
- **Generated types**: Works with `payload generate:types` output
|
- **Generated types**: Works with `payload generate:types` output
|
||||||
|
|
||||||
Your Payload configuration determines which types are used. The plugin automatically adapts to your setup.
|
Your Payload configuration determines which types are used. The plugin automatically adapts to your setup.
|
||||||
@@ -68,15 +70,15 @@ interface BaseEmailDocument {
|
|||||||
html: string
|
html: string
|
||||||
text?: string | null
|
text?: string | null
|
||||||
variables?: JSONValue // Supports any JSON-compatible value
|
variables?: JSONValue // Supports any JSON-compatible value
|
||||||
scheduledAt?: string | null
|
scheduledAt?: string | Date | null
|
||||||
sentAt?: string | null
|
sentAt?: string | Date | null
|
||||||
status?: 'pending' | 'processing' | 'sent' | 'failed' | null
|
status?: 'pending' | 'processing' | 'sent' | 'failed' | null
|
||||||
attempts?: number | null
|
attempts?: number | null
|
||||||
lastAttemptAt?: string | null
|
lastAttemptAt?: string | Date | null
|
||||||
error?: string | null
|
error?: string | null
|
||||||
priority?: number | null
|
priority?: number | null
|
||||||
createdAt?: string | null
|
createdAt?: string | Date | null
|
||||||
updatedAt?: string | null
|
updatedAt?: string | Date | null
|
||||||
}
|
}
|
||||||
|
|
||||||
interface BaseEmailTemplateDocument {
|
interface BaseEmailTemplateDocument {
|
||||||
@@ -85,8 +87,8 @@ interface BaseEmailTemplateDocument {
|
|||||||
slug: string
|
slug: string
|
||||||
subject?: string | null
|
subject?: string | null
|
||||||
content?: any
|
content?: any
|
||||||
createdAt?: string | null
|
createdAt?: string | Date | null
|
||||||
updatedAt?: string | null
|
updatedAt?: string | Date | null
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@xtr-dev/payload-mailing",
|
"name": "@xtr-dev/payload-mailing",
|
||||||
"version": "0.1.15",
|
"version": "0.1.16",
|
||||||
"description": "Template-based email system with scheduling and job processing for PayloadCMS",
|
"description": "Template-based email system with scheduling and job processing for PayloadCMS",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
|||||||
@@ -18,15 +18,15 @@ export interface BaseEmailDocument {
|
|||||||
html: string
|
html: string
|
||||||
text?: string | null
|
text?: string | null
|
||||||
variables?: JSONValue
|
variables?: JSONValue
|
||||||
scheduledAt?: string | null
|
scheduledAt?: string | Date | null
|
||||||
sentAt?: string | null
|
sentAt?: string | Date | null
|
||||||
status?: 'pending' | 'processing' | 'sent' | 'failed' | null
|
status?: 'pending' | 'processing' | 'sent' | 'failed' | null
|
||||||
attempts?: number | null
|
attempts?: number | null
|
||||||
lastAttemptAt?: string | null
|
lastAttemptAt?: string | Date | null
|
||||||
error?: string | null
|
error?: string | null
|
||||||
priority?: number | null
|
priority?: number | null
|
||||||
createdAt?: string | null
|
createdAt?: string | Date | null
|
||||||
updatedAt?: string | null
|
updatedAt?: string | Date | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BaseEmailTemplateDocument {
|
export interface BaseEmailTemplateDocument {
|
||||||
@@ -35,8 +35,8 @@ export interface BaseEmailTemplateDocument {
|
|||||||
slug: string
|
slug: string
|
||||||
subject?: string | null
|
subject?: string | null
|
||||||
content?: any
|
content?: any
|
||||||
createdAt?: string | null
|
createdAt?: string | Date | null
|
||||||
updatedAt?: string | null
|
updatedAt?: string | Date | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BaseEmail<TEmail extends BaseEmailDocument = BaseEmailDocument, TEmailTemplate extends BaseEmailTemplateDocument = BaseEmailTemplateDocument> = Omit<TEmail, 'id' | 'template'> & {template: Omit<TEmailTemplate, 'id'> | TEmailTemplate['id'] | undefined | null}
|
export type BaseEmail<TEmail extends BaseEmailDocument = BaseEmailDocument, TEmailTemplate extends BaseEmailTemplateDocument = BaseEmailTemplateDocument> = Omit<TEmail, 'id' | 'template'> & {template: Omit<TEmailTemplate, 'id'> | TEmailTemplate['id'] | undefined | null}
|
||||||
@@ -88,11 +88,11 @@ export interface QueuedEmail {
|
|||||||
html: string
|
html: string
|
||||||
text?: string | null
|
text?: string | null
|
||||||
variables?: JSONValue
|
variables?: JSONValue
|
||||||
scheduledAt?: string | null
|
scheduledAt?: string | Date | null
|
||||||
sentAt?: string | null
|
sentAt?: string | Date | null
|
||||||
status: 'pending' | 'processing' | 'sent' | 'failed'
|
status: 'pending' | 'processing' | 'sent' | 'failed'
|
||||||
attempts: number
|
attempts: number
|
||||||
lastAttemptAt?: string | null
|
lastAttemptAt?: string | Date | null
|
||||||
error?: string | null
|
error?: string | null
|
||||||
priority?: number | null
|
priority?: number | null
|
||||||
createdAt: string
|
createdAt: string
|
||||||
|
|||||||
Reference in New Issue
Block a user