"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.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 infraGetAllRecord_1 = require("./models/infraGetAllRecord");
const infraRef_1 = require("./models/infraRef");
const infraStore_1 = require("./models/infraStore");
const infraObject_1 = require("./models/infraObject");
const infraCommit_1 = require("./models/infraCommit");
const dbPreset_1 = require("./models/dbPreset");
const platformNamespace_1 = require("./models/platformNamespace");
const namespace_1 = require("./models/namespace");
const platformNamespaceEvent_1 = require("./models/platformNamespaceEvent");
const namespaceEvent_1 = require("./models/namespaceEvent");
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 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 {
        infraGetAllRecord: new infraGetAllRecord_1.InfraGetAllRecordModel(client),
        infraRef: new infraRef_1.InfraRefModel(client),
        infraStore: new infraStore_1.InfraStoreModel(client),
        infraObject: new infraObject_1.InfraObjectModel(client),
        infraCommit: new infraCommit_1.InfraCommitModel(client),
        dbPreset: new dbPreset_1.DbPresetModel(client),
        platformNamespace: new platformNamespace_1.PlatformNamespaceModel(client),
        namespace: new namespace_1.NamespaceModel(client),
        platformNamespaceEvent: new platformNamespaceEvent_1.PlatformNamespaceEventModel(client),
        namespaceEvent: new namespaceEvent_1.NamespaceEventModel(client),
        mutation: (0, mutation_1.createMutationOperations)(client),
    };
}
