@agentxm/registry-client 0.28.4-bootstrap.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.
Files changed (53) hide show
  1. package/LICENSE +110 -0
  2. package/README.md +9 -0
  3. package/dist/src/__generated__/registry-client.d.ts +6501 -0
  4. package/dist/src/__generated__/registry-client.js +2270 -0
  5. package/dist/src/admin-client.d.ts +181 -0
  6. package/dist/src/admin-client.js +165 -0
  7. package/dist/src/archive-cache.d.ts +46 -0
  8. package/dist/src/archive-cache.js +179 -0
  9. package/dist/src/atomic-write.d.ts +49 -0
  10. package/dist/src/atomic-write.js +60 -0
  11. package/dist/src/axm-package-meta.d.ts +31 -0
  12. package/dist/src/axm-package-meta.js +31 -0
  13. package/dist/src/cache-root.d.ts +11 -0
  14. package/dist/src/cache-root.js +43 -0
  15. package/dist/src/client.d.ts +270 -0
  16. package/dist/src/client.js +43 -0
  17. package/dist/src/deprecation-warning.d.ts +3 -0
  18. package/dist/src/deprecation-warning.js +16 -0
  19. package/dist/src/error-mapping.d.ts +82 -0
  20. package/dist/src/error-mapping.js +186 -0
  21. package/dist/src/errors.d.ts +107 -0
  22. package/dist/src/errors.js +98 -0
  23. package/dist/src/failure-mapping.d.ts +14 -0
  24. package/dist/src/failure-mapping.js +100 -0
  25. package/dist/src/fs-helpers.d.ts +12 -0
  26. package/dist/src/fs-helpers.js +13 -0
  27. package/dist/src/index.d.ts +33 -0
  28. package/dist/src/index.js +37 -0
  29. package/dist/src/integrity.d.ts +13 -0
  30. package/dist/src/integrity.js +17 -0
  31. package/dist/src/local-client.d.ts +24 -0
  32. package/dist/src/local-client.js +815 -0
  33. package/dist/src/network.d.ts +6 -0
  34. package/dist/src/network.js +6 -0
  35. package/dist/src/path-safety.d.ts +18 -0
  36. package/dist/src/path-safety.js +26 -0
  37. package/dist/src/purl-match.d.ts +28 -0
  38. package/dist/src/purl-match.js +35 -0
  39. package/dist/src/registry-url.d.ts +14 -0
  40. package/dist/src/registry-url.js +12 -0
  41. package/dist/src/remote-client.d.ts +27 -0
  42. package/dist/src/remote-client.js +725 -0
  43. package/dist/src/request-policy.d.ts +29 -0
  44. package/dist/src/request-policy.js +190 -0
  45. package/dist/src/response-body.d.ts +11 -0
  46. package/dist/src/response-body.js +32 -0
  47. package/dist/src/retry-after.d.ts +9 -0
  48. package/dist/src/retry-after.js +28 -0
  49. package/dist/src/translate.d.ts +20 -0
  50. package/dist/src/translate.js +170 -0
  51. package/dist/src/utils.d.ts +60 -0
  52. package/dist/src/utils.js +187 -0
  53. package/package.json +55 -0
@@ -0,0 +1,2270 @@
1
+ /**
2
+ * @generated by registry-client:generate:registry-client (openapigen)
3
+ * Source: packages/registry-client/specs/registry-openapi.json
4
+ * Regenerate: pnpm exec nx run registry-client:generate:registry-client
5
+ * DO NOT EDIT - changes are overwritten on regeneration.
6
+ */
7
+ // @effect-diagnostics anyUnknownInErrorContext:off — generated OpenAPI transport errors are translated by the registry adapter
8
+ /* eslint-disable */
9
+ import * as Data from "effect/Data";
10
+ import * as Effect from "effect/Effect";
11
+ import * as Schema from "effect/Schema";
12
+ import * as Stream from "effect/Stream";
13
+ import { DateTimeUtcSchema } from "@agentxm/extension-model/unstable/date-time";
14
+ import * as Sse from "effect/unstable/encoding/Sse";
15
+ import * as HttpClient from "effect/unstable/http/HttpClient";
16
+ import * as HttpClientError from "effect/unstable/http/HttpClientError";
17
+ import * as HttpClientRequest from "effect/unstable/http/HttpClientRequest";
18
+ import * as HttpClientResponse from "effect/unstable/http/HttpClientResponse";
19
+ export const MetaResponse = Schema.Struct({
20
+ ok: Schema.Literal(true),
21
+ service: Schema.Literal("registry"),
22
+ message: Schema.String.annotate({ description: "Human-readable service greeting." }),
23
+ docs: Schema.Union([
24
+ Schema.String.annotate({
25
+ description: "Path to the interactive API documentation, or null when docs are disabled.",
26
+ format: "uri-reference",
27
+ }),
28
+ Schema.Null,
29
+ ]),
30
+ openapi: Schema.Union([
31
+ Schema.String.annotate({
32
+ description: "Path to the OpenAPI specification, or null when docs are disabled.",
33
+ format: "uri-reference",
34
+ }),
35
+ Schema.Null,
36
+ ]),
37
+ }).annotate({
38
+ title: "Meta Response",
39
+ description: "Registry service metadata including health status and documentation entry points.",
40
+ identifier: "MetaResponse",
41
+ });
42
+ export const DecodeErrorResponseEncoded = Schema.Struct({
43
+ kind: Schema.Literal("DecodeErrorResponse"),
44
+ type: Schema.String,
45
+ title: Schema.String,
46
+ status: Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })),
47
+ detail: Schema.String,
48
+ instance: Schema.optionalKey(Schema.String),
49
+ code: Schema.String,
50
+ }).annotate({ identifier: "DecodeErrorResponseEncoded" });
51
+ export const DeviceCodeResponse = Schema.Struct({
52
+ device_code: Schema.String.annotate({
53
+ description: "Device verification code for the polling client.",
54
+ }),
55
+ user_code: Schema.String.annotate({ description: "Short code the user enters in the browser." }),
56
+ verification_uri: Schema.String.annotate({
57
+ description: "URI where the user should navigate to enter the user code.",
58
+ format: "uri",
59
+ }),
60
+ verification_uri_complete: Schema.String.annotate({
61
+ description: "URI with the one-time code in the user_code query parameter, suitable for QR codes or direct links.",
62
+ format: "uri",
63
+ }),
64
+ expires_in: Schema.Number.annotate({
65
+ description: "Lifetime of the device code in seconds.",
66
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
67
+ interval: Schema.Number.annotate({ description: "Minimum polling interval in seconds." }).check(Schema.isInt().annotate({ expected: "an integer" })),
68
+ }).annotate({
69
+ title: "Device Code Response",
70
+ description: "Response from the OAuth device authorization endpoint (RFC 8628).",
71
+ identifier: "DeviceCodeResponse",
72
+ });
73
+ export const DeviceCodeOAuthError = Schema.Struct({
74
+ error: Schema.Literals(["invalid_client", "invalid_scope"]),
75
+ }).annotate({ title: "Device Code OAuth Error", identifier: "DeviceCodeOAuthError" });
76
+ export const PublishDetails = Schema.Struct({
77
+ retryable: Schema.Boolean.annotate({ description: "Whether the client may retry the request." }),
78
+ retryAfterSeconds: Schema.optionalKey(Schema.Number.annotate({ description: "Suggested delay in seconds before retrying." }).check(Schema.isFinite().annotate({ expected: "a finite number" }))),
79
+ requiredScope: Schema.optionalKey(Schema.String.annotate({
80
+ description: "The scope required to perform the operation, if applicable.",
81
+ })),
82
+ tokenScopes: Schema.optionalKey(Schema.Array(Schema.String).annotate({
83
+ description: "The scopes present on the token used for the request.",
84
+ })),
85
+ requiredRole: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]).annotate({
86
+ description: "The management role required, if applicable.",
87
+ })),
88
+ }).annotate({
89
+ title: "Publish Details",
90
+ description: "Extended error details for publish-related and retryable error responses.",
91
+ identifier: "PublishDetails",
92
+ });
93
+ export const IsoDateTimeString = DateTimeUtcSchema;
94
+ export const ExtensionVisibility = Schema.Literals(["public", "private"]).annotate({
95
+ title: "Extension Visibility",
96
+ description: "Whole-Extension Registry visibility applied to every published version.",
97
+ identifier: "ExtensionVisibility",
98
+ });
99
+ export const Sha256Hex = Schema.String.check(Schema.isPattern(new RegExp("^[a-f0-9]{64}$")).annotate({
100
+ expected: "a string matching the RegExp ^[a-f0-9]{64}$",
101
+ identifier: "Sha256Hex",
102
+ }));
103
+ export const Handle = Schema.String.annotate({
104
+ title: "Handle",
105
+ description: "A unique username or organization name starting with @, like @my-org.",
106
+ examples: ["@my-org", "@username"],
107
+ }).check(Schema.isPattern(new RegExp("^@[a-z0-9_](?:[a-z0-9_-]*[a-z0-9_])?$")).annotate({
108
+ expected: "a string matching the RegExp ^@[a-z0-9_](?:[a-z0-9_-]*[a-z0-9_])?$",
109
+ identifier: "Handle",
110
+ }));
111
+ export const ExtensionType = Schema.Literals([
112
+ "skill",
113
+ "mcp-server",
114
+ "subagent",
115
+ "rule",
116
+ "hook",
117
+ "knowledge",
118
+ "pack",
119
+ ]).annotate({
120
+ title: "Extension Type",
121
+ description: "What kind of extension this is: skill, mcp-server, subagent, rule, hook, knowledge, or pack.",
122
+ identifier: "ExtensionType",
123
+ });
124
+ export const ExtensionName = Schema.String.annotate({
125
+ title: "Extension Name",
126
+ description: "The name of an extension — lowercase letters, numbers, and hyphens (e.g. my-skill).",
127
+ examples: ["my-skill", "code-review", "prettier"],
128
+ })
129
+ .check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
130
+ .check(Schema.isPattern(new RegExp("^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$")).annotate({
131
+ expected: "a string matching the RegExp ^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$",
132
+ identifier: "ExtensionName",
133
+ }));
134
+ export const Version = Schema.String.annotate({
135
+ title: "Version",
136
+ description: "A semver version like 1.0.0. Ranges are not allowed here.",
137
+ examples: ["1.0.0", "2.3.1", "0.1.0-beta.1"],
138
+ }).check(Schema.isPattern(new RegExp("^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$")).annotate({
139
+ expected: "a string matching the RegExp ^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
140
+ identifier: "Version",
141
+ }));
142
+ export const ExtensionFqn = Schema.String.annotate({
143
+ title: "Extension FQN",
144
+ description: "Canonical extension identifier in @owner/<type>s/<name> form.",
145
+ examples: ["@acme/skills/code-review", "@my-org/rules/typescript"],
146
+ }).check(Schema.isPattern(new RegExp("^(@[a-z0-9_](?:[a-z0-9_-]*[a-z0-9_])?)\\/(skills|mcps|subagents|rules|hooks|knowledge|packs)\\/([a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?)$")).annotate({
147
+ expected: "a string matching the RegExp ^(@[a-z0-9_](?:[a-z0-9_-]*[a-z0-9_])?)\\/(skills|mcps|subagents|rules|hooks|knowledge|packs)\\/([a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?)$",
148
+ identifier: "ExtensionFqn",
149
+ }));
150
+ export const VisibilityFingerprint = Schema.String.check(Schema.isPattern(new RegExp("^[a-f0-9]{64}$")).annotate({
151
+ expected: "a string matching the RegExp ^[a-f0-9]{64}$",
152
+ identifier: "VisibilityFingerprint",
153
+ }));
154
+ export const VisibilityRevision = Schema.String.annotate({
155
+ description: "Opaque revision for conditional whole-Extension visibility mutation.",
156
+ }).check(Schema.isMinLength(1).annotate({
157
+ expected: "a value with a length of at least 1",
158
+ identifier: "VisibilityRevision",
159
+ }));
160
+ export const VisibilityComparison = Schema.Literals([
161
+ "not-established",
162
+ "unconfigured",
163
+ "match",
164
+ "drift",
165
+ ]).annotate({ identifier: "VisibilityComparison" });
166
+ export const VisibilityFindingCode = Schema.Literals([
167
+ "visibility/intent-conflict",
168
+ "visibility/drift",
169
+ "visibility/unavailable",
170
+ "visibility/intent-required",
171
+ "visibility/not-established",
172
+ "visibility/stale-source",
173
+ "visibility/stale-revision",
174
+ "visibility/confirmation-required",
175
+ "visibility/authorization-denied",
176
+ "visibility/impersonation-denied",
177
+ "visibility/verification-required",
178
+ "visibility/verification-expired",
179
+ "visibility/verification-cancelled",
180
+ "visibility/verification-replayed",
181
+ "visibility/pack-blocked",
182
+ ]).annotate({ identifier: "VisibilityFindingCode" });
183
+ export const VersionRange = Schema.String.annotate({
184
+ title: "Version Range",
185
+ description: 'A semver version range like ^1.0.0, ~2.3.0, >=1.0.0 <3.0.0, or an exact version 1.2.3. Use "*" to always resolve to the latest available version.',
186
+ examples: ["^1.0.0", "~2.4", ">=1 <3", "1.2.3", "*"],
187
+ })
188
+ .check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
189
+ .check(Schema.isPattern(new RegExp("^[~^<>=*xXvV0-9A-Za-z+| .-]+$")).annotate({
190
+ expected: "a string matching the RegExp ^[~^<>=*xXvV0-9A-Za-z+| .-]+$",
191
+ identifier: "VersionRange",
192
+ }));
193
+ export const DeprecationMessage = Schema.String.annotate({
194
+ description: "Concise publisher guidance for consumers of a deprecated extension.",
195
+ })
196
+ .check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
197
+ .check(Schema.isMaxLength(500).annotate({
198
+ expected: "a value with a length of at most 500",
199
+ identifier: "DeprecationMessage",
200
+ }));
201
+ export const SuggestedAction = Schema.Struct({
202
+ description: Schema.String,
203
+ cmd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
204
+ url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
205
+ }).annotate({ identifier: "SuggestedAction" });
206
+ export const TokenOAuthErrorEncoded = Schema.Struct({
207
+ kind: Schema.Literal("TokenOAuthError"),
208
+ error: Schema.Literals([
209
+ "invalid_request",
210
+ "invalid_client",
211
+ "invalid_grant",
212
+ "unauthorized_client",
213
+ "unsupported_grant_type",
214
+ "invalid_scope",
215
+ "authorization_pending",
216
+ "slow_down",
217
+ "expired_token",
218
+ "access_denied",
219
+ ]).annotate({ title: "OAuth Token Error", description: "OAuth token endpoint error code." }),
220
+ error_description: Schema.String.annotate({
221
+ description: "Human-readable explanation of the error.",
222
+ }),
223
+ }).annotate({ identifier: "TokenOAuthErrorEncoded" });
224
+ export const AuthWhoamiResponse = Schema.Struct({
225
+ handle: Schema.String.annotate({
226
+ description: "The authenticated user's registry handle.",
227
+ examples: ["@example"],
228
+ }),
229
+ }).annotate({
230
+ title: "Auth Whoami Response",
231
+ description: "Minimal identity response for login checks and CLI whoami.",
232
+ identifier: "AuthWhoamiResponse",
233
+ });
234
+ export const UserId = Schema.String.annotate({
235
+ title: "User ID",
236
+ description: "Identifies a registered user account. Assigned at sign-up and referenced by tokens, memberships, and audit trails.",
237
+ examples: ["user_01h455vb4pexka56gq5w2r7cpc"],
238
+ }).check(Schema.isPattern(new RegExp("^user_[0-7][0-9a-hjkmnp-tv-z]{25}$")).annotate({
239
+ expected: "a string matching the RegExp ^user_[0-7][0-9a-hjkmnp-tv-z]{25}$",
240
+ identifier: "UserId",
241
+ }));
242
+ export const ResourceRestrictions = Schema.Struct({
243
+ extensions: Schema.Union([Schema.Array(Schema.String), Schema.Null]).annotate({
244
+ description: "Extension patterns this token is limited to, or null if unrestricted.",
245
+ }),
246
+ }).annotate({
247
+ title: "Resource Restrictions",
248
+ description: "What this token is allowed to access.",
249
+ identifier: "ResourceRestrictions",
250
+ });
251
+ export const PublishAuthorizationRequestId = Schema.String.annotate({
252
+ title: "Publish Authorization Request ID",
253
+ description: "Identifies one exact browser-reviewed publish authorization request.",
254
+ examples: ["pubreq_01h455vb4pexka56gq5w2r7cpc"],
255
+ }).check(Schema.isPattern(new RegExp("^pubreq_[0-7][0-9a-hjkmnp-tv-z]{25}$")).annotate({
256
+ expected: "a string matching the RegExp ^pubreq_[0-7][0-9a-hjkmnp-tv-z]{25}$",
257
+ identifier: "PublishAuthorizationRequestId",
258
+ }));
259
+ export const TokenId = Schema.String.annotate({
260
+ title: "Token ID",
261
+ description: "Identifies an access token or personal access token (PAT) issued to a user. Used to authenticate API requests to the registry.",
262
+ examples: ["tok_01h455vb4pexka56gq5w2r7cpc"],
263
+ }).check(Schema.isPattern(new RegExp("^tok_[0-7][0-9a-hjkmnp-tv-z]{25}$")).annotate({
264
+ expected: "a string matching the RegExp ^tok_[0-7][0-9a-hjkmnp-tv-z]{25}$",
265
+ identifier: "TokenId",
266
+ }));
267
+ export const ScopeCheckDetails = Schema.Struct({
268
+ requiredScope: Schema.optionalKey(Schema.String.annotate({
269
+ description: "The scope required to perform the requested operation.",
270
+ })),
271
+ grantedScopes: Schema.Array(Schema.String).annotate({
272
+ description: "The scopes granted to the current credential.",
273
+ }),
274
+ }).annotate({
275
+ title: "Scope Check Details",
276
+ description: "Diagnostic details returned when a request is denied due to insufficient scopes.",
277
+ identifier: "ScopeCheckDetails",
278
+ });
279
+ export const AuthorizationDenyDetails = Schema.Struct({
280
+ requiredScope: Schema.optionalKey(Schema.String.annotate({
281
+ description: "The scope required to perform the requested operation.",
282
+ })),
283
+ tokenScopes: Schema.Array(Schema.String).annotate({
284
+ description: "The scopes present on the token used for the request.",
285
+ }),
286
+ requiredRole: Schema.optionalKey(Schema.String.annotate({ description: "The management role required, if applicable." })),
287
+ }).annotate({
288
+ title: "Authorization Deny Details",
289
+ description: "Diagnostic details returned when a request is denied due to insufficient authorization.",
290
+ identifier: "AuthorizationDenyDetails",
291
+ });
292
+ export const StepUpRequestId = Schema.String.annotate({
293
+ title: "Step-Up Request ID",
294
+ description: "Identifies one short-lived cross-channel authentication request.",
295
+ examples: ["step_01h455vb4pexka56gq5w2r7cpc"],
296
+ }).check(Schema.isPattern(new RegExp("^step_[0-7][0-9a-hjkmnp-tv-z]{25}$")).annotate({
297
+ expected: "a string matching the RegExp ^step_[0-7][0-9a-hjkmnp-tv-z]{25}$",
298
+ identifier: "StepUpRequestId",
299
+ }));
300
+ export const CreateTokenPermissionsRequest = Schema.Struct({
301
+ owners: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null]).annotate({
302
+ description: 'Owner selectors for extension permissions. Use full handles or "all".',
303
+ examples: [["@example"]],
304
+ })),
305
+ extensions: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null]).annotate({
306
+ description: "Extension selectors in @handle/<plural-type>/<name> form.",
307
+ examples: [["@example/skills/release-bot"]],
308
+ })),
309
+ permission: Schema.optionalKey(Schema.Union([Schema.Literals(["read", "publish", "admin"]), Schema.Null]).annotate({
310
+ description: "Extension-level permission to grant.",
311
+ })),
312
+ org_permission: Schema.optionalKey(Schema.Union([Schema.Literals(["read", "write", "admin"]), Schema.Null]).annotate({
313
+ description: "Organization-level permission to grant.",
314
+ })),
315
+ cidr: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null]).annotate({
316
+ description: "Optional CIDR allowlist for the token.",
317
+ })),
318
+ bypass_mfa: Schema.optionalKey(Schema.Union([Schema.Boolean, Schema.Null]).annotate({
319
+ description: "Whether this automation token bypasses step-up MFA.",
320
+ })),
321
+ }).annotate({
322
+ title: "Create Token Permissions Request",
323
+ description: "Structured permission request for the token.",
324
+ identifier: "CreateTokenPermissionsRequest",
325
+ });
326
+ export const IsoDateTimeString_1 = Schema.String.annotate({
327
+ title: "ISO Date-Time String",
328
+ description: "A date and time string (e.g. 2024-01-15T12:00:00.000Z).",
329
+ format: "date-time",
330
+ identifier: "IsoDateTimeString_1",
331
+ });
332
+ export const OwnerResponse = Schema.Struct({
333
+ displayName: Schema.String.annotate({ description: "Display name for the owner account." }),
334
+ }).annotate({
335
+ title: "Owner Response",
336
+ description: "Minimal owner summary for machine clients.",
337
+ identifier: "OwnerResponse",
338
+ });
339
+ export const Repository = Schema.Struct({
340
+ url: Schema.String.annotate({
341
+ description: "Canonical repository URL for the extension source.",
342
+ format: "uri",
343
+ }),
344
+ type: Schema.optionalKey(Schema.Union([
345
+ Schema.String.annotate({ description: "Repository type from the manifest, such as git." }),
346
+ Schema.Null,
347
+ ])),
348
+ directory: Schema.optionalKey(Schema.Union([
349
+ Schema.String.annotate({ description: "Subdirectory containing the extension source." }),
350
+ Schema.Null,
351
+ ])),
352
+ }).annotate({
353
+ title: "Repository",
354
+ description: "Repository details for an extension manifest.",
355
+ identifier: "Repository",
356
+ });
357
+ export const LicenseExpression = Schema.String.annotate({
358
+ title: "License Expression",
359
+ description: "SPDX license expression, or `UNLICENSED` for proprietary code.",
360
+ examples: ["MIT", "Apache-2.0", "MIT OR Apache-2.0", "UNLICENSED"],
361
+ format: "spdx-expression",
362
+ identifier: "LicenseExpression",
363
+ });
364
+ export const Author = Schema.Struct({
365
+ name: Schema.optionalKey(Schema.Union([
366
+ Schema.String.annotate({ description: "Display name of the extension author." }),
367
+ Schema.Null,
368
+ ])),
369
+ email: Schema.optionalKey(Schema.Union([
370
+ Schema.String.annotate({
371
+ description: "Contact email of the extension author.",
372
+ format: "email",
373
+ }),
374
+ Schema.Null,
375
+ ])),
376
+ url: Schema.optionalKey(Schema.Union([
377
+ Schema.String.annotate({
378
+ description: "URL for the extension author (homepage or profile).",
379
+ format: "uri",
380
+ }),
381
+ Schema.Null,
382
+ ])),
383
+ }).annotate({
384
+ title: "Author",
385
+ description: "Author details: name, email, and homepage URL.",
386
+ identifier: "Author",
387
+ });
388
+ export const Bugs = Schema.Struct({
389
+ url: Schema.optionalKey(Schema.Union([
390
+ Schema.String.annotate({
391
+ description: "Issue tracker URL for the extension.",
392
+ format: "uri",
393
+ }),
394
+ Schema.Null,
395
+ ])),
396
+ email: Schema.optionalKey(Schema.Union([
397
+ Schema.String.annotate({
398
+ description: "Contact email for reporting extension issues.",
399
+ format: "email",
400
+ }),
401
+ Schema.Null,
402
+ ])),
403
+ }).annotate({
404
+ title: "Bugs",
405
+ description: "Bug reporting details for an extension manifest.",
406
+ identifier: "Bugs",
407
+ });
408
+ export const PackageIdentityPurl = Schema.String.annotate({
409
+ title: "Package Identity Purl",
410
+ description: "A Package URL (purl) identity for a companion package. Companion package purls are identities, not pins: omit the purl @version segment and put compatibility constraints in versionRange.",
411
+ examples: ["pkg:npm/react", "pkg:pypi/requests", "pkg:cargo/serde"],
412
+ })
413
+ .check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" }))
414
+ .check(Schema.isPattern(new RegExp("^[Pp][Kk][Gg]:[a-zA-Z][a-zA-Z0-9.+-]*\\/.+$")).annotate({
415
+ expected: "a string matching the RegExp ^[Pp][Kk][Gg]:[a-zA-Z][a-zA-Z0-9.+-]*\\/.+$",
416
+ identifier: "PackageIdentityPurl",
417
+ }));
418
+ export const DeleteExtensionBody = Schema.Struct({
419
+ confirmation: Schema.String.annotate({
420
+ description: "Exact full Extension FQN typed by the owner to confirm deletion.",
421
+ }),
422
+ }).annotate({
423
+ title: "Delete Extension Body",
424
+ description: "High-intent confirmation for permanent whole-Extension deletion.",
425
+ identifier: "DeleteExtensionBody",
426
+ });
427
+ export const ExtensionDeletionOperationId = Schema.String.annotate({
428
+ title: "Extension Deletion Operation ID",
429
+ description: "Identifies a durable owner-requested whole-Extension deletion operation.",
430
+ examples: ["edel_01h455vb4pexka56gq5w2r7cpc"],
431
+ }).check(Schema.isPattern(new RegExp("^edel_[0-7][0-9a-hjkmnp-tv-z]{25}$")).annotate({
432
+ expected: "a string matching the RegExp ^edel_[0-7][0-9a-hjkmnp-tv-z]{25}$",
433
+ identifier: "ExtensionDeletionOperationId",
434
+ }));
435
+ export const Visibility = Schema.Literals(["public", "private"]).annotate({
436
+ title: "Visibility",
437
+ identifier: "Visibility",
438
+ });
439
+ export const PublishFindingLocation = Schema.Struct({
440
+ file: Schema.String,
441
+ line: Schema.optionalKey(Schema.Union([
442
+ Schema.Number.check(Schema.isFinite().annotate({ expected: "a finite number" })),
443
+ Schema.Literals(["Infinity", "-Infinity", "NaN"]),
444
+ ])),
445
+ column: Schema.optionalKey(Schema.Union([
446
+ Schema.Number.check(Schema.isFinite().annotate({ expected: "a finite number" })),
447
+ Schema.Literals(["Infinity", "-Infinity", "NaN"]),
448
+ ])),
449
+ byteOffset: Schema.optionalKey(Schema.Union([
450
+ Schema.Number.check(Schema.isFinite().annotate({ expected: "a finite number" })),
451
+ Schema.Literals(["Infinity", "-Infinity", "NaN"]),
452
+ ])),
453
+ byteLength: Schema.optionalKey(Schema.Union([
454
+ Schema.Number.check(Schema.isFinite().annotate({ expected: "a finite number" })),
455
+ Schema.Literals(["Infinity", "-Infinity", "NaN"]),
456
+ ])),
457
+ }).annotate({
458
+ title: "Finding Location",
459
+ description: "Accessor-relative location of a lint finding.",
460
+ identifier: "PublishFindingLocation",
461
+ });
462
+ export const ExtensionLinks = Schema.Struct({
463
+ html: Schema.String.annotate({ format: "uri" }),
464
+ }).annotate({
465
+ title: "Extension Links",
466
+ description: "Hyperlinks for an extension resource. `html` is the canonical web page URL.",
467
+ identifier: "ExtensionLinks",
468
+ });
469
+ export const SuggestedAction_1 = Schema.Struct({
470
+ description: Schema.String,
471
+ cmd: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
472
+ url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
473
+ }).annotate({ identifier: "SuggestedAction_1" });
474
+ export const PublishIdentityMismatchEntry = Schema.Struct({
475
+ field: Schema.Literals(["owner", "type", "name", "version"]),
476
+ urlPath: Schema.Union([Schema.String, Schema.Null]),
477
+ content: Schema.Union([Schema.String, Schema.Null]),
478
+ }).annotate({
479
+ title: "Identity Mismatch Entry",
480
+ description: "Single divergent identity field between URL-path and archive.",
481
+ identifier: "PublishIdentityMismatchEntry",
482
+ });
483
+ export const DeprecationRevision = Schema.String.annotate({
484
+ description: "Opaque publisher lifecycle revision used for conditional writes.",
485
+ }).check(Schema.isMinLength(1).annotate({
486
+ expected: "a value with a length of at least 1",
487
+ identifier: "DeprecationRevision",
488
+ }));
489
+ export const YankVersionBody = Schema.Struct({
490
+ category: Schema.optionalKey(Schema.Union([Schema.Literals(["broken", "security", "accidental", "other"]), Schema.Null])),
491
+ notice: Schema.optionalKey(Schema.Union([
492
+ Schema.String.check(Schema.isMaxLength(500).annotate({ expected: "a value with a length of at most 500" })),
493
+ Schema.Null,
494
+ ])),
495
+ }).annotate({
496
+ title: "Yank Version Body",
497
+ description: "Optional public context for yanking an extension version.",
498
+ identifier: "YankVersionBody",
499
+ });
500
+ export const YankAvailableVersionsBody = Schema.Struct({
501
+ selection: Schema.Literal("all-available"),
502
+ category: Schema.optionalKey(Schema.Union([Schema.Literals(["broken", "security", "accidental", "other"]), Schema.Null])),
503
+ notice: Schema.optionalKey(Schema.Union([
504
+ Schema.String.check(Schema.isMaxLength(500).annotate({ expected: "a value with a length of at most 500" })),
505
+ Schema.Null,
506
+ ])),
507
+ }).annotate({
508
+ title: "Yank Available Versions Body",
509
+ description: "Atomically yanks the snapshot of all currently available versions.",
510
+ identifier: "YankAvailableVersionsBody",
511
+ });
512
+ export const PublishPreviewBatchTooLargeHttpErrorEncoded = Schema.Struct({
513
+ kind: Schema.Literal("PublishPreviewBatchTooLargeHttpError"),
514
+ type: Schema.String,
515
+ title: Schema.String,
516
+ status: Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })),
517
+ detail: Schema.String,
518
+ instance: Schema.optionalKey(Schema.String),
519
+ code: Schema.Literal("publish/preflight-batch-too-large"),
520
+ max_items: Schema.Literal(100),
521
+ }).annotate({ identifier: "PublishPreviewBatchTooLargeHttpErrorEncoded" });
522
+ export const LibraryVisibility = Schema.Literals(["public", "private"]).annotate({
523
+ title: "Library Visibility",
524
+ identifier: "LibraryVisibility",
525
+ });
526
+ export const LibraryId = Schema.String.annotate({
527
+ title: "Library ID",
528
+ description: "Identifies an account-owned curated collection of extension identities in the registry.",
529
+ examples: ["lib_01h455vb4pexka56gq5w2r7cpc"],
530
+ }).check(Schema.isPattern(new RegExp("^lib_[0-7][0-9a-hjkmnp-tv-z]{25}$")).annotate({
531
+ expected: "a string matching the RegExp ^lib_[0-7][0-9a-hjkmnp-tv-z]{25}$",
532
+ identifier: "LibraryId",
533
+ }));
534
+ export const LibraryName = Schema.String.annotate({
535
+ title: "Library Name",
536
+ description: "Canonical Library name within an owner namespace. Uses the same normalized slug grammar as handles.",
537
+ examples: ["frontend", "team-tools"],
538
+ identifier: "LibraryName",
539
+ });
540
+ export const LibraryMemberId = Schema.String.annotate({
541
+ title: "Library Member ID",
542
+ description: "Identifies an extension identity membership inside a curated registry library.",
543
+ examples: ["lmem_01h455vb4pexka56gq5w2r7cpc"],
544
+ }).check(Schema.isPattern(new RegExp("^lmem_[0-7][0-9a-hjkmnp-tv-z]{25}$")).annotate({
545
+ expected: "a string matching the RegExp ^lmem_[0-7][0-9a-hjkmnp-tv-z]{25}$",
546
+ identifier: "LibraryMemberId",
547
+ }));
548
+ export const DebugStreamEventEncoded = Schema.String.annotate({
549
+ contentMediaType: "application/json",
550
+ identifier: "DebugStreamEventEncoded",
551
+ });
552
+ export const ProblemDetails = Schema.Struct({
553
+ type: Schema.String,
554
+ title: Schema.String,
555
+ status: Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })),
556
+ detail: Schema.String,
557
+ instance: Schema.optionalKey(Schema.String),
558
+ code: Schema.String,
559
+ details: Schema.optionalKey(PublishDetails),
560
+ }).annotate({
561
+ title: "Problem Details",
562
+ description: "RFC 9457 Problem Details payload for AgentXM Registry errors.",
563
+ identifier: "ProblemDetails",
564
+ });
565
+ export const PreconditionFailedErrorEncoded = Schema.Struct({
566
+ kind: Schema.Literal("PreconditionFailedError"),
567
+ type: Schema.String,
568
+ title: Schema.String,
569
+ status: Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })),
570
+ detail: Schema.String,
571
+ instance: Schema.optionalKey(Schema.String),
572
+ code: Schema.Literals([
573
+ "publish/precondition-changed",
574
+ "visibility/stale-revision",
575
+ "deprecation/stale-revision",
576
+ ]),
577
+ details: Schema.optionalKey(PublishDetails),
578
+ }).annotate({ identifier: "PreconditionFailedErrorEncoded" });
579
+ export const StepUpRequestStatusResponse = Schema.Struct({
580
+ status: Schema.Literals(["pending", "verified", "consumed", "cancelled", "expired"]),
581
+ expires_at: IsoDateTimeString,
582
+ }).annotate({
583
+ title: "Step-up Request Status Response",
584
+ identifier: "StepUpRequestStatusResponse",
585
+ });
586
+ export const PublishVisibility = Schema.Union([
587
+ Schema.Struct({
588
+ value: ExtensionVisibility,
589
+ disposition: Schema.Literal("establish"),
590
+ source: Schema.Literals(["manifest", "workspace", "explicit", "account", "platform"]),
591
+ }),
592
+ Schema.Struct({
593
+ value: ExtensionVisibility,
594
+ disposition: Schema.Literal("preserve"),
595
+ source: Schema.Literal("existing"),
596
+ }),
597
+ ]).annotate({
598
+ title: "Publish Visibility",
599
+ description: "Authoritative whole-Extension visibility and provenance resolved for a publication.",
600
+ identifier: "PublishVisibility",
601
+ });
602
+ export const PublicationTarget = Schema.Struct({
603
+ owner: Handle,
604
+ type: ExtensionType,
605
+ name: ExtensionName,
606
+ version: Version,
607
+ }).annotate({ identifier: "PublicationTarget" });
608
+ export const PublishIdentity = Schema.Struct({
609
+ owner: Handle,
610
+ type: ExtensionType,
611
+ name: ExtensionName,
612
+ version: Version,
613
+ }).annotate({
614
+ title: "Publish Identity",
615
+ description: "URL-path identity of the extension version under publish.",
616
+ identifier: "PublishIdentity",
617
+ });
618
+ export const DeprecationReplacement = Schema.Union([
619
+ Schema.Struct({ status: Schema.Literal("available"), fqn: ExtensionFqn }),
620
+ Schema.Struct({
621
+ status: Schema.Literal("unavailable"),
622
+ fqn: Schema.optionalKey(Schema.Union([ExtensionFqn, Schema.Null])),
623
+ }),
624
+ ]).annotate({
625
+ description: "Authorization-safe current availability of a recorded replacement identity.",
626
+ identifier: "DeprecationReplacement",
627
+ });
628
+ export const DeprecationReplacementIntent = Schema.Union([
629
+ Schema.Struct({ kind: Schema.Literal("clear") }),
630
+ Schema.Struct({ kind: Schema.Literal("set"), fqn: ExtensionFqn }),
631
+ Schema.Struct({ kind: Schema.Literal("preserve") }),
632
+ ]).annotate({ identifier: "DeprecationReplacementIntent" });
633
+ export const VisibilityIntent = Schema.Struct({
634
+ value: ExtensionVisibility,
635
+ source: Schema.Literals(["manifest", "workspace"]),
636
+ fingerprint: VisibilityFingerprint,
637
+ }).annotate({ identifier: "VisibilityIntent" });
638
+ export const VisibilityMutationAuthority = Schema.Union([
639
+ Schema.Struct({ kind: Schema.Literal("operator") }),
640
+ Schema.Struct({
641
+ kind: Schema.Literal("repository"),
642
+ source: Schema.Literals(["manifest", "workspace"]),
643
+ fingerprint: VisibilityFingerprint,
644
+ }),
645
+ ]).annotate({ identifier: "VisibilityMutationAuthority" });
646
+ export const VisibilityActual = Schema.Struct({
647
+ value: ExtensionVisibility,
648
+ revision: VisibilityRevision,
649
+ }).annotate({ identifier: "VisibilityActual" });
650
+ export const VisibilityFinding = Schema.Struct({
651
+ code: VisibilityFindingCode,
652
+ severity: Schema.Literals(["error", "warning"]),
653
+ message: Schema.String,
654
+ }).annotate({ identifier: "VisibilityFinding" });
655
+ export const PackDependencyDescriptor = Schema.Struct({
656
+ owner: Handle,
657
+ type: Schema.Literals(["hook", "knowledge", "mcp-server", "rule", "skill", "subagent"]),
658
+ name: ExtensionName,
659
+ range: VersionRange,
660
+ }).annotate({ identifier: "PackDependencyDescriptor" });
661
+ export const AuthMeUser = Schema.Struct({
662
+ id: UserId,
663
+ handle: Schema.String.annotate({
664
+ description: "The user's registry handle.",
665
+ examples: ["@example"],
666
+ }),
667
+ email: Schema.Union([
668
+ Schema.String.annotate({
669
+ description: "The user's email address, if available.",
670
+ format: "email",
671
+ }),
672
+ Schema.Null,
673
+ ]),
674
+ }).annotate({
675
+ title: "Authenticated User",
676
+ description: "Your profile information.",
677
+ identifier: "AuthMeUser",
678
+ });
679
+ export const AuthMeToken = Schema.Struct({
680
+ id: Schema.String.annotate({
681
+ description: "Opaque identifier of the credential used for this request.",
682
+ }),
683
+ type: Schema.Literals(["session", "pat", "oidc", "publish-capability"]).annotate({
684
+ title: "Token Type",
685
+ description: "The type of authentication token.",
686
+ }),
687
+ name: Schema.Union([
688
+ Schema.String.annotate({ description: "Human-readable name of the token, if assigned." }),
689
+ Schema.Null,
690
+ ]),
691
+ permissions: Schema.Union([
692
+ Schema.Json.annotate({ expected: "JSON value" }),
693
+ Schema.Null,
694
+ ]).annotate({ description: "Structured permissions associated with this token." }),
695
+ scopes: Schema.Array(Schema.String).annotate({ description: "Scopes granted to this token." }),
696
+ resource_restrictions: ResourceRestrictions,
697
+ expires_at: IsoDateTimeString,
698
+ }).annotate({
699
+ title: "Token Info",
700
+ description: "Details about the token you used to authenticate.",
701
+ identifier: "AuthMeToken",
702
+ });
703
+ export const TokenListItem = Schema.Struct({
704
+ id: TokenId,
705
+ name: Schema.Union([
706
+ Schema.String.annotate({ description: "Human-readable name of the token, if assigned." }),
707
+ Schema.Null,
708
+ ]),
709
+ type: Schema.String.annotate({ description: "Token type (e.g. 'pat', 'session')." }),
710
+ scopes: Schema.Array(Schema.String).annotate({ description: "Scopes granted to this token." }),
711
+ permissions: Schema.Union([
712
+ Schema.Json.annotate({ expected: "JSON value" }),
713
+ Schema.Null,
714
+ ]).annotate({ description: "Structured permissions associated with this token." }),
715
+ created_at: IsoDateTimeString,
716
+ expires_at: IsoDateTimeString,
717
+ last_used_at: Schema.Union([IsoDateTimeString, Schema.Null]),
718
+ }).annotate({
719
+ title: "Token List Item",
720
+ description: "Summary of an access token.",
721
+ identifier: "TokenListItem",
722
+ });
723
+ export const CreateTokenResponse = Schema.Struct({
724
+ id: TokenId,
725
+ token: Schema.String.annotate({
726
+ description: "The token value — save this, it won't be shown again.",
727
+ readOnly: true,
728
+ }),
729
+ name: Schema.String,
730
+ scopes: Schema.Array(Schema.String),
731
+ permissions: Schema.Json.annotate({ expected: "JSON value" }),
732
+ created_at: IsoDateTimeString,
733
+ expires_at: IsoDateTimeString,
734
+ }).annotate({
735
+ title: "Create Token Response",
736
+ description: "Your new access token. The token value is only shown once — save it now.",
737
+ identifier: "CreateTokenResponse",
738
+ });
739
+ export const ForbiddenErrorEncoded = Schema.Struct({
740
+ kind: Schema.Literal("ForbiddenError"),
741
+ type: Schema.String,
742
+ title: Schema.String,
743
+ status: Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })),
744
+ detail: Schema.String,
745
+ instance: Schema.optionalKey(Schema.String),
746
+ code: Schema.Literals([
747
+ "forbidden",
748
+ "insufficient_scope",
749
+ "resource_restriction",
750
+ "scope_escalation",
751
+ "gat_requires_session",
752
+ "recent_authentication_required",
753
+ "step_up_wrong_actor",
754
+ "team_create_not_authorized",
755
+ "team_delete_not_authorized",
756
+ "team_update_not_authorized",
757
+ "add_team_member_not_authorized",
758
+ "remove_team_member_not_authorized",
759
+ "change_team_member_role_not_authorized",
760
+ "library_mutation_not_authorized",
761
+ "team_extension_grant_delete_not_authorized",
762
+ "team_extension_grant_not_authorized",
763
+ "resource_group_create_not_authorized",
764
+ "resource_group_update_not_authorized",
765
+ "resource_group_delete_not_authorized",
766
+ "resource_group_access_not_authorized",
767
+ "resource_move_not_authorized",
768
+ "resource_access_not_authorized",
769
+ "access_policy_not_authorized",
770
+ "publish/quota-exceeded",
771
+ "publish/insufficient-scope",
772
+ "publish/resource-restriction",
773
+ "publish/handle-not-owned",
774
+ "publish/publish-forbidden",
775
+ "publish/capability-binding-mismatch",
776
+ "publish/capability-expired",
777
+ "publish/capability-revoked",
778
+ "publish/capability-consumed",
779
+ ]),
780
+ details: Schema.optionalKey(Schema.Union([ScopeCheckDetails, AuthorizationDenyDetails, PublishDetails])),
781
+ }).annotate({ identifier: "ForbiddenErrorEncoded" });
782
+ export const CreateTokenRequest = Schema.Struct({
783
+ name: Schema.String.annotate({
784
+ description: "Human-readable name for the token.",
785
+ examples: ["CI publish token"],
786
+ }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
787
+ permissions: CreateTokenPermissionsRequest,
788
+ expires_in: Schema.Number.annotate({
789
+ description: "How long the token lasts, in seconds (1 hour to 365 days).",
790
+ })
791
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
792
+ .check(Schema.isGreaterThanOrEqualTo(3600).annotate({
793
+ expected: "a value greater than or equal to 3600",
794
+ }))
795
+ .check(Schema.isLessThanOrEqualTo(31536000).annotate({
796
+ expected: "a value less than or equal to 31536000",
797
+ })),
798
+ }).annotate({
799
+ title: "Create Token Request",
800
+ description: "Request body for creating a new personal access token.",
801
+ identifier: "CreateTokenRequest",
802
+ });
803
+ export const StepUpRequiredErrorEncoded = Schema.Struct({
804
+ kind: Schema.Literal("StepUpRequiredError"),
805
+ type: Schema.String,
806
+ title: Schema.String,
807
+ status: Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })),
808
+ detail: Schema.String,
809
+ instance: Schema.optionalKey(Schema.String),
810
+ code: Schema.Literal("eotp"),
811
+ step_up: Schema.optionalKey(Schema.Struct({
812
+ request_id: StepUpRequestId,
813
+ verification_url: Schema.String,
814
+ status_url: Schema.String,
815
+ expires_at: IsoDateTimeString_1,
816
+ interval: Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })),
817
+ action: Schema.String,
818
+ target: Schema.String,
819
+ })),
820
+ max_age: Schema.optionalKey(Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" }))),
821
+ }).annotate({ identifier: "StepUpRequiredErrorEncoded" });
822
+ export const CompanionPackage = Schema.Struct({
823
+ purl: PackageIdentityPurl,
824
+ versionRange: Schema.optionalKey(Schema.Union([
825
+ Schema.String.annotate({
826
+ examples: ["vers:npm/>=18.0.0|<19.0.0", "vers:pypi/>=2.31.0", "vers:cargo/>=1.0.0"],
827
+ }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
828
+ Schema.Null,
829
+ ])),
830
+ }).annotate({
831
+ title: "Companion Package",
832
+ description: "A companion package purl identity with an optional VERS compatibility range.",
833
+ identifier: "CompanionPackage",
834
+ });
835
+ export const PublishLintFinding = Schema.Struct({
836
+ kind: Schema.Literals(["advisory", "autofixable"]),
837
+ ruleId: Schema.String,
838
+ severity: Schema.Literals(["error", "warning", "info"]),
839
+ message: Schema.String,
840
+ location: Schema.optionalKey(PublishFindingLocation),
841
+ path: Schema.String,
842
+ suggestions: Schema.Array(SuggestedAction),
843
+ }).annotate({
844
+ title: "Publish Lint Finding",
845
+ description: "One lint finding produced against the publish subject.",
846
+ identifier: "PublishLintFinding",
847
+ });
848
+ export const PublishLintFinding_1 = Schema.Struct({
849
+ kind: Schema.Literals(["advisory", "autofixable"]),
850
+ ruleId: Schema.String,
851
+ severity: Schema.Literals(["error", "warning", "info"]),
852
+ message: Schema.String,
853
+ location: Schema.optionalKey(PublishFindingLocation),
854
+ path: Schema.String,
855
+ suggestions: Schema.Array(SuggestedAction_1),
856
+ }).annotate({
857
+ title: "Publish Lint Finding",
858
+ description: "One lint finding produced against the publish subject.",
859
+ identifier: "PublishLintFinding_1",
860
+ });
861
+ export const Library = Schema.Struct({
862
+ id: LibraryId,
863
+ owner: Handle,
864
+ name: LibraryName,
865
+ title: Schema.String,
866
+ description: Schema.Union([Schema.String, Schema.Null]),
867
+ visibility: LibraryVisibility,
868
+ createdAt: IsoDateTimeString,
869
+ updatedAt: IsoDateTimeString,
870
+ }).annotate({ title: "Library", identifier: "Library" });
871
+ export const LibraryMember = Schema.Struct({
872
+ id: LibraryMemberId,
873
+ libraryId: LibraryId,
874
+ extensionId: Schema.String,
875
+ extensionOwner: Handle,
876
+ extensionType: ExtensionType,
877
+ extensionName: ExtensionName,
878
+ addedAt: IsoDateTimeString,
879
+ }).annotate({ title: "Library Member", identifier: "LibraryMember" });
880
+ export const SessionTokenResponse = Schema.Struct({
881
+ access_token: Schema.String.annotate({ description: "OAuth 2.0 access token." }),
882
+ refresh_token: Schema.optionalKey(Schema.Union([
883
+ Schema.String.annotate({
884
+ description: "OAuth 2.0 refresh token for obtaining new token pairs. Omitted for exact publish capabilities.",
885
+ }),
886
+ Schema.Null,
887
+ ])),
888
+ token_type: Schema.Literal("Bearer"),
889
+ expires_in: Schema.Number.annotate({
890
+ description: "Access token lifetime remaining in seconds.",
891
+ }).check(Schema.isInt().annotate({ expected: "an integer" })),
892
+ expires_at: IsoDateTimeString,
893
+ scope: Schema.optionalKey(Schema.Union([
894
+ Schema.String.annotate({ description: "Space-delimited list of granted scopes." }),
895
+ Schema.Null,
896
+ ])),
897
+ publish_request_id: Schema.optionalKey(Schema.Union([
898
+ Schema.String.annotate({
899
+ description: "Publish authorization request that produced a non-refreshable exact capability.",
900
+ }),
901
+ Schema.Null,
902
+ ])),
903
+ visibility_contract: Schema.optionalKey(Schema.Union([
904
+ Schema.Literal("v2").annotate({
905
+ description: "Visibility binding contract carried by an exact publish capability.",
906
+ }),
907
+ Schema.Null,
908
+ ])),
909
+ visibility: Schema.optionalKey(Schema.Union([PublishVisibility, Schema.Null])),
910
+ condition: Schema.optionalKey(Schema.Union([
911
+ Schema.String.annotate({
912
+ description: "Opaque reviewed publish condition to send as If-Match during upload.",
913
+ }),
914
+ Schema.Null,
915
+ ])),
916
+ publication_set_digest: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
917
+ publication_descriptor_digest: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
918
+ }).annotate({
919
+ title: "Session Token Response",
920
+ description: "OAuth 2.0 token response containing an access/refresh token pair.",
921
+ identifier: "SessionTokenResponse",
922
+ });
923
+ export const ExtensionIdentityMismatchErrorEncoded = Schema.Struct({
924
+ kind: Schema.Literal("ExtensionIdentityMismatchError"),
925
+ type: Schema.String,
926
+ title: Schema.String,
927
+ status: Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })),
928
+ detail: Schema.String,
929
+ instance: Schema.optionalKey(Schema.String),
930
+ code: Schema.Literal("extension_identity_mismatch"),
931
+ error: Schema.Literal("extension_identity_mismatch"),
932
+ identity: PublishIdentity,
933
+ mismatches: Schema.Array(PublishIdentityMismatchEntry),
934
+ }).annotate({ identifier: "ExtensionIdentityMismatchErrorEncoded" });
935
+ export const DeprecationView = Schema.Union([
936
+ Schema.Struct({
937
+ deprecatedAt: IsoDateTimeString,
938
+ message: DeprecationMessage,
939
+ replacement: Schema.optionalKey(Schema.Union([DeprecationReplacement, Schema.Null])),
940
+ }),
941
+ Schema.Struct({
942
+ deprecatedAt: IsoDateTimeString,
943
+ message: Schema.optionalKey(Schema.Union([DeprecationMessage, Schema.Null])),
944
+ replacement: DeprecationReplacement,
945
+ }),
946
+ ]).annotate({
947
+ description: "Canonical authorization-safe identity deprecation guidance.",
948
+ identifier: "DeprecationView",
949
+ });
950
+ export const PutDeprecationBody = Schema.Struct({
951
+ message: Schema.Union([
952
+ Schema.String.annotate({
953
+ description: "Publisher migration guidance, normalized by the Registry.",
954
+ }).check(Schema.isMaxLength(500).annotate({ expected: "a value with a length of at most 500" })),
955
+ Schema.Null,
956
+ ]),
957
+ replacement: DeprecationReplacementIntent,
958
+ }).annotate({ identifier: "PutDeprecationBody" });
959
+ export const PublicationVisibilityInput = Schema.Struct({
960
+ intent: Schema.Union([VisibilityIntent, Schema.Null]),
961
+ request: Schema.Union([ExtensionVisibility, Schema.Null]),
962
+ }).annotate({ identifier: "PublicationVisibilityInput" });
963
+ export const VisibilityMutationRequest = Schema.Struct({
964
+ target: ExtensionFqn,
965
+ visibility: ExtensionVisibility,
966
+ revision: VisibilityRevision,
967
+ authority: VisibilityMutationAuthority,
968
+ verification: Schema.optionalKey(Schema.Union([
969
+ Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
970
+ Schema.Null,
971
+ ])),
972
+ }).annotate({ identifier: "VisibilityMutationRequest" });
973
+ export const VisibilityMutationResult = Schema.Struct({
974
+ target: ExtensionFqn,
975
+ before: ExtensionVisibility,
976
+ after: ExtensionVisibility,
977
+ authority: VisibilityMutationAuthority,
978
+ result: Schema.Literals(["already-satisfied", "changed"]),
979
+ revision: VisibilityRevision,
980
+ }).annotate({ identifier: "VisibilityMutationResult" });
981
+ export const VisibilityEvaluation = Schema.Struct({
982
+ target: ExtensionFqn,
983
+ intent: Schema.Union([VisibilityIntent, Schema.Null]),
984
+ request: Schema.Union([ExtensionVisibility, Schema.Null]),
985
+ resolved: Schema.Union([PublishVisibility, Schema.Null]),
986
+ actual: Schema.Union([VisibilityActual, Schema.Null]),
987
+ comparison: VisibilityComparison,
988
+ findings: Schema.Array(VisibilityFinding),
989
+ }).annotate({ identifier: "VisibilityEvaluation" });
990
+ export const VisibilityEvaluationUnavailable = Schema.Struct({
991
+ target: ExtensionFqn,
992
+ unavailable: Schema.Literal(true),
993
+ findings: Schema.Array(VisibilityFinding),
994
+ }).annotate({ identifier: "VisibilityEvaluationUnavailable" });
995
+ export const PackDependencyResolution = Schema.Struct({
996
+ dependency: PackDependencyDescriptor,
997
+ effectiveVersion: Version,
998
+ }).annotate({ identifier: "PackDependencyResolution" });
999
+ export const AuthMeResponse = Schema.Struct({
1000
+ user: AuthMeUser,
1001
+ orgs: Schema.Tuple([]).annotate({
1002
+ description: "Organizations the user belongs to (reserved, currently empty).",
1003
+ }),
1004
+ token: AuthMeToken,
1005
+ }).annotate({
1006
+ title: "Auth Me Response",
1007
+ description: "Your user profile, organizations, and token details.",
1008
+ identifier: "AuthMeResponse",
1009
+ });
1010
+ export const TokenListResponse = Schema.Struct({
1011
+ tokens: Schema.Array(TokenListItem).annotate({
1012
+ description: "List of access tokens for the authenticated user.",
1013
+ }),
1014
+ has_more: Schema.Boolean.annotate({
1015
+ description: "Whether additional tokens exist beyond this page.",
1016
+ }),
1017
+ cursor: Schema.Union([
1018
+ Schema.String.annotate({ description: "Opaque cursor for fetching the next page of results." }),
1019
+ Schema.Null,
1020
+ ]),
1021
+ }).annotate({
1022
+ title: "Token List Response",
1023
+ description: "A page of your access tokens.",
1024
+ identifier: "TokenListResponse",
1025
+ });
1026
+ export const ExtensionLintFailedErrorEncoded = Schema.Struct({
1027
+ kind: Schema.Literal("ExtensionLintFailedError"),
1028
+ type: Schema.String,
1029
+ title: Schema.String,
1030
+ status: Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })),
1031
+ detail: Schema.String,
1032
+ instance: Schema.optionalKey(Schema.String),
1033
+ code: Schema.Literal("extension_lint_failed"),
1034
+ error: Schema.Literal("extension_lint_failed"),
1035
+ identity: PublishIdentity,
1036
+ displayRoot: Schema.String,
1037
+ findings: Schema.Array(PublishLintFinding_1),
1038
+ }).annotate({ identifier: "ExtensionLintFailedErrorEncoded" });
1039
+ export const LibraryDetail = Schema.Struct({
1040
+ library: Library,
1041
+ members: Schema.Array(LibraryMember),
1042
+ accessibleMemberCount: Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })).check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
1043
+ }).annotate({ title: "Library Detail", identifier: "LibraryDetail" });
1044
+ export const ListLibraryMembersResponse = Schema.Struct({
1045
+ members: Schema.Array(LibraryMember),
1046
+ total: Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })),
1047
+ limit: Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })),
1048
+ offset: Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })),
1049
+ viewerRelative: Schema.Literal(true),
1050
+ }).annotate({ title: "List Library Members Response", identifier: "ListLibraryMembersResponse" });
1051
+ export const PackDependencyFinding = Schema.Struct({
1052
+ kind: Schema.Literal("advisory"),
1053
+ ruleId: Schema.Literals(["pack/dependency-version-resolvable", "pack/dependency-deprecated"]),
1054
+ severity: Schema.Literals(["error", "warning"]),
1055
+ reason: Schema.Literals([
1056
+ "selected-new-private",
1057
+ "selected-existing-private",
1058
+ "target-unavailable",
1059
+ "lifecycle-unavailable",
1060
+ "no-installable-version",
1061
+ "range-unsatisfied",
1062
+ "deprecated",
1063
+ ]),
1064
+ dependency: PackDependencyDescriptor,
1065
+ effectiveVisibility: Schema.optionalKey(Schema.Union([Schema.Literals(["public", "private"]), Schema.Null])),
1066
+ lifecycle: Schema.optionalKey(Schema.Union([Schema.Literals(["active", "unavailable"]), Schema.Null])),
1067
+ deprecation: Schema.optionalKey(Schema.Union([DeprecationView, Schema.Null])),
1068
+ location: Schema.Struct({ file: Schema.Literal("pack.json") }),
1069
+ path: Schema.Literal("./pack.json"),
1070
+ message: Schema.String,
1071
+ suggestions: Schema.Array(SuggestedAction),
1072
+ }).annotate({ identifier: "PackDependencyFinding" });
1073
+ export const DeprecationManagementView = Schema.Struct({
1074
+ deprecation: Schema.Union([DeprecationView, Schema.Null]),
1075
+ revision: DeprecationRevision,
1076
+ }).annotate({ identifier: "DeprecationManagementView" });
1077
+ export const DeprecationTransition = Schema.Struct({
1078
+ target: ExtensionFqn,
1079
+ before: Schema.Union([DeprecationView, Schema.Null]),
1080
+ after: Schema.Union([DeprecationView, Schema.Null]),
1081
+ disposition: Schema.Literals(["created", "edited", "restored", "unchanged"]),
1082
+ revision: DeprecationRevision,
1083
+ }).annotate({ identifier: "DeprecationTransition" });
1084
+ export const SearchHit = Schema.Struct({
1085
+ name: ExtensionName,
1086
+ owner: Handle,
1087
+ type: ExtensionType,
1088
+ latestVersion: Version,
1089
+ description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1090
+ repository: Schema.optionalKey(Schema.Union([Repository, Schema.Null])),
1091
+ license: Schema.optionalKey(Schema.Union([LicenseExpression, Schema.Null])),
1092
+ authors: Schema.optionalKey(Schema.Union([Schema.Array(Author), Schema.Null])),
1093
+ deprecation: Schema.Union([DeprecationView, Schema.Null]),
1094
+ matched_fields: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
1095
+ visibility: Schema.Literals(["public", "private"]),
1096
+ }).annotate({
1097
+ title: "Search Hit",
1098
+ description: "A single extension matched by a search query.",
1099
+ identifier: "SearchHit",
1100
+ });
1101
+ export const PublicationDescriptor = Schema.Struct({
1102
+ target: PublicationTarget,
1103
+ participation: Schema.Literals(["publish", "verified-existing"]),
1104
+ archiveSha256Hex: Schema.optionalKey(Schema.Union([Sha256Hex, Schema.Null])),
1105
+ visibility: PublicationVisibilityInput,
1106
+ pack: Schema.optionalKey(Schema.Union([
1107
+ Schema.Struct({ dependencies: Schema.Array(PackDependencyDescriptor) }),
1108
+ Schema.Null,
1109
+ ])),
1110
+ }).annotate({ identifier: "PublicationDescriptor" });
1111
+ export const PreviewPublicationSetResponse = Schema.Struct({
1112
+ contract: Schema.Literal("publication-set-v2"),
1113
+ publicationSetDigest: Sha256Hex,
1114
+ status: Schema.Literals(["admitted", "blocked"]),
1115
+ candidates: Schema.Array(Schema.Union([
1116
+ Schema.Struct({
1117
+ kind: Schema.Literal("resolved"),
1118
+ target: PublicationTarget,
1119
+ participation: Schema.Literals(["publish", "verified-existing"]),
1120
+ descriptorDigest: Sha256Hex,
1121
+ visibility: VisibilityEvaluation,
1122
+ condition: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1123
+ }),
1124
+ Schema.Struct({
1125
+ kind: Schema.Literal("unavailable"),
1126
+ target: PublicationTarget,
1127
+ participation: Schema.Literals(["publish", "verified-existing"]),
1128
+ descriptorDigest: Sha256Hex,
1129
+ code: Schema.Literal("publish/target-unavailable"),
1130
+ visibility: VisibilityEvaluationUnavailable,
1131
+ }),
1132
+ ])),
1133
+ packs: Schema.Array(Schema.Struct({
1134
+ target: PublicationTarget,
1135
+ status: Schema.Literals(["admitted", "blocked"]),
1136
+ findings: Schema.Array(PackDependencyFinding),
1137
+ resolutions: Schema.Array(PackDependencyResolution),
1138
+ })),
1139
+ }).annotate({ identifier: "PreviewPublicationSetResponse" });
1140
+ export const SearchResponse = Schema.Struct({
1141
+ extensions: Schema.Array(SearchHit).annotate({
1142
+ description: "Extensions matching the query, ordered by recency.",
1143
+ }),
1144
+ has_more: Schema.Boolean.annotate({
1145
+ description: "Whether additional results exist beyond this page.",
1146
+ }),
1147
+ cursor: Schema.Union([
1148
+ Schema.String.annotate({ description: "Opaque cursor for fetching the next page of results." }),
1149
+ Schema.Null,
1150
+ ]),
1151
+ total: Schema.Number.annotate({
1152
+ description: "Exact number of viewer-visible extensions matching the query.",
1153
+ })
1154
+ .check(Schema.isInt().annotate({ expected: "an integer" }))
1155
+ .check(Schema.isGreaterThanOrEqualTo(0).annotate({ expected: "a value greater than or equal to 0" })),
1156
+ total_relation: Schema.Literal("exact"),
1157
+ }).annotate({
1158
+ title: "Search Response",
1159
+ description: "A page of extensions matching the search query.",
1160
+ identifier: "SearchResponse",
1161
+ });
1162
+ export const PreviewPublicationSetRequest = Schema.Struct({
1163
+ contract: Schema.Literal("publication-set-v2"),
1164
+ candidates: Schema.Array(PublicationDescriptor),
1165
+ }).annotate({ identifier: "PreviewPublicationSetRequest" });
1166
+ export const PublishAuthorizationExchangeResponse = Schema.Union([
1167
+ Schema.Struct({
1168
+ status: Schema.Literal("admitted"),
1169
+ preview: Schema.optionalKey(Schema.Union([PreviewPublicationSetResponse, Schema.Null])),
1170
+ grants: Schema.Array(SessionTokenResponse),
1171
+ }),
1172
+ Schema.Struct({
1173
+ status: Schema.Literal("blocked"),
1174
+ preview: PreviewPublicationSetResponse,
1175
+ grants: Schema.Tuple([]),
1176
+ }),
1177
+ ]).annotate({ identifier: "PublishAuthorizationExchangeResponse" });
1178
+ export const MetaGet200 = MetaResponse;
1179
+ export const MetaGet400 = DecodeErrorResponseEncoded;
1180
+ export const AuthIssueDeviceCodeRequestFormUrlEncoded = Schema.Struct({
1181
+ client_id: Schema.String.annotate({
1182
+ description: "OAuth public client identifier.",
1183
+ examples: ["example-client"],
1184
+ }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
1185
+ scope: Schema.optionalKey(Schema.Union([
1186
+ Schema.String.annotate({
1187
+ description: "Optional space-delimited registry scopes requested by the client.",
1188
+ }),
1189
+ Schema.Null,
1190
+ ])),
1191
+ });
1192
+ export const AuthIssueDeviceCode200 = DeviceCodeResponse;
1193
+ export const AuthIssueDeviceCode400 = Schema.Union([
1194
+ DeviceCodeOAuthError,
1195
+ DecodeErrorResponseEncoded,
1196
+ ]);
1197
+ export const AuthIssueDeviceCode500 = ProblemDetails;
1198
+ export const AuthExchangeTokenRequestFormUrlEncoded = Schema.Struct({
1199
+ grant_type: Schema.String.annotate({
1200
+ description: "OAuth grant type.",
1201
+ examples: [
1202
+ "authorization_code",
1203
+ "urn:ietf:params:oauth:grant-type:device_code",
1204
+ "refresh_token",
1205
+ ],
1206
+ }),
1207
+ code: Schema.optionalKey(Schema.Union([
1208
+ Schema.String.annotate({
1209
+ description: "Authorization code returned to the loopback callback.",
1210
+ }),
1211
+ Schema.Null,
1212
+ ])),
1213
+ code_verifier: Schema.optionalKey(Schema.Union([
1214
+ Schema.String.annotate({ description: "PKCE verifier generated by the CLI." }),
1215
+ Schema.Null,
1216
+ ])),
1217
+ client_id: Schema.optionalKey(Schema.Union([
1218
+ Schema.String.annotate({
1219
+ description: "OAuth client identifier.",
1220
+ examples: ["example-client"],
1221
+ }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
1222
+ Schema.Null,
1223
+ ])),
1224
+ redirect_uri: Schema.optionalKey(Schema.Union([
1225
+ Schema.String.annotate({
1226
+ description: "Loopback redirect URI the authorization code was bound to.",
1227
+ }),
1228
+ Schema.Null,
1229
+ ])),
1230
+ device_code: Schema.optionalKey(Schema.Union([
1231
+ Schema.String.annotate({
1232
+ description: "The device verification code received from the /device/code endpoint.",
1233
+ }),
1234
+ Schema.Null,
1235
+ ])),
1236
+ refresh_token: Schema.optionalKey(Schema.Union([
1237
+ Schema.String.annotate({ description: "Refresh token to exchange for a new token pair." }),
1238
+ Schema.Null,
1239
+ ])),
1240
+ scope: Schema.optionalKey(Schema.Union([
1241
+ Schema.String.annotate({
1242
+ description: "Optional requested scope for refresh-token exchange.",
1243
+ }),
1244
+ Schema.Null,
1245
+ ])),
1246
+ });
1247
+ export const AuthExchangeToken200 = Schema.Union([
1248
+ SessionTokenResponse,
1249
+ PublishAuthorizationExchangeResponse,
1250
+ ]);
1251
+ export const AuthExchangeToken400 = Schema.Union([
1252
+ Schema.Union([ProblemDetails, DecodeErrorResponseEncoded]),
1253
+ TokenOAuthErrorEncoded,
1254
+ ]);
1255
+ export const AuthExchangeToken503 = ProblemDetails;
1256
+ export const AuthRevokeOAuthTokenRequestFormUrlEncoded = Schema.Struct({
1257
+ token: Schema.String.annotate({
1258
+ description: "The access token or refresh token to revoke. Revocation is idempotent.",
1259
+ }).check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
1260
+ token_type_hint: Schema.optionalKey(Schema.Union([
1261
+ Schema.Literals(["refresh_token", "access_token"]).annotate({
1262
+ description: "Optional RFC 7009 token type hint. Revocation remains non-enumerating.",
1263
+ }),
1264
+ Schema.Null,
1265
+ ])),
1266
+ });
1267
+ export const AuthRevokeOAuthToken400 = DecodeErrorResponseEncoded;
1268
+ export const AuthRevokeOAuthToken503 = ProblemDetails;
1269
+ export const AuthGetWhoami200 = AuthWhoamiResponse;
1270
+ export const AuthGetWhoami400 = DecodeErrorResponseEncoded;
1271
+ export const AuthGetWhoami401 = ProblemDetails;
1272
+ export const AuthGetMe200 = AuthMeResponse;
1273
+ export const AuthGetMe400 = DecodeErrorResponseEncoded;
1274
+ export const AuthGetMe401 = ProblemDetails;
1275
+ export const AuthGetStepUpRequest200 = StepUpRequestStatusResponse;
1276
+ export const AuthGetStepUpRequest400 = DecodeErrorResponseEncoded;
1277
+ export const AuthGetStepUpRequest401 = ProblemDetails;
1278
+ export const AuthGetStepUpRequest404 = ProblemDetails;
1279
+ export const AuthCreatePublishAuthorizationRequestRequestJson = Schema.Struct({
1280
+ client_id: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
1281
+ redirect_uri: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
1282
+ state: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
1283
+ code_challenge: Schema.String.check(Schema.isMinLength(1).annotate({ expected: "a value with a length of at least 1" })),
1284
+ code_challenge_method: Schema.Literal("S256"),
1285
+ publication_set: PreviewPublicationSetRequest,
1286
+ });
1287
+ export const AuthCreatePublishAuthorizationRequest201 = Schema.Struct({
1288
+ request_id: PublishAuthorizationRequestId,
1289
+ authorization_url: Schema.String,
1290
+ expires_at: IsoDateTimeString,
1291
+ });
1292
+ export const AuthCreatePublishAuthorizationRequest400 = Schema.Union([
1293
+ ProblemDetails,
1294
+ DecodeErrorResponseEncoded,
1295
+ ]);
1296
+ export const TokensListParams = Schema.Struct({
1297
+ cursor: Schema.optionalKey(Schema.Union([
1298
+ Schema.String.annotate({
1299
+ description: "Opaque cursor from a previous response for pagination.",
1300
+ }),
1301
+ Schema.Null,
1302
+ ])),
1303
+ limit: Schema.optionalKey(Schema.Union([
1304
+ Schema.String.annotate({
1305
+ description: "Maximum number of tokens to return (1–100, default 50).",
1306
+ }),
1307
+ Schema.Null,
1308
+ ])),
1309
+ });
1310
+ export const TokensList200 = TokenListResponse;
1311
+ export const TokensList400 = DecodeErrorResponseEncoded;
1312
+ export const TokensList401 = ProblemDetails;
1313
+ export const TokensList403 = ForbiddenErrorEncoded;
1314
+ export const TokensCreateParams = Schema.Struct({
1315
+ "x-axm-step-up-request": Schema.optionalKey(Schema.Union([StepUpRequestId, Schema.Null])),
1316
+ });
1317
+ export const TokensCreateRequestJson = CreateTokenRequest;
1318
+ export const TokensCreate201 = CreateTokenResponse;
1319
+ export const TokensCreate400 = DecodeErrorResponseEncoded;
1320
+ export const TokensCreate401 = Schema.Union([StepUpRequiredErrorEncoded, ProblemDetails]);
1321
+ export const TokensCreate403 = Schema.Union([ForbiddenErrorEncoded, ForbiddenErrorEncoded]);
1322
+ export const TokensCreate404 = ProblemDetails;
1323
+ export const TokensCreate409 = ProblemDetails;
1324
+ export const TokensCreate410 = ProblemDetails;
1325
+ export const TokensCreate422 = ProblemDetails;
1326
+ export const TokensDelete400 = DecodeErrorResponseEncoded;
1327
+ export const TokensDelete401 = ProblemDetails;
1328
+ export const TokensDelete403 = ForbiddenErrorEncoded;
1329
+ export const OwnersGetOwner200 = OwnerResponse;
1330
+ export const OwnersGetOwner400 = DecodeErrorResponseEncoded;
1331
+ export const OwnersGetOwner404 = ProblemDetails;
1332
+ export const ExtensionsListByOwner200 = Schema.Struct({
1333
+ extensions: Schema.Array(Schema.Struct({
1334
+ name: ExtensionName,
1335
+ owner: Handle,
1336
+ type: ExtensionType,
1337
+ latestVersion: Version,
1338
+ description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1339
+ repository: Schema.optionalKey(Schema.Union([Repository, Schema.Null])),
1340
+ license: Schema.optionalKey(Schema.Union([LicenseExpression, Schema.Null])),
1341
+ authors: Schema.optionalKey(Schema.Union([Schema.Array(Author), Schema.Null])),
1342
+ visibility: Schema.optionalKey(Schema.Union([Schema.String.annotate({ readOnly: true }), Schema.Null])),
1343
+ deprecation: Schema.Union([DeprecationView, Schema.Null]),
1344
+ })),
1345
+ });
1346
+ export const ExtensionsListByOwner400 = DecodeErrorResponseEncoded;
1347
+ export const ExtensionsListByTypeParams = Schema.Struct({
1348
+ limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1349
+ offset: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1350
+ });
1351
+ export const ExtensionsListByType200 = Schema.Struct({
1352
+ extensions: Schema.Array(Schema.Struct({
1353
+ name: ExtensionName,
1354
+ owner: Handle,
1355
+ type: ExtensionType,
1356
+ latestVersion: Version,
1357
+ description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1358
+ repository: Schema.optionalKey(Schema.Union([Repository, Schema.Null])),
1359
+ license: Schema.optionalKey(Schema.Union([LicenseExpression, Schema.Null])),
1360
+ authors: Schema.optionalKey(Schema.Union([Schema.Array(Author), Schema.Null])),
1361
+ visibility: Schema.optionalKey(Schema.Union([Schema.String.annotate({ readOnly: true }), Schema.Null])),
1362
+ deprecation: Schema.Union([DeprecationView, Schema.Null]),
1363
+ })),
1364
+ total: Schema.Union([
1365
+ Schema.Number.check(Schema.isFinite().annotate({ expected: "a finite number" })),
1366
+ Schema.Literals(["Infinity", "-Infinity", "NaN"]),
1367
+ ]),
1368
+ });
1369
+ export const ExtensionsListByType400 = DecodeErrorResponseEncoded;
1370
+ export const ExtensionsGet200 = Schema.Struct({
1371
+ name: ExtensionName,
1372
+ owner: Handle,
1373
+ type: ExtensionType,
1374
+ publisher_binding_id: Schema.String.annotate({ readOnly: true }),
1375
+ description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1376
+ repository: Schema.optionalKey(Schema.Union([Repository, Schema.Null])),
1377
+ bugs: Schema.optionalKey(Schema.Union([Bugs, Schema.Null])),
1378
+ license: Schema.optionalKey(Schema.Union([LicenseExpression, Schema.Null])),
1379
+ authors: Schema.optionalKey(Schema.Union([Schema.Array(Author), Schema.Null])),
1380
+ versions: Schema.Array(Schema.Struct({
1381
+ version: Version,
1382
+ published: IsoDateTimeString,
1383
+ integrity: Schema.String.annotate({ readOnly: true }),
1384
+ dependencies: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, VersionRange), Schema.Null])),
1385
+ packages: Schema.optionalKey(Schema.Union([Schema.Array(CompanionPackage), Schema.Null])),
1386
+ yanked_at: Schema.optionalKey(Schema.Union([IsoDateTimeString, Schema.Null])),
1387
+ yank_category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1388
+ yank_notice: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1389
+ })),
1390
+ visibility: Schema.optionalKey(Schema.Union([
1391
+ Schema.Literals(["public", "private"]).annotate({ readOnly: true }),
1392
+ Schema.Null,
1393
+ ])),
1394
+ deprecation: Schema.Union([DeprecationView, Schema.Null]),
1395
+ });
1396
+ export const ExtensionsGet400 = DecodeErrorResponseEncoded;
1397
+ export const ExtensionsGet404 = ProblemDetails;
1398
+ export const ExtensionsDeleteExtensionParams = Schema.Struct({
1399
+ "x-axm-step-up-request": Schema.optionalKey(Schema.Union([StepUpRequestId, Schema.Null])),
1400
+ });
1401
+ export const ExtensionsDeleteExtensionRequestJson = DeleteExtensionBody;
1402
+ export const ExtensionsDeleteExtension202 = Schema.Struct({
1403
+ operationId: ExtensionDeletionOperationId,
1404
+ state: Schema.Literal("pending"),
1405
+ requiredConfirmation: Schema.String,
1406
+ warnings: Schema.Struct({
1407
+ versions: Schema.Array(Schema.String),
1408
+ dependentPackCount: Schema.Union([
1409
+ Schema.Number.check(Schema.isFinite().annotate({ expected: "a finite number" })),
1410
+ Schema.Literals(["Infinity", "-Infinity", "NaN"]),
1411
+ ]),
1412
+ libraryMembershipCount: Schema.Union([
1413
+ Schema.Number.check(Schema.isFinite().annotate({ expected: "a finite number" })),
1414
+ Schema.Literals(["Infinity", "-Infinity", "NaN"]),
1415
+ ]),
1416
+ downloadCount: Schema.Union([
1417
+ Schema.Union([
1418
+ Schema.Number.check(Schema.isFinite().annotate({ expected: "a finite number" })),
1419
+ Schema.Literals(["Infinity", "-Infinity", "NaN"]),
1420
+ ]),
1421
+ Schema.Null,
1422
+ ]),
1423
+ }),
1424
+ });
1425
+ export const ExtensionsDeleteExtension400 = Schema.Union([
1426
+ ProblemDetails,
1427
+ DecodeErrorResponseEncoded,
1428
+ ]);
1429
+ export const ExtensionsDeleteExtension401 = Schema.Union([
1430
+ StepUpRequiredErrorEncoded,
1431
+ ProblemDetails,
1432
+ ]);
1433
+ export const ExtensionsDeleteExtension403 = Schema.Union([
1434
+ ForbiddenErrorEncoded,
1435
+ ForbiddenErrorEncoded,
1436
+ ]);
1437
+ export const ExtensionsDeleteExtension404 = ProblemDetails;
1438
+ export const ExtensionsDeleteExtension409 = ProblemDetails;
1439
+ export const ExtensionsDeleteExtension410 = ProblemDetails;
1440
+ export const ExtensionsUpdateVisibilityParams = Schema.Struct({
1441
+ "x-axm-step-up-request": Schema.optionalKey(Schema.Union([StepUpRequestId, Schema.Null])),
1442
+ "if-match": Schema.String,
1443
+ });
1444
+ export const ExtensionsUpdateVisibilityRequestJson = VisibilityMutationRequest;
1445
+ export const ExtensionsUpdateVisibility200 = VisibilityMutationResult;
1446
+ export const ExtensionsUpdateVisibility400 = Schema.Union([
1447
+ ProblemDetails,
1448
+ DecodeErrorResponseEncoded,
1449
+ ]);
1450
+ export const ExtensionsUpdateVisibility401 = Schema.Union([
1451
+ StepUpRequiredErrorEncoded,
1452
+ ProblemDetails,
1453
+ ]);
1454
+ export const ExtensionsUpdateVisibility403 = Schema.Union([
1455
+ ForbiddenErrorEncoded,
1456
+ ForbiddenErrorEncoded,
1457
+ ]);
1458
+ export const ExtensionsUpdateVisibility404 = ProblemDetails;
1459
+ export const ExtensionsUpdateVisibility409 = ProblemDetails;
1460
+ export const ExtensionsUpdateVisibility410 = ProblemDetails;
1461
+ export const ExtensionsUpdateVisibility412 = PreconditionFailedErrorEncoded;
1462
+ export const ExtensionsGetVersion200 = Schema.Struct({
1463
+ name: ExtensionName,
1464
+ owner: Handle,
1465
+ type: ExtensionType,
1466
+ publisher_binding_id: Schema.String.annotate({ readOnly: true }),
1467
+ version: Version,
1468
+ status: Schema.Literal("available").annotate({ readOnly: true }),
1469
+ published: IsoDateTimeString,
1470
+ integrity: Schema.String.annotate({ readOnly: true }),
1471
+ description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1472
+ repository: Schema.optionalKey(Schema.Union([Repository, Schema.Null])),
1473
+ bugs: Schema.optionalKey(Schema.Union([Bugs, Schema.Null])),
1474
+ license: Schema.optionalKey(Schema.Union([LicenseExpression, Schema.Null])),
1475
+ authors: Schema.optionalKey(Schema.Union([Schema.Array(Author), Schema.Null])),
1476
+ dependencies: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, VersionRange), Schema.Null])),
1477
+ packages: Schema.optionalKey(Schema.Union([Schema.Array(CompanionPackage), Schema.Null])),
1478
+ metadata: Schema.optionalKey(Schema.Union([
1479
+ Schema.Record(Schema.String, Schema.Never).annotate({
1480
+ title: "Extension Metadata",
1481
+ description: "Opaque consumer-defined JSON metadata. The compact UTF-8 JSON representation is limited to 65,536 bytes and container depth 16.",
1482
+ }),
1483
+ Schema.Null,
1484
+ ])),
1485
+ yanked_at: Schema.optionalKey(Schema.Union([IsoDateTimeString, Schema.Null])),
1486
+ yank_category: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1487
+ yank_notice: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1488
+ });
1489
+ export const ExtensionsGetVersion400 = DecodeErrorResponseEncoded;
1490
+ export const ExtensionsGetVersion404 = ProblemDetails;
1491
+ export const ExtensionsGetVersion410 = ProblemDetails;
1492
+ export const ExtensionsPublishVersionParams = Schema.Struct({
1493
+ "if-match": Schema.String,
1494
+ "x-axm-publication-set-digest": Sha256Hex,
1495
+ "x-axm-publication-descriptor-digest": Sha256Hex,
1496
+ "x-axm-visibility-input": Schema.String,
1497
+ visibility: Schema.optionalKey(Schema.Union([Visibility, Schema.Null])),
1498
+ });
1499
+ export const ExtensionsPublishVersion200 = Schema.Struct({
1500
+ owner: Handle,
1501
+ type: ExtensionType,
1502
+ name: ExtensionName,
1503
+ version: Version,
1504
+ integrity: Schema.String.annotate({ readOnly: true }),
1505
+ sha256_hex: Schema.String.annotate({ readOnly: true }),
1506
+ published_at: IsoDateTimeString,
1507
+ publish_status: Schema.Literal("available").annotate({ readOnly: true }),
1508
+ visibility: PublishVisibility,
1509
+ warnings: Schema.Array(PublishLintFinding).annotate({ readOnly: true }),
1510
+ links: ExtensionLinks,
1511
+ });
1512
+ export const ExtensionsPublishVersion201 = Schema.Struct({
1513
+ owner: Handle,
1514
+ type: ExtensionType,
1515
+ name: ExtensionName,
1516
+ version: Version,
1517
+ integrity: Schema.String.annotate({ readOnly: true }),
1518
+ sha256_hex: Schema.String.annotate({ readOnly: true }),
1519
+ published_at: IsoDateTimeString,
1520
+ publish_status: Schema.Literal("available").annotate({ readOnly: true }),
1521
+ visibility: PublishVisibility,
1522
+ warnings: Schema.Array(PublishLintFinding).annotate({ readOnly: true }),
1523
+ links: ExtensionLinks,
1524
+ });
1525
+ export const ExtensionsPublishVersion400 = Schema.Union([
1526
+ ProblemDetails,
1527
+ DecodeErrorResponseEncoded,
1528
+ ]);
1529
+ export const ExtensionsPublishVersion401 = ProblemDetails;
1530
+ export const ExtensionsPublishVersion403 = Schema.Union([
1531
+ ForbiddenErrorEncoded,
1532
+ ForbiddenErrorEncoded,
1533
+ ]);
1534
+ export const ExtensionsPublishVersion404 = ProblemDetails;
1535
+ export const ExtensionsPublishVersion409 = ProblemDetails;
1536
+ export const ExtensionsPublishVersion412 = PreconditionFailedErrorEncoded;
1537
+ export const ExtensionsPublishVersion413 = ProblemDetails;
1538
+ export const ExtensionsPublishVersion415 = ProblemDetails;
1539
+ export const ExtensionsPublishVersion422 = Schema.Union([
1540
+ ProblemDetails,
1541
+ ExtensionLintFailedErrorEncoded,
1542
+ ExtensionIdentityMismatchErrorEncoded,
1543
+ ]);
1544
+ export const ExtensionsPublishVersion500 = ProblemDetails;
1545
+ export const ExtensionsPublishVersion503 = ProblemDetails;
1546
+ export const ExtensionsGetDeletionOperation200 = Schema.Struct({
1547
+ id: ExtensionDeletionOperationId,
1548
+ owner: Handle,
1549
+ type: ExtensionType,
1550
+ name: ExtensionName,
1551
+ state: Schema.Literals(["pending", "dispatching", "completed", "failed"]),
1552
+ requestedAt: IsoDateTimeString,
1553
+ completedAt: Schema.Union([IsoDateTimeString, Schema.Null]),
1554
+ nameReclaimableAt: Schema.Union([IsoDateTimeString, Schema.Null]),
1555
+ failureCode: Schema.Union([Schema.String, Schema.Null]),
1556
+ failureDetail: Schema.Union([Schema.String, Schema.Null]),
1557
+ });
1558
+ export const ExtensionsGetDeletionOperation400 = DecodeErrorResponseEncoded;
1559
+ export const ExtensionsGetDeletionOperation401 = ProblemDetails;
1560
+ export const ExtensionsGetDeletionOperation403 = Schema.Union([
1561
+ ForbiddenErrorEncoded,
1562
+ ForbiddenErrorEncoded,
1563
+ ]);
1564
+ export const ExtensionsGetDeletionOperation404 = ProblemDetails;
1565
+ export const ExtensionsDownloadArchive400 = DecodeErrorResponseEncoded;
1566
+ export const ExtensionsDownloadArchive404 = ProblemDetails;
1567
+ export const ExtensionsDownloadArchive500 = ProblemDetails;
1568
+ export const ExtensionsGetVisibilityParams = Schema.Struct({
1569
+ intent_visibility: Schema.optionalKey(Schema.Union([Visibility, Schema.Null])),
1570
+ intent_source: Schema.optionalKey(Schema.Union([Schema.Literals(["manifest", "workspace"]), Schema.Null])),
1571
+ intent_fingerprint: Schema.optionalKey(Schema.Union([VisibilityFingerprint, Schema.Null])),
1572
+ });
1573
+ export const ExtensionsGetVisibility200 = VisibilityEvaluation;
1574
+ export const ExtensionsGetVisibility400 = Schema.Union([
1575
+ ProblemDetails,
1576
+ DecodeErrorResponseEncoded,
1577
+ ]);
1578
+ export const ExtensionsGetVisibility401 = ProblemDetails;
1579
+ export const ExtensionsGetVisibility403 = Schema.Union([
1580
+ ForbiddenErrorEncoded,
1581
+ ForbiddenErrorEncoded,
1582
+ ]);
1583
+ export const ExtensionsGetVisibility404 = ProblemDetails;
1584
+ export const ExtensionsGetDeprecation200 = DeprecationManagementView;
1585
+ export const ExtensionsGetDeprecation400 = DecodeErrorResponseEncoded;
1586
+ export const ExtensionsGetDeprecation401 = ProblemDetails;
1587
+ export const ExtensionsGetDeprecation403 = Schema.Union([
1588
+ ForbiddenErrorEncoded,
1589
+ ForbiddenErrorEncoded,
1590
+ ]);
1591
+ export const ExtensionsGetDeprecation404 = ProblemDetails;
1592
+ export const ExtensionsPutDeprecationParams = Schema.Struct({ "if-match": Schema.String });
1593
+ export const ExtensionsPutDeprecationRequestJson = PutDeprecationBody;
1594
+ export const ExtensionsPutDeprecation200 = DeprecationTransition;
1595
+ export const ExtensionsPutDeprecation400 = Schema.Union([
1596
+ ProblemDetails,
1597
+ DecodeErrorResponseEncoded,
1598
+ ]);
1599
+ export const ExtensionsPutDeprecation401 = ProblemDetails;
1600
+ export const ExtensionsPutDeprecation403 = Schema.Union([
1601
+ ForbiddenErrorEncoded,
1602
+ ForbiddenErrorEncoded,
1603
+ ]);
1604
+ export const ExtensionsPutDeprecation404 = ProblemDetails;
1605
+ export const ExtensionsPutDeprecation409 = ProblemDetails;
1606
+ export const ExtensionsPutDeprecation412 = PreconditionFailedErrorEncoded;
1607
+ export const ExtensionsDeleteDeprecationParams = Schema.Struct({ "if-match": Schema.String });
1608
+ export const ExtensionsDeleteDeprecation200 = DeprecationTransition;
1609
+ export const ExtensionsDeleteDeprecation400 = Schema.Union([
1610
+ ProblemDetails,
1611
+ DecodeErrorResponseEncoded,
1612
+ ]);
1613
+ export const ExtensionsDeleteDeprecation401 = ProblemDetails;
1614
+ export const ExtensionsDeleteDeprecation403 = Schema.Union([
1615
+ ForbiddenErrorEncoded,
1616
+ ForbiddenErrorEncoded,
1617
+ ]);
1618
+ export const ExtensionsDeleteDeprecation404 = ProblemDetails;
1619
+ export const ExtensionsDeleteDeprecation409 = ProblemDetails;
1620
+ export const ExtensionsDeleteDeprecation412 = PreconditionFailedErrorEncoded;
1621
+ export const ExtensionsYankVersionParams = Schema.Struct({
1622
+ "x-axm-step-up-request": Schema.optionalKey(Schema.Union([StepUpRequestId, Schema.Null])),
1623
+ });
1624
+ export const ExtensionsYankVersionRequestJson = YankVersionBody;
1625
+ export const ExtensionsYankVersion200 = Schema.Struct({
1626
+ owner: Handle,
1627
+ type: ExtensionType,
1628
+ name: ExtensionName,
1629
+ version: Version,
1630
+ yankedAt: Schema.Union([IsoDateTimeString, Schema.Null]),
1631
+ yankCategory: Schema.Union([Schema.String, Schema.Null]),
1632
+ yankNotice: Schema.Union([Schema.String, Schema.Null]),
1633
+ links: ExtensionLinks,
1634
+ });
1635
+ export const ExtensionsYankVersion400 = DecodeErrorResponseEncoded;
1636
+ export const ExtensionsYankVersion401 = Schema.Union([StepUpRequiredErrorEncoded, ProblemDetails]);
1637
+ export const ExtensionsYankVersion403 = Schema.Union([
1638
+ ForbiddenErrorEncoded,
1639
+ ForbiddenErrorEncoded,
1640
+ ]);
1641
+ export const ExtensionsYankVersion404 = ProblemDetails;
1642
+ export const ExtensionsYankVersion409 = ProblemDetails;
1643
+ export const ExtensionsYankVersion410 = ProblemDetails;
1644
+ export const ExtensionsUnyankVersionParams = Schema.Struct({
1645
+ "x-axm-step-up-request": Schema.optionalKey(Schema.Union([StepUpRequestId, Schema.Null])),
1646
+ });
1647
+ export const ExtensionsUnyankVersion200 = Schema.Struct({
1648
+ owner: Handle,
1649
+ type: ExtensionType,
1650
+ name: ExtensionName,
1651
+ version: Version,
1652
+ yankedAt: Schema.Null,
1653
+ yankCategory: Schema.Null,
1654
+ yankNotice: Schema.Null,
1655
+ links: ExtensionLinks,
1656
+ });
1657
+ export const ExtensionsUnyankVersion400 = DecodeErrorResponseEncoded;
1658
+ export const ExtensionsUnyankVersion401 = Schema.Union([
1659
+ StepUpRequiredErrorEncoded,
1660
+ ProblemDetails,
1661
+ ]);
1662
+ export const ExtensionsUnyankVersion403 = Schema.Union([
1663
+ ForbiddenErrorEncoded,
1664
+ ForbiddenErrorEncoded,
1665
+ ]);
1666
+ export const ExtensionsUnyankVersion404 = ProblemDetails;
1667
+ export const ExtensionsUnyankVersion409 = ProblemDetails;
1668
+ export const ExtensionsUnyankVersion410 = ProblemDetails;
1669
+ export const ExtensionsYankAvailableVersionsParams = Schema.Struct({
1670
+ "x-axm-step-up-request": Schema.optionalKey(Schema.Union([StepUpRequestId, Schema.Null])),
1671
+ });
1672
+ export const ExtensionsYankAvailableVersionsRequestJson = YankAvailableVersionsBody;
1673
+ export const ExtensionsYankAvailableVersions200 = Schema.Struct({
1674
+ selection: Schema.Literal("all-available"),
1675
+ affectedVersions: Schema.Array(Version),
1676
+ futureVersionsAffected: Schema.Literal(false),
1677
+ });
1678
+ export const ExtensionsYankAvailableVersions400 = DecodeErrorResponseEncoded;
1679
+ export const ExtensionsYankAvailableVersions401 = Schema.Union([
1680
+ StepUpRequiredErrorEncoded,
1681
+ ProblemDetails,
1682
+ ]);
1683
+ export const ExtensionsYankAvailableVersions403 = Schema.Union([
1684
+ ForbiddenErrorEncoded,
1685
+ ForbiddenErrorEncoded,
1686
+ ]);
1687
+ export const ExtensionsYankAvailableVersions404 = ProblemDetails;
1688
+ export const ExtensionsYankAvailableVersions409 = ProblemDetails;
1689
+ export const ExtensionsYankAvailableVersions410 = ProblemDetails;
1690
+ export const ExtensionsGetDeletionPreview200 = Schema.Struct({
1691
+ requiredConfirmation: Schema.String,
1692
+ warnings: Schema.Struct({
1693
+ versions: Schema.Array(Schema.String),
1694
+ dependentPackCount: Schema.Union([
1695
+ Schema.Number.check(Schema.isFinite().annotate({ expected: "a finite number" })),
1696
+ Schema.Literals(["Infinity", "-Infinity", "NaN"]),
1697
+ ]),
1698
+ libraryMembershipCount: Schema.Union([
1699
+ Schema.Number.check(Schema.isFinite().annotate({ expected: "a finite number" })),
1700
+ Schema.Literals(["Infinity", "-Infinity", "NaN"]),
1701
+ ]),
1702
+ downloadCount: Schema.Union([
1703
+ Schema.Union([
1704
+ Schema.Number.check(Schema.isFinite().annotate({ expected: "a finite number" })),
1705
+ Schema.Literals(["Infinity", "-Infinity", "NaN"]),
1706
+ ]),
1707
+ Schema.Null,
1708
+ ]),
1709
+ }),
1710
+ });
1711
+ export const ExtensionsGetDeletionPreview400 = DecodeErrorResponseEncoded;
1712
+ export const ExtensionsGetDeletionPreview401 = ProblemDetails;
1713
+ export const ExtensionsGetDeletionPreview403 = Schema.Union([
1714
+ ForbiddenErrorEncoded,
1715
+ ForbiddenErrorEncoded,
1716
+ ]);
1717
+ export const ExtensionsGetDeletionPreview404 = ProblemDetails;
1718
+ export const PublishPreviewsPreviewExtensionPublishesRequestJson = PreviewPublicationSetRequest;
1719
+ export const PublishPreviewsPreviewExtensionPublishes200 = PreviewPublicationSetResponse;
1720
+ export const PublishPreviewsPreviewExtensionPublishes400 = Schema.Union([
1721
+ ProblemDetails,
1722
+ DecodeErrorResponseEncoded,
1723
+ ]);
1724
+ export const PublishPreviewsPreviewExtensionPublishes401 = ProblemDetails;
1725
+ export const PublishPreviewsPreviewExtensionPublishes403 = ForbiddenErrorEncoded;
1726
+ export const PublishPreviewsPreviewExtensionPublishes413 = PublishPreviewBatchTooLargeHttpErrorEncoded;
1727
+ export const PublishPreviewsPreviewExtensionPublishes503 = ProblemDetails;
1728
+ export const LibrariesListLibrariesParams = Schema.Struct({
1729
+ limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1730
+ offset: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1731
+ q: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1732
+ "filter[visibility]": Schema.optionalKey(Schema.Union([LibraryVisibility, Schema.Null])),
1733
+ });
1734
+ export const LibrariesListLibraries200 = Schema.Struct({
1735
+ libraries: Schema.Array(Library),
1736
+ total: Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })),
1737
+ limit: Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })),
1738
+ offset: Schema.Number.check(Schema.isInt().annotate({ expected: "an integer" })),
1739
+ viewerRelative: Schema.Literal(true),
1740
+ });
1741
+ export const LibrariesListLibraries400 = DecodeErrorResponseEncoded;
1742
+ export const LibrariesListLibraries404 = ProblemDetails;
1743
+ export const LibrariesGetLibrary200 = LibraryDetail;
1744
+ export const LibrariesGetLibrary400 = DecodeErrorResponseEncoded;
1745
+ export const LibrariesGetLibrary404 = ProblemDetails;
1746
+ export const LibrariesGetLibrary422 = ProblemDetails;
1747
+ export const LibrariesListLibraryMembersParams = Schema.Struct({
1748
+ limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1749
+ offset: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1750
+ q: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1751
+ "filter[type]": Schema.optionalKey(Schema.Union([ExtensionType, Schema.Null])),
1752
+ });
1753
+ export const LibrariesListLibraryMembers200 = ListLibraryMembersResponse;
1754
+ export const LibrariesListLibraryMembers400 = DecodeErrorResponseEncoded;
1755
+ export const LibrariesListLibraryMembers404 = ProblemDetails;
1756
+ export const LibrariesListLibraryMembers422 = ProblemDetails;
1757
+ export const DiscoveryPostDiscoveryRequestJson = Schema.Struct({
1758
+ client: Schema.Struct({ axmVersion: Schema.String }),
1759
+ packages: Schema.Array(Schema.Struct({
1760
+ purl: Schema.String,
1761
+ version: Schema.String,
1762
+ declaredExtensions: Schema.Array(Schema.Struct({
1763
+ ref: ExtensionFqn,
1764
+ versionRange: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1765
+ })),
1766
+ })),
1767
+ });
1768
+ export const DiscoveryPostDiscovery200 = Schema.Struct({
1769
+ results: Schema.Array(Schema.Struct({
1770
+ purl: Schema.String,
1771
+ version: Schema.String,
1772
+ status: Schema.Literals(["resolved", "invalid_purl"]),
1773
+ extensions: Schema.Array(Schema.Struct({
1774
+ ref: Schema.String,
1775
+ resolved: Schema.Boolean,
1776
+ extension: Schema.optionalKey(Schema.Union([
1777
+ Schema.Struct({
1778
+ owner: Schema.String,
1779
+ type: Schema.String,
1780
+ name: Schema.String,
1781
+ installVersion: Schema.String,
1782
+ }),
1783
+ Schema.Null,
1784
+ ])),
1785
+ attestedBy: Schema.Array(Schema.Literals(["package", "extension"])),
1786
+ official: Schema.Boolean,
1787
+ packageVersionInRange: Schema.Boolean,
1788
+ })),
1789
+ })),
1790
+ });
1791
+ export const DiscoveryPostDiscovery400 = Schema.Union([ProblemDetails, DecodeErrorResponseEncoded]);
1792
+ export const HealthGetShallowHealth200 = Schema.Struct({
1793
+ status: Schema.Literals(["pass", "warn", "fail"]),
1794
+ });
1795
+ export const HealthGetShallowHealth400 = DecodeErrorResponseEncoded;
1796
+ export const HealthGetDeepHealthParams = Schema.Struct({
1797
+ "x-health-key": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1798
+ });
1799
+ export const HealthGetDeepHealth200 = Schema.Struct({
1800
+ status: Schema.Literals(["pass", "warn", "fail"]),
1801
+ serviceId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1802
+ version: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1803
+ releaseId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1804
+ commit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1805
+ environment: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1806
+ region: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1807
+ checks: Schema.optionalKey(Schema.Union([
1808
+ Schema.Record(Schema.String, Schema.Array(Schema.Struct({
1809
+ componentName: Schema.String,
1810
+ componentType: Schema.Literals(["datastore", "system", "component"]),
1811
+ measurementName: Schema.String,
1812
+ status: Schema.Literals(["pass", "warn", "fail"]),
1813
+ observedValue: Schema.Number.check(Schema.isFinite().annotate({ expected: "a finite number" })),
1814
+ observedUnit: Schema.String,
1815
+ time: IsoDateTimeString,
1816
+ output: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1817
+ }))),
1818
+ Schema.Null,
1819
+ ])),
1820
+ output: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1821
+ });
1822
+ export const HealthGetDeepHealth400 = DecodeErrorResponseEncoded;
1823
+ export const SearchSearchExtensionsParams = Schema.Struct({
1824
+ q: Schema.String.annotate({
1825
+ description: "Search query string. Use an empty string to list the public catalog.",
1826
+ examples: ["git commit", ""],
1827
+ }),
1828
+ cursor: Schema.optionalKey(Schema.Union([
1829
+ Schema.String.annotate({
1830
+ description: "Opaque cursor from a previous response for pagination.",
1831
+ }),
1832
+ Schema.Null,
1833
+ ])),
1834
+ limit: Schema.optionalKey(Schema.Union([
1835
+ Schema.String.annotate({
1836
+ description: "Maximum number of results to return (1–100, default 20).",
1837
+ }),
1838
+ Schema.Null,
1839
+ ])),
1840
+ type: Schema.optionalKey(Schema.Union([ExtensionType, Schema.Null])),
1841
+ sort: Schema.optionalKey(Schema.Union([
1842
+ Schema.Literals(["relevance", "popular", "newest", "updated", "name"]),
1843
+ Schema.Null,
1844
+ ])),
1845
+ owner: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1846
+ package: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1847
+ license: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
1848
+ lifecycle: Schema.optionalKey(Schema.Union([Schema.Literals(["all", "active", "deprecated"]), Schema.Null])),
1849
+ visibility: Schema.optionalKey(Schema.Union([Schema.Literals(["all", "public", "private"]), Schema.Null])),
1850
+ });
1851
+ export const SearchSearchExtensions200 = SearchResponse;
1852
+ export const SearchSearchExtensions400 = Schema.Union([ProblemDetails, DecodeErrorResponseEncoded]);
1853
+ export const DebugDebugStreamParams = Schema.Struct({
1854
+ count: Schema.optionalKey(Schema.Union([
1855
+ Schema.String.annotate({ description: "Number of events to emit (0–100, default 3)." }),
1856
+ Schema.Null,
1857
+ ])),
1858
+ failAfter: Schema.optionalKey(Schema.Union([
1859
+ Schema.String.annotate({
1860
+ description: "Emit this many events, then terminate the stream with a typed DebugStreamInterrupted failure. Used to exercise client mid-stream failure decoding.",
1861
+ }),
1862
+ Schema.Null,
1863
+ ])),
1864
+ });
1865
+ export const DebugDebugStream200Sse = Schema.Union([
1866
+ Schema.Struct({
1867
+ id: Schema.optional(Schema.String),
1868
+ event: Schema.String,
1869
+ data: DebugStreamEventEncoded,
1870
+ }),
1871
+ Schema.Struct({
1872
+ id: Schema.optional(Schema.String),
1873
+ event: Schema.Literal("effect/httpapi/stream/failure"),
1874
+ data: Schema.String,
1875
+ }),
1876
+ ]);
1877
+ export const DebugDebugStream400 = DecodeErrorResponseEncoded;
1878
+ export const make = (httpClient, options = {}) => {
1879
+ const unexpectedStatus = (response) => Effect.flatMap(Effect.orElseSucceed(response.json, () => "Unexpected status code"), (description) => Effect.fail(new HttpClientError.HttpClientError({
1880
+ reason: new HttpClientError.StatusCodeError({
1881
+ request: response.request,
1882
+ response,
1883
+ description: typeof description === "string" ? description : JSON.stringify(description),
1884
+ }),
1885
+ })));
1886
+ const withResponse = (config) => (f) => {
1887
+ const withOptionalResponse = (config?.includeResponse
1888
+ ? (response) => Effect.map(f(response), (a) => [a, response])
1889
+ : (response) => f(response));
1890
+ return options?.transformClient
1891
+ ? (request) => Effect.flatMap(Effect.flatMap(options.transformClient(httpClient), (client) => client.execute(request)), withOptionalResponse)
1892
+ : (request) => Effect.flatMap(httpClient.execute(request), withOptionalResponse);
1893
+ };
1894
+ const sseEventRequest = (schema) => (request) => HttpClient.filterStatusOk(httpClient)
1895
+ .execute(request)
1896
+ .pipe(Effect.map((response) => response.stream), Stream.unwrap, Stream.decodeText(), Stream.pipeThroughChannel(Sse.decodeSchema(schema)));
1897
+ const decodeBinary = (response) => Effect.map(response.arrayBuffer, (buffer) => new Uint8Array(buffer));
1898
+ const binaryRequest = (request) => HttpClient.filterStatusOk(httpClient)
1899
+ .execute(request)
1900
+ .pipe(Effect.map((response) => response.stream), Stream.unwrap);
1901
+ const decodeVoidError = (tag) => (response) => Effect.fail(RegistryClientError(tag, undefined, response));
1902
+ const decodeSuccess = (schema) => (response) => HttpClientResponse.schemaBodyJson(schema)(response);
1903
+ const decodeError = (tag, schema) => (response) => Effect.flatMap(HttpClientResponse.schemaBodyJson(schema)(response), (cause) => Effect.fail(RegistryClientError(tag, cause, response)));
1904
+ return {
1905
+ httpClient,
1906
+ MetaGet: (options) => HttpClientRequest.get(`/v1`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
1907
+ "2xx": decodeSuccess(MetaGet200),
1908
+ "400": decodeError("MetaGet400", MetaGet400),
1909
+ orElse: unexpectedStatus,
1910
+ }))),
1911
+ AuthIssueDeviceCode: (options) => HttpClientRequest.post(`/v1/auth/device/code`).pipe(HttpClientRequest.bodyUrlParams(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
1912
+ "2xx": decodeSuccess(AuthIssueDeviceCode200),
1913
+ "400": decodeError("AuthIssueDeviceCode400", AuthIssueDeviceCode400),
1914
+ "500": decodeError("AuthIssueDeviceCode500", AuthIssueDeviceCode500),
1915
+ orElse: unexpectedStatus,
1916
+ }))),
1917
+ AuthExchangeToken: (options) => HttpClientRequest.post(`/v1/auth/token`).pipe(HttpClientRequest.bodyUrlParams(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
1918
+ "2xx": decodeSuccess(AuthExchangeToken200),
1919
+ "400": decodeError("AuthExchangeToken400", AuthExchangeToken400),
1920
+ "503": decodeError("AuthExchangeToken503", AuthExchangeToken503),
1921
+ orElse: unexpectedStatus,
1922
+ }))),
1923
+ AuthRevokeOAuthToken: (options) => HttpClientRequest.post(`/v1/auth/revoke`).pipe(HttpClientRequest.bodyUrlParams(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
1924
+ "400": decodeError("AuthRevokeOAuthToken400", AuthRevokeOAuthToken400),
1925
+ "503": decodeError("AuthRevokeOAuthToken503", AuthRevokeOAuthToken503),
1926
+ "200": () => Effect.void,
1927
+ orElse: unexpectedStatus,
1928
+ }))),
1929
+ AuthGetWhoami: (options) => HttpClientRequest.get(`/v1/auth/whoami`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
1930
+ "2xx": decodeSuccess(AuthGetWhoami200),
1931
+ "400": decodeError("AuthGetWhoami400", AuthGetWhoami400),
1932
+ "401": decodeError("AuthGetWhoami401", AuthGetWhoami401),
1933
+ orElse: unexpectedStatus,
1934
+ }))),
1935
+ AuthGetMe: (options) => HttpClientRequest.get(`/v1/auth/me`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
1936
+ "2xx": decodeSuccess(AuthGetMe200),
1937
+ "400": decodeError("AuthGetMe400", AuthGetMe400),
1938
+ "401": decodeError("AuthGetMe401", AuthGetMe401),
1939
+ orElse: unexpectedStatus,
1940
+ }))),
1941
+ AuthGetStepUpRequest: (requestId, options) => HttpClientRequest.get(`/v1/auth/step-up/requests/${requestId}`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
1942
+ "2xx": decodeSuccess(AuthGetStepUpRequest200),
1943
+ "400": decodeError("AuthGetStepUpRequest400", AuthGetStepUpRequest400),
1944
+ "401": decodeError("AuthGetStepUpRequest401", AuthGetStepUpRequest401),
1945
+ "404": decodeError("AuthGetStepUpRequest404", AuthGetStepUpRequest404),
1946
+ orElse: unexpectedStatus,
1947
+ }))),
1948
+ AuthCreatePublishAuthorizationRequest: (options) => HttpClientRequest.post(`/v1/auth/publish-requests`).pipe(HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
1949
+ "2xx": decodeSuccess(AuthCreatePublishAuthorizationRequest201),
1950
+ "400": decodeError("AuthCreatePublishAuthorizationRequest400", AuthCreatePublishAuthorizationRequest400),
1951
+ orElse: unexpectedStatus,
1952
+ }))),
1953
+ TokensList: (options) => HttpClientRequest.get(`/v1/tokens`).pipe(HttpClientRequest.setUrlParams({
1954
+ cursor: options?.params?.["cursor"],
1955
+ limit: options?.params?.["limit"],
1956
+ }), withResponse(options?.config)(HttpClientResponse.matchStatus({
1957
+ "2xx": decodeSuccess(TokensList200),
1958
+ "400": decodeError("TokensList400", TokensList400),
1959
+ "401": decodeError("TokensList401", TokensList401),
1960
+ "403": decodeError("TokensList403", TokensList403),
1961
+ orElse: unexpectedStatus,
1962
+ }))),
1963
+ TokensCreate: (options) => HttpClientRequest.post(`/v1/tokens`).pipe(HttpClientRequest.setHeaders({
1964
+ "x-axm-step-up-request": options.params?.["x-axm-step-up-request"] ?? undefined,
1965
+ }), HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
1966
+ "2xx": decodeSuccess(TokensCreate201),
1967
+ "400": decodeError("TokensCreate400", TokensCreate400),
1968
+ "401": decodeError("TokensCreate401", TokensCreate401),
1969
+ "403": decodeError("TokensCreate403", TokensCreate403),
1970
+ "404": decodeError("TokensCreate404", TokensCreate404),
1971
+ "409": decodeError("TokensCreate409", TokensCreate409),
1972
+ "410": decodeError("TokensCreate410", TokensCreate410),
1973
+ "422": decodeError("TokensCreate422", TokensCreate422),
1974
+ orElse: unexpectedStatus,
1975
+ }))),
1976
+ TokensDelete: (tokenId, options) => HttpClientRequest.delete(`/v1/tokens/${tokenId}`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
1977
+ "400": decodeError("TokensDelete400", TokensDelete400),
1978
+ "401": decodeError("TokensDelete401", TokensDelete401),
1979
+ "403": decodeError("TokensDelete403", TokensDelete403),
1980
+ "204": () => Effect.void,
1981
+ orElse: unexpectedStatus,
1982
+ }))),
1983
+ OwnersGetOwner: (handle, options) => HttpClientRequest.get(`/v1/owners/${handle}`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
1984
+ "2xx": decodeSuccess(OwnersGetOwner200),
1985
+ "400": decodeError("OwnersGetOwner400", OwnersGetOwner400),
1986
+ "404": decodeError("OwnersGetOwner404", OwnersGetOwner404),
1987
+ orElse: unexpectedStatus,
1988
+ }))),
1989
+ ExtensionsListByOwner: (owner, options) => HttpClientRequest.get(`/v1/extensions/${owner}`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
1990
+ "2xx": decodeSuccess(ExtensionsListByOwner200),
1991
+ "400": decodeError("ExtensionsListByOwner400", ExtensionsListByOwner400),
1992
+ orElse: unexpectedStatus,
1993
+ }))),
1994
+ ExtensionsListByType: (owner, type, options) => HttpClientRequest.get(`/v1/extensions/${owner}/${type}`).pipe(HttpClientRequest.setUrlParams({
1995
+ limit: options?.params?.["limit"],
1996
+ offset: options?.params?.["offset"],
1997
+ }), withResponse(options?.config)(HttpClientResponse.matchStatus({
1998
+ "2xx": decodeSuccess(ExtensionsListByType200),
1999
+ "400": decodeError("ExtensionsListByType400", ExtensionsListByType400),
2000
+ orElse: unexpectedStatus,
2001
+ }))),
2002
+ ExtensionsGet: (owner, type, name, options) => HttpClientRequest.get(`/v1/extensions/${owner}/${type}/${name}`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
2003
+ "200": decodeSuccess(ExtensionsGet200),
2004
+ "400": decodeError("ExtensionsGet400", ExtensionsGet400),
2005
+ "404": decodeError("ExtensionsGet404", ExtensionsGet404),
2006
+ "304": () => Effect.void,
2007
+ orElse: unexpectedStatus,
2008
+ }))),
2009
+ ExtensionsDeleteExtension: (owner, type, name, options) => HttpClientRequest.delete(`/v1/extensions/${owner}/${type}/${name}`).pipe(HttpClientRequest.setHeaders({
2010
+ "x-axm-step-up-request": options.params?.["x-axm-step-up-request"] ?? undefined,
2011
+ }), HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
2012
+ "2xx": decodeSuccess(ExtensionsDeleteExtension202),
2013
+ "400": decodeError("ExtensionsDeleteExtension400", ExtensionsDeleteExtension400),
2014
+ "401": decodeError("ExtensionsDeleteExtension401", ExtensionsDeleteExtension401),
2015
+ "403": decodeError("ExtensionsDeleteExtension403", ExtensionsDeleteExtension403),
2016
+ "404": decodeError("ExtensionsDeleteExtension404", ExtensionsDeleteExtension404),
2017
+ "409": decodeError("ExtensionsDeleteExtension409", ExtensionsDeleteExtension409),
2018
+ "410": decodeError("ExtensionsDeleteExtension410", ExtensionsDeleteExtension410),
2019
+ orElse: unexpectedStatus,
2020
+ }))),
2021
+ ExtensionsHead: (owner, type, name, options) => HttpClientRequest.head(`/v1/extensions/${owner}/${type}/${name}`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
2022
+ "200": () => Effect.void,
2023
+ "400": decodeVoidError("400"),
2024
+ "404": decodeVoidError("404"),
2025
+ "500": decodeVoidError("500"),
2026
+ orElse: unexpectedStatus,
2027
+ }))),
2028
+ ExtensionsUpdateVisibility: (owner, type, name, options) => HttpClientRequest.patch(`/v1/extensions/${owner}/${type}/${name}`).pipe(HttpClientRequest.setHeaders({
2029
+ "x-axm-step-up-request": options.params["x-axm-step-up-request"] ?? undefined,
2030
+ "if-match": options.params["if-match"] ?? undefined,
2031
+ }), HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
2032
+ "2xx": decodeSuccess(ExtensionsUpdateVisibility200),
2033
+ "400": decodeError("ExtensionsUpdateVisibility400", ExtensionsUpdateVisibility400),
2034
+ "401": decodeError("ExtensionsUpdateVisibility401", ExtensionsUpdateVisibility401),
2035
+ "403": decodeError("ExtensionsUpdateVisibility403", ExtensionsUpdateVisibility403),
2036
+ "404": decodeError("ExtensionsUpdateVisibility404", ExtensionsUpdateVisibility404),
2037
+ "409": decodeError("ExtensionsUpdateVisibility409", ExtensionsUpdateVisibility409),
2038
+ "410": decodeError("ExtensionsUpdateVisibility410", ExtensionsUpdateVisibility410),
2039
+ "412": decodeError("ExtensionsUpdateVisibility412", ExtensionsUpdateVisibility412),
2040
+ orElse: unexpectedStatus,
2041
+ }))),
2042
+ ExtensionsGetVersion: (owner, type, name, version, options) => HttpClientRequest.get(`/v1/extensions/${owner}/${type}/${name}/${version}`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
2043
+ "2xx": decodeSuccess(ExtensionsGetVersion200),
2044
+ "400": decodeError("ExtensionsGetVersion400", ExtensionsGetVersion400),
2045
+ "404": decodeError("ExtensionsGetVersion404", ExtensionsGetVersion404),
2046
+ "410": decodeError("ExtensionsGetVersion410", ExtensionsGetVersion410),
2047
+ orElse: unexpectedStatus,
2048
+ }))),
2049
+ ExtensionsPublishVersion: (owner, type, name, version, options) => HttpClientRequest.put(`/v1/extensions/${owner}/${type}/${name}/${version}`).pipe(HttpClientRequest.setUrlParams({ visibility: options.params["visibility"] }), HttpClientRequest.setHeaders({
2050
+ "if-match": options.params["if-match"] ?? undefined,
2051
+ "x-axm-publication-set-digest": options.params["x-axm-publication-set-digest"] ?? undefined,
2052
+ "x-axm-publication-descriptor-digest": options.params["x-axm-publication-descriptor-digest"] ?? undefined,
2053
+ "x-axm-visibility-input": options.params["x-axm-visibility-input"] ?? undefined,
2054
+ }), withResponse(options.config)(HttpClientResponse.matchStatus({
2055
+ "200": decodeSuccess(ExtensionsPublishVersion200),
2056
+ "201": decodeSuccess(ExtensionsPublishVersion201),
2057
+ "400": decodeError("ExtensionsPublishVersion400", ExtensionsPublishVersion400),
2058
+ "401": decodeError("ExtensionsPublishVersion401", ExtensionsPublishVersion401),
2059
+ "403": decodeError("ExtensionsPublishVersion403", ExtensionsPublishVersion403),
2060
+ "404": decodeError("ExtensionsPublishVersion404", ExtensionsPublishVersion404),
2061
+ "409": decodeError("ExtensionsPublishVersion409", ExtensionsPublishVersion409),
2062
+ "412": decodeError("ExtensionsPublishVersion412", ExtensionsPublishVersion412),
2063
+ "413": decodeError("ExtensionsPublishVersion413", ExtensionsPublishVersion413),
2064
+ "415": decodeError("ExtensionsPublishVersion415", ExtensionsPublishVersion415),
2065
+ "422": decodeError("ExtensionsPublishVersion422", ExtensionsPublishVersion422),
2066
+ "500": decodeError("ExtensionsPublishVersion500", ExtensionsPublishVersion500),
2067
+ "503": decodeError("ExtensionsPublishVersion503", ExtensionsPublishVersion503),
2068
+ orElse: unexpectedStatus,
2069
+ }))),
2070
+ ExtensionsGetDeletionOperation: (operationId, options) => HttpClientRequest.get(`/v1/extensions/deletions/${operationId}`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
2071
+ "2xx": decodeSuccess(ExtensionsGetDeletionOperation200),
2072
+ "400": decodeError("ExtensionsGetDeletionOperation400", ExtensionsGetDeletionOperation400),
2073
+ "401": decodeError("ExtensionsGetDeletionOperation401", ExtensionsGetDeletionOperation401),
2074
+ "403": decodeError("ExtensionsGetDeletionOperation403", ExtensionsGetDeletionOperation403),
2075
+ "404": decodeError("ExtensionsGetDeletionOperation404", ExtensionsGetDeletionOperation404),
2076
+ orElse: unexpectedStatus,
2077
+ }))),
2078
+ ExtensionsDownloadArchive: (owner, type, name, version, options) => HttpClientRequest.get(`/v1/extensions/${owner}/${type}/${name}/${version}/archive`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
2079
+ "2xx": decodeBinary,
2080
+ "400": decodeError("ExtensionsDownloadArchive400", ExtensionsDownloadArchive400),
2081
+ "404": decodeError("ExtensionsDownloadArchive404", ExtensionsDownloadArchive404),
2082
+ "500": decodeError("ExtensionsDownloadArchive500", ExtensionsDownloadArchive500),
2083
+ orElse: unexpectedStatus,
2084
+ }))),
2085
+ ExtensionsDownloadArchiveStream: (owner, type, name, version) => HttpClientRequest.get(`/v1/extensions/${owner}/${type}/${name}/${version}/archive`).pipe(binaryRequest),
2086
+ ExtensionsHeadArchive: (owner, type, name, version, options) => HttpClientRequest.head(`/v1/extensions/${owner}/${type}/${name}/${version}/archive`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
2087
+ "200": () => Effect.void,
2088
+ "400": decodeVoidError("400"),
2089
+ "404": decodeVoidError("404"),
2090
+ "500": decodeVoidError("500"),
2091
+ orElse: unexpectedStatus,
2092
+ }))),
2093
+ ExtensionsGetVisibility: (owner, type, name, options) => HttpClientRequest.get(`/v1/extensions/${owner}/${type}/${name}/visibility`).pipe(HttpClientRequest.setUrlParams({
2094
+ intent_visibility: options?.params?.["intent_visibility"],
2095
+ intent_source: options?.params?.["intent_source"],
2096
+ intent_fingerprint: options?.params?.["intent_fingerprint"],
2097
+ }), withResponse(options?.config)(HttpClientResponse.matchStatus({
2098
+ "2xx": decodeSuccess(ExtensionsGetVisibility200),
2099
+ "400": decodeError("ExtensionsGetVisibility400", ExtensionsGetVisibility400),
2100
+ "401": decodeError("ExtensionsGetVisibility401", ExtensionsGetVisibility401),
2101
+ "403": decodeError("ExtensionsGetVisibility403", ExtensionsGetVisibility403),
2102
+ "404": decodeError("ExtensionsGetVisibility404", ExtensionsGetVisibility404),
2103
+ orElse: unexpectedStatus,
2104
+ }))),
2105
+ ExtensionsGetDeprecation: (owner, type, name, options) => HttpClientRequest.get(`/v1/extensions/${owner}/${type}/${name}/deprecation`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
2106
+ "2xx": decodeSuccess(ExtensionsGetDeprecation200),
2107
+ "400": decodeError("ExtensionsGetDeprecation400", ExtensionsGetDeprecation400),
2108
+ "401": decodeError("ExtensionsGetDeprecation401", ExtensionsGetDeprecation401),
2109
+ "403": decodeError("ExtensionsGetDeprecation403", ExtensionsGetDeprecation403),
2110
+ "404": decodeError("ExtensionsGetDeprecation404", ExtensionsGetDeprecation404),
2111
+ orElse: unexpectedStatus,
2112
+ }))),
2113
+ ExtensionsPutDeprecation: (owner, type, name, options) => HttpClientRequest.put(`/v1/extensions/${owner}/${type}/${name}/deprecation`).pipe(HttpClientRequest.setHeaders({ "if-match": options.params["if-match"] ?? undefined }), HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
2114
+ "2xx": decodeSuccess(ExtensionsPutDeprecation200),
2115
+ "400": decodeError("ExtensionsPutDeprecation400", ExtensionsPutDeprecation400),
2116
+ "401": decodeError("ExtensionsPutDeprecation401", ExtensionsPutDeprecation401),
2117
+ "403": decodeError("ExtensionsPutDeprecation403", ExtensionsPutDeprecation403),
2118
+ "404": decodeError("ExtensionsPutDeprecation404", ExtensionsPutDeprecation404),
2119
+ "409": decodeError("ExtensionsPutDeprecation409", ExtensionsPutDeprecation409),
2120
+ "412": decodeError("ExtensionsPutDeprecation412", ExtensionsPutDeprecation412),
2121
+ orElse: unexpectedStatus,
2122
+ }))),
2123
+ ExtensionsDeleteDeprecation: (owner, type, name, options) => HttpClientRequest.delete(`/v1/extensions/${owner}/${type}/${name}/deprecation`).pipe(HttpClientRequest.setHeaders({ "if-match": options.params["if-match"] ?? undefined }), withResponse(options.config)(HttpClientResponse.matchStatus({
2124
+ "2xx": decodeSuccess(ExtensionsDeleteDeprecation200),
2125
+ "400": decodeError("ExtensionsDeleteDeprecation400", ExtensionsDeleteDeprecation400),
2126
+ "401": decodeError("ExtensionsDeleteDeprecation401", ExtensionsDeleteDeprecation401),
2127
+ "403": decodeError("ExtensionsDeleteDeprecation403", ExtensionsDeleteDeprecation403),
2128
+ "404": decodeError("ExtensionsDeleteDeprecation404", ExtensionsDeleteDeprecation404),
2129
+ "409": decodeError("ExtensionsDeleteDeprecation409", ExtensionsDeleteDeprecation409),
2130
+ "412": decodeError("ExtensionsDeleteDeprecation412", ExtensionsDeleteDeprecation412),
2131
+ orElse: unexpectedStatus,
2132
+ }))),
2133
+ ExtensionsYankVersion: (owner, type, name, version, options) => HttpClientRequest.post(`/v1/extensions/${owner}/${type}/${name}/${version}/yank`).pipe(HttpClientRequest.setHeaders({
2134
+ "x-axm-step-up-request": options.params?.["x-axm-step-up-request"] ?? undefined,
2135
+ }), HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
2136
+ "2xx": decodeSuccess(ExtensionsYankVersion200),
2137
+ "400": decodeError("ExtensionsYankVersion400", ExtensionsYankVersion400),
2138
+ "401": decodeError("ExtensionsYankVersion401", ExtensionsYankVersion401),
2139
+ "403": decodeError("ExtensionsYankVersion403", ExtensionsYankVersion403),
2140
+ "404": decodeError("ExtensionsYankVersion404", ExtensionsYankVersion404),
2141
+ "409": decodeError("ExtensionsYankVersion409", ExtensionsYankVersion409),
2142
+ "410": decodeError("ExtensionsYankVersion410", ExtensionsYankVersion410),
2143
+ orElse: unexpectedStatus,
2144
+ }))),
2145
+ ExtensionsUnyankVersion: (owner, type, name, version, options) => HttpClientRequest.delete(`/v1/extensions/${owner}/${type}/${name}/${version}/yank`).pipe(HttpClientRequest.setHeaders({
2146
+ "x-axm-step-up-request": options?.params?.["x-axm-step-up-request"] ?? undefined,
2147
+ }), withResponse(options?.config)(HttpClientResponse.matchStatus({
2148
+ "2xx": decodeSuccess(ExtensionsUnyankVersion200),
2149
+ "400": decodeError("ExtensionsUnyankVersion400", ExtensionsUnyankVersion400),
2150
+ "401": decodeError("ExtensionsUnyankVersion401", ExtensionsUnyankVersion401),
2151
+ "403": decodeError("ExtensionsUnyankVersion403", ExtensionsUnyankVersion403),
2152
+ "404": decodeError("ExtensionsUnyankVersion404", ExtensionsUnyankVersion404),
2153
+ "409": decodeError("ExtensionsUnyankVersion409", ExtensionsUnyankVersion409),
2154
+ "410": decodeError("ExtensionsUnyankVersion410", ExtensionsUnyankVersion410),
2155
+ orElse: unexpectedStatus,
2156
+ }))),
2157
+ ExtensionsYankAvailableVersions: (owner, type, name, options) => HttpClientRequest.post(`/v1/extensions/${owner}/${type}/${name}/versions/yank`).pipe(HttpClientRequest.setHeaders({
2158
+ "x-axm-step-up-request": options.params?.["x-axm-step-up-request"] ?? undefined,
2159
+ }), HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
2160
+ "2xx": decodeSuccess(ExtensionsYankAvailableVersions200),
2161
+ "400": decodeError("ExtensionsYankAvailableVersions400", ExtensionsYankAvailableVersions400),
2162
+ "401": decodeError("ExtensionsYankAvailableVersions401", ExtensionsYankAvailableVersions401),
2163
+ "403": decodeError("ExtensionsYankAvailableVersions403", ExtensionsYankAvailableVersions403),
2164
+ "404": decodeError("ExtensionsYankAvailableVersions404", ExtensionsYankAvailableVersions404),
2165
+ "409": decodeError("ExtensionsYankAvailableVersions409", ExtensionsYankAvailableVersions409),
2166
+ "410": decodeError("ExtensionsYankAvailableVersions410", ExtensionsYankAvailableVersions410),
2167
+ orElse: unexpectedStatus,
2168
+ }))),
2169
+ ExtensionsGetDeletionPreview: (owner, type, name, options) => HttpClientRequest.get(`/v1/extensions/${owner}/${type}/${name}/deletion`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
2170
+ "2xx": decodeSuccess(ExtensionsGetDeletionPreview200),
2171
+ "400": decodeError("ExtensionsGetDeletionPreview400", ExtensionsGetDeletionPreview400),
2172
+ "401": decodeError("ExtensionsGetDeletionPreview401", ExtensionsGetDeletionPreview401),
2173
+ "403": decodeError("ExtensionsGetDeletionPreview403", ExtensionsGetDeletionPreview403),
2174
+ "404": decodeError("ExtensionsGetDeletionPreview404", ExtensionsGetDeletionPreview404),
2175
+ orElse: unexpectedStatus,
2176
+ }))),
2177
+ PublishPreviewsPreviewExtensionPublishes: (options) => HttpClientRequest.post(`/v1/publish-previews`).pipe(HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
2178
+ "2xx": decodeSuccess(PublishPreviewsPreviewExtensionPublishes200),
2179
+ "400": decodeError("PublishPreviewsPreviewExtensionPublishes400", PublishPreviewsPreviewExtensionPublishes400),
2180
+ "401": decodeError("PublishPreviewsPreviewExtensionPublishes401", PublishPreviewsPreviewExtensionPublishes401),
2181
+ "403": decodeError("PublishPreviewsPreviewExtensionPublishes403", PublishPreviewsPreviewExtensionPublishes403),
2182
+ "413": decodeError("PublishPreviewsPreviewExtensionPublishes413", PublishPreviewsPreviewExtensionPublishes413),
2183
+ "503": decodeError("PublishPreviewsPreviewExtensionPublishes503", PublishPreviewsPreviewExtensionPublishes503),
2184
+ orElse: unexpectedStatus,
2185
+ }))),
2186
+ LibrariesListLibraries: (owner, options) => HttpClientRequest.get(`/v1/libraries/${owner}`).pipe(HttpClientRequest.setUrlParams({
2187
+ limit: options?.params?.["limit"],
2188
+ offset: options?.params?.["offset"],
2189
+ q: options?.params?.["q"],
2190
+ "filter[visibility]": options?.params?.["filter[visibility]"],
2191
+ }), withResponse(options?.config)(HttpClientResponse.matchStatus({
2192
+ "2xx": decodeSuccess(LibrariesListLibraries200),
2193
+ "400": decodeError("LibrariesListLibraries400", LibrariesListLibraries400),
2194
+ "404": decodeError("LibrariesListLibraries404", LibrariesListLibraries404),
2195
+ orElse: unexpectedStatus,
2196
+ }))),
2197
+ LibrariesGetLibrary: (owner, name, options) => HttpClientRequest.get(`/v1/libraries/${owner}/${name}`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
2198
+ "2xx": decodeSuccess(LibrariesGetLibrary200),
2199
+ "400": decodeError("LibrariesGetLibrary400", LibrariesGetLibrary400),
2200
+ "404": decodeError("LibrariesGetLibrary404", LibrariesGetLibrary404),
2201
+ "422": decodeError("LibrariesGetLibrary422", LibrariesGetLibrary422),
2202
+ orElse: unexpectedStatus,
2203
+ }))),
2204
+ LibrariesListLibraryMembers: (owner, name, options) => HttpClientRequest.get(`/v1/libraries/${owner}/${name}/members`).pipe(HttpClientRequest.setUrlParams({
2205
+ limit: options?.params?.["limit"],
2206
+ offset: options?.params?.["offset"],
2207
+ q: options?.params?.["q"],
2208
+ "filter[type]": options?.params?.["filter[type]"],
2209
+ }), withResponse(options?.config)(HttpClientResponse.matchStatus({
2210
+ "2xx": decodeSuccess(LibrariesListLibraryMembers200),
2211
+ "400": decodeError("LibrariesListLibraryMembers400", LibrariesListLibraryMembers400),
2212
+ "404": decodeError("LibrariesListLibraryMembers404", LibrariesListLibraryMembers404),
2213
+ "422": decodeError("LibrariesListLibraryMembers422", LibrariesListLibraryMembers422),
2214
+ orElse: unexpectedStatus,
2215
+ }))),
2216
+ DiscoveryPostDiscovery: (options) => HttpClientRequest.post(`/v1/discovery`).pipe(HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
2217
+ "2xx": decodeSuccess(DiscoveryPostDiscovery200),
2218
+ "400": decodeError("DiscoveryPostDiscovery400", DiscoveryPostDiscovery400),
2219
+ orElse: unexpectedStatus,
2220
+ }))),
2221
+ HealthGetShallowHealth: (options) => HttpClientRequest.get(`/v1/health`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
2222
+ "2xx": decodeSuccess(HealthGetShallowHealth200),
2223
+ "400": decodeError("HealthGetShallowHealth400", HealthGetShallowHealth400),
2224
+ orElse: unexpectedStatus,
2225
+ }))),
2226
+ HealthGetDeepHealth: (options) => HttpClientRequest.get(`/v1/health/dependencies`).pipe(HttpClientRequest.setHeaders({
2227
+ "x-health-key": options?.params?.["x-health-key"] ?? undefined,
2228
+ }), withResponse(options?.config)(HttpClientResponse.matchStatus({
2229
+ "2xx": decodeSuccess(HealthGetDeepHealth200),
2230
+ "400": decodeError("HealthGetDeepHealth400", HealthGetDeepHealth400),
2231
+ orElse: unexpectedStatus,
2232
+ }))),
2233
+ SearchSearchExtensions: (options) => HttpClientRequest.get(`/v1/search`).pipe(HttpClientRequest.setUrlParams({
2234
+ q: options.params["q"],
2235
+ cursor: options.params["cursor"],
2236
+ limit: options.params["limit"],
2237
+ type: options.params["type"],
2238
+ sort: options.params["sort"],
2239
+ owner: options.params["owner"],
2240
+ package: options.params["package"],
2241
+ license: options.params["license"],
2242
+ lifecycle: options.params["lifecycle"],
2243
+ visibility: options.params["visibility"],
2244
+ }), withResponse(options.config)(HttpClientResponse.matchStatus({
2245
+ "2xx": decodeSuccess(SearchSearchExtensions200),
2246
+ "400": decodeError("SearchSearchExtensions400", SearchSearchExtensions400),
2247
+ orElse: unexpectedStatus,
2248
+ }))),
2249
+ DebugDebugStream: (options) => HttpClientRequest.get(`/v1/debug/stream`).pipe(HttpClientRequest.setUrlParams({
2250
+ count: options?.params?.["count"],
2251
+ failAfter: options?.params?.["failAfter"],
2252
+ }), withResponse(options?.config)(HttpClientResponse.matchStatus({
2253
+ "400": decodeError("DebugDebugStream400", DebugDebugStream400),
2254
+ orElse: unexpectedStatus,
2255
+ }))),
2256
+ DebugDebugStreamSse: (options) => HttpClientRequest.get(`/v1/debug/stream`).pipe(HttpClientRequest.setUrlParams({
2257
+ count: options?.params?.["count"],
2258
+ failAfter: options?.params?.["failAfter"],
2259
+ }), sseEventRequest(DebugDebugStream200Sse)),
2260
+ };
2261
+ };
2262
+ class RegistryClientErrorImpl extends Data.Error {
2263
+ }
2264
+ export const RegistryClientError = (tag, cause, response) => new RegistryClientErrorImpl({
2265
+ _tag: tag,
2266
+ cause,
2267
+ response,
2268
+ request: response.request,
2269
+ });
2270
+ //# sourceMappingURL=registry-client.js.map