@diagonal-hq/cli 0.38.4 → 0.39.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/cli.mjs CHANGED
@@ -613,7 +613,7 @@ async function checkSources() {
613
613
  if (existsSync4(DATA_FILE) && existsSync4(SDK_FILE)) {
614
614
  return { dataFile: DATA_FILE, sdkFile: SDK_FILE };
615
615
  }
616
- const { checkData, scriptSdk } = await import("./cli-check-data-GHZW7MSI.mjs");
616
+ const { checkData, scriptSdk } = await import("./cli-check-data-IITXQPIR.mjs");
617
617
  return { data: checkData(), sdk: scriptSdk() };
618
618
  }
619
619
  function isScriptTestPath(path) {
package/dist/index.d.ts CHANGED
@@ -1216,8 +1216,13 @@ export type NotificationTemplateEmail = {
1216
1216
  subject: string;
1217
1217
  /** Defaults to `'default'`, the built-in layout with one field, `content`. */
1218
1218
  layout?: EmailLayoutReference;
1219
- /** A value for each field of the layout. */
1220
- fields: { readonly [field: string]: LiquidSource };
1219
+ /**
1220
+ * A value for each field of the layout: Liquid, or for a field with a
1221
+ * `type`, `{ variable: '<path>' }`, the value at a path of the send. The
1222
+ * path starts with a variable of the type, `record` (the recipient), or
1223
+ * `workspace`, such as `{ variable: 'record.company.name' }`.
1224
+ */
1225
+ fields: { readonly [field: string]: LiquidSource | { variable: string } };
1221
1226
  };
1222
1227
 
1223
1228
  export type NotificationTemplateSms = { body: LiquidSource };
@@ -1247,11 +1252,17 @@ export declare function defineNotificationTemplate<const T extends NotificationT
1247
1252
  template: T
1248
1253
  ): T;
1249
1254
 
1250
- /** A slot in the layout body. A template fills it with Liquid. */
1255
+ /**
1256
+ * A slot in the layout body. A template fills it with Liquid. A field with a
1257
+ * `type` holds a value of that type: a template fills it with Liquid text or
1258
+ * binds it to a variable with `{ variable: '<path>' }`.
1259
+ */
1251
1260
  export type EmailLayoutFieldDefinition = {
1252
1261
  label: string;
1253
1262
  description?: string | null;
1254
1263
  required?: boolean;
1264
+ /** Leave it out for a Liquid field. */
1265
+ type?: 'text' | 'url' | 'email' | 'phone';
1255
1266
  };
1256
1267
 
1257
1268
  /**
@@ -148,8 +148,7 @@ type ResourceSortInput =
148
148
  | ResourceSortDescriptor
149
149
  | ResourceSortFieldDescriptor
150
150
  | ResourceSortDescriptorList
151
- | ResourceSortMap
152
- | Record<string, number | string>;
151
+ | ResourceSortMap;
153
152
 
154
153
  type ResourceListParams<TRelations extends readonly string[] = readonly string[]> = {
155
154
  page?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diagonal-hq/cli",
3
- "version": "0.38.4",
3
+ "version": "0.39.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": {
@@ -51,8 +51,8 @@
51
51
  "bun": "1.4.4"
52
52
  },
53
53
  "optionalDependencies": {
54
- "@diagonal-hq/workflow-script-compiler-darwin-arm64": "0.1.0-ha30751b35a4d",
55
- "@diagonal-hq/workflow-script-compiler-linux-x64": "0.1.0-ha30751b35a4d",
56
- "@diagonal-hq/workflow-script-compiler-linux-arm64": "0.1.0-ha30751b35a4d"
54
+ "@diagonal-hq/workflow-script-compiler-darwin-arm64": "0.1.0-ha99248df50a2",
55
+ "@diagonal-hq/workflow-script-compiler-linux-x64": "0.1.0-ha99248df50a2",
56
+ "@diagonal-hq/workflow-script-compiler-linux-arm64": "0.1.0-ha99248df50a2"
57
57
  }
58
58
  }