@happyvertical/smrt-places 0.57.35 → 0.57.37

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,13 +3,13 @@
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.37",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "0691e2bf95344ea24ecf023f393e410a0de06bebda9c10c96a53cb9d9873f198",
11
- "packageJson": "18a50713fa829b172f9bf07e83cb58287fb2c180696acaa597e54a4694bd2008",
12
- "agents": "1f12a465f3ef103ac0ba27bcec1ec2b982fd0f5e8a63b9a42738f2c79ecebe49"
10
+ "manifest": "d7701265ab3b7339a8c9f52ca524d49abc195c004f98ec49bde076f5bc62bd28",
11
+ "packageJson": "49012c674d84ea10fde9b440950d1069e82b0887c36a56663c3b716e7521a9cd",
12
+ "agents": "8b7e9c23fd1311b3d04afe693969c1caaaa5d166e436f48e70c3504efbbadce9"
13
13
  },
14
14
  "exports": [
15
15
  ".",
@@ -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,308 +269,198 @@
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>"
343
- ],
344
- "returns": "void"
345
- },
346
- {
347
- "name": "updateMetadata",
348
- "params": [
349
- "updates: Record<string, unknown>"
364
+ "points: ReadonlyArray<TrackPoint>",
365
+ "options?: ResolveTrackPlacesOptions"
350
366
  ],
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"
460
- },
461
- {
462
- "kind": "cli",
463
- "name": "place_getHierarchy",
464
- "operation": "getHierarchy",
465
- "objectName": "@happyvertical/smrt-places:Place"
367
+ "returns": "Promise<TrackPlacesResult>"
466
368
  },
369
+ {
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": [
467
381
  {
468
382
  "kind": "cli",
469
- "name": "place_moveTo",
470
- "operation": "moveTo",
471
- "objectName": "@happyvertical/smrt-places:Place"
383
+ "name": "placecollection_lookupOrCreate",
384
+ "operation": "lookupOrCreate",
385
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
472
386
  },
473
387
  {
474
388
  "kind": "cli",
475
- "name": "place_getGeoData",
476
- "operation": "getGeoData",
477
- "objectName": "@happyvertical/smrt-places:Place"
389
+ "name": "placecollection_discoverNearby",
390
+ "operation": "discoverNearby",
391
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
478
392
  },
479
393
  {
480
394
  "kind": "cli",
481
- "name": "place_hasCoordinates",
482
- "operation": "hasCoordinates",
483
- "objectName": "@happyvertical/smrt-places:Place"
395
+ "name": "placecollection_resolveTrackPlaces",
396
+ "operation": "resolveTrackPlaces",
397
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
484
398
  },
485
399
  {
486
400
  "kind": "cli",
487
- "name": "place_getMetadata",
488
- "operation": "getMetadata",
489
- "objectName": "@happyvertical/smrt-places:Place"
401
+ "name": "placecollection_getChildren",
402
+ "operation": "getChildren",
403
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
490
404
  },
491
405
  {
492
406
  "kind": "cli",
493
- "name": "place_setMetadata",
494
- "operation": "setMetadata",
495
- "objectName": "@happyvertical/smrt-places:Place"
407
+ "name": "placecollection_getRootPlaces",
408
+ "operation": "getRootPlaces",
409
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
496
410
  },
497
411
  {
498
412
  "kind": "cli",
499
- "name": "place_updateMetadata",
500
- "operation": "updateMetadata",
501
- "objectName": "@happyvertical/smrt-places:Place"
413
+ "name": "placecollection_getByType",
414
+ "operation": "getByType",
415
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
502
416
  },
503
417
  {
504
418
  "kind": "cli",
505
- "name": "place_getType",
506
- "operation": "getType",
507
- "objectName": "@happyvertical/smrt-places:Place"
419
+ "name": "placecollection_getHierarchy",
420
+ "operation": "getHierarchy",
421
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
508
422
  },
509
423
  {
510
424
  "kind": "cli",
511
- "name": "place_getAssets",
425
+ "name": "placecollection_getAssets",
512
426
  "operation": "getAssets",
513
- "objectName": "@happyvertical/smrt-places:Place"
427
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
514
428
  },
515
429
  {
516
430
  "kind": "cli",
517
- "name": "place_addAsset",
431
+ "name": "placecollection_addAsset",
518
432
  "operation": "addAsset",
519
- "objectName": "@happyvertical/smrt-places:Place"
433
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
520
434
  },
521
435
  {
522
436
  "kind": "cli",
523
- "name": "place_getMainAsset",
524
- "operation": "getMainAsset",
525
- "objectName": "@happyvertical/smrt-places:Place"
437
+ "name": "placecollection_removeAsset",
438
+ "operation": "removeAsset",
439
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
526
440
  },
527
441
  {
528
442
  "kind": "cli",
529
- "name": "place_setMainAsset",
530
- "operation": "setMainAsset",
531
- "objectName": "@happyvertical/smrt-places:Place"
443
+ "name": "placecollection_searchByProximity",
444
+ "operation": "searchByProximity",
445
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
532
446
  },
533
447
  {
534
448
  "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"
449
+ "name": "placecollection_findByTenant",
450
+ "operation": "findByTenant",
451
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
550
452
  },
551
453
  {
552
- "kind": "mcp",
553
- "name": "place_create",
554
- "operation": "create",
555
- "objectName": "@happyvertical/smrt-places:Place"
454
+ "kind": "cli",
455
+ "name": "placecollection_findGlobal",
456
+ "operation": "findGlobal",
457
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
556
458
  },
557
459
  {
558
- "kind": "mcp",
559
- "name": "place_update",
560
- "operation": "update",
561
- "objectName": "@happyvertical/smrt-places:Place"
460
+ "kind": "cli",
461
+ "name": "placecollection_findWithGlobals",
462
+ "operation": "findWithGlobals",
463
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
562
464
  }
563
465
  ],
564
466
  "withheldSurfaces": [
@@ -567,215 +469,201 @@
567
469
  "operation": "addAsset",
568
470
  "code": "not-included",
569
471
  "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"
578
- },
579
- {
580
- "kind": "api",
581
- "operation": "getAssets",
582
- "code": "not-included",
583
- "reason": "not listed in api.include",
584
- "objectName": "@happyvertical/smrt-places:Place"
472
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
585
473
  },
586
474
  {
587
475
  "kind": "api",
588
- "operation": "getChildren",
476
+ "operation": "discoverNearby",
589
477
  "code": "not-included",
590
478
  "reason": "not listed in api.include",
591
- "objectName": "@happyvertical/smrt-places:Place"
479
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
592
480
  },
593
481
  {
594
482
  "kind": "api",
595
- "operation": "getDescendants",
483
+ "operation": "findByTenant",
596
484
  "code": "not-included",
597
485
  "reason": "not listed in api.include",
598
- "objectName": "@happyvertical/smrt-places:Place"
486
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
599
487
  },
600
488
  {
601
489
  "kind": "api",
602
- "operation": "getGeoData",
490
+ "operation": "findGlobal",
603
491
  "code": "not-included",
604
492
  "reason": "not listed in api.include",
605
- "objectName": "@happyvertical/smrt-places:Place"
493
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
606
494
  },
607
495
  {
608
496
  "kind": "api",
609
- "operation": "getHierarchy",
497
+ "operation": "findWithGlobals",
610
498
  "code": "not-included",
611
499
  "reason": "not listed in api.include",
612
- "objectName": "@happyvertical/smrt-places:Place"
500
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
613
501
  },
614
502
  {
615
503
  "kind": "api",
616
- "operation": "getMainAsset",
504
+ "operation": "getAssets",
617
505
  "code": "not-included",
618
506
  "reason": "not listed in api.include",
619
- "objectName": "@happyvertical/smrt-places:Place"
507
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
620
508
  },
621
509
  {
622
510
  "kind": "api",
623
- "operation": "getMetadata",
511
+ "operation": "getByType",
624
512
  "code": "not-included",
625
513
  "reason": "not listed in api.include",
626
- "objectName": "@happyvertical/smrt-places:Place"
514
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
627
515
  },
628
516
  {
629
517
  "kind": "api",
630
- "operation": "getParent",
518
+ "operation": "getChildren",
631
519
  "code": "not-included",
632
520
  "reason": "not listed in api.include",
633
- "objectName": "@happyvertical/smrt-places:Place"
521
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
634
522
  },
635
523
  {
636
524
  "kind": "api",
637
- "operation": "getType",
525
+ "operation": "getHierarchy",
638
526
  "code": "not-included",
639
527
  "reason": "not listed in api.include",
640
- "objectName": "@happyvertical/smrt-places:Place"
528
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
641
529
  },
642
530
  {
643
531
  "kind": "api",
644
- "operation": "hasCoordinates",
532
+ "operation": "getRootPlaces",
645
533
  "code": "not-included",
646
534
  "reason": "not listed in api.include",
647
- "objectName": "@happyvertical/smrt-places:Place"
535
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
648
536
  },
649
537
  {
650
538
  "kind": "api",
651
- "operation": "moveTo",
539
+ "operation": "lookupOrCreate",
652
540
  "code": "not-included",
653
541
  "reason": "not listed in api.include",
654
- "objectName": "@happyvertical/smrt-places:Place"
542
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
655
543
  },
656
544
  {
657
545
  "kind": "api",
658
546
  "operation": "removeAsset",
659
547
  "code": "not-included",
660
548
  "reason": "not listed in api.include",
661
- "objectName": "@happyvertical/smrt-places:Place"
662
- },
663
- {
664
- "kind": "api",
665
- "operation": "setMainAsset",
666
- "code": "not-included",
667
- "reason": "not listed in api.include",
668
- "objectName": "@happyvertical/smrt-places:Place"
549
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
669
550
  },
670
551
  {
671
552
  "kind": "api",
672
- "operation": "setMetadata",
553
+ "operation": "resolveTrackPlaces",
673
554
  "code": "not-included",
674
555
  "reason": "not listed in api.include",
675
- "objectName": "@happyvertical/smrt-places:Place"
556
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
676
557
  },
677
558
  {
678
559
  "kind": "api",
679
- "operation": "updateMetadata",
560
+ "operation": "searchByProximity",
680
561
  "code": "not-included",
681
562
  "reason": "not listed in api.include",
682
- "objectName": "@happyvertical/smrt-places:Place"
563
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
683
564
  }
684
565
  ],
685
566
  "relationshipFeatures": [
686
- "SmrtHierarchical",
687
- "foreignKey",
688
567
  "uuidColumns"
689
568
  ],
690
569
  "tags": [],
691
570
  "risks": []
692
571
  },
693
572
  {
694
- "name": "PlaceAsset",
695
- "qualifiedName": "@happyvertical/smrt-places:PlaceAsset",
696
- "collection": "placeassets",
697
- "tableName": "place_assets",
573
+ "name": "PlaceTypeCollection",
574
+ "qualifiedName": "@happyvertical/smrt-places:PlaceTypeCollection",
575
+ "collection": "placetypes",
576
+ "tableName": "place_types",
698
577
  "packageName": "@happyvertical/smrt-places",
699
- "extends": "SmrtObject",
700
- "fields": [
578
+ "extends": "SmrtCollection",
579
+ "fields": [],
580
+ "relationships": [],
581
+ "methods": [
582
+ "getBySlug",
583
+ "getOrCreate",
584
+ "initializeDefaults"
585
+ ],
586
+ "methodSignatures": [
701
587
  {
702
- "name": "tenantId",
703
- "type": "text",
704
- "required": false,
705
- "columnType": "UUID"
588
+ "name": "getBySlug",
589
+ "async": true,
590
+ "params": [
591
+ "slug: string"
592
+ ],
593
+ "returns": "Promise<PlaceType | null>"
706
594
  },
707
595
  {
708
- "name": "placeId",
709
- "type": "foreignKey",
710
- "required": true,
711
- "related": "Place",
712
- "columnType": "UUID"
596
+ "name": "getOrCreate",
597
+ "async": true,
598
+ "params": [
599
+ "slug: string",
600
+ "name?: string"
601
+ ],
602
+ "returns": "Promise<PlaceType>"
713
603
  },
714
604
  {
715
- "name": "assetId",
716
- "type": "crossPackageRef",
717
- "required": true,
718
- "related": "@happyvertical/smrt-assets:Asset",
719
- "columnType": "UUID"
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"
720
616
  },
721
617
  {
722
- "name": "relationship",
723
- "type": "text",
724
- "required": true,
725
- "columnType": "TEXT"
618
+ "kind": "cli",
619
+ "name": "placetypecollection_getBySlug",
620
+ "operation": "getBySlug",
621
+ "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
726
622
  },
727
623
  {
728
- "name": "sortOrder",
729
- "type": "integer",
730
- "required": true,
731
- "columnType": "INTEGER",
732
- "default": 0
624
+ "kind": "cli",
625
+ "name": "placetypecollection_initializeDefaults",
626
+ "operation": "initializeDefaults",
627
+ "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
733
628
  }
734
629
  ],
735
- "relationships": [
630
+ "withheldSurfaces": [
736
631
  {
737
- "name": "placeId",
738
- "type": "foreignKey",
739
- "required": true,
740
- "related": "Place",
741
- "columnType": "UUID"
632
+ "kind": "api",
633
+ "operation": "getBySlug",
634
+ "code": "not-included",
635
+ "reason": "not listed in api.include",
636
+ "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
742
637
  },
743
638
  {
744
- "name": "assetId",
745
- "type": "crossPackageRef",
746
- "required": true,
747
- "related": "@happyvertical/smrt-assets:Asset",
748
- "columnType": "UUID"
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"
749
651
  }
750
652
  ],
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
653
  "relationshipFeatures": [
764
- "crossPackageRef",
765
- "foreignKey",
766
654
  "uuidColumns"
767
655
  ],
768
656
  "tags": [],
769
657
  "risks": []
770
658
  },
771
659
  {
772
- "name": "PlaceType",
773
- "qualifiedName": "@happyvertical/smrt-places:PlaceType",
660
+ "name": "Place",
661
+ "qualifiedName": "@happyvertical/smrt-places:Place",
774
662
  "displayLabelField": "name",
775
- "collection": "placetypes",
776
- "tableName": "place_types",
663
+ "collection": "places",
664
+ "tableName": "places",
777
665
  "packageName": "@happyvertical/smrt-places",
778
- "extends": "SmrtObject",
666
+ "extends": "SmrtHierarchical",
779
667
  "fields": [
780
668
  {
781
669
  "name": "created_at",
@@ -790,183 +678,183 @@
790
678
  "columnType": "TIMESTAMP"
791
679
  },
792
680
  {
793
- "name": "name",
794
- "type": "text",
795
- "required": true,
796
- "columnType": "TEXT",
797
- "default": ""
681
+ "name": "parentId",
682
+ "type": "foreignKey",
683
+ "required": false,
684
+ "related": "Place",
685
+ "columnType": "UUID"
798
686
  },
799
687
  {
800
- "name": "description",
688
+ "name": "tenantId",
801
689
  "type": "text",
802
690
  "required": false,
803
- "columnType": "TEXT"
691
+ "columnType": "UUID"
804
692
  },
805
693
  {
806
- "name": "createdAt",
694
+ "name": "typeId",
695
+ "type": "foreignKey",
696
+ "required": false,
697
+ "related": "PlaceType",
698
+ "columnType": "UUID",
699
+ "description": "What kind of place this is, such as a building, a room or a storage zone."
700
+ },
701
+ {
702
+ "name": "name",
807
703
  "type": "text",
808
704
  "required": false,
809
- "columnType": "TIMESTAMP"
705
+ "columnType": "TEXT",
706
+ "description": "What the place is called, such as \"Main warehouse\" or \"Aisle 4\"."
810
707
  },
811
708
  {
812
- "name": "updatedAt",
709
+ "name": "description",
813
710
  "type": "text",
814
711
  "required": false,
815
- "columnType": "TIMESTAMP"
816
- }
817
- ],
818
- "relationships": [],
819
- "methods": [
820
- "getBySlug"
821
- ],
822
- "methodSignatures": [
712
+ "columnType": "TEXT",
713
+ "description": "A few words about the place and what happens there."
714
+ },
823
715
  {
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": [
716
+ "name": "latitude",
717
+ "type": "decimal",
718
+ "required": false,
719
+ "columnType": "REAL",
720
+ "description": "How far north or south the place is on a map. Leave empty for a place that is not on a map."
721
+ },
835
722
  {
836
- "kind": "api",
837
- "name": "placetypes.list",
838
- "operation": "list",
839
- "objectName": "@happyvertical/smrt-places:PlaceType",
840
- "path": "/placetypes",
841
- "method": "GET"
723
+ "name": "longitude",
724
+ "type": "decimal",
725
+ "required": false,
726
+ "columnType": "REAL",
727
+ "description": "How far east or west the place is on a map. Leave empty for a place that is not on a map."
842
728
  },
843
729
  {
844
- "kind": "api",
845
- "name": "placetypes.get",
846
- "operation": "get",
847
- "objectName": "@happyvertical/smrt-places:PlaceType",
848
- "path": "/placetypes/[id]",
849
- "method": "GET"
730
+ "name": "streetNumber",
731
+ "type": "text",
732
+ "required": false,
733
+ "columnType": "TEXT",
734
+ "description": "The number of the building on its street."
850
735
  },
851
736
  {
852
- "kind": "api",
853
- "name": "placetypes.create",
854
- "operation": "create",
855
- "objectName": "@happyvertical/smrt-places:PlaceType",
856
- "path": "/placetypes",
857
- "method": "POST"
737
+ "name": "streetName",
738
+ "type": "text",
739
+ "required": false,
740
+ "columnType": "TEXT",
741
+ "description": "The name of the street the place is on."
858
742
  },
859
743
  {
860
- "kind": "api",
861
- "name": "placetypes.update",
862
- "operation": "update",
863
- "objectName": "@happyvertical/smrt-places:PlaceType",
864
- "path": "/placetypes/[id]",
865
- "method": "PATCH"
744
+ "name": "city",
745
+ "type": "text",
746
+ "required": false,
747
+ "columnType": "TEXT",
748
+ "description": "The town or city the place is in."
866
749
  },
867
750
  {
868
- "kind": "api",
869
- "name": "placetypes.delete",
870
- "operation": "delete",
871
- "objectName": "@happyvertical/smrt-places:PlaceType",
872
- "path": "/placetypes/[id]",
873
- "method": "DELETE"
751
+ "name": "region",
752
+ "type": "text",
753
+ "required": false,
754
+ "columnType": "TEXT",
755
+ "description": "The state, province or region the place is in."
874
756
  },
875
757
  {
876
- "kind": "cli",
877
- "name": "placetype_list",
878
- "operation": "list",
879
- "objectName": "@happyvertical/smrt-places:PlaceType"
758
+ "name": "country",
759
+ "type": "text",
760
+ "required": false,
761
+ "columnType": "TEXT",
762
+ "description": "The country the place is in."
880
763
  },
881
764
  {
882
- "kind": "cli",
883
- "name": "placetype_get",
884
- "operation": "get",
885
- "objectName": "@happyvertical/smrt-places:PlaceType"
765
+ "name": "postalCode",
766
+ "type": "text",
767
+ "required": false,
768
+ "columnType": "TEXT",
769
+ "description": "The postal or zip code of the address."
886
770
  },
887
771
  {
888
- "kind": "cli",
889
- "name": "placetype_create",
890
- "operation": "create",
891
- "objectName": "@happyvertical/smrt-places:PlaceType"
772
+ "name": "countryCode",
773
+ "type": "text",
774
+ "required": false,
775
+ "columnType": "TEXT",
776
+ "description": "The short two-letter code for the country, such as CA or US."
892
777
  },
893
778
  {
894
- "kind": "cli",
895
- "name": "placetype_update",
896
- "operation": "update",
897
- "objectName": "@happyvertical/smrt-places:PlaceType"
779
+ "name": "timezone",
780
+ "type": "text",
781
+ "required": false,
782
+ "columnType": "TEXT",
783
+ "description": "The time zone the place keeps, such as America/Toronto."
898
784
  },
899
785
  {
900
- "kind": "cli",
901
- "name": "placetype_delete",
902
- "operation": "delete",
903
- "objectName": "@happyvertical/smrt-places:PlaceType"
786
+ "name": "externalId",
787
+ "type": "text",
788
+ "required": false,
789
+ "columnType": "TEXT",
790
+ "description": "The reference the map provider uses for this place, filled in when the app looks it up."
904
791
  },
905
792
  {
906
- "kind": "cli",
907
- "name": "placetype_getBySlug",
908
- "operation": "getBySlug",
909
- "objectName": "@happyvertical/smrt-places:PlaceType"
793
+ "name": "source",
794
+ "type": "text",
795
+ "required": false,
796
+ "columnType": "TEXT",
797
+ "description": "Which map provider the place was looked up from, if any."
910
798
  },
911
799
  {
912
- "kind": "mcp",
913
- "name": "placetype_list",
914
- "operation": "list",
915
- "objectName": "@happyvertical/smrt-places:PlaceType"
800
+ "name": "metadata",
801
+ "type": "text",
802
+ "required": false,
803
+ "columnType": "TEXT"
916
804
  },
917
805
  {
918
- "kind": "mcp",
919
- "name": "placetype_get",
920
- "operation": "get",
921
- "objectName": "@happyvertical/smrt-places:PlaceType"
806
+ "name": "createdAt",
807
+ "type": "text",
808
+ "required": false,
809
+ "columnType": "TIMESTAMP"
922
810
  },
923
811
  {
924
- "kind": "mcp",
925
- "name": "placetype_create",
926
- "operation": "create",
927
- "objectName": "@happyvertical/smrt-places:PlaceType"
812
+ "name": "updatedAt",
813
+ "type": "text",
814
+ "required": false,
815
+ "columnType": "TIMESTAMP"
928
816
  }
929
817
  ],
930
- "withheldSurfaces": [
818
+ "relationships": [
931
819
  {
932
- "kind": "api",
933
- "operation": "getBySlug",
934
- "code": "not-included",
935
- "reason": "not listed in api.include",
936
- "objectName": "@happyvertical/smrt-places:PlaceType"
937
- }
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": [],
820
+ "name": "parentId",
821
+ "type": "foreignKey",
822
+ "required": false,
823
+ "related": "Place",
824
+ "columnType": "UUID"
825
+ },
826
+ {
827
+ "name": "typeId",
828
+ "type": "foreignKey",
829
+ "required": false,
830
+ "related": "PlaceType",
831
+ "columnType": "UUID"
832
+ }
833
+ ],
954
834
  "methods": [
955
835
  "addAsset",
956
- "attach",
957
- "byLeft",
958
- "byRight",
959
- "detach",
836
+ "getAncestors",
960
837
  "getAssets",
838
+ "getChildren",
839
+ "getDescendants",
840
+ "getGeoData",
841
+ "getHierarchy",
842
+ "getMainAsset",
843
+ "getMetadata",
844
+ "getParent",
845
+ "getType",
846
+ "hasCoordinates",
847
+ "moveTo",
961
848
  "removeAsset",
962
- "setLinks"
849
+ "setMainAsset",
850
+ "setMetadata",
851
+ "updateMetadata"
963
852
  ],
964
853
  "methodSignatures": [
965
854
  {
966
855
  "name": "addAsset",
967
856
  "async": true,
968
857
  "params": [
969
- "placeId: string",
970
858
  "asset: Asset",
971
859
  "relationship?: any",
972
860
  "sortOrder?: any"
@@ -974,369 +862,308 @@
974
862
  "returns": "Promise<void>"
975
863
  },
976
864
  {
977
- "name": "attach",
865
+ "name": "getAncestors",
978
866
  "async": true,
979
- "params": [
980
- "leftId: string",
981
- "rightId: string",
982
- "opts?: JunctionAttachOptions"
983
- ],
984
- "returns": "Promise<TItem>"
867
+ "returns": "Promise<this[]>"
985
868
  },
986
869
  {
987
- "name": "byLeft",
870
+ "name": "getAssets",
988
871
  "async": true,
989
872
  "params": [
990
- "leftId: string",
991
- "opts?: JunctionFilterOptions"
873
+ "relationship?: string"
992
874
  ],
993
- "returns": "Promise<TItem[]>"
875
+ "returns": "Promise<Asset[]>"
994
876
  },
995
877
  {
996
- "name": "byRight",
878
+ "name": "getChildren",
997
879
  "async": true,
998
- "params": [
999
- "rightId: string",
1000
- "opts?: JunctionFilterOptions"
1001
- ],
1002
- "returns": "Promise<TItem[]>"
880
+ "returns": "Promise<this[]>"
1003
881
  },
1004
882
  {
1005
- "name": "detach",
883
+ "name": "getDescendants",
1006
884
  "async": true,
1007
- "params": [
1008
- "leftId: string",
1009
- "rightId: string",
1010
- "opts?: JunctionFilterOptions"
1011
- ],
1012
- "returns": "Promise<void>"
885
+ "returns": "Promise<this[]>"
1013
886
  },
1014
887
  {
1015
- "name": "getAssets",
888
+ "name": "getGeoData",
889
+ "returns": "GeoData"
890
+ },
891
+ {
892
+ "name": "getHierarchy",
893
+ "async": true,
894
+ "returns": "Promise<HierarchyView<this>>"
895
+ },
896
+ {
897
+ "name": "getMainAsset",
898
+ "async": true,
899
+ "returns": "Promise<Asset | null>"
900
+ },
901
+ {
902
+ "name": "getMetadata",
903
+ "returns": "Record<string, unknown>"
904
+ },
905
+ {
906
+ "name": "getParent",
907
+ "async": true,
908
+ "returns": "Promise<this | null>"
909
+ },
910
+ {
911
+ "name": "getType",
912
+ "async": true,
913
+ "returns": "any"
914
+ },
915
+ {
916
+ "name": "hasCoordinates",
917
+ "returns": "boolean"
918
+ },
919
+ {
920
+ "name": "moveTo",
1016
921
  "async": true,
1017
922
  "params": [
1018
- "placeId: string",
1019
- "relationship?: string"
923
+ "newParent: this | string | null"
1020
924
  ],
1021
- "returns": "Promise<Asset[]>"
925
+ "returns": "Promise<void>"
1022
926
  },
1023
927
  {
1024
928
  "name": "removeAsset",
1025
929
  "async": true,
1026
930
  "params": [
1027
- "placeId: string",
1028
931
  "assetId: string",
1029
932
  "relationship?: string"
1030
933
  ],
1031
934
  "returns": "Promise<void>"
1032
935
  },
1033
936
  {
1034
- "name": "setLinks",
937
+ "name": "setMainAsset",
1035
938
  "async": true,
1036
939
  "params": [
1037
- "leftId: string",
1038
- "rightIds: string[]",
1039
- "opts?: JunctionAttachOptions"
940
+ "asset: Asset | null"
1040
941
  ],
1041
942
  "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"
1052
- },
1053
- {
1054
- "kind": "api",
1055
- "operation": "attach",
1056
- "code": "api-disabled",
1057
- "reason": "api is disabled",
1058
- "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
1059
943
  },
1060
944
  {
1061
- "kind": "api",
1062
- "operation": "byLeft",
1063
- "code": "api-disabled",
1064
- "reason": "api is disabled",
1065
- "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
945
+ "name": "setMetadata",
946
+ "params": [
947
+ "data: Record<string, unknown>"
948
+ ],
949
+ "returns": "void"
1066
950
  },
1067
951
  {
1068
- "kind": "api",
1069
- "operation": "byRight",
1070
- "code": "api-disabled",
1071
- "reason": "api is disabled",
1072
- "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
1073
- },
952
+ "name": "updateMetadata",
953
+ "params": [
954
+ "updates: Record<string, unknown>"
955
+ ],
956
+ "returns": "void"
957
+ }
958
+ ],
959
+ "tenant": {
960
+ "scoped": true,
961
+ "mode": "optional",
962
+ "field": "tenantId"
963
+ },
964
+ "tableStrategy": "sti",
965
+ "conflictColumns": [
966
+ "tenant_id",
967
+ "slug",
968
+ "context",
969
+ "_meta_type"
970
+ ],
971
+ "surfaces": [
1074
972
  {
1075
973
  "kind": "api",
1076
- "operation": "detach",
1077
- "code": "api-disabled",
1078
- "reason": "api is disabled",
1079
- "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
974
+ "name": "places.list",
975
+ "operation": "list",
976
+ "objectName": "@happyvertical/smrt-places:Place",
977
+ "path": "/places",
978
+ "method": "GET"
1080
979
  },
1081
980
  {
1082
981
  "kind": "api",
1083
- "operation": "getAssets",
1084
- "code": "api-disabled",
1085
- "reason": "api is disabled",
1086
- "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
982
+ "name": "places.get",
983
+ "operation": "get",
984
+ "objectName": "@happyvertical/smrt-places:Place",
985
+ "path": "/places/[id]",
986
+ "method": "GET"
1087
987
  },
1088
988
  {
1089
989
  "kind": "api",
1090
- "operation": "removeAsset",
1091
- "code": "api-disabled",
1092
- "reason": "api is disabled",
1093
- "objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
990
+ "name": "places.create",
991
+ "operation": "create",
992
+ "objectName": "@happyvertical/smrt-places:Place",
993
+ "path": "/places",
994
+ "method": "POST"
1094
995
  },
1095
996
  {
1096
997
  "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[]>"
1157
- },
1158
- {
1159
- "name": "findByTenant",
1160
- "async": true,
1161
- "params": [
1162
- "tenantId: string"
1163
- ],
1164
- "returns": "Promise<Place[]>"
998
+ "name": "places.update",
999
+ "operation": "update",
1000
+ "objectName": "@happyvertical/smrt-places:Place",
1001
+ "path": "/places/[id]",
1002
+ "method": "PATCH"
1165
1003
  },
1166
1004
  {
1167
- "name": "findGlobal",
1168
- "async": true,
1169
- "returns": "Promise<Place[]>"
1005
+ "kind": "api",
1006
+ "name": "places.delete",
1007
+ "operation": "delete",
1008
+ "objectName": "@happyvertical/smrt-places:Place",
1009
+ "path": "/places/[id]",
1010
+ "method": "DELETE"
1170
1011
  },
1171
1012
  {
1172
- "name": "findWithGlobals",
1173
- "async": true,
1174
- "params": [
1175
- "tenantId: string"
1176
- ],
1177
- "returns": "Promise<Place[]>"
1013
+ "kind": "cli",
1014
+ "name": "place_list",
1015
+ "operation": "list",
1016
+ "objectName": "@happyvertical/smrt-places:Place"
1178
1017
  },
1179
1018
  {
1180
- "name": "getAssets",
1181
- "async": true,
1182
- "params": [
1183
- "placeId: string",
1184
- "relationship?: string"
1185
- ],
1186
- "returns": "Promise<Asset[]>"
1019
+ "kind": "cli",
1020
+ "name": "place_get",
1021
+ "operation": "get",
1022
+ "objectName": "@happyvertical/smrt-places:Place"
1187
1023
  },
1188
1024
  {
1189
- "name": "getByType",
1190
- "async": true,
1191
- "params": [
1192
- "typeSlug: string"
1193
- ],
1194
- "returns": "Promise<Place[]>"
1025
+ "kind": "cli",
1026
+ "name": "place_create",
1027
+ "operation": "create",
1028
+ "objectName": "@happyvertical/smrt-places:Place"
1195
1029
  },
1196
1030
  {
1197
- "name": "getChildren",
1198
- "async": true,
1199
- "params": [
1200
- "parentId: string"
1201
- ],
1202
- "returns": "Promise<Place[]>"
1031
+ "kind": "cli",
1032
+ "name": "place_update",
1033
+ "operation": "update",
1034
+ "objectName": "@happyvertical/smrt-places:Place"
1203
1035
  },
1204
1036
  {
1205
- "name": "getHierarchy",
1206
- "async": true,
1207
- "params": [
1208
- "placeId: string"
1209
- ],
1210
- "returns": "any"
1037
+ "kind": "cli",
1038
+ "name": "place_delete",
1039
+ "operation": "delete",
1040
+ "objectName": "@happyvertical/smrt-places:Place"
1211
1041
  },
1212
1042
  {
1213
- "name": "getRootPlaces",
1214
- "async": true,
1215
- "returns": "Promise<Place[]>"
1043
+ "kind": "cli",
1044
+ "name": "place_getParent",
1045
+ "operation": "getParent",
1046
+ "objectName": "@happyvertical/smrt-places:Place"
1216
1047
  },
1217
1048
  {
1218
- "name": "lookupOrCreate",
1219
- "async": true,
1220
- "params": [
1221
- "query: string",
1222
- "options?: LookupOrCreateOptions"
1223
- ],
1224
- "returns": "Promise<Place | null>"
1049
+ "kind": "cli",
1050
+ "name": "place_getChildren",
1051
+ "operation": "getChildren",
1052
+ "objectName": "@happyvertical/smrt-places:Place"
1225
1053
  },
1226
1054
  {
1227
- "name": "removeAsset",
1228
- "async": true,
1229
- "params": [
1230
- "placeId: string",
1231
- "assetId: string",
1232
- "relationship?: string"
1233
- ],
1234
- "returns": "Promise<void>"
1055
+ "kind": "cli",
1056
+ "name": "place_getAncestors",
1057
+ "operation": "getAncestors",
1058
+ "objectName": "@happyvertical/smrt-places:Place"
1235
1059
  },
1236
1060
  {
1237
- "name": "resolveTrackPlaces",
1238
- "async": true,
1239
- "params": [
1240
- "points: ReadonlyArray<TrackPoint>",
1241
- "options?: ResolveTrackPlacesOptions"
1242
- ],
1243
- "returns": "Promise<TrackPlacesResult>"
1061
+ "kind": "cli",
1062
+ "name": "place_getDescendants",
1063
+ "operation": "getDescendants",
1064
+ "objectName": "@happyvertical/smrt-places:Place"
1244
1065
  },
1245
1066
  {
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": [
1067
+ "kind": "cli",
1068
+ "name": "place_getHierarchy",
1069
+ "operation": "getHierarchy",
1070
+ "objectName": "@happyvertical/smrt-places:Place"
1071
+ },
1257
1072
  {
1258
1073
  "kind": "cli",
1259
- "name": "placecollection_lookupOrCreate",
1260
- "operation": "lookupOrCreate",
1261
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1074
+ "name": "place_moveTo",
1075
+ "operation": "moveTo",
1076
+ "objectName": "@happyvertical/smrt-places:Place"
1262
1077
  },
1263
1078
  {
1264
1079
  "kind": "cli",
1265
- "name": "placecollection_discoverNearby",
1266
- "operation": "discoverNearby",
1267
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1080
+ "name": "place_getGeoData",
1081
+ "operation": "getGeoData",
1082
+ "objectName": "@happyvertical/smrt-places:Place"
1268
1083
  },
1269
1084
  {
1270
1085
  "kind": "cli",
1271
- "name": "placecollection_resolveTrackPlaces",
1272
- "operation": "resolveTrackPlaces",
1273
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1086
+ "name": "place_hasCoordinates",
1087
+ "operation": "hasCoordinates",
1088
+ "objectName": "@happyvertical/smrt-places:Place"
1274
1089
  },
1275
1090
  {
1276
1091
  "kind": "cli",
1277
- "name": "placecollection_getChildren",
1278
- "operation": "getChildren",
1279
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1092
+ "name": "place_getMetadata",
1093
+ "operation": "getMetadata",
1094
+ "objectName": "@happyvertical/smrt-places:Place"
1280
1095
  },
1281
1096
  {
1282
1097
  "kind": "cli",
1283
- "name": "placecollection_getRootPlaces",
1284
- "operation": "getRootPlaces",
1285
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1098
+ "name": "place_setMetadata",
1099
+ "operation": "setMetadata",
1100
+ "objectName": "@happyvertical/smrt-places:Place"
1286
1101
  },
1287
1102
  {
1288
1103
  "kind": "cli",
1289
- "name": "placecollection_getByType",
1290
- "operation": "getByType",
1291
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1104
+ "name": "place_updateMetadata",
1105
+ "operation": "updateMetadata",
1106
+ "objectName": "@happyvertical/smrt-places:Place"
1292
1107
  },
1293
1108
  {
1294
1109
  "kind": "cli",
1295
- "name": "placecollection_getHierarchy",
1296
- "operation": "getHierarchy",
1297
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1110
+ "name": "place_getType",
1111
+ "operation": "getType",
1112
+ "objectName": "@happyvertical/smrt-places:Place"
1298
1113
  },
1299
1114
  {
1300
1115
  "kind": "cli",
1301
- "name": "placecollection_getAssets",
1116
+ "name": "place_getAssets",
1302
1117
  "operation": "getAssets",
1303
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1118
+ "objectName": "@happyvertical/smrt-places:Place"
1304
1119
  },
1305
1120
  {
1306
1121
  "kind": "cli",
1307
- "name": "placecollection_addAsset",
1122
+ "name": "place_addAsset",
1308
1123
  "operation": "addAsset",
1309
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1124
+ "objectName": "@happyvertical/smrt-places:Place"
1310
1125
  },
1311
1126
  {
1312
1127
  "kind": "cli",
1313
- "name": "placecollection_removeAsset",
1314
- "operation": "removeAsset",
1315
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1128
+ "name": "place_getMainAsset",
1129
+ "operation": "getMainAsset",
1130
+ "objectName": "@happyvertical/smrt-places:Place"
1316
1131
  },
1317
1132
  {
1318
1133
  "kind": "cli",
1319
- "name": "placecollection_searchByProximity",
1320
- "operation": "searchByProximity",
1321
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1134
+ "name": "place_setMainAsset",
1135
+ "operation": "setMainAsset",
1136
+ "objectName": "@happyvertical/smrt-places:Place"
1322
1137
  },
1323
1138
  {
1324
1139
  "kind": "cli",
1325
- "name": "placecollection_findByTenant",
1326
- "operation": "findByTenant",
1327
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1140
+ "name": "place_removeAsset",
1141
+ "operation": "removeAsset",
1142
+ "objectName": "@happyvertical/smrt-places:Place"
1328
1143
  },
1329
1144
  {
1330
- "kind": "cli",
1331
- "name": "placecollection_findGlobal",
1332
- "operation": "findGlobal",
1333
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1145
+ "kind": "mcp",
1146
+ "name": "place_list",
1147
+ "operation": "list",
1148
+ "objectName": "@happyvertical/smrt-places:Place"
1334
1149
  },
1335
1150
  {
1336
- "kind": "cli",
1337
- "name": "placecollection_findWithGlobals",
1338
- "operation": "findWithGlobals",
1339
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1151
+ "kind": "mcp",
1152
+ "name": "place_get",
1153
+ "operation": "get",
1154
+ "objectName": "@happyvertical/smrt-places:Place"
1155
+ },
1156
+ {
1157
+ "kind": "mcp",
1158
+ "name": "place_create",
1159
+ "operation": "create",
1160
+ "objectName": "@happyvertical/smrt-places:Place"
1161
+ },
1162
+ {
1163
+ "kind": "mcp",
1164
+ "name": "place_update",
1165
+ "operation": "update",
1166
+ "objectName": "@happyvertical/smrt-places:Place"
1340
1167
  }
1341
1168
  ],
1342
1169
  "withheldSurfaces": [
@@ -1345,162 +1172,366 @@
1345
1172
  "operation": "addAsset",
1346
1173
  "code": "not-included",
1347
1174
  "reason": "not listed in api.include",
1348
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1175
+ "objectName": "@happyvertical/smrt-places:Place"
1349
1176
  },
1350
1177
  {
1351
1178
  "kind": "api",
1352
- "operation": "discoverNearby",
1179
+ "operation": "getAncestors",
1353
1180
  "code": "not-included",
1354
1181
  "reason": "not listed in api.include",
1355
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1182
+ "objectName": "@happyvertical/smrt-places:Place"
1356
1183
  },
1357
1184
  {
1358
1185
  "kind": "api",
1359
- "operation": "findByTenant",
1186
+ "operation": "getAssets",
1360
1187
  "code": "not-included",
1361
1188
  "reason": "not listed in api.include",
1362
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1189
+ "objectName": "@happyvertical/smrt-places:Place"
1363
1190
  },
1364
1191
  {
1365
1192
  "kind": "api",
1366
- "operation": "findGlobal",
1193
+ "operation": "getChildren",
1367
1194
  "code": "not-included",
1368
1195
  "reason": "not listed in api.include",
1369
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1196
+ "objectName": "@happyvertical/smrt-places:Place"
1370
1197
  },
1371
1198
  {
1372
1199
  "kind": "api",
1373
- "operation": "findWithGlobals",
1200
+ "operation": "getDescendants",
1374
1201
  "code": "not-included",
1375
1202
  "reason": "not listed in api.include",
1376
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1203
+ "objectName": "@happyvertical/smrt-places:Place"
1377
1204
  },
1378
1205
  {
1379
1206
  "kind": "api",
1380
- "operation": "getAssets",
1207
+ "operation": "getGeoData",
1208
+ "code": "not-included",
1209
+ "reason": "not listed in api.include",
1210
+ "objectName": "@happyvertical/smrt-places:Place"
1211
+ },
1212
+ {
1213
+ "kind": "api",
1214
+ "operation": "getHierarchy",
1215
+ "code": "not-included",
1216
+ "reason": "not listed in api.include",
1217
+ "objectName": "@happyvertical/smrt-places:Place"
1218
+ },
1219
+ {
1220
+ "kind": "api",
1221
+ "operation": "getMainAsset",
1222
+ "code": "not-included",
1223
+ "reason": "not listed in api.include",
1224
+ "objectName": "@happyvertical/smrt-places:Place"
1225
+ },
1226
+ {
1227
+ "kind": "api",
1228
+ "operation": "getMetadata",
1381
1229
  "code": "not-included",
1382
1230
  "reason": "not listed in api.include",
1383
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1231
+ "objectName": "@happyvertical/smrt-places:Place"
1384
1232
  },
1385
1233
  {
1386
1234
  "kind": "api",
1387
- "operation": "getByType",
1235
+ "operation": "getParent",
1388
1236
  "code": "not-included",
1389
1237
  "reason": "not listed in api.include",
1390
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1238
+ "objectName": "@happyvertical/smrt-places:Place"
1391
1239
  },
1392
1240
  {
1393
1241
  "kind": "api",
1394
- "operation": "getChildren",
1242
+ "operation": "getType",
1395
1243
  "code": "not-included",
1396
1244
  "reason": "not listed in api.include",
1397
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1245
+ "objectName": "@happyvertical/smrt-places:Place"
1398
1246
  },
1399
1247
  {
1400
1248
  "kind": "api",
1401
- "operation": "getHierarchy",
1249
+ "operation": "hasCoordinates",
1402
1250
  "code": "not-included",
1403
1251
  "reason": "not listed in api.include",
1404
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1252
+ "objectName": "@happyvertical/smrt-places:Place"
1405
1253
  },
1406
1254
  {
1407
1255
  "kind": "api",
1408
- "operation": "getRootPlaces",
1256
+ "operation": "moveTo",
1409
1257
  "code": "not-included",
1410
1258
  "reason": "not listed in api.include",
1411
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1259
+ "objectName": "@happyvertical/smrt-places:Place"
1412
1260
  },
1413
1261
  {
1414
1262
  "kind": "api",
1415
- "operation": "lookupOrCreate",
1263
+ "operation": "removeAsset",
1416
1264
  "code": "not-included",
1417
1265
  "reason": "not listed in api.include",
1418
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1266
+ "objectName": "@happyvertical/smrt-places:Place"
1419
1267
  },
1420
1268
  {
1421
1269
  "kind": "api",
1422
- "operation": "removeAsset",
1270
+ "operation": "setMainAsset",
1423
1271
  "code": "not-included",
1424
1272
  "reason": "not listed in api.include",
1425
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1273
+ "objectName": "@happyvertical/smrt-places:Place"
1426
1274
  },
1427
1275
  {
1428
1276
  "kind": "api",
1429
- "operation": "resolveTrackPlaces",
1277
+ "operation": "setMetadata",
1430
1278
  "code": "not-included",
1431
1279
  "reason": "not listed in api.include",
1432
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1280
+ "objectName": "@happyvertical/smrt-places:Place"
1433
1281
  },
1434
1282
  {
1435
1283
  "kind": "api",
1436
- "operation": "searchByProximity",
1284
+ "operation": "updateMetadata",
1437
1285
  "code": "not-included",
1438
1286
  "reason": "not listed in api.include",
1439
- "objectName": "@happyvertical/smrt-places:PlaceCollection"
1287
+ "objectName": "@happyvertical/smrt-places:Place"
1440
1288
  }
1441
1289
  ],
1442
1290
  "relationshipFeatures": [
1291
+ "SmrtHierarchical",
1292
+ "foreignKey",
1443
1293
  "uuidColumns"
1444
1294
  ],
1445
1295
  "tags": [],
1446
1296
  "risks": []
1447
1297
  },
1448
1298
  {
1449
- "name": "PlaceTypeCollection",
1450
- "qualifiedName": "@happyvertical/smrt-places:PlaceTypeCollection",
1299
+ "name": "PlaceAsset",
1300
+ "qualifiedName": "@happyvertical/smrt-places:PlaceAsset",
1301
+ "collection": "placeassets",
1302
+ "tableName": "place_assets",
1303
+ "packageName": "@happyvertical/smrt-places",
1304
+ "extends": "SmrtObject",
1305
+ "fields": [
1306
+ {
1307
+ "name": "tenantId",
1308
+ "type": "text",
1309
+ "required": false,
1310
+ "columnType": "UUID"
1311
+ },
1312
+ {
1313
+ "name": "placeId",
1314
+ "type": "foreignKey",
1315
+ "required": true,
1316
+ "related": "Place",
1317
+ "columnType": "UUID"
1318
+ },
1319
+ {
1320
+ "name": "assetId",
1321
+ "type": "crossPackageRef",
1322
+ "required": true,
1323
+ "related": "@happyvertical/smrt-assets:Asset",
1324
+ "columnType": "UUID"
1325
+ },
1326
+ {
1327
+ "name": "relationship",
1328
+ "type": "text",
1329
+ "required": true,
1330
+ "columnType": "TEXT"
1331
+ },
1332
+ {
1333
+ "name": "sortOrder",
1334
+ "type": "integer",
1335
+ "required": true,
1336
+ "columnType": "INTEGER",
1337
+ "default": 0
1338
+ }
1339
+ ],
1340
+ "relationships": [
1341
+ {
1342
+ "name": "placeId",
1343
+ "type": "foreignKey",
1344
+ "required": true,
1345
+ "related": "Place",
1346
+ "columnType": "UUID"
1347
+ },
1348
+ {
1349
+ "name": "assetId",
1350
+ "type": "crossPackageRef",
1351
+ "required": true,
1352
+ "related": "@happyvertical/smrt-assets:Asset",
1353
+ "columnType": "UUID"
1354
+ }
1355
+ ],
1356
+ "methods": [],
1357
+ "tenant": {
1358
+ "scoped": true,
1359
+ "mode": "optional",
1360
+ "field": "tenantId"
1361
+ },
1362
+ "conflictColumns": [
1363
+ "place_id",
1364
+ "asset_id",
1365
+ "relationship"
1366
+ ],
1367
+ "surfaces": [],
1368
+ "relationshipFeatures": [
1369
+ "crossPackageRef",
1370
+ "foreignKey",
1371
+ "uuidColumns"
1372
+ ],
1373
+ "tags": [],
1374
+ "risks": []
1375
+ },
1376
+ {
1377
+ "name": "PlaceType",
1378
+ "qualifiedName": "@happyvertical/smrt-places:PlaceType",
1379
+ "displayLabelField": "name",
1451
1380
  "collection": "placetypes",
1452
1381
  "tableName": "place_types",
1453
1382
  "packageName": "@happyvertical/smrt-places",
1454
- "extends": "SmrtCollection",
1455
- "fields": [],
1383
+ "extends": "SmrtObject",
1384
+ "fields": [
1385
+ {
1386
+ "name": "created_at",
1387
+ "type": "datetime",
1388
+ "required": false,
1389
+ "columnType": "TIMESTAMP"
1390
+ },
1391
+ {
1392
+ "name": "updated_at",
1393
+ "type": "datetime",
1394
+ "required": false,
1395
+ "columnType": "TIMESTAMP"
1396
+ },
1397
+ {
1398
+ "name": "name",
1399
+ "type": "text",
1400
+ "required": true,
1401
+ "columnType": "TEXT",
1402
+ "default": "",
1403
+ "description": "The name of the kind of place, such as \"Building\", \"Room\" or \"Zone\"."
1404
+ },
1405
+ {
1406
+ "name": "description",
1407
+ "type": "text",
1408
+ "required": false,
1409
+ "columnType": "TEXT",
1410
+ "description": "A few words about when to use this kind of place."
1411
+ },
1412
+ {
1413
+ "name": "createdAt",
1414
+ "type": "text",
1415
+ "required": false,
1416
+ "columnType": "TIMESTAMP"
1417
+ },
1418
+ {
1419
+ "name": "updatedAt",
1420
+ "type": "text",
1421
+ "required": false,
1422
+ "columnType": "TIMESTAMP"
1423
+ }
1424
+ ],
1456
1425
  "relationships": [],
1457
1426
  "methods": [
1458
- "getBySlug",
1459
- "getOrCreate",
1460
- "initializeDefaults"
1427
+ "getBySlug"
1461
1428
  ],
1462
1429
  "methodSignatures": [
1463
1430
  {
1464
1431
  "name": "getBySlug",
1465
1432
  "async": true,
1433
+ "static": true,
1466
1434
  "params": [
1467
- "slug: string"
1435
+ "_slug: string"
1468
1436
  ],
1469
1437
  "returns": "Promise<PlaceType | null>"
1438
+ }
1439
+ ],
1440
+ "tableStrategy": "sti",
1441
+ "surfaces": [
1442
+ {
1443
+ "kind": "api",
1444
+ "name": "placetypes.list",
1445
+ "operation": "list",
1446
+ "objectName": "@happyvertical/smrt-places:PlaceType",
1447
+ "path": "/placetypes",
1448
+ "method": "GET"
1470
1449
  },
1471
1450
  {
1472
- "name": "getOrCreate",
1473
- "async": true,
1474
- "params": [
1475
- "slug: string",
1476
- "name?: string"
1477
- ],
1478
- "returns": "Promise<PlaceType>"
1451
+ "kind": "api",
1452
+ "name": "placetypes.get",
1453
+ "operation": "get",
1454
+ "objectName": "@happyvertical/smrt-places:PlaceType",
1455
+ "path": "/placetypes/[id]",
1456
+ "method": "GET"
1479
1457
  },
1480
1458
  {
1481
- "name": "initializeDefaults",
1482
- "async": true,
1483
- "returns": "Promise<PlaceType[]>"
1484
- }
1485
- ],
1486
- "surfaces": [
1459
+ "kind": "api",
1460
+ "name": "placetypes.create",
1461
+ "operation": "create",
1462
+ "objectName": "@happyvertical/smrt-places:PlaceType",
1463
+ "path": "/placetypes",
1464
+ "method": "POST"
1465
+ },
1466
+ {
1467
+ "kind": "api",
1468
+ "name": "placetypes.update",
1469
+ "operation": "update",
1470
+ "objectName": "@happyvertical/smrt-places:PlaceType",
1471
+ "path": "/placetypes/[id]",
1472
+ "method": "PATCH"
1473
+ },
1474
+ {
1475
+ "kind": "api",
1476
+ "name": "placetypes.delete",
1477
+ "operation": "delete",
1478
+ "objectName": "@happyvertical/smrt-places:PlaceType",
1479
+ "path": "/placetypes/[id]",
1480
+ "method": "DELETE"
1481
+ },
1487
1482
  {
1488
1483
  "kind": "cli",
1489
- "name": "placetypecollection_getOrCreate",
1490
- "operation": "getOrCreate",
1491
- "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1484
+ "name": "placetype_list",
1485
+ "operation": "list",
1486
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1487
+ },
1488
+ {
1489
+ "kind": "cli",
1490
+ "name": "placetype_get",
1491
+ "operation": "get",
1492
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1493
+ },
1494
+ {
1495
+ "kind": "cli",
1496
+ "name": "placetype_create",
1497
+ "operation": "create",
1498
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1499
+ },
1500
+ {
1501
+ "kind": "cli",
1502
+ "name": "placetype_update",
1503
+ "operation": "update",
1504
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1505
+ },
1506
+ {
1507
+ "kind": "cli",
1508
+ "name": "placetype_delete",
1509
+ "operation": "delete",
1510
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1511
+ },
1512
+ {
1513
+ "kind": "cli",
1514
+ "name": "placetype_getBySlug",
1515
+ "operation": "getBySlug",
1516
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1492
1517
  },
1493
1518
  {
1494
- "kind": "cli",
1495
- "name": "placetypecollection_getBySlug",
1496
- "operation": "getBySlug",
1497
- "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1519
+ "kind": "mcp",
1520
+ "name": "placetype_list",
1521
+ "operation": "list",
1522
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1498
1523
  },
1499
1524
  {
1500
- "kind": "cli",
1501
- "name": "placetypecollection_initializeDefaults",
1502
- "operation": "initializeDefaults",
1503
- "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1525
+ "kind": "mcp",
1526
+ "name": "placetype_get",
1527
+ "operation": "get",
1528
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1529
+ },
1530
+ {
1531
+ "kind": "mcp",
1532
+ "name": "placetype_create",
1533
+ "operation": "create",
1534
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1504
1535
  }
1505
1536
  ],
1506
1537
  "withheldSurfaces": [
@@ -1509,21 +1540,7 @@
1509
1540
  "operation": "getBySlug",
1510
1541
  "code": "not-included",
1511
1542
  "reason": "not listed in api.include",
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"
1543
+ "objectName": "@happyvertical/smrt-places:PlaceType"
1527
1544
  }
1528
1545
  ],
1529
1546
  "relationshipFeatures": [
@@ -1534,6 +1551,108 @@
1534
1551
  }
1535
1552
  ],
1536
1553
  "surfaces": [
1554
+ {
1555
+ "kind": "cli",
1556
+ "name": "placecollection_lookupOrCreate",
1557
+ "operation": "lookupOrCreate",
1558
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1559
+ },
1560
+ {
1561
+ "kind": "cli",
1562
+ "name": "placecollection_discoverNearby",
1563
+ "operation": "discoverNearby",
1564
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1565
+ },
1566
+ {
1567
+ "kind": "cli",
1568
+ "name": "placecollection_resolveTrackPlaces",
1569
+ "operation": "resolveTrackPlaces",
1570
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1571
+ },
1572
+ {
1573
+ "kind": "cli",
1574
+ "name": "placecollection_getChildren",
1575
+ "operation": "getChildren",
1576
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1577
+ },
1578
+ {
1579
+ "kind": "cli",
1580
+ "name": "placecollection_getRootPlaces",
1581
+ "operation": "getRootPlaces",
1582
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1583
+ },
1584
+ {
1585
+ "kind": "cli",
1586
+ "name": "placecollection_getByType",
1587
+ "operation": "getByType",
1588
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1589
+ },
1590
+ {
1591
+ "kind": "cli",
1592
+ "name": "placecollection_getHierarchy",
1593
+ "operation": "getHierarchy",
1594
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1595
+ },
1596
+ {
1597
+ "kind": "cli",
1598
+ "name": "placecollection_getAssets",
1599
+ "operation": "getAssets",
1600
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1601
+ },
1602
+ {
1603
+ "kind": "cli",
1604
+ "name": "placecollection_addAsset",
1605
+ "operation": "addAsset",
1606
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1607
+ },
1608
+ {
1609
+ "kind": "cli",
1610
+ "name": "placecollection_removeAsset",
1611
+ "operation": "removeAsset",
1612
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1613
+ },
1614
+ {
1615
+ "kind": "cli",
1616
+ "name": "placecollection_searchByProximity",
1617
+ "operation": "searchByProximity",
1618
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1619
+ },
1620
+ {
1621
+ "kind": "cli",
1622
+ "name": "placecollection_findByTenant",
1623
+ "operation": "findByTenant",
1624
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1625
+ },
1626
+ {
1627
+ "kind": "cli",
1628
+ "name": "placecollection_findGlobal",
1629
+ "operation": "findGlobal",
1630
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1631
+ },
1632
+ {
1633
+ "kind": "cli",
1634
+ "name": "placecollection_findWithGlobals",
1635
+ "operation": "findWithGlobals",
1636
+ "objectName": "@happyvertical/smrt-places:PlaceCollection"
1637
+ },
1638
+ {
1639
+ "kind": "cli",
1640
+ "name": "placetypecollection_getOrCreate",
1641
+ "operation": "getOrCreate",
1642
+ "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1643
+ },
1644
+ {
1645
+ "kind": "cli",
1646
+ "name": "placetypecollection_getBySlug",
1647
+ "operation": "getBySlug",
1648
+ "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1649
+ },
1650
+ {
1651
+ "kind": "cli",
1652
+ "name": "placetypecollection_initializeDefaults",
1653
+ "operation": "initializeDefaults",
1654
+ "objectName": "@happyvertical/smrt-places:PlaceTypeCollection"
1655
+ },
1537
1656
  {
1538
1657
  "kind": "api",
1539
1658
  "name": "places.list",
@@ -1823,108 +1942,6 @@
1823
1942
  "name": "placetype_create",
1824
1943
  "operation": "create",
1825
1944
  "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
1945
  }
1929
1946
  ],
1930
1947
  "prompts": [],
@@ -1936,7 +1953,166 @@
1936
1953
  "polymorphicAssociations": 0,
1937
1954
  "uuidColumns": 18
1938
1955
  },
1939
- "agentDoc": "# @happyvertical/smrt-places\n\nHierarchical geographic database with organic growth via geocoding integration.\n\n## Models\n\n- **Place** (STI): hierarchical via `parentId`. Optional geo fields (all nullable — supports abstract places like game zones). `externalId`/`source` from geocoder. Metadata JSON.\n- **PlaceAsset**: dedicated owned-asset join in `place_assets` with `relationship` and `sortOrder`.\n- **PlaceType**: slug-based classification (country, city, building, zone, room, region).\n\n## Key Collection Methods\n\n| Method | Purpose |\n|--------|---------|\n| `lookupOrCreate(query)` | DB first → geocode if not found → create. Organic growth pattern. |\n| `findByCoordinates(lat, lng, threshold)` | Default 0.0001° ≈ 11m tolerance at equator |\n| `searchByProximity(lat, lng, radiusKm)` | Haversine distance, sorted by proximity |\n| `findWithGlobals(tenantId)` | Tenant + global (tenantId=null) places |\n| `getRootPlaces()`, `getByType(slug)` | Hierarchy + type queries |\n| `getAssets()` / `addAsset()` / `removeAsset()` | Owned asset helpers on both `Place` and `PlaceCollection`, backed by `place_assets` |\n\nHierarchy traversal: `getParent()`, `getChildren()`, `getAncestors()`, `getDescendants()`, `getHierarchy()`.\n\n## Gotchas\n\n- **Geo providers**: Google Maps needs `GOOGLE_MAPS_API_KEY`; OpenStreetMap is default\n- **Abstract places allowed**: lat/lng nullable — supports non-geographic locations\n- **Coordinate tolerance varies by latitude**: 0.0001° ≈ 11m at equator, less at poles\n- **Optional tenancy** with nullable tenantId\n",
1956
+ "agentDoc": "# @happyvertical/smrt-places\n\nHierarchical geographic database with organic growth via geocoding integration.\n\n## Models\n\n- **Place** (STI): hierarchical via `parentId`. Optional geo fields (all nullable — supports abstract places like game zones). `externalId`/`source` from geocoder. Metadata JSON.\n- **PlaceAsset**: dedicated owned-asset join in `place_assets` with `relationship` and `sortOrder`.\n- **PlaceType**: slug-based classification (country, city, building, zone, room, region).\n- **Recipe `places.locations`** (`src/recipes.ts`, help in `src/locations.recipe.md`): lists places and place types for the planner and other catalog hosts; `PlaceAsset` is closed and stays out. Fields it shows carry `@field({ description })` in plain words; `parentId` (inherited) is described by the recipe's `options` help. Keep both when editing the models.\n\n## Key Collection Methods\n\n| Method | Purpose |\n|--------|---------|\n| `lookupOrCreate(query)` | DB first → geocode if not found → create. Organic growth pattern. |\n| `findByCoordinates(lat, lng, threshold)` | Default 0.0001° ≈ 11m tolerance at equator |\n| `searchByProximity(lat, lng, radiusKm)` | Haversine distance, sorted by proximity |\n| `findWithGlobals(tenantId)` | Tenant + global (tenantId=null) places |\n| `getRootPlaces()`, `getByType(slug)` | Hierarchy + type queries |\n| `getAssets()` / `addAsset()` / `removeAsset()` | Owned asset helpers on both `Place` and `PlaceCollection`, backed by `place_assets` |\n\nHierarchy traversal: `getParent()`, `getChildren()`, `getAncestors()`, `getDescendants()`, `getHierarchy()`.\n\n## Gotchas\n\n- **Geo providers**: Google Maps needs `GOOGLE_MAPS_API_KEY`; OpenStreetMap is default\n- **Abstract places allowed**: lat/lng nullable — supports non-geographic locations\n- **Coordinate tolerance varies by latitude**: 0.0001° ≈ 11m at equator, less at poles\n- **Optional tenancy** with nullable tenantId\n",
1957
+ "recipes": [
1958
+ {
1959
+ "id": "places.locations",
1960
+ "className": "PlacesLocationsRecipe",
1961
+ "label": "Places",
1962
+ "summary": "Keep a list of the places your work happens, such as sites, buildings, rooms and storage zones, one inside another.",
1963
+ "synonyms": [
1964
+ "places",
1965
+ "locations",
1966
+ "sites",
1967
+ "buildings",
1968
+ "rooms",
1969
+ "addresses",
1970
+ "warehouses"
1971
+ ],
1972
+ "models": [
1973
+ "@happyvertical/smrt-places:Place",
1974
+ "@happyvertical/smrt-places:PlaceType"
1975
+ ],
1976
+ "nav": [
1977
+ {
1978
+ "label": "Places",
1979
+ "model": "@happyvertical/smrt-places:Place",
1980
+ "icon": "home",
1981
+ "description": "Every site, building, room and zone, with its address and what it is inside.",
1982
+ "noun": "place"
1983
+ },
1984
+ {
1985
+ "label": "Place types",
1986
+ "model": "@happyvertical/smrt-places:PlaceType",
1987
+ "icon": "tag",
1988
+ "description": "The kinds of place you keep, such as building or room.",
1989
+ "noun": "place type"
1990
+ }
1991
+ ],
1992
+ "requires": [],
1993
+ "section": {
1994
+ "id": "places",
1995
+ "label": "Locations",
1996
+ "icon": "home",
1997
+ "description": "The places your work happens."
1998
+ },
1999
+ "options": {
2000
+ "@happyvertical/smrt-places:Place": {
2001
+ "fields": {
2002
+ "name": {
2003
+ "order": 1
2004
+ },
2005
+ "typeId": {
2006
+ "label": "Type",
2007
+ "order": 2
2008
+ },
2009
+ "parentId": {
2010
+ "label": "Inside",
2011
+ "help": "The larger place this one is part of, such as the building a room is in.",
2012
+ "order": 3
2013
+ },
2014
+ "description": {
2015
+ "order": 4
2016
+ },
2017
+ "streetNumber": {
2018
+ "label": "Street number",
2019
+ "order": 5
2020
+ },
2021
+ "streetName": {
2022
+ "label": "Street name",
2023
+ "order": 6
2024
+ },
2025
+ "city": {
2026
+ "order": 7
2027
+ },
2028
+ "region": {
2029
+ "order": 8
2030
+ },
2031
+ "country": {
2032
+ "order": 9
2033
+ },
2034
+ "postalCode": {
2035
+ "label": "Postal code",
2036
+ "order": 10
2037
+ },
2038
+ "latitude": {
2039
+ "visibility": "advanced"
2040
+ },
2041
+ "longitude": {
2042
+ "visibility": "advanced"
2043
+ },
2044
+ "countryCode": {
2045
+ "label": "Country code",
2046
+ "visibility": "advanced"
2047
+ },
2048
+ "timezone": {
2049
+ "label": "Time zone",
2050
+ "visibility": "advanced"
2051
+ },
2052
+ "externalId": {
2053
+ "label": "Map reference",
2054
+ "visibility": "advanced"
2055
+ },
2056
+ "source": {
2057
+ "label": "Map provider",
2058
+ "visibility": "advanced"
2059
+ },
2060
+ "metadata": {
2061
+ "visibility": "hidden"
2062
+ },
2063
+ "tenantId": {
2064
+ "visibility": "hidden"
2065
+ },
2066
+ "createdAt": {
2067
+ "visibility": "hidden"
2068
+ },
2069
+ "updatedAt": {
2070
+ "visibility": "hidden"
2071
+ }
2072
+ }
2073
+ },
2074
+ "@happyvertical/smrt-places:PlaceType": {
2075
+ "fields": {
2076
+ "name": {
2077
+ "order": 1
2078
+ },
2079
+ "description": {
2080
+ "order": 2
2081
+ },
2082
+ "createdAt": {
2083
+ "visibility": "hidden"
2084
+ },
2085
+ "updatedAt": {
2086
+ "visibility": "hidden"
2087
+ }
2088
+ }
2089
+ }
2090
+ },
2091
+ "help": {
2092
+ "markdown": "## Overview\n\nPlaces is where you keep the sites, buildings, rooms and storage zones your\nwork happens in. Each place has a name, a type and, when it is somewhere real,\nan address. A place can sit inside a larger one, so a room belongs to a\nbuilding and a shelf to a room, and you can follow that chain either way. A\nplace does not have to be on a map: a storage zone or a work area with no\naddress is fine.\n\n## Tasks\n\n### Add a place\n\n1. Open the list of places and choose **New**.\n2. Type the **{field:Place.name}**, for example \"Main warehouse\".\n3. Pick its **{field:Place.typeId}**, such as building or room. Add a type first if the one you need is missing.\n4. Fill in the address: the **{field:Place.streetNumber}**, **{field:Place.streetName}**, **{field:Place.city}**, **{field:Place.region}**, **{field:Place.country}** and **{field:Place.postalCode}**. Leave these empty for a place that is not on a map.\n5. Save. When your app searches a map for a place, it can add the place for you with the address filled in from the map provider.\n\n### Put a place inside another\n\n1. Open the place and choose to edit it.\n2. In **{field:Place.parentId}**, pick the larger place it belongs to, such as the building a room is in.\n3. Save. The place now shows up under the one you chose.\n\n### Change or remove a place\n\n1. Open the place and choose to edit it.\n2. Change the **{field:Place.name}**, **{field:Place.description}** or address, then save.\n3. To remove a place you no longer use, open it and choose to delete it. Move anything inside it first.\n\n### Add a place type\n\n1. Open the list of place types and choose **New**.\n2. Type the **{field:PlaceType.name}**, for example \"Room\".\n3. Add a **{field:PlaceType.description}** so others know when to use it.\n4. Save. The type can now be picked when you add a place.\n",
2093
+ "fieldRefs": [
2094
+ "Place.city",
2095
+ "Place.country",
2096
+ "Place.description",
2097
+ "Place.name",
2098
+ "Place.parentId",
2099
+ "Place.postalCode",
2100
+ "Place.region",
2101
+ "Place.streetName",
2102
+ "Place.streetNumber",
2103
+ "Place.typeId",
2104
+ "PlaceType.description",
2105
+ "PlaceType.name"
2106
+ ]
2107
+ },
2108
+ "demo": {
2109
+ "mode": "server",
2110
+ "reasons": [
2111
+ "Needs a server because its package does not build for a browser: geo -> cache -> redis, node:zlib; url-signature node:crypto; and its package depends on @happyvertical/smrt-tenancy, which do not build for a browser (#3624, #3627)."
2112
+ ]
2113
+ }
2114
+ }
2115
+ ],
1940
2116
  "browser": {
1941
2117
  "status": "server-only",
1942
2118
  "issues": [