@happyvertical/smrt-fields 0.40.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,501 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "timestamp": 0,
4
+ "packageName": "@happyvertical/smrt-fields",
5
+ "packageVersion": "0.40.57",
6
+ "objects": {
7
+ "@happyvertical/smrt-fields:FieldPolicyCollection": {
8
+ "name": "fieldpolicycollection",
9
+ "className": "FieldPolicyCollection",
10
+ "qualifiedName": "@happyvertical/smrt-fields:FieldPolicyCollection",
11
+ "collection": "fieldpolicies",
12
+ "filePath": "/home/runner/_work/smrt/smrt/packages/fields/src/collections/FieldPolicyCollection.ts",
13
+ "packageName": "@happyvertical/smrt-fields",
14
+ "fields": {},
15
+ "methods": {
16
+ "getAppRows": {
17
+ "name": "getAppRows",
18
+ "async": true,
19
+ "parameters": [
20
+ {
21
+ "name": "objectRef",
22
+ "type": "string",
23
+ "optional": false
24
+ }
25
+ ],
26
+ "returnType": "Promise<Map<string, FieldPolicy>>",
27
+ "isStatic": false,
28
+ "isPublic": true
29
+ },
30
+ "getTenantRows": {
31
+ "name": "getTenantRows",
32
+ "async": true,
33
+ "parameters": [
34
+ {
35
+ "name": "objectRef",
36
+ "type": "string",
37
+ "optional": false
38
+ },
39
+ {
40
+ "name": "tenantIds",
41
+ "type": "string[]",
42
+ "optional": false
43
+ }
44
+ ],
45
+ "returnType": "Promise<Map<string, Map<string, FieldPolicy>>>",
46
+ "isStatic": false,
47
+ "isPublic": true
48
+ },
49
+ "getUserRows": {
50
+ "name": "getUserRows",
51
+ "async": true,
52
+ "parameters": [
53
+ {
54
+ "name": "objectRef",
55
+ "type": "string",
56
+ "optional": false
57
+ },
58
+ {
59
+ "name": "userId",
60
+ "type": "string",
61
+ "optional": false
62
+ }
63
+ ],
64
+ "returnType": "Promise<Map<string, FieldPolicy>>",
65
+ "isStatic": false,
66
+ "isPublic": true
67
+ },
68
+ "resolveBatch": {
69
+ "name": "resolveBatch",
70
+ "async": true,
71
+ "parameters": [
72
+ {
73
+ "name": "options",
74
+ "type": "object",
75
+ "optional": true
76
+ }
77
+ ],
78
+ "returnType": "Promise<FieldPolicyBatchResult>",
79
+ "isStatic": false,
80
+ "isPublic": true
81
+ }
82
+ },
83
+ "decoratorConfig": {
84
+ "conflictColumns": [
85
+ "object_ref",
86
+ "field_name",
87
+ "scope_type",
88
+ "scope_key"
89
+ ],
90
+ "api": {
91
+ "include": [
92
+ "create",
93
+ "update",
94
+ "delete",
95
+ "resolveBatch"
96
+ ],
97
+ "routes": {
98
+ "resolveBatch": {
99
+ "scope": "collection",
100
+ "method": "POST",
101
+ "path": "resolve"
102
+ }
103
+ }
104
+ },
105
+ "cli": false,
106
+ "mcp": false,
107
+ "tableName": "_smrt_field_policies"
108
+ },
109
+ "extends": "SmrtCollection",
110
+ "extendsTypeArg": "FieldPolicy",
111
+ "exportName": "FieldPolicyCollection",
112
+ "collectionExportName": "FieldPolicyCollectionCollection",
113
+ "schema": {
114
+ "tableName": "_smrt_field_policies",
115
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_field_policies\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
116
+ "columns": {
117
+ "id": {
118
+ "type": "UUID",
119
+ "primaryKey": true,
120
+ "referenceKind": "id",
121
+ "notNull": true
122
+ },
123
+ "slug": {
124
+ "type": "TEXT",
125
+ "notNull": true
126
+ },
127
+ "context": {
128
+ "type": "TEXT",
129
+ "notNull": true,
130
+ "default": ""
131
+ },
132
+ "created_at": {
133
+ "type": "TIMESTAMP",
134
+ "notNull": true,
135
+ "default": "current_timestamp"
136
+ },
137
+ "updated_at": {
138
+ "type": "TIMESTAMP",
139
+ "notNull": true,
140
+ "default": "current_timestamp"
141
+ }
142
+ },
143
+ "indexes": [
144
+ {
145
+ "name": "_smrt_field_policies_id_idx",
146
+ "columns": [
147
+ "id"
148
+ ]
149
+ },
150
+ {
151
+ "name": "_smrt_field_policies_object_ref_field_name_idx",
152
+ "columns": [
153
+ "object_ref",
154
+ "field_name",
155
+ "scope_type",
156
+ "scope_key"
157
+ ],
158
+ "unique": true
159
+ }
160
+ ],
161
+ "version": "13aa748c"
162
+ }
163
+ },
164
+ "@happyvertical/smrt-fields:FieldPolicy": {
165
+ "name": "fieldpolicy",
166
+ "className": "FieldPolicy",
167
+ "qualifiedName": "@happyvertical/smrt-fields:FieldPolicy",
168
+ "collection": "fieldpolicies",
169
+ "filePath": "/home/runner/_work/smrt/smrt/packages/fields/src/models/FieldPolicy.ts",
170
+ "packageName": "@happyvertical/smrt-fields",
171
+ "fields": {
172
+ "objectRef": {
173
+ "type": "text",
174
+ "required": true,
175
+ "default": "",
176
+ "_meta": {
177
+ "required": true
178
+ }
179
+ },
180
+ "fieldName": {
181
+ "type": "text",
182
+ "required": true,
183
+ "default": "",
184
+ "_meta": {
185
+ "required": true
186
+ }
187
+ },
188
+ "scopeType": {
189
+ "type": "text",
190
+ "required": true,
191
+ "default": "app",
192
+ "_meta": {
193
+ "required": true
194
+ }
195
+ },
196
+ "tenantId": {
197
+ "type": "text",
198
+ "required": false,
199
+ "_meta": {
200
+ "sqlType": "UUID",
201
+ "nullable": true,
202
+ "__tenancy": {
203
+ "isTenantIdField": true,
204
+ "autoFilter": true,
205
+ "required": false,
206
+ "autoPopulate": true,
207
+ "nullable": true
208
+ }
209
+ }
210
+ },
211
+ "userId": {
212
+ "type": "crossPackageRef",
213
+ "required": false,
214
+ "related": "@happyvertical/smrt-users:User",
215
+ "_meta": {
216
+ "nullable": true
217
+ }
218
+ },
219
+ "scopeKey": {
220
+ "type": "text",
221
+ "required": true,
222
+ "_meta": {
223
+ "required": true
224
+ }
225
+ },
226
+ "defaultValue": {
227
+ "type": "text",
228
+ "required": false,
229
+ "_meta": {
230
+ "nullable": true
231
+ }
232
+ },
233
+ "visibility": {
234
+ "type": "text",
235
+ "required": false,
236
+ "_meta": {
237
+ "nullable": true
238
+ }
239
+ },
240
+ "help": {
241
+ "type": "text",
242
+ "required": false,
243
+ "_meta": {
244
+ "nullable": true
245
+ }
246
+ },
247
+ "label": {
248
+ "type": "text",
249
+ "required": false,
250
+ "_meta": {
251
+ "nullable": true
252
+ }
253
+ },
254
+ "displayOrder": {
255
+ "type": "integer",
256
+ "required": false,
257
+ "_meta": {
258
+ "nullable": true
259
+ }
260
+ },
261
+ "locked": {
262
+ "type": "boolean",
263
+ "required": false,
264
+ "_meta": {
265
+ "nullable": true
266
+ }
267
+ },
268
+ "updatedBy": {
269
+ "type": "crossPackageRef",
270
+ "required": false,
271
+ "related": "@happyvertical/smrt-users:User",
272
+ "_meta": {
273
+ "nullable": true
274
+ }
275
+ }
276
+ },
277
+ "methods": {
278
+ "getDefaultValue": {
279
+ "name": "getDefaultValue",
280
+ "async": false,
281
+ "parameters": [],
282
+ "returnType": "any",
283
+ "isStatic": false,
284
+ "isPublic": true
285
+ },
286
+ "setDefaultValue": {
287
+ "name": "setDefaultValue",
288
+ "async": false,
289
+ "parameters": [
290
+ {
291
+ "name": "value",
292
+ "type": "any",
293
+ "optional": false
294
+ }
295
+ ],
296
+ "returnType": "void",
297
+ "isStatic": false,
298
+ "isPublic": true
299
+ },
300
+ "save": {
301
+ "name": "save",
302
+ "async": true,
303
+ "parameters": [],
304
+ "returnType": "Promise",
305
+ "isStatic": false,
306
+ "isPublic": true
307
+ },
308
+ "delete": {
309
+ "name": "delete",
310
+ "async": true,
311
+ "parameters": [],
312
+ "returnType": "Promise<void>",
313
+ "isStatic": false,
314
+ "isPublic": true
315
+ }
316
+ },
317
+ "decoratorConfig": {
318
+ "tableName": "_smrt_field_policies",
319
+ "conflictColumns": [
320
+ "object_ref",
321
+ "field_name",
322
+ "scope_type",
323
+ "scope_key"
324
+ ],
325
+ "api": {
326
+ "include": [
327
+ "create",
328
+ "update",
329
+ "delete"
330
+ ]
331
+ },
332
+ "cli": {
333
+ "include": [
334
+ "create",
335
+ "update",
336
+ "delete"
337
+ ],
338
+ "exclude": [
339
+ "getDefaultValue",
340
+ "setDefaultValue"
341
+ ]
342
+ },
343
+ "mcp": {
344
+ "include": []
345
+ }
346
+ },
347
+ "extends": "SmrtObject",
348
+ "exportName": "FieldPolicy",
349
+ "collectionExportName": "FieldPolicyCollection",
350
+ "validationRules": [
351
+ {
352
+ "field": "objectRef",
353
+ "rule": "required",
354
+ "fieldType": "text"
355
+ },
356
+ {
357
+ "field": "fieldName",
358
+ "rule": "required",
359
+ "fieldType": "text"
360
+ },
361
+ {
362
+ "field": "scopeType",
363
+ "rule": "required",
364
+ "fieldType": "text"
365
+ },
366
+ {
367
+ "field": "scopeKey",
368
+ "rule": "required",
369
+ "fieldType": "text"
370
+ }
371
+ ],
372
+ "schema": {
373
+ "tableName": "_smrt_field_policies",
374
+ "ddl": "CREATE TABLE IF NOT EXISTS \"_smrt_field_policies\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"object_ref\" TEXT NOT NULL DEFAULT '',\n \"field_name\" TEXT NOT NULL DEFAULT '',\n \"scope_type\" TEXT NOT NULL DEFAULT 'app',\n \"tenant_id\" UUID,\n \"user_id\" UUID,\n \"scope_key\" TEXT NOT NULL,\n \"default_value\" TEXT,\n \"visibility\" TEXT,\n \"help\" TEXT,\n \"label\" TEXT,\n \"display_order\" INTEGER,\n \"locked\" BOOLEAN,\n \"updated_by\" UUID\n);",
375
+ "columns": {
376
+ "id": {
377
+ "type": "UUID",
378
+ "primaryKey": true,
379
+ "referenceKind": "id",
380
+ "notNull": true
381
+ },
382
+ "slug": {
383
+ "type": "TEXT",
384
+ "notNull": true
385
+ },
386
+ "context": {
387
+ "type": "TEXT",
388
+ "notNull": true,
389
+ "default": ""
390
+ },
391
+ "created_at": {
392
+ "type": "TIMESTAMP",
393
+ "notNull": true,
394
+ "default": "current_timestamp"
395
+ },
396
+ "updated_at": {
397
+ "type": "TIMESTAMP",
398
+ "notNull": true,
399
+ "default": "current_timestamp"
400
+ },
401
+ "object_ref": {
402
+ "type": "TEXT",
403
+ "notNull": true,
404
+ "unique": false,
405
+ "default": ""
406
+ },
407
+ "field_name": {
408
+ "type": "TEXT",
409
+ "notNull": true,
410
+ "unique": false,
411
+ "default": ""
412
+ },
413
+ "scope_type": {
414
+ "type": "TEXT",
415
+ "notNull": true,
416
+ "unique": false,
417
+ "default": "app"
418
+ },
419
+ "tenant_id": {
420
+ "type": "UUID",
421
+ "referenceKind": "tenantId",
422
+ "notNull": false,
423
+ "unique": false
424
+ },
425
+ "user_id": {
426
+ "type": "UUID",
427
+ "referenceKind": "crossPackageRef",
428
+ "notNull": false,
429
+ "unique": false
430
+ },
431
+ "scope_key": {
432
+ "type": "TEXT",
433
+ "notNull": true,
434
+ "unique": false
435
+ },
436
+ "default_value": {
437
+ "type": "TEXT",
438
+ "notNull": false,
439
+ "unique": false
440
+ },
441
+ "visibility": {
442
+ "type": "TEXT",
443
+ "notNull": false,
444
+ "unique": false
445
+ },
446
+ "help": {
447
+ "type": "TEXT",
448
+ "notNull": false,
449
+ "unique": false
450
+ },
451
+ "label": {
452
+ "type": "TEXT",
453
+ "notNull": false,
454
+ "unique": false
455
+ },
456
+ "display_order": {
457
+ "type": "INTEGER",
458
+ "notNull": false,
459
+ "unique": false
460
+ },
461
+ "locked": {
462
+ "type": "BOOLEAN",
463
+ "notNull": false,
464
+ "unique": false
465
+ },
466
+ "updated_by": {
467
+ "type": "UUID",
468
+ "referenceKind": "crossPackageRef",
469
+ "notNull": false,
470
+ "unique": false
471
+ }
472
+ },
473
+ "indexes": [
474
+ {
475
+ "name": "_smrt_field_policies_id_idx",
476
+ "columns": [
477
+ "id"
478
+ ]
479
+ },
480
+ {
481
+ "name": "_smrt_field_policies_object_ref_field_name_idx",
482
+ "columns": [
483
+ "object_ref",
484
+ "field_name",
485
+ "scope_type",
486
+ "scope_key"
487
+ ],
488
+ "unique": true
489
+ }
490
+ ],
491
+ "version": "34b355cc"
492
+ }
493
+ }
494
+ },
495
+ "moduleType": "smrt",
496
+ "smrtDependencies": [
497
+ "@happyvertical/smrt-core",
498
+ "@happyvertical/smrt-tenancy",
499
+ "@happyvertical/smrt-users"
500
+ ]
501
+ }