Skip to content

Commit

Permalink
chore: prepare interface for OAuth2StatusList args
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderPostma committed Jan 10, 2025
1 parent f928c22 commit 0e3b6e4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
1 change: 0 additions & 1 deletion packages/ssi-types/src/types/w3c-vc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ export interface IErrorDetails {

export enum StatusListType {
StatusList2021 = 'StatusList2021',
OAuth2StatusList = 'OAuth2StatusList',
}

export type StatusPurpose2021 = 'revocation' | 'suspension' | string
Expand Down
26 changes: 21 additions & 5 deletions packages/vc-status-list/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
StatusListCredentialIdMode,
StatusListDriverType,
StatusListIndexingDirection,
StatusListType,
StatusPurpose2021,
} from '@sphereon/ssi-types'
import {
Expand All @@ -23,6 +22,13 @@ import {
} from '@veramo/core'
import { DataSource } from 'typeorm'

export enum StatusListType {
StatusList2021 = 'StatusList2021',
OAuth2StatusList = 'OAuth2StatusList',
}

export type StatusPurposeOAuth2 = 'active' | 'suspended' | 'revoked' | string

export type StatusList2021Args = {
encodedList: string
indexingDirection: StatusListIndexingDirection
Expand All @@ -31,7 +37,7 @@ export type StatusList2021Args = {
}

export type OAuth2StatusListArgs = {
status: 'active' | 'suspended' | 'revoked'
statusPurpose: StatusPurposeOAuth2
expiresAt?: string
}

Expand All @@ -55,7 +61,7 @@ export type UpdateStatusList2021Args = {
}

export type UpdateOAuth2StatusListArgs = {
status: 'active' | 'suspended' | 'revoked'
statusPurpose: StatusPurposeOAuth2
expiresAt?: string
}

Expand All @@ -66,8 +72,8 @@ export interface UpdateStatusListFromEncodedListArgs {
proofFormat?: ProofFormat
keyRef?: string
correlationId?: string
statusList2021Args?: UpdateStatusList2021Args
oauth2StatusListArgs?: UpdateOAuth2StatusListArgs
statusList2021?: UpdateStatusList2021Args
oauth2StatusList?: UpdateOAuth2StatusListArgs
}

export interface UpdateStatusListFromStatusListCredentialArgs {
Expand Down Expand Up @@ -104,6 +110,16 @@ export interface StatusList2021EntryCredentialStatus extends ICredentialStatus {
statusListCredential: string
}

export interface StatusList2021ToVerifiableCredentialArgs {
issuer: string | IIssuer
id: string
type?: StatusListType
proofFormat?: ProofFormat
keyRef?: string
encodedList: string
statusPurpose: StatusPurpose2021
}

/**
* The interface definition for a plugin that can add statuslist info to a credential
*
Expand Down

0 comments on commit 0e3b6e4

Please sign in to comment.