@stacksjs/newsletter 0.75.529 → 0.75.535

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.
@@ -5,37 +5,25 @@ export declare function canQueueCampaignStatus(status: unknown): boolean;
5
5
  export declare function shouldRunScheduledCampaign(campaign: ScheduledCampaignState, expectedScheduledAt?: string): boolean;
6
6
  export declare function campaignCreateData(input: CreateCampaignInput, emailListId: number): Record<string, CampaignWriteValue>;
7
7
  export declare function campaignUpdateData(patch: Partial<CreateCampaignInput>, emailListId?: number): Record<string, CampaignWriteValue>;
8
- /**
9
- * @defaultValue
10
- * ```ts
11
- * {
12
- * create: (input: CreateCampaignInput) => Promise<CampaignRow>,
13
- * find: (id: number) => Promise<CampaignRow | undefined>,
14
- * update: (id: number, patch: Partial<CreateCampaignInput>) => Promise<unknown>,
15
- * sendNow: (id: number, options?: SendCampaignOptions) => Promise<{ ok: boolean; campaignId: number }>,
16
- * schedule: (id: number, scheduledAt: Date | string, options?: SendCampaignOptions) => Promise<{ ok: boolean; campaignId: number; scheduledAt: unknown }>,
17
- * cancel: (id: number) => Promise<unknown>
18
- * }
19
- * ```
20
- */
8
+ /** @defaultValue `{ ok: true }` */
21
9
  export declare const campaigns: {
22
10
  create: (input: CreateCampaignInput) => Promise<CampaignRow>;
23
11
  find: (id: number) => Promise<CampaignRow | undefined>;
24
12
  update: (id: number, patch: Partial<CreateCampaignInput>) => Promise<unknown>;
25
13
  /** Move a draft straight into the queue. */
26
14
  sendNow: (id: number, options?: SendCampaignOptions) => Promise<{
27
- ok: boolean;
28
- campaignId: number
29
- }>;
15
+ ok: boolean;
16
+ campaignId: number
17
+ }>;
30
18
  /**
31
19
  * Persist a `scheduled_at` and dispatch the job with a delay computed
32
20
  * from now. If the time is in the past, falls back to immediate send.
33
21
  */
34
22
  schedule: (id: number, scheduledAt: Date | string, options?: SendCampaignOptions) => Promise<{
35
- ok: boolean;
36
- campaignId: number;
37
- scheduledAt: unknown
38
- }>;
23
+ ok: boolean;
24
+ campaignId: number;
25
+ scheduledAt: unknown
26
+ }>;
39
27
  cancel: (id: number) => Promise<unknown>
40
28
  };
41
29
  declare interface ScheduledCampaignState {
package/dist/lists.d.ts CHANGED
@@ -10,15 +10,6 @@ export declare function emailListCreateData(input: CreateListInput): Record<stri
10
10
  * built on the statics fails in the very place it is meant to run.
11
11
  * `@stacksjs/cms`, `@stacksjs/forms` and `@stacksjs/sites` all query through
12
12
  * `db` for this reason; this package now does too.
13
- * @defaultValue
14
- * ```ts
15
- * {
16
- * create: (input: CreateListInput) => Promise<EmailListRow>,
17
- * find: (idOrSlug: number | string) => Promise<EmailListRow | undefined>,
18
- * all: () => Promise<EmailListRow[]>,
19
- * archive: (idOrSlug: number | string) => Promise<unknown>
20
- * }
21
- * ```
22
13
  */
23
14
  export declare const lists: {
24
15
  create: (input: CreateListInput) => Promise<EmailListRow>;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/newsletter",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.75.529",
5
+ "version": "0.75.535",
6
6
  "description": "Promotional email & newsletter primitives for Stacks. Lists, campaigns, subscribers, and one-click unsubscribe — sent through @stacksjs/email.",
7
7
  "author": "Chris Breuer",
8
8
  "contributors": [
@@ -61,16 +61,16 @@
61
61
  "prepublishOnly": "bun run build"
62
62
  },
63
63
  "dependencies": {
64
- "@stacksjs/database": "0.75.529",
65
- "@stacksjs/email": "0.75.529",
66
- "@stacksjs/orm": "0.75.529",
67
- "@stacksjs/queue": "0.75.529"
64
+ "@stacksjs/database": "0.75.535",
65
+ "@stacksjs/email": "0.75.535",
66
+ "@stacksjs/orm": "0.75.535",
67
+ "@stacksjs/queue": "0.75.535"
68
68
  },
69
69
  "devDependencies": {
70
- "@stacksjs/cli": "0.75.529",
71
- "@stacksjs/config": "0.75.529",
72
- "@stacksjs/error-handling": "0.75.529",
73
- "@stacksjs/types": "0.75.529",
70
+ "@stacksjs/cli": "0.75.535",
71
+ "@stacksjs/config": "0.75.535",
72
+ "@stacksjs/error-handling": "0.75.535",
73
+ "@stacksjs/types": "0.75.535",
74
74
  "better-dx": "^0.2.24"
75
75
  }
76
76
  }