@happyvertical/smrt-places 0.30.0

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,2382 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "timestamp": 1782177520434,
4
+ "packageName": "@happyvertical/smrt-places",
5
+ "packageVersion": "0.30.0",
6
+ "objects": {
7
+ "@happyvertical/smrt-places:PlaceAssetCollection": {
8
+ "name": "placeassetcollection",
9
+ "className": "PlaceAssetCollection",
10
+ "qualifiedName": "@happyvertical/smrt-places:PlaceAssetCollection",
11
+ "collection": "placeassets",
12
+ "filePath": "/home/runner/_work/smrt/smrt/packages/places/src/collections/PlaceAssetCollection.ts",
13
+ "packageName": "@happyvertical/smrt-places",
14
+ "fields": {},
15
+ "methods": {
16
+ "byLeft": {
17
+ "name": "byLeft",
18
+ "async": true,
19
+ "parameters": [
20
+ {
21
+ "name": "leftId",
22
+ "type": "string",
23
+ "optional": false
24
+ },
25
+ {
26
+ "name": "opts",
27
+ "type": "JunctionFilterOptions",
28
+ "optional": true
29
+ }
30
+ ],
31
+ "returnType": "Promise<TItem[]>",
32
+ "isStatic": false,
33
+ "isPublic": true
34
+ },
35
+ "byRight": {
36
+ "name": "byRight",
37
+ "async": true,
38
+ "parameters": [
39
+ {
40
+ "name": "rightId",
41
+ "type": "string",
42
+ "optional": false
43
+ },
44
+ {
45
+ "name": "opts",
46
+ "type": "JunctionFilterOptions",
47
+ "optional": true
48
+ }
49
+ ],
50
+ "returnType": "Promise<TItem[]>",
51
+ "isStatic": false,
52
+ "isPublic": true
53
+ },
54
+ "attach": {
55
+ "name": "attach",
56
+ "async": true,
57
+ "parameters": [
58
+ {
59
+ "name": "leftId",
60
+ "type": "string",
61
+ "optional": false
62
+ },
63
+ {
64
+ "name": "rightId",
65
+ "type": "string",
66
+ "optional": false
67
+ },
68
+ {
69
+ "name": "opts",
70
+ "type": "JunctionAttachOptions",
71
+ "optional": true
72
+ }
73
+ ],
74
+ "returnType": "Promise<TItem>",
75
+ "isStatic": false,
76
+ "isPublic": true
77
+ },
78
+ "detach": {
79
+ "name": "detach",
80
+ "async": true,
81
+ "parameters": [
82
+ {
83
+ "name": "leftId",
84
+ "type": "string",
85
+ "optional": false
86
+ },
87
+ {
88
+ "name": "rightId",
89
+ "type": "string",
90
+ "optional": false
91
+ },
92
+ {
93
+ "name": "opts",
94
+ "type": "JunctionFilterOptions",
95
+ "optional": true
96
+ }
97
+ ],
98
+ "returnType": "Promise<void>",
99
+ "isStatic": false,
100
+ "isPublic": true
101
+ },
102
+ "setLinks": {
103
+ "name": "setLinks",
104
+ "async": true,
105
+ "parameters": [
106
+ {
107
+ "name": "leftId",
108
+ "type": "string",
109
+ "optional": false
110
+ },
111
+ {
112
+ "name": "rightIds",
113
+ "type": "string[]",
114
+ "optional": false
115
+ },
116
+ {
117
+ "name": "opts",
118
+ "type": "JunctionAttachOptions",
119
+ "optional": true
120
+ }
121
+ ],
122
+ "returnType": "Promise<void>",
123
+ "isStatic": false,
124
+ "isPublic": true
125
+ },
126
+ "getAssets": {
127
+ "name": "getAssets",
128
+ "async": true,
129
+ "parameters": [
130
+ {
131
+ "name": "placeId",
132
+ "type": "string",
133
+ "optional": false
134
+ },
135
+ {
136
+ "name": "relationship",
137
+ "type": "string",
138
+ "optional": true
139
+ }
140
+ ],
141
+ "returnType": "Promise<Asset[]>",
142
+ "isStatic": false,
143
+ "isPublic": true
144
+ },
145
+ "addAsset": {
146
+ "name": "addAsset",
147
+ "async": true,
148
+ "parameters": [
149
+ {
150
+ "name": "placeId",
151
+ "type": "string",
152
+ "optional": false
153
+ },
154
+ {
155
+ "name": "asset",
156
+ "type": "Asset",
157
+ "optional": false
158
+ },
159
+ {
160
+ "name": "relationship",
161
+ "type": "any",
162
+ "optional": true,
163
+ "default": "attachment"
164
+ },
165
+ {
166
+ "name": "sortOrder",
167
+ "type": "any",
168
+ "optional": true
169
+ }
170
+ ],
171
+ "returnType": "Promise<void>",
172
+ "isStatic": false,
173
+ "isPublic": true
174
+ },
175
+ "removeAsset": {
176
+ "name": "removeAsset",
177
+ "async": true,
178
+ "parameters": [
179
+ {
180
+ "name": "placeId",
181
+ "type": "string",
182
+ "optional": false
183
+ },
184
+ {
185
+ "name": "assetId",
186
+ "type": "string",
187
+ "optional": false
188
+ },
189
+ {
190
+ "name": "relationship",
191
+ "type": "string",
192
+ "optional": true
193
+ }
194
+ ],
195
+ "returnType": "Promise<void>",
196
+ "isStatic": false,
197
+ "isPublic": true
198
+ }
199
+ },
200
+ "decoratorConfig": {
201
+ "api": false,
202
+ "mcp": false,
203
+ "cli": false,
204
+ "tableName": "place_assets"
205
+ },
206
+ "extends": "SmrtJunction",
207
+ "extendsTypeArg": "PlaceAsset",
208
+ "exportName": "PlaceAssetCollection",
209
+ "collectionExportName": "PlaceAssetCollectionCollection",
210
+ "schema": {
211
+ "tableName": "place_assets",
212
+ "ddl": "CREATE TABLE IF NOT EXISTS \"place_assets\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
213
+ "columns": {
214
+ "id": {
215
+ "type": "UUID",
216
+ "primaryKey": true,
217
+ "referenceKind": "id",
218
+ "notNull": true
219
+ },
220
+ "slug": {
221
+ "type": "TEXT",
222
+ "notNull": true
223
+ },
224
+ "context": {
225
+ "type": "TEXT",
226
+ "notNull": true,
227
+ "default": ""
228
+ },
229
+ "created_at": {
230
+ "type": "TIMESTAMP",
231
+ "notNull": true,
232
+ "default": "current_timestamp"
233
+ },
234
+ "updated_at": {
235
+ "type": "TIMESTAMP",
236
+ "notNull": true,
237
+ "default": "current_timestamp"
238
+ }
239
+ },
240
+ "indexes": [
241
+ {
242
+ "name": "place_assets_id_idx",
243
+ "columns": [
244
+ "id"
245
+ ]
246
+ },
247
+ {
248
+ "name": "place_assets_slug_context_idx",
249
+ "columns": [
250
+ "slug",
251
+ "context"
252
+ ],
253
+ "unique": true
254
+ }
255
+ ],
256
+ "version": "ceff1c5e"
257
+ }
258
+ },
259
+ "@happyvertical/smrt-places:PlaceCollection": {
260
+ "name": "placecollection",
261
+ "className": "PlaceCollection",
262
+ "qualifiedName": "@happyvertical/smrt-places:PlaceCollection",
263
+ "collection": "places",
264
+ "filePath": "/home/runner/_work/smrt/smrt/packages/places/src/collections/PlaceCollection.ts",
265
+ "packageName": "@happyvertical/smrt-places",
266
+ "fields": {},
267
+ "methods": {
268
+ "lookupOrCreate": {
269
+ "name": "lookupOrCreate",
270
+ "async": true,
271
+ "parameters": [
272
+ {
273
+ "name": "query",
274
+ "type": "string",
275
+ "optional": false
276
+ },
277
+ {
278
+ "name": "options",
279
+ "type": "LookupOrCreateOptions",
280
+ "optional": true
281
+ }
282
+ ],
283
+ "returnType": "Promise<Place | null>",
284
+ "isStatic": false,
285
+ "isPublic": true
286
+ },
287
+ "discoverNearby": {
288
+ "name": "discoverNearby",
289
+ "async": true,
290
+ "parameters": [
291
+ {
292
+ "name": "latitude",
293
+ "type": "number",
294
+ "optional": false
295
+ },
296
+ {
297
+ "name": "longitude",
298
+ "type": "number",
299
+ "optional": false
300
+ },
301
+ {
302
+ "name": "radiusMeters",
303
+ "type": "number",
304
+ "optional": false
305
+ },
306
+ {
307
+ "name": "options",
308
+ "type": "DiscoverNearbyOptions",
309
+ "optional": true
310
+ }
311
+ ],
312
+ "returnType": "Promise<Place[]>",
313
+ "isStatic": false,
314
+ "isPublic": true
315
+ },
316
+ "resolveTrackPlaces": {
317
+ "name": "resolveTrackPlaces",
318
+ "async": true,
319
+ "parameters": [
320
+ {
321
+ "name": "points",
322
+ "type": "ReadonlyArray<TrackPoint>",
323
+ "optional": false
324
+ },
325
+ {
326
+ "name": "options",
327
+ "type": "ResolveTrackPlacesOptions",
328
+ "optional": true
329
+ }
330
+ ],
331
+ "returnType": "Promise<TrackPlacesResult>",
332
+ "isStatic": false,
333
+ "isPublic": true
334
+ },
335
+ "getChildren": {
336
+ "name": "getChildren",
337
+ "async": true,
338
+ "parameters": [
339
+ {
340
+ "name": "parentId",
341
+ "type": "string",
342
+ "optional": false
343
+ }
344
+ ],
345
+ "returnType": "Promise<Place[]>",
346
+ "isStatic": false,
347
+ "isPublic": true
348
+ },
349
+ "getRootPlaces": {
350
+ "name": "getRootPlaces",
351
+ "async": true,
352
+ "parameters": [],
353
+ "returnType": "Promise<Place[]>",
354
+ "isStatic": false,
355
+ "isPublic": true
356
+ },
357
+ "getByType": {
358
+ "name": "getByType",
359
+ "async": true,
360
+ "parameters": [
361
+ {
362
+ "name": "typeSlug",
363
+ "type": "string",
364
+ "optional": false
365
+ }
366
+ ],
367
+ "returnType": "Promise<Place[]>",
368
+ "isStatic": false,
369
+ "isPublic": true
370
+ },
371
+ "getHierarchy": {
372
+ "name": "getHierarchy",
373
+ "async": true,
374
+ "parameters": [
375
+ {
376
+ "name": "placeId",
377
+ "type": "string",
378
+ "optional": false
379
+ }
380
+ ],
381
+ "returnType": "any",
382
+ "isStatic": false,
383
+ "isPublic": true
384
+ },
385
+ "getAssets": {
386
+ "name": "getAssets",
387
+ "async": true,
388
+ "parameters": [
389
+ {
390
+ "name": "placeId",
391
+ "type": "string",
392
+ "optional": false
393
+ },
394
+ {
395
+ "name": "relationship",
396
+ "type": "string",
397
+ "optional": true
398
+ }
399
+ ],
400
+ "returnType": "Promise<Asset[]>",
401
+ "isStatic": false,
402
+ "isPublic": true
403
+ },
404
+ "addAsset": {
405
+ "name": "addAsset",
406
+ "async": true,
407
+ "parameters": [
408
+ {
409
+ "name": "placeId",
410
+ "type": "string",
411
+ "optional": false
412
+ },
413
+ {
414
+ "name": "asset",
415
+ "type": "Asset",
416
+ "optional": false
417
+ },
418
+ {
419
+ "name": "relationship",
420
+ "type": "any",
421
+ "optional": true,
422
+ "default": "attachment"
423
+ },
424
+ {
425
+ "name": "sortOrder",
426
+ "type": "any",
427
+ "optional": true
428
+ }
429
+ ],
430
+ "returnType": "Promise<void>",
431
+ "isStatic": false,
432
+ "isPublic": true
433
+ },
434
+ "removeAsset": {
435
+ "name": "removeAsset",
436
+ "async": true,
437
+ "parameters": [
438
+ {
439
+ "name": "placeId",
440
+ "type": "string",
441
+ "optional": false
442
+ },
443
+ {
444
+ "name": "assetId",
445
+ "type": "string",
446
+ "optional": false
447
+ },
448
+ {
449
+ "name": "relationship",
450
+ "type": "string",
451
+ "optional": true
452
+ }
453
+ ],
454
+ "returnType": "Promise<void>",
455
+ "isStatic": false,
456
+ "isPublic": true
457
+ },
458
+ "searchByProximity": {
459
+ "name": "searchByProximity",
460
+ "async": true,
461
+ "parameters": [
462
+ {
463
+ "name": "latitude",
464
+ "type": "number",
465
+ "optional": false
466
+ },
467
+ {
468
+ "name": "longitude",
469
+ "type": "number",
470
+ "optional": false
471
+ },
472
+ {
473
+ "name": "radiusKm",
474
+ "type": "number",
475
+ "optional": true
476
+ }
477
+ ],
478
+ "returnType": "Promise<Place[]>",
479
+ "isStatic": false,
480
+ "isPublic": true
481
+ },
482
+ "findByTenant": {
483
+ "name": "findByTenant",
484
+ "async": true,
485
+ "parameters": [
486
+ {
487
+ "name": "tenantId",
488
+ "type": "string",
489
+ "optional": false
490
+ }
491
+ ],
492
+ "returnType": "Promise<Place[]>",
493
+ "isStatic": false,
494
+ "isPublic": true
495
+ },
496
+ "findGlobal": {
497
+ "name": "findGlobal",
498
+ "async": true,
499
+ "parameters": [],
500
+ "returnType": "Promise<Place[]>",
501
+ "isStatic": false,
502
+ "isPublic": true
503
+ },
504
+ "findWithGlobals": {
505
+ "name": "findWithGlobals",
506
+ "async": true,
507
+ "parameters": [
508
+ {
509
+ "name": "tenantId",
510
+ "type": "string",
511
+ "optional": false
512
+ }
513
+ ],
514
+ "returnType": "Promise<Place[]>",
515
+ "isStatic": false,
516
+ "isPublic": true
517
+ }
518
+ },
519
+ "decoratorConfig": {},
520
+ "extends": "SmrtCollection",
521
+ "extendsTypeArg": "Place",
522
+ "exportName": "PlaceCollection",
523
+ "collectionExportName": "PlaceCollectionCollection",
524
+ "schema": {
525
+ "tableName": "place_collections",
526
+ "ddl": "CREATE TABLE IF NOT EXISTS \"place_collections\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
527
+ "columns": {
528
+ "id": {
529
+ "type": "UUID",
530
+ "primaryKey": true,
531
+ "referenceKind": "id",
532
+ "notNull": true
533
+ },
534
+ "slug": {
535
+ "type": "TEXT",
536
+ "notNull": true
537
+ },
538
+ "context": {
539
+ "type": "TEXT",
540
+ "notNull": true,
541
+ "default": ""
542
+ },
543
+ "created_at": {
544
+ "type": "TIMESTAMP",
545
+ "notNull": true,
546
+ "default": "current_timestamp"
547
+ },
548
+ "updated_at": {
549
+ "type": "TIMESTAMP",
550
+ "notNull": true,
551
+ "default": "current_timestamp"
552
+ }
553
+ },
554
+ "indexes": [
555
+ {
556
+ "name": "place_collections_id_idx",
557
+ "columns": [
558
+ "id"
559
+ ]
560
+ },
561
+ {
562
+ "name": "place_collections_slug_context_idx",
563
+ "columns": [
564
+ "slug",
565
+ "context"
566
+ ],
567
+ "unique": true
568
+ }
569
+ ],
570
+ "version": "d0da2f8d"
571
+ }
572
+ },
573
+ "@happyvertical/smrt-places:PlaceTypeCollection": {
574
+ "name": "placetypecollection",
575
+ "className": "PlaceTypeCollection",
576
+ "qualifiedName": "@happyvertical/smrt-places:PlaceTypeCollection",
577
+ "collection": "placetypes",
578
+ "filePath": "/home/runner/_work/smrt/smrt/packages/places/src/collections/PlaceTypeCollection.ts",
579
+ "packageName": "@happyvertical/smrt-places",
580
+ "fields": {},
581
+ "methods": {
582
+ "getOrCreate": {
583
+ "name": "getOrCreate",
584
+ "async": true,
585
+ "parameters": [
586
+ {
587
+ "name": "slug",
588
+ "type": "string",
589
+ "optional": false
590
+ },
591
+ {
592
+ "name": "name",
593
+ "type": "string",
594
+ "optional": true
595
+ }
596
+ ],
597
+ "returnType": "Promise<PlaceType>",
598
+ "isStatic": false,
599
+ "isPublic": true
600
+ },
601
+ "getBySlug": {
602
+ "name": "getBySlug",
603
+ "async": true,
604
+ "parameters": [
605
+ {
606
+ "name": "slug",
607
+ "type": "string",
608
+ "optional": false
609
+ }
610
+ ],
611
+ "returnType": "Promise<PlaceType | null>",
612
+ "isStatic": false,
613
+ "isPublic": true
614
+ },
615
+ "initializeDefaults": {
616
+ "name": "initializeDefaults",
617
+ "async": true,
618
+ "parameters": [],
619
+ "returnType": "Promise<PlaceType[]>",
620
+ "isStatic": false,
621
+ "isPublic": true
622
+ }
623
+ },
624
+ "decoratorConfig": {},
625
+ "extends": "SmrtCollection",
626
+ "extendsTypeArg": "PlaceType",
627
+ "exportName": "PlaceTypeCollection",
628
+ "collectionExportName": "PlaceTypeCollectionCollection",
629
+ "schema": {
630
+ "tableName": "place_type_collections",
631
+ "ddl": "CREATE TABLE IF NOT EXISTS \"place_type_collections\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
632
+ "columns": {
633
+ "id": {
634
+ "type": "UUID",
635
+ "primaryKey": true,
636
+ "referenceKind": "id",
637
+ "notNull": true
638
+ },
639
+ "slug": {
640
+ "type": "TEXT",
641
+ "notNull": true
642
+ },
643
+ "context": {
644
+ "type": "TEXT",
645
+ "notNull": true,
646
+ "default": ""
647
+ },
648
+ "created_at": {
649
+ "type": "TIMESTAMP",
650
+ "notNull": true,
651
+ "default": "current_timestamp"
652
+ },
653
+ "updated_at": {
654
+ "type": "TIMESTAMP",
655
+ "notNull": true,
656
+ "default": "current_timestamp"
657
+ }
658
+ },
659
+ "indexes": [
660
+ {
661
+ "name": "place_type_collections_id_idx",
662
+ "columns": [
663
+ "id"
664
+ ]
665
+ },
666
+ {
667
+ "name": "place_type_collections_slug_context_idx",
668
+ "columns": [
669
+ "slug",
670
+ "context"
671
+ ],
672
+ "unique": true
673
+ }
674
+ ],
675
+ "version": "b6691888"
676
+ }
677
+ },
678
+ "@happyvertical/smrt-places:Place": {
679
+ "name": "place",
680
+ "className": "Place",
681
+ "qualifiedName": "@happyvertical/smrt-places:Place",
682
+ "collection": "places",
683
+ "filePath": "/home/runner/_work/smrt/smrt/packages/places/src/models/Place.ts",
684
+ "packageName": "@happyvertical/smrt-places",
685
+ "fields": {
686
+ "created_at": {
687
+ "type": "datetime",
688
+ "required": false
689
+ },
690
+ "updated_at": {
691
+ "type": "datetime",
692
+ "required": false
693
+ },
694
+ "parentId": {
695
+ "type": "foreignKey",
696
+ "required": false,
697
+ "related": "Place",
698
+ "_meta": {
699
+ "nullable": true
700
+ }
701
+ },
702
+ "tenantId": {
703
+ "type": "text",
704
+ "required": false,
705
+ "_meta": {
706
+ "sqlType": "UUID",
707
+ "nullable": true,
708
+ "__tenancy": {
709
+ "isTenantIdField": true,
710
+ "autoFilter": true,
711
+ "required": false,
712
+ "autoPopulate": true,
713
+ "nullable": true,
714
+ "mode": "optional",
715
+ "field": "tenantId",
716
+ "allowSuperAdminBypass": false
717
+ }
718
+ }
719
+ },
720
+ "typeId": {
721
+ "type": "foreignKey",
722
+ "required": false,
723
+ "related": "PlaceType"
724
+ },
725
+ "name": {
726
+ "type": "text",
727
+ "required": false
728
+ },
729
+ "description": {
730
+ "type": "text",
731
+ "required": false
732
+ },
733
+ "latitude": {
734
+ "type": "decimal",
735
+ "required": false,
736
+ "_meta": {}
737
+ },
738
+ "longitude": {
739
+ "type": "decimal",
740
+ "required": false,
741
+ "_meta": {}
742
+ },
743
+ "streetNumber": {
744
+ "type": "text",
745
+ "required": false
746
+ },
747
+ "streetName": {
748
+ "type": "text",
749
+ "required": false
750
+ },
751
+ "city": {
752
+ "type": "text",
753
+ "required": false
754
+ },
755
+ "region": {
756
+ "type": "text",
757
+ "required": false
758
+ },
759
+ "country": {
760
+ "type": "text",
761
+ "required": false
762
+ },
763
+ "postalCode": {
764
+ "type": "text",
765
+ "required": false
766
+ },
767
+ "countryCode": {
768
+ "type": "text",
769
+ "required": false
770
+ },
771
+ "timezone": {
772
+ "type": "text",
773
+ "required": false
774
+ },
775
+ "externalId": {
776
+ "type": "text",
777
+ "required": false
778
+ },
779
+ "source": {
780
+ "type": "text",
781
+ "required": false
782
+ },
783
+ "metadata": {
784
+ "type": "text",
785
+ "required": false
786
+ },
787
+ "createdAt": {
788
+ "type": "text",
789
+ "required": false
790
+ },
791
+ "updatedAt": {
792
+ "type": "text",
793
+ "required": false
794
+ }
795
+ },
796
+ "methods": {
797
+ "getAiUsageSnapshot": {
798
+ "name": "getAiUsageSnapshot",
799
+ "async": false,
800
+ "parameters": [],
801
+ "returnType": "AiUsageSnapshot | undefined",
802
+ "isStatic": false,
803
+ "isPublic": true
804
+ },
805
+ "resetAiUsage": {
806
+ "name": "resetAiUsage",
807
+ "async": false,
808
+ "parameters": [],
809
+ "returnType": "void",
810
+ "isStatic": false,
811
+ "isPublic": true
812
+ },
813
+ "listAiUsage": {
814
+ "name": "listAiUsage",
815
+ "async": true,
816
+ "parameters": [
817
+ {
818
+ "name": "options",
819
+ "type": "AiUsageListOptions",
820
+ "optional": true
821
+ }
822
+ ],
823
+ "returnType": "Promise<SmrtAiUsageRecord[]>",
824
+ "isStatic": false,
825
+ "isPublic": true
826
+ },
827
+ "summarizeAiUsage": {
828
+ "name": "summarizeAiUsage",
829
+ "async": true,
830
+ "parameters": [
831
+ {
832
+ "name": "options",
833
+ "type": "AiUsageSummaryOptions",
834
+ "optional": true
835
+ }
836
+ ],
837
+ "returnType": "Promise<Record<string, AiUsageStats>>",
838
+ "isStatic": false,
839
+ "isPublic": true
840
+ },
841
+ "destroy": {
842
+ "name": "destroy",
843
+ "async": false,
844
+ "parameters": [],
845
+ "returnType": "void",
846
+ "isStatic": false,
847
+ "isPublic": true
848
+ },
849
+ "markAsPersisted": {
850
+ "name": "markAsPersisted",
851
+ "async": false,
852
+ "parameters": [],
853
+ "returnType": "void",
854
+ "isStatic": false,
855
+ "isPublic": true
856
+ },
857
+ "initialize": {
858
+ "name": "initialize",
859
+ "async": true,
860
+ "parameters": [],
861
+ "returnType": "Promise",
862
+ "isStatic": false,
863
+ "isPublic": true
864
+ },
865
+ "loadDataFromDb": {
866
+ "name": "loadDataFromDb",
867
+ "async": true,
868
+ "parameters": [
869
+ {
870
+ "name": "data",
871
+ "type": "any",
872
+ "optional": false
873
+ }
874
+ ],
875
+ "returnType": "any",
876
+ "isStatic": false,
877
+ "isPublic": true
878
+ },
879
+ "getFields": {
880
+ "name": "getFields",
881
+ "async": true,
882
+ "parameters": [],
883
+ "returnType": "any",
884
+ "isStatic": false,
885
+ "isPublic": true
886
+ },
887
+ "toJSON": {
888
+ "name": "toJSON",
889
+ "async": false,
890
+ "parameters": [],
891
+ "returnType": "any",
892
+ "isStatic": false,
893
+ "isPublic": true
894
+ },
895
+ "toPlainObject": {
896
+ "name": "toPlainObject",
897
+ "async": false,
898
+ "parameters": [],
899
+ "returnType": "Record<string>",
900
+ "isStatic": false,
901
+ "isPublic": true
902
+ },
903
+ "toPublicJSON": {
904
+ "name": "toPublicJSON",
905
+ "async": false,
906
+ "parameters": [],
907
+ "returnType": "Record<string>",
908
+ "isStatic": false,
909
+ "isPublic": true
910
+ },
911
+ "getId": {
912
+ "name": "getId",
913
+ "async": true,
914
+ "parameters": [],
915
+ "returnType": "any",
916
+ "isStatic": false,
917
+ "isPublic": true
918
+ },
919
+ "getSlug": {
920
+ "name": "getSlug",
921
+ "async": true,
922
+ "parameters": [],
923
+ "returnType": "any",
924
+ "isStatic": false,
925
+ "isPublic": true
926
+ },
927
+ "getSavedId": {
928
+ "name": "getSavedId",
929
+ "async": true,
930
+ "parameters": [],
931
+ "returnType": "any",
932
+ "isStatic": false,
933
+ "isPublic": true
934
+ },
935
+ "isSaved": {
936
+ "name": "isSaved",
937
+ "async": true,
938
+ "parameters": [],
939
+ "returnType": "any",
940
+ "isStatic": false,
941
+ "isPublic": true
942
+ },
943
+ "save": {
944
+ "name": "save",
945
+ "async": true,
946
+ "parameters": [],
947
+ "returnType": "any",
948
+ "isStatic": false,
949
+ "isPublic": true
950
+ },
951
+ "classifyConstraintError": {
952
+ "name": "classifyConstraintError",
953
+ "async": false,
954
+ "parameters": [
955
+ {
956
+ "name": "message",
957
+ "type": "string",
958
+ "optional": false
959
+ }
960
+ ],
961
+ "returnType": "'unique' | 'not_null' | null",
962
+ "isStatic": true,
963
+ "isPublic": true
964
+ },
965
+ "loadFromId": {
966
+ "name": "loadFromId",
967
+ "async": true,
968
+ "parameters": [],
969
+ "returnType": "any",
970
+ "isStatic": false,
971
+ "isPublic": true
972
+ },
973
+ "loadFromSlug": {
974
+ "name": "loadFromSlug",
975
+ "async": true,
976
+ "parameters": [],
977
+ "returnType": "any",
978
+ "isStatic": false,
979
+ "isPublic": true
980
+ },
981
+ "is": {
982
+ "name": "is",
983
+ "async": true,
984
+ "parameters": [
985
+ {
986
+ "name": "criteria",
987
+ "type": "string",
988
+ "optional": false
989
+ },
990
+ {
991
+ "name": "options",
992
+ "type": "any",
993
+ "optional": true
994
+ }
995
+ ],
996
+ "returnType": "any",
997
+ "isStatic": false,
998
+ "isPublic": true
999
+ },
1000
+ "do": {
1001
+ "name": "do",
1002
+ "async": true,
1003
+ "parameters": [
1004
+ {
1005
+ "name": "instructions",
1006
+ "type": "string",
1007
+ "optional": false
1008
+ },
1009
+ {
1010
+ "name": "options",
1011
+ "type": "any",
1012
+ "optional": true
1013
+ }
1014
+ ],
1015
+ "returnType": "any",
1016
+ "isStatic": false,
1017
+ "isPublic": true
1018
+ },
1019
+ "describe": {
1020
+ "name": "describe",
1021
+ "async": true,
1022
+ "parameters": [
1023
+ {
1024
+ "name": "options",
1025
+ "type": "any",
1026
+ "optional": true
1027
+ }
1028
+ ],
1029
+ "returnType": "any",
1030
+ "isStatic": false,
1031
+ "isPublic": true
1032
+ },
1033
+ "delete": {
1034
+ "name": "delete",
1035
+ "async": true,
1036
+ "parameters": [],
1037
+ "returnType": "Promise<void>",
1038
+ "isStatic": false,
1039
+ "isPublic": true
1040
+ },
1041
+ "isRelatedLoaded": {
1042
+ "name": "isRelatedLoaded",
1043
+ "async": false,
1044
+ "parameters": [
1045
+ {
1046
+ "name": "fieldName",
1047
+ "type": "string",
1048
+ "optional": false
1049
+ }
1050
+ ],
1051
+ "returnType": "boolean",
1052
+ "isStatic": false,
1053
+ "isPublic": true
1054
+ },
1055
+ "loadRelated": {
1056
+ "name": "loadRelated",
1057
+ "async": true,
1058
+ "parameters": [
1059
+ {
1060
+ "name": "fieldName",
1061
+ "type": "string",
1062
+ "optional": false
1063
+ },
1064
+ {
1065
+ "name": "opts",
1066
+ "type": "LoadRelatedOptions",
1067
+ "optional": true
1068
+ }
1069
+ ],
1070
+ "returnType": "Promise<any>",
1071
+ "isStatic": false,
1072
+ "isPublic": true
1073
+ },
1074
+ "loadRelatedMany": {
1075
+ "name": "loadRelatedMany",
1076
+ "async": true,
1077
+ "parameters": [
1078
+ {
1079
+ "name": "fieldName",
1080
+ "type": "string",
1081
+ "optional": false
1082
+ },
1083
+ {
1084
+ "name": "opts",
1085
+ "type": "LoadRelatedOptions",
1086
+ "optional": true
1087
+ }
1088
+ ],
1089
+ "returnType": "Promise<any[]>",
1090
+ "isStatic": false,
1091
+ "isPublic": true
1092
+ },
1093
+ "getRelated": {
1094
+ "name": "getRelated",
1095
+ "async": true,
1096
+ "parameters": [
1097
+ {
1098
+ "name": "fieldName",
1099
+ "type": "string",
1100
+ "optional": false
1101
+ },
1102
+ {
1103
+ "name": "opts",
1104
+ "type": "LoadRelatedOptions",
1105
+ "optional": true
1106
+ }
1107
+ ],
1108
+ "returnType": "Promise<any>",
1109
+ "isStatic": false,
1110
+ "isPublic": true
1111
+ },
1112
+ "getAvailableTools": {
1113
+ "name": "getAvailableTools",
1114
+ "async": false,
1115
+ "parameters": [],
1116
+ "returnType": "AITool[]",
1117
+ "isStatic": false,
1118
+ "isPublic": true
1119
+ },
1120
+ "executeToolCall": {
1121
+ "name": "executeToolCall",
1122
+ "async": true,
1123
+ "parameters": [
1124
+ {
1125
+ "name": "toolCall",
1126
+ "type": "ToolCall",
1127
+ "optional": false
1128
+ }
1129
+ ],
1130
+ "returnType": "Promise<ToolCallResult>",
1131
+ "isStatic": false,
1132
+ "isPublic": true
1133
+ },
1134
+ "remember": {
1135
+ "name": "remember",
1136
+ "async": true,
1137
+ "parameters": [
1138
+ {
1139
+ "name": "options",
1140
+ "type": "object",
1141
+ "optional": false
1142
+ }
1143
+ ],
1144
+ "returnType": "Promise<void>",
1145
+ "isStatic": false,
1146
+ "isPublic": true
1147
+ },
1148
+ "recall": {
1149
+ "name": "recall",
1150
+ "async": true,
1151
+ "parameters": [
1152
+ {
1153
+ "name": "options",
1154
+ "type": "object",
1155
+ "optional": false
1156
+ }
1157
+ ],
1158
+ "returnType": "Promise<any | null>",
1159
+ "isStatic": false,
1160
+ "isPublic": true
1161
+ },
1162
+ "recallAll": {
1163
+ "name": "recallAll",
1164
+ "async": true,
1165
+ "parameters": [
1166
+ {
1167
+ "name": "options",
1168
+ "type": "object",
1169
+ "optional": true
1170
+ }
1171
+ ],
1172
+ "returnType": "Promise<Map<string, any>>",
1173
+ "isStatic": false,
1174
+ "isPublic": true
1175
+ },
1176
+ "forget": {
1177
+ "name": "forget",
1178
+ "async": true,
1179
+ "parameters": [
1180
+ {
1181
+ "name": "options",
1182
+ "type": "object",
1183
+ "optional": false
1184
+ }
1185
+ ],
1186
+ "returnType": "Promise<void>",
1187
+ "isStatic": false,
1188
+ "isPublic": true
1189
+ },
1190
+ "forgetScope": {
1191
+ "name": "forgetScope",
1192
+ "async": true,
1193
+ "parameters": [
1194
+ {
1195
+ "name": "options",
1196
+ "type": "object",
1197
+ "optional": false
1198
+ }
1199
+ ],
1200
+ "returnType": "Promise<number>",
1201
+ "isStatic": false,
1202
+ "isPublic": true
1203
+ },
1204
+ "generateEmbeddings": {
1205
+ "name": "generateEmbeddings",
1206
+ "async": true,
1207
+ "parameters": [
1208
+ {
1209
+ "name": "options",
1210
+ "type": "GenerateEmbeddingsOptions",
1211
+ "optional": true
1212
+ }
1213
+ ],
1214
+ "returnType": "Promise<void>",
1215
+ "isStatic": false,
1216
+ "isPublic": true
1217
+ },
1218
+ "getEmbedding": {
1219
+ "name": "getEmbedding",
1220
+ "async": true,
1221
+ "parameters": [
1222
+ {
1223
+ "name": "fieldName",
1224
+ "type": "string",
1225
+ "optional": false
1226
+ },
1227
+ {
1228
+ "name": "model",
1229
+ "type": "string",
1230
+ "optional": true
1231
+ }
1232
+ ],
1233
+ "returnType": "Promise<number[] | null>",
1234
+ "isStatic": false,
1235
+ "isPublic": true
1236
+ },
1237
+ "hasStaleEmbeddings": {
1238
+ "name": "hasStaleEmbeddings",
1239
+ "async": true,
1240
+ "parameters": [],
1241
+ "returnType": "Promise<boolean>",
1242
+ "isStatic": false,
1243
+ "isPublic": true
1244
+ },
1245
+ "clearEmbeddings": {
1246
+ "name": "clearEmbeddings",
1247
+ "async": true,
1248
+ "parameters": [],
1249
+ "returnType": "Promise<void>",
1250
+ "isStatic": false,
1251
+ "isPublic": true
1252
+ },
1253
+ "getParent": {
1254
+ "name": "getParent",
1255
+ "async": true,
1256
+ "parameters": [],
1257
+ "returnType": "Promise<null>",
1258
+ "isStatic": false,
1259
+ "isPublic": true
1260
+ },
1261
+ "getChildren": {
1262
+ "name": "getChildren",
1263
+ "async": true,
1264
+ "parameters": [],
1265
+ "returnType": "Promise",
1266
+ "isStatic": false,
1267
+ "isPublic": true
1268
+ },
1269
+ "getAncestors": {
1270
+ "name": "getAncestors",
1271
+ "async": true,
1272
+ "parameters": [],
1273
+ "returnType": "Promise",
1274
+ "isStatic": false,
1275
+ "isPublic": true
1276
+ },
1277
+ "getDescendants": {
1278
+ "name": "getDescendants",
1279
+ "async": true,
1280
+ "parameters": [],
1281
+ "returnType": "Promise",
1282
+ "isStatic": false,
1283
+ "isPublic": true
1284
+ },
1285
+ "getHierarchy": {
1286
+ "name": "getHierarchy",
1287
+ "async": true,
1288
+ "parameters": [],
1289
+ "returnType": "Promise<HierarchyView>",
1290
+ "isStatic": false,
1291
+ "isPublic": true
1292
+ },
1293
+ "moveTo": {
1294
+ "name": "moveTo",
1295
+ "async": true,
1296
+ "parameters": [
1297
+ {
1298
+ "name": "newParent",
1299
+ "type": "string | null",
1300
+ "optional": false
1301
+ }
1302
+ ],
1303
+ "returnType": "Promise<void>",
1304
+ "isStatic": false,
1305
+ "isPublic": true
1306
+ },
1307
+ "getGeoData": {
1308
+ "name": "getGeoData",
1309
+ "async": false,
1310
+ "parameters": [],
1311
+ "returnType": "GeoData",
1312
+ "isStatic": false,
1313
+ "isPublic": true
1314
+ },
1315
+ "hasCoordinates": {
1316
+ "name": "hasCoordinates",
1317
+ "async": false,
1318
+ "parameters": [],
1319
+ "returnType": "boolean",
1320
+ "isStatic": false,
1321
+ "isPublic": true
1322
+ },
1323
+ "getMetadata": {
1324
+ "name": "getMetadata",
1325
+ "async": false,
1326
+ "parameters": [],
1327
+ "returnType": "Record<string, any>",
1328
+ "isStatic": false,
1329
+ "isPublic": true
1330
+ },
1331
+ "setMetadata": {
1332
+ "name": "setMetadata",
1333
+ "async": false,
1334
+ "parameters": [
1335
+ {
1336
+ "name": "data",
1337
+ "type": "Record<string, any>",
1338
+ "optional": false
1339
+ }
1340
+ ],
1341
+ "returnType": "void",
1342
+ "isStatic": false,
1343
+ "isPublic": true
1344
+ },
1345
+ "updateMetadata": {
1346
+ "name": "updateMetadata",
1347
+ "async": false,
1348
+ "parameters": [
1349
+ {
1350
+ "name": "updates",
1351
+ "type": "Record<string, any>",
1352
+ "optional": false
1353
+ }
1354
+ ],
1355
+ "returnType": "void",
1356
+ "isStatic": false,
1357
+ "isPublic": true
1358
+ },
1359
+ "getType": {
1360
+ "name": "getType",
1361
+ "async": true,
1362
+ "parameters": [],
1363
+ "returnType": "any",
1364
+ "isStatic": false,
1365
+ "isPublic": true
1366
+ },
1367
+ "getAssets": {
1368
+ "name": "getAssets",
1369
+ "async": true,
1370
+ "parameters": [
1371
+ {
1372
+ "name": "relationship",
1373
+ "type": "string",
1374
+ "optional": true
1375
+ }
1376
+ ],
1377
+ "returnType": "Promise<Asset[]>",
1378
+ "isStatic": false,
1379
+ "isPublic": true
1380
+ },
1381
+ "addAsset": {
1382
+ "name": "addAsset",
1383
+ "async": true,
1384
+ "parameters": [
1385
+ {
1386
+ "name": "asset",
1387
+ "type": "Asset",
1388
+ "optional": false
1389
+ },
1390
+ {
1391
+ "name": "relationship",
1392
+ "type": "any",
1393
+ "optional": true,
1394
+ "default": "attachment"
1395
+ },
1396
+ {
1397
+ "name": "sortOrder",
1398
+ "type": "any",
1399
+ "optional": true
1400
+ }
1401
+ ],
1402
+ "returnType": "Promise<void>",
1403
+ "isStatic": false,
1404
+ "isPublic": true
1405
+ },
1406
+ "removeAsset": {
1407
+ "name": "removeAsset",
1408
+ "async": true,
1409
+ "parameters": [
1410
+ {
1411
+ "name": "assetId",
1412
+ "type": "string",
1413
+ "optional": false
1414
+ },
1415
+ {
1416
+ "name": "relationship",
1417
+ "type": "string",
1418
+ "optional": true
1419
+ }
1420
+ ],
1421
+ "returnType": "Promise<void>",
1422
+ "isStatic": false,
1423
+ "isPublic": true
1424
+ }
1425
+ },
1426
+ "decoratorConfig": {
1427
+ "tableStrategy": "sti",
1428
+ "api": {
1429
+ "include": [
1430
+ "list",
1431
+ "get",
1432
+ "create",
1433
+ "update",
1434
+ "delete"
1435
+ ]
1436
+ },
1437
+ "mcp": {
1438
+ "include": [
1439
+ "list",
1440
+ "get",
1441
+ "create",
1442
+ "update"
1443
+ ]
1444
+ },
1445
+ "cli": true,
1446
+ "tenantScoped": {
1447
+ "mode": "optional"
1448
+ }
1449
+ },
1450
+ "extends": "SmrtHierarchical",
1451
+ "exportName": "Place",
1452
+ "collectionExportName": "PlaceCollection",
1453
+ "schema": {
1454
+ "tableName": "places",
1455
+ "ddl": "CREATE TABLE IF NOT EXISTS \"places\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"parent_id\" UUID,\n \"tenant_id\" UUID,\n \"type_id\" UUID,\n \"name\" TEXT,\n \"description\" TEXT,\n \"latitude\" REAL,\n \"longitude\" REAL,\n \"street_number\" TEXT,\n \"street_name\" TEXT,\n \"city\" TEXT,\n \"region\" TEXT,\n \"country\" TEXT,\n \"postal_code\" TEXT,\n \"country_code\" TEXT,\n \"timezone\" TEXT,\n \"external_id\" TEXT,\n \"source\" TEXT,\n \"metadata\" TEXT\n);",
1456
+ "columns": {
1457
+ "id": {
1458
+ "type": "UUID",
1459
+ "primaryKey": true,
1460
+ "referenceKind": "id",
1461
+ "notNull": true
1462
+ },
1463
+ "slug": {
1464
+ "type": "TEXT",
1465
+ "notNull": true
1466
+ },
1467
+ "context": {
1468
+ "type": "TEXT",
1469
+ "notNull": true,
1470
+ "default": ""
1471
+ },
1472
+ "_meta_type": {
1473
+ "type": "TEXT",
1474
+ "notNull": true
1475
+ },
1476
+ "_meta_data": {
1477
+ "type": "JSON",
1478
+ "notNull": false
1479
+ },
1480
+ "created_at": {
1481
+ "type": "TIMESTAMP",
1482
+ "notNull": true,
1483
+ "default": "current_timestamp"
1484
+ },
1485
+ "updated_at": {
1486
+ "type": "TIMESTAMP",
1487
+ "notNull": true,
1488
+ "default": "current_timestamp"
1489
+ },
1490
+ "parent_id": {
1491
+ "type": "UUID",
1492
+ "referenceKind": "foreignKey",
1493
+ "notNull": false
1494
+ },
1495
+ "tenant_id": {
1496
+ "type": "UUID",
1497
+ "referenceKind": "tenantId",
1498
+ "notNull": false
1499
+ },
1500
+ "type_id": {
1501
+ "type": "UUID",
1502
+ "referenceKind": "foreignKey",
1503
+ "notNull": false
1504
+ },
1505
+ "name": {
1506
+ "type": "TEXT",
1507
+ "notNull": false
1508
+ },
1509
+ "description": {
1510
+ "type": "TEXT",
1511
+ "notNull": false
1512
+ },
1513
+ "latitude": {
1514
+ "type": "REAL",
1515
+ "notNull": false
1516
+ },
1517
+ "longitude": {
1518
+ "type": "REAL",
1519
+ "notNull": false
1520
+ },
1521
+ "street_number": {
1522
+ "type": "TEXT",
1523
+ "notNull": false
1524
+ },
1525
+ "street_name": {
1526
+ "type": "TEXT",
1527
+ "notNull": false
1528
+ },
1529
+ "city": {
1530
+ "type": "TEXT",
1531
+ "notNull": false
1532
+ },
1533
+ "region": {
1534
+ "type": "TEXT",
1535
+ "notNull": false
1536
+ },
1537
+ "country": {
1538
+ "type": "TEXT",
1539
+ "notNull": false
1540
+ },
1541
+ "postal_code": {
1542
+ "type": "TEXT",
1543
+ "notNull": false
1544
+ },
1545
+ "country_code": {
1546
+ "type": "TEXT",
1547
+ "notNull": false
1548
+ },
1549
+ "timezone": {
1550
+ "type": "TEXT",
1551
+ "notNull": false
1552
+ },
1553
+ "external_id": {
1554
+ "type": "TEXT",
1555
+ "notNull": false
1556
+ },
1557
+ "source": {
1558
+ "type": "TEXT",
1559
+ "notNull": false
1560
+ },
1561
+ "metadata": {
1562
+ "type": "TEXT",
1563
+ "notNull": false
1564
+ }
1565
+ },
1566
+ "indexes": [
1567
+ {
1568
+ "name": "places_id_idx",
1569
+ "columns": [
1570
+ "id"
1571
+ ]
1572
+ },
1573
+ {
1574
+ "name": "places_slug_context_meta_type_idx",
1575
+ "columns": [
1576
+ "slug",
1577
+ "context",
1578
+ "_meta_type"
1579
+ ],
1580
+ "unique": true
1581
+ },
1582
+ {
1583
+ "name": "places_meta_type_idx",
1584
+ "columns": [
1585
+ "_meta_type"
1586
+ ]
1587
+ }
1588
+ ],
1589
+ "version": "1fe43eb8"
1590
+ }
1591
+ },
1592
+ "@happyvertical/smrt-places:PlaceAsset": {
1593
+ "name": "placeasset",
1594
+ "className": "PlaceAsset",
1595
+ "qualifiedName": "@happyvertical/smrt-places:PlaceAsset",
1596
+ "collection": "placeassets",
1597
+ "filePath": "/home/runner/_work/smrt/smrt/packages/places/src/models/PlaceAsset.ts",
1598
+ "packageName": "@happyvertical/smrt-places",
1599
+ "fields": {
1600
+ "tenantId": {
1601
+ "type": "text",
1602
+ "required": false,
1603
+ "_meta": {
1604
+ "sqlType": "UUID",
1605
+ "nullable": true,
1606
+ "__tenancy": {
1607
+ "isTenantIdField": true,
1608
+ "autoFilter": true,
1609
+ "required": false,
1610
+ "autoPopulate": true,
1611
+ "nullable": true,
1612
+ "mode": "optional",
1613
+ "field": "tenantId",
1614
+ "allowSuperAdminBypass": false
1615
+ }
1616
+ }
1617
+ },
1618
+ "placeId": {
1619
+ "type": "foreignKey",
1620
+ "required": true,
1621
+ "related": "Place",
1622
+ "_meta": {
1623
+ "required": true
1624
+ }
1625
+ },
1626
+ "assetId": {
1627
+ "type": "crossPackageRef",
1628
+ "required": true,
1629
+ "related": "@happyvertical/smrt-assets:Asset"
1630
+ },
1631
+ "relationship": {
1632
+ "type": "text",
1633
+ "required": true,
1634
+ "_meta": {
1635
+ "required": true
1636
+ }
1637
+ },
1638
+ "sortOrder": {
1639
+ "type": "integer",
1640
+ "required": true,
1641
+ "default": 0
1642
+ }
1643
+ },
1644
+ "methods": {},
1645
+ "decoratorConfig": {
1646
+ "tableName": "place_assets",
1647
+ "conflictColumns": [
1648
+ "place_id",
1649
+ "asset_id",
1650
+ "relationship"
1651
+ ],
1652
+ "api": false,
1653
+ "mcp": false,
1654
+ "cli": false,
1655
+ "tenantScoped": {
1656
+ "mode": "optional"
1657
+ }
1658
+ },
1659
+ "extends": "SmrtObject",
1660
+ "exportName": "PlaceAsset",
1661
+ "collectionExportName": "PlaceAssetCollection",
1662
+ "validationRules": [
1663
+ {
1664
+ "field": "placeId",
1665
+ "rule": "required",
1666
+ "fieldType": "foreignKey"
1667
+ },
1668
+ {
1669
+ "field": "assetId",
1670
+ "rule": "required",
1671
+ "fieldType": "crossPackageRef"
1672
+ },
1673
+ {
1674
+ "field": "relationship",
1675
+ "rule": "required",
1676
+ "fieldType": "text"
1677
+ },
1678
+ {
1679
+ "field": "sortOrder",
1680
+ "rule": "required",
1681
+ "fieldType": "integer"
1682
+ }
1683
+ ],
1684
+ "schema": {
1685
+ "tableName": "place_assets",
1686
+ "ddl": "CREATE TABLE IF NOT EXISTS \"place_assets\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID,\n \"place_id\" UUID NOT NULL,\n \"asset_id\" UUID NOT NULL,\n \"relationship\" TEXT NOT NULL,\n \"sort_order\" INTEGER NOT NULL DEFAULT 0\n);",
1687
+ "columns": {
1688
+ "id": {
1689
+ "type": "UUID",
1690
+ "primaryKey": true,
1691
+ "referenceKind": "id",
1692
+ "notNull": true
1693
+ },
1694
+ "slug": {
1695
+ "type": "TEXT",
1696
+ "notNull": true
1697
+ },
1698
+ "context": {
1699
+ "type": "TEXT",
1700
+ "notNull": true,
1701
+ "default": ""
1702
+ },
1703
+ "created_at": {
1704
+ "type": "TIMESTAMP",
1705
+ "notNull": true,
1706
+ "default": "current_timestamp"
1707
+ },
1708
+ "updated_at": {
1709
+ "type": "TIMESTAMP",
1710
+ "notNull": true,
1711
+ "default": "current_timestamp"
1712
+ },
1713
+ "tenant_id": {
1714
+ "type": "UUID",
1715
+ "referenceKind": "tenantId",
1716
+ "notNull": false,
1717
+ "unique": false
1718
+ },
1719
+ "place_id": {
1720
+ "type": "UUID",
1721
+ "referenceKind": "foreignKey",
1722
+ "notNull": true,
1723
+ "unique": false
1724
+ },
1725
+ "asset_id": {
1726
+ "type": "UUID",
1727
+ "referenceKind": "crossPackageRef",
1728
+ "notNull": true,
1729
+ "unique": false
1730
+ },
1731
+ "relationship": {
1732
+ "type": "TEXT",
1733
+ "notNull": true,
1734
+ "unique": false
1735
+ },
1736
+ "sort_order": {
1737
+ "type": "INTEGER",
1738
+ "notNull": true,
1739
+ "unique": false,
1740
+ "default": 0
1741
+ }
1742
+ },
1743
+ "indexes": [
1744
+ {
1745
+ "name": "place_assets_id_idx",
1746
+ "columns": [
1747
+ "id"
1748
+ ]
1749
+ },
1750
+ {
1751
+ "name": "place_assets_place_id_asset_id_idx",
1752
+ "columns": [
1753
+ "place_id",
1754
+ "asset_id",
1755
+ "relationship"
1756
+ ],
1757
+ "unique": true
1758
+ }
1759
+ ],
1760
+ "version": "34bbdfbb"
1761
+ }
1762
+ },
1763
+ "@happyvertical/smrt-places:PlaceType": {
1764
+ "name": "placetype",
1765
+ "className": "PlaceType",
1766
+ "qualifiedName": "@happyvertical/smrt-places:PlaceType",
1767
+ "collection": "placetypes",
1768
+ "filePath": "/home/runner/_work/smrt/smrt/packages/places/src/models/PlaceType.ts",
1769
+ "packageName": "@happyvertical/smrt-places",
1770
+ "fields": {
1771
+ "created_at": {
1772
+ "type": "datetime",
1773
+ "required": false
1774
+ },
1775
+ "updated_at": {
1776
+ "type": "datetime",
1777
+ "required": false
1778
+ },
1779
+ "name": {
1780
+ "type": "text",
1781
+ "required": true,
1782
+ "default": "",
1783
+ "_meta": {
1784
+ "required": true
1785
+ }
1786
+ },
1787
+ "description": {
1788
+ "type": "text",
1789
+ "required": false
1790
+ },
1791
+ "createdAt": {
1792
+ "type": "text",
1793
+ "required": false
1794
+ },
1795
+ "updatedAt": {
1796
+ "type": "text",
1797
+ "required": false
1798
+ }
1799
+ },
1800
+ "methods": {
1801
+ "getAiUsageSnapshot": {
1802
+ "name": "getAiUsageSnapshot",
1803
+ "async": false,
1804
+ "parameters": [],
1805
+ "returnType": "AiUsageSnapshot | undefined",
1806
+ "isStatic": false,
1807
+ "isPublic": true
1808
+ },
1809
+ "resetAiUsage": {
1810
+ "name": "resetAiUsage",
1811
+ "async": false,
1812
+ "parameters": [],
1813
+ "returnType": "void",
1814
+ "isStatic": false,
1815
+ "isPublic": true
1816
+ },
1817
+ "listAiUsage": {
1818
+ "name": "listAiUsage",
1819
+ "async": true,
1820
+ "parameters": [
1821
+ {
1822
+ "name": "options",
1823
+ "type": "AiUsageListOptions",
1824
+ "optional": true
1825
+ }
1826
+ ],
1827
+ "returnType": "Promise<SmrtAiUsageRecord[]>",
1828
+ "isStatic": false,
1829
+ "isPublic": true
1830
+ },
1831
+ "summarizeAiUsage": {
1832
+ "name": "summarizeAiUsage",
1833
+ "async": true,
1834
+ "parameters": [
1835
+ {
1836
+ "name": "options",
1837
+ "type": "AiUsageSummaryOptions",
1838
+ "optional": true
1839
+ }
1840
+ ],
1841
+ "returnType": "Promise<Record<string, AiUsageStats>>",
1842
+ "isStatic": false,
1843
+ "isPublic": true
1844
+ },
1845
+ "destroy": {
1846
+ "name": "destroy",
1847
+ "async": false,
1848
+ "parameters": [],
1849
+ "returnType": "void",
1850
+ "isStatic": false,
1851
+ "isPublic": true
1852
+ },
1853
+ "markAsPersisted": {
1854
+ "name": "markAsPersisted",
1855
+ "async": false,
1856
+ "parameters": [],
1857
+ "returnType": "void",
1858
+ "isStatic": false,
1859
+ "isPublic": true
1860
+ },
1861
+ "initialize": {
1862
+ "name": "initialize",
1863
+ "async": true,
1864
+ "parameters": [],
1865
+ "returnType": "Promise",
1866
+ "isStatic": false,
1867
+ "isPublic": true
1868
+ },
1869
+ "loadDataFromDb": {
1870
+ "name": "loadDataFromDb",
1871
+ "async": true,
1872
+ "parameters": [
1873
+ {
1874
+ "name": "data",
1875
+ "type": "any",
1876
+ "optional": false
1877
+ }
1878
+ ],
1879
+ "returnType": "any",
1880
+ "isStatic": false,
1881
+ "isPublic": true
1882
+ },
1883
+ "getFields": {
1884
+ "name": "getFields",
1885
+ "async": true,
1886
+ "parameters": [],
1887
+ "returnType": "any",
1888
+ "isStatic": false,
1889
+ "isPublic": true
1890
+ },
1891
+ "toJSON": {
1892
+ "name": "toJSON",
1893
+ "async": false,
1894
+ "parameters": [],
1895
+ "returnType": "any",
1896
+ "isStatic": false,
1897
+ "isPublic": true
1898
+ },
1899
+ "toPlainObject": {
1900
+ "name": "toPlainObject",
1901
+ "async": false,
1902
+ "parameters": [],
1903
+ "returnType": "Record<string>",
1904
+ "isStatic": false,
1905
+ "isPublic": true
1906
+ },
1907
+ "toPublicJSON": {
1908
+ "name": "toPublicJSON",
1909
+ "async": false,
1910
+ "parameters": [],
1911
+ "returnType": "Record<string>",
1912
+ "isStatic": false,
1913
+ "isPublic": true
1914
+ },
1915
+ "getId": {
1916
+ "name": "getId",
1917
+ "async": true,
1918
+ "parameters": [],
1919
+ "returnType": "any",
1920
+ "isStatic": false,
1921
+ "isPublic": true
1922
+ },
1923
+ "getSlug": {
1924
+ "name": "getSlug",
1925
+ "async": true,
1926
+ "parameters": [],
1927
+ "returnType": "any",
1928
+ "isStatic": false,
1929
+ "isPublic": true
1930
+ },
1931
+ "getSavedId": {
1932
+ "name": "getSavedId",
1933
+ "async": true,
1934
+ "parameters": [],
1935
+ "returnType": "any",
1936
+ "isStatic": false,
1937
+ "isPublic": true
1938
+ },
1939
+ "isSaved": {
1940
+ "name": "isSaved",
1941
+ "async": true,
1942
+ "parameters": [],
1943
+ "returnType": "any",
1944
+ "isStatic": false,
1945
+ "isPublic": true
1946
+ },
1947
+ "save": {
1948
+ "name": "save",
1949
+ "async": true,
1950
+ "parameters": [],
1951
+ "returnType": "any",
1952
+ "isStatic": false,
1953
+ "isPublic": true
1954
+ },
1955
+ "classifyConstraintError": {
1956
+ "name": "classifyConstraintError",
1957
+ "async": false,
1958
+ "parameters": [
1959
+ {
1960
+ "name": "message",
1961
+ "type": "string",
1962
+ "optional": false
1963
+ }
1964
+ ],
1965
+ "returnType": "'unique' | 'not_null' | null",
1966
+ "isStatic": true,
1967
+ "isPublic": true
1968
+ },
1969
+ "loadFromId": {
1970
+ "name": "loadFromId",
1971
+ "async": true,
1972
+ "parameters": [],
1973
+ "returnType": "any",
1974
+ "isStatic": false,
1975
+ "isPublic": true
1976
+ },
1977
+ "loadFromSlug": {
1978
+ "name": "loadFromSlug",
1979
+ "async": true,
1980
+ "parameters": [],
1981
+ "returnType": "any",
1982
+ "isStatic": false,
1983
+ "isPublic": true
1984
+ },
1985
+ "is": {
1986
+ "name": "is",
1987
+ "async": true,
1988
+ "parameters": [
1989
+ {
1990
+ "name": "criteria",
1991
+ "type": "string",
1992
+ "optional": false
1993
+ },
1994
+ {
1995
+ "name": "options",
1996
+ "type": "any",
1997
+ "optional": true
1998
+ }
1999
+ ],
2000
+ "returnType": "any",
2001
+ "isStatic": false,
2002
+ "isPublic": true
2003
+ },
2004
+ "do": {
2005
+ "name": "do",
2006
+ "async": true,
2007
+ "parameters": [
2008
+ {
2009
+ "name": "instructions",
2010
+ "type": "string",
2011
+ "optional": false
2012
+ },
2013
+ {
2014
+ "name": "options",
2015
+ "type": "any",
2016
+ "optional": true
2017
+ }
2018
+ ],
2019
+ "returnType": "any",
2020
+ "isStatic": false,
2021
+ "isPublic": true
2022
+ },
2023
+ "describe": {
2024
+ "name": "describe",
2025
+ "async": true,
2026
+ "parameters": [
2027
+ {
2028
+ "name": "options",
2029
+ "type": "any",
2030
+ "optional": true
2031
+ }
2032
+ ],
2033
+ "returnType": "any",
2034
+ "isStatic": false,
2035
+ "isPublic": true
2036
+ },
2037
+ "delete": {
2038
+ "name": "delete",
2039
+ "async": true,
2040
+ "parameters": [],
2041
+ "returnType": "Promise<void>",
2042
+ "isStatic": false,
2043
+ "isPublic": true
2044
+ },
2045
+ "isRelatedLoaded": {
2046
+ "name": "isRelatedLoaded",
2047
+ "async": false,
2048
+ "parameters": [
2049
+ {
2050
+ "name": "fieldName",
2051
+ "type": "string",
2052
+ "optional": false
2053
+ }
2054
+ ],
2055
+ "returnType": "boolean",
2056
+ "isStatic": false,
2057
+ "isPublic": true
2058
+ },
2059
+ "loadRelated": {
2060
+ "name": "loadRelated",
2061
+ "async": true,
2062
+ "parameters": [
2063
+ {
2064
+ "name": "fieldName",
2065
+ "type": "string",
2066
+ "optional": false
2067
+ },
2068
+ {
2069
+ "name": "opts",
2070
+ "type": "LoadRelatedOptions",
2071
+ "optional": true
2072
+ }
2073
+ ],
2074
+ "returnType": "Promise<any>",
2075
+ "isStatic": false,
2076
+ "isPublic": true
2077
+ },
2078
+ "loadRelatedMany": {
2079
+ "name": "loadRelatedMany",
2080
+ "async": true,
2081
+ "parameters": [
2082
+ {
2083
+ "name": "fieldName",
2084
+ "type": "string",
2085
+ "optional": false
2086
+ },
2087
+ {
2088
+ "name": "opts",
2089
+ "type": "LoadRelatedOptions",
2090
+ "optional": true
2091
+ }
2092
+ ],
2093
+ "returnType": "Promise<any[]>",
2094
+ "isStatic": false,
2095
+ "isPublic": true
2096
+ },
2097
+ "getRelated": {
2098
+ "name": "getRelated",
2099
+ "async": true,
2100
+ "parameters": [
2101
+ {
2102
+ "name": "fieldName",
2103
+ "type": "string",
2104
+ "optional": false
2105
+ },
2106
+ {
2107
+ "name": "opts",
2108
+ "type": "LoadRelatedOptions",
2109
+ "optional": true
2110
+ }
2111
+ ],
2112
+ "returnType": "Promise<any>",
2113
+ "isStatic": false,
2114
+ "isPublic": true
2115
+ },
2116
+ "getAvailableTools": {
2117
+ "name": "getAvailableTools",
2118
+ "async": false,
2119
+ "parameters": [],
2120
+ "returnType": "AITool[]",
2121
+ "isStatic": false,
2122
+ "isPublic": true
2123
+ },
2124
+ "executeToolCall": {
2125
+ "name": "executeToolCall",
2126
+ "async": true,
2127
+ "parameters": [
2128
+ {
2129
+ "name": "toolCall",
2130
+ "type": "ToolCall",
2131
+ "optional": false
2132
+ }
2133
+ ],
2134
+ "returnType": "Promise<ToolCallResult>",
2135
+ "isStatic": false,
2136
+ "isPublic": true
2137
+ },
2138
+ "remember": {
2139
+ "name": "remember",
2140
+ "async": true,
2141
+ "parameters": [
2142
+ {
2143
+ "name": "options",
2144
+ "type": "object",
2145
+ "optional": false
2146
+ }
2147
+ ],
2148
+ "returnType": "Promise<void>",
2149
+ "isStatic": false,
2150
+ "isPublic": true
2151
+ },
2152
+ "recall": {
2153
+ "name": "recall",
2154
+ "async": true,
2155
+ "parameters": [
2156
+ {
2157
+ "name": "options",
2158
+ "type": "object",
2159
+ "optional": false
2160
+ }
2161
+ ],
2162
+ "returnType": "Promise<any | null>",
2163
+ "isStatic": false,
2164
+ "isPublic": true
2165
+ },
2166
+ "recallAll": {
2167
+ "name": "recallAll",
2168
+ "async": true,
2169
+ "parameters": [
2170
+ {
2171
+ "name": "options",
2172
+ "type": "object",
2173
+ "optional": true
2174
+ }
2175
+ ],
2176
+ "returnType": "Promise<Map<string, any>>",
2177
+ "isStatic": false,
2178
+ "isPublic": true
2179
+ },
2180
+ "forget": {
2181
+ "name": "forget",
2182
+ "async": true,
2183
+ "parameters": [
2184
+ {
2185
+ "name": "options",
2186
+ "type": "object",
2187
+ "optional": false
2188
+ }
2189
+ ],
2190
+ "returnType": "Promise<void>",
2191
+ "isStatic": false,
2192
+ "isPublic": true
2193
+ },
2194
+ "forgetScope": {
2195
+ "name": "forgetScope",
2196
+ "async": true,
2197
+ "parameters": [
2198
+ {
2199
+ "name": "options",
2200
+ "type": "object",
2201
+ "optional": false
2202
+ }
2203
+ ],
2204
+ "returnType": "Promise<number>",
2205
+ "isStatic": false,
2206
+ "isPublic": true
2207
+ },
2208
+ "generateEmbeddings": {
2209
+ "name": "generateEmbeddings",
2210
+ "async": true,
2211
+ "parameters": [
2212
+ {
2213
+ "name": "options",
2214
+ "type": "GenerateEmbeddingsOptions",
2215
+ "optional": true
2216
+ }
2217
+ ],
2218
+ "returnType": "Promise<void>",
2219
+ "isStatic": false,
2220
+ "isPublic": true
2221
+ },
2222
+ "getEmbedding": {
2223
+ "name": "getEmbedding",
2224
+ "async": true,
2225
+ "parameters": [
2226
+ {
2227
+ "name": "fieldName",
2228
+ "type": "string",
2229
+ "optional": false
2230
+ },
2231
+ {
2232
+ "name": "model",
2233
+ "type": "string",
2234
+ "optional": true
2235
+ }
2236
+ ],
2237
+ "returnType": "Promise<number[] | null>",
2238
+ "isStatic": false,
2239
+ "isPublic": true
2240
+ },
2241
+ "hasStaleEmbeddings": {
2242
+ "name": "hasStaleEmbeddings",
2243
+ "async": true,
2244
+ "parameters": [],
2245
+ "returnType": "Promise<boolean>",
2246
+ "isStatic": false,
2247
+ "isPublic": true
2248
+ },
2249
+ "clearEmbeddings": {
2250
+ "name": "clearEmbeddings",
2251
+ "async": true,
2252
+ "parameters": [],
2253
+ "returnType": "Promise<void>",
2254
+ "isStatic": false,
2255
+ "isPublic": true
2256
+ },
2257
+ "getBySlug": {
2258
+ "name": "getBySlug",
2259
+ "async": true,
2260
+ "parameters": [
2261
+ {
2262
+ "name": "_slug",
2263
+ "type": "string",
2264
+ "optional": false
2265
+ }
2266
+ ],
2267
+ "returnType": "Promise<PlaceType | null>",
2268
+ "isStatic": true,
2269
+ "isPublic": true
2270
+ }
2271
+ },
2272
+ "decoratorConfig": {
2273
+ "tableStrategy": "sti",
2274
+ "api": {
2275
+ "include": [
2276
+ "list",
2277
+ "get",
2278
+ "create",
2279
+ "update",
2280
+ "delete"
2281
+ ]
2282
+ },
2283
+ "mcp": {
2284
+ "include": [
2285
+ "list",
2286
+ "get",
2287
+ "create"
2288
+ ]
2289
+ },
2290
+ "cli": true
2291
+ },
2292
+ "extends": "SmrtObject",
2293
+ "exportName": "PlaceType",
2294
+ "collectionExportName": "PlaceTypeCollection",
2295
+ "validationRules": [
2296
+ {
2297
+ "field": "name",
2298
+ "rule": "required",
2299
+ "fieldType": "text"
2300
+ }
2301
+ ],
2302
+ "schema": {
2303
+ "tableName": "place_types",
2304
+ "ddl": "CREATE TABLE IF NOT EXISTS \"place_types\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"_meta_type\" TEXT NOT NULL,\n \"_meta_data\" JSON,\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"name\" TEXT DEFAULT '',\n \"description\" TEXT\n);",
2305
+ "columns": {
2306
+ "id": {
2307
+ "type": "UUID",
2308
+ "primaryKey": true,
2309
+ "referenceKind": "id",
2310
+ "notNull": true
2311
+ },
2312
+ "slug": {
2313
+ "type": "TEXT",
2314
+ "notNull": true
2315
+ },
2316
+ "context": {
2317
+ "type": "TEXT",
2318
+ "notNull": true,
2319
+ "default": ""
2320
+ },
2321
+ "_meta_type": {
2322
+ "type": "TEXT",
2323
+ "notNull": true
2324
+ },
2325
+ "_meta_data": {
2326
+ "type": "JSON",
2327
+ "notNull": false
2328
+ },
2329
+ "created_at": {
2330
+ "type": "TIMESTAMP",
2331
+ "notNull": true,
2332
+ "default": "current_timestamp"
2333
+ },
2334
+ "updated_at": {
2335
+ "type": "TIMESTAMP",
2336
+ "notNull": true,
2337
+ "default": "current_timestamp"
2338
+ },
2339
+ "name": {
2340
+ "type": "TEXT",
2341
+ "notNull": false,
2342
+ "default": ""
2343
+ },
2344
+ "description": {
2345
+ "type": "TEXT",
2346
+ "notNull": false
2347
+ }
2348
+ },
2349
+ "indexes": [
2350
+ {
2351
+ "name": "place_types_id_idx",
2352
+ "columns": [
2353
+ "id"
2354
+ ]
2355
+ },
2356
+ {
2357
+ "name": "place_types_slug_context_meta_type_idx",
2358
+ "columns": [
2359
+ "slug",
2360
+ "context",
2361
+ "_meta_type"
2362
+ ],
2363
+ "unique": true
2364
+ },
2365
+ {
2366
+ "name": "place_types_meta_type_idx",
2367
+ "columns": [
2368
+ "_meta_type"
2369
+ ]
2370
+ }
2371
+ ],
2372
+ "version": "8c3bb691"
2373
+ }
2374
+ }
2375
+ },
2376
+ "moduleType": "smrt",
2377
+ "smrtDependencies": [
2378
+ "@happyvertical/smrt-assets",
2379
+ "@happyvertical/smrt-core",
2380
+ "@happyvertical/smrt-tenancy"
2381
+ ]
2382
+ }