@terpjs/contract 0.31.0 → 0.32.0
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.
- package/openapi.json +189 -0
- package/package.json +1 -1
- package/src/schema.d.ts +109 -0
- package/src/tokens.css +2 -2
- package/src/tokens.manifest.json +2 -2
- package/token-pairs.json +1 -1
- package/tokens.night.json +1 -1
package/openapi.json
CHANGED
|
@@ -337,6 +337,96 @@
|
|
|
337
337
|
"title": "AccessToken",
|
|
338
338
|
"type": "object"
|
|
339
339
|
},
|
|
340
|
+
"AuditActionCount": {
|
|
341
|
+
"description": "How many events in the window record one action.",
|
|
342
|
+
"properties": {
|
|
343
|
+
"action": {
|
|
344
|
+
"title": "Action",
|
|
345
|
+
"type": "string"
|
|
346
|
+
},
|
|
347
|
+
"count": {
|
|
348
|
+
"title": "Count",
|
|
349
|
+
"type": "integer"
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"required": [
|
|
353
|
+
"action",
|
|
354
|
+
"count"
|
|
355
|
+
],
|
|
356
|
+
"title": "AuditActionCount",
|
|
357
|
+
"type": "object"
|
|
358
|
+
},
|
|
359
|
+
"AuditActivityRead": {
|
|
360
|
+
"description": "The trail's activity over the last ``days`` calendar days, counted in one time zone.\n\n``days`` runs oldest first and ends today, with a zero for a day that holds nothing, so a\nchart can draw it as it comes. ``previous_days`` is the same number of days just before,\nfor a comparison. The two breakdowns and ``total`` cover ``days`` only, and\n``by_target_type`` is the most changed types, most first.",
|
|
361
|
+
"properties": {
|
|
362
|
+
"by_action": {
|
|
363
|
+
"items": {
|
|
364
|
+
"$ref": "#/components/schemas/AuditActionCount"
|
|
365
|
+
},
|
|
366
|
+
"title": "By Action",
|
|
367
|
+
"type": "array"
|
|
368
|
+
},
|
|
369
|
+
"by_target_type": {
|
|
370
|
+
"items": {
|
|
371
|
+
"$ref": "#/components/schemas/AuditTargetCount"
|
|
372
|
+
},
|
|
373
|
+
"title": "By Target Type",
|
|
374
|
+
"type": "array"
|
|
375
|
+
},
|
|
376
|
+
"days": {
|
|
377
|
+
"items": {
|
|
378
|
+
"$ref": "#/components/schemas/AuditDayCount"
|
|
379
|
+
},
|
|
380
|
+
"title": "Days",
|
|
381
|
+
"type": "array"
|
|
382
|
+
},
|
|
383
|
+
"previous_days": {
|
|
384
|
+
"items": {
|
|
385
|
+
"$ref": "#/components/schemas/AuditDayCount"
|
|
386
|
+
},
|
|
387
|
+
"title": "Previous Days",
|
|
388
|
+
"type": "array"
|
|
389
|
+
},
|
|
390
|
+
"time_zone": {
|
|
391
|
+
"title": "Time Zone",
|
|
392
|
+
"type": "string"
|
|
393
|
+
},
|
|
394
|
+
"total": {
|
|
395
|
+
"title": "Total",
|
|
396
|
+
"type": "integer"
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"required": [
|
|
400
|
+
"time_zone",
|
|
401
|
+
"days",
|
|
402
|
+
"previous_days",
|
|
403
|
+
"by_action",
|
|
404
|
+
"by_target_type",
|
|
405
|
+
"total"
|
|
406
|
+
],
|
|
407
|
+
"title": "AuditActivityRead",
|
|
408
|
+
"type": "object"
|
|
409
|
+
},
|
|
410
|
+
"AuditDayCount": {
|
|
411
|
+
"description": "How many events one calendar day of the requested time zone holds.",
|
|
412
|
+
"properties": {
|
|
413
|
+
"count": {
|
|
414
|
+
"title": "Count",
|
|
415
|
+
"type": "integer"
|
|
416
|
+
},
|
|
417
|
+
"date": {
|
|
418
|
+
"format": "date",
|
|
419
|
+
"title": "Date",
|
|
420
|
+
"type": "string"
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
"required": [
|
|
424
|
+
"date",
|
|
425
|
+
"count"
|
|
426
|
+
],
|
|
427
|
+
"title": "AuditDayCount",
|
|
428
|
+
"type": "object"
|
|
429
|
+
},
|
|
340
430
|
"AuditEventRead": {
|
|
341
431
|
"properties": {
|
|
342
432
|
"action": {
|
|
@@ -410,6 +500,25 @@
|
|
|
410
500
|
"title": "AuditEventRead",
|
|
411
501
|
"type": "object"
|
|
412
502
|
},
|
|
503
|
+
"AuditTargetCount": {
|
|
504
|
+
"description": "How many events in the window are about records of one type.",
|
|
505
|
+
"properties": {
|
|
506
|
+
"count": {
|
|
507
|
+
"title": "Count",
|
|
508
|
+
"type": "integer"
|
|
509
|
+
},
|
|
510
|
+
"target_type": {
|
|
511
|
+
"title": "Target Type",
|
|
512
|
+
"type": "string"
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
"required": [
|
|
516
|
+
"target_type",
|
|
517
|
+
"count"
|
|
518
|
+
],
|
|
519
|
+
"title": "AuditTargetCount",
|
|
520
|
+
"type": "object"
|
|
521
|
+
},
|
|
413
522
|
"CurrentUser": {
|
|
414
523
|
"description": "The authenticated caller's own identity \u2014 the ``/me`` (who-am-I) response.\n\nThe frontend's session contract pairs this with :class:`AccessToken`. It is the\nserver-validated current identity (resolved through the wired principal provider \u2014\nthe revocable one in the bundled stack), so it reflects the live store, not just the\ntoken's claims. The caller's role is on the wire as both the numeric ``role_rank``\n(the comparable primitive, ADR 0004 / 0022) and a human-readable ``role_name``.",
|
|
415
524
|
"properties": {
|
|
@@ -1733,6 +1842,68 @@
|
|
|
1733
1842
|
]
|
|
1734
1843
|
}
|
|
1735
1844
|
},
|
|
1845
|
+
"/api/v1/audit/activity": {
|
|
1846
|
+
"get": {
|
|
1847
|
+
"operationId": "audit.read_activity",
|
|
1848
|
+
"parameters": [
|
|
1849
|
+
{
|
|
1850
|
+
"description": "How many calendar days to count, ending today; the days before are counted too.",
|
|
1851
|
+
"in": "query",
|
|
1852
|
+
"name": "days",
|
|
1853
|
+
"required": false,
|
|
1854
|
+
"schema": {
|
|
1855
|
+
"default": 30,
|
|
1856
|
+
"description": "How many calendar days to count, ending today; the days before are counted too.",
|
|
1857
|
+
"maximum": 90,
|
|
1858
|
+
"minimum": 1,
|
|
1859
|
+
"title": "Days",
|
|
1860
|
+
"type": "integer"
|
|
1861
|
+
}
|
|
1862
|
+
},
|
|
1863
|
+
{
|
|
1864
|
+
"description": "The IANA time zone whose calendar days are counted, e.g. 'Europe/Amsterdam'.",
|
|
1865
|
+
"in": "query",
|
|
1866
|
+
"name": "time_zone",
|
|
1867
|
+
"required": false,
|
|
1868
|
+
"schema": {
|
|
1869
|
+
"default": "UTC",
|
|
1870
|
+
"description": "The IANA time zone whose calendar days are counted, e.g. 'Europe/Amsterdam'.",
|
|
1871
|
+
"maxLength": 64,
|
|
1872
|
+
"minLength": 1,
|
|
1873
|
+
"pattern": "^[A-Za-z][A-Za-z0-9_+-]*(/[A-Za-z0-9_+-]+)*$",
|
|
1874
|
+
"title": "Time Zone",
|
|
1875
|
+
"type": "string"
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
],
|
|
1879
|
+
"responses": {
|
|
1880
|
+
"200": {
|
|
1881
|
+
"content": {
|
|
1882
|
+
"application/json": {
|
|
1883
|
+
"schema": {
|
|
1884
|
+
"$ref": "#/components/schemas/AuditActivityRead"
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
},
|
|
1888
|
+
"description": "Successful Response"
|
|
1889
|
+
},
|
|
1890
|
+
"422": {
|
|
1891
|
+
"content": {
|
|
1892
|
+
"application/json": {
|
|
1893
|
+
"schema": {
|
|
1894
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
},
|
|
1898
|
+
"description": "Validation Error"
|
|
1899
|
+
}
|
|
1900
|
+
},
|
|
1901
|
+
"summary": "View how much the audit trail records per day",
|
|
1902
|
+
"tags": [
|
|
1903
|
+
"audit"
|
|
1904
|
+
]
|
|
1905
|
+
}
|
|
1906
|
+
},
|
|
1736
1907
|
"/api/v1/auth/login": {
|
|
1737
1908
|
"post": {
|
|
1738
1909
|
"operationId": "auth.login",
|
|
@@ -2247,6 +2418,24 @@
|
|
|
2247
2418
|
"title": "Email"
|
|
2248
2419
|
}
|
|
2249
2420
|
},
|
|
2421
|
+
{
|
|
2422
|
+
"description": "Filter to active accounts (true) or deactivated ones (false).",
|
|
2423
|
+
"in": "query",
|
|
2424
|
+
"name": "is_active",
|
|
2425
|
+
"required": false,
|
|
2426
|
+
"schema": {
|
|
2427
|
+
"anyOf": [
|
|
2428
|
+
{
|
|
2429
|
+
"type": "boolean"
|
|
2430
|
+
},
|
|
2431
|
+
{
|
|
2432
|
+
"type": "null"
|
|
2433
|
+
}
|
|
2434
|
+
],
|
|
2435
|
+
"description": "Filter to active accounts (true) or deactivated ones (false).",
|
|
2436
|
+
"title": "Is Active"
|
|
2437
|
+
}
|
|
2438
|
+
},
|
|
2250
2439
|
{
|
|
2251
2440
|
"description": "Rows to skip.",
|
|
2252
2441
|
"in": "query",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@terpjs/contract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Terp frontend contract \u2014 the OpenAPI-generated TypeScript client, design tokens, and the stack-agnostic module/route/nav + auth types.",
|
|
6
6
|
"exports": {
|
package/src/schema.d.ts
CHANGED
|
@@ -141,6 +141,23 @@ export interface paths {
|
|
|
141
141
|
patch?: never;
|
|
142
142
|
trace?: never;
|
|
143
143
|
};
|
|
144
|
+
"/api/v1/audit/activity": {
|
|
145
|
+
parameters: {
|
|
146
|
+
query?: never;
|
|
147
|
+
header?: never;
|
|
148
|
+
path?: never;
|
|
149
|
+
cookie?: never;
|
|
150
|
+
};
|
|
151
|
+
/** View how much the audit trail records per day */
|
|
152
|
+
get: operations["audit.read_activity"];
|
|
153
|
+
put?: never;
|
|
154
|
+
post?: never;
|
|
155
|
+
delete?: never;
|
|
156
|
+
options?: never;
|
|
157
|
+
head?: never;
|
|
158
|
+
patch?: never;
|
|
159
|
+
trace?: never;
|
|
160
|
+
};
|
|
144
161
|
"/api/v1/auth/login": {
|
|
145
162
|
parameters: {
|
|
146
163
|
query?: never;
|
|
@@ -531,6 +548,52 @@ export interface components {
|
|
|
531
548
|
*/
|
|
532
549
|
token_type: string;
|
|
533
550
|
};
|
|
551
|
+
/**
|
|
552
|
+
* AuditActionCount
|
|
553
|
+
* @description How many events in the window record one action.
|
|
554
|
+
*/
|
|
555
|
+
AuditActionCount: {
|
|
556
|
+
/** Action */
|
|
557
|
+
action: string;
|
|
558
|
+
/** Count */
|
|
559
|
+
count: number;
|
|
560
|
+
};
|
|
561
|
+
/**
|
|
562
|
+
* AuditActivityRead
|
|
563
|
+
* @description The trail's activity over the last ``days`` calendar days, counted in one time zone.
|
|
564
|
+
*
|
|
565
|
+
* ``days`` runs oldest first and ends today, with a zero for a day that holds nothing, so a
|
|
566
|
+
* chart can draw it as it comes. ``previous_days`` is the same number of days just before,
|
|
567
|
+
* for a comparison. The two breakdowns and ``total`` cover ``days`` only, and
|
|
568
|
+
* ``by_target_type`` is the most changed types, most first.
|
|
569
|
+
*/
|
|
570
|
+
AuditActivityRead: {
|
|
571
|
+
/** By Action */
|
|
572
|
+
by_action: components["schemas"]["AuditActionCount"][];
|
|
573
|
+
/** By Target Type */
|
|
574
|
+
by_target_type: components["schemas"]["AuditTargetCount"][];
|
|
575
|
+
/** Days */
|
|
576
|
+
days: components["schemas"]["AuditDayCount"][];
|
|
577
|
+
/** Previous Days */
|
|
578
|
+
previous_days: components["schemas"]["AuditDayCount"][];
|
|
579
|
+
/** Time Zone */
|
|
580
|
+
time_zone: string;
|
|
581
|
+
/** Total */
|
|
582
|
+
total: number;
|
|
583
|
+
};
|
|
584
|
+
/**
|
|
585
|
+
* AuditDayCount
|
|
586
|
+
* @description How many events one calendar day of the requested time zone holds.
|
|
587
|
+
*/
|
|
588
|
+
AuditDayCount: {
|
|
589
|
+
/** Count */
|
|
590
|
+
count: number;
|
|
591
|
+
/**
|
|
592
|
+
* Date
|
|
593
|
+
* Format: date
|
|
594
|
+
*/
|
|
595
|
+
date: string;
|
|
596
|
+
};
|
|
534
597
|
/** AuditEventRead */
|
|
535
598
|
AuditEventRead: {
|
|
536
599
|
/** Action */
|
|
@@ -558,6 +621,16 @@ export interface components {
|
|
|
558
621
|
/** Target Type */
|
|
559
622
|
target_type: string;
|
|
560
623
|
};
|
|
624
|
+
/**
|
|
625
|
+
* AuditTargetCount
|
|
626
|
+
* @description How many events in the window are about records of one type.
|
|
627
|
+
*/
|
|
628
|
+
AuditTargetCount: {
|
|
629
|
+
/** Count */
|
|
630
|
+
count: number;
|
|
631
|
+
/** Target Type */
|
|
632
|
+
target_type: string;
|
|
633
|
+
};
|
|
561
634
|
/**
|
|
562
635
|
* CurrentUser
|
|
563
636
|
* @description The authenticated caller's own identity — the ``/me`` (who-am-I) response.
|
|
@@ -1260,6 +1333,40 @@ export interface operations {
|
|
|
1260
1333
|
};
|
|
1261
1334
|
};
|
|
1262
1335
|
};
|
|
1336
|
+
"audit.read_activity": {
|
|
1337
|
+
parameters: {
|
|
1338
|
+
query?: {
|
|
1339
|
+
/** @description How many calendar days to count, ending today; the days before are counted too. */
|
|
1340
|
+
days?: number;
|
|
1341
|
+
/** @description The IANA time zone whose calendar days are counted, e.g. 'Europe/Amsterdam'. */
|
|
1342
|
+
time_zone?: string;
|
|
1343
|
+
};
|
|
1344
|
+
header?: never;
|
|
1345
|
+
path?: never;
|
|
1346
|
+
cookie?: never;
|
|
1347
|
+
};
|
|
1348
|
+
requestBody?: never;
|
|
1349
|
+
responses: {
|
|
1350
|
+
/** @description Successful Response */
|
|
1351
|
+
200: {
|
|
1352
|
+
headers: {
|
|
1353
|
+
[name: string]: unknown;
|
|
1354
|
+
};
|
|
1355
|
+
content: {
|
|
1356
|
+
"application/json": components["schemas"]["AuditActivityRead"];
|
|
1357
|
+
};
|
|
1358
|
+
};
|
|
1359
|
+
/** @description Validation Error */
|
|
1360
|
+
422: {
|
|
1361
|
+
headers: {
|
|
1362
|
+
[name: string]: unknown;
|
|
1363
|
+
};
|
|
1364
|
+
content: {
|
|
1365
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
1366
|
+
};
|
|
1367
|
+
};
|
|
1368
|
+
};
|
|
1369
|
+
};
|
|
1263
1370
|
"auth.login": {
|
|
1264
1371
|
parameters: {
|
|
1265
1372
|
query?: never;
|
|
@@ -1619,6 +1726,8 @@ export interface operations {
|
|
|
1619
1726
|
query?: {
|
|
1620
1727
|
/** @description Filter to users whose email contains this text (case-insensitive). */
|
|
1621
1728
|
email?: string | null;
|
|
1729
|
+
/** @description Filter to active accounts (true) or deactivated ones (false). */
|
|
1730
|
+
is_active?: boolean | null;
|
|
1622
1731
|
/** @description Rows to skip. */
|
|
1623
1732
|
skip?: number;
|
|
1624
1733
|
/** @description Maximum rows to return. */
|
package/src/tokens.css
CHANGED
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
--color-bg-surface: #0d1117;
|
|
304
304
|
--color-bg-raised: #161b22;
|
|
305
305
|
--color-bg-inset: #010409;
|
|
306
|
-
--color-bg-summary: #
|
|
306
|
+
--color-bg-summary: #0d1d34;
|
|
307
307
|
--color-fg-default: #e6ecf2;
|
|
308
308
|
--color-fg-muted: #d0d5db;
|
|
309
309
|
--color-fg-subtle: #b3b9bf;
|
|
@@ -423,7 +423,7 @@
|
|
|
423
423
|
--color-bg-surface: #0d1117;
|
|
424
424
|
--color-bg-raised: #161b22;
|
|
425
425
|
--color-bg-inset: #010409;
|
|
426
|
-
--color-bg-summary: #
|
|
426
|
+
--color-bg-summary: #0d1d34;
|
|
427
427
|
--color-fg-default: #e6ecf2;
|
|
428
428
|
--color-fg-muted: #d0d5db;
|
|
429
429
|
--color-fg-subtle: #b3b9bf;
|
package/src/tokens.manifest.json
CHANGED
|
@@ -430,7 +430,7 @@
|
|
|
430
430
|
"midday": "#e4edfd",
|
|
431
431
|
"twilight": "#4b3f72",
|
|
432
432
|
"evening": "#15304e",
|
|
433
|
-
"night": "#
|
|
433
|
+
"night": "#0d1d34",
|
|
434
434
|
"contrast": "#e8f0fe"
|
|
435
435
|
},
|
|
436
436
|
"themeable": true
|
|
@@ -1530,7 +1530,7 @@
|
|
|
1530
1530
|
},
|
|
1531
1531
|
{
|
|
1532
1532
|
"reading": "body",
|
|
1533
|
-
"$comment": "The summary band's fill (ADR 0169 §4) and the three inks it carries: a figure's value and label, and the accent a figure's trend line and a link are drawn in. Its own token rather than the brand's soft tint read directly, because the record leaves the fill to the theme: a palette that wants a calmer band moves this one token, and the tint the hub tiles and the selected states share stays where it is. Every theme ships it at its soft tint, except night, whose band is a
|
|
1533
|
+
"$comment": "The summary band's fill (ADR 0169 §4) and the three inks it carries: a figure's value and label, and the accent a figure's trend line and a link are drawn in. Its own token rather than the brand's soft tint read directly, because the record leaves the fill to the theme: a palette that wants a calmer band moves this one token, and the tint the hub tiles and the selected states share stays where it is. Every theme ships it at its soft tint, except night, whose band is its surface with a fifth of the brand in it: night's soft tint is a saturated navy, which made the band the loudest object on every page where in the other palettes it is the quietest fill on it, about 1.1:1 from the page. The darker band also gives every ink on it more contrast than the tint did. A figure's delta is not here: it is a pill with its own soft fill, held by the badge pairings wherever a band or a card puts it.",
|
|
1534
1534
|
"id": "body-on-summary",
|
|
1535
1535
|
"label": "body text on the summary band",
|
|
1536
1536
|
"fg": "--color-fg-default",
|
package/token-pairs.json
CHANGED
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
},
|
|
214
214
|
{
|
|
215
215
|
"reading": "body",
|
|
216
|
-
"$comment": "The summary band's fill (ADR 0169 §4) and the three inks it carries: a figure's value and label, and the accent a figure's trend line and a link are drawn in. Its own token rather than the brand's soft tint read directly, because the record leaves the fill to the theme: a palette that wants a calmer band moves this one token, and the tint the hub tiles and the selected states share stays where it is. Every theme ships it at its soft tint, except night, whose band is a
|
|
216
|
+
"$comment": "The summary band's fill (ADR 0169 §4) and the three inks it carries: a figure's value and label, and the accent a figure's trend line and a link are drawn in. Its own token rather than the brand's soft tint read directly, because the record leaves the fill to the theme: a palette that wants a calmer band moves this one token, and the tint the hub tiles and the selected states share stays where it is. Every theme ships it at its soft tint, except night, whose band is its surface with a fifth of the brand in it: night's soft tint is a saturated navy, which made the band the loudest object on every page where in the other palettes it is the quietest fill on it, about 1.1:1 from the page. The darker band also gives every ink on it more contrast than the tint did. A figure's delta is not here: it is a pill with its own soft fill, held by the badge pairings wherever a band or a card puts it.",
|
|
217
217
|
"id": "body-on-summary",
|
|
218
218
|
"label": "body text on the summary band",
|
|
219
219
|
"fg": "--color-fg-default",
|
package/tokens.night.json
CHANGED