@sphereon/ssi-sdk.data-store
Version:
1,428 lines (1,367 loc) • 78.9 kB
TypeScript
import typeorm, { BaseEntity as BaseEntity$8, FindOptionsOrder, FindOptionsWhere, DataSource, Repository, MigrationInterface, QueryRunner } from 'typeorm';
import { ManagedIdentifierOptsOrResult } from '@sphereon/ssi-sdk-ext.identifier-resolution';
import { IIdentifier } from '@veramo/core';
import { HasherSync, DcqlQueryREST, IIssuer, StatusListDriverType, StatusListCredentialIdMode, CredentialProofFormat, StatusListCredential, StatusListIndexingDirection, StatusPurpose2021, StatusListType, RequireOneOf, LoggingEventType, LogLevel, System, SubSystem, ActionType, ActionSubType, InitiatorType, SystemCorrelationIdType, OrPromise, OriginalVerifiableCredential, OriginalVerifiablePresentation } from '@sphereon/ssi-types';
import { AuditLoggingEvent, ActivityLoggingEvent, PartialAuditLoggingEvent, PartialActivityLoggingEvent, PartyCorrelationType, CredentialType } from '@sphereon/ssi-sdk.core';
import { IPresentationDefinition } from '@sphereon/pex';
interface ILocaleBranding {
id: string;
alias?: string;
locale?: string;
logo?: IImageAttributes;
description?: string;
background?: IBackgroundAttributes;
text?: ITextAttributes;
createdAt: Date;
lastUpdatedAt: Date;
}
interface IImageAttributes {
id: string;
uri?: string;
dataUri?: string;
mediaType?: string;
alt?: string;
dimensions?: IImageDimensions;
}
interface IBasicImageAttributes extends Omit<IImageAttributes, 'id' | 'dimensions'> {
dimensions?: IBasicImageDimensions;
}
interface IPartialImageAttributes extends Partial<Omit<IImageAttributes, 'dimensions'>> {
dimensions?: IPartialImageDimensions;
}
interface IBackgroundAttributes {
id: string;
color?: string;
image?: IImageAttributes;
}
interface IBasicBackgroundAttributes extends Omit<IBackgroundAttributes, 'id' | 'image'> {
image?: IBasicImageAttributes;
}
interface IPartialBackgroundAttributes extends Partial<Omit<IBackgroundAttributes, 'image'>> {
image?: IPartialImageAttributes;
}
interface ITextAttributes {
id: string;
color?: string;
}
interface IBasicTextAttributes extends Omit<ITextAttributes, 'id'> {
}
interface IPartialTextAttributes extends Partial<ITextAttributes> {
}
interface IImageDimensions {
id: string;
width: number;
height: number;
}
interface IBasicImageDimensions extends Omit<IImageDimensions, 'id'> {
}
interface IPartialImageDimensions extends Partial<IImageDimensions> {
}
interface ICredentialClaim {
id: string;
key: string;
name: string;
}
interface IBasicCredentialClaim extends Omit<ICredentialClaim, 'id'> {
}
interface IPartialCredentialClaim extends Partial<ICredentialClaim> {
}
interface ICredentialLocaleBranding extends ILocaleBranding {
claims?: Array<ICredentialClaim>;
}
interface IBasicCredentialLocaleBranding extends Omit<ICredentialLocaleBranding, 'id' | 'createdAt' | 'lastUpdatedAt' | 'logo' | 'background' | 'text' | 'claims'> {
logo?: IBasicImageAttributes;
background?: IBasicBackgroundAttributes;
text?: IBasicTextAttributes;
claims?: Array<IBasicCredentialClaim>;
}
interface IPartialCredentialLocaleBranding extends Partial<Omit<ICredentialLocaleBranding, 'logo' | 'background' | 'text' | 'claims'>> {
logo?: IPartialImageAttributes;
background?: IPartialBackgroundAttributes;
text?: IPartialTextAttributes;
claims?: IPartialCredentialClaim;
}
interface ICredentialBranding {
id: string;
issuerCorrelationId: string;
vcHash: string;
localeBranding: Array<ICredentialLocaleBranding>;
createdAt: Date;
lastUpdatedAt: Date;
}
interface IBasicCredentialBranding extends Omit<ICredentialBranding, 'id' | 'createdAt' | 'lastUpdatedAt' | 'localeBranding'> {
localeBranding: Array<IBasicCredentialLocaleBranding>;
}
interface IPartialCredentialBranding extends Partial<Omit<ICredentialBranding, 'localeBranding'>> {
localeBranding?: IPartialCredentialLocaleBranding;
}
interface IIssuerLocaleBranding extends ILocaleBranding {
clientUri?: string;
tosUri?: string;
policyUri?: string;
contacts?: Array<string>;
}
interface IBasicIssuerLocaleBranding extends Omit<IIssuerLocaleBranding, 'id' | 'createdAt' | 'lastUpdatedAt' | 'logo' | 'background' | 'text'> {
logo?: IBasicImageAttributes;
background?: IBasicBackgroundAttributes;
text?: IBasicTextAttributes;
}
interface IPartialIssuerLocaleBranding extends Partial<Omit<IIssuerLocaleBranding, 'logo' | 'background' | 'text' | 'contacts'>> {
logo?: IPartialImageAttributes;
background?: IPartialBackgroundAttributes;
text?: IPartialTextAttributes;
contacts?: string;
}
interface IIssuerBranding {
id: string;
issuerCorrelationId: string;
localeBranding: Array<IIssuerLocaleBranding>;
createdAt: Date;
lastUpdatedAt: Date;
}
interface IBasicIssuerBranding extends Omit<IIssuerBranding, 'id' | 'createdAt' | 'lastUpdatedAt' | 'localeBranding'> {
localeBranding: Array<IBasicIssuerLocaleBranding>;
}
interface IPartialIssuerBranding extends Partial<Omit<IIssuerBranding, 'localeBranding'>> {
localeBranding?: IPartialIssuerLocaleBranding;
}
interface ICredentialBrandingFilter extends IPartialCredentialBranding {
}
interface ICredentialLocaleBrandingFilter extends IPartialCredentialLocaleBranding {
credentialBranding?: IPartialCredentialBranding;
}
interface IIssuerBrandingFilter extends IPartialIssuerBranding {
}
interface IIssuerLocaleBrandingFilter extends IPartialIssuerLocaleBranding {
issuerBranding?: IPartialIssuerBranding;
}
type FindCredentialBrandingArgs = Array<ICredentialBrandingFilter>;
type FindCredentialLocaleBrandingArgs = Array<ICredentialLocaleBrandingFilter>;
type FindIssuerBrandingArgs = Array<IIssuerBrandingFilter>;
type FindIssuerLocaleBrandingArgs = Array<IIssuerLocaleBrandingFilter>;
interface IAddCredentialBrandingArgs {
vcHash: string;
issuerCorrelationId: string;
localeBranding: Array<IBasicCredentialLocaleBranding>;
}
interface IGetCredentialBrandingArgs {
filter?: FindCredentialBrandingArgs;
}
interface IUpdateCredentialBrandingArgs {
credentialBranding: Omit<ICredentialBranding, 'localeBranding' | 'createdAt' | 'lastUpdatedAt'>;
}
interface IRemoveCredentialBrandingArgs {
filter: FindCredentialBrandingArgs;
}
interface IAddCredentialLocaleBrandingArgs {
credentialBrandingId: string;
localeBranding: Array<IBasicCredentialLocaleBranding>;
}
interface IUpdateCredentialLocaleBrandingArgs {
localeBranding: Omit<ILocaleBranding, 'createdAt' | 'lastUpdatedAt'>;
}
interface IRemoveCredentialLocaleBrandingArgs {
filter: FindCredentialLocaleBrandingArgs;
}
interface IGetCredentialLocaleBrandingArgs {
filter?: FindCredentialLocaleBrandingArgs;
}
interface IAddIssuerBrandingArgs {
issuerCorrelationId: string;
localeBranding: Array<IBasicIssuerLocaleBranding>;
}
interface IGetIssuerBrandingArgs {
filter?: FindIssuerBrandingArgs;
}
interface IUpdateIssuerBrandingArgs {
issuerBranding: Omit<IIssuerBranding, 'localeBranding' | 'createdAt' | 'lastUpdatedAt'>;
}
interface IRemoveIssuerBrandingArgs {
filter: FindIssuerBrandingArgs;
}
interface IAddIssuerLocaleBrandingArgs {
issuerBrandingId: string;
localeBranding: Array<IBasicIssuerLocaleBranding>;
}
interface IUpdateIssuerLocaleBrandingArgs {
localeBranding: Omit<ILocaleBranding, 'createdAt' | 'lastUpdatedAt'>;
}
interface IRemoveIssuerLocaleBrandingArgs {
filter: FindIssuerLocaleBrandingArgs;
}
interface IGetIssuerLocaleBrandingArgs {
filter?: FindIssuerLocaleBrandingArgs;
}
declare enum DocumentType {
VC = "VC",
VP = "VP",
P = "P",
C = "C"
}
declare enum RegulationType {
PID = "PID",
QEAA = "QEAA",
EAA = "EAA",
NON_REGULATED = "NON_REGULATED"
}
declare enum CredentialDocumentFormat {
JSON_LD = "JSON_LD",
JWT = "JWT",
SD_JWT = "SD_JWT",
MSO_MDOC = "MSO_MDOC"
}
declare namespace CredentialDocumentFormat {
function fromSpecValue(credentialFormat: string): CredentialDocumentFormat;
function toSpecValue(documentFormat: CredentialDocumentFormat, documentType: DocumentType): "vc+sd-jwt" | "mso_mdoc" | "ldp_vc" | "ldp_vp" | "jwt_vc_json" | "jwt_vp_json";
}
declare enum CredentialCorrelationType {
DID = "DID",
X509_SAN = "X509_SAN",
KID = "KID",
URL = "URL"
}
declare enum CredentialRole {
ISSUER = "ISSUER",
VERIFIER = "VERIFIER",
HOLDER = "HOLDER",
FEDERATION_TRUST_ANCHOR = "FEDERATION_TRUST_ANCHOR"
}
declare enum CredentialStateType {
REVOKED = "REVOKED",
VERIFIED = "VERIFIED",
EXPIRED = "EXPIRED"
}
/**
* DigitalCredential
*
* @public
*/
type DigitalCredential = {
id: string;
parentId?: string;
documentType: DocumentType;
documentFormat: CredentialDocumentFormat;
credentialRole: CredentialRole;
regulationType: RegulationType;
rawDocument: string;
uniformDocument: string;
credentialId?: string;
hash: string;
kmsKeyRef?: string;
identifierMethod?: string;
issuerCorrelationType: CredentialCorrelationType;
subjectCorrelationType?: CredentialCorrelationType;
rpCorrelationType?: CredentialCorrelationType;
isIssuerSigned?: boolean;
issuerCorrelationId: string;
subjectCorrelationId?: string;
rpCorrelationId?: string;
verifiedState?: CredentialStateType;
tenantId?: string;
createdAt: Date;
presentedAt?: Date;
lastUpdatedAt: Date;
validUntil?: Date;
validFrom?: Date;
verifiedAt?: Date;
revokedAt?: Date;
};
type NonPersistedDigitalCredential = Omit<DigitalCredential, 'id' | 'regulationType'> & {
regulationType?: RegulationType;
};
declare class DigitalCredentialEntity extends BaseEntity$8 implements DigitalCredential {
id: string;
parentId?: string;
documentType: DocumentType;
regulationType: RegulationType;
documentFormat: CredentialDocumentFormat;
credentialRole: CredentialRole;
rawDocument: string;
uniformDocument: string;
credentialId: string;
hash: string;
kmsKeyRef: string;
identifierMethod: string;
issuerCorrelationType: CredentialCorrelationType;
subjectCorrelationType?: CredentialCorrelationType;
rpCorrelationType?: CredentialCorrelationType;
isIssuerSigned?: boolean;
issuerCorrelationId: string;
subjectCorrelationId?: string;
rpCorrelationId?: string;
verifiedState?: CredentialStateType;
tenantId?: string;
createdAt: Date;
presentedAt?: Date;
lastUpdatedAt: Date;
validUntil?: Date;
validFrom?: Date;
verifiedAt?: Date;
revokedAt?: Date;
}
type GetCredentialArgs = {
id: string;
} | {
hash: string;
};
type FindDigitalCredentialArgs = Array<Partial<DigitalCredential>>;
type GetCredentialsArgs = {
filter?: FindDigitalCredentialArgs;
offset?: number;
limit?: number;
order?: string | FindOptionsOrder<DigitalCredentialEntity>;
};
type GetCredentialsResponse = {
data: Array<DigitalCredential>;
total: number;
};
type AddCredentialArgs = {
rawDocument: string;
kmsKeyRef?: string;
identifierMethod?: string;
regulationType?: RegulationType;
parentId?: string;
issuerCorrelationType: CredentialCorrelationType;
subjectCorrelationType?: CredentialCorrelationType;
issuerCorrelationId: string;
subjectCorrelationId?: string;
credentialRole: CredentialRole;
tenantId?: string;
state?: CredentialStateType;
verifiedAt?: Date;
revokedAt?: Date;
opts?: {
maxTimeSkewInMS?: number;
hasher?: HasherSync;
};
};
type UpdateCredentialStateArgs = GetCredentialArgs & {
verifiedState: CredentialStateType;
verifiedAt?: Date;
revokedAt?: Date;
};
type RemoveCredentialArgs = GetCredentialArgs;
type MetadataTypes = string | number | Date | boolean | undefined;
interface IMetadataEntity {
label: string;
stringValue?: string;
numberValue?: number;
dateValue?: Date;
boolValue?: boolean;
}
type Party = {
id: string;
uri?: string;
roles: Array<CredentialRole>;
ownerId?: string;
tenantId?: string;
identities: Array<Identity>;
electronicAddresses: Array<ElectronicAddress>;
physicalAddresses: Array<PhysicalAddress>;
contact: Contact;
partyType: PartyType;
/**
* TODO: Integrate branding logic here in the future. What we should do is make the issuance branding plugin part of the contact-manager and retrieve any branding there is.
*
* Currently, we are only defining the branding type within the SDK without implementing the associated logic. This is because:
* 1. We are combining two types from the SSI-SDK to create a new type that will be used across multiple places in the wallets (web & mobile).
* 2. While it makes sense to have this combined type in the SDK, the logic to support database connections for these types is complex. The types belong to different modules, and we don't use them together currently.
* 3. Implementing the full logic now would require significant changes and cross-module interactions, which we don't have the time to address at present.
*
* For now, we are defining the type here and will use it in the mobile wallet has the logic for it. This is a temporary solution until we have the resources to integrate the branding logic fully.
*/
branding?: IIssuerLocaleBranding;
relationships: Array<PartyRelationship>;
createdAt: Date;
lastUpdatedAt: Date;
};
type NonPersistedParty = Omit<Party, 'id' | 'identities' | 'electronicAddresses' | 'physicalAddresses' | 'contact' | 'roles' | 'partyType' | 'relationships' | 'createdAt' | 'lastUpdatedAt'> & {
identities?: Array<NonPersistedIdentity>;
electronicAddresses?: Array<NonPersistedElectronicAddress>;
physicalAddresses?: Array<NonPersistedPhysicalAddress>;
contact: NonPersistedContact;
partyType: NonPersistedPartyType;
relationships?: Array<NonPersistedPartyRelationship>;
};
type PartialParty = Partial<Omit<Party, 'identities' | 'electronicAddresses' | 'physicalAddresses' | 'contact' | 'partyType' | 'relationships'>> & {
identities?: PartialIdentity;
electronicAddresses?: PartialElectronicAddress;
physicalAddresses?: PartialPhysicalAddress;
contact?: PartialContact;
partyType?: PartialPartyType;
relationships?: PartialPartyRelationship;
};
type Identity = {
id: string;
alias: string;
ownerId?: string;
tenantId?: string;
origin: IdentityOrigin;
roles: Array<CredentialRole>;
identifier: CorrelationIdentifier;
connection?: Connection;
metadata?: Array<MetadataItem<MetadataTypes>>;
createdAt: Date;
lastUpdatedAt: Date;
};
type NonPersistedIdentity = Omit<Identity, 'id' | 'identifier' | 'connection' | 'metadata' | 'origin' | 'createdAt' | 'lastUpdatedAt'> & {
origin: IdentityOrigin;
identifier: NonPersistedCorrelationIdentifier;
connection?: NonPersistedConnection;
metadata?: Array<NonPersistedMetadataItem<MetadataTypes>>;
};
type PartialIdentity = Partial<Omit<Identity, 'identifier' | 'connection' | 'metadata' | 'origin' | 'roles'>> & {
identifier?: PartialCorrelationIdentifier;
connection?: PartialConnection;
metadata?: PartialMetadataItem<MetadataTypes>;
origin?: IdentityOrigin;
roles?: CredentialRole;
partyId?: string;
};
type MetadataItem<T extends MetadataTypes> = {
id: string;
label: string;
value: T;
};
type NonPersistedMetadataItem<T extends MetadataTypes> = Omit<MetadataItem<T>, 'id'>;
type PartialMetadataItem<T extends MetadataTypes> = Partial<MetadataItem<T>>;
type CorrelationIdentifier = {
id: string;
ownerId?: string;
tenantId?: string;
type: CorrelationIdentifierType;
correlationId: string;
};
type NonPersistedCorrelationIdentifier = Omit<CorrelationIdentifier, 'id'>;
type PartialCorrelationIdentifier = Partial<CorrelationIdentifier>;
type Connection = {
id: string;
ownerId?: string;
tenantId?: string;
type: ConnectionType;
config: ConnectionConfig;
};
type NonPersistedConnection = Omit<Connection, 'id' | 'config'> & {
config: NonPersistedConnectionConfig;
};
type PartialConnection = Partial<Omit<Connection, 'config'>> & {
config: PartialConnectionConfig;
};
type OpenIdConfig = {
id: string;
clientId: string;
clientSecret: string;
ownerId?: string;
tenantId?: string;
scopes: Array<string>;
issuer: string;
redirectUrl: string;
dangerouslyAllowInsecureHttpRequests: boolean;
clientAuthMethod: 'basic' | 'post' | undefined;
};
type NonPersistedOpenIdConfig = Omit<OpenIdConfig, 'id'>;
type PartialOpenIdConfig = Partial<OpenIdConfig>;
type DidAuthConfig = {
id: string;
idOpts: ManagedIdentifierOptsOrResult;
stateId: string;
ownerId?: string;
tenantId?: string;
redirectUrl: string;
sessionId: string;
};
type NonPersistedDidAuthConfig = Omit<DidAuthConfig, 'id'>;
type PartialDidAuthConfig = Partial<Omit<DidAuthConfig, 'identifier'>> & {
identifier: Partial<IIdentifier>;
};
type ConnectionConfig = OpenIdConfig | DidAuthConfig;
type NonPersistedConnectionConfig = NonPersistedDidAuthConfig | NonPersistedOpenIdConfig;
type PartialConnectionConfig = PartialOpenIdConfig | PartialDidAuthConfig;
type NaturalPerson = {
id: string;
firstName: string;
lastName: string;
middleName?: string;
displayName: string;
metadata?: Array<MetadataItem<MetadataTypes>>;
ownerId?: string;
tenantId?: string;
createdAt: Date;
lastUpdatedAt: Date;
};
type NonPersistedNaturalPerson = Omit<NaturalPerson, 'id' | 'createdAt' | 'lastUpdatedAt'>;
type PartialNaturalPerson = Partial<Omit<NaturalPerson, 'metadata'>> & {
metadata?: PartialMetadataItem<MetadataTypes>;
};
type Organization = {
id: string;
legalName: string;
displayName: string;
metadata?: Array<MetadataItem<MetadataTypes>>;
ownerId?: string;
tenantId?: string;
createdAt: Date;
lastUpdatedAt: Date;
};
type NonPersistedOrganization = Omit<Organization, 'id' | 'createdAt' | 'lastUpdatedAt'>;
type PartialOrganization = Partial<Omit<Organization, 'metadata'>> & {
metadata?: PartialMetadataItem<MetadataTypes>;
};
type Contact = NaturalPerson | Organization;
type NonPersistedContact = NonPersistedNaturalPerson | NonPersistedOrganization;
type PartialContact = PartialNaturalPerson | PartialOrganization;
type PartyType = {
id: string;
type: PartyTypeType;
origin: PartyOrigin;
name: string;
tenantId: string;
description?: string;
createdAt: Date;
lastUpdatedAt: Date;
};
type NonPersistedPartyType = Omit<PartyType, 'id' | 'createdAt' | 'lastUpdatedAt'> & {
id?: string;
};
type PartialPartyType = Partial<PartyType>;
type PartyRelationship = {
id: string;
leftId: string;
rightId: string;
ownerId?: string;
tenantId?: string;
createdAt: Date;
lastUpdatedAt: Date;
};
type NonPersistedPartyRelationship = Omit<PartyRelationship, 'id' | 'createdAt' | 'lastUpdatedAt'>;
type PartialPartyRelationship = Partial<PartyRelationship>;
type ElectronicAddress = {
id: string;
type: ElectronicAddressType;
electronicAddress: string;
ownerId?: string;
tenantId?: string;
createdAt: Date;
lastUpdatedAt: Date;
};
type NonPersistedElectronicAddress = Omit<ElectronicAddress, 'id' | 'createdAt' | 'lastUpdatedAt'>;
type PartialElectronicAddress = Partial<ElectronicAddress> & {
partyId?: string;
};
type PhysicalAddress = {
id: string;
type: PhysicalAddressType;
streetName: string;
streetNumber: string;
postalCode: string;
cityName: string;
provinceName: string;
countryCode: string;
buildingName?: string;
ownerId?: string;
tenantId?: string;
createdAt: Date;
lastUpdatedAt: Date;
};
type NonPersistedPhysicalAddress = Omit<PhysicalAddress, 'id' | 'createdAt' | 'lastUpdatedAt'>;
type PartialPhysicalAddress = Partial<PhysicalAddress> & {
partyId?: string;
};
type ElectronicAddressType = 'email' | 'phone';
type PhysicalAddressType = 'home' | 'visit' | 'postal';
declare enum ConnectionType {
OPENID_CONNECT = "OIDC",
SIOPv2 = "SIOPv2",
SIOPv2_OpenID4VP = "SIOPv2+OpenID4VP"
}
declare enum CorrelationIdentifierType {
DID = "did",
URL = "url"
}
declare enum PartyTypeType {
NATURAL_PERSON = "naturalPerson",
ORGANIZATION = "organization"
}
declare enum PartyOrigin {
INTERNAL = "INTERNAL",
EXTERNAL = "EXTERNAL"
}
declare enum IdentityOrigin {
INTERNAL = "INTERNAL",
EXTERNAL = "EXTERNAL"
}
type FindPartyArgs = Array<PartialParty>;
type FindIdentityArgs = Array<PartialIdentity>;
type FindPartyTypeArgs = Array<PartialPartyType>;
type FindRelationshipArgs = Array<PartialPartyRelationship>;
type FindElectronicAddressArgs = Array<PartialElectronicAddress>;
type FindPhysicalAddressArgs = Array<PartialPhysicalAddress>;
type GetPartyArgs = {
partyId: string;
};
type GetPartiesArgs = {
filter?: FindPartyArgs;
};
type AddPartyArgs = {
uri?: string;
partyType: NonPersistedPartyType;
contact: NonPersistedContact;
identities?: Array<NonPersistedIdentity>;
electronicAddresses?: Array<NonPersistedElectronicAddress>;
physicalAddresses?: Array<NonPersistedPhysicalAddress>;
};
type UpdatePartyArgs = {
party: Omit<Party, 'identities' | 'electronicAddresses' | 'partyType' | 'createdAt' | 'lastUpdatedAt'>;
};
type RemovePartyArgs = {
partyId: string;
};
type GetIdentityArgs = {
identityId: string;
};
type GetIdentitiesArgs = {
filter?: FindIdentityArgs;
};
type AddIdentityArgs = {
partyId: string;
identity: NonPersistedIdentity;
};
type UpdateIdentityArgs = {
identity: Identity;
};
type RemoveIdentityArgs = {
identityId: string;
};
type RemoveRelationshipArgs = {
relationshipId: string;
};
type AddRelationshipArgs = {
leftId: string;
rightId: string;
};
type GetRelationshipArgs = {
relationshipId: string;
};
type GetRelationshipsArgs = {
filter: FindRelationshipArgs;
};
type UpdateRelationshipArgs = {
relationship: Omit<PartyRelationship, 'createdAt' | 'lastUpdatedAt'>;
};
type AddPartyTypeArgs = {
type: PartyTypeType;
origin: PartyOrigin;
name: string;
tenantId: string;
description?: string;
};
type GetPartyTypeArgs = {
partyTypeId: string;
};
type GetPartyTypesArgs = {
filter?: FindPartyTypeArgs;
};
type UpdatePartyTypeArgs = {
partyType: Omit<PartyType, 'createdAt' | 'lastUpdatedAt'>;
};
type RemovePartyTypeArgs = {
partyTypeId: string;
};
type GetElectronicAddressArgs = {
electronicAddressId: string;
};
type GetElectronicAddressesArgs = {
filter?: FindElectronicAddressArgs;
};
type AddElectronicAddressArgs = {
partyId: string;
electronicAddress: NonPersistedElectronicAddress;
};
type UpdateElectronicAddressArgs = {
electronicAddress: ElectronicAddress;
};
type RemoveElectronicAddressArgs = {
electronicAddressId: string;
};
type GetPhysicalAddressArgs = {
physicalAddressId: string;
};
type GetPhysicalAddressesArgs = {
filter?: FindPhysicalAddressArgs;
};
type AddPhysicalAddressArgs = {
partyId: string;
physicalAddress: NonPersistedPhysicalAddress;
};
type UpdatePhysicalAddressArgs = {
physicalAddress: PhysicalAddress;
};
type RemovePhysicalAddressArgs = {
physicalAddressId: string;
};
type PresentationDefinitionItem = {
id: string;
definitionId: string;
tenantId?: string;
version: string;
name?: string;
purpose?: string;
definitionPayload: IPresentationDefinition;
dcqlPayload?: DcqlQueryREST;
createdAt: Date;
lastUpdatedAt: Date;
};
type NonPersistedPresentationDefinitionItem = Omit<PresentationDefinitionItem, 'id' | 'createdAt' | 'lastUpdatedAt'>;
type PartialPresentationDefinitionItem = Partial<PresentationDefinitionItem>;
type PresentationDefinitionItemFilter = Partial<Omit<PresentationDefinitionItem, 'definitionPayload' | 'dcqlPayload'>>;
type FindDefinitionArgs = Array<PresentationDefinitionItemFilter>;
type GetDefinitionArgs = {
itemId: string;
};
type HasDefinitionArgs = GetDefinitionArgs;
type GetDefinitionsArgs = {
filter?: FindDefinitionArgs;
};
type HasDefinitionsArgs = GetDefinitionsArgs;
type AddDefinitionArgs = NonPersistedPresentationDefinitionItem;
type UpdateDefinitionArgs = PresentationDefinitionItem;
type DeleteDefinitionArgs = {
itemId: string;
};
type DeleteDefinitionsArgs = GetDefinitionsArgs;
type ValidationConstraint = {
[x: string]: string;
};
declare class StatusListEntryEntity extends BaseEntity$8 {
statusListId: string;
statusListIndex: number;
statusList: StatusListEntity;
credentialId?: string;
credentialHash?: string;
entryCorrelationId?: string;
value?: string;
}
declare const BaseEntity$7: typeof typeorm.BaseEntity;
declare abstract class StatusListEntity extends BaseEntity$7 {
id: string;
correlationId: string;
length: number;
issuer: string | IIssuer;
driverType: StatusListDriverType;
credentialIdMode: StatusListCredentialIdMode;
proofFormat: CredentialProofFormat;
statusListCredential?: StatusListCredential;
statusListEntries: StatusListEntryEntity[];
}
declare class StatusList2021Entity extends StatusListEntity {
indexingDirection: StatusListIndexingDirection;
statusPurpose: StatusPurpose2021;
}
declare class OAuthStatusListEntity extends StatusListEntity {
bitsPerStatus: number;
expiresAt?: Date;
}
interface IStatusListEntity {
id: string;
correlationId: string;
driverType: StatusListDriverType;
credentialIdMode: StatusListCredentialIdMode;
length: number;
issuer: string | IIssuer;
type: StatusListType;
proofFormat: CredentialProofFormat;
statusListCredential?: StatusListCredential;
}
interface IStatusList2021Entity extends IStatusListEntity {
indexingDirection: StatusListIndexingDirection;
statusPurpose: StatusPurpose2021;
}
interface IOAuthStatusListEntity extends IStatusListEntity {
bitsPerStatus: number;
expiresAt?: Date;
}
type IStatusListEntryEntity = RequireOneOf<{
statusList: StatusListEntity;
statusListId: string;
value?: string;
statusListIndex: number;
credentialHash?: string;
credentialId?: string;
correlationId?: string;
}, 'statusList' | 'statusListId'>;
type FindStatusListArgs = FindOptionsWhere<IStatusList2021Entity | IOAuthStatusListEntity>[];
type FindStatusListEntryArgs = FindOptionsWhere<IStatusListEntryEntity>[] | FindOptionsWhere<IStatusListEntryEntity>;
interface IStatusListEntryAvailableArgs {
statusListId?: string;
correlationId?: string;
statusListIndex: number | number[];
}
interface IGetStatusListEntryByIndexArgs {
statusListId?: string;
statusListCorrelationId?: string;
statusListIndex?: number;
entryCorrelationId?: string;
errorOnNotFound?: boolean;
}
interface IGetStatusListEntryByCredentialIdArgs {
statusListId?: string;
statusListCorrelationId?: string;
entryCorrelationId?: string;
credentialId: string;
errorOnNotFound?: boolean;
}
interface IGetStatusListEntriesArgs {
statusListId: string;
filter?: FindStatusListEntryArgs;
}
type IAddStatusListEntryArgs = IStatusListEntryEntity;
interface IGetStatusListArgs {
id?: string;
correlationId?: string;
}
type IRemoveStatusListArgs = IGetStatusListArgs;
interface IGetStatusListsArgs {
filter?: FindStatusListArgs;
}
type IAddStatusListArgs = IStatusListEntity;
type IUpdateStatusListIndexArgs = IStatusListEntity;
type NonPersistedAuditLoggingEvent = Omit<AuditLoggingEvent, 'id' | 'type'>;
type NonPersistedActivityLoggingEvent = Omit<ActivityLoggingEvent, 'id' | 'type'>;
type FindAuditLoggingEventArgs = Array<PartialAuditLoggingEvent>;
type FindActivityLoggingEventArgs = Array<PartialActivityLoggingEvent>;
type StoreAuditEventArgs = {
event: NonPersistedAuditLoggingEvent;
};
type StoreActivityEventArgs = {
event: NonPersistedActivityLoggingEvent;
};
type GetAuditEventsArgs = {
filter?: FindAuditLoggingEventArgs;
};
type GetActivityEventsArgs = {
filter?: FindActivityLoggingEventArgs;
};
type StoreMachineStatePersistArgs = Omit<StoreMachineStateInfo, 'createdAt' | 'updatedAt'>;
type StoreMachineStatesFindActiveArgs = Partial<Pick<StoreMachineStateInfo, 'machineName' | 'tenantId' | 'instanceId'>>;
type FindMachineStatesFilterArgs = Array<Partial<Omit<StoreMachineStateInfo, 'state'>>>;
type StoreFindMachineStatesArgs = {
filter: FindMachineStatesFilterArgs;
};
type StoreMachineStateGetArgs = Pick<StoreMachineStateInfo, 'instanceId' | 'tenantId'>;
type StoreMachineStateDeleteArgs = StoreMachineStateGetArgs;
type StoreMachineStateDeleteExpiredArgs = {
machineName?: string;
tenantId?: string;
deleteDoneStates?: boolean;
};
interface StoreMachineStateInfo {
/**
* Unique instance ID of the machine
*/
instanceId: string;
/**
* Session Id of the machine. Not necessarily unique
*/
sessionId?: string;
/**
* Machine name
*/
machineName: string;
/**
* The latest state name. Can be empty for a newly initialize machine
*/
latestStateName?: string;
/**
* event types like SET_TOC, SET_FIRSTNAME, .... Will be xstate.init on a newly initialized machine
*/
latestEventType: string;
/**
* Serialized Machine state
*/
state: string;
/**
* Represents the creation date
*/
createdAt: Date;
/**
* Represents the expiration date
*/
expiresAt?: Date;
/**
* Represents the update date
*/
updatedAt: Date;
/**
* Represents a counter for tracking updates.
*/
updatedCount: number;
completedAt?: Date;
tenantId?: string;
}
declare const BaseEntity$6: typeof typeorm.BaseEntity;
declare class CorrelationIdentifierEntity extends BaseEntity$6 {
id: string;
type: CorrelationIdentifierType;
correlationId: string;
ownerId?: string;
tenantId?: string;
identity: IdentityEntity;
validate(): Promise<void>;
}
declare class IdentityMetadataItemEntity extends BaseEntity$8 implements IMetadataEntity {
id: string;
label: string;
valueType: string;
stringValue?: string;
numberValue?: number;
dateValue?: Date;
boolValue?: boolean;
identity: IdentityEntity;
validate(): Promise<void>;
}
declare class PartyTypeEntity {
id: string;
type: PartyTypeType;
origin: PartyOrigin;
name: string;
description?: string;
tenantId: string;
parties: Array<PartyEntity>;
createdAt: Date;
lastUpdatedAt: Date;
updateUpdatedDate(): void;
validate(): Promise<void>;
}
declare const BaseEntity$5: typeof typeorm.BaseEntity;
declare class ContactMetadataItemEntity extends BaseEntity$5 implements IMetadataEntity {
id: string;
label: string;
valueType: string;
stringValue?: string;
numberValue?: number;
dateValue?: Date;
boolValue?: boolean;
contact: BaseContactEntity;
validate(): Promise<void>;
}
declare const BaseEntity$4: typeof typeorm.BaseEntity;
declare abstract class BaseContactEntity extends BaseEntity$4 {
id: string;
createdAt: Date;
lastUpdatedAt: Date;
party: PartyEntity;
metadata: Array<ContactMetadataItemEntity>;
updateUpdatedDate(): void;
}
declare class PartyRelationshipEntity {
id: string;
left: PartyEntity;
leftId: string;
right: PartyEntity;
rightId: string;
ownerId?: string;
tenantId?: string;
createdAt: Date;
lastUpdatedAt: Date;
updateUpdatedDate(): void;
checkRelationshipSides(): Promise<void>;
}
declare const BaseEntity$3: typeof typeorm.BaseEntity;
declare class ElectronicAddressEntity extends BaseEntity$3 {
id: string;
type: ElectronicAddressType;
electronicAddress: string;
party: PartyEntity;
partyId?: string;
ownerId?: string;
tenantId?: string;
createdAt: Date;
lastUpdatedAt: Date;
updateUpdatedDate(): void;
validate(): Promise<void>;
}
declare class PhysicalAddressEntity extends BaseEntity$8 {
id: string;
type: PhysicalAddressType;
streetName: string;
streetNumber: string;
postalCode: string;
cityName: string;
provinceName: string;
countryCode: string;
buildingName?: string;
ownerId?: string;
tenantId?: string;
party: PartyEntity;
partyId?: string;
createdAt: Date;
lastUpdatedAt: Date;
updateUpdatedDate(): void;
validate(): Promise<void>;
}
declare class PartyEntity extends BaseEntity$8 {
id: string;
uri?: string;
ownerId?: string;
tenantId?: string;
identities: Array<IdentityEntity>;
electronicAddresses: Array<ElectronicAddressEntity>;
physicalAddresses: Array<PhysicalAddressEntity>;
partyType: PartyTypeEntity;
contact: BaseContactEntity;
relationships: Array<PartyRelationshipEntity>;
createdAt: Date;
lastUpdatedAt: Date;
updateUpdatedDate(): void;
validate(): Promise<void>;
}
declare class IdentityEntity extends BaseEntity$8 {
id: string;
alias: string;
origin: IdentityOrigin;
ownerId?: string;
tenantId?: string;
roles: Array<CredentialRole>;
identifier: CorrelationIdentifierEntity;
connection?: ConnectionEntity;
metadata: Array<IdentityMetadataItemEntity>;
createdAt: Date;
lastUpdatedAt: Date;
party: PartyEntity;
partyId?: string;
updateUpdatedDate(): void;
validate(): Promise<void>;
}
declare const BaseEntity$2: typeof typeorm.BaseEntity;
declare class ConnectionEntity extends BaseEntity$2 {
id: string;
type: ConnectionType;
tenantId?: string;
ownerId?: string;
config: BaseConfigEntity;
identity: IdentityEntity;
}
declare const BaseEntity$1: typeof typeorm.BaseEntity;
declare abstract class BaseConfigEntity extends BaseEntity$1 {
id: string;
connection?: ConnectionEntity;
}
declare class ImageDimensionsEntity extends BaseEntity$8 {
id: string;
width: number;
height: number;
}
declare class ImageAttributesEntity extends BaseEntity$8 {
id: string;
uri?: string;
dataUri?: string;
mediaType?: string;
alt?: string;
dimensions?: ImageDimensionsEntity;
validate(): Promise<undefined>;
}
declare class BackgroundAttributesEntity extends BaseEntity$8 {
id: string;
color?: string;
image?: ImageAttributesEntity;
validate(): Promise<undefined>;
}
declare class TextAttributesEntity extends BaseEntity$8 {
id: string;
color?: string;
validate(): Promise<undefined>;
}
declare const BaseEntity: typeof typeorm.BaseEntity;
declare class BaseLocaleBrandingEntity extends BaseEntity {
id: string;
alias?: string;
locale?: string;
logo?: ImageAttributesEntity;
description?: string;
background?: BackgroundAttributesEntity;
text?: TextAttributesEntity;
createdAt: Date;
lastUpdatedAt: Date;
updateUpdatedDate(): void;
validate(): Promise<undefined>;
}
declare class DidAuthConfigEntity extends BaseConfigEntity {
identifier: string;
redirectUrl: string;
sessionId: string;
ownerId?: string;
tenantId?: string;
}
declare class OpenIdConfigEntity extends BaseConfigEntity {
clientId: string;
clientSecret: string;
scopes: Array<string>;
issuer: string;
redirectUrl: string;
dangerouslyAllowInsecureHttpRequests: boolean;
clientAuthMethod: 'basic' | 'post' | undefined;
ownerId?: string;
tenantId?: string;
}
declare class CredentialClaimsEntity extends BaseEntity$8 {
id: string;
key: string;
name: string;
credentialLocaleBranding: CredentialLocaleBrandingEntity;
validate(): Promise<undefined>;
}
declare class CredentialLocaleBrandingEntity extends BaseLocaleBrandingEntity {
credentialBranding: CredentialBrandingEntity;
claims: Array<CredentialClaimsEntity>;
credentialBrandingId: string;
}
declare class CredentialBrandingEntity extends BaseEntity$8 {
id: string;
vcHash: string;
issuerCorrelationId: string;
localeBranding: Array<CredentialLocaleBrandingEntity>;
createdAt: Date;
lastUpdatedAt: Date;
updateUpdatedDate(): void;
validate(): Promise<undefined>;
}
declare class IssuerBrandingEntity extends BaseEntity$8 {
id: string;
issuerCorrelationId: string;
localeBranding: Array<IssuerLocaleBrandingEntity>;
createdAt: Date;
lastUpdatedAt: Date;
updateUpdatedDate(): void;
validate(): Promise<undefined>;
}
declare class IssuerLocaleBrandingEntity extends BaseLocaleBrandingEntity {
issuerBranding: IssuerBrandingEntity;
clientUri?: string;
tosUri?: string;
policyUri?: string;
contacts?: Array<string>;
issuerBrandingId: string;
}
/**
* @class MachineStateInfoEntity
* Represents a machine state. It allows to continue a machine at a later point in time at the point it was left of
*
* @param {string} instanceId - The instance ID of the machine state.
* @param {string} [sessionId] - The session ID of the machine state. (optional)
* @param {string} machineName - The name of the machine.
* @param {string} [latestStateName] - The name of the latest state. (optional)
* @param {string} latestEventType - The type of the latest event.
* @param {string} state - The current state of the machine.
* @param {Date} createdAt - The date and time when the machine state was created.
* @param {Date} updatedAt - The date and time when the machine state was last updated.
* @param {number} updatedCount - The number of times the machine state has been updated.
* @param {Date} [expiresAt] - The date and time when the machine state expires. (optional)
* @param {Date} [completedAt] - The date and time when the machine state was completed. (optional)
* @param {string} [tenantId] - The ID of the tenant associated with the machine state. (optional)
*/
declare class MachineStateInfoEntity extends BaseEntity$8 {
instanceId: string;
sessionId?: string;
machineName: string;
latestStateName?: string;
latestEventType: string;
state: string;
createdAt: Date;
updatedAt: Date;
updatedCount: number;
expiresAt?: Date;
completedAt?: Date;
tenantId?: string;
}
declare class AuditEventEntity extends BaseEntity$8 {
id: string;
timestamp: Date;
type: LoggingEventType;
level: LogLevel;
correlationId: string;
system: System;
subSystemType: SubSystem;
actionType: ActionType;
actionSubType: ActionSubType;
initiatorType: InitiatorType;
systemCorrelationIdType?: SystemCorrelationIdType;
systemCorrelationId?: string;
systemAlias?: string;
partyCorrelationType?: PartyCorrelationType;
partyCorrelationId?: string;
partyAlias?: string;
description: string;
credentialType?: CredentialType;
credentialHash?: string;
parentCredentialHash?: string;
originalCredential?: string;
sharePurpose?: string;
data?: string;
diagnosticData?: string;
createdAt: Date;
lastUpdatedAt: Date;
}
declare class PresentationDefinitionItemEntity extends BaseEntity$8 {
id: string;
definitionId: string;
version: string;
tenantId?: string;
purpose?: string;
name?: string;
definitionPayload: string;
dcqlPayload: string;
createdAt: Date;
lastUpdatedAt: Date;
updateUpdatedDate(): void;
}
declare class Oid4vcStateEntity<StateType> extends BaseEntity$8 {
id: string;
lookups?: Array<string>;
stateId?: string;
correlationId?: string;
state: StateType;
createdAt: Date;
updatedAt: Date;
expiresAt?: Date;
tenantId?: string;
}
declare abstract class AbstractContactStore {
abstract getParty(args: GetPartyArgs): Promise<Party>;
abstract getParties(args?: GetPartiesArgs): Promise<Array<Party>>;
abstract addParty(args: AddPartyArgs): Promise<Party>;
abstract updateParty(args: UpdatePartyArgs): Promise<Party>;
abstract removeParty(args: RemovePartyArgs): Promise<void>;
abstract getIdentity(args: GetIdentityArgs): Promise<Identity>;
abstract getIdentities(args?: GetIdentitiesArgs): Promise<Array<Identity>>;
abstract addIdentity(args: AddIdentityArgs): Promise<Identity>;
abstract updateIdentity(args: UpdateIdentityArgs): Promise<Identity>;
abstract removeIdentity(args: RemoveIdentityArgs): Promise<void>;
abstract getRelationship(args: GetRelationshipArgs): Promise<PartyRelationship>;
abstract getRelationships(args?: GetRelationshipsArgs): Promise<Array<PartyRelationship>>;
abstract addRelationship(args: AddRelationshipArgs): Promise<PartyRelationship>;
abstract updateRelationship(args: UpdateRelationshipArgs): Promise<PartyRelationship>;
abstract removeRelationship(args: RemoveRelationshipArgs): Promise<void>;
abstract getPartyType(args: GetPartyTypeArgs): Promise<PartyType>;
abstract getPartyTypes(args?: GetPartyTypesArgs): Promise<Array<PartyType>>;
abstract addPartyType(args: AddPartyTypeArgs): Promise<PartyType>;
abstract updatePartyType(args: UpdatePartyTypeArgs): Promise<PartyType>;
abstract removePartyType(args: RemovePartyTypeArgs): Promise<void>;
abstract getElectronicAddress(args: GetElectronicAddressArgs): Promise<ElectronicAddress>;
abstract getElectronicAddresses(args?: GetElectronicAddressesArgs): Promise<Array<ElectronicAddress>>;
abstract addElectronicAddress(args: AddElectronicAddressArgs): Promise<ElectronicAddress>;
abstract updateElectronicAddress(args: UpdateElectronicAddressArgs): Promise<ElectronicAddress>;
abstract removeElectronicAddress(args: RemoveElectronicAddressArgs): Promise<void>;
abstract getPhysicalAddress(args: GetPhysicalAddressArgs): Promise<PhysicalAddress>;
abstract getPhysicalAddresses(args?: GetPhysicalAddressesArgs): Promise<Array<PhysicalAddress>>;
abstract addPhysicalAddress(args: AddPhysicalAddressArgs): Promise<PhysicalAddress>;
abstract updatePhysicalAddress(args: UpdatePhysicalAddressArgs): Promise<PhysicalAddress>;
abstract removePhysicalAddress(args: RemovePhysicalAddressArgs): Promise<void>;
}
declare class ContactStore extends AbstractContactStore {
private readonly dbConnection;
constructor(dbConnection: OrPromise<DataSource>);
getParty: (args: GetPartyArgs) => Promise<Party>;
getParties: (args?: GetPartiesArgs) => Promise<Array<Party>>;
addParty: (args: AddPartyArgs) => Promise<Party>;
updateParty: (args: UpdatePartyArgs) => Promise<Party>;
removeParty: (args: RemovePartyArgs) => Promise<void>;
getIdentity: (args: GetIdentityArgs) => Promise<Identity>;
getIdentities: (args?: GetIdentitiesArgs) => Promise<Array<Identity>>;
addIdentity: (args: AddIdentityArgs) => Promise<Identity>;
updateIdentity: (args: UpdateIdentityArgs) => Promise<Identity>;
removeIdentity: (args: RemoveIdentityArgs) => Promise<void>;
addRelationship: (args: AddRelationshipArgs) => Promise<PartyRelationship>;
getRelationship: (args: GetRelationshipArgs) => Promise<PartyRelationship>;
getRelationships: (args?: GetRelationshipsArgs) => Promise<Array<PartyRelationship>>;
updateRelationship: (args: UpdateRelationshipArgs) => Promise<PartyRelationship>;
removeRelationship: (args: RemoveRelationshipArgs) => Promise<void>;
addPartyType: (args: AddPartyTypeArgs) => Promise<PartyType>;
getPartyType: (args: GetPartyTypeArgs) => Promise<PartyType>;
getPartyTypes: (args?: GetPartyTypesArgs) => Promise<Array<PartyType>>;
updatePartyType: (args: UpdatePartyTypeArgs) => Promise<PartyType>;
removePartyType: (args: RemovePartyTypeArgs) => Promise<void>;
getElectronicAddress: (args: GetElectronicAddressArgs) => Promise<ElectronicAddress>;
getElectronicAddresses: (args?: GetElectronicAddressesArgs) => Promise<Array<ElectronicAddress>>;
addElectronicAddress: (args: AddElectronicAddressArgs) => Promise<ElectronicAddress>;
updateElectronicAddress: (args: UpdateElectronicAddressArgs) => Promise<ElectronicAddress>;
removeElectronicAddress: (args: RemoveElectronicAddressArgs) => Promise<void>;
getPhysicalAddress: (args: GetPhysicalAddressArgs) => Promise<PhysicalAddress>;
getPhysicalAddresses: (args?: GetPhysicalAddressesArgs) => Promise<Array<PhysicalAddress>>;
addPhysicalAddress: (args: AddPhysicalAddressArgs) => Promise<PhysicalAddress>;
updatePhysicalAddress: (args: UpdatePhysicalAddressArgs) => Promise<PhysicalAddress>;
removePhysicalAddress: (args: RemovePhysicalAddressArgs) => Promise<void>;
private hasCorrectConnectionConfig;
private hasCorrectPartyType;
private deleteIdentities;
private deleteElectronicAddresses;
private deletePhysicalAddresses;
private assertRelationshipSides;
private buildFilters;
private processCondition;
private buildMetadataCondition;
}
declare abstract class AbstractDigitalCredentialStore {
abstract getCredential(args: GetCredentialArgs): Promise<DigitalCredential>;
abstract getCredentials(args?: GetCredentialsArgs): Promise<GetCredentialsResponse>;
abstract addCredential(args: AddCredentialArgs): Promise<DigitalCredential>;
abstract updateCredentialState(args: UpdateCredentialStateArgs): Promise<DigitalCredential>;
abstract removeCredential(args: RemoveCredentialArgs): Promise<boolean>;
}
declare class DigitalCredentialStore extends AbstractDigitalCredentialStore {
private readonly dbConnection;
private dcRepo;
constructor(dbConnection: OrPromise<DataSource>);
addCredential: (args: AddCredentialArgs) => Promise<DigitalCredential>;
getCredential: (args: GetCredentialArgs) => Promise<DigitalCredential>;
getCredentials: (args?: GetCredentialsArgs) => Promise<GetCredentialsResponse>;
removeCredential: (args: RemoveCredentialArgs) => Promise<boolean>;
private deleteTree;
private getRepository;
updateCredentialState: (args: UpdateCredentialStateArgs) => Promise<DigitalCredential>;
private assertValidDigitalCredential;
}
declare abstract class AbstractIssuanceBrandingStore {
abstract addCredentialBranding(args: IAddCredentialBrandingArgs): Promise<ICredentialBranding>;
abstract getCredentialBranding(args?: IGetCredentialBrandingArgs): Promise<Array<ICredentialBranding>>;
abstract updateCredentialBranding(args: IUpdateCredentialBrandingArgs): Promise<ICredentialBranding>;
abstract removeCredentialBranding(args: IRemoveCredentialBrandingArgs): Promise<void>;
abstract addCredentialLocaleBranding(args: IAddCredentialLocaleBrandingArgs): Promise<ICredentialBranding>;
abstract getCredentialLocaleBranding(args?: IGetCredentialLocaleBrandingArgs): Promise<Array<ICredentialLocaleBranding>>;
abstract updateCredentialLocaleBranding(args: IUpdateCredentialLocaleBrandingArgs): Promise<ICredentialLocaleBranding>;
abstract removeCredentialLocaleBranding(args: IRemoveCredentialLocaleBrandingArgs): Promise<void>;
abstract addIssuerBranding(args: IAddIssuerBrandingArgs): Promise<IIssuerBranding>;
abstract getIssuerBranding(args?: IGetIssuerBrandingArgs): Promise<Array<IIssuerBranding>>;
abstract updateIssuerBranding(args: IUpdateIssuerBrandingArgs): Promise<IIssuerBranding>;
abstract removeIssuerBranding(args: IRemoveIssuerBrandingArgs): Promise<void>;
abstract addIssuerLocaleBranding(args: IAddIssuerLocaleBrandingArgs): Promise<IIssuerBranding>;
abstract getIssuerLocaleBranding(args?: IGetIssuerLocaleBrandingArgs): Promise<Array<IIssuerLocaleBranding>>;
abstract updateIssuerLocaleBranding(args: IUpdateIssuerLocaleBrandingArgs): Promise<IIssuerLocaleBranding>;
abstract removeIssuerLocaleBranding(args: IRemoveIssuerLocaleBrandingArgs): Promise<void>;
}
declare class IssuanceBrandingStore extends AbstractIssuanceBrandingStore {
private readonly dbConnection;
constructor(dbConnection: OrPromise<DataSource>);
addCredentialBranding: (args: IAddCredentialBrandingArgs) => Promise<ICredentialBranding>;
getCredentialBranding: (args?: IGetCredentialBrandingArgs) => Promise<Array<ICredentialBranding>>;
removeCredentialBranding: (args: IRemoveCredentialBrandingArgs) => Promise<void>;
updateCredentialBranding: (args: IUpdateCredentialBrandingArgs) => Promise<ICredentialBranding>;
addCredentialLocaleBranding: (args: IAddCredentialLocaleBrandingArgs) => Promise<ICredentialBranding>;
getCredentialLocaleBranding: (args?: IGetCredentialLocaleBrandingArgs) => Promise<Array<ICredentialLocaleBranding>>;
removeCredentialLocaleBranding: (args: IRemoveCredentialLocaleBrandingArgs) => Promise<void>;
updateCredentialLocaleBranding: (args: IUpdateCredentialLocaleBrandingArgs) => Promise<ICredentialLocaleBranding>;
addIssuerBranding: (args: IAddIssuerBrandingArgs) => Promise<IIssuerBranding>;
getIssuerBranding: (args?: IGetIssuerBrandingArgs) => Promise<Array<IIssuerBranding>>;
removeIssuerBranding: (args: IRemoveIssuerBrandingArgs) => Promise<void>;
updateIssuerBranding: (args: IUpdateIssuerBrandingArgs) => Promise<IIssuerBranding>;
addIssuerLocaleBranding: (args: IAddIssuerLocaleBrandingArgs) => Promise<IIssuerBranding>;
getIssuerLocaleBranding: (args?: IGetIssuerLocaleBrandingArgs) => Promise<Array<IIssuerLocaleBranding>>;
removeIssuerLocaleBranding: (args: IRemoveIssuerLocaleBrandingArgs) => Promise<void>;
updateIssuerLocaleBranding: (args: IUpdateIssuerLocaleBrandingArgs) => Promise<IIssuerLocaleBranding>;
private hasDuplicateLocales;
private removeLocaleBranding;
}
interface IStatusListStore {
getStatusList(args: IGetStatusListArgs): Promise<IStatusListEntity>;
getStatusLists(args: IGetStatusListsArgs): Promise<Array<IStatusListEntity>>;
removeStatusList(args: IRemoveStatusListArgs): Promise<boolean>;
addStatusList(args: IAddStatusL