{"version":3,"file":"OpenBadgesConsentRecord.mjs","names":[],"sources":["../../src/repository/OpenBadgesConsentRecord.ts"],"sourcesContent":["import type { TagsBase } from '@credo-ts/core'\nimport { BaseRecord, utils } from '@credo-ts/core'\n\nexport type DefaultOpenBadgesConsentTags = {\n  clientId: string\n  subject: string\n}\n\nexport type OpenBadgesConsentRecordProps = {\n  id?: string\n  createdAt?: Date\n  updatedAt?: Date\n  clientId: string\n  subject: string\n  grantedAt: Date\n  tags?: TagsBase\n}\n\nexport class OpenBadgesConsentRecord\n  extends BaseRecord<DefaultOpenBadgesConsentTags, TagsBase>\n  implements OpenBadgesConsentRecordProps\n{\n  public clientId!: string\n  public subject!: string\n  public grantedAt!: Date\n\n  public static readonly type = 'OpenBadgesConsentRecord'\n  public readonly type = OpenBadgesConsentRecord.type\n\n  public constructor(props: OpenBadgesConsentRecordProps) {\n    super()\n    this.id = props.id ?? utils.uuid()\n    this.createdAt = props.createdAt ?? new Date()\n    this.updatedAt = props.updatedAt ?? new Date()\n    this.clientId = props.clientId\n    this.subject = props.subject\n    this.grantedAt = props.grantedAt\n    this._tags = props.tags ?? {}\n  }\n\n  public getTags(): DefaultOpenBadgesConsentTags {\n    return { ...this._tags, clientId: this.clientId, subject: this.subject }\n  }\n}\n\n"],"mappings":";;;;;;CAkBa,0BAAb,MAAa,gCACH,WAEV;EAQE,AAAO,YAAY,OAAqC;AACtD,UAAO;QAHO,OAAO,wBAAwB;AAI7C,QAAK,KAAK,MAAM,MAAM,MAAM,MAAM;AAClC,QAAK,YAAY,MAAM,6BAAa,IAAI,MAAM;AAC9C,QAAK,YAAY,MAAM,6BAAa,IAAI,MAAM;AAC9C,QAAK,WAAW,MAAM;AACtB,QAAK,UAAU,MAAM;AACrB,QAAK,YAAY,MAAM;AACvB,QAAK,QAAQ,MAAM,QAAQ,EAAE;;EAG/B,AAAO,UAAwC;AAC7C,UAAO;IAAE,GAAG,KAAK;IAAO,UAAU,KAAK;IAAU,SAAS,KAAK;IAAS;;;yBAfnD,OAAO"}