@diagonal-hq/cli 0.6.1 → 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.
- package/README.md +1 -1
- package/dist/cli.mjs +19 -16
- package/dist/index.d.ts +5 -3
- package/dist/sdk-contract.d.ts +25 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -160,10 +160,12 @@ export type PageDefinition = {
|
|
|
160
160
|
/**
|
|
161
161
|
* The page's identity, unique in the workspace: a camelCase name of at most
|
|
162
162
|
* 64 letters and digits that starts with a lowercase letter, such as
|
|
163
|
-
* `members`. Code links to the page as `Pages.<key>`.
|
|
164
|
-
*
|
|
163
|
+
* `members`. Code links to the page as `Pages.<key>`. Without it, the key
|
|
164
|
+
* comes from the file path: `pages/members/[id].tsx` is `membersId`, and
|
|
165
|
+
* `pages/index.tsx` is `home`. Set it to keep the page's identity when the
|
|
166
|
+
* file moves. A key change is an identity change.
|
|
165
167
|
*/
|
|
166
|
-
key
|
|
168
|
+
key?: string;
|
|
167
169
|
/** The URL pattern. Route parameters use `{name}`, for example `/members/{id}`. */
|
|
168
170
|
route: string;
|
|
169
171
|
/** The name in the admin. Defaults to the title. */
|
package/dist/sdk-contract.d.ts
CHANGED
|
@@ -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;
|