@happyvertical/smrt-users 0.38.11 → 0.38.13
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/chunks/{TerminalAuthService-DGp_Wsil.js → TerminalAuthService-BZ9p1mzh.js} +2 -2
- package/dist/chunks/{TerminalAuthService-DGp_Wsil.js.map → TerminalAuthService-BZ9p1mzh.js.map} +1 -1
- package/dist/collections/TenantIntegrationCollection.d.ts +9 -0
- package/dist/collections/TenantIntegrationCollection.d.ts.map +1 -0
- package/dist/collections/index.d.ts +1 -0
- package/dist/collections/index.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +210 -28
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +393 -2
- package/dist/models/TenantIntegration.d.ts +78 -0
- package/dist/models/TenantIntegration.d.ts.map +1 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +212 -5
- package/dist/sveltekit.js +1 -1
- package/package.json +9 -9
package/dist/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0.0",
|
|
3
|
-
"timestamp":
|
|
3
|
+
"timestamp": 1783481769752,
|
|
4
4
|
"packageName": "@happyvertical/smrt-users",
|
|
5
|
-
"packageVersion": "0.38.
|
|
5
|
+
"packageVersion": "0.38.13",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-users:AccessRequestCollection": {
|
|
8
8
|
"name": "accessrequestcollection",
|
|
@@ -2190,6 +2190,124 @@
|
|
|
2190
2190
|
"version": "bcfa1eef"
|
|
2191
2191
|
}
|
|
2192
2192
|
},
|
|
2193
|
+
"@happyvertical/smrt-users:TenantIntegrationCollection": {
|
|
2194
|
+
"name": "tenantintegrationcollection",
|
|
2195
|
+
"className": "TenantIntegrationCollection",
|
|
2196
|
+
"qualifiedName": "@happyvertical/smrt-users:TenantIntegrationCollection",
|
|
2197
|
+
"collection": "tenantintegrations",
|
|
2198
|
+
"filePath": "/home/runner/_work/smrt/smrt/packages/users/src/collections/TenantIntegrationCollection.ts",
|
|
2199
|
+
"packageName": "@happyvertical/smrt-users",
|
|
2200
|
+
"fields": {},
|
|
2201
|
+
"methods": {
|
|
2202
|
+
"listForTenant": {
|
|
2203
|
+
"name": "listForTenant",
|
|
2204
|
+
"async": true,
|
|
2205
|
+
"parameters": [
|
|
2206
|
+
{
|
|
2207
|
+
"name": "tenantId",
|
|
2208
|
+
"type": "string",
|
|
2209
|
+
"optional": false
|
|
2210
|
+
}
|
|
2211
|
+
],
|
|
2212
|
+
"returnType": "Promise<TenantIntegration[]>",
|
|
2213
|
+
"isStatic": false,
|
|
2214
|
+
"isPublic": true
|
|
2215
|
+
},
|
|
2216
|
+
"findFor": {
|
|
2217
|
+
"name": "findFor",
|
|
2218
|
+
"async": true,
|
|
2219
|
+
"parameters": [
|
|
2220
|
+
{
|
|
2221
|
+
"name": "tenantId",
|
|
2222
|
+
"type": "string",
|
|
2223
|
+
"optional": false
|
|
2224
|
+
},
|
|
2225
|
+
{
|
|
2226
|
+
"name": "provider",
|
|
2227
|
+
"type": "TenantIntegrationProvider",
|
|
2228
|
+
"optional": false
|
|
2229
|
+
}
|
|
2230
|
+
],
|
|
2231
|
+
"returnType": "Promise<TenantIntegration | null>",
|
|
2232
|
+
"isStatic": false,
|
|
2233
|
+
"isPublic": true
|
|
2234
|
+
},
|
|
2235
|
+
"findOrInit": {
|
|
2236
|
+
"name": "findOrInit",
|
|
2237
|
+
"async": true,
|
|
2238
|
+
"parameters": [
|
|
2239
|
+
{
|
|
2240
|
+
"name": "tenantId",
|
|
2241
|
+
"type": "string",
|
|
2242
|
+
"optional": false
|
|
2243
|
+
},
|
|
2244
|
+
{
|
|
2245
|
+
"name": "provider",
|
|
2246
|
+
"type": "TenantIntegrationProvider",
|
|
2247
|
+
"optional": false
|
|
2248
|
+
}
|
|
2249
|
+
],
|
|
2250
|
+
"returnType": "Promise<TenantIntegration>",
|
|
2251
|
+
"isStatic": false,
|
|
2252
|
+
"isPublic": true
|
|
2253
|
+
}
|
|
2254
|
+
},
|
|
2255
|
+
"decoratorConfig": {
|
|
2256
|
+
"tableName": "tenant_integrations"
|
|
2257
|
+
},
|
|
2258
|
+
"extends": "SmrtCollection",
|
|
2259
|
+
"extendsTypeArg": "TenantIntegration",
|
|
2260
|
+
"exportName": "TenantIntegrationCollection",
|
|
2261
|
+
"collectionExportName": "TenantIntegrationCollectionCollection",
|
|
2262
|
+
"schema": {
|
|
2263
|
+
"tableName": "tenant_integrations",
|
|
2264
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"tenant_integrations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp\n);",
|
|
2265
|
+
"columns": {
|
|
2266
|
+
"id": {
|
|
2267
|
+
"type": "UUID",
|
|
2268
|
+
"primaryKey": true,
|
|
2269
|
+
"referenceKind": "id",
|
|
2270
|
+
"notNull": true
|
|
2271
|
+
},
|
|
2272
|
+
"slug": {
|
|
2273
|
+
"type": "TEXT",
|
|
2274
|
+
"notNull": true
|
|
2275
|
+
},
|
|
2276
|
+
"context": {
|
|
2277
|
+
"type": "TEXT",
|
|
2278
|
+
"notNull": true,
|
|
2279
|
+
"default": ""
|
|
2280
|
+
},
|
|
2281
|
+
"created_at": {
|
|
2282
|
+
"type": "TIMESTAMP",
|
|
2283
|
+
"notNull": true,
|
|
2284
|
+
"default": "current_timestamp"
|
|
2285
|
+
},
|
|
2286
|
+
"updated_at": {
|
|
2287
|
+
"type": "TIMESTAMP",
|
|
2288
|
+
"notNull": true,
|
|
2289
|
+
"default": "current_timestamp"
|
|
2290
|
+
}
|
|
2291
|
+
},
|
|
2292
|
+
"indexes": [
|
|
2293
|
+
{
|
|
2294
|
+
"name": "tenant_integrations_id_idx",
|
|
2295
|
+
"columns": [
|
|
2296
|
+
"id"
|
|
2297
|
+
]
|
|
2298
|
+
},
|
|
2299
|
+
{
|
|
2300
|
+
"name": "tenant_integrations_slug_context_idx",
|
|
2301
|
+
"columns": [
|
|
2302
|
+
"slug",
|
|
2303
|
+
"context"
|
|
2304
|
+
],
|
|
2305
|
+
"unique": true
|
|
2306
|
+
}
|
|
2307
|
+
],
|
|
2308
|
+
"version": "a3261f8f"
|
|
2309
|
+
}
|
|
2310
|
+
},
|
|
2193
2311
|
"@happyvertical/smrt-users:TenantPermissionOverrideCollection": {
|
|
2194
2312
|
"name": "tenantpermissionoverridecollection",
|
|
2195
2313
|
"className": "TenantPermissionOverrideCollection",
|
|
@@ -5375,6 +5493,279 @@
|
|
|
5375
5493
|
"version": "35dbdaec"
|
|
5376
5494
|
}
|
|
5377
5495
|
},
|
|
5496
|
+
"@happyvertical/smrt-users:TenantIntegration": {
|
|
5497
|
+
"name": "tenantintegration",
|
|
5498
|
+
"className": "TenantIntegration",
|
|
5499
|
+
"qualifiedName": "@happyvertical/smrt-users:TenantIntegration",
|
|
5500
|
+
"collection": "tenantintegrations",
|
|
5501
|
+
"filePath": "/home/runner/_work/smrt/smrt/packages/users/src/models/TenantIntegration.ts",
|
|
5502
|
+
"packageName": "@happyvertical/smrt-users",
|
|
5503
|
+
"fields": {
|
|
5504
|
+
"tenantId": {
|
|
5505
|
+
"type": "text",
|
|
5506
|
+
"required": true,
|
|
5507
|
+
"_meta": {
|
|
5508
|
+
"sqlType": "UUID",
|
|
5509
|
+
"__tenancy": {
|
|
5510
|
+
"isTenantIdField": true,
|
|
5511
|
+
"autoFilter": true,
|
|
5512
|
+
"required": true,
|
|
5513
|
+
"autoPopulate": true,
|
|
5514
|
+
"nullable": false,
|
|
5515
|
+
"mode": "required",
|
|
5516
|
+
"field": "tenantId",
|
|
5517
|
+
"allowSuperAdminBypass": false
|
|
5518
|
+
}
|
|
5519
|
+
}
|
|
5520
|
+
},
|
|
5521
|
+
"provider": {
|
|
5522
|
+
"type": "text",
|
|
5523
|
+
"required": false,
|
|
5524
|
+
"default": "aws"
|
|
5525
|
+
},
|
|
5526
|
+
"externalIds": {
|
|
5527
|
+
"type": "text",
|
|
5528
|
+
"required": false
|
|
5529
|
+
},
|
|
5530
|
+
"status": {
|
|
5531
|
+
"type": "text",
|
|
5532
|
+
"required": false,
|
|
5533
|
+
"default": "unprovisioned"
|
|
5534
|
+
},
|
|
5535
|
+
"lastCheckedAt": {
|
|
5536
|
+
"type": "datetime",
|
|
5537
|
+
"required": false
|
|
5538
|
+
},
|
|
5539
|
+
"lastCheckSummary": {
|
|
5540
|
+
"type": "text",
|
|
5541
|
+
"required": false
|
|
5542
|
+
},
|
|
5543
|
+
"lastError": {
|
|
5544
|
+
"type": "text",
|
|
5545
|
+
"required": false
|
|
5546
|
+
}
|
|
5547
|
+
},
|
|
5548
|
+
"methods": {
|
|
5549
|
+
"initialize": {
|
|
5550
|
+
"name": "initialize",
|
|
5551
|
+
"async": true,
|
|
5552
|
+
"parameters": [],
|
|
5553
|
+
"returnType": "Promise",
|
|
5554
|
+
"isStatic": false,
|
|
5555
|
+
"isPublic": true
|
|
5556
|
+
},
|
|
5557
|
+
"getExternalIds": {
|
|
5558
|
+
"name": "getExternalIds",
|
|
5559
|
+
"async": false,
|
|
5560
|
+
"parameters": [],
|
|
5561
|
+
"returnType": "Record<string, string>",
|
|
5562
|
+
"isStatic": false,
|
|
5563
|
+
"isPublic": true
|
|
5564
|
+
},
|
|
5565
|
+
"setExternalIds": {
|
|
5566
|
+
"name": "setExternalIds",
|
|
5567
|
+
"async": false,
|
|
5568
|
+
"parameters": [
|
|
5569
|
+
{
|
|
5570
|
+
"name": "externalIds",
|
|
5571
|
+
"type": "Record<string, string> | string",
|
|
5572
|
+
"optional": false
|
|
5573
|
+
}
|
|
5574
|
+
],
|
|
5575
|
+
"returnType": "void",
|
|
5576
|
+
"isStatic": false,
|
|
5577
|
+
"isPublic": true
|
|
5578
|
+
},
|
|
5579
|
+
"getExternalId": {
|
|
5580
|
+
"name": "getExternalId",
|
|
5581
|
+
"async": false,
|
|
5582
|
+
"parameters": [
|
|
5583
|
+
{
|
|
5584
|
+
"name": "key",
|
|
5585
|
+
"type": "string",
|
|
5586
|
+
"optional": false
|
|
5587
|
+
}
|
|
5588
|
+
],
|
|
5589
|
+
"returnType": "string | undefined",
|
|
5590
|
+
"isStatic": false,
|
|
5591
|
+
"isPublic": true
|
|
5592
|
+
},
|
|
5593
|
+
"setExternalId": {
|
|
5594
|
+
"name": "setExternalId",
|
|
5595
|
+
"async": false,
|
|
5596
|
+
"parameters": [
|
|
5597
|
+
{
|
|
5598
|
+
"name": "key",
|
|
5599
|
+
"type": "string",
|
|
5600
|
+
"optional": false
|
|
5601
|
+
},
|
|
5602
|
+
{
|
|
5603
|
+
"name": "value",
|
|
5604
|
+
"type": "string | undefined",
|
|
5605
|
+
"optional": false
|
|
5606
|
+
}
|
|
5607
|
+
],
|
|
5608
|
+
"returnType": "void",
|
|
5609
|
+
"isStatic": false,
|
|
5610
|
+
"isPublic": true
|
|
5611
|
+
},
|
|
5612
|
+
"getLastCheckSummary": {
|
|
5613
|
+
"name": "getLastCheckSummary",
|
|
5614
|
+
"async": false,
|
|
5615
|
+
"parameters": [],
|
|
5616
|
+
"returnType": "TenantIntegrationCheckSummary[]",
|
|
5617
|
+
"isStatic": false,
|
|
5618
|
+
"isPublic": true
|
|
5619
|
+
},
|
|
5620
|
+
"setLastCheckSummary": {
|
|
5621
|
+
"name": "setLastCheckSummary",
|
|
5622
|
+
"async": false,
|
|
5623
|
+
"parameters": [
|
|
5624
|
+
{
|
|
5625
|
+
"name": "summary",
|
|
5626
|
+
"type": "TenantIntegrationCheckSummary[] | string",
|
|
5627
|
+
"optional": false
|
|
5628
|
+
}
|
|
5629
|
+
],
|
|
5630
|
+
"returnType": "void",
|
|
5631
|
+
"isStatic": false,
|
|
5632
|
+
"isPublic": true
|
|
5633
|
+
},
|
|
5634
|
+
"recordDoctorRun": {
|
|
5635
|
+
"name": "recordDoctorRun",
|
|
5636
|
+
"async": false,
|
|
5637
|
+
"parameters": [
|
|
5638
|
+
{
|
|
5639
|
+
"name": "outcome",
|
|
5640
|
+
"type": "object",
|
|
5641
|
+
"optional": false
|
|
5642
|
+
}
|
|
5643
|
+
],
|
|
5644
|
+
"returnType": "void",
|
|
5645
|
+
"isStatic": false,
|
|
5646
|
+
"isPublic": true
|
|
5647
|
+
}
|
|
5648
|
+
},
|
|
5649
|
+
"decoratorConfig": {
|
|
5650
|
+
"tableName": "tenant_integrations",
|
|
5651
|
+
"conflictColumns": [
|
|
5652
|
+
"tenant_id",
|
|
5653
|
+
"provider"
|
|
5654
|
+
],
|
|
5655
|
+
"api": {
|
|
5656
|
+
"include": [
|
|
5657
|
+
"list",
|
|
5658
|
+
"get"
|
|
5659
|
+
]
|
|
5660
|
+
},
|
|
5661
|
+
"mcp": {
|
|
5662
|
+
"include": [
|
|
5663
|
+
"list",
|
|
5664
|
+
"get"
|
|
5665
|
+
]
|
|
5666
|
+
},
|
|
5667
|
+
"cli": true,
|
|
5668
|
+
"tenantScoped": {
|
|
5669
|
+
"mode": "required"
|
|
5670
|
+
}
|
|
5671
|
+
},
|
|
5672
|
+
"extends": "SmrtObject",
|
|
5673
|
+
"exportName": "TenantIntegration",
|
|
5674
|
+
"collectionExportName": "TenantIntegrationCollection",
|
|
5675
|
+
"validationRules": [
|
|
5676
|
+
{
|
|
5677
|
+
"field": "tenantId",
|
|
5678
|
+
"rule": "required",
|
|
5679
|
+
"fieldType": "text"
|
|
5680
|
+
}
|
|
5681
|
+
],
|
|
5682
|
+
"schema": {
|
|
5683
|
+
"tableName": "tenant_integrations",
|
|
5684
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"tenant_integrations\" (\n \"id\" UUID PRIMARY KEY NOT NULL,\n \"slug\" TEXT NOT NULL,\n \"context\" TEXT NOT NULL DEFAULT '',\n \"created_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"updated_at\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\n \"tenant_id\" UUID NOT NULL,\n \"provider\" TEXT DEFAULT 'aws',\n \"external_ids\" TEXT,\n \"status\" TEXT DEFAULT 'unprovisioned',\n \"last_checked_at\" TIMESTAMP,\n \"last_check_summary\" TEXT,\n \"last_error\" TEXT\n);",
|
|
5685
|
+
"columns": {
|
|
5686
|
+
"id": {
|
|
5687
|
+
"type": "UUID",
|
|
5688
|
+
"primaryKey": true,
|
|
5689
|
+
"referenceKind": "id",
|
|
5690
|
+
"notNull": true
|
|
5691
|
+
},
|
|
5692
|
+
"slug": {
|
|
5693
|
+
"type": "TEXT",
|
|
5694
|
+
"notNull": true
|
|
5695
|
+
},
|
|
5696
|
+
"context": {
|
|
5697
|
+
"type": "TEXT",
|
|
5698
|
+
"notNull": true,
|
|
5699
|
+
"default": ""
|
|
5700
|
+
},
|
|
5701
|
+
"created_at": {
|
|
5702
|
+
"type": "TIMESTAMP",
|
|
5703
|
+
"notNull": true,
|
|
5704
|
+
"default": "current_timestamp"
|
|
5705
|
+
},
|
|
5706
|
+
"updated_at": {
|
|
5707
|
+
"type": "TIMESTAMP",
|
|
5708
|
+
"notNull": true,
|
|
5709
|
+
"default": "current_timestamp"
|
|
5710
|
+
},
|
|
5711
|
+
"tenant_id": {
|
|
5712
|
+
"type": "UUID",
|
|
5713
|
+
"referenceKind": "tenantId",
|
|
5714
|
+
"notNull": true,
|
|
5715
|
+
"unique": false
|
|
5716
|
+
},
|
|
5717
|
+
"provider": {
|
|
5718
|
+
"type": "TEXT",
|
|
5719
|
+
"notNull": false,
|
|
5720
|
+
"unique": false,
|
|
5721
|
+
"default": "aws"
|
|
5722
|
+
},
|
|
5723
|
+
"external_ids": {
|
|
5724
|
+
"type": "TEXT",
|
|
5725
|
+
"notNull": false,
|
|
5726
|
+
"unique": false
|
|
5727
|
+
},
|
|
5728
|
+
"status": {
|
|
5729
|
+
"type": "TEXT",
|
|
5730
|
+
"notNull": false,
|
|
5731
|
+
"unique": false,
|
|
5732
|
+
"default": "unprovisioned"
|
|
5733
|
+
},
|
|
5734
|
+
"last_checked_at": {
|
|
5735
|
+
"type": "TIMESTAMP",
|
|
5736
|
+
"notNull": false,
|
|
5737
|
+
"unique": false
|
|
5738
|
+
},
|
|
5739
|
+
"last_check_summary": {
|
|
5740
|
+
"type": "TEXT",
|
|
5741
|
+
"notNull": false,
|
|
5742
|
+
"unique": false
|
|
5743
|
+
},
|
|
5744
|
+
"last_error": {
|
|
5745
|
+
"type": "TEXT",
|
|
5746
|
+
"notNull": false,
|
|
5747
|
+
"unique": false
|
|
5748
|
+
}
|
|
5749
|
+
},
|
|
5750
|
+
"indexes": [
|
|
5751
|
+
{
|
|
5752
|
+
"name": "tenant_integrations_id_idx",
|
|
5753
|
+
"columns": [
|
|
5754
|
+
"id"
|
|
5755
|
+
]
|
|
5756
|
+
},
|
|
5757
|
+
{
|
|
5758
|
+
"name": "tenant_integrations_tenant_id_provider_idx",
|
|
5759
|
+
"columns": [
|
|
5760
|
+
"tenant_id",
|
|
5761
|
+
"provider"
|
|
5762
|
+
],
|
|
5763
|
+
"unique": true
|
|
5764
|
+
}
|
|
5765
|
+
],
|
|
5766
|
+
"version": "3ed31966"
|
|
5767
|
+
}
|
|
5768
|
+
},
|
|
5378
5769
|
"@happyvertical/smrt-users:TenantPermissionOverride": {
|
|
5379
5770
|
"name": "tenantpermissionoverride",
|
|
5380
5771
|
"className": "TenantPermissionOverride",
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { SmrtObject, SmrtObjectOptions } from '@happyvertical/smrt-core';
|
|
2
|
+
/**
|
|
3
|
+
* Built-in provider names. The string type is intentionally open so apps can
|
|
4
|
+
* add providers without a model migration.
|
|
5
|
+
*/
|
|
6
|
+
export type TenantIntegrationProvider = 'aws' | 'bifrost' | 'glitchtip' | 'imago' | 'matomo' | (string & {});
|
|
7
|
+
/**
|
|
8
|
+
* Provisioning and health states for a tenant integration.
|
|
9
|
+
*
|
|
10
|
+
* - `unprovisioned`: no external resources have been created yet.
|
|
11
|
+
* - `provisioning`: provisioning is currently queued or running.
|
|
12
|
+
* - `active`: external resources exist and the latest health check passed.
|
|
13
|
+
* - `drifted`: local bookkeeping disagrees with provider state.
|
|
14
|
+
* - `failed`: the latest provisioning attempt or health check failed.
|
|
15
|
+
*/
|
|
16
|
+
export type TenantIntegrationStatus = 'unprovisioned' | 'provisioning' | 'active' | 'drifted' | 'failed';
|
|
17
|
+
export interface TenantIntegrationCheckSummary {
|
|
18
|
+
name: string;
|
|
19
|
+
ok: boolean;
|
|
20
|
+
message?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface TenantIntegrationOptions extends SmrtObjectOptions {
|
|
23
|
+
tenantId?: string;
|
|
24
|
+
provider?: TenantIntegrationProvider;
|
|
25
|
+
externalIds?: Record<string, string> | string;
|
|
26
|
+
status?: TenantIntegrationStatus;
|
|
27
|
+
lastCheckedAt?: Date | null;
|
|
28
|
+
lastCheckSummary?: TenantIntegrationCheckSummary[] | string;
|
|
29
|
+
lastError?: string | null;
|
|
30
|
+
}
|
|
31
|
+
export declare class TenantIntegration extends SmrtObject {
|
|
32
|
+
/**
|
|
33
|
+
* Tenant this integration belongs to. Combined with `provider`, this is the
|
|
34
|
+
* natural key for the row.
|
|
35
|
+
*/
|
|
36
|
+
tenantId: string;
|
|
37
|
+
/**
|
|
38
|
+
* Provider identifier, such as `aws`, `matomo`, `glitchtip`, or an
|
|
39
|
+
* app-defined provider string.
|
|
40
|
+
*/
|
|
41
|
+
provider: TenantIntegrationProvider;
|
|
42
|
+
/**
|
|
43
|
+
* Provider-side identifiers. Shape depends on the provider. This must not
|
|
44
|
+
* contain provider credentials or secret material.
|
|
45
|
+
*/
|
|
46
|
+
externalIds: string;
|
|
47
|
+
/**
|
|
48
|
+
* Current provisioning/health status.
|
|
49
|
+
*/
|
|
50
|
+
status: TenantIntegrationStatus;
|
|
51
|
+
/**
|
|
52
|
+
* UTC timestamp of the most recent doctor/provisioning check.
|
|
53
|
+
*/
|
|
54
|
+
lastCheckedAt: Date | null;
|
|
55
|
+
/**
|
|
56
|
+
* Per-check pass/fail summary from the most recent doctor run.
|
|
57
|
+
*/
|
|
58
|
+
lastCheckSummary: string;
|
|
59
|
+
/**
|
|
60
|
+
* Most recent error message when `status === 'failed'`, or null otherwise.
|
|
61
|
+
*/
|
|
62
|
+
lastError: string | null;
|
|
63
|
+
constructor(options?: TenantIntegrationOptions);
|
|
64
|
+
initialize(): Promise<this>;
|
|
65
|
+
private normalizeJsonFields;
|
|
66
|
+
getExternalIds(): Record<string, string>;
|
|
67
|
+
setExternalIds(externalIds: Record<string, string> | string): void;
|
|
68
|
+
getExternalId(key: string): string | undefined;
|
|
69
|
+
setExternalId(key: string, value: string | undefined): void;
|
|
70
|
+
getLastCheckSummary(): TenantIntegrationCheckSummary[];
|
|
71
|
+
setLastCheckSummary(summary: TenantIntegrationCheckSummary[] | string): void;
|
|
72
|
+
recordDoctorRun(outcome: {
|
|
73
|
+
status: TenantIntegrationStatus;
|
|
74
|
+
summary: TenantIntegrationCheckSummary[];
|
|
75
|
+
error?: string | null;
|
|
76
|
+
}): void;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=TenantIntegration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TenantIntegration.d.ts","sourceRoot":"","sources":["../../src/models/TenantIntegration.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;AAGlC;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GACjC,KAAK,GACL,SAAS,GACT,WAAW,GACX,OAAO,GACP,QAAQ,GACR,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAElB;;;;;;;;GAQG;AACH,MAAM,MAAM,uBAAuB,GAC/B,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AG,MAAM,GAAG,SAAS;IAK9C,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAW3D,mBAAmB,IAAI,6BAA6B,EAAE;IAItD,mBAAmB,CAAC,OAAO,EAAE,6BAA6B,EAAE,GAAG,MAAM,GAAG,IAAI;IAK5E,eAAe,CAAC,OAAO,EAAE;QACvB,MAAM,EAAE,uBAAuB,CAAC;QAChC,OAAO,EAAE,6BAA6B,EAAE,CAAC;QACzC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACvB,GAAG,IAAI;CAMT"}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export { Role } from './Role.js';
|
|
|
15
15
|
export { RolePermission } from './RolePermission.js';
|
|
16
16
|
export { DEFAULT_SESSION_TTL, generateSessionId, Session, } from './Session.js';
|
|
17
17
|
export { MAX_TENANT_HIERARCHY_DEPTH, Tenant } from './Tenant.js';
|
|
18
|
+
export { TenantIntegration, type TenantIntegrationCheckSummary, type TenantIntegrationOptions, type TenantIntegrationProvider, type TenantIntegrationStatus, } from './TenantIntegration.js';
|
|
18
19
|
export { TenantPermissionOverride } from './TenantPermissionOverride.js';
|
|
19
20
|
export { isValidEmail, normalizeEmail, User } from './User.js';
|
|
20
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE9E,OAAO,EACL,cAAc,EACd,KAAK,oBAAoB,EACzB,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,SAA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