@logto/schemas 1.9.0 → 1.9.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/schemas",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "author": "Silverhand Inc. <contact@silverhand.io>",
5
5
  "license": "MPL-2.0",
6
6
  "type": "module",
@@ -65,11 +65,11 @@
65
65
  "prettier": "@silverhand/eslint-config/.prettierrc",
66
66
  "dependencies": {
67
67
  "@logto/connector-kit": "^1.1.1",
68
- "@logto/core-kit": "^2.1.0",
68
+ "@logto/core-kit": "^2.1.2",
69
69
  "@logto/language-kit": "^1.0.0",
70
70
  "@logto/phrases": "^1.5.0",
71
- "@logto/phrases-experience": "^1.3.0",
72
- "@logto/shared": "^2.0.1",
71
+ "@logto/phrases-experience": "^1.3.1",
72
+ "@logto/shared": "^3.0.0",
73
73
  "@withtyped/server": "^0.12.9"
74
74
  },
75
75
  "peerDependencies": {
package/tables/logs.sql CHANGED
@@ -1,3 +1,5 @@
1
+ /* init_order = 2 */
2
+
1
3
  create table logs (
2
4
  tenant_id varchar(21) not null
3
5
  references tenants (id) on update cascade on delete cascade,
@@ -0,0 +1,32 @@
1
+ create type sentinel_action_result as enum ('Success', 'Failed');
2
+
3
+ create type sentinel_decision as enum ('Undecided', 'Allowed', 'Blocked', 'Challenge');
4
+
5
+ create table sentinel_activities (
6
+ tenant_id varchar(21) not null
7
+ references tenants (id) on update cascade on delete cascade,
8
+ id varchar(21) not null,
9
+ /** The target that the action was performed on. */
10
+ target_type varchar(32) /* @use SentinelActivityTargetType */ not null,
11
+ /** The target hashed identifier. */
12
+ target_hash varchar(64) not null,
13
+ /** The action name that was performed. */
14
+ action varchar(64) /* @use SentinelActivityAction */ not null,
15
+ /** If the action was successful or not. */
16
+ action_result sentinel_action_result not null,
17
+ /** Additional payload data if any. */
18
+ payload jsonb /* @use SentinelActivityPayload */ not null,
19
+ /** The sentinel decision for the action. */
20
+ decision sentinel_decision not null,
21
+ /** The expiry date of the decision. For instant decisions, this is the date the activity was created. */
22
+ decision_expires_at timestamptz not null default(now()),
23
+ /** The time the activity was created. */
24
+ created_at timestamptz not null default(now()),
25
+ primary key (id)
26
+ );
27
+
28
+ create index sentinel_activities__id
29
+ on sentinel_activities (tenant_id, id);
30
+
31
+ create index sentinel_activities__target_type_target_hash_action_action_result_decision
32
+ on sentinel_activities (tenant_id, target_type, target_hash, action, action_result, decision);