@sphereon/ssi-sdk.data-store 0.34.1-feature.SSISDK.17.bitstring.sl.13 → 0.34.1-feature.SSISDK.17.bitstring.sl.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sphereon/ssi-sdk.data-store",
3
- "version": "0.34.1-feature.SSISDK.17.bitstring.sl.13+61bcf6d3",
3
+ "version": "0.34.1-feature.SSISDK.17.bitstring.sl.14+35c8ca99",
4
4
  "source": "src/index.ts",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -30,9 +30,9 @@
30
30
  "@sphereon/pex": "5.0.0-unstable.28",
31
31
  "@sphereon/ssi-sdk-ext.did-utils": "0.29.0",
32
32
  "@sphereon/ssi-sdk-ext.identifier-resolution": "0.29.0",
33
- "@sphereon/ssi-sdk.agent-config": "0.34.1-feature.SSISDK.17.bitstring.sl.13+61bcf6d3",
34
- "@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.17.bitstring.sl.13+61bcf6d3",
35
- "@sphereon/ssi-types": "0.34.1-feature.SSISDK.17.bitstring.sl.13+61bcf6d3",
33
+ "@sphereon/ssi-sdk.agent-config": "0.34.1-feature.SSISDK.17.bitstring.sl.14+35c8ca99",
34
+ "@sphereon/ssi-sdk.core": "0.34.1-feature.SSISDK.17.bitstring.sl.14+35c8ca99",
35
+ "@sphereon/ssi-types": "0.34.1-feature.SSISDK.17.bitstring.sl.14+35c8ca99",
36
36
  "@veramo/core": "4.2.0",
37
37
  "@veramo/utils": "4.2.0",
38
38
  "blakejs": "^1.2.1",
@@ -65,5 +65,5 @@
65
65
  "PostgreSQL",
66
66
  "Contact Store"
67
67
  ],
68
- "gitHead": "61bcf6d37bcb3d77036b5415d72853c3ba3f9273"
68
+ "gitHead": "35c8ca99b499927dfffd929ae709750a7337b017"
69
69
  }
@@ -1,6 +1,6 @@
1
1
  import { ChildEntity, Column } from 'typeorm'
2
2
  import { StatusListEntryEntity } from './StatusList2021EntryEntity'
3
- import { BitstringStatus } from '../../types/statusList/bitstringTypes'
3
+ import { BitstringStatusMessage } from '../../types'
4
4
 
5
5
  @ChildEntity('bitstring')
6
6
  export class BitstringStatusListEntryEntity extends StatusListEntryEntity {
@@ -15,13 +15,13 @@ export class BitstringStatusListEntryEntity extends StatusListEntryEntity {
15
15
  name: 'statusMessage',
16
16
  nullable: true,
17
17
  transformer: {
18
- from(value: string): Array<BitstringStatus> | undefined {
18
+ from(value: string): Array<BitstringStatusMessage> | undefined {
19
19
  if (!value) {
20
20
  return undefined
21
21
  }
22
22
  return JSON.parse(value)
23
23
  },
24
- to(value: Array<BitstringStatus> | undefined): string | undefined {
24
+ to(value: Array<BitstringStatusMessage> | undefined): string | undefined {
25
25
  if (!value) {
26
26
  return undefined
27
27
  }
@@ -29,7 +29,7 @@ export class BitstringStatusListEntryEntity extends StatusListEntryEntity {
29
29
  },
30
30
  },
31
31
  })
32
- statusMessage?: Array<BitstringStatus>
32
+ statusMessage?: Array<BitstringStatusMessage>
33
33
 
34
34
  @Column({
35
35
  type: 'text',
@@ -14,7 +14,7 @@ export class CreateBitstringStatusListSqlite1741895823001 implements MigrationIn
14
14
  "type" varchar CHECK( "type" IN ('StatusList2021', 'OAuthStatusList', 'BitstringStatusList') ) NOT NULL DEFAULT ('StatusList2021'),
15
15
  "driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'),
16
16
  "credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'),
17
- "proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt') ) NOT NULL DEFAULT ('lds'),
17
+ "proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt', 'vc+jwt') ) NOT NULL DEFAULT ('lds'),
18
18
  "indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ),
19
19
  "statusPurpose" varchar,
20
20
  "statusListCredential" text,
@@ -115,7 +115,7 @@ export class CreateBitstringStatusListSqlite1741895823001 implements MigrationIn
115
115
  "type" varchar CHECK( "type" IN ('StatusList2021', 'OAuthStatusList') ) NOT NULL DEFAULT ('StatusList2021'),
116
116
  "driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'),
117
117
  "credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'),
118
- "proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt') ) NOT NULL DEFAULT ('lds'),
118
+ "proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt', 'vc+jwt') ) NOT NULL DEFAULT ('lds'),
119
119
  "indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ),
120
120
  "statusPurpose" varchar,
121
121
  "statusListCredential" text,
@@ -6,7 +6,6 @@ export * from './presentationDefinition/presentationDefinition'
6
6
  export * from './presentationDefinition/IAbstractPDStore'
7
7
  export * from './validation/validation'
8
8
  export * from './statusList/statusList'
9
- export * from './statusList/bitstringTypes'
10
9
  export * from './statusList/IAbstractStatusListStore'
11
10
  export * from './eventLogger/IAbstractEventLoggerStore'
12
11
  export * from './eventLogger/eventLogger'
@@ -1,5 +1,11 @@
1
1
  import { FindOptionsWhere } from 'typeorm'
2
- import { IBitstringStatusListEntryEntity, IOAuthStatusListEntity, IStatusList2021Entity, IStatusListEntryEntity } from './statusList'
2
+ import {
3
+ BitstringStatusPurpose,
4
+ IBitstringStatusListEntryEntity,
5
+ IOAuthStatusListEntity,
6
+ IStatusList2021Entity,
7
+ IStatusListEntryEntity,
8
+ } from './statusList'
3
9
  import {
4
10
  CredentialProofFormat,
5
11
  IIssuer,
@@ -10,7 +16,6 @@ import {
10
16
  StatusListType,
11
17
  StatusPurpose2021,
12
18
  } from '@sphereon/ssi-types'
13
- import { BitstringStatusPurpose } from './bitstringTypes'
14
19
 
15
20
  export type FindStatusListArgs = FindOptionsWhere<IStatusList2021Entity | IOAuthStatusListEntity>[]
16
21
  export type FindStatusListEntryArgs = FindOptionsWhere<IStatusListEntryEntity>[] | FindOptionsWhere<IStatusListEntryEntity>
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  type CredentialProofFormat,
3
+ type ICredentialStatus,
3
4
  IIssuer,
4
5
  RequireOneOf,
5
6
  StatusListCredential,
@@ -10,7 +11,6 @@ import {
10
11
  StatusPurpose2021,
11
12
  } from '@sphereon/ssi-types'
12
13
  import { StatusListEntity } from '../../entities/statusList/StatusListEntities'
13
- import { BitstringStatus, BitstringStatusPurpose } from './bitstringTypes'
14
14
 
15
15
  export interface IStatusListEntity {
16
16
  id: string
@@ -43,18 +43,6 @@ export interface IBitstringStatusListEntity extends IStatusListEntity {
43
43
  ttl?: number
44
44
  }
45
45
 
46
- export interface IBitstringStatusListEntryEntity {
47
- statusListId: string
48
- statusListIndex: number
49
- credentialId?: string
50
- credentialHash?: string
51
- entryCorrelationId?: string
52
- statusPurpose: string
53
- bitsPerStatus?: number
54
- statusMessage?: Array<BitstringStatus>
55
- statusReference?: string | string[]
56
- }
57
-
58
46
  export type IStatusListEntryEntity = RequireOneOf<
59
47
  {
60
48
  statusList: StatusListEntity
@@ -67,3 +55,41 @@ export type IStatusListEntryEntity = RequireOneOf<
67
55
  },
68
56
  'statusList' | 'statusListId'
69
57
  >
58
+
59
+ export type BitstringStatusPurpose = 'revocation' | 'suspension' | 'refresh' | 'message' | string // From vc-bitstring-status-lists without pulling in the whole dep for just this one type
60
+
61
+ export type BitstringStatusMessage = {
62
+ status: string
63
+ message?: string
64
+ [x: string]: any
65
+ }
66
+
67
+ export interface BitstringStatusListEntryCredentialStatus extends ICredentialStatus {
68
+ type: 'BitstringStatusListEntry'
69
+ statusPurpose: BitstringStatusPurpose | BitstringStatusPurpose[]
70
+ statusListIndex: string
71
+ statusListCredential: string
72
+ bitsPerStatus?: number
73
+ statusMessage?: Array<BitstringStatusMessage>
74
+ statusReference?: string | string[]
75
+ }
76
+
77
+ export type BitstringStatusListArgs = {
78
+ statusPurpose: BitstringStatusPurpose
79
+ bitsPerStatus: number
80
+ ttl?: number
81
+ validFrom?: Date
82
+ validUntil?: Date
83
+ }
84
+
85
+ export interface IBitstringStatusListEntryEntity {
86
+ statusListId: string
87
+ statusListIndex: number
88
+ credentialId?: string
89
+ credentialHash?: string
90
+ entryCorrelationId?: string
91
+ statusPurpose: string
92
+ bitsPerStatus?: number
93
+ statusMessage?: Array<BitstringStatusMessage>
94
+ statusReference?: string | string[]
95
+ }
@@ -1,7 +0,0 @@
1
- export type BitstringStatusPurpose = 'revocation' | 'suspension' | 'refresh' | 'message' | string // From vc-bitstring-status-lists without pulling in the whole dep for just this one type
2
-
3
- export type BitstringStatus = {
4
- status: string
5
- message?: string
6
- [x: string]: any
7
- }