Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): expose CredentialPreviewAttribute #796

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type {
OfferCredentialOptions,
RequestCredentialOptions,
} from './CredentialsModuleOptions'
import type { CredentialPreviewAttribute } from './models/CredentialPreviewAttributes'
import type { CredentialPreviewAttribute } from './models/CredentialPreviewAttribute'
import type { V1CredentialPreview } from './protocol/v1/V1CredentialPreview'
import type { ProposeCredentialMessageOptions } from './protocol/v1/messages'
import type { CredentialExchangeRecord } from './repository/CredentialExchangeRecord'
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/modules/credentials/CredentialUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { encodeAttachment } from '../../utils/attachment'
import { Buffer } from '../../utils/buffer'
import { isBoolean, isNumber, isString } from '../../utils/type'

import { CredentialPreviewAttribute } from './models/CredentialPreviewAttributes'
import { CredentialPreviewAttribute } from './models/CredentialPreviewAttribute'

export class CredentialUtils {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CredentialProtocolVersion } from '../CredentialProtocolVersion'
import { CredentialState } from '../CredentialState'
import { CredentialPreviewAttribute } from '../models/CredentialPreviewAttributes'
import { CredentialPreviewAttribute } from '../models/CredentialPreviewAttribute'
import { CredentialExchangeRecord } from '../repository/CredentialExchangeRecord'
import { CredentialMetadataKeys } from '../repository/CredentialMetadataTypes'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CredentialUtils } from '../CredentialUtils'
import { CredentialPreviewAttribute } from '../models/CredentialPreviewAttributes'
import { CredentialPreviewAttribute } from '../models/CredentialPreviewAttribute'

/**
* Sample test cases for encoding/decoding of verifiable credential claims - Aries RFCs 0036 and 0037
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { StoreCredentialOptions } from '../../indy/services/IndyHolderServi
import type { RevocationNotificationReceivedEvent, CredentialStateChangedEvent } from '../CredentialEvents'
import type { ServiceAcceptRequestOptions } from '../CredentialServiceOptions'
import type { RequestCredentialOptions } from '../CredentialsModuleOptions'
import type { CredentialPreviewAttribute } from '../models/CredentialPreviewAttributes'
import type { CredentialPreviewAttribute } from '../models/CredentialPreviewAttribute'
import type { IndyCredentialMetadata } from '../protocol/v1/models/CredentialInfo'
import type { CustomCredentialTags } from '../repository/CredentialExchangeRecord'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
CredentialFormatSpec,
FormatServiceRequestCredentialFormats,
} from '../formats/models/CredentialFormatServiceOptions'
import type { CredentialPreviewAttribute } from '../models/CredentialPreviewAttributes'
import type { CredentialPreviewAttribute } from '../models/CredentialPreviewAttribute'
import type { IndyCredentialMetadata } from '../protocol/v1/models/CredentialInfo'
import type { V2IssueCredentialMessageProps } from '../protocol/v2/messages/V2IssueCredentialMessage'
import type { V2OfferCredentialMessageOptions } from '../protocol/v2/messages/V2OfferCredentialMessage'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type {
ProposeCredentialOptions,
RequestCredentialOptions,
} from '../../CredentialsModuleOptions'
import type { CredentialPreviewAttribute } from '../../models/CredentialPreviewAttributes'
import type { CredentialPreviewAttribute } from '../../models/CredentialPreviewAttribute'
import type {
ServiceAcceptCredentialOptions,
ServiceAcceptOfferOptions as ServiceOfferOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Attachment } from '../../../../decorators/attachment/Attachment'
import type { LinkedAttachment } from '../../../../utils/LinkedAttachment'
import type { ParseRevocationRegistryDefinitionTemplate } from '../../../ledger/services'
import type { AutoAcceptCredential } from '../../CredentialAutoAcceptType'
import type { CredentialPreviewAttribute } from '../../models/CredentialPreviewAttributes'
import type { CredentialPreviewAttribute } from '../../models/CredentialPreviewAttribute'
import type { V2CredentialPreview } from '../../protocol/v2/V2CredentialPreview'
import type { CredentialExchangeRecord } from '../../repository/CredentialExchangeRecord'
import type { CredPropose } from './CredPropose'
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/modules/credentials/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ export * from './CredentialState'
export * from './CredentialEvents'
export * from './CredentialAutoAcceptType'
export * from './CredentialProtocolVersion'
export * from './models'
2 changes: 1 addition & 1 deletion packages/core/src/modules/credentials/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './RevocationNotification'
export * from './CredentialPreviewAttributes'
export * from './CredentialPreviewAttribute'
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { CredentialPreviewOptions } from '../../models/CredentialPreviewAttributes'
import type { CredentialPreviewOptions } from '../../models/CredentialPreviewAttribute'

import { Expose, Transform, Type } from 'class-transformer'
import { IsInstance, ValidateNested } from 'class-validator'

import { JsonTransformer } from '../../../../utils/JsonTransformer'
import { IsValidMessageType, parseMessageType, replaceLegacyDidSovPrefix } from '../../../../utils/messageType'
import { CredentialPreviewAttribute } from '../../models/CredentialPreviewAttributes'
import { CredentialPreviewAttribute } from '../../models/CredentialPreviewAttribute'

/**
* Credential preview inner message class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import type {
} from '../../CredentialsModuleOptions'
import type { CredentialFormatService } from '../../formats/CredentialFormatService'
import type { HandlerAutoAcceptOptions } from '../../formats/models/CredentialFormatServiceOptions'
import type { CredentialPreviewAttribute } from '../../models/CredentialPreviewAttributes'
import type { CredentialPreviewAttribute } from '../../models/CredentialPreviewAttribute'
import type { CredOffer } from 'indy-sdk'

import { Lifecycle, scoped } from 'tsyringe'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Handler, HandlerInboundMessage } from '../../../../../agent/Handle
import type { Attachment } from '../../../../../decorators/attachment/Attachment'
import type { DidCommMessageRepository } from '../../../../../storage'
import type { HandlerAutoAcceptOptions } from '../../../formats/models/CredentialFormatServiceOptions'
import type { CredentialPreviewAttribute } from '../../../models/CredentialPreviewAttributes'
import type { CredentialPreviewAttribute } from '../../../models/CredentialPreviewAttribute'
import type { CredentialExchangeRecord } from '../../../repository/CredentialExchangeRecord'
import type { V1CredentialService } from '../V1CredentialService'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { CredentialPreviewOptions } from '../../models/CredentialPreviewAttributes'
import type { CredentialPreviewOptions } from '../../models/CredentialPreviewAttribute'

import { Expose, Type } from 'class-transformer'
import { Equals, IsInstance, ValidateNested } from 'class-validator'

import { JsonTransformer } from '../../../../utils/JsonTransformer'
import { CredentialPreviewAttribute } from '../../models/CredentialPreviewAttributes'
import { CredentialPreviewAttribute } from '../../models/CredentialPreviewAttribute'

/**
* Credential preview inner message class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import type {
CredentialFormatSpec,
HandlerAutoAcceptOptions,
} from '../../formats/models/CredentialFormatServiceOptions'
import type { CredentialPreviewAttribute } from '../../models/CredentialPreviewAttributes'
import type { CredentialPreviewAttribute } from '../../models/CredentialPreviewAttribute'
import type { CreateRequestOptions } from './CredentialMessageBuilder'

import { Lifecycle, scoped } from 'tsyringe'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Attachment } from '../../../decorators/attachment/Attachment'
import { AriesFrameworkError } from '../../../error'
import { BaseRecord } from '../../../storage/BaseRecord'
import { uuid } from '../../../utils/uuid'
import { CredentialPreviewAttribute } from '../models/CredentialPreviewAttributes'
import { CredentialPreviewAttribute } from '../models/CredentialPreviewAttribute'
import { CredentialInfo } from '../protocol/v1/models/CredentialInfo'

import { CredentialMetadataKeys } from './CredentialMetadataTypes'
Expand Down