@turbofy-ai/app-runtime 0.0.1 → 0.0.3
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/src/api/hooks.d.ts +8 -2
- package/dist/src/api/index.d.ts +2 -3
- package/dist/src/api/request-manager.d.ts +0 -1
- package/dist/src/api/subscription-manager.d.ts +0 -1
- package/dist/src/api/types.d.ts +10 -2
- package/dist/src/api/ws-subscription-manager.d.ts +0 -1
- package/dist/src/api.d.ts +1 -2
- package/dist/src/components/ui/accordion.d.ts +0 -1
- package/dist/src/components/ui/alert-dialog.d.ts +0 -1
- package/dist/src/components/ui/alert.d.ts +0 -1
- package/dist/src/components/ui/aspect-ratio.d.ts +0 -1
- package/dist/src/components/ui/avatar.d.ts +0 -1
- package/dist/src/components/ui/badge.d.ts +0 -1
- package/dist/src/components/ui/breadcrumb.d.ts +0 -1
- package/dist/src/components/ui/button-group.d.ts +0 -1
- package/dist/src/components/ui/button.d.ts +0 -1
- package/dist/src/components/ui/calendar.d.ts +0 -1
- package/dist/src/components/ui/card.d.ts +0 -1
- package/dist/src/components/ui/carousel.d.ts +0 -1
- package/dist/src/components/ui/chart.d.ts +0 -1
- package/dist/src/components/ui/checkbox.d.ts +0 -1
- package/dist/src/components/ui/collapsible.d.ts +0 -1
- package/dist/src/components/ui/combobox.d.ts +0 -1
- package/dist/src/components/ui/command.d.ts +0 -1
- package/dist/src/components/ui/context-menu.d.ts +0 -1
- package/dist/src/components/ui/dialog.d.ts +0 -1
- package/dist/src/components/ui/direction.d.ts +0 -1
- package/dist/src/components/ui/drawer.d.ts +0 -1
- package/dist/src/components/ui/dropdown-menu.d.ts +0 -1
- package/dist/src/components/ui/empty.d.ts +0 -1
- package/dist/src/components/ui/field.d.ts +0 -1
- package/dist/src/components/ui/form.d.ts +0 -1
- package/dist/src/components/ui/hover-card.d.ts +0 -1
- package/dist/src/components/ui/input-group.d.ts +0 -1
- package/dist/src/components/ui/input-otp.d.ts +0 -1
- package/dist/src/components/ui/input.d.ts +0 -1
- package/dist/src/components/ui/item.d.ts +0 -1
- package/dist/src/components/ui/kbd.d.ts +0 -1
- package/dist/src/components/ui/label.d.ts +0 -1
- package/dist/src/components/ui/menubar.d.ts +0 -1
- package/dist/src/components/ui/native-select.d.ts +0 -1
- package/dist/src/components/ui/navigation-menu.d.ts +0 -1
- package/dist/src/components/ui/pagination.d.ts +0 -1
- package/dist/src/components/ui/popover.d.ts +0 -1
- package/dist/src/components/ui/progress.d.ts +0 -1
- package/dist/src/components/ui/radio-group.d.ts +0 -1
- package/dist/src/components/ui/resizable.d.ts +0 -1
- package/dist/src/components/ui/scroll-area.d.ts +0 -1
- package/dist/src/components/ui/select.d.ts +0 -1
- package/dist/src/components/ui/separator.d.ts +0 -1
- package/dist/src/components/ui/sheet.d.ts +0 -1
- package/dist/src/components/ui/sidebar.d.ts +0 -1
- package/dist/src/components/ui/skeleton.d.ts +0 -1
- package/dist/src/components/ui/slider.d.ts +0 -1
- package/dist/src/components/ui/sonner.d.ts +0 -1
- package/dist/src/components/ui/spinner.d.ts +0 -1
- package/dist/src/components/ui/switch.d.ts +0 -1
- package/dist/src/components/ui/table.d.ts +0 -1
- package/dist/src/components/ui/tabs.d.ts +0 -1
- package/dist/src/components/ui/textarea.d.ts +0 -1
- package/dist/src/components/ui/toggle-group.d.ts +0 -1
- package/dist/src/components/ui/toggle.d.ts +0 -1
- package/dist/src/components/ui/tooltip.d.ts +0 -1
- package/dist/src/dsl.d.ts +963 -21
- package/dist/src/dsl.js +14978 -19417
- package/dist/src/hooks/use-mobile.d.ts +0 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/lib/types.d.ts +0 -1
- package/dist/src/lib/utils.d.ts +0 -1
- package/dist/src/navigation/index.d.ts +0 -1
- package/dist/src/navigation/link.d.ts +3 -2
- package/dist/src/navigation/navigate.d.ts +0 -1
- package/dist/src/navigation/prefetch.d.ts +0 -1
- package/dist/src/navigation.d.ts +1 -2
- package/package.json +8 -18
- package/dist/src/api/hooks.d.ts.map +0 -1
- package/dist/src/api/hooks.js +0 -399
- package/dist/src/api/hooks.js.map +0 -1
- package/dist/src/api/index.d.ts.map +0 -1
- package/dist/src/api/index.js +0 -5
- package/dist/src/api/index.js.map +0 -1
- package/dist/src/api/request-manager.d.ts.map +0 -1
- package/dist/src/api/request-manager.js +0 -68
- package/dist/src/api/request-manager.js.map +0 -1
- package/dist/src/api/subscription-manager.d.ts.map +0 -1
- package/dist/src/api/subscription-manager.js +0 -81
- package/dist/src/api/subscription-manager.js.map +0 -1
- package/dist/src/api/types.d.ts.map +0 -1
- package/dist/src/api/types.js +0 -2
- package/dist/src/api/types.js.map +0 -1
- package/dist/src/api/ws-subscription-manager.d.ts.map +0 -1
- package/dist/src/api/ws-subscription-manager.js +0 -59
- package/dist/src/api/ws-subscription-manager.js.map +0 -1
- package/dist/src/api.d.ts.map +0 -1
- package/dist/src/api.js +0 -2
- package/dist/src/api.js.map +0 -1
- package/dist/src/components/ui/accordion.d.ts.map +0 -1
- package/dist/src/components/ui/accordion.js +0 -18
- package/dist/src/components/ui/accordion.js.map +0 -1
- package/dist/src/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/src/components/ui/alert-dialog.js +0 -43
- package/dist/src/components/ui/alert-dialog.js.map +0 -1
- package/dist/src/components/ui/alert.d.ts.map +0 -1
- package/dist/src/components/ui/alert.js +0 -25
- package/dist/src/components/ui/alert.js.map +0 -1
- package/dist/src/components/ui/aspect-ratio.d.ts.map +0 -1
- package/dist/src/components/ui/aspect-ratio.js +0 -8
- package/dist/src/components/ui/aspect-ratio.js.map +0 -1
- package/dist/src/components/ui/avatar.d.ts.map +0 -1
- package/dist/src/components/ui/avatar.js +0 -23
- package/dist/src/components/ui/avatar.js.map +0 -1
- package/dist/src/components/ui/badge.d.ts.map +0 -1
- package/dist/src/components/ui/badge.js +0 -25
- package/dist/src/components/ui/badge.js.map +0 -1
- package/dist/src/components/ui/breadcrumb.d.ts.map +0 -1
- package/dist/src/components/ui/breadcrumb.js +0 -28
- package/dist/src/components/ui/breadcrumb.js.map +0 -1
- package/dist/src/components/ui/button-group.d.ts.map +0 -1
- package/dist/src/components/ui/button-group.js +0 -28
- package/dist/src/components/ui/button-group.js.map +0 -1
- package/dist/src/components/ui/button.d.ts.map +0 -1
- package/dist/src/components/ui/button.js +0 -36
- package/dist/src/components/ui/button.js.map +0 -1
- package/dist/src/components/ui/calendar.d.ts.map +0 -1
- package/dist/src/components/ui/calendar.js +0 -76
- package/dist/src/components/ui/calendar.js.map +0 -1
- package/dist/src/components/ui/card.d.ts.map +0 -1
- package/dist/src/components/ui/card.js +0 -25
- package/dist/src/components/ui/card.js.map +0 -1
- package/dist/src/components/ui/carousel.d.ts.map +0 -1
- package/dist/src/components/ui/carousel.js +0 -92
- package/dist/src/components/ui/carousel.js.map +0 -1
- package/dist/src/components/ui/chart.d.ts.map +0 -1
- package/dist/src/components/ui/chart.js +0 -132
- package/dist/src/components/ui/chart.js.map +0 -1
- package/dist/src/components/ui/checkbox.d.ts.map +0 -1
- package/dist/src/components/ui/checkbox.js +0 -10
- package/dist/src/components/ui/checkbox.js.map +0 -1
- package/dist/src/components/ui/collapsible.d.ts.map +0 -1
- package/dist/src/components/ui/collapsible.js +0 -13
- package/dist/src/components/ui/collapsible.js.map +0 -1
- package/dist/src/components/ui/combobox.d.ts.map +0 -1
- package/dist/src/components/ui/combobox.js +0 -59
- package/dist/src/components/ui/combobox.js.map +0 -1
- package/dist/src/components/ui/command.d.ts.map +0 -1
- package/dist/src/components/ui/command.js +0 -35
- package/dist/src/components/ui/command.js.map +0 -1
- package/dist/src/components/ui/context-menu.d.ts.map +0 -1
- package/dist/src/components/ui/context-menu.js +0 -52
- package/dist/src/components/ui/context-menu.js.map +0 -1
- package/dist/src/components/ui/dialog.d.ts.map +0 -1
- package/dist/src/components/ui/dialog.js +0 -37
- package/dist/src/components/ui/dialog.js.map +0 -1
- package/dist/src/components/ui/direction.d.ts.map +0 -1
- package/dist/src/components/ui/direction.js +0 -9
- package/dist/src/components/ui/direction.js.map +0 -1
- package/dist/src/components/ui/drawer.d.ts.map +0 -1
- package/dist/src/components/ui/drawer.js +0 -35
- package/dist/src/components/ui/drawer.js.map +0 -1
- package/dist/src/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/src/components/ui/dropdown-menu.js +0 -52
- package/dist/src/components/ui/dropdown-menu.js.map +0 -1
- package/dist/src/components/ui/empty.d.ts.map +0 -1
- package/dist/src/components/ui/empty.js +0 -34
- package/dist/src/components/ui/empty.js.map +0 -1
- package/dist/src/components/ui/field.d.ts.map +0 -1
- package/dist/src/components/ui/field.js +0 -77
- package/dist/src/components/ui/field.js.map +0 -1
- package/dist/src/components/ui/form.d.ts.map +0 -1
- package/dist/src/components/ui/form.js +0 -59
- package/dist/src/components/ui/form.js.map +0 -1
- package/dist/src/components/ui/hover-card.d.ts.map +0 -1
- package/dist/src/components/ui/hover-card.js +0 -14
- package/dist/src/components/ui/hover-card.js.map +0 -1
- package/dist/src/components/ui/input-group.d.ts.map +0 -1
- package/dist/src/components/ui/input-group.js +0 -63
- package/dist/src/components/ui/input-group.js.map +0 -1
- package/dist/src/components/ui/input-otp.d.ts.map +0 -1
- package/dist/src/components/ui/input-otp.js +0 -22
- package/dist/src/components/ui/input-otp.js.map +0 -1
- package/dist/src/components/ui/input.d.ts.map +0 -1
- package/dist/src/components/ui/input.js +0 -7
- package/dist/src/components/ui/input.js.map +0 -1
- package/dist/src/components/ui/item.d.ts.map +0 -1
- package/dist/src/components/ui/item.js +0 -67
- package/dist/src/components/ui/item.js.map +0 -1
- package/dist/src/components/ui/kbd.d.ts.map +0 -1
- package/dist/src/components/ui/kbd.js +0 -10
- package/dist/src/components/ui/kbd.js.map +0 -1
- package/dist/src/components/ui/label.d.ts.map +0 -1
- package/dist/src/components/ui/label.js +0 -8
- package/dist/src/components/ui/label.js.map +0 -1
- package/dist/src/components/ui/menubar.d.ts.map +0 -1
- package/dist/src/components/ui/menubar.js +0 -55
- package/dist/src/components/ui/menubar.js.map +0 -1
- package/dist/src/components/ui/native-select.d.ts.map +0 -1
- package/dist/src/components/ui/native-select.js +0 -14
- package/dist/src/components/ui/native-select.js.map +0 -1
- package/dist/src/components/ui/navigation-menu.d.ts.map +0 -1
- package/dist/src/components/ui/navigation-menu.js +0 -32
- package/dist/src/components/ui/navigation-menu.js.map +0 -1
- package/dist/src/components/ui/pagination.d.ts.map +0 -1
- package/dist/src/components/ui/pagination.js +0 -30
- package/dist/src/components/ui/pagination.js.map +0 -1
- package/dist/src/components/ui/popover.d.ts.map +0 -1
- package/dist/src/components/ui/popover.js +0 -26
- package/dist/src/components/ui/popover.js.map +0 -1
- package/dist/src/components/ui/progress.d.ts.map +0 -1
- package/dist/src/components/ui/progress.js +0 -9
- package/dist/src/components/ui/progress.js.map +0 -1
- package/dist/src/components/ui/radio-group.d.ts.map +0 -1
- package/dist/src/components/ui/radio-group.js +0 -12
- package/dist/src/components/ui/radio-group.js.map +0 -1
- package/dist/src/components/ui/resizable.d.ts.map +0 -1
- package/dist/src/components/ui/resizable.js +0 -16
- package/dist/src/components/ui/resizable.js.map +0 -1
- package/dist/src/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/src/components/ui/scroll-area.js +0 -13
- package/dist/src/components/ui/scroll-area.js.map +0 -1
- package/dist/src/components/ui/select.d.ts.map +0 -1
- package/dist/src/components/ui/select.js +0 -39
- package/dist/src/components/ui/select.js.map +0 -1
- package/dist/src/components/ui/separator.d.ts.map +0 -1
- package/dist/src/components/ui/separator.js +0 -8
- package/dist/src/components/ui/separator.js.map +0 -1
- package/dist/src/components/ui/sheet.d.ts.map +0 -1
- package/dist/src/components/ui/sheet.js +0 -41
- package/dist/src/components/ui/sheet.js.map +0 -1
- package/dist/src/components/ui/sidebar.d.ts.map +0 -1
- package/dist/src/components/ui/sidebar.js +0 -212
- package/dist/src/components/ui/sidebar.js.map +0 -1
- package/dist/src/components/ui/skeleton.d.ts.map +0 -1
- package/dist/src/components/ui/skeleton.js +0 -7
- package/dist/src/components/ui/skeleton.js.map +0 -1
- package/dist/src/components/ui/slider.d.ts.map +0 -1
- package/dist/src/components/ui/slider.js +0 -14
- package/dist/src/components/ui/slider.js.map +0 -1
- package/dist/src/components/ui/sonner.d.ts.map +0 -1
- package/dist/src/components/ui/sonner.js +0 -22
- package/dist/src/components/ui/sonner.js.map +0 -1
- package/dist/src/components/ui/spinner.d.ts.map +0 -1
- package/dist/src/components/ui/spinner.js +0 -8
- package/dist/src/components/ui/spinner.js.map +0 -1
- package/dist/src/components/ui/switch.d.ts.map +0 -1
- package/dist/src/components/ui/switch.js +0 -8
- package/dist/src/components/ui/switch.js.map +0 -1
- package/dist/src/components/ui/table.d.ts.map +0 -1
- package/dist/src/components/ui/table.js +0 -29
- package/dist/src/components/ui/table.js.map +0 -1
- package/dist/src/components/ui/tabs.d.ts.map +0 -1
- package/dist/src/components/ui/tabs.js +0 -29
- package/dist/src/components/ui/tabs.js.map +0 -1
- package/dist/src/components/ui/textarea.d.ts.map +0 -1
- package/dist/src/components/ui/textarea.js +0 -7
- package/dist/src/components/ui/textarea.js.map +0 -1
- package/dist/src/components/ui/toggle-group.d.ts.map +0 -1
- package/dist/src/components/ui/toggle-group.js +0 -23
- package/dist/src/components/ui/toggle-group.js.map +0 -1
- package/dist/src/components/ui/toggle.d.ts.map +0 -1
- package/dist/src/components/ui/toggle.js +0 -27
- package/dist/src/components/ui/toggle.js.map +0 -1
- package/dist/src/components/ui/tooltip.d.ts.map +0 -1
- package/dist/src/components/ui/tooltip.js +0 -17
- package/dist/src/components/ui/tooltip.js.map +0 -1
- package/dist/src/dsl.js.map +0 -7
- package/dist/src/hooks/use-mobile.d.ts.map +0 -1
- package/dist/src/hooks/use-mobile.js +0 -16
- package/dist/src/hooks/use-mobile.js.map +0 -1
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -3
- package/dist/src/index.js.map +0 -1
- package/dist/src/lib/types.d.ts.map +0 -1
- package/dist/src/lib/types.js +0 -2
- package/dist/src/lib/types.js.map +0 -1
- package/dist/src/lib/utils.d.ts.map +0 -1
- package/dist/src/lib/utils.js +0 -6
- package/dist/src/lib/utils.js.map +0 -1
- package/dist/src/navigation/index.d.ts.map +0 -1
- package/dist/src/navigation/index.js +0 -4
- package/dist/src/navigation/index.js.map +0 -1
- package/dist/src/navigation/link.d.ts.map +0 -1
- package/dist/src/navigation/link.js +0 -16
- package/dist/src/navigation/link.js.map +0 -1
- package/dist/src/navigation/navigate.d.ts.map +0 -1
- package/dist/src/navigation/navigate.js +0 -7
- package/dist/src/navigation/navigate.js.map +0 -1
- package/dist/src/navigation/prefetch.d.ts.map +0 -1
- package/dist/src/navigation/prefetch.js +0 -11
- package/dist/src/navigation/prefetch.js.map +0 -1
- package/dist/src/navigation.d.ts.map +0 -1
- package/dist/src/navigation.js +0 -2
- package/dist/src/navigation.js.map +0 -1
package/dist/src/dsl.d.ts
CHANGED
|
@@ -1,21 +1,963 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare enum FieldTypeEnum {
|
|
4
|
+
Boolean = "Boolean",
|
|
5
|
+
Float = "Float",
|
|
6
|
+
ID = "ID",
|
|
7
|
+
Integer = "Integer",
|
|
8
|
+
String = "String",
|
|
9
|
+
ListBoolean = "ListBoolean",
|
|
10
|
+
ListFloat = "ListFloat",
|
|
11
|
+
ListId = "ListId",
|
|
12
|
+
ListInteger = "ListInteger",
|
|
13
|
+
ListString = "ListString",
|
|
14
|
+
Email = "Email",
|
|
15
|
+
IpAddress = "IpAddress",
|
|
16
|
+
Json = "Json",
|
|
17
|
+
Url = "Url",
|
|
18
|
+
Date = "Date",
|
|
19
|
+
DateTime = "DateTime",
|
|
20
|
+
Time = "Time",
|
|
21
|
+
Timestamp = "Timestamp"
|
|
22
|
+
}
|
|
23
|
+
declare const fieldDeclarationSchema: z.ZodObject<{
|
|
24
|
+
id: z.ZodOptional<z.ZodString>;
|
|
25
|
+
name: z.ZodString;
|
|
26
|
+
label: z.ZodOptional<z.ZodString>;
|
|
27
|
+
formatter: z.ZodOptional<z.ZodString>;
|
|
28
|
+
type: z.ZodUnion<readonly [
|
|
29
|
+
z.ZodEnum<typeof FieldTypeEnum>,
|
|
30
|
+
z.ZodString
|
|
31
|
+
]>;
|
|
32
|
+
directives: z.ZodArray<z.ZodString>;
|
|
33
|
+
dynamicFieldConfig: z.ZodOptional<z.ZodUnion<readonly [
|
|
34
|
+
z.ZodObject<{
|
|
35
|
+
isLocalizedString: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
37
|
+
code: z.ZodString;
|
|
38
|
+
}, z.core.$strip>,
|
|
39
|
+
z.ZodObject<{
|
|
40
|
+
isLocalizedString: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
42
|
+
ofType: z.ZodString;
|
|
43
|
+
id: z.ZodString;
|
|
44
|
+
}, z.core.$strip>
|
|
45
|
+
]>>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
export type IFieldDeclaration = z.infer<typeof fieldDeclarationSchema>;
|
|
48
|
+
export declare enum PublishingTypeEnum {
|
|
49
|
+
Queries = "Queries",
|
|
50
|
+
Mutations = "Mutations",
|
|
51
|
+
Subscriptions = "Subscriptions"
|
|
52
|
+
}
|
|
53
|
+
declare const enumTypeDeclarationSchema: z.ZodObject<{
|
|
54
|
+
name: z.ZodString;
|
|
55
|
+
values: z.ZodArray<z.ZodString>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
export type IEnumTypeDeclaration = z.infer<typeof enumTypeDeclarationSchema>;
|
|
58
|
+
declare enum ArchiveTypeEnum {
|
|
59
|
+
ASSET = "ASSET",
|
|
60
|
+
S3BUCKET = "S3BUCKET"
|
|
61
|
+
}
|
|
62
|
+
declare enum MutationTypeEnum {
|
|
63
|
+
CREATE = "CREATE",
|
|
64
|
+
BATCH_CREATE = "BATCH_CREATE",
|
|
65
|
+
UPDATE = "UPDATE",
|
|
66
|
+
DELETE = "DELETE",
|
|
67
|
+
BATCH_DELETE = "BATCH_DELETE",
|
|
68
|
+
EVENT = "EVENT",
|
|
69
|
+
S3OBJECT = "S3OBJECT",
|
|
70
|
+
INLINE_S3OBJECT = "INLINE_S3OBJECT",
|
|
71
|
+
FILE = "FILE",
|
|
72
|
+
INLINE_FILE = "INLINE_FILE",
|
|
73
|
+
NONE = "NONE"
|
|
74
|
+
}
|
|
75
|
+
declare enum QueryTypeEnum {
|
|
76
|
+
BATCH = "BATCH",
|
|
77
|
+
OBJECT = "OBJECT",
|
|
78
|
+
LIST = "LIST",
|
|
79
|
+
LIST_BY_PARENT = "LIST_BY_PARENT",
|
|
80
|
+
CONNECTION = "CONNECTION",
|
|
81
|
+
NONE = "NONE_QUERY"
|
|
82
|
+
}
|
|
83
|
+
declare enum PipelineStepEnum {
|
|
84
|
+
AFTER = "AFTER",
|
|
85
|
+
BEFORE = "BEFORE",
|
|
86
|
+
MAIN = "MAIN"
|
|
87
|
+
}
|
|
88
|
+
declare enum RuntimeEnum {
|
|
89
|
+
NODEJS_22_X = "NODEJS_22_X",
|
|
90
|
+
NODEJS_18_X = "NODEJS_18_X",
|
|
91
|
+
PYTHON_3_10 = "PYTHON_3_10",
|
|
92
|
+
GO_1_X = "GO_1_X",
|
|
93
|
+
RUBY_2_7 = "RUBY_2_7",
|
|
94
|
+
RUBY_3_2 = "RUBY_3_2",
|
|
95
|
+
DOCKER = "DOCKER"
|
|
96
|
+
}
|
|
97
|
+
declare const objectTypeDeclarationSchema: z.ZodObject<{
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
name: z.ZodString;
|
|
100
|
+
targets: z.ZodArray<z.ZodString>;
|
|
101
|
+
parents: z.ZodObject<{
|
|
102
|
+
first: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
103
|
+
second: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
106
|
+
id: z.ZodOptional<z.ZodString>;
|
|
107
|
+
name: z.ZodString;
|
|
108
|
+
label: z.ZodOptional<z.ZodString>;
|
|
109
|
+
formatter: z.ZodOptional<z.ZodString>;
|
|
110
|
+
type: z.ZodUnion<readonly [
|
|
111
|
+
z.ZodEnum<typeof FieldTypeEnum>,
|
|
112
|
+
z.ZodString
|
|
113
|
+
]>;
|
|
114
|
+
directives: z.ZodArray<z.ZodString>;
|
|
115
|
+
dynamicFieldConfig: z.ZodOptional<z.ZodUnion<readonly [
|
|
116
|
+
z.ZodObject<{
|
|
117
|
+
isLocalizedString: z.ZodOptional<z.ZodBoolean>;
|
|
118
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
119
|
+
code: z.ZodString;
|
|
120
|
+
}, z.core.$strip>,
|
|
121
|
+
z.ZodObject<{
|
|
122
|
+
isLocalizedString: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
124
|
+
ofType: z.ZodString;
|
|
125
|
+
id: z.ZodString;
|
|
126
|
+
}, z.core.$strip>
|
|
127
|
+
]>>;
|
|
128
|
+
}, z.core.$strip>>;
|
|
129
|
+
directives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
130
|
+
resolvers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
131
|
+
name: z.ZodString;
|
|
132
|
+
archive: z.ZodString;
|
|
133
|
+
archiveType: z.ZodEnum<typeof ArchiveTypeEnum>;
|
|
134
|
+
handler: z.ZodString;
|
|
135
|
+
types: z.ZodArray<z.ZodUnion<readonly [
|
|
136
|
+
z.ZodEnum<typeof QueryTypeEnum>,
|
|
137
|
+
z.ZodEnum<typeof MutationTypeEnum>
|
|
138
|
+
]>>;
|
|
139
|
+
step: z.ZodEnum<typeof PipelineStepEnum>;
|
|
140
|
+
actions: z.ZodArray<z.ZodString>;
|
|
141
|
+
runtime: z.ZodOptional<z.ZodEnum<typeof RuntimeEnum>>;
|
|
142
|
+
}, z.core.$strip>>>;
|
|
143
|
+
publishingTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof PublishingTypeEnum>>>;
|
|
144
|
+
searchConfig: z.ZodOptional<z.ZodUnion<readonly [
|
|
145
|
+
z.ZodObject<{
|
|
146
|
+
isLocalizedString: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
148
|
+
ofType: z.ZodString;
|
|
149
|
+
id: z.ZodString;
|
|
150
|
+
}, z.core.$strip>,
|
|
151
|
+
z.ZodObject<{
|
|
152
|
+
fullTextSearch: z.ZodObject<{
|
|
153
|
+
mappingOverride: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
154
|
+
codeNormalize: z.ZodString;
|
|
155
|
+
}, z.core.$strip>;
|
|
156
|
+
}, z.core.$strip>
|
|
157
|
+
]>>;
|
|
158
|
+
}, z.core.$strip>;
|
|
159
|
+
export type IObjectTypeDeclaration = z.infer<typeof objectTypeDeclarationSchema>;
|
|
160
|
+
declare function enumType(name: string, values: string[]): IEnumTypeDeclaration;
|
|
161
|
+
export type FieldBuilder = Partial<Omit<IFieldDeclaration, "name">> & {
|
|
162
|
+
type: FieldTypeEnum | string;
|
|
163
|
+
};
|
|
164
|
+
export interface FieldOpts {
|
|
165
|
+
id?: string;
|
|
166
|
+
label?: string;
|
|
167
|
+
formatter?: string;
|
|
168
|
+
directives?: string[];
|
|
169
|
+
dynamicFieldConfig?: IFieldDeclaration["dynamicFieldConfig"];
|
|
170
|
+
}
|
|
171
|
+
export interface LocalizedStringFieldOpts {
|
|
172
|
+
id?: string;
|
|
173
|
+
label?: string;
|
|
174
|
+
formatter?: string;
|
|
175
|
+
directives?: string[];
|
|
176
|
+
locales?: string[];
|
|
177
|
+
}
|
|
178
|
+
declare const fields: {
|
|
179
|
+
boolean: (opts?: FieldOpts) => {
|
|
180
|
+
dynamicFieldConfig?: {
|
|
181
|
+
ofType: string;
|
|
182
|
+
id: string;
|
|
183
|
+
isLocalizedString?: boolean | undefined;
|
|
184
|
+
locales?: string[] | undefined;
|
|
185
|
+
} | {
|
|
186
|
+
code: string;
|
|
187
|
+
isLocalizedString?: boolean | undefined;
|
|
188
|
+
locales?: string[] | undefined;
|
|
189
|
+
} | undefined;
|
|
190
|
+
directives: string[];
|
|
191
|
+
formatter?: string | undefined;
|
|
192
|
+
label?: string | undefined;
|
|
193
|
+
id?: string | undefined;
|
|
194
|
+
type: FieldTypeEnum;
|
|
195
|
+
};
|
|
196
|
+
float: (opts?: FieldOpts) => {
|
|
197
|
+
dynamicFieldConfig?: {
|
|
198
|
+
ofType: string;
|
|
199
|
+
id: string;
|
|
200
|
+
isLocalizedString?: boolean | undefined;
|
|
201
|
+
locales?: string[] | undefined;
|
|
202
|
+
} | {
|
|
203
|
+
code: string;
|
|
204
|
+
isLocalizedString?: boolean | undefined;
|
|
205
|
+
locales?: string[] | undefined;
|
|
206
|
+
} | undefined;
|
|
207
|
+
directives: string[];
|
|
208
|
+
formatter?: string | undefined;
|
|
209
|
+
label?: string | undefined;
|
|
210
|
+
id?: string | undefined;
|
|
211
|
+
type: FieldTypeEnum;
|
|
212
|
+
};
|
|
213
|
+
id: (opts?: FieldOpts) => {
|
|
214
|
+
dynamicFieldConfig?: {
|
|
215
|
+
ofType: string;
|
|
216
|
+
id: string;
|
|
217
|
+
isLocalizedString?: boolean | undefined;
|
|
218
|
+
locales?: string[] | undefined;
|
|
219
|
+
} | {
|
|
220
|
+
code: string;
|
|
221
|
+
isLocalizedString?: boolean | undefined;
|
|
222
|
+
locales?: string[] | undefined;
|
|
223
|
+
} | undefined;
|
|
224
|
+
directives: string[];
|
|
225
|
+
formatter?: string | undefined;
|
|
226
|
+
label?: string | undefined;
|
|
227
|
+
id?: string | undefined;
|
|
228
|
+
type: FieldTypeEnum;
|
|
229
|
+
};
|
|
230
|
+
integer: (opts?: FieldOpts) => {
|
|
231
|
+
dynamicFieldConfig?: {
|
|
232
|
+
ofType: string;
|
|
233
|
+
id: string;
|
|
234
|
+
isLocalizedString?: boolean | undefined;
|
|
235
|
+
locales?: string[] | undefined;
|
|
236
|
+
} | {
|
|
237
|
+
code: string;
|
|
238
|
+
isLocalizedString?: boolean | undefined;
|
|
239
|
+
locales?: string[] | undefined;
|
|
240
|
+
} | undefined;
|
|
241
|
+
directives: string[];
|
|
242
|
+
formatter?: string | undefined;
|
|
243
|
+
label?: string | undefined;
|
|
244
|
+
id?: string | undefined;
|
|
245
|
+
type: FieldTypeEnum;
|
|
246
|
+
};
|
|
247
|
+
string: (opts?: FieldOpts) => {
|
|
248
|
+
dynamicFieldConfig?: {
|
|
249
|
+
ofType: string;
|
|
250
|
+
id: string;
|
|
251
|
+
isLocalizedString?: boolean | undefined;
|
|
252
|
+
locales?: string[] | undefined;
|
|
253
|
+
} | {
|
|
254
|
+
code: string;
|
|
255
|
+
isLocalizedString?: boolean | undefined;
|
|
256
|
+
locales?: string[] | undefined;
|
|
257
|
+
} | undefined;
|
|
258
|
+
directives: string[];
|
|
259
|
+
formatter?: string | undefined;
|
|
260
|
+
label?: string | undefined;
|
|
261
|
+
id?: string | undefined;
|
|
262
|
+
type: FieldTypeEnum;
|
|
263
|
+
};
|
|
264
|
+
listBoolean: (opts?: FieldOpts) => {
|
|
265
|
+
dynamicFieldConfig?: {
|
|
266
|
+
ofType: string;
|
|
267
|
+
id: string;
|
|
268
|
+
isLocalizedString?: boolean | undefined;
|
|
269
|
+
locales?: string[] | undefined;
|
|
270
|
+
} | {
|
|
271
|
+
code: string;
|
|
272
|
+
isLocalizedString?: boolean | undefined;
|
|
273
|
+
locales?: string[] | undefined;
|
|
274
|
+
} | undefined;
|
|
275
|
+
directives: string[];
|
|
276
|
+
formatter?: string | undefined;
|
|
277
|
+
label?: string | undefined;
|
|
278
|
+
id?: string | undefined;
|
|
279
|
+
type: FieldTypeEnum;
|
|
280
|
+
};
|
|
281
|
+
listFloat: (opts?: FieldOpts) => {
|
|
282
|
+
dynamicFieldConfig?: {
|
|
283
|
+
ofType: string;
|
|
284
|
+
id: string;
|
|
285
|
+
isLocalizedString?: boolean | undefined;
|
|
286
|
+
locales?: string[] | undefined;
|
|
287
|
+
} | {
|
|
288
|
+
code: string;
|
|
289
|
+
isLocalizedString?: boolean | undefined;
|
|
290
|
+
locales?: string[] | undefined;
|
|
291
|
+
} | undefined;
|
|
292
|
+
directives: string[];
|
|
293
|
+
formatter?: string | undefined;
|
|
294
|
+
label?: string | undefined;
|
|
295
|
+
id?: string | undefined;
|
|
296
|
+
type: FieldTypeEnum;
|
|
297
|
+
};
|
|
298
|
+
listId: (opts?: FieldOpts) => {
|
|
299
|
+
dynamicFieldConfig?: {
|
|
300
|
+
ofType: string;
|
|
301
|
+
id: string;
|
|
302
|
+
isLocalizedString?: boolean | undefined;
|
|
303
|
+
locales?: string[] | undefined;
|
|
304
|
+
} | {
|
|
305
|
+
code: string;
|
|
306
|
+
isLocalizedString?: boolean | undefined;
|
|
307
|
+
locales?: string[] | undefined;
|
|
308
|
+
} | undefined;
|
|
309
|
+
directives: string[];
|
|
310
|
+
formatter?: string | undefined;
|
|
311
|
+
label?: string | undefined;
|
|
312
|
+
id?: string | undefined;
|
|
313
|
+
type: FieldTypeEnum;
|
|
314
|
+
};
|
|
315
|
+
listInteger: (opts?: FieldOpts) => {
|
|
316
|
+
dynamicFieldConfig?: {
|
|
317
|
+
ofType: string;
|
|
318
|
+
id: string;
|
|
319
|
+
isLocalizedString?: boolean | undefined;
|
|
320
|
+
locales?: string[] | undefined;
|
|
321
|
+
} | {
|
|
322
|
+
code: string;
|
|
323
|
+
isLocalizedString?: boolean | undefined;
|
|
324
|
+
locales?: string[] | undefined;
|
|
325
|
+
} | undefined;
|
|
326
|
+
directives: string[];
|
|
327
|
+
formatter?: string | undefined;
|
|
328
|
+
label?: string | undefined;
|
|
329
|
+
id?: string | undefined;
|
|
330
|
+
type: FieldTypeEnum;
|
|
331
|
+
};
|
|
332
|
+
listString: (opts?: FieldOpts) => {
|
|
333
|
+
dynamicFieldConfig?: {
|
|
334
|
+
ofType: string;
|
|
335
|
+
id: string;
|
|
336
|
+
isLocalizedString?: boolean | undefined;
|
|
337
|
+
locales?: string[] | undefined;
|
|
338
|
+
} | {
|
|
339
|
+
code: string;
|
|
340
|
+
isLocalizedString?: boolean | undefined;
|
|
341
|
+
locales?: string[] | undefined;
|
|
342
|
+
} | undefined;
|
|
343
|
+
directives: string[];
|
|
344
|
+
formatter?: string | undefined;
|
|
345
|
+
label?: string | undefined;
|
|
346
|
+
id?: string | undefined;
|
|
347
|
+
type: FieldTypeEnum;
|
|
348
|
+
};
|
|
349
|
+
email: (opts?: FieldOpts) => {
|
|
350
|
+
dynamicFieldConfig?: {
|
|
351
|
+
ofType: string;
|
|
352
|
+
id: string;
|
|
353
|
+
isLocalizedString?: boolean | undefined;
|
|
354
|
+
locales?: string[] | undefined;
|
|
355
|
+
} | {
|
|
356
|
+
code: string;
|
|
357
|
+
isLocalizedString?: boolean | undefined;
|
|
358
|
+
locales?: string[] | undefined;
|
|
359
|
+
} | undefined;
|
|
360
|
+
directives: string[];
|
|
361
|
+
formatter?: string | undefined;
|
|
362
|
+
label?: string | undefined;
|
|
363
|
+
id?: string | undefined;
|
|
364
|
+
type: FieldTypeEnum;
|
|
365
|
+
};
|
|
366
|
+
ipAddress: (opts?: FieldOpts) => {
|
|
367
|
+
dynamicFieldConfig?: {
|
|
368
|
+
ofType: string;
|
|
369
|
+
id: string;
|
|
370
|
+
isLocalizedString?: boolean | undefined;
|
|
371
|
+
locales?: string[] | undefined;
|
|
372
|
+
} | {
|
|
373
|
+
code: string;
|
|
374
|
+
isLocalizedString?: boolean | undefined;
|
|
375
|
+
locales?: string[] | undefined;
|
|
376
|
+
} | undefined;
|
|
377
|
+
directives: string[];
|
|
378
|
+
formatter?: string | undefined;
|
|
379
|
+
label?: string | undefined;
|
|
380
|
+
id?: string | undefined;
|
|
381
|
+
type: FieldTypeEnum;
|
|
382
|
+
};
|
|
383
|
+
json: (opts?: FieldOpts) => {
|
|
384
|
+
dynamicFieldConfig?: {
|
|
385
|
+
ofType: string;
|
|
386
|
+
id: string;
|
|
387
|
+
isLocalizedString?: boolean | undefined;
|
|
388
|
+
locales?: string[] | undefined;
|
|
389
|
+
} | {
|
|
390
|
+
code: string;
|
|
391
|
+
isLocalizedString?: boolean | undefined;
|
|
392
|
+
locales?: string[] | undefined;
|
|
393
|
+
} | undefined;
|
|
394
|
+
directives: string[];
|
|
395
|
+
formatter?: string | undefined;
|
|
396
|
+
label?: string | undefined;
|
|
397
|
+
id?: string | undefined;
|
|
398
|
+
type: FieldTypeEnum;
|
|
399
|
+
};
|
|
400
|
+
url: (opts?: FieldOpts) => {
|
|
401
|
+
dynamicFieldConfig?: {
|
|
402
|
+
ofType: string;
|
|
403
|
+
id: string;
|
|
404
|
+
isLocalizedString?: boolean | undefined;
|
|
405
|
+
locales?: string[] | undefined;
|
|
406
|
+
} | {
|
|
407
|
+
code: string;
|
|
408
|
+
isLocalizedString?: boolean | undefined;
|
|
409
|
+
locales?: string[] | undefined;
|
|
410
|
+
} | undefined;
|
|
411
|
+
directives: string[];
|
|
412
|
+
formatter?: string | undefined;
|
|
413
|
+
label?: string | undefined;
|
|
414
|
+
id?: string | undefined;
|
|
415
|
+
type: FieldTypeEnum;
|
|
416
|
+
};
|
|
417
|
+
date: (opts?: FieldOpts) => {
|
|
418
|
+
dynamicFieldConfig?: {
|
|
419
|
+
ofType: string;
|
|
420
|
+
id: string;
|
|
421
|
+
isLocalizedString?: boolean | undefined;
|
|
422
|
+
locales?: string[] | undefined;
|
|
423
|
+
} | {
|
|
424
|
+
code: string;
|
|
425
|
+
isLocalizedString?: boolean | undefined;
|
|
426
|
+
locales?: string[] | undefined;
|
|
427
|
+
} | undefined;
|
|
428
|
+
directives: string[];
|
|
429
|
+
formatter?: string | undefined;
|
|
430
|
+
label?: string | undefined;
|
|
431
|
+
id?: string | undefined;
|
|
432
|
+
type: FieldTypeEnum;
|
|
433
|
+
};
|
|
434
|
+
dateTime: (opts?: FieldOpts) => {
|
|
435
|
+
dynamicFieldConfig?: {
|
|
436
|
+
ofType: string;
|
|
437
|
+
id: string;
|
|
438
|
+
isLocalizedString?: boolean | undefined;
|
|
439
|
+
locales?: string[] | undefined;
|
|
440
|
+
} | {
|
|
441
|
+
code: string;
|
|
442
|
+
isLocalizedString?: boolean | undefined;
|
|
443
|
+
locales?: string[] | undefined;
|
|
444
|
+
} | undefined;
|
|
445
|
+
directives: string[];
|
|
446
|
+
formatter?: string | undefined;
|
|
447
|
+
label?: string | undefined;
|
|
448
|
+
id?: string | undefined;
|
|
449
|
+
type: FieldTypeEnum;
|
|
450
|
+
};
|
|
451
|
+
time: (opts?: FieldOpts) => {
|
|
452
|
+
dynamicFieldConfig?: {
|
|
453
|
+
ofType: string;
|
|
454
|
+
id: string;
|
|
455
|
+
isLocalizedString?: boolean | undefined;
|
|
456
|
+
locales?: string[] | undefined;
|
|
457
|
+
} | {
|
|
458
|
+
code: string;
|
|
459
|
+
isLocalizedString?: boolean | undefined;
|
|
460
|
+
locales?: string[] | undefined;
|
|
461
|
+
} | undefined;
|
|
462
|
+
directives: string[];
|
|
463
|
+
formatter?: string | undefined;
|
|
464
|
+
label?: string | undefined;
|
|
465
|
+
id?: string | undefined;
|
|
466
|
+
type: FieldTypeEnum;
|
|
467
|
+
};
|
|
468
|
+
timestamp: (opts?: FieldOpts) => {
|
|
469
|
+
dynamicFieldConfig?: {
|
|
470
|
+
ofType: string;
|
|
471
|
+
id: string;
|
|
472
|
+
isLocalizedString?: boolean | undefined;
|
|
473
|
+
locales?: string[] | undefined;
|
|
474
|
+
} | {
|
|
475
|
+
code: string;
|
|
476
|
+
isLocalizedString?: boolean | undefined;
|
|
477
|
+
locales?: string[] | undefined;
|
|
478
|
+
} | undefined;
|
|
479
|
+
directives: string[];
|
|
480
|
+
formatter?: string | undefined;
|
|
481
|
+
label?: string | undefined;
|
|
482
|
+
id?: string | undefined;
|
|
483
|
+
type: FieldTypeEnum;
|
|
484
|
+
};
|
|
485
|
+
/** Create a field from a custom enum type */
|
|
486
|
+
enum: (e: IEnumTypeDeclaration, opts?: FieldOpts) => Partial<Omit<IFieldDeclaration, "name">> & {
|
|
487
|
+
type: string;
|
|
488
|
+
};
|
|
489
|
+
dynamicField: (opts?: FieldOpts) => {
|
|
490
|
+
dynamicFieldConfig?: {
|
|
491
|
+
ofType: string;
|
|
492
|
+
id: string;
|
|
493
|
+
isLocalizedString?: boolean | undefined;
|
|
494
|
+
locales?: string[] | undefined;
|
|
495
|
+
} | {
|
|
496
|
+
code: string;
|
|
497
|
+
isLocalizedString?: boolean | undefined;
|
|
498
|
+
locales?: string[] | undefined;
|
|
499
|
+
} | undefined;
|
|
500
|
+
directives: string[];
|
|
501
|
+
formatter?: string | undefined;
|
|
502
|
+
label?: string | undefined;
|
|
503
|
+
id?: string | undefined;
|
|
504
|
+
type: FieldTypeEnum;
|
|
505
|
+
};
|
|
506
|
+
/**
|
|
507
|
+
* Localized string field. Generates a dynamic field that resolves a value
|
|
508
|
+
* from the EntityLocalization table for the current `$$args.lang`. The macro
|
|
509
|
+
* code is filled in by `table()` once the parent table id and field name
|
|
510
|
+
* are known.
|
|
511
|
+
*/
|
|
512
|
+
localizedString: (opts?: LocalizedStringFieldOpts) => {
|
|
513
|
+
directives: string[];
|
|
514
|
+
dynamicFieldConfig: {
|
|
515
|
+
code: string;
|
|
516
|
+
isLocalizedString: boolean;
|
|
517
|
+
locales: string[];
|
|
518
|
+
};
|
|
519
|
+
formatter?: string | undefined;
|
|
520
|
+
label?: string | undefined;
|
|
521
|
+
id?: string | undefined;
|
|
522
|
+
type: FieldTypeEnum;
|
|
523
|
+
};
|
|
524
|
+
};
|
|
525
|
+
/**
|
|
526
|
+
* Search config accepted by `table()`.
|
|
527
|
+
*
|
|
528
|
+
* - Reference variant points the table at another table that owns the
|
|
529
|
+
* indexed records.
|
|
530
|
+
* - Source variant defines the full-text-search settings inline.
|
|
531
|
+
*/
|
|
532
|
+
export type TableSearchConfig = {
|
|
533
|
+
recordId: string;
|
|
534
|
+
table: IObjectTypeDeclaration;
|
|
535
|
+
} | {
|
|
536
|
+
fullTextSearch: {
|
|
537
|
+
mappingOverride: Record<string, unknown>;
|
|
538
|
+
codeNormalize: string;
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
/**
|
|
542
|
+
* Options for object type (table) creation.
|
|
543
|
+
*/
|
|
544
|
+
export interface TableOpts {
|
|
545
|
+
id?: string;
|
|
546
|
+
firstParent?: IObjectTypeDeclaration;
|
|
547
|
+
secondParent?: IObjectTypeDeclaration;
|
|
548
|
+
directives?: string[];
|
|
549
|
+
publishingTypes?: PublishingTypeEnum[];
|
|
550
|
+
searchConfig?: TableSearchConfig;
|
|
551
|
+
defaultFieldIds?: {
|
|
552
|
+
id?: string;
|
|
553
|
+
createdAt?: string;
|
|
554
|
+
updatedAt?: string;
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* Internal table definition type preserving field definitions.
|
|
559
|
+
*/
|
|
560
|
+
export interface TableDef<Name extends string, F extends Record<string, FieldBuilder>> extends IObjectTypeDeclaration {
|
|
561
|
+
name: Name;
|
|
562
|
+
__fields: F;
|
|
563
|
+
}
|
|
564
|
+
declare function table(name: string, fieldsDef: Record<string, FieldBuilder>, opts?: TableOpts): IObjectTypeDeclaration;
|
|
565
|
+
declare function build(schema: {
|
|
566
|
+
enums: IEnumTypeDeclaration[];
|
|
567
|
+
types: IObjectTypeDeclaration[];
|
|
568
|
+
products?: string[];
|
|
569
|
+
}): {
|
|
570
|
+
enums: IEnumTypeDeclaration[];
|
|
571
|
+
types: IObjectTypeDeclaration[];
|
|
572
|
+
products?: string[];
|
|
573
|
+
};
|
|
574
|
+
declare enum SubscribedProductEnum {
|
|
575
|
+
STREAM = "STREAM",
|
|
576
|
+
BATCH = "BATCH",
|
|
577
|
+
FILES = "FILES",
|
|
578
|
+
SUBSCRIPTIONS = "SUBSCRIPTIONS",
|
|
579
|
+
DEDICATED_IP = "DEDICATED_IP"
|
|
580
|
+
}
|
|
581
|
+
declare enum ProductNameEnum {
|
|
582
|
+
dedicated_ip_address = "dedicated_ip_address",
|
|
583
|
+
mvp_bundle = "mvp_bundle",
|
|
584
|
+
mvp_cognito = "mvp_cognito_auth",
|
|
585
|
+
mvp_data_storage = "mvp_data_storage",
|
|
586
|
+
mvp_data_transfer = "mvp_data_transfer",
|
|
587
|
+
mvp_file_upload = "mvp_file_upload",
|
|
588
|
+
mvp_graphql = "mvp_graphql",
|
|
589
|
+
mvp_graphql_subscription = "mvp_graphql_subscription",
|
|
590
|
+
mvp_oidc_auth = "mvp_oidc_auth",
|
|
591
|
+
mvp_service = "mvp_service",
|
|
592
|
+
mvp_stream = "mvp_stream",
|
|
593
|
+
mvp_support = "mvp_support",
|
|
594
|
+
scaleup_bundle = "scaleup_bundle",
|
|
595
|
+
scaleup_cognito = "scaleup_cognito_auth",
|
|
596
|
+
scaleup_data_storage = "scaleup_data_storage",
|
|
597
|
+
scaleup_data_transfer = "scaleup_data_transfer",
|
|
598
|
+
scaleup_file_upload = "scaleup_file_upload",
|
|
599
|
+
scaleup_graphql = "scaleup_graphql",
|
|
600
|
+
scaleup_graphql_subscription = "scaleup_graphql_subscription",
|
|
601
|
+
scaleup_oidc_auth = "scaleup_oidc_auth",
|
|
602
|
+
scaleup_service = "scaleup_service",
|
|
603
|
+
scaleup_stream = "scaleup_stream",
|
|
604
|
+
scaleup_support = "scaleup_support",
|
|
605
|
+
startup_bundle = "startup_bundle",
|
|
606
|
+
startup_cognito = "startup_cognito_auth",
|
|
607
|
+
startup_data_storage = "startup_data_storage",
|
|
608
|
+
startup_data_transfer = "startup_data_transfer",
|
|
609
|
+
startup_file_upload = "startup_file_upload",
|
|
610
|
+
startup_graphql = "startup_graphql",
|
|
611
|
+
startup_graphql_subscription = "startup_graphql_subscription",
|
|
612
|
+
startup_oidc_auth = "startup_oidc_auth",
|
|
613
|
+
startup_service = "startup_service",
|
|
614
|
+
startup_stream = "startup_stream",
|
|
615
|
+
startup_support = "startup_support",
|
|
616
|
+
seed_bundle = "seed_bundle",
|
|
617
|
+
seed_cognito_auth = "seed_cognito_auth",
|
|
618
|
+
seed_data_storage = "seed_data_storage",
|
|
619
|
+
seed_data_transfer = "seed_data_transfer",
|
|
620
|
+
seed_file_upload = "seed_file_upload",
|
|
621
|
+
seed_graphql = "seed_graphql",
|
|
622
|
+
seed_graphql_subscription = "seed_graphql_subscription",
|
|
623
|
+
seed_oidc_auth = "seed_oidc_auth",
|
|
624
|
+
seed_stream = "seed_stream",
|
|
625
|
+
scale_bundle = "scale_bundle",
|
|
626
|
+
scale_cognito_auth = "scale_cognito_auth",
|
|
627
|
+
scale_data_storage = "scale_data_storage",
|
|
628
|
+
scale_data_transfer = "scale_data_transfer",
|
|
629
|
+
scale_file_upload = "scale_file_upload",
|
|
630
|
+
scale_graphql = "scale_graphql",
|
|
631
|
+
scale_graphql_subscription = "scale_graphql_subscription",
|
|
632
|
+
scale_oidc_auth = "scale_oidc_auth",
|
|
633
|
+
scale_stream = "scale_stream",
|
|
634
|
+
launch_bundle = "launch_bundle",
|
|
635
|
+
launch_cognito_auth = "launch_cognito_auth",
|
|
636
|
+
launch_data_storage = "launch_data_storage",
|
|
637
|
+
launch_data_transfer = "launch_data_transfer",
|
|
638
|
+
launch_file_upload = "launch_file_upload",
|
|
639
|
+
launch_graphql = "launch_graphql",
|
|
640
|
+
launch_graphql_subscription = "launch_graphql_subscription",
|
|
641
|
+
launch_oidc_auth = "launch_oidc_auth",
|
|
642
|
+
launch_stream = "launch_stream",
|
|
643
|
+
starter_bundle = "starter_bundle",
|
|
644
|
+
starter_app_users = "starter_app_users",
|
|
645
|
+
starter_data_entries = "starter_data_entries",
|
|
646
|
+
starter_data_storage = "starter_data_storage",
|
|
647
|
+
starter_data_transfer = "starter_data_transfer",
|
|
648
|
+
starter_graphql = "starter_graphql",
|
|
649
|
+
pro_bundle = "pro_bundle",
|
|
650
|
+
pro_app_users = "pro_app_users",
|
|
651
|
+
pro_data_entries = "pro_data_entries",
|
|
652
|
+
pro_data_storage = "pro_data_storage",
|
|
653
|
+
pro_data_transfer = "pro_data_transfer",
|
|
654
|
+
pro_graphql = "pro_graphql",
|
|
655
|
+
enterprise_bundle = "enterprise_bundle",
|
|
656
|
+
enterprise_app_users = "enterprise_app_users",
|
|
657
|
+
enterprise_data_entries = "enterprise_data_entries",
|
|
658
|
+
enterprise_data_storage = "enterprise_data_storage",
|
|
659
|
+
enterprise_data_transfer = "enterprise_data_transfer",
|
|
660
|
+
enterprise_graphql = "enterprise_graphql"
|
|
661
|
+
}
|
|
662
|
+
export declare const dataSchemaDeclarationSchema: z.ZodObject<{
|
|
663
|
+
enums: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
664
|
+
name: z.ZodString;
|
|
665
|
+
values: z.ZodArray<z.ZodString>;
|
|
666
|
+
}, z.core.$strip>>>;
|
|
667
|
+
types: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
668
|
+
id: z.ZodString;
|
|
669
|
+
name: z.ZodString;
|
|
670
|
+
targets: z.ZodArray<z.ZodString>;
|
|
671
|
+
parents: z.ZodObject<{
|
|
672
|
+
first: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
673
|
+
second: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
674
|
+
}, z.core.$strip>;
|
|
675
|
+
fields: z.ZodArray<z.ZodObject<{
|
|
676
|
+
id: z.ZodOptional<z.ZodString>;
|
|
677
|
+
name: z.ZodString;
|
|
678
|
+
label: z.ZodOptional<z.ZodString>;
|
|
679
|
+
formatter: z.ZodOptional<z.ZodString>;
|
|
680
|
+
type: z.ZodUnion<readonly [
|
|
681
|
+
z.ZodEnum<typeof FieldTypeEnum>,
|
|
682
|
+
z.ZodString
|
|
683
|
+
]>;
|
|
684
|
+
directives: z.ZodArray<z.ZodString>;
|
|
685
|
+
dynamicFieldConfig: z.ZodOptional<z.ZodUnion<readonly [
|
|
686
|
+
z.ZodObject<{
|
|
687
|
+
isLocalizedString: z.ZodOptional<z.ZodBoolean>;
|
|
688
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
689
|
+
code: z.ZodString;
|
|
690
|
+
}, z.core.$strip>,
|
|
691
|
+
z.ZodObject<{
|
|
692
|
+
isLocalizedString: z.ZodOptional<z.ZodBoolean>;
|
|
693
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
694
|
+
ofType: z.ZodString;
|
|
695
|
+
id: z.ZodString;
|
|
696
|
+
}, z.core.$strip>
|
|
697
|
+
]>>;
|
|
698
|
+
}, z.core.$strip>>;
|
|
699
|
+
directives: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
700
|
+
resolvers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
701
|
+
name: z.ZodString;
|
|
702
|
+
archive: z.ZodString;
|
|
703
|
+
archiveType: z.ZodEnum<typeof ArchiveTypeEnum>;
|
|
704
|
+
handler: z.ZodString;
|
|
705
|
+
types: z.ZodArray<z.ZodUnion<readonly [
|
|
706
|
+
z.ZodEnum<typeof QueryTypeEnum>,
|
|
707
|
+
z.ZodEnum<typeof MutationTypeEnum>
|
|
708
|
+
]>>;
|
|
709
|
+
step: z.ZodEnum<typeof PipelineStepEnum>;
|
|
710
|
+
actions: z.ZodArray<z.ZodString>;
|
|
711
|
+
runtime: z.ZodOptional<z.ZodEnum<typeof RuntimeEnum>>;
|
|
712
|
+
}, z.core.$strip>>>;
|
|
713
|
+
publishingTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof PublishingTypeEnum>>>;
|
|
714
|
+
searchConfig: z.ZodOptional<z.ZodUnion<readonly [
|
|
715
|
+
z.ZodObject<{
|
|
716
|
+
isLocalizedString: z.ZodOptional<z.ZodBoolean>;
|
|
717
|
+
locales: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
718
|
+
ofType: z.ZodString;
|
|
719
|
+
id: z.ZodString;
|
|
720
|
+
}, z.core.$strip>,
|
|
721
|
+
z.ZodObject<{
|
|
722
|
+
fullTextSearch: z.ZodObject<{
|
|
723
|
+
mappingOverride: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
724
|
+
codeNormalize: z.ZodString;
|
|
725
|
+
}, z.core.$strip>;
|
|
726
|
+
}, z.core.$strip>
|
|
727
|
+
]>>;
|
|
728
|
+
}, z.core.$strip>>>;
|
|
729
|
+
products: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [
|
|
730
|
+
z.ZodEnum<typeof ProductNameEnum>,
|
|
731
|
+
z.ZodEnum<typeof SubscribedProductEnum>,
|
|
732
|
+
z.ZodString
|
|
733
|
+
]>>>;
|
|
734
|
+
}, z.core.$strip>;
|
|
735
|
+
declare function entityLocalizationCode(ofType: string, fieldName: string, defaultLocale?: string): string;
|
|
736
|
+
declare function pageLocalizedConfigCode(): string;
|
|
737
|
+
declare function blockTypeCopiesCode(): string;
|
|
738
|
+
declare function blockConfigCode(blockTypeTableId: string): string;
|
|
739
|
+
declare function blockNameCode(blockTypeTableId: string): string;
|
|
740
|
+
declare function blockDynamicDataCode(blockTypeTableId: string): string;
|
|
741
|
+
/** A JSON-serializable localization value. */
|
|
742
|
+
export type LocalizationValue = string | number | boolean | null | LocalizationValue[] | {
|
|
743
|
+
[key: string]: LocalizationValue;
|
|
744
|
+
};
|
|
745
|
+
/** A dictionary of localization key-value pairs. Values may be strings or structured data (arrays, objects). */
|
|
746
|
+
export type LocalizationDictionary = Record<string, LocalizationValue>;
|
|
747
|
+
/**
|
|
748
|
+
* Localization dictionaries keyed by language code (e.g. `{ en: {...}, fr: {...} }`).
|
|
749
|
+
* Each entry is materialized into a `{lang}_blocktype_{id}` (or `{lang}_block_{id}`)
|
|
750
|
+
* CMS Localization record by the workspace push pipeline.
|
|
751
|
+
*/
|
|
752
|
+
export type ILocalizationsByLocale = Record<string, LocalizationDictionary>;
|
|
753
|
+
export type II18nSettings = {
|
|
754
|
+
locales: string[];
|
|
755
|
+
default: string;
|
|
756
|
+
};
|
|
757
|
+
export type IAppSlugConfig = {
|
|
758
|
+
[ofType: string]: {
|
|
759
|
+
pattern: string;
|
|
760
|
+
};
|
|
761
|
+
};
|
|
762
|
+
export type SemVer = `${number}.${number}.${number}`;
|
|
763
|
+
export interface IDependencyInfo {
|
|
764
|
+
version: SemVer;
|
|
765
|
+
url: string;
|
|
766
|
+
}
|
|
767
|
+
export type IDependenciesMap = Record<string, IDependencyInfo>;
|
|
768
|
+
export interface IBlockTypeOptions {
|
|
769
|
+
id?: string;
|
|
770
|
+
name: string;
|
|
771
|
+
/** JavaScript code for the default config dynamic field. */
|
|
772
|
+
defaultConfig?: string;
|
|
773
|
+
/** JavaScript code for the default dynamic data field. */
|
|
774
|
+
defaultDynamicData?: string;
|
|
775
|
+
sourceCodeUrl?: string;
|
|
776
|
+
compiledCodeUrl?: string;
|
|
777
|
+
dependencies?: IDependenciesMap;
|
|
778
|
+
/** Localization dictionaries keyed by language code. */
|
|
779
|
+
localizations?: ILocalizationsByLocale;
|
|
780
|
+
}
|
|
781
|
+
export interface IBlockTypeDefinition {
|
|
782
|
+
id?: string;
|
|
783
|
+
name: string;
|
|
784
|
+
defaultConfig?: string;
|
|
785
|
+
defaultDynamicData?: string;
|
|
786
|
+
sourceCodeUrl?: string;
|
|
787
|
+
compiledCodeUrl?: string;
|
|
788
|
+
dependencies?: IDependenciesMap;
|
|
789
|
+
localizations?: ILocalizationsByLocale;
|
|
790
|
+
}
|
|
791
|
+
export interface IBlockTypeOutput {
|
|
792
|
+
id?: string;
|
|
793
|
+
name: string;
|
|
794
|
+
defaultConfig?: string;
|
|
795
|
+
defaultDynamicData?: string;
|
|
796
|
+
sourceCodeUrl?: string;
|
|
797
|
+
compiledCodeUrl?: string;
|
|
798
|
+
dependencies?: IDependenciesMap;
|
|
799
|
+
localizations?: ILocalizationsByLocale;
|
|
800
|
+
}
|
|
801
|
+
declare function blockType(opts: IBlockTypeOptions): IBlockTypeDefinition;
|
|
802
|
+
export interface BuildBlockTypesOptions {
|
|
803
|
+
/**
|
|
804
|
+
* Locale used to resolve the fallback `copies` dictionary at runtime.
|
|
805
|
+
* Defaults to {@link DEFAULT_FALLBACK_LOCALE}.
|
|
806
|
+
*/
|
|
807
|
+
fallbackLocale?: string;
|
|
808
|
+
}
|
|
809
|
+
declare function buildBlockTypes(blockTypes: IBlockTypeDefinition[], opts?: BuildBlockTypesOptions): IBlockTypeOutput[];
|
|
810
|
+
export interface IBlockOptions {
|
|
811
|
+
id?: string;
|
|
812
|
+
type: IBlockTypeDefinition;
|
|
813
|
+
/** Explicit position override (e.g. "010", "020/010"). Auto-computed when omitted. */
|
|
814
|
+
position?: string;
|
|
815
|
+
config?: string;
|
|
816
|
+
dynamicData?: string;
|
|
817
|
+
/**
|
|
818
|
+
* Optional per-locale localization overrides. Each entry is materialized into
|
|
819
|
+
* a `{lang}_block_{id}` CMS Localization record and overrides the matching
|
|
820
|
+
* key from the block type's `localizations` dictionary at runtime. Most
|
|
821
|
+
* blocks inherit copies from their type and leave this field unset.
|
|
822
|
+
*/
|
|
823
|
+
localizations?: ILocalizationsByLocale;
|
|
824
|
+
/** Nested child blocks. */
|
|
825
|
+
blocks?: IBlockDefinition[];
|
|
826
|
+
}
|
|
827
|
+
export interface IBlockDefinition {
|
|
828
|
+
id?: string;
|
|
829
|
+
type: IBlockTypeDefinition;
|
|
830
|
+
position?: string;
|
|
831
|
+
config?: string;
|
|
832
|
+
dynamicData?: string;
|
|
833
|
+
localizations?: ILocalizationsByLocale;
|
|
834
|
+
blocks: IBlockDefinition[];
|
|
835
|
+
}
|
|
836
|
+
export interface IBlockOutput {
|
|
837
|
+
id?: string;
|
|
838
|
+
buildingBlockTypeId?: string;
|
|
839
|
+
blockTypeName?: string;
|
|
840
|
+
position: string;
|
|
841
|
+
config?: string;
|
|
842
|
+
dynamicData?: string;
|
|
843
|
+
localizations?: ILocalizationsByLocale;
|
|
844
|
+
}
|
|
845
|
+
declare function block(opts: IBlockOptions): IBlockDefinition;
|
|
846
|
+
/**
|
|
847
|
+
* Flatten a block tree into output records, auto-computing positions
|
|
848
|
+
* based on order and nesting depth.
|
|
849
|
+
*
|
|
850
|
+
* Position format: 3-digit segments separated by `/`.
|
|
851
|
+
* - Top-level: "010", "020", "030"
|
|
852
|
+
* - Nested: "010/010", "010/020"
|
|
853
|
+
*
|
|
854
|
+
* Explicit `position` on a block overrides auto-computation for that block
|
|
855
|
+
* (but children still auto-compute relative to the parent's position).
|
|
856
|
+
*/
|
|
857
|
+
export interface FlattenBlocksOptions {
|
|
858
|
+
/** Computed parent position used to derive nested positions. */
|
|
859
|
+
parentPosition?: string;
|
|
860
|
+
/**
|
|
861
|
+
* Locale used to resolve the fallback `copies` dictionary at runtime.
|
|
862
|
+
* Defaults to {@link DEFAULT_FALLBACK_LOCALE}.
|
|
863
|
+
*/
|
|
864
|
+
fallbackLocale?: string;
|
|
865
|
+
}
|
|
866
|
+
declare function flattenBlocks(blocks: IBlockDefinition[], opts?: FlattenBlocksOptions): IBlockOutput[];
|
|
867
|
+
export interface IPageParamConfig {
|
|
868
|
+
collection: IObjectTypeDeclaration;
|
|
869
|
+
slugField?: string;
|
|
870
|
+
}
|
|
871
|
+
export interface IPageOptions {
|
|
872
|
+
id?: string;
|
|
873
|
+
name: string;
|
|
874
|
+
slug?: string | Record<string, string>;
|
|
875
|
+
parent?: IPageDefinition;
|
|
876
|
+
/** Config for this page's dynamic segment. Only valid when slug is `[paramName]`. */
|
|
877
|
+
param?: IPageParamConfig;
|
|
878
|
+
/** Default English localization dictionary for this page. */
|
|
879
|
+
defaultLocalization?: LocalizationDictionary;
|
|
880
|
+
/** Localized config (e.g. canonicalPath, notFound). Preserved through pull/push. */
|
|
881
|
+
localizedConfig?: string;
|
|
882
|
+
/** Building block instances on this page. */
|
|
883
|
+
blocks?: IBlockDefinition[];
|
|
884
|
+
}
|
|
885
|
+
export interface IPageDefinition {
|
|
886
|
+
id?: string;
|
|
887
|
+
name: string;
|
|
888
|
+
slug?: string | Record<string, string>;
|
|
889
|
+
parent?: IPageDefinition;
|
|
890
|
+
params: Record<string, IPageParamConfig>;
|
|
891
|
+
defaultLocalization?: LocalizationDictionary;
|
|
892
|
+
localizedConfig?: string;
|
|
893
|
+
blocks: IBlockDefinition[];
|
|
894
|
+
}
|
|
895
|
+
export interface IPageSlugConfig {
|
|
896
|
+
paramsCollectionMap: Record<string, string | {
|
|
897
|
+
ofType: string;
|
|
898
|
+
slugField?: string;
|
|
899
|
+
}>;
|
|
900
|
+
[locale: string]: {
|
|
901
|
+
slug: string;
|
|
902
|
+
} | Record<string, string | {
|
|
903
|
+
ofType: string;
|
|
904
|
+
slugField?: string;
|
|
905
|
+
}>;
|
|
906
|
+
}
|
|
907
|
+
export interface IPageOutput {
|
|
908
|
+
id?: string;
|
|
909
|
+
name: string;
|
|
910
|
+
slugConfig: IPageSlugConfig;
|
|
911
|
+
defaultLocalization?: LocalizationDictionary;
|
|
912
|
+
localizedConfig?: string;
|
|
913
|
+
blocks: IBlockOutput[];
|
|
914
|
+
}
|
|
915
|
+
declare function page(opts: IPageOptions): IPageDefinition;
|
|
916
|
+
export interface BuildPagesOptions {
|
|
917
|
+
locale?: string;
|
|
918
|
+
locales?: string[];
|
|
919
|
+
/**
|
|
920
|
+
* Locale used to resolve the fallback `copies` dictionary at runtime for
|
|
921
|
+
* block-instance configs. Defaults to "en" (see DEFAULT_FALLBACK_LOCALE).
|
|
922
|
+
*/
|
|
923
|
+
fallbackLocale?: string;
|
|
924
|
+
}
|
|
925
|
+
declare function buildPages(pages: IPageDefinition[], opts?: BuildPagesOptions): IPageOutput[];
|
|
926
|
+
export interface IAppOptions {
|
|
927
|
+
name: string;
|
|
928
|
+
pages: IPageDefinition[];
|
|
929
|
+
blockTypes?: IBlockTypeDefinition[];
|
|
930
|
+
slugConfig?: IAppSlugConfig;
|
|
931
|
+
/** Internationalization settings persisted to `app.settings.i18n`. */
|
|
932
|
+
i18n?: II18nSettings;
|
|
933
|
+
/** @deprecated Use `i18n.locales` instead. */
|
|
934
|
+
locale?: string;
|
|
935
|
+
/** @deprecated Use `i18n.locales` instead. */
|
|
936
|
+
locales?: string[];
|
|
937
|
+
}
|
|
938
|
+
export interface IAppOutput {
|
|
939
|
+
name: string;
|
|
940
|
+
pages: IPageOutput[];
|
|
941
|
+
blockTypes: IBlockTypeOutput[];
|
|
942
|
+
slugConfig?: IAppSlugConfig;
|
|
943
|
+
i18n?: II18nSettings;
|
|
944
|
+
}
|
|
945
|
+
declare function buildApp(opts: IAppOptions): IAppOutput;
|
|
946
|
+
|
|
947
|
+
declare namespace appBuilder {
|
|
948
|
+
export { block, blockType, buildApp, buildBlockTypes, buildPages, flattenBlocks, page };
|
|
949
|
+
}
|
|
950
|
+
declare namespace dataBuilder {
|
|
951
|
+
export { TableDef, TableOpts, TableSearchConfig, build, enumType, fields, table };
|
|
952
|
+
}
|
|
953
|
+
declare namespace macros {
|
|
954
|
+
export { blockConfigCode, blockDynamicDataCode, blockNameCode, blockTypeCopiesCode, entityLocalizationCode, pageLocalizedConfigCode };
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
export {
|
|
958
|
+
appBuilder,
|
|
959
|
+
dataBuilder,
|
|
960
|
+
macros,
|
|
961
|
+
};
|
|
962
|
+
|
|
963
|
+
export {};
|