import { MongooseModule, } from "../../helpers"; import { EncryptedDataType } from "../../types/common"; import { EsriAuthSchemaType } from "../../types/esri"; export default function EsriAuthSchema(mongoose: MongooseModule) { const { Schema } = mongoose; const EsriAuthPassword = new Schema({ iv: { type: String, default: "", }, encryptedData: { type: String, default: "", }, }, { _id: false, id: false, }); const EsriAuth = new Schema({ username: { type: String, default: "", }, encrypted: { type: EsriAuthPassword, default: null, }, }, { _id: false, id: false, }); return EsriAuth; }