@brianbuie/node-kit 0.9.1 → 0.9.2

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.
@@ -0,0 +1,721 @@
1
+ import * as fs from "node:fs";
2
+ import { Readable } from "node:stream";
3
+ import { Duration } from "date-fns";
4
+ import { ChalkInstance } from "chalk";
5
+ import * as qt from "quicktype-core";
6
+ import * as quicktype_core_dist_TargetLanguage_js0 from "quicktype-core/dist/TargetLanguage.js";
7
+ import * as quicktype_core_dist_support_Comments_js0 from "quicktype-core/dist/support/Comments.js";
8
+ import * as quicktype_core_dist_RendererOptions_index_js0 from "quicktype-core/dist/RendererOptions/index.js";
9
+ import * as quicktype_core_dist_RendererOptions_types_js0 from "quicktype-core/dist/RendererOptions/types.js";
10
+ import * as quicktype_core_dist_support_Acronyms_js0 from "quicktype-core/dist/support/Acronyms.js";
11
+ import * as quicktype_core_dist_support_Converters_js0 from "quicktype-core/dist/support/Converters.js";
12
+ import * as quicktype_core_dist_language_Ruby_utils_js0 from "quicktype-core/dist/language/Ruby/utils.js";
13
+ import * as quicktype_core_dist_language_Rust_utils_js0 from "quicktype-core/dist/language/Rust/utils.js";
14
+ import * as quicktype_core_dist_language_Smithy4s_language_js0 from "quicktype-core/dist/language/Smithy4s/language.js";
15
+
16
+ //#region src/File.d.ts
17
+ /**
18
+ * WARNING: API will change!
19
+ */
20
+ declare class File {
21
+ path: string;
22
+ constructor(filepath: string);
23
+ get exists(): boolean;
24
+ delete(): void;
25
+ read(): string | undefined;
26
+ /**
27
+ * @returns lines as strings, removes trailing '\n'
28
+ */
29
+ lines(): string[];
30
+ get readStream(): fs.ReadStream | Readable;
31
+ get writeStream(): fs.WriteStream;
32
+ write(contents: string | ReadableStream): void | Promise<void>;
33
+ /**
34
+ * creates file if it doesn't exist, appends string or array of strings as new lines.
35
+ * File always ends with '\n', so contents don't need to be read before appending
36
+ */
37
+ append(lines: string | string[]): void;
38
+ static get FileType(): typeof FileType;
39
+ json<T>(contents?: T): FileTypeJson<T>;
40
+ static get json(): typeof FileTypeJson;
41
+ ndjson<T extends object>(lines?: T | T[]): FileTypeNdjson<T>;
42
+ static get ndjson(): typeof FileTypeNdjson;
43
+ csv<T extends object>(rows?: T[], keys?: (keyof T)[]): Promise<FileTypeCsv<T>>;
44
+ static get csv(): typeof FileTypeCsv;
45
+ }
46
+ /**
47
+ * A generic file adaptor, extended by specific file type implementations
48
+ */
49
+ declare class FileType {
50
+ file: File;
51
+ constructor(filepath: string, contents?: string);
52
+ get exists(): boolean;
53
+ get path(): string;
54
+ delete(): void;
55
+ }
56
+ /**
57
+ * A .json file that maintains data type when reading/writing.
58
+ * This is unsafe! Type is not checked at runtime, avoid using on files manipulated outside of your application.
59
+ */
60
+ declare class FileTypeJson<T> extends FileType {
61
+ constructor(filepath: string, contents?: T);
62
+ read(): T | undefined;
63
+ write(contents: T): void;
64
+ }
65
+ /**
66
+ * New-line delimited json file (.ndjson)
67
+ * @see https://jsonltools.com/ndjson-format-specification
68
+ */
69
+ declare class FileTypeNdjson<T extends object> extends FileType {
70
+ constructor(filepath: string, lines?: T | T[]);
71
+ append(lines: T | T[]): void;
72
+ lines(): T[];
73
+ }
74
+ type Key<T extends object> = keyof T;
75
+ /**
76
+ * Comma separated values (.csv).
77
+ * Input rows as objects, keys are used as column headers
78
+ */
79
+ declare class FileTypeCsv<Row extends object> extends FileType {
80
+ #private;
81
+ constructor(filepath: string);
82
+ write(rows: Row[], keys?: Key<Row>[]): Promise<void>;
83
+ read(): Promise<Row[]>;
84
+ }
85
+ //#endregion
86
+ //#region src/Dir.d.ts
87
+ /**
88
+ * Reference to a specific directory with helpful methods for resolving filepaths,
89
+ * sanitizing filenames, and saving files.
90
+ */
91
+ declare class Dir {
92
+ path: string;
93
+ /**
94
+ * @param path can be relative to workspace or absolute
95
+ */
96
+ constructor(_path: string);
97
+ create(): void;
98
+ /**
99
+ * Create a new Dir inside the current Dir
100
+ * @param subPath to create in current Dir
101
+ * @example
102
+ * const folder = new Dir('example');
103
+ * // folder.path = './example'
104
+ * const child = folder.subDir('path/to/dir');
105
+ * // child.path = './example/path/to/dir'
106
+ */
107
+ dir(subPath: string): Dir;
108
+ sanitize(name: string): string;
109
+ /**
110
+ * @param base - The file name with extension
111
+ * @example
112
+ * const folder = new Dir('example');
113
+ * const filepath = folder.resolve('file.json');
114
+ * // 'example/file.json'
115
+ */
116
+ filepath(base: string): string;
117
+ file(base: string): File;
118
+ }
119
+ /**
120
+ * Extends Dir class with method to `clear()` contents
121
+ */
122
+ declare class TempDir extends Dir {
123
+ dir(subPath: string): TempDir;
124
+ clear(): void;
125
+ }
126
+ /**
127
+ * Common temp dir location
128
+ */
129
+ declare const temp: TempDir;
130
+ //#endregion
131
+ //#region src/Cache.d.ts
132
+ /**
133
+ * Save data to a local file with an expiration.
134
+ * Fresh/stale data is returned with a flag for if it's fresh or not,
135
+ * so stale data can still be used if needed.
136
+ */
137
+ declare class Cache<T> {
138
+ file: FileTypeJson<{
139
+ savedAt: string;
140
+ data: T;
141
+ }>;
142
+ ttl: Duration;
143
+ constructor(key: string, ttl: number | Duration, initialData?: T);
144
+ write(data: T): void;
145
+ read(): [T | undefined, boolean];
146
+ }
147
+ //#endregion
148
+ //#region src/Fetcher.d.ts
149
+ type Route = string | URL;
150
+ type QueryVal = string | number | boolean | null | undefined;
151
+ type Query = Record<string, QueryVal | QueryVal[]>;
152
+ type FetchOptions = RequestInit & {
153
+ base?: string;
154
+ query?: Query;
155
+ headers?: Record<string, string>;
156
+ data?: any;
157
+ timeout?: number;
158
+ retries?: number;
159
+ retryDelay?: number;
160
+ };
161
+ /**
162
+ * Fetcher provides a quick way to set up a basic API connection
163
+ * with options applied to every request.
164
+ * Includes basic methods for requesting and parsing responses
165
+ */
166
+ declare class Fetcher {
167
+ defaultOptions: {
168
+ body?: BodyInit | null;
169
+ cache?: RequestCache;
170
+ credentials?: RequestCredentials;
171
+ headers?: (HeadersInit & Record<string, string>) | undefined;
172
+ integrity?: string;
173
+ keepalive?: boolean;
174
+ method?: string;
175
+ mode?: RequestMode;
176
+ priority?: RequestPriority;
177
+ redirect?: RequestRedirect;
178
+ referrer?: string;
179
+ referrerPolicy?: ReferrerPolicy;
180
+ signal?: AbortSignal | null;
181
+ window?: null;
182
+ base?: string;
183
+ query?: Query;
184
+ data?: any;
185
+ timeout: number;
186
+ retries: number;
187
+ retryDelay: number;
188
+ };
189
+ constructor(opts?: FetchOptions);
190
+ /**
191
+ * Build URL with URLSearchParams if query is provided.
192
+ * Also returns domain, to help with cookies
193
+ */
194
+ buildUrl(route: Route, opts?: FetchOptions): [URL, string];
195
+ /**
196
+ * Merges options to get headers. Useful when extending the Fetcher class to add custom auth.
197
+ */
198
+ buildHeaders(route: Route, opts?: FetchOptions): HeadersInit & Record<string, string>;
199
+ /**
200
+ * Builds request, merging defaultOptions and provided options.
201
+ * Includes Abort signal for timeout
202
+ */
203
+ buildRequest(route: Route, opts?: FetchOptions): [Request, FetchOptions, string];
204
+ /**
205
+ * Builds and performs the request, merging provided options with defaultOptions.
206
+ * If `opts.data` is provided, method is updated to POST, content-type json, data is stringified in the body.
207
+ * Retries on local or network error, with increasing backoff.
208
+ */
209
+ fetch(route: Route, opts?: FetchOptions): Promise<[Response, Request]>;
210
+ fetchText(route: Route, opts?: FetchOptions): Promise<[string, Response, Request]>;
211
+ fetchJson<T>(route: Route, opts?: FetchOptions): Promise<[T, Response, Request]>;
212
+ }
213
+ //#endregion
214
+ //#region src/Log.d.ts
215
+ type Severity = 'DEFAULT' | 'DEBUG' | 'INFO' | 'NOTICE' | 'WARNING' | 'ERROR' | 'CRITICAL' | 'ALERT' | 'EMERGENCY';
216
+ type Options = {
217
+ severity: Severity;
218
+ color: ChalkInstance;
219
+ };
220
+ declare class Log {
221
+ #private;
222
+ static isTest: boolean;
223
+ /**
224
+ * Handle first argument being a string or an object with a 'message' prop
225
+ * Also snapshots special objects (eg Error, Response) to keep props in later JSON.stringify output
226
+ */
227
+ static prepare(...input: unknown[]): {
228
+ message?: string;
229
+ details: unknown[];
230
+ };
231
+ /**
232
+ * Logs error details before throwing
233
+ */
234
+ static error(...input: unknown[]): void;
235
+ static warn(...input: unknown[]): {
236
+ message: string | undefined;
237
+ details: unknown[];
238
+ options: Options;
239
+ };
240
+ static notice(...input: unknown[]): {
241
+ message: string | undefined;
242
+ details: unknown[];
243
+ options: Options;
244
+ };
245
+ static info(...input: unknown[]): {
246
+ message: string | undefined;
247
+ details: unknown[];
248
+ options: Options;
249
+ };
250
+ static debug(...input: unknown[]): {
251
+ message: string | undefined;
252
+ details: unknown[];
253
+ options: Options;
254
+ } | undefined;
255
+ }
256
+ //#endregion
257
+ //#region src/snapshot.d.ts
258
+ /**
259
+ * Allows special objects (Error, Headers, Set) to be included in JSON.stringify output
260
+ * functions are removed
261
+ */
262
+ declare function snapshot(i: unknown, max?: number, depth?: number): any;
263
+ //#endregion
264
+ //#region src/timeout.d.ts
265
+ declare function timeout(ms: number): Promise<unknown>;
266
+ //#endregion
267
+ //#region src/TypeWriter.d.ts
268
+ declare class TypeWriter {
269
+ moduleName: string;
270
+ input: qt.JSONInput<string>;
271
+ outDir: string;
272
+ qtSettings: {
273
+ lang: string;
274
+ rendererOptions: {
275
+ 'just-types': boolean;
276
+ 'prefer-types': boolean;
277
+ };
278
+ inferEnums: boolean;
279
+ inferDateTimes: boolean;
280
+ } & {
281
+ allPropertiesOptional?: boolean | undefined;
282
+ alphabetizeProperties?: boolean | undefined;
283
+ checkProvenance?: boolean | undefined;
284
+ debugPrintGatherNames?: boolean | undefined;
285
+ debugPrintGraph?: boolean | undefined;
286
+ debugPrintReconstitution?: boolean | undefined;
287
+ debugPrintSchemaResolving?: boolean | undefined;
288
+ debugPrintTimes?: boolean | undefined;
289
+ debugPrintTransformations?: boolean | undefined;
290
+ fixedTopLevels?: boolean | undefined;
291
+ indentation?: string | undefined;
292
+ inputData?: qt.InputData | undefined;
293
+ lang?: "cjson" | "cJSON" | "c++" | "cpp" | "cplusplus" | "crystal" | "cr" | "crystallang" | "cs" | "csharp" | "dart" | "elixir" | "elm" | "flow" | "go" | "golang" | "haskell" | "java" | "javascript" | "js" | "jsx" | "javascript-prop-types" | "schema" | "json-schema" | "kotlin" | "objc" | "objective-c" | "objectivec" | "php" | "pike" | "pikelang" | "python" | "py" | "ruby" | "rust" | "rs" | "rustlang" | "scala3" | "smithy4a" | "swift" | "swift4" | "typescript" | "ts" | "tsx" | "typescript-effect-schema" | "typescript-zod" | qt.TargetLanguage<quicktype_core_dist_TargetLanguage_js0.LanguageConfig> | undefined;
294
+ leadingComments?: quicktype_core_dist_support_Comments_js0.Comment[] | undefined;
295
+ noRender?: boolean | undefined;
296
+ outputFilename?: string | undefined;
297
+ rendererOptions?: qt.RendererOptions<"cjson" | "cJSON" | "c++" | "cpp" | "cplusplus" | "crystal" | "cr" | "crystallang" | "cs" | "csharp" | "dart" | "elixir" | "elm" | "flow" | "go" | "golang" | "haskell" | "java" | "javascript" | "js" | "jsx" | "javascript-prop-types" | "schema" | "json-schema" | "kotlin" | "objc" | "objective-c" | "objectivec" | "php" | "pike" | "pikelang" | "python" | "py" | "ruby" | "rust" | "rs" | "rustlang" | "scala3" | "smithy4a" | "swift" | "swift4" | "typescript" | "ts" | "tsx" | "typescript-effect-schema" | "typescript-zod", quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
298
+ typeSourceStyle: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"source-style", {
299
+ readonly "single-source": true;
300
+ readonly "multi-source": false;
301
+ }, "single-source" | "multi-source">;
302
+ typeIntegerSize: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"integer-size", {
303
+ readonly int8_t: "int8_t";
304
+ readonly int16_t: "int16_t";
305
+ readonly int32_t: "int32_t";
306
+ readonly int64_t: "int64_t";
307
+ }, "int8_t" | "int16_t" | "int32_t" | "int64_t">;
308
+ hashtableSize: quicktype_core_dist_RendererOptions_index_js0.StringOption<"hashtable-size">;
309
+ addTypedefAlias: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"typedef-alias", {
310
+ readonly "no-typedef": false;
311
+ readonly "add-typedef": true;
312
+ }, "no-typedef" | "add-typedef">;
313
+ printStyle: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"print-style", {
314
+ readonly "print-formatted": false;
315
+ readonly "print-unformatted": true;
316
+ }, "print-formatted" | "print-unformatted">;
317
+ typeNamingStyle: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"type-style", {
318
+ readonly "pascal-case": "pascal";
319
+ readonly "underscore-case": "underscore";
320
+ readonly "camel-case": "camel";
321
+ readonly "upper-underscore-case": "upper-underscore";
322
+ readonly "pascal-case-upper-acronyms": "pascal-upper-acronyms";
323
+ readonly "camel-case-upper-acronyms": "camel-upper-acronyms";
324
+ }, "pascal-case" | "underscore-case" | "camel-case" | "upper-underscore-case" | "pascal-case-upper-acronyms" | "camel-case-upper-acronyms">;
325
+ memberNamingStyle: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"member-style", {
326
+ readonly "pascal-case": "pascal";
327
+ readonly "underscore-case": "underscore";
328
+ readonly "camel-case": "camel";
329
+ readonly "upper-underscore-case": "upper-underscore";
330
+ readonly "pascal-case-upper-acronyms": "pascal-upper-acronyms";
331
+ readonly "camel-case-upper-acronyms": "camel-upper-acronyms";
332
+ }, "pascal-case" | "underscore-case" | "camel-case" | "upper-underscore-case" | "pascal-case-upper-acronyms" | "camel-case-upper-acronyms">;
333
+ enumeratorNamingStyle: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"enumerator-style", {
334
+ readonly "pascal-case": "pascal";
335
+ readonly "underscore-case": "underscore";
336
+ readonly "camel-case": "camel";
337
+ readonly "upper-underscore-case": "upper-underscore";
338
+ readonly "pascal-case-upper-acronyms": "pascal-upper-acronyms";
339
+ readonly "camel-case-upper-acronyms": "camel-upper-acronyms";
340
+ }, "pascal-case" | "underscore-case" | "camel-case" | "upper-underscore-case" | "pascal-case-upper-acronyms" | "camel-case-upper-acronyms">;
341
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
342
+ typeSourceStyle: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"source-style", {
343
+ readonly "single-source": true;
344
+ readonly "multi-source": false;
345
+ }, "single-source" | "multi-source">;
346
+ includeLocation: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"include-location", {
347
+ readonly "local-include": true;
348
+ readonly "global-include": false;
349
+ }, "local-include" | "global-include">;
350
+ codeFormat: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"code-format", {
351
+ readonly "with-struct": false;
352
+ readonly "with-getter-setter": true;
353
+ }, "with-struct" | "with-getter-setter">;
354
+ wstring: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"wstring", {
355
+ readonly "use-string": false;
356
+ readonly "use-wstring": true;
357
+ }, "use-string" | "use-wstring">;
358
+ westConst: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"const-style", {
359
+ readonly "west-const": true;
360
+ readonly "east-const": false;
361
+ }, "west-const" | "east-const">;
362
+ justTypes: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"just-types">;
363
+ namespace: quicktype_core_dist_RendererOptions_index_js0.StringOption<"namespace">;
364
+ enumType: quicktype_core_dist_RendererOptions_index_js0.StringOption<"enum-type">;
365
+ typeNamingStyle: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"type-style", {
366
+ readonly "pascal-case": "pascal";
367
+ readonly "underscore-case": "underscore";
368
+ readonly "camel-case": "camel";
369
+ readonly "upper-underscore-case": "upper-underscore";
370
+ readonly "pascal-case-upper-acronyms": "pascal-upper-acronyms";
371
+ readonly "camel-case-upper-acronyms": "camel-upper-acronyms";
372
+ }, "pascal-case" | "underscore-case" | "camel-case" | "upper-underscore-case" | "pascal-case-upper-acronyms" | "camel-case-upper-acronyms">;
373
+ memberNamingStyle: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"member-style", {
374
+ readonly "pascal-case": "pascal";
375
+ readonly "underscore-case": "underscore";
376
+ readonly "camel-case": "camel";
377
+ readonly "upper-underscore-case": "upper-underscore";
378
+ readonly "pascal-case-upper-acronyms": "pascal-upper-acronyms";
379
+ readonly "camel-case-upper-acronyms": "camel-upper-acronyms";
380
+ }, "pascal-case" | "underscore-case" | "camel-case" | "upper-underscore-case" | "pascal-case-upper-acronyms" | "camel-case-upper-acronyms">;
381
+ enumeratorNamingStyle: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"enumerator-style", {
382
+ readonly "pascal-case": "pascal";
383
+ readonly "underscore-case": "underscore";
384
+ readonly "camel-case": "camel";
385
+ readonly "upper-underscore-case": "upper-underscore";
386
+ readonly "pascal-case-upper-acronyms": "pascal-upper-acronyms";
387
+ readonly "camel-case-upper-acronyms": "camel-upper-acronyms";
388
+ }, "pascal-case" | "underscore-case" | "camel-case" | "upper-underscore-case" | "pascal-case-upper-acronyms" | "camel-case-upper-acronyms">;
389
+ boost: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"boost">;
390
+ hideNullOptional: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"hide-null-optional">;
391
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{}> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
392
+ readonly framework: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"framework", {
393
+ readonly NewtonSoft: "NewtonSoft";
394
+ readonly SystemTextJson: "SystemTextJson";
395
+ }, "NewtonSoft" | "SystemTextJson">;
396
+ readonly useList: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"array-type", {
397
+ readonly array: false;
398
+ readonly list: true;
399
+ }, "array" | "list">;
400
+ readonly dense: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"density", {
401
+ readonly normal: false;
402
+ readonly dense: true;
403
+ }, "normal" | "dense">;
404
+ readonly namespace: quicktype_core_dist_RendererOptions_index_js0.StringOption<"namespace">;
405
+ readonly version: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"csharp-version", {
406
+ readonly "5": 5;
407
+ readonly "6": 6;
408
+ }, "5" | "6">;
409
+ readonly virtual: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"virtual">;
410
+ readonly typeForAny: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"any-type", {
411
+ readonly object: "object";
412
+ readonly dynamic: "dynamic";
413
+ }, "object" | "dynamic">;
414
+ readonly useDecimal: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"number-type", {
415
+ readonly double: false;
416
+ readonly decimal: true;
417
+ }, "decimal" | "double">;
418
+ readonly features: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"features", {
419
+ readonly complete: {
420
+ readonly namespaces: true;
421
+ readonly helpers: true;
422
+ readonly attributes: true;
423
+ };
424
+ readonly "attributes-only": {
425
+ readonly namespaces: true;
426
+ readonly helpers: false;
427
+ readonly attributes: true;
428
+ };
429
+ readonly "just-types-and-namespace": {
430
+ readonly namespaces: true;
431
+ readonly helpers: false;
432
+ readonly attributes: false;
433
+ };
434
+ readonly "just-types": {
435
+ readonly namespaces: true;
436
+ readonly helpers: false;
437
+ readonly attributes: false;
438
+ };
439
+ }, "complete" | "just-types" | "attributes-only" | "just-types-and-namespace">;
440
+ readonly baseclass: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"base-class", {
441
+ readonly EntityData: "EntityData";
442
+ readonly Object: undefined;
443
+ }, "EntityData" | "Object">;
444
+ readonly checkRequired: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"check-required">;
445
+ readonly keepPropertyName: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"keep-property-name">;
446
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
447
+ nullSafety: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"null-safety">;
448
+ justTypes: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"just-types">;
449
+ codersInClass: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"coders-in-class">;
450
+ methodNamesWithMap: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"from-map">;
451
+ requiredProperties: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"required-props">;
452
+ finalProperties: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"final-props">;
453
+ generateCopyWith: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"copy-with">;
454
+ useFreezed: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"use-freezed">;
455
+ useHive: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"use-hive">;
456
+ useJsonAnnotation: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"use-json-annotation">;
457
+ partName: quicktype_core_dist_RendererOptions_index_js0.StringOption<"part-name">;
458
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
459
+ justTypes: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"just-types">;
460
+ namespace: quicktype_core_dist_RendererOptions_index_js0.StringOption<"namespace">;
461
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
462
+ justTypes: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"just-types">;
463
+ useList: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"array-type", {
464
+ readonly array: false;
465
+ readonly list: true;
466
+ }, "array" | "list">;
467
+ moduleName: quicktype_core_dist_RendererOptions_index_js0.StringOption<"module">;
468
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
469
+ acronymStyle: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"acronym-style", {
470
+ readonly original: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Original;
471
+ readonly pascal: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Pascal;
472
+ readonly camel: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Camel;
473
+ readonly lowerCase: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Lower;
474
+ }, quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions>;
475
+ runtimeTypecheck: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"runtime-typecheck">;
476
+ runtimeTypecheckIgnoreUnknownProperties: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"runtime-typecheck-ignore-unknown-properties">;
477
+ converters: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"converters", {
478
+ readonly "top-level": quicktype_core_dist_support_Converters_js0.ConvertersOptions.TopLevel;
479
+ readonly "all-objects": quicktype_core_dist_support_Converters_js0.ConvertersOptions.AllObjects;
480
+ }, quicktype_core_dist_support_Converters_js0.ConvertersOptions>;
481
+ rawType: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"raw-type", {
482
+ readonly json: "json";
483
+ readonly any: "any";
484
+ }, "json" | "any">;
485
+ } & {
486
+ justTypes: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"just-types">;
487
+ nicePropertyNames: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"nice-property-names">;
488
+ declareUnions: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"explicit-unions">;
489
+ preferUnions: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"prefer-unions">;
490
+ preferTypes: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"prefer-types">;
491
+ preferConstValues: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"prefer-const-values">;
492
+ readonly: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"readonly">;
493
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
494
+ justTypes: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"just-types">;
495
+ justTypesAndPackage: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"just-types-and-package">;
496
+ packageName: quicktype_core_dist_RendererOptions_index_js0.StringOption<"package">;
497
+ multiFileOutput: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"multi-file-output">;
498
+ fieldTags: quicktype_core_dist_RendererOptions_index_js0.StringOption<"field-tags">;
499
+ omitEmpty: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"omit-empty">;
500
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
501
+ justTypes: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"just-types">;
502
+ useList: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"array-type", {
503
+ readonly array: false;
504
+ readonly list: true;
505
+ }, "array" | "list">;
506
+ moduleName: quicktype_core_dist_RendererOptions_index_js0.StringOption<"module">;
507
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
508
+ useList: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"array-type", {
509
+ readonly array: false;
510
+ readonly list: true;
511
+ }, "array" | "list">;
512
+ justTypes: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"just-types">;
513
+ dateTimeProvider: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"datetime-provider", {
514
+ readonly java8: "java8";
515
+ readonly legacy: "legacy";
516
+ }, "java8" | "legacy">;
517
+ acronymStyle: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"acronym-style", {
518
+ readonly original: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Original;
519
+ readonly pascal: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Pascal;
520
+ readonly camel: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Camel;
521
+ readonly lowerCase: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Lower;
522
+ }, quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions>;
523
+ packageName: quicktype_core_dist_RendererOptions_index_js0.StringOption<"package">;
524
+ lombok: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"lombok">;
525
+ lombokCopyAnnotations: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"lombok-copy-annotations">;
526
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
527
+ acronymStyle: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"acronym-style", {
528
+ readonly original: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Original;
529
+ readonly pascal: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Pascal;
530
+ readonly camel: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Camel;
531
+ readonly lowerCase: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Lower;
532
+ }, quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions>;
533
+ runtimeTypecheck: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"runtime-typecheck">;
534
+ runtimeTypecheckIgnoreUnknownProperties: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"runtime-typecheck-ignore-unknown-properties">;
535
+ converters: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"converters", {
536
+ readonly "top-level": quicktype_core_dist_support_Converters_js0.ConvertersOptions.TopLevel;
537
+ readonly "all-objects": quicktype_core_dist_support_Converters_js0.ConvertersOptions.AllObjects;
538
+ }, quicktype_core_dist_support_Converters_js0.ConvertersOptions>;
539
+ rawType: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"raw-type", {
540
+ readonly json: "json";
541
+ readonly any: "any";
542
+ }, "json" | "any">;
543
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
544
+ acronymStyle: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"acronym-style", {
545
+ readonly original: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Original;
546
+ readonly pascal: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Pascal;
547
+ readonly camel: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Camel;
548
+ readonly lowerCase: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Lower;
549
+ }, quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions>;
550
+ converters: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"converters", {
551
+ readonly "top-level": quicktype_core_dist_support_Converters_js0.ConvertersOptions.TopLevel;
552
+ readonly "all-objects": quicktype_core_dist_support_Converters_js0.ConvertersOptions.AllObjects;
553
+ }, quicktype_core_dist_support_Converters_js0.ConvertersOptions>;
554
+ moduleSystem: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"module-system", {
555
+ readonly "common-js": false;
556
+ readonly es6: true;
557
+ }, "common-js" | "es6">;
558
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
559
+ framework: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"framework", {
560
+ readonly "just-types": "None";
561
+ readonly jackson: "Jackson";
562
+ readonly klaxon: "Klaxon";
563
+ readonly kotlinx: "KotlinX";
564
+ }, "just-types" | "jackson" | "klaxon" | "kotlinx">;
565
+ acronymStyle: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"acronym-style", {
566
+ readonly original: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Original;
567
+ readonly pascal: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Pascal;
568
+ readonly camel: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Camel;
569
+ readonly lowerCase: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Lower;
570
+ }, quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions>;
571
+ packageName: quicktype_core_dist_RendererOptions_index_js0.StringOption<"package">;
572
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
573
+ features: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"features", {
574
+ readonly all: {
575
+ readonly interface: true;
576
+ readonly implementation: true;
577
+ };
578
+ readonly interface: {
579
+ readonly interface: true;
580
+ readonly implementation: false;
581
+ };
582
+ readonly implementation: {
583
+ readonly interface: false;
584
+ readonly implementation: true;
585
+ };
586
+ }, "all" | "interface" | "implementation">;
587
+ justTypes: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"just-types">;
588
+ marshallingFunctions: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"functions">;
589
+ classPrefix: quicktype_core_dist_RendererOptions_index_js0.StringOption<"class-prefix">;
590
+ extraComments: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"extra-comments">;
591
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
592
+ withGet: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"with-get">;
593
+ fastGet: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"fast-get">;
594
+ withSet: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"with-set">;
595
+ withClosing: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"with-closing">;
596
+ acronymStyle: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"acronym-style", {
597
+ readonly original: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Original;
598
+ readonly pascal: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Pascal;
599
+ readonly camel: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Camel;
600
+ readonly lowerCase: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Lower;
601
+ }, quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions>;
602
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
603
+ features: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"python-version", {
604
+ readonly "3.5": {
605
+ readonly typeHints: false;
606
+ readonly dataClasses: false;
607
+ };
608
+ readonly "3.6": {
609
+ readonly typeHints: true;
610
+ readonly dataClasses: false;
611
+ };
612
+ readonly "3.7": {
613
+ readonly typeHints: true;
614
+ readonly dataClasses: true;
615
+ };
616
+ }, "3.5" | "3.6" | "3.7">;
617
+ justTypes: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"just-types">;
618
+ nicePropertyNames: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"nice-property-names">;
619
+ pydanticBaseModel: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"pydantic-base-model">;
620
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
621
+ justTypes: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"just-types">;
622
+ strictness: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"strictness", {
623
+ readonly strict: quicktype_core_dist_language_Ruby_utils_js0.Strictness.Strict;
624
+ readonly coercible: quicktype_core_dist_language_Ruby_utils_js0.Strictness.Coercible;
625
+ readonly none: quicktype_core_dist_language_Ruby_utils_js0.Strictness.None;
626
+ }, "none" | "strict" | "coercible">;
627
+ namespace: quicktype_core_dist_RendererOptions_index_js0.StringOption<"namespace">;
628
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
629
+ readonly density: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"density", {
630
+ readonly normal: quicktype_core_dist_language_Rust_utils_js0.Density.Normal;
631
+ readonly dense: quicktype_core_dist_language_Rust_utils_js0.Density.Dense;
632
+ }, "normal" | "dense">;
633
+ readonly visibility: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"visibility", {
634
+ readonly private: quicktype_core_dist_language_Rust_utils_js0.Visibility.Private;
635
+ readonly crate: quicktype_core_dist_language_Rust_utils_js0.Visibility.Crate;
636
+ readonly public: quicktype_core_dist_language_Rust_utils_js0.Visibility.Public;
637
+ }, "private" | "public" | "crate">;
638
+ readonly deriveDebug: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"derive-debug">;
639
+ readonly deriveClone: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"derive-clone">;
640
+ readonly derivePartialEq: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"derive-partial-eq">;
641
+ readonly skipSerializingNone: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"skip-serializing-none">;
642
+ readonly edition2018: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"edition-2018">;
643
+ readonly leadingComments: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"leading-comments">;
644
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
645
+ framework: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"framework", {
646
+ readonly "just-types": "None";
647
+ readonly circe: "Circe";
648
+ readonly upickle: "Upickle";
649
+ }, "just-types" | "circe" | "upickle">;
650
+ packageName: quicktype_core_dist_RendererOptions_index_js0.StringOption<"package">;
651
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
652
+ framework: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"framework", {
653
+ readonly "just-types": quicktype_core_dist_language_Smithy4s_language_js0.Framework;
654
+ }, "just-types">;
655
+ packageName: quicktype_core_dist_RendererOptions_index_js0.StringOption<"package">;
656
+ }> | quicktype_core_dist_RendererOptions_types_js0.OptionMap<{
657
+ justTypes: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"just-types">;
658
+ convenienceInitializers: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"initializers">;
659
+ explicitCodingKeys: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"coding-keys">;
660
+ codingKeysProtocol: quicktype_core_dist_RendererOptions_index_js0.StringOption<"coding-keys-protocol">;
661
+ alamofire: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"alamofire">;
662
+ namedTypePrefix: quicktype_core_dist_RendererOptions_index_js0.StringOption<"type-prefix">;
663
+ useClasses: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"struct-or-class", {
664
+ readonly struct: false;
665
+ readonly class: true;
666
+ }, "class" | "struct">;
667
+ mutableProperties: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"mutable-properties">;
668
+ acronymStyle: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"acronym-style", {
669
+ readonly original: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Original;
670
+ readonly pascal: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Pascal;
671
+ readonly camel: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Camel;
672
+ readonly lowerCase: quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions.Lower;
673
+ }, quicktype_core_dist_support_Acronyms_js0.AcronymStyleOptions>;
674
+ dense: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"density", {
675
+ readonly dense: true;
676
+ readonly normal: false;
677
+ }, "normal" | "dense">;
678
+ linux: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"support-linux">;
679
+ objcSupport: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"objective-c-support">;
680
+ optionalEnums: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"optional-enums">;
681
+ swift5Support: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"swift-5-support">;
682
+ sendable: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"sendable">;
683
+ multiFileOutput: quicktype_core_dist_RendererOptions_index_js0.BooleanOption<"multi-file-output">;
684
+ accessLevel: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"access-level", {
685
+ readonly internal: "internal";
686
+ readonly public: "public";
687
+ }, "internal" | "public">;
688
+ protocol: quicktype_core_dist_RendererOptions_index_js0.EnumOption<"protocol", {
689
+ readonly none: {
690
+ readonly equatable: false;
691
+ readonly hashable: false;
692
+ };
693
+ readonly equatable: {
694
+ readonly equatable: true;
695
+ readonly hashable: false;
696
+ };
697
+ readonly hashable: {
698
+ readonly equatable: false;
699
+ readonly hashable: true;
700
+ };
701
+ }, "none" | "equatable" | "hashable">;
702
+ }>> | undefined;
703
+ inferMaps?: boolean | undefined;
704
+ inferEnums?: boolean | undefined;
705
+ inferUuids?: boolean | undefined;
706
+ inferDateTimes?: boolean | undefined;
707
+ inferIntegerStrings?: boolean | undefined;
708
+ inferBooleanStrings?: boolean | undefined;
709
+ combineClasses?: boolean | undefined;
710
+ ignoreJsonRefs?: boolean | undefined;
711
+ };
712
+ constructor(moduleName: string, settings?: {
713
+ outDir?: string;
714
+ } & Partial<qt.Options>);
715
+ addMember(name: string, _samples: any[]): Promise<void>;
716
+ toString(): Promise<string>;
717
+ toFile(): Promise<void>;
718
+ }
719
+ //#endregion
720
+ export { Cache, Dir, type FetchOptions, Fetcher, File, FileType, FileTypeCsv, FileTypeJson, FileTypeNdjson, Log, type Query, type Route, TempDir, TypeWriter, snapshot, temp, timeout };
721
+ //# sourceMappingURL=index.d.mts.map