@diagonal-hq/cli 0.44.0 → 0.45.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/dist/check-data.json +1 -1
- package/dist/{cli-assets-cli-PWYQHPT3.mjs → cli-assets-cli-QIFVUAWF.mjs} +3 -3
- package/dist/{cli-check-data-2NWFJFCC.mjs → cli-check-data-T6OVGKWP.mjs} +6 -6
- package/dist/{cli-chunk-5NNKJDPS.mjs → cli-chunk-2U4B6MFK.mjs} +2 -2
- package/dist/{cli-chunk-LU5O6DBH.mjs → cli-chunk-5LB73PFA.mjs} +1 -1
- package/dist/{cli-chunk-QQXQ2SBW.mjs → cli-chunk-ASQLI5JT.mjs} +2 -2
- package/dist/{cli-chunk-4OFN4A6Y.mjs → cli-chunk-DZ3RH64Z.mjs} +1 -1
- package/dist/{cli-chunk-CSIAT2LX.mjs → cli-chunk-I2TWWQ3W.mjs} +3 -3
- package/dist/{cli-chunk-HOJSWPJT.mjs → cli-chunk-IUHDCZQP.mjs} +3 -3
- package/dist/{cli-chunk-RD6PXRZJ.mjs → cli-chunk-LJLGXFPO.mjs} +2 -0
- package/dist/{cli-chunk-QW63G2VP.mjs → cli-chunk-ZPBVMA7R.mjs} +1 -1
- package/dist/{cli-skill-file-ZD4UACLT.mjs → cli-skill-file-C2WAUJGV.mjs} +3 -3
- package/dist/{cli-workflows-AXOTBFPJ.mjs → cli-workflows-HBMQQ4SP.mjs} +5 -5
- package/dist/cli.mjs +13 -13
- package/dist/sdk-contract.d.ts +199 -2
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
frontMatterUidInsertion,
|
|
5
5
|
readDefinitionUid,
|
|
6
6
|
require_dist
|
|
7
|
-
} from "./cli-chunk-
|
|
7
|
+
} from "./cli-chunk-5LB73PFA.mjs";
|
|
8
8
|
import {
|
|
9
9
|
SourceError,
|
|
10
10
|
characterCount,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
diagnosticAt,
|
|
13
13
|
diagnosticFromError,
|
|
14
14
|
withoutDevInfix
|
|
15
|
-
} from "./cli-chunk-
|
|
15
|
+
} from "./cli-chunk-LJLGXFPO.mjs";
|
|
16
16
|
import {
|
|
17
17
|
__toESM
|
|
18
18
|
} from "./cli-chunk-LRS5IEI3.mjs";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
assetsBinding,
|
|
8
8
|
buildAssets,
|
|
9
9
|
isAssetKey
|
|
10
|
-
} from "./cli-chunk-
|
|
10
|
+
} from "./cli-chunk-ZPBVMA7R.mjs";
|
|
11
11
|
import {
|
|
12
12
|
SourceError,
|
|
13
13
|
bindsName,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
staticObject,
|
|
19
19
|
studlyName,
|
|
20
20
|
traverse
|
|
21
|
-
} from "./cli-chunk-
|
|
21
|
+
} from "./cli-chunk-LJLGXFPO.mjs";
|
|
22
22
|
|
|
23
23
|
// scripts/lib/runtime-build/api-cli.mjs
|
|
24
24
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -2,15 +2,15 @@ import { createRequire as __diagonalCreateRequire } from 'node:module';
|
|
|
2
2
|
const require = __diagonalCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
stringFacts
|
|
5
|
-
} from "./cli-chunk-
|
|
5
|
+
} from "./cli-chunk-DZ3RH64Z.mjs";
|
|
6
6
|
import {
|
|
7
7
|
readUid
|
|
8
|
-
} from "./cli-chunk-
|
|
8
|
+
} from "./cli-chunk-5LB73PFA.mjs";
|
|
9
9
|
import {
|
|
10
10
|
SourceError,
|
|
11
11
|
declaredSlug,
|
|
12
12
|
propertyKey
|
|
13
|
-
} from "./cli-chunk-
|
|
13
|
+
} from "./cli-chunk-LJLGXFPO.mjs";
|
|
14
14
|
|
|
15
15
|
// scripts/lib/runtime-build/workflow-config.mjs
|
|
16
16
|
var WORKFLOW_STAGE = "workflow";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
SystemPermissions,
|
|
5
5
|
isTimezone,
|
|
6
6
|
isUrl
|
|
7
|
-
} from "./cli-chunk-
|
|
7
|
+
} from "./cli-chunk-DZ3RH64Z.mjs";
|
|
8
8
|
import {
|
|
9
9
|
UID_PATTERN
|
|
10
|
-
} from "./cli-chunk-
|
|
10
|
+
} from "./cli-chunk-5LB73PFA.mjs";
|
|
11
11
|
import {
|
|
12
12
|
AUTHORING_MODULE,
|
|
13
13
|
BUILT_IN_RESOURCE_SLUGS,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
staticValue,
|
|
30
30
|
studlyName,
|
|
31
31
|
withoutDevInfix
|
|
32
|
-
} from "./cli-chunk-
|
|
32
|
+
} from "./cli-chunk-LJLGXFPO.mjs";
|
|
33
33
|
|
|
34
34
|
// packages/cli/workspace-settings-catalog.json
|
|
35
35
|
var workspace_settings_catalog_default = {
|
|
@@ -428,6 +428,7 @@ var PAGE_SDK_EXPORTS = Object.freeze({
|
|
|
428
428
|
DeleteResourceRecord: ["Components", "DeleteResourceRecord"],
|
|
429
429
|
Dnd: ["Dnd"],
|
|
430
430
|
DropdownMenu: ["Components", "DropdownMenu"],
|
|
431
|
+
EmailBuilder: ["Components", "EmailBuilder"],
|
|
431
432
|
EmailComposer: ["Components", "EmailComposer"],
|
|
432
433
|
EmailMessages: ["Components", "EmailMessages"],
|
|
433
434
|
EmptyState: ["Components", "EmptyState"],
|
|
@@ -724,6 +725,7 @@ var PAGE_SDK_TYPES = {
|
|
|
724
725
|
EmailAttemptEvent: { "parameters": "", "arguments": "" },
|
|
725
726
|
EmailAttemptRecipients: { "parameters": "", "arguments": "" },
|
|
726
727
|
EmailAttemptStatus: { "parameters": "", "arguments": "" },
|
|
728
|
+
EmailDocument: { "parameters": "", "arguments": "" },
|
|
727
729
|
EmailMessage: { "parameters": "", "arguments": "" },
|
|
728
730
|
EmailMessages: { "parameters": "", "arguments": "" },
|
|
729
731
|
EmailMessagesFilters: { "parameters": "", "arguments": "" },
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
skillFrontMatter,
|
|
11
11
|
skillUidDefinition,
|
|
12
12
|
writeSkillFile
|
|
13
|
-
} from "./cli-chunk-
|
|
14
|
-
import "./cli-chunk-
|
|
15
|
-
import "./cli-chunk-
|
|
13
|
+
} from "./cli-chunk-2U4B6MFK.mjs";
|
|
14
|
+
import "./cli-chunk-5LB73PFA.mjs";
|
|
15
|
+
import "./cli-chunk-LJLGXFPO.mjs";
|
|
16
16
|
import "./cli-chunk-LRS5IEI3.mjs";
|
|
17
17
|
export {
|
|
18
18
|
SKILL_DESCRIPTION_MAX_LENGTH,
|
|
@@ -3,7 +3,7 @@ const require = __diagonalCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
WORKFLOW_STAGE,
|
|
5
5
|
stripTypes
|
|
6
|
-
} from "./cli-chunk-
|
|
6
|
+
} from "./cli-chunk-I2TWWQ3W.mjs";
|
|
7
7
|
import {
|
|
8
8
|
scriptSdkRuntimeFiles
|
|
9
9
|
} from "./cli-chunk-6HPUF67L.mjs";
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
appModuleClosure,
|
|
16
16
|
isAppSpecifier,
|
|
17
17
|
resolveAppSpecifier
|
|
18
|
-
} from "./cli-chunk-
|
|
19
|
-
import "./cli-chunk-
|
|
18
|
+
} from "./cli-chunk-DZ3RH64Z.mjs";
|
|
19
|
+
import "./cli-chunk-5LB73PFA.mjs";
|
|
20
20
|
import {
|
|
21
21
|
GENERATED_ASSETS_PATH
|
|
22
|
-
} from "./cli-chunk-
|
|
22
|
+
} from "./cli-chunk-ZPBVMA7R.mjs";
|
|
23
23
|
import {
|
|
24
24
|
AUTHORING_MODULE,
|
|
25
25
|
SourceError,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
diagnosticAt,
|
|
29
29
|
diagnosticFromError,
|
|
30
30
|
parseSource
|
|
31
|
-
} from "./cli-chunk-
|
|
31
|
+
} from "./cli-chunk-LJLGXFPO.mjs";
|
|
32
32
|
import "./cli-chunk-LRS5IEI3.mjs";
|
|
33
33
|
|
|
34
34
|
// scripts/lib/runtime-build/workflows.mjs
|
package/dist/cli.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
buildSkill,
|
|
6
6
|
isSkillPath,
|
|
7
7
|
writeSkillFile
|
|
8
|
-
} from "./cli-chunk-
|
|
8
|
+
} from "./cli-chunk-2U4B6MFK.mjs";
|
|
9
9
|
import {
|
|
10
10
|
DOMAINS_EXPORT,
|
|
11
11
|
DOMAIN_REFERENCE_MESSAGE,
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
routeBindingsSource,
|
|
47
47
|
routeParamNames,
|
|
48
48
|
workspace_settings_catalog_default
|
|
49
|
-
} from "./cli-chunk-
|
|
49
|
+
} from "./cli-chunk-IUHDCZQP.mjs";
|
|
50
50
|
import {
|
|
51
51
|
TRIGGER_TYPES,
|
|
52
52
|
compareVersions,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
workflowConfigObject,
|
|
59
59
|
workflowMetadata,
|
|
60
60
|
workspaceBuildNeeds
|
|
61
|
-
} from "./cli-chunk-
|
|
61
|
+
} from "./cli-chunk-I2TWWQ3W.mjs";
|
|
62
62
|
import {
|
|
63
63
|
GENERATED_NOTIFICATION_TYPES_MODULE,
|
|
64
64
|
GENERATED_WORKFLOWS_MODULE,
|
|
@@ -79,12 +79,12 @@ import {
|
|
|
79
79
|
templateSlugOf,
|
|
80
80
|
workflowEntries,
|
|
81
81
|
workflowNames
|
|
82
|
-
} from "./cli-chunk-
|
|
82
|
+
} from "./cli-chunk-DZ3RH64Z.mjs";
|
|
83
83
|
import {
|
|
84
84
|
isUid,
|
|
85
85
|
readDefinitionUid,
|
|
86
86
|
readUid
|
|
87
|
-
} from "./cli-chunk-
|
|
87
|
+
} from "./cli-chunk-5LB73PFA.mjs";
|
|
88
88
|
import {
|
|
89
89
|
ASSETS_LIST_USAGE,
|
|
90
90
|
ASSETS_PATH,
|
|
@@ -105,14 +105,14 @@ import {
|
|
|
105
105
|
withWorkspaceEnv,
|
|
106
106
|
writeAssetCatalog,
|
|
107
107
|
writeAssetEntry
|
|
108
|
-
} from "./cli-chunk-
|
|
108
|
+
} from "./cli-chunk-ASQLI5JT.mjs";
|
|
109
109
|
import {
|
|
110
110
|
ASSETS_EXPORT,
|
|
111
111
|
GENERATED_ASSETS_MODULE,
|
|
112
112
|
assetKeyMessage,
|
|
113
113
|
assetsBinding,
|
|
114
114
|
isAssetKey
|
|
115
|
-
} from "./cli-chunk-
|
|
115
|
+
} from "./cli-chunk-ZPBVMA7R.mjs";
|
|
116
116
|
import {
|
|
117
117
|
APP_PREFIX,
|
|
118
118
|
AUTHORING_MODULE,
|
|
@@ -181,7 +181,7 @@ import {
|
|
|
181
181
|
traverse,
|
|
182
182
|
usesImplicitName,
|
|
183
183
|
withoutDevInfix
|
|
184
|
-
} from "./cli-chunk-
|
|
184
|
+
} from "./cli-chunk-LJLGXFPO.mjs";
|
|
185
185
|
import {
|
|
186
186
|
__commonJS,
|
|
187
187
|
__require,
|
|
@@ -13935,7 +13935,7 @@ async function checkSources() {
|
|
|
13935
13935
|
if (existsSync4(DATA_FILE) && existsSync4(SDK_FILE)) {
|
|
13936
13936
|
return { dataFile: DATA_FILE, sdkFile: SDK_FILE };
|
|
13937
13937
|
}
|
|
13938
|
-
const { checkData, scriptSdk } = await import("./cli-check-data-
|
|
13938
|
+
const { checkData, scriptSdk } = await import("./cli-check-data-T6OVGKWP.mjs");
|
|
13939
13939
|
return { data: checkData(), sdk: scriptSdk() };
|
|
13940
13940
|
}
|
|
13941
13941
|
function isScriptTestPath(path) {
|
|
@@ -13955,8 +13955,8 @@ function holdsSkills(root, plan) {
|
|
|
13955
13955
|
async function checkCheckout(root, options) {
|
|
13956
13956
|
const sources = await checkSources();
|
|
13957
13957
|
const plan = composePackages(root);
|
|
13958
|
-
const testRunner = async () => (await import("./cli-workflows-
|
|
13959
|
-
const skillReader = async () => (await import("./cli-skill-file-
|
|
13958
|
+
const testRunner = async () => (await import("./cli-workflows-HBMQQ4SP.mjs")).runBuildTests;
|
|
13959
|
+
const skillReader = async () => (await import("./cli-skill-file-C2WAUJGV.mjs")).skillFrontMatter;
|
|
13960
13960
|
const finish = (checkoutRoot, buildPlan, answer, runTests2) => {
|
|
13961
13961
|
const run = hasScriptTests(answer) ? runTests2(checkoutRoot, answer.tests) : null;
|
|
13962
13962
|
const diagnostics = finishedDiagnostics(withTestDiagnostics(answer, run), buildPlan);
|
|
@@ -14041,9 +14041,9 @@ async function main(argv, io) {
|
|
|
14041
14041
|
case "assets": {
|
|
14042
14042
|
const [subcommand, ...assetArgs] = args;
|
|
14043
14043
|
if (subcommand === "upload")
|
|
14044
|
-
return (await import("./cli-assets-cli-
|
|
14044
|
+
return (await import("./cli-assets-cli-QIFVUAWF.mjs")).uploadAsset(assetArgs, withWorkspaceEnv(io));
|
|
14045
14045
|
if (subcommand === "list")
|
|
14046
|
-
return (await import("./cli-assets-cli-
|
|
14046
|
+
return (await import("./cli-assets-cli-QIFVUAWF.mjs")).listAssets(assetArgs, withWorkspaceEnv(io));
|
|
14047
14047
|
io.stderr.write(`${ASSETS_UPLOAD_USAGE}
|
|
14048
14048
|
${ASSETS_LIST_USAGE}
|
|
14049
14049
|
`);
|
package/dist/sdk-contract.d.ts
CHANGED
|
@@ -2850,7 +2850,121 @@ type SdkNotificationTemplateContent = {
|
|
|
2850
2850
|
references: Record<string, SdkNotificationTemplateReference>;
|
|
2851
2851
|
};
|
|
2852
2852
|
|
|
2853
|
+
type SdkEmailDocument = EmailDocument;
|
|
2854
|
+
|
|
2855
|
+
type EmailDocument = {
|
|
2856
|
+
version: 1;
|
|
2857
|
+
/** The values that the author changed from the Brand Kit. */
|
|
2858
|
+
theme: Partial<EmailTheme>;
|
|
2859
|
+
blocks: EmailBlock[];
|
|
2860
|
+
};
|
|
2861
|
+
|
|
2862
|
+
type EmailTheme = {
|
|
2863
|
+
background: string;
|
|
2864
|
+
surface: string;
|
|
2865
|
+
text: string;
|
|
2866
|
+
muted: string;
|
|
2867
|
+
accent: string;
|
|
2868
|
+
accent_text: string;
|
|
2869
|
+
font: 'sans' | 'modern' | 'humanist' | 'serif';
|
|
2870
|
+
radius: number;
|
|
2871
|
+
};
|
|
2872
|
+
|
|
2873
|
+
type EmailBlock =
|
|
2874
|
+
| TextBlock
|
|
2875
|
+
| ImageBlock
|
|
2876
|
+
| ButtonBlock
|
|
2877
|
+
| LogoBlock
|
|
2878
|
+
| DividerBlock
|
|
2879
|
+
| SpacerBlock
|
|
2880
|
+
| ColumnsBlock
|
|
2881
|
+
| SocialBlock;
|
|
2882
|
+
|
|
2883
|
+
type TextBlock = BlockBase & { type: 'text'; content: JSONContent; align: EmailAlign };
|
|
2884
|
+
|
|
2885
|
+
type BlockBase = {
|
|
2886
|
+
id: string;
|
|
2887
|
+
condition?: BlockCondition | null;
|
|
2888
|
+
style: { padding_top: number; padding_bottom: number; background: string | null };
|
|
2889
|
+
};
|
|
2890
|
+
|
|
2891
|
+
type BlockCondition = { path: string; is: 'filled' | 'empty' };
|
|
2892
|
+
|
|
2893
|
+
type JSONContent<A = any, B = any, C = any, D = any> = any;
|
|
2894
|
+
|
|
2895
|
+
type EmailAlign = 'left' | 'center' | 'right';
|
|
2896
|
+
|
|
2897
|
+
type ImageBlock = BlockBase & {
|
|
2898
|
+
type: 'image';
|
|
2899
|
+
file_id: string | null;
|
|
2900
|
+
url: string | null;
|
|
2901
|
+
alt: string;
|
|
2902
|
+
link: EmailLink;
|
|
2903
|
+
width: number;
|
|
2904
|
+
radius: number;
|
|
2905
|
+
align: EmailAlign;
|
|
2906
|
+
};
|
|
2907
|
+
|
|
2908
|
+
type EmailLink =
|
|
2909
|
+
| { type: 'url'; value: string }
|
|
2910
|
+
| { type: 'variable'; expression: string }
|
|
2911
|
+
| null;
|
|
2912
|
+
|
|
2913
|
+
type ButtonBlock = BlockBase & {
|
|
2914
|
+
type: 'button';
|
|
2915
|
+
label: string;
|
|
2916
|
+
link: EmailLink;
|
|
2917
|
+
variant: 'solid' | 'outline';
|
|
2918
|
+
color: string | null;
|
|
2919
|
+
text_color: string | null;
|
|
2920
|
+
full_width: boolean;
|
|
2921
|
+
align: EmailAlign;
|
|
2922
|
+
};
|
|
2923
|
+
|
|
2924
|
+
type LogoBlock = BlockBase & {
|
|
2925
|
+
type: 'logo';
|
|
2926
|
+
variant: LogoVariant;
|
|
2927
|
+
width: number;
|
|
2928
|
+
link: EmailLink;
|
|
2929
|
+
align: EmailAlign;
|
|
2930
|
+
};
|
|
2931
|
+
|
|
2932
|
+
type LogoVariant = 'auto' | 'horizontal' | 'wordmark' | 'icon';
|
|
2933
|
+
|
|
2934
|
+
type DividerBlock = BlockBase & { type: 'divider'; color: string | null; thickness: number };
|
|
2935
|
+
|
|
2936
|
+
type SpacerBlock = BlockBase & { type: 'spacer'; height: number };
|
|
2937
|
+
|
|
2938
|
+
type ColumnsBlock = BlockBase & {
|
|
2939
|
+
type: 'columns';
|
|
2940
|
+
layout: ColumnLayout;
|
|
2941
|
+
columns: EmailBlock[][];
|
|
2942
|
+
};
|
|
2943
|
+
|
|
2944
|
+
type ColumnLayout = '1-1' | '1-2' | '2-1' | '1-1-1';
|
|
2945
|
+
|
|
2946
|
+
type SocialBlock = BlockBase & {
|
|
2947
|
+
type: 'social';
|
|
2948
|
+
links: { network: SocialNetwork; url: string }[];
|
|
2949
|
+
align: EmailAlign;
|
|
2950
|
+
};
|
|
2951
|
+
|
|
2952
|
+
type SocialNetwork =
|
|
2953
|
+
| 'facebook'
|
|
2954
|
+
| 'instagram'
|
|
2955
|
+
| 'linkedin'
|
|
2956
|
+
| 'x'
|
|
2957
|
+
| 'youtube'
|
|
2958
|
+
| 'tiktok'
|
|
2959
|
+
| 'website';
|
|
2960
|
+
|
|
2853
2961
|
type SdkNotificationTemplateDefinition = SdkNotificationTemplateContent & {
|
|
2962
|
+
/** The `EmailBuilder` document, or null for a template that another editor wrote. */
|
|
2963
|
+
email_document: SdkEmailDocument | null;
|
|
2964
|
+
/** What the author must finish before the email can be sent. */
|
|
2965
|
+
email_document_issues: { block_id: string; message: string }[];
|
|
2966
|
+
/** Changes with the email's content. Send it as `expected_revision` to refuse a stale save. */
|
|
2967
|
+
content_revision: string;
|
|
2854
2968
|
id: string;
|
|
2855
2969
|
name: string;
|
|
2856
2970
|
notification_type_name: string;
|
|
@@ -2864,6 +2978,14 @@ type SdkNotificationTemplateDefinition = SdkNotificationTemplateContent & {
|
|
|
2864
2978
|
type SdkSaveNotificationTemplateInput = SdkNotificationTemplateContent & {
|
|
2865
2979
|
id?: string;
|
|
2866
2980
|
name: string;
|
|
2981
|
+
/**
|
|
2982
|
+
* The `EmailBuilder` document. The server compiles it to the `content` layout value. Copy it
|
|
2983
|
+
* from a starting template to keep the copy editable in the builder. A save that omits it
|
|
2984
|
+
* keeps the document, and may not change the content.
|
|
2985
|
+
*/
|
|
2986
|
+
email_document?: SdkEmailDocument | null;
|
|
2987
|
+
/** The `content_revision` that the change is based on. A save from an older one fails with 409. */
|
|
2988
|
+
expected_revision?: string;
|
|
2867
2989
|
};
|
|
2868
2990
|
|
|
2869
2991
|
type SdkUseSaveNotificationTemplateOptions = {
|
|
@@ -6395,6 +6517,7 @@ type ComponentRegistry = {
|
|
|
6395
6517
|
"DataTableToolbar": SdkComponent<DataTableToolbarProps>;
|
|
6396
6518
|
"DeleteResourceRecord": SdkComponent<DeleteResourceRecordProps>;
|
|
6397
6519
|
"DropdownMenu": SdkComponent<DropdownMenuProps>;
|
|
6520
|
+
"EmailBuilder": SdkComponent<EmailBuilderProps>;
|
|
6398
6521
|
"EmailComposer": SdkComponent<EmailComposerProps>;
|
|
6399
6522
|
"EmailMessages": SdkComponent<EmailMessagesProps>;
|
|
6400
6523
|
"EmptyState": SdkComponent<EmptyStateProps>;
|
|
@@ -11010,6 +11133,81 @@ type DropdownMenuItem = {
|
|
|
11010
11133
|
onSelect?: () => void;
|
|
11011
11134
|
};
|
|
11012
11135
|
|
|
11136
|
+
type EmailBuilderProps = {
|
|
11137
|
+
/**
|
|
11138
|
+
* Notification template that the builder edits. The builder reads it once per mount and
|
|
11139
|
+
* saves each edit to it. Saving sends no email. Requires `manage_notifications`.
|
|
11140
|
+
*/
|
|
11141
|
+
notificationTemplateId: string;
|
|
11142
|
+
|
|
11143
|
+
/** Title in the top bar, such as the campaign name. */
|
|
11144
|
+
title: string;
|
|
11145
|
+
|
|
11146
|
+
/** Called by the Back button after the last edit is saved. */
|
|
11147
|
+
onExit: () => void;
|
|
11148
|
+
|
|
11149
|
+
/** Called after each save, for example to copy the subject to a campaign record. */
|
|
11150
|
+
onSaved?: (template: SdkNotificationTemplateDefinition) => void;
|
|
11151
|
+
|
|
11152
|
+
/** Actions at the right of the top bar, such as Review and send. */
|
|
11153
|
+
actions?: (state: EmailBuilderState) => ReactNode;
|
|
11154
|
+
|
|
11155
|
+
/** Values of the type's variables for previews and tests. A record variable takes a record ID. */
|
|
11156
|
+
data?: Record<string, any>;
|
|
11157
|
+
|
|
11158
|
+
/** People the author can preview the email as. A test email renders for the selected person. */
|
|
11159
|
+
recipients?: EmailBuilderRecipient[];
|
|
11160
|
+
|
|
11161
|
+
/** Pages that buttons can link to. The first one is the Portal link block. */
|
|
11162
|
+
links?: EmailBuilderLink[];
|
|
11163
|
+
|
|
11164
|
+
/**
|
|
11165
|
+
* Layout that the next save uses. It must declare a `content` field. A layout can also declare
|
|
11166
|
+
* `preview_text`, `theme_background`, `theme_text`, `theme_muted`, `theme_accent`, and
|
|
11167
|
+
* `theme_font`. Omit it to keep the template's layout.
|
|
11168
|
+
*/
|
|
11169
|
+
emailLayoutId?: string;
|
|
11170
|
+
|
|
11171
|
+
/**
|
|
11172
|
+
* Layout fields whose text starts the email when the template has no builder document yet.
|
|
11173
|
+
* @default ['content']
|
|
11174
|
+
*/
|
|
11175
|
+
importFields?: string[];
|
|
11176
|
+
|
|
11177
|
+
/**
|
|
11178
|
+
* What the layout adds below every email, such as the sender's address and the unsubscribe
|
|
11179
|
+
* line. The canvas shows it as a locked section, so authors know what the recipient sees.
|
|
11180
|
+
*/
|
|
11181
|
+
footer?: ReactNode;
|
|
11182
|
+
|
|
11183
|
+
/** Shows the email without editing, for example after it was sent. It keeps its saved design. */
|
|
11184
|
+
readOnly?: boolean;
|
|
11185
|
+
};
|
|
11186
|
+
|
|
11187
|
+
type EmailBuilderState = {
|
|
11188
|
+
/** True when every edit is saved. */
|
|
11189
|
+
isSaved: boolean;
|
|
11190
|
+
isSaving: boolean;
|
|
11191
|
+
/** Number of blocks the author must finish. A send refuses the email until it is zero. */
|
|
11192
|
+
issueCount: number;
|
|
11193
|
+
};
|
|
11194
|
+
|
|
11195
|
+
type EmailBuilderRecipient = {
|
|
11196
|
+
resourceId: string;
|
|
11197
|
+
recordId: string;
|
|
11198
|
+
email: string;
|
|
11199
|
+
name?: string;
|
|
11200
|
+
};
|
|
11201
|
+
|
|
11202
|
+
type EmailBuilderLink = {
|
|
11203
|
+
/** Name of the generated link. Lowercase letters, numbers, and underscores. */
|
|
11204
|
+
key: string;
|
|
11205
|
+
/** What the author reads in the link menu, such as `Member portal`. */
|
|
11206
|
+
label: string;
|
|
11207
|
+
/** Page that the link opens. */
|
|
11208
|
+
pageId: string;
|
|
11209
|
+
};
|
|
11210
|
+
|
|
11013
11211
|
type EmailComposerProps = EmailComposerSendProps | EmailComposerDraftProps;
|
|
11014
11212
|
|
|
11015
11213
|
type EmailComposerSendProps = EmailComposerBaseProps & {
|
|
@@ -11793,8 +11991,6 @@ type FormContentInputProps = Omit<
|
|
|
11793
11991
|
|
|
11794
11992
|
type UiFormContentInputProps<A = any, B = any, C = any, D = any> = any;
|
|
11795
11993
|
|
|
11796
|
-
type JSONContent<A = any, B = any, C = any, D = any> = any;
|
|
11797
|
-
|
|
11798
11994
|
type ContentSettings = {
|
|
11799
11995
|
extensions?: ExtensionsSettings;
|
|
11800
11996
|
placeholder?: string | null;
|
|
@@ -14949,6 +15145,7 @@ declare namespace Sdk {
|
|
|
14949
15145
|
export type NotificationTemplateEmailDraft = import("diagonal:sdk-internal").SdkNotificationTemplateEmailDraft;
|
|
14950
15146
|
export type NotificationTemplateReference = import("diagonal:sdk-internal").SdkNotificationTemplateReference;
|
|
14951
15147
|
export type NotificationTemplateContent = import("diagonal:sdk-internal").SdkNotificationTemplateContent;
|
|
15148
|
+
export type EmailDocument = import("diagonal:sdk-internal").SdkEmailDocument;
|
|
14952
15149
|
export type NotificationTemplateDefinition = import("diagonal:sdk-internal").SdkNotificationTemplateDefinition;
|
|
14953
15150
|
export type SaveNotificationTemplateInput = import("diagonal:sdk-internal").SdkSaveNotificationTemplateInput;
|
|
14954
15151
|
export type UseSaveNotificationTemplateOptions = import("diagonal:sdk-internal").SdkUseSaveNotificationTemplateOptions;
|