@dakkitor/api-contracts 1.6.0 → 1.7.1
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/curated-worker-leads/candidate-edit-session.contract.d.ts +12 -12
- package/dist/curated-worker-leads/consent-queue.contract.d.ts +28 -28
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/outreach/__tests__/outreach-requests.contract.spec.js +37 -0
- package/dist/outreach/lab-outreach.contract.d.ts +1110 -0
- package/dist/outreach/lab-outreach.contract.d.ts.map +1 -0
- package/dist/outreach/lab-outreach.contract.js +174 -0
- package/dist/outreach/lab-outreach.contract.spec.d.ts +2 -0
- package/dist/outreach/lab-outreach.contract.spec.d.ts.map +1 -0
- package/dist/outreach/lab-outreach.contract.spec.js +90 -0
- package/dist/outreach/outreach-requests.contract.d.ts +84 -0
- package/dist/outreach/outreach-requests.contract.d.ts.map +1 -1
- package/dist/outreach/outreach-requests.schemas.d.ts +9 -0
- package/dist/outreach/outreach-requests.schemas.d.ts.map +1 -1
- package/dist/outreach/outreach-requests.schemas.js +3 -0
- package/dist/outreach/outreach.contract.spec.js +3 -0
- package/dist/relay-pods/relay-lab-fleet.contract.d.ts +858 -0
- package/dist/relay-pods/relay-lab-fleet.contract.d.ts.map +1 -0
- package/dist/relay-pods/relay-lab-fleet.contract.js +79 -0
- package/dist/relay-pods/relay-lab-fleet.contract.spec.d.ts +2 -0
- package/dist/relay-pods/relay-lab-fleet.contract.spec.d.ts.map +1 -0
- package/dist/relay-pods/relay-lab-fleet.contract.spec.js +162 -0
- package/dist/relay-pods/relay-lab-fleet.schemas.d.ts +472 -0
- package/dist/relay-pods/relay-lab-fleet.schemas.d.ts.map +1 -0
- package/dist/relay-pods/relay-lab-fleet.schemas.js +155 -0
- package/package.json +1 -1
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const RelayLabLifecycleSchema: z.ZodEnum<["ACTIVE", "RETIRED"]>;
|
|
3
|
+
export declare const RelayLabEnrollmentSchema: z.ZodEnum<["UNENROLLED", "ENROLLED", "REVOKED"]>;
|
|
4
|
+
export declare const RelayLabIdentityStatusSchema: z.ZodEnum<["INCOMPLETE", "VALID", "CONFLICT"]>;
|
|
5
|
+
/**
|
|
6
|
+
* Closed v1 vocabulary emitted by Relay contact reconciliation. Keep this
|
|
7
|
+
* list free of device identifiers, phone numbers, and raw error text.
|
|
8
|
+
*/
|
|
9
|
+
export declare const RELAY_LAB_READINESS_ERROR_CODES: readonly ["OWNER_OFFLINE", "CONTACT_WRITE_FAILED"];
|
|
10
|
+
export declare const RelayLabReadinessErrorCodeSchema: z.ZodEnum<["OWNER_OFFLINE", "CONTACT_WRITE_FAILED"]>;
|
|
11
|
+
export declare const RelayLabDeviceSchema: z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
podId: z.ZodString;
|
|
14
|
+
podSlug: z.ZodString;
|
|
15
|
+
podDisplayName: z.ZodString;
|
|
16
|
+
localDeviceKey: z.ZodString;
|
|
17
|
+
label: z.ZodNullable<z.ZodString>;
|
|
18
|
+
phoneE164: z.ZodNullable<z.ZodString>;
|
|
19
|
+
identityVersion: z.ZodNumber;
|
|
20
|
+
lifecycleStatus: z.ZodEnum<["ACTIVE", "RETIRED"]>;
|
|
21
|
+
enrollmentStatus: z.ZodEnum<["UNENROLLED", "ENROLLED", "REVOKED"]>;
|
|
22
|
+
connectionStatus: z.ZodEnum<["ONLINE", "OFFLINE"]>;
|
|
23
|
+
restrictionStatus: z.ZodEnum<["NONE", "RECOVERING", "RESTRICTED"]>;
|
|
24
|
+
identityStatus: z.ZodEnum<["INCOMPLETE", "VALID", "CONFLICT"]>;
|
|
25
|
+
lastSeenAt: z.ZodString;
|
|
26
|
+
}, "strict", z.ZodTypeAny, {
|
|
27
|
+
id: string;
|
|
28
|
+
podId: string;
|
|
29
|
+
podSlug: string;
|
|
30
|
+
podDisplayName: string;
|
|
31
|
+
localDeviceKey: string;
|
|
32
|
+
label: string | null;
|
|
33
|
+
phoneE164: string | null;
|
|
34
|
+
identityVersion: number;
|
|
35
|
+
lifecycleStatus: "ACTIVE" | "RETIRED";
|
|
36
|
+
enrollmentStatus: "UNENROLLED" | "ENROLLED" | "REVOKED";
|
|
37
|
+
connectionStatus: "ONLINE" | "OFFLINE";
|
|
38
|
+
restrictionStatus: "NONE" | "RECOVERING" | "RESTRICTED";
|
|
39
|
+
identityStatus: "INCOMPLETE" | "VALID" | "CONFLICT";
|
|
40
|
+
lastSeenAt: string;
|
|
41
|
+
}, {
|
|
42
|
+
id: string;
|
|
43
|
+
podId: string;
|
|
44
|
+
podSlug: string;
|
|
45
|
+
podDisplayName: string;
|
|
46
|
+
localDeviceKey: string;
|
|
47
|
+
label: string | null;
|
|
48
|
+
phoneE164: string | null;
|
|
49
|
+
identityVersion: number;
|
|
50
|
+
lifecycleStatus: "ACTIVE" | "RETIRED";
|
|
51
|
+
enrollmentStatus: "UNENROLLED" | "ENROLLED" | "REVOKED";
|
|
52
|
+
connectionStatus: "ONLINE" | "OFFLINE";
|
|
53
|
+
restrictionStatus: "NONE" | "RECOVERING" | "RESTRICTED";
|
|
54
|
+
identityStatus: "INCOMPLETE" | "VALID" | "CONFLICT";
|
|
55
|
+
lastSeenAt: string;
|
|
56
|
+
}>;
|
|
57
|
+
export declare const RelayLabReadinessSchema: z.ZodObject<{
|
|
58
|
+
podId: z.ZodString;
|
|
59
|
+
podDisplayName: z.ZodString;
|
|
60
|
+
revision: z.ZodNumber;
|
|
61
|
+
requiredPairCount: z.ZodNumber;
|
|
62
|
+
savedPairCount: z.ZodNumber;
|
|
63
|
+
failedPairCount: z.ZodNumber;
|
|
64
|
+
missingPairs: z.ZodArray<z.ZodObject<{
|
|
65
|
+
ownerLocalDeviceKey: z.ZodString;
|
|
66
|
+
contactLabDeviceId: z.ZodString;
|
|
67
|
+
errorCode: z.ZodEnum<["OWNER_OFFLINE", "CONTACT_WRITE_FAILED"]>;
|
|
68
|
+
}, "strict", z.ZodTypeAny, {
|
|
69
|
+
ownerLocalDeviceKey: string;
|
|
70
|
+
contactLabDeviceId: string;
|
|
71
|
+
errorCode: "OWNER_OFFLINE" | "CONTACT_WRITE_FAILED";
|
|
72
|
+
}, {
|
|
73
|
+
ownerLocalDeviceKey: string;
|
|
74
|
+
contactLabDeviceId: string;
|
|
75
|
+
errorCode: "OWNER_OFFLINE" | "CONTACT_WRITE_FAILED";
|
|
76
|
+
}>, "many">;
|
|
77
|
+
reportedAt: z.ZodString;
|
|
78
|
+
expiresAt: z.ZodString;
|
|
79
|
+
ready: z.ZodBoolean;
|
|
80
|
+
}, "strict", z.ZodTypeAny, {
|
|
81
|
+
podId: string;
|
|
82
|
+
podDisplayName: string;
|
|
83
|
+
revision: number;
|
|
84
|
+
requiredPairCount: number;
|
|
85
|
+
savedPairCount: number;
|
|
86
|
+
failedPairCount: number;
|
|
87
|
+
missingPairs: {
|
|
88
|
+
ownerLocalDeviceKey: string;
|
|
89
|
+
contactLabDeviceId: string;
|
|
90
|
+
errorCode: "OWNER_OFFLINE" | "CONTACT_WRITE_FAILED";
|
|
91
|
+
}[];
|
|
92
|
+
reportedAt: string;
|
|
93
|
+
expiresAt: string;
|
|
94
|
+
ready: boolean;
|
|
95
|
+
}, {
|
|
96
|
+
podId: string;
|
|
97
|
+
podDisplayName: string;
|
|
98
|
+
revision: number;
|
|
99
|
+
requiredPairCount: number;
|
|
100
|
+
savedPairCount: number;
|
|
101
|
+
failedPairCount: number;
|
|
102
|
+
missingPairs: {
|
|
103
|
+
ownerLocalDeviceKey: string;
|
|
104
|
+
contactLabDeviceId: string;
|
|
105
|
+
errorCode: "OWNER_OFFLINE" | "CONTACT_WRITE_FAILED";
|
|
106
|
+
}[];
|
|
107
|
+
reportedAt: string;
|
|
108
|
+
expiresAt: string;
|
|
109
|
+
ready: boolean;
|
|
110
|
+
}>;
|
|
111
|
+
export declare const RelayLabFleetSnapshotSchema: z.ZodObject<{
|
|
112
|
+
revision: z.ZodNumber;
|
|
113
|
+
devices: z.ZodArray<z.ZodObject<{
|
|
114
|
+
id: z.ZodString;
|
|
115
|
+
podId: z.ZodString;
|
|
116
|
+
podSlug: z.ZodString;
|
|
117
|
+
podDisplayName: z.ZodString;
|
|
118
|
+
localDeviceKey: z.ZodString;
|
|
119
|
+
label: z.ZodNullable<z.ZodString>;
|
|
120
|
+
phoneE164: z.ZodNullable<z.ZodString>;
|
|
121
|
+
identityVersion: z.ZodNumber;
|
|
122
|
+
lifecycleStatus: z.ZodEnum<["ACTIVE", "RETIRED"]>;
|
|
123
|
+
enrollmentStatus: z.ZodEnum<["UNENROLLED", "ENROLLED", "REVOKED"]>;
|
|
124
|
+
connectionStatus: z.ZodEnum<["ONLINE", "OFFLINE"]>;
|
|
125
|
+
restrictionStatus: z.ZodEnum<["NONE", "RECOVERING", "RESTRICTED"]>;
|
|
126
|
+
identityStatus: z.ZodEnum<["INCOMPLETE", "VALID", "CONFLICT"]>;
|
|
127
|
+
lastSeenAt: z.ZodString;
|
|
128
|
+
}, "strict", z.ZodTypeAny, {
|
|
129
|
+
id: string;
|
|
130
|
+
podId: string;
|
|
131
|
+
podSlug: string;
|
|
132
|
+
podDisplayName: string;
|
|
133
|
+
localDeviceKey: string;
|
|
134
|
+
label: string | null;
|
|
135
|
+
phoneE164: string | null;
|
|
136
|
+
identityVersion: number;
|
|
137
|
+
lifecycleStatus: "ACTIVE" | "RETIRED";
|
|
138
|
+
enrollmentStatus: "UNENROLLED" | "ENROLLED" | "REVOKED";
|
|
139
|
+
connectionStatus: "ONLINE" | "OFFLINE";
|
|
140
|
+
restrictionStatus: "NONE" | "RECOVERING" | "RESTRICTED";
|
|
141
|
+
identityStatus: "INCOMPLETE" | "VALID" | "CONFLICT";
|
|
142
|
+
lastSeenAt: string;
|
|
143
|
+
}, {
|
|
144
|
+
id: string;
|
|
145
|
+
podId: string;
|
|
146
|
+
podSlug: string;
|
|
147
|
+
podDisplayName: string;
|
|
148
|
+
localDeviceKey: string;
|
|
149
|
+
label: string | null;
|
|
150
|
+
phoneE164: string | null;
|
|
151
|
+
identityVersion: number;
|
|
152
|
+
lifecycleStatus: "ACTIVE" | "RETIRED";
|
|
153
|
+
enrollmentStatus: "UNENROLLED" | "ENROLLED" | "REVOKED";
|
|
154
|
+
connectionStatus: "ONLINE" | "OFFLINE";
|
|
155
|
+
restrictionStatus: "NONE" | "RECOVERING" | "RESTRICTED";
|
|
156
|
+
identityStatus: "INCOMPLETE" | "VALID" | "CONFLICT";
|
|
157
|
+
lastSeenAt: string;
|
|
158
|
+
}>, "many">;
|
|
159
|
+
readiness: z.ZodArray<z.ZodObject<{
|
|
160
|
+
podId: z.ZodString;
|
|
161
|
+
podDisplayName: z.ZodString;
|
|
162
|
+
revision: z.ZodNumber;
|
|
163
|
+
requiredPairCount: z.ZodNumber;
|
|
164
|
+
savedPairCount: z.ZodNumber;
|
|
165
|
+
failedPairCount: z.ZodNumber;
|
|
166
|
+
missingPairs: z.ZodArray<z.ZodObject<{
|
|
167
|
+
ownerLocalDeviceKey: z.ZodString;
|
|
168
|
+
contactLabDeviceId: z.ZodString;
|
|
169
|
+
errorCode: z.ZodEnum<["OWNER_OFFLINE", "CONTACT_WRITE_FAILED"]>;
|
|
170
|
+
}, "strict", z.ZodTypeAny, {
|
|
171
|
+
ownerLocalDeviceKey: string;
|
|
172
|
+
contactLabDeviceId: string;
|
|
173
|
+
errorCode: "OWNER_OFFLINE" | "CONTACT_WRITE_FAILED";
|
|
174
|
+
}, {
|
|
175
|
+
ownerLocalDeviceKey: string;
|
|
176
|
+
contactLabDeviceId: string;
|
|
177
|
+
errorCode: "OWNER_OFFLINE" | "CONTACT_WRITE_FAILED";
|
|
178
|
+
}>, "many">;
|
|
179
|
+
reportedAt: z.ZodString;
|
|
180
|
+
expiresAt: z.ZodString;
|
|
181
|
+
ready: z.ZodBoolean;
|
|
182
|
+
}, "strict", z.ZodTypeAny, {
|
|
183
|
+
podId: string;
|
|
184
|
+
podDisplayName: string;
|
|
185
|
+
revision: number;
|
|
186
|
+
requiredPairCount: number;
|
|
187
|
+
savedPairCount: number;
|
|
188
|
+
failedPairCount: number;
|
|
189
|
+
missingPairs: {
|
|
190
|
+
ownerLocalDeviceKey: string;
|
|
191
|
+
contactLabDeviceId: string;
|
|
192
|
+
errorCode: "OWNER_OFFLINE" | "CONTACT_WRITE_FAILED";
|
|
193
|
+
}[];
|
|
194
|
+
reportedAt: string;
|
|
195
|
+
expiresAt: string;
|
|
196
|
+
ready: boolean;
|
|
197
|
+
}, {
|
|
198
|
+
podId: string;
|
|
199
|
+
podDisplayName: string;
|
|
200
|
+
revision: number;
|
|
201
|
+
requiredPairCount: number;
|
|
202
|
+
savedPairCount: number;
|
|
203
|
+
failedPairCount: number;
|
|
204
|
+
missingPairs: {
|
|
205
|
+
ownerLocalDeviceKey: string;
|
|
206
|
+
contactLabDeviceId: string;
|
|
207
|
+
errorCode: "OWNER_OFFLINE" | "CONTACT_WRITE_FAILED";
|
|
208
|
+
}[];
|
|
209
|
+
reportedAt: string;
|
|
210
|
+
expiresAt: string;
|
|
211
|
+
ready: boolean;
|
|
212
|
+
}>, "many">;
|
|
213
|
+
}, "strict", z.ZodTypeAny, {
|
|
214
|
+
revision: number;
|
|
215
|
+
devices: {
|
|
216
|
+
id: string;
|
|
217
|
+
podId: string;
|
|
218
|
+
podSlug: string;
|
|
219
|
+
podDisplayName: string;
|
|
220
|
+
localDeviceKey: string;
|
|
221
|
+
label: string | null;
|
|
222
|
+
phoneE164: string | null;
|
|
223
|
+
identityVersion: number;
|
|
224
|
+
lifecycleStatus: "ACTIVE" | "RETIRED";
|
|
225
|
+
enrollmentStatus: "UNENROLLED" | "ENROLLED" | "REVOKED";
|
|
226
|
+
connectionStatus: "ONLINE" | "OFFLINE";
|
|
227
|
+
restrictionStatus: "NONE" | "RECOVERING" | "RESTRICTED";
|
|
228
|
+
identityStatus: "INCOMPLETE" | "VALID" | "CONFLICT";
|
|
229
|
+
lastSeenAt: string;
|
|
230
|
+
}[];
|
|
231
|
+
readiness: {
|
|
232
|
+
podId: string;
|
|
233
|
+
podDisplayName: string;
|
|
234
|
+
revision: number;
|
|
235
|
+
requiredPairCount: number;
|
|
236
|
+
savedPairCount: number;
|
|
237
|
+
failedPairCount: number;
|
|
238
|
+
missingPairs: {
|
|
239
|
+
ownerLocalDeviceKey: string;
|
|
240
|
+
contactLabDeviceId: string;
|
|
241
|
+
errorCode: "OWNER_OFFLINE" | "CONTACT_WRITE_FAILED";
|
|
242
|
+
}[];
|
|
243
|
+
reportedAt: string;
|
|
244
|
+
expiresAt: string;
|
|
245
|
+
ready: boolean;
|
|
246
|
+
}[];
|
|
247
|
+
}, {
|
|
248
|
+
revision: number;
|
|
249
|
+
devices: {
|
|
250
|
+
id: string;
|
|
251
|
+
podId: string;
|
|
252
|
+
podSlug: string;
|
|
253
|
+
podDisplayName: string;
|
|
254
|
+
localDeviceKey: string;
|
|
255
|
+
label: string | null;
|
|
256
|
+
phoneE164: string | null;
|
|
257
|
+
identityVersion: number;
|
|
258
|
+
lifecycleStatus: "ACTIVE" | "RETIRED";
|
|
259
|
+
enrollmentStatus: "UNENROLLED" | "ENROLLED" | "REVOKED";
|
|
260
|
+
connectionStatus: "ONLINE" | "OFFLINE";
|
|
261
|
+
restrictionStatus: "NONE" | "RECOVERING" | "RESTRICTED";
|
|
262
|
+
identityStatus: "INCOMPLETE" | "VALID" | "CONFLICT";
|
|
263
|
+
lastSeenAt: string;
|
|
264
|
+
}[];
|
|
265
|
+
readiness: {
|
|
266
|
+
podId: string;
|
|
267
|
+
podDisplayName: string;
|
|
268
|
+
revision: number;
|
|
269
|
+
requiredPairCount: number;
|
|
270
|
+
savedPairCount: number;
|
|
271
|
+
failedPairCount: number;
|
|
272
|
+
missingPairs: {
|
|
273
|
+
ownerLocalDeviceKey: string;
|
|
274
|
+
contactLabDeviceId: string;
|
|
275
|
+
errorCode: "OWNER_OFFLINE" | "CONTACT_WRITE_FAILED";
|
|
276
|
+
}[];
|
|
277
|
+
reportedAt: string;
|
|
278
|
+
expiresAt: string;
|
|
279
|
+
ready: boolean;
|
|
280
|
+
}[];
|
|
281
|
+
}>;
|
|
282
|
+
/**
|
|
283
|
+
* A pod can publish only its local observations. Recruitment derives pod
|
|
284
|
+
* ownership and enrollment state from the authenticated machine principal.
|
|
285
|
+
*/
|
|
286
|
+
export declare const PublishRelayLabSnapshotBodySchema: z.ZodObject<{
|
|
287
|
+
generation: z.ZodNumber;
|
|
288
|
+
observedAt: z.ZodString;
|
|
289
|
+
devices: z.ZodArray<z.ZodObject<{
|
|
290
|
+
localDeviceKey: z.ZodString;
|
|
291
|
+
label: z.ZodNullable<z.ZodString>;
|
|
292
|
+
phoneE164: z.ZodNullable<z.ZodString>;
|
|
293
|
+
lifecycleStatus: z.ZodEnum<["ACTIVE", "RETIRED"]>;
|
|
294
|
+
connectionStatus: z.ZodEnum<["ONLINE", "OFFLINE"]>;
|
|
295
|
+
restrictionStatus: z.ZodEnum<["NONE", "RECOVERING", "RESTRICTED"]>;
|
|
296
|
+
lastSeenAt: z.ZodString;
|
|
297
|
+
}, "strict", z.ZodTypeAny, {
|
|
298
|
+
localDeviceKey: string;
|
|
299
|
+
label: string | null;
|
|
300
|
+
phoneE164: string | null;
|
|
301
|
+
lifecycleStatus: "ACTIVE" | "RETIRED";
|
|
302
|
+
connectionStatus: "ONLINE" | "OFFLINE";
|
|
303
|
+
restrictionStatus: "NONE" | "RECOVERING" | "RESTRICTED";
|
|
304
|
+
lastSeenAt: string;
|
|
305
|
+
}, {
|
|
306
|
+
localDeviceKey: string;
|
|
307
|
+
label: string | null;
|
|
308
|
+
phoneE164: string | null;
|
|
309
|
+
lifecycleStatus: "ACTIVE" | "RETIRED";
|
|
310
|
+
connectionStatus: "ONLINE" | "OFFLINE";
|
|
311
|
+
restrictionStatus: "NONE" | "RECOVERING" | "RESTRICTED";
|
|
312
|
+
lastSeenAt: string;
|
|
313
|
+
}>, "many">;
|
|
314
|
+
}, "strict", z.ZodTypeAny, {
|
|
315
|
+
devices: {
|
|
316
|
+
localDeviceKey: string;
|
|
317
|
+
label: string | null;
|
|
318
|
+
phoneE164: string | null;
|
|
319
|
+
lifecycleStatus: "ACTIVE" | "RETIRED";
|
|
320
|
+
connectionStatus: "ONLINE" | "OFFLINE";
|
|
321
|
+
restrictionStatus: "NONE" | "RECOVERING" | "RESTRICTED";
|
|
322
|
+
lastSeenAt: string;
|
|
323
|
+
}[];
|
|
324
|
+
generation: number;
|
|
325
|
+
observedAt: string;
|
|
326
|
+
}, {
|
|
327
|
+
devices: {
|
|
328
|
+
localDeviceKey: string;
|
|
329
|
+
label: string | null;
|
|
330
|
+
phoneE164: string | null;
|
|
331
|
+
lifecycleStatus: "ACTIVE" | "RETIRED";
|
|
332
|
+
connectionStatus: "ONLINE" | "OFFLINE";
|
|
333
|
+
restrictionStatus: "NONE" | "RECOVERING" | "RESTRICTED";
|
|
334
|
+
lastSeenAt: string;
|
|
335
|
+
}[];
|
|
336
|
+
generation: number;
|
|
337
|
+
observedAt: string;
|
|
338
|
+
}>;
|
|
339
|
+
export declare const PublishRelayLabSnapshotResponseSchema: z.ZodObject<{
|
|
340
|
+
acceptedGeneration: z.ZodNumber;
|
|
341
|
+
revision: z.ZodNumber;
|
|
342
|
+
}, "strict", z.ZodTypeAny, {
|
|
343
|
+
revision: number;
|
|
344
|
+
acceptedGeneration: number;
|
|
345
|
+
}, {
|
|
346
|
+
revision: number;
|
|
347
|
+
acceptedGeneration: number;
|
|
348
|
+
}>;
|
|
349
|
+
/** The pod supplies readiness facts; timestamps and readiness are server-owned. */
|
|
350
|
+
export declare const ReportRelayLabReadinessBodySchema: z.ZodObject<Omit<{
|
|
351
|
+
podId: z.ZodString;
|
|
352
|
+
podDisplayName: z.ZodString;
|
|
353
|
+
revision: z.ZodNumber;
|
|
354
|
+
requiredPairCount: z.ZodNumber;
|
|
355
|
+
savedPairCount: z.ZodNumber;
|
|
356
|
+
failedPairCount: z.ZodNumber;
|
|
357
|
+
missingPairs: z.ZodArray<z.ZodObject<{
|
|
358
|
+
ownerLocalDeviceKey: z.ZodString;
|
|
359
|
+
contactLabDeviceId: z.ZodString;
|
|
360
|
+
errorCode: z.ZodEnum<["OWNER_OFFLINE", "CONTACT_WRITE_FAILED"]>;
|
|
361
|
+
}, "strict", z.ZodTypeAny, {
|
|
362
|
+
ownerLocalDeviceKey: string;
|
|
363
|
+
contactLabDeviceId: string;
|
|
364
|
+
errorCode: "OWNER_OFFLINE" | "CONTACT_WRITE_FAILED";
|
|
365
|
+
}, {
|
|
366
|
+
ownerLocalDeviceKey: string;
|
|
367
|
+
contactLabDeviceId: string;
|
|
368
|
+
errorCode: "OWNER_OFFLINE" | "CONTACT_WRITE_FAILED";
|
|
369
|
+
}>, "many">;
|
|
370
|
+
reportedAt: z.ZodString;
|
|
371
|
+
expiresAt: z.ZodString;
|
|
372
|
+
ready: z.ZodBoolean;
|
|
373
|
+
}, "podId" | "podDisplayName" | "reportedAt" | "expiresAt" | "ready">, "strict", z.ZodTypeAny, {
|
|
374
|
+
revision: number;
|
|
375
|
+
requiredPairCount: number;
|
|
376
|
+
savedPairCount: number;
|
|
377
|
+
failedPairCount: number;
|
|
378
|
+
missingPairs: {
|
|
379
|
+
ownerLocalDeviceKey: string;
|
|
380
|
+
contactLabDeviceId: string;
|
|
381
|
+
errorCode: "OWNER_OFFLINE" | "CONTACT_WRITE_FAILED";
|
|
382
|
+
}[];
|
|
383
|
+
}, {
|
|
384
|
+
revision: number;
|
|
385
|
+
requiredPairCount: number;
|
|
386
|
+
savedPairCount: number;
|
|
387
|
+
failedPairCount: number;
|
|
388
|
+
missingPairs: {
|
|
389
|
+
ownerLocalDeviceKey: string;
|
|
390
|
+
contactLabDeviceId: string;
|
|
391
|
+
errorCode: "OWNER_OFFLINE" | "CONTACT_WRITE_FAILED";
|
|
392
|
+
}[];
|
|
393
|
+
}>;
|
|
394
|
+
export declare const UpdateRelayLabEnrollmentBodySchema: z.ZodDiscriminatedUnion<"enrollmentStatus", [z.ZodObject<{
|
|
395
|
+
enrollmentStatus: z.ZodLiteral<"ENROLLED">;
|
|
396
|
+
expectedIdentity: z.ZodObject<{
|
|
397
|
+
identityVersion: z.ZodNumber;
|
|
398
|
+
label: z.ZodEffects<z.ZodString, string, string>;
|
|
399
|
+
phoneE164: z.ZodString;
|
|
400
|
+
}, "strict", z.ZodTypeAny, {
|
|
401
|
+
label: string;
|
|
402
|
+
phoneE164: string;
|
|
403
|
+
identityVersion: number;
|
|
404
|
+
}, {
|
|
405
|
+
label: string;
|
|
406
|
+
phoneE164: string;
|
|
407
|
+
identityVersion: number;
|
|
408
|
+
}>;
|
|
409
|
+
}, "strict", z.ZodTypeAny, {
|
|
410
|
+
enrollmentStatus: "ENROLLED";
|
|
411
|
+
expectedIdentity: {
|
|
412
|
+
label: string;
|
|
413
|
+
phoneE164: string;
|
|
414
|
+
identityVersion: number;
|
|
415
|
+
};
|
|
416
|
+
}, {
|
|
417
|
+
enrollmentStatus: "ENROLLED";
|
|
418
|
+
expectedIdentity: {
|
|
419
|
+
label: string;
|
|
420
|
+
phoneE164: string;
|
|
421
|
+
identityVersion: number;
|
|
422
|
+
};
|
|
423
|
+
}>, z.ZodObject<{
|
|
424
|
+
enrollmentStatus: z.ZodLiteral<"REVOKED">;
|
|
425
|
+
}, "strict", z.ZodTypeAny, {
|
|
426
|
+
enrollmentStatus: "REVOKED";
|
|
427
|
+
}, {
|
|
428
|
+
enrollmentStatus: "REVOKED";
|
|
429
|
+
}>]>;
|
|
430
|
+
export declare const UpdateRelayLabEnrollmentResponseSchema: z.ZodObject<{
|
|
431
|
+
localDeviceKey: z.ZodString;
|
|
432
|
+
enrollmentStatus: z.ZodEnum<["UNENROLLED", "ENROLLED", "REVOKED"]>;
|
|
433
|
+
revision: z.ZodNumber;
|
|
434
|
+
}, "strict", z.ZodTypeAny, {
|
|
435
|
+
localDeviceKey: string;
|
|
436
|
+
enrollmentStatus: "UNENROLLED" | "ENROLLED" | "REVOKED";
|
|
437
|
+
revision: number;
|
|
438
|
+
}, {
|
|
439
|
+
localDeviceKey: string;
|
|
440
|
+
enrollmentStatus: "UNENROLLED" | "ENROLLED" | "REVOKED";
|
|
441
|
+
revision: number;
|
|
442
|
+
}>;
|
|
443
|
+
export declare const LabFleetSsePayloadSchema: z.ZodObject<{
|
|
444
|
+
revision: z.ZodNumber;
|
|
445
|
+
changeType: z.ZodEnum<["DEVICE_ADDED", "IDENTITY_CHANGED", "AVAILABILITY_CHANGED", "ENROLLMENT_CHANGED", "DEVICE_RETIRED"]>;
|
|
446
|
+
sourcePodId: z.ZodString;
|
|
447
|
+
affectedDeviceIds: z.ZodArray<z.ZodString, "many">;
|
|
448
|
+
}, "strict", z.ZodTypeAny, {
|
|
449
|
+
revision: number;
|
|
450
|
+
changeType: "DEVICE_ADDED" | "IDENTITY_CHANGED" | "AVAILABILITY_CHANGED" | "ENROLLMENT_CHANGED" | "DEVICE_RETIRED";
|
|
451
|
+
sourcePodId: string;
|
|
452
|
+
affectedDeviceIds: string[];
|
|
453
|
+
}, {
|
|
454
|
+
revision: number;
|
|
455
|
+
changeType: "DEVICE_ADDED" | "IDENTITY_CHANGED" | "AVAILABILITY_CHANGED" | "ENROLLMENT_CHANGED" | "DEVICE_RETIRED";
|
|
456
|
+
sourcePodId: string;
|
|
457
|
+
affectedDeviceIds: string[];
|
|
458
|
+
}>;
|
|
459
|
+
export type RelayLabLifecycle = z.infer<typeof RelayLabLifecycleSchema>;
|
|
460
|
+
export type RelayLabEnrollment = z.infer<typeof RelayLabEnrollmentSchema>;
|
|
461
|
+
export type RelayLabIdentityStatus = z.infer<typeof RelayLabIdentityStatusSchema>;
|
|
462
|
+
export type RelayLabReadinessErrorCode = z.infer<typeof RelayLabReadinessErrorCodeSchema>;
|
|
463
|
+
export type RelayLabDevice = z.infer<typeof RelayLabDeviceSchema>;
|
|
464
|
+
export type RelayLabReadiness = z.infer<typeof RelayLabReadinessSchema>;
|
|
465
|
+
export type RelayLabFleetSnapshot = z.infer<typeof RelayLabFleetSnapshotSchema>;
|
|
466
|
+
export type PublishRelayLabSnapshotBody = z.infer<typeof PublishRelayLabSnapshotBodySchema>;
|
|
467
|
+
export type PublishRelayLabSnapshotResponse = z.infer<typeof PublishRelayLabSnapshotResponseSchema>;
|
|
468
|
+
export type ReportRelayLabReadinessBody = z.infer<typeof ReportRelayLabReadinessBodySchema>;
|
|
469
|
+
export type UpdateRelayLabEnrollmentBody = z.infer<typeof UpdateRelayLabEnrollmentBodySchema>;
|
|
470
|
+
export type UpdateRelayLabEnrollmentResponse = z.infer<typeof UpdateRelayLabEnrollmentResponseSchema>;
|
|
471
|
+
export type LabFleetSsePayload = z.infer<typeof LabFleetSsePayloadSchema>;
|
|
472
|
+
//# sourceMappingURL=relay-lab-fleet.schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relay-lab-fleet.schemas.d.ts","sourceRoot":"","sources":["../../contracts/relay-pods/relay-lab-fleet.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,uBAAuB,kCAAgC,CAAC;AACrE,eAAO,MAAM,wBAAwB,kDAInC,CAAC;AACH,eAAO,MAAM,4BAA4B,gDAIvC,CAAC;AACH;;;GAGG;AACH,eAAO,MAAM,+BAA+B,oDAGlC,CAAC;AACX,eAAO,MAAM,gCAAgC,sDAE5C,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoBtB,CAAC;AAEZ,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBzB,CAAC;AAEZ,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM7B,CAAC;AAEZ;;;GAGG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBnC,CAAC;AAEZ,eAAO,MAAM,qCAAqC;;;;;;;;;EAKvC,CAAC;AAEZ,mFAAmF;AACnF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM5C,CAAC;AAEH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwB9C,CAAC;AAEF,eAAO,MAAM,sCAAsC;;;;;;;;;;;;EAMxC,CAAC;AAEZ,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;EAa1B,CAAC;AAEZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAC;AACF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CACnD,OAAO,qCAAqC,CAC7C,CAAC;AACF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAC;AACF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,kCAAkC,CAC1C,CAAC;AACF,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CACpD,OAAO,sCAAsC,CAC9C,CAAC;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LabFleetSsePayloadSchema = exports.UpdateRelayLabEnrollmentResponseSchema = exports.UpdateRelayLabEnrollmentBodySchema = exports.ReportRelayLabReadinessBodySchema = exports.PublishRelayLabSnapshotResponseSchema = exports.PublishRelayLabSnapshotBodySchema = exports.RelayLabFleetSnapshotSchema = exports.RelayLabReadinessSchema = exports.RelayLabDeviceSchema = exports.RelayLabReadinessErrorCodeSchema = exports.RELAY_LAB_READINESS_ERROR_CODES = exports.RelayLabIdentityStatusSchema = exports.RelayLabEnrollmentSchema = exports.RelayLabLifecycleSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.RelayLabLifecycleSchema = zod_1.z.enum(['ACTIVE', 'RETIRED']);
|
|
6
|
+
exports.RelayLabEnrollmentSchema = zod_1.z.enum([
|
|
7
|
+
'UNENROLLED',
|
|
8
|
+
'ENROLLED',
|
|
9
|
+
'REVOKED',
|
|
10
|
+
]);
|
|
11
|
+
exports.RelayLabIdentityStatusSchema = zod_1.z.enum([
|
|
12
|
+
'INCOMPLETE',
|
|
13
|
+
'VALID',
|
|
14
|
+
'CONFLICT',
|
|
15
|
+
]);
|
|
16
|
+
/**
|
|
17
|
+
* Closed v1 vocabulary emitted by Relay contact reconciliation. Keep this
|
|
18
|
+
* list free of device identifiers, phone numbers, and raw error text.
|
|
19
|
+
*/
|
|
20
|
+
exports.RELAY_LAB_READINESS_ERROR_CODES = [
|
|
21
|
+
'OWNER_OFFLINE',
|
|
22
|
+
'CONTACT_WRITE_FAILED',
|
|
23
|
+
];
|
|
24
|
+
exports.RelayLabReadinessErrorCodeSchema = zod_1.z.enum(exports.RELAY_LAB_READINESS_ERROR_CODES);
|
|
25
|
+
exports.RelayLabDeviceSchema = zod_1.z
|
|
26
|
+
.object({
|
|
27
|
+
id: zod_1.z.string().uuid(),
|
|
28
|
+
podId: zod_1.z.string().uuid(),
|
|
29
|
+
podSlug: zod_1.z.string().min(1),
|
|
30
|
+
podDisplayName: zod_1.z.string().min(1),
|
|
31
|
+
localDeviceKey: zod_1.z.string().min(1),
|
|
32
|
+
label: zod_1.z.string().min(1).nullable(),
|
|
33
|
+
phoneE164: zod_1.z
|
|
34
|
+
.string()
|
|
35
|
+
.regex(/^\+[1-9]\d{7,14}$/)
|
|
36
|
+
.nullable(),
|
|
37
|
+
identityVersion: zod_1.z.number().int().positive(),
|
|
38
|
+
lifecycleStatus: exports.RelayLabLifecycleSchema,
|
|
39
|
+
enrollmentStatus: exports.RelayLabEnrollmentSchema,
|
|
40
|
+
connectionStatus: zod_1.z.enum(['ONLINE', 'OFFLINE']),
|
|
41
|
+
restrictionStatus: zod_1.z.enum(['NONE', 'RECOVERING', 'RESTRICTED']),
|
|
42
|
+
identityStatus: exports.RelayLabIdentityStatusSchema,
|
|
43
|
+
lastSeenAt: zod_1.z.string().datetime(),
|
|
44
|
+
})
|
|
45
|
+
.strict();
|
|
46
|
+
exports.RelayLabReadinessSchema = zod_1.z
|
|
47
|
+
.object({
|
|
48
|
+
podId: zod_1.z.string().uuid(),
|
|
49
|
+
podDisplayName: zod_1.z.string().min(1),
|
|
50
|
+
revision: zod_1.z.number().int().nonnegative(),
|
|
51
|
+
requiredPairCount: zod_1.z.number().int().nonnegative(),
|
|
52
|
+
savedPairCount: zod_1.z.number().int().nonnegative(),
|
|
53
|
+
failedPairCount: zod_1.z.number().int().nonnegative(),
|
|
54
|
+
missingPairs: zod_1.z
|
|
55
|
+
.array(zod_1.z
|
|
56
|
+
.object({
|
|
57
|
+
ownerLocalDeviceKey: zod_1.z.string().min(1),
|
|
58
|
+
contactLabDeviceId: zod_1.z.string().uuid(),
|
|
59
|
+
errorCode: exports.RelayLabReadinessErrorCodeSchema,
|
|
60
|
+
})
|
|
61
|
+
.strict())
|
|
62
|
+
.max(100),
|
|
63
|
+
reportedAt: zod_1.z.string().datetime(),
|
|
64
|
+
expiresAt: zod_1.z.string().datetime(),
|
|
65
|
+
ready: zod_1.z.boolean(),
|
|
66
|
+
})
|
|
67
|
+
.strict();
|
|
68
|
+
exports.RelayLabFleetSnapshotSchema = zod_1.z
|
|
69
|
+
.object({
|
|
70
|
+
revision: zod_1.z.number().int().nonnegative(),
|
|
71
|
+
devices: zod_1.z.array(exports.RelayLabDeviceSchema),
|
|
72
|
+
readiness: zod_1.z.array(exports.RelayLabReadinessSchema),
|
|
73
|
+
})
|
|
74
|
+
.strict();
|
|
75
|
+
/**
|
|
76
|
+
* A pod can publish only its local observations. Recruitment derives pod
|
|
77
|
+
* ownership and enrollment state from the authenticated machine principal.
|
|
78
|
+
*/
|
|
79
|
+
exports.PublishRelayLabSnapshotBodySchema = zod_1.z
|
|
80
|
+
.object({
|
|
81
|
+
generation: zod_1.z.number().int().positive(),
|
|
82
|
+
observedAt: zod_1.z.string().datetime(),
|
|
83
|
+
devices: zod_1.z.array(zod_1.z
|
|
84
|
+
.object({
|
|
85
|
+
localDeviceKey: zod_1.z.string().min(1),
|
|
86
|
+
label: zod_1.z.string().min(1).nullable(),
|
|
87
|
+
phoneE164: zod_1.z
|
|
88
|
+
.string()
|
|
89
|
+
.regex(/^\+[1-9]\d{7,14}$/)
|
|
90
|
+
.nullable(),
|
|
91
|
+
lifecycleStatus: exports.RelayLabLifecycleSchema,
|
|
92
|
+
connectionStatus: zod_1.z.enum(['ONLINE', 'OFFLINE']),
|
|
93
|
+
restrictionStatus: zod_1.z.enum(['NONE', 'RECOVERING', 'RESTRICTED']),
|
|
94
|
+
lastSeenAt: zod_1.z.string().datetime(),
|
|
95
|
+
})
|
|
96
|
+
.strict()),
|
|
97
|
+
})
|
|
98
|
+
.strict();
|
|
99
|
+
exports.PublishRelayLabSnapshotResponseSchema = zod_1.z
|
|
100
|
+
.object({
|
|
101
|
+
acceptedGeneration: zod_1.z.number().int().positive(),
|
|
102
|
+
revision: zod_1.z.number().int().nonnegative(),
|
|
103
|
+
})
|
|
104
|
+
.strict();
|
|
105
|
+
/** The pod supplies readiness facts; timestamps and readiness are server-owned. */
|
|
106
|
+
exports.ReportRelayLabReadinessBodySchema = exports.RelayLabReadinessSchema.omit({
|
|
107
|
+
podId: true,
|
|
108
|
+
podDisplayName: true,
|
|
109
|
+
reportedAt: true,
|
|
110
|
+
expiresAt: true,
|
|
111
|
+
ready: true,
|
|
112
|
+
});
|
|
113
|
+
exports.UpdateRelayLabEnrollmentBodySchema = zod_1.z.discriminatedUnion('enrollmentStatus', [
|
|
114
|
+
zod_1.z
|
|
115
|
+
.object({
|
|
116
|
+
enrollmentStatus: zod_1.z.literal('ENROLLED'),
|
|
117
|
+
expectedIdentity: zod_1.z
|
|
118
|
+
.object({
|
|
119
|
+
identityVersion: zod_1.z.number().int().positive(),
|
|
120
|
+
label: zod_1.z
|
|
121
|
+
.string()
|
|
122
|
+
.min(1)
|
|
123
|
+
.refine((value) => value === value.trim()),
|
|
124
|
+
phoneE164: zod_1.z.string().regex(/^\+[1-9]\d{7,14}$/),
|
|
125
|
+
})
|
|
126
|
+
.strict(),
|
|
127
|
+
})
|
|
128
|
+
.strict(),
|
|
129
|
+
zod_1.z
|
|
130
|
+
.object({
|
|
131
|
+
enrollmentStatus: zod_1.z.literal('REVOKED'),
|
|
132
|
+
})
|
|
133
|
+
.strict(),
|
|
134
|
+
]);
|
|
135
|
+
exports.UpdateRelayLabEnrollmentResponseSchema = zod_1.z
|
|
136
|
+
.object({
|
|
137
|
+
localDeviceKey: zod_1.z.string().min(1),
|
|
138
|
+
enrollmentStatus: exports.RelayLabEnrollmentSchema,
|
|
139
|
+
revision: zod_1.z.number().int().nonnegative(),
|
|
140
|
+
})
|
|
141
|
+
.strict();
|
|
142
|
+
exports.LabFleetSsePayloadSchema = zod_1.z
|
|
143
|
+
.object({
|
|
144
|
+
revision: zod_1.z.number().int().nonnegative(),
|
|
145
|
+
changeType: zod_1.z.enum([
|
|
146
|
+
'DEVICE_ADDED',
|
|
147
|
+
'IDENTITY_CHANGED',
|
|
148
|
+
'AVAILABILITY_CHANGED',
|
|
149
|
+
'ENROLLMENT_CHANGED',
|
|
150
|
+
'DEVICE_RETIRED',
|
|
151
|
+
]),
|
|
152
|
+
sourcePodId: zod_1.z.string().uuid(),
|
|
153
|
+
affectedDeviceIds: zod_1.z.array(zod_1.z.string().uuid()),
|
|
154
|
+
})
|
|
155
|
+
.strict();
|