@trismegisto/spine 2.1.1 → 3.0.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/README.md +105 -19
- package/fesm2022/trismegisto-spine-audit.mjs +264 -10
- package/fesm2022/trismegisto-spine-audit.mjs.map +1 -1
- package/fesm2022/trismegisto-spine-auto-service-apps.technical-BAKdkVdz.mjs +84 -0
- package/fesm2022/trismegisto-spine-auto-service-apps.technical-BAKdkVdz.mjs.map +1 -0
- package/fesm2022/trismegisto-spine-auto-service-apps.usage-CAXMP5r8.mjs +87 -0
- package/fesm2022/trismegisto-spine-auto-service-apps.usage-CAXMP5r8.mjs.map +1 -0
- package/fesm2022/{trismegisto-spine-auto-service-audit.technical-C901aIIQ.mjs → trismegisto-spine-auto-service-audit.technical-B75d4mh2.mjs} +6 -5
- package/fesm2022/trismegisto-spine-auto-service-audit.technical-B75d4mh2.mjs.map +1 -0
- package/fesm2022/{trismegisto-spine-auto-service-audit.usage-GIJ2RwuH.mjs → trismegisto-spine-auto-service-audit.usage-IdXMruv5.mjs} +9 -8
- package/fesm2022/trismegisto-spine-auto-service-audit.usage-IdXMruv5.mjs.map +1 -0
- package/fesm2022/{trismegisto-spine-auto-service-auto-service-audit.component-CCiz-q8o.mjs → trismegisto-spine-auto-service-auto-service-audit.component-BIL8tH1I.mjs} +4 -4
- package/fesm2022/{trismegisto-spine-auto-service-auto-service-audit.component-CCiz-q8o.mjs.map → trismegisto-spine-auto-service-auto-service-audit.component-BIL8tH1I.mjs.map} +1 -1
- package/fesm2022/{trismegisto-spine-auto-service-auto-service-client-picker.component-Z0wCANF6.mjs → trismegisto-spine-auto-service-auto-service-client-picker.component-CBt_0Uli.mjs} +3 -3
- package/fesm2022/{trismegisto-spine-auto-service-auto-service-client-picker.component-Z0wCANF6.mjs.map → trismegisto-spine-auto-service-auto-service-client-picker.component-CBt_0Uli.mjs.map} +1 -1
- package/fesm2022/{trismegisto-spine-auto-service-auto-service-client.component-C7SPavrX.mjs → trismegisto-spine-auto-service-auto-service-client.component-DAxhZC-a.mjs} +123 -27
- package/fesm2022/trismegisto-spine-auto-service-auto-service-client.component-DAxhZC-a.mjs.map +1 -0
- package/fesm2022/trismegisto-spine-auto-service-auto-service-delete-CoJYTtBU.mjs +87 -0
- package/fesm2022/trismegisto-spine-auto-service-auto-service-delete-CoJYTtBU.mjs.map +1 -0
- package/fesm2022/trismegisto-spine-auto-service-auto-service-groups.component-UVMGF7-B.mjs +544 -0
- package/fesm2022/trismegisto-spine-auto-service-auto-service-groups.component-UVMGF7-B.mjs.map +1 -0
- package/fesm2022/trismegisto-spine-auto-service-auto-service-login-attempts.component-Boi-kG0G.mjs +37 -0
- package/fesm2022/trismegisto-spine-auto-service-auto-service-login-attempts.component-Boi-kG0G.mjs.map +1 -0
- package/fesm2022/trismegisto-spine-auto-service-auto-service.component-DmLafUkX.mjs +943 -0
- package/fesm2022/trismegisto-spine-auto-service-auto-service.component-DmLafUkX.mjs.map +1 -0
- package/fesm2022/{trismegisto-spine-auto-service-client.technical-BHWhpyWv.mjs → trismegisto-spine-auto-service-client.technical-DP5G8i3o.mjs} +24 -3
- package/fesm2022/trismegisto-spine-auto-service-client.technical-DP5G8i3o.mjs.map +1 -0
- package/fesm2022/{trismegisto-spine-auto-service-client.usage-CM2WB2e2.mjs → trismegisto-spine-auto-service-client.usage-CcJANb20.mjs} +15 -6
- package/fesm2022/trismegisto-spine-auto-service-client.usage-CcJANb20.mjs.map +1 -0
- package/fesm2022/trismegisto-spine-auto-service-groups.technical-BlktCM70.mjs +65 -0
- package/fesm2022/trismegisto-spine-auto-service-groups.technical-BlktCM70.mjs.map +1 -0
- package/fesm2022/trismegisto-spine-auto-service-groups.usage-Cz5sCKgn.mjs +81 -0
- package/fesm2022/trismegisto-spine-auto-service-groups.usage-Cz5sCKgn.mjs.map +1 -0
- package/fesm2022/{trismegisto-spine-auto-service-home.component-vl3BPFnk.mjs → trismegisto-spine-auto-service-home.component-5_aji1hf.mjs} +5 -4
- package/fesm2022/trismegisto-spine-auto-service-home.component-5_aji1hf.mjs.map +1 -0
- package/fesm2022/trismegisto-spine-auto-service-login-attempts.technical-CasKIIws.mjs +37 -0
- package/fesm2022/trismegisto-spine-auto-service-login-attempts.technical-CasKIIws.mjs.map +1 -0
- package/fesm2022/trismegisto-spine-auto-service-login-attempts.usage-BMgLNu7W.mjs +60 -0
- package/fesm2022/trismegisto-spine-auto-service-login-attempts.usage-BMgLNu7W.mjs.map +1 -0
- package/fesm2022/trismegisto-spine-auto-service.mjs +49 -29
- package/fesm2022/trismegisto-spine-auto-service.mjs.map +1 -1
- package/fesm2022/trismegisto-spine-layout.mjs +1850 -217
- package/fesm2022/trismegisto-spine-layout.mjs.map +1 -1
- package/fesm2022/trismegisto-spine-shell.mjs +28 -8
- package/fesm2022/trismegisto-spine-shell.mjs.map +1 -1
- package/fesm2022/trismegisto-spine.mjs +1163 -87
- package/fesm2022/trismegisto-spine.mjs.map +1 -1
- package/package.json +6 -6
- package/types/trismegisto-spine-audit.d.ts +180 -5
- package/types/trismegisto-spine-audit.d.ts.map +1 -1
- package/types/trismegisto-spine-auto-service.d.ts +100 -7
- package/types/trismegisto-spine-auto-service.d.ts.map +1 -1
- package/types/trismegisto-spine-layout.d.ts +885 -22
- package/types/trismegisto-spine-layout.d.ts.map +1 -1
- package/types/trismegisto-spine-shell.d.ts +11 -2
- package/types/trismegisto-spine-shell.d.ts.map +1 -1
- package/types/trismegisto-spine.d.ts +496 -34
- package/types/trismegisto-spine.d.ts.map +1 -1
- package/fesm2022/trismegisto-spine-auto-service-apps.technical-ClMKB9cK.mjs +0 -48
- package/fesm2022/trismegisto-spine-auto-service-apps.technical-ClMKB9cK.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-apps.usage-Cf5SG-oQ.mjs +0 -55
- package/fesm2022/trismegisto-spine-auto-service-apps.usage-Cf5SG-oQ.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-audit.technical-C901aIIQ.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-audit.usage-GIJ2RwuH.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-auto-service-client.component-C7SPavrX.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-auto-service-delete-6Bk46MOf.mjs +0 -39
- package/fesm2022/trismegisto-spine-auto-service-auto-service-delete-6Bk46MOf.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-auto-service-groups.component-CqIVe2LU.mjs +0 -357
- package/fesm2022/trismegisto-spine-auto-service-auto-service-groups.component-CqIVe2LU.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-auto-service.component-BLN49F4a.mjs +0 -502
- package/fesm2022/trismegisto-spine-auto-service-auto-service.component-BLN49F4a.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-client.technical-BHWhpyWv.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-client.usage-CM2WB2e2.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-groups.technical-jQlwaQPn.mjs +0 -39
- package/fesm2022/trismegisto-spine-auto-service-groups.technical-jQlwaQPn.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-groups.usage-Bh7ig2zZ.mjs +0 -54
- package/fesm2022/trismegisto-spine-auto-service-groups.usage-Bh7ig2zZ.mjs.map +0 -1
- package/fesm2022/trismegisto-spine-auto-service-home.component-vl3BPFnk.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trismegisto/spine",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": ">=21.0.0",
|
|
7
7
|
"@angular/core": ">=21.0.0",
|
|
8
8
|
"@angular/router": ">=21.0.0",
|
|
9
9
|
"@orfeu/angular": "^1.0.0",
|
|
10
|
-
"@trismegisto/angular": "^
|
|
11
|
-
"@trismegisto/core": "^
|
|
12
|
-
"@trismegisto/icons": "^
|
|
13
|
-
"@trismegisto/primitives": "^
|
|
14
|
-
"@trismegisto/tokens": "^
|
|
10
|
+
"@trismegisto/angular": "^3.0.0",
|
|
11
|
+
"@trismegisto/core": "^3.0.0",
|
|
12
|
+
"@trismegisto/icons": "^3.0.0",
|
|
13
|
+
"@trismegisto/primitives": "^3.0.0",
|
|
14
|
+
"@trismegisto/tokens": "^3.0.0",
|
|
15
15
|
"rxjs": "^7.0.0",
|
|
16
16
|
"@apollo/client": "^4.2.0",
|
|
17
17
|
"apollo-angular": "^14.2.0",
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { HttpParams } from '@angular/common/http';
|
|
2
|
+
import * as _trismegisto_primitives from '@trismegisto/primitives';
|
|
3
|
+
import { DateRange, PluralMessage, formatMessage, PaginationState } from '@trismegisto/primitives';
|
|
2
4
|
import * as _angular_core from '@angular/core';
|
|
3
5
|
import { WritableSignal } from '@angular/core';
|
|
4
6
|
import * as _trismegisto_spine_audit from '@trismegisto/spine/audit';
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import { SegmentedOption, FilterBarField, StateScreenSituation, DataGridColumn, FilterBarValue, TagColor } from '@trismegisto/angular';
|
|
7
|
+
import { SegmentedOption, FilterBarField, StateScreenSituation, DataGridColumn, FilterBarValue, TagColor, ComboboxOption, DataGridRowAction, DataGridActionTriggered } from '@trismegisto/angular';
|
|
8
|
+
import { FormGroup, FormControl } from '@angular/forms';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Leitura da auditoria (`audit.events`) do argos admin-server, nos dois escopos:
|
|
@@ -299,6 +300,71 @@ declare function auditErrorCode(err: unknown): {
|
|
|
299
300
|
detail: string;
|
|
300
301
|
};
|
|
301
302
|
|
|
303
|
+
/** Métodos gravados pelo argos auth-server em `auth.auth_attempts.method`. */
|
|
304
|
+
declare const LOGIN_ATTEMPT_METHODS: readonly ["local", "mfa", "github", "google", "keycloak", "entraid"];
|
|
305
|
+
declare const LOGIN_ATTEMPT_RESULTS: readonly ["success", "failure", "cancelled"];
|
|
306
|
+
/** Códigos de `auth.auth_attempts.reason` que a tela traduz; código desconhecido aparece como veio. */
|
|
307
|
+
declare const LOGIN_ATTEMPT_REASONS: readonly ["bad_password", "unknown_user", "locked", "mfa_failed", "mfa_expired", "mfa_not_allowed", "mfa_invalid_method", "recovery_failed", "recovery_refused", "not_linked", "wrong_realm"];
|
|
308
|
+
type LoginAttemptMethod = typeof LOGIN_ATTEMPT_METHODS[number];
|
|
309
|
+
type LoginAttemptResult = typeof LOGIN_ATTEMPT_RESULTS[number];
|
|
310
|
+
type LoginAttemptReason = typeof LOGIN_ATTEMPT_REASONS[number];
|
|
311
|
+
/** Uma tentativa de login (`GET /admin/attempts` ou `/auto-service/:clientId/attempts`). Datas em ISO UTC. */
|
|
312
|
+
interface LoginAttempt {
|
|
313
|
+
id: string;
|
|
314
|
+
created_at: string;
|
|
315
|
+
realm_id: string;
|
|
316
|
+
realm_name: string | null;
|
|
317
|
+
client_id: string | null;
|
|
318
|
+
client_name: string | null;
|
|
319
|
+
user_id: string | null;
|
|
320
|
+
user_username: string | null;
|
|
321
|
+
user_name: string | null;
|
|
322
|
+
user_email: string | null;
|
|
323
|
+
/** Identificador digitado no login local (pode não ser de usuário nenhum). */
|
|
324
|
+
username: string | null;
|
|
325
|
+
method: LoginAttemptMethod;
|
|
326
|
+
result: LoginAttemptResult;
|
|
327
|
+
reason: string | null;
|
|
328
|
+
ip: string | null;
|
|
329
|
+
user_agent: string | null;
|
|
330
|
+
}
|
|
331
|
+
interface LoginAttemptList {
|
|
332
|
+
items: LoginAttempt[];
|
|
333
|
+
total: number;
|
|
334
|
+
page: number;
|
|
335
|
+
limit: number;
|
|
336
|
+
}
|
|
337
|
+
interface LoginAttemptQuery {
|
|
338
|
+
page: number;
|
|
339
|
+
limit: number;
|
|
340
|
+
/** ISO-8601. */
|
|
341
|
+
from?: string;
|
|
342
|
+
to?: string;
|
|
343
|
+
/** Só no escopo `admin` (no `client` o servidor usa o realm do client). */
|
|
344
|
+
realm?: string;
|
|
345
|
+
user?: string;
|
|
346
|
+
ip?: string;
|
|
347
|
+
method?: LoginAttemptMethod;
|
|
348
|
+
result?: LoginAttemptResult;
|
|
349
|
+
reason?: string;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Endpoint das tentativas no escopo: `{adminApi}/admin/attempts` (todos os realms, operação `admin:attempts:list`) ou
|
|
353
|
+
* `{adminApi}/auto-service/:clientId/attempts` (só as do client, recorte feito no servidor).
|
|
354
|
+
*/
|
|
355
|
+
declare function loginAttemptsUrl(adminApi: string | null | undefined, scope: SpineAuditScope, clientId?: string | null): string | null;
|
|
356
|
+
/** Query string da listagem: só os campos com valor. */
|
|
357
|
+
declare function loginAttemptParams(query: LoginAttemptQuery): HttpParams;
|
|
358
|
+
/** Dia local AAAA-MM-DD (o valor do `hm-date-range-picker`). */
|
|
359
|
+
declare function isoDay(d: Date): string;
|
|
360
|
+
/** Período padrão: os últimos 7 dias, hoje incluído. */
|
|
361
|
+
declare function defaultAttemptsPeriod(today?: Date): DateRange;
|
|
362
|
+
/** Dias locais do período -> janela ISO [início do primeiro dia, início do dia seguinte ao último). */
|
|
363
|
+
declare function attemptsPeriodToWindow(range: DateRange | null): {
|
|
364
|
+
from?: string;
|
|
365
|
+
to?: string;
|
|
366
|
+
};
|
|
367
|
+
|
|
302
368
|
/**
|
|
303
369
|
* HTTP da auditoria (só leitura), igual nos dois escopos: cada método recebe a `base` já resolvida
|
|
304
370
|
* por `auditApiBase` (`{adminApi}/admin/audit` ou `{adminApi}/auto-service/:clientId/audit`). O
|
|
@@ -336,6 +402,8 @@ declare class SpineAuditService {
|
|
|
336
402
|
name: string;
|
|
337
403
|
}[];
|
|
338
404
|
}>;
|
|
405
|
+
/** Uma página das tentativas de login (`url` = `loginAttemptsUrl`), mais recentes primeiro, com o total do filtro. */
|
|
406
|
+
loginAttempts(url: string, query: LoginAttemptQuery): Promise<LoginAttemptList>;
|
|
339
407
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SpineAuditService, never>;
|
|
340
408
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SpineAuditService>;
|
|
341
409
|
}
|
|
@@ -943,6 +1011,113 @@ declare class SpineAuditComponent {
|
|
|
943
1011
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SpineAuditComponent, "spine-audit", never, { "scope": { "alias": "scope"; "required": true; "isSignal": true; }; "clientId": { "alias": "clientId"; "required": false; "isSignal": true; }; "adminApi": { "alias": "adminApi"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
944
1012
|
}
|
|
945
1013
|
|
|
946
|
-
|
|
947
|
-
|
|
1014
|
+
/** Tentativas por página, de saída (o servidor aceita até 200). */
|
|
1015
|
+
declare const LOGIN_ATTEMPTS_PAGE_SIZE = 50;
|
|
1016
|
+
declare const LOGIN_ATTEMPTS_PAGE_SIZES: readonly number[];
|
|
1017
|
+
interface FiltersControls {
|
|
1018
|
+
period: FormControl<DateRange>;
|
|
1019
|
+
user: FormControl<string>;
|
|
1020
|
+
ip: FormControl<string>;
|
|
1021
|
+
result: FormControl<'' | LoginAttemptResult>;
|
|
1022
|
+
method: FormControl<'' | LoginAttemptMethod>;
|
|
1023
|
+
reason: FormControl<string>;
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* A tela de Tentativas de login (`auth.auth_attempts` do argos): quando, quem (usuário ou o que foi digitado), de qual
|
|
1027
|
+
* IP e navegador, por qual método, com que resultado e, nas falhas, o motivo. Só leitura, com filtros e paginação no
|
|
1028
|
+
* servidor. A mesma no painel central e no auto-serviço; só muda o escopo:
|
|
1029
|
+
* - `scope="client"` + `clientId`: `{adminApi}/auto-service/:clientId/attempts`, só as tentativas na aplicação do
|
|
1030
|
+
* client (recorte feito no servidor) -- sem as colunas Realm e Client;
|
|
1031
|
+
* - `scope="admin"`: `{adminApi}/admin/attempts`, todos os realms (operação `admin:attempts:list`); `realmId` filtra.
|
|
1032
|
+
* `adminApi` vem do input ou do `SPINE_ADMIN_API` (que o `provideAutoService` já fornece).
|
|
1033
|
+
*
|
|
1034
|
+
* Importe só de código carregado sob demanda (rota lazy, `import()`), como a `SpineAuditComponent`.
|
|
1035
|
+
*/
|
|
1036
|
+
declare class SpineLoginAttemptsComponent {
|
|
1037
|
+
/** `admin` = painel central (todos os realms); `client` = só as tentativas na aplicação do `clientId`. */
|
|
1038
|
+
readonly scope: _angular_core.InputSignal<SpineAuditScope>;
|
|
1039
|
+
/** Obrigatório com `scope="client"`. */
|
|
1040
|
+
readonly clientId: _angular_core.InputSignal<string | null>;
|
|
1041
|
+
/** Só no escopo `admin`: filtra por realm (vazio = todos). */
|
|
1042
|
+
readonly realmId: _angular_core.InputSignal<string | null>;
|
|
1043
|
+
/** Base do argos admin-server; sem ele, vale o `SPINE_ADMIN_API`. */
|
|
1044
|
+
readonly adminApi: _angular_core.InputSignal<string | null>;
|
|
1045
|
+
private readonly service;
|
|
1046
|
+
private readonly tokenApi;
|
|
1047
|
+
private readonly messages;
|
|
1048
|
+
protected readonly text: {
|
|
1049
|
+
refresh: string;
|
|
1050
|
+
user: string;
|
|
1051
|
+
userPlaceholder: string;
|
|
1052
|
+
period: string;
|
|
1053
|
+
result: string;
|
|
1054
|
+
method: string;
|
|
1055
|
+
all: string;
|
|
1056
|
+
clear: string;
|
|
1057
|
+
advancedFilters: string;
|
|
1058
|
+
ip: string;
|
|
1059
|
+
ipPlaceholder: string;
|
|
1060
|
+
ipHint: string;
|
|
1061
|
+
reason: string;
|
|
1062
|
+
caption: string;
|
|
1063
|
+
pageItems: string;
|
|
1064
|
+
pageSize: string;
|
|
1065
|
+
colDate: string;
|
|
1066
|
+
colResult: string;
|
|
1067
|
+
colMethod: string;
|
|
1068
|
+
colUser: string;
|
|
1069
|
+
colReason: string;
|
|
1070
|
+
colIp: string;
|
|
1071
|
+
colRealm: string;
|
|
1072
|
+
colClient: string;
|
|
1073
|
+
colUserAgent: string;
|
|
1074
|
+
filterByIp: string;
|
|
1075
|
+
filterByUser: string;
|
|
1076
|
+
noMatchingUser: string;
|
|
1077
|
+
methods: Record<"local" | "mfa" | "github" | "google" | "keycloak" | "entraid", string>;
|
|
1078
|
+
results: Record<"success" | "failure" | "cancelled", string>;
|
|
1079
|
+
reasons: Record<"bad_password" | "unknown_user" | "locked" | "mfa_failed" | "mfa_expired" | "mfa_not_allowed" | "mfa_invalid_method" | "recovery_failed" | "recovery_refused" | "not_linked" | "wrong_realm", string>;
|
|
1080
|
+
forbiddenAdmin: string;
|
|
1081
|
+
forbiddenClient: string;
|
|
1082
|
+
loadErrorDetail: string;
|
|
1083
|
+
loadError: string;
|
|
1084
|
+
};
|
|
1085
|
+
private readonly dateFormat;
|
|
1086
|
+
protected readonly url: _angular_core.Signal<string | null>;
|
|
1087
|
+
readonly attempts: _angular_core.WritableSignal<readonly LoginAttempt[]>;
|
|
1088
|
+
readonly total: _angular_core.WritableSignal<number>;
|
|
1089
|
+
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
1090
|
+
readonly loadError: _angular_core.WritableSignal<string | null>;
|
|
1091
|
+
readonly pageState: _angular_core.WritableSignal<PaginationState>;
|
|
1092
|
+
readonly showAdvancedFilters: _angular_core.WritableSignal<boolean>;
|
|
1093
|
+
protected readonly pageSizes: readonly number[];
|
|
1094
|
+
private readonly all;
|
|
1095
|
+
protected readonly resultOptions: readonly ComboboxOption[];
|
|
1096
|
+
protected readonly methodOptions: readonly ComboboxOption[];
|
|
1097
|
+
protected readonly reasonOptions: readonly ComboboxOption[];
|
|
1098
|
+
protected readonly periodPresets: readonly ["today", "last7Days", "last30Days", "thisMonth", "lastMonth"];
|
|
1099
|
+
readonly filtersForm: FormGroup<FiltersControls>;
|
|
1100
|
+
protected readonly columns: _angular_core.Signal<readonly DataGridColumn<LoginAttempt>[]>;
|
|
1101
|
+
protected readonly rowActions: readonly DataGridRowAction<LoginAttempt>[];
|
|
1102
|
+
protected readonly rowId: (a: LoginAttempt) => string;
|
|
1103
|
+
/** Só a resposta da consulta mais recente vale (filtros mudam enquanto outra ainda está em andamento). */
|
|
1104
|
+
private requestSeq;
|
|
1105
|
+
constructor();
|
|
1106
|
+
protected methodLabel(method: string): string;
|
|
1107
|
+
protected resultLabel(result: string): string;
|
|
1108
|
+
protected resultColor(result: string): 'success' | 'danger' | 'neutral';
|
|
1109
|
+
protected reasonLabel(code: string | null): string;
|
|
1110
|
+
protected formatDate(iso: string): string;
|
|
1111
|
+
onPageStateChange(state: PaginationState): void;
|
|
1112
|
+
applyFilters(): void;
|
|
1113
|
+
clearFilters(): void;
|
|
1114
|
+
onRowAction(event: DataGridActionTriggered<LoginAttempt>): void;
|
|
1115
|
+
load(page?: number, size?: number): Promise<void>;
|
|
1116
|
+
private errorMessage;
|
|
1117
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SpineLoginAttemptsComponent, never>;
|
|
1118
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SpineLoginAttemptsComponent, "spine-login-attempts", never, { "scope": { "alias": "scope"; "required": true; "isSignal": true; }; "clientId": { "alias": "clientId"; "required": false; "isSignal": true; }; "realmId": { "alias": "realmId"; "required": false; "isSignal": true; }; "adminApi": { "alias": "adminApi"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
export { AUDIT_AUTO_REFRESH_MS, AUDIT_MAX_PAGE_SIZE, AUDIT_MAX_WINDOW_MS, AUDIT_METHODS, AUDIT_OUTCOMES, AUDIT_PAGE_SIZE, AUDIT_PAGE_SIZES, AUDIT_PERIOD_MS, AUDIT_TOP_KINDS, AUDIT_TOP_PAGE_SIZE, AUDIT_UNITS, AuditCursorPager, LOGIN_ATTEMPTS_PAGE_SIZE, LOGIN_ATTEMPTS_PAGE_SIZES, LOGIN_ATTEMPT_METHODS, LOGIN_ATTEMPT_REASONS, LOGIN_ATTEMPT_RESULTS, SpineAuditComponent, SpineAuditService, SpineAuditTopCardComponent, SpineLoginAttemptsComponent, attemptsPeriodToWindow, auditApiBase, auditAppsUrl, auditErrorCode, auditPagerTotal, auditParams, buildAuditQuery, buildSpanTimeline, defaultAttemptsPeriod, isoDay, loginAttemptParams, loginAttemptsUrl, parseAuditDate, worstOutcome };
|
|
1122
|
+
export type { AuditAction, AuditActionPage, AuditActorType, AuditEvent, AuditEventDetail, AuditFilterInput, AuditLevel, AuditMethod, AuditOutcome, AuditPage, AuditPageFetcher, AuditPagerResult, AuditPeriod, AuditPermissionResult, AuditQuery, AuditSpanRow, AuditSpanTimeline, AuditStats, AuditTopItem, AuditTopKind, AuditTopPage, AuditTopRow, AuditTrace, AuditUnit, BuiltAuditQuery, LoginAttempt, LoginAttemptList, LoginAttemptMethod, LoginAttemptQuery, LoginAttemptReason, LoginAttemptResult, SpineAuditScope };
|
|
948
1123
|
//# sourceMappingURL=trismegisto-spine-audit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trismegisto-spine-audit.d.ts","sources":["../../../projects/ui/audit/src/audit.model.ts","../../../projects/ui/audit/src/audit.service.ts","../../../projects/ui/audit/src/audit-top-card.component.ts","../../../projects/ui/audit/src/audit.component.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"trismegisto-spine-audit.d.ts","sources":["../../../projects/ui/audit/src/audit.model.ts","../../../projects/ui/audit/src/login-attempts.model.ts","../../../projects/ui/audit/src/audit.service.ts","../../../projects/ui/audit/src/audit-top-card.component.ts","../../../projects/ui/audit/src/audit.component.ts","../../../projects/ui/audit/src/login-attempts.component.ts"],"mappings":";;;;;;;;;AAAA;;;;;;;;;;AAUG;;AAGG,KAAM,YAAY;AAClB,KAAM,WAAW;AACjB,KAAM,UAAU;AAChB,KAAM,qBAAqB;AAC3B,KAAM,cAAc;AAE1B,cAAa,aAAa,WAAW,WAAW;AAChD,cAAa,cAAc,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AEjB;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACsD;AACtD;AAEA,4BAAsB,aAAA,CAAA,MAAA;uBAEL,aAAA,CAAA,cAAA,UAAA,YAAA;oBACH,aAAA,CAAA,cAAA;sBACE,aAAA,CAAA,cAAA;wBACE,aAAA,CAAA,cAAA;wBACA,aAAA,CAAA,cAAA,CAAA,eAAA;kCACU,aAAA,CAAA,cAAA;AAC5B;AAEA;+CAC2C,cAAc;+CAGd,cAAc;+CAGd,cAAc;AAGzD;0BAEoB,SAAA,CAAA,eAAA;AASpB,gCAA0B,aAAA,CAAA,MAAA,UAAA,cAAA,CAAA,YAAA;4CAoBc,iBAAiB,CAAC,YAAY;AAKtE,kCAA+B,YAAY;;;;AAqB3C;AAIA;;;AAaA;6BAKyB,eAAe;;;AAaxC,uBAAmB,uBAAuB,CAAC,YAAY;AAcjD,wCAA2C,OAAA;AAqCjD;oDAnLW,2BAA2B;sDAA3B,2BAA2B;AAyLvC;;","names":[]}
|
|
@@ -12,16 +12,17 @@ declare const AUTO_SERVICE_GROUPS_TEMPLATE_ROUTER_ID = "ad100001-0000-4000-8000-
|
|
|
12
12
|
declare const AUTO_SERVICE_APPS_TEMPLATE_ROUTER_ID = "ad100002-0000-4000-8000-000000000001";
|
|
13
13
|
declare const AUTO_SERVICE_CLIENT_TEMPLATE_ROUTER_ID = "ad100003-0000-4000-8000-000000000001";
|
|
14
14
|
declare const AUTO_SERVICE_AUDIT_TEMPLATE_ROUTER_ID = "ad100004-0000-4000-8000-000000000001";
|
|
15
|
+
declare const AUTO_SERVICE_LOGIN_ATTEMPTS_TEMPLATE_ROUTER_ID = "ad100005-0000-4000-8000-000000000001";
|
|
15
16
|
declare const AUTO_SERVICE_HOME_TEMPLATE_ROUTER_ID = "6a9a13db-f31b-494e-b51c-79af0ac28b60";
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
|
-
* As
|
|
19
|
+
* As 6 telas do auto-serviço, carregadas sob demanda. Cada `import()` relativo vira um chunk próprio no
|
|
19
20
|
* FESM publicado (`trismegisto-spine-auto-service-<tela>-<hash>.mjs`), que o bundler do app mantém fora
|
|
20
21
|
* do carregamento inicial. Não exporte as telas no `public-api.ts` (ver o comentário lá).
|
|
21
22
|
*/
|
|
22
|
-
declare const AUTO_SERVICE_SCREENS: Readonly<Record<'home' | 'groups' | 'apps' | 'client' | 'audit', () => Promise<Type<unknown>>>>;
|
|
23
|
+
declare const AUTO_SERVICE_SCREENS: Readonly<Record<'home' | 'groups' | 'apps' | 'client' | 'audit' | 'loginAttempts', () => Promise<Type<unknown>>>>;
|
|
23
24
|
/**
|
|
24
|
-
* Documentação das
|
|
25
|
+
* Documentação das 6 telas (botão de documentação da barra da página e índice "Documentação do sistema"): o manual
|
|
25
26
|
* de uso (`load`) e a especificação técnica (`loadTechnical`, só com `SpineConfig.technicalDocs`). O Markdown fica em
|
|
26
27
|
* módulos `.ts` próprios em `./docs/` (o ng-packagr não carrega `.md` como texto), cada um atrás de um `import()`
|
|
27
28
|
* relativo: vira um chunk à parte no FESM e só é baixado quando alguém abre o documento. Sem `title`/`group`: o
|
|
@@ -49,6 +50,79 @@ interface RouterOrderGroup {
|
|
|
49
50
|
type: RouterOrderType;
|
|
50
51
|
router_ids: string[];
|
|
51
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Grupo do projeto do client (`GET /groups`). O grupo de administração do projeto (`is_admin`) é gerido só no painel
|
|
55
|
+
* central e o servidor não o devolve aqui; servidor antigo ainda devolve com `is_admin: true` e as telas descartam.
|
|
56
|
+
*/
|
|
57
|
+
interface AutoServiceGroup {
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
description: string | null;
|
|
61
|
+
enabled: boolean;
|
|
62
|
+
is_admin?: boolean;
|
|
63
|
+
type: {
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
level: number;
|
|
67
|
+
} | null;
|
|
68
|
+
}
|
|
69
|
+
/** Tipo de grupo (crachá) do realm (`GET /group-types`). */
|
|
70
|
+
interface AutoServiceGroupType {
|
|
71
|
+
id: string;
|
|
72
|
+
name: string;
|
|
73
|
+
level: number;
|
|
74
|
+
assignable: boolean;
|
|
75
|
+
}
|
|
76
|
+
/** Corpo de `POST /groups` (o projeto é sempre o do client). */
|
|
77
|
+
interface AutoServiceGroupCreate {
|
|
78
|
+
name: string;
|
|
79
|
+
type_id: string;
|
|
80
|
+
description?: string;
|
|
81
|
+
}
|
|
82
|
+
/** Corpo de `PUT /groups/:groupId`; do grupo de administração só `description`. `null` apaga a descrição. */
|
|
83
|
+
interface AutoServiceGroupUpdate {
|
|
84
|
+
name?: string;
|
|
85
|
+
type_id?: string;
|
|
86
|
+
description?: string | null;
|
|
87
|
+
enabled?: boolean;
|
|
88
|
+
}
|
|
89
|
+
/** Aplicação (client_credentials) do projeto do client (`GET /apps`). */
|
|
90
|
+
interface AutoServiceApp {
|
|
91
|
+
id: string;
|
|
92
|
+
name: string;
|
|
93
|
+
enabled: boolean;
|
|
94
|
+
allowed_grants?: string[] | null;
|
|
95
|
+
[key: string]: unknown;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Token de API (`x-api-token`) de uma aplicação (`GET /apps/:appId/tokens`). O valor só vem na criação; aqui fica o
|
|
99
|
+
* começo dele (`token_prefix`) para reconhecer. Cada token é também um consumer (`consumer_id`) com as permissões dele.
|
|
100
|
+
*/
|
|
101
|
+
interface AutoServiceAppToken {
|
|
102
|
+
id: string;
|
|
103
|
+
consumer_id: string;
|
|
104
|
+
name: string;
|
|
105
|
+
description: string | null;
|
|
106
|
+
token_prefix: string;
|
|
107
|
+
expires_at: string;
|
|
108
|
+
revoked_at: string | null;
|
|
109
|
+
created_at: string;
|
|
110
|
+
last_used_at: string | null;
|
|
111
|
+
}
|
|
112
|
+
/** Corpo de `POST /apps/:appId/tokens`: validade ISO (até 365 dias) e as operações protected liberadas ao token. */
|
|
113
|
+
interface AutoServiceAppTokenCreate {
|
|
114
|
+
name: string;
|
|
115
|
+
description?: string;
|
|
116
|
+
expires_at: string;
|
|
117
|
+
operation_ids?: string[];
|
|
118
|
+
}
|
|
119
|
+
/** Resposta de `POST /apps/:appId/tokens`: `token` é o valor cru, devolvido uma única vez. */
|
|
120
|
+
interface AutoServiceAppTokenCreated {
|
|
121
|
+
id: string;
|
|
122
|
+
consumer_id: string;
|
|
123
|
+
name: string;
|
|
124
|
+
token: string;
|
|
125
|
+
}
|
|
52
126
|
declare class AutoServiceService {
|
|
53
127
|
private http;
|
|
54
128
|
private auth;
|
|
@@ -83,8 +157,15 @@ declare class AutoServiceService {
|
|
|
83
157
|
*/
|
|
84
158
|
reorderRouters(clientId: string, groups: RouterOrderGroup[]): Promise<any>;
|
|
85
159
|
getGroups(clientId: string): Promise<{
|
|
86
|
-
groups:
|
|
160
|
+
groups: AutoServiceGroup[];
|
|
87
161
|
}>;
|
|
162
|
+
/** Tipos (crachás) do realm; `assignable: false` no Administrador, que é só do grupo de administração (painel central). */
|
|
163
|
+
getGroupTypes(clientId: string): Promise<{
|
|
164
|
+
group_types: AutoServiceGroupType[];
|
|
165
|
+
}>;
|
|
166
|
+
createGroup(clientId: string, body: AutoServiceGroupCreate): Promise<AutoServiceGroup>;
|
|
167
|
+
updateGroup(clientId: string, groupId: string, body: AutoServiceGroupUpdate): Promise<AutoServiceGroup>;
|
|
168
|
+
deleteGroup(clientId: string, groupId: string): Promise<void>;
|
|
88
169
|
getGroupMembers(clientId: string, groupId: string): Promise<{
|
|
89
170
|
members: any[];
|
|
90
171
|
}>;
|
|
@@ -108,7 +189,7 @@ declare class AutoServiceService {
|
|
|
108
189
|
addGuard(clientId: string, accessId: string, routerId: string): Promise<any>;
|
|
109
190
|
removeGuard(clientId: string, accessId: string, guardId: string): Promise<any>;
|
|
110
191
|
getApps(clientId: string): Promise<{
|
|
111
|
-
apps:
|
|
192
|
+
apps: AutoServiceApp[];
|
|
112
193
|
}>;
|
|
113
194
|
createApp(clientId: string, body: {
|
|
114
195
|
name: string;
|
|
@@ -119,10 +200,22 @@ declare class AutoServiceService {
|
|
|
119
200
|
secret: string;
|
|
120
201
|
}>;
|
|
121
202
|
updateApp(clientId: string, appId: string, body: any): Promise<any>;
|
|
203
|
+
/** Gera um segredo novo para a aplicação (o anterior para de valer na hora). A resposta traz o segredo uma única vez. */
|
|
204
|
+
rotateAppSecret(clientId: string, appId: string): Promise<{
|
|
205
|
+
id: string;
|
|
206
|
+
secret: string;
|
|
207
|
+
}>;
|
|
122
208
|
deleteApp(clientId: string, appId: string): Promise<any>;
|
|
123
209
|
getAppOperations(clientId: string, appId: string): Promise<{
|
|
124
210
|
operations: any[];
|
|
125
211
|
}>;
|
|
212
|
+
getAppTokens(clientId: string, appId: string): Promise<{
|
|
213
|
+
tokens: AutoServiceAppToken[];
|
|
214
|
+
}>;
|
|
215
|
+
/** Cria o token (e o consumer dele, com as permissões escolhidas). A resposta traz o valor uma única vez. */
|
|
216
|
+
createAppToken(clientId: string, appId: string, body: AutoServiceAppTokenCreate): Promise<AutoServiceAppTokenCreated>;
|
|
217
|
+
/** Revoga: o token para de valer na hora e continua na lista como revogado. */
|
|
218
|
+
revokeAppToken(clientId: string, appId: string, tokenId: string): Promise<void>;
|
|
126
219
|
getAppConsumers(clientId: string, appId: string): Promise<{
|
|
127
220
|
consumers: any[];
|
|
128
221
|
}>;
|
|
@@ -144,6 +237,6 @@ interface AutoServiceClient {
|
|
|
144
237
|
realm_id: string;
|
|
145
238
|
}
|
|
146
239
|
|
|
147
|
-
export { AUTO_SERVICE_APPS_TEMPLATE_ROUTER_ID, AUTO_SERVICE_AUDIT_TEMPLATE_ROUTER_ID, AUTO_SERVICE_CLIENT_TEMPLATE_ROUTER_ID, AUTO_SERVICE_CONFIG, AUTO_SERVICE_DOCUMENTS, AUTO_SERVICE_GROUPS_TEMPLATE_ROUTER_ID, AUTO_SERVICE_HOME_TEMPLATE_ROUTER_ID, AUTO_SERVICE_SCREENS, AutoServiceService, provideAutoService };
|
|
148
|
-
export type { AutoServiceClient, AutoServiceConfig, RouterOrderGroup, RouterOrderNode, RouterOrderType };
|
|
240
|
+
export { AUTO_SERVICE_APPS_TEMPLATE_ROUTER_ID, AUTO_SERVICE_AUDIT_TEMPLATE_ROUTER_ID, AUTO_SERVICE_CLIENT_TEMPLATE_ROUTER_ID, AUTO_SERVICE_CONFIG, AUTO_SERVICE_DOCUMENTS, AUTO_SERVICE_GROUPS_TEMPLATE_ROUTER_ID, AUTO_SERVICE_HOME_TEMPLATE_ROUTER_ID, AUTO_SERVICE_LOGIN_ATTEMPTS_TEMPLATE_ROUTER_ID, AUTO_SERVICE_SCREENS, AutoServiceService, provideAutoService };
|
|
241
|
+
export type { AutoServiceApp, AutoServiceAppToken, AutoServiceAppTokenCreate, AutoServiceAppTokenCreated, AutoServiceClient, AutoServiceConfig, AutoServiceGroup, AutoServiceGroupCreate, AutoServiceGroupType, AutoServiceGroupUpdate, RouterOrderGroup, RouterOrderNode, RouterOrderType };
|
|
149
242
|
//# sourceMappingURL=trismegisto-spine-auto-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trismegisto-spine-auto-service.d.ts","sources":["../../../projects/ui/auto-service/src/auto-service.tokens.ts","../../../projects/ui/auto-service/src/provide-auto-service.ts","../../../projects/ui/auto-service/src/auto-service.service.ts","../../../projects/ui/auto-service/src/client-picker/auto-service-client-picker.component.ts"],"mappings":";;;;;;UAEiB,iBAAiB;;AAKjC;AAED,cAAa,mBAAmB,EAAA,cAAA,CAAA,iBAAA;AAWhC,cAAa,sCAAsC;AACnD,cAAa,oCAAoC;AACjD,cAAa,sCAAsC;
|
|
1
|
+
{"version":3,"file":"trismegisto-spine-auto-service.d.ts","sources":["../../../projects/ui/auto-service/src/auto-service.tokens.ts","../../../projects/ui/auto-service/src/provide-auto-service.ts","../../../projects/ui/auto-service/src/auto-service.service.ts","../../../projects/ui/auto-service/src/client-picker/auto-service-client-picker.component.ts"],"mappings":";;;;;;UAEiB,i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