@happyvertical/smrt-places 0.57.35 → 0.57.36

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.
@@ -3,12 +3,12 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-places",
6
- "packageVersion": "0.57.35",
6
+ "packageVersion": "0.57.36",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "0691e2bf95344ea24ecf023f393e410a0de06bebda9c10c96a53cb9d9873f198",
11
- "packageJson": "18a50713fa829b172f9bf07e83cb58287fb2c180696acaa597e54a4694bd2008",
10
+ "manifest": "d70331d1b4596cf6e9f7b2d2611d0ff8f277dfd63b5aaae7d766d50cfbe413a1",
11
+ "packageJson": "a1f801ab278eed4f208cd899828d881386ac0fe66073a9c16f212236da5ed75c",
12
12
  "agents": "1f12a465f3ef103ac0ba27bcec1ec2b982fd0f5e8a63b9a42738f2c79ecebe49"
13
13
  },
14
14
  "exports": [
@@ -67,189 +67,201 @@
67
67
  ],
68
68
  "objects": [
69
69
  {
70
- "name": "Place",
71
- "qualifiedName": "@happyvertical/smrt-places:Place",
72
- "displayLabelField": "name",
73
- "collection": "places",
74
- "tableName": "places",
70
+ "name": "PlaceAssetCollection",
71
+ "qualifiedName": "@happyvertical/smrt-places:PlaceAssetCollection",
72
+ "collection": "placeassets",
73
+ "tableName": "place_assets",
75
74
  "packageName": "@happyvertical/smrt-places",
76
- "extends": "SmrtHierarchical",
77
- "fields": [
78
- {
79
- "name": "created_at",
80
- "type": "datetime",
81
- "required": false,
82
- "columnType": "TIMESTAMP"
83
- },
84
- {
85
- "name": "updated_at",
86
- "type": "datetime",
87
- "required": false,
88
- "columnType": "TIMESTAMP"
89
- },
90
- {
91
- "name": "parentId",
92
- "type": "foreignKey",
93
- "required": false,
94
- "related": "Place",
95
- "columnType": "UUID"
96
- },
97
- {
98
- "name": "tenantId",
99
- "type": "text",
100
- "required": false,
101
- "columnType": "UUID"
102
- },
103
- {
104
- "name": "typeId",
105
- "type": "foreignKey",
106
- "required": false,
107
- "related": "PlaceType",
108
- "columnType": "UUID"
109
- },
110
- {
111
- "name": "name",
112
- "type": "text",
113
- "required": false,
114
- "columnType": "TEXT"
115
- },
75
+ "extends": "SmrtJunction",
76
+ "fields": [],
77
+ "relationships": [],
78
+ "methods": [
79
+ "addAsset",
80
+ "attach",
81
+ "byLeft",
82
+ "byRight",
83
+ "detach",
84
+ "getAssets",
85
+ "removeAsset",
86
+ "setLinks"
87
+ ],
88
+ "methodSignatures": [
116
89
  {
117
- "name": "description",
118
- "type": "text",
119
- "required": false,
120
- "columnType": "TEXT"
90
+ "name": "addAsset",
91
+ "async": true,
92
+ "params": [
93
+ "placeId: string",
94
+ "asset: Asset",
95
+ "relationship?: any",
96
+ "sortOrder?: any"
97
+ ],
98
+ "returns": "Promise<void>"
121
99
  },
122
100
  {
123
- "name": "latitude",
124
- "type": "decimal",
125
- "required": false,
126
- "columnType": "REAL"
101
+ "name": "attach",
102
+ "async": true,
103
+ "params": [
104
+ "leftId: string",
105
+ "rightId: string",
106
+ "opts?: JunctionAttachOptions"
107
+ ],
108
+ "returns": "Promise<TItem>"
127
109
  },
128
110
  {
129
- "name": "longitude",
130
- "type": "decimal",
131
- "required": false,
132
- "columnType": "REAL"
111
+ "name": "byLeft",
112
+ "async": true,
113
+ "params": [
114
+ "leftId: string",
115
+ "opts?: JunctionFilterOptions"
116
+ ],
117
+ "returns": "Promise<TItem[]>"
133
118
  },
134
119
  {
135
- "name": "streetNumber",
136
- "type": "text",
137
- "required": false,
138
- "columnType": "TEXT"
120
+ "name": "byRight",
121
+ "async": true,
122
+ "params": [
123
+ "rightId: string",
124
+ "opts?: JunctionFilterOptions"
125
+ ],
126
+ "returns": "Promise<TItem[]>"
139
127
  },
140
128
  {
141
- "name": "streetName",
142
- "type": "text",
143
- "required": false,
144
- "columnType": "TEXT"
129
+ "name": "detach",
130
+ "async": true,
131
+ "params": [
132
+ "leftId: string",
133
+ "rightId: string",
134
+ "opts?: JunctionFilterOptions"
135
+ ],
136
+ "returns": "Promise<void>"
145
137
  },
146
138
  {
147
- "name": "city",
148
- "type": "text",
149
- "required": false,
150
- "columnType": "TEXT"
139
+ "name": "getAssets",
140
+ "async": true,
141
+ "params": [
142
+ "placeId: string",
143
+ "relationship?: string"
144
+ ],
145
+ "returns": "Promise<Asset[]>"
151
146
  },
152
147
  {
153
- "name": "region",
154
- "type": "text",
155
- "required": false,
156
- "columnType": "TEXT"
148
+ "name": "removeAsset",
149
+ "async": true,
150
+ "params": [
151
+ "placeId: string",
152
+ "assetId: string",
153
+ "relationship?: string"
154
+ ],
155
+ "returns": "Promise<void>"
157
156
  },
158
157
  {
159
- "name": "country",
160
- "type": "text",
161
- "required": false,
162
- "columnType": "TEXT"
163
- },
158
+ "name": "setLinks",
159
+ "async": true,
160
+ "params": [
161
+ "leftId: string",
162
+ "rightIds: string[]",
163
+ "opts?: JunctionAttachOptions"
164
+ ],
165
+ "returns": "Promise<void>"
166
+ }
167
+ ],
168
+ "surfaces": [],
169
+ "withheldSurfaces": [
164
170
  {
165
- "name": "postalCode",
166
- "type": "text",
167
- "required": false,
168
- "columnType": "TEXT"
171
+ "kind": "api",
172
+ "operation": "addAsset",
173
+ "code": "api-disabled",
174
+ "reason": "api is disabled",
175
+ "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
169
176
  },
170
177
  {
171
- "name": "countryCode",
172
- "type": "text",
173
- "required": false,
174
- "columnType": "TEXT"
178
+ "kind": "api",
179
+ "operation": "attach",
180
+ "code": "api-disabled",
181
+ "reason": "api is disabled",
182
+ "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
175
183
  },
176
184
  {
177
- "name": "timezone",
178
- "type": "text",
179
- "required": false,
180
- "columnType": "TEXT"
185
+ "kind": "api",
186
+ "operation": "byLeft",
187
+ "code": "api-disabled",
188
+ "reason": "api is disabled",
189
+ "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
181
190
  },
182
191
  {
183
- "name": "externalId",
184
- "type": "text",
185
- "required": false,
186
- "columnType": "TEXT"
192
+ "kind": "api",
193
+ "operation": "byRight",
194
+ "code": "api-disabled",
195
+ "reason": "api is disabled",
196
+ "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
187
197
  },
188
198
  {
189
- "name": "source",
190
- "type": "text",
191
- "required": false,
192
- "columnType": "TEXT"
199
+ "kind": "api",
200
+ "operation": "detach",
201
+ "code": "api-disabled",
202
+ "reason": "api is disabled",
203
+ "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
193
204
  },
194
205
  {
195
- "name": "metadata",
196
- "type": "text",
197
- "required": false,
198
- "columnType": "TEXT"
206
+ "kind": "api",
207
+ "operation": "getAssets",
208
+ "code": "api-disabled",
209
+ "reason": "api is disabled",
210
+ "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
199
211
  },
200
212
  {
201
- "name": "createdAt",
202
- "type": "text",
203
- "required": false,
204
- "columnType": "TIMESTAMP"
213
+ "kind": "api",
214
+ "operation": "removeAsset",
215
+ "code": "api-disabled",
216
+ "reason": "api is disabled",
217
+ "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
205
218
  },
206
219
  {
207
- "name": "updatedAt",
208
- "type": "text",
209
- "required": false,
210
- "columnType": "TIMESTAMP"
220
+ "kind": "api",
221
+ "operation": "setLinks",
222
+ "code": "api-disabled",
223
+ "reason": "api is disabled",
224
+ "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
211
225
  }
212
226
  ],
213
- "relationships": [
214
- {
215
- "name": "parentId",
216
- "type": "foreignKey",
217
- "required": false,
218
- "related": "Place",
219
- "columnType": "UUID"
220
- },
221
- {
222
- "name": "typeId",
223
- "type": "foreignKey",
224
- "required": false,
225
- "related": "PlaceType",
226
- "columnType": "UUID"
227
- }
227
+ "relationshipFeatures": [
228
+ "SmrtJunction",
229
+ "uuidColumns"
228
230
  ],
231
+ "tags": [],
232
+ "risks": []
233
+ },
234
+ {
235
+ "name": "PlaceCollection",
236
+ "qualifiedName": "@happyvertical/smrt-places:PlaceCollection",
237
+ "collection": "places",
238
+ "tableName": "places",
239
+ "packageName": "@happyvertical/smrt-places",
240
+ "extends": "SmrtCollection",
241
+ "fields": [],
242
+ "relationships": [],
229
243
  "methods": [
230
244
  "addAsset",
231
- "getAncestors",
245
+ "discoverNearby",
246
+ "findByTenant",
247
+ "findGlobal",
248
+ "findWithGlobals",
232
249
  "getAssets",
250
+ "getByType",
233
251
  "getChildren",
234
- "getDescendants",
235
- "getGeoData",
236
252
  "getHierarchy",
237
- "getMainAsset",
238
- "getMetadata",
239
- "getParent",
240
- "getType",
241
- "hasCoordinates",
242
- "moveTo",
253
+ "getRootPlaces",
254
+ "lookupOrCreate",
243
255
  "removeAsset",
244
- "setMainAsset",
245
- "setMetadata",
246
- "updateMetadata"
256
+ "resolveTrackPlaces",
257
+ "searchByProximity"
247
258
  ],
248
259
  "methodSignatures": [
249
260
  {
250
261
  "name": "addAsset",
251
262
  "async": true,
252
263
  "params": [
264
+ "placeId: string",
253
265
  "asset: Asset",
254
266
  "relationship?: any",
255
267
  "sortOrder?: any"
@@ -257,674 +269,362 @@
257
269
  "returns": "Promise<void>"
258
270
  },
259
271
  {
260
- "name": "getAncestors",
272
+ "name": "discoverNearby",
261
273
  "async": true,
262
- "returns": "Promise<this[]>"
274
+ "params": [
275
+ "latitude: number",
276
+ "longitude: number",
277
+ "radiusMeters: number",
278
+ "options?: DiscoverNearbyOptions"
279
+ ],
280
+ "returns": "Promise<Place[]>"
263
281
  },
264
282
  {
265
- "name": "getAssets",
283
+ "name": "findByTenant",
266
284
  "async": true,
267
285
  "params": [
268
- "relationship?: string"
286
+ "tenantId: string"
269
287
  ],
270
- "returns": "Promise<Asset[]>"
288
+ "returns": "Promise<Place[]>"
271
289
  },
272
290
  {
273
- "name": "getChildren",
291
+ "name": "findGlobal",
274
292
  "async": true,
275
- "returns": "Promise<this[]>"
293
+ "returns": "Promise<Place[]>"
276
294
  },
277
295
  {
278
- "name": "getDescendants",
296
+ "name": "findWithGlobals",
279
297
  "async": true,
280
- "returns": "Promise<this[]>"
281
- },
282
- {
283
- "name": "getGeoData",
284
- "returns": "GeoData"
298
+ "params": [
299
+ "tenantId: string"
300
+ ],
301
+ "returns": "Promise<Place[]>"
285
302
  },
286
303
  {
287
- "name": "getHierarchy",
304
+ "name": "getAssets",
288
305
  "async": true,
289
- "returns": "Promise<HierarchyView<this>>"
306
+ "params": [
307
+ "placeId: string",
308
+ "relationship?: string"
309
+ ],
310
+ "returns": "Promise<Asset[]>"
290
311
  },
291
312
  {
292
- "name": "getMainAsset",
313
+ "name": "getByType",
293
314
  "async": true,
294
- "returns": "Promise<Asset | null>"
295
- },
296
- {
297
- "name": "getMetadata",
298
- "returns": "Record<string, unknown>"
315
+ "params": [
316
+ "typeSlug: string"
317
+ ],
318
+ "returns": "Promise<Place[]>"
299
319
  },
300
320
  {
301
- "name": "getParent",
321
+ "name": "getChildren",
302
322
  "async": true,
303
- "returns": "Promise<this | null>"
323
+ "params": [
324
+ "parentId: string"
325
+ ],
326
+ "returns": "Promise<Place[]>"
304
327
  },
305
328
  {
306
- "name": "getType",
329
+ "name": "getHierarchy",
307
330
  "async": true,
331
+ "params": [
332
+ "placeId: string"
333
+ ],
308
334
  "returns": "any"
309
335
  },
310
336
  {
311
- "name": "hasCoordinates",
312
- "returns": "boolean"
337
+ "name": "getRootPlaces",
338
+ "async": true,
339
+ "returns": "Promise<Place[]>"
313
340
  },
314
341
  {
315
- "name": "moveTo",
342
+ "name": "lookupOrCreate",
316
343
  "async": true,
317
344
  "params": [
318
- "newParent: this | string | null"
345
+ "query: string",
346
+ "options?: LookupOrCreateOptions"
319
347
  ],
320
- "returns": "Promise<void>"
348
+ "returns": "Promise<Place | null>"
321
349
  },
322
350
  {
323
351
  "name": "removeAsset",
324
352
  "async": true,
325
353
  "params": [
354
+ "placeId: string",
326
355
  "assetId: string",
327
356
  "relationship?: string"
328
357
  ],
329
358
  "returns": "Promise<void>"
330
359
  },
331
360
  {
332
- "name": "setMainAsset",
361
+ "name": "resolveTrackPlaces",
333
362
  "async": true,
334
363
  "params": [
335
- "asset: Asset | null"
336
- ],
337
- "returns": "Promise<void>"
338
- },
339
- {
340
- "name": "setMetadata",
341
- "params": [
342
- "data: Record<string, unknown>"
364
+ "points: ReadonlyArray<TrackPoint>",
365
+ "options?: ResolveTrackPlacesOptions"
343
366
  ],
344
- "returns": "void"
367
+ "returns": "Promise<TrackPlacesResult>"
345
368
  },
346
369
  {
347
- "name": "updateMetadata",
370
+ "name": "searchByProximity",
371
+ "async": true,
348
372
  "params": [
349
- "updates: Record<string, unknown>"
373
+ "latitude: number",
374
+ "longitude: number",
375
+ "radiusKm?: number"
350
376
  ],
351
- "returns": "void"
377
+ "returns": "Promise<Place[]>"
352
378
  }
353
379
  ],
354
- "tenant": {
355
- "scoped": true,
356
- "mode": "optional",
357
- "field": "tenantId"
358
- },
359
- "tableStrategy": "sti",
360
- "conflictColumns": [
361
- "tenant_id",
362
- "slug",
363
- "context",
364
- "_meta_type"
365
- ],
366
380
  "surfaces": [
367
- {
368
- "kind": "api",
369
- "name": "places.list",
370
- "operation": "list",
371
- "objectName": "@happyvertical/smrt-places:Place",
372
- "path": "/places",
373
- "method": "GET"
374
- },
375
- {
376
- "kind": "api",
377
- "name": "places.get",
378
- "operation": "get",
379
- "objectName": "@happyvertical/smrt-places:Place",
380
- "path": "/places/[id]",
381
- "method": "GET"
382
- },
383
- {
384
- "kind": "api",
385
- "name": "places.create",
386
- "operation": "create",
387
- "objectName": "@happyvertical/smrt-places:Place",
388
- "path": "/places",
389
- "method": "POST"
390
- },
391
- {
392
- "kind": "api",
393
- "name": "places.update",
394
- "operation": "update",
395
- "objectName": "@happyvertical/smrt-places:Place",
396
- "path": "/places/[id]",
397
- "method": "PATCH"
398
- },
399
- {
400
- "kind": "api",
401
- "name": "places.delete",
402
- "operation": "delete",
403
- "objectName": "@happyvertical/smrt-places:Place",
404
- "path": "/places/[id]",
405
- "method": "DELETE"
406
- },
407
- {
408
- "kind": "cli",
409
- "name": "place_list",
410
- "operation": "list",
411
- "objectName": "@happyvertical/smrt-places:Place"
412
- },
413
- {
414
- "kind": "cli",
415
- "name": "place_get",
416
- "operation": "get",
417
- "objectName": "@happyvertical/smrt-places:Place"
418
- },
419
- {
420
- "kind": "cli",
421
- "name": "place_create",
422
- "operation": "create",
423
- "objectName": "@happyvertical/smrt-places:Place"
424
- },
425
381
  {
426
382
  "kind": "cli",
427
- "name": "place_update",
428
- "operation": "update",
429
- "objectName": "@happyvertical/smrt-places:Place"
383
+ "name": "placecollection_lookupOrCreate",
384
+ "operation": "lookupOrCreate",
385
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
430
386
  },
431
387
  {
432
388
  "kind": "cli",
433
- "name": "place_delete",
434
- "operation": "delete",
435
- "objectName": "@happyvertical/smrt-places:Place"
389
+ "name": "placecollection_discoverNearby",
390
+ "operation": "discoverNearby",
391
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
436
392
  },
437
393
  {
438
394
  "kind": "cli",
439
- "name": "place_getParent",
440
- "operation": "getParent",
441
- "objectName": "@happyvertical/smrt-places:Place"
395
+ "name": "placecollection_resolveTrackPlaces",
396
+ "operation": "resolveTrackPlaces",
397
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
442
398
  },
443
399
  {
444
400
  "kind": "cli",
445
- "name": "place_getChildren",
401
+ "name": "placecollection_getChildren",
446
402
  "operation": "getChildren",
447
- "objectName": "@happyvertical/smrt-places:Place"
403
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
448
404
  },
449
405
  {
450
406
  "kind": "cli",
451
- "name": "place_getAncestors",
452
- "operation": "getAncestors",
453
- "objectName": "@happyvertical/smrt-places:Place"
407
+ "name": "placecollection_getRootPlaces",
408
+ "operation": "getRootPlaces",
409
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
454
410
  },
455
411
  {
456
412
  "kind": "cli",
457
- "name": "place_getDescendants",
458
- "operation": "getDescendants",
459
- "objectName": "@happyvertical/smrt-places:Place"
413
+ "name": "placecollection_getByType",
414
+ "operation": "getByType",
415
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
460
416
  },
461
417
  {
462
418
  "kind": "cli",
463
- "name": "place_getHierarchy",
419
+ "name": "placecollection_getHierarchy",
464
420
  "operation": "getHierarchy",
465
- "objectName": "@happyvertical/smrt-places:Place"
466
- },
467
- {
468
- "kind": "cli",
469
- "name": "place_moveTo",
470
- "operation": "moveTo",
471
- "objectName": "@happyvertical/smrt-places:Place"
472
- },
473
- {
474
- "kind": "cli",
475
- "name": "place_getGeoData",
476
- "operation": "getGeoData",
477
- "objectName": "@happyvertical/smrt-places:Place"
478
- },
479
- {
480
- "kind": "cli",
481
- "name": "place_hasCoordinates",
482
- "operation": "hasCoordinates",
483
- "objectName": "@happyvertical/smrt-places:Place"
484
- },
485
- {
486
- "kind": "cli",
487
- "name": "place_getMetadata",
488
- "operation": "getMetadata",
489
- "objectName": "@happyvertical/smrt-places:Place"
490
- },
491
- {
492
- "kind": "cli",
493
- "name": "place_setMetadata",
494
- "operation": "setMetadata",
495
- "objectName": "@happyvertical/smrt-places:Place"
496
- },
497
- {
498
- "kind": "cli",
499
- "name": "place_updateMetadata",
500
- "operation": "updateMetadata",
501
- "objectName": "@happyvertical/smrt-places:Place"
502
- },
503
- {
504
- "kind": "cli",
505
- "name": "place_getType",
506
- "operation": "getType",
507
- "objectName": "@happyvertical/smrt-places:Place"
508
- },
509
- {
510
- "kind": "cli",
511
- "name": "place_getAssets",
512
- "operation": "getAssets",
513
- "objectName": "@happyvertical/smrt-places:Place"
514
- },
515
- {
516
- "kind": "cli",
517
- "name": "place_addAsset",
518
- "operation": "addAsset",
519
- "objectName": "@happyvertical/smrt-places:Place"
520
- },
521
- {
522
- "kind": "cli",
523
- "name": "place_getMainAsset",
524
- "operation": "getMainAsset",
525
- "objectName": "@happyvertical/smrt-places:Place"
526
- },
527
- {
528
- "kind": "cli",
529
- "name": "place_setMainAsset",
530
- "operation": "setMainAsset",
531
- "objectName": "@happyvertical/smrt-places:Place"
532
- },
533
- {
534
- "kind": "cli",
535
- "name": "place_removeAsset",
536
- "operation": "removeAsset",
537
- "objectName": "@happyvertical/smrt-places:Place"
538
- },
539
- {
540
- "kind": "mcp",
541
- "name": "place_list",
542
- "operation": "list",
543
- "objectName": "@happyvertical/smrt-places:Place"
544
- },
545
- {
546
- "kind": "mcp",
547
- "name": "place_get",
548
- "operation": "get",
549
- "objectName": "@happyvertical/smrt-places:Place"
550
- },
551
- {
552
- "kind": "mcp",
553
- "name": "place_create",
554
- "operation": "create",
555
- "objectName": "@happyvertical/smrt-places:Place"
556
- },
557
- {
558
- "kind": "mcp",
559
- "name": "place_update",
560
- "operation": "update",
561
- "objectName": "@happyvertical/smrt-places:Place"
562
- }
563
- ],
564
- "withheldSurfaces": [
565
- {
566
- "kind": "api",
567
- "operation": "addAsset",
568
- "code": "not-included",
569
- "reason": "not listed in api.include",
570
- "objectName": "@happyvertical/smrt-places:Place"
571
- },
572
- {
573
- "kind": "api",
574
- "operation": "getAncestors",
575
- "code": "not-included",
576
- "reason": "not listed in api.include",
577
- "objectName": "@happyvertical/smrt-places:Place"
421
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
578
422
  },
579
423
  {
580
- "kind": "api",
424
+ "kind": "cli",
425
+ "name": "placecollection_getAssets",
581
426
  "operation": "getAssets",
582
- "code": "not-included",
583
- "reason": "not listed in api.include",
584
- "objectName": "@happyvertical/smrt-places:Place"
427
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
585
428
  },
586
429
  {
587
- "kind": "api",
588
- "operation": "getChildren",
589
- "code": "not-included",
590
- "reason": "not listed in api.include",
591
- "objectName": "@happyvertical/smrt-places:Place"
430
+ "kind": "cli",
431
+ "name": "placecollection_addAsset",
432
+ "operation": "addAsset",
433
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
592
434
  },
593
435
  {
594
- "kind": "api",
595
- "operation": "getDescendants",
596
- "code": "not-included",
597
- "reason": "not listed in api.include",
598
- "objectName": "@happyvertical/smrt-places:Place"
436
+ "kind": "cli",
437
+ "name": "placecollection_removeAsset",
438
+ "operation": "removeAsset",
439
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
599
440
  },
600
441
  {
601
- "kind": "api",
602
- "operation": "getGeoData",
603
- "code": "not-included",
604
- "reason": "not listed in api.include",
605
- "objectName": "@happyvertical/smrt-places:Place"
442
+ "kind": "cli",
443
+ "name": "placecollection_searchByProximity",
444
+ "operation": "searchByProximity",
445
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
606
446
  },
607
447
  {
608
- "kind": "api",
609
- "operation": "getHierarchy",
610
- "code": "not-included",
611
- "reason": "not listed in api.include",
612
- "objectName": "@happyvertical/smrt-places:Place"
448
+ "kind": "cli",
449
+ "name": "placecollection_findByTenant",
450
+ "operation": "findByTenant",
451
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
613
452
  },
614
453
  {
615
- "kind": "api",
616
- "operation": "getMainAsset",
617
- "code": "not-included",
618
- "reason": "not listed in api.include",
619
- "objectName": "@happyvertical/smrt-places:Place"
454
+ "kind": "cli",
455
+ "name": "placecollection_findGlobal",
456
+ "operation": "findGlobal",
457
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
620
458
  },
621
459
  {
622
- "kind": "api",
623
- "operation": "getMetadata",
624
- "code": "not-included",
625
- "reason": "not listed in api.include",
626
- "objectName": "@happyvertical/smrt-places:Place"
627
- },
460
+ "kind": "cli",
461
+ "name": "placecollection_findWithGlobals",
462
+ "operation": "findWithGlobals",
463
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
464
+ }
465
+ ],
466
+ "withheldSurfaces": [
628
467
  {
629
468
  "kind": "api",
630
- "operation": "getParent",
469
+ "operation": "addAsset",
631
470
  "code": "not-included",
632
471
  "reason": "not listed in api.include",
633
- "objectName": "@happyvertical/smrt-places:Place"
472
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
634
473
  },
635
474
  {
636
475
  "kind": "api",
637
- "operation": "getType",
476
+ "operation": "discoverNearby",
638
477
  "code": "not-included",
639
478
  "reason": "not listed in api.include",
640
- "objectName": "@happyvertical/smrt-places:Place"
479
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
641
480
  },
642
481
  {
643
482
  "kind": "api",
644
- "operation": "hasCoordinates",
483
+ "operation": "findByTenant",
645
484
  "code": "not-included",
646
485
  "reason": "not listed in api.include",
647
- "objectName": "@happyvertical/smrt-places:Place"
486
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
648
487
  },
649
488
  {
650
489
  "kind": "api",
651
- "operation": "moveTo",
490
+ "operation": "findGlobal",
652
491
  "code": "not-included",
653
492
  "reason": "not listed in api.include",
654
- "objectName": "@happyvertical/smrt-places:Place"
493
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
655
494
  },
656
495
  {
657
496
  "kind": "api",
658
- "operation": "removeAsset",
497
+ "operation": "findWithGlobals",
659
498
  "code": "not-included",
660
499
  "reason": "not listed in api.include",
661
- "objectName": "@happyvertical/smrt-places:Place"
500
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
662
501
  },
663
502
  {
664
503
  "kind": "api",
665
- "operation": "setMainAsset",
504
+ "operation": "getAssets",
666
505
  "code": "not-included",
667
506
  "reason": "not listed in api.include",
668
- "objectName": "@happyvertical/smrt-places:Place"
507
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
669
508
  },
670
509
  {
671
510
  "kind": "api",
672
- "operation": "setMetadata",
511
+ "operation": "getByType",
673
512
  "code": "not-included",
674
513
  "reason": "not listed in api.include",
675
- "objectName": "@happyvertical/smrt-places:Place"
514
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
676
515
  },
677
516
  {
678
517
  "kind": "api",
679
- "operation": "updateMetadata",
518
+ "operation": "getChildren",
680
519
  "code": "not-included",
681
520
  "reason": "not listed in api.include",
682
- "objectName": "@happyvertical/smrt-places:Place"
683
- }
684
- ],
685
- "relationshipFeatures": [
686
- "SmrtHierarchical",
687
- "foreignKey",
688
- "uuidColumns"
689
- ],
690
- "tags": [],
691
- "risks": []
692
- },
693
- {
694
- "name": "PlaceAsset",
695
- "qualifiedName": "@happyvertical/smrt-places:PlaceAsset",
696
- "collection": "placeassets",
697
- "tableName": "place_assets",
698
- "packageName": "@happyvertical/smrt-places",
699
- "extends": "SmrtObject",
700
- "fields": [
701
- {
702
- "name": "tenantId",
703
- "type": "text",
704
- "required": false,
705
- "columnType": "UUID"
706
- },
707
- {
708
- "name": "placeId",
709
- "type": "foreignKey",
710
- "required": true,
711
- "related": "Place",
712
- "columnType": "UUID"
713
- },
714
- {
715
- "name": "assetId",
716
- "type": "crossPackageRef",
717
- "required": true,
718
- "related": "@happyvertical/smrt-assets:Asset",
719
- "columnType": "UUID"
720
- },
721
- {
722
- "name": "relationship",
723
- "type": "text",
724
- "required": true,
725
- "columnType": "TEXT"
726
- },
727
- {
728
- "name": "sortOrder",
729
- "type": "integer",
730
- "required": true,
731
- "columnType": "INTEGER",
732
- "default": 0
733
- }
734
- ],
735
- "relationships": [
736
- {
737
- "name": "placeId",
738
- "type": "foreignKey",
739
- "required": true,
740
- "related": "Place",
741
- "columnType": "UUID"
742
- },
743
- {
744
- "name": "assetId",
745
- "type": "crossPackageRef",
746
- "required": true,
747
- "related": "@happyvertical/smrt-assets:Asset",
748
- "columnType": "UUID"
749
- }
750
- ],
751
- "methods": [],
752
- "tenant": {
753
- "scoped": true,
754
- "mode": "optional",
755
- "field": "tenantId"
756
- },
757
- "conflictColumns": [
758
- "place_id",
759
- "asset_id",
760
- "relationship"
761
- ],
762
- "surfaces": [],
763
- "relationshipFeatures": [
764
- "crossPackageRef",
765
- "foreignKey",
766
- "uuidColumns"
767
- ],
768
- "tags": [],
769
- "risks": []
770
- },
771
- {
772
- "name": "PlaceType",
773
- "qualifiedName": "@happyvertical/smrt-places:PlaceType",
774
- "displayLabelField": "name",
775
- "collection": "placetypes",
776
- "tableName": "place_types",
777
- "packageName": "@happyvertical/smrt-places",
778
- "extends": "SmrtObject",
779
- "fields": [
780
- {
781
- "name": "created_at",
782
- "type": "datetime",
783
- "required": false,
784
- "columnType": "TIMESTAMP"
785
- },
786
- {
787
- "name": "updated_at",
788
- "type": "datetime",
789
- "required": false,
790
- "columnType": "TIMESTAMP"
791
- },
792
- {
793
- "name": "name",
794
- "type": "text",
795
- "required": true,
796
- "columnType": "TEXT",
797
- "default": ""
798
- },
799
- {
800
- "name": "description",
801
- "type": "text",
802
- "required": false,
803
- "columnType": "TEXT"
804
- },
805
- {
806
- "name": "createdAt",
807
- "type": "text",
808
- "required": false,
809
- "columnType": "TIMESTAMP"
810
- },
811
- {
812
- "name": "updatedAt",
813
- "type": "text",
814
- "required": false,
815
- "columnType": "TIMESTAMP"
816
- }
817
- ],
818
- "relationships": [],
819
- "methods": [
820
- "getBySlug"
821
- ],
822
- "methodSignatures": [
823
- {
824
- "name": "getBySlug",
825
- "async": true,
826
- "static": true,
827
- "params": [
828
- "_slug: string"
829
- ],
830
- "returns": "Promise<PlaceType | null>"
831
- }
832
- ],
833
- "tableStrategy": "sti",
834
- "surfaces": [
835
- {
836
- "kind": "api",
837
- "name": "placetypes.list",
838
- "operation": "list",
839
- "objectName": "@happyvertical/smrt-places:PlaceType",
840
- "path": "/placetypes",
841
- "method": "GET"
521
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
842
522
  },
843
523
  {
844
524
  "kind": "api",
845
- "name": "placetypes.get",
846
- "operation": "get",
847
- "objectName": "@happyvertical/smrt-places:PlaceType",
848
- "path": "/placetypes/[id]",
849
- "method": "GET"
525
+ "operation": "getHierarchy",
526
+ "code": "not-included",
527
+ "reason": "not listed in api.include",
528
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
850
529
  },
851
530
  {
852
531
  "kind": "api",
853
- "name": "placetypes.create",
854
- "operation": "create",
855
- "objectName": "@happyvertical/smrt-places:PlaceType",
856
- "path": "/placetypes",
857
- "method": "POST"
532
+ "operation": "getRootPlaces",
533
+ "code": "not-included",
534
+ "reason": "not listed in api.include",
535
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
858
536
  },
859
537
  {
860
538
  "kind": "api",
861
- "name": "placetypes.update",
862
- "operation": "update",
863
- "objectName": "@happyvertical/smrt-places:PlaceType",
864
- "path": "/placetypes/[id]",
865
- "method": "PATCH"
539
+ "operation": "lookupOrCreate",
540
+ "code": "not-included",
541
+ "reason": "not listed in api.include",
542
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
866
543
  },
867
544
  {
868
545
  "kind": "api",
869
- "name": "placetypes.delete",
870
- "operation": "delete",
871
- "objectName": "@happyvertical/smrt-places:PlaceType",
872
- "path": "/placetypes/[id]",
873
- "method": "DELETE"
546
+ "operation": "removeAsset",
547
+ "code": "not-included",
548
+ "reason": "not listed in api.include",
549
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
874
550
  },
875
551
  {
876
- "kind": "cli",
877
- "name": "placetype_list",
878
- "operation": "list",
879
- "objectName": "@happyvertical/smrt-places:PlaceType"
552
+ "kind": "api",
553
+ "operation": "resolveTrackPlaces",
554
+ "code": "not-included",
555
+ "reason": "not listed in api.include",
556
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
880
557
  },
881
558
  {
882
- "kind": "cli",
883
- "name": "placetype_get",
884
- "operation": "get",
885
- "objectName": "@happyvertical/smrt-places:PlaceType"
886
- },
559
+ "kind": "api",
560
+ "operation": "searchByProximity",
561
+ "code": "not-included",
562
+ "reason": "not listed in api.include",
563
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
564
+ }
565
+ ],
566
+ "relationshipFeatures": [
567
+ "uuidColumns"
568
+ ],
569
+ "tags": [],
570
+ "risks": []
571
+ },
572
+ {
573
+ "name": "PlaceTypeCollection",
574
+ "qualifiedName": "@happyvertical/smrt-places:PlaceTypeCollection",
575
+ "collection": "placetypes",
576
+ "tableName": "place_types",
577
+ "packageName": "@happyvertical/smrt-places",
578
+ "extends": "SmrtCollection",
579
+ "fields": [],
580
+ "relationships": [],
581
+ "methods": [
582
+ "getBySlug",
583
+ "getOrCreate",
584
+ "initializeDefaults"
585
+ ],
586
+ "methodSignatures": [
887
587
  {
888
- "kind": "cli",
889
- "name": "placetype_create",
890
- "operation": "create",
891
- "objectName": "@happyvertical/smrt-places:PlaceType"
588
+ "name": "getBySlug",
589
+ "async": true,
590
+ "params": [
591
+ "slug: string"
592
+ ],
593
+ "returns": "Promise<PlaceType | null>"
892
594
  },
893
595
  {
894
- "kind": "cli",
895
- "name": "placetype_update",
896
- "operation": "update",
897
- "objectName": "@happyvertical/smrt-places:PlaceType"
596
+ "name": "getOrCreate",
597
+ "async": true,
598
+ "params": [
599
+ "slug: string",
600
+ "name?: string"
601
+ ],
602
+ "returns": "Promise<PlaceType>"
898
603
  },
604
+ {
605
+ "name": "initializeDefaults",
606
+ "async": true,
607
+ "returns": "Promise<PlaceType[]>"
608
+ }
609
+ ],
610
+ "surfaces": [
899
611
  {
900
612
  "kind": "cli",
901
- "name": "placetype_delete",
902
- "operation": "delete",
903
- "objectName": "@happyvertical/smrt-places:PlaceType"
613
+ "name": "placetypecollection_getOrCreate",
614
+ "operation": "getOrCreate",
615
+ "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
904
616
  },
905
617
  {
906
618
  "kind": "cli",
907
- "name": "placetype_getBySlug",
619
+ "name": "placetypecollection_getBySlug",
908
620
  "operation": "getBySlug",
909
- "objectName": "@happyvertical/smrt-places:PlaceType"
910
- },
911
- {
912
- "kind": "mcp",
913
- "name": "placetype_list",
914
- "operation": "list",
915
- "objectName": "@happyvertical/smrt-places:PlaceType"
916
- },
917
- {
918
- "kind": "mcp",
919
- "name": "placetype_get",
920
- "operation": "get",
921
- "objectName": "@happyvertical/smrt-places:PlaceType"
621
+ "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
922
622
  },
923
623
  {
924
- "kind": "mcp",
925
- "name": "placetype_create",
926
- "operation": "create",
927
- "objectName": "@happyvertical/smrt-places:PlaceType"
624
+ "kind": "cli",
625
+ "name": "placetypecollection_initializeDefaults",
626
+ "operation": "initializeDefaults",
627
+ "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
928
628
  }
929
629
  ],
930
630
  "withheldSurfaces": [
@@ -933,7 +633,21 @@
933
633
  "operation": "getBySlug",
934
634
  "code": "not-included",
935
635
  "reason": "not listed in api.include",
936
- "objectName": "@happyvertical/smrt-places:PlaceType"
636
+ "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
637
+ },
638
+ {
639
+ "kind": "api",
640
+ "operation": "getOrCreate",
641
+ "code": "not-included",
642
+ "reason": "not listed in api.include",
643
+ "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
644
+ },
645
+ {
646
+ "kind": "api",
647
+ "operation": "initializeDefaults",
648
+ "code": "not-included",
649
+ "reason": "not listed in api.include",
650
+ "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
937
651
  }
938
652
  ],
939
653
  "relationshipFeatures": [
@@ -943,201 +657,189 @@
943
657
  "risks": []
944
658
  },
945
659
  {
946
- "name": "PlaceAssetCollection",
947
- "qualifiedName": "@happyvertical/smrt-places:PlaceAssetCollection",
948
- "collection": "placeassets",
949
- "tableName": "place_assets",
660
+ "name": "Place",
661
+ "qualifiedName": "@happyvertical/smrt-places:Place",
662
+ "displayLabelField": "name",
663
+ "collection": "places",
664
+ "tableName": "places",
950
665
  "packageName": "@happyvertical/smrt-places",
951
- "extends": "SmrtJunction",
952
- "fields": [],
953
- "relationships": [],
954
- "methods": [
955
- "addAsset",
956
- "attach",
957
- "byLeft",
958
- "byRight",
959
- "detach",
960
- "getAssets",
961
- "removeAsset",
962
- "setLinks"
963
- ],
964
- "methodSignatures": [
666
+ "extends": "SmrtHierarchical",
667
+ "fields": [
965
668
  {
966
- "name": "addAsset",
967
- "async": true,
968
- "params": [
969
- "placeId: string",
970
- "asset: Asset",
971
- "relationship?: any",
972
- "sortOrder?: any"
973
- ],
974
- "returns": "Promise<void>"
669
+ "name": "created_at",
670
+ "type": "datetime",
671
+ "required": false,
672
+ "columnType": "TIMESTAMP"
975
673
  },
976
674
  {
977
- "name": "attach",
978
- "async": true,
979
- "params": [
980
- "leftId: string",
981
- "rightId: string",
982
- "opts?: JunctionAttachOptions"
983
- ],
984
- "returns": "Promise<TItem>"
675
+ "name": "updated_at",
676
+ "type": "datetime",
677
+ "required": false,
678
+ "columnType": "TIMESTAMP"
985
679
  },
986
680
  {
987
- "name": "byLeft",
988
- "async": true,
989
- "params": [
990
- "leftId: string",
991
- "opts?: JunctionFilterOptions"
992
- ],
993
- "returns": "Promise<TItem[]>"
681
+ "name": "parentId",
682
+ "type": "foreignKey",
683
+ "required": false,
684
+ "related": "Place",
685
+ "columnType": "UUID"
686
+ },
687
+ {
688
+ "name": "tenantId",
689
+ "type": "text",
690
+ "required": false,
691
+ "columnType": "UUID"
692
+ },
693
+ {
694
+ "name": "typeId",
695
+ "type": "foreignKey",
696
+ "required": false,
697
+ "related": "PlaceType",
698
+ "columnType": "UUID"
699
+ },
700
+ {
701
+ "name": "name",
702
+ "type": "text",
703
+ "required": false,
704
+ "columnType": "TEXT"
705
+ },
706
+ {
707
+ "name": "description",
708
+ "type": "text",
709
+ "required": false,
710
+ "columnType": "TEXT"
711
+ },
712
+ {
713
+ "name": "latitude",
714
+ "type": "decimal",
715
+ "required": false,
716
+ "columnType": "REAL"
717
+ },
718
+ {
719
+ "name": "longitude",
720
+ "type": "decimal",
721
+ "required": false,
722
+ "columnType": "REAL"
723
+ },
724
+ {
725
+ "name": "streetNumber",
726
+ "type": "text",
727
+ "required": false,
728
+ "columnType": "TEXT"
994
729
  },
995
730
  {
996
- "name": "byRight",
997
- "async": true,
998
- "params": [
999
- "rightId: string",
1000
- "opts?: JunctionFilterOptions"
1001
- ],
1002
- "returns": "Promise<TItem[]>"
731
+ "name": "streetName",
732
+ "type": "text",
733
+ "required": false,
734
+ "columnType": "TEXT"
1003
735
  },
1004
736
  {
1005
- "name": "detach",
1006
- "async": true,
1007
- "params": [
1008
- "leftId: string",
1009
- "rightId: string",
1010
- "opts?: JunctionFilterOptions"
1011
- ],
1012
- "returns": "Promise<void>"
737
+ "name": "city",
738
+ "type": "text",
739
+ "required": false,
740
+ "columnType": "TEXT"
1013
741
  },
1014
742
  {
1015
- "name": "getAssets",
1016
- "async": true,
1017
- "params": [
1018
- "placeId: string",
1019
- "relationship?: string"
1020
- ],
1021
- "returns": "Promise<Asset[]>"
743
+ "name": "region",
744
+ "type": "text",
745
+ "required": false,
746
+ "columnType": "TEXT"
1022
747
  },
1023
748
  {
1024
- "name": "removeAsset",
1025
- "async": true,
1026
- "params": [
1027
- "placeId: string",
1028
- "assetId: string",
1029
- "relationship?: string"
1030
- ],
1031
- "returns": "Promise<void>"
749
+ "name": "country",
750
+ "type": "text",
751
+ "required": false,
752
+ "columnType": "TEXT"
1032
753
  },
1033
754
  {
1034
- "name": "setLinks",
1035
- "async": true,
1036
- "params": [
1037
- "leftId: string",
1038
- "rightIds: string[]",
1039
- "opts?: JunctionAttachOptions"
1040
- ],
1041
- "returns": "Promise<void>"
1042
- }
1043
- ],
1044
- "surfaces": [],
1045
- "withheldSurfaces": [
1046
- {
1047
- "kind": "api",
1048
- "operation": "addAsset",
1049
- "code": "api-disabled",
1050
- "reason": "api is disabled",
1051
- "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
755
+ "name": "postalCode",
756
+ "type": "text",
757
+ "required": false,
758
+ "columnType": "TEXT"
1052
759
  },
1053
760
  {
1054
- "kind": "api",
1055
- "operation": "attach",
1056
- "code": "api-disabled",
1057
- "reason": "api is disabled",
1058
- "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
761
+ "name": "countryCode",
762
+ "type": "text",
763
+ "required": false,
764
+ "columnType": "TEXT"
1059
765
  },
1060
766
  {
1061
- "kind": "api",
1062
- "operation": "byLeft",
1063
- "code": "api-disabled",
1064
- "reason": "api is disabled",
1065
- "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
767
+ "name": "timezone",
768
+ "type": "text",
769
+ "required": false,
770
+ "columnType": "TEXT"
1066
771
  },
1067
772
  {
1068
- "kind": "api",
1069
- "operation": "byRight",
1070
- "code": "api-disabled",
1071
- "reason": "api is disabled",
1072
- "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
773
+ "name": "externalId",
774
+ "type": "text",
775
+ "required": false,
776
+ "columnType": "TEXT"
1073
777
  },
1074
778
  {
1075
- "kind": "api",
1076
- "operation": "detach",
1077
- "code": "api-disabled",
1078
- "reason": "api is disabled",
1079
- "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
779
+ "name": "source",
780
+ "type": "text",
781
+ "required": false,
782
+ "columnType": "TEXT"
1080
783
  },
1081
784
  {
1082
- "kind": "api",
1083
- "operation": "getAssets",
1084
- "code": "api-disabled",
1085
- "reason": "api is disabled",
1086
- "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
785
+ "name": "metadata",
786
+ "type": "text",
787
+ "required": false,
788
+ "columnType": "TEXT"
1087
789
  },
1088
790
  {
1089
- "kind": "api",
1090
- "operation": "removeAsset",
1091
- "code": "api-disabled",
1092
- "reason": "api is disabled",
1093
- "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
791
+ "name": "createdAt",
792
+ "type": "text",
793
+ "required": false,
794
+ "columnType": "TIMESTAMP"
1094
795
  },
1095
796
  {
1096
- "kind": "api",
1097
- "operation": "setLinks",
1098
- "code": "api-disabled",
1099
- "reason": "api is disabled",
1100
- "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
797
+ "name": "updatedAt",
798
+ "type": "text",
799
+ "required": false,
800
+ "columnType": "TIMESTAMP"
1101
801
  }
1102
802
  ],
1103
- "relationshipFeatures": [
1104
- "SmrtJunction",
1105
- "uuidColumns"
803
+ "relationships": [
804
+ {
805
+ "name": "parentId",
806
+ "type": "foreignKey",
807
+ "required": false,
808
+ "related": "Place",
809
+ "columnType": "UUID"
810
+ },
811
+ {
812
+ "name": "typeId",
813
+ "type": "foreignKey",
814
+ "required": false,
815
+ "related": "PlaceType",
816
+ "columnType": "UUID"
817
+ }
1106
818
  ],
1107
- "tags": [],
1108
- "risks": []
1109
- },
1110
- {
1111
- "name": "PlaceCollection",
1112
- "qualifiedName": "@happyvertical/smrt-places:PlaceCollection",
1113
- "collection": "places",
1114
- "tableName": "places",
1115
- "packageName": "@happyvertical/smrt-places",
1116
- "extends": "SmrtCollection",
1117
- "fields": [],
1118
- "relationships": [],
1119
819
  "methods": [
1120
820
  "addAsset",
1121
- "discoverNearby",
1122
- "findByTenant",
1123
- "findGlobal",
1124
- "findWithGlobals",
821
+ "getAncestors",
1125
822
  "getAssets",
1126
- "getByType",
1127
823
  "getChildren",
824
+ "getDescendants",
825
+ "getGeoData",
1128
826
  "getHierarchy",
1129
- "getRootPlaces",
1130
- "lookupOrCreate",
827
+ "getMainAsset",
828
+ "getMetadata",
829
+ "getParent",
830
+ "getType",
831
+ "hasCoordinates",
832
+ "moveTo",
1131
833
  "removeAsset",
1132
- "resolveTrackPlaces",
1133
- "searchByProximity"
834
+ "setMainAsset",
835
+ "setMetadata",
836
+ "updateMetadata"
1134
837
  ],
1135
838
  "methodSignatures": [
1136
839
  {
1137
840
  "name": "addAsset",
1138
841
  "async": true,
1139
842
  "params": [
1140
- "placeId: string",
1141
843
  "asset: Asset",
1142
844
  "relationship?: any",
1143
845
  "sortOrder?: any"
@@ -1145,198 +847,308 @@
1145
847
  "returns": "Promise<void>"
1146
848
  },
1147
849
  {
1148
- "name": "discoverNearby",
850
+ "name": "getAncestors",
1149
851
  "async": true,
1150
- "params": [
1151
- "latitude: number",
1152
- "longitude: number",
1153
- "radiusMeters: number",
1154
- "options?: DiscoverNearbyOptions"
1155
- ],
1156
- "returns": "Promise<Place[]>"
852
+ "returns": "Promise<this[]>"
1157
853
  },
1158
854
  {
1159
- "name": "findByTenant",
855
+ "name": "getAssets",
1160
856
  "async": true,
1161
857
  "params": [
1162
- "tenantId: string"
858
+ "relationship?: string"
1163
859
  ],
1164
- "returns": "Promise<Place[]>"
860
+ "returns": "Promise<Asset[]>"
1165
861
  },
1166
862
  {
1167
- "name": "findGlobal",
863
+ "name": "getChildren",
1168
864
  "async": true,
1169
- "returns": "Promise<Place[]>"
865
+ "returns": "Promise<this[]>"
1170
866
  },
1171
867
  {
1172
- "name": "findWithGlobals",
868
+ "name": "getDescendants",
1173
869
  "async": true,
1174
- "params": [
1175
- "tenantId: string"
1176
- ],
1177
- "returns": "Promise<Place[]>"
870
+ "returns": "Promise<this[]>"
1178
871
  },
1179
872
  {
1180
- "name": "getAssets",
873
+ "name": "getGeoData",
874
+ "returns": "GeoData"
875
+ },
876
+ {
877
+ "name": "getHierarchy",
1181
878
  "async": true,
1182
- "params": [
1183
- "placeId: string",
1184
- "relationship?: string"
1185
- ],
1186
- "returns": "Promise<Asset[]>"
879
+ "returns": "Promise<HierarchyView<this>>"
1187
880
  },
1188
881
  {
1189
- "name": "getByType",
882
+ "name": "getMainAsset",
1190
883
  "async": true,
1191
- "params": [
1192
- "typeSlug: string"
1193
- ],
1194
- "returns": "Promise<Place[]>"
884
+ "returns": "Promise<Asset | null>"
1195
885
  },
1196
886
  {
1197
- "name": "getChildren",
887
+ "name": "getMetadata",
888
+ "returns": "Record<string, unknown>"
889
+ },
890
+ {
891
+ "name": "getParent",
1198
892
  "async": true,
1199
- "params": [
1200
- "parentId: string"
1201
- ],
1202
- "returns": "Promise<Place[]>"
893
+ "returns": "Promise<this | null>"
1203
894
  },
1204
895
  {
1205
- "name": "getHierarchy",
896
+ "name": "getType",
1206
897
  "async": true,
1207
- "params": [
1208
- "placeId: string"
1209
- ],
1210
898
  "returns": "any"
1211
899
  },
1212
900
  {
1213
- "name": "getRootPlaces",
1214
- "async": true,
1215
- "returns": "Promise<Place[]>"
901
+ "name": "hasCoordinates",
902
+ "returns": "boolean"
1216
903
  },
1217
904
  {
1218
- "name": "lookupOrCreate",
905
+ "name": "moveTo",
1219
906
  "async": true,
1220
- "params": [
1221
- "query: string",
1222
- "options?: LookupOrCreateOptions"
907
+ "params": [
908
+ "newParent: this | string | null"
1223
909
  ],
1224
- "returns": "Promise<Place | null>"
910
+ "returns": "Promise<void>"
1225
911
  },
1226
912
  {
1227
913
  "name": "removeAsset",
1228
914
  "async": true,
1229
915
  "params": [
1230
- "placeId: string",
1231
916
  "assetId: string",
1232
917
  "relationship?: string"
1233
918
  ],
1234
919
  "returns": "Promise<void>"
1235
920
  },
1236
921
  {
1237
- "name": "resolveTrackPlaces",
922
+ "name": "setMainAsset",
1238
923
  "async": true,
1239
924
  "params": [
1240
- "points: ReadonlyArray<TrackPoint>",
1241
- "options?: ResolveTrackPlacesOptions"
925
+ "asset: Asset | null"
1242
926
  ],
1243
- "returns": "Promise<TrackPlacesResult>"
927
+ "returns": "Promise<void>"
1244
928
  },
1245
929
  {
1246
- "name": "searchByProximity",
1247
- "async": true,
930
+ "name": "setMetadata",
1248
931
  "params": [
1249
- "latitude: number",
1250
- "longitude: number",
1251
- "radiusKm?: number"
932
+ "data: Record<string, unknown>"
1252
933
  ],
1253
- "returns": "Promise<Place[]>"
934
+ "returns": "void"
935
+ },
936
+ {
937
+ "name": "updateMetadata",
938
+ "params": [
939
+ "updates: Record<string, unknown>"
940
+ ],
941
+ "returns": "void"
1254
942
  }
1255
943
  ],
944
+ "tenant": {
945
+ "scoped": true,
946
+ "mode": "optional",
947
+ "field": "tenantId"
948
+ },
949
+ "tableStrategy": "sti",
950
+ "conflictColumns": [
951
+ "tenant_id",
952
+ "slug",
953
+ "context",
954
+ "_meta_type"
955
+ ],
1256
956
  "surfaces": [
957
+ {
958
+ "kind": "api",
959
+ "name": "places.list",
960
+ "operation": "list",
961
+ "objectName": "@happyvertical/smrt-places:Place",
962
+ "path": "/places",
963
+ "method": "GET"
964
+ },
965
+ {
966
+ "kind": "api",
967
+ "name": "places.get",
968
+ "operation": "get",
969
+ "objectName": "@happyvertical/smrt-places:Place",
970
+ "path": "/places/[id]",
971
+ "method": "GET"
972
+ },
973
+ {
974
+ "kind": "api",
975
+ "name": "places.create",
976
+ "operation": "create",
977
+ "objectName": "@happyvertical/smrt-places:Place",
978
+ "path": "/places",
979
+ "method": "POST"
980
+ },
981
+ {
982
+ "kind": "api",
983
+ "name": "places.update",
984
+ "operation": "update",
985
+ "objectName": "@happyvertical/smrt-places:Place",
986
+ "path": "/places/[id]",
987
+ "method": "PATCH"
988
+ },
989
+ {
990
+ "kind": "api",
991
+ "name": "places.delete",
992
+ "operation": "delete",
993
+ "objectName": "@happyvertical/smrt-places:Place",
994
+ "path": "/places/[id]",
995
+ "method": "DELETE"
996
+ },
1257
997
  {
1258
998
  "kind": "cli",
1259
- "name": "placecollection_lookupOrCreate",
1260
- "operation": "lookupOrCreate",
1261
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
999
+ "name": "place_list",
1000
+ "operation": "list",
1001
+ "objectName": "@happyvertical/smrt-places:Place"
1262
1002
  },
1263
1003
  {
1264
1004
  "kind": "cli",
1265
- "name": "placecollection_discoverNearby",
1266
- "operation": "discoverNearby",
1267
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1005
+ "name": "place_get",
1006
+ "operation": "get",
1007
+ "objectName": "@happyvertical/smrt-places:Place"
1268
1008
  },
1269
1009
  {
1270
1010
  "kind": "cli",
1271
- "name": "placecollection_resolveTrackPlaces",
1272
- "operation": "resolveTrackPlaces",
1273
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1011
+ "name": "place_create",
1012
+ "operation": "create",
1013
+ "objectName": "@happyvertical/smrt-places:Place"
1274
1014
  },
1275
1015
  {
1276
1016
  "kind": "cli",
1277
- "name": "placecollection_getChildren",
1017
+ "name": "place_update",
1018
+ "operation": "update",
1019
+ "objectName": "@happyvertical/smrt-places:Place"
1020
+ },
1021
+ {
1022
+ "kind": "cli",
1023
+ "name": "place_delete",
1024
+ "operation": "delete",
1025
+ "objectName": "@happyvertical/smrt-places:Place"
1026
+ },
1027
+ {
1028
+ "kind": "cli",
1029
+ "name": "place_getParent",
1030
+ "operation": "getParent",
1031
+ "objectName": "@happyvertical/smrt-places:Place"
1032
+ },
1033
+ {
1034
+ "kind": "cli",
1035
+ "name": "place_getChildren",
1278
1036
  "operation": "getChildren",
1279
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1037
+ "objectName": "@happyvertical/smrt-places:Place"
1280
1038
  },
1281
1039
  {
1282
1040
  "kind": "cli",
1283
- "name": "placecollection_getRootPlaces",
1284
- "operation": "getRootPlaces",
1285
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1041
+ "name": "place_getAncestors",
1042
+ "operation": "getAncestors",
1043
+ "objectName": "@happyvertical/smrt-places:Place"
1286
1044
  },
1287
1045
  {
1288
1046
  "kind": "cli",
1289
- "name": "placecollection_getByType",
1290
- "operation": "getByType",
1291
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1047
+ "name": "place_getDescendants",
1048
+ "operation": "getDescendants",
1049
+ "objectName": "@happyvertical/smrt-places:Place"
1292
1050
  },
1293
1051
  {
1294
1052
  "kind": "cli",
1295
- "name": "placecollection_getHierarchy",
1053
+ "name": "place_getHierarchy",
1296
1054
  "operation": "getHierarchy",
1297
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1055
+ "objectName": "@happyvertical/smrt-places:Place"
1298
1056
  },
1299
1057
  {
1300
1058
  "kind": "cli",
1301
- "name": "placecollection_getAssets",
1302
- "operation": "getAssets",
1303
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1059
+ "name": "place_moveTo",
1060
+ "operation": "moveTo",
1061
+ "objectName": "@happyvertical/smrt-places:Place"
1304
1062
  },
1305
1063
  {
1306
1064
  "kind": "cli",
1307
- "name": "placecollection_addAsset",
1308
- "operation": "addAsset",
1309
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1065
+ "name": "place_getGeoData",
1066
+ "operation": "getGeoData",
1067
+ "objectName": "@happyvertical/smrt-places:Place"
1310
1068
  },
1311
1069
  {
1312
1070
  "kind": "cli",
1313
- "name": "placecollection_removeAsset",
1314
- "operation": "removeAsset",
1315
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1071
+ "name": "place_hasCoordinates",
1072
+ "operation": "hasCoordinates",
1073
+ "objectName": "@happyvertical/smrt-places:Place"
1316
1074
  },
1317
1075
  {
1318
1076
  "kind": "cli",
1319
- "name": "placecollection_searchByProximity",
1320
- "operation": "searchByProximity",
1321
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1077
+ "name": "place_getMetadata",
1078
+ "operation": "getMetadata",
1079
+ "objectName": "@happyvertical/smrt-places:Place"
1322
1080
  },
1323
1081
  {
1324
1082
  "kind": "cli",
1325
- "name": "placecollection_findByTenant",
1326
- "operation": "findByTenant",
1327
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1083
+ "name": "place_setMetadata",
1084
+ "operation": "setMetadata",
1085
+ "objectName": "@happyvertical/smrt-places:Place"
1328
1086
  },
1329
1087
  {
1330
1088
  "kind": "cli",
1331
- "name": "placecollection_findGlobal",
1332
- "operation": "findGlobal",
1333
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1089
+ "name": "place_updateMetadata",
1090
+ "operation": "updateMetadata",
1091
+ "objectName": "@happyvertical/smrt-places:Place"
1334
1092
  },
1335
1093
  {
1336
1094
  "kind": "cli",
1337
- "name": "placecollection_findWithGlobals",
1338
- "operation": "findWithGlobals",
1339
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1095
+ "name": "place_getType",
1096
+ "operation": "getType",
1097
+ "objectName": "@happyvertical/smrt-places:Place"
1098
+ },
1099
+ {
1100
+ "kind": "cli",
1101
+ "name": "place_getAssets",
1102
+ "operation": "getAssets",
1103
+ "objectName": "@happyvertical/smrt-places:Place"
1104
+ },
1105
+ {
1106
+ "kind": "cli",
1107
+ "name": "place_addAsset",
1108
+ "operation": "addAsset",
1109
+ "objectName": "@happyvertical/smrt-places:Place"
1110
+ },
1111
+ {
1112
+ "kind": "cli",
1113
+ "name": "place_getMainAsset",
1114
+ "operation": "getMainAsset",
1115
+ "objectName": "@happyvertical/smrt-places:Place"
1116
+ },
1117
+ {
1118
+ "kind": "cli",
1119
+ "name": "place_setMainAsset",
1120
+ "operation": "setMainAsset",
1121
+ "objectName": "@happyvertical/smrt-places:Place"
1122
+ },
1123
+ {
1124
+ "kind": "cli",
1125
+ "name": "place_removeAsset",
1126
+ "operation": "removeAsset",
1127
+ "objectName": "@happyvertical/smrt-places:Place"
1128
+ },
1129
+ {
1130
+ "kind": "mcp",
1131
+ "name": "place_list",
1132
+ "operation": "list",
1133
+ "objectName": "@happyvertical/smrt-places:Place"
1134
+ },
1135
+ {
1136
+ "kind": "mcp",
1137
+ "name": "place_get",
1138
+ "operation": "get",
1139
+ "objectName": "@happyvertical/smrt-places:Place"
1140
+ },
1141
+ {
1142
+ "kind": "mcp",
1143
+ "name": "place_create",
1144
+ "operation": "create",
1145
+ "objectName": "@happyvertical/smrt-places:Place"
1146
+ },
1147
+ {
1148
+ "kind": "mcp",
1149
+ "name": "place_update",
1150
+ "operation": "update",
1151
+ "objectName": "@happyvertical/smrt-places:Place"
1340
1152
  }
1341
1153
  ],
1342
1154
  "withheldSurfaces": [
@@ -1345,185 +1157,373 @@
1345
1157
  "operation": "addAsset",
1346
1158
  "code": "not-included",
1347
1159
  "reason": "not listed in api.include",
1348
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1160
+ "objectName": "@happyvertical/smrt-places:Place"
1349
1161
  },
1350
1162
  {
1351
1163
  "kind": "api",
1352
- "operation": "discoverNearby",
1164
+ "operation": "getAncestors",
1165
+ "code": "not-included",
1166
+ "reason": "not listed in api.include",
1167
+ "objectName": "@happyvertical/smrt-places:Place"
1168
+ },
1169
+ {
1170
+ "kind": "api",
1171
+ "operation": "getAssets",
1172
+ "code": "not-included",
1173
+ "reason": "not listed in api.include",
1174
+ "objectName": "@happyvertical/smrt-places:Place"
1175
+ },
1176
+ {
1177
+ "kind": "api",
1178
+ "operation": "getChildren",
1179
+ "code": "not-included",
1180
+ "reason": "not listed in api.include",
1181
+ "objectName": "@happyvertical/smrt-places:Place"
1182
+ },
1183
+ {
1184
+ "kind": "api",
1185
+ "operation": "getDescendants",
1353
1186
  "code": "not-included",
1354
1187
  "reason": "not listed in api.include",
1355
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1188
+ "objectName": "@happyvertical/smrt-places:Place"
1356
1189
  },
1357
1190
  {
1358
1191
  "kind": "api",
1359
- "operation": "findByTenant",
1192
+ "operation": "getGeoData",
1360
1193
  "code": "not-included",
1361
1194
  "reason": "not listed in api.include",
1362
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1195
+ "objectName": "@happyvertical/smrt-places:Place"
1363
1196
  },
1364
1197
  {
1365
1198
  "kind": "api",
1366
- "operation": "findGlobal",
1199
+ "operation": "getHierarchy",
1367
1200
  "code": "not-included",
1368
1201
  "reason": "not listed in api.include",
1369
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1202
+ "objectName": "@happyvertical/smrt-places:Place"
1370
1203
  },
1371
1204
  {
1372
1205
  "kind": "api",
1373
- "operation": "findWithGlobals",
1206
+ "operation": "getMainAsset",
1374
1207
  "code": "not-included",
1375
1208
  "reason": "not listed in api.include",
1376
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1209
+ "objectName": "@happyvertical/smrt-places:Place"
1377
1210
  },
1378
1211
  {
1379
1212
  "kind": "api",
1380
- "operation": "getAssets",
1213
+ "operation": "getMetadata",
1381
1214
  "code": "not-included",
1382
1215
  "reason": "not listed in api.include",
1383
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1216
+ "objectName": "@happyvertical/smrt-places:Place"
1384
1217
  },
1385
1218
  {
1386
1219
  "kind": "api",
1387
- "operation": "getByType",
1220
+ "operation": "getParent",
1388
1221
  "code": "not-included",
1389
1222
  "reason": "not listed in api.include",
1390
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1223
+ "objectName": "@happyvertical/smrt-places:Place"
1391
1224
  },
1392
1225
  {
1393
1226
  "kind": "api",
1394
- "operation": "getChildren",
1227
+ "operation": "getType",
1395
1228
  "code": "not-included",
1396
1229
  "reason": "not listed in api.include",
1397
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1230
+ "objectName": "@happyvertical/smrt-places:Place"
1398
1231
  },
1399
1232
  {
1400
1233
  "kind": "api",
1401
- "operation": "getHierarchy",
1234
+ "operation": "hasCoordinates",
1402
1235
  "code": "not-included",
1403
1236
  "reason": "not listed in api.include",
1404
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1237
+ "objectName": "@happyvertical/smrt-places:Place"
1405
1238
  },
1406
1239
  {
1407
1240
  "kind": "api",
1408
- "operation": "getRootPlaces",
1241
+ "operation": "moveTo",
1409
1242
  "code": "not-included",
1410
1243
  "reason": "not listed in api.include",
1411
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1244
+ "objectName": "@happyvertical/smrt-places:Place"
1412
1245
  },
1413
1246
  {
1414
1247
  "kind": "api",
1415
- "operation": "lookupOrCreate",
1248
+ "operation": "removeAsset",
1416
1249
  "code": "not-included",
1417
1250
  "reason": "not listed in api.include",
1418
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1251
+ "objectName": "@happyvertical/smrt-places:Place"
1419
1252
  },
1420
1253
  {
1421
1254
  "kind": "api",
1422
- "operation": "removeAsset",
1255
+ "operation": "setMainAsset",
1423
1256
  "code": "not-included",
1424
1257
  "reason": "not listed in api.include",
1425
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1258
+ "objectName": "@happyvertical/smrt-places:Place"
1426
1259
  },
1427
1260
  {
1428
1261
  "kind": "api",
1429
- "operation": "resolveTrackPlaces",
1262
+ "operation": "setMetadata",
1430
1263
  "code": "not-included",
1431
1264
  "reason": "not listed in api.include",
1432
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1265
+ "objectName": "@happyvertical/smrt-places:Place"
1433
1266
  },
1434
1267
  {
1435
1268
  "kind": "api",
1436
- "operation": "searchByProximity",
1269
+ "operation": "updateMetadata",
1437
1270
  "code": "not-included",
1438
1271
  "reason": "not listed in api.include",
1439
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1272
+ "objectName": "@happyvertical/smrt-places:Place"
1440
1273
  }
1441
1274
  ],
1442
1275
  "relationshipFeatures": [
1276
+ "SmrtHierarchical",
1277
+ "foreignKey",
1443
1278
  "uuidColumns"
1444
1279
  ],
1445
1280
  "tags": [],
1446
1281
  "risks": []
1447
1282
  },
1448
1283
  {
1449
- "name": "PlaceTypeCollection",
1450
- "qualifiedName": "@happyvertical/smrt-places:PlaceTypeCollection",
1284
+ "name": "PlaceAsset",
1285
+ "qualifiedName": "@happyvertical/smrt-places:PlaceAsset",
1286
+ "collection": "placeassets",
1287
+ "tableName": "place_assets",
1288
+ "packageName": "@happyvertical/smrt-places",
1289
+ "extends": "SmrtObject",
1290
+ "fields": [
1291
+ {
1292
+ "name": "tenantId",
1293
+ "type": "text",
1294
+ "required": false,
1295
+ "columnType": "UUID"
1296
+ },
1297
+ {
1298
+ "name": "placeId",
1299
+ "type": "foreignKey",
1300
+ "required": true,
1301
+ "related": "Place",
1302
+ "columnType": "UUID"
1303
+ },
1304
+ {
1305
+ "name": "assetId",
1306
+ "type": "crossPackageRef",
1307
+ "required": true,
1308
+ "related": "@happyvertical/smrt-assets:Asset",
1309
+ "columnType": "UUID"
1310
+ },
1311
+ {
1312
+ "name": "relationship",
1313
+ "type": "text",
1314
+ "required": true,
1315
+ "columnType": "TEXT"
1316
+ },
1317
+ {
1318
+ "name": "sortOrder",
1319
+ "type": "integer",
1320
+ "required": true,
1321
+ "columnType": "INTEGER",
1322
+ "default": 0
1323
+ }
1324
+ ],
1325
+ "relationships": [
1326
+ {
1327
+ "name": "placeId",
1328
+ "type": "foreignKey",
1329
+ "required": true,
1330
+ "related": "Place",
1331
+ "columnType": "UUID"
1332
+ },
1333
+ {
1334
+ "name": "assetId",
1335
+ "type": "crossPackageRef",
1336
+ "required": true,
1337
+ "related": "@happyvertical/smrt-assets:Asset",
1338
+ "columnType": "UUID"
1339
+ }
1340
+ ],
1341
+ "methods": [],
1342
+ "tenant": {
1343
+ "scoped": true,
1344
+ "mode": "optional",
1345
+ "field": "tenantId"
1346
+ },
1347
+ "conflictColumns": [
1348
+ "place_id",
1349
+ "asset_id",
1350
+ "relationship"
1351
+ ],
1352
+ "surfaces": [],
1353
+ "relationshipFeatures": [
1354
+ "crossPackageRef",
1355
+ "foreignKey",
1356
+ "uuidColumns"
1357
+ ],
1358
+ "tags": [],
1359
+ "risks": []
1360
+ },
1361
+ {
1362
+ "name": "PlaceType",
1363
+ "qualifiedName": "@happyvertical/smrt-places:PlaceType",
1364
+ "displayLabelField": "name",
1451
1365
  "collection": "placetypes",
1452
1366
  "tableName": "place_types",
1453
1367
  "packageName": "@happyvertical/smrt-places",
1454
- "extends": "SmrtCollection",
1455
- "fields": [],
1368
+ "extends": "SmrtObject",
1369
+ "fields": [
1370
+ {
1371
+ "name": "created_at",
1372
+ "type": "datetime",
1373
+ "required": false,
1374
+ "columnType": "TIMESTAMP"
1375
+ },
1376
+ {
1377
+ "name": "updated_at",
1378
+ "type": "datetime",
1379
+ "required": false,
1380
+ "columnType": "TIMESTAMP"
1381
+ },
1382
+ {
1383
+ "name": "name",
1384
+ "type": "text",
1385
+ "required": true,
1386
+ "columnType": "TEXT",
1387
+ "default": ""
1388
+ },
1389
+ {
1390
+ "name": "description",
1391
+ "type": "text",
1392
+ "required": false,
1393
+ "columnType": "TEXT"
1394
+ },
1395
+ {
1396
+ "name": "createdAt",
1397
+ "type": "text",
1398
+ "required": false,
1399
+ "columnType": "TIMESTAMP"
1400
+ },
1401
+ {
1402
+ "name": "updatedAt",
1403
+ "type": "text",
1404
+ "required": false,
1405
+ "columnType": "TIMESTAMP"
1406
+ }
1407
+ ],
1456
1408
  "relationships": [],
1457
1409
  "methods": [
1458
- "getBySlug",
1459
- "getOrCreate",
1460
- "initializeDefaults"
1410
+ "getBySlug"
1461
1411
  ],
1462
1412
  "methodSignatures": [
1463
1413
  {
1464
1414
  "name": "getBySlug",
1465
1415
  "async": true,
1416
+ "static": true,
1466
1417
  "params": [
1467
- "slug: string"
1418
+ "_slug: string"
1468
1419
  ],
1469
1420
  "returns": "Promise<PlaceType | null>"
1421
+ }
1422
+ ],
1423
+ "tableStrategy": "sti",
1424
+ "surfaces": [
1425
+ {
1426
+ "kind": "api",
1427
+ "name": "placetypes.list",
1428
+ "operation": "list",
1429
+ "objectName": "@happyvertical/smrt-places:PlaceType",
1430
+ "path": "/placetypes",
1431
+ "method": "GET"
1470
1432
  },
1471
1433
  {
1472
- "name": "getOrCreate",
1473
- "async": true,
1474
- "params": [
1475
- "slug: string",
1476
- "name?: string"
1477
- ],
1478
- "returns": "Promise<PlaceType>"
1434
+ "kind": "api",
1435
+ "name": "placetypes.get",
1436
+ "operation": "get",
1437
+ "objectName": "@happyvertical/smrt-places:PlaceType",
1438
+ "path": "/placetypes/[id]",
1439
+ "method": "GET"
1479
1440
  },
1480
1441
  {
1481
- "name": "initializeDefaults",
1482
- "async": true,
1483
- "returns": "Promise<PlaceType[]>"
1484
- }
1485
- ],
1486
- "surfaces": [
1442
+ "kind": "api",
1443
+ "name": "placetypes.create",
1444
+ "operation": "create",
1445
+ "objectName": "@happyvertical/smrt-places:PlaceType",
1446
+ "path": "/placetypes",
1447
+ "method": "POST"
1448
+ },
1449
+ {
1450
+ "kind": "api",
1451
+ "name": "placetypes.update",
1452
+ "operation": "update",
1453
+ "objectName": "@happyvertical/smrt-places:PlaceType",
1454
+ "path": "/placetypes/[id]",
1455
+ "method": "PATCH"
1456
+ },
1457
+ {
1458
+ "kind": "api",
1459
+ "name": "placetypes.delete",
1460
+ "operation": "delete",
1461
+ "objectName": "@happyvertical/smrt-places:PlaceType",
1462
+ "path": "/placetypes/[id]",
1463
+ "method": "DELETE"
1464
+ },
1465
+ {
1466
+ "kind": "cli",
1467
+ "name": "placetype_list",
1468
+ "operation": "list",
1469
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1470
+ },
1471
+ {
1472
+ "kind": "cli",
1473
+ "name": "placetype_get",
1474
+ "operation": "get",
1475
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1476
+ },
1477
+ {
1478
+ "kind": "cli",
1479
+ "name": "placetype_create",
1480
+ "operation": "create",
1481
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1482
+ },
1487
1483
  {
1488
1484
  "kind": "cli",
1489
- "name": "placetypecollection_getOrCreate",
1490
- "operation": "getOrCreate",
1491
- "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1485
+ "name": "placetype_update",
1486
+ "operation": "update",
1487
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1492
1488
  },
1493
1489
  {
1494
1490
  "kind": "cli",
1495
- "name": "placetypecollection_getBySlug",
1496
- "operation": "getBySlug",
1497
- "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1491
+ "name": "placetype_delete",
1492
+ "operation": "delete",
1493
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1498
1494
  },
1499
1495
  {
1500
1496
  "kind": "cli",
1501
- "name": "placetypecollection_initializeDefaults",
1502
- "operation": "initializeDefaults",
1503
- "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1504
- }
1505
- ],
1506
- "withheldSurfaces": [
1507
- {
1508
- "kind": "api",
1497
+ "name": "placetype_getBySlug",
1509
1498
  "operation": "getBySlug",
1510
- "code": "not-included",
1511
- "reason": "not listed in api.include",
1512
- "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1499
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1513
1500
  },
1514
1501
  {
1515
- "kind": "api",
1516
- "operation": "getOrCreate",
1517
- "code": "not-included",
1518
- "reason": "not listed in api.include",
1519
- "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1502
+ "kind": "mcp",
1503
+ "name": "placetype_list",
1504
+ "operation": "list",
1505
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1506
+ },
1507
+ {
1508
+ "kind": "mcp",
1509
+ "name": "placetype_get",
1510
+ "operation": "get",
1511
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1520
1512
  },
1513
+ {
1514
+ "kind": "mcp",
1515
+ "name": "placetype_create",
1516
+ "operation": "create",
1517
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1518
+ }
1519
+ ],
1520
+ "withheldSurfaces": [
1521
1521
  {
1522
1522
  "kind": "api",
1523
- "operation": "initializeDefaults",
1523
+ "operation": "getBySlug",
1524
1524
  "code": "not-included",
1525
1525
  "reason": "not listed in api.include",
1526
- "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1526
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1527
1527
  }
1528
1528
  ],
1529
1529
  "relationshipFeatures": [
@@ -1534,6 +1534,108 @@
1534
1534
  }
1535
1535
  ],
1536
1536
  "surfaces": [
1537
+ {
1538
+ "kind": "cli",
1539
+ "name": "placecollection_lookupOrCreate",
1540
+ "operation": "lookupOrCreate",
1541
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1542
+ },
1543
+ {
1544
+ "kind": "cli",
1545
+ "name": "placecollection_discoverNearby",
1546
+ "operation": "discoverNearby",
1547
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1548
+ },
1549
+ {
1550
+ "kind": "cli",
1551
+ "name": "placecollection_resolveTrackPlaces",
1552
+ "operation": "resolveTrackPlaces",
1553
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1554
+ },
1555
+ {
1556
+ "kind": "cli",
1557
+ "name": "placecollection_getChildren",
1558
+ "operation": "getChildren",
1559
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1560
+ },
1561
+ {
1562
+ "kind": "cli",
1563
+ "name": "placecollection_getRootPlaces",
1564
+ "operation": "getRootPlaces",
1565
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1566
+ },
1567
+ {
1568
+ "kind": "cli",
1569
+ "name": "placecollection_getByType",
1570
+ "operation": "getByType",
1571
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1572
+ },
1573
+ {
1574
+ "kind": "cli",
1575
+ "name": "placecollection_getHierarchy",
1576
+ "operation": "getHierarchy",
1577
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1578
+ },
1579
+ {
1580
+ "kind": "cli",
1581
+ "name": "placecollection_getAssets",
1582
+ "operation": "getAssets",
1583
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1584
+ },
1585
+ {
1586
+ "kind": "cli",
1587
+ "name": "placecollection_addAsset",
1588
+ "operation": "addAsset",
1589
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1590
+ },
1591
+ {
1592
+ "kind": "cli",
1593
+ "name": "placecollection_removeAsset",
1594
+ "operation": "removeAsset",
1595
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1596
+ },
1597
+ {
1598
+ "kind": "cli",
1599
+ "name": "placecollection_searchByProximity",
1600
+ "operation": "searchByProximity",
1601
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1602
+ },
1603
+ {
1604
+ "kind": "cli",
1605
+ "name": "placecollection_findByTenant",
1606
+ "operation": "findByTenant",
1607
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1608
+ },
1609
+ {
1610
+ "kind": "cli",
1611
+ "name": "placecollection_findGlobal",
1612
+ "operation": "findGlobal",
1613
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1614
+ },
1615
+ {
1616
+ "kind": "cli",
1617
+ "name": "placecollection_findWithGlobals",
1618
+ "operation": "findWithGlobals",
1619
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1620
+ },
1621
+ {
1622
+ "kind": "cli",
1623
+ "name": "placetypecollection_getOrCreate",
1624
+ "operation": "getOrCreate",
1625
+ "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1626
+ },
1627
+ {
1628
+ "kind": "cli",
1629
+ "name": "placetypecollection_getBySlug",
1630
+ "operation": "getBySlug",
1631
+ "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1632
+ },
1633
+ {
1634
+ "kind": "cli",
1635
+ "name": "placetypecollection_initializeDefaults",
1636
+ "operation": "initializeDefaults",
1637
+ "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1638
+ },
1537
1639
  {
1538
1640
  "kind": "api",
1539
1641
  "name": "places.list",
@@ -1823,108 +1925,6 @@
1823
1925
  "name": "placetype_create",
1824
1926
  "operation": "create",
1825
1927
  "objectName": "@happyvertical/smrt-places:PlaceType"
1826
- },
1827
- {
1828
- "kind": "cli",
1829
- "name": "placecollection_lookupOrCreate",
1830
- "operation": "lookupOrCreate",
1831
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1832
- },
1833
- {
1834
- "kind": "cli",
1835
- "name": "placecollection_discoverNearby",
1836
- "operation": "discoverNearby",
1837
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1838
- },
1839
- {
1840
- "kind": "cli",
1841
- "name": "placecollection_resolveTrackPlaces",
1842
- "operation": "resolveTrackPlaces",
1843
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1844
- },
1845
- {
1846
- "kind": "cli",
1847
- "name": "placecollection_getChildren",
1848
- "operation": "getChildren",
1849
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1850
- },
1851
- {
1852
- "kind": "cli",
1853
- "name": "placecollection_getRootPlaces",
1854
- "operation": "getRootPlaces",
1855
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1856
- },
1857
- {
1858
- "kind": "cli",
1859
- "name": "placecollection_getByType",
1860
- "operation": "getByType",
1861
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1862
- },
1863
- {
1864
- "kind": "cli",
1865
- "name": "placecollection_getHierarchy",
1866
- "operation": "getHierarchy",
1867
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1868
- },
1869
- {
1870
- "kind": "cli",
1871
- "name": "placecollection_getAssets",
1872
- "operation": "getAssets",
1873
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1874
- },
1875
- {
1876
- "kind": "cli",
1877
- "name": "placecollection_addAsset",
1878
- "operation": "addAsset",
1879
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1880
- },
1881
- {
1882
- "kind": "cli",
1883
- "name": "placecollection_removeAsset",
1884
- "operation": "removeAsset",
1885
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1886
- },
1887
- {
1888
- "kind": "cli",
1889
- "name": "placecollection_searchByProximity",
1890
- "operation": "searchByProximity",
1891
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1892
- },
1893
- {
1894
- "kind": "cli",
1895
- "name": "placecollection_findByTenant",
1896
- "operation": "findByTenant",
1897
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1898
- },
1899
- {
1900
- "kind": "cli",
1901
- "name": "placecollection_findGlobal",
1902
- "operation": "findGlobal",
1903
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1904
- },
1905
- {
1906
- "kind": "cli",
1907
- "name": "placecollection_findWithGlobals",
1908
- "operation": "findWithGlobals",
1909
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1910
- },
1911
- {
1912
- "kind": "cli",
1913
- "name": "placetypecollection_getOrCreate",
1914
- "operation": "getOrCreate",
1915
- "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1916
- },
1917
- {
1918
- "kind": "cli",
1919
- "name": "placetypecollection_getBySlug",
1920
- "operation": "getBySlug",
1921
- "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1922
- },
1923
- {
1924
- "kind": "cli",
1925
- "name": "placetypecollection_initializeDefaults",
1926
- "operation": "initializeDefaults",
1927
- "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1928
1928
  }
1929
1929
  ],
1930
1930
  "prompts": [],