@happyvertical/smrt-places 0.57.34 → 0.57.35

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