evo360-types 1.3.656 → 1.3.662
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/dist/apps/evo-csq/zod-schemas.d.ts +40 -40
- package/dist/apps/evo-modules/zod-schemas.d.ts +446 -0
- package/dist/apps/evo-modules/zod-schemas.js +143 -0
- package/dist/apps/evo-modules/zod-schemas.ts +153 -0
- package/dist/apps/evo-task/zod-schemas.d.ts +201 -4
- package/dist/apps/evo-task/zod-schemas.js +22 -2
- package/dist/apps/evo-task/zod-schemas.ts +23 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.ts +2 -0
- package/dist/types/evo-modules/activation.d.ts +46 -0
- package/dist/types/evo-modules/activation.js +131 -0
- package/dist/types/evo-modules/activation.ts +150 -0
- package/dist/types/evo-modules/catalog.d.ts +28 -0
- package/dist/types/evo-modules/catalog.js +130 -0
- package/dist/types/evo-modules/catalog.ts +131 -0
- package/dist/types/evo-modules/index.d.ts +227 -0
- package/dist/types/evo-modules/index.js +75 -0
- package/dist/types/evo-modules/index.ts +329 -0
- package/dist/types/evo-task/index.d.ts +14 -0
- package/dist/types/evo-task/index.js +3 -0
- package/dist/types/evo-task/index.ts +25 -0
- package/dist/types/evo-task-runner/index.d.ts +2 -1
- package/dist/types/evo-task-runner/index.ts +5 -1
- package/dist/types/evo-telemedicine/fb_collections.js +1 -1
- package/dist/types/evo-telemedicine/fb_collections.ts +1 -1
- package/dist/types/evo-telemedicine/index.d.ts +8 -12
- package/dist/types/evo-telemedicine/index.ts +8 -12
- package/dist/types/evo-tenant/index.ts +3 -1
- package/fixtures/tenant-modules/is-module-active.parity.json +364 -0
- package/package.json +7 -4
|
@@ -357,6 +357,10 @@ export interface IAutoTask extends ITaskBase {
|
|
|
357
357
|
// Runtime state populated by the Task Runner
|
|
358
358
|
runner_state?: ITaskRunnerState;
|
|
359
359
|
|
|
360
|
+
// Why the handler decided not to deliver (suppressed | failed by defect).
|
|
361
|
+
// Reset to null when the task completes or is retried manually.
|
|
362
|
+
outcome?: ITaskOutcome | null;
|
|
363
|
+
|
|
360
364
|
// What to execute
|
|
361
365
|
auto: ITaskAutoSpec;
|
|
362
366
|
}
|
|
@@ -369,11 +373,29 @@ export const TaskExecutionStatusEnum = {
|
|
|
369
373
|
Success: "success",
|
|
370
374
|
Error: "error",
|
|
371
375
|
Retry: "retry",
|
|
376
|
+
// Handler ran and decided not to deliver; `outcome` says why. The runner
|
|
377
|
+
// finalizes the task directly (no retry, fallback or handoff).
|
|
378
|
+
Suppressed: "suppressed",
|
|
372
379
|
} as const;
|
|
373
380
|
|
|
374
381
|
export type TaskExecutionStatus =
|
|
375
382
|
(typeof TaskExecutionStatusEnum)[keyof typeof TaskExecutionStatusEnum];
|
|
376
383
|
|
|
384
|
+
export type TaskOutcomeClass = "legitimate" | "defect";
|
|
385
|
+
|
|
386
|
+
// Outcome of an execution that did not deliver. `legitimate` ends the task as
|
|
387
|
+
// `suppressed`; `defect` ends it as `failed` (actionable problem).
|
|
388
|
+
export interface ITaskOutcome {
|
|
389
|
+
class: TaskOutcomeClass;
|
|
390
|
+
reason: string;
|
|
391
|
+
label: string;
|
|
392
|
+
message: string;
|
|
393
|
+
action_hint?: string;
|
|
394
|
+
scope?: string;
|
|
395
|
+
details?: Record<string, unknown>;
|
|
396
|
+
at: Date;
|
|
397
|
+
}
|
|
398
|
+
|
|
377
399
|
export interface ITaskExecution extends IFireDoc {
|
|
378
400
|
taskId: string;
|
|
379
401
|
handler: TaskAutoHandler;
|
|
@@ -391,6 +413,9 @@ export interface ITaskExecution extends IFireDoc {
|
|
|
391
413
|
details?: Record<string, unknown>;
|
|
392
414
|
};
|
|
393
415
|
|
|
416
|
+
// Present when status is suppressed
|
|
417
|
+
outcome?: ITaskOutcome;
|
|
418
|
+
|
|
394
419
|
// Optional provider metadata (e.g. WhatsApp provider message id)
|
|
395
420
|
provider?: {
|
|
396
421
|
name?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./fb_collections";
|
|
2
2
|
import type { IFireDoc } from "../shared";
|
|
3
|
-
import type { TaskAutoHandler, TaskExecutionStatus, TaskRetryStrategy } from "../evo-task";
|
|
3
|
+
import type { TaskAutoHandler, ITaskOutcome, TaskExecutionStatus, TaskRetryStrategy } from "../evo-task";
|
|
4
4
|
export declare const EvoTaskRunnerPermissions: {
|
|
5
5
|
readonly List: "evo_task_runner_read";
|
|
6
6
|
readonly Get: "evo_task_runner_read";
|
|
@@ -55,6 +55,7 @@ export interface ITaskExecutionReport {
|
|
|
55
55
|
attempt: number;
|
|
56
56
|
correlation_id?: string;
|
|
57
57
|
status: TaskExecutionStatus;
|
|
58
|
+
outcome?: ITaskOutcome;
|
|
58
59
|
started_at: Date;
|
|
59
60
|
completed_at: Date;
|
|
60
61
|
suggested_retry?: {
|
|
@@ -2,6 +2,7 @@ export * from "./fb_collections";
|
|
|
2
2
|
import type { IFireDoc } from "../shared";
|
|
3
3
|
import type {
|
|
4
4
|
TaskAutoHandler,
|
|
5
|
+
ITaskOutcome,
|
|
5
6
|
TaskExecutionStatus,
|
|
6
7
|
TaskRetryStrategy,
|
|
7
8
|
} from "../evo-task";
|
|
@@ -115,7 +116,10 @@ export interface ITaskExecutionReport {
|
|
|
115
116
|
correlation_id?: string;
|
|
116
117
|
|
|
117
118
|
// Status/result
|
|
118
|
-
status: TaskExecutionStatus; // success | error | retry
|
|
119
|
+
status: TaskExecutionStatus; // success | error | retry | suppressed
|
|
120
|
+
|
|
121
|
+
// Required when status is suppressed: why nothing was delivered
|
|
122
|
+
outcome?: ITaskOutcome;
|
|
119
123
|
|
|
120
124
|
started_at: Date;
|
|
121
125
|
completed_at: Date;
|
|
@@ -13,7 +13,7 @@ exports.TELEMEDICINE_CONFIG_TRANSCRIPTION_DOC = exports.TELEMEDICINE_CONFIG_ROLL
|
|
|
13
13
|
// - Events: .../teleconsultations/{id}/events/{eventId} (append-only)
|
|
14
14
|
// - Webhook events: .../teleconsultations/{id}/webhook-events/{providerEventId} (dedup + outbox)
|
|
15
15
|
// - Appointment index: /tenants/{t}/apps/evo-telemedicine/appointment-index/{calendarId}__{appointmentId}
|
|
16
|
-
// - Entitlement audit: /tenants/{t}/apps/evo-telemedicine/entitlement-audit/{id}
|
|
16
|
+
// - Entitlement audit: /tenants/{t}/apps/evo-telemedicine/entitlement-audit/{id} (congelada; nova: apps/evo-modules, feat-263)
|
|
17
17
|
//
|
|
18
18
|
// Plataforma (só backend; rules negam leitura ao FE):
|
|
19
19
|
// - Legal texts: /platform/evo-telemedicine/legal-texts/{subject}-{locale}-{version}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// - Events: .../teleconsultations/{id}/events/{eventId} (append-only)
|
|
11
11
|
// - Webhook events: .../teleconsultations/{id}/webhook-events/{providerEventId} (dedup + outbox)
|
|
12
12
|
// - Appointment index: /tenants/{t}/apps/evo-telemedicine/appointment-index/{calendarId}__{appointmentId}
|
|
13
|
-
// - Entitlement audit: /tenants/{t}/apps/evo-telemedicine/entitlement-audit/{id}
|
|
13
|
+
// - Entitlement audit: /tenants/{t}/apps/evo-telemedicine/entitlement-audit/{id} (congelada; nova: apps/evo-modules, feat-263)
|
|
14
14
|
//
|
|
15
15
|
// Plataforma (só backend; rules negam leitura ao FE):
|
|
16
16
|
// - Legal texts: /platform/evo-telemedicine/legal-texts/{subject}-{locale}-{version}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./fb_collections";
|
|
2
2
|
import type { IFireDoc, IFireGlobalDoc } from "../shared";
|
|
3
|
-
import type {
|
|
3
|
+
import type { IModuleEntitlementAudit } from "../evo-modules";
|
|
4
4
|
import type { VirtualCareRecordingMode } from "../evo-med/calendar";
|
|
5
5
|
export declare const EvoTelemedicinePermissions: {
|
|
6
6
|
/** Ver estado e dados operacionais básicos. */
|
|
@@ -816,17 +816,13 @@ export interface IEntitlementAuditActor {
|
|
|
816
816
|
type: "user" | "system" | "script";
|
|
817
817
|
id?: string;
|
|
818
818
|
}
|
|
819
|
-
/**
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
reason: string;
|
|
827
|
-
occurred_at: Date;
|
|
828
|
-
correlation_id?: string;
|
|
829
|
-
}
|
|
819
|
+
/**
|
|
820
|
+
* Fora do doc do tenant, como pede o data-model. `before/after` são a projeção sanitizada (sem preço/contrato).
|
|
821
|
+
* feat-263: alias da auditoria genérica. Docs novos vão para
|
|
822
|
+
* `tenants/{t}/apps/evo-modules/entitlement-audit/{id}`; a trilha antiga em
|
|
823
|
+
* `apps/evo-telemedicine/entitlement-audit` fica congelada (só leitura).
|
|
824
|
+
*/
|
|
825
|
+
export type ITelemedicineEntitlementAudit = IModuleEntitlementAudit;
|
|
830
826
|
export declare const TelemedicineErrorCode: {
|
|
831
827
|
/** 403 — entitlement ausente/inativo (sem bypass de super admin). */
|
|
832
828
|
readonly TenantModuleDisabled: "TENANT_MODULE_DISABLED";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./fb_collections";
|
|
2
2
|
import type { IFireDoc, IFireGlobalDoc } from "../shared";
|
|
3
|
-
import type {
|
|
3
|
+
import type { IModuleEntitlementAudit } from "../evo-modules";
|
|
4
4
|
// feat-160 F15/F16 — a política da sala é projeção do `calendar.virtual_care`:
|
|
5
5
|
// o MODO de gravação é o mesmo tipo dos dois lados, de propósito.
|
|
6
6
|
import type { VirtualCareRecordingMode } from "../evo-med/calendar";
|
|
@@ -930,17 +930,13 @@ export interface IEntitlementAuditActor {
|
|
|
930
930
|
id?: string;
|
|
931
931
|
}
|
|
932
932
|
|
|
933
|
-
/**
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
reason: string;
|
|
941
|
-
occurred_at: Date;
|
|
942
|
-
correlation_id?: string;
|
|
943
|
-
}
|
|
933
|
+
/**
|
|
934
|
+
* Fora do doc do tenant, como pede o data-model. `before/after` são a projeção sanitizada (sem preço/contrato).
|
|
935
|
+
* feat-263: alias da auditoria genérica. Docs novos vão para
|
|
936
|
+
* `tenants/{t}/apps/evo-modules/entitlement-audit/{id}`; a trilha antiga em
|
|
937
|
+
* `apps/evo-telemedicine/entitlement-audit` fica congelada (só leitura).
|
|
938
|
+
*/
|
|
939
|
+
export type ITelemedicineEntitlementAudit = IModuleEntitlementAudit;
|
|
944
940
|
|
|
945
941
|
// ======================================================
|
|
946
942
|
// Códigos de erro (plan §4 — `{ ok: false, error: '<CODE>', message? }` com status estável)
|
|
@@ -58,7 +58,9 @@ export enum ITenantStatus {
|
|
|
58
58
|
// - ausência da chave em `modules` equivale a desabilitado;
|
|
59
59
|
// - `enabled=false`, `suspended`, `cancelled` ou trial expirado bloqueia usos novos;
|
|
60
60
|
// - capability ausente equivale a `false`;
|
|
61
|
-
// - alteração gera auditoria FORA do doc do tenant
|
|
61
|
+
// - alteração gera auditoria FORA do doc do tenant, no caminho genérico
|
|
62
|
+
// `tenants/{t}/apps/evo-modules/entitlement-audit/{id}` (feat-263; a trilha
|
|
63
|
+
// antiga da telemedicina em `apps/evo-telemedicine/entitlement-audit` fica só leitura);
|
|
62
64
|
// - super admin NÃO ignora entitlement (D6) — exceção só via `override_until`,
|
|
63
65
|
// temporária e auditada.
|
|
64
66
|
export type TenantModuleStatus = "active" | "trial" | "suspended" | "cancelled";
|
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"description": "Golden de paridade de isModuleActive/hasModuleCapability (evo360-types, feat-263). Toda implementação (backend, web-app, Flutter) deve dar o mesmo resultado para cada caso, avaliado com `now`. capability_checks: capability -> esperado de hasModuleCapability (independe de estar ativo).",
|
|
4
|
+
"now": "2026-10-06T12:00:00.000Z",
|
|
5
|
+
"cases": [
|
|
6
|
+
{
|
|
7
|
+
"name": "ausente (null)",
|
|
8
|
+
"entitlement": null,
|
|
9
|
+
"expect_active": false
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "active + enabled, sem datas",
|
|
13
|
+
"entitlement": {
|
|
14
|
+
"status": "active",
|
|
15
|
+
"enabled": true,
|
|
16
|
+
"source": "contract",
|
|
17
|
+
"version": 1,
|
|
18
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
19
|
+
"capabilities": {
|
|
20
|
+
"recording": true,
|
|
21
|
+
"transcription": false,
|
|
22
|
+
"auto_admit": true
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"expect_active": true,
|
|
26
|
+
"capability_checks": {
|
|
27
|
+
"recording": true,
|
|
28
|
+
"transcription": false,
|
|
29
|
+
"auto_admit": true,
|
|
30
|
+
"inexistente": false
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "enabled=false",
|
|
35
|
+
"entitlement": {
|
|
36
|
+
"status": "active",
|
|
37
|
+
"enabled": false,
|
|
38
|
+
"source": "contract",
|
|
39
|
+
"version": 1,
|
|
40
|
+
"updated_at": "2026-10-01T00:00:00.000Z"
|
|
41
|
+
},
|
|
42
|
+
"expect_active": false
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "enabled ausente",
|
|
46
|
+
"entitlement": {
|
|
47
|
+
"status": "active",
|
|
48
|
+
"source": "contract",
|
|
49
|
+
"version": 1,
|
|
50
|
+
"updated_at": "2026-10-01T00:00:00.000Z"
|
|
51
|
+
},
|
|
52
|
+
"expect_active": false
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "suspended",
|
|
56
|
+
"entitlement": {
|
|
57
|
+
"status": "suspended",
|
|
58
|
+
"enabled": true,
|
|
59
|
+
"source": "contract",
|
|
60
|
+
"version": 1,
|
|
61
|
+
"updated_at": "2026-10-01T00:00:00.000Z"
|
|
62
|
+
},
|
|
63
|
+
"expect_active": false
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "cancelled",
|
|
67
|
+
"entitlement": {
|
|
68
|
+
"status": "cancelled",
|
|
69
|
+
"enabled": true,
|
|
70
|
+
"source": "contract",
|
|
71
|
+
"version": 1,
|
|
72
|
+
"updated_at": "2026-10-01T00:00:00.000Z"
|
|
73
|
+
},
|
|
74
|
+
"expect_active": false
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "status desconhecido",
|
|
78
|
+
"entitlement": {
|
|
79
|
+
"status": "pending",
|
|
80
|
+
"enabled": true,
|
|
81
|
+
"source": "contract",
|
|
82
|
+
"version": 1,
|
|
83
|
+
"updated_at": "2026-10-01T00:00:00.000Z"
|
|
84
|
+
},
|
|
85
|
+
"expect_active": false
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "trial válido (expires ISO futuro)",
|
|
89
|
+
"entitlement": {
|
|
90
|
+
"status": "trial",
|
|
91
|
+
"enabled": true,
|
|
92
|
+
"source": "trial",
|
|
93
|
+
"version": 1,
|
|
94
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
95
|
+
"expires_at": "2026-11-05T12:00:00.000Z"
|
|
96
|
+
},
|
|
97
|
+
"expect_active": true
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "trial vencido (expires ISO passado)",
|
|
101
|
+
"entitlement": {
|
|
102
|
+
"status": "trial",
|
|
103
|
+
"enabled": true,
|
|
104
|
+
"source": "trial",
|
|
105
|
+
"version": 1,
|
|
106
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
107
|
+
"expires_at": "2026-09-06T12:00:00.000Z"
|
|
108
|
+
},
|
|
109
|
+
"expect_active": false
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "trial sem expires_at",
|
|
113
|
+
"entitlement": {
|
|
114
|
+
"status": "trial",
|
|
115
|
+
"enabled": true,
|
|
116
|
+
"source": "trial",
|
|
117
|
+
"version": 1,
|
|
118
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
119
|
+
"expires_at": null
|
|
120
|
+
},
|
|
121
|
+
"expect_active": true
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "active com expires_at passado",
|
|
125
|
+
"entitlement": {
|
|
126
|
+
"status": "active",
|
|
127
|
+
"enabled": true,
|
|
128
|
+
"source": "contract",
|
|
129
|
+
"version": 1,
|
|
130
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
131
|
+
"expires_at": "2026-09-06T12:00:00.000Z"
|
|
132
|
+
},
|
|
133
|
+
"expect_active": false
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"name": "active com expires_at == now (vence no instante)",
|
|
137
|
+
"entitlement": {
|
|
138
|
+
"status": "active",
|
|
139
|
+
"enabled": true,
|
|
140
|
+
"source": "contract",
|
|
141
|
+
"version": 1,
|
|
142
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
143
|
+
"expires_at": "2026-10-06T12:00:00.000Z"
|
|
144
|
+
},
|
|
145
|
+
"expect_active": false
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "effective_at futuro",
|
|
149
|
+
"entitlement": {
|
|
150
|
+
"status": "active",
|
|
151
|
+
"enabled": true,
|
|
152
|
+
"source": "contract",
|
|
153
|
+
"version": 1,
|
|
154
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
155
|
+
"effective_at": "2026-11-05T12:00:00.000Z"
|
|
156
|
+
},
|
|
157
|
+
"expect_active": false
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"name": "effective_at passado",
|
|
161
|
+
"entitlement": {
|
|
162
|
+
"status": "active",
|
|
163
|
+
"enabled": true,
|
|
164
|
+
"source": "contract",
|
|
165
|
+
"version": 1,
|
|
166
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
167
|
+
"effective_at": "2026-09-06T12:00:00.000Z"
|
|
168
|
+
},
|
|
169
|
+
"expect_active": true
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "override futuro com override_by (cancelled)",
|
|
173
|
+
"entitlement": {
|
|
174
|
+
"status": "cancelled",
|
|
175
|
+
"enabled": false,
|
|
176
|
+
"source": "contract",
|
|
177
|
+
"version": 1,
|
|
178
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
179
|
+
"override_until": "2026-11-05T12:00:00.000Z",
|
|
180
|
+
"override_by": "ops@hubmedica"
|
|
181
|
+
},
|
|
182
|
+
"expect_active": true
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"name": "override futuro SEM override_by",
|
|
186
|
+
"entitlement": {
|
|
187
|
+
"status": "cancelled",
|
|
188
|
+
"enabled": false,
|
|
189
|
+
"source": "contract",
|
|
190
|
+
"version": 1,
|
|
191
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
192
|
+
"override_until": "2026-11-05T12:00:00.000Z",
|
|
193
|
+
"override_by": null
|
|
194
|
+
},
|
|
195
|
+
"expect_active": false
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "override vencido com override_by",
|
|
199
|
+
"entitlement": {
|
|
200
|
+
"status": "suspended",
|
|
201
|
+
"enabled": true,
|
|
202
|
+
"source": "contract",
|
|
203
|
+
"version": 1,
|
|
204
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
205
|
+
"override_until": "2026-09-06T12:00:00.000Z",
|
|
206
|
+
"override_by": "ops@hubmedica"
|
|
207
|
+
},
|
|
208
|
+
"expect_active": false
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"name": "override futuro libera trial vencido",
|
|
212
|
+
"entitlement": {
|
|
213
|
+
"status": "trial",
|
|
214
|
+
"enabled": true,
|
|
215
|
+
"source": "contract",
|
|
216
|
+
"version": 1,
|
|
217
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
218
|
+
"expires_at": "2026-09-06T12:00:00.000Z",
|
|
219
|
+
"override_until": "2026-11-05T12:00:00.000Z",
|
|
220
|
+
"override_by": "ops"
|
|
221
|
+
},
|
|
222
|
+
"expect_active": true
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"name": "datas como epoch ms: expires futuro",
|
|
226
|
+
"entitlement": {
|
|
227
|
+
"status": "active",
|
|
228
|
+
"enabled": true,
|
|
229
|
+
"source": "contract",
|
|
230
|
+
"version": 1,
|
|
231
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
232
|
+
"expires_at": 1793880000000
|
|
233
|
+
},
|
|
234
|
+
"expect_active": true
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"name": "datas como epoch ms: expires passado",
|
|
238
|
+
"entitlement": {
|
|
239
|
+
"status": "active",
|
|
240
|
+
"enabled": true,
|
|
241
|
+
"source": "contract",
|
|
242
|
+
"version": 1,
|
|
243
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
244
|
+
"expires_at": 1788696000000
|
|
245
|
+
},
|
|
246
|
+
"expect_active": false
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"name": "datas como Timestamp serializado {_seconds}: expires passado",
|
|
250
|
+
"entitlement": {
|
|
251
|
+
"status": "active",
|
|
252
|
+
"enabled": true,
|
|
253
|
+
"source": "contract",
|
|
254
|
+
"version": 1,
|
|
255
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
256
|
+
"expires_at": {
|
|
257
|
+
"_seconds": 1788696000,
|
|
258
|
+
"_nanoseconds": 0
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"expect_active": false
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"name": "datas como Timestamp serializado {seconds}: expires futuro",
|
|
265
|
+
"entitlement": {
|
|
266
|
+
"status": "active",
|
|
267
|
+
"enabled": true,
|
|
268
|
+
"source": "contract",
|
|
269
|
+
"version": 1,
|
|
270
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
271
|
+
"expires_at": {
|
|
272
|
+
"seconds": 1793880000,
|
|
273
|
+
"nanoseconds": 0
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"expect_active": true
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"name": "datas como Timestamp serializado: override futuro",
|
|
280
|
+
"entitlement": {
|
|
281
|
+
"status": "cancelled",
|
|
282
|
+
"enabled": true,
|
|
283
|
+
"source": "contract",
|
|
284
|
+
"version": 1,
|
|
285
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
286
|
+
"override_until": {
|
|
287
|
+
"_seconds": 1793880000,
|
|
288
|
+
"_nanoseconds": 0
|
|
289
|
+
},
|
|
290
|
+
"override_by": "ops"
|
|
291
|
+
},
|
|
292
|
+
"expect_active": true
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"name": "data inválida equivale a ausente",
|
|
296
|
+
"entitlement": {
|
|
297
|
+
"status": "active",
|
|
298
|
+
"enabled": true,
|
|
299
|
+
"source": "contract",
|
|
300
|
+
"version": 1,
|
|
301
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
302
|
+
"expires_at": "not-a-date"
|
|
303
|
+
},
|
|
304
|
+
"expect_active": true
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"name": "capabilities: só o booleano true conta",
|
|
308
|
+
"entitlement": {
|
|
309
|
+
"status": "active",
|
|
310
|
+
"enabled": true,
|
|
311
|
+
"source": "contract",
|
|
312
|
+
"version": 1,
|
|
313
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
314
|
+
"capabilities": {
|
|
315
|
+
"a": true,
|
|
316
|
+
"b": "true",
|
|
317
|
+
"c": 1,
|
|
318
|
+
"d": false,
|
|
319
|
+
"e": 0
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"expect_active": true,
|
|
323
|
+
"capability_checks": {
|
|
324
|
+
"a": true,
|
|
325
|
+
"b": false,
|
|
326
|
+
"c": false,
|
|
327
|
+
"d": false,
|
|
328
|
+
"e": false,
|
|
329
|
+
"ausente": false
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"name": "capabilities ausentes",
|
|
334
|
+
"entitlement": {
|
|
335
|
+
"status": "active",
|
|
336
|
+
"enabled": true,
|
|
337
|
+
"source": "contract",
|
|
338
|
+
"version": 1,
|
|
339
|
+
"updated_at": "2026-10-01T00:00:00.000Z"
|
|
340
|
+
},
|
|
341
|
+
"expect_active": true,
|
|
342
|
+
"capability_checks": {
|
|
343
|
+
"recording": false
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"name": "capability true com módulo inativo continua true (não implica ativo)",
|
|
348
|
+
"entitlement": {
|
|
349
|
+
"status": "active",
|
|
350
|
+
"enabled": false,
|
|
351
|
+
"source": "contract",
|
|
352
|
+
"version": 1,
|
|
353
|
+
"updated_at": "2026-10-01T00:00:00.000Z",
|
|
354
|
+
"capabilities": {
|
|
355
|
+
"recording": true
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"expect_active": false,
|
|
359
|
+
"capability_checks": {
|
|
360
|
+
"recording": true
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
]
|
|
364
|
+
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "evo360-types",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.662",
|
|
4
4
|
"description": "HREVO360 Shared Types",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
|
-
"dist"
|
|
8
|
+
"dist",
|
|
9
|
+
"fixtures"
|
|
9
10
|
],
|
|
10
11
|
"scripts": {
|
|
11
12
|
"prebuild": "node scripts/bump-version.cjs",
|
|
@@ -17,7 +18,8 @@
|
|
|
17
18
|
"bump:minor": "node scripts/bump-version.cjs minor",
|
|
18
19
|
"bump:major": "node scripts/bump-version.cjs major",
|
|
19
20
|
"deploy": "bash scripts/deploy.sh",
|
|
20
|
-
"push-tags": "bash scripts/push-tags.sh"
|
|
21
|
+
"push-tags": "bash scripts/push-tags.sh",
|
|
22
|
+
"test": "vitest run"
|
|
21
23
|
},
|
|
22
24
|
"homepage": "https://www.hubmedica.com.br",
|
|
23
25
|
"repository": {
|
|
@@ -34,6 +36,7 @@
|
|
|
34
36
|
"copyfiles": "^2.4.1",
|
|
35
37
|
"rimraf": "^6.0.1",
|
|
36
38
|
"semver": "^7.7.2",
|
|
37
|
-
"typescript": "~5.8.3"
|
|
39
|
+
"typescript": "~5.8.3",
|
|
40
|
+
"vitest": "^4.1.11"
|
|
38
41
|
}
|
|
39
42
|
}
|