import { d as defineEventHandler, s as setResponseHeader } from '../../../../nitro/nitro.mjs';
import { g as getServerBaseUrl } from '../../../../_/url-helpers.mjs';
import 'node:crypto';
import 'jsonwebtoken';
import 'node:fs';
import 'node:module';
import 'node:path';
import 'node:url';
import 'node:http';
import 'node:https';
import 'node:events';
import 'node:buffer';
import 'pino';
import 'drizzle-orm/better-sqlite3';
import 'drizzle-orm/node-postgres';
import 'drizzle-orm/mysql2';
import 'better-sqlite3';
import 'pg';
import 'mysql2/promise';
import 'drizzle-orm';
import 'fs';
import 'path';
import 'prom-client';
import 'bcryptjs';
import '@node-rs/argon2';
import 'node:async_hooks';
import 'crypto';
import 'node:dns';
import 'node:util';
import 'node:net';
import 'fs/promises';
import 'url';
import 'semver';

const Schemas_get = defineEventHandler((event) => {
  setResponseHeader(event, "Content-Type", "application/scim+json");
  const baseUrl = getServerBaseUrl(event);
  const userSchema = {
    schemas: ["urn:ietf:params:scim:schemas:core:2.0:Schema"],
    id: "urn:ietf:params:scim:schemas:core:2.0:User",
    name: "User",
    description: "User Account",
    attributes: [
      {
        name: "userName",
        type: "string",
        multiValued: false,
        required: true,
        caseExact: false,
        mutability: "readWrite",
        returned: "default",
        uniqueness: "server"
      },
      {
        name: "name",
        type: "complex",
        multiValued: false,
        required: false,
        mutability: "readWrite",
        returned: "default",
        uniqueness: "none",
        subAttributes: [
          {
            name: "formatted",
            type: "string",
            mutability: "readWrite",
            returned: "default"
          },
          {
            name: "givenName",
            type: "string",
            mutability: "readWrite",
            returned: "default"
          },
          {
            name: "familyName",
            type: "string",
            mutability: "readWrite",
            returned: "default"
          }
        ]
      },
      {
        name: "emails",
        type: "complex",
        multiValued: true,
        required: false,
        mutability: "readWrite",
        returned: "default",
        subAttributes: [
          {
            name: "value",
            type: "string",
            required: true,
            mutability: "readWrite",
            returned: "default"
          },
          {
            name: "primary",
            type: "boolean",
            mutability: "readWrite",
            returned: "default"
          },
          {
            name: "type",
            type: "string",
            mutability: "readWrite",
            returned: "default"
          }
        ]
      },
      {
        name: "active",
        type: "boolean",
        multiValued: false,
        required: false,
        mutability: "readWrite",
        returned: "default"
      },
      {
        name: "externalId",
        type: "string",
        multiValued: false,
        required: false,
        caseExact: true,
        mutability: "readWrite",
        returned: "default",
        uniqueness: "server"
      }
    ],
    meta: {
      resourceType: "Schema",
      location: `${baseUrl}/api/scim/v2/Schemas/urn:ietf:params:scim:schemas:core:2.0:User`
    }
  };
  return {
    schemas: ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
    totalResults: 1,
    Resources: [userSchema]
  };
});

export { Schemas_get as default };
//# sourceMappingURL=Schemas.get.mjs.map
