{"version":3,"file":"W3cV2Evidence.mjs","names":[],"sources":["../../../../../src/modules/vc/models/credential/W3cV2Evidence.ts"],"sourcesContent":["import { plainToClassFromExist } from 'class-transformer'\nimport { IsOptional, IsString } from 'class-validator'\nimport { IsUri } from '../../../../utils'\n\nexport interface W3cV2EvidenceOptions {\n  id?: string\n  type: string\n  [property: string]: unknown\n}\n\n/**\n * Represents an evidence.\n *\n *\n * @see https://www.w3.org/TR/vc-data-model-2.0/#evidence\n */\nexport class W3cV2Evidence {\n  public constructor(options: W3cV2EvidenceOptions) {\n    if (options) {\n      const { id, type, ...rest } = options\n\n      plainToClassFromExist(this, rest)\n\n      this.id = id\n      this.type = type\n    }\n  }\n\n  @IsOptional()\n  @IsUri()\n  public id?: string\n\n  @IsString()\n  public type!: string;\n\n  [property: string]: unknown\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,IAAa,gBAAb,MAA2B;CACzB,YAAmB,SAA+B;EAChD,IAAI,SAAS;GACX,MAAM,EAAE,IAAI,MAAM,GAAG,SAAS;GAE9B,sBAAsB,MAAM,IAAI;GAEhC,KAAK,KAAK;GACV,KAAK,OAAO;EACd;CACF;AAUF;;CARG,WAAW;CACX,MAAM;;;AAGN,WAAA,CAAA,SAAS,GAAA,mBAAA,eAAA,MAAA,CAAA,GAAA,cAAA,WAAA,QAAA,KAAA,CAAA"}