@diagonal-hq/cli 0.20.3 → 0.21.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 +8 -6
- package/dist/cli.mjs +685 -447
- package/dist/index.d.ts +23 -5
- package/dist/index.js +2 -0
- package/dist/sdk-contract.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -269,7 +269,7 @@ export type WorkspaceFieldDefinition<T extends WorkspaceFieldType = WorkspaceFie
|
|
|
269
269
|
*/
|
|
270
270
|
definition: FieldDefinition<T>;
|
|
271
271
|
/** The value of the field. Write `null` for a field without a value. */
|
|
272
|
-
value: WorkspaceFieldValue<T> | null;
|
|
272
|
+
value: WorkspaceFieldValue<T> | (T extends 'uuid' ? Resolver : never) | null;
|
|
273
273
|
};
|
|
274
274
|
|
|
275
275
|
/**
|
|
@@ -897,7 +897,13 @@ export type LayoutProps = { children?: React.ReactNode };
|
|
|
897
897
|
*/
|
|
898
898
|
export type ResourceReference = string;
|
|
899
899
|
|
|
900
|
+
/** Declares a dependency on a live record selected separately in each workspace. */
|
|
901
|
+
export declare function defineRecordBinding<
|
|
902
|
+
T extends UidOption & { name: string; resource: ResourceReference }
|
|
903
|
+
>(binding: T): T;
|
|
904
|
+
|
|
900
905
|
export type WorkflowRunAs =
|
|
906
|
+
| { binding: DefinitionUid }
|
|
901
907
|
| 'system'
|
|
902
908
|
/** Only for request workflows: the signed-in user who calls the route. */
|
|
903
909
|
| 'session'
|
|
@@ -933,6 +939,7 @@ export type RecordLifecycleTrigger = {
|
|
|
933
939
|
type: 'recordLifecycle';
|
|
934
940
|
resource: ResourceReference;
|
|
935
941
|
hook: 'creating' | 'updating' | 'saving' | 'deleting' | 'restoring';
|
|
942
|
+
filters?: FilterGroup;
|
|
936
943
|
};
|
|
937
944
|
|
|
938
945
|
export type RecordScheduleTrigger = {
|
|
@@ -940,8 +947,19 @@ export type RecordScheduleTrigger = {
|
|
|
940
947
|
resource: ResourceReference;
|
|
941
948
|
/** The key of a date or datetime field of the resource. */
|
|
942
949
|
dateField: string;
|
|
943
|
-
/**
|
|
950
|
+
/**
|
|
951
|
+
* Signed ISO 8601 durations, for example `'-P1D'`. Day timing takes whole
|
|
952
|
+
* days. Exact timing also takes hours and minutes, for example `'-PT2H'`.
|
|
953
|
+
*/
|
|
944
954
|
offsets: readonly string[];
|
|
955
|
+
/**
|
|
956
|
+
* When each offset runs. `'day'` (the default) runs at 8 a.m. in the
|
|
957
|
+
* workspace timezone on the day of the field plus the offset, and ignores
|
|
958
|
+
* the time of the field. `'exact'` runs at the time of the field plus the
|
|
959
|
+
* offset, and needs a datetime field.
|
|
960
|
+
*/
|
|
961
|
+
timing?: 'day' | 'exact';
|
|
962
|
+
filters?: FilterGroup;
|
|
945
963
|
};
|
|
946
964
|
|
|
947
965
|
export type ScheduledTrigger = {
|
|
@@ -1149,8 +1167,8 @@ export declare function defineEmailLayout<const T extends EmailLayoutDefinition>
|
|
|
1149
1167
|
|
|
1150
1168
|
/**
|
|
1151
1169
|
* When a schedule sends. `'day'` sends at 8 a.m. in the workspace timezone on
|
|
1152
|
-
* the day. `'exact'` sends at the
|
|
1153
|
-
* event schedule field.
|
|
1170
|
+
* the day. `'exact'` sends at the time of a datetime field or the start of an
|
|
1171
|
+
* event schedule field, plus the offset.
|
|
1154
1172
|
*/
|
|
1155
1173
|
export type NotificationScheduleTiming = 'day' | 'exact';
|
|
1156
1174
|
|
|
@@ -1179,7 +1197,7 @@ export type NotificationScheduleDefinition = UidOption & {
|
|
|
1179
1197
|
/**
|
|
1180
1198
|
* One to 30 distinct ISO 8601 durations from the date, for example
|
|
1181
1199
|
* `'-P30D'` (30 days before), `'P0D'` (the day), or `'-PT2H'` (2 hours
|
|
1182
|
-
* before). A duration without a sign counts after the date.
|
|
1200
|
+
* before in exact timing). A duration without a sign counts after the date.
|
|
1183
1201
|
*/
|
|
1184
1202
|
offsets: readonly string[];
|
|
1185
1203
|
/** Only the source records that match. */
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,8 @@ export const defineConfig = (config) => config;
|
|
|
21
21
|
|
|
22
22
|
export const defineRedirects = (redirects) => redirects;
|
|
23
23
|
|
|
24
|
+
export const defineRecordBinding = (binding) => binding;
|
|
25
|
+
|
|
24
26
|
export const defineWorkspaceField = (field) => field;
|
|
25
27
|
|
|
26
28
|
export const definePermission = (permission) => permission;
|
package/dist/sdk-contract.d.ts
CHANGED
|
@@ -2835,6 +2835,7 @@ type SdkSystemSettingsPage =
|
|
|
2835
2835
|
| 'page-playground'
|
|
2836
2836
|
| 'pages'
|
|
2837
2837
|
| 'projects'
|
|
2838
|
+
| 'record-bindings'
|
|
2838
2839
|
| 'redirects'
|
|
2839
2840
|
| 'resources'
|
|
2840
2841
|
| 'security'
|
|
@@ -2898,6 +2899,7 @@ type SdkWorkspace = {
|
|
|
2898
2899
|
fields: WorkspaceFieldDefinitionCatalog;
|
|
2899
2900
|
/** @deprecated Load-time snapshot. Read live values with `Sdk.hooks.useWorkspaceValues`. */
|
|
2900
2901
|
values: WorkspaceFieldCatalog | null;
|
|
2902
|
+
value_errors?: Record<string, string>;
|
|
2901
2903
|
} | null;
|
|
2902
2904
|
|
|
2903
2905
|
type SdkWorkspaceField = {
|