@opengeni/contracts 2.5.0-canary.2 → 2.7.0
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/agent-topology.d.ts +292 -0
- package/dist/atlassian.js +6 -5
- package/dist/chunk-BCS7WHCK.js +139 -0
- package/dist/chunk-BCS7WHCK.js.map +1 -0
- package/dist/{chunk-4I7DWNRR.js → chunk-ILB4IYNN.js} +6977 -6701
- package/dist/chunk-ILB4IYNN.js.map +1 -0
- package/dist/connection-authority.js +6 -5
- package/dist/connection-authority.js.map +1 -1
- package/dist/editable-artifact-live.js +1 -1
- package/dist/editable-artifact-serialized-commit.js +1 -1
- package/dist/editable-artifacts.js +8 -8
- package/dist/google-drive.js +7 -6
- package/dist/google-drive.js.map +1 -1
- package/dist/index.d.ts +137 -140
- package/dist/index.js +155 -47
- package/dist/managed-auth-session-sets.d.ts +215 -0
- package/dist/managed-auth-session-sets.js +166 -0
- package/dist/managed-auth-session-sets.js.map +1 -0
- package/dist/organization-recovery.d.ts +337 -0
- package/dist/organization-recovery.js +37 -0
- package/dist/organization-recovery.js.map +1 -0
- package/dist/personal-github.js +6 -5
- package/dist/personal-github.js.map +1 -1
- package/dist/session-topology-primitives.d.ts +22 -0
- package/dist/work-claims.d.ts +411 -0
- package/package.json +9 -1
- package/src/agent-topology.ts +69 -0
- package/src/image-generation.ts +8 -2
- package/src/index.ts +69 -81
- package/src/managed-auth-session-sets.ts +208 -0
- package/src/organization-recovery.ts +186 -0
- package/src/session-topology-primitives.ts +21 -0
- package/src/work-claims.ts +266 -0
- package/dist/chunk-4I7DWNRR.js.map +0 -1
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Compact, bounded session projection for workspace agent-topology browsers. */
|
|
3
|
+
export declare const AgentTopologySession: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
title: z.ZodNullable<z.ZodString>;
|
|
6
|
+
titleTruncated: z.ZodBoolean;
|
|
7
|
+
parentSessionId: z.ZodNullable<z.ZodString>;
|
|
8
|
+
rootSessionId: z.ZodString;
|
|
9
|
+
nestedAgentDepth: z.ZodNumber;
|
|
10
|
+
ancestorPath: z.ZodArray<z.ZodObject<{
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
title: z.ZodNullable<z.ZodString>;
|
|
13
|
+
titleTruncated: z.ZodBoolean;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
status: z.ZodEnum<{
|
|
16
|
+
cancelled: "cancelled";
|
|
17
|
+
failed: "failed";
|
|
18
|
+
idle: "idle";
|
|
19
|
+
queued: "queued";
|
|
20
|
+
recovering: "recovering";
|
|
21
|
+
requires_action: "requires_action";
|
|
22
|
+
running: "running";
|
|
23
|
+
waiting_capacity: "waiting_capacity";
|
|
24
|
+
}>;
|
|
25
|
+
goal: z.ZodNullable<z.ZodObject<{
|
|
26
|
+
status: z.ZodEnum<{
|
|
27
|
+
active: "active";
|
|
28
|
+
completed: "completed";
|
|
29
|
+
paused: "paused";
|
|
30
|
+
}>;
|
|
31
|
+
summary: z.ZodString;
|
|
32
|
+
summaryTruncated: z.ZodBoolean;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
pause: z.ZodObject<{
|
|
35
|
+
state: z.ZodEnum<{
|
|
36
|
+
active: "active";
|
|
37
|
+
paused: "paused";
|
|
38
|
+
}>;
|
|
39
|
+
additionalBlockerCount: z.ZodNumber;
|
|
40
|
+
source: z.ZodNullable<z.ZodObject<{
|
|
41
|
+
kind: z.ZodEnum<{
|
|
42
|
+
session: "session";
|
|
43
|
+
workspace: "workspace";
|
|
44
|
+
}>;
|
|
45
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
46
|
+
displayName: z.ZodString;
|
|
47
|
+
displayNameTruncated: z.ZodBoolean;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
children: z.ZodObject<{
|
|
51
|
+
directChildren: z.ZodNumber;
|
|
52
|
+
totalDescendants: z.ZodNumber;
|
|
53
|
+
runningDescendants: z.ZodNumber;
|
|
54
|
+
queuedDescendants: z.ZodNumber;
|
|
55
|
+
attentionDescendants: z.ZodNumber;
|
|
56
|
+
pausedDescendants: z.ZodNumber;
|
|
57
|
+
failedDescendants: z.ZodNumber;
|
|
58
|
+
truncated: z.ZodBoolean;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
relatedWork: z.ZodObject<{
|
|
61
|
+
claims: z.ZodArray<z.ZodObject<{
|
|
62
|
+
id: z.ZodString;
|
|
63
|
+
sessionId: z.ZodString;
|
|
64
|
+
subject: z.ZodObject<{
|
|
65
|
+
namespace: z.ZodString;
|
|
66
|
+
type: z.ZodEnum<{
|
|
67
|
+
artifact: "artifact";
|
|
68
|
+
branch: "branch";
|
|
69
|
+
ci_run: "ci_run";
|
|
70
|
+
issue: "issue";
|
|
71
|
+
other: "other";
|
|
72
|
+
pull_request: "pull_request";
|
|
73
|
+
release: "release";
|
|
74
|
+
repository: "repository";
|
|
75
|
+
}>;
|
|
76
|
+
canonicalKey: z.ZodString;
|
|
77
|
+
displayLabel: z.ZodNullable<z.ZodString>;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
role: z.ZodEnum<{
|
|
80
|
+
delivering: "delivering";
|
|
81
|
+
monitoring: "monitoring";
|
|
82
|
+
reviewing: "reviewing";
|
|
83
|
+
working: "working";
|
|
84
|
+
}>;
|
|
85
|
+
state: z.ZodEnum<{
|
|
86
|
+
active: "active";
|
|
87
|
+
released: "released";
|
|
88
|
+
stale: "stale";
|
|
89
|
+
superseded: "superseded";
|
|
90
|
+
}>;
|
|
91
|
+
revision: z.ZodNumber;
|
|
92
|
+
provenance: z.ZodEnum<{
|
|
93
|
+
explicit_agent: "explicit_agent";
|
|
94
|
+
session_resource: "session_resource";
|
|
95
|
+
system_lifecycle: "system_lifecycle";
|
|
96
|
+
trusted_integration: "trusted_integration";
|
|
97
|
+
user_api: "user_api";
|
|
98
|
+
}>;
|
|
99
|
+
version: z.ZodNullable<z.ZodObject<{
|
|
100
|
+
kind: z.ZodEnum<{
|
|
101
|
+
artifact_version: "artifact_version";
|
|
102
|
+
branch_head: "branch_head";
|
|
103
|
+
ci_run: "ci_run";
|
|
104
|
+
git_commit: "git_commit";
|
|
105
|
+
other: "other";
|
|
106
|
+
pull_request_head: "pull_request_head";
|
|
107
|
+
release_version: "release_version";
|
|
108
|
+
}>;
|
|
109
|
+
value: z.ZodString;
|
|
110
|
+
}, z.core.$strip>>;
|
|
111
|
+
observedAt: z.ZodString;
|
|
112
|
+
updatedAt: z.ZodString;
|
|
113
|
+
settledAt: z.ZodNullable<z.ZodString>;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
claimsTruncated: z.ZodBoolean;
|
|
116
|
+
match: z.ZodNullable<z.ZodObject<{
|
|
117
|
+
class: z.ZodEnum<{
|
|
118
|
+
exact_subject: "exact_subject";
|
|
119
|
+
fuzzy: "fuzzy";
|
|
120
|
+
goal: "goal";
|
|
121
|
+
title: "title";
|
|
122
|
+
}>;
|
|
123
|
+
field: z.ZodEnum<{
|
|
124
|
+
claim_key: "claim_key";
|
|
125
|
+
claim_label: "claim_label";
|
|
126
|
+
goal: "goal";
|
|
127
|
+
subject: "subject";
|
|
128
|
+
title: "title";
|
|
129
|
+
}>;
|
|
130
|
+
scoreBand: z.ZodEnum<{
|
|
131
|
+
exact: "exact";
|
|
132
|
+
related: "related";
|
|
133
|
+
strong: "strong";
|
|
134
|
+
}>;
|
|
135
|
+
claimId: z.ZodNullable<z.ZodString>;
|
|
136
|
+
}, z.core.$strict>>;
|
|
137
|
+
possibleOverlap: z.ZodBoolean;
|
|
138
|
+
advisoryOnly: z.ZodLiteral<true>;
|
|
139
|
+
noAdditionalAccess: z.ZodLiteral<true>;
|
|
140
|
+
}, z.core.$strict>;
|
|
141
|
+
createdAt: z.ZodString;
|
|
142
|
+
updatedAt: z.ZodString;
|
|
143
|
+
}, z.core.$strip>;
|
|
144
|
+
export type AgentTopologySession = z.infer<typeof AgentTopologySession>;
|
|
145
|
+
export declare const AgentTopologyPageResponse: z.ZodObject<{
|
|
146
|
+
sessions: z.ZodArray<z.ZodObject<{
|
|
147
|
+
id: z.ZodString;
|
|
148
|
+
title: z.ZodNullable<z.ZodString>;
|
|
149
|
+
titleTruncated: z.ZodBoolean;
|
|
150
|
+
parentSessionId: z.ZodNullable<z.ZodString>;
|
|
151
|
+
rootSessionId: z.ZodString;
|
|
152
|
+
nestedAgentDepth: z.ZodNumber;
|
|
153
|
+
ancestorPath: z.ZodArray<z.ZodObject<{
|
|
154
|
+
id: z.ZodString;
|
|
155
|
+
title: z.ZodNullable<z.ZodString>;
|
|
156
|
+
titleTruncated: z.ZodBoolean;
|
|
157
|
+
}, z.core.$strip>>;
|
|
158
|
+
status: z.ZodEnum<{
|
|
159
|
+
cancelled: "cancelled";
|
|
160
|
+
failed: "failed";
|
|
161
|
+
idle: "idle";
|
|
162
|
+
queued: "queued";
|
|
163
|
+
recovering: "recovering";
|
|
164
|
+
requires_action: "requires_action";
|
|
165
|
+
running: "running";
|
|
166
|
+
waiting_capacity: "waiting_capacity";
|
|
167
|
+
}>;
|
|
168
|
+
goal: z.ZodNullable<z.ZodObject<{
|
|
169
|
+
status: z.ZodEnum<{
|
|
170
|
+
active: "active";
|
|
171
|
+
completed: "completed";
|
|
172
|
+
paused: "paused";
|
|
173
|
+
}>;
|
|
174
|
+
summary: z.ZodString;
|
|
175
|
+
summaryTruncated: z.ZodBoolean;
|
|
176
|
+
}, z.core.$strip>>;
|
|
177
|
+
pause: z.ZodObject<{
|
|
178
|
+
state: z.ZodEnum<{
|
|
179
|
+
active: "active";
|
|
180
|
+
paused: "paused";
|
|
181
|
+
}>;
|
|
182
|
+
additionalBlockerCount: z.ZodNumber;
|
|
183
|
+
source: z.ZodNullable<z.ZodObject<{
|
|
184
|
+
kind: z.ZodEnum<{
|
|
185
|
+
session: "session";
|
|
186
|
+
workspace: "workspace";
|
|
187
|
+
}>;
|
|
188
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
189
|
+
displayName: z.ZodString;
|
|
190
|
+
displayNameTruncated: z.ZodBoolean;
|
|
191
|
+
}, z.core.$strip>>;
|
|
192
|
+
}, z.core.$strip>;
|
|
193
|
+
children: z.ZodObject<{
|
|
194
|
+
directChildren: z.ZodNumber;
|
|
195
|
+
totalDescendants: z.ZodNumber;
|
|
196
|
+
runningDescendants: z.ZodNumber;
|
|
197
|
+
queuedDescendants: z.ZodNumber;
|
|
198
|
+
attentionDescendants: z.ZodNumber;
|
|
199
|
+
pausedDescendants: z.ZodNumber;
|
|
200
|
+
failedDescendants: z.ZodNumber;
|
|
201
|
+
truncated: z.ZodBoolean;
|
|
202
|
+
}, z.core.$strip>;
|
|
203
|
+
relatedWork: z.ZodObject<{
|
|
204
|
+
claims: z.ZodArray<z.ZodObject<{
|
|
205
|
+
id: z.ZodString;
|
|
206
|
+
sessionId: z.ZodString;
|
|
207
|
+
subject: z.ZodObject<{
|
|
208
|
+
namespace: z.ZodString;
|
|
209
|
+
type: z.ZodEnum<{
|
|
210
|
+
artifact: "artifact";
|
|
211
|
+
branch: "branch";
|
|
212
|
+
ci_run: "ci_run";
|
|
213
|
+
issue: "issue";
|
|
214
|
+
other: "other";
|
|
215
|
+
pull_request: "pull_request";
|
|
216
|
+
release: "release";
|
|
217
|
+
repository: "repository";
|
|
218
|
+
}>;
|
|
219
|
+
canonicalKey: z.ZodString;
|
|
220
|
+
displayLabel: z.ZodNullable<z.ZodString>;
|
|
221
|
+
}, z.core.$strip>;
|
|
222
|
+
role: z.ZodEnum<{
|
|
223
|
+
delivering: "delivering";
|
|
224
|
+
monitoring: "monitoring";
|
|
225
|
+
reviewing: "reviewing";
|
|
226
|
+
working: "working";
|
|
227
|
+
}>;
|
|
228
|
+
state: z.ZodEnum<{
|
|
229
|
+
active: "active";
|
|
230
|
+
released: "released";
|
|
231
|
+
stale: "stale";
|
|
232
|
+
superseded: "superseded";
|
|
233
|
+
}>;
|
|
234
|
+
revision: z.ZodNumber;
|
|
235
|
+
provenance: z.ZodEnum<{
|
|
236
|
+
explicit_agent: "explicit_agent";
|
|
237
|
+
session_resource: "session_resource";
|
|
238
|
+
system_lifecycle: "system_lifecycle";
|
|
239
|
+
trusted_integration: "trusted_integration";
|
|
240
|
+
user_api: "user_api";
|
|
241
|
+
}>;
|
|
242
|
+
version: z.ZodNullable<z.ZodObject<{
|
|
243
|
+
kind: z.ZodEnum<{
|
|
244
|
+
artifact_version: "artifact_version";
|
|
245
|
+
branch_head: "branch_head";
|
|
246
|
+
ci_run: "ci_run";
|
|
247
|
+
git_commit: "git_commit";
|
|
248
|
+
other: "other";
|
|
249
|
+
pull_request_head: "pull_request_head";
|
|
250
|
+
release_version: "release_version";
|
|
251
|
+
}>;
|
|
252
|
+
value: z.ZodString;
|
|
253
|
+
}, z.core.$strip>>;
|
|
254
|
+
observedAt: z.ZodString;
|
|
255
|
+
updatedAt: z.ZodString;
|
|
256
|
+
settledAt: z.ZodNullable<z.ZodString>;
|
|
257
|
+
}, z.core.$strip>>;
|
|
258
|
+
claimsTruncated: z.ZodBoolean;
|
|
259
|
+
match: z.ZodNullable<z.ZodObject<{
|
|
260
|
+
class: z.ZodEnum<{
|
|
261
|
+
exact_subject: "exact_subject";
|
|
262
|
+
fuzzy: "fuzzy";
|
|
263
|
+
goal: "goal";
|
|
264
|
+
title: "title";
|
|
265
|
+
}>;
|
|
266
|
+
field: z.ZodEnum<{
|
|
267
|
+
claim_key: "claim_key";
|
|
268
|
+
claim_label: "claim_label";
|
|
269
|
+
goal: "goal";
|
|
270
|
+
subject: "subject";
|
|
271
|
+
title: "title";
|
|
272
|
+
}>;
|
|
273
|
+
scoreBand: z.ZodEnum<{
|
|
274
|
+
exact: "exact";
|
|
275
|
+
related: "related";
|
|
276
|
+
strong: "strong";
|
|
277
|
+
}>;
|
|
278
|
+
claimId: z.ZodNullable<z.ZodString>;
|
|
279
|
+
}, z.core.$strict>>;
|
|
280
|
+
possibleOverlap: z.ZodBoolean;
|
|
281
|
+
advisoryOnly: z.ZodLiteral<true>;
|
|
282
|
+
noAdditionalAccess: z.ZodLiteral<true>;
|
|
283
|
+
}, z.core.$strict>;
|
|
284
|
+
createdAt: z.ZodString;
|
|
285
|
+
updatedAt: z.ZodString;
|
|
286
|
+
}, z.core.$strip>>;
|
|
287
|
+
total: z.ZodNumber;
|
|
288
|
+
hasMore: z.ZodBoolean;
|
|
289
|
+
humanAdvisoriesEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
290
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
291
|
+
}, z.core.$strip>;
|
|
292
|
+
export type AgentTopologyPageResponse = z.infer<typeof AgentTopologyPageResponse>;
|
package/dist/atlassian.js
CHANGED
|
@@ -17,24 +17,25 @@ import {
|
|
|
17
17
|
AtlassianSyncCadence,
|
|
18
18
|
SaveAtlassianSourcesRequest,
|
|
19
19
|
atlassianScopesAllowRead
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ILB4IYNN.js";
|
|
21
|
+
import "./chunk-WYBDERIY.js";
|
|
21
22
|
import "./chunk-MRWYRAS5.js";
|
|
23
|
+
import "./chunk-CM6BMECR.js";
|
|
22
24
|
import "./chunk-JUFK3T4Q.js";
|
|
23
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-YBW5JSA3.js";
|
|
24
26
|
import "./chunk-N6GRVXAJ.js";
|
|
25
27
|
import "./chunk-3SIZGL3O.js";
|
|
26
28
|
import "./chunk-NVJMJWLL.js";
|
|
29
|
+
import "./chunk-YRKRZ6OF.js";
|
|
27
30
|
import "./chunk-7RMTKFJW.js";
|
|
28
31
|
import "./chunk-Y3KNXVTD.js";
|
|
29
32
|
import "./chunk-RIY7GYQS.js";
|
|
30
|
-
import "./chunk-YRKRZ6OF.js";
|
|
31
|
-
import "./chunk-CM6BMECR.js";
|
|
32
33
|
import "./chunk-D2HKF2EF.js";
|
|
33
34
|
import "./chunk-MYBZRDTY.js";
|
|
34
35
|
import "./chunk-TXTQIYCV.js";
|
|
35
36
|
import "./chunk-PX3VCKAU.js";
|
|
37
|
+
import "./chunk-BCS7WHCK.js";
|
|
36
38
|
import "./chunk-M5ZGRVIQ.js";
|
|
37
|
-
import "./chunk-YBW5JSA3.js";
|
|
38
39
|
export {
|
|
39
40
|
ATLASSIAN_CREDENTIAL_LABEL,
|
|
40
41
|
ATLASSIAN_CREDENTIAL_ROLE,
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
// src/organization-recovery.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
var Uuid = z.string().uuid();
|
|
4
|
+
var Timestamp = z.string().datetime({ offset: true });
|
|
5
|
+
var OrganizationRecoveryPolicyState = z.enum([
|
|
6
|
+
"pending_acceptance",
|
|
7
|
+
"active",
|
|
8
|
+
"degraded",
|
|
9
|
+
"superseded",
|
|
10
|
+
"disabled"
|
|
11
|
+
]);
|
|
12
|
+
var OrganizationRecoveryOperationState = z.enum([
|
|
13
|
+
"collecting",
|
|
14
|
+
"cooling",
|
|
15
|
+
"executed",
|
|
16
|
+
"cancelled",
|
|
17
|
+
"expired",
|
|
18
|
+
"superseded"
|
|
19
|
+
]);
|
|
20
|
+
var OrganizationRecoveryUnavailableReason = z.enum([
|
|
21
|
+
"no_policy",
|
|
22
|
+
"pending_acceptance",
|
|
23
|
+
"degraded",
|
|
24
|
+
"disabled",
|
|
25
|
+
"identity_unavailable"
|
|
26
|
+
]);
|
|
27
|
+
var OrganizationRecoveryMemberSummary = z.object({
|
|
28
|
+
membershipId: Uuid,
|
|
29
|
+
name: z.string().trim().min(1).max(1024).nullable(),
|
|
30
|
+
email: z.string().email().max(320).nullable()
|
|
31
|
+
}).strict();
|
|
32
|
+
var OrganizationRecoveryCustodian = OrganizationRecoveryMemberSummary.extend({
|
|
33
|
+
ordinal: z.number().int().min(1).max(3),
|
|
34
|
+
enrollmentState: z.enum(["pending_acceptance", "accepted", "ineligible"]),
|
|
35
|
+
acceptedAt: Timestamp.nullable()
|
|
36
|
+
}).strict();
|
|
37
|
+
var OrganizationRecoveryPolicy = z.object({
|
|
38
|
+
id: Uuid,
|
|
39
|
+
organizationId: Uuid,
|
|
40
|
+
revision: z.number().int().positive(),
|
|
41
|
+
state: OrganizationRecoveryPolicyState,
|
|
42
|
+
custodians: z.array(OrganizationRecoveryCustodian).length(3),
|
|
43
|
+
createdAt: Timestamp,
|
|
44
|
+
updatedAt: Timestamp
|
|
45
|
+
}).strict();
|
|
46
|
+
var OrganizationRecoveryApproval = OrganizationRecoveryMemberSummary.extend({
|
|
47
|
+
approvedAt: Timestamp
|
|
48
|
+
}).strict();
|
|
49
|
+
var OrganizationRecoveryOperation = z.object({
|
|
50
|
+
id: Uuid,
|
|
51
|
+
organizationId: Uuid,
|
|
52
|
+
policyId: Uuid,
|
|
53
|
+
policyRevision: z.number().int().positive(),
|
|
54
|
+
revision: z.number().int().positive(),
|
|
55
|
+
state: OrganizationRecoveryOperationState,
|
|
56
|
+
target: OrganizationRecoveryMemberSummary,
|
|
57
|
+
approvals: z.array(OrganizationRecoveryApproval).max(3),
|
|
58
|
+
approvalCount: z.number().int().min(0).max(3),
|
|
59
|
+
quorumAt: Timestamp.nullable(),
|
|
60
|
+
executableAt: Timestamp.nullable(),
|
|
61
|
+
expiresAt: Timestamp,
|
|
62
|
+
executedAt: Timestamp.nullable(),
|
|
63
|
+
cancelledAt: Timestamp.nullable(),
|
|
64
|
+
notificationJournaled: z.boolean(),
|
|
65
|
+
createdAt: Timestamp,
|
|
66
|
+
updatedAt: Timestamp
|
|
67
|
+
}).strict();
|
|
68
|
+
var OrganizationRecoveryCapabilities = z.object({
|
|
69
|
+
configure: z.boolean(),
|
|
70
|
+
accept: z.boolean(),
|
|
71
|
+
disable: z.boolean(),
|
|
72
|
+
start: z.boolean(),
|
|
73
|
+
approve: z.boolean(),
|
|
74
|
+
cancel: z.boolean(),
|
|
75
|
+
execute: z.boolean()
|
|
76
|
+
}).strict();
|
|
77
|
+
var OrganizationRecoveryOverview = z.object({
|
|
78
|
+
organizationId: Uuid,
|
|
79
|
+
availability: z.enum(["available", "recovery_unavailable"]),
|
|
80
|
+
unavailableReason: OrganizationRecoveryUnavailableReason.nullable(),
|
|
81
|
+
recentReauthenticationAt: Timestamp.nullable(),
|
|
82
|
+
eligibleMembers: z.array(OrganizationRecoveryMemberSummary).max(1e3),
|
|
83
|
+
policy: OrganizationRecoveryPolicy.nullable(),
|
|
84
|
+
operation: OrganizationRecoveryOperation.nullable(),
|
|
85
|
+
capabilities: OrganizationRecoveryCapabilities
|
|
86
|
+
}).strict();
|
|
87
|
+
var ExpectedPolicyRevision = z.number().int().nonnegative();
|
|
88
|
+
var ExpectedOperationRevision = z.number().int().positive();
|
|
89
|
+
var CommandOperationId = Uuid;
|
|
90
|
+
var ConfigureOrganizationRecoveryPolicyRequest = z.object({
|
|
91
|
+
custodianMembershipIds: z.tuple([Uuid, Uuid, Uuid]).superRefine((ids, context) => {
|
|
92
|
+
if (new Set(ids).size !== 3) {
|
|
93
|
+
context.addIssue({
|
|
94
|
+
code: "custom",
|
|
95
|
+
message: "recovery custodians must be three distinct memberships"
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}),
|
|
99
|
+
expectedPolicyRevision: ExpectedPolicyRevision,
|
|
100
|
+
operationId: CommandOperationId
|
|
101
|
+
}).strict();
|
|
102
|
+
var AcceptOrganizationRecoveryCustodyRequest = z.object({
|
|
103
|
+
expectedPolicyRevision: ExpectedPolicyRevision,
|
|
104
|
+
operationId: CommandOperationId
|
|
105
|
+
}).strict();
|
|
106
|
+
var DisableOrganizationRecoveryPolicyRequest = AcceptOrganizationRecoveryCustodyRequest;
|
|
107
|
+
var StartOrganizationRecoveryOperationRequest = z.object({
|
|
108
|
+
targetMembershipId: Uuid,
|
|
109
|
+
expectedPolicyRevision: z.number().int().positive(),
|
|
110
|
+
operationId: CommandOperationId
|
|
111
|
+
}).strict();
|
|
112
|
+
var OrganizationRecoveryOperationCommandRequest = z.object({
|
|
113
|
+
expectedOperationRevision: ExpectedOperationRevision,
|
|
114
|
+
operationId: CommandOperationId
|
|
115
|
+
}).strict();
|
|
116
|
+
var OrganizationRecoveryMutationResponse = z.object({
|
|
117
|
+
replay: z.boolean(),
|
|
118
|
+
overview: OrganizationRecoveryOverview
|
|
119
|
+
}).strict();
|
|
120
|
+
|
|
121
|
+
export {
|
|
122
|
+
OrganizationRecoveryPolicyState,
|
|
123
|
+
OrganizationRecoveryOperationState,
|
|
124
|
+
OrganizationRecoveryUnavailableReason,
|
|
125
|
+
OrganizationRecoveryMemberSummary,
|
|
126
|
+
OrganizationRecoveryCustodian,
|
|
127
|
+
OrganizationRecoveryPolicy,
|
|
128
|
+
OrganizationRecoveryApproval,
|
|
129
|
+
OrganizationRecoveryOperation,
|
|
130
|
+
OrganizationRecoveryCapabilities,
|
|
131
|
+
OrganizationRecoveryOverview,
|
|
132
|
+
ConfigureOrganizationRecoveryPolicyRequest,
|
|
133
|
+
AcceptOrganizationRecoveryCustodyRequest,
|
|
134
|
+
DisableOrganizationRecoveryPolicyRequest,
|
|
135
|
+
StartOrganizationRecoveryOperationRequest,
|
|
136
|
+
OrganizationRecoveryOperationCommandRequest,
|
|
137
|
+
OrganizationRecoveryMutationResponse
|
|
138
|
+
};
|
|
139
|
+
//# sourceMappingURL=chunk-BCS7WHCK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/organization-recovery.ts"],"sourcesContent":["import { z } from \"zod\";\n\nconst Uuid = z.string().uuid();\nconst Timestamp = z.string().datetime({ offset: true });\n\nexport const OrganizationRecoveryPolicyState = z.enum([\n \"pending_acceptance\",\n \"active\",\n \"degraded\",\n \"superseded\",\n \"disabled\",\n]);\nexport type OrganizationRecoveryPolicyState = z.infer<typeof OrganizationRecoveryPolicyState>;\n\nexport const OrganizationRecoveryOperationState = z.enum([\n \"collecting\",\n \"cooling\",\n \"executed\",\n \"cancelled\",\n \"expired\",\n \"superseded\",\n]);\nexport type OrganizationRecoveryOperationState = z.infer<typeof OrganizationRecoveryOperationState>;\n\nexport const OrganizationRecoveryUnavailableReason = z.enum([\n \"no_policy\",\n \"pending_acceptance\",\n \"degraded\",\n \"disabled\",\n \"identity_unavailable\",\n]);\nexport type OrganizationRecoveryUnavailableReason = z.infer<\n typeof OrganizationRecoveryUnavailableReason\n>;\n\nexport const OrganizationRecoveryMemberSummary = z\n .object({\n membershipId: Uuid,\n name: z.string().trim().min(1).max(1024).nullable(),\n email: z.string().email().max(320).nullable(),\n })\n .strict();\nexport type OrganizationRecoveryMemberSummary = z.infer<typeof OrganizationRecoveryMemberSummary>;\n\nexport const OrganizationRecoveryCustodian = OrganizationRecoveryMemberSummary.extend({\n ordinal: z.number().int().min(1).max(3),\n enrollmentState: z.enum([\"pending_acceptance\", \"accepted\", \"ineligible\"]),\n acceptedAt: Timestamp.nullable(),\n}).strict();\nexport type OrganizationRecoveryCustodian = z.infer<typeof OrganizationRecoveryCustodian>;\n\nexport const OrganizationRecoveryPolicy = z\n .object({\n id: Uuid,\n organizationId: Uuid,\n revision: z.number().int().positive(),\n state: OrganizationRecoveryPolicyState,\n custodians: z.array(OrganizationRecoveryCustodian).length(3),\n createdAt: Timestamp,\n updatedAt: Timestamp,\n })\n .strict();\nexport type OrganizationRecoveryPolicy = z.infer<typeof OrganizationRecoveryPolicy>;\n\nexport const OrganizationRecoveryApproval = OrganizationRecoveryMemberSummary.extend({\n approvedAt: Timestamp,\n}).strict();\nexport type OrganizationRecoveryApproval = z.infer<typeof OrganizationRecoveryApproval>;\n\nexport const OrganizationRecoveryOperation = z\n .object({\n id: Uuid,\n organizationId: Uuid,\n policyId: Uuid,\n policyRevision: z.number().int().positive(),\n revision: z.number().int().positive(),\n state: OrganizationRecoveryOperationState,\n target: OrganizationRecoveryMemberSummary,\n approvals: z.array(OrganizationRecoveryApproval).max(3),\n approvalCount: z.number().int().min(0).max(3),\n quorumAt: Timestamp.nullable(),\n executableAt: Timestamp.nullable(),\n expiresAt: Timestamp,\n executedAt: Timestamp.nullable(),\n cancelledAt: Timestamp.nullable(),\n notificationJournaled: z.boolean(),\n createdAt: Timestamp,\n updatedAt: Timestamp,\n })\n .strict();\nexport type OrganizationRecoveryOperation = z.infer<typeof OrganizationRecoveryOperation>;\n\nexport const OrganizationRecoveryCapabilities = z\n .object({\n configure: z.boolean(),\n accept: z.boolean(),\n disable: z.boolean(),\n start: z.boolean(),\n approve: z.boolean(),\n cancel: z.boolean(),\n execute: z.boolean(),\n })\n .strict();\nexport type OrganizationRecoveryCapabilities = z.infer<typeof OrganizationRecoveryCapabilities>;\n\nexport const OrganizationRecoveryOverview = z\n .object({\n organizationId: Uuid,\n availability: z.enum([\"available\", \"recovery_unavailable\"]),\n unavailableReason: OrganizationRecoveryUnavailableReason.nullable(),\n recentReauthenticationAt: Timestamp.nullable(),\n eligibleMembers: z.array(OrganizationRecoveryMemberSummary).max(1000),\n policy: OrganizationRecoveryPolicy.nullable(),\n operation: OrganizationRecoveryOperation.nullable(),\n capabilities: OrganizationRecoveryCapabilities,\n })\n .strict();\nexport type OrganizationRecoveryOverview = z.infer<typeof OrganizationRecoveryOverview>;\n\nconst ExpectedPolicyRevision = z.number().int().nonnegative();\nconst ExpectedOperationRevision = z.number().int().positive();\nconst CommandOperationId = Uuid;\n\nexport const ConfigureOrganizationRecoveryPolicyRequest = z\n .object({\n custodianMembershipIds: z.tuple([Uuid, Uuid, Uuid]).superRefine((ids, context) => {\n if (new Set(ids).size !== 3) {\n context.addIssue({\n code: \"custom\",\n message: \"recovery custodians must be three distinct memberships\",\n });\n }\n }),\n expectedPolicyRevision: ExpectedPolicyRevision,\n operationId: CommandOperationId,\n })\n .strict();\nexport type ConfigureOrganizationRecoveryPolicyRequest = z.infer<\n typeof ConfigureOrganizationRecoveryPolicyRequest\n>;\n\nexport const AcceptOrganizationRecoveryCustodyRequest = z\n .object({\n expectedPolicyRevision: ExpectedPolicyRevision,\n operationId: CommandOperationId,\n })\n .strict();\nexport type AcceptOrganizationRecoveryCustodyRequest = z.infer<\n typeof AcceptOrganizationRecoveryCustodyRequest\n>;\n\nexport const DisableOrganizationRecoveryPolicyRequest = AcceptOrganizationRecoveryCustodyRequest;\nexport type DisableOrganizationRecoveryPolicyRequest = z.infer<\n typeof DisableOrganizationRecoveryPolicyRequest\n>;\n\nexport const StartOrganizationRecoveryOperationRequest = z\n .object({\n targetMembershipId: Uuid,\n expectedPolicyRevision: z.number().int().positive(),\n operationId: CommandOperationId,\n })\n .strict();\nexport type StartOrganizationRecoveryOperationRequest = z.infer<\n typeof StartOrganizationRecoveryOperationRequest\n>;\n\nexport const OrganizationRecoveryOperationCommandRequest = z\n .object({\n expectedOperationRevision: ExpectedOperationRevision,\n operationId: CommandOperationId,\n })\n .strict();\nexport type OrganizationRecoveryOperationCommandRequest = z.infer<\n typeof OrganizationRecoveryOperationCommandRequest\n>;\n\nexport const OrganizationRecoveryMutationResponse = z\n .object({\n replay: z.boolean(),\n overview: OrganizationRecoveryOverview,\n })\n .strict();\nexport type OrganizationRecoveryMutationResponse = z.infer<\n typeof OrganizationRecoveryMutationResponse\n>;\n"],"mappings":";AAAA,SAAS,SAAS;AAElB,IAAM,OAAO,EAAE,OAAO,EAAE,KAAK;AAC7B,IAAM,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,KAAK,CAAC;AAE/C,IAAM,kCAAkC,EAAE,KAAK;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAGM,IAAM,qCAAqC,EAAE,KAAK;AAAA,EACvD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAGM,IAAM,wCAAwC,EAAE,KAAK;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAKM,IAAM,oCAAoC,EAC9C,OAAO;AAAA,EACN,cAAc;AAAA,EACd,MAAM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