@package-broker/dist 2.0.0-rc.2 → 2.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node/assets/access.6859f43998ca.js +1 -0
- package/node/assets/app.e8434f3343de.js +9 -0
- package/node/assets/app.f15f8f21f88b.css +2 -0
- package/node/assets/audit.576009342714.js +1 -0
- package/node/assets/chunk.297a2d571f9c.js +4 -0
- package/node/assets/chunk.3704953b4a66.js +1 -0
- package/node/assets/chunk.6e23a75a1324.js +1 -0
- package/node/assets/chunk.7cb6f6b4daaa.js +1 -0
- package/node/assets/chunk.855a50f45830.js +1 -0
- package/node/assets/chunk.862544cf5835.js +2 -0
- package/node/assets/chunk.976a2ff4338e.js +1 -0
- package/node/assets/chunk.bb25fc845269.js +1 -0
- package/node/assets/chunk.bf48b04e6a00.js +1 -0
- package/node/assets/chunk.ce96495b8b55.js +1 -0
- package/node/assets/chunk.f922af39a279.js +1 -0
- package/node/assets/import.e2a1e35fcb8d.js +1 -0
- package/node/assets/index.html +6 -2
- package/node/assets/manifest.json +80 -8
- package/node/assets/packages.a8726e5144de.js +1 -0
- package/node/assets/projects.711deb86b7c9.js +1 -0
- package/node/assets/setup.dfed30ecfbad.js +1 -0
- package/node/assets/setup.html +3 -3
- package/node/assets/sources.d0ba0048bd96.js +1 -0
- package/node/assets/tokens.f48d235e8d25.js +4 -0
- package/node/assets.json +2 -2
- package/node/build-info.json +4 -4
- package/node/generated/manifest.json +2 -2
- package/node/server.js +138 -89
- package/package.json +1 -1
- package/prebuilt.json +32 -14
- package/node/assets/app.b2abf3c46f6e.js +0 -15
- package/node/assets/app.e8cea8b32d3a.css +0 -2
- package/node/assets/setup.98343039898f.js +0 -1
package/node/server.js
CHANGED
|
@@ -6927,12 +6927,12 @@ function identityGroups(json4, subject4, email2) {
|
|
|
6927
6927
|
}
|
|
6928
6928
|
const groups = [];
|
|
6929
6929
|
for (const entry of json4.groups) {
|
|
6930
|
-
let
|
|
6930
|
+
let group2 = entry;
|
|
6931
6931
|
if (isRecord18(entry)) {
|
|
6932
|
-
|
|
6932
|
+
group2 = typeof entry.id === "string" && entry.id !== "" ? entry.id : entry.name;
|
|
6933
6933
|
}
|
|
6934
|
-
if (typeof
|
|
6935
|
-
groups.push(
|
|
6934
|
+
if (typeof group2 === "string" && group2 !== "") {
|
|
6935
|
+
groups.push(group2);
|
|
6936
6936
|
}
|
|
6937
6937
|
}
|
|
6938
6938
|
return groups;
|
|
@@ -37763,8 +37763,8 @@ function urlFieldForm(trimmed) {
|
|
|
37763
37763
|
if (SCRIPT_SCHEME.test(trimmed))
|
|
37764
37764
|
return { ok: false, reason: "bad_value" };
|
|
37765
37765
|
if (URL_START.test(trimmed)) {
|
|
37766
|
-
const
|
|
37767
|
-
return
|
|
37766
|
+
const redacted3 = redactUrl(trimmed);
|
|
37767
|
+
return redacted3 === null ? { ok: false, reason: "bad_value" } : { ok: true, value: redacted3 };
|
|
37768
37768
|
}
|
|
37769
37769
|
const scp = SCP_ADDRESS.exec(trimmed);
|
|
37770
37770
|
if (scp === null)
|
|
@@ -37784,8 +37784,8 @@ function storedForm(value, kind) {
|
|
|
37784
37784
|
return urlFieldForm(trimmed);
|
|
37785
37785
|
if (!URL_START.test(trimmed))
|
|
37786
37786
|
return { ok: true, value };
|
|
37787
|
-
const
|
|
37788
|
-
return
|
|
37787
|
+
const redacted3 = redactUrl(trimmed);
|
|
37788
|
+
return redacted3 === null ? { ok: false, reason: "bad_value" } : { ok: true, value: redacted3 };
|
|
37789
37789
|
}
|
|
37790
37790
|
function redactValue(value, limit4, field2) {
|
|
37791
37791
|
if (value.length > limit4)
|
|
@@ -39022,8 +39022,18 @@ function createSourcePackageStore(executor, providerAnchors) {
|
|
|
39022
39022
|
}
|
|
39023
39023
|
|
|
39024
39024
|
// packages/db-sqlite/dist/repositories/project-grant-read.js
|
|
39025
|
-
function displayName2(value, fallback,
|
|
39026
|
-
return value === null || value.trim() === "" || !
|
|
39025
|
+
function displayName2(value, fallback, reveal) {
|
|
39026
|
+
return value === null || value.trim() === "" || !reveal && value.includes("@") ? fallback : value;
|
|
39027
|
+
}
|
|
39028
|
+
function subjectFields(row, reveal) {
|
|
39029
|
+
if (row.subject_type === "group") {
|
|
39030
|
+
return reveal ? {
|
|
39031
|
+
provider: row.subject_provider,
|
|
39032
|
+
groupValue: row.subject_value,
|
|
39033
|
+
visibility: "visible"
|
|
39034
|
+
} : { provider: row.subject_provider, visibility: "redacted" };
|
|
39035
|
+
}
|
|
39036
|
+
return reveal ? { email: row.subject_value, visibility: "visible" } : { visibility: "redacted" };
|
|
39027
39037
|
}
|
|
39028
39038
|
function createProjectGrantReader(executor) {
|
|
39029
39039
|
return {
|
|
@@ -39049,18 +39059,18 @@ function createProjectGrantReader(executor) {
|
|
|
39049
39059
|
if (input.after !== void 0)
|
|
39050
39060
|
query = query.where("g.id", ">", input.after);
|
|
39051
39061
|
const rows = await executor.all(compile(query));
|
|
39052
|
-
const
|
|
39062
|
+
const reveal = input.revealSubjects === true;
|
|
39053
39063
|
const items = rows.slice(0, input.limit).map((row) => {
|
|
39054
|
-
const
|
|
39064
|
+
const group2 = row.subject_type === "group";
|
|
39055
39065
|
return {
|
|
39056
39066
|
id: row.id,
|
|
39057
39067
|
revision: row.revision,
|
|
39058
39068
|
createdAt: row.created_at,
|
|
39059
39069
|
principal: {
|
|
39060
|
-
kind:
|
|
39070
|
+
kind: group2 ? "group" : row.user_id === null ? "email" : "user",
|
|
39061
39071
|
id: row.user_id ?? row.id,
|
|
39062
|
-
displayName: displayName2(
|
|
39063
|
-
...
|
|
39072
|
+
displayName: displayName2(group2 ? reveal ? row.subject_value : null : row.display_name, group2 ? "Group" : row.user_id === null ? "Pending user" : "User", reveal),
|
|
39073
|
+
...subjectFields(row, reveal)
|
|
39064
39074
|
},
|
|
39065
39075
|
role: {
|
|
39066
39076
|
id: row.role_id,
|
|
@@ -45970,6 +45980,16 @@ function hasOrganizationAdminAuthority(ctx) {
|
|
|
45970
45980
|
const token2 = access.token;
|
|
45971
45981
|
return access.principal?.kind === "user" && token2?.kind === "pat" && token2.scope === "full" && !token2.readOnly && token2.projectMode === "all" && token2.organizationAdmin === true;
|
|
45972
45982
|
}
|
|
45983
|
+
function revealsOrganizationGrantSubjects(ctx) {
|
|
45984
|
+
if (authenticatedActorOf(ctx) === null)
|
|
45985
|
+
return false;
|
|
45986
|
+
return organizationActorOf(ctx)?.permissions.has("org:grants:read") === true;
|
|
45987
|
+
}
|
|
45988
|
+
function revealsProjectGrantSubjects(ctx) {
|
|
45989
|
+
if (authenticatedActorOf(ctx) === null)
|
|
45990
|
+
return false;
|
|
45991
|
+
return projectActorOf(ctx)?.permissions.has("project:grants:read") === true;
|
|
45992
|
+
}
|
|
45973
45993
|
function auditCall(ctx, deps) {
|
|
45974
45994
|
const access = accessContextOf(ctx);
|
|
45975
45995
|
if (access === null)
|
|
@@ -47024,14 +47044,24 @@ var subject = union([
|
|
|
47024
47044
|
value: string2().min(1).max(512)
|
|
47025
47045
|
})
|
|
47026
47046
|
]);
|
|
47047
|
+
var visible = literal("visible");
|
|
47048
|
+
var redacted = literal("redacted");
|
|
47027
47049
|
var listedSubject = union([
|
|
47028
|
-
strictObject({ type: literal("email"), value: string2()
|
|
47050
|
+
strictObject({ type: literal("email"), value: string2(), visibility: visible }),
|
|
47051
|
+
strictObject({ type: literal("email"), visibility: redacted }),
|
|
47029
47052
|
strictObject({
|
|
47030
47053
|
type: literal("group"),
|
|
47031
47054
|
provider: string2(),
|
|
47032
|
-
value: string2()
|
|
47033
|
-
|
|
47055
|
+
value: string2(),
|
|
47056
|
+
visibility: visible
|
|
47057
|
+
}),
|
|
47058
|
+
strictObject({ type: literal("group"), provider: string2(), visibility: redacted })
|
|
47034
47059
|
]);
|
|
47060
|
+
var roleSummary = strictObject({
|
|
47061
|
+
id: string2(),
|
|
47062
|
+
name: string2(),
|
|
47063
|
+
permissions: array(string2())
|
|
47064
|
+
});
|
|
47035
47065
|
var roleParams = strictObject({ role: ulid3 });
|
|
47036
47066
|
var grantParams = strictObject({ grant: ulid3 });
|
|
47037
47067
|
var created2 = strictObject({ id: ulid3 });
|
|
@@ -47049,6 +47079,7 @@ var grantItem = strictObject({
|
|
|
47049
47079
|
id: string2(),
|
|
47050
47080
|
subject: listedSubject,
|
|
47051
47081
|
roleId: string2(),
|
|
47082
|
+
role: roleSummary.nullable(),
|
|
47052
47083
|
createdAt: string2(),
|
|
47053
47084
|
revision: number2().int()
|
|
47054
47085
|
});
|
|
@@ -47199,10 +47230,19 @@ function paged(all, query) {
|
|
|
47199
47230
|
const items = ordered2.slice(0, limit4);
|
|
47200
47231
|
return { items, next: ordered2.length > limit4 ? items[limit4 - 1].id : null };
|
|
47201
47232
|
}
|
|
47202
|
-
function listedSubject2(subject4,
|
|
47203
|
-
if (subject4.type === "email")
|
|
47204
|
-
return
|
|
47205
|
-
|
|
47233
|
+
function listedSubject2(subject4, reveal) {
|
|
47234
|
+
if (subject4.type === "email") {
|
|
47235
|
+
return reveal ? { type: "email", value: subject4.value, visibility: "visible" } : { type: "email", visibility: "redacted" };
|
|
47236
|
+
}
|
|
47237
|
+
return reveal ? {
|
|
47238
|
+
type: "group",
|
|
47239
|
+
provider: subject4.provider,
|
|
47240
|
+
value: subject4.value,
|
|
47241
|
+
visibility: "visible"
|
|
47242
|
+
} : { type: "group", provider: subject4.provider, visibility: "redacted" };
|
|
47243
|
+
}
|
|
47244
|
+
function roleSummary2(role2) {
|
|
47245
|
+
return role2 === void 0 ? null : { id: role2.id, name: role2.name, permissions: [...role2.permissions] };
|
|
47206
47246
|
}
|
|
47207
47247
|
function outcomeOf(result) {
|
|
47208
47248
|
return result.ok ? { status: 204 } : { serviceError: result.error };
|
|
@@ -47235,14 +47275,16 @@ function accessRoutes(deps) {
|
|
|
47235
47275
|
return { error: "unavailable" };
|
|
47236
47276
|
const grants2 = await deps.grants.listOrganization(ctx.org);
|
|
47237
47277
|
const { items, next: next2 } = paged(grants2, query);
|
|
47238
|
-
const
|
|
47278
|
+
const reveal = revealsOrganizationGrantSubjects(ctx);
|
|
47279
|
+
const roles = new Map((await administration.listRoles(ctx.org)).filter((role2) => role2.scope === "organization").map((role2) => [role2.id, role2]));
|
|
47239
47280
|
return {
|
|
47240
47281
|
status: 200,
|
|
47241
47282
|
body: {
|
|
47242
47283
|
items: items.map(({ id: id4, subject: subject4, roleId, createdAt, revision }) => ({
|
|
47243
47284
|
id: id4,
|
|
47244
|
-
subject: listedSubject2(subject4,
|
|
47285
|
+
subject: listedSubject2(subject4, reveal),
|
|
47245
47286
|
roleId,
|
|
47287
|
+
role: roleSummary2(roles.get(roleId)),
|
|
47246
47288
|
createdAt,
|
|
47247
47289
|
revision
|
|
47248
47290
|
})),
|
|
@@ -50245,6 +50287,19 @@ var PROJECT_ACCESS_API_SPECS = [
|
|
|
50245
50287
|
}
|
|
50246
50288
|
}
|
|
50247
50289
|
];
|
|
50290
|
+
var person = { kind: _enum(["user", "email"]), id: string2(), displayName: string2() };
|
|
50291
|
+
var group = {
|
|
50292
|
+
kind: literal("group"),
|
|
50293
|
+
id: string2(),
|
|
50294
|
+
displayName: string2(),
|
|
50295
|
+
provider: string2()
|
|
50296
|
+
};
|
|
50297
|
+
var listedPrincipal = union([
|
|
50298
|
+
strictObject({ ...person, email: string2(), visibility: literal("visible") }),
|
|
50299
|
+
strictObject({ ...person, visibility: literal("redacted") }),
|
|
50300
|
+
strictObject({ ...group, groupValue: string2(), visibility: literal("visible") }),
|
|
50301
|
+
strictObject({ ...group, visibility: literal("redacted") })
|
|
50302
|
+
]);
|
|
50248
50303
|
var PROJECT_GRANTS_LIST_API_SPEC = {
|
|
50249
50304
|
method: "GET",
|
|
50250
50305
|
path: "/_pb/projects/:project/grants",
|
|
@@ -50265,13 +50320,7 @@ var PROJECT_GRANTS_LIST_API_SPEC = {
|
|
|
50265
50320
|
id: ulid6,
|
|
50266
50321
|
revision: number2().int().positive(),
|
|
50267
50322
|
createdAt: string2(),
|
|
50268
|
-
principal:
|
|
50269
|
-
kind: _enum(["user", "email", "group"]),
|
|
50270
|
-
id: string2(),
|
|
50271
|
-
displayName: string2(),
|
|
50272
|
-
provider: string2().optional(),
|
|
50273
|
-
email: string2().optional()
|
|
50274
|
-
}),
|
|
50323
|
+
principal: listedPrincipal,
|
|
50275
50324
|
role: strictObject({ id: ulid6, name: string2(), permissions: array(string2()) })
|
|
50276
50325
|
})),
|
|
50277
50326
|
next: ulid6.nullable()
|
|
@@ -50300,7 +50349,7 @@ function projectAccessRoutes(deps) {
|
|
|
50300
50349
|
projectId: ctx.projectId,
|
|
50301
50350
|
limit: query.limit === void 0 ? 50 : Number(query.limit),
|
|
50302
50351
|
...query.after === void 0 ? {} : { after: query.after },
|
|
50303
|
-
|
|
50352
|
+
revealSubjects: revealsProjectGrantSubjects(ctx)
|
|
50304
50353
|
});
|
|
50305
50354
|
const digest4 = await sha256Hex(JSON.stringify([ctx.org.orgId, ctx.projectId, body]));
|
|
50306
50355
|
return { status: 200, body, etag: Number.parseInt(digest4.slice(0, 12), 16) + 1 };
|
|
@@ -51615,12 +51664,12 @@ function sourceNameRoutes(deps) {
|
|
|
51615
51664
|
}
|
|
51616
51665
|
};
|
|
51617
51666
|
if (actor.kind === "project") {
|
|
51618
|
-
const
|
|
51667
|
+
const visible2 = await deps.service.getVisible(c.org, actor, {
|
|
51619
51668
|
projectId: actor.actor.projectId,
|
|
51620
51669
|
sourceId
|
|
51621
51670
|
});
|
|
51622
|
-
if (!
|
|
51623
|
-
return
|
|
51671
|
+
if (!visible2.ok)
|
|
51672
|
+
return visible2;
|
|
51624
51673
|
}
|
|
51625
51674
|
return { ok: true, value: actor };
|
|
51626
51675
|
};
|
|
@@ -53789,12 +53838,12 @@ function safeSourceUrl(value) {
|
|
|
53789
53838
|
try {
|
|
53790
53839
|
const parsed = new URL(value);
|
|
53791
53840
|
if (parsed.protocol === "https:" || parsed.protocol === "http:") {
|
|
53792
|
-
const
|
|
53793
|
-
if (
|
|
53794
|
-
const decoded = decodeURIComponent(
|
|
53841
|
+
const redacted3 = redactValue(value, 2048, "url");
|
|
53842
|
+
if (redacted3.ok) {
|
|
53843
|
+
const decoded = decodeURIComponent(redacted3.value);
|
|
53795
53844
|
const checked = redactValue(decoded, 2048, "url");
|
|
53796
53845
|
if (checked.ok && checked.value === new URL(decoded).href)
|
|
53797
|
-
url =
|
|
53846
|
+
url = redacted3.value;
|
|
53798
53847
|
}
|
|
53799
53848
|
}
|
|
53800
53849
|
} catch {
|
|
@@ -55135,7 +55184,7 @@ function createRegisteredNameRepository(executor) {
|
|
|
55135
55184
|
where owner.id = ${input.sourceId} and owner.org_id = ${ctx.orgId}
|
|
55136
55185
|
and owner.ecosystem = ${source2.ecosystem}
|
|
55137
55186
|
and owner.type not in (${sql.join(PROXY_TYPES4)}))`;
|
|
55138
|
-
const
|
|
55187
|
+
const visible2 = sourceVisible(ctx, input.sourceId);
|
|
55139
55188
|
const insert = compile(db.insertInto("registered_name").values({
|
|
55140
55189
|
id: input.id,
|
|
55141
55190
|
org_id: ctx.orgId,
|
|
@@ -55144,7 +55193,7 @@ function createRegisteredNameRepository(executor) {
|
|
|
55144
55193
|
pattern: input.pattern
|
|
55145
55194
|
}));
|
|
55146
55195
|
const outcome3 = await runOrgFenced(executor, ctx, fence2, assertGuard(allOf([held, sourceUnchanged]), ctx), [
|
|
55147
|
-
...assertCheck(
|
|
55196
|
+
...assertCheck(visible2),
|
|
55148
55197
|
insert,
|
|
55149
55198
|
auditPendingStatement(ctx, input.audit),
|
|
55150
55199
|
...input.idempotency === void 0 ? [] : [idempotencyInsertStatement(ctx, input.idempotency)]
|
|
@@ -55157,7 +55206,7 @@ function createRegisteredNameRepository(executor) {
|
|
|
55157
55206
|
return "added";
|
|
55158
55207
|
if (outcome3.reason === "indeterminate")
|
|
55159
55208
|
return "indeterminate";
|
|
55160
|
-
if (!await holds2(
|
|
55209
|
+
if (!await holds2(visible2))
|
|
55161
55210
|
return "not_found";
|
|
55162
55211
|
if (outcome3.reason === "authority")
|
|
55163
55212
|
return "forbidden";
|
|
@@ -55183,10 +55232,10 @@ function createRegisteredNameRepository(executor) {
|
|
|
55183
55232
|
const owned = sql`exists (select 1 from registered_name as target
|
|
55184
55233
|
where target.id = ${input.id} and target.org_id = ${ctx.orgId}
|
|
55185
55234
|
and target.source_id = ${sourceId})`;
|
|
55186
|
-
const
|
|
55235
|
+
const visible2 = sourceVisible(ctx, sourceId);
|
|
55187
55236
|
const pause3 = compile(db.updateTable("source").set({ status: "paused", updated_at: sql`strftime('%Y-%m-%dT%H:%M:%fZ','now')` }).where("id", "=", sourceId).where("org_id", "=", ctx.orgId).where("status", "<>", "paused").where(sql`not ${sourceActivatable(ctx, sourceId)}`));
|
|
55188
55237
|
const outcome3 = await runOrgFenced(executor, ctx, fence2, assertGuard(allOf([held, owned]), ctx), [
|
|
55189
|
-
...assertCheck(
|
|
55238
|
+
...assertCheck(visible2),
|
|
55190
55239
|
compile(db.deleteFrom("registered_name").where("id", "=", input.id).where("org_id", "=", ctx.orgId)),
|
|
55191
55240
|
pause3,
|
|
55192
55241
|
auditPendingStatement(ctx, input.pauseAudit, { sql: "changes() = 1", params: [] }),
|
|
@@ -55201,7 +55250,7 @@ function createRegisteredNameRepository(executor) {
|
|
|
55201
55250
|
}
|
|
55202
55251
|
if (outcome3.reason === "indeterminate")
|
|
55203
55252
|
return "indeterminate";
|
|
55204
|
-
if (!await holds2(
|
|
55253
|
+
if (!await holds2(visible2))
|
|
55205
55254
|
return "not_found";
|
|
55206
55255
|
if (outcome3.reason === "authority")
|
|
55207
55256
|
return "forbidden";
|
|
@@ -56011,13 +56060,13 @@ function createImportCredentialRepository(executor, options) {
|
|
|
56011
56060
|
},
|
|
56012
56061
|
async setCredential(ctx, fence2, input) {
|
|
56013
56062
|
const allowed = importWriteAuthority(ctx, fence2, anchors);
|
|
56014
|
-
const
|
|
56063
|
+
const visible2 = sql`exists ${target(ctx, input.runId)}`;
|
|
56015
56064
|
const expected = sql`exists ${target(ctx, input.runId).where("icr.approved_at", "=", input.expected.approvedAt).where("icr.credential_window_until", "=", input.expected.credentialWindowUntil)}`;
|
|
56016
56065
|
const window = sql`exists ${target(ctx, input.runId).where(sql`unixepoch(icr.credential_window_until, 'subsec') > ${CLOCK2}`)}`;
|
|
56017
56066
|
const bound3 = sql`exists ${source2(ctx, input.runId, input.externalRef).select("ics.id").where("ics.id", "=", input.sourceId)}`;
|
|
56018
56067
|
const unset = sql`exists ${db.selectFrom("source as ics").select("ics.id").where("ics.org_id", "=", ctx.orgId).where("ics.id", "=", input.sourceId).where("ics.credential_id", "is", null)}`;
|
|
56019
56068
|
const outcome3 = await runOrgFenced(executor, ctx, fence2, assertGuard(allowed, ctx), [
|
|
56020
|
-
...assertCheck(
|
|
56069
|
+
...assertCheck(visible2),
|
|
56021
56070
|
...assertCheck(expected),
|
|
56022
56071
|
...assertCheck(window),
|
|
56023
56072
|
...assertCheck(bound3),
|
|
@@ -56037,7 +56086,7 @@ function createImportCredentialRepository(executor, options) {
|
|
|
56037
56086
|
if (outcome3.ok || outcome3.reason === "indeterminate")
|
|
56038
56087
|
return outcome3;
|
|
56039
56088
|
const [current] = await executor.all(compile(db.selectNoFrom([
|
|
56040
|
-
sql`case when ${
|
|
56089
|
+
sql`case when ${visible2} then 1 else 0 end`.as("present"),
|
|
56041
56090
|
sql`case when ${bound3} then 1 else 0 end`.as("bound")
|
|
56042
56091
|
])));
|
|
56043
56092
|
if (current?.present !== 1 || current.bound !== 1)
|
|
@@ -56123,10 +56172,10 @@ function createImportRunStore(options) {
|
|
|
56123
56172
|
if (operation !== "requestVerify")
|
|
56124
56173
|
session2(fence2);
|
|
56125
56174
|
const allowed = authority3(ctx, fence2, operation);
|
|
56126
|
-
const
|
|
56175
|
+
const visible2 = sql`exists ${target(ctx, input.runId)}`;
|
|
56127
56176
|
const reauth = operation === "requestVerify" ? sql`1` : fresh(ctx, fence2);
|
|
56128
56177
|
const inspect2 = async () => executor.all(compile(db.selectNoFrom([
|
|
56129
|
-
sql`case when ${
|
|
56178
|
+
sql`case when ${visible2} then 1 else 0 end`.as("present"),
|
|
56130
56179
|
sql`case when ${allowed} then 1 else 0 end`.as("allowed"),
|
|
56131
56180
|
sql`case when ${reauth} then 1 else 0 end`.as("fresh")
|
|
56132
56181
|
])));
|
|
@@ -56172,7 +56221,7 @@ function createImportRunStore(options) {
|
|
|
56172
56221
|
and (${e.beforeImageExpiresAt} is null or unixepoch(${e.beforeImageExpiresAt}, 'subsec') > ${CLOCK3})`;
|
|
56173
56222
|
break;
|
|
56174
56223
|
}
|
|
56175
|
-
mutations.push(...assertCheck(
|
|
56224
|
+
mutations.push(...assertCheck(visible2), ...assertCheck(reauth), ...assertCheck(expected(ctx, input)), ...assertCheck(sql`(${valid2})`));
|
|
56176
56225
|
if (operation === "requestApply" || operation === "requestRollback" || operation === "requestVerify") {
|
|
56177
56226
|
const type2 = operation === "requestVerify" ? IMPORT_VERIFICATION_JOB.type : operation === "requestApply" ? IMPORT_RUN_JOB.apply : IMPORT_RUN_JOB.rollback;
|
|
56178
56227
|
const resource = operation === "requestVerify" ? IMPORT_VERIFICATION_JOB.resourceKey(input.runId) : IMPORT_RUN_JOB.resourceKey(input.runId);
|
|
@@ -56835,7 +56884,7 @@ function createSourceRepository(executor) {
|
|
|
56835
56884
|
});
|
|
56836
56885
|
const admin = sql`EXISTS (SELECT 1 FROM (${permissions}) AS removal_admin
|
|
56837
56886
|
WHERE removal_admin.scope = 'organization' AND removal_admin.protects = 1)`;
|
|
56838
|
-
const
|
|
56887
|
+
const visible2 = sql`EXISTS (SELECT 1 FROM source
|
|
56839
56888
|
WHERE org_id = ${ctx.orgId} AND id = ${input.id}
|
|
56840
56889
|
AND (project_id IS NULL OR EXISTS (SELECT 1 FROM project
|
|
56841
56890
|
WHERE project.org_id = ${ctx.orgId} AND project.id = source.project_id AND project.status = 'active')))`;
|
|
@@ -56843,13 +56892,13 @@ function createSourceRepository(executor) {
|
|
|
56843
56892
|
const [administrator] = await executor.all(probe3(admin, false));
|
|
56844
56893
|
if (permission2?.held !== 1 || administrator?.held !== 1)
|
|
56845
56894
|
return "forbidden";
|
|
56846
|
-
const [source2] = await executor.all(probe3(
|
|
56895
|
+
const [source2] = await executor.all(probe3(visible2, false));
|
|
56847
56896
|
if (source2?.held !== 1)
|
|
56848
56897
|
return "not_found";
|
|
56849
56898
|
const accept = acceptRemovalStatement(ctx, { sourceId: input.id, refusal: input.refusal });
|
|
56850
56899
|
const outcome3 = await runOrgFenced(executor, ctx, fence2, assertGuard(held, ctx), [
|
|
56851
56900
|
...assertCheck(admin),
|
|
56852
|
-
...assertCheck(
|
|
56901
|
+
...assertCheck(visible2),
|
|
56853
56902
|
accept,
|
|
56854
56903
|
...assertCheck(sql`changes() = 1`),
|
|
56855
56904
|
auditPendingStatement(ctx, input.audit)
|
|
@@ -56860,7 +56909,7 @@ function createSourceRepository(executor) {
|
|
|
56860
56909
|
return "forbidden";
|
|
56861
56910
|
if (outcome3.reason === "indeterminate")
|
|
56862
56911
|
return "indeterminate";
|
|
56863
|
-
const [remaining] = await executor.all(probe3(
|
|
56912
|
+
const [remaining] = await executor.all(probe3(visible2, false));
|
|
56864
56913
|
return remaining?.held === 1 ? "conflict" : "not_found";
|
|
56865
56914
|
},
|
|
56866
56915
|
async getVisible(ctx, input) {
|
|
@@ -57873,7 +57922,7 @@ function distTagStatementGroups(ctx, guard, request) {
|
|
|
57873
57922
|
[removeHistory, remove2],
|
|
57874
57923
|
[advance]
|
|
57875
57924
|
];
|
|
57876
|
-
const statementCount = groups.reduce((sum,
|
|
57925
|
+
const statementCount = groups.reduce((sum, group2) => sum + group2.length, 0);
|
|
57877
57926
|
const setOffset = head.length + probes2.length;
|
|
57878
57927
|
return {
|
|
57879
57928
|
groups,
|
|
@@ -58883,7 +58932,7 @@ function createCatalogueWriter(executor, options = {}) {
|
|
|
58883
58932
|
versions: [input.version]
|
|
58884
58933
|
};
|
|
58885
58934
|
const bound3 = (statements) => parameterBytes(statements.map((s) => bindPackage(s, placeholder, lookup2)));
|
|
58886
|
-
const
|
|
58935
|
+
const group2 = (build2) => {
|
|
58887
58936
|
try {
|
|
58888
58937
|
return bound3(build2().statements);
|
|
58889
58938
|
} catch (error2) {
|
|
@@ -58893,7 +58942,7 @@ function createCatalogueWriter(executor, options = {}) {
|
|
|
58893
58942
|
throw error2;
|
|
58894
58943
|
}
|
|
58895
58944
|
};
|
|
58896
|
-
return Math.max(
|
|
58945
|
+
return Math.max(group2(() => versionUpdateStatements(ctx, guard, request)), group2(() => versionInsertStatements(ctx, guard, request)));
|
|
58897
58946
|
},
|
|
58898
58947
|
syncPackageCost({ versions, tags, guardStatements: guard }) {
|
|
58899
58948
|
if (!Number.isSafeInteger(versions) || versions < 0 || versions > CATALOGUE_SYNC_VERSIONS_PER_CALL || !Number.isSafeInteger(tags) || tags < 0 || tags > MAX_TAGS_PER_CALL || !Number.isSafeInteger(guard) || guard < 1)
|
|
@@ -58966,7 +59015,7 @@ function createCatalogueWriter(executor, options = {}) {
|
|
|
58966
59015
|
insert?.statements ?? [],
|
|
58967
59016
|
...tags?.groups ?? [],
|
|
58968
59017
|
[lookup2]
|
|
58969
|
-
].map((
|
|
59018
|
+
].map((group2) => group2.map((statement14) => {
|
|
58970
59019
|
const bound3 = statement14 === tagAdvance ? advance : bindPackage(statement14, placeholder, lookup2);
|
|
58971
59020
|
return /^(insert into "version" |update "version" )/i.test(bound3.sql) ? { ...bound3, sql: `${bound3.sql} returning id, version` } : bound3;
|
|
58972
59021
|
}));
|
|
@@ -58979,17 +59028,17 @@ function createCatalogueWriter(executor, options = {}) {
|
|
|
58979
59028
|
};
|
|
58980
59029
|
const planned = [];
|
|
58981
59030
|
let current = [];
|
|
58982
|
-
for (const
|
|
58983
|
-
if (
|
|
59031
|
+
for (const group2 of groups) {
|
|
59032
|
+
if (group2.length === 0)
|
|
58984
59033
|
continue;
|
|
58985
|
-
checkBatch(
|
|
59034
|
+
checkBatch(group2);
|
|
58986
59035
|
try {
|
|
58987
|
-
checkBatch(sealBatch([...current, ...
|
|
59036
|
+
checkBatch(sealBatch([...current, ...group2]).statements);
|
|
58988
59037
|
} catch {
|
|
58989
59038
|
planned.push(sealBatch(current));
|
|
58990
59039
|
current = [...guard];
|
|
58991
59040
|
}
|
|
58992
|
-
current.push(...
|
|
59041
|
+
current.push(...group2);
|
|
58993
59042
|
}
|
|
58994
59043
|
if (current.length > 0)
|
|
58995
59044
|
planned.push(sealBatch(current));
|
|
@@ -59015,7 +59064,7 @@ function createCatalogueWriter(executor, options = {}) {
|
|
|
59015
59064
|
offset += update?.statements.length ?? 0;
|
|
59016
59065
|
const inserted = insert?.result(results.slice(offset, offset + insert.statements.length));
|
|
59017
59066
|
offset += insert?.statements.length ?? 0;
|
|
59018
|
-
const tagStatementCount = tags?.groups.reduce((sum,
|
|
59067
|
+
const tagStatementCount = tags?.groups.reduce((sum, group2) => sum + group2.length, 0) ?? 0;
|
|
59019
59068
|
const tagResult = tags?.result(results.slice(offset, offset + tagStatementCount));
|
|
59020
59069
|
const packageId = results.at(-1)?.rows[0]?.["id"];
|
|
59021
59070
|
if (typeof packageId !== "string")
|
|
@@ -59762,7 +59811,7 @@ function decodeBasic(payload2) {
|
|
|
59762
59811
|
return void 0;
|
|
59763
59812
|
}
|
|
59764
59813
|
}
|
|
59765
|
-
function
|
|
59814
|
+
function redacted2(token2) {
|
|
59766
59815
|
const safe = { ok: true, kind: token2.kind, selector: token2.selector, reserved: token2.reserved };
|
|
59767
59816
|
return Object.defineProperties(safe, {
|
|
59768
59817
|
secret: { value: token2.secret, enumerable: false },
|
|
@@ -59770,7 +59819,7 @@ function redacted(token2) {
|
|
|
59770
59819
|
});
|
|
59771
59820
|
}
|
|
59772
59821
|
function fromToken(scheme, token2, reason) {
|
|
59773
|
-
return token2.ok ? { outcome: "token", scheme, token:
|
|
59822
|
+
return token2.ok ? { outcome: "token", scheme, token: redacted2(token2) } : refuse4(reason);
|
|
59774
59823
|
}
|
|
59775
59824
|
function parseBearer(value) {
|
|
59776
59825
|
return fromToken("bearer", parseToken(value), "malformed");
|
|
@@ -60235,7 +60284,7 @@ function openApiRoute(document3) {
|
|
|
60235
60284
|
}
|
|
60236
60285
|
|
|
60237
60286
|
// packages/core/dist/api/openapi-document.js
|
|
60238
|
-
var openApiDocument = JSON.parse('{"components":{"schemas":{"ErrorEnvelope":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"dependentSchemas":{"problems":{"properties":{"code":{"const":"weak_password"}}}},"properties":{"code":{"type":"string"},"details":{"items":{"additionalProperties":false,"properties":{"code":{"enum":["invalid_type","too_small","too_big","invalid_format","invalid_value","unrecognized_keys","invalid_union","invalid","invalid_encoding","too_deep","invalid_json"],"type":"string"},"location":{"enum":["params","query","body"],"type":"string"},"path":{"type":"string"}},"required":["path","code"],"type":"object"},"maxItems":20,"type":"array"},"message":{"type":"string"},"problems":{"items":{"enum":["too_short","too_long","equals_email","not_well_formed"],"type":"string"},"minItems":1,"type":"array"},"requestId":{"type":"string"}},"required":["code","message","requestId"],"type":"object"}},"required":["error"],"type":"object"}},"securitySchemes":{"bearer":{"scheme":"bearer","type":"http"},"session":{"description":"Session authentication. Send the X-CSRF-Token header on state-changing requests.","in":"cookie","name":"__Host-pb_session","type":"apiKey"}}},"info":{"title":"Package Broker","version":"2"},"jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","openapi":"3.1.0","paths":{"/_pb/audit":{"get":{"operationId":"listAudit","parameters":[{"in":"query","name":"action","required":false,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"query","name":"actor","required":false,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"query","name":"after","required":false,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"maxLength":16,"pattern":"^[0-9]+$","type":"string"}},{"in":"query","name":"project","required":false,"schema":{"maxLength":200,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"action":{"type":"string"},"actor":{"additionalProperties":false,"properties":{"id":{"type":["string","null"]},"type":{"type":"string"}},"required":["type","id"],"type":"object"},"createdAt":{"type":"string"},"id":{"type":"string"},"payload":{"additionalProperties":false,"properties":{"changes":{"additionalProperties":{"additionalProperties":false,"properties":{"new":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"type":"string"},"type":"array"}]},"old":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"type":"string"},"type":"array"}]}},"type":"object"},"propertyNames":{"type":"string"},"type":"object"},"op_id":{"type":"string"},"request_id":{"type":"string"}},"type":"object"},"projectId":{"type":["string","null"]},"seq":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"targetId":{"type":["string","null"]},"targetType":{"type":"string"}},"required":["id","seq","action","actor","targetType","targetId","projectId","createdAt","payload"],"type":"object"},"type":"array"},"next":{"type":["string","null"]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List audit events","tags":["audit"],"x-pb-boundary":"organization","x-pb-permission":"org:audit:read","x-pb-session-only":false}},"/_pb/audit/head":{"get":{"operationId":"auditHead","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"hash":{"type":"string"},"lastVerifiedAt":{"type":["string","null"]},"pendingCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"seq":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["seq","hash","pendingCount","lastVerifiedAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"}},"security":[{"session":[]},{"bearer":[]}],"summary":"Read audit chain head","tags":["audit"],"x-pb-boundary":"organization","x-pb-permission":"org:audit:read","x-pb-session-only":false}},"/_pb/auth/local/login":{"post":{"operationId":"localLogin","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"code":{"maxLength":1024,"type":"string"},"email":{"maxLength":1024,"type":"string"},"password":{"maxLength":1024,"type":"string"}},"required":["email","password","code"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[],"summary":"Sign in with the local login","tags":["auth"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/auth/local/reauth":{"post":{"operationId":"localReauth","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"code":{"maxLength":1024,"type":"string"},"password":{"maxLength":1024,"type":"string"}},"required":["password","code"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[],"summary":"Re-authenticate with the local login","tags":["auth"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/auth/local/setup/finish":{"post":{"operationId":"finishLocalSetup","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"code":{"maxLength":1024,"type":"string"},"password":{"maxLength":1024,"type":"string"},"token":{"maxLength":1024,"type":"string"}},"required":["token","password","code"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[],"summary":"Finish the local login setup and sign in","tags":["auth"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/auth/local/setup/start":{"post":{"operationId":"startLocalSetup","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"token":{"maxLength":1024,"type":"string"}},"required":["token"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"provisioningUri":{"type":"string"},"secret":{"type":"string"}},"required":["provisioningUri","secret"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[],"summary":"Start the local login setup","tags":["auth"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/auth/logout":{"post":{"operationId":"logout","responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"}},"security":[],"summary":"End the current session","tags":["session"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/auth/providers":{"get":{"operationId":"listAuthProviders","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"local":{"type":"boolean"},"providers":{"items":{"additionalProperties":false,"properties":{"displayName":{"type":"string"},"id":{"type":"string"},"kind":{"enum":["cloudflare-access","oidc"],"type":"string"},"supportsReauth":{"type":"boolean"}},"required":["id","kind","displayName","supportsReauth"],"type":"object"},"type":"array"}},"required":["providers","local"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"}},"security":[],"summary":"List the sign-in methods","tags":["auth"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/auth/sso/{provider}/callback":{"get":{"operationId":"finishSsoLogin","parameters":[{"in":"path","name":"provider","required":true,"schema":{"type":"string"}}],"responses":{"303":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[],"summary":"Finish a single sign-on login or re-authentication","tags":["auth"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/auth/sso/{provider}/start":{"post":{"operationId":"startSsoLogin","parameters":[{"in":"path","name":"provider","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"purpose":{"enum":["login","reauth"],"type":"string"},"returnTo":{"type":"string"}},"required":["purpose"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"location":{"type":"string"}},"required":["location"],"type":"object"}}},"description":"Response"},"303":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Upstream request refused; Bad gateway"}},"security":[],"summary":"Start a single sign-on login or re-authentication","tags":["auth"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/grants":{"get":{"operationId":"listGrants","parameters":[{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^([1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"revision":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"roleId":{"type":"string"},"subject":{"anyOf":[{"additionalProperties":false,"properties":{"type":{"const":"email","type":"string"},"value":{"type":"string"}},"required":["type"],"type":"object"},{"additionalProperties":false,"properties":{"provider":{"type":"string"},"type":{"const":"group","type":"string"},"value":{"type":"string"}},"required":["type","provider"],"type":"object"}]}},"required":["id","subject","roleId","createdAt","revision"],"type":"object"},"type":"array"},"next":{"type":["string","null"]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List organization grants","tags":["grants"],"x-pb-boundary":"organization","x-pb-permission":"org:grants:read","x-pb-session-only":false},"post":{"operationId":"createGrant","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"roleId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"subject":{"anyOf":[{"additionalProperties":false,"properties":{"type":{"const":"email","type":"string"},"value":{"maxLength":320,"minLength":1,"type":"string"}},"required":["type","value"],"type":"object"},{"additionalProperties":false,"properties":{"provider":{"maxLength":64,"minLength":1,"type":"string"},"type":{"const":"group","type":"string"},"value":{"maxLength":512,"minLength":1,"type":"string"}},"required":["type","provider","value"],"type":"object"}]}},"required":["subject","roleId"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["id"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Add an organization grant","tags":["grants"],"x-pb-boundary":"organization","x-pb-permission":"org:grants:write","x-pb-session-only":true}},"/_pb/grants/{grant}":{"delete":{"operationId":"revokeGrant","parameters":[{"in":"path","name":"grant","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Revoke a grant","tags":["grants"],"x-pb-boundary":"organization","x-pb-permission":"org:grants:write","x-pb-session-only":true},"patch":{"operationId":"changeGrant","parameters":[{"in":"path","name":"grant","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"roleId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["roleId"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Change the role of a grant","tags":["grants"],"x-pb-boundary":"organization","x-pb-permission":"org:grants:write","x-pb-session-only":true}},"/_pb/import-runs":{"get":{"operationId":"listImportRuns","parameters":[{"in":"query","name":"cursor","required":false,"schema":{"maxLength":4096,"minLength":1,"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^([1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"acceptedAt":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"approvedByUserId":{"type":["string","null"]},"beforeImageExpiresAt":{"type":["string","null"]},"credentialWindowUntil":{"type":["string","null"]},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"planHash":{"type":["string","null"]},"state":{"enum":["planned","applying","failed","applied","verifying","verified","rolled_back","cancelled"],"type":"string"}},"required":["id","state","planHash","approvedAt","approvedByUserId","acceptedAt","beforeImageExpiresAt"],"type":"object"},"type":"array"},"next":{"type":["string","null"]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List import runs","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:write","x-pb-session-only":false},"post":{"operationId":"createImportRun","requestBody":{"content":{"application/json":{"schema":{}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"planHash":{"type":"string"},"state":{"const":"planned","type":"string"}},"required":["id","planHash","state"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]},{"bearer":[]}],"summary":"Plan an import","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:write","x-pb-session-only":false}},"/_pb/import-runs/{id}":{"get":{"operationId":"getImportRun","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"acceptedAt":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"approvedByUserId":{"type":["string","null"]},"beforeImageExpiresAt":{"type":["string","null"]},"credentialWindowUntil":{"type":["string","null"]},"credentials":{"items":{"additionalProperties":false,"properties":{"bound":{"type":"boolean"},"sourceRef":{"type":"string"}},"required":["sourceRef","bound"],"type":"object"},"type":"array"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"planHash":{"type":["string","null"]},"state":{"enum":["planned","applying","failed","applied","verifying","verified","rolled_back","cancelled"],"type":"string"}},"required":["id","state","planHash","approvedAt","approvedByUserId","acceptedAt","beforeImageExpiresAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]},{"bearer":[]}],"summary":"Read an import run","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:write","x-pb-session-only":false}},"/_pb/import-runs/{id}/accept":{"post":{"operationId":"acceptImportRun","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]}],"summary":"accept an import run","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:approve","x-pb-session-only":true}},"/_pb/import-runs/{id}/apply":{"post":{"operationId":"applyImportRun","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]}],"summary":"apply an import run","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:approve","x-pb-session-only":true}},"/_pb/import-runs/{id}/approve":{"post":{"operationId":"approveImportRun","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"planHash":{"maxLength":64,"type":"string"}},"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]}],"summary":"approve an import run","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:approve","x-pb-session-only":true}},"/_pb/import-runs/{id}/cancel":{"post":{"operationId":"cancelImportRun","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]}],"summary":"cancel an import run","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:approve","x-pb-session-only":true}},"/_pb/import-runs/{id}/credentials/{externalRef}":{"put":{"operationId":"acceptImportCredential","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"path","name":"externalRef","required":true,"schema":{"pattern":"^[A-Za-z0-9._:/-]{1,200}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"kind":{"enum":["http_basic","bearer","header","query","github_app","npm_token","ssh_key"],"type":"string"},"material":{"maxLength":16384,"type":"string"}},"required":["kind","material"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]},{"bearer":[]}],"summary":"Bind an imported source credential","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:write","x-pb-session-only":false}},"/_pb/import-runs/{id}/rollback":{"post":{"operationId":"rollbackImportRun","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]}],"summary":"rollback an import run","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:approve","x-pb-session-only":true}},"/_pb/import-runs/{id}/verify":{"post":{"operationId":"verifyImportRun","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]},{"bearer":[]}],"summary":"verify an import run","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:write","x-pb-session-only":false}},"/_pb/me":{"get":{"operationId":"getMe","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"organization":{"additionalProperties":false,"properties":{"name":{"type":"string"},"slug":{"type":"string"}},"required":["slug","name"],"type":"object"},"principal":{"additionalProperties":false,"properties":{"id":{"type":"string"},"kind":{"enum":["user","service","customer"],"type":"string"}},"required":["kind","id"],"type":"object"},"user":{"anyOf":[{"additionalProperties":false,"properties":{"displayName":{"type":["string","null"]},"email":{"type":["string","null"]},"id":{"type":"string"}},"required":["id","email","displayName"],"type":"object"},{"type":"null"}]}},"required":["principal","user","organization"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"}},"security":[],"summary":"Get the caller identity","tags":["me"],"x-pb-boundary":"authenticated","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/me/permissions":{"get":{"operationId":"getMyPermissions","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"organization":{"items":{"type":"string"},"type":"array"}},"required":["organization"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"}},"security":[],"summary":"Get caller organization permissions","tags":["permissions"],"x-pb-boundary":"authenticated","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/me/tokens":{"get":{"operationId":"listMyTokens","parameters":[{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["active","expired","revoked"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"id":{"type":"string"},"kind":{"enum":["pat","svc"],"type":"string"},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"projectCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"type":["string","null"]},"projectMode":{"anyOf":[{"enum":["all","selected"],"type":"string"},{"type":"null"}]},"readOnly":{"type":"boolean"},"revokedAt":{"type":["string","null"]},"scope":{"enum":["read","write","full"],"type":"string"},"servicePrincipalId":{"type":["string","null"]},"status":{"enum":["active","expired","revoked"],"type":"string"},"userId":{"type":["string","null"]}},"required":["id","kind","name","scope","readOnly","status","projectMode","projectCount","projectId","userId","createdByUserId","servicePrincipalId","createdAt","expiresAt","lastUsedAt","revokedAt"],"type":"object"},"type":"array"},"lifetime":{"additionalProperties":false,"properties":{"personal":{"additionalProperties":false,"properties":{"defaultDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["maxDays","defaultDays"],"type":"object"},"service":{"additionalProperties":false,"properties":{"defaultDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["maxDays","defaultDays"],"type":"object"}},"required":["personal","service"],"type":"object"},"next":{"type":["string","null"]}},"required":["items","next","lifetime"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"}},"security":[{"session":[]}],"summary":"List the caller personal access tokens","tags":["tokens"],"x-pb-boundary":"self","x-pb-permission":null,"x-pb-session-only":true},"post":{"operationId":"createPersonalToken","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expiresAt":{"type":"string"},"lifetimeDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"type":"string"},"projectIds":{"items":{"type":"string"},"maxItems":200,"type":"array"},"projectMode":{"enum":["all","selected"],"type":"string"},"readOnly":{"type":"boolean"},"scope":{"enum":["read","write","full"],"type":"string"}},"required":["name","scope","projectMode","projectIds"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"type":"string"},"token":{"type":"string"}},"required":["id","token"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Reauthentication required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Issue a personal access token","tags":["tokens"],"x-pb-boundary":"self","x-pb-permission":null,"x-pb-session-only":true}},"/_pb/me/tokens/{token}":{"delete":{"operationId":"revokeMyToken","parameters":[{"in":"path","name":"token","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Revoke a personal access token","tags":["tokens"],"x-pb-boundary":"self","x-pb-permission":null,"x-pb-session-only":true},"get":{"operationId":"getMyToken","parameters":[{"in":"path","name":"token","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"id":{"type":"string"},"kind":{"enum":["pat","svc"],"type":"string"},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"projectCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"type":["string","null"]},"projectMode":{"anyOf":[{"enum":["all","selected"],"type":"string"},{"type":"null"}]},"readOnly":{"type":"boolean"},"revokedAt":{"type":["string","null"]},"scope":{"enum":["read","write","full"],"type":"string"},"servicePrincipalId":{"type":["string","null"]},"status":{"enum":["active","expired","revoked"],"type":"string"},"userId":{"type":["string","null"]}},"required":["id","kind","name","scope","readOnly","status","projectMode","projectCount","projectId","userId","createdByUserId","servicePrincipalId","createdAt","expiresAt","lastUsedAt","revokedAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]}],"summary":"Get a personal access token","tags":["tokens"],"x-pb-boundary":"self","x-pb-permission":null,"x-pb-session-only":true}},"/_pb/organization":{"get":{"operationId":"getOrganization","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"settings":{"additionalProperties":false,"properties":{"retentionRemovedUpstreamDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"tokenDefaultExpiryDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"tokenMaxLifetimeDays":{"additionalProperties":false,"properties":{"personal":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"service":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["personal","service"],"type":"object"}},"required":["retentionRemovedUpstreamDays","tokenDefaultExpiryDays","tokenMaxLifetimeDays"],"type":"object"},"slug":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slug","name","settings","createdAt","updatedAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"}},"security":[{"session":[]},{"bearer":[]}],"summary":"Get the organization","tags":["organization"],"x-pb-boundary":"organization","x-pb-permission":"org:read","x-pb-session-only":false}},"/_pb/packages":{"get":{"operationId":"listPackages","parameters":[{"in":"query","name":"after","required":false,"schema":{"maxLength":464,"pattern":"^(?:composer|npm):[\\\\s\\\\S]+:[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"ecosystem","required":false,"schema":{"enum":["composer","npm"],"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}},{"in":"query","name":"project","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"q","required":false,"schema":{"maxLength":100,"minLength":1,"type":"string"}},{"in":"query","name":"source","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["active","quarantined","tombstoned","removed_upstream"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"ecosystem":{"enum":["composer","npm"],"type":"string"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"lastSyncedAt":{"type":["string","null"]},"latestVersion":{"type":["string","null"]},"name":{"type":"string"},"source":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"name":{"type":"string"},"projectId":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"type":{"enum":["vcs","composer_repository","npm_registry","packagist_proxy","npmjs_proxy","hosted"],"type":"string"}},"required":["id","name","type","projectId"],"type":"object"},"status":{"enum":["active","quarantined","tombstoned","removed_upstream"],"type":"string"},"versionCount":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["id","ecosystem","name","latestVersion","status","source","versionCount","lastSyncedAt"],"type":"object"},"type":"array"},"next":{"anyOf":[{"maxLength":464,"pattern":"^(?:composer|npm):[\\\\s\\\\S]+:[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List packages","tags":["packages"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:read","x-pb-session-only":false}},"/_pb/packages/{package}/versions":{"get":{"operationId":"listPackageVersions","parameters":[{"in":"path","name":"package","required":true,"schema":{"type":"string"}},{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"publishedAt":{"type":"string"},"removedUpstreamAt":{"type":["string","null"]},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"stability":{"enum":["dev","alpha","beta","RC","stable"],"type":"string"},"status":{"enum":["active","quarantined","tombstoned","removed_upstream","yanked"],"type":"string"},"tombstonedAt":{"type":["string","null"]},"version":{"type":"string"},"vulnerability":{"additionalProperties":false,"properties":{"advisories":{"items":{"additionalProperties":false,"properties":{"detailsFetchedAt":{"type":["string","null"]},"id":{"type":"string"},"severity":{"additionalProperties":false,"properties":{"entries":{"items":{"additionalProperties":false,"properties":{"score":{"type":"string"},"type":{"type":"string"}},"required":["type","score"],"type":"object"},"type":"array"},"level":{"enum":["critical","high","medium","low","unknown"],"type":"string"}},"required":["level","entries"],"type":"object"},"url":{"type":"null"}},"required":["id","url","severity","detailsFetchedAt"],"type":"object"},"maxItems":20,"type":"array"},"advisoriesTruncated":{"type":"boolean"},"advisoryCount":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"detailsComplete":{"type":"boolean"},"fetchedAt":{"type":["string","null"]},"lastKnownStatus":{"anyOf":[{"enum":["affected","not_affected"],"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"enum":["not_checked","disabled","unsupported_version","pending","upstream_unavailable","incomplete","expired"],"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"const":"osv","type":"string"},{"type":"null"}]},"status":{"enum":["affected","not_affected","unknown","stale"],"type":"string"}},"required":["status","reason","source","fetchedAt","lastKnownStatus","advisoryCount","advisories","detailsComplete","advisoriesTruncated"],"type":"object"}},"required":["vulnerability","id","version","stability","status","publishedAt","removedUpstreamAt","tombstonedAt","revision"],"type":"object"},"type":"array"},"next":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List package versions","tags":["packages"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:read","x-pb-session-only":false}},"/_pb/packages/{package}/versions/{version}/quarantine":{"post":{"operationId":"quarantinePackageVersion","parameters":[{"in":"path","name":"package","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"path","name":"version","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"status":{"enum":["active","removed_upstream","yanked","quarantined","tombstoned"],"type":"string"}},"required":["id","status"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]}],"summary":"quarantine a package version","tags":["packages"],"x-pb-boundary":"organization","x-pb-permission":"org:packages:manage","x-pb-session-only":true}},"/_pb/packages/{package}/versions/{version}/release":{"post":{"operationId":"releasePackageVersion","parameters":[{"in":"path","name":"package","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"path","name":"version","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"status":{"enum":["active","removed_upstream","yanked","quarantined","tombstoned"],"type":"string"}},"required":["id","status"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]}],"summary":"release a package version","tags":["packages"],"x-pb-boundary":"organization","x-pb-permission":"org:packages:manage","x-pb-session-only":true}},"/_pb/packages/{package}/versions/{version}/tombstone":{"post":{"operationId":"tombstonePackageVersion","parameters":[{"in":"path","name":"package","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"path","name":"version","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"status":{"enum":["active","removed_upstream","yanked","quarantined","tombstoned"],"type":"string"}},"required":["id","status"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]}],"summary":"tombstone a package version","tags":["packages"],"x-pb-boundary":"organization","x-pb-permission":"org:packages:manage","x-pb-session-only":true}},"/_pb/projects":{"get":{"operationId":"listProjects","parameters":[{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^([1-9][0-9]?|100)$","type":"string"}},{"in":"query","name":"q","required":false,"schema":{"description":"Case-sensitive slug or name prefix; LIKE wildcards % and _ are refused.","maxLength":200,"minLength":1,"pattern":"^[^%_\\\\u0000-\\\\u001f\\\\u007f-\\\\u009f\\\\u2028\\\\u2029]+$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["active","archived"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"etag":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"enum":["active","archived"],"type":"string"}},"required":["id","slug","name","status","etag"],"type":"object"},"type":"array"},"next":{"type":["string","null"]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[],"summary":"List readable projects","tags":["projects"],"x-pb-boundary":"authenticated","x-pb-permission":null,"x-pb-session-only":false},"post":{"operationId":"createProject","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"initialRoleId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"name":{"maxLength":1000,"minLength":1,"type":"string"},"requirePublishApproval":{"type":"boolean"},"slug":{"maxLength":200,"minLength":1,"type":"string"},"tokenMaxScope":{"enum":["read","write","full"],"type":"string"}},"required":["slug","name"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"type":"string"},"slug":{"type":"string"}},"required":["id","slug"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Add a project","tags":["projects"],"x-pb-boundary":"organization","x-pb-permission":"org:projects:create","x-pb-session-only":true}},"/_pb/projects/{project}":{"get":{"operationId":"getProject","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"type":"string"},"name":{"type":"string"},"requirePublishApproval":{"type":"boolean"},"revision":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"slug":{"type":"string"},"status":{"enum":["active","archived"],"type":"string"},"tokenMaxScope":{"enum":["read","write","full"],"type":"string"}},"required":["id","slug","name","status","tokenMaxScope","requirePublishApproval","revision"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]},{"bearer":[]}],"summary":"Read a project","tags":["projects"],"x-pb-boundary":"project","x-pb-permission":"project:read","x-pb-session-only":false},"patch":{"operationId":"updateProject","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"maxLength":1000,"minLength":1,"type":"string"},"requirePublishApproval":{"type":"boolean"},"tokenMaxScope":{"enum":["read","write","full"],"type":"string"}},"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Change project settings","tags":["projects"],"x-pb-boundary":"project","x-pb-permission":"project:settings:write","x-pb-session-only":true}},"/_pb/projects/{project}/archive":{"post":{"operationId":"archiveProject","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Archive a project","tags":["projects"],"x-pb-boundary":"organization","x-pb-permission":"org:projects:archive","x-pb-session-only":true}},"/_pb/projects/{project}/audit":{"get":{"operationId":"listProjectAudit","parameters":[{"in":"path","name":"project","required":true,"schema":{"maxLength":64,"minLength":1,"type":"string"}},{"in":"query","name":"action","required":false,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"query","name":"actor","required":false,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"query","name":"after","required":false,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"maxLength":16,"pattern":"^[0-9]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"action":{"type":"string"},"actor":{"additionalProperties":false,"properties":{"id":{"type":["string","null"]},"type":{"type":"string"}},"required":["type","id"],"type":"object"},"createdAt":{"type":"string"},"id":{"type":"string"},"payload":{"additionalProperties":false,"properties":{"changes":{"additionalProperties":{"additionalProperties":false,"properties":{"new":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"type":"string"},"type":"array"}]},"old":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"type":"string"},"type":"array"}]}},"type":"object"},"propertyNames":{"type":"string"},"type":"object"},"op_id":{"type":"string"},"request_id":{"type":"string"}},"type":"object"},"projectId":{"type":["string","null"]},"seq":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"targetId":{"type":["string","null"]},"targetType":{"type":"string"}},"required":["id","seq","action","actor","targetType","targetId","projectId","createdAt","payload"],"type":"object"},"type":"array"},"next":{"type":["string","null"]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List project audit events","tags":["audit"],"x-pb-boundary":"project","x-pb-permission":"project:audit:read","x-pb-session-only":false}},"/_pb/projects/{project}/grants":{"get":{"operationId":"listProjectGrants","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"principal":{"additionalProperties":false,"properties":{"displayName":{"type":"string"},"email":{"type":"string"},"id":{"type":"string"},"kind":{"enum":["user","email","group"],"type":"string"},"provider":{"type":"string"}},"required":["kind","id","displayName"],"type":"object"},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"role":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"name":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array"}},"required":["id","name","permissions"],"type":"object"}},"required":["id","revision","createdAt","principal","role"],"type":"object"},"type":"array"},"next":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List project grants and their principals","tags":["project-access"],"x-pb-boundary":"project","x-pb-permission":"project:grants:read","x-pb-session-only":false},"post":{"operationId":"createProjectGrant","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"roleId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"subject":{"anyOf":[{"additionalProperties":false,"properties":{"type":{"const":"email","type":"string"},"value":{"maxLength":320,"minLength":1,"type":"string"}},"required":["type","value"],"type":"object"},{"additionalProperties":false,"properties":{"provider":{"maxLength":64,"minLength":1,"type":"string"},"type":{"const":"group","type":"string"},"value":{"maxLength":256,"minLength":1,"type":"string"}},"required":["type","provider","value"],"type":"object"}]}},"required":["subject","roleId"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["id"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Grant project access","tags":["project-access"],"x-pb-boundary":"project","x-pb-permission":"project:grants:write","x-pb-session-only":true}},"/_pb/projects/{project}/grants/{grant}":{"delete":{"operationId":"revokeProjectGrant","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"grant","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Revoke a project grant","tags":["project-access"],"x-pb-boundary":"project","x-pb-permission":"project:grants:write","x-pb-session-only":true},"patch":{"operationId":"changeProjectGrant","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"grant","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"roleId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["roleId"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Change the role of a project grant","tags":["project-access"],"x-pb-boundary":"project","x-pb-permission":"project:grants:write","x-pb-session-only":true}},"/_pb/projects/{project}/packages":{"get":{"operationId":"listProjectPackages","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"query","name":"after","required":false,"schema":{"maxLength":437,"pattern":"^(?:composer|npm):[\\\\s\\\\S]+$","type":"string"}},{"in":"query","name":"ecosystem","required":false,"schema":{"enum":["composer","npm"],"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}},{"in":"query","name":"q","required":false,"schema":{"maxLength":100,"minLength":1,"type":"string"}},{"in":"query","name":"source","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["active","quarantined","tombstoned","removed_upstream"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"ecosystem":{"enum":["composer","npm"],"type":"string"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"lastSyncedAt":{"type":["string","null"]},"latestVersion":{"type":["string","null"]},"name":{"type":"string"},"source":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"name":{"type":"string"},"projectId":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"type":{"enum":["vcs","composer_repository","npm_registry","packagist_proxy","npmjs_proxy","hosted"],"type":"string"}},"required":["id","name","type","projectId"],"type":"object"},"status":{"enum":["active","quarantined","tombstoned","removed_upstream"],"type":"string"},"versionCount":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["id","ecosystem","name","latestVersion","status","source","versionCount","lastSyncedAt"],"type":"object"},"type":"array"},"next":{"anyOf":[{"maxLength":437,"pattern":"^(?:composer|npm):[\\\\s\\\\S]+$","type":"string"},{"type":"null"}]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List packages","tags":["packages"],"x-pb-boundary":"project","x-pb-permission":"project:packages:read","x-pb-session-only":false}},"/_pb/projects/{project}/packages/{package}/versions":{"get":{"operationId":"listProjectPackageVersions","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"package","required":true,"schema":{"type":"string"}},{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"publishedAt":{"type":"string"},"removedUpstreamAt":{"type":["string","null"]},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"stability":{"enum":["dev","alpha","beta","RC","stable"],"type":"string"},"status":{"enum":["active","quarantined","tombstoned","removed_upstream","yanked"],"type":"string"},"tombstonedAt":{"type":["string","null"]},"version":{"type":"string"},"vulnerability":{"additionalProperties":false,"properties":{"advisories":{"items":{"additionalProperties":false,"properties":{"detailsFetchedAt":{"type":["string","null"]},"id":{"type":"string"},"severity":{"additionalProperties":false,"properties":{"entries":{"items":{"additionalProperties":false,"properties":{"score":{"type":"string"},"type":{"type":"string"}},"required":["type","score"],"type":"object"},"type":"array"},"level":{"enum":["critical","high","medium","low","unknown"],"type":"string"}},"required":["level","entries"],"type":"object"},"url":{"type":"null"}},"required":["id","url","severity","detailsFetchedAt"],"type":"object"},"maxItems":20,"type":"array"},"advisoriesTruncated":{"type":"boolean"},"advisoryCount":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"detailsComplete":{"type":"boolean"},"fetchedAt":{"type":["string","null"]},"lastKnownStatus":{"anyOf":[{"enum":["affected","not_affected"],"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"enum":["not_checked","disabled","unsupported_version","pending","upstream_unavailable","incomplete","expired"],"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"const":"osv","type":"string"},{"type":"null"}]},"status":{"enum":["affected","not_affected","unknown","stale"],"type":"string"}},"required":["status","reason","source","fetchedAt","lastKnownStatus","advisoryCount","advisories","detailsComplete","advisoriesTruncated"],"type":"object"}},"required":["vulnerability","id","version","stability","status","publishedAt","removedUpstreamAt","tombstonedAt","revision"],"type":"object"},"type":"array"},"next":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List package versions","tags":["packages"],"x-pb-boundary":"project","x-pb-permission":"project:packages:read","x-pb-session-only":false}},"/_pb/projects/{project}/packages/{package}/versions/{version}/quarantine":{"post":{"operationId":"quarantineProjectPackageVersion","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"package","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"path","name":"version","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"status":{"enum":["active","removed_upstream","yanked","quarantined","tombstoned"],"type":"string"}},"required":["id","status"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]}],"summary":"quarantine a package version","tags":["packages"],"x-pb-boundary":"project","x-pb-permission":"project:packages:manage","x-pb-session-only":true}},"/_pb/projects/{project}/packages/{package}/versions/{version}/release":{"post":{"operationId":"releaseProjectPackageVersion","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"package","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"path","name":"version","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"status":{"enum":["active","removed_upstream","yanked","quarantined","tombstoned"],"type":"string"}},"required":["id","status"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]}],"summary":"release a package version","tags":["packages"],"x-pb-boundary":"project","x-pb-permission":"project:packages:manage","x-pb-session-only":true}},"/_pb/projects/{project}/packages/{package}/versions/{version}/tombstone":{"post":{"operationId":"tombstoneProjectPackageVersion","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"package","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"path","name":"version","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"status":{"enum":["active","removed_upstream","yanked","quarantined","tombstoned"],"type":"string"}},"required":["id","status"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]}],"summary":"tombstone a package version","tags":["packages"],"x-pb-boundary":"project","x-pb-permission":"project:packages:manage","x-pb-session-only":true}},"/_pb/projects/{project}/permissions":{"get":{"operationId":"getMyProjectPermissions","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"project":{"items":{"type":"string"},"type":"array"}},"required":["project"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]},{"bearer":[]}],"summary":"Get caller project permissions","tags":["permissions"],"x-pb-boundary":"project","x-pb-permission":"project:read","x-pb-session-only":false}},"/_pb/projects/{project}/resolve":{"get":{"operationId":"resolveName","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"query","name":"name","required":true,"schema":{"maxLength":428,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"candidates":{"items":{"additionalProperties":false,"properties":{"eligible":{"type":"boolean"},"projectLevel":{"type":"boolean"},"sourceId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"sourceName":{"type":"string"}},"required":["sourceId","sourceName","projectLevel","eligible"],"type":"object"},"type":"array"},"ecosystem":{"enum":["composer","npm"],"type":"string"},"name":{"type":"string"},"winner":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]}},"required":["name","ecosystem","candidates","winner"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]},{"bearer":[]}],"summary":"Preview source resolution for a package name","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:read","x-pb-session-only":false}},"/_pb/projects/{project}/restore":{"post":{"operationId":"restoreProject","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Restore a project","tags":["projects"],"x-pb-boundary":"organization","x-pb-permission":"org:projects:archive","x-pb-session-only":true}},"/_pb/projects/{project}/service-principals/{principal}/permissions":{"put":{"operationId":"setProjectServicePrincipalPermissions","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"principal","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"permissions":{"items":{"enum":["org:read","org:settings:write","org:users:read","org:users:write","org:roles:read","org:roles:write","org:grants:read","org:grants:write","org:projects:create","org:projects:archive","org:sources:read","org:sources:write","org:tokens:read","org:tokens:revoke","org:service-principals:write","org:packages:manage","org:import:write","org:import:approve","org:audit:read","project:read","project:settings:write","project:grants:read","project:grants:write","project:packages:read","project:packages:write","project:packages:manage","project:sources:read","project:sources:write","project:service-principals:write","project:tokens:create","project:tokens:read","project:tokens:revoke","project:audit:read"],"type":"string"},"type":"array"}},"required":["permissions"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Set service principal permissions","tags":["service-principals"],"x-pb-boundary":"project","x-pb-permission":"project:service-principals:write","x-pb-session-only":true}},"/_pb/projects/{project}/service-principals/{principal}/restore":{"post":{"operationId":"restoreProjectServicePrincipal","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"principal","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Restore service principal","tags":["service-principals"],"x-pb-boundary":"project","x-pb-permission":"project:service-principals:write","x-pb-session-only":true}},"/_pb/projects/{project}/service-principals/{principal}/suspend":{"post":{"operationId":"suspendProjectServicePrincipal","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"principal","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Suspend service principal","tags":["service-principals"],"x-pb-boundary":"project","x-pb-permission":"project:service-principals:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources":{"get":{"operationId":"listProjectSources","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"anyOf":[{"additionalProperties":false,"properties":{"attached":{"const":true,"type":"boolean"},"config":{"anyOf":[{"additionalProperties":false,"properties":{"installationId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"packageName":{"type":"string"},"provider":{"enum":["github","git","ssh"],"type":"string"},"refs":{"additionalProperties":false,"properties":{"branches":{"items":{"type":"string"},"type":"array"},"tags":{"type":"boolean"}},"type":"object"},"repository":{"type":"string"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"mirrorsFallback":{"type":"boolean"},"selection":{"additionalProperties":false,"properties":{"expandPatterns":{"type":"boolean"},"packages":{"items":{"type":"string"},"type":"array"},"patterns":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"scopes":{"items":{"type":"string"},"type":"array"}},"type":"object"},{"additionalProperties":false,"properties":{"githubToken":{"type":"boolean"}},"type":"object"},{"additionalProperties":false,"properties":{},"type":"object"}]},"configComplete":{"type":"boolean"},"defaultVisibleToNewProjects":{"type":"boolean"},"ecosystem":{"enum":["composer","npm"],"type":"string"},"githubAuthentication":{"enum":["app","token"],"type":"string"},"hasCredential":{"type":"boolean"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"lastError":{"type":["string","null"]},"lastPolledAt":{"type":["string","null"]},"lastRemovalRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"absent":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"at":{"type":"string"},"listed":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"successful":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["at","absent","listed","successful"],"type":"object"},{"type":"null"}]},"lastSuccessAt":{"type":["string","null"]},"name":{"type":"string"},"nextPollAt":{"type":["string","null"]},"pollIntervalSeconds":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"precedence":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"removalAcceptanceArmed":{"type":"boolean"},"removalPolicy":{"enum":["flag","exclude"],"type":"string"},"retentionDaysOverride":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]},"status":{"enum":["active","degraded","failing","paused"],"type":"string"},"sync":{"additionalProperties":false,"properties":{"completed":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"errors":{"items":{"additionalProperties":false,"properties":{"code":{"enum":["network","timeout","http_error","unauthorized","rate_limited","not_found","invalid_response","tag_limit_exceeded","mass_absence","too_large","policy_denied","credential_unavailable","internal"],"type":"string"},"count":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["code","count"],"type":"object"},"type":"array"},"failed":{"description":"Terminal package failures.","maximum":9007199254740991,"minimum":0,"type":"integer"},"generation":{"type":"string"},"listing":{"type":"boolean"},"queued":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"retrying":{"description":"Failed packages queued for another attempt; disjoint from queued, running, failed and completed.","maximum":9007199254740991,"minimum":0,"type":"integer"},"running":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["listing","generation","queued","running","retrying","failed","completed","errors"],"type":"object"},"type":{"enum":["vcs","composer_repository","npm_registry","packagist_proxy","npmjs_proxy","hosted"],"type":"string"},"url":{"type":["string","null"]},"userAgent":{"type":["string","null"]}},"required":["id","projectId","name","ecosystem","type","url","status","removalPolicy","pollIntervalSeconds","lastSuccessAt","lastError","lastPolledAt","nextPollAt","hasCredential","lastRemovalRefusal","removalAcceptanceArmed","attached","precedence"],"type":"object"},{"additionalProperties":false,"properties":{"attached":{"const":false,"type":"boolean"},"config":{"anyOf":[{"additionalProperties":false,"properties":{"installationId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"packageName":{"type":"string"},"provider":{"enum":["github","git","ssh"],"type":"string"},"refs":{"additionalProperties":false,"properties":{"branches":{"items":{"type":"string"},"type":"array"},"tags":{"type":"boolean"}},"type":"object"},"repository":{"type":"string"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"mirrorsFallback":{"type":"boolean"},"selection":{"additionalProperties":false,"properties":{"expandPatterns":{"type":"boolean"},"packages":{"items":{"type":"string"},"type":"array"},"patterns":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"scopes":{"items":{"type":"string"},"type":"array"}},"type":"object"},{"additionalProperties":false,"properties":{"githubToken":{"type":"boolean"}},"type":"object"},{"additionalProperties":false,"properties":{},"type":"object"}]},"configComplete":{"type":"boolean"},"defaultVisibleToNewProjects":{"type":"boolean"},"ecosystem":{"enum":["composer","npm"],"type":"string"},"githubAuthentication":{"enum":["app","token"],"type":"string"},"hasCredential":{"type":"boolean"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"lastError":{"type":["string","null"]},"lastPolledAt":{"type":["string","null"]},"lastRemovalRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"absent":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"at":{"type":"string"},"listed":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"successful":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["at","absent","listed","successful"],"type":"object"},{"type":"null"}]},"lastSuccessAt":{"type":["string","null"]},"name":{"type":"string"},"nextPollAt":{"type":["string","null"]},"pollIntervalSeconds":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"removalAcceptanceArmed":{"type":"boolean"},"removalPolicy":{"enum":["flag","exclude"],"type":"string"},"retentionDaysOverride":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]},"status":{"enum":["active","degraded","failing","paused"],"type":"string"},"sync":{"additionalProperties":false,"properties":{"completed":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"errors":{"items":{"additionalProperties":false,"properties":{"code":{"enum":["network","timeout","http_error","unauthorized","rate_limited","not_found","invalid_response","tag_limit_exceeded","mass_absence","too_large","policy_denied","credential_unavailable","internal"],"type":"string"},"count":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["code","count"],"type":"object"},"type":"array"},"failed":{"description":"Terminal package failures.","maximum":9007199254740991,"minimum":0,"type":"integer"},"generation":{"type":"string"},"listing":{"type":"boolean"},"queued":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"retrying":{"description":"Failed packages queued for another attempt; disjoint from queued, running, failed and completed.","maximum":9007199254740991,"minimum":0,"type":"integer"},"running":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["listing","generation","queued","running","retrying","failed","completed","errors"],"type":"object"},"type":{"enum":["vcs","composer_repository","npm_registry","packagist_proxy","npmjs_proxy","hosted"],"type":"string"},"url":{"type":["string","null"]},"userAgent":{"type":["string","null"]}},"required":["id","projectId","name","ecosystem","type","url","status","removalPolicy","pollIntervalSeconds","lastSuccessAt","lastError","lastPolledAt","nextPollAt","hasCredential","lastRemovalRefusal","removalAcceptanceArmed","attached"],"type":"object"}]},"type":"array"},"next":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"vcsProviders":{"items":{"enum":["github","git","ssh"],"type":"string"},"type":"array"}},"required":["items","next","vcsProviders"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List sources","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:read","x-pb-session-only":false},"post":{"operationId":"createProjectSource","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"config":{"anyOf":[{"additionalProperties":false,"properties":{"installationId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"packageName":{"type":"string"},"provider":{"enum":["github","git","ssh"],"type":"string"},"refs":{"additionalProperties":false,"properties":{"branches":{"items":{"type":"string"},"type":"array"},"tags":{"type":"boolean"}},"type":"object"},"repository":{"type":"string"}},"required":["provider","repository"],"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"mirrorsFallback":{"type":"boolean"},"selection":{"additionalProperties":false,"properties":{"expandPatterns":{"type":"boolean"},"packages":{"items":{"type":"string"},"type":"array"},"patterns":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"scopes":{"items":{"type":"string"},"type":"array"}},"type":"object"},{"additionalProperties":false,"properties":{"githubToken":{"type":"boolean"}},"type":"object"},{"additionalProperties":false,"properties":{},"type":"object"}]},"defaultVisibleToNewProjects":{"type":"boolean"},"ecosystem":{"enum":["composer","npm"],"type":"string"},"name":{"minLength":1,"type":"string"},"pollIntervalSeconds":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"removalPolicy":{"enum":["flag","exclude"],"type":"string"},"retentionDaysOverride":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]},"type":{"enum":["vcs","composer_repository","npm_registry","packagist_proxy","npmjs_proxy","hosted"],"type":"string"},"url":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}]},"userAgent":{"type":["string","null"]}},"required":["name","ecosystem","type"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["id"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Add a source","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources/order":{"put":{"operationId":"setSourceOrder","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"sourceIds":{"items":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"minItems":1,"type":"array"}},"required":["sourceIds"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Order all attached sources","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources/{source}":{"patch":{"operationId":"updateProjectSource","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"config":{"anyOf":[{"additionalProperties":false,"properties":{"installationId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"packageName":{"type":"string"},"provider":{"enum":["github","git","ssh"],"type":"string"},"refs":{"additionalProperties":false,"properties":{"branches":{"items":{"type":"string"},"type":"array"},"tags":{"type":"boolean"}},"type":"object"},"repository":{"type":"string"}},"required":["provider","repository"],"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"mirrorsFallback":{"type":"boolean"},"selection":{"additionalProperties":false,"properties":{"expandPatterns":{"type":"boolean"},"packages":{"items":{"type":"string"},"type":"array"},"patterns":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"scopes":{"items":{"type":"string"},"type":"array"}},"type":"object"},{"additionalProperties":false,"properties":{"githubToken":{"type":"boolean"}},"type":"object"},{"additionalProperties":false,"properties":{},"type":"object"}]},"defaultVisibleToNewProjects":{"type":"boolean"},"pollIntervalSeconds":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"removalPolicy":{"enum":["flag","exclude"],"type":"string"},"retentionDaysOverride":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]},"url":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}]},"userAgent":{"type":["string","null"]}},"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Change source settings","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources/{source}/attachment":{"delete":{"operationId":"detachSource","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Detach a source from a project","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true},"put":{"operationId":"attachSource","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"precedence":{"maximum":10000,"minimum":0,"type":"integer"}},"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Attach a source to a project","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources/{source}/credential":{"put":{"operationId":"writeProjectSourceCredential","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"kind":{"enum":["http_basic","bearer","header","query","github_app","npm_token","ssh_key"],"type":"string"},"material":{"maxLength":16384,"type":"string"}},"required":["kind","material"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Replace a source credential after reauthentication","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources/{source}/packages":{"post":{"operationId":"addProjectSourcePackage","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"maxLength":428,"minLength":1,"type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"state":{"const":"present","type":"string"}},"required":["name","state"],"type":"object"}}},"description":"Response"},"202":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"jobId":{"type":"string"},"name":{"type":"string"},"state":{"const":"queued","type":"string"}},"required":["name","state","jobId"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict; Source is paused; Already exists; Last holder cannot be removed; Idempotency key does not match; Already issued; Approval required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Upstream request refused; Bad gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Request a package with project:sources:write from a project or organization proxy attached to the project","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources/{source}/pause":{"post":{"operationId":"pauseProjectSource","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Pause a source","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources/{source}/resume":{"post":{"operationId":"resumeProjectSource","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Resume a proxy source","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources/{source}/sync":{"post":{"operationId":"syncProjectSource","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"202":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict; Source is paused; Already exists; Last holder cannot be removed; Idempotency key does not match; Already issued; Approval required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Request a source sync","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/tokens":{"get":{"operationId":"listProjectTokens","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["active","expired","revoked"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"id":{"type":"string"},"kind":{"enum":["pat","svc"],"type":"string"},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"projectCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"type":["string","null"]},"projectMode":{"anyOf":[{"enum":["all","selected"],"type":"string"},{"type":"null"}]},"readOnly":{"type":"boolean"},"revokedAt":{"type":["string","null"]},"scope":{"enum":["read","write","full"],"type":"string"},"servicePrincipalId":{"type":["string","null"]},"status":{"enum":["active","expired","revoked"],"type":"string"},"userId":{"type":["string","null"]}},"required":["id","kind","name","scope","readOnly","status","projectMode","projectCount","projectId","userId","createdByUserId","servicePrincipalId","createdAt","expiresAt","lastUsedAt","revokedAt"],"type":"object"},"type":"array"},"lifetime":{"additionalProperties":false,"properties":{"personal":{"additionalProperties":false,"properties":{"defaultDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["maxDays","defaultDays"],"type":"object"},"service":{"additionalProperties":false,"properties":{"defaultDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["maxDays","defaultDays"],"type":"object"}},"required":["personal","service"],"type":"object"},"next":{"type":["string","null"]}},"required":["items","next","lifetime"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]}],"summary":"List project tokens","tags":["tokens"],"x-pb-boundary":"project","x-pb-permission":"project:tokens:read","x-pb-session-only":true},"post":{"operationId":"createProjectToken","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expiresAt":{"type":"string"},"lifetimeDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"type":"string"},"readOnly":{"type":"boolean"},"scope":{"enum":["read","write","full"],"type":"string"},"servicePrincipalId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["servicePrincipalId","name","scope"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"type":"string"},"token":{"type":"string"}},"required":["id","token"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Issue a project service token","tags":["tokens"],"x-pb-boundary":"project","x-pb-permission":"project:tokens:create","x-pb-session-only":true}},"/_pb/projects/{project}/tokens/{token}":{"delete":{"operationId":"revokeProjectToken","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"token","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Revoke a project token","tags":["tokens"],"x-pb-boundary":"project","x-pb-permission":"project:tokens:revoke","x-pb-session-only":true},"get":{"operationId":"getProjectToken","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"token","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"id":{"type":"string"},"kind":{"enum":["pat","svc"],"type":"string"},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"projectCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"type":["string","null"]},"projectMode":{"anyOf":[{"enum":["all","selected"],"type":"string"},{"type":"null"}]},"readOnly":{"type":"boolean"},"revokedAt":{"type":["string","null"]},"scope":{"enum":["read","write","full"],"type":"string"},"servicePrincipalId":{"type":["string","null"]},"status":{"enum":["active","expired","revoked"],"type":"string"},"userId":{"type":["string","null"]}},"required":["id","kind","name","scope","readOnly","status","projectMode","projectCount","projectId","userId","createdByUserId","servicePrincipalId","createdAt","expiresAt","lastUsedAt","revokedAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]}],"summary":"Get a project token","tags":["tokens"],"x-pb-boundary":"project","x-pb-permission":"project:tokens:read","x-pb-session-only":true}},"/_pb/projects/{project}/tokens/{token}/rotate":{"post":{"operationId":"rotateProjectToken","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"token","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expiresAt":{"type":"string"},"lifetimeDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"type":"string"},"overlapDays":{"anyOf":[{"const":0,"type":"number"},{"const":1,"type":"number"},{"const":7,"type":"number"}]}},"required":["overlapDays"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"type":"string"},"replacedExpiresAt":{"type":"string"},"replacedTokenId":{"type":"string"},"token":{"type":"string"}},"required":["id","token","replacedTokenId","replacedExpiresAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict; Source is paused; Already exists; Last holder cannot be removed; Idempotency key does not match; Already issued; Approval required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Rotate a project service token","tags":["tokens"],"x-pb-boundary":"project","x-pb-permission":"project:tokens:create","x-pb-session-only":true}},"/_pb/roles":{"get":{"operationId":"listRoles","parameters":[{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^([1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"id":{"type":"string"},"isSystem":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array"},"protectsLastHolder":{"type":"boolean"},"revision":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"scope":{"enum":["organization","project"],"type":"string"}},"required":["id","key","name","scope","isSystem","protectsLastHolder","revision","permissions"],"type":"object"},"type":"array"},"next":{"type":["string","null"]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List roles","tags":["roles"],"x-pb-boundary":"organization","x-pb-permission":"org:roles:read","x-pb-session-only":false},"post":{"operationId":"createRole","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"key":{"pattern":"^[a-z][a-z0-9_]{0,63}$","type":"string"},"name":{"maxLength":200,"minLength":1,"type":"string"},"permissions":{"items":{"maxLength":100,"type":"string"},"maxItems":200,"type":"array"},"scope":{"enum":["organization","project"],"type":"string"}},"required":["key","name","scope","permissions"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["id"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Add a role","tags":["roles"],"x-pb-boundary":"organization","x-pb-permission":"org:roles:write","x-pb-session-only":true}},"/_pb/roles/{role}":{"delete":{"operationId":"deleteRole","parameters":[{"in":"path","name":"role","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Remove a role","tags":["roles"],"x-pb-boundary":"organization","x-pb-permission":"org:roles:write","x-pb-session-only":true},"patch":{"operationId":"updateRole","parameters":[{"in":"path","name":"role","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"properties":{"name":{"maxLength":200,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},{"additionalProperties":false,"properties":{"permissions":{"items":{"maxLength":100,"type":"string"},"maxItems":200,"type":"array"}},"required":["permissions"],"type":"object"}]}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Rename a role or replace its permissions","tags":["roles"],"x-pb-boundary":"organization","x-pb-permission":"org:roles:write","x-pb-session-only":true}},"/_pb/service-principals":{"get":{"operationId":"listServicePrincipals","parameters":[{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^([1-9][0-9]?|100)$","type":"string"}},{"in":"query","name":"project","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"createdByUserId":{"type":"string"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"name":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array"},"projectId":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"revision":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"status":{"enum":["active","suspended"],"type":"string"}},"required":["id","name","projectId","createdByUserId","status","revision","permissions"],"type":"object"},"type":"array"},"next":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Package not found; Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"List service principals","tags":["service-principals"],"x-pb-boundary":"organization","x-pb-permission":"org:service-principals:write","x-pb-session-only":true},"post":{"operationId":"createServicePrincipal","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"pattern":"^(?![\\\\s\\\\S]*(?:[\\\\u0000-\\\\u001f\\\\u007f-\\\\u009f\\\\u00ad\\\\u0600-\\\\u0605\\\\u061c\\\\u06dd\\\\u070f\\\\u0890-\\\\u0891\\\\u08e2\\\\u180e\\\\u200b-\\\\u200f\\\\u2028-\\\\u202e\\\\u2060-\\\\u2064\\\\u2066-\\\\u206f\\\\ufeff\\\\ufff9-\\\\ufffb]|\\\\ud804[\\\\udcbd\\\\udccd]|\\\\ud80d[\\\\udc30-\\\\udc3f]|\\\\ud82f[\\\\udca0-\\\\udca3]|\\\\ud834[\\\\udd73-\\\\udd7a]|\\\\udb40[\\\\udc01\\\\udc20-\\\\udc7f]))(?:[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]|[^\\\\ud800-\\\\udfff]){1,100}(?![\\\\s\\\\S])","type":"string"},"permissions":{"items":{"enum":["org:read","org:settings:write","org:users:read","org:users:write","org:roles:read","org:roles:write","org:grants:read","org:grants:write","org:projects:create","org:projects:archive","org:sources:read","org:sources:write","org:tokens:read","org:tokens:revoke","org:service-principals:write","org:packages:manage","org:import:write","org:import:approve","org:audit:read","project:read","project:settings:write","project:grants:read","project:grants:write","project:packages:read","project:packages:write","project:packages:manage","project:sources:read","project:sources:write","project:service-principals:write","project:tokens:create","project:tokens:read","project:tokens:revoke","project:audit:read"],"type":"string"},"type":"array"},"project":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["name","permissions"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"createdByUserId":{"type":"string"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"name":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array"},"projectId":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"revision":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"status":{"enum":["active","suspended"],"type":"string"}},"required":["id","name","projectId","createdByUserId","status","revision","permissions"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Package not found; Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict; Source is paused; Already exists; Last holder cannot be removed; Idempotency key does not match; Already issued; Approval required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Add a service principal; requires Idempotency-Key and returns ETag","tags":["service-principals"],"x-pb-boundary":"organization","x-pb-permission":"org:service-principals:write","x-pb-session-only":true}},"/_pb/service-principals/{principal}":{"get":{"operationId":"getServicePrincipal","parameters":[{"in":"path","name":"principal","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"createdByUserId":{"type":"string"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"name":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array"},"projectId":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"revision":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"status":{"enum":["active","suspended"],"type":"string"}},"required":["id","name","projectId","createdByUserId","status","revision","permissions"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Read a service principal","tags":["service-principals"],"x-pb-boundary":"organization","x-pb-permission":"org:service-principals:write","x-pb-session-only":true}},"/_pb/service-principals/{principal}/permissions":{"put":{"operationId":"setServicePrincipalPermissions","parameters":[{"in":"path","name":"principal","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"permissions":{"items":{"enum":["org:read","org:settings:write","org:users:read","org:users:write","org:roles:read","org:roles:write","org:grants:read","org:grants:write","org:projects:create","org:projects:archive","org:sources:read","org:sources:write","org:tokens:read","org:tokens:revoke","org:service-principals:write","org:packages:manage","org:import:write","org:import:approve","org:audit:read","project:read","project:settings:write","project:grants:read","project:grants:write","project:packages:read","project:packages:write","project:packages:manage","project:sources:read","project:sources:write","project:service-principals:write","project:tokens:create","project:tokens:read","project:tokens:revoke","project:audit:read"],"type":"string"},"type":"array"}},"required":["permissions"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Set service principal permissions","tags":["service-principals"],"x-pb-boundary":"organization","x-pb-permission":"org:service-principals:write","x-pb-session-only":true}},"/_pb/service-principals/{principal}/restore":{"post":{"operationId":"restoreServicePrincipal","parameters":[{"in":"path","name":"principal","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Restore service principal","tags":["service-principals"],"x-pb-boundary":"organization","x-pb-permission":"org:service-principals:write","x-pb-session-only":true}},"/_pb/service-principals/{principal}/suspend":{"post":{"operationId":"suspendServicePrincipal","parameters":[{"in":"path","name":"principal","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Suspend service principal","tags":["service-principals"],"x-pb-boundary":"organization","x-pb-permission":"org:service-principals:write","x-pb-session-only":true}},"/_pb/session":{"get":{"operationId":"getSession","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expiresAt":{"type":"string"},"reauthFresh":{"type":"boolean"},"user":{"additionalProperties":false,"properties":{"displayName":{"type":["string","null"]},"email":{"type":"string"},"id":{"type":"string"}},"required":["id","email","displayName"],"type":"object"}},"required":["user","reauthFresh","expiresAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"}},"security":[],"summary":"Get the current session","tags":["session"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/sources":{"get":{"operationId":"listOrganizationSources","parameters":[{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}},{"in":"query","name":"ownership","required":false,"schema":{"enum":["organization","project","all"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"attachedProjectCount":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"config":{"anyOf":[{"additionalProperties":false,"properties":{"installationId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"packageName":{"type":"string"},"provider":{"enum":["github","git","ssh"],"type":"string"},"refs":{"additionalProperties":false,"properties":{"branches":{"items":{"type":"string"},"type":"array"},"tags":{"type":"boolean"}},"type":"object"},"repository":{"type":"string"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"mirrorsFallback":{"type":"boolean"},"selection":{"additionalProperties":false,"properties":{"expandPatterns":{"type":"boolean"},"packages":{"items":{"type":"string"},"type":"array"},"patterns":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"scopes":{"items":{"type":"string"},"type":"array"}},"type":"object"},{"additionalProperties":false,"properties":{"githubToken":{"type":"boolean"}},"type":"object"},{"additionalProperties":false,"properties":{},"type":"object"}]},"configComplete":{"type":"boolean"},"defaultVisibleToNewProjects":{"type":"boolean"},"ecosystem":{"enum":["composer","npm"],"type":"string"},"githubAuthentication":{"enum":["app","token"],"type":"string"},"hasCredential":{"type":"boolean"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"lastError":{"type":["string","null"]},"lastPolledAt":{"type":["string","null"]},"lastRemovalRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"absent":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"at":{"type":"string"},"listed":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"successful":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["at","absent","listed","successful"],"type":"object"},{"type":"null"}]},"lastSuccessAt":{"type":["string","null"]},"name":{"type":"string"},"nextPollAt":{"type":["string","null"]},"pollIntervalSeconds":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"projectName":{"type":["string","null"]},"removalAcceptanceArmed":{"type":"boolean"},"removalPolicy":{"enum":["flag","exclude"],"type":"string"},"retentionDaysOverride":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]},"status":{"enum":["active","degraded","failing","paused"],"type":"string"},"sync":{"additionalProperties":false,"properties":{"completed":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"errors":{"items":{"additionalProperties":false,"properties":{"code":{"enum":["network","timeout","http_error","unauthorized","rate_limited","not_found","invalid_response","tag_limit_exceeded","mass_absence","too_large","policy_denied","credential_unavailable","internal"],"type":"string"},"count":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["code","count"],"type":"object"},"type":"array"},"failed":{"description":"Terminal package failures.","maximum":9007199254740991,"minimum":0,"type":"integer"},"generation":{"type":"string"},"listing":{"type":"boolean"},"queued":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"retrying":{"description":"Failed packages queued for another attempt; disjoint from queued, running, failed and completed.","maximum":9007199254740991,"minimum":0,"type":"integer"},"running":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["listing","generation","queued","running","retrying","failed","completed","errors"],"type":"object"},"type":{"enum":["vcs","composer_repository","npm_registry","packagist_proxy","npmjs_proxy","hosted"],"type":"string"},"url":{"type":["string","null"]},"userAgent":{"type":["string","null"]}},"required":["id","projectId","name","ecosystem","type","url","status","removalPolicy","pollIntervalSeconds","lastSuccessAt","lastError","lastPolledAt","nextPollAt","hasCredential","lastRemovalRefusal","removalAcceptanceArmed","projectName","attachedProjectCount"],"type":"object"},"type":"array"},"next":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"vcsProviders":{"items":{"enum":["github","git","ssh"],"type":"string"},"type":"array"}},"required":["items","next","vcsProviders"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List sources","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:read","x-pb-session-only":false},"post":{"operationId":"createOrganizationSource","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"config":{"anyOf":[{"additionalProperties":false,"properties":{"installationId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"packageName":{"type":"string"},"provider":{"enum":["github","git","ssh"],"type":"string"},"refs":{"additionalProperties":false,"properties":{"branches":{"items":{"type":"string"},"type":"array"},"tags":{"type":"boolean"}},"type":"object"},"repository":{"type":"string"}},"required":["provider","repository"],"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"mirrorsFallback":{"type":"boolean"},"selection":{"additionalProperties":false,"properties":{"expandPatterns":{"type":"boolean"},"packages":{"items":{"type":"string"},"type":"array"},"patterns":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"scopes":{"items":{"type":"string"},"type":"array"}},"type":"object"},{"additionalProperties":false,"properties":{"githubToken":{"type":"boolean"}},"type":"object"},{"additionalProperties":false,"properties":{},"type":"object"}]},"defaultVisibleToNewProjects":{"type":"boolean"},"ecosystem":{"enum":["composer","npm"],"type":"string"},"name":{"minLength":1,"type":"string"},"pollIntervalSeconds":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"removalPolicy":{"enum":["flag","exclude"],"type":"string"},"retentionDaysOverride":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]},"type":{"enum":["vcs","composer_repository","npm_registry","packagist_proxy","npmjs_proxy","hosted"],"type":"string"},"url":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}]},"userAgent":{"type":["string","null"]}},"required":["name","ecosystem","type"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["id"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Add a source","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}":{"patch":{"operationId":"updateOrganizationSource","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"config":{"anyOf":[{"additionalProperties":false,"properties":{"installationId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"packageName":{"type":"string"},"provider":{"enum":["github","git","ssh"],"type":"string"},"refs":{"additionalProperties":false,"properties":{"branches":{"items":{"type":"string"},"type":"array"},"tags":{"type":"boolean"}},"type":"object"},"repository":{"type":"string"}},"required":["provider","repository"],"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"mirrorsFallback":{"type":"boolean"},"selection":{"additionalProperties":false,"properties":{"expandPatterns":{"type":"boolean"},"packages":{"items":{"type":"string"},"type":"array"},"patterns":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"scopes":{"items":{"type":"string"},"type":"array"}},"type":"object"},{"additionalProperties":false,"properties":{"githubToken":{"type":"boolean"}},"type":"object"},{"additionalProperties":false,"properties":{},"type":"object"}]},"defaultVisibleToNewProjects":{"type":"boolean"},"pollIntervalSeconds":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"removalPolicy":{"enum":["flag","exclude"],"type":"string"},"retentionDaysOverride":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]},"url":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}]},"userAgent":{"type":["string","null"]}},"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Change source settings","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}/accept-removal":{"post":{"operationId":"acceptSourceRemoval","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict; Source is paused; Already exists; Last holder cannot be removed; Idempotency key does not match; Already issued; Approval required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Arm a one-shot acceptance of the last refused source removal","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}/credential":{"put":{"operationId":"writeOrganizationSourceCredential","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"kind":{"enum":["http_basic","bearer","header","query","github_app","npm_token","ssh_key"],"type":"string"},"material":{"maxLength":16384,"type":"string"}},"required":["kind","material"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Replace a source credential after reauthentication","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}/enable":{"post":{"operationId":"enableSource","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Enable a source with registered names","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}/names":{"get":{"operationId":"listRegisteredNames","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"ecosystem":{"enum":["composer","npm"],"type":"string"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"pattern":{"type":"string"},"sourceId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["id","sourceId","ecosystem","pattern"],"type":"object"},"type":"array"},"next":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List registered names","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:read","x-pb-session-only":false},"post":{"operationId":"addRegisteredName","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"pattern":{"maxLength":50,"pattern":"^[a-z0-9._~@!/*-]+$","type":"string"}},"required":["pattern"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["id"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Register a name pattern","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}/names/{name}":{"delete":{"operationId":"removeRegisteredName","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"paused":{"const":true,"type":"boolean"}},"required":["paused"],"type":"object"}}},"description":"Response"},"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Remove a registered name","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}/pause":{"post":{"operationId":"pauseOrganizationSource","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Pause a source","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}/resume":{"post":{"operationId":"resumeOrganizationSource","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Resume a proxy source","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}/sync":{"post":{"operationId":"syncOrganizationSource","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"202":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict; Source is paused; Already exists; Last holder cannot be removed; Idempotency key does not match; Already issued; Approval required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Request a source sync","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/tokens":{"get":{"operationId":"listTokens","parameters":[{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"kind","required":false,"schema":{"enum":["pat","svc"],"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["active","expired","revoked"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"id":{"type":"string"},"kind":{"enum":["pat","svc"],"type":"string"},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"projectCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"type":["string","null"]},"projectMode":{"anyOf":[{"enum":["all","selected"],"type":"string"},{"type":"null"}]},"readOnly":{"type":"boolean"},"revokedAt":{"type":["string","null"]},"scope":{"enum":["read","write","full"],"type":"string"},"servicePrincipalId":{"type":["string","null"]},"status":{"enum":["active","expired","revoked"],"type":"string"},"userId":{"type":["string","null"]}},"required":["id","kind","name","scope","readOnly","status","projectMode","projectCount","projectId","userId","createdByUserId","servicePrincipalId","createdAt","expiresAt","lastUsedAt","revokedAt"],"type":"object"},"type":"array"},"lifetime":{"additionalProperties":false,"properties":{"personal":{"additionalProperties":false,"properties":{"defaultDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["maxDays","defaultDays"],"type":"object"},"service":{"additionalProperties":false,"properties":{"defaultDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["maxDays","defaultDays"],"type":"object"}},"required":["personal","service"],"type":"object"},"next":{"type":["string","null"]}},"required":["items","next","lifetime"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"}},"security":[{"session":[]}],"summary":"List organization tokens","tags":["tokens"],"x-pb-boundary":"organization","x-pb-permission":"org:tokens:read","x-pb-session-only":true},"post":{"operationId":"createOrganizationToken","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expiresAt":{"type":"string"},"lifetimeDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"type":"string"},"readOnly":{"type":"boolean"},"scope":{"enum":["read","write","full"],"type":"string"},"servicePrincipalId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["servicePrincipalId","name","scope"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"type":"string"},"token":{"type":"string"}},"required":["id","token"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Issue an organization service token","tags":["tokens"],"x-pb-boundary":"organization","x-pb-permission":"org:service-principals:write","x-pb-session-only":true}},"/_pb/tokens/{token}":{"delete":{"operationId":"revokeToken","parameters":[{"in":"path","name":"token","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Revoke an organization token","tags":["tokens"],"x-pb-boundary":"organization","x-pb-permission":"org:tokens:revoke","x-pb-session-only":true},"get":{"operationId":"getToken","parameters":[{"in":"path","name":"token","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"id":{"type":"string"},"kind":{"enum":["pat","svc"],"type":"string"},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"projectCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"type":["string","null"]},"projectMode":{"anyOf":[{"enum":["all","selected"],"type":"string"},{"type":"null"}]},"readOnly":{"type":"boolean"},"revokedAt":{"type":["string","null"]},"scope":{"enum":["read","write","full"],"type":"string"},"servicePrincipalId":{"type":["string","null"]},"status":{"enum":["active","expired","revoked"],"type":"string"},"userId":{"type":["string","null"]}},"required":["id","kind","name","scope","readOnly","status","projectMode","projectCount","projectId","userId","createdByUserId","servicePrincipalId","createdAt","expiresAt","lastUsedAt","revokedAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]}],"summary":"Get an organization token","tags":["tokens"],"x-pb-boundary":"organization","x-pb-permission":"org:tokens:read","x-pb-session-only":true}},"/_pb/tokens/{token}/rotate":{"post":{"operationId":"rotateToken","parameters":[{"in":"path","name":"token","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expiresAt":{"type":"string"},"lifetimeDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"type":"string"},"overlapDays":{"anyOf":[{"const":0,"type":"number"},{"const":1,"type":"number"},{"const":7,"type":"number"}]}},"required":["overlapDays"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"type":"string"},"replacedExpiresAt":{"type":"string"},"replacedTokenId":{"type":"string"},"token":{"type":"string"}},"required":["id","token","replacedTokenId","replacedExpiresAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict; Source is paused; Already exists; Last holder cannot be removed; Idempotency key does not match; Already issued; Approval required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Rotate an organization service token","tags":["tokens"],"x-pb-boundary":"organization","x-pb-permission":"org:service-principals:write","x-pb-session-only":true}},"/_pb/users":{"get":{"operationId":"listUsers","parameters":[{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"displayName":{"type":["string","null"]},"email":{"type":"string"},"id":{"type":"string"},"lastLoginAt":{"type":["string","null"]},"status":{"enum":["active","suspended"],"type":"string"}},"required":["id","displayName","status","lastLoginAt","createdAt"],"type":"object"},"type":"array"},"next":{"type":["string","null"]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List organization users","tags":["users"],"x-pb-boundary":"organization","x-pb-permission":"org:users:read","x-pb-session-only":false}},"/_pb/users/{user}":{"patch":{"operationId":"updateUser","parameters":[{"in":"path","name":"user","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"status":{"enum":["active","suspended"],"type":"string"}},"required":["status"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Suspend or reactivate a user","tags":["users"],"x-pb-boundary":"organization","x-pb-permission":"org:users:write","x-pb-session-only":true}}}}');
|
|
60287
|
+
var openApiDocument = JSON.parse('{"components":{"schemas":{"ErrorEnvelope":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"dependentSchemas":{"problems":{"properties":{"code":{"const":"weak_password"}}}},"properties":{"code":{"type":"string"},"details":{"items":{"additionalProperties":false,"properties":{"code":{"enum":["invalid_type","too_small","too_big","invalid_format","invalid_value","unrecognized_keys","invalid_union","invalid","invalid_encoding","too_deep","invalid_json"],"type":"string"},"location":{"enum":["params","query","body"],"type":"string"},"path":{"type":"string"}},"required":["path","code"],"type":"object"},"maxItems":20,"type":"array"},"message":{"type":"string"},"problems":{"items":{"enum":["too_short","too_long","equals_email","not_well_formed"],"type":"string"},"minItems":1,"type":"array"},"requestId":{"type":"string"}},"required":["code","message","requestId"],"type":"object"}},"required":["error"],"type":"object"}},"securitySchemes":{"bearer":{"scheme":"bearer","type":"http"},"session":{"description":"Session authentication. Send the X-CSRF-Token header on state-changing requests.","in":"cookie","name":"__Host-pb_session","type":"apiKey"}}},"info":{"title":"Package Broker","version":"2"},"jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","openapi":"3.1.0","paths":{"/_pb/audit":{"get":{"operationId":"listAudit","parameters":[{"in":"query","name":"action","required":false,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"query","name":"actor","required":false,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"query","name":"after","required":false,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"maxLength":16,"pattern":"^[0-9]+$","type":"string"}},{"in":"query","name":"project","required":false,"schema":{"maxLength":200,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"action":{"type":"string"},"actor":{"additionalProperties":false,"properties":{"id":{"type":["string","null"]},"type":{"type":"string"}},"required":["type","id"],"type":"object"},"createdAt":{"type":"string"},"id":{"type":"string"},"payload":{"additionalProperties":false,"properties":{"changes":{"additionalProperties":{"additionalProperties":false,"properties":{"new":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"type":"string"},"type":"array"}]},"old":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"type":"string"},"type":"array"}]}},"type":"object"},"propertyNames":{"type":"string"},"type":"object"},"op_id":{"type":"string"},"request_id":{"type":"string"}},"type":"object"},"projectId":{"type":["string","null"]},"seq":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"targetId":{"type":["string","null"]},"targetType":{"type":"string"}},"required":["id","seq","action","actor","targetType","targetId","projectId","createdAt","payload"],"type":"object"},"type":"array"},"next":{"type":["string","null"]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List audit events","tags":["audit"],"x-pb-boundary":"organization","x-pb-permission":"org:audit:read","x-pb-session-only":false}},"/_pb/audit/head":{"get":{"operationId":"auditHead","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"hash":{"type":"string"},"lastVerifiedAt":{"type":["string","null"]},"pendingCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"seq":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["seq","hash","pendingCount","lastVerifiedAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"}},"security":[{"session":[]},{"bearer":[]}],"summary":"Read audit chain head","tags":["audit"],"x-pb-boundary":"organization","x-pb-permission":"org:audit:read","x-pb-session-only":false}},"/_pb/auth/local/login":{"post":{"operationId":"localLogin","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"code":{"maxLength":1024,"type":"string"},"email":{"maxLength":1024,"type":"string"},"password":{"maxLength":1024,"type":"string"}},"required":["email","password","code"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[],"summary":"Sign in with the local login","tags":["auth"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/auth/local/reauth":{"post":{"operationId":"localReauth","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"code":{"maxLength":1024,"type":"string"},"password":{"maxLength":1024,"type":"string"}},"required":["password","code"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[],"summary":"Re-authenticate with the local login","tags":["auth"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/auth/local/setup/finish":{"post":{"operationId":"finishLocalSetup","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"code":{"maxLength":1024,"type":"string"},"password":{"maxLength":1024,"type":"string"},"token":{"maxLength":1024,"type":"string"}},"required":["token","password","code"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[],"summary":"Finish the local login setup and sign in","tags":["auth"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/auth/local/setup/start":{"post":{"operationId":"startLocalSetup","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"token":{"maxLength":1024,"type":"string"}},"required":["token"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"provisioningUri":{"type":"string"},"secret":{"type":"string"}},"required":["provisioningUri","secret"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[],"summary":"Start the local login setup","tags":["auth"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/auth/logout":{"post":{"operationId":"logout","responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"}},"security":[],"summary":"End the current session","tags":["session"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/auth/providers":{"get":{"operationId":"listAuthProviders","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"local":{"type":"boolean"},"providers":{"items":{"additionalProperties":false,"properties":{"displayName":{"type":"string"},"id":{"type":"string"},"kind":{"enum":["cloudflare-access","oidc"],"type":"string"},"supportsReauth":{"type":"boolean"}},"required":["id","kind","displayName","supportsReauth"],"type":"object"},"type":"array"}},"required":["providers","local"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"}},"security":[],"summary":"List the sign-in methods","tags":["auth"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/auth/sso/{provider}/callback":{"get":{"operationId":"finishSsoLogin","parameters":[{"in":"path","name":"provider","required":true,"schema":{"type":"string"}}],"responses":{"303":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[],"summary":"Finish a single sign-on login or re-authentication","tags":["auth"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/auth/sso/{provider}/start":{"post":{"operationId":"startSsoLogin","parameters":[{"in":"path","name":"provider","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"purpose":{"enum":["login","reauth"],"type":"string"},"returnTo":{"type":"string"}},"required":["purpose"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"location":{"type":"string"}},"required":["location"],"type":"object"}}},"description":"Response"},"303":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Upstream request refused; Bad gateway"}},"security":[],"summary":"Start a single sign-on login or re-authentication","tags":["auth"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/grants":{"get":{"operationId":"listGrants","parameters":[{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^([1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"revision":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"role":{"anyOf":[{"additionalProperties":false,"properties":{"id":{"type":"string"},"name":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array"}},"required":["id","name","permissions"],"type":"object"},{"type":"null"}]},"roleId":{"type":"string"},"subject":{"anyOf":[{"additionalProperties":false,"properties":{"type":{"const":"email","type":"string"},"value":{"type":"string"},"visibility":{"const":"visible","type":"string"}},"required":["type","value","visibility"],"type":"object"},{"additionalProperties":false,"properties":{"type":{"const":"email","type":"string"},"visibility":{"const":"redacted","type":"string"}},"required":["type","visibility"],"type":"object"},{"additionalProperties":false,"properties":{"provider":{"type":"string"},"type":{"const":"group","type":"string"},"value":{"type":"string"},"visibility":{"const":"visible","type":"string"}},"required":["type","provider","value","visibility"],"type":"object"},{"additionalProperties":false,"properties":{"provider":{"type":"string"},"type":{"const":"group","type":"string"},"visibility":{"const":"redacted","type":"string"}},"required":["type","provider","visibility"],"type":"object"}]}},"required":["id","subject","roleId","role","createdAt","revision"],"type":"object"},"type":"array"},"next":{"type":["string","null"]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List organization grants","tags":["grants"],"x-pb-boundary":"organization","x-pb-permission":"org:grants:read","x-pb-session-only":false},"post":{"operationId":"createGrant","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"roleId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"subject":{"anyOf":[{"additionalProperties":false,"properties":{"type":{"const":"email","type":"string"},"value":{"maxLength":320,"minLength":1,"type":"string"}},"required":["type","value"],"type":"object"},{"additionalProperties":false,"properties":{"provider":{"maxLength":64,"minLength":1,"type":"string"},"type":{"const":"group","type":"string"},"value":{"maxLength":512,"minLength":1,"type":"string"}},"required":["type","provider","value"],"type":"object"}]}},"required":["subject","roleId"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["id"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Add an organization grant","tags":["grants"],"x-pb-boundary":"organization","x-pb-permission":"org:grants:write","x-pb-session-only":true}},"/_pb/grants/{grant}":{"delete":{"operationId":"revokeGrant","parameters":[{"in":"path","name":"grant","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Revoke a grant","tags":["grants"],"x-pb-boundary":"organization","x-pb-permission":"org:grants:write","x-pb-session-only":true},"patch":{"operationId":"changeGrant","parameters":[{"in":"path","name":"grant","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"roleId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["roleId"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Change the role of a grant","tags":["grants"],"x-pb-boundary":"organization","x-pb-permission":"org:grants:write","x-pb-session-only":true}},"/_pb/import-runs":{"get":{"operationId":"listImportRuns","parameters":[{"in":"query","name":"cursor","required":false,"schema":{"maxLength":4096,"minLength":1,"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^([1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"acceptedAt":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"approvedByUserId":{"type":["string","null"]},"beforeImageExpiresAt":{"type":["string","null"]},"credentialWindowUntil":{"type":["string","null"]},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"planHash":{"type":["string","null"]},"state":{"enum":["planned","applying","failed","applied","verifying","verified","rolled_back","cancelled"],"type":"string"}},"required":["id","state","planHash","approvedAt","approvedByUserId","acceptedAt","beforeImageExpiresAt"],"type":"object"},"type":"array"},"next":{"type":["string","null"]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List import runs","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:write","x-pb-session-only":false},"post":{"operationId":"createImportRun","requestBody":{"content":{"application/json":{"schema":{}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"planHash":{"type":"string"},"state":{"const":"planned","type":"string"}},"required":["id","planHash","state"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]},{"bearer":[]}],"summary":"Plan an import","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:write","x-pb-session-only":false}},"/_pb/import-runs/{id}":{"get":{"operationId":"getImportRun","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"acceptedAt":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"approvedByUserId":{"type":["string","null"]},"beforeImageExpiresAt":{"type":["string","null"]},"credentialWindowUntil":{"type":["string","null"]},"credentials":{"items":{"additionalProperties":false,"properties":{"bound":{"type":"boolean"},"sourceRef":{"type":"string"}},"required":["sourceRef","bound"],"type":"object"},"type":"array"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"planHash":{"type":["string","null"]},"state":{"enum":["planned","applying","failed","applied","verifying","verified","rolled_back","cancelled"],"type":"string"}},"required":["id","state","planHash","approvedAt","approvedByUserId","acceptedAt","beforeImageExpiresAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]},{"bearer":[]}],"summary":"Read an import run","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:write","x-pb-session-only":false}},"/_pb/import-runs/{id}/accept":{"post":{"operationId":"acceptImportRun","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]}],"summary":"accept an import run","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:approve","x-pb-session-only":true}},"/_pb/import-runs/{id}/apply":{"post":{"operationId":"applyImportRun","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]}],"summary":"apply an import run","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:approve","x-pb-session-only":true}},"/_pb/import-runs/{id}/approve":{"post":{"operationId":"approveImportRun","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"planHash":{"maxLength":64,"type":"string"}},"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]}],"summary":"approve an import run","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:approve","x-pb-session-only":true}},"/_pb/import-runs/{id}/cancel":{"post":{"operationId":"cancelImportRun","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]}],"summary":"cancel an import run","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:approve","x-pb-session-only":true}},"/_pb/import-runs/{id}/credentials/{externalRef}":{"put":{"operationId":"acceptImportCredential","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"path","name":"externalRef","required":true,"schema":{"pattern":"^[A-Za-z0-9._:/-]{1,200}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"kind":{"enum":["http_basic","bearer","header","query","github_app","npm_token","ssh_key"],"type":"string"},"material":{"maxLength":16384,"type":"string"}},"required":["kind","material"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]},{"bearer":[]}],"summary":"Bind an imported source credential","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:write","x-pb-session-only":false}},"/_pb/import-runs/{id}/rollback":{"post":{"operationId":"rollbackImportRun","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]}],"summary":"rollback an import run","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:approve","x-pb-session-only":true}},"/_pb/import-runs/{id}/verify":{"post":{"operationId":"verifyImportRun","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]},{"bearer":[]}],"summary":"verify an import run","tags":["imports"],"x-pb-boundary":"organization","x-pb-permission":"org:import:write","x-pb-session-only":false}},"/_pb/me":{"get":{"operationId":"getMe","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"organization":{"additionalProperties":false,"properties":{"name":{"type":"string"},"slug":{"type":"string"}},"required":["slug","name"],"type":"object"},"principal":{"additionalProperties":false,"properties":{"id":{"type":"string"},"kind":{"enum":["user","service","customer"],"type":"string"}},"required":["kind","id"],"type":"object"},"user":{"anyOf":[{"additionalProperties":false,"properties":{"displayName":{"type":["string","null"]},"email":{"type":["string","null"]},"id":{"type":"string"}},"required":["id","email","displayName"],"type":"object"},{"type":"null"}]}},"required":["principal","user","organization"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"}},"security":[],"summary":"Get the caller identity","tags":["me"],"x-pb-boundary":"authenticated","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/me/permissions":{"get":{"operationId":"getMyPermissions","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"organization":{"items":{"type":"string"},"type":"array"}},"required":["organization"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"}},"security":[],"summary":"Get caller organization permissions","tags":["permissions"],"x-pb-boundary":"authenticated","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/me/tokens":{"get":{"operationId":"listMyTokens","parameters":[{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["active","expired","revoked"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"id":{"type":"string"},"kind":{"enum":["pat","svc"],"type":"string"},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"projectCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"type":["string","null"]},"projectMode":{"anyOf":[{"enum":["all","selected"],"type":"string"},{"type":"null"}]},"readOnly":{"type":"boolean"},"revokedAt":{"type":["string","null"]},"scope":{"enum":["read","write","full"],"type":"string"},"servicePrincipalId":{"type":["string","null"]},"status":{"enum":["active","expired","revoked"],"type":"string"},"userId":{"type":["string","null"]}},"required":["id","kind","name","scope","readOnly","status","projectMode","projectCount","projectId","userId","createdByUserId","servicePrincipalId","createdAt","expiresAt","lastUsedAt","revokedAt"],"type":"object"},"type":"array"},"lifetime":{"additionalProperties":false,"properties":{"personal":{"additionalProperties":false,"properties":{"defaultDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["maxDays","defaultDays"],"type":"object"},"service":{"additionalProperties":false,"properties":{"defaultDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["maxDays","defaultDays"],"type":"object"}},"required":["personal","service"],"type":"object"},"next":{"type":["string","null"]}},"required":["items","next","lifetime"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"}},"security":[{"session":[]}],"summary":"List the caller personal access tokens","tags":["tokens"],"x-pb-boundary":"self","x-pb-permission":null,"x-pb-session-only":true},"post":{"operationId":"createPersonalToken","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expiresAt":{"type":"string"},"lifetimeDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"type":"string"},"projectIds":{"items":{"type":"string"},"maxItems":200,"type":"array"},"projectMode":{"enum":["all","selected"],"type":"string"},"readOnly":{"type":"boolean"},"scope":{"enum":["read","write","full"],"type":"string"}},"required":["name","scope","projectMode","projectIds"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"type":"string"},"token":{"type":"string"}},"required":["id","token"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Reauthentication required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Issue a personal access token","tags":["tokens"],"x-pb-boundary":"self","x-pb-permission":null,"x-pb-session-only":true}},"/_pb/me/tokens/{token}":{"delete":{"operationId":"revokeMyToken","parameters":[{"in":"path","name":"token","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Revoke a personal access token","tags":["tokens"],"x-pb-boundary":"self","x-pb-permission":null,"x-pb-session-only":true},"get":{"operationId":"getMyToken","parameters":[{"in":"path","name":"token","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"id":{"type":"string"},"kind":{"enum":["pat","svc"],"type":"string"},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"projectCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"type":["string","null"]},"projectMode":{"anyOf":[{"enum":["all","selected"],"type":"string"},{"type":"null"}]},"readOnly":{"type":"boolean"},"revokedAt":{"type":["string","null"]},"scope":{"enum":["read","write","full"],"type":"string"},"servicePrincipalId":{"type":["string","null"]},"status":{"enum":["active","expired","revoked"],"type":"string"},"userId":{"type":["string","null"]}},"required":["id","kind","name","scope","readOnly","status","projectMode","projectCount","projectId","userId","createdByUserId","servicePrincipalId","createdAt","expiresAt","lastUsedAt","revokedAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]}],"summary":"Get a personal access token","tags":["tokens"],"x-pb-boundary":"self","x-pb-permission":null,"x-pb-session-only":true}},"/_pb/organization":{"get":{"operationId":"getOrganization","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"settings":{"additionalProperties":false,"properties":{"retentionRemovedUpstreamDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"tokenDefaultExpiryDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"tokenMaxLifetimeDays":{"additionalProperties":false,"properties":{"personal":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"service":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["personal","service"],"type":"object"}},"required":["retentionRemovedUpstreamDays","tokenDefaultExpiryDays","tokenMaxLifetimeDays"],"type":"object"},"slug":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slug","name","settings","createdAt","updatedAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"}},"security":[{"session":[]},{"bearer":[]}],"summary":"Get the organization","tags":["organization"],"x-pb-boundary":"organization","x-pb-permission":"org:read","x-pb-session-only":false}},"/_pb/packages":{"get":{"operationId":"listPackages","parameters":[{"in":"query","name":"after","required":false,"schema":{"maxLength":464,"pattern":"^(?:composer|npm):[\\\\s\\\\S]+:[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"ecosystem","required":false,"schema":{"enum":["composer","npm"],"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}},{"in":"query","name":"project","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"q","required":false,"schema":{"maxLength":100,"minLength":1,"type":"string"}},{"in":"query","name":"source","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["active","quarantined","tombstoned","removed_upstream"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"ecosystem":{"enum":["composer","npm"],"type":"string"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"lastSyncedAt":{"type":["string","null"]},"latestVersion":{"type":["string","null"]},"name":{"type":"string"},"source":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"name":{"type":"string"},"projectId":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"type":{"enum":["vcs","composer_repository","npm_registry","packagist_proxy","npmjs_proxy","hosted"],"type":"string"}},"required":["id","name","type","projectId"],"type":"object"},"status":{"enum":["active","quarantined","tombstoned","removed_upstream"],"type":"string"},"versionCount":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["id","ecosystem","name","latestVersion","status","source","versionCount","lastSyncedAt"],"type":"object"},"type":"array"},"next":{"anyOf":[{"maxLength":464,"pattern":"^(?:composer|npm):[\\\\s\\\\S]+:[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List packages","tags":["packages"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:read","x-pb-session-only":false}},"/_pb/packages/{package}/versions":{"get":{"operationId":"listPackageVersions","parameters":[{"in":"path","name":"package","required":true,"schema":{"type":"string"}},{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"publishedAt":{"type":"string"},"removedUpstreamAt":{"type":["string","null"]},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"stability":{"enum":["dev","alpha","beta","RC","stable"],"type":"string"},"status":{"enum":["active","quarantined","tombstoned","removed_upstream","yanked"],"type":"string"},"tombstonedAt":{"type":["string","null"]},"version":{"type":"string"},"vulnerability":{"additionalProperties":false,"properties":{"advisories":{"items":{"additionalProperties":false,"properties":{"detailsFetchedAt":{"type":["string","null"]},"id":{"type":"string"},"severity":{"additionalProperties":false,"properties":{"entries":{"items":{"additionalProperties":false,"properties":{"score":{"type":"string"},"type":{"type":"string"}},"required":["type","score"],"type":"object"},"type":"array"},"level":{"enum":["critical","high","medium","low","unknown"],"type":"string"}},"required":["level","entries"],"type":"object"},"url":{"type":"null"}},"required":["id","url","severity","detailsFetchedAt"],"type":"object"},"maxItems":20,"type":"array"},"advisoriesTruncated":{"type":"boolean"},"advisoryCount":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"detailsComplete":{"type":"boolean"},"fetchedAt":{"type":["string","null"]},"lastKnownStatus":{"anyOf":[{"enum":["affected","not_affected"],"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"enum":["not_checked","disabled","unsupported_version","pending","upstream_unavailable","incomplete","expired"],"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"const":"osv","type":"string"},{"type":"null"}]},"status":{"enum":["affected","not_affected","unknown","stale"],"type":"string"}},"required":["status","reason","source","fetchedAt","lastKnownStatus","advisoryCount","advisories","detailsComplete","advisoriesTruncated"],"type":"object"}},"required":["vulnerability","id","version","stability","status","publishedAt","removedUpstreamAt","tombstonedAt","revision"],"type":"object"},"type":"array"},"next":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List package versions","tags":["packages"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:read","x-pb-session-only":false}},"/_pb/packages/{package}/versions/{version}/quarantine":{"post":{"operationId":"quarantinePackageVersion","parameters":[{"in":"path","name":"package","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"path","name":"version","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"status":{"enum":["active","removed_upstream","yanked","quarantined","tombstoned"],"type":"string"}},"required":["id","status"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]}],"summary":"quarantine a package version","tags":["packages"],"x-pb-boundary":"organization","x-pb-permission":"org:packages:manage","x-pb-session-only":true}},"/_pb/packages/{package}/versions/{version}/release":{"post":{"operationId":"releasePackageVersion","parameters":[{"in":"path","name":"package","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"path","name":"version","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"status":{"enum":["active","removed_upstream","yanked","quarantined","tombstoned"],"type":"string"}},"required":["id","status"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]}],"summary":"release a package version","tags":["packages"],"x-pb-boundary":"organization","x-pb-permission":"org:packages:manage","x-pb-session-only":true}},"/_pb/packages/{package}/versions/{version}/tombstone":{"post":{"operationId":"tombstonePackageVersion","parameters":[{"in":"path","name":"package","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"path","name":"version","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"status":{"enum":["active","removed_upstream","yanked","quarantined","tombstoned"],"type":"string"}},"required":["id","status"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]}],"summary":"tombstone a package version","tags":["packages"],"x-pb-boundary":"organization","x-pb-permission":"org:packages:manage","x-pb-session-only":true}},"/_pb/projects":{"get":{"operationId":"listProjects","parameters":[{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^([1-9][0-9]?|100)$","type":"string"}},{"in":"query","name":"q","required":false,"schema":{"description":"Case-sensitive slug or name prefix; LIKE wildcards % and _ are refused.","maxLength":200,"minLength":1,"pattern":"^[^%_\\\\u0000-\\\\u001f\\\\u007f-\\\\u009f\\\\u2028\\\\u2029]+$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["active","archived"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"etag":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"enum":["active","archived"],"type":"string"}},"required":["id","slug","name","status","etag"],"type":"object"},"type":"array"},"next":{"type":["string","null"]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[],"summary":"List readable projects","tags":["projects"],"x-pb-boundary":"authenticated","x-pb-permission":null,"x-pb-session-only":false},"post":{"operationId":"createProject","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"initialRoleId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"name":{"maxLength":1000,"minLength":1,"type":"string"},"requirePublishApproval":{"type":"boolean"},"slug":{"maxLength":200,"minLength":1,"type":"string"},"tokenMaxScope":{"enum":["read","write","full"],"type":"string"}},"required":["slug","name"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"type":"string"},"slug":{"type":"string"}},"required":["id","slug"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Add a project","tags":["projects"],"x-pb-boundary":"organization","x-pb-permission":"org:projects:create","x-pb-session-only":true}},"/_pb/projects/{project}":{"get":{"operationId":"getProject","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"type":"string"},"name":{"type":"string"},"requirePublishApproval":{"type":"boolean"},"revision":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"slug":{"type":"string"},"status":{"enum":["active","archived"],"type":"string"},"tokenMaxScope":{"enum":["read","write","full"],"type":"string"}},"required":["id","slug","name","status","tokenMaxScope","requirePublishApproval","revision"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]},{"bearer":[]}],"summary":"Read a project","tags":["projects"],"x-pb-boundary":"project","x-pb-permission":"project:read","x-pb-session-only":false},"patch":{"operationId":"updateProject","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"maxLength":1000,"minLength":1,"type":"string"},"requirePublishApproval":{"type":"boolean"},"tokenMaxScope":{"enum":["read","write","full"],"type":"string"}},"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Change project settings","tags":["projects"],"x-pb-boundary":"project","x-pb-permission":"project:settings:write","x-pb-session-only":true}},"/_pb/projects/{project}/archive":{"post":{"operationId":"archiveProject","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Archive a project","tags":["projects"],"x-pb-boundary":"organization","x-pb-permission":"org:projects:archive","x-pb-session-only":true}},"/_pb/projects/{project}/audit":{"get":{"operationId":"listProjectAudit","parameters":[{"in":"path","name":"project","required":true,"schema":{"maxLength":64,"minLength":1,"type":"string"}},{"in":"query","name":"action","required":false,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"query","name":"actor","required":false,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"query","name":"after","required":false,"schema":{"maxLength":200,"minLength":1,"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"maxLength":16,"pattern":"^[0-9]+$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"action":{"type":"string"},"actor":{"additionalProperties":false,"properties":{"id":{"type":["string","null"]},"type":{"type":"string"}},"required":["type","id"],"type":"object"},"createdAt":{"type":"string"},"id":{"type":"string"},"payload":{"additionalProperties":false,"properties":{"changes":{"additionalProperties":{"additionalProperties":false,"properties":{"new":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"type":"string"},"type":"array"}]},"old":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"type":"string"},"type":"array"}]}},"type":"object"},"propertyNames":{"type":"string"},"type":"object"},"op_id":{"type":"string"},"request_id":{"type":"string"}},"type":"object"},"projectId":{"type":["string","null"]},"seq":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"targetId":{"type":["string","null"]},"targetType":{"type":"string"}},"required":["id","seq","action","actor","targetType","targetId","projectId","createdAt","payload"],"type":"object"},"type":"array"},"next":{"type":["string","null"]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List project audit events","tags":["audit"],"x-pb-boundary":"project","x-pb-permission":"project:audit:read","x-pb-session-only":false}},"/_pb/projects/{project}/grants":{"get":{"operationId":"listProjectGrants","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"principal":{"anyOf":[{"additionalProperties":false,"properties":{"displayName":{"type":"string"},"email":{"type":"string"},"id":{"type":"string"},"kind":{"enum":["user","email"],"type":"string"},"visibility":{"const":"visible","type":"string"}},"required":["kind","id","displayName","email","visibility"],"type":"object"},{"additionalProperties":false,"properties":{"displayName":{"type":"string"},"id":{"type":"string"},"kind":{"enum":["user","email"],"type":"string"},"visibility":{"const":"redacted","type":"string"}},"required":["kind","id","displayName","visibility"],"type":"object"},{"additionalProperties":false,"properties":{"displayName":{"type":"string"},"groupValue":{"type":"string"},"id":{"type":"string"},"kind":{"const":"group","type":"string"},"provider":{"type":"string"},"visibility":{"const":"visible","type":"string"}},"required":["kind","id","displayName","provider","groupValue","visibility"],"type":"object"},{"additionalProperties":false,"properties":{"displayName":{"type":"string"},"id":{"type":"string"},"kind":{"const":"group","type":"string"},"provider":{"type":"string"},"visibility":{"const":"redacted","type":"string"}},"required":["kind","id","displayName","provider","visibility"],"type":"object"}]},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"role":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"name":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array"}},"required":["id","name","permissions"],"type":"object"}},"required":["id","revision","createdAt","principal","role"],"type":"object"},"type":"array"},"next":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List project grants and their principals","tags":["project-access"],"x-pb-boundary":"project","x-pb-permission":"project:grants:read","x-pb-session-only":false},"post":{"operationId":"createProjectGrant","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"roleId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"subject":{"anyOf":[{"additionalProperties":false,"properties":{"type":{"const":"email","type":"string"},"value":{"maxLength":320,"minLength":1,"type":"string"}},"required":["type","value"],"type":"object"},{"additionalProperties":false,"properties":{"provider":{"maxLength":64,"minLength":1,"type":"string"},"type":{"const":"group","type":"string"},"value":{"maxLength":256,"minLength":1,"type":"string"}},"required":["type","provider","value"],"type":"object"}]}},"required":["subject","roleId"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["id"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Grant project access","tags":["project-access"],"x-pb-boundary":"project","x-pb-permission":"project:grants:write","x-pb-session-only":true}},"/_pb/projects/{project}/grants/{grant}":{"delete":{"operationId":"revokeProjectGrant","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"grant","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Revoke a project grant","tags":["project-access"],"x-pb-boundary":"project","x-pb-permission":"project:grants:write","x-pb-session-only":true},"patch":{"operationId":"changeProjectGrant","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"grant","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"roleId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["roleId"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Change the role of a project grant","tags":["project-access"],"x-pb-boundary":"project","x-pb-permission":"project:grants:write","x-pb-session-only":true}},"/_pb/projects/{project}/packages":{"get":{"operationId":"listProjectPackages","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"query","name":"after","required":false,"schema":{"maxLength":437,"pattern":"^(?:composer|npm):[\\\\s\\\\S]+$","type":"string"}},{"in":"query","name":"ecosystem","required":false,"schema":{"enum":["composer","npm"],"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}},{"in":"query","name":"q","required":false,"schema":{"maxLength":100,"minLength":1,"type":"string"}},{"in":"query","name":"source","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["active","quarantined","tombstoned","removed_upstream"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"ecosystem":{"enum":["composer","npm"],"type":"string"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"lastSyncedAt":{"type":["string","null"]},"latestVersion":{"type":["string","null"]},"name":{"type":"string"},"source":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"name":{"type":"string"},"projectId":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"type":{"enum":["vcs","composer_repository","npm_registry","packagist_proxy","npmjs_proxy","hosted"],"type":"string"}},"required":["id","name","type","projectId"],"type":"object"},"status":{"enum":["active","quarantined","tombstoned","removed_upstream"],"type":"string"},"versionCount":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["id","ecosystem","name","latestVersion","status","source","versionCount","lastSyncedAt"],"type":"object"},"type":"array"},"next":{"anyOf":[{"maxLength":437,"pattern":"^(?:composer|npm):[\\\\s\\\\S]+$","type":"string"},{"type":"null"}]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List packages","tags":["packages"],"x-pb-boundary":"project","x-pb-permission":"project:packages:read","x-pb-session-only":false}},"/_pb/projects/{project}/packages/{package}/versions":{"get":{"operationId":"listProjectPackageVersions","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"package","required":true,"schema":{"type":"string"}},{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"publishedAt":{"type":"string"},"removedUpstreamAt":{"type":["string","null"]},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"stability":{"enum":["dev","alpha","beta","RC","stable"],"type":"string"},"status":{"enum":["active","quarantined","tombstoned","removed_upstream","yanked"],"type":"string"},"tombstonedAt":{"type":["string","null"]},"version":{"type":"string"},"vulnerability":{"additionalProperties":false,"properties":{"advisories":{"items":{"additionalProperties":false,"properties":{"detailsFetchedAt":{"type":["string","null"]},"id":{"type":"string"},"severity":{"additionalProperties":false,"properties":{"entries":{"items":{"additionalProperties":false,"properties":{"score":{"type":"string"},"type":{"type":"string"}},"required":["type","score"],"type":"object"},"type":"array"},"level":{"enum":["critical","high","medium","low","unknown"],"type":"string"}},"required":["level","entries"],"type":"object"},"url":{"type":"null"}},"required":["id","url","severity","detailsFetchedAt"],"type":"object"},"maxItems":20,"type":"array"},"advisoriesTruncated":{"type":"boolean"},"advisoryCount":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"detailsComplete":{"type":"boolean"},"fetchedAt":{"type":["string","null"]},"lastKnownStatus":{"anyOf":[{"enum":["affected","not_affected"],"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"enum":["not_checked","disabled","unsupported_version","pending","upstream_unavailable","incomplete","expired"],"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"const":"osv","type":"string"},{"type":"null"}]},"status":{"enum":["affected","not_affected","unknown","stale"],"type":"string"}},"required":["status","reason","source","fetchedAt","lastKnownStatus","advisoryCount","advisories","detailsComplete","advisoriesTruncated"],"type":"object"}},"required":["vulnerability","id","version","stability","status","publishedAt","removedUpstreamAt","tombstonedAt","revision"],"type":"object"},"type":"array"},"next":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List package versions","tags":["packages"],"x-pb-boundary":"project","x-pb-permission":"project:packages:read","x-pb-session-only":false}},"/_pb/projects/{project}/packages/{package}/versions/{version}/quarantine":{"post":{"operationId":"quarantineProjectPackageVersion","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"package","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"path","name":"version","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"status":{"enum":["active","removed_upstream","yanked","quarantined","tombstoned"],"type":"string"}},"required":["id","status"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]}],"summary":"quarantine a package version","tags":["packages"],"x-pb-boundary":"project","x-pb-permission":"project:packages:manage","x-pb-session-only":true}},"/_pb/projects/{project}/packages/{package}/versions/{version}/release":{"post":{"operationId":"releaseProjectPackageVersion","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"package","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"path","name":"version","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"status":{"enum":["active","removed_upstream","yanked","quarantined","tombstoned"],"type":"string"}},"required":["id","status"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]}],"summary":"release a package version","tags":["packages"],"x-pb-boundary":"project","x-pb-permission":"project:packages:manage","x-pb-session-only":true}},"/_pb/projects/{project}/packages/{package}/versions/{version}/tombstone":{"post":{"operationId":"tombstoneProjectPackageVersion","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"package","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"path","name":"version","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"status":{"enum":["active","removed_upstream","yanked","quarantined","tombstoned"],"type":"string"}},"required":["id","status"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"}},"security":[{"session":[]}],"summary":"tombstone a package version","tags":["packages"],"x-pb-boundary":"project","x-pb-permission":"project:packages:manage","x-pb-session-only":true}},"/_pb/projects/{project}/permissions":{"get":{"operationId":"getMyProjectPermissions","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"project":{"items":{"type":"string"},"type":"array"}},"required":["project"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]},{"bearer":[]}],"summary":"Get caller project permissions","tags":["permissions"],"x-pb-boundary":"project","x-pb-permission":"project:read","x-pb-session-only":false}},"/_pb/projects/{project}/resolve":{"get":{"operationId":"resolveName","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"query","name":"name","required":true,"schema":{"maxLength":428,"minLength":1,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"candidates":{"items":{"additionalProperties":false,"properties":{"eligible":{"type":"boolean"},"projectLevel":{"type":"boolean"},"sourceId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"sourceName":{"type":"string"}},"required":["sourceId","sourceName","projectLevel","eligible"],"type":"object"},"type":"array"},"ecosystem":{"enum":["composer","npm"],"type":"string"},"name":{"type":"string"},"winner":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]}},"required":["name","ecosystem","candidates","winner"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]},{"bearer":[]}],"summary":"Preview source resolution for a package name","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:read","x-pb-session-only":false}},"/_pb/projects/{project}/restore":{"post":{"operationId":"restoreProject","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Restore a project","tags":["projects"],"x-pb-boundary":"organization","x-pb-permission":"org:projects:archive","x-pb-session-only":true}},"/_pb/projects/{project}/service-principals/{principal}/permissions":{"put":{"operationId":"setProjectServicePrincipalPermissions","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"principal","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"permissions":{"items":{"enum":["org:read","org:settings:write","org:users:read","org:users:write","org:roles:read","org:roles:write","org:grants:read","org:grants:write","org:projects:create","org:projects:archive","org:sources:read","org:sources:write","org:tokens:read","org:tokens:revoke","org:service-principals:write","org:packages:manage","org:import:write","org:import:approve","org:audit:read","project:read","project:settings:write","project:grants:read","project:grants:write","project:packages:read","project:packages:write","project:packages:manage","project:sources:read","project:sources:write","project:service-principals:write","project:tokens:create","project:tokens:read","project:tokens:revoke","project:audit:read"],"type":"string"},"type":"array"}},"required":["permissions"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Set service principal permissions","tags":["service-principals"],"x-pb-boundary":"project","x-pb-permission":"project:service-principals:write","x-pb-session-only":true}},"/_pb/projects/{project}/service-principals/{principal}/restore":{"post":{"operationId":"restoreProjectServicePrincipal","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"principal","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Restore service principal","tags":["service-principals"],"x-pb-boundary":"project","x-pb-permission":"project:service-principals:write","x-pb-session-only":true}},"/_pb/projects/{project}/service-principals/{principal}/suspend":{"post":{"operationId":"suspendProjectServicePrincipal","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"principal","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Suspend service principal","tags":["service-principals"],"x-pb-boundary":"project","x-pb-permission":"project:service-principals:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources":{"get":{"operationId":"listProjectSources","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"anyOf":[{"additionalProperties":false,"properties":{"attached":{"const":true,"type":"boolean"},"config":{"anyOf":[{"additionalProperties":false,"properties":{"installationId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"packageName":{"type":"string"},"provider":{"enum":["github","git","ssh"],"type":"string"},"refs":{"additionalProperties":false,"properties":{"branches":{"items":{"type":"string"},"type":"array"},"tags":{"type":"boolean"}},"type":"object"},"repository":{"type":"string"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"mirrorsFallback":{"type":"boolean"},"selection":{"additionalProperties":false,"properties":{"expandPatterns":{"type":"boolean"},"packages":{"items":{"type":"string"},"type":"array"},"patterns":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"scopes":{"items":{"type":"string"},"type":"array"}},"type":"object"},{"additionalProperties":false,"properties":{"githubToken":{"type":"boolean"}},"type":"object"},{"additionalProperties":false,"properties":{},"type":"object"}]},"configComplete":{"type":"boolean"},"defaultVisibleToNewProjects":{"type":"boolean"},"ecosystem":{"enum":["composer","npm"],"type":"string"},"githubAuthentication":{"enum":["app","token"],"type":"string"},"hasCredential":{"type":"boolean"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"lastError":{"type":["string","null"]},"lastPolledAt":{"type":["string","null"]},"lastRemovalRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"absent":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"at":{"type":"string"},"listed":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"successful":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["at","absent","listed","successful"],"type":"object"},{"type":"null"}]},"lastSuccessAt":{"type":["string","null"]},"name":{"type":"string"},"nextPollAt":{"type":["string","null"]},"pollIntervalSeconds":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"precedence":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"removalAcceptanceArmed":{"type":"boolean"},"removalPolicy":{"enum":["flag","exclude"],"type":"string"},"retentionDaysOverride":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]},"status":{"enum":["active","degraded","failing","paused"],"type":"string"},"sync":{"additionalProperties":false,"properties":{"completed":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"errors":{"items":{"additionalProperties":false,"properties":{"code":{"enum":["network","timeout","http_error","unauthorized","rate_limited","not_found","invalid_response","tag_limit_exceeded","mass_absence","too_large","policy_denied","credential_unavailable","internal"],"type":"string"},"count":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["code","count"],"type":"object"},"type":"array"},"failed":{"description":"Terminal package failures.","maximum":9007199254740991,"minimum":0,"type":"integer"},"generation":{"type":"string"},"listing":{"type":"boolean"},"queued":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"retrying":{"description":"Failed packages queued for another attempt; disjoint from queued, running, failed and completed.","maximum":9007199254740991,"minimum":0,"type":"integer"},"running":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["listing","generation","queued","running","retrying","failed","completed","errors"],"type":"object"},"type":{"enum":["vcs","composer_repository","npm_registry","packagist_proxy","npmjs_proxy","hosted"],"type":"string"},"url":{"type":["string","null"]},"userAgent":{"type":["string","null"]}},"required":["id","projectId","name","ecosystem","type","url","status","removalPolicy","pollIntervalSeconds","lastSuccessAt","lastError","lastPolledAt","nextPollAt","hasCredential","lastRemovalRefusal","removalAcceptanceArmed","attached","precedence"],"type":"object"},{"additionalProperties":false,"properties":{"attached":{"const":false,"type":"boolean"},"config":{"anyOf":[{"additionalProperties":false,"properties":{"installationId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"packageName":{"type":"string"},"provider":{"enum":["github","git","ssh"],"type":"string"},"refs":{"additionalProperties":false,"properties":{"branches":{"items":{"type":"string"},"type":"array"},"tags":{"type":"boolean"}},"type":"object"},"repository":{"type":"string"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"mirrorsFallback":{"type":"boolean"},"selection":{"additionalProperties":false,"properties":{"expandPatterns":{"type":"boolean"},"packages":{"items":{"type":"string"},"type":"array"},"patterns":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"scopes":{"items":{"type":"string"},"type":"array"}},"type":"object"},{"additionalProperties":false,"properties":{"githubToken":{"type":"boolean"}},"type":"object"},{"additionalProperties":false,"properties":{},"type":"object"}]},"configComplete":{"type":"boolean"},"defaultVisibleToNewProjects":{"type":"boolean"},"ecosystem":{"enum":["composer","npm"],"type":"string"},"githubAuthentication":{"enum":["app","token"],"type":"string"},"hasCredential":{"type":"boolean"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"lastError":{"type":["string","null"]},"lastPolledAt":{"type":["string","null"]},"lastRemovalRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"absent":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"at":{"type":"string"},"listed":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"successful":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["at","absent","listed","successful"],"type":"object"},{"type":"null"}]},"lastSuccessAt":{"type":["string","null"]},"name":{"type":"string"},"nextPollAt":{"type":["string","null"]},"pollIntervalSeconds":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"removalAcceptanceArmed":{"type":"boolean"},"removalPolicy":{"enum":["flag","exclude"],"type":"string"},"retentionDaysOverride":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]},"status":{"enum":["active","degraded","failing","paused"],"type":"string"},"sync":{"additionalProperties":false,"properties":{"completed":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"errors":{"items":{"additionalProperties":false,"properties":{"code":{"enum":["network","timeout","http_error","unauthorized","rate_limited","not_found","invalid_response","tag_limit_exceeded","mass_absence","too_large","policy_denied","credential_unavailable","internal"],"type":"string"},"count":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["code","count"],"type":"object"},"type":"array"},"failed":{"description":"Terminal package failures.","maximum":9007199254740991,"minimum":0,"type":"integer"},"generation":{"type":"string"},"listing":{"type":"boolean"},"queued":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"retrying":{"description":"Failed packages queued for another attempt; disjoint from queued, running, failed and completed.","maximum":9007199254740991,"minimum":0,"type":"integer"},"running":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["listing","generation","queued","running","retrying","failed","completed","errors"],"type":"object"},"type":{"enum":["vcs","composer_repository","npm_registry","packagist_proxy","npmjs_proxy","hosted"],"type":"string"},"url":{"type":["string","null"]},"userAgent":{"type":["string","null"]}},"required":["id","projectId","name","ecosystem","type","url","status","removalPolicy","pollIntervalSeconds","lastSuccessAt","lastError","lastPolledAt","nextPollAt","hasCredential","lastRemovalRefusal","removalAcceptanceArmed","attached"],"type":"object"}]},"type":"array"},"next":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"vcsProviders":{"items":{"enum":["github","git","ssh"],"type":"string"},"type":"array"}},"required":["items","next","vcsProviders"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List sources","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:read","x-pb-session-only":false},"post":{"operationId":"createProjectSource","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"config":{"anyOf":[{"additionalProperties":false,"properties":{"installationId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"packageName":{"type":"string"},"provider":{"enum":["github","git","ssh"],"type":"string"},"refs":{"additionalProperties":false,"properties":{"branches":{"items":{"type":"string"},"type":"array"},"tags":{"type":"boolean"}},"type":"object"},"repository":{"type":"string"}},"required":["provider","repository"],"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"mirrorsFallback":{"type":"boolean"},"selection":{"additionalProperties":false,"properties":{"expandPatterns":{"type":"boolean"},"packages":{"items":{"type":"string"},"type":"array"},"patterns":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"scopes":{"items":{"type":"string"},"type":"array"}},"type":"object"},{"additionalProperties":false,"properties":{"githubToken":{"type":"boolean"}},"type":"object"},{"additionalProperties":false,"properties":{},"type":"object"}]},"defaultVisibleToNewProjects":{"type":"boolean"},"ecosystem":{"enum":["composer","npm"],"type":"string"},"name":{"minLength":1,"type":"string"},"pollIntervalSeconds":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"removalPolicy":{"enum":["flag","exclude"],"type":"string"},"retentionDaysOverride":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]},"type":{"enum":["vcs","composer_repository","npm_registry","packagist_proxy","npmjs_proxy","hosted"],"type":"string"},"url":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}]},"userAgent":{"type":["string","null"]}},"required":["name","ecosystem","type"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["id"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Add a source","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources/order":{"put":{"operationId":"setSourceOrder","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"sourceIds":{"items":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"minItems":1,"type":"array"}},"required":["sourceIds"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Order all attached sources","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources/{source}":{"patch":{"operationId":"updateProjectSource","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"config":{"anyOf":[{"additionalProperties":false,"properties":{"installationId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"packageName":{"type":"string"},"provider":{"enum":["github","git","ssh"],"type":"string"},"refs":{"additionalProperties":false,"properties":{"branches":{"items":{"type":"string"},"type":"array"},"tags":{"type":"boolean"}},"type":"object"},"repository":{"type":"string"}},"required":["provider","repository"],"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"mirrorsFallback":{"type":"boolean"},"selection":{"additionalProperties":false,"properties":{"expandPatterns":{"type":"boolean"},"packages":{"items":{"type":"string"},"type":"array"},"patterns":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"scopes":{"items":{"type":"string"},"type":"array"}},"type":"object"},{"additionalProperties":false,"properties":{"githubToken":{"type":"boolean"}},"type":"object"},{"additionalProperties":false,"properties":{},"type":"object"}]},"defaultVisibleToNewProjects":{"type":"boolean"},"pollIntervalSeconds":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"removalPolicy":{"enum":["flag","exclude"],"type":"string"},"retentionDaysOverride":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]},"url":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}]},"userAgent":{"type":["string","null"]}},"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Change source settings","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources/{source}/attachment":{"delete":{"operationId":"detachSource","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Detach a source from a project","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true},"put":{"operationId":"attachSource","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"precedence":{"maximum":10000,"minimum":0,"type":"integer"}},"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Attach a source to a project","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources/{source}/credential":{"put":{"operationId":"writeProjectSourceCredential","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"kind":{"enum":["http_basic","bearer","header","query","github_app","npm_token","ssh_key"],"type":"string"},"material":{"maxLength":16384,"type":"string"}},"required":["kind","material"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Replace a source credential after reauthentication","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources/{source}/packages":{"post":{"operationId":"addProjectSourcePackage","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"maxLength":428,"minLength":1,"type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"type":"string"},"state":{"const":"present","type":"string"}},"required":["name","state"],"type":"object"}}},"description":"Response"},"202":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"jobId":{"type":"string"},"name":{"type":"string"},"state":{"const":"queued","type":"string"}},"required":["name","state","jobId"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict; Source is paused; Already exists; Last holder cannot be removed; Idempotency key does not match; Already issued; Approval required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Upstream request refused; Bad gateway"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Request a package with project:sources:write from a project or organization proxy attached to the project","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources/{source}/pause":{"post":{"operationId":"pauseProjectSource","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Pause a source","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources/{source}/resume":{"post":{"operationId":"resumeProjectSource","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Resume a proxy source","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/sources/{source}/sync":{"post":{"operationId":"syncProjectSource","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"202":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict; Source is paused; Already exists; Last holder cannot be removed; Idempotency key does not match; Already issued; Approval required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Request a source sync","tags":["sources"],"x-pb-boundary":"project","x-pb-permission":"project:sources:write","x-pb-session-only":true}},"/_pb/projects/{project}/tokens":{"get":{"operationId":"listProjectTokens","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["active","expired","revoked"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"id":{"type":"string"},"kind":{"enum":["pat","svc"],"type":"string"},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"projectCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"type":["string","null"]},"projectMode":{"anyOf":[{"enum":["all","selected"],"type":"string"},{"type":"null"}]},"readOnly":{"type":"boolean"},"revokedAt":{"type":["string","null"]},"scope":{"enum":["read","write","full"],"type":"string"},"servicePrincipalId":{"type":["string","null"]},"status":{"enum":["active","expired","revoked"],"type":"string"},"userId":{"type":["string","null"]}},"required":["id","kind","name","scope","readOnly","status","projectMode","projectCount","projectId","userId","createdByUserId","servicePrincipalId","createdAt","expiresAt","lastUsedAt","revokedAt"],"type":"object"},"type":"array"},"lifetime":{"additionalProperties":false,"properties":{"personal":{"additionalProperties":false,"properties":{"defaultDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["maxDays","defaultDays"],"type":"object"},"service":{"additionalProperties":false,"properties":{"defaultDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["maxDays","defaultDays"],"type":"object"}},"required":["personal","service"],"type":"object"},"next":{"type":["string","null"]}},"required":["items","next","lifetime"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]}],"summary":"List project tokens","tags":["tokens"],"x-pb-boundary":"project","x-pb-permission":"project:tokens:read","x-pb-session-only":true},"post":{"operationId":"createProjectToken","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expiresAt":{"type":"string"},"lifetimeDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"type":"string"},"readOnly":{"type":"boolean"},"scope":{"enum":["read","write","full"],"type":"string"},"servicePrincipalId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["servicePrincipalId","name","scope"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"type":"string"},"token":{"type":"string"}},"required":["id","token"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Issue a project service token","tags":["tokens"],"x-pb-boundary":"project","x-pb-permission":"project:tokens:create","x-pb-session-only":true}},"/_pb/projects/{project}/tokens/{token}":{"delete":{"operationId":"revokeProjectToken","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"token","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Revoke a project token","tags":["tokens"],"x-pb-boundary":"project","x-pb-permission":"project:tokens:revoke","x-pb-session-only":true},"get":{"operationId":"getProjectToken","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"token","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"id":{"type":"string"},"kind":{"enum":["pat","svc"],"type":"string"},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"projectCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"type":["string","null"]},"projectMode":{"anyOf":[{"enum":["all","selected"],"type":"string"},{"type":"null"}]},"readOnly":{"type":"boolean"},"revokedAt":{"type":["string","null"]},"scope":{"enum":["read","write","full"],"type":"string"},"servicePrincipalId":{"type":["string","null"]},"status":{"enum":["active","expired","revoked"],"type":"string"},"userId":{"type":["string","null"]}},"required":["id","kind","name","scope","readOnly","status","projectMode","projectCount","projectId","userId","createdByUserId","servicePrincipalId","createdAt","expiresAt","lastUsedAt","revokedAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]}],"summary":"Get a project token","tags":["tokens"],"x-pb-boundary":"project","x-pb-permission":"project:tokens:read","x-pb-session-only":true}},"/_pb/projects/{project}/tokens/{token}/rotate":{"post":{"operationId":"rotateProjectToken","parameters":[{"in":"path","name":"project","required":true,"schema":{"pattern":"^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$","type":"string"}},{"in":"path","name":"token","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expiresAt":{"type":"string"},"lifetimeDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"type":"string"},"overlapDays":{"anyOf":[{"const":0,"type":"number"},{"const":1,"type":"number"},{"const":7,"type":"number"}]}},"required":["overlapDays"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"type":"string"},"replacedExpiresAt":{"type":"string"},"replacedTokenId":{"type":"string"},"token":{"type":"string"}},"required":["id","token","replacedTokenId","replacedExpiresAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict; Source is paused; Already exists; Last holder cannot be removed; Idempotency key does not match; Already issued; Approval required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Rotate a project service token","tags":["tokens"],"x-pb-boundary":"project","x-pb-permission":"project:tokens:create","x-pb-session-only":true}},"/_pb/roles":{"get":{"operationId":"listRoles","parameters":[{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^([1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"id":{"type":"string"},"isSystem":{"type":"boolean"},"key":{"type":"string"},"name":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array"},"protectsLastHolder":{"type":"boolean"},"revision":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"scope":{"enum":["organization","project"],"type":"string"}},"required":["id","key","name","scope","isSystem","protectsLastHolder","revision","permissions"],"type":"object"},"type":"array"},"next":{"type":["string","null"]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List roles","tags":["roles"],"x-pb-boundary":"organization","x-pb-permission":"org:roles:read","x-pb-session-only":false},"post":{"operationId":"createRole","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"key":{"pattern":"^[a-z][a-z0-9_]{0,63}$","type":"string"},"name":{"maxLength":200,"minLength":1,"type":"string"},"permissions":{"items":{"maxLength":100,"type":"string"},"maxItems":200,"type":"array"},"scope":{"enum":["organization","project"],"type":"string"}},"required":["key","name","scope","permissions"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["id"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Add a role","tags":["roles"],"x-pb-boundary":"organization","x-pb-permission":"org:roles:write","x-pb-session-only":true}},"/_pb/roles/{role}":{"delete":{"operationId":"deleteRole","parameters":[{"in":"path","name":"role","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Remove a role","tags":["roles"],"x-pb-boundary":"organization","x-pb-permission":"org:roles:write","x-pb-session-only":true},"patch":{"operationId":"updateRole","parameters":[{"in":"path","name":"role","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":false,"properties":{"name":{"maxLength":200,"minLength":1,"type":"string"}},"required":["name"],"type":"object"},{"additionalProperties":false,"properties":{"permissions":{"items":{"maxLength":100,"type":"string"},"maxItems":200,"type":"array"}},"required":["permissions"],"type":"object"}]}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Rename a role or replace its permissions","tags":["roles"],"x-pb-boundary":"organization","x-pb-permission":"org:roles:write","x-pb-session-only":true}},"/_pb/service-principals":{"get":{"operationId":"listServicePrincipals","parameters":[{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^([1-9][0-9]?|100)$","type":"string"}},{"in":"query","name":"project","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"createdByUserId":{"type":"string"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"name":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array"},"projectId":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"revision":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"status":{"enum":["active","suspended"],"type":"string"}},"required":["id","name","projectId","createdByUserId","status","revision","permissions"],"type":"object"},"type":"array"},"next":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Package not found; Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"List service principals","tags":["service-principals"],"x-pb-boundary":"organization","x-pb-permission":"org:service-principals:write","x-pb-session-only":true},"post":{"operationId":"createServicePrincipal","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"pattern":"^(?![\\\\s\\\\S]*(?:[\\\\u0000-\\\\u001f\\\\u007f-\\\\u009f\\\\u00ad\\\\u0600-\\\\u0605\\\\u061c\\\\u06dd\\\\u070f\\\\u0890-\\\\u0891\\\\u08e2\\\\u180e\\\\u200b-\\\\u200f\\\\u2028-\\\\u202e\\\\u2060-\\\\u2064\\\\u2066-\\\\u206f\\\\ufeff\\\\ufff9-\\\\ufffb]|\\\\ud804[\\\\udcbd\\\\udccd]|\\\\ud80d[\\\\udc30-\\\\udc3f]|\\\\ud82f[\\\\udca0-\\\\udca3]|\\\\ud834[\\\\udd73-\\\\udd7a]|\\\\udb40[\\\\udc01\\\\udc20-\\\\udc7f]))(?:[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]|[^\\\\ud800-\\\\udfff]){1,100}(?![\\\\s\\\\S])","type":"string"},"permissions":{"items":{"enum":["org:read","org:settings:write","org:users:read","org:users:write","org:roles:read","org:roles:write","org:grants:read","org:grants:write","org:projects:create","org:projects:archive","org:sources:read","org:sources:write","org:tokens:read","org:tokens:revoke","org:service-principals:write","org:packages:manage","org:import:write","org:import:approve","org:audit:read","project:read","project:settings:write","project:grants:read","project:grants:write","project:packages:read","project:packages:write","project:packages:manage","project:sources:read","project:sources:write","project:service-principals:write","project:tokens:create","project:tokens:read","project:tokens:revoke","project:audit:read"],"type":"string"},"type":"array"},"project":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["name","permissions"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"createdByUserId":{"type":"string"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"name":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array"},"projectId":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"revision":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"status":{"enum":["active","suspended"],"type":"string"}},"required":["id","name","projectId","createdByUserId","status","revision","permissions"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Package not found; Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict; Source is paused; Already exists; Last holder cannot be removed; Idempotency key does not match; Already issued; Approval required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Add a service principal; requires Idempotency-Key and returns ETag","tags":["service-principals"],"x-pb-boundary":"organization","x-pb-permission":"org:service-principals:write","x-pb-session-only":true}},"/_pb/service-principals/{principal}":{"get":{"operationId":"getServicePrincipal","parameters":[{"in":"path","name":"principal","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"createdByUserId":{"type":"string"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"name":{"type":"string"},"permissions":{"items":{"type":"string"},"type":"array"},"projectId":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"revision":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"status":{"enum":["active","suspended"],"type":"string"}},"required":["id","name","projectId","createdByUserId","status","revision","permissions"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Read a service principal","tags":["service-principals"],"x-pb-boundary":"organization","x-pb-permission":"org:service-principals:write","x-pb-session-only":true}},"/_pb/service-principals/{principal}/permissions":{"put":{"operationId":"setServicePrincipalPermissions","parameters":[{"in":"path","name":"principal","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"permissions":{"items":{"enum":["org:read","org:settings:write","org:users:read","org:users:write","org:roles:read","org:roles:write","org:grants:read","org:grants:write","org:projects:create","org:projects:archive","org:sources:read","org:sources:write","org:tokens:read","org:tokens:revoke","org:service-principals:write","org:packages:manage","org:import:write","org:import:approve","org:audit:read","project:read","project:settings:write","project:grants:read","project:grants:write","project:packages:read","project:packages:write","project:packages:manage","project:sources:read","project:sources:write","project:service-principals:write","project:tokens:create","project:tokens:read","project:tokens:revoke","project:audit:read"],"type":"string"},"type":"array"}},"required":["permissions"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Set service principal permissions","tags":["service-principals"],"x-pb-boundary":"organization","x-pb-permission":"org:service-principals:write","x-pb-session-only":true}},"/_pb/service-principals/{principal}/restore":{"post":{"operationId":"restoreServicePrincipal","parameters":[{"in":"path","name":"principal","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"header","name":"If-Match","required":true,"schema":{"pattern":"^\\"r([1-9][0-9]*)\\"$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"412":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition failed"},"428":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Precondition required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Restore service principal","tags":["service-principals"],"x-pb-boundary":"organization","x-pb-permission":"org:service-principals:write","x-pb-session-only":true}},"/_pb/service-principals/{principal}/suspend":{"post":{"operationId":"suspendServicePrincipal","parameters":[{"in":"path","name":"principal","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Suspend service principal","tags":["service-principals"],"x-pb-boundary":"organization","x-pb-permission":"org:service-principals:write","x-pb-session-only":true}},"/_pb/session":{"get":{"operationId":"getSession","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expiresAt":{"type":"string"},"reauthFresh":{"type":"boolean"},"user":{"additionalProperties":false,"properties":{"displayName":{"type":["string","null"]},"email":{"type":"string"},"id":{"type":"string"}},"required":["id","email","displayName"],"type":"object"}},"required":["user","reauthFresh","expiresAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"}},"security":[],"summary":"Get the current session","tags":["session"],"x-pb-boundary":"none","x-pb-permission":null,"x-pb-session-only":false}},"/_pb/sources":{"get":{"operationId":"listOrganizationSources","parameters":[{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}},{"in":"query","name":"ownership","required":false,"schema":{"enum":["organization","project","all"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"attachedProjectCount":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"config":{"anyOf":[{"additionalProperties":false,"properties":{"installationId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"packageName":{"type":"string"},"provider":{"enum":["github","git","ssh"],"type":"string"},"refs":{"additionalProperties":false,"properties":{"branches":{"items":{"type":"string"},"type":"array"},"tags":{"type":"boolean"}},"type":"object"},"repository":{"type":"string"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"mirrorsFallback":{"type":"boolean"},"selection":{"additionalProperties":false,"properties":{"expandPatterns":{"type":"boolean"},"packages":{"items":{"type":"string"},"type":"array"},"patterns":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"scopes":{"items":{"type":"string"},"type":"array"}},"type":"object"},{"additionalProperties":false,"properties":{"githubToken":{"type":"boolean"}},"type":"object"},{"additionalProperties":false,"properties":{},"type":"object"}]},"configComplete":{"type":"boolean"},"defaultVisibleToNewProjects":{"type":"boolean"},"ecosystem":{"enum":["composer","npm"],"type":"string"},"githubAuthentication":{"enum":["app","token"],"type":"string"},"hasCredential":{"type":"boolean"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"lastError":{"type":["string","null"]},"lastPolledAt":{"type":["string","null"]},"lastRemovalRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"absent":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"at":{"type":"string"},"listed":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"successful":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["at","absent","listed","successful"],"type":"object"},{"type":"null"}]},"lastSuccessAt":{"type":["string","null"]},"name":{"type":"string"},"nextPollAt":{"type":["string","null"]},"pollIntervalSeconds":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"projectName":{"type":["string","null"]},"removalAcceptanceArmed":{"type":"boolean"},"removalPolicy":{"enum":["flag","exclude"],"type":"string"},"retentionDaysOverride":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]},"status":{"enum":["active","degraded","failing","paused"],"type":"string"},"sync":{"additionalProperties":false,"properties":{"completed":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"errors":{"items":{"additionalProperties":false,"properties":{"code":{"enum":["network","timeout","http_error","unauthorized","rate_limited","not_found","invalid_response","tag_limit_exceeded","mass_absence","too_large","policy_denied","credential_unavailable","internal"],"type":"string"},"count":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["code","count"],"type":"object"},"type":"array"},"failed":{"description":"Terminal package failures.","maximum":9007199254740991,"minimum":0,"type":"integer"},"generation":{"type":"string"},"listing":{"type":"boolean"},"queued":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"retrying":{"description":"Failed packages queued for another attempt; disjoint from queued, running, failed and completed.","maximum":9007199254740991,"minimum":0,"type":"integer"},"running":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["listing","generation","queued","running","retrying","failed","completed","errors"],"type":"object"},"type":{"enum":["vcs","composer_repository","npm_registry","packagist_proxy","npmjs_proxy","hosted"],"type":"string"},"url":{"type":["string","null"]},"userAgent":{"type":["string","null"]}},"required":["id","projectId","name","ecosystem","type","url","status","removalPolicy","pollIntervalSeconds","lastSuccessAt","lastError","lastPolledAt","nextPollAt","hasCredential","lastRemovalRefusal","removalAcceptanceArmed","projectName","attachedProjectCount"],"type":"object"},"type":"array"},"next":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]},"vcsProviders":{"items":{"enum":["github","git","ssh"],"type":"string"},"type":"array"}},"required":["items","next","vcsProviders"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List sources","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:read","x-pb-session-only":false},"post":{"operationId":"createOrganizationSource","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"config":{"anyOf":[{"additionalProperties":false,"properties":{"installationId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"packageName":{"type":"string"},"provider":{"enum":["github","git","ssh"],"type":"string"},"refs":{"additionalProperties":false,"properties":{"branches":{"items":{"type":"string"},"type":"array"},"tags":{"type":"boolean"}},"type":"object"},"repository":{"type":"string"}},"required":["provider","repository"],"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"mirrorsFallback":{"type":"boolean"},"selection":{"additionalProperties":false,"properties":{"expandPatterns":{"type":"boolean"},"packages":{"items":{"type":"string"},"type":"array"},"patterns":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"scopes":{"items":{"type":"string"},"type":"array"}},"type":"object"},{"additionalProperties":false,"properties":{"githubToken":{"type":"boolean"}},"type":"object"},{"additionalProperties":false,"properties":{},"type":"object"}]},"defaultVisibleToNewProjects":{"type":"boolean"},"ecosystem":{"enum":["composer","npm"],"type":"string"},"name":{"minLength":1,"type":"string"},"pollIntervalSeconds":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"removalPolicy":{"enum":["flag","exclude"],"type":"string"},"retentionDaysOverride":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]},"type":{"enum":["vcs","composer_repository","npm_registry","packagist_proxy","npmjs_proxy","hosted"],"type":"string"},"url":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}]},"userAgent":{"type":["string","null"]}},"required":["name","ecosystem","type"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["id"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Add a source","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}":{"patch":{"operationId":"updateOrganizationSource","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"config":{"anyOf":[{"additionalProperties":false,"properties":{"installationId":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"packageName":{"type":"string"},"provider":{"enum":["github","git","ssh"],"type":"string"},"refs":{"additionalProperties":false,"properties":{"branches":{"items":{"type":"string"},"type":"array"},"tags":{"type":"boolean"}},"type":"object"},"repository":{"type":"string"}},"required":["provider","repository"],"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"mirrorsFallback":{"type":"boolean"},"selection":{"additionalProperties":false,"properties":{"expandPatterns":{"type":"boolean"},"packages":{"items":{"type":"string"},"type":"array"},"patterns":{"items":{"type":"string"},"type":"array"}},"type":"object"}},"type":"object"},{"additionalProperties":false,"properties":{"distHosts":{"items":{"type":"string"},"type":"array"},"scopes":{"items":{"type":"string"},"type":"array"}},"type":"object"},{"additionalProperties":false,"properties":{"githubToken":{"type":"boolean"}},"type":"object"},{"additionalProperties":false,"properties":{},"type":"object"}]},"defaultVisibleToNewProjects":{"type":"boolean"},"pollIntervalSeconds":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"removalPolicy":{"enum":["flag","exclude"],"type":"string"},"retentionDaysOverride":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]},"url":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}]},"userAgent":{"type":["string","null"]}},"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Change source settings","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}/accept-removal":{"post":{"operationId":"acceptSourceRemoval","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict; Source is paused; Already exists; Last holder cannot be removed; Idempotency key does not match; Already issued; Approval required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Arm a one-shot acceptance of the last refused source removal","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}/credential":{"put":{"operationId":"writeOrganizationSourceCredential","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"kind":{"enum":["http_basic","bearer","header","query","github_app","npm_token","ssh_key"],"type":"string"},"material":{"maxLength":16384,"type":"string"}},"required":["kind","material"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Replace a source credential after reauthentication","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}/enable":{"post":{"operationId":"enableSource","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Enable a source with registered names","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}/names":{"get":{"operationId":"listRegisteredNames","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"ecosystem":{"enum":["composer","npm"],"type":"string"},"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},"pattern":{"type":"string"},"sourceId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["id","sourceId","ecosystem","pattern"],"type":"object"},"type":"array"},"next":{"anyOf":[{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"},{"type":"null"}]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List registered names","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:read","x-pb-session-only":false},"post":{"operationId":"addRegisteredName","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"pattern":{"maxLength":50,"pattern":"^[a-z0-9._~@!/*-]+$","type":"string"}},"required":["pattern"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["id"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Register a name pattern","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}/names/{name}":{"delete":{"operationId":"removeRegisteredName","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"path","name":"name","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"paused":{"const":true,"type":"boolean"}},"required":["paused"],"type":"object"}}},"description":"Response"},"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Remove a registered name","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}/pause":{"post":{"operationId":"pauseOrganizationSource","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Pause a source","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}/resume":{"post":{"operationId":"resumeOrganizationSource","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Resume a proxy source","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/sources/{source}/sync":{"post":{"operationId":"syncOrganizationSource","parameters":[{"in":"path","name":"source","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"202":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict; Source is paused; Already exists; Last holder cannot be removed; Idempotency key does not match; Already issued; Approval required"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Request a source sync","tags":["sources"],"x-pb-boundary":"organization","x-pb-permission":"org:sources:write","x-pb-session-only":true}},"/_pb/tokens":{"get":{"operationId":"listTokens","parameters":[{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"kind","required":false,"schema":{"enum":["pat","svc"],"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["active","expired","revoked"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"id":{"type":"string"},"kind":{"enum":["pat","svc"],"type":"string"},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"projectCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"type":["string","null"]},"projectMode":{"anyOf":[{"enum":["all","selected"],"type":"string"},{"type":"null"}]},"readOnly":{"type":"boolean"},"revokedAt":{"type":["string","null"]},"scope":{"enum":["read","write","full"],"type":"string"},"servicePrincipalId":{"type":["string","null"]},"status":{"enum":["active","expired","revoked"],"type":"string"},"userId":{"type":["string","null"]}},"required":["id","kind","name","scope","readOnly","status","projectMode","projectCount","projectId","userId","createdByUserId","servicePrincipalId","createdAt","expiresAt","lastUsedAt","revokedAt"],"type":"object"},"type":"array"},"lifetime":{"additionalProperties":false,"properties":{"personal":{"additionalProperties":false,"properties":{"defaultDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["maxDays","defaultDays"],"type":"object"},"service":{"additionalProperties":false,"properties":{"defaultDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"maxDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["maxDays","defaultDays"],"type":"object"}},"required":["personal","service"],"type":"object"},"next":{"type":["string","null"]}},"required":["items","next","lifetime"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"}},"security":[{"session":[]}],"summary":"List organization tokens","tags":["tokens"],"x-pb-boundary":"organization","x-pb-permission":"org:tokens:read","x-pb-session-only":true},"post":{"operationId":"createOrganizationToken","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expiresAt":{"type":"string"},"lifetimeDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"type":"string"},"readOnly":{"type":"boolean"},"scope":{"enum":["read","write","full"],"type":"string"},"servicePrincipalId":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},"required":["servicePrincipalId","name","scope"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"type":"string"},"token":{"type":"string"}},"required":["id","token"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Issue an organization service token","tags":["tokens"],"x-pb-boundary":"organization","x-pb-permission":"org:service-principals:write","x-pb-session-only":true}},"/_pb/tokens/{token}":{"delete":{"operationId":"revokeToken","parameters":[{"in":"path","name":"token","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Revoke an organization token","tags":["tokens"],"x-pb-boundary":"organization","x-pb-permission":"org:tokens:revoke","x-pb-session-only":true},"get":{"operationId":"getToken","parameters":[{"in":"path","name":"token","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"id":{"type":"string"},"kind":{"enum":["pat","svc"],"type":"string"},"lastUsedAt":{"type":["string","null"]},"name":{"type":"string"},"projectCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"projectId":{"type":["string","null"]},"projectMode":{"anyOf":[{"enum":["all","selected"],"type":"string"},{"type":"null"}]},"readOnly":{"type":"boolean"},"revokedAt":{"type":["string","null"]},"scope":{"enum":["read","write","full"],"type":"string"},"servicePrincipalId":{"type":["string","null"]},"status":{"enum":["active","expired","revoked"],"type":"string"},"userId":{"type":["string","null"]}},"required":["id","kind","name","scope","readOnly","status","projectMode","projectCount","projectId","userId","createdByUserId","servicePrincipalId","createdAt","expiresAt","lastUsedAt","revokedAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"}},"security":[{"session":[]}],"summary":"Get an organization token","tags":["tokens"],"x-pb-boundary":"organization","x-pb-permission":"org:tokens:read","x-pb-session-only":true}},"/_pb/tokens/{token}/rotate":{"post":{"operationId":"rotateToken","parameters":[{"in":"path","name":"token","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"expiresAt":{"type":"string"},"lifetimeDays":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"type":"string"},"overlapDays":{"anyOf":[{"const":0,"type":"number"},{"const":1,"type":"number"},{"const":7,"type":"number"}]}},"required":["overlapDays"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"id":{"type":"string"},"replacedExpiresAt":{"type":"string"},"replacedTokenId":{"type":"string"},"token":{"type":"string"}},"required":["id","token","replacedTokenId","replacedExpiresAt"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied; Reauthentication required"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Conflict; Source is paused; Already exists; Last holder cannot be removed; Idempotency key does not match; Already issued; Approval required"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Rotate an organization service token","tags":["tokens"],"x-pb-boundary":"organization","x-pb-permission":"org:service-principals:write","x-pb-session-only":true}},"/_pb/users":{"get":{"operationId":"listUsers","parameters":[{"in":"query","name":"after","required":false,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"pattern":"^(?:[1-9][0-9]?|100)$","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"items":{"items":{"additionalProperties":false,"properties":{"createdAt":{"type":"string"},"displayName":{"type":["string","null"]},"email":{"type":"string"},"id":{"type":"string"},"lastLoginAt":{"type":["string","null"]},"status":{"enum":["active","suspended"],"type":"string"}},"required":["id","displayName","status","lastLoginAt","createdAt"],"type":"object"},"type":"array"},"next":{"type":["string","null"]}},"required":["items","next"],"type":"object"}}},"description":"Response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"}},"security":[{"session":[]},{"bearer":[]}],"summary":"List organization users","tags":["users"],"x-pb-boundary":"organization","x-pb-permission":"org:users:read","x-pb-session-only":false}},"/_pb/users/{user}":{"patch":{"operationId":"updateUser","parameters":[{"in":"path","name":"user","required":true,"schema":{"pattern":"^[0-7][0-9A-HJKMNP-TV-Z]{25}$","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"status":{"enum":["active","suspended"],"type":"string"}},"required":["status"],"type":"object"}}},"required":true},"responses":{"204":{"description":"No content"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Invalid request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Authentication required"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Not found"},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Payload too large"},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Unsupported media type"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}},"description":"Service unavailable"}},"security":[{"session":[]}],"summary":"Suspend or reactivate a user","tags":["users"],"x-pb-boundary":"organization","x-pb-permission":"org:users:write","x-pb-session-only":true}}}}');
|
|
60239
60288
|
|
|
60240
60289
|
// packages/core/dist/runtime/vulnerability.js
|
|
60241
60290
|
init_config();
|
|
@@ -60505,7 +60554,7 @@ function createOsvClient(policyFetch) {
|
|
|
60505
60554
|
else
|
|
60506
60555
|
groups.set(key2, { versionIds: [tuple.versionId], query });
|
|
60507
60556
|
}
|
|
60508
|
-
const body = encoder14.encode(JSON.stringify({ queries: [...groups.values()].map((
|
|
60557
|
+
const body = encoder14.encode(JSON.stringify({ queries: [...groups.values()].map((group2) => group2.query) }));
|
|
60509
60558
|
if (body.length > 64 * 1024)
|
|
60510
60559
|
throw new OsvError("limit");
|
|
60511
60560
|
const response = record4(await request(grant, options, body));
|
|
@@ -60514,9 +60563,9 @@ function createOsvClient(policyFetch) {
|
|
|
60514
60563
|
const results = list2(response.results, 20);
|
|
60515
60564
|
if (results.length !== groups.size)
|
|
60516
60565
|
throw new OsvError("protocol");
|
|
60517
|
-
return [...groups.values()].flatMap((
|
|
60566
|
+
return [...groups.values()].flatMap((group2, index) => {
|
|
60518
60567
|
const page3 = parsePage(results[index]);
|
|
60519
|
-
return
|
|
60568
|
+
return group2.versionIds.map((versionId) => ({ versionId, ...page3 }));
|
|
60520
60569
|
});
|
|
60521
60570
|
},
|
|
60522
60571
|
async detail(grant, options) {
|
|
@@ -61722,7 +61771,7 @@ function narrow(result, current) {
|
|
|
61722
61771
|
return void 0;
|
|
61723
61772
|
kept.add(entry);
|
|
61724
61773
|
}
|
|
61725
|
-
return current.filter((
|
|
61774
|
+
return current.filter((group2) => kept.has(group2));
|
|
61726
61775
|
}
|
|
61727
61776
|
function dataValue3(target, key2) {
|
|
61728
61777
|
const descriptor = Object.getOwnPropertyDescriptor(target, key2);
|
|
@@ -61977,10 +62026,10 @@ function copyGroups(raw2) {
|
|
|
61977
62026
|
function groupsFit(groups) {
|
|
61978
62027
|
if (groups.length > MAX_GROUPS)
|
|
61979
62028
|
return "too_many_groups";
|
|
61980
|
-
for (const
|
|
61981
|
-
if (LONE_SURROGATE5.test(
|
|
62029
|
+
for (const group2 of groups) {
|
|
62030
|
+
if (LONE_SURROGATE5.test(group2))
|
|
61982
62031
|
return "invalid_identity";
|
|
61983
|
-
const length = Array.from(
|
|
62032
|
+
const length = Array.from(group2).length;
|
|
61984
62033
|
if (length < 1)
|
|
61985
62034
|
return "invalid_identity";
|
|
61986
62035
|
if (length > MAX_GROUP_NAME_LENGTH)
|
|
@@ -67144,8 +67193,8 @@ function requireLimit2(limit4) {
|
|
|
67144
67193
|
return limit4;
|
|
67145
67194
|
}
|
|
67146
67195
|
function groupsJson(groups) {
|
|
67147
|
-
for (const
|
|
67148
|
-
if (typeof
|
|
67196
|
+
for (const group2 of groups) {
|
|
67197
|
+
if (typeof group2 !== "string" || LONE_SURROGATE6.test(group2)) {
|
|
67149
67198
|
throw new TypeError("every group must be a well-formed string");
|
|
67150
67199
|
}
|
|
67151
67200
|
}
|
|
@@ -73059,14 +73108,14 @@ function createImportVerificationStore(options) {
|
|
|
73059
73108
|
const entity = ROLLBACK_ENTITIES[type2];
|
|
73060
73109
|
if (entity === void 0)
|
|
73061
73110
|
continue;
|
|
73062
|
-
const
|
|
73111
|
+
const visible2 = visibility(ctx, type2);
|
|
73063
73112
|
const extra = type2 === "source" ? ", EXISTS (SELECT 1 FROM credential ivcredential WHERE ivcredential.org_id = ? AND ivcredential.id = iventity.credential_id AND ivcredential.project_id IS iventity.project_id) AS iv_credential" : type2 === "role" ? ", (SELECT json_group_array(ivpermission.permission) FROM role_permission ivpermission WHERE ivpermission.org_id = ? AND ivpermission.role_id = iventity.id) AS iv_permissions" : "";
|
|
73064
73113
|
for (let offset = 0; offset < ids2.length; offset += 40) {
|
|
73065
73114
|
const keys = ids2.slice(offset, offset + 40).map((id4) => entity.key.length === 1 ? [id4] : id4.split(":")).filter((key2) => key2.length === entity.key.length);
|
|
73066
73115
|
if (keys.length === 0)
|
|
73067
73116
|
continue;
|
|
73068
73117
|
const match3 = entity.key.length === 1 ? `iventity.${entity.key[0]} IN (${keys.map(() => "?").join(", ")})` : `(${entity.key.map((key2) => `iventity.${key2}`).join(", ")}) IN (VALUES ${keys.map(() => `(${entity.key.map(() => "?").join(", ")})`).join(", ")})`;
|
|
73069
|
-
const rows = await executor.all(statement8(`SELECT iventity.*, (${
|
|
73118
|
+
const rows = await executor.all(statement8(`SELECT iventity.*, (${visible2.sql}) AS iv_visible${extra} FROM ${entity.table} iventity WHERE iventity.org_id = ? AND ${match3}`, ...visible2.params, ...extra === "" ? [] : [ctx.orgId], ctx.orgId, ...keys.flat()));
|
|
73070
73119
|
for (const row of rows)
|
|
73071
73120
|
found3.set(`${type2}:${entity.key.map((key2) => String(row[key2])).join(":")}`, row);
|
|
73072
73121
|
}
|
|
@@ -75169,8 +75218,8 @@ function dependencyNames(ecosystem6, fields2) {
|
|
|
75169
75218
|
return { keys: [...keys], unresolvable };
|
|
75170
75219
|
}
|
|
75171
75220
|
const peers = Object.fromEntries(Object.entries(fields2.peerDependencies ?? {}).filter(([name]) => fields2.peerDependenciesMeta?.[name]?.optional !== true));
|
|
75172
|
-
for (const
|
|
75173
|
-
for (const [name, spec] of Object.entries(
|
|
75221
|
+
for (const group2 of [fields2.dependencies, fields2.optionalDependencies, peers]) {
|
|
75222
|
+
for (const [name, spec] of Object.entries(group2 ?? {})) {
|
|
75174
75223
|
const trimmed = typeof spec === "string" ? spec.trim() : null;
|
|
75175
75224
|
if (trimmed === null) {
|
|
75176
75225
|
unresolvable += 1;
|
|
@@ -75276,7 +75325,7 @@ async function buildClosureReport(reader3, actor, organizationPermissions, ecosy
|
|
|
75276
75325
|
const canSeeOrganizationSources = organizationPermissions.has("org:sources:read");
|
|
75277
75326
|
const ctx = { orgId: actor.orgId };
|
|
75278
75327
|
const scope4 = { projectId: actor.projectId, ecosystem: ecosystem6 };
|
|
75279
|
-
const
|
|
75328
|
+
const visible2 = /* @__PURE__ */ new Set();
|
|
75280
75329
|
let after;
|
|
75281
75330
|
do {
|
|
75282
75331
|
const page3 = await reader3.listVisible(ctx, {
|
|
@@ -75285,7 +75334,7 @@ async function buildClosureReport(reader3, actor, organizationPermissions, ecosy
|
|
|
75285
75334
|
...after === void 0 ? {} : { after }
|
|
75286
75335
|
});
|
|
75287
75336
|
for (const item3 of page3.items)
|
|
75288
|
-
|
|
75337
|
+
visible2.add(item3.key);
|
|
75289
75338
|
after = page3.next ?? void 0;
|
|
75290
75339
|
} while (after !== void 0);
|
|
75291
75340
|
const edges = [];
|
|
@@ -75314,7 +75363,7 @@ async function buildClosureReport(reader3, actor, organizationPermissions, ecosy
|
|
|
75314
75363
|
} while (cursor4 !== void 0 && scannedVersions < MAX_SCANNED_VERSIONS);
|
|
75315
75364
|
const options = { ecosystem: ecosystem6, canSeeOrganizationSources };
|
|
75316
75365
|
const classes = /* @__PURE__ */ new Map();
|
|
75317
|
-
const report = computeClosure(
|
|
75366
|
+
const report = computeClosure(visible2, edges, () => "not_available", options);
|
|
75318
75367
|
if (canSeeOrganizationSources) {
|
|
75319
75368
|
const keys = report.missing.map(({ name }) => packageKey2(name, { ecosystem: ecosystem6, legacyCase: ecosystem6 === "npm" }));
|
|
75320
75369
|
for (let offset = 0; offset < keys.length; offset += CATALOGUE_KEY_LIST_MAX) {
|
|
@@ -75335,7 +75384,7 @@ async function buildClosureReport(reader3, actor, organizationPermissions, ecosy
|
|
|
75335
75384
|
projectId: actor.projectId,
|
|
75336
75385
|
ecosystem: ecosystem6,
|
|
75337
75386
|
generatedAt: isoTimestamp(clock.now()),
|
|
75338
|
-
scannedPackages:
|
|
75387
|
+
scannedPackages: visible2.size,
|
|
75339
75388
|
scannedVersions,
|
|
75340
75389
|
unresolvableSpecs,
|
|
75341
75390
|
truncated: report.truncated || scannedVersions >= MAX_SCANNED_VERSIONS
|
|
@@ -77873,7 +77922,7 @@ function cleanText(text11) {
|
|
|
77873
77922
|
const kept = (text11.split("<")[0] ?? "").replace(EMAIL_TOKEN, "").trim();
|
|
77874
77923
|
return kept === "" ? void 0 : kept;
|
|
77875
77924
|
}
|
|
77876
|
-
function
|
|
77925
|
+
function person2(value, denied) {
|
|
77877
77926
|
if (typeof value === "string")
|
|
77878
77927
|
return cleanText(value);
|
|
77879
77928
|
if (!isRecord12(value))
|
|
@@ -77888,8 +77937,8 @@ function person(value, denied) {
|
|
|
77888
77937
|
}
|
|
77889
77938
|
function people(value, denied) {
|
|
77890
77939
|
if (!Array.isArray(value))
|
|
77891
|
-
return
|
|
77892
|
-
const list3 = value.map((entry) =>
|
|
77940
|
+
return person2(value, denied);
|
|
77941
|
+
const list3 = value.map((entry) => person2(entry, denied)).filter((entry) => entry !== void 0);
|
|
77893
77942
|
return list3.length === 0 ? void 0 : list3;
|
|
77894
77943
|
}
|
|
77895
77944
|
function bugs(value, denied) {
|
|
@@ -83242,7 +83291,7 @@ function ipv6Groups(canonical) {
|
|
|
83242
83291
|
const left = head === "" ? [] : head.split(":");
|
|
83243
83292
|
const right = tail === void 0 || tail === "" ? [] : tail.split(":");
|
|
83244
83293
|
const fill2 = tail === void 0 ? [] : Array(8 - left.length - right.length).fill("0");
|
|
83245
|
-
return [...left, ...fill2, ...right].map((
|
|
83294
|
+
return [...left, ...fill2, ...right].map((group2) => Number.parseInt(group2, 16));
|
|
83246
83295
|
}
|
|
83247
83296
|
function embeddedIpv42(high, low) {
|
|
83248
83297
|
return { address: `${high >> 8}.${high & 255}.${low >> 8}.${low & 255}`, family: 4 };
|