Skip to content

Commit

Permalink
fix: removed type support for mso_mdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
sksadjad committed Mar 30, 2023
1 parent e7864d9 commit 867073c
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions packages/common/lib/types/Generic.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ export interface NameAndLocale {
locale?: string;
}

export interface Display extends NameAndLocale {
export interface LogoAndColor {
logo?: CredentialLogo;
background_color?: string;
text_color?: string;
}

export type Display = NameAndLocale & LogoAndColor & { [key: string]: string };

export interface IssuerMetadata {
credential_endpoint: string;
batch_credential_endpoint?: string;
Expand All @@ -38,7 +40,7 @@ export interface IssuerMetadata {
}

export interface CredentialIssuerMetadataSupportedCredentials {
format: CredentialFormatEnum;
format: CredentialFormatEnum | string;
id?: string;
cryptographic_binding_methods_supported?: string[];
cryptographic_suites_supported?: string[];
Expand Down Expand Up @@ -69,12 +71,6 @@ export interface MsoClaims {
};
};
}
export interface SupportedCredentialIssuerMetadataMsoMdoc extends CredentialIssuerMetadataSupportedCredentials {
format: CredentialFormatEnum.mso_mdoc;
doctype: string;
claims?: MsoClaims;
order?: string[];
}

export interface CredentialOfferCredential {
format: CredentialFormatEnum;
Expand All @@ -84,10 +80,6 @@ export interface CredentialOfferCredentialJwtVcJson extends CredentialOfferCrede
format: CredentialFormatEnum.jwt_vc_json;
types: string[];
}
export interface CredentialOfferCredentialMsoMdoc extends CredentialOfferCredential {
format: CredentialFormatEnum.mso_mdoc;
doctype: string;
}

export interface IssuerCredentialDefinition {
'@context': ICredentialContextType[];
Expand Down Expand Up @@ -121,7 +113,7 @@ export interface AuthorizationRequestMsoDoc extends AbstractAuthorizationRequest
}

export interface AbstractAuthorizationDetails {
type: 'openid_credential';
type: 'openid_credential' | string;
format: CredentialFormatEnum;
}

Expand Down Expand Up @@ -171,7 +163,7 @@ export enum TokenErrorResponse {
invalid_request = 'invalid_request',
invalid_grant = 'invalid_grant',
invalid_client = 'invalid_client', // this code has been added only in v1_0-11, but I've added this to the common interface. @nklomp is this ok?
invalid_scope = 'invalid_scope'
invalid_scope = 'invalid_scope',
}

//todo: change this back to AccessTokenResponse once merged with latest changes from develop
Expand Down

0 comments on commit 867073c

Please sign in to comment.