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

@ -213,7 +213,7 @@ function refresh(methodID: Integration.MethodID, value: Pick<Credential.OAuth, "
}).pipe(
Effect.map((tokens) => {
const next = credential(methodID, tokens)
return new Credential.OAuth({ ...next, metadata: next.metadata ?? value.metadata })
return Credential.OAuth.make({ ...next, metadata: next.metadata ?? value.metadata })
}),
)
}
@ -231,7 +231,7 @@ function request<A>(url: string, init: RequestInit) {
function credential(methodID: Integration.MethodID, tokens: TokenResponse) {
const accountID = extractAccountID(tokens)
return new Credential.OAuth({
return Credential.OAuth.make({
type: "oauth",
methodID,
refresh: tokens.refresh_token,

View file

@ -274,7 +274,7 @@ function credential(http: HttpClient.HttpClient, server: string, token: typeof T
{ concurrency: 2 },
)
const org = orgs.toSorted((a, b) => a.name.localeCompare(b.name) || a.id.localeCompare(b.id))[0]
return new Credential.OAuth({
return Credential.OAuth.make({
type: "oauth" as const,
methodID,
access: token.access_token,