1 | /**
|
2 | * ```ts
|
3 | * import type { FoxxManifest } from "arangojs/foxx-manifest.js";
|
4 | * ```
|
5 | *
|
6 | * The "foxx-manifest" module provides the Foxx manifest type for TypeScript.
|
7 | *
|
8 | * Generated from [JSON Schema](http://json.schemastore.org/foxx-manifest)
|
9 | * using `json-schema-to-typescript`.
|
10 | *
|
11 | * @packageDocumentation
|
12 | */
|
13 | /**
|
14 | * Schema for ArangoDB Foxx service manifests.
|
15 | */
|
16 | export type FoxxManifest = {
|
17 | /**
|
18 | * An object defining the configuration options this service requires.
|
19 | */
|
20 | configuration?: Record<string, Configuration>;
|
21 | /**
|
22 | * If specified, the / (root) route of the service will automatically redirect to the given relative path, e.g. "index.html".
|
23 | */
|
24 | defaultDocument?: string;
|
25 | /**
|
26 | * The dependencies this service uses, i.e. which APIs its dependencies need to be compatible with.
|
27 | */
|
28 | dependencies?: Record<string, string | Dependency>;
|
29 | /**
|
30 | * The dependencies this provides, i.e. which APIs it claims to be compatible with.
|
31 | */
|
32 | provides?: Record<string, string>;
|
33 | /**
|
34 | * An object indicating the semantic version ranges of ArangoDB (or compatible environments) the service will be compatible with.
|
35 | */
|
36 | engines?: Record<string, string> & {
|
37 | arangodb?: string;
|
38 | };
|
39 | /**
|
40 | * An object defining file assets served by this service.
|
41 | */
|
42 | files?: Record<string, string | File>;
|
43 | /**
|
44 | * The relative path to the Foxx JavaScript files in the service, e.g. "lib". Defaults to the folder containing this manifest.
|
45 | */
|
46 | lib?: string;
|
47 | /**
|
48 | * The relative path to the main entry point of this service (relative to lib), e.g. "index.js".
|
49 | */
|
50 | main?: string;
|
51 | /**
|
52 | * An object defining named scripts provided by this service, which can either be used directly or as queued jobs by other services.
|
53 | */
|
54 | scripts?: Record<string, string>;
|
55 | /**
|
56 | * A path/pattern or list of paths/patterns of JavaScript tests provided for this service.
|
57 | */
|
58 | tests?: string | string[];
|
59 | /**
|
60 | * The full name of the author of the service (i.e. you). This will be shown in the web interface.
|
61 | */
|
62 | author?: string;
|
63 | /**
|
64 | * A list of names of people that have contributed to the development of the service in some way. This will be shown in the web interface.
|
65 | */
|
66 | contributors?: string[];
|
67 | /**
|
68 | * A human-readable description of the service. This will be shown in the web interface.
|
69 | */
|
70 | description?: string;
|
71 | /**
|
72 | * A list of keywords that help categorize this service. This is used by the Foxx Store installers to organize services.
|
73 | */
|
74 | keywords?: string[];
|
75 | /**
|
76 | * A string identifying the license under which the service is published, ideally in the form of an SPDX license identifier. This will be shown in the web interface.
|
77 | */
|
78 | license?: string;
|
79 | /**
|
80 | * The name of the Foxx service. This will be shown in the web interface.
|
81 | */
|
82 | name?: string;
|
83 | /**
|
84 | * The filename of a thumbnail that will be used alongside the service in the web interface. This should be a JPEG or PNG image that looks good at sizes 50x50 and 160x160.
|
85 | */
|
86 | thumbnail?: string;
|
87 | /**
|
88 | * The version number of the Foxx service. The version number must follow the semantic versioning format. This will be shown in the web interface.
|
89 | */
|
90 | version?: string;
|
91 | };
|
92 | /**
|
93 | * A configuration option.
|
94 | */
|
95 | export type Configuration = {
|
96 | /**
|
97 | * A human-readable description of the option.
|
98 | */
|
99 | description?: string;
|
100 | /**
|
101 | * The type of value expected for this option.
|
102 | */
|
103 | type: "integer" | "boolean" | "number" | "string" | "json" | "password" | "int" | "bool";
|
104 | /**
|
105 | * The default value for this option in plain JSON. Can be omitted to provide no default value.
|
106 | */
|
107 | default?: any;
|
108 | /**
|
109 | * Whether the service can not function without this option. Defaults to true unless a default value is provided.
|
110 | */
|
111 | required?: boolean;
|
112 | };
|
113 | /**
|
114 | * A service dependency.
|
115 | */
|
116 | export type Dependency = {
|
117 | /**
|
118 | * Name of the API the service expects.
|
119 | */
|
120 | name?: string;
|
121 | /**
|
122 | * The semantic version ranges of the API the service expects.
|
123 | */
|
124 | version?: string;
|
125 | /**
|
126 | * A description of how the API is used or why it is needed.
|
127 | */
|
128 | description?: string;
|
129 | /**
|
130 | * Whether the service can not function without this dependency.
|
131 | */
|
132 | required?: boolean;
|
133 | /**
|
134 | * Whether the dependency can be specified more than once.
|
135 | */
|
136 | multiple?: boolean;
|
137 | };
|
138 | /**
|
139 | * A service file asset.
|
140 | */
|
141 | export type File = {
|
142 | /**
|
143 | * Relative path of the file or folder within the service.
|
144 | */
|
145 | path: string;
|
146 | /**
|
147 | * If set to true the file will be served with gzip-encoding if supported by the client. This can be useful when serving text files like client-side JavaScript, CSS or HTML.
|
148 | */
|
149 | gzip?: boolean;
|
150 | /**
|
151 | * The MIME content type of the file. Defaults to an intelligent guess based on the filename's extension.
|
152 | */
|
153 | type?: string;
|
154 | };
|
155 | //# sourceMappingURL=foxx-manifest.d.ts.map |
\ | No newline at end of file |