"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 orgGetManagersRecord_1 = require("./models/orgGetManagersRecord");
const orgGetSubordinatesRecord_1 = require("./models/orgGetSubordinatesRecord");
const appPermission_1 = require("./models/appPermission");
const appPermissionDefaultGrant_1 = require("./models/appPermissionDefaultGrant");
const orgPermission_1 = require("./models/orgPermission");
const orgPermissionDefaultPermission_1 = require("./models/orgPermissionDefaultPermission");
const orgPermissionDefaultGrant_1 = require("./models/orgPermissionDefaultGrant");
const orgMember_1 = require("./models/orgMember");
const appPermissionDefault_1 = require("./models/appPermissionDefault");
const orgPermissionDefault_1 = require("./models/orgPermissionDefault");
const appPermissionDefaultPermission_1 = require("./models/appPermissionDefaultPermission");
const appAdminGrant_1 = require("./models/appAdminGrant");
const appOwnerGrant_1 = require("./models/appOwnerGrant");
const orgAdminGrant_1 = require("./models/orgAdminGrant");
const orgOwnerGrant_1 = require("./models/orgOwnerGrant");
const orgChartEdgeGrant_1 = require("./models/orgChartEdgeGrant");
const appClaimedInvite_1 = require("./models/appClaimedInvite");
const membershipType_1 = require("./models/membershipType");
const appGrant_1 = require("./models/appGrant");
const appMembershipDefault_1 = require("./models/appMembershipDefault");
const orgMembershipDefault_1 = require("./models/orgMembershipDefault");
const orgClaimedInvite_1 = require("./models/orgClaimedInvite");
const orgGrant_1 = require("./models/orgGrant");
const orgChartEdge_1 = require("./models/orgChartEdge");
const orgMembershipSetting_1 = require("./models/orgMembershipSetting");
const appMembership_1 = require("./models/appMembership");
const orgMembership_1 = require("./models/orgMembership");
const orgMemberProfile_1 = require("./models/orgMemberProfile");
const appInvite_1 = require("./models/appInvite");
const orgInvite_1 = require("./models/orgInvite");
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 {
        orgGetManagersRecord: new orgGetManagersRecord_1.OrgGetManagersRecordModel(client),
        orgGetSubordinatesRecord: new orgGetSubordinatesRecord_1.OrgGetSubordinatesRecordModel(client),
        appPermission: new appPermission_1.AppPermissionModel(client),
        appPermissionDefaultGrant: new appPermissionDefaultGrant_1.AppPermissionDefaultGrantModel(client),
        orgPermission: new orgPermission_1.OrgPermissionModel(client),
        orgPermissionDefaultPermission: new orgPermissionDefaultPermission_1.OrgPermissionDefaultPermissionModel(client),
        orgPermissionDefaultGrant: new orgPermissionDefaultGrant_1.OrgPermissionDefaultGrantModel(client),
        orgMember: new orgMember_1.OrgMemberModel(client),
        appPermissionDefault: new appPermissionDefault_1.AppPermissionDefaultModel(client),
        orgPermissionDefault: new orgPermissionDefault_1.OrgPermissionDefaultModel(client),
        appPermissionDefaultPermission: new appPermissionDefaultPermission_1.AppPermissionDefaultPermissionModel(client),
        appAdminGrant: new appAdminGrant_1.AppAdminGrantModel(client),
        appOwnerGrant: new appOwnerGrant_1.AppOwnerGrantModel(client),
        orgAdminGrant: new orgAdminGrant_1.OrgAdminGrantModel(client),
        orgOwnerGrant: new orgOwnerGrant_1.OrgOwnerGrantModel(client),
        orgChartEdgeGrant: new orgChartEdgeGrant_1.OrgChartEdgeGrantModel(client),
        appClaimedInvite: new appClaimedInvite_1.AppClaimedInviteModel(client),
        membershipType: new membershipType_1.MembershipTypeModel(client),
        appGrant: new appGrant_1.AppGrantModel(client),
        appMembershipDefault: new appMembershipDefault_1.AppMembershipDefaultModel(client),
        orgMembershipDefault: new orgMembershipDefault_1.OrgMembershipDefaultModel(client),
        orgClaimedInvite: new orgClaimedInvite_1.OrgClaimedInviteModel(client),
        orgGrant: new orgGrant_1.OrgGrantModel(client),
        orgChartEdge: new orgChartEdge_1.OrgChartEdgeModel(client),
        orgMembershipSetting: new orgMembershipSetting_1.OrgMembershipSettingModel(client),
        appMembership: new appMembership_1.AppMembershipModel(client),
        orgMembership: new orgMembership_1.OrgMembershipModel(client),
        orgMemberProfile: new orgMemberProfile_1.OrgMemberProfileModel(client),
        appInvite: new appInvite_1.AppInviteModel(client),
        orgInvite: new orgInvite_1.OrgInviteModel(client),
        query: (0, query_1.createQueryOperations)(client),
        mutation: (0, mutation_1.createMutationOperations)(client),
    };
}
