suparisma 0.0.1

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.
Files changed (43) hide show
  1. package/.gitattributes +2 -0
  2. package/LICENSE +21 -0
  3. package/README.md +4 -0
  4. package/dist/config.js +7 -0
  5. package/dist/generated/supabase-client-generated.js +7 -0
  6. package/dist/generators/coreGenerator.js +1430 -0
  7. package/dist/generators/hookGenerator.js +108 -0
  8. package/dist/generators/indexGenerator.js +100 -0
  9. package/dist/generators/supabaseClientGenerator.js +29 -0
  10. package/dist/generators/typeGenerator.js +566 -0
  11. package/dist/hooks/generated/UserTypes.js +2 -0
  12. package/dist/hooks/generated/core.js +1089 -0
  13. package/dist/hooks/generated/index.js +33 -0
  14. package/dist/hooks/generated/useSuparismaUser.js +60 -0
  15. package/dist/index.js +259 -0
  16. package/dist/parser.js +117 -0
  17. package/dist/types.js +2 -0
  18. package/package.json +28 -0
  19. package/prisma/schema.prisma +22 -0
  20. package/src/config.ts +7 -0
  21. package/src/generated/hooks/useSuparismaUser.ts +77 -0
  22. package/src/generated/index.ts +50 -0
  23. package/src/generated/types/UserTypes.ts +400 -0
  24. package/src/generated/utils/core.ts +1413 -0
  25. package/src/generated/utils/supabase-client.ts +7 -0
  26. package/src/generators/coreGenerator.ts +1426 -0
  27. package/src/generators/hookGenerator.ts +110 -0
  28. package/src/generators/indexGenerator.ts +117 -0
  29. package/src/generators/supabaseClientGenerator.ts +24 -0
  30. package/src/generators/typeGenerator.ts +587 -0
  31. package/src/index.ts +339 -0
  32. package/src/parser.ts +134 -0
  33. package/src/suparisma/generated/UserTypes.ts +400 -0
  34. package/src/suparisma/generated/core.ts +1413 -0
  35. package/src/suparisma/generated/hooks/useSuparismaUser.ts +77 -0
  36. package/src/suparisma/generated/index.ts +50 -0
  37. package/src/suparisma/generated/supabase-client-generated.ts +9 -0
  38. package/src/suparisma/generated/types/UserTypes.ts +400 -0
  39. package/src/suparisma/generated/useSuparismaUser.ts +77 -0
  40. package/src/suparisma/generated/utils/core.ts +1413 -0
  41. package/src/suparisma/generated/utils/supabase-client.ts +7 -0
  42. package/src/types.ts +57 -0
  43. package/tsconfig.json +20 -0
@@ -0,0 +1,566 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.generateModelTypesFile = generateModelTypesFile;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const path_1 = __importDefault(require("path"));
9
+ const config_1 = require("../config");
10
+ /**
11
+ * Generate model-specific types for a model
12
+ */
13
+ function generateModelTypesFile(model) {
14
+ const modelName = model.name || '';
15
+ const tableName = model.mappedName || modelName;
16
+ // Identify foreign key fields (these end with _id)
17
+ const foreignKeyFields = model.fields
18
+ .filter((field) => field.name.endsWith('_id') || field.name === 'userId')
19
+ .map((field) => field.name);
20
+ // Identify relation object fields (these are relation fields but not foreign keys)
21
+ const relationObjectFields = model.fields
22
+ .filter((field) => field.isRelation && !foreignKeyFields.includes(field.name))
23
+ .map((field) => field.name);
24
+ // Fields that have default values (should be optional in CreateInput)
25
+ const defaultValueFields = model.fields
26
+ .filter((field) => field.hasDefaultValue)
27
+ .map((field) => field.name);
28
+ // Timestamps should be excluded completely
29
+ const autoTimestampFields = model.fields
30
+ .filter((field) => field.isCreatedAt || field.isUpdatedAt)
31
+ .map((field) => field.name);
32
+ // Collect default values into a map (will be passed to the hook)
33
+ const defaultValues = {};
34
+ model.fields
35
+ .filter((field) => field.hasDefaultValue && field.defaultValue !== undefined)
36
+ .forEach((field) => {
37
+ defaultValues[field.name] = field.defaultValue;
38
+ });
39
+ // Extract searchable fields from annotations
40
+ const searchFields = model.searchFields?.map((field) => field.name) || [];
41
+ // Create a manual property list for WithRelations interface
42
+ const withRelationsProps = model.fields
43
+ .filter((field) => !relationObjectFields.includes(field.name) && !foreignKeyFields.includes(field.name))
44
+ .map((field) => {
45
+ const isOptional = field.isOptional;
46
+ const type = field.type === 'Int'
47
+ ? 'number'
48
+ : field.type === 'Float'
49
+ ? 'number'
50
+ : field.type === 'Boolean'
51
+ ? 'boolean'
52
+ : 'string';
53
+ return ` ${field.name}${isOptional ? '?' : ''}: ${type};`;
54
+ });
55
+ // Add foreign key fields
56
+ foreignKeyFields.forEach((field) => {
57
+ const fieldInfo = model.fields.find((f) => f.name === field);
58
+ if (fieldInfo) {
59
+ withRelationsProps.push(` ${field}${fieldInfo.isOptional ? '?' : ''}: ${fieldInfo.type === 'Int' ? 'number' : 'string'};`);
60
+ }
61
+ });
62
+ // Create a manual property list for CreateInput
63
+ const createInputProps = model.fields
64
+ .filter((field) => !relationObjectFields.includes(field.name) &&
65
+ !autoTimestampFields.includes(field.name) &&
66
+ !foreignKeyFields.includes(field.name))
67
+ .map((field) => {
68
+ // Make fields with default values optional in CreateInput
69
+ const isOptional = field.isOptional || defaultValueFields.includes(field.name);
70
+ const type = field.type === 'Int'
71
+ ? 'number'
72
+ : field.type === 'Float'
73
+ ? 'number'
74
+ : field.type === 'Boolean'
75
+ ? 'boolean'
76
+ : 'string';
77
+ return ` ${field.name}${isOptional ? '?' : ''}: ${type};`;
78
+ });
79
+ // Add foreign key fields to CreateInput
80
+ foreignKeyFields.forEach((field) => {
81
+ const fieldInfo = model.fields.find((f) => f.name === field);
82
+ if (fieldInfo) {
83
+ // Make foreign key fields with default values optional
84
+ const isOptional = fieldInfo.isOptional || defaultValueFields.includes(field);
85
+ createInputProps.push(` ${field}${isOptional ? '?' : ''}: ${fieldInfo.type === 'Int' ? 'number' : 'string'};`);
86
+ }
87
+ });
88
+ // Generate the type content with TSDoc comments
89
+ const typeContent = `// THIS FILE IS AUTO-GENERATED - DO NOT EDIT DIRECTLY
90
+ // Edit the generator script instead
91
+
92
+ import type { ${modelName} } from '@prisma/client';
93
+ import type { ModelResult, SuparismaOptions, SearchQuery, SearchState } from './core';
94
+
95
+ /**
96
+ * Extended ${modelName} type that includes relation fields.
97
+ * This represents the complete shape of ${modelName} records returned from the database.
98
+ */
99
+ export interface ${modelName}WithRelations {
100
+ ${withRelationsProps.join('\n')}
101
+ }
102
+
103
+ /**
104
+ * Input type for creating a new ${modelName} record.
105
+ * Fields with default values are optional and will be filled automatically if not provided.
106
+ *
107
+ * @example
108
+ * // Create a minimal ${modelName.toLowerCase()}
109
+ * ${modelName.toLowerCase()}.create({
110
+ * // Required fields only
111
+ ${createInputProps
112
+ .filter((p) => !p.includes('?'))
113
+ .slice(0, 2)
114
+ .map((p) => ' * ' + p.trim().replace(';', ','))
115
+ .join('\n')}
116
+ * });
117
+ *
118
+ * @example
119
+ * // Create with optional fields
120
+ * ${modelName.toLowerCase()}.create({
121
+ * // All fields including optional ones
122
+ ${createInputProps
123
+ .slice(0, 3)
124
+ .map((p) => ' * ' + p.trim().replace(';', ','))
125
+ .join('\n')}
126
+ * });
127
+ */
128
+ export interface ${modelName}CreateInput {
129
+ ${createInputProps.join('\n')}
130
+ }
131
+
132
+ /**
133
+ * Input type for updating an existing ${modelName} record.
134
+ * All fields are optional since you only need to specify the fields you want to change.
135
+ *
136
+ * @example
137
+ * // Update a ${modelName.toLowerCase()}'s fields
138
+ * ${modelName.toLowerCase()}.update({
139
+ * where: { id: "123" },
140
+ * data: {
141
+ ${createInputProps
142
+ .slice(0, 2)
143
+ .map((p) => ' * ' + p.trim().replace(';', ','))
144
+ .join('\n')}
145
+ * }
146
+ * });
147
+ */
148
+ export type ${modelName}UpdateInput = Partial<${modelName}CreateInput>;
149
+
150
+ /**
151
+ * Filter type for querying ${modelName} records.
152
+ * You can filter by any field in the model using equality or advanced filter operators.
153
+ *
154
+ * @example
155
+ * // Basic filtering
156
+ * ${modelName.toLowerCase()}.findMany({
157
+ * where: {
158
+ ${withRelationsProps
159
+ .slice(0, 2)
160
+ .map((p) => {
161
+ const field = p.trim().split(':')[0].trim();
162
+ return ` * ${field}: "value"`;
163
+ })
164
+ .join(',\n')}
165
+ * }
166
+ * });
167
+ *
168
+ * @example
169
+ * // Advanced filtering
170
+ * ${modelName.toLowerCase()}.findMany({
171
+ * where: {
172
+ * // Use advanced operators
173
+ ${withRelationsProps
174
+ .slice(0, 1)
175
+ .map((p) => {
176
+ const field = p.trim().split(':')[0].trim();
177
+ return ` * ${field}: { contains: "partial" }`;
178
+ })
179
+ .join(',\n')}
180
+ * }
181
+ * });
182
+ */
183
+ export type ${modelName}WhereInput = Partial<${modelName}WithRelations>;
184
+
185
+ /**
186
+ * Unique identifier for finding a specific ${modelName} record.
187
+ * Usually uses the ID field but can be any field marked as @unique in the schema.
188
+ *
189
+ * @example
190
+ * // Find by ID
191
+ * ${modelName.toLowerCase()}.findUnique({ id: "123" });
192
+ *
193
+ * @example
194
+ * // Delete by ID
195
+ * ${modelName.toLowerCase()}.delete({ id: "123" });
196
+ */
197
+ export type ${modelName}WhereUniqueInput = {
198
+ ${model.fields
199
+ .filter((field) => field.isId)
200
+ .map((field) => {
201
+ return `${field.name}${field.isOptional ? '?' : ''}: ${field.type === 'Int' ? 'number' : 'string'};`;
202
+ })
203
+ .join('\n ')}
204
+ };
205
+
206
+ /**
207
+ * Sort options for ${modelName} queries.
208
+ * Specify the field to sort by and the direction ('asc' or 'desc').
209
+ *
210
+ * @example
211
+ * // Sort by creation date, newest first
212
+ * ${modelName.toLowerCase()}.findMany({
213
+ * orderBy: { created_at: 'desc' }
214
+ * });
215
+ *
216
+ * @example
217
+ * // Sort alphabetically
218
+ * ${modelName.toLowerCase()}.findMany({
219
+ * orderBy: { name: 'asc' }
220
+ * });
221
+ */
222
+ export type ${modelName}OrderByInput = {
223
+ [key in keyof ${modelName}WithRelations]?: 'asc' | 'desc';
224
+ };
225
+
226
+ /**
227
+ * Result type for operations that return a single ${modelName} record.
228
+ */
229
+ export type ${modelName}SingleResult = ModelResult<${modelName}WithRelations>;
230
+
231
+ /**
232
+ * Result type for operations that return multiple ${modelName} records.
233
+ */
234
+ export type ${modelName}ManyResult = ModelResult<${modelName}WithRelations[]>;
235
+
236
+ /**
237
+ * Configuration options for the ${modelName} hook.
238
+ */
239
+ export type Use${modelName}Options = SuparismaOptions<${modelName}WhereInput, ${modelName}OrderByInput>;
240
+
241
+ /**
242
+ * The complete API for interacting with ${modelName} records.
243
+ * This interface defines all available operations and state properties.
244
+ */
245
+ export interface ${modelName}HookApi {
246
+ /**
247
+ * Current array of ${modelName} records.
248
+ * This is automatically updated when:
249
+ * - The initial data is loaded
250
+ * - Mutations are performed (create, update, delete)
251
+ * - Real-time updates are received from other clients
252
+ * - The refresh method is called
253
+ *
254
+ * @example
255
+ * // Render a list of ${modelName.toLowerCase()} records
256
+ * const { data } = ${modelName.toLowerCase()};
257
+ * return (
258
+ * <ul>
259
+ * {data.map(item => (
260
+ * <li key={item.id}>{item.name}</li>
261
+ * ))}
262
+ * </ul>
263
+ * );
264
+ */
265
+ data: ${modelName}WithRelations[];
266
+
267
+ /**
268
+ * Error object if the last operation failed, null otherwise.
269
+ *
270
+ * @example
271
+ * // Handle potential errors
272
+ * const { error } = ${modelName.toLowerCase()};
273
+ * if (error) {
274
+ * return <div>Error: {error.message}</div>;
275
+ * }
276
+ */
277
+ error: Error | null;
278
+
279
+ /**
280
+ * Boolean indicating if an operation is in progress.
281
+ *
282
+ * @example
283
+ * // Show loading state
284
+ * const { loading } = ${modelName.toLowerCase()};
285
+ * if (loading) {
286
+ * return <div>Loading...</div>;
287
+ * }
288
+ */
289
+ loading: boolean;
290
+
291
+ ${searchFields.length > 0
292
+ ? `/**
293
+ * Search functionality for ${modelName} records.
294
+ * Only available for models with @enableSearch fields.
295
+ *
296
+ * @example
297
+ * // Search for records containing a term
298
+ * ${modelName.toLowerCase()}.search.addQuery({ field: "name", value: "smith" });
299
+ *
300
+ * @example
301
+ * // Clear search and return to normal data
302
+ * ${modelName.toLowerCase()}.search.clearQueries();
303
+ */
304
+ search: SearchState;`
305
+ : ''}
306
+
307
+ /**
308
+ * Find a single ${modelName} record by its unique identifier.
309
+ *
310
+ * @param where - The unique identifier to find the record by
311
+ * @returns A promise with the found record or error
312
+ *
313
+ * @example
314
+ * // Find ${modelName.toLowerCase()} by ID
315
+ * const result = await ${modelName.toLowerCase()}.findUnique({ id: "123" });
316
+ * if (result.data) {
317
+ * console.log("Found ${modelName.toLowerCase()}:", result.data);
318
+ * }
319
+ */
320
+ findUnique: (where: ${modelName}WhereUniqueInput) => ${modelName}SingleResult;
321
+
322
+ /**
323
+ * Find multiple ${modelName} records matching the filter criteria.
324
+ * Supports filtering, sorting, and pagination.
325
+ *
326
+ * @param params - Optional query parameters
327
+ * @returns A promise with the matching records or error
328
+ *
329
+ * @example
330
+ * // Get all ${modelName.toLowerCase()} records
331
+ * const result = await ${modelName.toLowerCase()}.findMany();
332
+ *
333
+ * @example
334
+ * // Filter and sort records
335
+ * const result = await ${modelName.toLowerCase()}.findMany({
336
+ * where: { active: true },
337
+ * orderBy: { created_at: 'desc' },
338
+ * take: 10,
339
+ * skip: 0
340
+ * });
341
+ */
342
+ findMany: (params?: {
343
+ where?: ${modelName}WhereInput;
344
+ orderBy?: ${modelName}OrderByInput;
345
+ take?: number;
346
+ skip?: number;
347
+ }) => ${modelName}ManyResult;
348
+
349
+ /**
350
+ * Find the first ${modelName} record matching the filter criteria.
351
+ *
352
+ * @param params - Optional query parameters
353
+ * @returns A promise with the first matching record or error
354
+ *
355
+ * @example
356
+ * // Find the first active ${modelName.toLowerCase()}
357
+ * const result = await ${modelName.toLowerCase()}.findFirst({
358
+ * where: { active: true }
359
+ * });
360
+ *
361
+ * @example
362
+ * // Find the oldest ${modelName.toLowerCase()}
363
+ * const result = await ${modelName.toLowerCase()}.findFirst({
364
+ * orderBy: { created_at: 'asc' }
365
+ * });
366
+ */
367
+ findFirst: (params?: {
368
+ where?: ${modelName}WhereInput;
369
+ orderBy?: ${modelName}OrderByInput;
370
+ }) => ${modelName}SingleResult;
371
+
372
+ /**
373
+ * Create a new ${modelName} record.
374
+ * Fields with default values are optional and will use their defaults if not provided.
375
+ *
376
+ * @param data - The data for the new record
377
+ * @returns A promise with the created record or error
378
+ *
379
+ * @example
380
+ * // Create a new ${modelName.toLowerCase()}
381
+ * const result = await ${modelName.toLowerCase()}.create({
382
+ ${createInputProps
383
+ .filter((p) => !p.includes('?'))
384
+ .slice(0, 2)
385
+ .map((p) => {
386
+ const field = p.trim().split(':')[0].trim();
387
+ const type = p.includes('number') ? 42 : p.includes('boolean') ? 'true' : '"value"';
388
+ return ` * ${field}: ${type}`;
389
+ })
390
+ .join(',\n')}
391
+ * });
392
+ *
393
+ * @example
394
+ * // Create with custom ID (overriding default)
395
+ * const result = await ${modelName.toLowerCase()}.create({
396
+ * id: "custom-id",
397
+ ${createInputProps
398
+ .filter((p) => !p.includes('?'))
399
+ .slice(0, 1)
400
+ .map((p) => {
401
+ const field = p.trim().split(':')[0].trim();
402
+ if (field === 'id')
403
+ return '';
404
+ const type = p.includes('number') ? 42 : p.includes('boolean') ? 'true' : '"value"';
405
+ return ` * ${field}: ${type}`;
406
+ })
407
+ .join(',\n')}
408
+ * });
409
+ */
410
+ create: (data: ${modelName}CreateInput) => ${modelName}SingleResult;
411
+
412
+ /**
413
+ * Update an existing ${modelName} record.
414
+ *
415
+ * @param params - Object with the record identifier and fields to update
416
+ * @returns A promise with the updated record or error
417
+ *
418
+ * @example
419
+ * // Update a ${modelName.toLowerCase()}'s fields
420
+ * const result = await ${modelName.toLowerCase()}.update({
421
+ * where: { id: "123" },
422
+ * data: {
423
+ ${createInputProps
424
+ .slice(0, 2)
425
+ .map((p) => {
426
+ const field = p.trim().split(':')[0].trim();
427
+ if (field === 'id')
428
+ return '';
429
+ const type = p.includes('number') ? 42 : p.includes('boolean') ? 'true' : '"updated value"';
430
+ return ` * ${field}: ${type}`;
431
+ })
432
+ .filter(Boolean)
433
+ .join(',\n')}
434
+ * }
435
+ * });
436
+ */
437
+ update: (params: {
438
+ where: ${modelName}WhereUniqueInput;
439
+ data: ${modelName}UpdateInput;
440
+ }) => ${modelName}SingleResult;
441
+
442
+ /**
443
+ * Delete a ${modelName} record by its unique identifier.
444
+ *
445
+ * @param where - The unique identifier of the record to delete
446
+ * @returns A promise with the deleted record or error
447
+ *
448
+ * @example
449
+ * // Delete a ${modelName.toLowerCase()} by ID
450
+ * const result = await ${modelName.toLowerCase()}.delete({ id: "123" });
451
+ * if (result.data) {
452
+ * console.log("Deleted ${modelName.toLowerCase()}:", result.data);
453
+ * }
454
+ */
455
+ delete: (where: ${modelName}WhereUniqueInput) => ${modelName}SingleResult;
456
+
457
+ /**
458
+ * Delete multiple ${modelName} records matching the filter criteria.
459
+ *
460
+ * @param params - Optional filter parameters
461
+ * @returns A promise with the count of deleted records or error
462
+ *
463
+ * @example
464
+ * // Delete all inactive ${modelName.toLowerCase()} records
465
+ * const result = await ${modelName.toLowerCase()}.deleteMany({
466
+ * where: { active: false }
467
+ * });
468
+ * console.log(\`Deleted \${result.count} records\`);
469
+ *
470
+ * @example
471
+ * // Delete all ${modelName.toLowerCase()} records (use with caution!)
472
+ * const result = await ${modelName.toLowerCase()}.deleteMany();
473
+ */
474
+ deleteMany: (params?: {
475
+ where?: ${modelName}WhereInput;
476
+ }) => Promise<{ count: number; error: Error | null }>;
477
+
478
+ /**
479
+ * Create a record if it doesn't exist, or update it if it does.
480
+ *
481
+ * @param params - Object with the identifier, update data, and create data
482
+ * @returns A promise with the created or updated record or error
483
+ *
484
+ * @example
485
+ * // Upsert a ${modelName.toLowerCase()} by ID
486
+ * const result = await ${modelName.toLowerCase()}.upsert({
487
+ * where: { id: "123" },
488
+ * update: { name: "Updated Name" },
489
+ * create: {
490
+ * id: "123",
491
+ * name: "New Name"${createInputProps.filter((p) => !p.includes('?') && !p.includes('id') && !p.includes('name')).length > 0 ? ',' : ''}
492
+ ${createInputProps
493
+ .filter((p) => !p.includes('?') && !p.includes('id') && !p.includes('name'))
494
+ .slice(0, 1)
495
+ .map((p) => {
496
+ const field = p.trim().split(':')[0].trim();
497
+ const type = p.includes('number') ? 42 : p.includes('boolean') ? 'true' : '"value"';
498
+ return ` * ${field}: ${type}`;
499
+ })
500
+ .join(',\n')}
501
+ * }
502
+ * });
503
+ */
504
+ upsert: (params: {
505
+ where: ${modelName}WhereUniqueInput;
506
+ update: ${modelName}UpdateInput;
507
+ create: ${modelName}CreateInput;
508
+ }) => ${modelName}SingleResult;
509
+
510
+ /**
511
+ * Count the number of ${modelName} records matching the filter criteria.
512
+ *
513
+ * @param params - Optional filter parameters
514
+ * @returns A promise with the count of matching records
515
+ *
516
+ * @example
517
+ * // Count all ${modelName.toLowerCase()} records
518
+ * const count = await ${modelName.toLowerCase()}.count();
519
+ *
520
+ * @example
521
+ * // Count active ${modelName.toLowerCase()} records
522
+ * const activeCount = await ${modelName.toLowerCase()}.count({
523
+ * where: { active: true }
524
+ * });
525
+ */
526
+ count: (params?: {
527
+ where?: ${modelName}WhereInput;
528
+ }) => Promise<number>;
529
+
530
+ /**
531
+ * Manually refresh the data with current filter settings.
532
+ * Useful after external operations or when realtime is disabled.
533
+ *
534
+ * @param params - Optional override parameters for this specific refresh
535
+ * @returns A promise with the refreshed data or error
536
+ *
537
+ * @example
538
+ * // Refresh with current filter settings
539
+ * await ${modelName.toLowerCase()}.refresh();
540
+ *
541
+ * @example
542
+ * // Refresh with different filters for this call only
543
+ * await ${modelName.toLowerCase()}.refresh({
544
+ * where: { active: true },
545
+ * orderBy: { name: 'asc' }
546
+ * });
547
+ */
548
+ refresh: (params?: {
549
+ where?: ${modelName}WhereInput;
550
+ orderBy?: ${modelName}OrderByInput;
551
+ take?: number;
552
+ skip?: number;
553
+ }) => ${modelName}ManyResult;
554
+ }`;
555
+ const outputPath = path_1.default.join(config_1.OUTPUT_DIR, `${modelName}Types.ts`);
556
+ fs_1.default.writeFileSync(outputPath, typeContent);
557
+ console.log(`Generated type definitions for ${modelName} at ${outputPath}`);
558
+ return {
559
+ modelName,
560
+ tableName,
561
+ hasCreatedAt: model.fields.some((field) => field.isCreatedAt),
562
+ hasUpdatedAt: model.fields.some((field) => field.isUpdatedAt),
563
+ searchFields,
564
+ defaultValues: Object.keys(defaultValues).length > 0 ? defaultValues : undefined,
565
+ };
566
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });