"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 infraGetAllRecord_1 = require("./models/infraGetAllRecord");
const getAllRecord_1 = require("./models/getAllRecord");
const infraRef_1 = require("./models/infraRef");
const infraStore_1 = require("./models/infraStore");
const functionApiBinding_1 = require("./models/functionApiBinding");
const functionGraphRef_1 = require("./models/functionGraphRef");
const functionGraphStore_1 = require("./models/functionGraphStore");
const platformFunctionApiBinding_1 = require("./models/platformFunctionApiBinding");
const platformResourcesRequirementsState_1 = require("./models/platformResourcesRequirementsState");
const resourcesRequirementsState_1 = require("./models/resourcesRequirementsState");
const platformResourceStatusCheck_1 = require("./models/platformResourceStatusCheck");
const platformFunctionDeployment_1 = require("./models/platformFunctionDeployment");
const platformResource_1 = require("./models/platformResource");
const platformResourceDefinition_1 = require("./models/platformResourceDefinition");
const infraObject_1 = require("./models/infraObject");
const functionGraphObject_1 = require("./models/functionGraphObject");
const platformFunctionDeploymentEvent_1 = require("./models/platformFunctionDeploymentEvent");
const platformResourceEvent_1 = require("./models/platformResourceEvent");
const resourceStatusCheck_1 = require("./models/resourceStatusCheck");
const functionDeployment_1 = require("./models/functionDeployment");
const resource_1 = require("./models/resource");
const resourceDefinition_1 = require("./models/resourceDefinition");
const functionDeploymentEvent_1 = require("./models/functionDeploymentEvent");
const platformFunctionExecutionLog_1 = require("./models/platformFunctionExecutionLog");
const resourceEvent_1 = require("./models/resourceEvent");
const functionGraphExecutionOutput_1 = require("./models/functionGraphExecutionOutput");
const infraCommit_1 = require("./models/infraCommit");
const functionGraphCommit_1 = require("./models/functionGraphCommit");
const functionExecutionLog_1 = require("./models/functionExecutionLog");
const platformResourcesResolvedRequirement_1 = require("./models/platformResourcesResolvedRequirement");
const resourcesResolvedRequirement_1 = require("./models/resourcesResolvedRequirement");
const dbPreset_1 = require("./models/dbPreset");
const platformNamespace_1 = require("./models/platformNamespace");
const functionGraph_1 = require("./models/functionGraph");
const functionGraphExecutionNodeState_1 = require("./models/functionGraphExecutionNodeState");
const namespace_1 = require("./models/namespace");
const platformFunctionInvocation_1 = require("./models/platformFunctionInvocation");
const functionInvocation_1 = require("./models/functionInvocation");
const platformNamespaceEvent_1 = require("./models/platformNamespaceEvent");
const integrationProvider_1 = require("./models/integrationProvider");
const namespaceEvent_1 = require("./models/namespaceEvent");
const functionGraphExecution_1 = require("./models/functionGraphExecution");
const platformFunctionDefinition_1 = require("./models/platformFunctionDefinition");
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 {
        infraGetAllRecord: new infraGetAllRecord_1.InfraGetAllRecordModel(client),
        getAllRecord: new getAllRecord_1.GetAllRecordModel(client),
        infraRef: new infraRef_1.InfraRefModel(client),
        infraStore: new infraStore_1.InfraStoreModel(client),
        functionApiBinding: new functionApiBinding_1.FunctionApiBindingModel(client),
        functionGraphRef: new functionGraphRef_1.FunctionGraphRefModel(client),
        functionGraphStore: new functionGraphStore_1.FunctionGraphStoreModel(client),
        platformFunctionApiBinding: new platformFunctionApiBinding_1.PlatformFunctionApiBindingModel(client),
        platformResourcesRequirementsState: new platformResourcesRequirementsState_1.PlatformResourcesRequirementsStateModel(client),
        resourcesRequirementsState: new resourcesRequirementsState_1.ResourcesRequirementsStateModel(client),
        platformResourceStatusCheck: new platformResourceStatusCheck_1.PlatformResourceStatusCheckModel(client),
        platformFunctionDeployment: new platformFunctionDeployment_1.PlatformFunctionDeploymentModel(client),
        platformResource: new platformResource_1.PlatformResourceModel(client),
        platformResourceDefinition: new platformResourceDefinition_1.PlatformResourceDefinitionModel(client),
        infraObject: new infraObject_1.InfraObjectModel(client),
        functionGraphObject: new functionGraphObject_1.FunctionGraphObjectModel(client),
        platformFunctionDeploymentEvent: new platformFunctionDeploymentEvent_1.PlatformFunctionDeploymentEventModel(client),
        platformResourceEvent: new platformResourceEvent_1.PlatformResourceEventModel(client),
        resourceStatusCheck: new resourceStatusCheck_1.ResourceStatusCheckModel(client),
        functionDeployment: new functionDeployment_1.FunctionDeploymentModel(client),
        resource: new resource_1.ResourceModel(client),
        resourceDefinition: new resourceDefinition_1.ResourceDefinitionModel(client),
        functionDeploymentEvent: new functionDeploymentEvent_1.FunctionDeploymentEventModel(client),
        platformFunctionExecutionLog: new platformFunctionExecutionLog_1.PlatformFunctionExecutionLogModel(client),
        resourceEvent: new resourceEvent_1.ResourceEventModel(client),
        functionGraphExecutionOutput: new functionGraphExecutionOutput_1.FunctionGraphExecutionOutputModel(client),
        infraCommit: new infraCommit_1.InfraCommitModel(client),
        functionGraphCommit: new functionGraphCommit_1.FunctionGraphCommitModel(client),
        functionExecutionLog: new functionExecutionLog_1.FunctionExecutionLogModel(client),
        platformResourcesResolvedRequirement: new platformResourcesResolvedRequirement_1.PlatformResourcesResolvedRequirementModel(client),
        resourcesResolvedRequirement: new resourcesResolvedRequirement_1.ResourcesResolvedRequirementModel(client),
        dbPreset: new dbPreset_1.DbPresetModel(client),
        platformNamespace: new platformNamespace_1.PlatformNamespaceModel(client),
        functionGraph: new functionGraph_1.FunctionGraphModel(client),
        functionGraphExecutionNodeState: new functionGraphExecutionNodeState_1.FunctionGraphExecutionNodeStateModel(client),
        namespace: new namespace_1.NamespaceModel(client),
        platformFunctionInvocation: new platformFunctionInvocation_1.PlatformFunctionInvocationModel(client),
        functionInvocation: new functionInvocation_1.FunctionInvocationModel(client),
        platformNamespaceEvent: new platformNamespaceEvent_1.PlatformNamespaceEventModel(client),
        integrationProvider: new integrationProvider_1.IntegrationProviderModel(client),
        namespaceEvent: new namespaceEvent_1.NamespaceEventModel(client),
        functionGraphExecution: new functionGraphExecution_1.FunctionGraphExecutionModel(client),
        platformFunctionDefinition: new platformFunctionDefinition_1.PlatformFunctionDefinitionModel(client),
        functionDefinition: new functionDefinition_1.FunctionDefinitionModel(client),
        query: (0, query_1.createQueryOperations)(client),
        mutation: (0, mutation_1.createMutationOperations)(client),
    };
}
