@happyvertical/smrt-secrets 0.51.11 → 0.51.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,12 +3,12 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-secrets",
6
- "packageVersion": "0.51.11",
6
+ "packageVersion": "0.51.14",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "8f527b261f795cb126da0999c13167e2a1605fe61b77a9f6da0fdec5bece53ad",
11
- "packageJson": "aa9895d5d82b979470ad275e2cad09d13c557d5778451200a60c9a3632a98893",
10
+ "manifest": "69ba17efc3f1de9426e83cc31b838d3011e147355049da177e4b0496d12fd2ef",
11
+ "packageJson": "ac2d18c7b5c3438aa2b4fa609671511601d399529174d7a36f6c055d262d39a3",
12
12
  "agents": "96fe8095cb8a2673fb8752fdc2940b53ce09d83c42715396ba6812ce215e990b"
13
13
  },
14
14
  "exports": [
@@ -26,7 +26,7 @@
26
26
  "@happyvertical/sql": "catalog:",
27
27
  "@happyvertical/utils": "catalog:",
28
28
  "@happyvertical/smrt-vitest": "workspace:*",
29
- "@types/node": "24.13.2",
29
+ "@types/node": "24.13.6",
30
30
  "typescript": "5.9.3",
31
31
  "vite": "8.1.4",
32
32
  "vitest": "4.1.10"
@@ -57,516 +57,554 @@
57
57
  ],
58
58
  "objects": [
59
59
  {
60
- "name": "SecretAuditLogCollection",
61
- "qualifiedName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
62
- "collection": "secretauditlogs",
63
- "tableName": "secret_audit_logs",
60
+ "name": "Secret",
61
+ "qualifiedName": "@happyvertical/smrt-secrets:Secret",
62
+ "collection": "secrets",
63
+ "tableName": "secrets",
64
64
  "packageName": "@happyvertical/smrt-secrets",
65
- "extends": "SmrtCollection",
66
- "fields": [],
67
- "relationships": [],
68
- "methods": [
69
- "cleanup",
70
- "countByAction",
71
- "countByResult",
72
- "getRecentDenials",
73
- "getRecentFailures",
74
- "getSecretHistory",
75
- "getUserActivity",
76
- "listLogs"
77
- ],
78
- "methodSignatures": [
65
+ "extends": "SmrtObject",
66
+ "fields": [
79
67
  {
80
- "name": "cleanup",
81
- "async": true,
82
- "params": [
83
- "olderThanDays?: number"
84
- ],
85
- "returns": "Promise<number>"
68
+ "name": "tenantId",
69
+ "type": "text",
70
+ "required": false,
71
+ "columnType": "UUID",
72
+ "default": ""
86
73
  },
87
74
  {
88
- "name": "countByAction",
89
- "async": true,
90
- "params": [
91
- "tenantId: string | null",
92
- "since?: Date"
93
- ],
94
- "returns": "Promise<Record<SecretAuditAction, number>>"
75
+ "name": "name",
76
+ "type": "text",
77
+ "required": false,
78
+ "columnType": "TEXT",
79
+ "default": ""
95
80
  },
96
81
  {
97
- "name": "countByResult",
98
- "async": true,
99
- "params": [
100
- "tenantId: string | null",
101
- "since?: Date"
102
- ],
103
- "returns": "Promise<Record<SecretAuditResult, number>>"
82
+ "name": "description",
83
+ "type": "text",
84
+ "required": false,
85
+ "columnType": "TEXT",
86
+ "default": ""
104
87
  },
105
88
  {
106
- "name": "getRecentDenials",
107
- "async": true,
108
- "params": [
109
- "tenantId: string | null",
110
- "limit?: number"
111
- ],
112
- "returns": "Promise<SecretAuditLog[]>"
89
+ "name": "category",
90
+ "type": "text",
91
+ "required": false,
92
+ "columnType": "TEXT",
93
+ "default": ""
113
94
  },
114
95
  {
115
- "name": "getRecentFailures",
116
- "async": true,
117
- "params": [
118
- "tenantId: string | null",
119
- "limit?: number"
120
- ],
121
- "returns": "Promise<SecretAuditLog[]>"
96
+ "name": "encryptedValue",
97
+ "type": "text",
98
+ "required": false,
99
+ "columnType": "TEXT",
100
+ "default": ""
122
101
  },
123
102
  {
124
- "name": "getSecretHistory",
125
- "async": true,
126
- "params": [
127
- "tenantId: string | null",
128
- "secretName: string",
129
- "limit?: number"
130
- ],
131
- "returns": "Promise<SecretAuditLog[]>"
103
+ "name": "keyVersion",
104
+ "type": "integer",
105
+ "required": false,
106
+ "columnType": "INTEGER",
107
+ "default": 1
132
108
  },
133
109
  {
134
- "name": "getUserActivity",
135
- "async": true,
136
- "params": [
137
- "tenantId: string | null",
138
- "userId: string",
139
- "limit?: number"
140
- ],
141
- "returns": "Promise<SecretAuditLog[]>"
110
+ "name": "status",
111
+ "type": "text",
112
+ "required": false,
113
+ "columnType": "TEXT",
114
+ "default": "active"
142
115
  },
143
116
  {
144
- "name": "listLogs",
145
- "async": true,
146
- "params": [
147
- "options?: ListAuditLogsOptions"
148
- ],
149
- "returns": "Promise<SecretAuditLog[]>"
150
- }
151
- ],
152
- "surfaces": [
153
- {
154
- "kind": "api",
155
- "name": "secretauditlogs.listLogs",
156
- "operation": "listLogs",
157
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
158
- "path": "/secretauditlogs/listLogs",
159
- "method": "POST"
117
+ "name": "expiresAt",
118
+ "type": "datetime",
119
+ "required": false,
120
+ "columnType": "TIMESTAMP"
160
121
  },
161
122
  {
162
- "kind": "api",
163
- "name": "secretauditlogs.getSecretHistory",
164
- "operation": "getSecretHistory",
165
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
166
- "path": "/secretauditlogs/getSecretHistory",
167
- "method": "POST"
123
+ "name": "lastAccessedAt",
124
+ "type": "datetime",
125
+ "required": false,
126
+ "columnType": "TIMESTAMP"
168
127
  },
169
128
  {
170
- "kind": "api",
171
- "name": "secretauditlogs.getUserActivity",
172
- "operation": "getUserActivity",
173
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
174
- "path": "/secretauditlogs/getUserActivity",
175
- "method": "POST"
129
+ "name": "accessCount",
130
+ "type": "integer",
131
+ "required": false,
132
+ "columnType": "INTEGER",
133
+ "default": 0
176
134
  },
177
135
  {
178
- "kind": "api",
179
- "name": "secretauditlogs.getRecentFailures",
180
- "operation": "getRecentFailures",
181
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
182
- "path": "/secretauditlogs/getRecentFailures",
183
- "method": "POST"
184
- },
136
+ "name": "metadata",
137
+ "type": "json",
138
+ "required": false,
139
+ "columnType": "JSON",
140
+ "default": {}
141
+ }
142
+ ],
143
+ "relationships": [],
144
+ "methods": [
145
+ "disable",
146
+ "enable",
147
+ "isActive",
148
+ "isExpired",
149
+ "isUsable",
150
+ "recordAccess"
151
+ ],
152
+ "methodSignatures": [
185
153
  {
186
- "kind": "api",
187
- "name": "secretauditlogs.getRecentDenials",
188
- "operation": "getRecentDenials",
189
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
190
- "path": "/secretauditlogs/getRecentDenials",
191
- "method": "POST"
154
+ "name": "disable",
155
+ "returns": "void"
192
156
  },
193
157
  {
194
- "kind": "api",
195
- "name": "secretauditlogs.countByAction",
196
- "operation": "countByAction",
197
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
198
- "path": "/secretauditlogs/countByAction",
199
- "method": "POST"
158
+ "name": "enable",
159
+ "returns": "void"
200
160
  },
201
161
  {
202
- "kind": "api",
203
- "name": "secretauditlogs.countByResult",
204
- "operation": "countByResult",
205
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
206
- "path": "/secretauditlogs/countByResult",
207
- "method": "POST"
162
+ "name": "isActive",
163
+ "returns": "boolean"
208
164
  },
209
165
  {
210
- "kind": "api",
211
- "name": "secretauditlogs.cleanup",
212
- "operation": "cleanup",
213
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
214
- "path": "/secretauditlogs/cleanup",
215
- "method": "POST"
166
+ "name": "isExpired",
167
+ "returns": "boolean"
216
168
  },
217
169
  {
218
- "kind": "cli",
219
- "name": "secretauditlogcollection_listLogs",
220
- "operation": "listLogs",
221
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
170
+ "name": "isUsable",
171
+ "returns": "boolean"
222
172
  },
173
+ {
174
+ "name": "recordAccess",
175
+ "returns": "void"
176
+ }
177
+ ],
178
+ "tenant": {
179
+ "scoped": true,
180
+ "mode": "required",
181
+ "field": "tenantId"
182
+ },
183
+ "conflictColumns": [
184
+ "tenant_id",
185
+ "slug",
186
+ "context"
187
+ ],
188
+ "surfaces": [
223
189
  {
224
190
  "kind": "cli",
225
- "name": "secretauditlogcollection_getSecretHistory",
226
- "operation": "getSecretHistory",
227
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
191
+ "name": "secret_list",
192
+ "operation": "list",
193
+ "objectName": "@happyvertical/smrt-secrets:Secret"
194
+ }
195
+ ],
196
+ "withheldSurfaces": [
197
+ {
198
+ "kind": "api",
199
+ "operation": "disable",
200
+ "code": "not-included",
201
+ "reason": "not listed in api.include",
202
+ "objectName": "@happyvertical/smrt-secrets:Secret"
228
203
  },
229
204
  {
230
- "kind": "cli",
231
- "name": "secretauditlogcollection_getUserActivity",
232
- "operation": "getUserActivity",
233
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
205
+ "kind": "api",
206
+ "operation": "enable",
207
+ "code": "not-included",
208
+ "reason": "not listed in api.include",
209
+ "objectName": "@happyvertical/smrt-secrets:Secret"
234
210
  },
235
211
  {
236
- "kind": "cli",
237
- "name": "secretauditlogcollection_getRecentFailures",
238
- "operation": "getRecentFailures",
239
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
212
+ "kind": "api",
213
+ "operation": "isActive",
214
+ "code": "not-included",
215
+ "reason": "not listed in api.include",
216
+ "objectName": "@happyvertical/smrt-secrets:Secret"
240
217
  },
241
218
  {
242
- "kind": "cli",
243
- "name": "secretauditlogcollection_getRecentDenials",
244
- "operation": "getRecentDenials",
245
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
219
+ "kind": "api",
220
+ "operation": "isExpired",
221
+ "code": "not-included",
222
+ "reason": "not listed in api.include",
223
+ "objectName": "@happyvertical/smrt-secrets:Secret"
246
224
  },
247
225
  {
248
- "kind": "cli",
249
- "name": "secretauditlogcollection_countByAction",
250
- "operation": "countByAction",
251
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
226
+ "kind": "api",
227
+ "operation": "isUsable",
228
+ "code": "not-included",
229
+ "reason": "not listed in api.include",
230
+ "objectName": "@happyvertical/smrt-secrets:Secret"
252
231
  },
253
232
  {
254
- "kind": "cli",
255
- "name": "secretauditlogcollection_countByResult",
256
- "operation": "countByResult",
257
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
233
+ "kind": "api",
234
+ "operation": "recordAccess",
235
+ "code": "not-included",
236
+ "reason": "not listed in api.include",
237
+ "objectName": "@happyvertical/smrt-secrets:Secret"
238
+ }
239
+ ],
240
+ "relationshipFeatures": [
241
+ "uuidColumns"
242
+ ],
243
+ "tags": [],
244
+ "risks": []
245
+ },
246
+ {
247
+ "name": "SecretAuditLog",
248
+ "qualifiedName": "@happyvertical/smrt-secrets:SecretAuditLog",
249
+ "collection": "secretauditlogs",
250
+ "tableName": "secret_audit_logs",
251
+ "packageName": "@happyvertical/smrt-secrets",
252
+ "extends": "SmrtObject",
253
+ "fields": [
254
+ {
255
+ "name": "tenantId",
256
+ "type": "text",
257
+ "required": false,
258
+ "columnType": "UUID"
258
259
  },
259
260
  {
260
- "kind": "cli",
261
- "name": "secretauditlogcollection_cleanup",
262
- "operation": "cleanup",
263
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
261
+ "name": "secretId",
262
+ "type": "foreignKey",
263
+ "required": false,
264
+ "related": "Secret",
265
+ "columnType": "UUID"
264
266
  },
265
267
  {
266
- "kind": "mcp",
267
- "name": "secretauditlogcollection_listlogs",
268
- "operation": "listLogs",
269
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
268
+ "name": "secretName",
269
+ "type": "text",
270
+ "required": false,
271
+ "columnType": "TEXT",
272
+ "default": ""
270
273
  },
271
274
  {
272
- "kind": "mcp",
273
- "name": "secretauditlogcollection_getsecrethistory",
274
- "operation": "getSecretHistory",
275
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
275
+ "name": "userId",
276
+ "type": "crossPackageRef",
277
+ "required": false,
278
+ "related": "@happyvertical/smrt-users:User",
279
+ "columnType": "UUID"
276
280
  },
277
281
  {
278
- "kind": "mcp",
279
- "name": "secretauditlogcollection_getuseractivity",
280
- "operation": "getUserActivity",
281
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
282
+ "name": "action",
283
+ "type": "text",
284
+ "required": false,
285
+ "columnType": "TEXT",
286
+ "default": "read"
282
287
  },
283
288
  {
284
- "kind": "mcp",
285
- "name": "secretauditlogcollection_getrecentfailures",
286
- "operation": "getRecentFailures",
287
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
289
+ "name": "result",
290
+ "type": "text",
291
+ "required": false,
292
+ "columnType": "TEXT",
293
+ "default": "success"
288
294
  },
289
295
  {
290
- "kind": "mcp",
291
- "name": "secretauditlogcollection_getrecentdenials",
292
- "operation": "getRecentDenials",
293
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
296
+ "name": "ipAddress",
297
+ "type": "text",
298
+ "required": false,
299
+ "columnType": "TEXT",
300
+ "default": ""
294
301
  },
295
302
  {
296
- "kind": "mcp",
297
- "name": "secretauditlogcollection_countbyaction",
298
- "operation": "countByAction",
299
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
303
+ "name": "userAgent",
304
+ "type": "text",
305
+ "required": false,
306
+ "columnType": "TEXT",
307
+ "default": ""
300
308
  },
301
309
  {
302
- "kind": "mcp",
303
- "name": "secretauditlogcollection_countbyresult",
304
- "operation": "countByResult",
305
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
310
+ "name": "details",
311
+ "type": "json",
312
+ "required": false,
313
+ "columnType": "JSON",
314
+ "default": {}
315
+ }
316
+ ],
317
+ "relationships": [
318
+ {
319
+ "name": "secretId",
320
+ "type": "foreignKey",
321
+ "required": false,
322
+ "related": "Secret",
323
+ "columnType": "UUID"
306
324
  },
307
325
  {
308
- "kind": "mcp",
309
- "name": "secretauditlogcollection_cleanup",
310
- "operation": "cleanup",
311
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
326
+ "name": "userId",
327
+ "type": "crossPackageRef",
328
+ "required": false,
329
+ "related": "@happyvertical/smrt-users:User",
330
+ "columnType": "UUID"
312
331
  }
313
332
  ],
314
- "relationshipFeatures": [
315
- "uuidColumns"
316
- ],
317
- "tags": [],
318
- "risks": []
319
- },
320
- {
321
- "name": "SecretCollection",
322
- "qualifiedName": "@happyvertical/smrt-secrets:SecretCollection",
323
- "collection": "secrets",
324
- "tableName": "secrets",
325
- "packageName": "@happyvertical/smrt-secrets",
326
- "extends": "SmrtCollection",
327
- "fields": [],
328
- "relationships": [],
329
333
  "methods": [
330
- "countByStatus",
331
- "deleteByName",
332
- "findByName",
333
- "getCategories",
334
- "listActive",
335
- "listByCategory",
336
- "listExpiring",
337
- "listSecrets"
334
+ "isDenied",
335
+ "isFailure",
336
+ "isKeyOperation",
337
+ "isReadAction",
338
+ "isSuccess",
339
+ "isWriteAction"
338
340
  ],
339
341
  "methodSignatures": [
340
342
  {
341
- "name": "countByStatus",
342
- "async": true,
343
- "params": [
344
- "tenantId: string"
345
- ],
346
- "returns": "Promise<Record<SecretStatus, number>>"
347
- },
348
- {
349
- "name": "deleteByName",
350
- "async": true,
351
- "params": [
352
- "tenantId: string",
353
- "name: string"
354
- ],
355
- "returns": "Promise<boolean>"
356
- },
357
- {
358
- "name": "findByName",
359
- "async": true,
360
- "params": [
361
- "tenantId: string",
362
- "name: string"
363
- ],
364
- "returns": "Promise<Secret | null>"
343
+ "name": "isDenied",
344
+ "returns": "boolean"
365
345
  },
366
346
  {
367
- "name": "getCategories",
368
- "async": true,
369
- "params": [
370
- "tenantId: string"
371
- ],
372
- "returns": "Promise<string[]>"
347
+ "name": "isFailure",
348
+ "returns": "boolean"
373
349
  },
374
350
  {
375
- "name": "listActive",
376
- "async": true,
377
- "params": [
378
- "tenantId: string"
379
- ],
380
- "returns": "Promise<Secret[]>"
351
+ "name": "isKeyOperation",
352
+ "returns": "boolean"
381
353
  },
382
354
  {
383
- "name": "listByCategory",
384
- "async": true,
385
- "params": [
386
- "tenantId: string",
387
- "category: string"
388
- ],
389
- "returns": "Promise<Secret[]>"
355
+ "name": "isReadAction",
356
+ "returns": "boolean"
390
357
  },
391
358
  {
392
- "name": "listExpiring",
393
- "async": true,
394
- "params": [
395
- "tenantId: string",
396
- "daysAhead?: number"
397
- ],
398
- "returns": "Promise<Secret[]>"
359
+ "name": "isSuccess",
360
+ "returns": "boolean"
399
361
  },
400
362
  {
401
- "name": "listSecrets",
402
- "async": true,
403
- "params": [
404
- "tenantId: string",
405
- "options?: ListSecretsOptions"
406
- ],
407
- "returns": "Promise<Secret[]>"
363
+ "name": "isWriteAction",
364
+ "returns": "boolean"
408
365
  }
409
366
  ],
367
+ "tenant": {
368
+ "scoped": true,
369
+ "mode": "required",
370
+ "field": "tenantId"
371
+ },
372
+ "conflictColumns": [
373
+ "tenant_id",
374
+ "slug",
375
+ "context"
376
+ ],
410
377
  "surfaces": [
378
+ {
379
+ "kind": "cli",
380
+ "name": "secretauditlog_list",
381
+ "operation": "list",
382
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLog"
383
+ }
384
+ ],
385
+ "withheldSurfaces": [
411
386
  {
412
387
  "kind": "api",
413
- "name": "secrets.findByName",
414
- "operation": "findByName",
415
- "objectName": "@happyvertical/smrt-secrets:SecretCollection",
416
- "path": "/secrets/findByName",
417
- "method": "POST"
388
+ "operation": "isDenied",
389
+ "code": "not-included",
390
+ "reason": "not listed in api.include",
391
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLog"
418
392
  },
419
393
  {
420
394
  "kind": "api",
421
- "name": "secrets.listSecrets",
422
- "operation": "listSecrets",
423
- "objectName": "@happyvertical/smrt-secrets:SecretCollection",
424
- "path": "/secrets/listSecrets",
425
- "method": "POST"
395
+ "operation": "isFailure",
396
+ "code": "not-included",
397
+ "reason": "not listed in api.include",
398
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLog"
426
399
  },
427
400
  {
428
401
  "kind": "api",
429
- "name": "secrets.listActive",
430
- "operation": "listActive",
431
- "objectName": "@happyvertical/smrt-secrets:SecretCollection",
432
- "path": "/secrets/listActive",
433
- "method": "POST"
402
+ "operation": "isKeyOperation",
403
+ "code": "not-included",
404
+ "reason": "not listed in api.include",
405
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLog"
434
406
  },
435
407
  {
436
408
  "kind": "api",
437
- "name": "secrets.listByCategory",
438
- "operation": "listByCategory",
439
- "objectName": "@happyvertical/smrt-secrets:SecretCollection",
440
- "path": "/secrets/listByCategory",
441
- "method": "POST"
409
+ "operation": "isReadAction",
410
+ "code": "not-included",
411
+ "reason": "not listed in api.include",
412
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLog"
442
413
  },
443
414
  {
444
415
  "kind": "api",
445
- "name": "secrets.listExpiring",
446
- "operation": "listExpiring",
447
- "objectName": "@happyvertical/smrt-secrets:SecretCollection",
448
- "path": "/secrets/listExpiring",
449
- "method": "POST"
416
+ "operation": "isSuccess",
417
+ "code": "not-included",
418
+ "reason": "not listed in api.include",
419
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLog"
420
+ },
421
+ {
422
+ "kind": "api",
423
+ "operation": "isWriteAction",
424
+ "code": "not-included",
425
+ "reason": "not listed in api.include",
426
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLog"
427
+ }
428
+ ],
429
+ "relationshipFeatures": [
430
+ "crossPackageRef",
431
+ "foreignKey",
432
+ "uuidColumns"
433
+ ],
434
+ "tags": [],
435
+ "risks": []
436
+ },
437
+ {
438
+ "name": "TenantKey",
439
+ "qualifiedName": "@happyvertical/smrt-secrets:TenantKey",
440
+ "collection": "tenantkeys",
441
+ "tableName": "tenant_keys",
442
+ "packageName": "@happyvertical/smrt-secrets",
443
+ "extends": "SmrtObject",
444
+ "fields": [
445
+ {
446
+ "name": "tenantId",
447
+ "type": "text",
448
+ "required": false,
449
+ "columnType": "TEXT",
450
+ "default": ""
451
+ },
452
+ {
453
+ "name": "wrappedKey",
454
+ "type": "text",
455
+ "required": false,
456
+ "columnType": "TEXT",
457
+ "default": ""
458
+ },
459
+ {
460
+ "name": "amkKeyId",
461
+ "type": "text",
462
+ "required": false,
463
+ "columnType": "TEXT",
464
+ "default": ""
465
+ },
466
+ {
467
+ "name": "status",
468
+ "type": "text",
469
+ "required": false,
470
+ "columnType": "TEXT",
471
+ "default": "active"
450
472
  },
451
473
  {
452
- "kind": "api",
453
- "name": "secrets.getCategories",
454
- "operation": "getCategories",
455
- "objectName": "@happyvertical/smrt-secrets:SecretCollection",
456
- "path": "/secrets/getCategories",
457
- "method": "POST"
474
+ "name": "version",
475
+ "type": "integer",
476
+ "required": false,
477
+ "columnType": "INTEGER",
478
+ "default": 1
458
479
  },
459
480
  {
460
- "kind": "api",
461
- "name": "secrets.countByStatus",
462
- "operation": "countByStatus",
463
- "objectName": "@happyvertical/smrt-secrets:SecretCollection",
464
- "path": "/secrets/countByStatus",
465
- "method": "POST"
481
+ "name": "rotateAfter",
482
+ "type": "datetime",
483
+ "required": false,
484
+ "columnType": "TIMESTAMP"
466
485
  },
467
486
  {
468
- "kind": "api",
469
- "name": "secrets.deleteByName",
470
- "operation": "deleteByName",
471
- "objectName": "@happyvertical/smrt-secrets:SecretCollection",
472
- "path": "/secrets/deleteByName",
473
- "method": "POST"
487
+ "name": "retiredAt",
488
+ "type": "datetime",
489
+ "required": false,
490
+ "columnType": "TIMESTAMP"
491
+ }
492
+ ],
493
+ "relationships": [],
494
+ "methods": [
495
+ "canDecrypt",
496
+ "canEncrypt",
497
+ "isActive",
498
+ "isCompromised",
499
+ "isRetired",
500
+ "markCompromised",
501
+ "needsRotation",
502
+ "retire"
503
+ ],
504
+ "methodSignatures": [
505
+ {
506
+ "name": "canDecrypt",
507
+ "returns": "boolean"
474
508
  },
475
509
  {
476
- "kind": "cli",
477
- "name": "secretcollection_findByName",
478
- "operation": "findByName",
479
- "objectName": "@happyvertical/smrt-secrets:SecretCollection"
510
+ "name": "canEncrypt",
511
+ "returns": "boolean"
480
512
  },
481
513
  {
482
- "kind": "cli",
483
- "name": "secretcollection_listSecrets",
484
- "operation": "listSecrets",
485
- "objectName": "@happyvertical/smrt-secrets:SecretCollection"
514
+ "name": "isActive",
515
+ "returns": "boolean"
486
516
  },
487
517
  {
488
- "kind": "cli",
489
- "name": "secretcollection_listActive",
490
- "operation": "listActive",
491
- "objectName": "@happyvertical/smrt-secrets:SecretCollection"
518
+ "name": "isCompromised",
519
+ "returns": "boolean"
492
520
  },
493
521
  {
494
- "kind": "cli",
495
- "name": "secretcollection_listByCategory",
496
- "operation": "listByCategory",
497
- "objectName": "@happyvertical/smrt-secrets:SecretCollection"
522
+ "name": "isRetired",
523
+ "returns": "boolean"
498
524
  },
499
525
  {
500
- "kind": "cli",
501
- "name": "secretcollection_listExpiring",
502
- "operation": "listExpiring",
503
- "objectName": "@happyvertical/smrt-secrets:SecretCollection"
526
+ "name": "markCompromised",
527
+ "returns": "void"
504
528
  },
505
529
  {
506
- "kind": "cli",
507
- "name": "secretcollection_getCategories",
508
- "operation": "getCategories",
509
- "objectName": "@happyvertical/smrt-secrets:SecretCollection"
530
+ "name": "needsRotation",
531
+ "returns": "boolean"
510
532
  },
533
+ {
534
+ "name": "retire",
535
+ "returns": "void"
536
+ }
537
+ ],
538
+ "surfaces": [
511
539
  {
512
540
  "kind": "cli",
513
- "name": "secretcollection_countByStatus",
514
- "operation": "countByStatus",
515
- "objectName": "@happyvertical/smrt-secrets:SecretCollection"
541
+ "name": "tenantkey_list",
542
+ "operation": "list",
543
+ "objectName": "@happyvertical/smrt-secrets:TenantKey"
516
544
  },
517
545
  {
518
546
  "kind": "cli",
519
- "name": "secretcollection_deleteByName",
520
- "operation": "deleteByName",
521
- "objectName": "@happyvertical/smrt-secrets:SecretCollection"
522
- },
547
+ "name": "tenantkey_get",
548
+ "operation": "get",
549
+ "objectName": "@happyvertical/smrt-secrets:TenantKey"
550
+ }
551
+ ],
552
+ "withheldSurfaces": [
523
553
  {
524
- "kind": "mcp",
525
- "name": "secretcollection_findbyname",
526
- "operation": "findByName",
527
- "objectName": "@happyvertical/smrt-secrets:SecretCollection"
554
+ "kind": "api",
555
+ "operation": "canDecrypt",
556
+ "code": "not-included",
557
+ "reason": "not listed in api.include",
558
+ "objectName": "@happyvertical/smrt-secrets:TenantKey"
528
559
  },
529
560
  {
530
- "kind": "mcp",
531
- "name": "secretcollection_listsecrets",
532
- "operation": "listSecrets",
533
- "objectName": "@happyvertical/smrt-secrets:SecretCollection"
561
+ "kind": "api",
562
+ "operation": "canEncrypt",
563
+ "code": "not-included",
564
+ "reason": "not listed in api.include",
565
+ "objectName": "@happyvertical/smrt-secrets:TenantKey"
534
566
  },
535
567
  {
536
- "kind": "mcp",
537
- "name": "secretcollection_listactive",
538
- "operation": "listActive",
539
- "objectName": "@happyvertical/smrt-secrets:SecretCollection"
568
+ "kind": "api",
569
+ "operation": "isActive",
570
+ "code": "not-included",
571
+ "reason": "not listed in api.include",
572
+ "objectName": "@happyvertical/smrt-secrets:TenantKey"
540
573
  },
541
574
  {
542
- "kind": "mcp",
543
- "name": "secretcollection_listbycategory",
544
- "operation": "listByCategory",
545
- "objectName": "@happyvertical/smrt-secrets:SecretCollection"
575
+ "kind": "api",
576
+ "operation": "isCompromised",
577
+ "code": "not-included",
578
+ "reason": "not listed in api.include",
579
+ "objectName": "@happyvertical/smrt-secrets:TenantKey"
546
580
  },
547
581
  {
548
- "kind": "mcp",
549
- "name": "secretcollection_listexpiring",
550
- "operation": "listExpiring",
551
- "objectName": "@happyvertical/smrt-secrets:SecretCollection"
582
+ "kind": "api",
583
+ "operation": "isRetired",
584
+ "code": "not-included",
585
+ "reason": "not listed in api.include",
586
+ "objectName": "@happyvertical/smrt-secrets:TenantKey"
552
587
  },
553
588
  {
554
- "kind": "mcp",
555
- "name": "secretcollection_getcategories",
556
- "operation": "getCategories",
557
- "objectName": "@happyvertical/smrt-secrets:SecretCollection"
589
+ "kind": "api",
590
+ "operation": "markCompromised",
591
+ "code": "not-included",
592
+ "reason": "not listed in api.include",
593
+ "objectName": "@happyvertical/smrt-secrets:TenantKey"
558
594
  },
559
595
  {
560
- "kind": "mcp",
561
- "name": "secretcollection_countbystatus",
562
- "operation": "countByStatus",
563
- "objectName": "@happyvertical/smrt-secrets:SecretCollection"
596
+ "kind": "api",
597
+ "operation": "needsRotation",
598
+ "code": "not-included",
599
+ "reason": "not listed in api.include",
600
+ "objectName": "@happyvertical/smrt-secrets:TenantKey"
564
601
  },
565
602
  {
566
- "kind": "mcp",
567
- "name": "secretcollection_deletebyname",
568
- "operation": "deleteByName",
569
- "objectName": "@happyvertical/smrt-secrets:SecretCollection"
603
+ "kind": "api",
604
+ "operation": "retire",
605
+ "code": "not-included",
606
+ "reason": "not listed in api.include",
607
+ "objectName": "@happyvertical/smrt-secrets:TenantKey"
570
608
  }
571
609
  ],
572
610
  "relationshipFeatures": [
@@ -576,27 +614,27 @@
576
614
  "risks": []
577
615
  },
578
616
  {
579
- "name": "TenantKeyCollection",
580
- "qualifiedName": "@happyvertical/smrt-secrets:TenantKeyCollection",
581
- "collection": "tenantkeys",
582
- "tableName": "tenant_keys",
617
+ "name": "SecretAuditLogCollection",
618
+ "qualifiedName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
619
+ "collection": "secretauditlogs",
620
+ "tableName": "secret_audit_logs",
583
621
  "packageName": "@happyvertical/smrt-secrets",
584
622
  "extends": "SmrtCollection",
585
623
  "fields": [],
586
624
  "relationships": [],
587
625
  "methods": [
588
- "cleanupRetiredKeys",
589
- "countByStatus",
590
- "findKeysNeedingRotation",
591
- "getActiveKey",
592
- "getKeyVersion",
593
- "listAllActiveKeys",
594
- "listKeyVersions",
595
- "markCompromised"
626
+ "cleanup",
627
+ "countByAction",
628
+ "countByResult",
629
+ "getRecentDenials",
630
+ "getRecentFailures",
631
+ "getSecretHistory",
632
+ "getUserActivity",
633
+ "listLogs"
596
634
  ],
597
635
  "methodSignatures": [
598
636
  {
599
- "name": "cleanupRetiredKeys",
637
+ "name": "cleanup",
600
638
  "async": true,
601
639
  "params": [
602
640
  "olderThanDays?: number"
@@ -604,772 +642,734 @@
604
642
  "returns": "Promise<number>"
605
643
  },
606
644
  {
607
- "name": "countByStatus",
645
+ "name": "countByAction",
608
646
  "async": true,
609
- "returns": "Promise<Record<TenantKeyStatus, number>>"
647
+ "params": [
648
+ "tenantId: string | null",
649
+ "since?: Date"
650
+ ],
651
+ "returns": "Promise<Record<SecretAuditAction, number>>"
610
652
  },
611
653
  {
612
- "name": "findKeysNeedingRotation",
654
+ "name": "countByResult",
613
655
  "async": true,
614
- "returns": "Promise<TenantKey[]>"
656
+ "params": [
657
+ "tenantId: string | null",
658
+ "since?: Date"
659
+ ],
660
+ "returns": "Promise<Record<SecretAuditResult, number>>"
615
661
  },
616
662
  {
617
- "name": "getActiveKey",
663
+ "name": "getRecentDenials",
618
664
  "async": true,
619
665
  "params": [
620
- "tenantId: string"
666
+ "tenantId: string | null",
667
+ "limit?: number"
621
668
  ],
622
- "returns": "Promise<TenantKey | null>"
669
+ "returns": "Promise<SecretAuditLog[]>"
623
670
  },
624
671
  {
625
- "name": "getKeyVersion",
672
+ "name": "getRecentFailures",
626
673
  "async": true,
627
674
  "params": [
628
- "tenantId: string",
629
- "version: number"
675
+ "tenantId: string | null",
676
+ "limit?: number"
630
677
  ],
631
- "returns": "Promise<TenantKey | null>"
678
+ "returns": "Promise<SecretAuditLog[]>"
632
679
  },
633
680
  {
634
- "name": "listAllActiveKeys",
681
+ "name": "getSecretHistory",
635
682
  "async": true,
636
- "returns": "Promise<TenantKey[]>"
683
+ "params": [
684
+ "tenantId: string | null",
685
+ "secretName: string",
686
+ "limit?: number"
687
+ ],
688
+ "returns": "Promise<SecretAuditLog[]>"
637
689
  },
638
690
  {
639
- "name": "listKeyVersions",
691
+ "name": "getUserActivity",
640
692
  "async": true,
641
693
  "params": [
642
- "tenantId: string"
694
+ "tenantId: string | null",
695
+ "userId: string",
696
+ "limit?: number"
643
697
  ],
644
- "returns": "Promise<TenantKey[]>"
698
+ "returns": "Promise<SecretAuditLog[]>"
645
699
  },
646
700
  {
647
- "name": "markCompromised",
701
+ "name": "listLogs",
648
702
  "async": true,
649
703
  "params": [
650
- "tenantId: string",
651
- "keyId: string"
704
+ "options?: ListAuditLogsOptions"
652
705
  ],
653
- "returns": "Promise<boolean>"
706
+ "returns": "Promise<SecretAuditLog[]>"
654
707
  }
655
708
  ],
656
709
  "surfaces": [
657
710
  {
658
711
  "kind": "api",
659
- "name": "tenantkeys.getActiveKey",
660
- "operation": "getActiveKey",
661
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection",
662
- "path": "/tenantkeys/getActiveKey",
712
+ "name": "secretauditlogs.listLogs",
713
+ "operation": "listLogs",
714
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
715
+ "path": "/secretauditlogs/listLogs",
663
716
  "method": "POST"
664
717
  },
665
718
  {
666
719
  "kind": "api",
667
- "name": "tenantkeys.listKeyVersions",
668
- "operation": "listKeyVersions",
669
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection",
670
- "path": "/tenantkeys/listKeyVersions",
720
+ "name": "secretauditlogs.getSecretHistory",
721
+ "operation": "getSecretHistory",
722
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
723
+ "path": "/secretauditlogs/getSecretHistory",
671
724
  "method": "POST"
672
725
  },
673
726
  {
674
727
  "kind": "api",
675
- "name": "tenantkeys.getKeyVersion",
676
- "operation": "getKeyVersion",
677
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection",
678
- "path": "/tenantkeys/getKeyVersion",
728
+ "name": "secretauditlogs.getUserActivity",
729
+ "operation": "getUserActivity",
730
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
731
+ "path": "/secretauditlogs/getUserActivity",
679
732
  "method": "POST"
680
733
  },
681
734
  {
682
735
  "kind": "api",
683
- "name": "tenantkeys.findKeysNeedingRotation",
684
- "operation": "findKeysNeedingRotation",
685
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection",
686
- "path": "/tenantkeys/findKeysNeedingRotation",
736
+ "name": "secretauditlogs.getRecentFailures",
737
+ "operation": "getRecentFailures",
738
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
739
+ "path": "/secretauditlogs/getRecentFailures",
687
740
  "method": "POST"
688
741
  },
689
742
  {
690
743
  "kind": "api",
691
- "name": "tenantkeys.listAllActiveKeys",
692
- "operation": "listAllActiveKeys",
693
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection",
694
- "path": "/tenantkeys/listAllActiveKeys",
744
+ "name": "secretauditlogs.getRecentDenials",
745
+ "operation": "getRecentDenials",
746
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
747
+ "path": "/secretauditlogs/getRecentDenials",
695
748
  "method": "POST"
696
749
  },
697
750
  {
698
751
  "kind": "api",
699
- "name": "tenantkeys.countByStatus",
700
- "operation": "countByStatus",
701
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection",
702
- "path": "/tenantkeys/countByStatus",
752
+ "name": "secretauditlogs.countByAction",
753
+ "operation": "countByAction",
754
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
755
+ "path": "/secretauditlogs/countByAction",
703
756
  "method": "POST"
704
757
  },
705
758
  {
706
759
  "kind": "api",
707
- "name": "tenantkeys.markCompromised",
708
- "operation": "markCompromised",
709
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection",
710
- "path": "/tenantkeys/markCompromised",
760
+ "name": "secretauditlogs.countByResult",
761
+ "operation": "countByResult",
762
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
763
+ "path": "/secretauditlogs/countByResult",
711
764
  "method": "POST"
712
765
  },
713
766
  {
714
767
  "kind": "api",
715
- "name": "tenantkeys.cleanupRetiredKeys",
716
- "operation": "cleanupRetiredKeys",
717
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection",
718
- "path": "/tenantkeys/cleanupRetiredKeys",
768
+ "name": "secretauditlogs.cleanup",
769
+ "operation": "cleanup",
770
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection",
771
+ "path": "/secretauditlogs/cleanup",
719
772
  "method": "POST"
720
773
  },
721
774
  {
722
775
  "kind": "cli",
723
- "name": "tenantkeycollection_getActiveKey",
724
- "operation": "getActiveKey",
725
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
776
+ "name": "secretauditlogcollection_listLogs",
777
+ "operation": "listLogs",
778
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
726
779
  },
727
780
  {
728
781
  "kind": "cli",
729
- "name": "tenantkeycollection_listKeyVersions",
730
- "operation": "listKeyVersions",
731
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
782
+ "name": "secretauditlogcollection_getSecretHistory",
783
+ "operation": "getSecretHistory",
784
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
732
785
  },
733
786
  {
734
787
  "kind": "cli",
735
- "name": "tenantkeycollection_getKeyVersion",
736
- "operation": "getKeyVersion",
737
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
788
+ "name": "secretauditlogcollection_getUserActivity",
789
+ "operation": "getUserActivity",
790
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
738
791
  },
739
792
  {
740
793
  "kind": "cli",
741
- "name": "tenantkeycollection_findKeysNeedingRotation",
742
- "operation": "findKeysNeedingRotation",
743
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
794
+ "name": "secretauditlogcollection_getRecentFailures",
795
+ "operation": "getRecentFailures",
796
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
744
797
  },
745
798
  {
746
799
  "kind": "cli",
747
- "name": "tenantkeycollection_listAllActiveKeys",
748
- "operation": "listAllActiveKeys",
749
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
800
+ "name": "secretauditlogcollection_getRecentDenials",
801
+ "operation": "getRecentDenials",
802
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
750
803
  },
751
804
  {
752
805
  "kind": "cli",
753
- "name": "tenantkeycollection_countByStatus",
754
- "operation": "countByStatus",
755
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
806
+ "name": "secretauditlogcollection_countByAction",
807
+ "operation": "countByAction",
808
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
756
809
  },
757
810
  {
758
811
  "kind": "cli",
759
- "name": "tenantkeycollection_markCompromised",
760
- "operation": "markCompromised",
761
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
812
+ "name": "secretauditlogcollection_countByResult",
813
+ "operation": "countByResult",
814
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
762
815
  },
763
816
  {
764
817
  "kind": "cli",
765
- "name": "tenantkeycollection_cleanupRetiredKeys",
766
- "operation": "cleanupRetiredKeys",
767
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
768
- },
769
- {
770
- "kind": "mcp",
771
- "name": "tenantkeycollection_getactivekey",
772
- "operation": "getActiveKey",
773
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
818
+ "name": "secretauditlogcollection_cleanup",
819
+ "operation": "cleanup",
820
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
774
821
  },
775
822
  {
776
823
  "kind": "mcp",
777
- "name": "tenantkeycollection_listkeyversions",
778
- "operation": "listKeyVersions",
779
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
824
+ "name": "secretauditlogcollection_listlogs",
825
+ "operation": "listLogs",
826
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
780
827
  },
781
828
  {
782
829
  "kind": "mcp",
783
- "name": "tenantkeycollection_getkeyversion",
784
- "operation": "getKeyVersion",
785
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
830
+ "name": "secretauditlogcollection_getsecrethistory",
831
+ "operation": "getSecretHistory",
832
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
786
833
  },
787
834
  {
788
835
  "kind": "mcp",
789
- "name": "tenantkeycollection_findkeysneedingrotation",
790
- "operation": "findKeysNeedingRotation",
791
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
836
+ "name": "secretauditlogcollection_getuseractivity",
837
+ "operation": "getUserActivity",
838
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
792
839
  },
793
840
  {
794
841
  "kind": "mcp",
795
- "name": "tenantkeycollection_listallactivekeys",
796
- "operation": "listAllActiveKeys",
797
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
842
+ "name": "secretauditlogcollection_getrecentfailures",
843
+ "operation": "getRecentFailures",
844
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
798
845
  },
799
846
  {
800
847
  "kind": "mcp",
801
- "name": "tenantkeycollection_countbystatus",
802
- "operation": "countByStatus",
803
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
848
+ "name": "secretauditlogcollection_getrecentdenials",
849
+ "operation": "getRecentDenials",
850
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
804
851
  },
805
852
  {
806
853
  "kind": "mcp",
807
- "name": "tenantkeycollection_markcompromised",
808
- "operation": "markCompromised",
809
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
854
+ "name": "secretauditlogcollection_countbyaction",
855
+ "operation": "countByAction",
856
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
810
857
  },
811
858
  {
812
859
  "kind": "mcp",
813
- "name": "tenantkeycollection_cleanupretiredkeys",
814
- "operation": "cleanupRetiredKeys",
815
- "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
816
- }
817
- ],
818
- "relationshipFeatures": [
819
- "uuidColumns"
820
- ],
821
- "tags": [],
822
- "risks": []
823
- },
824
- {
825
- "name": "Secret",
826
- "qualifiedName": "@happyvertical/smrt-secrets:Secret",
827
- "collection": "secrets",
828
- "tableName": "secrets",
829
- "packageName": "@happyvertical/smrt-secrets",
830
- "extends": "SmrtObject",
831
- "fields": [
832
- {
833
- "name": "tenantId",
834
- "type": "text",
835
- "required": false,
836
- "columnType": "UUID",
837
- "default": ""
838
- },
839
- {
840
- "name": "name",
841
- "type": "text",
842
- "required": false,
843
- "columnType": "TEXT",
844
- "default": ""
845
- },
846
- {
847
- "name": "description",
848
- "type": "text",
849
- "required": false,
850
- "columnType": "TEXT",
851
- "default": ""
852
- },
853
- {
854
- "name": "category",
855
- "type": "text",
856
- "required": false,
857
- "columnType": "TEXT",
858
- "default": ""
859
- },
860
- {
861
- "name": "encryptedValue",
862
- "type": "text",
863
- "required": false,
864
- "columnType": "TEXT",
865
- "default": ""
866
- },
867
- {
868
- "name": "keyVersion",
869
- "type": "integer",
870
- "required": false,
871
- "columnType": "INTEGER",
872
- "default": 1
873
- },
874
- {
875
- "name": "status",
876
- "type": "text",
877
- "required": false,
878
- "columnType": "TEXT",
879
- "default": "active"
880
- },
881
- {
882
- "name": "expiresAt",
883
- "type": "datetime",
884
- "required": false,
885
- "columnType": "TIMESTAMP"
886
- },
887
- {
888
- "name": "lastAccessedAt",
889
- "type": "datetime",
890
- "required": false,
891
- "columnType": "TIMESTAMP"
892
- },
893
- {
894
- "name": "accessCount",
895
- "type": "integer",
896
- "required": false,
897
- "columnType": "INTEGER",
898
- "default": 0
899
- },
900
- {
901
- "name": "metadata",
902
- "type": "json",
903
- "required": false,
904
- "columnType": "JSON",
905
- "default": {}
860
+ "name": "secretauditlogcollection_countbyresult",
861
+ "operation": "countByResult",
862
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
863
+ },
864
+ {
865
+ "kind": "mcp",
866
+ "name": "secretauditlogcollection_cleanup",
867
+ "operation": "cleanup",
868
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLogCollection"
906
869
  }
907
870
  ],
871
+ "relationshipFeatures": [
872
+ "uuidColumns"
873
+ ],
874
+ "tags": [],
875
+ "risks": []
876
+ },
877
+ {
878
+ "name": "SecretCollection",
879
+ "qualifiedName": "@happyvertical/smrt-secrets:SecretCollection",
880
+ "collection": "secrets",
881
+ "tableName": "secrets",
882
+ "packageName": "@happyvertical/smrt-secrets",
883
+ "extends": "SmrtCollection",
884
+ "fields": [],
908
885
  "relationships": [],
909
886
  "methods": [
910
- "disable",
911
- "enable",
912
- "isActive",
913
- "isExpired",
914
- "isUsable",
915
- "recordAccess"
887
+ "countByStatus",
888
+ "deleteByName",
889
+ "findByName",
890
+ "getCategories",
891
+ "listActive",
892
+ "listByCategory",
893
+ "listExpiring",
894
+ "listSecrets"
916
895
  ],
917
896
  "methodSignatures": [
918
897
  {
919
- "name": "disable",
920
- "returns": "void"
898
+ "name": "countByStatus",
899
+ "async": true,
900
+ "params": [
901
+ "tenantId: string"
902
+ ],
903
+ "returns": "Promise<Record<SecretStatus, number>>"
921
904
  },
922
905
  {
923
- "name": "enable",
924
- "returns": "void"
906
+ "name": "deleteByName",
907
+ "async": true,
908
+ "params": [
909
+ "tenantId: string",
910
+ "name: string"
911
+ ],
912
+ "returns": "Promise<boolean>"
925
913
  },
926
914
  {
927
- "name": "isActive",
928
- "returns": "boolean"
915
+ "name": "findByName",
916
+ "async": true,
917
+ "params": [
918
+ "tenantId: string",
919
+ "name: string"
920
+ ],
921
+ "returns": "Promise<Secret | null>"
929
922
  },
930
923
  {
931
- "name": "isExpired",
932
- "returns": "boolean"
924
+ "name": "getCategories",
925
+ "async": true,
926
+ "params": [
927
+ "tenantId: string"
928
+ ],
929
+ "returns": "Promise<string[]>"
933
930
  },
934
931
  {
935
- "name": "isUsable",
936
- "returns": "boolean"
932
+ "name": "listActive",
933
+ "async": true,
934
+ "params": [
935
+ "tenantId: string"
936
+ ],
937
+ "returns": "Promise<Secret[]>"
937
938
  },
938
939
  {
939
- "name": "recordAccess",
940
- "returns": "void"
941
- }
942
- ],
943
- "tenant": {
944
- "scoped": true,
945
- "mode": "required",
946
- "field": "tenantId"
947
- },
948
- "conflictColumns": [
949
- "tenant_id",
950
- "slug",
951
- "context"
952
- ],
953
- "surfaces": [
940
+ "name": "listByCategory",
941
+ "async": true,
942
+ "params": [
943
+ "tenantId: string",
944
+ "category: string"
945
+ ],
946
+ "returns": "Promise<Secret[]>"
947
+ },
954
948
  {
955
- "kind": "cli",
956
- "name": "secret_list",
957
- "operation": "list",
958
- "objectName": "@happyvertical/smrt-secrets:Secret"
949
+ "name": "listExpiring",
950
+ "async": true,
951
+ "params": [
952
+ "tenantId: string",
953
+ "daysAhead?: number"
954
+ ],
955
+ "returns": "Promise<Secret[]>"
956
+ },
957
+ {
958
+ "name": "listSecrets",
959
+ "async": true,
960
+ "params": [
961
+ "tenantId: string",
962
+ "options?: ListSecretsOptions"
963
+ ],
964
+ "returns": "Promise<Secret[]>"
959
965
  }
960
966
  ],
961
- "withheldSurfaces": [
967
+ "surfaces": [
962
968
  {
963
969
  "kind": "api",
964
- "operation": "disable",
965
- "code": "not-included",
966
- "reason": "not listed in api.include",
967
- "objectName": "@happyvertical/smrt-secrets:Secret"
970
+ "name": "secrets.findByName",
971
+ "operation": "findByName",
972
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection",
973
+ "path": "/secrets/findByName",
974
+ "method": "POST"
968
975
  },
969
976
  {
970
977
  "kind": "api",
971
- "operation": "enable",
972
- "code": "not-included",
973
- "reason": "not listed in api.include",
974
- "objectName": "@happyvertical/smrt-secrets:Secret"
978
+ "name": "secrets.listSecrets",
979
+ "operation": "listSecrets",
980
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection",
981
+ "path": "/secrets/listSecrets",
982
+ "method": "POST"
975
983
  },
976
984
  {
977
985
  "kind": "api",
978
- "operation": "isActive",
979
- "code": "not-included",
980
- "reason": "not listed in api.include",
981
- "objectName": "@happyvertical/smrt-secrets:Secret"
986
+ "name": "secrets.listActive",
987
+ "operation": "listActive",
988
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection",
989
+ "path": "/secrets/listActive",
990
+ "method": "POST"
982
991
  },
983
992
  {
984
993
  "kind": "api",
985
- "operation": "isExpired",
986
- "code": "not-included",
987
- "reason": "not listed in api.include",
988
- "objectName": "@happyvertical/smrt-secrets:Secret"
994
+ "name": "secrets.listByCategory",
995
+ "operation": "listByCategory",
996
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection",
997
+ "path": "/secrets/listByCategory",
998
+ "method": "POST"
989
999
  },
990
1000
  {
991
1001
  "kind": "api",
992
- "operation": "isUsable",
993
- "code": "not-included",
994
- "reason": "not listed in api.include",
995
- "objectName": "@happyvertical/smrt-secrets:Secret"
1002
+ "name": "secrets.listExpiring",
1003
+ "operation": "listExpiring",
1004
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection",
1005
+ "path": "/secrets/listExpiring",
1006
+ "method": "POST"
996
1007
  },
997
1008
  {
998
1009
  "kind": "api",
999
- "operation": "recordAccess",
1000
- "code": "not-included",
1001
- "reason": "not listed in api.include",
1002
- "objectName": "@happyvertical/smrt-secrets:Secret"
1003
- }
1004
- ],
1005
- "relationshipFeatures": [
1006
- "uuidColumns"
1007
- ],
1008
- "tags": [],
1009
- "risks": []
1010
- },
1011
- {
1012
- "name": "SecretAuditLog",
1013
- "qualifiedName": "@happyvertical/smrt-secrets:SecretAuditLog",
1014
- "collection": "secretauditlogs",
1015
- "tableName": "secret_audit_logs",
1016
- "packageName": "@happyvertical/smrt-secrets",
1017
- "extends": "SmrtObject",
1018
- "fields": [
1019
- {
1020
- "name": "tenantId",
1021
- "type": "text",
1022
- "required": false,
1023
- "columnType": "UUID"
1024
- },
1025
- {
1026
- "name": "secretId",
1027
- "type": "foreignKey",
1028
- "required": false,
1029
- "related": "Secret",
1030
- "columnType": "UUID"
1031
- },
1032
- {
1033
- "name": "secretName",
1034
- "type": "text",
1035
- "required": false,
1036
- "columnType": "TEXT",
1037
- "default": ""
1038
- },
1039
- {
1040
- "name": "userId",
1041
- "type": "crossPackageRef",
1042
- "required": false,
1043
- "related": "@happyvertical/smrt-users:User",
1044
- "columnType": "UUID"
1045
- },
1046
- {
1047
- "name": "action",
1048
- "type": "text",
1049
- "required": false,
1050
- "columnType": "TEXT",
1051
- "default": "read"
1010
+ "name": "secrets.getCategories",
1011
+ "operation": "getCategories",
1012
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection",
1013
+ "path": "/secrets/getCategories",
1014
+ "method": "POST"
1052
1015
  },
1053
1016
  {
1054
- "name": "result",
1055
- "type": "text",
1056
- "required": false,
1057
- "columnType": "TEXT",
1058
- "default": "success"
1017
+ "kind": "api",
1018
+ "name": "secrets.countByStatus",
1019
+ "operation": "countByStatus",
1020
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection",
1021
+ "path": "/secrets/countByStatus",
1022
+ "method": "POST"
1059
1023
  },
1060
1024
  {
1061
- "name": "ipAddress",
1062
- "type": "text",
1063
- "required": false,
1064
- "columnType": "TEXT",
1065
- "default": ""
1025
+ "kind": "api",
1026
+ "name": "secrets.deleteByName",
1027
+ "operation": "deleteByName",
1028
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection",
1029
+ "path": "/secrets/deleteByName",
1030
+ "method": "POST"
1066
1031
  },
1067
1032
  {
1068
- "name": "userAgent",
1069
- "type": "text",
1070
- "required": false,
1071
- "columnType": "TEXT",
1072
- "default": ""
1033
+ "kind": "cli",
1034
+ "name": "secretcollection_findByName",
1035
+ "operation": "findByName",
1036
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection"
1073
1037
  },
1074
1038
  {
1075
- "name": "details",
1076
- "type": "json",
1077
- "required": false,
1078
- "columnType": "JSON",
1079
- "default": {}
1080
- }
1081
- ],
1082
- "relationships": [
1083
- {
1084
- "name": "secretId",
1085
- "type": "foreignKey",
1086
- "required": false,
1087
- "related": "Secret",
1088
- "columnType": "UUID"
1039
+ "kind": "cli",
1040
+ "name": "secretcollection_listSecrets",
1041
+ "operation": "listSecrets",
1042
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection"
1089
1043
  },
1090
1044
  {
1091
- "name": "userId",
1092
- "type": "crossPackageRef",
1093
- "required": false,
1094
- "related": "@happyvertical/smrt-users:User",
1095
- "columnType": "UUID"
1096
- }
1097
- ],
1098
- "methods": [
1099
- "isDenied",
1100
- "isFailure",
1101
- "isKeyOperation",
1102
- "isReadAction",
1103
- "isSuccess",
1104
- "isWriteAction"
1105
- ],
1106
- "methodSignatures": [
1045
+ "kind": "cli",
1046
+ "name": "secretcollection_listActive",
1047
+ "operation": "listActive",
1048
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection"
1049
+ },
1107
1050
  {
1108
- "name": "isDenied",
1109
- "returns": "boolean"
1051
+ "kind": "cli",
1052
+ "name": "secretcollection_listByCategory",
1053
+ "operation": "listByCategory",
1054
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection"
1110
1055
  },
1111
1056
  {
1112
- "name": "isFailure",
1113
- "returns": "boolean"
1057
+ "kind": "cli",
1058
+ "name": "secretcollection_listExpiring",
1059
+ "operation": "listExpiring",
1060
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection"
1114
1061
  },
1115
1062
  {
1116
- "name": "isKeyOperation",
1117
- "returns": "boolean"
1063
+ "kind": "cli",
1064
+ "name": "secretcollection_getCategories",
1065
+ "operation": "getCategories",
1066
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection"
1118
1067
  },
1119
1068
  {
1120
- "name": "isReadAction",
1121
- "returns": "boolean"
1069
+ "kind": "cli",
1070
+ "name": "secretcollection_countByStatus",
1071
+ "operation": "countByStatus",
1072
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection"
1122
1073
  },
1123
1074
  {
1124
- "name": "isSuccess",
1125
- "returns": "boolean"
1075
+ "kind": "cli",
1076
+ "name": "secretcollection_deleteByName",
1077
+ "operation": "deleteByName",
1078
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection"
1126
1079
  },
1127
1080
  {
1128
- "name": "isWriteAction",
1129
- "returns": "boolean"
1130
- }
1131
- ],
1132
- "tenant": {
1133
- "scoped": true,
1134
- "mode": "required",
1135
- "field": "tenantId"
1136
- },
1137
- "conflictColumns": [
1138
- "tenant_id",
1139
- "slug",
1140
- "context"
1141
- ],
1142
- "surfaces": [
1081
+ "kind": "mcp",
1082
+ "name": "secretcollection_findbyname",
1083
+ "operation": "findByName",
1084
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection"
1085
+ },
1143
1086
  {
1144
- "kind": "cli",
1145
- "name": "secretauditlog_list",
1146
- "operation": "list",
1147
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLog"
1148
- }
1149
- ],
1150
- "withheldSurfaces": [
1087
+ "kind": "mcp",
1088
+ "name": "secretcollection_listsecrets",
1089
+ "operation": "listSecrets",
1090
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection"
1091
+ },
1151
1092
  {
1152
- "kind": "api",
1153
- "operation": "isDenied",
1154
- "code": "not-included",
1155
- "reason": "not listed in api.include",
1156
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLog"
1093
+ "kind": "mcp",
1094
+ "name": "secretcollection_listactive",
1095
+ "operation": "listActive",
1096
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection"
1157
1097
  },
1158
1098
  {
1159
- "kind": "api",
1160
- "operation": "isFailure",
1161
- "code": "not-included",
1162
- "reason": "not listed in api.include",
1163
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLog"
1099
+ "kind": "mcp",
1100
+ "name": "secretcollection_listbycategory",
1101
+ "operation": "listByCategory",
1102
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection"
1164
1103
  },
1165
1104
  {
1166
- "kind": "api",
1167
- "operation": "isKeyOperation",
1168
- "code": "not-included",
1169
- "reason": "not listed in api.include",
1170
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLog"
1105
+ "kind": "mcp",
1106
+ "name": "secretcollection_listexpiring",
1107
+ "operation": "listExpiring",
1108
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection"
1171
1109
  },
1172
1110
  {
1173
- "kind": "api",
1174
- "operation": "isReadAction",
1175
- "code": "not-included",
1176
- "reason": "not listed in api.include",
1177
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLog"
1111
+ "kind": "mcp",
1112
+ "name": "secretcollection_getcategories",
1113
+ "operation": "getCategories",
1114
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection"
1178
1115
  },
1179
1116
  {
1180
- "kind": "api",
1181
- "operation": "isSuccess",
1182
- "code": "not-included",
1183
- "reason": "not listed in api.include",
1184
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLog"
1117
+ "kind": "mcp",
1118
+ "name": "secretcollection_countbystatus",
1119
+ "operation": "countByStatus",
1120
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection"
1185
1121
  },
1186
1122
  {
1187
- "kind": "api",
1188
- "operation": "isWriteAction",
1189
- "code": "not-included",
1190
- "reason": "not listed in api.include",
1191
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLog"
1123
+ "kind": "mcp",
1124
+ "name": "secretcollection_deletebyname",
1125
+ "operation": "deleteByName",
1126
+ "objectName": "@happyvertical/smrt-secrets:SecretCollection"
1192
1127
  }
1193
1128
  ],
1194
1129
  "relationshipFeatures": [
1195
- "crossPackageRef",
1196
- "foreignKey",
1197
1130
  "uuidColumns"
1198
1131
  ],
1199
1132
  "tags": [],
1200
1133
  "risks": []
1201
1134
  },
1202
1135
  {
1203
- "name": "TenantKey",
1204
- "qualifiedName": "@happyvertical/smrt-secrets:TenantKey",
1136
+ "name": "TenantKeyCollection",
1137
+ "qualifiedName": "@happyvertical/smrt-secrets:TenantKeyCollection",
1205
1138
  "collection": "tenantkeys",
1206
1139
  "tableName": "tenant_keys",
1207
1140
  "packageName": "@happyvertical/smrt-secrets",
1208
- "extends": "SmrtObject",
1209
- "fields": [
1141
+ "extends": "SmrtCollection",
1142
+ "fields": [],
1143
+ "relationships": [],
1144
+ "methods": [
1145
+ "cleanupRetiredKeys",
1146
+ "countByStatus",
1147
+ "findKeysNeedingRotation",
1148
+ "getActiveKey",
1149
+ "getKeyVersion",
1150
+ "listAllActiveKeys",
1151
+ "listKeyVersions",
1152
+ "markCompromised"
1153
+ ],
1154
+ "methodSignatures": [
1210
1155
  {
1211
- "name": "tenantId",
1212
- "type": "text",
1213
- "required": false,
1214
- "columnType": "TEXT",
1215
- "default": ""
1156
+ "name": "cleanupRetiredKeys",
1157
+ "async": true,
1158
+ "params": [
1159
+ "olderThanDays?: number"
1160
+ ],
1161
+ "returns": "Promise<number>"
1216
1162
  },
1217
1163
  {
1218
- "name": "wrappedKey",
1219
- "type": "text",
1220
- "required": false,
1221
- "columnType": "TEXT",
1222
- "default": ""
1164
+ "name": "countByStatus",
1165
+ "async": true,
1166
+ "returns": "Promise<Record<TenantKeyStatus, number>>"
1167
+ },
1168
+ {
1169
+ "name": "findKeysNeedingRotation",
1170
+ "async": true,
1171
+ "returns": "Promise<TenantKey[]>"
1172
+ },
1173
+ {
1174
+ "name": "getActiveKey",
1175
+ "async": true,
1176
+ "params": [
1177
+ "tenantId: string"
1178
+ ],
1179
+ "returns": "Promise<TenantKey | null>"
1180
+ },
1181
+ {
1182
+ "name": "getKeyVersion",
1183
+ "async": true,
1184
+ "params": [
1185
+ "tenantId: string",
1186
+ "version: number"
1187
+ ],
1188
+ "returns": "Promise<TenantKey | null>"
1189
+ },
1190
+ {
1191
+ "name": "listAllActiveKeys",
1192
+ "async": true,
1193
+ "returns": "Promise<TenantKey[]>"
1194
+ },
1195
+ {
1196
+ "name": "listKeyVersions",
1197
+ "async": true,
1198
+ "params": [
1199
+ "tenantId: string"
1200
+ ],
1201
+ "returns": "Promise<TenantKey[]>"
1202
+ },
1203
+ {
1204
+ "name": "markCompromised",
1205
+ "async": true,
1206
+ "params": [
1207
+ "tenantId: string",
1208
+ "keyId: string"
1209
+ ],
1210
+ "returns": "Promise<boolean>"
1211
+ }
1212
+ ],
1213
+ "surfaces": [
1214
+ {
1215
+ "kind": "api",
1216
+ "name": "tenantkeys.getActiveKey",
1217
+ "operation": "getActiveKey",
1218
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection",
1219
+ "path": "/tenantkeys/getActiveKey",
1220
+ "method": "POST"
1221
+ },
1222
+ {
1223
+ "kind": "api",
1224
+ "name": "tenantkeys.listKeyVersions",
1225
+ "operation": "listKeyVersions",
1226
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection",
1227
+ "path": "/tenantkeys/listKeyVersions",
1228
+ "method": "POST"
1223
1229
  },
1224
1230
  {
1225
- "name": "amkKeyId",
1226
- "type": "text",
1227
- "required": false,
1228
- "columnType": "TEXT",
1229
- "default": ""
1231
+ "kind": "api",
1232
+ "name": "tenantkeys.getKeyVersion",
1233
+ "operation": "getKeyVersion",
1234
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection",
1235
+ "path": "/tenantkeys/getKeyVersion",
1236
+ "method": "POST"
1230
1237
  },
1231
1238
  {
1232
- "name": "status",
1233
- "type": "text",
1234
- "required": false,
1235
- "columnType": "TEXT",
1236
- "default": "active"
1239
+ "kind": "api",
1240
+ "name": "tenantkeys.findKeysNeedingRotation",
1241
+ "operation": "findKeysNeedingRotation",
1242
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection",
1243
+ "path": "/tenantkeys/findKeysNeedingRotation",
1244
+ "method": "POST"
1237
1245
  },
1238
1246
  {
1239
- "name": "version",
1240
- "type": "integer",
1241
- "required": false,
1242
- "columnType": "INTEGER",
1243
- "default": 1
1247
+ "kind": "api",
1248
+ "name": "tenantkeys.listAllActiveKeys",
1249
+ "operation": "listAllActiveKeys",
1250
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection",
1251
+ "path": "/tenantkeys/listAllActiveKeys",
1252
+ "method": "POST"
1244
1253
  },
1245
1254
  {
1246
- "name": "rotateAfter",
1247
- "type": "datetime",
1248
- "required": false,
1249
- "columnType": "TIMESTAMP"
1255
+ "kind": "api",
1256
+ "name": "tenantkeys.countByStatus",
1257
+ "operation": "countByStatus",
1258
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection",
1259
+ "path": "/tenantkeys/countByStatus",
1260
+ "method": "POST"
1250
1261
  },
1251
1262
  {
1252
- "name": "retiredAt",
1253
- "type": "datetime",
1254
- "required": false,
1255
- "columnType": "TIMESTAMP"
1256
- }
1257
- ],
1258
- "relationships": [],
1259
- "methods": [
1260
- "canDecrypt",
1261
- "canEncrypt",
1262
- "isActive",
1263
- "isCompromised",
1264
- "isRetired",
1265
- "markCompromised",
1266
- "needsRotation",
1267
- "retire"
1268
- ],
1269
- "methodSignatures": [
1270
- {
1271
- "name": "canDecrypt",
1272
- "returns": "boolean"
1263
+ "kind": "api",
1264
+ "name": "tenantkeys.markCompromised",
1265
+ "operation": "markCompromised",
1266
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection",
1267
+ "path": "/tenantkeys/markCompromised",
1268
+ "method": "POST"
1273
1269
  },
1274
1270
  {
1275
- "name": "canEncrypt",
1276
- "returns": "boolean"
1271
+ "kind": "api",
1272
+ "name": "tenantkeys.cleanupRetiredKeys",
1273
+ "operation": "cleanupRetiredKeys",
1274
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection",
1275
+ "path": "/tenantkeys/cleanupRetiredKeys",
1276
+ "method": "POST"
1277
1277
  },
1278
1278
  {
1279
- "name": "isActive",
1280
- "returns": "boolean"
1279
+ "kind": "cli",
1280
+ "name": "tenantkeycollection_getActiveKey",
1281
+ "operation": "getActiveKey",
1282
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
1281
1283
  },
1282
1284
  {
1283
- "name": "isCompromised",
1284
- "returns": "boolean"
1285
+ "kind": "cli",
1286
+ "name": "tenantkeycollection_listKeyVersions",
1287
+ "operation": "listKeyVersions",
1288
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
1285
1289
  },
1286
1290
  {
1287
- "name": "isRetired",
1288
- "returns": "boolean"
1291
+ "kind": "cli",
1292
+ "name": "tenantkeycollection_getKeyVersion",
1293
+ "operation": "getKeyVersion",
1294
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
1289
1295
  },
1290
1296
  {
1291
- "name": "markCompromised",
1292
- "returns": "void"
1297
+ "kind": "cli",
1298
+ "name": "tenantkeycollection_findKeysNeedingRotation",
1299
+ "operation": "findKeysNeedingRotation",
1300
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
1293
1301
  },
1294
1302
  {
1295
- "name": "needsRotation",
1296
- "returns": "boolean"
1303
+ "kind": "cli",
1304
+ "name": "tenantkeycollection_listAllActiveKeys",
1305
+ "operation": "listAllActiveKeys",
1306
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
1297
1307
  },
1298
1308
  {
1299
- "name": "retire",
1300
- "returns": "void"
1301
- }
1302
- ],
1303
- "surfaces": [
1309
+ "kind": "cli",
1310
+ "name": "tenantkeycollection_countByStatus",
1311
+ "operation": "countByStatus",
1312
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
1313
+ },
1304
1314
  {
1305
1315
  "kind": "cli",
1306
- "name": "tenantkey_list",
1307
- "operation": "list",
1308
- "objectName": "@happyvertical/smrt-secrets:TenantKey"
1316
+ "name": "tenantkeycollection_markCompromised",
1317
+ "operation": "markCompromised",
1318
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
1309
1319
  },
1310
1320
  {
1311
1321
  "kind": "cli",
1312
- "name": "tenantkey_get",
1313
- "operation": "get",
1314
- "objectName": "@happyvertical/smrt-secrets:TenantKey"
1315
- }
1316
- ],
1317
- "withheldSurfaces": [
1322
+ "name": "tenantkeycollection_cleanupRetiredKeys",
1323
+ "operation": "cleanupRetiredKeys",
1324
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
1325
+ },
1318
1326
  {
1319
- "kind": "api",
1320
- "operation": "canDecrypt",
1321
- "code": "not-included",
1322
- "reason": "not listed in api.include",
1323
- "objectName": "@happyvertical/smrt-secrets:TenantKey"
1327
+ "kind": "mcp",
1328
+ "name": "tenantkeycollection_getactivekey",
1329
+ "operation": "getActiveKey",
1330
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
1324
1331
  },
1325
1332
  {
1326
- "kind": "api",
1327
- "operation": "canEncrypt",
1328
- "code": "not-included",
1329
- "reason": "not listed in api.include",
1330
- "objectName": "@happyvertical/smrt-secrets:TenantKey"
1333
+ "kind": "mcp",
1334
+ "name": "tenantkeycollection_listkeyversions",
1335
+ "operation": "listKeyVersions",
1336
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
1331
1337
  },
1332
1338
  {
1333
- "kind": "api",
1334
- "operation": "isActive",
1335
- "code": "not-included",
1336
- "reason": "not listed in api.include",
1337
- "objectName": "@happyvertical/smrt-secrets:TenantKey"
1339
+ "kind": "mcp",
1340
+ "name": "tenantkeycollection_getkeyversion",
1341
+ "operation": "getKeyVersion",
1342
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
1338
1343
  },
1339
1344
  {
1340
- "kind": "api",
1341
- "operation": "isCompromised",
1342
- "code": "not-included",
1343
- "reason": "not listed in api.include",
1344
- "objectName": "@happyvertical/smrt-secrets:TenantKey"
1345
+ "kind": "mcp",
1346
+ "name": "tenantkeycollection_findkeysneedingrotation",
1347
+ "operation": "findKeysNeedingRotation",
1348
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
1345
1349
  },
1346
1350
  {
1347
- "kind": "api",
1348
- "operation": "isRetired",
1349
- "code": "not-included",
1350
- "reason": "not listed in api.include",
1351
- "objectName": "@happyvertical/smrt-secrets:TenantKey"
1351
+ "kind": "mcp",
1352
+ "name": "tenantkeycollection_listallactivekeys",
1353
+ "operation": "listAllActiveKeys",
1354
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
1352
1355
  },
1353
1356
  {
1354
- "kind": "api",
1355
- "operation": "markCompromised",
1356
- "code": "not-included",
1357
- "reason": "not listed in api.include",
1358
- "objectName": "@happyvertical/smrt-secrets:TenantKey"
1357
+ "kind": "mcp",
1358
+ "name": "tenantkeycollection_countbystatus",
1359
+ "operation": "countByStatus",
1360
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
1359
1361
  },
1360
1362
  {
1361
- "kind": "api",
1362
- "operation": "needsRotation",
1363
- "code": "not-included",
1364
- "reason": "not listed in api.include",
1365
- "objectName": "@happyvertical/smrt-secrets:TenantKey"
1363
+ "kind": "mcp",
1364
+ "name": "tenantkeycollection_markcompromised",
1365
+ "operation": "markCompromised",
1366
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
1366
1367
  },
1367
1368
  {
1368
- "kind": "api",
1369
- "operation": "retire",
1370
- "code": "not-included",
1371
- "reason": "not listed in api.include",
1372
- "objectName": "@happyvertical/smrt-secrets:TenantKey"
1369
+ "kind": "mcp",
1370
+ "name": "tenantkeycollection_cleanupretiredkeys",
1371
+ "operation": "cleanupRetiredKeys",
1372
+ "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
1373
1373
  }
1374
1374
  ],
1375
1375
  "relationshipFeatures": [
@@ -1380,6 +1380,30 @@
1380
1380
  }
1381
1381
  ],
1382
1382
  "surfaces": [
1383
+ {
1384
+ "kind": "cli",
1385
+ "name": "secret_list",
1386
+ "operation": "list",
1387
+ "objectName": "@happyvertical/smrt-secrets:Secret"
1388
+ },
1389
+ {
1390
+ "kind": "cli",
1391
+ "name": "secretauditlog_list",
1392
+ "operation": "list",
1393
+ "objectName": "@happyvertical/smrt-secrets:SecretAuditLog"
1394
+ },
1395
+ {
1396
+ "kind": "cli",
1397
+ "name": "tenantkey_list",
1398
+ "operation": "list",
1399
+ "objectName": "@happyvertical/smrt-secrets:TenantKey"
1400
+ },
1401
+ {
1402
+ "kind": "cli",
1403
+ "name": "tenantkey_get",
1404
+ "operation": "get",
1405
+ "objectName": "@happyvertical/smrt-secrets:TenantKey"
1406
+ },
1383
1407
  {
1384
1408
  "kind": "api",
1385
1409
  "name": "secretauditlogs.listLogs",
@@ -1859,30 +1883,6 @@
1859
1883
  "name": "tenantkeycollection_cleanupretiredkeys",
1860
1884
  "operation": "cleanupRetiredKeys",
1861
1885
  "objectName": "@happyvertical/smrt-secrets:TenantKeyCollection"
1862
- },
1863
- {
1864
- "kind": "cli",
1865
- "name": "secret_list",
1866
- "operation": "list",
1867
- "objectName": "@happyvertical/smrt-secrets:Secret"
1868
- },
1869
- {
1870
- "kind": "cli",
1871
- "name": "secretauditlog_list",
1872
- "operation": "list",
1873
- "objectName": "@happyvertical/smrt-secrets:SecretAuditLog"
1874
- },
1875
- {
1876
- "kind": "cli",
1877
- "name": "tenantkey_list",
1878
- "operation": "list",
1879
- "objectName": "@happyvertical/smrt-secrets:TenantKey"
1880
- },
1881
- {
1882
- "kind": "cli",
1883
- "name": "tenantkey_get",
1884
- "operation": "get",
1885
- "objectName": "@happyvertical/smrt-secrets:TenantKey"
1886
1886
  }
1887
1887
  ],
1888
1888
  "prompts": [],