"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FieldsValidationSchema = exports.fields = void 0;
const zod_1 = require("zod");
const extensions_core_1 = require("@awell-health/extensions-core");
const validation_1 = require("../../../validation");
exports.fields = {
    userId: {
        label: 'User ID',
        id: 'userId',
        type: extensions_core_1.FieldType.STRING,
        required: true,
        description: "Specify a unique ID for the user, maximum length is 80 characters. Don't use personally identifiable information (PII) for the ID.",
    },
    nickname: {
        id: 'nickname',
        label: 'Nickname',
        type: extensions_core_1.FieldType.STRING,
        description: "The user's nickname. Maximum length is 80 characters. If left empty, we will use the patient's first and last name.",
        required: false,
    },
    issueAccessToken: {
        id: 'issueAccessToken',
        label: 'Issue access token',
        description: 'Determines whether to create an access token for the user.',
        type: extensions_core_1.FieldType.BOOLEAN,
        required: false,
    },
    profileUrl: {
        id: 'profileUrl',
        label: 'Profile URL',
        description: "The URL of the user's profile image.",
        type: extensions_core_1.FieldType.STRING,
        stringType: extensions_core_1.StringType.URL,
        required: false,
    },
    metadata: {
        id: 'metadata',
        label: 'Metadata',
        description: 'Specifies a JSON object to store up to five key-value items for additional user information such as a phone number, an email address, or a long description of the user. The key must not have a comma (,) and its length is limited to 128 characters. The value must be a string and its length is limited to 190 characters.',
        type: extensions_core_1.FieldType.JSON,
        required: false,
    },
};
exports.FieldsValidationSchema = zod_1.z.object({
    userId: zod_1.z.string().max(80).nonempty(),
    nickname: zod_1.z.string().max(80).optional(),
    issueAccessToken: zod_1.z.boolean().optional(),
    profileUrl: (0, extensions_core_1.makeStringOptional)(zod_1.z.string().url()),
    metadata: zod_1.z.optional(validation_1.MetadataValidationSchema),
});
//# sourceMappingURL=fields.js.map