"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 principal_1 = require("./models/principal");
const principalEntity_1 = require("./models/principalEntity");
const principalScopeOverride_1 = require("./models/principalScopeOverride");
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 auditLogAuth_1 = require("./models/auditLogAuth");
const identityProvider_1 = require("./models/identityProvider");
const roleType_1 = require("./models/roleType");
const userConnectedAccount_1 = require("./models/userConnectedAccount");
const orgApiKeyList_1 = require("./models/orgApiKeyList");
const user_1 = require("./models/user");
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 {
        principal: new principal_1.PrincipalModel(client),
        principalEntity: new principalEntity_1.PrincipalEntityModel(client),
        principalScopeOverride: new principalScopeOverride_1.PrincipalScopeOverrideModel(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),
        auditLogAuth: new auditLogAuth_1.AuditLogAuthModel(client),
        identityProvider: new identityProvider_1.IdentityProviderModel(client),
        roleType: new roleType_1.RoleTypeModel(client),
        userConnectedAccount: new userConnectedAccount_1.UserConnectedAccountModel(client),
        orgApiKeyList: new orgApiKeyList_1.OrgApiKeyListModel(client),
        user: new user_1.UserModel(client),
        query: (0, query_1.createQueryOperations)(client),
        mutation: (0, mutation_1.createMutationOperations)(client),
    };
}
