"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 getAllRecord_1 = require("./models/getAllRecord");
const functionApiBinding_1 = require("./models/functionApiBinding");
const functionDeployment_1 = require("./models/functionDeployment");
const resource_1 = require("./models/resource");
const functionGraphRef_1 = require("./models/functionGraphRef");
const functionGraphStore_1 = require("./models/functionGraphStore");
const functionGraphObject_1 = require("./models/functionGraphObject");
const functionDeploymentEvent_1 = require("./models/functionDeploymentEvent");
const orgFunctionExecutionLog_1 = require("./models/orgFunctionExecutionLog");
const resourceEvent_1 = require("./models/resourceEvent");
const functionGraphExecutionOutput_1 = require("./models/functionGraphExecutionOutput");
const functionGraphCommit_1 = require("./models/functionGraphCommit");
const secretDefinition_1 = require("./models/secretDefinition");
const functionExecutionLog_1 = require("./models/functionExecutionLog");
const functionGraph_1 = require("./models/functionGraph");
const functionGraphExecutionNodeState_1 = require("./models/functionGraphExecutionNodeState");
const platformNamespace_1 = require("./models/platformNamespace");
const orgFunctionInvocation_1 = require("./models/orgFunctionInvocation");
const functionInvocation_1 = require("./models/functionInvocation");
const platformNamespaceEvent_1 = require("./models/platformNamespaceEvent");
const functionGraphExecution_1 = require("./models/functionGraphExecution");
const functionDefinition_1 = require("./models/functionDefinition");
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 {
        getAllRecord: new getAllRecord_1.GetAllRecordModel(client),
        functionApiBinding: new functionApiBinding_1.FunctionApiBindingModel(client),
        functionDeployment: new functionDeployment_1.FunctionDeploymentModel(client),
        resource: new resource_1.ResourceModel(client),
        functionGraphRef: new functionGraphRef_1.FunctionGraphRefModel(client),
        functionGraphStore: new functionGraphStore_1.FunctionGraphStoreModel(client),
        functionGraphObject: new functionGraphObject_1.FunctionGraphObjectModel(client),
        functionDeploymentEvent: new functionDeploymentEvent_1.FunctionDeploymentEventModel(client),
        orgFunctionExecutionLog: new orgFunctionExecutionLog_1.OrgFunctionExecutionLogModel(client),
        resourceEvent: new resourceEvent_1.ResourceEventModel(client),
        functionGraphExecutionOutput: new functionGraphExecutionOutput_1.FunctionGraphExecutionOutputModel(client),
        functionGraphCommit: new functionGraphCommit_1.FunctionGraphCommitModel(client),
        secretDefinition: new secretDefinition_1.SecretDefinitionModel(client),
        functionExecutionLog: new functionExecutionLog_1.FunctionExecutionLogModel(client),
        functionGraph: new functionGraph_1.FunctionGraphModel(client),
        functionGraphExecutionNodeState: new functionGraphExecutionNodeState_1.FunctionGraphExecutionNodeStateModel(client),
        platformNamespace: new platformNamespace_1.PlatformNamespaceModel(client),
        orgFunctionInvocation: new orgFunctionInvocation_1.OrgFunctionInvocationModel(client),
        functionInvocation: new functionInvocation_1.FunctionInvocationModel(client),
        platformNamespaceEvent: new platformNamespaceEvent_1.PlatformNamespaceEventModel(client),
        functionGraphExecution: new functionGraphExecution_1.FunctionGraphExecutionModel(client),
        functionDefinition: new functionDefinition_1.FunctionDefinitionModel(client),
        query: (0, query_1.createQueryOperations)(client),
        mutation: (0, mutation_1.createMutationOperations)(client),
    };
}
