Skip to content
Myr

oauth-store.ts

This file

Path

apps/platform/src/auth/oauth-store.ts

37 lines · 996 bytes · TypeScript

Last changed by

Merge build/comments-platform into mainoscabrielbefore adoptionddf09e8

History of this file

Take it

The walk stopped after 200 commits: lines older than 678c8b8 point at it.

Merge build/comments-platform into mainoscabrielbefore adoptionddf09e8

line 1why, one step back
1// Only the calls the provider makes, so a `KVNamespace` is one as it is.

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 2–37why, one step back
2import { Context } from "effect";
3import type { Schema } from "effect";45export interface OAuthStoreList {6 readonly cursor?: string;7 readonly keys: readonly {8 readonly metadata?: unknown;9 readonly name: string;10 }[];11 readonly list_complete: boolean;12}1314export class OAuthStore extends Context.Service<15 OAuthStore,16 {17 readonly delete: (key: string) => Promise<void>;18 readonly get: (19 key: string,20 options?: { readonly type: "json" }21 ) => Promise<Schema.Json>;22 readonly list: (options?: {23 readonly cursor?: string;24 readonly limit?: number;25 readonly prefix?: string;26 }) => Promise<OAuthStoreList>;27 readonly put: (28 key: string,29 value: string,30 options?: {31 readonly expiration?: number;32 readonly expirationTtl?: number;33 readonly metadata?: unknown;34 }35 ) => Promise<void>;36 }37>()("platform/OAuthStore") {}