UNPKG

@api-buddy/types

Version:

Shared types for API Buddy

855 lines (847 loc) 28.7 kB
'use strict'; var zod = require('zod'); var events = require('events'); var uuid = require('uuid'); var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : Symbol.for("Symbol." + name); var __typeError = (msg) => { throw TypeError(msg); }; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); var __decoratorStart = (base) => [, , , __create(null)]; var __decoratorStrings = ["class", "method", "getter", "setter", "accessor", "field", "value", "get", "set"]; var __expectFn = (fn) => fn !== void 0 && typeof fn !== "function" ? __typeError("Function expected") : fn; var __decoratorContext = (kind, name, done, metadata, fns) => ({ kind: __decoratorStrings[kind], name, metadata, addInitializer: (fn) => done._ ? __typeError("Already initialized") : fns.push(__expectFn(fn || null)) }); var __decoratorMetadata = (array, target) => __defNormalProp(target, __knownSymbol("metadata"), array[3]); var __runInitializers = (array, flags, self, value) => { for (var i = 0, fns = array[flags >> 1], n = fns && fns.length; i < n; i++) fns[i].call(self) ; return value; }; var __decorateElement = (array, flags, name, decorators, target, extra) => { var it, done, ctx, k = flags & 7, p = false; var j = 0; var extraInitializers = array[j] || (array[j] = []); var desc = k && ((target = target.prototype), k < 5 && (k > 3 || !p) && __getOwnPropDesc(target , name)); __name(target, name); for (var i = decorators.length - 1; i >= 0; i--) { ctx = __decoratorContext(k, name, done = {}, array[3], extraInitializers); it = (0, decorators[i])(target, ctx), done._ = 1; __expectFn(it) && (target = it); } return __decoratorMetadata(array, target), desc && __defProp(target, name, desc), p ? k ^ 4 ? extra : desc : target; }; var fieldTypeSchema = zod.z.enum([ "String", "Number", "Boolean", "Date", "JSON", "ID", "Relation" ]); var userProfileSchema = zod.z.object({ id: zod.z.string(), email: zod.z.string().email().optional(), emailVerified: zod.z.boolean().optional(), name: zod.z.string().optional(), avatar: zod.z.string().url().optional() // Allow additional properties }).passthrough(); var authSessionSchema = zod.z.object({ user: userProfileSchema, accessToken: zod.z.string(), refreshToken: zod.z.string().optional(), expiresAt: zod.z.date().or(zod.z.string().datetime()).optional() }); var emailPasswordCredentialsSchema = zod.z.object({ email: zod.z.string().email(), password: zod.z.string().min(6) }); var socialProviderConfigSchema = zod.z.object({ clientId: zod.z.string().min(1, "Client ID is required"), clientSecret: zod.z.string().optional(), scopes: zod.z.array(zod.z.string()).default([]), redirectUri: zod.z.string().url("Invalid redirect URI").optional(), params: zod.z.record(zod.z.string()).optional() }); function isUserProfile(value) { try { userProfileSchema.parse(value); return true; } catch { return false; } } function isAuthSession(value) { try { authSessionSchema.parse(value); return true; } catch { return false; } } function isEmailPasswordCredentials(value) { try { emailPasswordCredentialsSchema.parse(value); return true; } catch { return false; } } var operatorSchema = zod.z.union([ zod.z.literal("=="), zod.z.literal("!="), zod.z.literal("<"), zod.z.literal("<="), zod.z.literal(">"), zod.z.literal(">="), zod.z.literal("in"), zod.z.literal("not-in"), zod.z.literal("array-contains"), zod.z.literal("array-contains-any") ]); var queryFilterSchema = zod.z.object({ field: zod.z.string().min(1, "Field name is required"), operator: operatorSchema, value: zod.z.any() }); var databaseQueryOptionsSchema = zod.z.object({ where: zod.z.array(queryFilterSchema).optional(), orderBy: zod.z.tuple([zod.z.string(), zod.z.enum(["asc", "desc"])]).optional(), limit: zod.z.number().int().positive().optional(), startAfter: zod.z.any().optional(), endBefore: zod.z.any().optional(), select: zod.z.array(zod.z.any()).optional(), offset: zod.z.number().int().nonnegative().optional() }).strict(); var transactionOptionsSchema = zod.z.object({ maxAttempts: zod.z.number().int().positive().optional(), readOnly: zod.z.boolean().optional(), timeout: zod.z.number().int().positive().optional() }).strict(); var fileMetadataSchema = zod.z.object({ /** Name of the file */ name: zod.z.string().min(1, "File name is required"), /** Size of the file in bytes */ size: zod.z.number().int().nonnegative("File size must be a non-negative number"), /** MIME type of the file */ type: zod.z.string().min(1, "File type is required"), /** Last modified timestamp */ lastModified: zod.z.number().int().positive().optional(), /** Custom metadata key-value pairs */ customMetadata: zod.z.record(zod.z.string()).optional() }).strict(); var storedFileSchema = fileMetadataSchema.extend({ path: zod.z.string().min(1, "File path is required"), url: zod.z.string().url("Invalid URL"), createdAt: zod.z.date(), updatedAt: zod.z.date() }).strict(); var uploadOptionsSchema = zod.z.object({ public: zod.z.boolean().default(false), metadata: fileMetadataSchema.omit({ name: true, size: true, type: true }).optional(), contentType: zod.z.string().optional(), cacheControl: zod.z.string().optional(), contentEncoding: zod.z.string().optional(), contentDisposition: zod.z.string().optional() }).strict(); var downloadOptionsSchema = zod.z.object({ temporary: zod.z.boolean().default(false), expiresIn: zod.z.number().int().positive().optional(), responseContentType: zod.z.string().optional(), responseContentDisposition: zod.z.string().optional() }).strict(); var listOptionsSchema = zod.z.object({ maxResults: zod.z.number().int().positive().optional(), pageToken: zod.z.string().optional(), includeMetadata: zod.z.boolean().default(false) }).strict(); var listResultSchema = zod.z.object({ items: zod.z.array(zod.z.union([zod.z.string(), storedFileSchema])), nextPageToken: zod.z.string().optional(), hasMore: zod.z.boolean() }).strict(); // src/adapters/base.ts var AdapterEventType = /* @__PURE__ */ ((AdapterEventType2) => { AdapterEventType2["INITIALIZED"] = "initialized"; AdapterEventType2["DESTROYED"] = "destroyed"; AdapterEventType2["ERROR"] = "error"; AdapterEventType2["CONFIG_UPDATED"] = "config_updated"; AdapterEventType2["STATE_CHANGED"] = "state_changed"; AdapterEventType2["DATA_CHANGED"] = "data_changed"; AdapterEventType2["AUTH_STATE_CHANGED"] = "auth_state_changed"; AdapterEventType2["ID_TOKEN_CHANGED"] = "id_token_changed"; return AdapterEventType2; })(AdapterEventType || {}); // src/adapters/types.ts var AdapterType = /* @__PURE__ */ ((AdapterType3) => { AdapterType3["AUTH"] = "auth"; AdapterType3["DATABASE"] = "database"; AdapterType3["STORAGE"] = "storage"; AdapterType3["PAYMENT"] = "payment"; return AdapterType3; })(AdapterType || {}); var BaseAuthAdapter = class { constructor(options) { //@ts-ignore this.type = "auth"; this.state = { user: null, isInitialized: false }; this.providers = {}; this.listeners = /* @__PURE__ */ new Map(); this.wrappedListeners = /* @__PURE__ */ new WeakMap(); /** * Internal initialization state */ this._isInitialized = false; /** * The current user, if any */ this.currentUser = null; /** * The current authentication session, if any */ this.currentSession = null; var _a; this.id = options.id || `auth-${uuid.v4()}`; this.eventEmitter = new events.EventEmitter(); this.eventEmitter.setMaxListeners(100); const customEmitter = this.eventEmitter; const originalEmit = this.eventEmitter.emit.bind(this.eventEmitter); const originalOn = this.eventEmitter.on.bind(this.eventEmitter); const originalOff = ((_a = this.eventEmitter.off) == null ? void 0 : _a.bind(this.eventEmitter)) || ((event, listener) => { this.eventEmitter.removeListener(event, listener); return this; }); customEmitter.emit = (event, ...args) => { if (typeof event === "string" && Object.values(AdapterEventType).includes(event)) { const eventType = event; const listeners = this.listeners.get(eventType); if (listeners) { const eventPayload = args[0] || {}; const eventData = { ...eventPayload, adapter: this, type: eventType, timestamp: /* @__PURE__ */ new Date() }; for (const listener of listeners) { try { listener(eventData); } catch (error) { console.error(`Error in ${event} listener:`, error); } } } } return originalEmit(event, ...args); }; customEmitter.on = (event, listener) => { var _a2; if (typeof event === "string" && Object.values(AdapterEventType).includes(event)) { const eventType = event; if (!this.listeners.has(eventType)) { this.listeners.set(eventType, /* @__PURE__ */ new Set()); } const wrappedListener = (e) => { const eventWithTimestamp = { ...e, adapter: this, type: eventType, timestamp: /* @__PURE__ */ new Date() }; listener(eventWithTimestamp); }; (_a2 = this.listeners.get(eventType)) == null ? void 0 : _a2.add(wrappedListener); this.wrappedListeners.set(listener, wrappedListener); return originalOn(event, wrappedListener); } return originalOn(event, listener); }; customEmitter.off = (event, listener) => { var _a2; if (typeof event === "string" && Object.values(AdapterEventType).includes(event)) { const eventType = event; const wrappedListener = this.wrappedListeners.get(listener); if (wrappedListener) { (_a2 = this.listeners.get(eventType)) == null ? void 0 : _a2.delete(wrappedListener); this.wrappedListeners.delete(listener); return originalOff(event, wrappedListener); } } return originalOff(event, listener); }; } /** * Whether the adapter has been initialized */ isInitialized() { return this.state.isInitialized; } // ========================================== // Event Emitter Implementation // ========================================== // Implement on/off methods to satisfy AuthAdapter interface // These methods use the custom event emitter we set up in the constructor on(event, listener) { var _a; if (typeof event === "string" && Object.values(AdapterEventType).includes(event)) { const eventType = event; if (!this.listeners.has(eventType)) { this.listeners.set(eventType, /* @__PURE__ */ new Set()); } const wrappedListener = (e) => { const eventWithTimestamp = { ...e, adapter: this, type: eventType, timestamp: Date.now() }; listener(eventWithTimestamp); }; (_a = this.listeners.get(eventType)) == null ? void 0 : _a.add(wrappedListener); this.wrappedListeners.set(listener, wrappedListener); this.eventEmitter.on(eventType, wrappedListener); } else { this.eventEmitter.on(event, listener); } } off(event, listener) { var _a; if (typeof event === "string" && Object.values(AdapterEventType).includes(event)) { const eventType = event; const wrappedListener = this.wrappedListeners.get(listener); if (wrappedListener) { (_a = this.listeners.get(eventType)) == null ? void 0 : _a.delete(wrappedListener); this.wrappedListeners.delete(listener); this.eventEmitter.off(eventType, wrappedListener); } } else { this.eventEmitter.off(event, listener); } } emit(event) { const eventType = event.type; const eventPayload = { ...event, adapter: this, timestamp: event.timestamp || /* @__PURE__ */ new Date() }; if (this.listeners.has(eventType)) { const listeners = this.listeners.get(eventType); for (const listener of listeners) { try { listener(eventPayload); } catch (error) { console.error(`Error in ${eventType} listener:`, error); } } } const eventName = eventType; return this.eventEmitter.emit(eventName, eventPayload); } /** * Helper method to emit events with proper typing */ emitEvent(type, data, error) { const event = { type, adapter: this, data, timestamp: /* @__PURE__ */ new Date(), error }; const eventName = type; this.eventEmitter.emit(eventName, event); if (this.listeners.has(type)) { const listeners = this.listeners.get(type); for (const listener of listeners) { try { listener(event); } catch (err) { console.error(`Error in ${type} listener:`, err); } } } } removeAllListeners(event) { var _a; if (event) { (_a = this.listeners.get(event)) == null ? void 0 : _a.clear(); this.eventEmitter.removeAllListeners(event); } else { this.listeners.clear(); this.eventEmitter.removeAllListeners(); } return this; } getProviderId() { return Promise.resolve(this.id); } getTenantId() { return Promise.resolve(null); } // Additional AuthAdapter methods with default implementations async deleteAccount() { throw new Error("deleteAccount not implemented"); } async refreshToken(_forceRefresh = false) { throw new Error("refreshToken not implemented"); } async getIdToken(_forceRefresh = false) { throw new Error("getIdToken not implemented"); } async getIdTokenResult(_forceRefresh = false) { throw new Error("getIdTokenResult not implemented"); } async getRefreshToken() { throw new Error("getRefreshToken not implemented"); } onAuthStateChanged(_callback) { throw new Error("onAuthStateChanged not implemented"); } onIdTokenChanged(_callback) { throw new Error("onIdTokenChanged not implemented"); } async getCurrentUser() { throw new Error("getCurrentUser not implemented"); } async isEmailVerified() { throw new Error("isEmailVerified not implemented"); } async isAnonymous() { throw new Error("isAnonymous not implemented"); } async linkWithCredential(_credential) { throw new Error("linkWithCredential not implemented"); } async unlink(_providerId) { throw new Error("unlink not implemented"); } async reauthenticate(_credential) { throw new Error("reauthenticate not implemented"); } /** * Helper method to emit auth state change events */ // Helper method to emit auth state change events emitAuthStateChanged(user) { this.emitEvent("auth_state_changed" /* AUTH_STATE_CHANGED */, { user }); } emitTokenRefreshed(token) { this.emitEvent("id_token_changed" /* ID_TOKEN_CHANGED */, { token }); } /** * Ensure the adapter is initialized * @throws {Error} If the adapter is not initialized */ ensureInitialized() { if (!this._isInitialized) { throw new Error(`Auth adapter ${this.id} is not initialized`); } } }; // src/adapters/core/registry.ts function hasEventEmitterMethods(obj) { return obj && typeof obj.on === "function" && typeof obj.off === "function" && typeof obj.emit === "function"; } var RegistryEventTypes = { // Adapter registration events REGISTERED: "registered", UNREGISTERED: "unregistered", CLEARED: "cleared", // Adapter instance events CREATED: "created", INITIALIZING: "initializing", // Error event (redefined here to avoid circular dependency) ERROR: "error" }; function singleton(target, _context) { let instance = null; return class extends target { constructor(...args) { if (!instance) { super(...args); instance = this; } return instance; } }; } var _AdapterRegistry_decorators, _init; _AdapterRegistry_decorators = [singleton]; exports.AdapterRegistry = class AdapterRegistry { constructor(options = {}) { this.registry = /* @__PURE__ */ new Map(); this.instances = /* @__PURE__ */ new Map(); this.options = void 0; this.eventListeners = /* @__PURE__ */ new Map(); this.options = { autoInit: true, throwOnError: true, logger: console, ...options }; } /** * Generate a unique key for an adapter registration or instance */ getRegistrationKey(id, type) { return `${type}:${id}`; } /** * Remove an event listener */ off(event, listener) { var _a; (_a = this.eventListeners.get(event)) == null ? void 0 : _a.delete(listener); } /** * Emit an event to all listeners */ emit(event) { const listeners = this.eventListeners.get(event.type); if (listeners) { for (const listener of listeners) { try { listener(event); } catch (error) { this.options.logger.error(`Error in ${event.type} event listener:`, error); } } } } /** * Emit an error event */ emitError(type, error, data = {}) { const event = { type: RegistryEventTypes.ERROR, timestamp: Date.now(), error, data: { ...data, originalEventType: type }, adapter: null }; this.emit(event); if (this.options.throwOnError) { throw error; } } /** * Register a new adapter factory */ register(registration) { const key = this.getRegistrationKey(registration.id, registration.type); if (this.registry.has(key)) { const error = new Error(`Adapter with id '${registration.id}' and type '${registration.type}' is already registered`); this.emitError(RegistryEventTypes.REGISTERED, error, { id: registration.id, type: registration.type }); throw error; } this.registry.set(key, registration); const event = { type: RegistryEventTypes.REGISTERED, timestamp: Date.now(), data: { id: registration.id, type: registration.type } }; this.emit(event); } /** * Create and initialize an adapter instance */ async createAdapter(id, type, config = {}, options) { const key = this.getRegistrationKey(id, type); const registration = this.registry.get(key); if (!registration) { const error = new Error(`No adapter registered for type: ${type} and id: ${id}`); this.emitError(RegistryEventTypes.ERROR, error, { id, type }); throw error; } try { const adapterOptions = { ...this.options, ...options || {} }; const adapter = await registration.factory.create({ id, type, config, options: adapterOptions }); if (registration.singleton !== false) { this.instances.set(`${type}:${id}`, adapter); } const eventEmitter = adapter; if (hasEventEmitterMethods(eventEmitter)) { Object.values(AdapterEventType).forEach((eventType) => { eventEmitter.on(eventType, (event2) => { this.emit({ ...event2, timestamp: Date.now(), type: eventType, adapter }); }); }); } const event = { type: RegistryEventTypes.CREATED, timestamp: Date.now(), data: { id, type }, adapter }; this.emit(event); return adapter; } catch (error) { this.emitError(RegistryEventTypes.ERROR, error, { id, type }); throw error; } } /** * Get or create an adapter instance */ async getAdapter(id, type, config, options) { const key = this.getRegistrationKey(id, type); if (this.instances.has(key)) { return this.instances.get(key); } return this.createAdapter(id, type, config, options); } /** * Get all registered adapters of a specific type */ getRegisteredAdapters(type) { const registrations = Array.from(this.registry.values()); return type ? registrations.filter((reg) => reg.type === type) : registrations; } /** * Initialize an adapter with the given config */ async initializeAdapter(adapter, config) { try { const initializingEvent = { type: RegistryEventTypes.INITIALIZING, timestamp: Date.now(), data: { id: adapter.id, type: adapter.type }, adapter }; this.emit(initializingEvent); await adapter.init(config); } catch (error) { this.emitError(RegistryEventTypes.ERROR, error, { id: adapter.id, type: adapter.type, phase: "initialization" }); throw error; } } /** * Remove an adapter registration and clean up its instance */ async unregister(id, type) { const key = this.getRegistrationKey(id, type); const registration = this.registry.get(key); if (!registration) { return false; } if (this.instances.has(key)) { const instance = this.instances.get(key); try { await instance.destroy(); } catch (error) { this.emitError(RegistryEventTypes.ERROR, error, { id, type, phase: "destruction" }); } this.instances.delete(key); } this.registry.delete(key); const event = { type: RegistryEventTypes.UNREGISTERED, timestamp: Date.now(), data: { id, type } }; this.emit(event); return true; } /** * Clear all adapter registrations and instances */ async clear() { await Promise.all( Array.from(this.instances.keys()).map(async (key) => { const [id, type] = key.split("::"); await this.unregister(id, type); }) ); this.registry.clear(); const event = { type: RegistryEventTypes.CLEARED, timestamp: Date.now(), data: {} }; this.emit(event); } /** * Event handling */ on(event, listener) { if (!this.eventListeners.has(event)) { this.eventListeners.set(event, /* @__PURE__ */ new Set()); } this.eventListeners.get(event).add(listener); } // Removed duplicate implementations of emitError and getRegistrationKey }; _init = __decoratorStart(); exports.AdapterRegistry = __decorateElement(_init, 0, "AdapterRegistry", _AdapterRegistry_decorators, exports.AdapterRegistry); __runInitializers(_init, 1, exports.AdapterRegistry); var adapterRegistry = new exports.AdapterRegistry(); var baseAdapterConfigSchema = zod.z.object({ id: zod.z.string().min(1, "Adapter ID is required"), type: zod.z.nativeEnum(AdapterType, { required_error: "Adapter type is required", invalid_type_error: "Invalid adapter type" }), enabled: zod.z.boolean().default(true), debug: zod.z.boolean().default(false) }); var authConfigSchema = baseAdapterConfigSchema.extend({ type: zod.z.literal("auth" /* AUTH */), secret: zod.z.string().min(32, "Secret must be at least 32 characters"), session: zod.z.object({ maxAge: zod.z.number().int().positive().default(30 * 24 * 60 * 60), // 30 days updateAge: zod.z.number().int().positive().default(24 * 60 * 60) // 24 hours }).optional() }); var databaseConfigSchema = baseAdapterConfigSchema.extend({ type: zod.z.literal("database" /* DATABASE */), url: zod.z.string().url("Invalid database URL"), ssl: zod.z.boolean().default(false), pool: zod.z.object({ min: zod.z.number().int().nonnegative().default(2), max: zod.z.number().int().positive().default(10) }).optional() }); var storageConfigSchema = baseAdapterConfigSchema.extend({ type: zod.z.literal("storage" /* STORAGE */), bucket: zod.z.string().min(1, "Bucket name is required"), region: zod.z.string().optional(), endpoint: zod.z.string().url().optional() }); var adapterConfigSchema = zod.z.discriminatedUnion("type", [ authConfigSchema, databaseConfigSchema, storageConfigSchema ]); function isAuthConfig(config) { return authConfigSchema.safeParse(config).success; } function isDatabaseConfig(config) { return databaseConfigSchema.safeParse(config).success; } function isStorageConfig(config) { return storageConfigSchema.safeParse(config).success; } function validateConfig(schema, config) { return schema.parse(config); } // src/guards.ts function isAuthAdapter(adapter) { return typeof adapter === "object" && adapter !== null && "type" in adapter && adapter.type === "auth" /* AUTH */ && typeof adapter.signIn === "function" && typeof adapter.signOut === "function"; } function isDatabaseAdapter(adapter) { return typeof adapter === "object" && adapter !== null && "type" in adapter && adapter.type === "database" /* DATABASE */ && typeof adapter.find === "function" && typeof adapter.transaction === "function"; } function isStorageAdapter(adapter) { return typeof adapter === "object" && adapter !== null && "type" in adapter && adapter.type === "storage" /* STORAGE */ && typeof adapter.upload === "function" && typeof adapter.getDownloadUrl === "function"; } function isBaseAdapter(adapter) { return typeof adapter === "object" && adapter !== null && "id" in adapter && "type" in adapter && "init" in adapter && "destroy" in adapter && "isInitialized" in adapter; } // src/errors/index.ts var BuddyError = class extends Error { constructor(message, code, details) { super(message); this.code = code; this.details = details; this.name = "BuddyError"; } }; var DatabaseError = class extends BuddyError { constructor(message, code, details) { super(message, `database/${code}`, details); this.name = "DatabaseError"; } }; var APIError = class extends Error { constructor(code, message, status = 500, details) { super(message); this.code = code; this.status = status; this.details = details; this.name = "APIError"; } }; var AuthError = class extends APIError { constructor(message, code = "AUTH_ERROR", status = 401) { super(code, message, status); this.name = "AuthError"; } }; var ValidationError = class extends APIError { constructor(message, fields) { super("VALIDATION_ERROR", message, 400); this.fields = fields; this.name = "ValidationError"; } }; Object.defineProperty(exports, "z", { enumerable: true, get: function () { return zod.z; } }); exports.APIError = APIError; exports.AdapterEventType = AdapterEventType; exports.AdapterType = AdapterType; exports.AuthError = AuthError; exports.BaseAuthAdapter = BaseAuthAdapter; exports.BuddyError = BuddyError; exports.DatabaseError = DatabaseError; exports.RegistryEventTypes = RegistryEventTypes; exports.ValidationError = ValidationError; exports.adapterConfigSchema = adapterConfigSchema; exports.adapterRegistry = adapterRegistry; exports.authConfigSchema = authConfigSchema; exports.authSessionSchema = authSessionSchema; exports.baseAdapterConfigSchema = baseAdapterConfigSchema; exports.databaseConfigSchema = databaseConfigSchema; exports.databaseQueryOptionsSchema = databaseQueryOptionsSchema; exports.downloadOptionsSchema = downloadOptionsSchema; exports.emailPasswordCredentialsSchema = emailPasswordCredentialsSchema; exports.fieldTypeSchema = fieldTypeSchema; exports.fileMetadataSchema = fileMetadataSchema; exports.isAuthAdapter = isAuthAdapter; exports.isAuthConfig = isAuthConfig; exports.isAuthSession = isAuthSession; exports.isBaseAdapter = isBaseAdapter; exports.isDatabaseAdapter = isDatabaseAdapter; exports.isDatabaseConfig = isDatabaseConfig; exports.isEmailPasswordCredentials = isEmailPasswordCredentials; exports.isStorageAdapter = isStorageAdapter; exports.isStorageConfig = isStorageConfig; exports.isUserProfile = isUserProfile; exports.listOptionsSchema = listOptionsSchema; exports.listResultSchema = listResultSchema; exports.operatorSchema = operatorSchema; exports.queryFilterSchema = queryFilterSchema; exports.socialProviderConfigSchema = socialProviderConfigSchema; exports.storageConfigSchema = storageConfigSchema; exports.storedFileSchema = storedFileSchema; exports.transactionOptionsSchema = transactionOptionsSchema; exports.uploadOptionsSchema = uploadOptionsSchema; exports.userProfileSchema = userProfileSchema; exports.validateConfig = validateConfig; //# sourceMappingURL=index.cjs.map //# sourceMappingURL=index.cjs.map