@opengeni/contracts 2.5.0-canary.2 → 2.6.0-canary.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.
@@ -0,0 +1,337 @@
1
+ import { z } from "zod";
2
+ export declare const OrganizationRecoveryPolicyState: z.ZodEnum<{
3
+ active: "active";
4
+ degraded: "degraded";
5
+ disabled: "disabled";
6
+ pending_acceptance: "pending_acceptance";
7
+ superseded: "superseded";
8
+ }>;
9
+ export type OrganizationRecoveryPolicyState = z.infer<typeof OrganizationRecoveryPolicyState>;
10
+ export declare const OrganizationRecoveryOperationState: z.ZodEnum<{
11
+ cancelled: "cancelled";
12
+ collecting: "collecting";
13
+ cooling: "cooling";
14
+ executed: "executed";
15
+ expired: "expired";
16
+ superseded: "superseded";
17
+ }>;
18
+ export type OrganizationRecoveryOperationState = z.infer<typeof OrganizationRecoveryOperationState>;
19
+ export declare const OrganizationRecoveryUnavailableReason: z.ZodEnum<{
20
+ degraded: "degraded";
21
+ disabled: "disabled";
22
+ identity_unavailable: "identity_unavailable";
23
+ no_policy: "no_policy";
24
+ pending_acceptance: "pending_acceptance";
25
+ }>;
26
+ export type OrganizationRecoveryUnavailableReason = z.infer<typeof OrganizationRecoveryUnavailableReason>;
27
+ export declare const OrganizationRecoveryMemberSummary: z.ZodObject<{
28
+ membershipId: z.ZodString;
29
+ name: z.ZodNullable<z.ZodString>;
30
+ email: z.ZodNullable<z.ZodString>;
31
+ }, z.core.$strict>;
32
+ export type OrganizationRecoveryMemberSummary = z.infer<typeof OrganizationRecoveryMemberSummary>;
33
+ export declare const OrganizationRecoveryCustodian: z.ZodObject<{
34
+ membershipId: z.ZodString;
35
+ name: z.ZodNullable<z.ZodString>;
36
+ email: z.ZodNullable<z.ZodString>;
37
+ ordinal: z.ZodNumber;
38
+ enrollmentState: z.ZodEnum<{
39
+ accepted: "accepted";
40
+ ineligible: "ineligible";
41
+ pending_acceptance: "pending_acceptance";
42
+ }>;
43
+ acceptedAt: z.ZodNullable<z.ZodString>;
44
+ }, z.core.$strict>;
45
+ export type OrganizationRecoveryCustodian = z.infer<typeof OrganizationRecoveryCustodian>;
46
+ export declare const OrganizationRecoveryPolicy: z.ZodObject<{
47
+ id: z.ZodString;
48
+ organizationId: z.ZodString;
49
+ revision: z.ZodNumber;
50
+ state: z.ZodEnum<{
51
+ active: "active";
52
+ degraded: "degraded";
53
+ disabled: "disabled";
54
+ pending_acceptance: "pending_acceptance";
55
+ superseded: "superseded";
56
+ }>;
57
+ custodians: z.ZodArray<z.ZodObject<{
58
+ membershipId: z.ZodString;
59
+ name: z.ZodNullable<z.ZodString>;
60
+ email: z.ZodNullable<z.ZodString>;
61
+ ordinal: z.ZodNumber;
62
+ enrollmentState: z.ZodEnum<{
63
+ accepted: "accepted";
64
+ ineligible: "ineligible";
65
+ pending_acceptance: "pending_acceptance";
66
+ }>;
67
+ acceptedAt: z.ZodNullable<z.ZodString>;
68
+ }, z.core.$strict>>;
69
+ createdAt: z.ZodString;
70
+ updatedAt: z.ZodString;
71
+ }, z.core.$strict>;
72
+ export type OrganizationRecoveryPolicy = z.infer<typeof OrganizationRecoveryPolicy>;
73
+ export declare const OrganizationRecoveryApproval: z.ZodObject<{
74
+ membershipId: z.ZodString;
75
+ name: z.ZodNullable<z.ZodString>;
76
+ email: z.ZodNullable<z.ZodString>;
77
+ approvedAt: z.ZodString;
78
+ }, z.core.$strict>;
79
+ export type OrganizationRecoveryApproval = z.infer<typeof OrganizationRecoveryApproval>;
80
+ export declare const OrganizationRecoveryOperation: z.ZodObject<{
81
+ id: z.ZodString;
82
+ organizationId: z.ZodString;
83
+ policyId: z.ZodString;
84
+ policyRevision: z.ZodNumber;
85
+ revision: z.ZodNumber;
86
+ state: z.ZodEnum<{
87
+ cancelled: "cancelled";
88
+ collecting: "collecting";
89
+ cooling: "cooling";
90
+ executed: "executed";
91
+ expired: "expired";
92
+ superseded: "superseded";
93
+ }>;
94
+ target: z.ZodObject<{
95
+ membershipId: z.ZodString;
96
+ name: z.ZodNullable<z.ZodString>;
97
+ email: z.ZodNullable<z.ZodString>;
98
+ }, z.core.$strict>;
99
+ approvals: z.ZodArray<z.ZodObject<{
100
+ membershipId: z.ZodString;
101
+ name: z.ZodNullable<z.ZodString>;
102
+ email: z.ZodNullable<z.ZodString>;
103
+ approvedAt: z.ZodString;
104
+ }, z.core.$strict>>;
105
+ approvalCount: z.ZodNumber;
106
+ quorumAt: z.ZodNullable<z.ZodString>;
107
+ executableAt: z.ZodNullable<z.ZodString>;
108
+ expiresAt: z.ZodString;
109
+ executedAt: z.ZodNullable<z.ZodString>;
110
+ cancelledAt: z.ZodNullable<z.ZodString>;
111
+ notificationJournaled: z.ZodBoolean;
112
+ createdAt: z.ZodString;
113
+ updatedAt: z.ZodString;
114
+ }, z.core.$strict>;
115
+ export type OrganizationRecoveryOperation = z.infer<typeof OrganizationRecoveryOperation>;
116
+ export declare const OrganizationRecoveryCapabilities: z.ZodObject<{
117
+ configure: z.ZodBoolean;
118
+ accept: z.ZodBoolean;
119
+ disable: z.ZodBoolean;
120
+ start: z.ZodBoolean;
121
+ approve: z.ZodBoolean;
122
+ cancel: z.ZodBoolean;
123
+ execute: z.ZodBoolean;
124
+ }, z.core.$strict>;
125
+ export type OrganizationRecoveryCapabilities = z.infer<typeof OrganizationRecoveryCapabilities>;
126
+ export declare const OrganizationRecoveryOverview: z.ZodObject<{
127
+ organizationId: z.ZodString;
128
+ availability: z.ZodEnum<{
129
+ available: "available";
130
+ recovery_unavailable: "recovery_unavailable";
131
+ }>;
132
+ unavailableReason: z.ZodNullable<z.ZodEnum<{
133
+ degraded: "degraded";
134
+ disabled: "disabled";
135
+ identity_unavailable: "identity_unavailable";
136
+ no_policy: "no_policy";
137
+ pending_acceptance: "pending_acceptance";
138
+ }>>;
139
+ recentReauthenticationAt: z.ZodNullable<z.ZodString>;
140
+ eligibleMembers: z.ZodArray<z.ZodObject<{
141
+ membershipId: z.ZodString;
142
+ name: z.ZodNullable<z.ZodString>;
143
+ email: z.ZodNullable<z.ZodString>;
144
+ }, z.core.$strict>>;
145
+ policy: z.ZodNullable<z.ZodObject<{
146
+ id: z.ZodString;
147
+ organizationId: z.ZodString;
148
+ revision: z.ZodNumber;
149
+ state: z.ZodEnum<{
150
+ active: "active";
151
+ degraded: "degraded";
152
+ disabled: "disabled";
153
+ pending_acceptance: "pending_acceptance";
154
+ superseded: "superseded";
155
+ }>;
156
+ custodians: z.ZodArray<z.ZodObject<{
157
+ membershipId: z.ZodString;
158
+ name: z.ZodNullable<z.ZodString>;
159
+ email: z.ZodNullable<z.ZodString>;
160
+ ordinal: z.ZodNumber;
161
+ enrollmentState: z.ZodEnum<{
162
+ accepted: "accepted";
163
+ ineligible: "ineligible";
164
+ pending_acceptance: "pending_acceptance";
165
+ }>;
166
+ acceptedAt: z.ZodNullable<z.ZodString>;
167
+ }, z.core.$strict>>;
168
+ createdAt: z.ZodString;
169
+ updatedAt: z.ZodString;
170
+ }, z.core.$strict>>;
171
+ operation: z.ZodNullable<z.ZodObject<{
172
+ id: z.ZodString;
173
+ organizationId: z.ZodString;
174
+ policyId: z.ZodString;
175
+ policyRevision: z.ZodNumber;
176
+ revision: z.ZodNumber;
177
+ state: z.ZodEnum<{
178
+ cancelled: "cancelled";
179
+ collecting: "collecting";
180
+ cooling: "cooling";
181
+ executed: "executed";
182
+ expired: "expired";
183
+ superseded: "superseded";
184
+ }>;
185
+ target: z.ZodObject<{
186
+ membershipId: z.ZodString;
187
+ name: z.ZodNullable<z.ZodString>;
188
+ email: z.ZodNullable<z.ZodString>;
189
+ }, z.core.$strict>;
190
+ approvals: z.ZodArray<z.ZodObject<{
191
+ membershipId: z.ZodString;
192
+ name: z.ZodNullable<z.ZodString>;
193
+ email: z.ZodNullable<z.ZodString>;
194
+ approvedAt: z.ZodString;
195
+ }, z.core.$strict>>;
196
+ approvalCount: z.ZodNumber;
197
+ quorumAt: z.ZodNullable<z.ZodString>;
198
+ executableAt: z.ZodNullable<z.ZodString>;
199
+ expiresAt: z.ZodString;
200
+ executedAt: z.ZodNullable<z.ZodString>;
201
+ cancelledAt: z.ZodNullable<z.ZodString>;
202
+ notificationJournaled: z.ZodBoolean;
203
+ createdAt: z.ZodString;
204
+ updatedAt: z.ZodString;
205
+ }, z.core.$strict>>;
206
+ capabilities: z.ZodObject<{
207
+ configure: z.ZodBoolean;
208
+ accept: z.ZodBoolean;
209
+ disable: z.ZodBoolean;
210
+ start: z.ZodBoolean;
211
+ approve: z.ZodBoolean;
212
+ cancel: z.ZodBoolean;
213
+ execute: z.ZodBoolean;
214
+ }, z.core.$strict>;
215
+ }, z.core.$strict>;
216
+ export type OrganizationRecoveryOverview = z.infer<typeof OrganizationRecoveryOverview>;
217
+ export declare const ConfigureOrganizationRecoveryPolicyRequest: z.ZodObject<{
218
+ custodianMembershipIds: z.ZodTuple<[z.ZodString, z.ZodString, z.ZodString], null>;
219
+ expectedPolicyRevision: z.ZodNumber;
220
+ operationId: z.ZodString;
221
+ }, z.core.$strict>;
222
+ export type ConfigureOrganizationRecoveryPolicyRequest = z.infer<typeof ConfigureOrganizationRecoveryPolicyRequest>;
223
+ export declare const AcceptOrganizationRecoveryCustodyRequest: z.ZodObject<{
224
+ expectedPolicyRevision: z.ZodNumber;
225
+ operationId: z.ZodString;
226
+ }, z.core.$strict>;
227
+ export type AcceptOrganizationRecoveryCustodyRequest = z.infer<typeof AcceptOrganizationRecoveryCustodyRequest>;
228
+ export declare const DisableOrganizationRecoveryPolicyRequest: z.ZodObject<{
229
+ expectedPolicyRevision: z.ZodNumber;
230
+ operationId: z.ZodString;
231
+ }, z.core.$strict>;
232
+ export type DisableOrganizationRecoveryPolicyRequest = z.infer<typeof DisableOrganizationRecoveryPolicyRequest>;
233
+ export declare const StartOrganizationRecoveryOperationRequest: z.ZodObject<{
234
+ targetMembershipId: z.ZodString;
235
+ expectedPolicyRevision: z.ZodNumber;
236
+ operationId: z.ZodString;
237
+ }, z.core.$strict>;
238
+ export type StartOrganizationRecoveryOperationRequest = z.infer<typeof StartOrganizationRecoveryOperationRequest>;
239
+ export declare const OrganizationRecoveryOperationCommandRequest: z.ZodObject<{
240
+ expectedOperationRevision: z.ZodNumber;
241
+ operationId: z.ZodString;
242
+ }, z.core.$strict>;
243
+ export type OrganizationRecoveryOperationCommandRequest = z.infer<typeof OrganizationRecoveryOperationCommandRequest>;
244
+ export declare const OrganizationRecoveryMutationResponse: z.ZodObject<{
245
+ replay: z.ZodBoolean;
246
+ overview: z.ZodObject<{
247
+ organizationId: z.ZodString;
248
+ availability: z.ZodEnum<{
249
+ available: "available";
250
+ recovery_unavailable: "recovery_unavailable";
251
+ }>;
252
+ unavailableReason: z.ZodNullable<z.ZodEnum<{
253
+ degraded: "degraded";
254
+ disabled: "disabled";
255
+ identity_unavailable: "identity_unavailable";
256
+ no_policy: "no_policy";
257
+ pending_acceptance: "pending_acceptance";
258
+ }>>;
259
+ recentReauthenticationAt: z.ZodNullable<z.ZodString>;
260
+ eligibleMembers: z.ZodArray<z.ZodObject<{
261
+ membershipId: z.ZodString;
262
+ name: z.ZodNullable<z.ZodString>;
263
+ email: z.ZodNullable<z.ZodString>;
264
+ }, z.core.$strict>>;
265
+ policy: z.ZodNullable<z.ZodObject<{
266
+ id: z.ZodString;
267
+ organizationId: z.ZodString;
268
+ revision: z.ZodNumber;
269
+ state: z.ZodEnum<{
270
+ active: "active";
271
+ degraded: "degraded";
272
+ disabled: "disabled";
273
+ pending_acceptance: "pending_acceptance";
274
+ superseded: "superseded";
275
+ }>;
276
+ custodians: z.ZodArray<z.ZodObject<{
277
+ membershipId: z.ZodString;
278
+ name: z.ZodNullable<z.ZodString>;
279
+ email: z.ZodNullable<z.ZodString>;
280
+ ordinal: z.ZodNumber;
281
+ enrollmentState: z.ZodEnum<{
282
+ accepted: "accepted";
283
+ ineligible: "ineligible";
284
+ pending_acceptance: "pending_acceptance";
285
+ }>;
286
+ acceptedAt: z.ZodNullable<z.ZodString>;
287
+ }, z.core.$strict>>;
288
+ createdAt: z.ZodString;
289
+ updatedAt: z.ZodString;
290
+ }, z.core.$strict>>;
291
+ operation: z.ZodNullable<z.ZodObject<{
292
+ id: z.ZodString;
293
+ organizationId: z.ZodString;
294
+ policyId: z.ZodString;
295
+ policyRevision: z.ZodNumber;
296
+ revision: z.ZodNumber;
297
+ state: z.ZodEnum<{
298
+ cancelled: "cancelled";
299
+ collecting: "collecting";
300
+ cooling: "cooling";
301
+ executed: "executed";
302
+ expired: "expired";
303
+ superseded: "superseded";
304
+ }>;
305
+ target: z.ZodObject<{
306
+ membershipId: z.ZodString;
307
+ name: z.ZodNullable<z.ZodString>;
308
+ email: z.ZodNullable<z.ZodString>;
309
+ }, z.core.$strict>;
310
+ approvals: z.ZodArray<z.ZodObject<{
311
+ membershipId: z.ZodString;
312
+ name: z.ZodNullable<z.ZodString>;
313
+ email: z.ZodNullable<z.ZodString>;
314
+ approvedAt: z.ZodString;
315
+ }, z.core.$strict>>;
316
+ approvalCount: z.ZodNumber;
317
+ quorumAt: z.ZodNullable<z.ZodString>;
318
+ executableAt: z.ZodNullable<z.ZodString>;
319
+ expiresAt: z.ZodString;
320
+ executedAt: z.ZodNullable<z.ZodString>;
321
+ cancelledAt: z.ZodNullable<z.ZodString>;
322
+ notificationJournaled: z.ZodBoolean;
323
+ createdAt: z.ZodString;
324
+ updatedAt: z.ZodString;
325
+ }, z.core.$strict>>;
326
+ capabilities: z.ZodObject<{
327
+ configure: z.ZodBoolean;
328
+ accept: z.ZodBoolean;
329
+ disable: z.ZodBoolean;
330
+ start: z.ZodBoolean;
331
+ approve: z.ZodBoolean;
332
+ cancel: z.ZodBoolean;
333
+ execute: z.ZodBoolean;
334
+ }, z.core.$strict>;
335
+ }, z.core.$strict>;
336
+ }, z.core.$strict>;
337
+ export type OrganizationRecoveryMutationResponse = z.infer<typeof OrganizationRecoveryMutationResponse>;
@@ -0,0 +1,37 @@
1
+ import {
2
+ AcceptOrganizationRecoveryCustodyRequest,
3
+ ConfigureOrganizationRecoveryPolicyRequest,
4
+ DisableOrganizationRecoveryPolicyRequest,
5
+ OrganizationRecoveryApproval,
6
+ OrganizationRecoveryCapabilities,
7
+ OrganizationRecoveryCustodian,
8
+ OrganizationRecoveryMemberSummary,
9
+ OrganizationRecoveryMutationResponse,
10
+ OrganizationRecoveryOperation,
11
+ OrganizationRecoveryOperationCommandRequest,
12
+ OrganizationRecoveryOperationState,
13
+ OrganizationRecoveryOverview,
14
+ OrganizationRecoveryPolicy,
15
+ OrganizationRecoveryPolicyState,
16
+ OrganizationRecoveryUnavailableReason,
17
+ StartOrganizationRecoveryOperationRequest
18
+ } from "./chunk-BCS7WHCK.js";
19
+ export {
20
+ AcceptOrganizationRecoveryCustodyRequest,
21
+ ConfigureOrganizationRecoveryPolicyRequest,
22
+ DisableOrganizationRecoveryPolicyRequest,
23
+ OrganizationRecoveryApproval,
24
+ OrganizationRecoveryCapabilities,
25
+ OrganizationRecoveryCustodian,
26
+ OrganizationRecoveryMemberSummary,
27
+ OrganizationRecoveryMutationResponse,
28
+ OrganizationRecoveryOperation,
29
+ OrganizationRecoveryOperationCommandRequest,
30
+ OrganizationRecoveryOperationState,
31
+ OrganizationRecoveryOverview,
32
+ OrganizationRecoveryPolicy,
33
+ OrganizationRecoveryPolicyState,
34
+ OrganizationRecoveryUnavailableReason,
35
+ StartOrganizationRecoveryOperationRequest
36
+ };
37
+ //# sourceMappingURL=organization-recovery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,23 +1,24 @@
1
1
  import {
2
2
  ConnectionMetadata
3
- } from "./chunk-4I7DWNRR.js";
3
+ } from "./chunk-MJ3K6ICH.js";
4
+ import "./chunk-WYBDERIY.js";
4
5
  import "./chunk-MRWYRAS5.js";
6
+ import "./chunk-CM6BMECR.js";
5
7
  import "./chunk-JUFK3T4Q.js";
6
- import "./chunk-WYBDERIY.js";
8
+ import "./chunk-YBW5JSA3.js";
7
9
  import "./chunk-N6GRVXAJ.js";
8
10
  import "./chunk-3SIZGL3O.js";
9
11
  import "./chunk-NVJMJWLL.js";
12
+ import "./chunk-YRKRZ6OF.js";
10
13
  import "./chunk-7RMTKFJW.js";
11
14
  import "./chunk-Y3KNXVTD.js";
12
15
  import "./chunk-RIY7GYQS.js";
13
- import "./chunk-YRKRZ6OF.js";
14
- import "./chunk-CM6BMECR.js";
15
16
  import "./chunk-D2HKF2EF.js";
16
17
  import "./chunk-MYBZRDTY.js";
17
18
  import "./chunk-TXTQIYCV.js";
18
19
  import "./chunk-PX3VCKAU.js";
20
+ import "./chunk-BCS7WHCK.js";
19
21
  import "./chunk-M5ZGRVIQ.js";
20
- import "./chunk-YBW5JSA3.js";
21
22
 
22
23
  // src/personal-github.ts
23
24
  import { z } from "zod";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/personal-github.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { ConnectionMetadata } from \"./index\";\n\nexport const PERSONAL_GITHUB_PROVIDER_DOMAIN = \"github.com\" as const;\nexport const PERSONAL_GITHUB_PROVIDER_FAMILY = \"github\" as const;\nexport const PERSONAL_GITHUB_CREDENTIAL_ROLE = \"opengeni_github_personal\" as const;\nexport const PERSONAL_GITHUB_CONNECTION_SURFACE_ID = \"github:personal\" as const;\nexport const PERSONAL_GITHUB_REQUESTED_SCOPES = [\"repo\"] as const;\nexport const PERSONAL_GITHUB_AUTHORIZATION_URL =\n \"https://github.com/login/oauth/authorize\" as const;\nexport const PERSONAL_GITHUB_TOKEN_URL = \"https://github.com/login/oauth/access_token\" as const;\nexport const PERSONAL_GITHUB_USER_URL = \"https://api.github.com/user\" as const;\nexport const PERSONAL_GITHUB_API_ORIGIN = \"https://api.github.com\" as const;\nexport const PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX = 100 as const;\n\nexport const PersonalGitHubRepositoryId = z.string().regex(/^[1-9]\\d*$/u);\nexport type PersonalGitHubRepositoryId = z.infer<typeof PersonalGitHubRepositoryId>;\n\nexport const PersonalGitHubRepositoryAccess = z.enum([\"read\", \"write\"]);\nexport type PersonalGitHubRepositoryAccess = z.infer<typeof PersonalGitHubRepositoryAccess>;\n\nexport const PersonalGitHubRepositoryPermissions = z\n .object({\n pull: z.boolean(),\n push: z.boolean(),\n admin: z.boolean(),\n maintain: z.boolean(),\n triage: z.boolean(),\n })\n .strict();\nexport type PersonalGitHubRepositoryPermissions = z.infer<\n typeof PersonalGitHubRepositoryPermissions\n>;\n\nexport const PersonalGitHubRepositoryVisibility = z.enum([\"public\", \"private\", \"internal\"]);\nexport type PersonalGitHubRepositoryVisibility = z.infer<typeof PersonalGitHubRepositoryVisibility>;\n\nconst PersonalGitHubRepositoryFullName = z\n .string()\n .min(3)\n .max(140)\n .regex(/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\\/[A-Za-z0-9_.-]{1,100}$/u);\n\nexport function canonicalPersonalGitHubRepositoryUrl(fullName: string): string {\n return `https://github.com/${fullName}`;\n}\n\n/** A bounded, credential-free projection verified directly against GitHub. */\nexport const PersonalGitHubRepository = z\n .object({\n repositoryId: PersonalGitHubRepositoryId,\n fullName: PersonalGitHubRepositoryFullName,\n canonicalUrl: z.string().url().max(512),\n defaultBranch: z.string().min(1).max(255),\n visibility: PersonalGitHubRepositoryVisibility,\n private: z.boolean(),\n archived: z.boolean(),\n disabled: z.boolean(),\n permissions: PersonalGitHubRepositoryPermissions,\n })\n .strict()\n .superRefine((repository, context) => {\n if (repository.canonicalUrl !== canonicalPersonalGitHubRepositoryUrl(repository.fullName)) {\n context.addIssue({\n code: \"custom\",\n path: [\"canonicalUrl\"],\n message: \"canonicalUrl must be derived from fullName\",\n });\n }\n if (repository.private !== (repository.visibility === \"private\")) {\n context.addIssue({\n code: \"custom\",\n path: [\"private\"],\n message: \"private must agree with visibility\",\n });\n }\n });\nexport type PersonalGitHubRepository = z.infer<typeof PersonalGitHubRepository>;\n\nexport const PersonalGitHubSelectedRepository = PersonalGitHubRepository.safeExtend({\n selectedAccess: PersonalGitHubRepositoryAccess,\n selectionGeneration: z.number().int().positive(),\n selectedAt: z.string().datetime({ offset: true }),\n lastVerifiedAt: z.string().datetime({ offset: true }),\n}).strict();\nexport type PersonalGitHubSelectedRepository = z.infer<typeof PersonalGitHubSelectedRepository>;\n\nexport const PersonalGitHubRepositorySelectionState = z\n .object({\n connectionAuthorityGeneration: z.number().int().positive(),\n credentialBindingId: z.string().uuid(),\n providerPrincipalId: PersonalGitHubRepositoryId,\n selectionGeneration: z.number().int().nonnegative(),\n repositories: z\n .array(PersonalGitHubSelectedRepository)\n .max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),\n })\n .strict();\nexport type PersonalGitHubRepositorySelectionState = z.infer<\n typeof PersonalGitHubRepositorySelectionState\n>;\n\nexport const ListPersonalGitHubRepositoriesQuery = z\n .object({\n cursor: z.coerce.number().int().positive().max(10_000).default(1),\n limit: z.coerce.number().int().min(1).max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX).default(50),\n })\n .strict();\nexport type ListPersonalGitHubRepositoriesQuery = z.infer<\n typeof ListPersonalGitHubRepositoriesQuery\n>;\n\nexport const PersonalGitHubRepositoryCatalogItem = PersonalGitHubRepository.safeExtend({\n selectedAccess: PersonalGitHubRepositoryAccess.nullable(),\n}).strict();\nexport type PersonalGitHubRepositoryCatalogItem = z.infer<\n typeof PersonalGitHubRepositoryCatalogItem\n>;\n\nexport const ListPersonalGitHubRepositoriesResponse = z\n .object({\n repositories: z\n .array(PersonalGitHubRepositoryCatalogItem)\n .max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),\n nextCursor: z.number().int().positive().nullable(),\n selection: PersonalGitHubRepositorySelectionState,\n })\n .strict();\nexport type ListPersonalGitHubRepositoriesResponse = z.infer<\n typeof ListPersonalGitHubRepositoriesResponse\n>;\n\nexport const PersonalGitHubRepositorySelectionInput = z\n .object({\n repositoryId: PersonalGitHubRepositoryId,\n fullName: PersonalGitHubRepositoryFullName,\n access: PersonalGitHubRepositoryAccess,\n })\n .strict();\nexport type PersonalGitHubRepositorySelectionInput = z.infer<\n typeof PersonalGitHubRepositorySelectionInput\n>;\n\nexport const ReplacePersonalGitHubRepositorySelectionsRequest = z\n .object({\n expectedConnectionAuthorityGeneration: z.number().int().positive(),\n expectedSelectionGeneration: z.number().int().nonnegative(),\n idempotencyKey: z.string().trim().min(1).max(200),\n repositories: z\n .array(PersonalGitHubRepositorySelectionInput)\n .max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),\n })\n .strict()\n .superRefine((request, context) => {\n const repositoryIds = new Set<string>();\n const fullNames = new Set<string>();\n request.repositories.forEach((repository, index) => {\n const normalizedFullName = repository.fullName.toLowerCase();\n if (repositoryIds.has(repository.repositoryId)) {\n context.addIssue({\n code: \"custom\",\n path: [\"repositories\", index, \"repositoryId\"],\n message: \"repositoryId must be unique\",\n });\n }\n if (fullNames.has(normalizedFullName)) {\n context.addIssue({\n code: \"custom\",\n path: [\"repositories\", index, \"fullName\"],\n message: \"fullName must be unique\",\n });\n }\n repositoryIds.add(repository.repositoryId);\n fullNames.add(normalizedFullName);\n });\n });\nexport type ReplacePersonalGitHubRepositorySelectionsRequest = z.infer<\n typeof ReplacePersonalGitHubRepositorySelectionsRequest\n>;\n\nexport const VerifyPersonalGitHubRepositorySelectionsRequest = z\n .object({\n expectedConnectionAuthorityGeneration: z.number().int().positive(),\n expectedSelectionGeneration: z.number().int().nonnegative(),\n idempotencyKey: z.string().trim().min(1).max(200),\n })\n .strict();\nexport type VerifyPersonalGitHubRepositorySelectionsRequest = z.infer<\n typeof VerifyPersonalGitHubRepositorySelectionsRequest\n>;\n\n/**\n * Owner-visible, credential-free metadata for one dedicated personal GitHub\n * OAuth connection. Repository selections are a separate authority and never\n * live in this credential record.\n */\nexport const PersonalGitHubConnectionMetadata = z\n .object({\n credentialRole: z.literal(PERSONAL_GITHUB_CREDENTIAL_ROLE),\n providerFamily: z.literal(PERSONAL_GITHUB_PROVIDER_FAMILY),\n providerPrincipalId: z.string().regex(/^\\d+$/u),\n githubUserId: z.string().regex(/^\\d+$/u),\n githubLogin: z.string().min(1).max(100),\n oauthEnvironment: z.string().min(1).max(128),\n oauthClientMarker: z.string().regex(/^[a-f0-9]{32}$/u),\n credentialBindingId: z.string().uuid(),\n connectedAt: z.string().datetime({ offset: true }),\n lastVerifiedAt: z.string().datetime({ offset: true }),\n disconnectedAt: z.string().datetime({ offset: true }).nullable().optional(),\n refreshTokenExpiresAt: z.string().datetime({ offset: true }).nullable().optional(),\n })\n .passthrough();\nexport type PersonalGitHubConnectionMetadata = z.infer<typeof PersonalGitHubConnectionMetadata>;\n\nexport const PersonalGitHubOAuthStartRequest = z\n .object({\n /** Existing exact connection generation to re-authorize in place. */\n connectionId: z.string().uuid().optional(),\n /** Same-workspace UI path restored after the callback. */\n returnPath: z.string().min(1).max(2048).optional(),\n })\n .strict();\nexport type PersonalGitHubOAuthStartRequest = z.infer<typeof PersonalGitHubOAuthStartRequest>;\n\nexport const PersonalGitHubOAuthStartResponse = z\n .object({\n authorizationUrl: z.string().url(),\n expiresAt: z.string().datetime({ offset: true }),\n })\n .strict();\nexport type PersonalGitHubOAuthStartResponse = z.infer<typeof PersonalGitHubOAuthStartResponse>;\n\nexport const PersonalGitHubConnectionStatusResponse = z\n .object({\n enabled: z.boolean(),\n connection: ConnectionMetadata.nullable(),\n reviewUrl: z.string().url().nullable(),\n })\n .strict();\nexport type PersonalGitHubConnectionStatusResponse = z.infer<\n typeof PersonalGitHubConnectionStatusResponse\n>;\n\nexport const PersonalGitHubDisconnectRequest = z\n .object({\n expectedVersion: z.number().int().positive(),\n idempotencyKey: z.string().trim().min(1).max(200),\n })\n .strict();\nexport type PersonalGitHubDisconnectRequest = z.infer<typeof PersonalGitHubDisconnectRequest>;\n\nexport function isPersonalGitHubConnection(\n connection: Pick<z.infer<typeof ConnectionMetadata>, \"providerDomain\" | \"kind\" | \"metadata\">,\n): boolean {\n return (\n connection.providerDomain.toLowerCase() === PERSONAL_GITHUB_PROVIDER_DOMAIN &&\n connection.kind === \"oauth2\" &&\n PersonalGitHubConnectionMetadata.safeParse(connection.metadata).success\n );\n}\n\nexport function hasReservedPersonalGitHubMetadata(\n metadata: Record<string, unknown> | undefined,\n): boolean {\n return metadata?.credentialRole === PERSONAL_GITHUB_CREDENTIAL_ROLE;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,SAAS;AAIX,IAAM,kCAAkC;AACxC,IAAM,kCAAkC;AACxC,IAAM,kCAAkC;AACxC,IAAM,wCAAwC;AAC9C,IAAM,mCAAmC,CAAC,MAAM;AAChD,IAAM,oCACX;AACK,IAAM,4BAA4B;AAClC,IAAM,2BAA2B;AACjC,IAAM,6BAA6B;AACnC,IAAM,yCAAyC;AAE/C,IAAM,6BAA6B,EAAE,OAAO,EAAE,MAAM,aAAa;AAGjE,IAAM,iCAAiC,EAAE,KAAK,CAAC,QAAQ,OAAO,CAAC;AAG/D,IAAM,sCAAsC,EAChD,OAAO;AAAA,EACN,MAAM,EAAE,QAAQ;AAAA,EAChB,MAAM,EAAE,QAAQ;AAAA,EAChB,OAAO,EAAE,QAAQ;AAAA,EACjB,UAAU,EAAE,QAAQ;AAAA,EACpB,QAAQ,EAAE,QAAQ;AACpB,CAAC,EACA,OAAO;AAKH,IAAM,qCAAqC,EAAE,KAAK,CAAC,UAAU,WAAW,UAAU,CAAC;AAG1F,IAAM,mCAAmC,EACtC,OAAO,EACP,IAAI,CAAC,EACL,IAAI,GAAG,EACP,MAAM,6DAA6D;AAE/D,SAAS,qCAAqC,UAA0B;AAC7E,SAAO,sBAAsB,QAAQ;AACvC;AAGO,IAAM,2BAA2B,EACrC,OAAO;AAAA,EACN,cAAc;AAAA,EACd,UAAU;AAAA,EACV,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG;AAAA,EACtC,eAAe,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAAA,EACxC,YAAY;AAAA,EACZ,SAAS,EAAE,QAAQ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,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS;AAAA;AAAA,EAEzC,YAAY,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,IAAI,EAAE,SAAS;AACnD,CAAC,EACA,OAAO;AAGH,IAAM,mCAAmC,EAC7C,OAAO;AAAA,EACN,kBAAkB,EAAE,OAAO,EAAE,IAAI;AAAA,EACjC,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,KAAK,CAAC;AACjD,CAAC,EACA,OAAO;AAGH,IAAM,yCAAyC,EACnD,OAAO;AAAA,EACN,SAAS,EAAE,QAAQ;AAAA,EACnB,YAAY,mBAAmB,SAAS;AAAA,EACxC,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AACvC,CAAC,EACA,OAAO;AAKH,IAAM,kCAAkC,EAC5C,OAAO;AAAA,EACN,iBAAiB,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AAAA,EAC3C,gBAAgB,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG;AAClD,CAAC,EACA,OAAO;AAGH,SAAS,2BACd,YACS;AACT,SACE,WAAW,eAAe,YAAY,MAAM,mCAC5C,WAAW,SAAS,YACpB,iCAAiC,UAAU,WAAW,QAAQ,EAAE;AAEpE;AAEO,SAAS,kCACd,UACS;AACT,SAAO,UAAU,mBAAmB;AACtC;","names":[]}
1
+ {"version":3,"sources":["../src/personal-github.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { ConnectionMetadata } from \"./index\";\n\nexport const PERSONAL_GITHUB_PROVIDER_DOMAIN = \"github.com\" as const;\nexport const PERSONAL_GITHUB_PROVIDER_FAMILY = \"github\" as const;\nexport const PERSONAL_GITHUB_CREDENTIAL_ROLE = \"opengeni_github_personal\" as const;\nexport const PERSONAL_GITHUB_CONNECTION_SURFACE_ID = \"github:personal\" as const;\nexport const PERSONAL_GITHUB_REQUESTED_SCOPES = [\"repo\"] as const;\nexport const PERSONAL_GITHUB_AUTHORIZATION_URL =\n \"https://github.com/login/oauth/authorize\" as const;\nexport const PERSONAL_GITHUB_TOKEN_URL = \"https://github.com/login/oauth/access_token\" as const;\nexport const PERSONAL_GITHUB_USER_URL = \"https://api.github.com/user\" as const;\nexport const PERSONAL_GITHUB_API_ORIGIN = \"https://api.github.com\" as const;\nexport const PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX = 100 as const;\n\nexport const PersonalGitHubRepositoryId = z.string().regex(/^[1-9]\\d*$/u);\nexport type PersonalGitHubRepositoryId = z.infer<typeof PersonalGitHubRepositoryId>;\n\nexport const PersonalGitHubRepositoryAccess = z.enum([\"read\", \"write\"]);\nexport type PersonalGitHubRepositoryAccess = z.infer<typeof PersonalGitHubRepositoryAccess>;\n\nexport const PersonalGitHubRepositoryPermissions = z\n .object({\n pull: z.boolean(),\n push: z.boolean(),\n admin: z.boolean(),\n maintain: z.boolean(),\n triage: z.boolean(),\n })\n .strict();\nexport type PersonalGitHubRepositoryPermissions = z.infer<\n typeof PersonalGitHubRepositoryPermissions\n>;\n\nexport const PersonalGitHubRepositoryVisibility = z.enum([\"public\", \"private\", \"internal\"]);\nexport type PersonalGitHubRepositoryVisibility = z.infer<typeof PersonalGitHubRepositoryVisibility>;\n\nconst PersonalGitHubRepositoryFullName = z\n .string()\n .min(3)\n .max(140)\n .regex(/^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})\\/[A-Za-z0-9_.-]{1,100}$/u);\n\nexport function canonicalPersonalGitHubRepositoryUrl(fullName: string): string {\n return `https://github.com/${fullName}`;\n}\n\n/** A bounded, credential-free projection verified directly against GitHub. */\nexport const PersonalGitHubRepository = z\n .object({\n repositoryId: PersonalGitHubRepositoryId,\n fullName: PersonalGitHubRepositoryFullName,\n canonicalUrl: z.string().url().max(512),\n defaultBranch: z.string().min(1).max(255),\n visibility: PersonalGitHubRepositoryVisibility,\n private: z.boolean(),\n archived: z.boolean(),\n disabled: z.boolean(),\n permissions: PersonalGitHubRepositoryPermissions,\n })\n .strict()\n .superRefine((repository, context) => {\n if (repository.canonicalUrl !== canonicalPersonalGitHubRepositoryUrl(repository.fullName)) {\n context.addIssue({\n code: \"custom\",\n path: [\"canonicalUrl\"],\n message: \"canonicalUrl must be derived from fullName\",\n });\n }\n if (repository.private !== (repository.visibility === \"private\")) {\n context.addIssue({\n code: \"custom\",\n path: [\"private\"],\n message: \"private must agree with visibility\",\n });\n }\n });\nexport type PersonalGitHubRepository = z.infer<typeof PersonalGitHubRepository>;\n\nexport const PersonalGitHubSelectedRepository = PersonalGitHubRepository.safeExtend({\n selectedAccess: PersonalGitHubRepositoryAccess,\n selectionGeneration: z.number().int().positive(),\n selectedAt: z.string().datetime({ offset: true }),\n lastVerifiedAt: z.string().datetime({ offset: true }),\n}).strict();\nexport type PersonalGitHubSelectedRepository = z.infer<typeof PersonalGitHubSelectedRepository>;\n\nexport const PersonalGitHubRepositorySelectionState = z\n .object({\n connectionAuthorityGeneration: z.number().int().positive(),\n credentialBindingId: z.string().uuid(),\n providerPrincipalId: PersonalGitHubRepositoryId,\n selectionGeneration: z.number().int().nonnegative(),\n repositories: z\n .array(PersonalGitHubSelectedRepository)\n .max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),\n })\n .strict();\nexport type PersonalGitHubRepositorySelectionState = z.infer<\n typeof PersonalGitHubRepositorySelectionState\n>;\n\nexport const ListPersonalGitHubRepositoriesQuery = z\n .object({\n cursor: z.coerce.number().int().positive().max(10_000).default(1),\n limit: z.coerce.number().int().min(1).max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX).default(50),\n })\n .strict();\nexport type ListPersonalGitHubRepositoriesQuery = z.infer<\n typeof ListPersonalGitHubRepositoriesQuery\n>;\n\nexport const PersonalGitHubRepositoryCatalogItem = PersonalGitHubRepository.safeExtend({\n selectedAccess: PersonalGitHubRepositoryAccess.nullable(),\n}).strict();\nexport type PersonalGitHubRepositoryCatalogItem = z.infer<\n typeof PersonalGitHubRepositoryCatalogItem\n>;\n\nexport const ListPersonalGitHubRepositoriesResponse = z\n .object({\n repositories: z\n .array(PersonalGitHubRepositoryCatalogItem)\n .max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),\n nextCursor: z.number().int().positive().nullable(),\n selection: PersonalGitHubRepositorySelectionState,\n })\n .strict();\nexport type ListPersonalGitHubRepositoriesResponse = z.infer<\n typeof ListPersonalGitHubRepositoriesResponse\n>;\n\nexport const PersonalGitHubRepositorySelectionInput = z\n .object({\n repositoryId: PersonalGitHubRepositoryId,\n fullName: PersonalGitHubRepositoryFullName,\n access: PersonalGitHubRepositoryAccess,\n })\n .strict();\nexport type PersonalGitHubRepositorySelectionInput = z.infer<\n typeof PersonalGitHubRepositorySelectionInput\n>;\n\nexport const ReplacePersonalGitHubRepositorySelectionsRequest = z\n .object({\n expectedConnectionAuthorityGeneration: z.number().int().positive(),\n expectedSelectionGeneration: z.number().int().nonnegative(),\n idempotencyKey: z.string().trim().min(1).max(200),\n repositories: z\n .array(PersonalGitHubRepositorySelectionInput)\n .max(PERSONAL_GITHUB_REPOSITORY_CATALOG_MAX),\n })\n .strict()\n .superRefine((request, context) => {\n const repositoryIds = new Set<string>();\n const fullNames = new Set<string>();\n request.repositories.forEach((repository, index) => {\n const normalizedFullName = repository.fullName.toLowerCase();\n if (repositoryIds.has(repository.repositoryId)) {\n context.addIssue({\n code: \"custom\",\n path: [\"repositories\", index, \"repositoryId\"],\n message: \"repositoryId must be unique\",\n });\n }\n if (fullNames.has(normalizedFullName)) {\n context.addIssue({\n code: \"custom\",\n path: [\"repositories\", index, \"fullName\"],\n message: \"fullName must be unique\",\n });\n }\n repositoryIds.add(repository.repositoryId);\n fullNames.add(normalizedFullName);\n });\n });\nexport type ReplacePersonalGitHubRepositorySelectionsRequest = z.infer<\n typeof ReplacePersonalGitHubRepositorySelectionsRequest\n>;\n\nexport const VerifyPersonalGitHubRepositorySelectionsRequest = z\n .object({\n expectedConnectionAuthorityGeneration: z.number().int().positive(),\n expectedSelectionGeneration: z.number().int().nonnegative(),\n idempotencyKey: z.string().trim().min(1).max(200),\n })\n .strict();\nexport type VerifyPersonalGitHubRepositorySelectionsRequest = z.infer<\n typeof VerifyPersonalGitHubRepositorySelectionsRequest\n>;\n\n/**\n * Owner-visible, credential-free metadata for one dedicated personal GitHub\n * OAuth connection. Repository selections are a separate authority and never\n * live in this credential record.\n */\nexport const PersonalGitHubConnectionMetadata = z\n .object({\n credentialRole: z.literal(PERSONAL_GITHUB_CREDENTIAL_ROLE),\n providerFamily: z.literal(PERSONAL_GITHUB_PROVIDER_FAMILY),\n providerPrincipalId: z.string().regex(/^\\d+$/u),\n githubUserId: z.string().regex(/^\\d+$/u),\n githubLogin: z.string().min(1).max(100),\n oauthEnvironment: z.string().min(1).max(128),\n oauthClientMarker: z.string().regex(/^[a-f0-9]{32}$/u),\n credentialBindingId: z.string().uuid(),\n connectedAt: z.string().datetime({ offset: true }),\n lastVerifiedAt: z.string().datetime({ offset: true }),\n disconnectedAt: z.string().datetime({ offset: true }).nullable().optional(),\n refreshTokenExpiresAt: z.string().datetime({ offset: true }).nullable().optional(),\n })\n .passthrough();\nexport type PersonalGitHubConnectionMetadata = z.infer<typeof PersonalGitHubConnectionMetadata>;\n\nexport const PersonalGitHubOAuthStartRequest = z\n .object({\n /** Existing exact connection generation to re-authorize in place. */\n connectionId: z.string().uuid().optional(),\n /** Same-workspace UI path restored after the callback. */\n returnPath: z.string().min(1).max(2048).optional(),\n })\n .strict();\nexport type PersonalGitHubOAuthStartRequest = z.infer<typeof PersonalGitHubOAuthStartRequest>;\n\nexport const PersonalGitHubOAuthStartResponse = z\n .object({\n authorizationUrl: z.string().url(),\n expiresAt: z.string().datetime({ offset: true }),\n })\n .strict();\nexport type PersonalGitHubOAuthStartResponse = z.infer<typeof PersonalGitHubOAuthStartResponse>;\n\nexport const PersonalGitHubConnectionStatusResponse = z\n .object({\n enabled: z.boolean(),\n connection: ConnectionMetadata.nullable(),\n reviewUrl: z.string().url().nullable(),\n })\n .strict();\nexport type PersonalGitHubConnectionStatusResponse = z.infer<\n typeof PersonalGitHubConnectionStatusResponse\n>;\n\nexport const PersonalGitHubDisconnectRequest = z\n .object({\n expectedVersion: z.number().int().positive(),\n idempotencyKey: z.string().trim().min(1).max(200),\n })\n .strict();\nexport type PersonalGitHubDisconnectRequest = z.infer<typeof PersonalGitHubDisconnectRequest>;\n\nexport function isPersonalGitHubConnection(\n connection: Pick<z.infer<typeof ConnectionMetadata>, \"providerDomain\" | \"kind\" | \"metadata\">,\n): boolean {\n return (\n connection.providerDomain.toLowerCase() === PERSONAL_GITHUB_PROVIDER_DOMAIN &&\n connection.kind === \"oauth2\" &&\n PersonalGitHubConnectionMetadata.safeParse(connection.metadata).success\n );\n}\n\nexport function hasReservedPersonalGitHubMetadata(\n metadata: Record<string, unknown> | undefined,\n): boolean {\n return metadata?.credentialRole === PERSONAL_GITHUB_CREDENTIAL_ROLE;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,SAAS;AAIX,IAAM,kCAAkC;AACxC,IAAM,kCAAkC;AACxC,IAAM,kCAAkC;AACxC,IAAM,wCAAwC;AAC9C,IAAM,mCAAmC,CAAC,MAAM;AAChD,IAAM,oCACX;AACK,IAAM,4BAA4B;AAClC,IAAM,2BAA2B;AACjC,IAAM,6BAA6B;AACnC,IAAM,yCAAyC;AAE/C,IAAM,6BAA6B,EAAE,OAAO,EAAE,MAAM,aAAa;AAGjE,IAAM,iCAAiC,EAAE,KAAK,CAAC,QAAQ,OAAO,CAAC;AAG/D,IAAM,sCAAsC,EAChD,OAAO;AAAA,EACN,MAAM,EAAE,QAAQ;AAAA,EAChB,MAAM,EAAE,QAAQ;AAAA,EAChB,OAAO,EAAE,QAAQ;AAAA,EACjB,UAAU,EAAE,QAAQ;AAAA,EACpB,QAAQ,EAAE,QAAQ;AACpB,CAAC,EACA,OAAO;AAKH,IAAM,qCAAqC,EAAE,KAAK,CAAC,UAAU,WAAW,UAAU,CAAC;AAG1F,IA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ACtC;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeni/contracts",
3
- "version": "2.5.0-canary.2",
3
+ "version": "2.6.0-canary.0",
4
4
  "description": "Shared zod schemas and wire-contract types for the OpenGeni API.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -58,6 +58,14 @@
58
58
  "types": "./dist/canonical-human-identities.d.ts",
59
59
  "import": "./dist/canonical-human-identities.js"
60
60
  },
61
+ "./managed-auth-session-sets": {
62
+ "types": "./dist/managed-auth-session-sets.d.ts",
63
+ "import": "./dist/managed-auth-session-sets.js"
64
+ },
65
+ "./organization-recovery": {
66
+ "types": "./dist/organization-recovery.d.ts",
67
+ "import": "./dist/organization-recovery.js"
68
+ },
61
69
  "./codex-provider-account-authority": {
62
70
  "types": "./dist/codex-provider-account-authority.d.ts",
63
71
  "import": "./dist/codex-provider-account-authority.js"
@@ -16,7 +16,10 @@ const WorkspaceImagePathSchema = z
16
16
  // without sending unsupported regex syntax to model providers.
17
17
  .refine((path) => path.split("/").every((segment) => segment !== "." && segment !== ".."), {
18
18
  message: "Sandbox image paths cannot contain dot segments",
19
- });
19
+ })
20
+ .describe(
21
+ "Absolute /workspace path to a PNG, JPEG, or WebP image. Convert SVG or other formats before using them as image-generation references.",
22
+ );
20
23
 
21
24
  /** One ordered, workspace-owned input used to guide or edit an image. */
22
25
  export const ImageGenerationReferenceSchema = z.discriminatedUnion("kind", [
@@ -49,7 +52,10 @@ export const GenerateImageToolInput = z
49
52
  .array(ImageGenerationReferenceSchema)
50
53
  .max(IMAGE_GENERATION_MAX_REFERENCES)
51
54
  .optional()
52
- .default([]),
55
+ .default([])
56
+ .describe(
57
+ "Ordered image references. Every sandbox path, File, or artifact must resolve to PNG, JPEG, or WebP bytes.",
58
+ ),
53
59
  })
54
60
  .strict();
55
61
  export type GenerateImageToolInput = z.infer<typeof GenerateImageToolInput>;
package/src/index.ts CHANGED
@@ -2965,13 +2965,15 @@ export const CreateWorkspaceRequest = z.object({
2965
2965
  });
2966
2966
  export type CreateWorkspaceRequest = z.infer<typeof CreateWorkspaceRequest>;
2967
2967
 
2968
- export const UpdateWorkspaceRequest = z.object({
2969
- name: z.string().min(1).optional(),
2970
- slug: z.string().min(1).nullable().optional(),
2971
- // White-label persona override. Pass null to clear it back to the deployment
2972
- // default; omit to leave it unchanged.
2973
- agentInstructions: z.string().min(1).nullable().optional(),
2974
- });
2968
+ export const UpdateWorkspaceRequest = z
2969
+ .object({
2970
+ name: z.string().min(1).optional(),
2971
+ slug: z.string().min(1).nullable().optional(),
2972
+ // White-label persona override. Pass null to clear it back to the deployment
2973
+ // default; omit to leave it unchanged.
2974
+ agentInstructions: z.string().min(1).nullable().optional(),
2975
+ })
2976
+ .strict();
2975
2977
  export type UpdateWorkspaceRequest = z.infer<typeof UpdateWorkspaceRequest>;
2976
2978
 
2977
2979
  export const ApiKey = z.object({
@@ -7727,6 +7729,44 @@ export type VariableSetSecret = z.infer<typeof VariableSetSecret>;
7727
7729
  export const VariableSetScope = z.enum(["organization", "workspace", "user"]);
7728
7730
  export type VariableSetScope = z.infer<typeof VariableSetScope>;
7729
7731
 
7732
+ /**
7733
+ * Exact-ID metadata used only to validate attachments. This deliberately omits
7734
+ * names, descriptions, and variable-name metadata so attach/use authority does
7735
+ * not become general catalog access.
7736
+ */
7737
+ export const VariableSetAttachmentMetadata = z.object({
7738
+ id: z.string().uuid(),
7739
+ scope: VariableSetScope,
7740
+ });
7741
+ export type VariableSetAttachmentMetadata = z.infer<typeof VariableSetAttachmentMetadata>;
7742
+
7743
+ export const MAX_RESOLVED_VARIABLE_SET_ATTACHMENTS = MAX_SELECTED_VARIABLE_SETS * 2;
7744
+ export const ResolveVariableSetAttachmentsRequest = z
7745
+ .object({
7746
+ // One create can carry 25 explicit selections plus 25 defaults from its Rig.
7747
+ variableSetIds: z.array(z.string().uuid()).max(MAX_RESOLVED_VARIABLE_SET_ATTACHMENTS),
7748
+ })
7749
+ .strict()
7750
+ .superRefine((value, context) => {
7751
+ if (new Set(value.variableSetIds).size !== value.variableSetIds.length) {
7752
+ context.addIssue({
7753
+ code: z.ZodIssueCode.custom,
7754
+ path: ["variableSetIds"],
7755
+ message: "variableSetIds must not contain duplicates",
7756
+ });
7757
+ }
7758
+ });
7759
+ export type ResolveVariableSetAttachmentsRequest = z.infer<
7760
+ typeof ResolveVariableSetAttachmentsRequest
7761
+ >;
7762
+
7763
+ export const ResolveVariableSetAttachmentsResponse = z.object({
7764
+ variableSets: z.array(VariableSetAttachmentMetadata),
7765
+ });
7766
+ export type ResolveVariableSetAttachmentsResponse = z.infer<
7767
+ typeof ResolveVariableSetAttachmentsResponse
7768
+ >;
7769
+
7730
7770
  export const VariableSet = z.object({
7731
7771
  id: z.string().uuid(),
7732
7772
  accountId: z.string().uuid(),
@@ -8008,6 +8048,10 @@ export const RigChange = z.object({
8008
8048
  });
8009
8049
  export type RigChange = z.infer<typeof RigChange>;
8010
8050
 
8051
+ // Rig setup payloads are transferred to sandboxes in bounded chunks. Keep the
8052
+ // public definition limit independent from provider command-argument ceilings.
8053
+ export const RIG_SETUP_SCRIPT_MAX_CHARS = 1024 * 1024;
8054
+
8011
8055
  export const CreateRigRequest = z.object({
8012
8056
  // Omitted remains the compatibility workspace-owned creation path.
8013
8057
  scope: ResourceAuthorityScope.default("workspace"),
@@ -8020,7 +8064,7 @@ export const CreateRigRequest = z.object({
8020
8064
  // explicit never-field instead of silently stripping `image` from older
8021
8065
  // clients: callers must receive a validation error and remove the override.
8022
8066
  image: z.never().optional(),
8023
- setupScript: z.string().max(131072).optional(),
8067
+ setupScript: z.string().max(RIG_SETUP_SCRIPT_MAX_CHARS).optional(),
8024
8068
  checks: z.array(RigCheck).max(100).default([]),
8025
8069
  credentialHooks: z.array(z.string().min(1).max(200)).max(50).default([]),
8026
8070
  defaultVariableSetIds: z.array(z.string().uuid()).max(25).default([]),
@@ -8090,7 +8134,7 @@ export const RigDefinitionEditPayload = z.object({
8090
8134
  // the read model for compatibility, but no new definition may set or clear
8091
8135
  // one through the public write contract.
8092
8136
  image: z.never().optional(),
8093
- setupScript: z.string().max(131072).nullish(),
8137
+ setupScript: z.string().max(RIG_SETUP_SCRIPT_MAX_CHARS).nullish(),
8094
8138
  checks: z.array(RigCheck).max(100).optional(),
8095
8139
  credentialHooks: z.array(z.string().min(1).max(200)).max(50).optional(),
8096
8140
  defaultVariableSetIds: z.array(z.string().uuid()).max(25).optional(),
@@ -15704,8 +15748,7 @@ export type WorkspaceModelCatalogResponse = z.infer<typeof WorkspaceModelCatalog
15704
15748
  * that rollout boundary. Mutating clients send this value in
15705
15749
  * `x-opengeni-api-contract`; the API rejects any other value before routing.
15706
15750
  */
15707
- export const OPENGENI_API_CONTRACT_REVISION =
15708
- "2026-08-personal-only-organization-setup-v1" as const;
15751
+ export const OPENGENI_API_CONTRACT_REVISION = "2026-08-organization-recovery-custody-v1" as const;
15709
15752
  export const OPENGENI_API_CONTRACT_HEADER = "x-opengeni-api-contract" as const;
15710
15753
  /** Bounded request/response identifier shared by browser, ingress, and API diagnostics. */
15711
15754
  export const OPENGENI_CORRELATION_HEADER = "x-opengeni-correlation-id" as const;
@@ -15755,6 +15798,9 @@ export const ClientConfig = /* @__PURE__ */ defineModelContractSchema(() =>
15755
15798
  acceptedMimeTypes: [...VOICE_INPUT_ACCEPTED_MIME_TYPES],
15756
15799
  }),
15757
15800
  productAccessMode: ProductAccessMode,
15801
+ // Safe rollout discriminator: the browser only mounts the optional
15802
+ // @opengeni/sdk/accounts controller when this is dual or broker.
15803
+ managedAuthSessionSetMode: z.enum(["legacy", "dual", "broker"]).default("legacy"),
15758
15804
  auth: ClientAuthConfig.default({ mode: "none" }),
15759
15805
  analytics: z
15760
15806
  .object({
@@ -15891,6 +15937,7 @@ export * from "./governed-learning-activation";
15891
15937
  export * from "./knowledge";
15892
15938
  export * from "./task-notes";
15893
15939
  export * from "./canonical-human-identities";
15940
+ export * from "./organization-recovery";
15894
15941
  export * from "./organization-membership-lifecycle";
15895
15942
  export * from "./remember";
15896
15943
  export * from "./agent-authored-durable-text";