@happyvertical/smrt-secrets 0.62.6 → 0.62.7
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/AGENTS.md +13 -0
- package/dist/chunks/ConnectState-DUeYDO6b.js +289 -0
- package/dist/chunks/ConnectState-DUeYDO6b.js.map +1 -0
- package/dist/chunks/{SecretService-C5Dxnpkj.js → SecretService-DyzsJCio.js} +3 -116
- package/dist/chunks/SecretService-DyzsJCio.js.map +1 -0
- package/dist/chunks/TenantKey-p_gp_teA.js +356 -0
- package/dist/chunks/TenantKey-p_gp_teA.js.map +1 -0
- package/dist/chunks/dist-kZ2KUDiZ.js +129 -0
- package/dist/chunks/dist-kZ2KUDiZ.js.map +1 -0
- package/dist/collections/ConnectStateCollection.d.ts +20 -0
- package/dist/collections/ConnectStateCollection.d.ts.map +1 -0
- package/dist/collections/index.d.ts +1 -0
- package/dist/collections/index.d.ts.map +1 -1
- package/dist/connect/index.d.ts +7 -0
- package/dist/connect/index.d.ts.map +1 -0
- package/dist/connect/index.js +215 -0
- package/dist/connect/index.js.map +1 -0
- package/dist/connect/oauth.d.ts +46 -0
- package/dist/connect/oauth.d.ts.map +1 -0
- package/dist/connect/state.d.ts +57 -0
- package/dist/connect/state.d.ts.map +1 -0
- package/dist/connect/types.d.ts +65 -0
- package/dist/connect/types.d.ts.map +1 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +447 -2
- package/dist/models/ConnectState.d.ts +42 -0
- package/dist/models/ConnectState.d.ts.map +1 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +4 -2
- package/dist/services/SecretService.js +1 -1
- package/dist/smrt-knowledge.json +185 -8
- package/dist/smrt-knowledge.okf.md +5 -2
- package/package.json +12 -8
- package/dist/chunks/SecretService-C5Dxnpkj.js.map +0 -1
- package/dist/chunks/TenantKey-CaZZ6uAB.js +0 -366
- package/dist/chunks/TenantKey-CaZZ6uAB.js.map +0 -1
package/dist/manifest.json
CHANGED
|
@@ -2,8 +2,196 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-secrets",
|
|
5
|
-
"packageVersion": "0.62.
|
|
5
|
+
"packageVersion": "0.62.7",
|
|
6
6
|
"objects": {
|
|
7
|
+
"@happyvertical/smrt-secrets:ConnectStateCollection": {
|
|
8
|
+
"name": "connectstatecollection",
|
|
9
|
+
"className": "ConnectStateCollection",
|
|
10
|
+
"qualifiedName": "@happyvertical/smrt-secrets:ConnectStateCollection",
|
|
11
|
+
"collection": "connectstates",
|
|
12
|
+
"filePath": "src/collections/ConnectStateCollection.ts",
|
|
13
|
+
"packageName": "@happyvertical/smrt-secrets",
|
|
14
|
+
"fields": {},
|
|
15
|
+
"methods": {
|
|
16
|
+
"asStore": {
|
|
17
|
+
"name": "asStore",
|
|
18
|
+
"async": false,
|
|
19
|
+
"parameters": [],
|
|
20
|
+
"returnType": "ConnectStateStore",
|
|
21
|
+
"isStatic": false,
|
|
22
|
+
"isPublic": true
|
|
23
|
+
},
|
|
24
|
+
"findByState": {
|
|
25
|
+
"name": "findByState",
|
|
26
|
+
"async": true,
|
|
27
|
+
"parameters": [
|
|
28
|
+
{
|
|
29
|
+
"name": "state",
|
|
30
|
+
"type": "string",
|
|
31
|
+
"optional": false
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"returnType": "Promise<ConnectState | null>",
|
|
35
|
+
"isStatic": false,
|
|
36
|
+
"isPublic": true
|
|
37
|
+
},
|
|
38
|
+
"consume": {
|
|
39
|
+
"name": "consume",
|
|
40
|
+
"async": true,
|
|
41
|
+
"parameters": [
|
|
42
|
+
{
|
|
43
|
+
"name": "record",
|
|
44
|
+
"type": "ConnectStateRecord",
|
|
45
|
+
"optional": false
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"returnType": "Promise<boolean>",
|
|
49
|
+
"isStatic": false,
|
|
50
|
+
"isPublic": true
|
|
51
|
+
},
|
|
52
|
+
"deleteExpired": {
|
|
53
|
+
"name": "deleteExpired",
|
|
54
|
+
"async": true,
|
|
55
|
+
"parameters": [
|
|
56
|
+
{
|
|
57
|
+
"name": "now",
|
|
58
|
+
"type": "Date",
|
|
59
|
+
"optional": true
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"returnType": "Promise<number>",
|
|
63
|
+
"isStatic": false,
|
|
64
|
+
"isPublic": true
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"decoratorConfig": {
|
|
68
|
+
"api": false,
|
|
69
|
+
"mcp": false,
|
|
70
|
+
"cli": false
|
|
71
|
+
},
|
|
72
|
+
"extends": "SmrtCollection",
|
|
73
|
+
"extendsTypeArg": "ConnectState",
|
|
74
|
+
"exportName": "ConnectStateCollection",
|
|
75
|
+
"collectionExportName": "ConnectStateCollectionCollection",
|
|
76
|
+
"collectionOf": "@happyvertical/smrt-secrets:ConnectState",
|
|
77
|
+
"inheritedExposure": [
|
|
78
|
+
"api",
|
|
79
|
+
"mcp",
|
|
80
|
+
"cli"
|
|
81
|
+
],
|
|
82
|
+
"schema": {
|
|
83
|
+
"tableName": "connect_states",
|
|
84
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"connect_states\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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,\n \"kind\" TEXT,\n \"state\" TEXT,\n \"code_verifier\" TEXT,\n \"redirect_uri\" TEXT,\n \"scopes\" JSON DEFAULT '[]',\n \"initiated_by_user_id\" UUID,\n \"return_to\" TEXT,\n \"expires_at\" TIMESTAMP\n);",
|
|
85
|
+
"columns": {
|
|
86
|
+
"_sync_origin_device_id": {
|
|
87
|
+
"type": "TEXT"
|
|
88
|
+
},
|
|
89
|
+
"_sync_revision": {
|
|
90
|
+
"type": "INTEGER"
|
|
91
|
+
},
|
|
92
|
+
"id": {
|
|
93
|
+
"type": "UUID",
|
|
94
|
+
"primaryKey": true,
|
|
95
|
+
"referenceKind": "id",
|
|
96
|
+
"notNull": true
|
|
97
|
+
},
|
|
98
|
+
"slug": {
|
|
99
|
+
"type": "TEXT",
|
|
100
|
+
"notNull": true
|
|
101
|
+
},
|
|
102
|
+
"context": {
|
|
103
|
+
"type": "TEXT",
|
|
104
|
+
"notNull": true,
|
|
105
|
+
"default": ""
|
|
106
|
+
},
|
|
107
|
+
"created_at": {
|
|
108
|
+
"type": "TIMESTAMP",
|
|
109
|
+
"notNull": true,
|
|
110
|
+
"default": "current_timestamp"
|
|
111
|
+
},
|
|
112
|
+
"updated_at": {
|
|
113
|
+
"type": "TIMESTAMP",
|
|
114
|
+
"notNull": true,
|
|
115
|
+
"default": "current_timestamp"
|
|
116
|
+
},
|
|
117
|
+
"tenant_id": {
|
|
118
|
+
"type": "UUID",
|
|
119
|
+
"referenceKind": "tenantId",
|
|
120
|
+
"notNull": false,
|
|
121
|
+
"unique": false
|
|
122
|
+
},
|
|
123
|
+
"kind": {
|
|
124
|
+
"type": "TEXT",
|
|
125
|
+
"notNull": false,
|
|
126
|
+
"unique": false
|
|
127
|
+
},
|
|
128
|
+
"state": {
|
|
129
|
+
"type": "TEXT",
|
|
130
|
+
"notNull": false,
|
|
131
|
+
"unique": false
|
|
132
|
+
},
|
|
133
|
+
"code_verifier": {
|
|
134
|
+
"type": "TEXT",
|
|
135
|
+
"notNull": false,
|
|
136
|
+
"unique": false
|
|
137
|
+
},
|
|
138
|
+
"redirect_uri": {
|
|
139
|
+
"type": "TEXT",
|
|
140
|
+
"notNull": false,
|
|
141
|
+
"unique": false
|
|
142
|
+
},
|
|
143
|
+
"scopes": {
|
|
144
|
+
"type": "JSON",
|
|
145
|
+
"notNull": false,
|
|
146
|
+
"unique": false,
|
|
147
|
+
"default": []
|
|
148
|
+
},
|
|
149
|
+
"initiated_by_user_id": {
|
|
150
|
+
"type": "UUID",
|
|
151
|
+
"referenceKind": "crossPackageRef",
|
|
152
|
+
"notNull": false,
|
|
153
|
+
"unique": false
|
|
154
|
+
},
|
|
155
|
+
"return_to": {
|
|
156
|
+
"type": "TEXT",
|
|
157
|
+
"notNull": false,
|
|
158
|
+
"unique": false
|
|
159
|
+
},
|
|
160
|
+
"expires_at": {
|
|
161
|
+
"type": "TIMESTAMP",
|
|
162
|
+
"notNull": false,
|
|
163
|
+
"unique": false
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"indexes": [
|
|
167
|
+
{
|
|
168
|
+
"name": "connect_states_slug_context_idx",
|
|
169
|
+
"columns": [
|
|
170
|
+
"tenant_id",
|
|
171
|
+
"slug",
|
|
172
|
+
"context"
|
|
173
|
+
],
|
|
174
|
+
"unique": true,
|
|
175
|
+
"nullsNotDistinct": true
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"name": "connect_states_tenant_id_created_at_idx",
|
|
179
|
+
"columns": [
|
|
180
|
+
"tenant_id",
|
|
181
|
+
"created_at"
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"name": "connect_states_initiated_by_user_id_idx",
|
|
186
|
+
"columns": [
|
|
187
|
+
"initiated_by_user_id"
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"version": "6be71f00"
|
|
192
|
+
},
|
|
193
|
+
"importPath": "@happyvertical/smrt-secrets"
|
|
194
|
+
},
|
|
7
195
|
"@happyvertical/smrt-secrets:SecretAuditLogCollection": {
|
|
8
196
|
"name": "secretauditlogcollection",
|
|
9
197
|
"className": "SecretAuditLogCollection",
|
|
@@ -896,6 +1084,263 @@
|
|
|
896
1084
|
},
|
|
897
1085
|
"importPath": "@happyvertical/smrt-secrets"
|
|
898
1086
|
},
|
|
1087
|
+
"@happyvertical/smrt-secrets:ConnectState": {
|
|
1088
|
+
"name": "connectstate",
|
|
1089
|
+
"className": "ConnectState",
|
|
1090
|
+
"qualifiedName": "@happyvertical/smrt-secrets:ConnectState",
|
|
1091
|
+
"collection": "connectstates",
|
|
1092
|
+
"description": "A single-use, tenant- and user-bound record that carries a connect across a provider redirect: the CSRF state, the PKCE verifier, the redirect URI and the signed-in user who started it.",
|
|
1093
|
+
"filePath": "src/models/ConnectState.ts",
|
|
1094
|
+
"packageName": "@happyvertical/smrt-secrets",
|
|
1095
|
+
"fields": {
|
|
1096
|
+
"tenantId": {
|
|
1097
|
+
"type": "text",
|
|
1098
|
+
"_meta": {
|
|
1099
|
+
"__tenancy": {
|
|
1100
|
+
"isTenantIdField": true,
|
|
1101
|
+
"autoFilter": true,
|
|
1102
|
+
"required": false,
|
|
1103
|
+
"autoPopulate": true,
|
|
1104
|
+
"nullable": true,
|
|
1105
|
+
"mode": "optional",
|
|
1106
|
+
"field": "tenantId",
|
|
1107
|
+
"allowSuperAdminBypass": false
|
|
1108
|
+
},
|
|
1109
|
+
"__statedOptions": [
|
|
1110
|
+
"sqlType",
|
|
1111
|
+
"nullable",
|
|
1112
|
+
"__tenancy",
|
|
1113
|
+
"required"
|
|
1114
|
+
],
|
|
1115
|
+
"sqlType": "UUID",
|
|
1116
|
+
"nullable": true,
|
|
1117
|
+
"required": false
|
|
1118
|
+
},
|
|
1119
|
+
"required": false
|
|
1120
|
+
},
|
|
1121
|
+
"kind": {
|
|
1122
|
+
"type": "text",
|
|
1123
|
+
"_meta": {
|
|
1124
|
+
"__statedOptions": [
|
|
1125
|
+
"description"
|
|
1126
|
+
],
|
|
1127
|
+
"description": "The provider or flow this connect belongs to."
|
|
1128
|
+
},
|
|
1129
|
+
"required": false,
|
|
1130
|
+
"description": "The provider or flow this connect belongs to."
|
|
1131
|
+
},
|
|
1132
|
+
"state": {
|
|
1133
|
+
"type": "text",
|
|
1134
|
+
"_meta": {
|
|
1135
|
+
"__statedOptions": [
|
|
1136
|
+
"description"
|
|
1137
|
+
],
|
|
1138
|
+
"description": "The CSRF value sent to the provider."
|
|
1139
|
+
},
|
|
1140
|
+
"required": false,
|
|
1141
|
+
"description": "The CSRF value sent to the provider."
|
|
1142
|
+
},
|
|
1143
|
+
"codeVerifier": {
|
|
1144
|
+
"type": "text",
|
|
1145
|
+
"_meta": {
|
|
1146
|
+
"__statedOptions": [
|
|
1147
|
+
"description",
|
|
1148
|
+
"sensitive"
|
|
1149
|
+
],
|
|
1150
|
+
"description": "The PKCE code verifier.",
|
|
1151
|
+
"sensitive": true
|
|
1152
|
+
},
|
|
1153
|
+
"required": false,
|
|
1154
|
+
"description": "The PKCE code verifier.",
|
|
1155
|
+
"sensitive": true
|
|
1156
|
+
},
|
|
1157
|
+
"redirectUri": {
|
|
1158
|
+
"type": "text",
|
|
1159
|
+
"_meta": {
|
|
1160
|
+
"__statedOptions": [
|
|
1161
|
+
"description"
|
|
1162
|
+
],
|
|
1163
|
+
"description": "The callback URL the provider returns to."
|
|
1164
|
+
},
|
|
1165
|
+
"required": false,
|
|
1166
|
+
"description": "The callback URL the provider returns to."
|
|
1167
|
+
},
|
|
1168
|
+
"scopes": {
|
|
1169
|
+
"type": "json",
|
|
1170
|
+
"_meta": {
|
|
1171
|
+
"__statedOptions": [
|
|
1172
|
+
"description",
|
|
1173
|
+
"default"
|
|
1174
|
+
],
|
|
1175
|
+
"description": "The OAuth scopes requested."
|
|
1176
|
+
},
|
|
1177
|
+
"required": false,
|
|
1178
|
+
"default": [],
|
|
1179
|
+
"description": "The OAuth scopes requested."
|
|
1180
|
+
},
|
|
1181
|
+
"initiatedByUserId": {
|
|
1182
|
+
"type": "crossPackageRef",
|
|
1183
|
+
"_meta": {
|
|
1184
|
+
"__statedOptions": [
|
|
1185
|
+
"related"
|
|
1186
|
+
]
|
|
1187
|
+
},
|
|
1188
|
+
"required": false,
|
|
1189
|
+
"related": "@happyvertical/smrt-users:User"
|
|
1190
|
+
},
|
|
1191
|
+
"returnTo": {
|
|
1192
|
+
"type": "text",
|
|
1193
|
+
"_meta": {
|
|
1194
|
+
"__statedOptions": [
|
|
1195
|
+
"description"
|
|
1196
|
+
],
|
|
1197
|
+
"description": "The same-origin path to return to afterwards."
|
|
1198
|
+
},
|
|
1199
|
+
"required": false,
|
|
1200
|
+
"description": "The same-origin path to return to afterwards."
|
|
1201
|
+
},
|
|
1202
|
+
"expiresAt": {
|
|
1203
|
+
"type": "datetime",
|
|
1204
|
+
"_meta": {
|
|
1205
|
+
"__statedOptions": [
|
|
1206
|
+
"description"
|
|
1207
|
+
],
|
|
1208
|
+
"description": "When this connect link stops working."
|
|
1209
|
+
},
|
|
1210
|
+
"required": false,
|
|
1211
|
+
"description": "When this connect link stops working."
|
|
1212
|
+
}
|
|
1213
|
+
},
|
|
1214
|
+
"methods": {},
|
|
1215
|
+
"decoratorConfig": {
|
|
1216
|
+
"api": false,
|
|
1217
|
+
"mcp": false,
|
|
1218
|
+
"cli": false,
|
|
1219
|
+
"tenantScoped": {
|
|
1220
|
+
"mode": "optional"
|
|
1221
|
+
},
|
|
1222
|
+
"conflictColumns": [
|
|
1223
|
+
"tenant_id",
|
|
1224
|
+
"slug",
|
|
1225
|
+
"context"
|
|
1226
|
+
]
|
|
1227
|
+
},
|
|
1228
|
+
"extends": "SmrtObject",
|
|
1229
|
+
"exportName": "ConnectState",
|
|
1230
|
+
"collectionExportName": "ConnectStateCollection",
|
|
1231
|
+
"schema": {
|
|
1232
|
+
"tableName": "connect_states",
|
|
1233
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"connect_states\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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,\n \"kind\" TEXT,\n \"state\" TEXT,\n \"code_verifier\" TEXT,\n \"redirect_uri\" TEXT,\n \"scopes\" JSON DEFAULT '[]',\n \"initiated_by_user_id\" UUID,\n \"return_to\" TEXT,\n \"expires_at\" TIMESTAMP\n);",
|
|
1234
|
+
"columns": {
|
|
1235
|
+
"_sync_origin_device_id": {
|
|
1236
|
+
"type": "TEXT"
|
|
1237
|
+
},
|
|
1238
|
+
"_sync_revision": {
|
|
1239
|
+
"type": "INTEGER"
|
|
1240
|
+
},
|
|
1241
|
+
"id": {
|
|
1242
|
+
"type": "UUID",
|
|
1243
|
+
"primaryKey": true,
|
|
1244
|
+
"referenceKind": "id",
|
|
1245
|
+
"notNull": true
|
|
1246
|
+
},
|
|
1247
|
+
"slug": {
|
|
1248
|
+
"type": "TEXT",
|
|
1249
|
+
"notNull": true
|
|
1250
|
+
},
|
|
1251
|
+
"context": {
|
|
1252
|
+
"type": "TEXT",
|
|
1253
|
+
"notNull": true,
|
|
1254
|
+
"default": ""
|
|
1255
|
+
},
|
|
1256
|
+
"created_at": {
|
|
1257
|
+
"type": "TIMESTAMP",
|
|
1258
|
+
"notNull": true,
|
|
1259
|
+
"default": "current_timestamp"
|
|
1260
|
+
},
|
|
1261
|
+
"updated_at": {
|
|
1262
|
+
"type": "TIMESTAMP",
|
|
1263
|
+
"notNull": true,
|
|
1264
|
+
"default": "current_timestamp"
|
|
1265
|
+
},
|
|
1266
|
+
"tenant_id": {
|
|
1267
|
+
"type": "UUID",
|
|
1268
|
+
"referenceKind": "tenantId",
|
|
1269
|
+
"notNull": false,
|
|
1270
|
+
"unique": false
|
|
1271
|
+
},
|
|
1272
|
+
"kind": {
|
|
1273
|
+
"type": "TEXT",
|
|
1274
|
+
"notNull": false,
|
|
1275
|
+
"unique": false
|
|
1276
|
+
},
|
|
1277
|
+
"state": {
|
|
1278
|
+
"type": "TEXT",
|
|
1279
|
+
"notNull": false,
|
|
1280
|
+
"unique": false
|
|
1281
|
+
},
|
|
1282
|
+
"code_verifier": {
|
|
1283
|
+
"type": "TEXT",
|
|
1284
|
+
"notNull": false,
|
|
1285
|
+
"unique": false
|
|
1286
|
+
},
|
|
1287
|
+
"redirect_uri": {
|
|
1288
|
+
"type": "TEXT",
|
|
1289
|
+
"notNull": false,
|
|
1290
|
+
"unique": false
|
|
1291
|
+
},
|
|
1292
|
+
"scopes": {
|
|
1293
|
+
"type": "JSON",
|
|
1294
|
+
"notNull": false,
|
|
1295
|
+
"unique": false,
|
|
1296
|
+
"default": []
|
|
1297
|
+
},
|
|
1298
|
+
"initiated_by_user_id": {
|
|
1299
|
+
"type": "UUID",
|
|
1300
|
+
"referenceKind": "crossPackageRef",
|
|
1301
|
+
"notNull": false,
|
|
1302
|
+
"unique": false
|
|
1303
|
+
},
|
|
1304
|
+
"return_to": {
|
|
1305
|
+
"type": "TEXT",
|
|
1306
|
+
"notNull": false,
|
|
1307
|
+
"unique": false
|
|
1308
|
+
},
|
|
1309
|
+
"expires_at": {
|
|
1310
|
+
"type": "TIMESTAMP",
|
|
1311
|
+
"notNull": false,
|
|
1312
|
+
"unique": false
|
|
1313
|
+
}
|
|
1314
|
+
},
|
|
1315
|
+
"indexes": [
|
|
1316
|
+
{
|
|
1317
|
+
"name": "connect_states_slug_context_idx",
|
|
1318
|
+
"columns": [
|
|
1319
|
+
"tenant_id",
|
|
1320
|
+
"slug",
|
|
1321
|
+
"context"
|
|
1322
|
+
],
|
|
1323
|
+
"unique": true,
|
|
1324
|
+
"nullsNotDistinct": true
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
"name": "connect_states_tenant_id_created_at_idx",
|
|
1328
|
+
"columns": [
|
|
1329
|
+
"tenant_id",
|
|
1330
|
+
"created_at"
|
|
1331
|
+
]
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
"name": "connect_states_initiated_by_user_id_idx",
|
|
1335
|
+
"columns": [
|
|
1336
|
+
"initiated_by_user_id"
|
|
1337
|
+
]
|
|
1338
|
+
}
|
|
1339
|
+
],
|
|
1340
|
+
"version": "6be71f00"
|
|
1341
|
+
},
|
|
1342
|
+
"importPath": "@happyvertical/smrt-secrets/models"
|
|
1343
|
+
},
|
|
899
1344
|
"@happyvertical/smrt-secrets:Secret": {
|
|
900
1345
|
"name": "secret",
|
|
901
1346
|
"className": "Secret",
|
|
@@ -1830,6 +2275,6 @@
|
|
|
1830
2275
|
"@happyvertical/smrt-tenancy"
|
|
1831
2276
|
]
|
|
1832
2277
|
},
|
|
1833
|
-
"schemaFingerprint": "
|
|
2278
|
+
"schemaFingerprint": "c35548635e91a02622d0ec97df51c996a0f36641fd5dd1fcaf6bdc3e6c499359",
|
|
1834
2279
|
"stampsConstructors": true
|
|
1835
2280
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ConnectState: one in-flight credential connect (OAuth 2.0 / OIDC redirect).
|
|
3
|
+
* @packageDocumentation
|
|
4
|
+
*/
|
|
5
|
+
import type { SmrtObjectOptions } from '@happyvertical/smrt-core';
|
|
6
|
+
import { SmrtObject } from '@happyvertical/smrt-core';
|
|
7
|
+
export interface ConnectStateOptions extends SmrtObjectOptions {
|
|
8
|
+
tenantId?: string | null;
|
|
9
|
+
kind?: string;
|
|
10
|
+
state?: string;
|
|
11
|
+
codeVerifier?: string | null;
|
|
12
|
+
redirectUri?: string;
|
|
13
|
+
scopes?: string[];
|
|
14
|
+
initiatedByUserId?: string | null;
|
|
15
|
+
returnTo?: string | null;
|
|
16
|
+
expiresAt?: Date;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A single-use, tenant- and user-bound record that carries a connect across a
|
|
20
|
+
* provider redirect: the CSRF state, the PKCE verifier, the redirect URI and
|
|
21
|
+
* the signed-in user who started it. Created by `beginConnect`, burned by
|
|
22
|
+
* `consumeConnect`. Never exposed through generated REST, MCP or CLI: the
|
|
23
|
+
* verifier and state are credentials.
|
|
24
|
+
*/
|
|
25
|
+
export declare class ConnectState extends SmrtObject {
|
|
26
|
+
tenantId: string | null;
|
|
27
|
+
/** The provider or flow this state belongs to, for example `x` or `mail:stalwart`. */
|
|
28
|
+
kind: string;
|
|
29
|
+
/** The unguessable CSRF value round-tripped through the provider. */
|
|
30
|
+
state: string;
|
|
31
|
+
codeVerifier: string | null;
|
|
32
|
+
redirectUri: string;
|
|
33
|
+
scopes: string[];
|
|
34
|
+
/** The user who started the connect; the callback must be made by the same user. */
|
|
35
|
+
initiatedByUserId: string | null;
|
|
36
|
+
/** A same-origin path to return to; the host validates before redirecting. */
|
|
37
|
+
returnTo: string | null;
|
|
38
|
+
expiresAt: Date;
|
|
39
|
+
constructor(options?: ConnectStateOptions);
|
|
40
|
+
get isExpired(): boolean;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=ConnectState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectState.d.ts","sourceRoot":"","sources":["../../src/models/ConnectState.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAGL,UAAU,EAEX,MAAM,0BAA0B,CAAC;AAGlC,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AAED;;;;;;GAMG;AACH,qBAMa,YAAa,SAAQ,UAAU;IAE1C,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE/B,sFAAsF;IAEtF,IAAI,SAAM;IAEV,qEAAqE;IAErE,KAAK,SAAM;IAGX,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IAGnC,WAAW,SAAM;IAGjB,MAAM,EAAE,MAAM,EAAE,CAAM;IAEtB,oFAAoF;IAEpF,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAExC,8EAA8E;IAE9E,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAG/B,SAAS,EAAE,IAAI,CAAyC;gBAE5C,OAAO,GAAE,mBAAwB;IAgB7C,IAAI,SAAS,IAAI,OAAO,CAEvB;CACF"}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @packageDocumentation
|
|
4
4
|
*/
|
|
5
5
|
import '../__smrt-register__.js';
|
|
6
|
+
export { ConnectState, type ConnectStateOptions } from './ConnectState.js';
|
|
6
7
|
export { Secret, type SecretStatus } from './Secret.js';
|
|
7
8
|
export { createAuditEntry, type SecretAuditAction, SecretAuditLog, type SecretAuditResult, } from './SecretAuditLog.js';
|
|
8
9
|
export { TenantKey, type TenantKeyStatus } from './TenantKey.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,cAAc,EACd,KAAK,iBAAiB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,cAAc,EACd,KAAK,iBAAiB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/models/index.js
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import "../chunks/dist-kZ2KUDiZ.js";
|
|
2
|
+
import { i as createAuditEntry, n as Secret, r as SecretAuditLog, t as TenantKey } from "../chunks/TenantKey-p_gp_teA.js";
|
|
3
|
+
import { t as ConnectState } from "../chunks/ConnectState-DUeYDO6b.js";
|
|
4
|
+
export { ConnectState, Secret, SecretAuditLog, TenantKey, createAuditEntry };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as SecretService, t as SecretKeyDriftError } from "../chunks/SecretService-
|
|
1
|
+
import { n as SecretService, t as SecretKeyDriftError } from "../chunks/SecretService-DyzsJCio.js";
|
|
2
2
|
export { SecretKeyDriftError, SecretService };
|