"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createMutationOperations = exports.createQueryOperations = exports.QueryBuilder = exports.FetchAdapter = exports.GraphQLRequestError = void 0;
exports.createClient = createClient;
/**
 * ORM Client - createClient factory
 * @generated by @constructive-io/graphql-codegen
 * DO NOT EDIT - changes will be overwritten
 */
const client_1 = require("./client");
const defaultIdsModule_1 = require("./models/defaultIdsModule");
const membershipTypesModule_1 = require("./models/membershipTypesModule");
const userStateModule_1 = require("./models/userStateModule");
const sessionSecretsModule_1 = require("./models/sessionSecretsModule");
const configSecretsOrgModule_1 = require("./models/configSecretsOrgModule");
const devicesModule_1 = require("./models/devicesModule");
const i18NModule_1 = require("./models/i18NModule");
const userCredentialsModule_1 = require("./models/userCredentialsModule");
const userSettingsModule_1 = require("./models/userSettingsModule");
const configSecretsUserModule_1 = require("./models/configSecretsUserModule");
const connectedAccountsModule_1 = require("./models/connectedAccountsModule");
const emailsModule_1 = require("./models/emailsModule");
const phoneNumbersModule_1 = require("./models/phoneNumbersModule");
const rateLimitsModule_1 = require("./models/rateLimitsModule");
const usersModule_1 = require("./models/usersModule");
const webauthnCredentialsModule_1 = require("./models/webauthnCredentialsModule");
const cryptoAddressesModule_1 = require("./models/cryptoAddressesModule");
const denormalizedTableField_1 = require("./models/denormalizedTableField");
const identityProvidersModule_1 = require("./models/identityProvidersModule");
const rlsModule_1 = require("./models/rlsModule");
const blueprint_1 = require("./models/blueprint");
const blueprintTemplate_1 = require("./models/blueprintTemplate");
const blueprintConstruction_1 = require("./models/blueprintConstruction");
const cryptoAuthModule_1 = require("./models/cryptoAuthModule");
const sessionsModule_1 = require("./models/sessionsModule");
const secureTableProvision_1 = require("./models/secureTableProvision");
const merkleStoreModule_1 = require("./models/merkleStoreModule");
const graphModule_1 = require("./models/graphModule");
const databaseProvisionModule_1 = require("./models/databaseProvisionModule");
const configSecretsModule_1 = require("./models/configSecretsModule");
const rateLimitMetersModule_1 = require("./models/rateLimitMetersModule");
const realtimeModule_1 = require("./models/realtimeModule");
const webauthnAuthModule_1 = require("./models/webauthnAuthModule");
const functionInvocationModule_1 = require("./models/functionInvocationModule");
const functionModule_1 = require("./models/functionModule");
const invitesModule_1 = require("./models/invitesModule");
const namespaceModule_1 = require("./models/namespaceModule");
const computeLogModule_1 = require("./models/computeLogModule");
const inferenceLogModule_1 = require("./models/inferenceLogModule");
const storageLogModule_1 = require("./models/storageLogModule");
const transferLogModule_1 = require("./models/transferLogModule");
const plansModule_1 = require("./models/plansModule");
const billingProviderModule_1 = require("./models/billingProviderModule");
const dbUsageModule_1 = require("./models/dbUsageModule");
const hierarchyModule_1 = require("./models/hierarchyModule");
const permissionsModule_1 = require("./models/permissionsModule");
const notificationsModule_1 = require("./models/notificationsModule");
const profilesModule_1 = require("./models/profilesModule");
const billingModule_1 = require("./models/billingModule");
const relationProvision_1 = require("./models/relationProvision");
const userAuthModule_1 = require("./models/userAuthModule");
const agentModule_1 = require("./models/agentModule");
const limitsModule_1 = require("./models/limitsModule");
const membershipsModule_1 = require("./models/membershipsModule");
const entityTypeProvision_1 = require("./models/entityTypeProvision");
const storageModule_1 = require("./models/storageModule");
const eventsModule_1 = require("./models/eventsModule");
const query_1 = require("./query");
const mutation_1 = require("./mutation");
var client_2 = require("./client");
Object.defineProperty(exports, "GraphQLRequestError", { enumerable: true, get: function () { return client_2.GraphQLRequestError; } });
Object.defineProperty(exports, "FetchAdapter", { enumerable: true, get: function () { return client_2.FetchAdapter; } });
var query_builder_1 = require("./query-builder");
Object.defineProperty(exports, "QueryBuilder", { enumerable: true, get: function () { return query_builder_1.QueryBuilder; } });
__exportStar(require("./select-types"), exports);
__exportStar(require("./models"), exports);
var query_2 = require("./query");
Object.defineProperty(exports, "createQueryOperations", { enumerable: true, get: function () { return query_2.createQueryOperations; } });
var mutation_2 = require("./mutation");
Object.defineProperty(exports, "createMutationOperations", { enumerable: true, get: function () { return mutation_2.createMutationOperations; } });
/**
 * Create an ORM client instance
 *
 * @example
 * ```typescript
 * const db = createClient({
 *   endpoint: 'https://api.example.com/graphql',
 *   headers: { Authorization: 'Bearer token' },
 * });
 *
 * // Query users
 * const users = await db.user.findMany({
 *   select: { id: true, name: true },
 *   first: 10,
 * }).execute();
 *
 * // Create a user
 * const newUser = await db.user.create({
 *   data: { name: 'John', email: 'john@example.com' },
 *   select: { id: true },
 * }).execute();
 * ```
 */
function createClient(config) {
    const client = new client_1.OrmClient(config);
    return {
        defaultIdsModule: new defaultIdsModule_1.DefaultIdsModuleModel(client),
        membershipTypesModule: new membershipTypesModule_1.MembershipTypesModuleModel(client),
        userStateModule: new userStateModule_1.UserStateModuleModel(client),
        sessionSecretsModule: new sessionSecretsModule_1.SessionSecretsModuleModel(client),
        configSecretsOrgModule: new configSecretsOrgModule_1.ConfigSecretsOrgModuleModel(client),
        devicesModule: new devicesModule_1.DevicesModuleModel(client),
        i18NModule: new i18NModule_1.I18NModuleModel(client),
        userCredentialsModule: new userCredentialsModule_1.UserCredentialsModuleModel(client),
        userSettingsModule: new userSettingsModule_1.UserSettingsModuleModel(client),
        configSecretsUserModule: new configSecretsUserModule_1.ConfigSecretsUserModuleModel(client),
        connectedAccountsModule: new connectedAccountsModule_1.ConnectedAccountsModuleModel(client),
        emailsModule: new emailsModule_1.EmailsModuleModel(client),
        phoneNumbersModule: new phoneNumbersModule_1.PhoneNumbersModuleModel(client),
        rateLimitsModule: new rateLimitsModule_1.RateLimitsModuleModel(client),
        usersModule: new usersModule_1.UsersModuleModel(client),
        webauthnCredentialsModule: new webauthnCredentialsModule_1.WebauthnCredentialsModuleModel(client),
        cryptoAddressesModule: new cryptoAddressesModule_1.CryptoAddressesModuleModel(client),
        denormalizedTableField: new denormalizedTableField_1.DenormalizedTableFieldModel(client),
        identityProvidersModule: new identityProvidersModule_1.IdentityProvidersModuleModel(client),
        rlsModule: new rlsModule_1.RlsModuleModel(client),
        blueprint: new blueprint_1.BlueprintModel(client),
        blueprintTemplate: new blueprintTemplate_1.BlueprintTemplateModel(client),
        blueprintConstruction: new blueprintConstruction_1.BlueprintConstructionModel(client),
        cryptoAuthModule: new cryptoAuthModule_1.CryptoAuthModuleModel(client),
        sessionsModule: new sessionsModule_1.SessionsModuleModel(client),
        secureTableProvision: new secureTableProvision_1.SecureTableProvisionModel(client),
        merkleStoreModule: new merkleStoreModule_1.MerkleStoreModuleModel(client),
        graphModule: new graphModule_1.GraphModuleModel(client),
        databaseProvisionModule: new databaseProvisionModule_1.DatabaseProvisionModuleModel(client),
        configSecretsModule: new configSecretsModule_1.ConfigSecretsModuleModel(client),
        rateLimitMetersModule: new rateLimitMetersModule_1.RateLimitMetersModuleModel(client),
        realtimeModule: new realtimeModule_1.RealtimeModuleModel(client),
        webauthnAuthModule: new webauthnAuthModule_1.WebauthnAuthModuleModel(client),
        functionInvocationModule: new functionInvocationModule_1.FunctionInvocationModuleModel(client),
        functionModule: new functionModule_1.FunctionModuleModel(client),
        invitesModule: new invitesModule_1.InvitesModuleModel(client),
        namespaceModule: new namespaceModule_1.NamespaceModuleModel(client),
        computeLogModule: new computeLogModule_1.ComputeLogModuleModel(client),
        inferenceLogModule: new inferenceLogModule_1.InferenceLogModuleModel(client),
        storageLogModule: new storageLogModule_1.StorageLogModuleModel(client),
        transferLogModule: new transferLogModule_1.TransferLogModuleModel(client),
        plansModule: new plansModule_1.PlansModuleModel(client),
        billingProviderModule: new billingProviderModule_1.BillingProviderModuleModel(client),
        dbUsageModule: new dbUsageModule_1.DbUsageModuleModel(client),
        hierarchyModule: new hierarchyModule_1.HierarchyModuleModel(client),
        permissionsModule: new permissionsModule_1.PermissionsModuleModel(client),
        notificationsModule: new notificationsModule_1.NotificationsModuleModel(client),
        profilesModule: new profilesModule_1.ProfilesModuleModel(client),
        billingModule: new billingModule_1.BillingModuleModel(client),
        relationProvision: new relationProvision_1.RelationProvisionModel(client),
        userAuthModule: new userAuthModule_1.UserAuthModuleModel(client),
        agentModule: new agentModule_1.AgentModuleModel(client),
        limitsModule: new limitsModule_1.LimitsModuleModel(client),
        membershipsModule: new membershipsModule_1.MembershipsModuleModel(client),
        entityTypeProvision: new entityTypeProvision_1.EntityTypeProvisionModel(client),
        storageModule: new storageModule_1.StorageModuleModel(client),
        eventsModule: new eventsModule_1.EventsModuleModel(client),
        query: (0, query_1.createQueryOperations)(client),
        mutation: (0, mutation_1.createMutationOperations)(client),
    };
}
