import "../dialect-helpers-DRI5pyY3.mjs";
import "../after-B1IIdH3Y.mjs";
import "../object-cache-Bok5j2ae.mjs";
import "../content-DhgEth4k.mjs";
import "../base64-CmWvODNW.mjs";
import "../types-CuW0zWDA.mjs";
import "../media-BrXIaMFN.mjs";
import "../user-BjAOvU3Z.mjs";
import { t as OptionsRepository } from "../options-DTTML-Tx.mjs";
import { r as createStorageAccess } from "../context-CUsR9dXL.mjs";
import "../request-cache-KCNHp_RJ.mjs";
import "../enrich-BQ0mxJRs.mjs";
import "../seo-DXu2UQnC.mjs";
import "../content-refresh-CA4uKwzH.mjs";
import "../loader-CB6YHeul.mjs";
import "../settings-zhmdKyJQ.mjs";
import "../ssrf-1g7usGBg.mjs";
import { n as apiSuccess, r as handleError, t as apiError } from "../error-CkAseSqZ.mjs";
import { i as parseQuery, n as parseBody, t as isParseError } from "../parse-GmjecGct.mjs";
import "../ssrf-CmuGgCq3.mjs";
import "../cron-v4FTEFR_.mjs";
import { n as getPublicOrigin } from "../public-url-Danv47cS.mjs";
import { t as finalizeSetup } from "../setup-complete-Cb3LRyzy.mjs";

//#region src/api/auth-storage.ts
/**
* Get storage collections for an auth provider.
*
* Returns a record of `StorageCollection` instances, one per declared
* collection in the provider's `storage` config. Data is stored in the
* shared `_plugin_storage` table under the namespace `auth:<providerId>`.
*
* @example
* ```ts
* const storage = getAuthProviderStorage(emdash.db, "atproto", {
*   states: { indexes: [] },
*   sessions: { indexes: [] },
* });
* const session = await storage.sessions.get(sessionId);
* ```
*/
function getAuthProviderStorage(db, providerId, storageConfig) {
	return createStorageAccess(db, `auth:${providerId}`, storageConfig);
}

//#endregion
export { OptionsRepository, apiError, apiSuccess, finalizeSetup, getAuthProviderStorage, getPublicOrigin, handleError, isParseError, parseBody, parseQuery };
//# sourceMappingURL=route-utils.mjs.map