@tstdl/base 0.93.78 → 0.93.81
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/api/server/gateway.js +1 -1
- package/authentication/authentication.api.d.ts +9 -0
- package/authentication/authentication.api.js +3 -0
- package/authentication/client/authentication.service.d.ts +23 -15
- package/authentication/client/authentication.service.js +30 -21
- package/authentication/index.d.ts +1 -0
- package/authentication/index.js +1 -0
- package/authentication/models/authentication-credentials.model.d.ts +2 -2
- package/authentication/models/authentication-credentials.model.js +5 -5
- package/authentication/models/authentication-session.model.d.ts +2 -2
- package/authentication/models/authentication-session.model.js +3 -3
- package/authentication/models/subject.model.js +5 -3
- package/authentication/models/token-payload-base.model.d.ts +5 -1
- package/authentication/models/token-payload-base.model.js +10 -2
- package/authentication/models/token.model.d.ts +9 -1
- package/authentication/server/authentication-ancillary.service.d.ts +12 -15
- package/authentication/server/authentication-ancillary.service.js +3 -0
- package/authentication/server/authentication.api-controller.js +5 -5
- package/authentication/server/authentication.audit.d.ts +7 -5
- package/authentication/server/authentication.service.d.ts +32 -22
- package/authentication/server/authentication.service.js +116 -65
- package/authentication/server/drizzle/{0001_condemned_pretty_boy.sql → 0000_violet_callisto.sql} +34 -5
- package/authentication/server/drizzle/meta/0000_snapshot.json +500 -6
- package/authentication/server/drizzle/meta/_journal.json +2 -9
- package/authentication/types.d.ts +6 -0
- package/authentication/types.js +1 -0
- package/document-management/server/drizzle/{0000_ordinary_pretty_boy.sql → 0000_glamorous_lorna_dane.sql} +96 -76
- package/document-management/server/drizzle/meta/0000_snapshot.json +360 -142
- package/document-management/server/drizzle/meta/_journal.json +2 -16
- package/examples/api/authentication.js +3 -2
- package/examples/api/custom-authentication.js +11 -9
- package/orm/server/drizzle/schema-converter.js +53 -32
- package/package.json +1 -1
- package/authentication/server/drizzle/0000_calm_warlock.sql +0 -28
- package/authentication/server/drizzle/meta/0001_snapshot.json +0 -651
- package/document-management/server/drizzle/0001_lyrical_wong.sql +0 -123
- package/document-management/server/drizzle/0002_round_warbird.sql +0 -1
- package/document-management/server/drizzle/meta/0001_snapshot.json +0 -2728
- package/document-management/server/drizzle/meta/0002_snapshot.json +0 -2722
package/authentication/server/drizzle/{0001_condemned_pretty_boy.sql → 0000_violet_callisto.sql}
RENAMED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
CREATE TYPE "authentication"."subject_type" AS ENUM('system', 'user', 'service-account');--> statement-breakpoint
|
|
2
2
|
CREATE TYPE "authentication"."user_status" AS ENUM('active', 'suspended', 'pending-approval', 'invited');--> statement-breakpoint
|
|
3
|
+
CREATE TABLE "authentication"."credentials" (
|
|
4
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
5
|
+
"subject" uuid NOT NULL,
|
|
6
|
+
"hash_version" integer NOT NULL,
|
|
7
|
+
"salt" "bytea" NOT NULL,
|
|
8
|
+
"hash" "bytea" NOT NULL,
|
|
9
|
+
"revision" integer NOT NULL,
|
|
10
|
+
"revision_timestamp" timestamp with time zone NOT NULL,
|
|
11
|
+
"create_timestamp" timestamp with time zone NOT NULL,
|
|
12
|
+
"delete_timestamp" timestamp with time zone,
|
|
13
|
+
"attributes" jsonb DEFAULT '{}'::jsonb NOT NULL,
|
|
14
|
+
CONSTRAINT "credentials_subject_unique" UNIQUE("subject")
|
|
15
|
+
);
|
|
16
|
+
--> statement-breakpoint
|
|
17
|
+
CREATE TABLE "authentication"."session" (
|
|
18
|
+
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
19
|
+
"subject" uuid NOT NULL,
|
|
20
|
+
"begin" timestamp with time zone NOT NULL,
|
|
21
|
+
"end" timestamp with time zone NOT NULL,
|
|
22
|
+
"refresh_token_hash_version" integer NOT NULL,
|
|
23
|
+
"refresh_token_salt" "bytea" NOT NULL,
|
|
24
|
+
"refresh_token_hash" "bytea" NOT NULL,
|
|
25
|
+
"revision" integer NOT NULL,
|
|
26
|
+
"revision_timestamp" timestamp with time zone NOT NULL,
|
|
27
|
+
"create_timestamp" timestamp with time zone NOT NULL,
|
|
28
|
+
"delete_timestamp" timestamp with time zone,
|
|
29
|
+
"attributes" jsonb DEFAULT '{}'::jsonb NOT NULL
|
|
30
|
+
);
|
|
31
|
+
--> statement-breakpoint
|
|
3
32
|
CREATE TABLE "authentication"."service_account" (
|
|
4
33
|
"id" uuid DEFAULT gen_random_uuid() NOT NULL,
|
|
5
34
|
"tenant_id" uuid NOT NULL,
|
|
@@ -62,9 +91,9 @@ CREATE TABLE "authentication"."user" (
|
|
|
62
91
|
CONSTRAINT "user_tenant_id_email_unique" UNIQUE("tenant_id","email")
|
|
63
92
|
);
|
|
64
93
|
--> statement-breakpoint
|
|
65
|
-
ALTER TABLE "authentication"."credentials" ALTER COLUMN "subject" SET DATA TYPE uuid;--> statement-breakpoint
|
|
66
|
-
ALTER TABLE "authentication"."session" ALTER COLUMN "subject" SET DATA TYPE uuid;--> statement-breakpoint
|
|
67
|
-
ALTER TABLE "authentication"."service_account" ADD CONSTRAINT "service_account_id_fkey" FOREIGN KEY ("tenant_id","parent") REFERENCES "authentication"."subject"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
68
|
-
ALTER TABLE "authentication"."subject" ADD CONSTRAINT "subject_id_fkey" FOREIGN KEY ("tenant_id","service_account_id") REFERENCES "authentication"."service_account"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
69
94
|
ALTER TABLE "authentication"."credentials" ADD CONSTRAINT "credentials_subject_subject_id_fk" FOREIGN KEY ("subject") REFERENCES "authentication"."subject"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
70
|
-
ALTER TABLE "authentication"."session" ADD CONSTRAINT "session_subject_subject_id_fk" FOREIGN KEY ("subject") REFERENCES "authentication"."subject"("id") ON DELETE no action ON UPDATE no action
|
|
95
|
+
ALTER TABLE "authentication"."session" ADD CONSTRAINT "session_subject_subject_id_fk" FOREIGN KEY ("subject") REFERENCES "authentication"."subject"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
96
|
+
ALTER TABLE "authentication"."service_account" ADD CONSTRAINT "service_account_id_subject_fkey" FOREIGN KEY ("tenant_id","parent") REFERENCES "authentication"."subject"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
97
|
+
ALTER TABLE "authentication"."subject" ADD CONSTRAINT "subject_id_system_account_fkey" FOREIGN KEY ("tenant_id","system_account_id") REFERENCES "authentication"."system_account"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
98
|
+
ALTER TABLE "authentication"."subject" ADD CONSTRAINT "subject_id_user_fkey" FOREIGN KEY ("tenant_id","user_id") REFERENCES "authentication"."user"("tenant_id","id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
99
|
+
ALTER TABLE "authentication"."subject" ADD CONSTRAINT "subject_id_service_account_fkey" FOREIGN KEY ("tenant_id","service_account_id") REFERENCES "authentication"."service_account"("tenant_id","id") ON DELETE no action ON UPDATE no action;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id": "
|
|
2
|
+
"id": "c88f8c29-7029-4da0-b085-bd866a480533",
|
|
3
3
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
4
4
|
"version": "7",
|
|
5
5
|
"dialect": "postgresql",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"subject": {
|
|
19
19
|
"name": "subject",
|
|
20
|
-
"type": "
|
|
20
|
+
"type": "uuid",
|
|
21
21
|
"primaryKey": false,
|
|
22
22
|
"notNull": true
|
|
23
23
|
},
|
|
@@ -72,7 +72,22 @@
|
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
"indexes": {},
|
|
75
|
-
"foreignKeys": {
|
|
75
|
+
"foreignKeys": {
|
|
76
|
+
"credentials_subject_subject_id_fk": {
|
|
77
|
+
"name": "credentials_subject_subject_id_fk",
|
|
78
|
+
"tableFrom": "credentials",
|
|
79
|
+
"tableTo": "subject",
|
|
80
|
+
"schemaTo": "authentication",
|
|
81
|
+
"columnsFrom": [
|
|
82
|
+
"subject"
|
|
83
|
+
],
|
|
84
|
+
"columnsTo": [
|
|
85
|
+
"id"
|
|
86
|
+
],
|
|
87
|
+
"onDelete": "no action",
|
|
88
|
+
"onUpdate": "no action"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
76
91
|
"compositePrimaryKeys": {},
|
|
77
92
|
"uniqueConstraints": {
|
|
78
93
|
"credentials_subject_unique": {
|
|
@@ -100,7 +115,7 @@
|
|
|
100
115
|
},
|
|
101
116
|
"subject": {
|
|
102
117
|
"name": "subject",
|
|
103
|
-
"type": "
|
|
118
|
+
"type": "uuid",
|
|
104
119
|
"primaryKey": false,
|
|
105
120
|
"notNull": true
|
|
106
121
|
},
|
|
@@ -167,15 +182,494 @@
|
|
|
167
182
|
}
|
|
168
183
|
},
|
|
169
184
|
"indexes": {},
|
|
170
|
-
"foreignKeys": {
|
|
185
|
+
"foreignKeys": {
|
|
186
|
+
"session_subject_subject_id_fk": {
|
|
187
|
+
"name": "session_subject_subject_id_fk",
|
|
188
|
+
"tableFrom": "session",
|
|
189
|
+
"tableTo": "subject",
|
|
190
|
+
"schemaTo": "authentication",
|
|
191
|
+
"columnsFrom": [
|
|
192
|
+
"subject"
|
|
193
|
+
],
|
|
194
|
+
"columnsTo": [
|
|
195
|
+
"id"
|
|
196
|
+
],
|
|
197
|
+
"onDelete": "no action",
|
|
198
|
+
"onUpdate": "no action"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
171
201
|
"compositePrimaryKeys": {},
|
|
172
202
|
"uniqueConstraints": {},
|
|
173
203
|
"policies": {},
|
|
174
204
|
"checkConstraints": {},
|
|
175
205
|
"isRLSEnabled": false
|
|
206
|
+
},
|
|
207
|
+
"authentication.service_account": {
|
|
208
|
+
"name": "service_account",
|
|
209
|
+
"schema": "authentication",
|
|
210
|
+
"columns": {
|
|
211
|
+
"id": {
|
|
212
|
+
"name": "id",
|
|
213
|
+
"type": "uuid",
|
|
214
|
+
"primaryKey": false,
|
|
215
|
+
"notNull": true,
|
|
216
|
+
"default": "gen_random_uuid()"
|
|
217
|
+
},
|
|
218
|
+
"tenant_id": {
|
|
219
|
+
"name": "tenant_id",
|
|
220
|
+
"type": "uuid",
|
|
221
|
+
"primaryKey": false,
|
|
222
|
+
"notNull": true
|
|
223
|
+
},
|
|
224
|
+
"description": {
|
|
225
|
+
"name": "description",
|
|
226
|
+
"type": "text",
|
|
227
|
+
"primaryKey": false,
|
|
228
|
+
"notNull": true
|
|
229
|
+
},
|
|
230
|
+
"parent": {
|
|
231
|
+
"name": "parent",
|
|
232
|
+
"type": "uuid",
|
|
233
|
+
"primaryKey": false,
|
|
234
|
+
"notNull": false
|
|
235
|
+
},
|
|
236
|
+
"revision": {
|
|
237
|
+
"name": "revision",
|
|
238
|
+
"type": "integer",
|
|
239
|
+
"primaryKey": false,
|
|
240
|
+
"notNull": true
|
|
241
|
+
},
|
|
242
|
+
"revision_timestamp": {
|
|
243
|
+
"name": "revision_timestamp",
|
|
244
|
+
"type": "timestamp with time zone",
|
|
245
|
+
"primaryKey": false,
|
|
246
|
+
"notNull": true
|
|
247
|
+
},
|
|
248
|
+
"create_timestamp": {
|
|
249
|
+
"name": "create_timestamp",
|
|
250
|
+
"type": "timestamp with time zone",
|
|
251
|
+
"primaryKey": false,
|
|
252
|
+
"notNull": true
|
|
253
|
+
},
|
|
254
|
+
"delete_timestamp": {
|
|
255
|
+
"name": "delete_timestamp",
|
|
256
|
+
"type": "timestamp with time zone",
|
|
257
|
+
"primaryKey": false,
|
|
258
|
+
"notNull": false
|
|
259
|
+
},
|
|
260
|
+
"attributes": {
|
|
261
|
+
"name": "attributes",
|
|
262
|
+
"type": "jsonb",
|
|
263
|
+
"primaryKey": false,
|
|
264
|
+
"notNull": true,
|
|
265
|
+
"default": "'{}'::jsonb"
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"indexes": {},
|
|
269
|
+
"foreignKeys": {
|
|
270
|
+
"service_account_id_subject_fkey": {
|
|
271
|
+
"name": "service_account_id_subject_fkey",
|
|
272
|
+
"tableFrom": "service_account",
|
|
273
|
+
"tableTo": "subject",
|
|
274
|
+
"schemaTo": "authentication",
|
|
275
|
+
"columnsFrom": [
|
|
276
|
+
"tenant_id",
|
|
277
|
+
"parent"
|
|
278
|
+
],
|
|
279
|
+
"columnsTo": [
|
|
280
|
+
"tenant_id",
|
|
281
|
+
"id"
|
|
282
|
+
],
|
|
283
|
+
"onDelete": "no action",
|
|
284
|
+
"onUpdate": "no action"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
"compositePrimaryKeys": {
|
|
288
|
+
"service_account_tenant_id_id_pk": {
|
|
289
|
+
"name": "service_account_tenant_id_id_pk",
|
|
290
|
+
"columns": [
|
|
291
|
+
"tenant_id",
|
|
292
|
+
"id"
|
|
293
|
+
]
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
"uniqueConstraints": {},
|
|
297
|
+
"policies": {},
|
|
298
|
+
"checkConstraints": {},
|
|
299
|
+
"isRLSEnabled": false
|
|
300
|
+
},
|
|
301
|
+
"authentication.subject": {
|
|
302
|
+
"name": "subject",
|
|
303
|
+
"schema": "authentication",
|
|
304
|
+
"columns": {
|
|
305
|
+
"id": {
|
|
306
|
+
"name": "id",
|
|
307
|
+
"type": "uuid",
|
|
308
|
+
"primaryKey": false,
|
|
309
|
+
"notNull": true,
|
|
310
|
+
"default": "gen_random_uuid()"
|
|
311
|
+
},
|
|
312
|
+
"tenant_id": {
|
|
313
|
+
"name": "tenant_id",
|
|
314
|
+
"type": "uuid",
|
|
315
|
+
"primaryKey": false,
|
|
316
|
+
"notNull": true
|
|
317
|
+
},
|
|
318
|
+
"type": {
|
|
319
|
+
"name": "type",
|
|
320
|
+
"type": "subject_type",
|
|
321
|
+
"typeSchema": "authentication",
|
|
322
|
+
"primaryKey": false,
|
|
323
|
+
"notNull": true
|
|
324
|
+
},
|
|
325
|
+
"display_name": {
|
|
326
|
+
"name": "display_name",
|
|
327
|
+
"type": "text",
|
|
328
|
+
"primaryKey": false,
|
|
329
|
+
"notNull": true
|
|
330
|
+
},
|
|
331
|
+
"system_account_id": {
|
|
332
|
+
"name": "system_account_id",
|
|
333
|
+
"type": "uuid",
|
|
334
|
+
"primaryKey": false,
|
|
335
|
+
"notNull": false
|
|
336
|
+
},
|
|
337
|
+
"user_id": {
|
|
338
|
+
"name": "user_id",
|
|
339
|
+
"type": "uuid",
|
|
340
|
+
"primaryKey": false,
|
|
341
|
+
"notNull": false
|
|
342
|
+
},
|
|
343
|
+
"service_account_id": {
|
|
344
|
+
"name": "service_account_id",
|
|
345
|
+
"type": "uuid",
|
|
346
|
+
"primaryKey": false,
|
|
347
|
+
"notNull": false
|
|
348
|
+
},
|
|
349
|
+
"revision": {
|
|
350
|
+
"name": "revision",
|
|
351
|
+
"type": "integer",
|
|
352
|
+
"primaryKey": false,
|
|
353
|
+
"notNull": true
|
|
354
|
+
},
|
|
355
|
+
"revision_timestamp": {
|
|
356
|
+
"name": "revision_timestamp",
|
|
357
|
+
"type": "timestamp with time zone",
|
|
358
|
+
"primaryKey": false,
|
|
359
|
+
"notNull": true
|
|
360
|
+
},
|
|
361
|
+
"create_timestamp": {
|
|
362
|
+
"name": "create_timestamp",
|
|
363
|
+
"type": "timestamp with time zone",
|
|
364
|
+
"primaryKey": false,
|
|
365
|
+
"notNull": true
|
|
366
|
+
},
|
|
367
|
+
"delete_timestamp": {
|
|
368
|
+
"name": "delete_timestamp",
|
|
369
|
+
"type": "timestamp with time zone",
|
|
370
|
+
"primaryKey": false,
|
|
371
|
+
"notNull": false
|
|
372
|
+
},
|
|
373
|
+
"attributes": {
|
|
374
|
+
"name": "attributes",
|
|
375
|
+
"type": "jsonb",
|
|
376
|
+
"primaryKey": false,
|
|
377
|
+
"notNull": true,
|
|
378
|
+
"default": "'{}'::jsonb"
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"indexes": {},
|
|
382
|
+
"foreignKeys": {
|
|
383
|
+
"subject_id_system_account_fkey": {
|
|
384
|
+
"name": "subject_id_system_account_fkey",
|
|
385
|
+
"tableFrom": "subject",
|
|
386
|
+
"tableTo": "system_account",
|
|
387
|
+
"schemaTo": "authentication",
|
|
388
|
+
"columnsFrom": [
|
|
389
|
+
"tenant_id",
|
|
390
|
+
"system_account_id"
|
|
391
|
+
],
|
|
392
|
+
"columnsTo": [
|
|
393
|
+
"tenant_id",
|
|
394
|
+
"id"
|
|
395
|
+
],
|
|
396
|
+
"onDelete": "no action",
|
|
397
|
+
"onUpdate": "no action"
|
|
398
|
+
},
|
|
399
|
+
"subject_id_user_fkey": {
|
|
400
|
+
"name": "subject_id_user_fkey",
|
|
401
|
+
"tableFrom": "subject",
|
|
402
|
+
"tableTo": "user",
|
|
403
|
+
"schemaTo": "authentication",
|
|
404
|
+
"columnsFrom": [
|
|
405
|
+
"tenant_id",
|
|
406
|
+
"user_id"
|
|
407
|
+
],
|
|
408
|
+
"columnsTo": [
|
|
409
|
+
"tenant_id",
|
|
410
|
+
"id"
|
|
411
|
+
],
|
|
412
|
+
"onDelete": "no action",
|
|
413
|
+
"onUpdate": "no action"
|
|
414
|
+
},
|
|
415
|
+
"subject_id_service_account_fkey": {
|
|
416
|
+
"name": "subject_id_service_account_fkey",
|
|
417
|
+
"tableFrom": "subject",
|
|
418
|
+
"tableTo": "service_account",
|
|
419
|
+
"schemaTo": "authentication",
|
|
420
|
+
"columnsFrom": [
|
|
421
|
+
"tenant_id",
|
|
422
|
+
"service_account_id"
|
|
423
|
+
],
|
|
424
|
+
"columnsTo": [
|
|
425
|
+
"tenant_id",
|
|
426
|
+
"id"
|
|
427
|
+
],
|
|
428
|
+
"onDelete": "no action",
|
|
429
|
+
"onUpdate": "no action"
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
"compositePrimaryKeys": {
|
|
433
|
+
"subject_tenant_id_id_pk": {
|
|
434
|
+
"name": "subject_tenant_id_id_pk",
|
|
435
|
+
"columns": [
|
|
436
|
+
"tenant_id",
|
|
437
|
+
"id"
|
|
438
|
+
]
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
"uniqueConstraints": {
|
|
442
|
+
"subject_system_account_id_unique": {
|
|
443
|
+
"name": "subject_system_account_id_unique",
|
|
444
|
+
"nullsNotDistinct": false,
|
|
445
|
+
"columns": [
|
|
446
|
+
"system_account_id"
|
|
447
|
+
]
|
|
448
|
+
},
|
|
449
|
+
"subject_user_id_unique": {
|
|
450
|
+
"name": "subject_user_id_unique",
|
|
451
|
+
"nullsNotDistinct": false,
|
|
452
|
+
"columns": [
|
|
453
|
+
"user_id"
|
|
454
|
+
]
|
|
455
|
+
},
|
|
456
|
+
"subject_service_account_id_unique": {
|
|
457
|
+
"name": "subject_service_account_id_unique",
|
|
458
|
+
"nullsNotDistinct": false,
|
|
459
|
+
"columns": [
|
|
460
|
+
"service_account_id"
|
|
461
|
+
]
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
"policies": {},
|
|
465
|
+
"checkConstraints": {
|
|
466
|
+
"authentication_subject_reference_check": {
|
|
467
|
+
"name": "authentication_subject_reference_check",
|
|
468
|
+
"value": "num_nonnulls(\"authentication\".\"subject\".\"system_account_id\", \"authentication\".\"subject\".\"user_id\", \"authentication\".\"subject\".\"service_account_id\") = 1"
|
|
469
|
+
}
|
|
470
|
+
},
|
|
471
|
+
"isRLSEnabled": false
|
|
472
|
+
},
|
|
473
|
+
"authentication.system_account": {
|
|
474
|
+
"name": "system_account",
|
|
475
|
+
"schema": "authentication",
|
|
476
|
+
"columns": {
|
|
477
|
+
"id": {
|
|
478
|
+
"name": "id",
|
|
479
|
+
"type": "uuid",
|
|
480
|
+
"primaryKey": false,
|
|
481
|
+
"notNull": true,
|
|
482
|
+
"default": "gen_random_uuid()"
|
|
483
|
+
},
|
|
484
|
+
"tenant_id": {
|
|
485
|
+
"name": "tenant_id",
|
|
486
|
+
"type": "uuid",
|
|
487
|
+
"primaryKey": false,
|
|
488
|
+
"notNull": true
|
|
489
|
+
},
|
|
490
|
+
"identifier": {
|
|
491
|
+
"name": "identifier",
|
|
492
|
+
"type": "text",
|
|
493
|
+
"primaryKey": false,
|
|
494
|
+
"notNull": true
|
|
495
|
+
},
|
|
496
|
+
"revision": {
|
|
497
|
+
"name": "revision",
|
|
498
|
+
"type": "integer",
|
|
499
|
+
"primaryKey": false,
|
|
500
|
+
"notNull": true
|
|
501
|
+
},
|
|
502
|
+
"revision_timestamp": {
|
|
503
|
+
"name": "revision_timestamp",
|
|
504
|
+
"type": "timestamp with time zone",
|
|
505
|
+
"primaryKey": false,
|
|
506
|
+
"notNull": true
|
|
507
|
+
},
|
|
508
|
+
"create_timestamp": {
|
|
509
|
+
"name": "create_timestamp",
|
|
510
|
+
"type": "timestamp with time zone",
|
|
511
|
+
"primaryKey": false,
|
|
512
|
+
"notNull": true
|
|
513
|
+
},
|
|
514
|
+
"delete_timestamp": {
|
|
515
|
+
"name": "delete_timestamp",
|
|
516
|
+
"type": "timestamp with time zone",
|
|
517
|
+
"primaryKey": false,
|
|
518
|
+
"notNull": false
|
|
519
|
+
},
|
|
520
|
+
"attributes": {
|
|
521
|
+
"name": "attributes",
|
|
522
|
+
"type": "jsonb",
|
|
523
|
+
"primaryKey": false,
|
|
524
|
+
"notNull": true,
|
|
525
|
+
"default": "'{}'::jsonb"
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
"indexes": {},
|
|
529
|
+
"foreignKeys": {},
|
|
530
|
+
"compositePrimaryKeys": {
|
|
531
|
+
"system_account_tenant_id_id_pk": {
|
|
532
|
+
"name": "system_account_tenant_id_id_pk",
|
|
533
|
+
"columns": [
|
|
534
|
+
"tenant_id",
|
|
535
|
+
"id"
|
|
536
|
+
]
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
"uniqueConstraints": {
|
|
540
|
+
"system_account_identifier_unique": {
|
|
541
|
+
"name": "system_account_identifier_unique",
|
|
542
|
+
"nullsNotDistinct": false,
|
|
543
|
+
"columns": [
|
|
544
|
+
"identifier"
|
|
545
|
+
]
|
|
546
|
+
}
|
|
547
|
+
},
|
|
548
|
+
"policies": {},
|
|
549
|
+
"checkConstraints": {},
|
|
550
|
+
"isRLSEnabled": false
|
|
551
|
+
},
|
|
552
|
+
"authentication.user": {
|
|
553
|
+
"name": "user",
|
|
554
|
+
"schema": "authentication",
|
|
555
|
+
"columns": {
|
|
556
|
+
"id": {
|
|
557
|
+
"name": "id",
|
|
558
|
+
"type": "uuid",
|
|
559
|
+
"primaryKey": false,
|
|
560
|
+
"notNull": true,
|
|
561
|
+
"default": "gen_random_uuid()"
|
|
562
|
+
},
|
|
563
|
+
"tenant_id": {
|
|
564
|
+
"name": "tenant_id",
|
|
565
|
+
"type": "uuid",
|
|
566
|
+
"primaryKey": false,
|
|
567
|
+
"notNull": true
|
|
568
|
+
},
|
|
569
|
+
"status": {
|
|
570
|
+
"name": "status",
|
|
571
|
+
"type": "user_status",
|
|
572
|
+
"typeSchema": "authentication",
|
|
573
|
+
"primaryKey": false,
|
|
574
|
+
"notNull": true
|
|
575
|
+
},
|
|
576
|
+
"email": {
|
|
577
|
+
"name": "email",
|
|
578
|
+
"type": "text",
|
|
579
|
+
"primaryKey": false,
|
|
580
|
+
"notNull": true
|
|
581
|
+
},
|
|
582
|
+
"first_name": {
|
|
583
|
+
"name": "first_name",
|
|
584
|
+
"type": "text",
|
|
585
|
+
"primaryKey": false,
|
|
586
|
+
"notNull": true
|
|
587
|
+
},
|
|
588
|
+
"last_name": {
|
|
589
|
+
"name": "last_name",
|
|
590
|
+
"type": "text",
|
|
591
|
+
"primaryKey": false,
|
|
592
|
+
"notNull": true
|
|
593
|
+
},
|
|
594
|
+
"revision": {
|
|
595
|
+
"name": "revision",
|
|
596
|
+
"type": "integer",
|
|
597
|
+
"primaryKey": false,
|
|
598
|
+
"notNull": true
|
|
599
|
+
},
|
|
600
|
+
"revision_timestamp": {
|
|
601
|
+
"name": "revision_timestamp",
|
|
602
|
+
"type": "timestamp with time zone",
|
|
603
|
+
"primaryKey": false,
|
|
604
|
+
"notNull": true
|
|
605
|
+
},
|
|
606
|
+
"create_timestamp": {
|
|
607
|
+
"name": "create_timestamp",
|
|
608
|
+
"type": "timestamp with time zone",
|
|
609
|
+
"primaryKey": false,
|
|
610
|
+
"notNull": true
|
|
611
|
+
},
|
|
612
|
+
"delete_timestamp": {
|
|
613
|
+
"name": "delete_timestamp",
|
|
614
|
+
"type": "timestamp with time zone",
|
|
615
|
+
"primaryKey": false,
|
|
616
|
+
"notNull": false
|
|
617
|
+
},
|
|
618
|
+
"attributes": {
|
|
619
|
+
"name": "attributes",
|
|
620
|
+
"type": "jsonb",
|
|
621
|
+
"primaryKey": false,
|
|
622
|
+
"notNull": true,
|
|
623
|
+
"default": "'{}'::jsonb"
|
|
624
|
+
}
|
|
625
|
+
},
|
|
626
|
+
"indexes": {},
|
|
627
|
+
"foreignKeys": {},
|
|
628
|
+
"compositePrimaryKeys": {
|
|
629
|
+
"user_tenant_id_id_pk": {
|
|
630
|
+
"name": "user_tenant_id_id_pk",
|
|
631
|
+
"columns": [
|
|
632
|
+
"tenant_id",
|
|
633
|
+
"id"
|
|
634
|
+
]
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
"uniqueConstraints": {
|
|
638
|
+
"user_tenant_id_email_unique": {
|
|
639
|
+
"name": "user_tenant_id_email_unique",
|
|
640
|
+
"nullsNotDistinct": false,
|
|
641
|
+
"columns": [
|
|
642
|
+
"tenant_id",
|
|
643
|
+
"email"
|
|
644
|
+
]
|
|
645
|
+
}
|
|
646
|
+
},
|
|
647
|
+
"policies": {},
|
|
648
|
+
"checkConstraints": {},
|
|
649
|
+
"isRLSEnabled": false
|
|
650
|
+
}
|
|
651
|
+
},
|
|
652
|
+
"enums": {
|
|
653
|
+
"authentication.subject_type": {
|
|
654
|
+
"name": "subject_type",
|
|
655
|
+
"schema": "authentication",
|
|
656
|
+
"values": [
|
|
657
|
+
"system",
|
|
658
|
+
"user",
|
|
659
|
+
"service-account"
|
|
660
|
+
]
|
|
661
|
+
},
|
|
662
|
+
"authentication.user_status": {
|
|
663
|
+
"name": "user_status",
|
|
664
|
+
"schema": "authentication",
|
|
665
|
+
"values": [
|
|
666
|
+
"active",
|
|
667
|
+
"suspended",
|
|
668
|
+
"pending-approval",
|
|
669
|
+
"invited"
|
|
670
|
+
]
|
|
176
671
|
}
|
|
177
672
|
},
|
|
178
|
-
"enums": {},
|
|
179
673
|
"schemas": {},
|
|
180
674
|
"sequences": {},
|
|
181
675
|
"roles": {},
|
|
@@ -5,15 +5,8 @@
|
|
|
5
5
|
{
|
|
6
6
|
"idx": 0,
|
|
7
7
|
"version": "7",
|
|
8
|
-
"when":
|
|
9
|
-
"tag": "
|
|
10
|
-
"breakpoints": true
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"idx": 1,
|
|
14
|
-
"version": "7",
|
|
15
|
-
"when": 1767824150492,
|
|
16
|
-
"tag": "0001_condemned_pretty_boy",
|
|
8
|
+
"when": 1767826939668,
|
|
9
|
+
"tag": "0000_violet_callisto",
|
|
17
10
|
"breakpoints": true
|
|
18
11
|
}
|
|
19
12
|
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|