@stacksjs/newsletter 0.75.80 → 0.75.81

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.
@@ -60,9 +60,9 @@ export declare function campaignUpdateData(patch: Partial<CreateCampaignInput>,
60
60
  * create: (input: CreateCampaignInput) => Promise<CampaignRow>,
61
61
  * find: (id: number) => Promise<CampaignRow | undefined>,
62
62
  * update: (id: number, patch: Partial<CreateCampaignInput>) => Promise<unknown>,
63
- * sendNow: (id: number, options?: SendCampaignOptions) => Promise<void>,
64
- * schedule: (id: number, scheduledAt: Date | string, options?: SendCampaignOptions) => Promise<void>,
65
- * cancel: (id: number) => Promise<void>
63
+ * sendNow: (id: number, options?: SendCampaignOptions) => Promise<{ ok: boolean; campaignId: number }>,
64
+ * schedule: (id: number, scheduledAt: Date | string, options?: SendCampaignOptions) => Promise<{ ok: boolean; campaignId: number; scheduledAt: unknown }>,
65
+ * cancel: (id: number) => Promise<ReturnType<unknown.find>>
66
66
  * }
67
67
  * ```
68
68
  */
@@ -71,13 +71,20 @@ export declare const campaigns: {
71
71
  find: (id: number) => Promise<CampaignRow | undefined>;
72
72
  update: (id: number, patch: Partial<CreateCampaignInput>) => Promise<unknown>;
73
73
  /** Move a draft straight into the queue. */
74
- sendNow: (id: number, options?: SendCampaignOptions) => Promise<void>;
74
+ sendNow: (id: number, options?: SendCampaignOptions) => Promise<{
75
+ ok: boolean;
76
+ campaignId: number
77
+ }>;
75
78
  /**
76
79
  * Persist a `scheduled_at` and dispatch the job with a delay computed
77
80
  * from now. If the time is in the past, falls back to immediate send.
78
81
  */
79
- schedule: (id: number, scheduledAt: Date | string, options?: SendCampaignOptions) => Promise<void>;
80
- cancel: (id: number) => Promise<void>
82
+ schedule: (id: number, scheduledAt: Date | string, options?: SendCampaignOptions) => Promise<{
83
+ ok: boolean;
84
+ campaignId: number;
85
+ scheduledAt: unknown
86
+ }>;
87
+ cancel: (id: number) => Promise<ReturnType<unknown.find>>
81
88
  };
82
89
  declare interface ScheduledCampaignState {
83
90
  status?: unknown
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.80",
5
+ "version": "0.75.81",
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.80",
65
- "@stacksjs/email": "0.75.80",
66
- "@stacksjs/orm": "0.75.80",
67
- "@stacksjs/queue": "0.75.80"
64
+ "@stacksjs/database": "0.75.81",
65
+ "@stacksjs/email": "0.75.81",
66
+ "@stacksjs/orm": "0.75.81",
67
+ "@stacksjs/queue": "0.75.81"
68
68
  },
69
69
  "devDependencies": {
70
- "@stacksjs/cli": "0.75.80",
71
- "@stacksjs/config": "0.75.80",
72
- "@stacksjs/error-handling": "0.75.80",
73
- "@stacksjs/types": "0.75.80",
70
+ "@stacksjs/cli": "0.75.81",
71
+ "@stacksjs/config": "0.75.81",
72
+ "@stacksjs/error-handling": "0.75.81",
73
+ "@stacksjs/types": "0.75.81",
74
74
  "better-dx": "^0.2.24"
75
75
  }
76
76
  }