@diagonal-hq/cli 0.6.2 → 0.7.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.
@@ -2318,6 +2318,8 @@ type SdkSendResolvedNotificationHandle = Omit<SdkSendEmailHandle, 'send' | 'data
2318
2318
 
2319
2319
  type SdkUpcomingNotification = {
2320
2320
  id: string;
2321
+ notification_schedule_id: string | null;
2322
+ stage_id: string | null;
2321
2323
  revision: number;
2322
2324
  idempotency_key: string | null;
2323
2325
  computed_at: string | null;
@@ -2357,6 +2359,15 @@ type SdkScheduledNotificationDetail = Omit<SdkUpcomingNotification, 'status'> &
2357
2359
  has_content_override: boolean;
2358
2360
  };
2359
2361
 
2362
+ type SdkScheduledNotificationPreview = {
2363
+ email_subject: string;
2364
+ email_body: string;
2365
+ from_address: string;
2366
+ from_name: string | null;
2367
+ warning: string | null;
2368
+ unreadable: string[];
2369
+ };
2370
+
2360
2371
  type SdkScheduledNotificationEdits = {
2361
2372
  expected_revision: number;
2362
2373
  recipient?: SdkNotificationRecipient;
@@ -2555,6 +2566,8 @@ type SdkEmailMessages = {
2555
2566
 
2556
2567
  type SdkNotificationHistoryItem = {
2557
2568
  id: string;
2569
+ notification_schedule_id: string | null;
2570
+ stage_id: string | null;
2558
2571
  kind: SdkNotificationHistoryKind;
2559
2572
  status: SdkNotificationHistoryStatus;
2560
2573
  /** Saved name for sent rows; the current name, or a deleted placeholder, otherwise. */
@@ -7291,6 +7304,17 @@ type SdkHooks = {
7291
7304
  scheduledNotificationId: string | null | undefined
7292
7305
  ): SdkApiHandle<SdkScheduledNotificationDetail>;
7293
7306
 
7307
+ /**
7308
+ * Render the saved subject and email for a pending occurrence. Requires send_emails
7309
+ * and record mutation access. Waits when id is nullish.
7310
+ * @example
7311
+ * const preview = Sdk.hooks.usePreviewScheduledNotification(notification.id);
7312
+ * return <span>{preview.data?.email_subject ?? 'Loading subject…'}</span>;
7313
+ */
7314
+ usePreviewScheduledNotification(
7315
+ scheduledNotificationId: string | null | undefined
7316
+ ): SdkApiHandle<SdkScheduledNotificationPreview>;
7317
+
7294
7318
  /**
7295
7319
  * Edit a draft, scheduled, or failed occurrence. Pass its expected_revision.
7296
7320
  * A null content_override restores the template. Failed preparation recovers only
@@ -13900,6 +13924,7 @@ declare namespace Sdk {
13900
13924
  export type UpcomingNotification = import("diagonal:sdk-internal").SdkUpcomingNotification;
13901
13925
  export type ScheduledNotificationContent = import("diagonal:sdk-internal").SdkScheduledNotificationContent;
13902
13926
  export type ScheduledNotificationDetail = import("diagonal:sdk-internal").SdkScheduledNotificationDetail;
13927
+ export type ScheduledNotificationPreview = import("diagonal:sdk-internal").SdkScheduledNotificationPreview;
13903
13928
  export type ScheduledNotificationEdits = import("diagonal:sdk-internal").SdkScheduledNotificationEdits;
13904
13929
  export type UpdateScheduledNotificationInput = import("diagonal:sdk-internal").SdkUpdateScheduledNotificationInput;
13905
13930
  export type UpdateScheduledNotificationHandle = import("diagonal:sdk-internal").SdkUpdateScheduledNotificationHandle;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diagonal-hq/cli",
3
- "version": "0.6.2",
3
+ "version": "0.7.0",
4
4
  "description": "The diagonal CLI and the configuration helpers for file-based Diagonal workspaces.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {