refactor(schema): extract shared public schemas (#33571)

This commit is contained in:
Kit Langton 2026-06-24 04:31:06 +02:00 committed by GitHub
commit 516cfe4e09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
130 changed files with 2014 additions and 1593 deletions

View file

@ -125,7 +125,7 @@ describe("Integration", () => {
expect.objectContaining({
integrationID,
label: "Work",
value: new Credential.Key({ type: "key", key: "secret" }),
value: Credential.Key.make({ type: "key", key: "secret" }),
}),
])
expect((yield* Fiber.join(updated)).length).toBe(1)
@ -149,7 +149,7 @@ describe("Integration", () => {
instructions: "Paste the code",
callback: (code: string) =>
Effect.succeed(
new Credential.OAuth({
Credential.OAuth.make({
type: "oauth",
methodID,
access: "access",
@ -175,7 +175,7 @@ describe("Integration", () => {
expect.objectContaining({
integrationID,
label: "Personal",
value: new Credential.OAuth({
value: Credential.OAuth.make({
type: "oauth",
methodID,
access: "access",
@ -238,7 +238,7 @@ describe("Integration", () => {
url: "https://example.com/authorize",
instructions: "Sign in",
callback: Effect.succeed(
new Credential.OAuth({ type: "oauth", methodID, access: "access", refresh: "refresh", expires: 1 }),
Credential.OAuth.make({ type: "oauth", methodID, access: "access", refresh: "refresh", expires: 1 }),
),
}),
}),
@ -315,12 +315,12 @@ describe("Integration", () => {
const work = yield* credentials.create({
integrationID,
label: "Work",
value: new Credential.Key({ type: "key", key: "a" }),
value: Credential.Key.make({ type: "key", key: "a" }),
})
const personal = yield* credentials.create({
integrationID,
label: "Personal",
value: new Credential.Key({ type: "key", key: "b" }),
value: Credential.Key.make({ type: "key", key: "b" }),
})
// Stored credentials and detected env vars appear as connections.