"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 orgGetManagersRecord_1 = require("./models/orgGetManagersRecord");
const orgGetSubordinatesRecord_1 = require("./models/orgGetSubordinatesRecord");
const appPermission_1 = require("./models/appPermission");
const orgPermission_1 = require("./models/orgPermission");
const database_1 = require("./models/database");
const schema_1 = require("./models/schema");
const table_1 = require("./models/table");
const checkConstraint_1 = require("./models/checkConstraint");
const field_1 = require("./models/field");
const spatialRelation_1 = require("./models/spatialRelation");
const foreignKeyConstraint_1 = require("./models/foreignKeyConstraint");
const fullTextSearch_1 = require("./models/fullTextSearch");
const index_1 = require("./models/index");
const policy_1 = require("./models/policy");
const primaryKeyConstraint_1 = require("./models/primaryKeyConstraint");
const tableGrant_1 = require("./models/tableGrant");
const trigger_1 = require("./models/trigger");
const uniqueConstraint_1 = require("./models/uniqueConstraint");
const view_1 = require("./models/view");
const viewTable_1 = require("./models/viewTable");
const viewGrant_1 = require("./models/viewGrant");
const viewRule_1 = require("./models/viewRule");
const embeddingChunk_1 = require("./models/embeddingChunk");
const secureTableProvision_1 = require("./models/secureTableProvision");
const relationProvision_1 = require("./models/relationProvision");
const sessionSecretsModule_1 = require("./models/sessionSecretsModule");
const identityProvidersModule_1 = require("./models/identityProvidersModule");
const realtimeModule_1 = require("./models/realtimeModule");
const configSecretsOrgModule_1 = require("./models/configSecretsOrgModule");
const schemaGrant_1 = require("./models/schemaGrant");
const defaultPrivilege_1 = require("./models/defaultPrivilege");
const enum_1 = require("./models/enum");
const function_1 = require("./models/function");
const apiSchema_1 = require("./models/apiSchema");
const apiModule_1 = require("./models/apiModule");
const domain_1 = require("./models/domain");
const siteMetadatum_1 = require("./models/siteMetadatum");
const siteModule_1 = require("./models/siteModule");
const siteTheme_1 = require("./models/siteTheme");
const corsSetting_1 = require("./models/corsSetting");
const merkleStoreModule_1 = require("./models/merkleStoreModule");
const graphModule_1 = require("./models/graphModule");
const triggerFunction_1 = require("./models/triggerFunction");
const partition_1 = require("./models/partition");
const databaseTransfer_1 = require("./models/databaseTransfer");
const api_1 = require("./models/api");
const site_1 = require("./models/site");
const app_1 = require("./models/app");
const apiSetting_1 = require("./models/apiSetting");
const connectedAccountsModule_1 = require("./models/connectedAccountsModule");
const cryptoAddressesModule_1 = require("./models/cryptoAddressesModule");
const cryptoAuthModule_1 = require("./models/cryptoAuthModule");
const defaultIdsModule_1 = require("./models/defaultIdsModule");
const denormalizedTableField_1 = require("./models/denormalizedTableField");
const emailsModule_1 = require("./models/emailsModule");
const configSecretsUserModule_1 = require("./models/configSecretsUserModule");
const invitesModule_1 = require("./models/invitesModule");
const eventsModule_1 = require("./models/eventsModule");
const limitsModule_1 = require("./models/limitsModule");
const membershipTypesModule_1 = require("./models/membershipTypesModule");
const membershipsModule_1 = require("./models/membershipsModule");
const permissionsModule_1 = require("./models/permissionsModule");
const phoneNumbersModule_1 = require("./models/phoneNumbersModule");
const profilesModule_1 = require("./models/profilesModule");
const userStateModule_1 = require("./models/userStateModule");
const sessionsModule_1 = require("./models/sessionsModule");
const userAuthModule_1 = require("./models/userAuthModule");
const usersModule_1 = require("./models/usersModule");
const blueprint_1 = require("./models/blueprint");
const blueprintTemplate_1 = require("./models/blueprintTemplate");
const blueprintConstruction_1 = require("./models/blueprintConstruction");
const storageModule_1 = require("./models/storageModule");
const entityTypeProvision_1 = require("./models/entityTypeProvision");
const webauthnCredentialsModule_1 = require("./models/webauthnCredentialsModule");
const webauthnAuthModule_1 = require("./models/webauthnAuthModule");
const notificationsModule_1 = require("./models/notificationsModule");
const inferenceLogModule_1 = require("./models/inferenceLogModule");
const computeLogModule_1 = require("./models/computeLogModule");
const transferLogModule_1 = require("./models/transferLogModule");
const storageLogModule_1 = require("./models/storageLogModule");
const dbUsageModule_1 = require("./models/dbUsageModule");
const agentModule_1 = require("./models/agentModule");
const namespaceModule_1 = require("./models/namespaceModule");
const functionModule_1 = require("./models/functionModule");
const databaseProvisionModule_1 = require("./models/databaseProvisionModule");
const appAdminGrant_1 = require("./models/appAdminGrant");
const appOwnerGrant_1 = require("./models/appOwnerGrant");
const appGrant_1 = require("./models/appGrant");
const orgMembership_1 = require("./models/orgMembership");
const orgMember_1 = require("./models/orgMember");
const orgAdminGrant_1 = require("./models/orgAdminGrant");
const orgOwnerGrant_1 = require("./models/orgOwnerGrant");
const orgMemberProfile_1 = require("./models/orgMemberProfile");
const orgGrant_1 = require("./models/orgGrant");
const orgChartEdge_1 = require("./models/orgChartEdge");
const orgChartEdgeGrant_1 = require("./models/orgChartEdgeGrant");
const orgPermissionDefault_1 = require("./models/orgPermissionDefault");
const appLimit_1 = require("./models/appLimit");
const appLimitCredit_1 = require("./models/appLimitCredit");
const appLimitCreditCodeItem_1 = require("./models/appLimitCreditCodeItem");
const appLimitCreditRedemption_1 = require("./models/appLimitCreditRedemption");
const orgLimit_1 = require("./models/orgLimit");
const orgLimitCredit_1 = require("./models/orgLimitCredit");
const orgLimitAggregate_1 = require("./models/orgLimitAggregate");
const orgLimitWarning_1 = require("./models/orgLimitWarning");
const email_1 = require("./models/email");
const phoneNumber_1 = require("./models/phoneNumber");
const cryptoAddress_1 = require("./models/cryptoAddress");
const webauthnCredential_1 = require("./models/webauthnCredential");
const appInvite_1 = require("./models/appInvite");
const appClaimedInvite_1 = require("./models/appClaimedInvite");
const orgInvite_1 = require("./models/orgInvite");
const orgClaimedInvite_1 = require("./models/orgClaimedInvite");
const auditLogAuth_1 = require("./models/auditLogAuth");
const identityProvider_1 = require("./models/identityProvider");
const appPermissionDefault_1 = require("./models/appPermissionDefault");
const roleType_1 = require("./models/roleType");
const migrateFile_1 = require("./models/migrateFile");
const devicesModule_1 = require("./models/devicesModule");
const appMembershipDefault_1 = require("./models/appMembershipDefault");
const orgMembershipDefault_1 = require("./models/orgMembershipDefault");
const nodeTypeRegistry_1 = require("./models/nodeTypeRegistry");
const appLimitCapsDefault_1 = require("./models/appLimitCapsDefault");
const orgLimitCapsDefault_1 = require("./models/orgLimitCapsDefault");
const appLimitCap_1 = require("./models/appLimitCap");
const orgLimitCap_1 = require("./models/orgLimitCap");
const userConnectedAccount_1 = require("./models/userConnectedAccount");
const appLimitDefault_1 = require("./models/appLimitDefault");
const orgLimitDefault_1 = require("./models/orgLimitDefault");
const appLimitCreditCode_1 = require("./models/appLimitCreditCode");
const appLimitWarning_1 = require("./models/appLimitWarning");
const pubkeySetting_1 = require("./models/pubkeySetting");
const rateLimitsModule_1 = require("./models/rateLimitsModule");
const membershipType_1 = require("./models/membershipType");
const rlsSetting_1 = require("./models/rlsSetting");
const rlsModule_1 = require("./models/rlsModule");
const rateLimitMetersModule_1 = require("./models/rateLimitMetersModule");
const plansModule_1 = require("./models/plansModule");
const sqlAction_1 = require("./models/sqlAction");
const databaseSetting_1 = require("./models/databaseSetting");
const orgMembershipSetting_1 = require("./models/orgMembershipSetting");
const appLimitEvent_1 = require("./models/appLimitEvent");
const orgLimitEvent_1 = require("./models/orgLimitEvent");
const appMembership_1 = require("./models/appMembership");
const user_1 = require("./models/user");
const astMigration_1 = require("./models/astMigration");
const webauthnSetting_1 = require("./models/webauthnSetting");
const billingModule_1 = require("./models/billingModule");
const billingProviderModule_1 = require("./models/billingProviderModule");
const hierarchyModule_1 = require("./models/hierarchyModule");
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 {
        orgGetManagersRecord: new orgGetManagersRecord_1.OrgGetManagersRecordModel(client),
        orgGetSubordinatesRecord: new orgGetSubordinatesRecord_1.OrgGetSubordinatesRecordModel(client),
        appPermission: new appPermission_1.AppPermissionModel(client),
        orgPermission: new orgPermission_1.OrgPermissionModel(client),
        database: new database_1.DatabaseModel(client),
        schema: new schema_1.SchemaModel(client),
        table: new table_1.TableModel(client),
        checkConstraint: new checkConstraint_1.CheckConstraintModel(client),
        field: new field_1.FieldModel(client),
        spatialRelation: new spatialRelation_1.SpatialRelationModel(client),
        foreignKeyConstraint: new foreignKeyConstraint_1.ForeignKeyConstraintModel(client),
        fullTextSearch: new fullTextSearch_1.FullTextSearchModel(client),
        index: new index_1.IndexModel(client),
        policy: new policy_1.PolicyModel(client),
        primaryKeyConstraint: new primaryKeyConstraint_1.PrimaryKeyConstraintModel(client),
        tableGrant: new tableGrant_1.TableGrantModel(client),
        trigger: new trigger_1.TriggerModel(client),
        uniqueConstraint: new uniqueConstraint_1.UniqueConstraintModel(client),
        view: new view_1.ViewModel(client),
        viewTable: new viewTable_1.ViewTableModel(client),
        viewGrant: new viewGrant_1.ViewGrantModel(client),
        viewRule: new viewRule_1.ViewRuleModel(client),
        embeddingChunk: new embeddingChunk_1.EmbeddingChunkModel(client),
        secureTableProvision: new secureTableProvision_1.SecureTableProvisionModel(client),
        relationProvision: new relationProvision_1.RelationProvisionModel(client),
        sessionSecretsModule: new sessionSecretsModule_1.SessionSecretsModuleModel(client),
        identityProvidersModule: new identityProvidersModule_1.IdentityProvidersModuleModel(client),
        realtimeModule: new realtimeModule_1.RealtimeModuleModel(client),
        configSecretsOrgModule: new configSecretsOrgModule_1.ConfigSecretsOrgModuleModel(client),
        schemaGrant: new schemaGrant_1.SchemaGrantModel(client),
        defaultPrivilege: new defaultPrivilege_1.DefaultPrivilegeModel(client),
        enum: new enum_1.EnumModel(client),
        function: new function_1.FunctionModel(client),
        apiSchema: new apiSchema_1.ApiSchemaModel(client),
        apiModule: new apiModule_1.ApiModuleModel(client),
        domain: new domain_1.DomainModel(client),
        siteMetadatum: new siteMetadatum_1.SiteMetadatumModel(client),
        siteModule: new siteModule_1.SiteModuleModel(client),
        siteTheme: new siteTheme_1.SiteThemeModel(client),
        corsSetting: new corsSetting_1.CorsSettingModel(client),
        merkleStoreModule: new merkleStoreModule_1.MerkleStoreModuleModel(client),
        graphModule: new graphModule_1.GraphModuleModel(client),
        triggerFunction: new triggerFunction_1.TriggerFunctionModel(client),
        partition: new partition_1.PartitionModel(client),
        databaseTransfer: new databaseTransfer_1.DatabaseTransferModel(client),
        api: new api_1.ApiModel(client),
        site: new site_1.SiteModel(client),
        app: new app_1.AppModel(client),
        apiSetting: new apiSetting_1.ApiSettingModel(client),
        connectedAccountsModule: new connectedAccountsModule_1.ConnectedAccountsModuleModel(client),
        cryptoAddressesModule: new cryptoAddressesModule_1.CryptoAddressesModuleModel(client),
        cryptoAuthModule: new cryptoAuthModule_1.CryptoAuthModuleModel(client),
        defaultIdsModule: new defaultIdsModule_1.DefaultIdsModuleModel(client),
        denormalizedTableField: new denormalizedTableField_1.DenormalizedTableFieldModel(client),
        emailsModule: new emailsModule_1.EmailsModuleModel(client),
        configSecretsUserModule: new configSecretsUserModule_1.ConfigSecretsUserModuleModel(client),
        invitesModule: new invitesModule_1.InvitesModuleModel(client),
        eventsModule: new eventsModule_1.EventsModuleModel(client),
        limitsModule: new limitsModule_1.LimitsModuleModel(client),
        membershipTypesModule: new membershipTypesModule_1.MembershipTypesModuleModel(client),
        membershipsModule: new membershipsModule_1.MembershipsModuleModel(client),
        permissionsModule: new permissionsModule_1.PermissionsModuleModel(client),
        phoneNumbersModule: new phoneNumbersModule_1.PhoneNumbersModuleModel(client),
        profilesModule: new profilesModule_1.ProfilesModuleModel(client),
        userStateModule: new userStateModule_1.UserStateModuleModel(client),
        sessionsModule: new sessionsModule_1.SessionsModuleModel(client),
        userAuthModule: new userAuthModule_1.UserAuthModuleModel(client),
        usersModule: new usersModule_1.UsersModuleModel(client),
        blueprint: new blueprint_1.BlueprintModel(client),
        blueprintTemplate: new blueprintTemplate_1.BlueprintTemplateModel(client),
        blueprintConstruction: new blueprintConstruction_1.BlueprintConstructionModel(client),
        storageModule: new storageModule_1.StorageModuleModel(client),
        entityTypeProvision: new entityTypeProvision_1.EntityTypeProvisionModel(client),
        webauthnCredentialsModule: new webauthnCredentialsModule_1.WebauthnCredentialsModuleModel(client),
        webauthnAuthModule: new webauthnAuthModule_1.WebauthnAuthModuleModel(client),
        notificationsModule: new notificationsModule_1.NotificationsModuleModel(client),
        inferenceLogModule: new inferenceLogModule_1.InferenceLogModuleModel(client),
        computeLogModule: new computeLogModule_1.ComputeLogModuleModel(client),
        transferLogModule: new transferLogModule_1.TransferLogModuleModel(client),
        storageLogModule: new storageLogModule_1.StorageLogModuleModel(client),
        dbUsageModule: new dbUsageModule_1.DbUsageModuleModel(client),
        agentModule: new agentModule_1.AgentModuleModel(client),
        namespaceModule: new namespaceModule_1.NamespaceModuleModel(client),
        functionModule: new functionModule_1.FunctionModuleModel(client),
        databaseProvisionModule: new databaseProvisionModule_1.DatabaseProvisionModuleModel(client),
        appAdminGrant: new appAdminGrant_1.AppAdminGrantModel(client),
        appOwnerGrant: new appOwnerGrant_1.AppOwnerGrantModel(client),
        appGrant: new appGrant_1.AppGrantModel(client),
        orgMembership: new orgMembership_1.OrgMembershipModel(client),
        orgMember: new orgMember_1.OrgMemberModel(client),
        orgAdminGrant: new orgAdminGrant_1.OrgAdminGrantModel(client),
        orgOwnerGrant: new orgOwnerGrant_1.OrgOwnerGrantModel(client),
        orgMemberProfile: new orgMemberProfile_1.OrgMemberProfileModel(client),
        orgGrant: new orgGrant_1.OrgGrantModel(client),
        orgChartEdge: new orgChartEdge_1.OrgChartEdgeModel(client),
        orgChartEdgeGrant: new orgChartEdgeGrant_1.OrgChartEdgeGrantModel(client),
        orgPermissionDefault: new orgPermissionDefault_1.OrgPermissionDefaultModel(client),
        appLimit: new appLimit_1.AppLimitModel(client),
        appLimitCredit: new appLimitCredit_1.AppLimitCreditModel(client),
        appLimitCreditCodeItem: new appLimitCreditCodeItem_1.AppLimitCreditCodeItemModel(client),
        appLimitCreditRedemption: new appLimitCreditRedemption_1.AppLimitCreditRedemptionModel(client),
        orgLimit: new orgLimit_1.OrgLimitModel(client),
        orgLimitCredit: new orgLimitCredit_1.OrgLimitCreditModel(client),
        orgLimitAggregate: new orgLimitAggregate_1.OrgLimitAggregateModel(client),
        orgLimitWarning: new orgLimitWarning_1.OrgLimitWarningModel(client),
        email: new email_1.EmailModel(client),
        phoneNumber: new phoneNumber_1.PhoneNumberModel(client),
        cryptoAddress: new cryptoAddress_1.CryptoAddressModel(client),
        webauthnCredential: new webauthnCredential_1.WebauthnCredentialModel(client),
        appInvite: new appInvite_1.AppInviteModel(client),
        appClaimedInvite: new appClaimedInvite_1.AppClaimedInviteModel(client),
        orgInvite: new orgInvite_1.OrgInviteModel(client),
        orgClaimedInvite: new orgClaimedInvite_1.OrgClaimedInviteModel(client),
        auditLogAuth: new auditLogAuth_1.AuditLogAuthModel(client),
        identityProvider: new identityProvider_1.IdentityProviderModel(client),
        appPermissionDefault: new appPermissionDefault_1.AppPermissionDefaultModel(client),
        roleType: new roleType_1.RoleTypeModel(client),
        migrateFile: new migrateFile_1.MigrateFileModel(client),
        devicesModule: new devicesModule_1.DevicesModuleModel(client),
        appMembershipDefault: new appMembershipDefault_1.AppMembershipDefaultModel(client),
        orgMembershipDefault: new orgMembershipDefault_1.OrgMembershipDefaultModel(client),
        nodeTypeRegistry: new nodeTypeRegistry_1.NodeTypeRegistryModel(client),
        appLimitCapsDefault: new appLimitCapsDefault_1.AppLimitCapsDefaultModel(client),
        orgLimitCapsDefault: new orgLimitCapsDefault_1.OrgLimitCapsDefaultModel(client),
        appLimitCap: new appLimitCap_1.AppLimitCapModel(client),
        orgLimitCap: new orgLimitCap_1.OrgLimitCapModel(client),
        userConnectedAccount: new userConnectedAccount_1.UserConnectedAccountModel(client),
        appLimitDefault: new appLimitDefault_1.AppLimitDefaultModel(client),
        orgLimitDefault: new orgLimitDefault_1.OrgLimitDefaultModel(client),
        appLimitCreditCode: new appLimitCreditCode_1.AppLimitCreditCodeModel(client),
        appLimitWarning: new appLimitWarning_1.AppLimitWarningModel(client),
        pubkeySetting: new pubkeySetting_1.PubkeySettingModel(client),
        rateLimitsModule: new rateLimitsModule_1.RateLimitsModuleModel(client),
        membershipType: new membershipType_1.MembershipTypeModel(client),
        rlsSetting: new rlsSetting_1.RlsSettingModel(client),
        rlsModule: new rlsModule_1.RlsModuleModel(client),
        rateLimitMetersModule: new rateLimitMetersModule_1.RateLimitMetersModuleModel(client),
        plansModule: new plansModule_1.PlansModuleModel(client),
        sqlAction: new sqlAction_1.SqlActionModel(client),
        databaseSetting: new databaseSetting_1.DatabaseSettingModel(client),
        orgMembershipSetting: new orgMembershipSetting_1.OrgMembershipSettingModel(client),
        appLimitEvent: new appLimitEvent_1.AppLimitEventModel(client),
        orgLimitEvent: new orgLimitEvent_1.OrgLimitEventModel(client),
        appMembership: new appMembership_1.AppMembershipModel(client),
        user: new user_1.UserModel(client),
        astMigration: new astMigration_1.AstMigrationModel(client),
        webauthnSetting: new webauthnSetting_1.WebauthnSettingModel(client),
        billingModule: new billingModule_1.BillingModuleModel(client),
        billingProviderModule: new billingProviderModule_1.BillingProviderModuleModel(client),
        hierarchyModule: new hierarchyModule_1.HierarchyModuleModel(client),
        query: (0, query_1.createQueryOperations)(client),
        mutation: (0, mutation_1.createMutationOperations)(client),
    };
}
