@lore-co/core 0.1.16 → 0.1.18
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/auth-schemas.d.ts +11 -0
- package/dist/auth-schemas.d.ts.map +1 -1
- package/dist/auth-schemas.js +9 -1
- package/dist/auth-schemas.js.map +1 -1
- package/dist/canonical-json.d.ts +19 -0
- package/dist/canonical-json.d.ts.map +1 -0
- package/dist/canonical-json.js +228 -0
- package/dist/canonical-json.js.map +1 -0
- package/dist/conflict-detector.d.ts.map +1 -1
- package/dist/conflict-detector.js +30 -14
- package/dist/conflict-detector.js.map +1 -1
- package/dist/engine.d.ts +38 -6
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +118 -25
- package/dist/engine.js.map +1 -1
- package/dist/guard-schemas.d.ts +217 -1
- package/dist/guard-schemas.d.ts.map +1 -1
- package/dist/guard-schemas.js +92 -11
- package/dist/guard-schemas.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/integration-contract.d.ts +498 -0
- package/dist/integration-contract.d.ts.map +1 -0
- package/dist/integration-contract.js +581 -0
- package/dist/integration-contract.js.map +1 -0
- package/dist/operational-metrics.d.ts +165 -0
- package/dist/operational-metrics.d.ts.map +1 -0
- package/dist/operational-metrics.js +216 -0
- package/dist/operational-metrics.js.map +1 -0
- package/dist/pilot-schemas.d.ts +80 -0
- package/dist/pilot-schemas.d.ts.map +1 -1
- package/dist/platform-admin-schemas.d.ts +408 -0
- package/dist/platform-admin-schemas.d.ts.map +1 -0
- package/dist/platform-admin-schemas.js +237 -0
- package/dist/platform-admin-schemas.js.map +1 -0
- package/dist/ports.d.ts +85 -8
- package/dist/ports.d.ts.map +1 -1
- package/dist/ports.js +231 -1
- package/dist/ports.js.map +1 -1
- package/dist/reliability-schemas.d.ts +723 -0
- package/dist/reliability-schemas.d.ts.map +1 -0
- package/dist/reliability-schemas.js +750 -0
- package/dist/reliability-schemas.js.map +1 -0
- package/dist/schemas.d.ts +205 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +166 -1
- package/dist/schemas.js.map +1 -1
- package/dist/session-schemas.d.ts +80 -0
- package/dist/session-schemas.d.ts.map +1 -1
- package/dist/snapshot-schemas.d.ts +3503 -0
- package/dist/snapshot-schemas.d.ts.map +1 -0
- package/dist/snapshot-schemas.js +507 -0
- package/dist/snapshot-schemas.js.map +1 -0
- package/package.json +21 -1
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const AccessRequestStatusSchema: z.ZodEnum<{
|
|
3
|
+
pending: "pending";
|
|
4
|
+
approved: "approved";
|
|
5
|
+
rejected: "rejected";
|
|
6
|
+
}>;
|
|
7
|
+
export type AccessRequestStatus = z.infer<typeof AccessRequestStatusSchema>;
|
|
8
|
+
export declare const AccessRequestSchema: z.ZodObject<{
|
|
9
|
+
id: z.ZodUUID;
|
|
10
|
+
email: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
11
|
+
status: z.ZodEnum<{
|
|
12
|
+
pending: "pending";
|
|
13
|
+
approved: "approved";
|
|
14
|
+
rejected: "rejected";
|
|
15
|
+
}>;
|
|
16
|
+
decidedByEmail: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodEmail>>;
|
|
17
|
+
decidedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
18
|
+
createdAt: z.ZodISODateTime;
|
|
19
|
+
updatedAt: z.ZodISODateTime;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
export type AccessRequest = z.infer<typeof AccessRequestSchema>;
|
|
22
|
+
export declare const RequestAccessRequestSchema: z.ZodObject<{
|
|
23
|
+
email: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
export type RequestAccessRequest = z.infer<typeof RequestAccessRequestSchema>;
|
|
26
|
+
export declare const RequestAccessResponseSchema: z.ZodObject<{
|
|
27
|
+
accepted: z.ZodLiteral<true>;
|
|
28
|
+
}, z.core.$strict>;
|
|
29
|
+
export type RequestAccessResponse = z.infer<typeof RequestAccessResponseSchema>;
|
|
30
|
+
export declare const PlatformSignupInviteStatusSchema: z.ZodEnum<{
|
|
31
|
+
expired: "expired";
|
|
32
|
+
revoked: "revoked";
|
|
33
|
+
accepted: "accepted";
|
|
34
|
+
pending: "pending";
|
|
35
|
+
}>;
|
|
36
|
+
export type PlatformSignupInviteStatus = z.infer<typeof PlatformSignupInviteStatusSchema>;
|
|
37
|
+
export declare const PlatformSignupInviteSchema: z.ZodObject<{
|
|
38
|
+
id: z.ZodUUID;
|
|
39
|
+
email: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
40
|
+
status: z.ZodEnum<{
|
|
41
|
+
expired: "expired";
|
|
42
|
+
revoked: "revoked";
|
|
43
|
+
accepted: "accepted";
|
|
44
|
+
pending: "pending";
|
|
45
|
+
}>;
|
|
46
|
+
issuedByEmail: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
47
|
+
expiresAt: z.ZodISODateTime;
|
|
48
|
+
acceptedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
49
|
+
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
50
|
+
lastSentAt: z.ZodNullable<z.ZodISODateTime>;
|
|
51
|
+
createdAt: z.ZodISODateTime;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
export type PlatformSignupInvite = z.infer<typeof PlatformSignupInviteSchema>;
|
|
54
|
+
export declare const PreviewPlatformSignupInviteRequestSchema: z.ZodObject<{
|
|
55
|
+
token: z.ZodString;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
export type PreviewPlatformSignupInviteRequest = z.infer<typeof PreviewPlatformSignupInviteRequestSchema>;
|
|
58
|
+
export declare const PlatformSignupInvitePreviewSchema: z.ZodObject<{
|
|
59
|
+
email: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
60
|
+
expiresAt: z.ZodISODateTime;
|
|
61
|
+
}, z.core.$strict>;
|
|
62
|
+
export type PlatformSignupInvitePreview = z.infer<typeof PlatformSignupInvitePreviewSchema>;
|
|
63
|
+
export declare const PreviewPlatformSignupInviteResponseSchema: z.ZodObject<{
|
|
64
|
+
invite: z.ZodObject<{
|
|
65
|
+
email: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
66
|
+
expiresAt: z.ZodISODateTime;
|
|
67
|
+
}, z.core.$strict>;
|
|
68
|
+
}, z.core.$strict>;
|
|
69
|
+
export type PreviewPlatformSignupInviteResponse = z.infer<typeof PreviewPlatformSignupInviteResponseSchema>;
|
|
70
|
+
export declare const AcceptPlatformSignupInviteRequestSchema: z.ZodObject<{
|
|
71
|
+
token: z.ZodString;
|
|
72
|
+
organizationName: z.ZodString;
|
|
73
|
+
}, z.core.$strict>;
|
|
74
|
+
export type AcceptPlatformSignupInviteRequest = z.infer<typeof AcceptPlatformSignupInviteRequestSchema>;
|
|
75
|
+
export declare const AcceptPlatformSignupInviteResponseSchema: z.ZodObject<{
|
|
76
|
+
sessionToken: z.ZodString;
|
|
77
|
+
session: z.ZodObject<{
|
|
78
|
+
userId: z.ZodUUID;
|
|
79
|
+
email: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
80
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
81
|
+
workspaceId: z.ZodUUID;
|
|
82
|
+
workspaceName: z.ZodString;
|
|
83
|
+
organization: z.ZodString;
|
|
84
|
+
role: z.ZodEnum<{
|
|
85
|
+
owner: "owner";
|
|
86
|
+
admin: "admin";
|
|
87
|
+
member: "member";
|
|
88
|
+
}>;
|
|
89
|
+
expiresAt: z.ZodISODateTime;
|
|
90
|
+
}, z.core.$strict>;
|
|
91
|
+
}, z.core.$strict>;
|
|
92
|
+
export type AcceptPlatformSignupInviteResponse = z.infer<typeof AcceptPlatformSignupInviteResponseSchema>;
|
|
93
|
+
export declare const IssuePlatformSignupInviteRequestSchema: z.ZodObject<{
|
|
94
|
+
email: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
95
|
+
}, z.core.$strict>;
|
|
96
|
+
export type IssuePlatformSignupInviteRequest = z.infer<typeof IssuePlatformSignupInviteRequestSchema>;
|
|
97
|
+
export declare const PlatformSignupInviteDeliverySchema: z.ZodObject<{
|
|
98
|
+
invite: z.ZodObject<{
|
|
99
|
+
id: z.ZodUUID;
|
|
100
|
+
email: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
101
|
+
status: z.ZodEnum<{
|
|
102
|
+
expired: "expired";
|
|
103
|
+
revoked: "revoked";
|
|
104
|
+
accepted: "accepted";
|
|
105
|
+
pending: "pending";
|
|
106
|
+
}>;
|
|
107
|
+
issuedByEmail: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
108
|
+
expiresAt: z.ZodISODateTime;
|
|
109
|
+
acceptedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
110
|
+
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
111
|
+
lastSentAt: z.ZodNullable<z.ZodISODateTime>;
|
|
112
|
+
createdAt: z.ZodISODateTime;
|
|
113
|
+
}, z.core.$strict>;
|
|
114
|
+
delivery: z.ZodEnum<{
|
|
115
|
+
failed: "failed";
|
|
116
|
+
sent: "sent";
|
|
117
|
+
}>;
|
|
118
|
+
}, z.core.$strict>;
|
|
119
|
+
export type PlatformSignupInviteDelivery = z.infer<typeof PlatformSignupInviteDeliverySchema>;
|
|
120
|
+
export declare const ListPlatformSignupInvitesResponseSchema: z.ZodObject<{
|
|
121
|
+
invites: z.ZodArray<z.ZodObject<{
|
|
122
|
+
id: z.ZodUUID;
|
|
123
|
+
email: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
124
|
+
status: z.ZodEnum<{
|
|
125
|
+
expired: "expired";
|
|
126
|
+
revoked: "revoked";
|
|
127
|
+
accepted: "accepted";
|
|
128
|
+
pending: "pending";
|
|
129
|
+
}>;
|
|
130
|
+
issuedByEmail: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
131
|
+
expiresAt: z.ZodISODateTime;
|
|
132
|
+
acceptedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
133
|
+
revokedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
134
|
+
lastSentAt: z.ZodNullable<z.ZodISODateTime>;
|
|
135
|
+
createdAt: z.ZodISODateTime;
|
|
136
|
+
}, z.core.$strict>>;
|
|
137
|
+
}, z.core.$strict>;
|
|
138
|
+
export type ListPlatformSignupInvitesResponse = z.infer<typeof ListPlatformSignupInvitesResponseSchema>;
|
|
139
|
+
export declare const ListAccessRequestsResponseSchema: z.ZodObject<{
|
|
140
|
+
requests: z.ZodArray<z.ZodObject<{
|
|
141
|
+
id: z.ZodUUID;
|
|
142
|
+
email: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
143
|
+
status: z.ZodEnum<{
|
|
144
|
+
pending: "pending";
|
|
145
|
+
approved: "approved";
|
|
146
|
+
rejected: "rejected";
|
|
147
|
+
}>;
|
|
148
|
+
decidedByEmail: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodEmail>>;
|
|
149
|
+
decidedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
150
|
+
createdAt: z.ZodISODateTime;
|
|
151
|
+
updatedAt: z.ZodISODateTime;
|
|
152
|
+
}, z.core.$strict>>;
|
|
153
|
+
}, z.core.$strict>;
|
|
154
|
+
export type ListAccessRequestsResponse = z.infer<typeof ListAccessRequestsResponseSchema>;
|
|
155
|
+
export declare const PlatformAdminRoleSchema: z.ZodEnum<{
|
|
156
|
+
admin: "admin";
|
|
157
|
+
super_admin: "super_admin";
|
|
158
|
+
}>;
|
|
159
|
+
export type PlatformAdminRole = z.infer<typeof PlatformAdminRoleSchema>;
|
|
160
|
+
export declare const PlatformAdminSchema: z.ZodObject<{
|
|
161
|
+
userId: z.ZodNullable<z.ZodUUID>;
|
|
162
|
+
email: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
163
|
+
role: z.ZodEnum<{
|
|
164
|
+
admin: "admin";
|
|
165
|
+
super_admin: "super_admin";
|
|
166
|
+
}>;
|
|
167
|
+
source: z.ZodEnum<{
|
|
168
|
+
environment: "environment";
|
|
169
|
+
database: "database";
|
|
170
|
+
}>;
|
|
171
|
+
grantedByEmail: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodEmail>>;
|
|
172
|
+
createdAt: z.ZodNullable<z.ZodISODateTime>;
|
|
173
|
+
}, z.core.$strict>;
|
|
174
|
+
export type PlatformAdmin = z.infer<typeof PlatformAdminSchema>;
|
|
175
|
+
export declare const PlatformAdminAccessResponseSchema: z.ZodObject<{
|
|
176
|
+
admin: z.ZodObject<{
|
|
177
|
+
userId: z.ZodNullable<z.ZodUUID>;
|
|
178
|
+
email: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
179
|
+
role: z.ZodEnum<{
|
|
180
|
+
admin: "admin";
|
|
181
|
+
super_admin: "super_admin";
|
|
182
|
+
}>;
|
|
183
|
+
source: z.ZodEnum<{
|
|
184
|
+
environment: "environment";
|
|
185
|
+
database: "database";
|
|
186
|
+
}>;
|
|
187
|
+
grantedByEmail: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodEmail>>;
|
|
188
|
+
createdAt: z.ZodNullable<z.ZodISODateTime>;
|
|
189
|
+
}, z.core.$strict>;
|
|
190
|
+
}, z.core.$strict>;
|
|
191
|
+
export type PlatformAdminAccessResponse = z.infer<typeof PlatformAdminAccessResponseSchema>;
|
|
192
|
+
export declare const AddPlatformAdminRequestSchema: z.ZodObject<{
|
|
193
|
+
email: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
194
|
+
}, z.core.$strict>;
|
|
195
|
+
export type AddPlatformAdminRequest = z.infer<typeof AddPlatformAdminRequestSchema>;
|
|
196
|
+
export declare const ListPlatformAdminsResponseSchema: z.ZodObject<{
|
|
197
|
+
admins: z.ZodArray<z.ZodObject<{
|
|
198
|
+
userId: z.ZodNullable<z.ZodUUID>;
|
|
199
|
+
email: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
200
|
+
role: z.ZodEnum<{
|
|
201
|
+
admin: "admin";
|
|
202
|
+
super_admin: "super_admin";
|
|
203
|
+
}>;
|
|
204
|
+
source: z.ZodEnum<{
|
|
205
|
+
environment: "environment";
|
|
206
|
+
database: "database";
|
|
207
|
+
}>;
|
|
208
|
+
grantedByEmail: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodEmail>>;
|
|
209
|
+
createdAt: z.ZodNullable<z.ZodISODateTime>;
|
|
210
|
+
}, z.core.$strict>>;
|
|
211
|
+
}, z.core.$strict>;
|
|
212
|
+
export type ListPlatformAdminsResponse = z.infer<typeof ListPlatformAdminsResponseSchema>;
|
|
213
|
+
export declare const PlatformStatsSchema: z.ZodObject<{
|
|
214
|
+
workspaces: z.ZodObject<{
|
|
215
|
+
total: z.ZodNumber;
|
|
216
|
+
active: z.ZodNumber;
|
|
217
|
+
createdLast7Days: z.ZodNumber;
|
|
218
|
+
}, z.core.$strip>;
|
|
219
|
+
users: z.ZodObject<{
|
|
220
|
+
total: z.ZodNumber;
|
|
221
|
+
active: z.ZodNumber;
|
|
222
|
+
createdLast7Days: z.ZodNumber;
|
|
223
|
+
}, z.core.$strip>;
|
|
224
|
+
access: z.ZodObject<{
|
|
225
|
+
pendingRequests: z.ZodNumber;
|
|
226
|
+
requestsLast7Days: z.ZodNumber;
|
|
227
|
+
pendingInvites: z.ZodNumber;
|
|
228
|
+
acceptedInvites: z.ZodNumber;
|
|
229
|
+
}, z.core.$strip>;
|
|
230
|
+
activity: z.ZodObject<{
|
|
231
|
+
eventsLast24Hours: z.ZodNumber;
|
|
232
|
+
activeAgentsLast30Days: z.ZodNumber;
|
|
233
|
+
guardChecksLast24Hours: z.ZodNumber;
|
|
234
|
+
}, z.core.$strip>;
|
|
235
|
+
}, z.core.$strict>;
|
|
236
|
+
export type PlatformStats = z.infer<typeof PlatformStatsSchema>;
|
|
237
|
+
export declare const PlatformAdminDetailQuerySchema: z.ZodObject<{
|
|
238
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
239
|
+
offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
240
|
+
}, z.core.$strict>;
|
|
241
|
+
export type PlatformAdminDetailQuery = z.infer<typeof PlatformAdminDetailQuerySchema>;
|
|
242
|
+
export declare const PlatformWorkspaceSummarySchema: z.ZodObject<{
|
|
243
|
+
id: z.ZodUUID;
|
|
244
|
+
slug: z.ZodString;
|
|
245
|
+
organization: z.ZodString;
|
|
246
|
+
name: z.ZodString;
|
|
247
|
+
status: z.ZodEnum<{
|
|
248
|
+
active: "active";
|
|
249
|
+
disabled: "disabled";
|
|
250
|
+
}>;
|
|
251
|
+
activeUsers: z.ZodNumber;
|
|
252
|
+
createdAt: z.ZodISODateTime;
|
|
253
|
+
updatedAt: z.ZodISODateTime;
|
|
254
|
+
}, z.core.$strict>;
|
|
255
|
+
export type PlatformWorkspaceSummary = z.infer<typeof PlatformWorkspaceSummarySchema>;
|
|
256
|
+
export declare const PlatformWorkspaceListResponseSchema: z.ZodObject<{
|
|
257
|
+
total: z.ZodNumber;
|
|
258
|
+
limit: z.ZodNumber;
|
|
259
|
+
offset: z.ZodNumber;
|
|
260
|
+
hasMore: z.ZodBoolean;
|
|
261
|
+
workspaces: z.ZodArray<z.ZodObject<{
|
|
262
|
+
id: z.ZodUUID;
|
|
263
|
+
slug: z.ZodString;
|
|
264
|
+
organization: z.ZodString;
|
|
265
|
+
name: z.ZodString;
|
|
266
|
+
status: z.ZodEnum<{
|
|
267
|
+
active: "active";
|
|
268
|
+
disabled: "disabled";
|
|
269
|
+
}>;
|
|
270
|
+
activeUsers: z.ZodNumber;
|
|
271
|
+
createdAt: z.ZodISODateTime;
|
|
272
|
+
updatedAt: z.ZodISODateTime;
|
|
273
|
+
}, z.core.$strict>>;
|
|
274
|
+
}, z.core.$strict>;
|
|
275
|
+
export type PlatformWorkspaceListResponse = z.infer<typeof PlatformWorkspaceListResponseSchema>;
|
|
276
|
+
export declare const PlatformUserSummarySchema: z.ZodObject<{
|
|
277
|
+
id: z.ZodUUID;
|
|
278
|
+
email: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
279
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
280
|
+
role: z.ZodEnum<{
|
|
281
|
+
owner: "owner";
|
|
282
|
+
admin: "admin";
|
|
283
|
+
member: "member";
|
|
284
|
+
}>;
|
|
285
|
+
status: z.ZodEnum<{
|
|
286
|
+
active: "active";
|
|
287
|
+
disabled: "disabled";
|
|
288
|
+
}>;
|
|
289
|
+
workspace: z.ZodObject<{
|
|
290
|
+
id: z.ZodUUID;
|
|
291
|
+
name: z.ZodString;
|
|
292
|
+
organization: z.ZodString;
|
|
293
|
+
}, z.core.$strict>;
|
|
294
|
+
createdAt: z.ZodISODateTime;
|
|
295
|
+
updatedAt: z.ZodISODateTime;
|
|
296
|
+
}, z.core.$strict>;
|
|
297
|
+
export type PlatformUserSummary = z.infer<typeof PlatformUserSummarySchema>;
|
|
298
|
+
export declare const PlatformUserListResponseSchema: z.ZodObject<{
|
|
299
|
+
total: z.ZodNumber;
|
|
300
|
+
limit: z.ZodNumber;
|
|
301
|
+
offset: z.ZodNumber;
|
|
302
|
+
hasMore: z.ZodBoolean;
|
|
303
|
+
users: z.ZodArray<z.ZodObject<{
|
|
304
|
+
id: z.ZodUUID;
|
|
305
|
+
email: z.ZodPipe<z.ZodString, z.ZodEmail>;
|
|
306
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
307
|
+
role: z.ZodEnum<{
|
|
308
|
+
owner: "owner";
|
|
309
|
+
admin: "admin";
|
|
310
|
+
member: "member";
|
|
311
|
+
}>;
|
|
312
|
+
status: z.ZodEnum<{
|
|
313
|
+
active: "active";
|
|
314
|
+
disabled: "disabled";
|
|
315
|
+
}>;
|
|
316
|
+
workspace: z.ZodObject<{
|
|
317
|
+
id: z.ZodUUID;
|
|
318
|
+
name: z.ZodString;
|
|
319
|
+
organization: z.ZodString;
|
|
320
|
+
}, z.core.$strict>;
|
|
321
|
+
createdAt: z.ZodISODateTime;
|
|
322
|
+
updatedAt: z.ZodISODateTime;
|
|
323
|
+
}, z.core.$strict>>;
|
|
324
|
+
}, z.core.$strict>;
|
|
325
|
+
export type PlatformUserListResponse = z.infer<typeof PlatformUserListResponseSchema>;
|
|
326
|
+
export declare const PlatformAgentSummarySchema: z.ZodObject<{
|
|
327
|
+
agent: z.ZodString;
|
|
328
|
+
workspace: z.ZodObject<{
|
|
329
|
+
id: z.ZodUUID;
|
|
330
|
+
name: z.ZodString;
|
|
331
|
+
organization: z.ZodString;
|
|
332
|
+
}, z.core.$strict>;
|
|
333
|
+
connectors: z.ZodArray<z.ZodString>;
|
|
334
|
+
eventCount: z.ZodNumber;
|
|
335
|
+
lastSeenAt: z.ZodISODateTime;
|
|
336
|
+
}, z.core.$strict>;
|
|
337
|
+
export type PlatformAgentSummary = z.infer<typeof PlatformAgentSummarySchema>;
|
|
338
|
+
export declare const PlatformAgentListResponseSchema: z.ZodObject<{
|
|
339
|
+
total: z.ZodNumber;
|
|
340
|
+
limit: z.ZodNumber;
|
|
341
|
+
offset: z.ZodNumber;
|
|
342
|
+
hasMore: z.ZodBoolean;
|
|
343
|
+
agents: z.ZodArray<z.ZodObject<{
|
|
344
|
+
agent: z.ZodString;
|
|
345
|
+
workspace: z.ZodObject<{
|
|
346
|
+
id: z.ZodUUID;
|
|
347
|
+
name: z.ZodString;
|
|
348
|
+
organization: z.ZodString;
|
|
349
|
+
}, z.core.$strict>;
|
|
350
|
+
connectors: z.ZodArray<z.ZodString>;
|
|
351
|
+
eventCount: z.ZodNumber;
|
|
352
|
+
lastSeenAt: z.ZodISODateTime;
|
|
353
|
+
}, z.core.$strict>>;
|
|
354
|
+
}, z.core.$strict>;
|
|
355
|
+
export type PlatformAgentListResponse = z.infer<typeof PlatformAgentListResponseSchema>;
|
|
356
|
+
export declare const PlatformEventSummarySchema: z.ZodObject<{
|
|
357
|
+
id: z.ZodUUID;
|
|
358
|
+
workspace: z.ZodObject<{
|
|
359
|
+
id: z.ZodUUID;
|
|
360
|
+
name: z.ZodString;
|
|
361
|
+
organization: z.ZodString;
|
|
362
|
+
}, z.core.$strict>;
|
|
363
|
+
type: z.ZodEnum<{
|
|
364
|
+
observation: "observation";
|
|
365
|
+
paired_turn: "paired_turn";
|
|
366
|
+
context_delivery: "context_delivery";
|
|
367
|
+
guard_check: "guard_check";
|
|
368
|
+
}>;
|
|
369
|
+
agent: z.ZodString;
|
|
370
|
+
connector: z.ZodString;
|
|
371
|
+
redacted: z.ZodBoolean;
|
|
372
|
+
receivedAt: z.ZodISODateTime;
|
|
373
|
+
}, z.core.$strict>;
|
|
374
|
+
export type PlatformEventSummary = z.infer<typeof PlatformEventSummarySchema>;
|
|
375
|
+
export declare const PlatformEventListResponseSchema: z.ZodObject<{
|
|
376
|
+
total: z.ZodNumber;
|
|
377
|
+
limit: z.ZodNumber;
|
|
378
|
+
offset: z.ZodNumber;
|
|
379
|
+
hasMore: z.ZodBoolean;
|
|
380
|
+
events: z.ZodArray<z.ZodObject<{
|
|
381
|
+
id: z.ZodUUID;
|
|
382
|
+
workspace: z.ZodObject<{
|
|
383
|
+
id: z.ZodUUID;
|
|
384
|
+
name: z.ZodString;
|
|
385
|
+
organization: z.ZodString;
|
|
386
|
+
}, z.core.$strict>;
|
|
387
|
+
type: z.ZodEnum<{
|
|
388
|
+
observation: "observation";
|
|
389
|
+
paired_turn: "paired_turn";
|
|
390
|
+
context_delivery: "context_delivery";
|
|
391
|
+
guard_check: "guard_check";
|
|
392
|
+
}>;
|
|
393
|
+
agent: z.ZodString;
|
|
394
|
+
connector: z.ZodString;
|
|
395
|
+
redacted: z.ZodBoolean;
|
|
396
|
+
receivedAt: z.ZodISODateTime;
|
|
397
|
+
}, z.core.$strict>>;
|
|
398
|
+
}, z.core.$strict>;
|
|
399
|
+
export type PlatformEventListResponse = z.infer<typeof PlatformEventListResponseSchema>;
|
|
400
|
+
export declare const RejectAccessRequestSchema: z.ZodObject<{
|
|
401
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
402
|
+
}, z.core.$strict>;
|
|
403
|
+
export type RejectAccessRequest = z.infer<typeof RejectAccessRequestSchema>;
|
|
404
|
+
export declare const PlatformAdminMutationResponseSchema: z.ZodObject<{
|
|
405
|
+
success: z.ZodLiteral<true>;
|
|
406
|
+
}, z.core.$strict>;
|
|
407
|
+
export type PlatformAdminMutationResponse = z.infer<typeof PlatformAdminMutationResponseSchema>;
|
|
408
|
+
//# sourceMappingURL=platform-admin-schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-admin-schemas.d.ts","sourceRoot":"","sources":["../src/platform-admin-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,eAAO,MAAM,yBAAyB;;;;EAIpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;kBAUrB,CAAC;AACZ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,0BAA0B;;kBAI5B,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CACxC,OAAO,0BAA0B,CAClC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;kBAA+B,CAAC;AACxE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CACzC,OAAO,2BAA2B,CACnC,CAAC;AAEF,eAAO,MAAM,gCAAgC;;;;;EAK3C,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;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237 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AuthEmailSchema, AuthInitiationResponseSchema, AuthTokenSchema, AuthenticatedSessionResponseSchema, AuthUserRoleSchema, AuthUserStatusSchema, } from "./auth-schemas.js";
|
|
3
|
+
import { ConnectorEventTypeSchema, WorkspaceStatusSchema, } from "./pilot-schemas.js";
|
|
4
|
+
export const AccessRequestStatusSchema = z.enum([
|
|
5
|
+
"pending",
|
|
6
|
+
"approved",
|
|
7
|
+
"rejected",
|
|
8
|
+
]);
|
|
9
|
+
export const AccessRequestSchema = z
|
|
10
|
+
.object({
|
|
11
|
+
id: z.uuid(),
|
|
12
|
+
email: AuthEmailSchema,
|
|
13
|
+
status: AccessRequestStatusSchema,
|
|
14
|
+
decidedByEmail: AuthEmailSchema.nullable(),
|
|
15
|
+
decidedAt: z.iso.datetime().nullable(),
|
|
16
|
+
createdAt: z.iso.datetime(),
|
|
17
|
+
updatedAt: z.iso.datetime(),
|
|
18
|
+
})
|
|
19
|
+
.strict();
|
|
20
|
+
export const RequestAccessRequestSchema = z
|
|
21
|
+
.object({
|
|
22
|
+
email: AuthEmailSchema,
|
|
23
|
+
})
|
|
24
|
+
.strict();
|
|
25
|
+
export const RequestAccessResponseSchema = AuthInitiationResponseSchema;
|
|
26
|
+
export const PlatformSignupInviteStatusSchema = z.enum([
|
|
27
|
+
"pending",
|
|
28
|
+
"accepted",
|
|
29
|
+
"revoked",
|
|
30
|
+
"expired",
|
|
31
|
+
]);
|
|
32
|
+
export const PlatformSignupInviteSchema = z
|
|
33
|
+
.object({
|
|
34
|
+
id: z.uuid(),
|
|
35
|
+
email: AuthEmailSchema,
|
|
36
|
+
status: PlatformSignupInviteStatusSchema,
|
|
37
|
+
issuedByEmail: AuthEmailSchema,
|
|
38
|
+
expiresAt: z.iso.datetime(),
|
|
39
|
+
acceptedAt: z.iso.datetime().nullable(),
|
|
40
|
+
revokedAt: z.iso.datetime().nullable(),
|
|
41
|
+
lastSentAt: z.iso.datetime().nullable(),
|
|
42
|
+
createdAt: z.iso.datetime(),
|
|
43
|
+
})
|
|
44
|
+
.strict();
|
|
45
|
+
export const PreviewPlatformSignupInviteRequestSchema = z
|
|
46
|
+
.object({
|
|
47
|
+
token: AuthTokenSchema,
|
|
48
|
+
})
|
|
49
|
+
.strict();
|
|
50
|
+
export const PlatformSignupInvitePreviewSchema = z
|
|
51
|
+
.object({
|
|
52
|
+
email: AuthEmailSchema,
|
|
53
|
+
expiresAt: z.iso.datetime(),
|
|
54
|
+
})
|
|
55
|
+
.strict();
|
|
56
|
+
export const PreviewPlatformSignupInviteResponseSchema = z
|
|
57
|
+
.object({
|
|
58
|
+
invite: PlatformSignupInvitePreviewSchema,
|
|
59
|
+
})
|
|
60
|
+
.strict();
|
|
61
|
+
export const AcceptPlatformSignupInviteRequestSchema = z
|
|
62
|
+
.object({
|
|
63
|
+
token: AuthTokenSchema,
|
|
64
|
+
organizationName: z.string().trim().min(1).max(200),
|
|
65
|
+
})
|
|
66
|
+
.strict();
|
|
67
|
+
export const AcceptPlatformSignupInviteResponseSchema = AuthenticatedSessionResponseSchema;
|
|
68
|
+
export const IssuePlatformSignupInviteRequestSchema = z
|
|
69
|
+
.object({
|
|
70
|
+
email: AuthEmailSchema,
|
|
71
|
+
})
|
|
72
|
+
.strict();
|
|
73
|
+
export const PlatformSignupInviteDeliverySchema = z
|
|
74
|
+
.object({
|
|
75
|
+
invite: PlatformSignupInviteSchema,
|
|
76
|
+
delivery: z.enum(["sent", "failed"]),
|
|
77
|
+
})
|
|
78
|
+
.strict();
|
|
79
|
+
export const ListPlatformSignupInvitesResponseSchema = z
|
|
80
|
+
.object({
|
|
81
|
+
invites: z.array(PlatformSignupInviteSchema),
|
|
82
|
+
})
|
|
83
|
+
.strict();
|
|
84
|
+
export const ListAccessRequestsResponseSchema = z
|
|
85
|
+
.object({
|
|
86
|
+
requests: z.array(AccessRequestSchema),
|
|
87
|
+
})
|
|
88
|
+
.strict();
|
|
89
|
+
export const PlatformAdminRoleSchema = z.enum(["super_admin", "admin"]);
|
|
90
|
+
export const PlatformAdminSchema = z
|
|
91
|
+
.object({
|
|
92
|
+
userId: z.uuid().nullable(),
|
|
93
|
+
email: AuthEmailSchema,
|
|
94
|
+
role: PlatformAdminRoleSchema,
|
|
95
|
+
source: z.enum(["environment", "database"]),
|
|
96
|
+
grantedByEmail: AuthEmailSchema.nullable(),
|
|
97
|
+
createdAt: z.iso.datetime().nullable(),
|
|
98
|
+
})
|
|
99
|
+
.strict();
|
|
100
|
+
export const PlatformAdminAccessResponseSchema = z
|
|
101
|
+
.object({
|
|
102
|
+
admin: PlatformAdminSchema,
|
|
103
|
+
})
|
|
104
|
+
.strict();
|
|
105
|
+
export const AddPlatformAdminRequestSchema = z
|
|
106
|
+
.object({
|
|
107
|
+
email: AuthEmailSchema,
|
|
108
|
+
})
|
|
109
|
+
.strict();
|
|
110
|
+
export const ListPlatformAdminsResponseSchema = z
|
|
111
|
+
.object({
|
|
112
|
+
admins: z.array(PlatformAdminSchema),
|
|
113
|
+
})
|
|
114
|
+
.strict();
|
|
115
|
+
export const PlatformStatsSchema = z
|
|
116
|
+
.object({
|
|
117
|
+
workspaces: z.object({
|
|
118
|
+
total: z.number().int().nonnegative(),
|
|
119
|
+
active: z.number().int().nonnegative(),
|
|
120
|
+
createdLast7Days: z.number().int().nonnegative(),
|
|
121
|
+
}),
|
|
122
|
+
users: z.object({
|
|
123
|
+
total: z.number().int().nonnegative(),
|
|
124
|
+
active: z.number().int().nonnegative(),
|
|
125
|
+
createdLast7Days: z.number().int().nonnegative(),
|
|
126
|
+
}),
|
|
127
|
+
access: z.object({
|
|
128
|
+
pendingRequests: z.number().int().nonnegative(),
|
|
129
|
+
requestsLast7Days: z.number().int().nonnegative(),
|
|
130
|
+
pendingInvites: z.number().int().nonnegative(),
|
|
131
|
+
acceptedInvites: z.number().int().nonnegative(),
|
|
132
|
+
}),
|
|
133
|
+
activity: z.object({
|
|
134
|
+
eventsLast24Hours: z.number().int().nonnegative(),
|
|
135
|
+
activeAgentsLast30Days: z.number().int().nonnegative(),
|
|
136
|
+
guardChecksLast24Hours: z.number().int().nonnegative(),
|
|
137
|
+
}),
|
|
138
|
+
})
|
|
139
|
+
.strict();
|
|
140
|
+
export const PlatformAdminDetailQuerySchema = z
|
|
141
|
+
.object({
|
|
142
|
+
limit: z.coerce.number().int().positive().max(100).optional(),
|
|
143
|
+
offset: z.coerce.number().int().nonnegative().optional(),
|
|
144
|
+
})
|
|
145
|
+
.strict();
|
|
146
|
+
const PlatformAdminPageFields = {
|
|
147
|
+
total: z.number().int().nonnegative(),
|
|
148
|
+
limit: z.number().int().positive().max(100),
|
|
149
|
+
offset: z.number().int().nonnegative(),
|
|
150
|
+
hasMore: z.boolean(),
|
|
151
|
+
};
|
|
152
|
+
const PlatformWorkspaceReferenceSchema = z
|
|
153
|
+
.object({
|
|
154
|
+
id: z.uuid(),
|
|
155
|
+
name: z.string().min(1),
|
|
156
|
+
organization: z.string().min(1),
|
|
157
|
+
})
|
|
158
|
+
.strict();
|
|
159
|
+
export const PlatformWorkspaceSummarySchema = z
|
|
160
|
+
.object({
|
|
161
|
+
id: z.uuid(),
|
|
162
|
+
slug: z.string().min(1),
|
|
163
|
+
organization: z.string().min(1),
|
|
164
|
+
name: z.string().min(1),
|
|
165
|
+
status: WorkspaceStatusSchema,
|
|
166
|
+
activeUsers: z.number().int().nonnegative(),
|
|
167
|
+
createdAt: z.iso.datetime({ offset: true }),
|
|
168
|
+
updatedAt: z.iso.datetime({ offset: true }),
|
|
169
|
+
})
|
|
170
|
+
.strict();
|
|
171
|
+
export const PlatformWorkspaceListResponseSchema = z
|
|
172
|
+
.object({
|
|
173
|
+
workspaces: z.array(PlatformWorkspaceSummarySchema),
|
|
174
|
+
...PlatformAdminPageFields,
|
|
175
|
+
})
|
|
176
|
+
.strict();
|
|
177
|
+
export const PlatformUserSummarySchema = z
|
|
178
|
+
.object({
|
|
179
|
+
id: z.uuid(),
|
|
180
|
+
email: AuthEmailSchema,
|
|
181
|
+
displayName: z.string().min(1).nullable(),
|
|
182
|
+
role: AuthUserRoleSchema,
|
|
183
|
+
status: AuthUserStatusSchema,
|
|
184
|
+
workspace: PlatformWorkspaceReferenceSchema,
|
|
185
|
+
createdAt: z.iso.datetime({ offset: true }),
|
|
186
|
+
updatedAt: z.iso.datetime({ offset: true }),
|
|
187
|
+
})
|
|
188
|
+
.strict();
|
|
189
|
+
export const PlatformUserListResponseSchema = z
|
|
190
|
+
.object({
|
|
191
|
+
users: z.array(PlatformUserSummarySchema),
|
|
192
|
+
...PlatformAdminPageFields,
|
|
193
|
+
})
|
|
194
|
+
.strict();
|
|
195
|
+
export const PlatformAgentSummarySchema = z
|
|
196
|
+
.object({
|
|
197
|
+
agent: z.string().min(1),
|
|
198
|
+
workspace: PlatformWorkspaceReferenceSchema,
|
|
199
|
+
connectors: z.array(z.string().min(1)),
|
|
200
|
+
eventCount: z.number().int().nonnegative(),
|
|
201
|
+
lastSeenAt: z.iso.datetime({ offset: true }),
|
|
202
|
+
})
|
|
203
|
+
.strict();
|
|
204
|
+
export const PlatformAgentListResponseSchema = z
|
|
205
|
+
.object({
|
|
206
|
+
agents: z.array(PlatformAgentSummarySchema),
|
|
207
|
+
...PlatformAdminPageFields,
|
|
208
|
+
})
|
|
209
|
+
.strict();
|
|
210
|
+
export const PlatformEventSummarySchema = z
|
|
211
|
+
.object({
|
|
212
|
+
id: z.uuid(),
|
|
213
|
+
workspace: PlatformWorkspaceReferenceSchema,
|
|
214
|
+
type: ConnectorEventTypeSchema,
|
|
215
|
+
agent: z.string().min(1),
|
|
216
|
+
connector: z.string().min(1),
|
|
217
|
+
redacted: z.boolean(),
|
|
218
|
+
receivedAt: z.iso.datetime({ offset: true }),
|
|
219
|
+
})
|
|
220
|
+
.strict();
|
|
221
|
+
export const PlatformEventListResponseSchema = z
|
|
222
|
+
.object({
|
|
223
|
+
events: z.array(PlatformEventSummarySchema),
|
|
224
|
+
...PlatformAdminPageFields,
|
|
225
|
+
})
|
|
226
|
+
.strict();
|
|
227
|
+
export const RejectAccessRequestSchema = z
|
|
228
|
+
.object({
|
|
229
|
+
reason: z.string().trim().min(1).max(500).optional(),
|
|
230
|
+
})
|
|
231
|
+
.strict();
|
|
232
|
+
export const PlatformAdminMutationResponseSchema = z
|
|
233
|
+
.object({
|
|
234
|
+
success: z.literal(true),
|
|
235
|
+
})
|
|
236
|
+
.strict();
|
|
237
|
+
//# sourceMappingURL=platform-admin-schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform-admin-schemas.js","sourceRoot":"","sources":["../src/platform-admin-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,eAAe,EACf,4BAA4B,EAC5B,eAAe,EACf,kCAAkC,EAClC,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC9C,SAAS;IACT,UAAU;IACV,UAAU;CACX,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KACjC,MAAM,CAAC;IACN,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE;IACZ,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,yBAAyB;IACjC,cAAc,EAAE,eAAe,CAAC,QAAQ,EAAE;IAC1C,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACtC,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;IAC3B,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;CAC5B,CAAC;KACD,MAAM,EAAE,CAAC;AAGZ,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC;KACxC,M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