@aeriajs/builtins 0.0.31 → 0.0.33

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.
@@ -28,7 +28,7 @@ export declare const tempFile: Omit<import("@aeriajs/types").Collection<{
28
28
  };
29
29
  };
30
30
  };
31
- }>, "description" | "functions" | "item" | "accessControl" | "functionContracts"> & {
31
+ }>, "description" | "item" | "accessControl" | "functionContracts"> & {
32
32
  item: import("@aeriajs/types").SchemaWithId<{
33
33
  readonly $id: "tempFile";
34
34
  readonly temporary: {
@@ -85,11 +85,10 @@ export declare const tempFile: Omit<import("@aeriajs/types").Collection<{
85
85
  };
86
86
  };
87
87
  };
88
- functions: {};
89
- functionContracts: Partial<{}>;
88
+ functionContracts: {};
90
89
  accessControl: import("@aeriajs/types").AccessControl;
91
90
  };
92
- export declare const file: Omit<import("@aeriajs/types").Collection<{
91
+ export declare const file: {
93
92
  description: {
94
93
  readonly $id: "file";
95
94
  readonly owned: "always";
@@ -141,154 +140,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
141
140
  };
142
141
  };
143
142
  functions: {
144
- readonly get: (payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<{
145
- readonly $id: "file";
146
- readonly owned: "always";
147
- readonly presets: readonly ["owned"];
148
- readonly indexes: readonly ["filename", "link", "mime"];
149
- readonly properties: {
150
- readonly mime: {
151
- readonly type: "string";
152
- };
153
- readonly size: {
154
- readonly type: "number";
155
- };
156
- readonly last_modified: {
157
- readonly type: "string";
158
- readonly format: "date-time";
159
- };
160
- readonly filename: {
161
- readonly type: "string";
162
- };
163
- readonly absolute_path: {
164
- readonly type: "string";
165
- };
166
- readonly relative_path: {
167
- readonly type: "string";
168
- };
169
- readonly immutable: {
170
- readonly type: "boolean";
171
- };
172
- readonly link: {
173
- readonly getter: (value: any) => Promise<string>;
174
- };
175
- readonly download_link: {
176
- readonly getter: (value: any) => Promise<string>;
177
- };
178
- };
179
- readonly actions: {
180
- readonly deleteAll: {
181
- readonly name: "Remover";
182
- readonly ask: true;
183
- readonly selection: true;
184
- };
185
- };
186
- readonly individualActions: {
187
- readonly remove: {
188
- readonly name: "Remover";
189
- readonly icon: "trash";
190
- readonly ask: true;
191
- };
192
- };
193
- }>>, context: import("@aeriajs/types").Context<{
194
- readonly $id: "file";
195
- readonly owned: "always";
196
- readonly presets: readonly ["owned"];
197
- readonly indexes: readonly ["filename", "link", "mime"];
198
- readonly properties: {
199
- readonly mime: {
200
- readonly type: "string";
201
- };
202
- readonly size: {
203
- readonly type: "number";
204
- };
205
- readonly last_modified: {
206
- readonly type: "string";
207
- readonly format: "date-time";
208
- };
209
- readonly filename: {
210
- readonly type: "string";
211
- };
212
- readonly absolute_path: {
213
- readonly type: "string";
214
- };
215
- readonly relative_path: {
216
- readonly type: "string";
217
- };
218
- readonly immutable: {
219
- readonly type: "boolean";
220
- };
221
- readonly link: {
222
- readonly getter: (value: any) => Promise<string>;
223
- };
224
- readonly download_link: {
225
- readonly getter: (value: any) => Promise<string>;
226
- };
227
- };
228
- readonly actions: {
229
- readonly deleteAll: {
230
- readonly name: "Remover";
231
- readonly ask: true;
232
- readonly selection: true;
233
- };
234
- };
235
- readonly individualActions: {
236
- readonly remove: {
237
- readonly name: "Remover";
238
- readonly icon: "trash";
239
- readonly ask: true;
240
- };
241
- };
242
- }>, options?: import("@aeriajs/api").GetOptions | undefined) => Promise<import("@aeriajs/types").SchemaWithId<{
243
- readonly $id: "file";
244
- readonly owned: "always";
245
- readonly presets: readonly ["owned"];
246
- readonly indexes: readonly ["filename", "link", "mime"];
247
- readonly properties: {
248
- readonly mime: {
249
- readonly type: "string";
250
- };
251
- readonly size: {
252
- readonly type: "number";
253
- };
254
- readonly last_modified: {
255
- readonly type: "string";
256
- readonly format: "date-time";
257
- };
258
- readonly filename: {
259
- readonly type: "string";
260
- };
261
- readonly absolute_path: {
262
- readonly type: "string";
263
- };
264
- readonly relative_path: {
265
- readonly type: "string";
266
- };
267
- readonly immutable: {
268
- readonly type: "boolean";
269
- };
270
- readonly link: {
271
- readonly getter: (value: any) => Promise<string>;
272
- };
273
- readonly download_link: {
274
- readonly getter: (value: any) => Promise<string>;
275
- };
276
- };
277
- readonly actions: {
278
- readonly deleteAll: {
279
- readonly name: "Remover";
280
- readonly ask: true;
281
- readonly selection: true;
282
- };
283
- };
284
- readonly individualActions: {
285
- readonly remove: {
286
- readonly name: "Remover";
287
- readonly icon: "trash";
288
- readonly ask: true;
289
- };
290
- };
291
- }> | null>;
143
+ readonly get: (payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<any>>, context: import("@aeriajs/types").Context, options?: import("@aeriajs/api").GetOptions | undefined) => Promise<import("@aeriajs/types").SchemaWithId<any> | null>;
292
144
  readonly insert: (payload: {
293
145
  what: {
294
146
  content: string;
@@ -596,7 +448,7 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
596
448
  };
597
449
  }>) => Promise<any>;
598
450
  };
599
- }>, "description" | "functions" | "item" | "accessControl" | "functionContracts"> & {
451
+ } & {
600
452
  item: import("@aeriajs/types").SchemaWithId<{
601
453
  readonly $id: "file";
602
454
  readonly owned: "always";
@@ -697,468 +549,12 @@ export declare const file: Omit<import("@aeriajs/types").Collection<{
697
549
  };
698
550
  };
699
551
  };
700
- functions: {
701
- readonly get: (payload: import("@aeriajs/types").GetPayload<import("@aeriajs/types").SchemaWithId<{
702
- readonly $id: "file";
703
- readonly owned: "always";
704
- readonly presets: readonly ["owned"];
705
- readonly indexes: readonly ["filename", "link", "mime"];
706
- readonly properties: {
707
- readonly mime: {
708
- readonly type: "string";
709
- };
710
- readonly size: {
711
- readonly type: "number";
712
- };
713
- readonly last_modified: {
714
- readonly type: "string";
715
- readonly format: "date-time";
716
- };
717
- readonly filename: {
718
- readonly type: "string";
719
- };
720
- readonly absolute_path: {
721
- readonly type: "string";
722
- };
723
- readonly relative_path: {
724
- readonly type: "string";
725
- };
726
- readonly immutable: {
727
- readonly type: "boolean";
728
- };
729
- readonly link: {
730
- readonly getter: (value: any) => Promise<string>;
731
- };
732
- readonly download_link: {
733
- readonly getter: (value: any) => Promise<string>;
734
- };
735
- };
736
- readonly actions: {
737
- readonly deleteAll: {
738
- readonly name: "Remover";
739
- readonly ask: true;
740
- readonly selection: true;
741
- };
742
- };
743
- readonly individualActions: {
744
- readonly remove: {
745
- readonly name: "Remover";
746
- readonly icon: "trash";
747
- readonly ask: true;
748
- };
749
- };
750
- }>>, context: import("@aeriajs/types").Context<{
751
- readonly $id: "file";
752
- readonly owned: "always";
753
- readonly presets: readonly ["owned"];
754
- readonly indexes: readonly ["filename", "link", "mime"];
755
- readonly properties: {
756
- readonly mime: {
757
- readonly type: "string";
758
- };
759
- readonly size: {
760
- readonly type: "number";
761
- };
762
- readonly last_modified: {
763
- readonly type: "string";
764
- readonly format: "date-time";
765
- };
766
- readonly filename: {
767
- readonly type: "string";
768
- };
769
- readonly absolute_path: {
770
- readonly type: "string";
771
- };
772
- readonly relative_path: {
773
- readonly type: "string";
774
- };
775
- readonly immutable: {
776
- readonly type: "boolean";
777
- };
778
- readonly link: {
779
- readonly getter: (value: any) => Promise<string>;
780
- };
781
- readonly download_link: {
782
- readonly getter: (value: any) => Promise<string>;
783
- };
784
- };
785
- readonly actions: {
786
- readonly deleteAll: {
787
- readonly name: "Remover";
788
- readonly ask: true;
789
- readonly selection: true;
790
- };
791
- };
792
- readonly individualActions: {
793
- readonly remove: {
794
- readonly name: "Remover";
795
- readonly icon: "trash";
796
- readonly ask: true;
797
- };
798
- };
799
- }>, options?: import("@aeriajs/api").GetOptions | undefined) => Promise<import("@aeriajs/types").SchemaWithId<{
800
- readonly $id: "file";
801
- readonly owned: "always";
802
- readonly presets: readonly ["owned"];
803
- readonly indexes: readonly ["filename", "link", "mime"];
804
- readonly properties: {
805
- readonly mime: {
806
- readonly type: "string";
807
- };
808
- readonly size: {
809
- readonly type: "number";
810
- };
811
- readonly last_modified: {
812
- readonly type: "string";
813
- readonly format: "date-time";
814
- };
815
- readonly filename: {
816
- readonly type: "string";
817
- };
818
- readonly absolute_path: {
819
- readonly type: "string";
820
- };
821
- readonly relative_path: {
822
- readonly type: "string";
823
- };
824
- readonly immutable: {
825
- readonly type: "boolean";
826
- };
827
- readonly link: {
828
- readonly getter: (value: any) => Promise<string>;
829
- };
830
- readonly download_link: {
831
- readonly getter: (value: any) => Promise<string>;
832
- };
833
- };
834
- readonly actions: {
835
- readonly deleteAll: {
836
- readonly name: "Remover";
837
- readonly ask: true;
838
- readonly selection: true;
839
- };
840
- };
841
- readonly individualActions: {
842
- readonly remove: {
843
- readonly name: "Remover";
844
- readonly icon: "trash";
845
- readonly ask: true;
846
- };
847
- };
848
- }> | null>;
849
- readonly insert: (payload: {
850
- what: {
851
- content: string;
852
- } & Pick<import("@aeriajs/types").PackReferences<import("@aeriajs/types").SchemaWithId<{
853
- readonly $id: "file";
854
- readonly owned: "always";
855
- readonly presets: readonly ["owned"];
856
- readonly indexes: readonly ["filename", "link", "mime"];
857
- readonly properties: {
858
- readonly mime: {
859
- readonly type: "string";
860
- };
861
- readonly size: {
862
- readonly type: "number";
863
- };
864
- readonly last_modified: {
865
- readonly type: "string";
866
- readonly format: "date-time";
867
- };
868
- readonly filename: {
869
- readonly type: "string";
870
- };
871
- readonly absolute_path: {
872
- readonly type: "string";
873
- };
874
- readonly relative_path: {
875
- readonly type: "string";
876
- };
877
- readonly immutable: {
878
- readonly type: "boolean";
879
- };
880
- readonly link: {
881
- readonly getter: (value: any) => Promise<string>;
882
- };
883
- readonly download_link: {
884
- readonly getter: (value: any) => Promise<string>;
885
- };
886
- };
887
- readonly actions: {
888
- readonly deleteAll: {
889
- readonly name: "Remover";
890
- readonly ask: true;
891
- readonly selection: true;
892
- };
893
- };
894
- readonly individualActions: {
895
- readonly remove: {
896
- readonly name: "Remover";
897
- readonly icon: "trash";
898
- readonly ask: true;
899
- };
900
- };
901
- }>>, "filename" | "absolute_path" | "_id" | "owner">;
902
- }, context: import("@aeriajs/types").Context<{
903
- readonly $id: "file";
904
- readonly owned: "always";
905
- readonly presets: readonly ["owned"];
906
- readonly indexes: readonly ["filename", "link", "mime"];
907
- readonly properties: {
908
- readonly mime: {
909
- readonly type: "string";
910
- };
911
- readonly size: {
912
- readonly type: "number";
913
- };
914
- readonly last_modified: {
915
- readonly type: "string";
916
- readonly format: "date-time";
917
- };
918
- readonly filename: {
919
- readonly type: "string";
920
- };
921
- readonly absolute_path: {
922
- readonly type: "string";
923
- };
924
- readonly relative_path: {
925
- readonly type: "string";
926
- };
927
- readonly immutable: {
928
- readonly type: "boolean";
929
- };
930
- readonly link: {
931
- readonly getter: (value: any) => Promise<string>;
932
- };
933
- readonly download_link: {
934
- readonly getter: (value: any) => Promise<string>;
935
- };
936
- };
937
- readonly actions: {
938
- readonly deleteAll: {
939
- readonly name: "Remover";
940
- readonly ask: true;
941
- readonly selection: true;
942
- };
943
- };
944
- readonly individualActions: {
945
- readonly remove: {
946
- readonly name: "Remover";
947
- readonly icon: "trash";
948
- readonly ask: true;
949
- };
950
- };
951
- }>) => Promise<import("@aeriajs/types").Right<any> | import("@aeriajs/types").Left<import("@aeriajs/types").ACErrors | import("@aeriajs/types").ValidationError>>;
952
- readonly download: (payload: {
953
- fileId: string;
954
- options: readonly ("download" | "picture")[];
955
- noHeaders?: boolean | undefined;
956
- }, context: import("@aeriajs/types").Context<{
957
- readonly $id: "file";
958
- readonly owned: "always";
959
- readonly presets: readonly ["owned"];
960
- readonly indexes: readonly ["filename", "link", "mime"];
961
- readonly properties: {
962
- readonly mime: {
963
- readonly type: "string";
964
- };
965
- readonly size: {
966
- readonly type: "number";
967
- };
968
- readonly last_modified: {
969
- readonly type: "string";
970
- readonly format: "date-time";
971
- };
972
- readonly filename: {
973
- readonly type: "string";
974
- };
975
- readonly absolute_path: {
976
- readonly type: "string";
977
- };
978
- readonly relative_path: {
979
- readonly type: "string";
980
- };
981
- readonly immutable: {
982
- readonly type: "boolean";
983
- };
984
- readonly link: {
985
- readonly getter: (value: any) => Promise<string>;
986
- };
987
- readonly download_link: {
988
- readonly getter: (value: any) => Promise<string>;
989
- };
990
- };
991
- readonly actions: {
992
- readonly deleteAll: {
993
- readonly name: "Remover";
994
- readonly ask: true;
995
- readonly selection: true;
996
- };
997
- };
998
- readonly individualActions: {
999
- readonly remove: {
1000
- readonly name: "Remover";
1001
- readonly icon: "trash";
1002
- readonly ask: true;
1003
- };
1004
- };
1005
- }>) => Promise<import("@aeriajs/types").Left<import("./download.js").FileReadError.DocumentNotFound> | import("@aeriajs/types").Left<import("./download.js").FileReadError.FileNotFound> | import("fs").ReadStream>;
1006
- readonly remove: (payload: import("@aeriajs/types").RemovePayload<import("@aeriajs/types").SchemaWithId<{
1007
- readonly $id: "file";
1008
- readonly owned: "always";
1009
- readonly presets: readonly ["owned"];
1010
- readonly indexes: readonly ["filename", "link", "mime"];
1011
- readonly properties: {
1012
- readonly mime: {
1013
- readonly type: "string";
1014
- };
1015
- readonly size: {
1016
- readonly type: "number";
1017
- };
1018
- readonly last_modified: {
1019
- readonly type: "string";
1020
- readonly format: "date-time";
1021
- };
1022
- readonly filename: {
1023
- readonly type: "string";
1024
- };
1025
- readonly absolute_path: {
1026
- readonly type: "string";
1027
- };
1028
- readonly relative_path: {
1029
- readonly type: "string";
1030
- };
1031
- readonly immutable: {
1032
- readonly type: "boolean";
1033
- };
1034
- readonly link: {
1035
- readonly getter: (value: any) => Promise<string>;
1036
- };
1037
- readonly download_link: {
1038
- readonly getter: (value: any) => Promise<string>;
1039
- };
1040
- };
1041
- readonly actions: {
1042
- readonly deleteAll: {
1043
- readonly name: "Remover";
1044
- readonly ask: true;
1045
- readonly selection: true;
1046
- };
1047
- };
1048
- readonly individualActions: {
1049
- readonly remove: {
1050
- readonly name: "Remover";
1051
- readonly icon: "trash";
1052
- readonly ask: true;
1053
- };
1054
- };
1055
- }>>, context: import("@aeriajs/types").Context<{
1056
- readonly $id: "file";
1057
- readonly owned: "always";
1058
- readonly presets: readonly ["owned"];
1059
- readonly indexes: readonly ["filename", "link", "mime"];
1060
- readonly properties: {
1061
- readonly mime: {
1062
- readonly type: "string";
1063
- };
1064
- readonly size: {
1065
- readonly type: "number";
1066
- };
1067
- readonly last_modified: {
1068
- readonly type: "string";
1069
- readonly format: "date-time";
1070
- };
1071
- readonly filename: {
1072
- readonly type: "string";
1073
- };
1074
- readonly absolute_path: {
1075
- readonly type: "string";
1076
- };
1077
- readonly relative_path: {
1078
- readonly type: "string";
1079
- };
1080
- readonly immutable: {
1081
- readonly type: "boolean";
1082
- };
1083
- readonly link: {
1084
- readonly getter: (value: any) => Promise<string>;
1085
- };
1086
- readonly download_link: {
1087
- readonly getter: (value: any) => Promise<string>;
1088
- };
1089
- };
1090
- readonly actions: {
1091
- readonly deleteAll: {
1092
- readonly name: "Remover";
1093
- readonly ask: true;
1094
- readonly selection: true;
1095
- };
1096
- };
1097
- readonly individualActions: {
1098
- readonly remove: {
1099
- readonly name: "Remover";
1100
- readonly icon: "trash";
1101
- readonly ask: true;
1102
- };
1103
- };
1104
- }>) => Promise<any>;
1105
- readonly removeAll: (payload: import("@aeriajs/types").RemoveAllPayload, context: import("@aeriajs/types").Context<{
1106
- readonly $id: "file";
1107
- readonly owned: "always";
1108
- readonly presets: readonly ["owned"];
1109
- readonly indexes: readonly ["filename", "link", "mime"];
1110
- readonly properties: {
1111
- readonly mime: {
1112
- readonly type: "string";
1113
- };
1114
- readonly size: {
1115
- readonly type: "number";
1116
- };
1117
- readonly last_modified: {
1118
- readonly type: "string";
1119
- readonly format: "date-time";
1120
- };
1121
- readonly filename: {
1122
- readonly type: "string";
1123
- };
1124
- readonly absolute_path: {
1125
- readonly type: "string";
1126
- };
1127
- readonly relative_path: {
1128
- readonly type: "string";
1129
- };
1130
- readonly immutable: {
1131
- readonly type: "boolean";
1132
- };
1133
- readonly link: {
1134
- readonly getter: (value: any) => Promise<string>;
1135
- };
1136
- readonly download_link: {
1137
- readonly getter: (value: any) => Promise<string>;
1138
- };
1139
- };
1140
- readonly actions: {
1141
- readonly deleteAll: {
1142
- readonly name: "Remover";
1143
- readonly ask: true;
1144
- readonly selection: true;
1145
- };
1146
- };
1147
- readonly individualActions: {
1148
- readonly remove: {
1149
- readonly name: "Remover";
1150
- readonly icon: "trash";
1151
- readonly ask: true;
1152
- };
1153
- };
1154
- }>) => Promise<any>;
552
+ functionContracts: {
553
+ readonly get?: import("@aeriajs/types").Contract | undefined;
554
+ readonly insert?: import("@aeriajs/types").Contract | undefined;
555
+ readonly download?: import("@aeriajs/types").Contract | undefined;
556
+ readonly remove?: import("@aeriajs/types").Contract | undefined;
557
+ readonly removeAll?: import("@aeriajs/types").Contract | undefined;
1155
558
  };
1156
- functionContracts: Partial<{
1157
- readonly get: import("@aeriajs/types").Contract;
1158
- readonly insert: import("@aeriajs/types").Contract;
1159
- readonly download: import("@aeriajs/types").Contract;
1160
- readonly remove: import("@aeriajs/types").Contract;
1161
- readonly removeAll: import("@aeriajs/types").Contract;
1162
- }>;
1163
559
  accessControl: import("@aeriajs/types").AccessControl;
1164
560
  };