@turbofy-ai/app-runtime 0.0.4 → 0.0.6
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/dsl.d.ts +1149 -4
- package/dist/src/dsl.js +1641 -22
- package/dist/src/generated/auth-config.d.ts +5 -0
- package/dist/src/lib/auth.d.ts +21 -0
- package/package.json +1 -1
package/dist/src/dsl.d.ts
CHANGED
|
@@ -87,11 +87,15 @@ declare enum PipelineStepEnum {
|
|
|
87
87
|
}
|
|
88
88
|
declare enum RuntimeEnum {
|
|
89
89
|
NODEJS_22_X = "NODEJS_22_X",
|
|
90
|
+
NODEJS_24_X = "NODEJS_24_X",
|
|
90
91
|
NODEJS_18_X = "NODEJS_18_X",
|
|
92
|
+
PYTHON_3_12 = "PYTHON_3_12",
|
|
93
|
+
PYTHON_3_11 = "PYTHON_3_11",
|
|
91
94
|
PYTHON_3_10 = "PYTHON_3_10",
|
|
92
95
|
GO_1_X = "GO_1_X",
|
|
93
|
-
|
|
96
|
+
RUBY_3_3 = "RUBY_3_3",
|
|
94
97
|
RUBY_3_2 = "RUBY_3_2",
|
|
98
|
+
RUBY_2_7 = "RUBY_2_7",
|
|
95
99
|
DOCKER = "DOCKER"
|
|
96
100
|
}
|
|
97
101
|
declare const objectTypeDeclarationSchema: z.ZodObject<{
|
|
@@ -553,6 +557,16 @@ export interface TableOpts {
|
|
|
553
557
|
createdAt?: string;
|
|
554
558
|
updatedAt?: string;
|
|
555
559
|
};
|
|
560
|
+
/**
|
|
561
|
+
* Type overrides for the auto-generated default fields. Older schemas store
|
|
562
|
+
* e.g. `createdAt: DateTime` or `id: String`; decompiled sources carry the
|
|
563
|
+
* stored types here so the round trip is lossless.
|
|
564
|
+
*/
|
|
565
|
+
defaultFieldTypes?: {
|
|
566
|
+
id?: FieldTypeEnum | `${FieldTypeEnum}`;
|
|
567
|
+
createdAt?: FieldTypeEnum | `${FieldTypeEnum}`;
|
|
568
|
+
updatedAt?: FieldTypeEnum | `${FieldTypeEnum}`;
|
|
569
|
+
};
|
|
556
570
|
}
|
|
557
571
|
/**
|
|
558
572
|
* Internal table definition type preserving field definitions.
|
|
@@ -576,10 +590,14 @@ declare enum SubscribedProductEnum {
|
|
|
576
590
|
BATCH = "BATCH",
|
|
577
591
|
FILES = "FILES",
|
|
578
592
|
SUBSCRIPTIONS = "SUBSCRIPTIONS",
|
|
579
|
-
DEDICATED_IP = "DEDICATED_IP"
|
|
593
|
+
DEDICATED_IP = "DEDICATED_IP",
|
|
594
|
+
GRAPHQL_API = "GRAPHQL_API",
|
|
595
|
+
AUTH = "AUTH"
|
|
580
596
|
}
|
|
581
597
|
declare enum ProductNameEnum {
|
|
582
598
|
dedicated_ip_address = "dedicated_ip_address",
|
|
599
|
+
graphql_api = "graphql_api",
|
|
600
|
+
cognito_auth = "cognito_auth",
|
|
583
601
|
mvp_bundle = "mvp_bundle",
|
|
584
602
|
mvp_cognito = "mvp_cognito_auth",
|
|
585
603
|
mvp_data_storage = "mvp_data_storage",
|
|
@@ -750,6 +768,925 @@ export type LocalizationDictionary = Record<string, LocalizationValue>;
|
|
|
750
768
|
* CMS Localization record by the workspace push pipeline.
|
|
751
769
|
*/
|
|
752
770
|
export type ILocalizationsByLocale = Record<string, LocalizationDictionary>;
|
|
771
|
+
/**
|
|
772
|
+
* SEO metadata for a page, stored under the reserved `meta` key of the page's
|
|
773
|
+
* localization dictionary (`{lang}_page_{pageId}`) and rendered as `<meta>`
|
|
774
|
+
* tags by the publishing stack. String values may contain `{{key}}`
|
|
775
|
+
* placeholders that resolve against the page dictionary at render time. On
|
|
776
|
+
* dynamic pages, `{{paramName.fieldPath}}` placeholders resolve against the
|
|
777
|
+
* param's entity record (e.g. `"Turbofy - {{showcase.title}}"`).
|
|
778
|
+
*/
|
|
779
|
+
export interface IPageMetaDictionary {
|
|
780
|
+
title?: string;
|
|
781
|
+
description?: string;
|
|
782
|
+
keywords?: string;
|
|
783
|
+
robots?: string;
|
|
784
|
+
"og:title"?: string;
|
|
785
|
+
"og:description"?: string;
|
|
786
|
+
"og:image"?: string;
|
|
787
|
+
"og:type"?: string;
|
|
788
|
+
"og:url"?: string;
|
|
789
|
+
"twitter:card"?: string;
|
|
790
|
+
"twitter:site"?: string;
|
|
791
|
+
"twitter:creator"?: string;
|
|
792
|
+
"twitter:title"?: string;
|
|
793
|
+
"twitter:description"?: string;
|
|
794
|
+
"twitter:image"?: string;
|
|
795
|
+
"twitter:url"?: string;
|
|
796
|
+
[key: string]: LocalizationValue | undefined;
|
|
797
|
+
}
|
|
798
|
+
export interface IBatchCreateTypeParams {
|
|
799
|
+
ofType: string;
|
|
800
|
+
namespace: string;
|
|
801
|
+
input: {
|
|
802
|
+
id: string;
|
|
803
|
+
fields?: {
|
|
804
|
+
[k: string]: unknown;
|
|
805
|
+
};
|
|
806
|
+
directives?: string[];
|
|
807
|
+
connections?: {
|
|
808
|
+
first?: {
|
|
809
|
+
with: string;
|
|
810
|
+
link: string;
|
|
811
|
+
};
|
|
812
|
+
second?: {
|
|
813
|
+
with: string;
|
|
814
|
+
link: string;
|
|
815
|
+
};
|
|
816
|
+
};
|
|
817
|
+
}[];
|
|
818
|
+
dynamicArgs?: {
|
|
819
|
+
[k: string]: unknown;
|
|
820
|
+
};
|
|
821
|
+
}
|
|
822
|
+
export interface IBatchCreateTypeResult {
|
|
823
|
+
[k: string]: {
|
|
824
|
+
id: string;
|
|
825
|
+
createdAt: string;
|
|
826
|
+
updatedAt: string;
|
|
827
|
+
ofType: string;
|
|
828
|
+
fields: {
|
|
829
|
+
[k: string]: unknown;
|
|
830
|
+
};
|
|
831
|
+
namespace: string;
|
|
832
|
+
directives: string[];
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
export interface IBatchGetTypeParams {
|
|
836
|
+
ids: string[];
|
|
837
|
+
ofType: string;
|
|
838
|
+
namespace?: string;
|
|
839
|
+
dynamicArgs?: {
|
|
840
|
+
[k: string]: unknown;
|
|
841
|
+
};
|
|
842
|
+
}
|
|
843
|
+
export interface IBatchGetTypeResult {
|
|
844
|
+
[k: string]: {
|
|
845
|
+
id: string;
|
|
846
|
+
createdAt: string;
|
|
847
|
+
updatedAt: string;
|
|
848
|
+
ofType: string;
|
|
849
|
+
fields: {
|
|
850
|
+
[k: string]: unknown;
|
|
851
|
+
};
|
|
852
|
+
namespace: string;
|
|
853
|
+
directives: string[];
|
|
854
|
+
};
|
|
855
|
+
}
|
|
856
|
+
export interface ICreateTypeParams {
|
|
857
|
+
id?: string;
|
|
858
|
+
ofType: string;
|
|
859
|
+
fields?: {
|
|
860
|
+
[k: string]: unknown;
|
|
861
|
+
};
|
|
862
|
+
namespace?: string;
|
|
863
|
+
directives?: string[];
|
|
864
|
+
connections?: {
|
|
865
|
+
[k: string]: unknown;
|
|
866
|
+
};
|
|
867
|
+
dynamicArgs?: {
|
|
868
|
+
[k: string]: unknown;
|
|
869
|
+
};
|
|
870
|
+
}
|
|
871
|
+
export interface ICreateTypeResult {
|
|
872
|
+
id: string;
|
|
873
|
+
createdAt: string;
|
|
874
|
+
updatedAt: string;
|
|
875
|
+
ofType: string;
|
|
876
|
+
fields: {
|
|
877
|
+
[k: string]: unknown;
|
|
878
|
+
};
|
|
879
|
+
namespace: string;
|
|
880
|
+
directives: string[];
|
|
881
|
+
connections?: {
|
|
882
|
+
[k: string]: unknown;
|
|
883
|
+
};
|
|
884
|
+
}
|
|
885
|
+
export interface IDeleteTypeParams {
|
|
886
|
+
id: string;
|
|
887
|
+
ofType: string;
|
|
888
|
+
namespace?: string;
|
|
889
|
+
dynamicArgs?: {
|
|
890
|
+
[k: string]: unknown;
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
export interface IDeleteTypeResult {
|
|
894
|
+
id: string;
|
|
895
|
+
createdAt: string;
|
|
896
|
+
updatedAt: string;
|
|
897
|
+
fields: {
|
|
898
|
+
[k: string]: unknown;
|
|
899
|
+
};
|
|
900
|
+
}
|
|
901
|
+
export interface IElevenLabsTTSParams {
|
|
902
|
+
text: string;
|
|
903
|
+
model?: string;
|
|
904
|
+
stream?: boolean;
|
|
905
|
+
outputFormat?: string;
|
|
906
|
+
voiceId?: string;
|
|
907
|
+
apiKey?: string;
|
|
908
|
+
similarityBoost?: number;
|
|
909
|
+
stability?: number;
|
|
910
|
+
style?: number;
|
|
911
|
+
}
|
|
912
|
+
export type IElevenLabsTTSResult = {
|
|
913
|
+
type: "error";
|
|
914
|
+
value?: string;
|
|
915
|
+
} | {
|
|
916
|
+
type: "success";
|
|
917
|
+
url: string;
|
|
918
|
+
key: string;
|
|
919
|
+
mimeType: string;
|
|
920
|
+
durationSeconds: number;
|
|
921
|
+
characterStartTimes: {
|
|
922
|
+
c: string;
|
|
923
|
+
s: number;
|
|
924
|
+
}[];
|
|
925
|
+
} | {
|
|
926
|
+
type: "stream";
|
|
927
|
+
data: string;
|
|
928
|
+
characterStartTimes: {
|
|
929
|
+
c: string;
|
|
930
|
+
s: number;
|
|
931
|
+
}[];
|
|
932
|
+
index: number;
|
|
933
|
+
};
|
|
934
|
+
export interface IGoogleSearchParams {
|
|
935
|
+
searchTerms: string;
|
|
936
|
+
searchEngineId?: string;
|
|
937
|
+
lang?: "lang_ar" | "lang_bg" | "lang_ca" | "lang_cs" | "lang_da" | "lang_de" | "lang_el" | "lang_en" | "lang_es" | "lang_et" | "lang_fi" | "lang_fr" | "lang_hr" | "lang_hu" | "lang_id" | "lang_is" | "lang_it" | "lang_iw" | "lang_ja" | "lang_ko" | "lang_lt" | "lang_lv" | "lang_nl" | "lang_no" | "lang_pl" | "lang_pt" | "lang_ro" | "lang_ru" | "lang_sk" | "lang_sl" | "lang_sr" | "lang_sv" | "lang_tr" | "lang_zh-CN" | "lang_zh-TW";
|
|
938
|
+
apiKey?: string;
|
|
939
|
+
numOfResults?: number;
|
|
940
|
+
searchType?: "image";
|
|
941
|
+
siteSearch?: string;
|
|
942
|
+
siteSearchFilter?: "exclude" | "include";
|
|
943
|
+
dateRestrict?: string;
|
|
944
|
+
}
|
|
945
|
+
export type IGoogleSearchResult = {
|
|
946
|
+
title: string;
|
|
947
|
+
link: string;
|
|
948
|
+
snippet: string;
|
|
949
|
+
metatags?: {
|
|
950
|
+
[k: string]: string;
|
|
951
|
+
}[];
|
|
952
|
+
}[] | {
|
|
953
|
+
title?: string;
|
|
954
|
+
link?: string;
|
|
955
|
+
snippet?: string;
|
|
956
|
+
mime?: string;
|
|
957
|
+
image?: {
|
|
958
|
+
contextLink: string;
|
|
959
|
+
height?: number;
|
|
960
|
+
width?: number;
|
|
961
|
+
byteSize?: number;
|
|
962
|
+
thumbnailLink?: string;
|
|
963
|
+
thumbnailHeight?: number;
|
|
964
|
+
thumbnailWidth?: number;
|
|
965
|
+
};
|
|
966
|
+
}[];
|
|
967
|
+
export interface IHtmlToPdfParams {
|
|
968
|
+
htmlString: string;
|
|
969
|
+
outputFilename?: string;
|
|
970
|
+
format?: "letter" | "legal" | "tabloid" | "ledger" | "a0" | "a1" | "a2" | "a3" | "a4" | "a5" | "a6";
|
|
971
|
+
margin?: {
|
|
972
|
+
top?: string;
|
|
973
|
+
right?: string;
|
|
974
|
+
bottom?: string;
|
|
975
|
+
left?: string;
|
|
976
|
+
};
|
|
977
|
+
}
|
|
978
|
+
export type IHtmlToPdfResult = {
|
|
979
|
+
type: "error";
|
|
980
|
+
value?: string;
|
|
981
|
+
} | {
|
|
982
|
+
type: "success";
|
|
983
|
+
url: string;
|
|
984
|
+
key: string;
|
|
985
|
+
mimeType: string;
|
|
986
|
+
};
|
|
987
|
+
export type IHttpRequestParams = {
|
|
988
|
+
httpMethod: "GET" | "DELETE";
|
|
989
|
+
url: string;
|
|
990
|
+
parameters?: {
|
|
991
|
+
[k: string]: string;
|
|
992
|
+
};
|
|
993
|
+
headers?: {
|
|
994
|
+
[k: string]: string;
|
|
995
|
+
};
|
|
996
|
+
contentMediaType?: "application/json" | "text/plain" | "application/xml" | "application/x-www-form-urlencoded" | "multipart/form-data";
|
|
997
|
+
} | {
|
|
998
|
+
httpMethod: "POST" | "PUT" | "PATCH";
|
|
999
|
+
url: string;
|
|
1000
|
+
parameters?: {
|
|
1001
|
+
[k: string]: string;
|
|
1002
|
+
};
|
|
1003
|
+
headers?: {
|
|
1004
|
+
[k: string]: string;
|
|
1005
|
+
};
|
|
1006
|
+
contentMediaType?: "application/json" | "text/plain" | "application/xml" | "application/x-www-form-urlencoded" | "multipart/form-data";
|
|
1007
|
+
body: string;
|
|
1008
|
+
};
|
|
1009
|
+
export type IHttpRequestResult = {
|
|
1010
|
+
type: "success";
|
|
1011
|
+
status?: number;
|
|
1012
|
+
headers?: {
|
|
1013
|
+
[k: string]: string;
|
|
1014
|
+
};
|
|
1015
|
+
body?: string | {
|
|
1016
|
+
[k: string]: unknown;
|
|
1017
|
+
} | unknown[];
|
|
1018
|
+
statusText?: string;
|
|
1019
|
+
} | {
|
|
1020
|
+
type: "error";
|
|
1021
|
+
content: string;
|
|
1022
|
+
};
|
|
1023
|
+
export interface ILogicParams {
|
|
1024
|
+
[k: string]: unknown;
|
|
1025
|
+
}
|
|
1026
|
+
export interface ILogicResult {
|
|
1027
|
+
[k: string]: unknown;
|
|
1028
|
+
}
|
|
1029
|
+
export interface ILinkScraperParams {
|
|
1030
|
+
websiteUrl: string;
|
|
1031
|
+
selectors?: string;
|
|
1032
|
+
resultType?: "text" | "html";
|
|
1033
|
+
numOfResults?: number;
|
|
1034
|
+
}
|
|
1035
|
+
export interface ILinkScraperResult {
|
|
1036
|
+
[k: string]: string[];
|
|
1037
|
+
}
|
|
1038
|
+
export interface IListTypeByParentParams {
|
|
1039
|
+
ofType: string;
|
|
1040
|
+
parentType: string;
|
|
1041
|
+
limit?: number;
|
|
1042
|
+
nextToken?: string | null;
|
|
1043
|
+
parentId: string;
|
|
1044
|
+
parentKey: "SECOND" | "FIRST";
|
|
1045
|
+
sortOrder?: "ASC" | "DESC";
|
|
1046
|
+
namespace?: string;
|
|
1047
|
+
dynamicArgs?: {
|
|
1048
|
+
[k: string]: unknown;
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
export interface IListTypeByParentResult {
|
|
1052
|
+
nextToken: string | null;
|
|
1053
|
+
items: {
|
|
1054
|
+
id: string;
|
|
1055
|
+
createdAt: string;
|
|
1056
|
+
updatedAt: string;
|
|
1057
|
+
ofType: string;
|
|
1058
|
+
fields: {
|
|
1059
|
+
[k: string]: unknown;
|
|
1060
|
+
};
|
|
1061
|
+
namespace: string;
|
|
1062
|
+
directives: string[];
|
|
1063
|
+
}[];
|
|
1064
|
+
}
|
|
1065
|
+
export interface IListTypeParams {
|
|
1066
|
+
ofType: string;
|
|
1067
|
+
limit?: number;
|
|
1068
|
+
nextToken?: string;
|
|
1069
|
+
sortOrder?: "ASC" | "DESC";
|
|
1070
|
+
namespace?: string;
|
|
1071
|
+
dynamicArgs?: {
|
|
1072
|
+
[k: string]: unknown;
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
export interface IListTypeResult {
|
|
1076
|
+
nextToken: string | null;
|
|
1077
|
+
items: {
|
|
1078
|
+
id: string;
|
|
1079
|
+
createdAt: string;
|
|
1080
|
+
updatedAt: string;
|
|
1081
|
+
ofType: string;
|
|
1082
|
+
fields: {
|
|
1083
|
+
[k: string]: unknown;
|
|
1084
|
+
};
|
|
1085
|
+
namespace: string;
|
|
1086
|
+
directives: string[];
|
|
1087
|
+
}[];
|
|
1088
|
+
}
|
|
1089
|
+
export interface INotifyWebSocketParams {
|
|
1090
|
+
record?: {
|
|
1091
|
+
id?: string;
|
|
1092
|
+
ofType?: string;
|
|
1093
|
+
namespace?: string;
|
|
1094
|
+
connections?: {
|
|
1095
|
+
first?: {
|
|
1096
|
+
with: string;
|
|
1097
|
+
link: string;
|
|
1098
|
+
};
|
|
1099
|
+
second?: {
|
|
1100
|
+
with: string;
|
|
1101
|
+
link: string;
|
|
1102
|
+
};
|
|
1103
|
+
};
|
|
1104
|
+
};
|
|
1105
|
+
operation?: "INSERT" | "UPDATE" | "DELETE";
|
|
1106
|
+
}
|
|
1107
|
+
export interface INotifyWebSocketResult {
|
|
1108
|
+
[k: string]: unknown;
|
|
1109
|
+
}
|
|
1110
|
+
export type IOpenAIImageGenerationParams = {
|
|
1111
|
+
model: "dall-e-3";
|
|
1112
|
+
prompt: string;
|
|
1113
|
+
quality?: "standard" | "hd";
|
|
1114
|
+
size?: "1024x1024" | "1792x1024" | "1024x1792";
|
|
1115
|
+
style?: "vivid" | "natural";
|
|
1116
|
+
outputFilename?: string;
|
|
1117
|
+
apiKey?: string;
|
|
1118
|
+
} | {
|
|
1119
|
+
model: "dall-e-2";
|
|
1120
|
+
prompt: string;
|
|
1121
|
+
size?: "256x256" | "512x512" | "1024x1024";
|
|
1122
|
+
n?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
|
|
1123
|
+
outputFilename?: string;
|
|
1124
|
+
apiKey?: string;
|
|
1125
|
+
};
|
|
1126
|
+
export type IOpenAIImageGenerationResult = {
|
|
1127
|
+
type: "result";
|
|
1128
|
+
url: string;
|
|
1129
|
+
key: string;
|
|
1130
|
+
mimeType: string;
|
|
1131
|
+
} | {
|
|
1132
|
+
type: "error";
|
|
1133
|
+
value: string;
|
|
1134
|
+
};
|
|
1135
|
+
export interface ITypeParams {
|
|
1136
|
+
id: string;
|
|
1137
|
+
ofType: string;
|
|
1138
|
+
namespace?: string;
|
|
1139
|
+
dynamicArgs?: {
|
|
1140
|
+
[k: string]: unknown;
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1143
|
+
export interface ITypeResult {
|
|
1144
|
+
id: string;
|
|
1145
|
+
createdAt: string;
|
|
1146
|
+
updatedAt: string;
|
|
1147
|
+
ofType: string;
|
|
1148
|
+
fields: {
|
|
1149
|
+
[k: string]: unknown;
|
|
1150
|
+
};
|
|
1151
|
+
namespace: string;
|
|
1152
|
+
directives: string[];
|
|
1153
|
+
}
|
|
1154
|
+
export interface IUpdateTypeParams {
|
|
1155
|
+
id: string;
|
|
1156
|
+
ofType: string;
|
|
1157
|
+
fields?: {
|
|
1158
|
+
[k: string]: unknown;
|
|
1159
|
+
};
|
|
1160
|
+
connections?: {
|
|
1161
|
+
[k: string]: unknown;
|
|
1162
|
+
};
|
|
1163
|
+
namespace?: string;
|
|
1164
|
+
directives?: string[];
|
|
1165
|
+
dynamicArgs?: {
|
|
1166
|
+
[k: string]: unknown;
|
|
1167
|
+
};
|
|
1168
|
+
}
|
|
1169
|
+
export interface IUpdateTypeResult {
|
|
1170
|
+
id: string;
|
|
1171
|
+
createdAt: string;
|
|
1172
|
+
updatedAt: string;
|
|
1173
|
+
ofType: string;
|
|
1174
|
+
fields: {
|
|
1175
|
+
[k: string]: unknown;
|
|
1176
|
+
};
|
|
1177
|
+
namespace: string;
|
|
1178
|
+
}
|
|
1179
|
+
export interface IExtractImageMetadataParams {
|
|
1180
|
+
url?: string;
|
|
1181
|
+
}
|
|
1182
|
+
export interface IExtractImageMetadataResult {
|
|
1183
|
+
"Bits Per Sample"?: string;
|
|
1184
|
+
"Image Height": string;
|
|
1185
|
+
"Image Width": string;
|
|
1186
|
+
"Color Components": string;
|
|
1187
|
+
Subsampling?: string;
|
|
1188
|
+
"JFIF Version"?: string;
|
|
1189
|
+
"Resolution Unit"?: string;
|
|
1190
|
+
XResolution?: string;
|
|
1191
|
+
YResolution?: string;
|
|
1192
|
+
"JFIF Thumbnail Width"?: string;
|
|
1193
|
+
"JFIF Thumbnail Height"?: string;
|
|
1194
|
+
ImageDescription?: string;
|
|
1195
|
+
ResolutionUnit?: string;
|
|
1196
|
+
YCbCrPositioning?: string;
|
|
1197
|
+
"Exif IFD Pointer"?: number;
|
|
1198
|
+
XPTitle?: string;
|
|
1199
|
+
XPKeywords?: string;
|
|
1200
|
+
XPSubject?: string;
|
|
1201
|
+
ExifVersion?: string;
|
|
1202
|
+
ComponentsConfiguration?: string;
|
|
1203
|
+
UserComment?: string;
|
|
1204
|
+
FlashpixVersion?: string;
|
|
1205
|
+
ColorSpace?: string;
|
|
1206
|
+
"Model Version"?: string;
|
|
1207
|
+
"Coded Character Set"?: string;
|
|
1208
|
+
"Object Name"?: string;
|
|
1209
|
+
Keywords?: string[];
|
|
1210
|
+
"Country/Primary Location Name"?: string;
|
|
1211
|
+
Headline?: string;
|
|
1212
|
+
Credit?: string;
|
|
1213
|
+
Source?: string;
|
|
1214
|
+
"Caption/Abstract"?: string;
|
|
1215
|
+
"Record Version"?: string;
|
|
1216
|
+
about?: string;
|
|
1217
|
+
LastKeywordXMP?: string;
|
|
1218
|
+
description?: string;
|
|
1219
|
+
subject?: string;
|
|
1220
|
+
title?: string;
|
|
1221
|
+
creditLine?: string;
|
|
1222
|
+
BitsPerSample?: string;
|
|
1223
|
+
ImageLength?: string;
|
|
1224
|
+
ImageWidth?: string;
|
|
1225
|
+
YCbCrSubSampling?: string;
|
|
1226
|
+
FileType: string;
|
|
1227
|
+
}
|
|
1228
|
+
export interface ICloudFunctionParams {
|
|
1229
|
+
cloudFunctionUrl: string;
|
|
1230
|
+
[k: string]: unknown;
|
|
1231
|
+
}
|
|
1232
|
+
export type ICloudFunctionResult = {
|
|
1233
|
+
type: "success";
|
|
1234
|
+
status?: number;
|
|
1235
|
+
headers?: {
|
|
1236
|
+
[k: string]: string;
|
|
1237
|
+
};
|
|
1238
|
+
body?: string | {
|
|
1239
|
+
[k: string]: unknown;
|
|
1240
|
+
} | unknown[];
|
|
1241
|
+
statusText?: string;
|
|
1242
|
+
} | {
|
|
1243
|
+
type: "error";
|
|
1244
|
+
content: string;
|
|
1245
|
+
};
|
|
1246
|
+
export type IGenericAIParams = {
|
|
1247
|
+
operation: "generateObject";
|
|
1248
|
+
apiKey: string;
|
|
1249
|
+
temperature?: number;
|
|
1250
|
+
model: {
|
|
1251
|
+
provider: "openai";
|
|
1252
|
+
model: string;
|
|
1253
|
+
} | {
|
|
1254
|
+
provider: "anthropic";
|
|
1255
|
+
model: string;
|
|
1256
|
+
} | {
|
|
1257
|
+
provider: "mistral";
|
|
1258
|
+
model: string;
|
|
1259
|
+
} | {
|
|
1260
|
+
provider: "cohere";
|
|
1261
|
+
model: string;
|
|
1262
|
+
} | {
|
|
1263
|
+
provider: "google";
|
|
1264
|
+
model: string;
|
|
1265
|
+
};
|
|
1266
|
+
prompt: string;
|
|
1267
|
+
/**
|
|
1268
|
+
* jsOnly
|
|
1269
|
+
*/
|
|
1270
|
+
schema: {
|
|
1271
|
+
[k: string]: unknown;
|
|
1272
|
+
};
|
|
1273
|
+
providerOptions?: {
|
|
1274
|
+
[k: string]: unknown;
|
|
1275
|
+
};
|
|
1276
|
+
} | {
|
|
1277
|
+
operation: "generateText";
|
|
1278
|
+
apiKey: string;
|
|
1279
|
+
temperature?: number;
|
|
1280
|
+
model: {
|
|
1281
|
+
provider: "openai";
|
|
1282
|
+
model: string;
|
|
1283
|
+
} | {
|
|
1284
|
+
provider: "anthropic";
|
|
1285
|
+
model: string;
|
|
1286
|
+
} | {
|
|
1287
|
+
provider: "mistral";
|
|
1288
|
+
model: string;
|
|
1289
|
+
} | {
|
|
1290
|
+
provider: "cohere";
|
|
1291
|
+
model: string;
|
|
1292
|
+
} | {
|
|
1293
|
+
provider: "google";
|
|
1294
|
+
model: string;
|
|
1295
|
+
};
|
|
1296
|
+
/**
|
|
1297
|
+
* jsOnly
|
|
1298
|
+
*/
|
|
1299
|
+
messages?: ({
|
|
1300
|
+
role: "system";
|
|
1301
|
+
content: string;
|
|
1302
|
+
providerOptions?: {
|
|
1303
|
+
[k: string]: unknown;
|
|
1304
|
+
};
|
|
1305
|
+
} | {
|
|
1306
|
+
role: "user";
|
|
1307
|
+
content: string | ({
|
|
1308
|
+
type: "text";
|
|
1309
|
+
text: string;
|
|
1310
|
+
providerOptions?: {
|
|
1311
|
+
[k: string]: unknown;
|
|
1312
|
+
};
|
|
1313
|
+
} | {
|
|
1314
|
+
type: "image";
|
|
1315
|
+
imageUrl: string;
|
|
1316
|
+
mimeType?: string;
|
|
1317
|
+
providerOptions?: {
|
|
1318
|
+
[k: string]: unknown;
|
|
1319
|
+
};
|
|
1320
|
+
} | {
|
|
1321
|
+
type: "file";
|
|
1322
|
+
fileUrl: string;
|
|
1323
|
+
filename?: string;
|
|
1324
|
+
mimeType: string;
|
|
1325
|
+
providerOptions?: {
|
|
1326
|
+
[k: string]: unknown;
|
|
1327
|
+
};
|
|
1328
|
+
})[];
|
|
1329
|
+
providerOptions?: {
|
|
1330
|
+
[k: string]: unknown;
|
|
1331
|
+
};
|
|
1332
|
+
} | {
|
|
1333
|
+
role: "assistant";
|
|
1334
|
+
content: string | ({
|
|
1335
|
+
type: "text";
|
|
1336
|
+
text: string;
|
|
1337
|
+
providerOptions?: {
|
|
1338
|
+
[k: string]: unknown;
|
|
1339
|
+
};
|
|
1340
|
+
} | {
|
|
1341
|
+
type: "tool-call";
|
|
1342
|
+
toolCallId: string;
|
|
1343
|
+
toolName: string;
|
|
1344
|
+
args: unknown;
|
|
1345
|
+
providerOptions?: {
|
|
1346
|
+
[k: string]: unknown;
|
|
1347
|
+
};
|
|
1348
|
+
})[];
|
|
1349
|
+
providerOptions?: {
|
|
1350
|
+
[k: string]: unknown;
|
|
1351
|
+
};
|
|
1352
|
+
} | {
|
|
1353
|
+
role: "tool";
|
|
1354
|
+
content: {
|
|
1355
|
+
type: "tool-result";
|
|
1356
|
+
toolCallId: string;
|
|
1357
|
+
toolName: string;
|
|
1358
|
+
result: unknown;
|
|
1359
|
+
}[];
|
|
1360
|
+
})[];
|
|
1361
|
+
system?: string;
|
|
1362
|
+
prompt?: string;
|
|
1363
|
+
/**
|
|
1364
|
+
* jsOnly
|
|
1365
|
+
*/
|
|
1366
|
+
tools: {
|
|
1367
|
+
[k: string]: {
|
|
1368
|
+
description?: string;
|
|
1369
|
+
parameters: unknown;
|
|
1370
|
+
type: "function";
|
|
1371
|
+
} | {
|
|
1372
|
+
type: "provider-defined";
|
|
1373
|
+
parameters: unknown;
|
|
1374
|
+
id: string;
|
|
1375
|
+
args: {
|
|
1376
|
+
[k: string]: unknown;
|
|
1377
|
+
};
|
|
1378
|
+
};
|
|
1379
|
+
};
|
|
1380
|
+
toolChoice?: "auto" | "required" | "none";
|
|
1381
|
+
providerOptions?: {
|
|
1382
|
+
[k: string]: unknown;
|
|
1383
|
+
};
|
|
1384
|
+
} | {
|
|
1385
|
+
operation: "streamText";
|
|
1386
|
+
apiKey: string;
|
|
1387
|
+
temperature?: number;
|
|
1388
|
+
model: {
|
|
1389
|
+
provider: "openai";
|
|
1390
|
+
model: string;
|
|
1391
|
+
} | {
|
|
1392
|
+
provider: "anthropic";
|
|
1393
|
+
model: string;
|
|
1394
|
+
} | {
|
|
1395
|
+
provider: "mistral";
|
|
1396
|
+
model: string;
|
|
1397
|
+
} | {
|
|
1398
|
+
provider: "cohere";
|
|
1399
|
+
model: string;
|
|
1400
|
+
} | {
|
|
1401
|
+
provider: "google";
|
|
1402
|
+
model: string;
|
|
1403
|
+
};
|
|
1404
|
+
/**
|
|
1405
|
+
* jsOnly
|
|
1406
|
+
*/
|
|
1407
|
+
messages?: ({
|
|
1408
|
+
role: "system";
|
|
1409
|
+
content: string;
|
|
1410
|
+
providerOptions?: {
|
|
1411
|
+
[k: string]: unknown;
|
|
1412
|
+
};
|
|
1413
|
+
} | {
|
|
1414
|
+
role: "user";
|
|
1415
|
+
content: string | ({
|
|
1416
|
+
type: "text";
|
|
1417
|
+
text: string;
|
|
1418
|
+
providerOptions?: {
|
|
1419
|
+
[k: string]: unknown;
|
|
1420
|
+
};
|
|
1421
|
+
} | {
|
|
1422
|
+
type: "image";
|
|
1423
|
+
imageUrl: string;
|
|
1424
|
+
mimeType?: string;
|
|
1425
|
+
providerOptions?: {
|
|
1426
|
+
[k: string]: unknown;
|
|
1427
|
+
};
|
|
1428
|
+
} | {
|
|
1429
|
+
type: "file";
|
|
1430
|
+
fileUrl: string;
|
|
1431
|
+
filename?: string;
|
|
1432
|
+
mimeType: string;
|
|
1433
|
+
providerOptions?: {
|
|
1434
|
+
[k: string]: unknown;
|
|
1435
|
+
};
|
|
1436
|
+
})[];
|
|
1437
|
+
providerOptions?: {
|
|
1438
|
+
[k: string]: unknown;
|
|
1439
|
+
};
|
|
1440
|
+
} | {
|
|
1441
|
+
role: "assistant";
|
|
1442
|
+
content: string | ({
|
|
1443
|
+
type: "text";
|
|
1444
|
+
text: string;
|
|
1445
|
+
providerOptions?: {
|
|
1446
|
+
[k: string]: unknown;
|
|
1447
|
+
};
|
|
1448
|
+
} | {
|
|
1449
|
+
type: "tool-call";
|
|
1450
|
+
toolCallId: string;
|
|
1451
|
+
toolName: string;
|
|
1452
|
+
args: unknown;
|
|
1453
|
+
providerOptions?: {
|
|
1454
|
+
[k: string]: unknown;
|
|
1455
|
+
};
|
|
1456
|
+
})[];
|
|
1457
|
+
providerOptions?: {
|
|
1458
|
+
[k: string]: unknown;
|
|
1459
|
+
};
|
|
1460
|
+
} | {
|
|
1461
|
+
role: "tool";
|
|
1462
|
+
content: {
|
|
1463
|
+
type: "tool-result";
|
|
1464
|
+
toolCallId: string;
|
|
1465
|
+
toolName: string;
|
|
1466
|
+
result: unknown;
|
|
1467
|
+
}[];
|
|
1468
|
+
})[];
|
|
1469
|
+
system?: string;
|
|
1470
|
+
prompt?: string;
|
|
1471
|
+
/**
|
|
1472
|
+
* jsOnly
|
|
1473
|
+
*/
|
|
1474
|
+
tools: {
|
|
1475
|
+
[k: string]: {
|
|
1476
|
+
description?: string;
|
|
1477
|
+
parameters: unknown;
|
|
1478
|
+
type: "function";
|
|
1479
|
+
} | {
|
|
1480
|
+
type: "provider-defined";
|
|
1481
|
+
parameters: unknown;
|
|
1482
|
+
id: string;
|
|
1483
|
+
args: {
|
|
1484
|
+
[k: string]: unknown;
|
|
1485
|
+
};
|
|
1486
|
+
};
|
|
1487
|
+
};
|
|
1488
|
+
toolChoice?: "auto" | "required" | "none";
|
|
1489
|
+
providerOptions?: {
|
|
1490
|
+
[k: string]: unknown;
|
|
1491
|
+
};
|
|
1492
|
+
} | {
|
|
1493
|
+
operation: "embed";
|
|
1494
|
+
apiKey: string;
|
|
1495
|
+
temperature?: number;
|
|
1496
|
+
model: {
|
|
1497
|
+
provider: "openai";
|
|
1498
|
+
model: string;
|
|
1499
|
+
} | {
|
|
1500
|
+
provider: "anthropic";
|
|
1501
|
+
model: string;
|
|
1502
|
+
} | {
|
|
1503
|
+
provider: "mistral";
|
|
1504
|
+
model: string;
|
|
1505
|
+
} | {
|
|
1506
|
+
provider: "cohere";
|
|
1507
|
+
model: string;
|
|
1508
|
+
} | {
|
|
1509
|
+
provider: "google";
|
|
1510
|
+
model: string;
|
|
1511
|
+
};
|
|
1512
|
+
value: string;
|
|
1513
|
+
};
|
|
1514
|
+
export type IGenericAIResult = {
|
|
1515
|
+
type: "result";
|
|
1516
|
+
value: {
|
|
1517
|
+
reasoning?: string;
|
|
1518
|
+
text: string;
|
|
1519
|
+
toolCalls: {
|
|
1520
|
+
type: "function" | "tool-call";
|
|
1521
|
+
toolName: string;
|
|
1522
|
+
toolCallId: string;
|
|
1523
|
+
id?: string;
|
|
1524
|
+
args?: unknown;
|
|
1525
|
+
}[];
|
|
1526
|
+
};
|
|
1527
|
+
} | {
|
|
1528
|
+
type: "objectResult";
|
|
1529
|
+
value: unknown;
|
|
1530
|
+
} | {
|
|
1531
|
+
type: "streamChunk";
|
|
1532
|
+
value: string;
|
|
1533
|
+
} | {
|
|
1534
|
+
type: "streamResult";
|
|
1535
|
+
value: {
|
|
1536
|
+
text: string;
|
|
1537
|
+
toolCalls: {
|
|
1538
|
+
type: "function" | "tool-call";
|
|
1539
|
+
toolName: string;
|
|
1540
|
+
toolCallId: string;
|
|
1541
|
+
id?: string;
|
|
1542
|
+
args: unknown;
|
|
1543
|
+
}[];
|
|
1544
|
+
};
|
|
1545
|
+
} | {
|
|
1546
|
+
type: "embeddingResult";
|
|
1547
|
+
value: number[];
|
|
1548
|
+
} | {
|
|
1549
|
+
type: "error";
|
|
1550
|
+
error: string;
|
|
1551
|
+
};
|
|
1552
|
+
export type IStepParamsMap = {
|
|
1553
|
+
batchCreateType: IBatchCreateTypeParams;
|
|
1554
|
+
batchGetType: IBatchGetTypeParams;
|
|
1555
|
+
createType: ICreateTypeParams;
|
|
1556
|
+
deleteType: IDeleteTypeParams;
|
|
1557
|
+
elevenLabsTTS: IElevenLabsTTSParams;
|
|
1558
|
+
googleSearch: IGoogleSearchParams;
|
|
1559
|
+
htmlToPdf: IHtmlToPdfParams;
|
|
1560
|
+
httpRequest: IHttpRequestParams;
|
|
1561
|
+
logic: ILogicParams;
|
|
1562
|
+
linkScraper: ILinkScraperParams;
|
|
1563
|
+
listTypeByParent: IListTypeByParentParams;
|
|
1564
|
+
listType: IListTypeParams;
|
|
1565
|
+
notifyWebSocket: INotifyWebSocketParams;
|
|
1566
|
+
openAIImageGeneration: IOpenAIImageGenerationParams;
|
|
1567
|
+
type: ITypeParams;
|
|
1568
|
+
updateType: IUpdateTypeParams;
|
|
1569
|
+
extractImageMetadata: IExtractImageMetadataParams;
|
|
1570
|
+
cloudFunction: ICloudFunctionParams;
|
|
1571
|
+
genericAI: IGenericAIParams;
|
|
1572
|
+
};
|
|
1573
|
+
export type IStepResultMap = {
|
|
1574
|
+
batchCreateType: IBatchCreateTypeResult;
|
|
1575
|
+
batchGetType: IBatchGetTypeResult;
|
|
1576
|
+
createType: ICreateTypeResult;
|
|
1577
|
+
deleteType: IDeleteTypeResult;
|
|
1578
|
+
elevenLabsTTS: IElevenLabsTTSResult;
|
|
1579
|
+
googleSearch: IGoogleSearchResult;
|
|
1580
|
+
htmlToPdf: IHtmlToPdfResult;
|
|
1581
|
+
httpRequest: IHttpRequestResult;
|
|
1582
|
+
logic: ILogicResult;
|
|
1583
|
+
linkScraper: ILinkScraperResult;
|
|
1584
|
+
listTypeByParent: IListTypeByParentResult;
|
|
1585
|
+
listType: IListTypeResult;
|
|
1586
|
+
notifyWebSocket: INotifyWebSocketResult;
|
|
1587
|
+
openAIImageGeneration: IOpenAIImageGenerationResult;
|
|
1588
|
+
type: ITypeResult;
|
|
1589
|
+
updateType: IUpdateTypeResult;
|
|
1590
|
+
extractImageMetadata: IExtractImageMetadataResult;
|
|
1591
|
+
cloudFunction: ICloudFunctionResult;
|
|
1592
|
+
genericAI: IGenericAIResult;
|
|
1593
|
+
};
|
|
1594
|
+
declare enum StepType {
|
|
1595
|
+
batchCreateType = "batchCreateType",
|
|
1596
|
+
batchGetType = "batchGetType",
|
|
1597
|
+
createType = "createType",
|
|
1598
|
+
deleteType = "deleteType",
|
|
1599
|
+
elevenLabsTTS = "elevenLabsTTS",
|
|
1600
|
+
googleSearch = "googleSearch",
|
|
1601
|
+
htmlToPdf = "htmlToPdf",
|
|
1602
|
+
httpRequest = "httpRequest",
|
|
1603
|
+
logic = "logic",
|
|
1604
|
+
linkScraper = "linkScraper",
|
|
1605
|
+
listTypeByParent = "listTypeByParent",
|
|
1606
|
+
listType = "listType",
|
|
1607
|
+
notifyWebSocket = "notifyWebSocket",
|
|
1608
|
+
openAIImageGeneration = "openAIImageGeneration",
|
|
1609
|
+
type = "type",
|
|
1610
|
+
updateType = "updateType",
|
|
1611
|
+
extractImageMetadata = "extractImageMetadata",
|
|
1612
|
+
cloudFunction = "cloudFunction",
|
|
1613
|
+
genericAI = "genericAI"
|
|
1614
|
+
}
|
|
1615
|
+
export type IStepLike = {
|
|
1616
|
+
_tsStepResult: unknown;
|
|
1617
|
+
};
|
|
1618
|
+
export type IJSONSerializable = string | number | boolean | undefined | null | IJSONSerializable[] | {
|
|
1619
|
+
[x: string]: IJSONSerializable;
|
|
1620
|
+
};
|
|
1621
|
+
declare enum TriggerVariantEnum {
|
|
1622
|
+
TABLE_DATA_CHANGE = "TABLE_DATA_CHANGE",
|
|
1623
|
+
SCHEDULE = "SCHEDULE",
|
|
1624
|
+
MANUAL = "MANUAL"
|
|
1625
|
+
}
|
|
1626
|
+
export interface ISharedTriggerDeclaration<TName extends string> {
|
|
1627
|
+
name: TName;
|
|
1628
|
+
condition?: string;
|
|
1629
|
+
}
|
|
1630
|
+
export type ILogicLanguage = "json-logic" | "js";
|
|
1631
|
+
export type IParameterLogicLanguage = ILogicLanguage | "static";
|
|
1632
|
+
export type ITableDataChangeTriggerOperation = "INSERT" | "MODIFY" | "REMOVE";
|
|
1633
|
+
export interface ITableDataChangeTrigger<TName extends string, TOperation extends ITableDataChangeTriggerOperation, ITriggerData> extends ISharedTriggerDeclaration<TName> {
|
|
1634
|
+
variant: TriggerVariantEnum.TABLE_DATA_CHANGE;
|
|
1635
|
+
tableId: string;
|
|
1636
|
+
operation: TOperation;
|
|
1637
|
+
_tsTriggerData: TOperation extends "MODIFY" ? {
|
|
1638
|
+
old: ITriggerData;
|
|
1639
|
+
new: ITriggerData;
|
|
1640
|
+
} : ITriggerData;
|
|
1641
|
+
}
|
|
1642
|
+
export interface IScheduledTrigger<TName extends string> extends ISharedTriggerDeclaration<TName> {
|
|
1643
|
+
variant: TriggerVariantEnum.SCHEDULE;
|
|
1644
|
+
_tsTriggerData: unknown;
|
|
1645
|
+
}
|
|
1646
|
+
export interface IManualTrigger<TName extends string> extends ISharedTriggerDeclaration<TName> {
|
|
1647
|
+
variant: TriggerVariantEnum.MANUAL;
|
|
1648
|
+
_tsTriggerData: unknown;
|
|
1649
|
+
}
|
|
1650
|
+
export type ITriggerDeclaration<TName extends string, TOperation extends ITableDataChangeTriggerOperation, TTriggerData> = ITableDataChangeTrigger<TName, TOperation, TTriggerData> | IScheduledTrigger<TName> | IManualTrigger<TName>;
|
|
1651
|
+
export type IParamConfig = {
|
|
1652
|
+
type: "object";
|
|
1653
|
+
subParams: Record<string, IParamConfig>;
|
|
1654
|
+
} | {
|
|
1655
|
+
type?: "logic";
|
|
1656
|
+
language: IParameterLogicLanguage;
|
|
1657
|
+
} | {
|
|
1658
|
+
type: "secret";
|
|
1659
|
+
};
|
|
1660
|
+
export type IStepFactory<ITypeName extends string, IParams, IResult, TStepName extends string = string> = {
|
|
1661
|
+
name: TStepName;
|
|
1662
|
+
type: ITypeName;
|
|
1663
|
+
description?: string;
|
|
1664
|
+
params: {
|
|
1665
|
+
[K in keyof IParams]: IJSONSerializable;
|
|
1666
|
+
};
|
|
1667
|
+
nextStep: string | null;
|
|
1668
|
+
passThroughCondition?: string;
|
|
1669
|
+
continueCondition?: string;
|
|
1670
|
+
skipCondition?: string;
|
|
1671
|
+
continueConditionLanguage?: ILogicLanguage;
|
|
1672
|
+
skipConditionLanguage?: ILogicLanguage;
|
|
1673
|
+
paramsConfig?: {
|
|
1674
|
+
[K in keyof IParams]: IParamConfig;
|
|
1675
|
+
};
|
|
1676
|
+
_tsStepResult: IResult;
|
|
1677
|
+
};
|
|
1678
|
+
export type ISteps = {
|
|
1679
|
+
[K in StepType]: IStepFactory<K, IStepParamsMap[K], IStepResultMap[K]>;
|
|
1680
|
+
};
|
|
1681
|
+
export type IStep = ISteps[keyof ISteps];
|
|
1682
|
+
export interface IFlowDeclaration<TName extends string, TSteps extends Record<string, IStepLike>> {
|
|
1683
|
+
triggers: Record<string, ITriggerDeclaration<TName, any, any>>;
|
|
1684
|
+
startStep: string | null;
|
|
1685
|
+
steps: TSteps;
|
|
1686
|
+
debug?: boolean;
|
|
1687
|
+
disabled?: boolean;
|
|
1688
|
+
}
|
|
1689
|
+
export type INonGenericIFlowDeclaration = IFlowDeclaration<string, Record<string, IStep>>;
|
|
753
1690
|
export type II18nSettings = {
|
|
754
1691
|
locales: string[];
|
|
755
1692
|
default: string;
|
|
@@ -759,6 +1696,26 @@ export type IAppSlugConfig = {
|
|
|
759
1696
|
pattern: string;
|
|
760
1697
|
};
|
|
761
1698
|
};
|
|
1699
|
+
export declare const PAGE_VISIBILITY: readonly [
|
|
1700
|
+
"public",
|
|
1701
|
+
"authenticated",
|
|
1702
|
+
"group",
|
|
1703
|
+
"user"
|
|
1704
|
+
];
|
|
1705
|
+
export type PageVisibility = (typeof PAGE_VISIBILITY)[number];
|
|
1706
|
+
export type IAppAuthSignupField = {
|
|
1707
|
+
name: string;
|
|
1708
|
+
label?: string;
|
|
1709
|
+
type?: "text" | "number" | "email";
|
|
1710
|
+
required?: boolean;
|
|
1711
|
+
};
|
|
1712
|
+
export type IAppAuthSettings = {
|
|
1713
|
+
enabled?: boolean;
|
|
1714
|
+
allowSignup?: boolean;
|
|
1715
|
+
signupFields?: IAppAuthSignupField[];
|
|
1716
|
+
redirectPageId?: string;
|
|
1717
|
+
loginPageId?: string;
|
|
1718
|
+
};
|
|
762
1719
|
export type SemVer = `${number}.${number}.${number}`;
|
|
763
1720
|
export interface IDependencyInfo {
|
|
764
1721
|
version: SemVer;
|
|
@@ -877,8 +1834,16 @@ export interface IPageOptions {
|
|
|
877
1834
|
param?: IPageParamConfig;
|
|
878
1835
|
/** Default English localization dictionary for this page. */
|
|
879
1836
|
defaultLocalization?: LocalizationDictionary;
|
|
1837
|
+
/** SEO metadata (title, description, og:* and twitter:* tags) rendered as `<meta>` tags */
|
|
1838
|
+
meta?: IPageMetaDictionary;
|
|
880
1839
|
/** Localized config (e.g. canonicalPath, notFound). Preserved through pull/push. */
|
|
881
1840
|
localizedConfig?: string;
|
|
1841
|
+
/**
|
|
1842
|
+
* Access level for the published page. Absent ⇒ "public".
|
|
1843
|
+
* Anything other than "public" requires a valid end-user session; the
|
|
1844
|
+
* user/group distinction is enforced at the data layer via PBAC.
|
|
1845
|
+
*/
|
|
1846
|
+
visibility?: PageVisibility;
|
|
882
1847
|
/** Building block instances on this page. */
|
|
883
1848
|
blocks?: IBlockDefinition[];
|
|
884
1849
|
}
|
|
@@ -890,6 +1855,7 @@ export interface IPageDefinition {
|
|
|
890
1855
|
params: Record<string, IPageParamConfig>;
|
|
891
1856
|
defaultLocalization?: LocalizationDictionary;
|
|
892
1857
|
localizedConfig?: string;
|
|
1858
|
+
visibility?: PageVisibility;
|
|
893
1859
|
blocks: IBlockDefinition[];
|
|
894
1860
|
}
|
|
895
1861
|
export interface IPageSlugConfig {
|
|
@@ -930,6 +1896,8 @@ export interface IAppOptions {
|
|
|
930
1896
|
slugConfig?: IAppSlugConfig;
|
|
931
1897
|
/** Internationalization settings persisted to `app.settings.i18n`. */
|
|
932
1898
|
i18n?: II18nSettings;
|
|
1899
|
+
/** End-user authentication settings persisted to `app.settings.auth`. */
|
|
1900
|
+
auth?: IAppAuthSettings;
|
|
933
1901
|
/** @deprecated Use `i18n.locales` instead. */
|
|
934
1902
|
locale?: string;
|
|
935
1903
|
/** @deprecated Use `i18n.locales` instead. */
|
|
@@ -941,11 +1909,184 @@ export interface IAppOutput {
|
|
|
941
1909
|
blockTypes: IBlockTypeOutput[];
|
|
942
1910
|
slugConfig?: IAppSlugConfig;
|
|
943
1911
|
i18n?: II18nSettings;
|
|
1912
|
+
auth?: IAppAuthSettings;
|
|
944
1913
|
}
|
|
945
1914
|
declare function buildApp(opts: IAppOptions): IAppOutput;
|
|
1915
|
+
export interface IJsParam {
|
|
1916
|
+
readonly __flowParam: "js";
|
|
1917
|
+
readonly code: string;
|
|
1918
|
+
}
|
|
1919
|
+
export interface ISecretParam {
|
|
1920
|
+
readonly __flowParam: "secret";
|
|
1921
|
+
readonly secretId: string;
|
|
1922
|
+
}
|
|
1923
|
+
declare function js(code: string): IJsParam;
|
|
1924
|
+
declare function secret(secretId: string): ISecretParam;
|
|
1925
|
+
/**
|
|
1926
|
+
* Widens a step's param type so every level accepts either the plain value,
|
|
1927
|
+
* a `js()` marker, or (for leaves) a `secret()` marker. Arrays only allow a
|
|
1928
|
+
* marker for the whole array — the runtime cannot address paths inside arrays.
|
|
1929
|
+
*/
|
|
1930
|
+
export type DeepParam<T> = [
|
|
1931
|
+
T
|
|
1932
|
+
] extends [
|
|
1933
|
+
never
|
|
1934
|
+
] ? never : T extends (infer U)[] ? U[] | IJsParam : T extends object ? {
|
|
1935
|
+
[K in keyof T]: DeepParam<T[K]>;
|
|
1936
|
+
} | IJsParam : T | IJsParam | ISecretParam;
|
|
1937
|
+
export interface ITableDataChangeTriggerOptions {
|
|
1938
|
+
tableId: string;
|
|
1939
|
+
operation: ITableDataChangeTriggerOperation;
|
|
1940
|
+
/** JS code evaluated against the trigger data; truthy result fires the flow. */
|
|
1941
|
+
condition?: string;
|
|
1942
|
+
}
|
|
1943
|
+
export interface ISharedTriggerOptions {
|
|
1944
|
+
condition?: string;
|
|
1945
|
+
}
|
|
1946
|
+
export type IFlowTriggerDefinition = {
|
|
1947
|
+
variant: TriggerVariantEnum.TABLE_DATA_CHANGE;
|
|
1948
|
+
tableId: string;
|
|
1949
|
+
operation: ITableDataChangeTriggerOperation;
|
|
1950
|
+
condition?: string;
|
|
1951
|
+
} | {
|
|
1952
|
+
variant: TriggerVariantEnum.SCHEDULE;
|
|
1953
|
+
condition?: string;
|
|
1954
|
+
} | {
|
|
1955
|
+
variant: TriggerVariantEnum.MANUAL;
|
|
1956
|
+
condition?: string;
|
|
1957
|
+
};
|
|
1958
|
+
declare const trigger: {
|
|
1959
|
+
tableDataChange(opts: ITableDataChangeTriggerOptions): IFlowTriggerDefinition;
|
|
1960
|
+
schedule(opts?: ISharedTriggerOptions): IFlowTriggerDefinition;
|
|
1961
|
+
manual(opts?: ISharedTriggerOptions): IFlowTriggerDefinition;
|
|
1962
|
+
};
|
|
1963
|
+
export type DeepParamObject<P> = P extends object ? {
|
|
1964
|
+
[K in keyof P]: DeepParam<P[K]>;
|
|
1965
|
+
} : never;
|
|
1966
|
+
export type IStepParamsInput<T extends StepType> = DeepParamObject<IStepParamsMap[T]>;
|
|
1967
|
+
export interface IFlowStepOptions<T extends StepType> {
|
|
1968
|
+
description?: string;
|
|
1969
|
+
/**
|
|
1970
|
+
* The step-type shape drives IntelliSense, but a raw record is accepted
|
|
1971
|
+
* too: declarations created in the webapp routinely carry extra keys or
|
|
1972
|
+
* omit ones that are resolved dynamically, and pulled flows must always
|
|
1973
|
+
* compile. Mismatches surface as schema warnings on push.
|
|
1974
|
+
*/
|
|
1975
|
+
params: IStepParamsInput<T> | Record<string, unknown>;
|
|
1976
|
+
/**
|
|
1977
|
+
* Explicit next step name (or null to end the flow). Defaults to the
|
|
1978
|
+
* following entry of the `steps` array. Required for `detachedSteps`.
|
|
1979
|
+
*/
|
|
1980
|
+
next?: string | null;
|
|
1981
|
+
/** JS condition — truthy result skips this step (the flow continues). */
|
|
1982
|
+
skipIf?: string;
|
|
1983
|
+
/** JS condition evaluated after the step — falsy result stops the flow. */
|
|
1984
|
+
continueIf?: string;
|
|
1985
|
+
passThroughCondition?: string;
|
|
1986
|
+
}
|
|
1987
|
+
export interface IFlowStepDefinition<T extends StepType = StepType> {
|
|
1988
|
+
name: string;
|
|
1989
|
+
type: T;
|
|
1990
|
+
description?: string;
|
|
1991
|
+
params: Record<string, unknown>;
|
|
1992
|
+
next?: string | null;
|
|
1993
|
+
skipIf?: string;
|
|
1994
|
+
continueIf?: string;
|
|
1995
|
+
passThroughCondition?: string;
|
|
1996
|
+
}
|
|
1997
|
+
declare const step: {
|
|
1998
|
+
batchCreateType: (name: string, opts: IFlowStepOptions<StepType.batchCreateType>) => IFlowStepDefinition<StepType.batchCreateType>;
|
|
1999
|
+
batchGetType: (name: string, opts: IFlowStepOptions<StepType.batchGetType>) => IFlowStepDefinition<StepType.batchGetType>;
|
|
2000
|
+
createType: (name: string, opts: IFlowStepOptions<StepType.createType>) => IFlowStepDefinition<StepType.createType>;
|
|
2001
|
+
deleteType: (name: string, opts: IFlowStepOptions<StepType.deleteType>) => IFlowStepDefinition<StepType.deleteType>;
|
|
2002
|
+
elevenLabsTTS: (name: string, opts: IFlowStepOptions<StepType.elevenLabsTTS>) => IFlowStepDefinition<StepType.elevenLabsTTS>;
|
|
2003
|
+
googleSearch: (name: string, opts: IFlowStepOptions<StepType.googleSearch>) => IFlowStepDefinition<StepType.googleSearch>;
|
|
2004
|
+
htmlToPdf: (name: string, opts: IFlowStepOptions<StepType.htmlToPdf>) => IFlowStepDefinition<StepType.htmlToPdf>;
|
|
2005
|
+
httpRequest: (name: string, opts: IFlowStepOptions<StepType.httpRequest>) => IFlowStepDefinition<StepType.httpRequest>;
|
|
2006
|
+
logic: (name: string, opts: IFlowStepOptions<StepType.logic>) => IFlowStepDefinition<StepType.logic>;
|
|
2007
|
+
linkScraper: (name: string, opts: IFlowStepOptions<StepType.linkScraper>) => IFlowStepDefinition<StepType.linkScraper>;
|
|
2008
|
+
listTypeByParent: (name: string, opts: IFlowStepOptions<StepType.listTypeByParent>) => IFlowStepDefinition<StepType.listTypeByParent>;
|
|
2009
|
+
listType: (name: string, opts: IFlowStepOptions<StepType.listType>) => IFlowStepDefinition<StepType.listType>;
|
|
2010
|
+
notifyWebSocket: (name: string, opts: IFlowStepOptions<StepType.notifyWebSocket>) => IFlowStepDefinition<StepType.notifyWebSocket>;
|
|
2011
|
+
openAIImageGeneration: (name: string, opts: IFlowStepOptions<StepType.openAIImageGeneration>) => IFlowStepDefinition<StepType.openAIImageGeneration>;
|
|
2012
|
+
type: (name: string, opts: IFlowStepOptions<StepType.type>) => IFlowStepDefinition<StepType.type>;
|
|
2013
|
+
updateType: (name: string, opts: IFlowStepOptions<StepType.updateType>) => IFlowStepDefinition<StepType.updateType>;
|
|
2014
|
+
extractImageMetadata: (name: string, opts: IFlowStepOptions<StepType.extractImageMetadata>) => IFlowStepDefinition<StepType.extractImageMetadata>;
|
|
2015
|
+
cloudFunction: (name: string, opts: IFlowStepOptions<StepType.cloudFunction>) => IFlowStepDefinition<StepType.cloudFunction>;
|
|
2016
|
+
genericAI: (name: string, opts: IFlowStepOptions<StepType.genericAI>) => IFlowStepDefinition<StepType.genericAI>;
|
|
2017
|
+
};
|
|
2018
|
+
export interface IFlowOptions {
|
|
2019
|
+
/** Flow record name — stored next to the declaration, not inside it. */
|
|
2020
|
+
name?: string;
|
|
2021
|
+
triggers: Record<string, IFlowTriggerDefinition>;
|
|
2022
|
+
/** Executed in order; each step's nextStep defaults to the next entry. */
|
|
2023
|
+
steps: IFlowStepDefinition[];
|
|
2024
|
+
/**
|
|
2025
|
+
* Steps not reachable from the main chain (each needs an explicit `next`).
|
|
2026
|
+
* Exists for round-trip fidelity of pulled declarations — avoid in new flows.
|
|
2027
|
+
*/
|
|
2028
|
+
detachedSteps?: IFlowStepDefinition[];
|
|
2029
|
+
debug?: boolean;
|
|
2030
|
+
disabled?: boolean;
|
|
2031
|
+
}
|
|
2032
|
+
export interface IFlowOutput {
|
|
2033
|
+
name?: string;
|
|
2034
|
+
declaration: INonGenericIFlowDeclaration;
|
|
2035
|
+
}
|
|
2036
|
+
declare const TABLE_ID_PARAM_NAMES: readonly [
|
|
2037
|
+
"ofType",
|
|
2038
|
+
"parentType"
|
|
2039
|
+
];
|
|
2040
|
+
declare function buildFlow(opts: IFlowOptions): IFlowOutput;
|
|
2041
|
+
export interface IFlowValidationIssue {
|
|
2042
|
+
flowId?: string;
|
|
2043
|
+
flowName?: string;
|
|
2044
|
+
path: string;
|
|
2045
|
+
message: string;
|
|
2046
|
+
}
|
|
2047
|
+
export interface IFlowValidationResult {
|
|
2048
|
+
errors: IFlowValidationIssue[];
|
|
2049
|
+
warnings: IFlowValidationIssue[];
|
|
2050
|
+
}
|
|
2051
|
+
export interface IValidatableFlow {
|
|
2052
|
+
id: string;
|
|
2053
|
+
name?: string;
|
|
2054
|
+
declaration: INonGenericIFlowDeclaration;
|
|
2055
|
+
}
|
|
2056
|
+
export interface IValidateFlowContext {
|
|
2057
|
+
flowId?: string;
|
|
2058
|
+
name?: string;
|
|
2059
|
+
}
|
|
2060
|
+
/**
|
|
2061
|
+
* All secret record IDs referenced by a declaration's secret params.
|
|
2062
|
+
*/
|
|
2063
|
+
export declare function collectSecretIds(declaration: INonGenericIFlowDeclaration): string[];
|
|
2064
|
+
/**
|
|
2065
|
+
* Validates a single flow declaration: linked-list step integrity, param
|
|
2066
|
+
* shapes, secret hygiene, and self-retriggering write steps.
|
|
2067
|
+
*/
|
|
2068
|
+
export declare function validateFlow(declaration: INonGenericIFlowDeclaration, ctx?: IValidateFlowContext): IFlowValidationResult;
|
|
2069
|
+
/**
|
|
2070
|
+
* Detects trigger cycles across flows: flow A writes a table that triggers
|
|
2071
|
+
* flow B, whose writes eventually trigger flow A again. Only statically
|
|
2072
|
+
* determinable writes create edges — dynamic writes are reported per flow by
|
|
2073
|
+
* {@link validateFlow}.
|
|
2074
|
+
*/
|
|
2075
|
+
export declare function validateFlowGraph(flows: IValidatableFlow[]): IFlowValidationResult;
|
|
2076
|
+
export interface IValidateFlowsOptions {
|
|
2077
|
+
/**
|
|
2078
|
+
* Restrict per-flow validation to these flow IDs (cross-flow cycle
|
|
2079
|
+
* detection always runs across all flows). Defaults to all flows.
|
|
2080
|
+
*/
|
|
2081
|
+
flowIdsToValidate?: string[];
|
|
2082
|
+
}
|
|
2083
|
+
/**
|
|
2084
|
+
* Validates each flow individually and detects cross-flow trigger cycles.
|
|
2085
|
+
*/
|
|
2086
|
+
export declare function validateFlows(flows: IValidatableFlow[], opts?: IValidateFlowsOptions): IFlowValidationResult;
|
|
946
2087
|
|
|
947
|
-
declare namespace
|
|
948
|
-
export {
|
|
2088
|
+
declare namespace flowBuilder {
|
|
2089
|
+
export { IFlowOptions, IFlowOutput, IFlowStepDefinition, IFlowStepOptions, IFlowTriggerDefinition, ISharedTriggerOptions, IStepParamsInput, ITableDataChangeTriggerOptions, TABLE_ID_PARAM_NAMES, buildFlow, js, secret, step, trigger };
|
|
949
2090
|
}
|
|
950
2091
|
declare namespace dataBuilder {
|
|
951
2092
|
export { TableDef, TableOpts, TableSearchConfig, build, enumType, fields, table };
|
|
@@ -953,10 +2094,14 @@ declare namespace dataBuilder {
|
|
|
953
2094
|
declare namespace macros {
|
|
954
2095
|
export { blockConfigCode, blockDynamicDataCode, blockNameCode, blockTypeCopiesCode, entityLocalizationCode, pageLocalizedConfigCode };
|
|
955
2096
|
}
|
|
2097
|
+
declare namespace appBuilder {
|
|
2098
|
+
export { block, blockType, buildApp, buildBlockTypes, buildPages, flattenBlocks, page };
|
|
2099
|
+
}
|
|
956
2100
|
|
|
957
2101
|
export {
|
|
958
2102
|
appBuilder,
|
|
959
2103
|
dataBuilder,
|
|
2104
|
+
flowBuilder,
|
|
960
2105
|
macros,
|
|
961
2106
|
};
|
|
962
2107
|
|