"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 appLimitCap_1 = require("./models/appLimitCap");
const appLimitCapsDefault_1 = require("./models/appLimitCapsDefault");
const appLimit_1 = require("./models/appLimit");
const appLimitCreditCode_1 = require("./models/appLimitCreditCode");
const appLimitCreditCodeItem_1 = require("./models/appLimitCreditCodeItem");
const appLimitCredit_1 = require("./models/appLimitCredit");
const appLimitCreditRedemption_1 = require("./models/appLimitCreditRedemption");
const appLimitDefault_1 = require("./models/appLimitDefault");
const appLimitEvent_1 = require("./models/appLimitEvent");
const appLimitWarning_1 = require("./models/appLimitWarning");
const orgLimitAggregate_1 = require("./models/orgLimitAggregate");
const orgLimitCap_1 = require("./models/orgLimitCap");
const orgLimitCapsDefault_1 = require("./models/orgLimitCapsDefault");
const orgLimit_1 = require("./models/orgLimit");
const orgLimitCredit_1 = require("./models/orgLimitCredit");
const orgLimitDefault_1 = require("./models/orgLimitDefault");
const orgLimitEvent_1 = require("./models/orgLimitEvent");
const orgLimitWarning_1 = require("./models/orgLimitWarning");
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 {
        appLimitCap: new appLimitCap_1.AppLimitCapModel(client),
        appLimitCapsDefault: new appLimitCapsDefault_1.AppLimitCapsDefaultModel(client),
        appLimit: new appLimit_1.AppLimitModel(client),
        appLimitCreditCode: new appLimitCreditCode_1.AppLimitCreditCodeModel(client),
        appLimitCreditCodeItem: new appLimitCreditCodeItem_1.AppLimitCreditCodeItemModel(client),
        appLimitCredit: new appLimitCredit_1.AppLimitCreditModel(client),
        appLimitCreditRedemption: new appLimitCreditRedemption_1.AppLimitCreditRedemptionModel(client),
        appLimitDefault: new appLimitDefault_1.AppLimitDefaultModel(client),
        appLimitEvent: new appLimitEvent_1.AppLimitEventModel(client),
        appLimitWarning: new appLimitWarning_1.AppLimitWarningModel(client),
        orgLimitAggregate: new orgLimitAggregate_1.OrgLimitAggregateModel(client),
        orgLimitCap: new orgLimitCap_1.OrgLimitCapModel(client),
        orgLimitCapsDefault: new orgLimitCapsDefault_1.OrgLimitCapsDefaultModel(client),
        orgLimit: new orgLimit_1.OrgLimitModel(client),
        orgLimitCredit: new orgLimitCredit_1.OrgLimitCreditModel(client),
        orgLimitDefault: new orgLimitDefault_1.OrgLimitDefaultModel(client),
        orgLimitEvent: new orgLimitEvent_1.OrgLimitEventModel(client),
        orgLimitWarning: new orgLimitWarning_1.OrgLimitWarningModel(client),
        mutation: (0, mutation_1.createMutationOperations)(client),
    };
}
