@startsimpli/funnels 0.4.6 → 0.4.8
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/package.json +1 -1
- package/src/api/client.test.ts +76 -76
- package/src/api/client.ts +16 -16
- package/src/components/FilterRuleEditor/FilterRuleEditor.stories.tsx +24 -24
- package/src/components/FilterRuleEditor/FilterRuleEditor.test.tsx +39 -39
- package/src/components/FilterRuleEditor/FilterRuleEditor.tsx +1 -1
- package/src/components/FilterRuleEditor/RuleRow.tsx +8 -8
- package/src/components/FunnelCard/FunnelCard.stories.tsx +118 -118
- package/src/components/FunnelCard/FunnelCard.test.ts +48 -48
- package/src/components/FunnelCard/FunnelCard.test.tsx +40 -40
- package/src/components/FunnelCard/FunnelCard.tsx +3 -3
- package/src/components/FunnelPreview/FunnelPreview.test.tsx +63 -63
- package/src/components/FunnelPreview/FunnelPreview.tsx +11 -11
- package/src/components/FunnelPreview/StageBreakdown.tsx +5 -5
- package/src/components/FunnelPreview/example.tsx +43 -43
- package/src/components/FunnelRunHistory/FunnelRunHistory.stories.tsx +70 -70
- package/src/components/FunnelRunHistory/FunnelRunHistory.test.tsx +63 -63
- package/src/components/FunnelRunHistory/FunnelRunHistory.tsx +12 -12
- package/src/components/FunnelRunHistory/RunDetailsModal.tsx +5 -5
- package/src/components/FunnelRunHistory/RunFilters.tsx +8 -8
- package/src/components/FunnelRunHistory/RunRow.tsx +7 -7
- package/src/components/FunnelRunHistory/StageBreakdownList.tsx +9 -9
- package/src/components/FunnelRunHistory/types.ts +6 -6
- package/src/components/FunnelStageBuilder/FunnelStageBuilder.stories.tsx +41 -41
- package/src/components/FunnelStageBuilder/FunnelStageBuilder.test.tsx +6 -6
- package/src/components/FunnelStageBuilder/FunnelStageBuilder.tsx +5 -5
- package/src/components/FunnelStageBuilder/StageActions.test.tsx +7 -7
- package/src/components/FunnelStageBuilder/StageActions.tsx +4 -4
- package/src/components/FunnelStageBuilder/StageCard.tsx +3 -3
- package/src/components/FunnelStageBuilder/StageForm.tsx +14 -14
- package/src/components/FunnelVisualFlow/FunnelVisualFlow.stories.tsx +42 -42
- package/src/components/FunnelVisualFlow/FunnelVisualFlow.test.tsx +31 -31
- package/src/components/FunnelVisualFlow/FunnelVisualFlow.tsx +4 -4
- package/src/components/FunnelVisualFlow/StageNode.tsx +8 -8
- package/src/components/FunnelVisualFlow/example.tsx +7 -7
- package/src/core/engine.test.ts +271 -271
- package/src/core/engine.ts +60 -60
- package/src/core/evaluator.example.ts +31 -31
- package/src/core/evaluator.test.ts +92 -92
- package/src/core/evaluator.ts +23 -23
- package/src/core/field-resolver.example.ts +1 -1
- package/src/core/field-resolver.test.ts +4 -4
- package/src/store/create-funnel-store.test.ts +32 -32
- package/src/store/create-funnel-store.ts +3 -3
- package/src/store/types.ts +2 -2
- package/src/types/index.ts +64 -64
package/package.json
CHANGED
package/src/api/client.test.ts
CHANGED
|
@@ -115,19 +115,19 @@ describe('FunnelApiClient', () => {
|
|
|
115
115
|
id: 'funnel-1',
|
|
116
116
|
name: 'Investor Qualification',
|
|
117
117
|
status: 'active',
|
|
118
|
-
|
|
118
|
+
inputType: 'contacts',
|
|
119
119
|
stages: [],
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
createdAt: '2024-01-01T00:00:00Z',
|
|
121
|
+
updatedAt: '2024-01-01T00:00:00Z',
|
|
122
122
|
},
|
|
123
123
|
{
|
|
124
124
|
id: 'funnel-2',
|
|
125
125
|
name: 'Recipe Recommendations',
|
|
126
126
|
status: 'draft',
|
|
127
|
-
|
|
127
|
+
inputType: 'any',
|
|
128
128
|
stages: [],
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
createdAt: '2024-01-02T00:00:00Z',
|
|
130
|
+
updatedAt: '2024-01-02T00:00:00Z',
|
|
131
131
|
},
|
|
132
132
|
],
|
|
133
133
|
};
|
|
@@ -155,15 +155,15 @@ describe('FunnelApiClient', () => {
|
|
|
155
155
|
await client.listFunnels({
|
|
156
156
|
status: 'active',
|
|
157
157
|
page: 2,
|
|
158
|
-
|
|
159
|
-
ordering: '-
|
|
158
|
+
pageSize: 10,
|
|
159
|
+
ordering: '-createdAt',
|
|
160
160
|
});
|
|
161
161
|
|
|
162
162
|
expect(adapter.lastRequest?.params).toEqual({
|
|
163
163
|
status: 'active',
|
|
164
164
|
page: 2,
|
|
165
|
-
|
|
166
|
-
ordering: '-
|
|
165
|
+
pageSize: 10,
|
|
166
|
+
ordering: '-createdAt',
|
|
167
167
|
});
|
|
168
168
|
});
|
|
169
169
|
});
|
|
@@ -174,20 +174,20 @@ describe('FunnelApiClient', () => {
|
|
|
174
174
|
id: 'funnel-1',
|
|
175
175
|
name: 'Test Funnel',
|
|
176
176
|
status: 'active',
|
|
177
|
-
|
|
177
|
+
inputType: 'contacts',
|
|
178
178
|
stages: [
|
|
179
179
|
{
|
|
180
180
|
id: 'stage-1',
|
|
181
181
|
order: 0,
|
|
182
182
|
name: 'Stage 1',
|
|
183
|
-
|
|
183
|
+
filterLogic: 'AND',
|
|
184
184
|
rules: [],
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
matchAction: 'continue',
|
|
186
|
+
noMatchAction: 'exclude',
|
|
187
187
|
},
|
|
188
188
|
],
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
createdAt: '2024-01-01T00:00:00Z',
|
|
190
|
+
updatedAt: '2024-01-01T00:00:00Z',
|
|
191
191
|
};
|
|
192
192
|
|
|
193
193
|
adapter.mockResponse(`${baseUrl}/api/v1/funnels/funnel-1/`, mockFunnel);
|
|
@@ -211,15 +211,15 @@ describe('FunnelApiClient', () => {
|
|
|
211
211
|
const input: CreateFunnelInput = {
|
|
212
212
|
name: 'New Funnel',
|
|
213
213
|
status: 'draft',
|
|
214
|
-
|
|
214
|
+
inputType: 'contacts',
|
|
215
215
|
stages: [],
|
|
216
216
|
};
|
|
217
217
|
|
|
218
218
|
const mockResponse: Funnel = {
|
|
219
219
|
...input,
|
|
220
220
|
id: 'funnel-new',
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
createdAt: '2024-01-01T00:00:00Z',
|
|
222
|
+
updatedAt: '2024-01-01T00:00:00Z',
|
|
223
223
|
};
|
|
224
224
|
|
|
225
225
|
adapter.mockResponse(`${baseUrl}/api/v1/funnels/`, mockResponse);
|
|
@@ -238,7 +238,7 @@ describe('FunnelApiClient', () => {
|
|
|
238
238
|
const input: CreateFunnelInput = {
|
|
239
239
|
name: '', // Invalid: empty name
|
|
240
240
|
status: 'draft',
|
|
241
|
-
|
|
241
|
+
inputType: 'contacts',
|
|
242
242
|
stages: [],
|
|
243
243
|
};
|
|
244
244
|
|
|
@@ -252,10 +252,10 @@ describe('FunnelApiClient', () => {
|
|
|
252
252
|
id: 'funnel-1',
|
|
253
253
|
name: 'Updated Funnel',
|
|
254
254
|
status: 'active',
|
|
255
|
-
|
|
255
|
+
inputType: 'contacts',
|
|
256
256
|
stages: [],
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
createdAt: '2024-01-01T00:00:00Z',
|
|
258
|
+
updatedAt: '2024-01-02T00:00:00Z',
|
|
259
259
|
};
|
|
260
260
|
|
|
261
261
|
adapter.mockResponse(`${baseUrl}/api/v1/funnels/funnel-1/`, mockResponse);
|
|
@@ -288,10 +288,10 @@ describe('FunnelApiClient', () => {
|
|
|
288
288
|
const input = {
|
|
289
289
|
order: 0,
|
|
290
290
|
name: 'New Stage',
|
|
291
|
-
|
|
291
|
+
filterLogic: 'AND' as const,
|
|
292
292
|
rules: [],
|
|
293
|
-
|
|
294
|
-
|
|
293
|
+
matchAction: 'continue' as const,
|
|
294
|
+
noMatchAction: 'exclude' as const,
|
|
295
295
|
};
|
|
296
296
|
|
|
297
297
|
const mockResponse: FunnelStage = {
|
|
@@ -318,10 +318,10 @@ describe('FunnelApiClient', () => {
|
|
|
318
318
|
id: 'stage-1',
|
|
319
319
|
order: 0,
|
|
320
320
|
name: 'Updated Stage',
|
|
321
|
-
|
|
321
|
+
filterLogic: 'AND',
|
|
322
322
|
rules: [],
|
|
323
|
-
|
|
324
|
-
|
|
323
|
+
matchAction: 'continue',
|
|
324
|
+
noMatchAction: 'exclude',
|
|
325
325
|
};
|
|
326
326
|
|
|
327
327
|
adapter.mockResponse(
|
|
@@ -359,20 +359,20 @@ describe('FunnelApiClient', () => {
|
|
|
359
359
|
it('should trigger funnel run', async () => {
|
|
360
360
|
const mockRun: FunnelRun = {
|
|
361
361
|
id: 'run-1',
|
|
362
|
-
|
|
362
|
+
funnelId: 'funnel-1',
|
|
363
363
|
status: 'pending',
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
364
|
+
triggerType: 'manual',
|
|
365
|
+
startedAt: '2024-01-01T00:00:00Z',
|
|
366
|
+
totalInput: 0,
|
|
367
|
+
totalMatched: 0,
|
|
368
|
+
totalExcluded: 0,
|
|
369
|
+
totalTagged: 0,
|
|
370
|
+
stageStats: {},
|
|
371
371
|
};
|
|
372
372
|
|
|
373
373
|
adapter.mockResponse(`${baseUrl}/api/v1/funnels/funnel-1/run/`, mockRun);
|
|
374
374
|
|
|
375
|
-
const result = await client.runFunnel('funnel-1', {
|
|
375
|
+
const result = await client.runFunnel('funnel-1', { triggerType: 'manual' });
|
|
376
376
|
|
|
377
377
|
expect(result.id).toBe('run-1');
|
|
378
378
|
expect(result.status).toBe('pending');
|
|
@@ -389,16 +389,16 @@ describe('FunnelApiClient', () => {
|
|
|
389
389
|
results: [
|
|
390
390
|
{
|
|
391
391
|
id: 'run-1',
|
|
392
|
-
|
|
392
|
+
funnelId: 'funnel-1',
|
|
393
393
|
status: 'completed',
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
394
|
+
triggerType: 'manual',
|
|
395
|
+
startedAt: '2024-01-01T00:00:00Z',
|
|
396
|
+
completedAt: '2024-01-01T00:01:00Z',
|
|
397
|
+
totalInput: 100,
|
|
398
|
+
totalMatched: 50,
|
|
399
|
+
totalExcluded: 50,
|
|
400
|
+
totalTagged: 50,
|
|
401
|
+
stageStats: {},
|
|
402
402
|
},
|
|
403
403
|
],
|
|
404
404
|
};
|
|
@@ -424,13 +424,13 @@ describe('FunnelApiClient', () => {
|
|
|
424
424
|
await client.getFunnelRuns('funnel-1', {
|
|
425
425
|
status: 'completed',
|
|
426
426
|
page: 1,
|
|
427
|
-
|
|
427
|
+
pageSize: 20,
|
|
428
428
|
});
|
|
429
429
|
|
|
430
430
|
expect(adapter.lastRequest?.params).toEqual({
|
|
431
431
|
status: 'completed',
|
|
432
432
|
page: 1,
|
|
433
|
-
|
|
433
|
+
pageSize: 20,
|
|
434
434
|
});
|
|
435
435
|
});
|
|
436
436
|
});
|
|
@@ -439,16 +439,16 @@ describe('FunnelApiClient', () => {
|
|
|
439
439
|
it('should fetch single run', async () => {
|
|
440
440
|
const mockRun: FunnelRun = {
|
|
441
441
|
id: 'run-1',
|
|
442
|
-
|
|
442
|
+
funnelId: 'funnel-1',
|
|
443
443
|
status: 'completed',
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
444
|
+
triggerType: 'manual',
|
|
445
|
+
startedAt: '2024-01-01T00:00:00Z',
|
|
446
|
+
completedAt: '2024-01-01T00:01:00Z',
|
|
447
|
+
totalInput: 100,
|
|
448
|
+
totalMatched: 50,
|
|
449
|
+
totalExcluded: 50,
|
|
450
|
+
totalTagged: 50,
|
|
451
|
+
stageStats: {},
|
|
452
452
|
};
|
|
453
453
|
|
|
454
454
|
adapter.mockResponse(`${baseUrl}/api/v1/funnel-runs/run-1/`, mockRun);
|
|
@@ -470,14 +470,14 @@ describe('FunnelApiClient', () => {
|
|
|
470
470
|
{
|
|
471
471
|
entity: { id: 'entity-1', name: 'Test Entity' },
|
|
472
472
|
matched: true,
|
|
473
|
-
|
|
473
|
+
accumulatedTags: ['qualified'],
|
|
474
474
|
context: {},
|
|
475
475
|
},
|
|
476
476
|
{
|
|
477
477
|
entity: { id: 'entity-2', name: 'Test Entity 2' },
|
|
478
478
|
matched: false,
|
|
479
|
-
|
|
480
|
-
|
|
479
|
+
excludedAtStage: 'stage-1',
|
|
480
|
+
accumulatedTags: [],
|
|
481
481
|
context: {},
|
|
482
482
|
},
|
|
483
483
|
],
|
|
@@ -518,15 +518,15 @@ describe('FunnelApiClient', () => {
|
|
|
518
518
|
it('should cancel running funnel', async () => {
|
|
519
519
|
const mockRun: FunnelRun = {
|
|
520
520
|
id: 'run-1',
|
|
521
|
-
|
|
521
|
+
funnelId: 'funnel-1',
|
|
522
522
|
status: 'cancelled',
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
523
|
+
triggerType: 'manual',
|
|
524
|
+
startedAt: '2024-01-01T00:00:00Z',
|
|
525
|
+
totalInput: 0,
|
|
526
|
+
totalMatched: 0,
|
|
527
|
+
totalExcluded: 0,
|
|
528
|
+
totalTagged: 0,
|
|
529
|
+
stageStats: {},
|
|
530
530
|
};
|
|
531
531
|
|
|
532
532
|
adapter.mockResponse(`${baseUrl}/api/v1/funnel-runs/run-1/cancel/`, mockRun);
|
|
@@ -581,10 +581,10 @@ describe('FunnelApiClient', () => {
|
|
|
581
581
|
id: 'funnel-1',
|
|
582
582
|
name: 'Test Funnel',
|
|
583
583
|
status: 'active',
|
|
584
|
-
|
|
584
|
+
inputType: 'contacts',
|
|
585
585
|
stages: [],
|
|
586
|
-
|
|
587
|
-
|
|
586
|
+
createdAt: '2024-01-01T00:00:00Z',
|
|
587
|
+
updatedAt: '2024-01-01T00:00:00Z',
|
|
588
588
|
};
|
|
589
589
|
|
|
590
590
|
await expect(
|
|
@@ -597,9 +597,9 @@ describe('FunnelApiClient', () => {
|
|
|
597
597
|
matched_entities: [{ id: 'entity-1' }],
|
|
598
598
|
excluded_entities: [],
|
|
599
599
|
stage_breakdown: [],
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
600
|
+
totalInput: 1,
|
|
601
|
+
totalMatched: 1,
|
|
602
|
+
totalExcluded: 0,
|
|
603
603
|
};
|
|
604
604
|
|
|
605
605
|
adapter.mockResponse(
|
|
@@ -611,7 +611,7 @@ describe('FunnelApiClient', () => {
|
|
|
611
611
|
{ id: 'entity-1' },
|
|
612
612
|
]);
|
|
613
613
|
|
|
614
|
-
expect(result.
|
|
614
|
+
expect(result.totalMatched).toBe(1);
|
|
615
615
|
expect(adapter.lastRequest?.method).toBe('POST');
|
|
616
616
|
expect(adapter.lastRequest?.data).toEqual({
|
|
617
617
|
entities: [{ id: 'entity-1' }],
|
package/src/api/client.ts
CHANGED
|
@@ -27,13 +27,13 @@ export interface FunnelListFilters {
|
|
|
27
27
|
status?: 'draft' | 'active' | 'paused' | 'archived';
|
|
28
28
|
|
|
29
29
|
/** Filter by input type */
|
|
30
|
-
|
|
30
|
+
inputType?: string;
|
|
31
31
|
|
|
32
32
|
/** Filter by owner */
|
|
33
|
-
|
|
33
|
+
ownerId?: string;
|
|
34
34
|
|
|
35
35
|
/** Filter by team */
|
|
36
|
-
|
|
36
|
+
teamId?: string;
|
|
37
37
|
|
|
38
38
|
/** Search by name */
|
|
39
39
|
search?: string;
|
|
@@ -42,7 +42,7 @@ export interface FunnelListFilters {
|
|
|
42
42
|
page?: number;
|
|
43
43
|
|
|
44
44
|
/** Pagination: page size */
|
|
45
|
-
|
|
45
|
+
pageSize?: number;
|
|
46
46
|
|
|
47
47
|
/** Ordering: field name (prefix with - for descending) */
|
|
48
48
|
ordering?: string;
|
|
@@ -70,17 +70,17 @@ export interface PreviewResult<TEntity = any> {
|
|
|
70
70
|
|
|
71
71
|
/** Stage-by-stage breakdown */
|
|
72
72
|
stage_breakdown: {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
73
|
+
stageId: string;
|
|
74
|
+
stageName: string;
|
|
75
|
+
inputCount: number;
|
|
76
|
+
matchedCount: number;
|
|
77
|
+
excludedCount: number;
|
|
78
78
|
}[];
|
|
79
79
|
|
|
80
80
|
/** Total counts */
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
totalInput: number;
|
|
82
|
+
totalMatched: number;
|
|
83
|
+
totalExcluded: number;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
/**
|
|
@@ -246,14 +246,14 @@ export class FunnelApiClient {
|
|
|
246
246
|
* Trigger funnel run
|
|
247
247
|
*
|
|
248
248
|
* @param funnelId - Funnel ID
|
|
249
|
-
* @param options - Optional run configuration (
|
|
249
|
+
* @param options - Optional run configuration (triggerType, metadata, etc)
|
|
250
250
|
* @returns Created funnel run (status: pending or running)
|
|
251
251
|
* @throws ApiError with status 404 if funnel not found, 400 if validation fails
|
|
252
252
|
*/
|
|
253
253
|
async runFunnel(
|
|
254
254
|
funnelId: string,
|
|
255
255
|
options?: {
|
|
256
|
-
|
|
256
|
+
triggerType?: 'manual' | 'scheduled' | 'webhook' | 'api';
|
|
257
257
|
metadata?: Record<string, any>;
|
|
258
258
|
}
|
|
259
259
|
): Promise<FunnelRun> {
|
|
@@ -276,7 +276,7 @@ export class FunnelApiClient {
|
|
|
276
276
|
filters?: {
|
|
277
277
|
status?: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
|
|
278
278
|
page?: number;
|
|
279
|
-
|
|
279
|
+
pageSize?: number;
|
|
280
280
|
ordering?: string;
|
|
281
281
|
}
|
|
282
282
|
): Promise<PaginatedResponse<FunnelRun>> {
|
|
@@ -310,7 +310,7 @@ export class FunnelApiClient {
|
|
|
310
310
|
filters?: {
|
|
311
311
|
matched?: boolean;
|
|
312
312
|
page?: number;
|
|
313
|
-
|
|
313
|
+
pageSize?: number;
|
|
314
314
|
}
|
|
315
315
|
): Promise<PaginatedResponse<FunnelResult<TEntity>>> {
|
|
316
316
|
return this.adapter.get<PaginatedResponse<FunnelResult<TEntity>>>(
|
|
@@ -55,7 +55,7 @@ const investorFields: FieldDefinition[] = [
|
|
|
55
55
|
type: 'number',
|
|
56
56
|
category: 'Investment',
|
|
57
57
|
operators: ['eq', 'ne', 'gt', 'lt', 'gte', 'lte'],
|
|
58
|
-
constraints: {
|
|
58
|
+
constraints: { minValue: 0 },
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
name: 'firm.check_size_max',
|
|
@@ -63,7 +63,7 @@ const investorFields: FieldDefinition[] = [
|
|
|
63
63
|
type: 'number',
|
|
64
64
|
category: 'Investment',
|
|
65
65
|
operators: ['eq', 'ne', 'gt', 'lt', 'gte', 'lte'],
|
|
66
|
-
constraints: {
|
|
66
|
+
constraints: { minValue: 0 },
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
name: 'metrics.icp_score',
|
|
@@ -71,7 +71,7 @@ const investorFields: FieldDefinition[] = [
|
|
|
71
71
|
type: 'number',
|
|
72
72
|
category: 'Metrics',
|
|
73
73
|
operators: ['eq', 'ne', 'gt', 'lt', 'gte', 'lte'],
|
|
74
|
-
constraints: {
|
|
74
|
+
constraints: { minValue: 0, maxValue: 100 },
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
name: 'metrics.aum_usd',
|
|
@@ -79,7 +79,7 @@ const investorFields: FieldDefinition[] = [
|
|
|
79
79
|
type: 'number',
|
|
80
80
|
category: 'Metrics',
|
|
81
81
|
operators: ['eq', 'ne', 'gt', 'lt', 'gte', 'lte'],
|
|
82
|
-
constraints: {
|
|
82
|
+
constraints: { minValue: 0 },
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
name: 'tags',
|
|
@@ -142,7 +142,7 @@ const recipeFields: FieldDefinition[] = [
|
|
|
142
142
|
type: 'number',
|
|
143
143
|
category: 'Time',
|
|
144
144
|
operators: ['eq', 'ne', 'gt', 'lt', 'gte', 'lte'],
|
|
145
|
-
constraints: {
|
|
145
|
+
constraints: { minValue: 0 },
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
148
|
name: 'cook_time_minutes',
|
|
@@ -150,7 +150,7 @@ const recipeFields: FieldDefinition[] = [
|
|
|
150
150
|
type: 'number',
|
|
151
151
|
category: 'Time',
|
|
152
152
|
operators: ['eq', 'ne', 'gt', 'lt', 'gte', 'lte'],
|
|
153
|
-
constraints: {
|
|
153
|
+
constraints: { minValue: 0 },
|
|
154
154
|
},
|
|
155
155
|
{
|
|
156
156
|
name: 'servings',
|
|
@@ -158,7 +158,7 @@ const recipeFields: FieldDefinition[] = [
|
|
|
158
158
|
type: 'number',
|
|
159
159
|
category: 'Yield',
|
|
160
160
|
operators: ['eq', 'ne', 'gt', 'lt', 'gte', 'lte'],
|
|
161
|
-
constraints: {
|
|
161
|
+
constraints: { minValue: 1 },
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
name: 'is_vegetarian',
|
|
@@ -182,7 +182,7 @@ const recipeFields: FieldDefinition[] = [
|
|
|
182
182
|
operators: ['eq', 'is_true', 'is_false'],
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
|
-
name: '
|
|
185
|
+
name: 'createdAt',
|
|
186
186
|
label: 'Created Date',
|
|
187
187
|
type: 'date',
|
|
188
188
|
category: 'Metadata',
|
|
@@ -224,17 +224,17 @@ export const Empty = () => {
|
|
|
224
224
|
export const InvestorFilters = () => {
|
|
225
225
|
const [rules, setRules] = useState<FilterRule[]>([
|
|
226
226
|
{
|
|
227
|
-
|
|
227
|
+
fieldPath: 'firm.stage',
|
|
228
228
|
operator: 'in',
|
|
229
229
|
value: ['Series A', 'Series B'],
|
|
230
230
|
},
|
|
231
231
|
{
|
|
232
|
-
|
|
232
|
+
fieldPath: 'firm.check_size_min',
|
|
233
233
|
operator: 'gte',
|
|
234
234
|
value: 500000,
|
|
235
235
|
},
|
|
236
236
|
{
|
|
237
|
-
|
|
237
|
+
fieldPath: 'metrics.icp_score',
|
|
238
238
|
operator: 'gte',
|
|
239
239
|
value: 70,
|
|
240
240
|
},
|
|
@@ -267,22 +267,22 @@ export const InvestorFilters = () => {
|
|
|
267
267
|
export const RecipeFilters = () => {
|
|
268
268
|
const [rules, setRules] = useState<FilterRule[]>([
|
|
269
269
|
{
|
|
270
|
-
|
|
270
|
+
fieldPath: 'cuisine',
|
|
271
271
|
operator: 'in',
|
|
272
272
|
value: ['Italian', 'French', 'Japanese'],
|
|
273
273
|
},
|
|
274
274
|
{
|
|
275
|
-
|
|
275
|
+
fieldPath: 'difficulty',
|
|
276
276
|
operator: 'eq',
|
|
277
277
|
value: 'Easy',
|
|
278
278
|
},
|
|
279
279
|
{
|
|
280
|
-
|
|
280
|
+
fieldPath: 'prep_time_minutes',
|
|
281
281
|
operator: 'lte',
|
|
282
282
|
value: 30,
|
|
283
283
|
},
|
|
284
284
|
{
|
|
285
|
-
|
|
285
|
+
fieldPath: 'is_vegetarian',
|
|
286
286
|
operator: 'is_true',
|
|
287
287
|
value: null,
|
|
288
288
|
},
|
|
@@ -315,17 +315,17 @@ export const RecipeFilters = () => {
|
|
|
315
315
|
export const OrLogic = () => {
|
|
316
316
|
const [rules, setRules] = useState<FilterRule[]>([
|
|
317
317
|
{
|
|
318
|
-
|
|
318
|
+
fieldPath: 'name',
|
|
319
319
|
operator: 'contains',
|
|
320
320
|
value: 'Ventures',
|
|
321
321
|
},
|
|
322
322
|
{
|
|
323
|
-
|
|
323
|
+
fieldPath: 'tags',
|
|
324
324
|
operator: 'has_tag',
|
|
325
325
|
value: 'hot-lead',
|
|
326
326
|
},
|
|
327
327
|
{
|
|
328
|
-
|
|
328
|
+
fieldPath: 'metrics.icp_score',
|
|
329
329
|
operator: 'gte',
|
|
330
330
|
value: 90,
|
|
331
331
|
},
|
|
@@ -358,32 +358,32 @@ export const OrLogic = () => {
|
|
|
358
358
|
export const ComplexFilters = () => {
|
|
359
359
|
const [rules, setRules] = useState<FilterRule[]>([
|
|
360
360
|
{
|
|
361
|
-
|
|
361
|
+
fieldPath: 'firm.stage',
|
|
362
362
|
operator: 'in',
|
|
363
363
|
value: ['Series A', 'Series B', 'Series C'],
|
|
364
364
|
},
|
|
365
365
|
{
|
|
366
|
-
|
|
366
|
+
fieldPath: 'firm.check_size_min',
|
|
367
367
|
operator: 'gte',
|
|
368
368
|
value: 1000000,
|
|
369
369
|
},
|
|
370
370
|
{
|
|
371
|
-
|
|
371
|
+
fieldPath: 'firm.check_size_max',
|
|
372
372
|
operator: 'lte',
|
|
373
373
|
value: 10000000,
|
|
374
374
|
},
|
|
375
375
|
{
|
|
376
|
-
|
|
376
|
+
fieldPath: 'metrics.icp_score',
|
|
377
377
|
operator: 'gte',
|
|
378
378
|
value: 80,
|
|
379
379
|
},
|
|
380
380
|
{
|
|
381
|
-
|
|
381
|
+
fieldPath: 'metrics.aum_usd',
|
|
382
382
|
operator: 'gte',
|
|
383
383
|
value: 100000000,
|
|
384
384
|
},
|
|
385
385
|
{
|
|
386
|
-
|
|
386
|
+
fieldPath: 'email',
|
|
387
387
|
operator: 'isnotnull',
|
|
388
388
|
value: null,
|
|
389
389
|
},
|