@bifold/oca 2.12.7 → 3.0.0
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/build/formatters/credential/CredentialFormatter.d.ts +2 -2
- package/build/formatters/credential/DisplayAttribute.d.ts +3 -3
- package/build/formatters/credential/DisplayAttribute.js +2 -2
- package/build/formatters/credential/LocalizedCredential.d.ts +2 -2
- package/build/formatters/credential/LocalizedCredential.js +2 -2
- package/package.json +4 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DidCommCredentialExchangeRecord } from '@credo-ts/didcomm';
|
|
2
2
|
import { OverlayBundle } from '../../types';
|
|
3
3
|
import LocalizedCredential from './LocalizedCredential';
|
|
4
4
|
export default class CredentialFormatter {
|
|
5
5
|
#private;
|
|
6
|
-
constructor(bundle: OverlayBundle, record:
|
|
6
|
+
constructor(bundle: OverlayBundle, record: DidCommCredentialExchangeRecord);
|
|
7
7
|
localizedCredential(language: string): LocalizedCredential | undefined;
|
|
8
8
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DidCommCredentialPreviewAttribute, DidCommCredentialPreviewAttributeOptions } from '@credo-ts/didcomm';
|
|
2
2
|
import { IOverlayBundleAttribute as OverlayBundleAttributeOptions } from '../../interfaces/overlay';
|
|
3
|
-
export default class DisplayAttribute extends
|
|
3
|
+
export default class DisplayAttribute extends DidCommCredentialPreviewAttribute {
|
|
4
4
|
characterEncoding: string | undefined;
|
|
5
5
|
standard: string | undefined;
|
|
6
6
|
format: string | undefined;
|
|
7
7
|
information: string | undefined;
|
|
8
8
|
label: string | undefined;
|
|
9
|
-
constructor(options:
|
|
9
|
+
constructor(options: DidCommCredentialPreviewAttributeOptions, overlayOptions: OverlayBundleAttributeOptions, language: string);
|
|
10
10
|
toJSON(): Record<string, unknown>;
|
|
11
11
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
class DisplayAttribute extends
|
|
3
|
+
const didcomm_1 = require("@credo-ts/didcomm");
|
|
4
|
+
class DisplayAttribute extends didcomm_1.DidCommCredentialPreviewAttribute {
|
|
5
5
|
constructor(options, overlayOptions, language) {
|
|
6
6
|
var _a, _b;
|
|
7
7
|
super(options);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DidCommCredentialExchangeRecord } from '@credo-ts/didcomm';
|
|
2
2
|
import { OverlayBundle } from '../../types';
|
|
3
3
|
import DisplayAttribute from './DisplayAttribute';
|
|
4
4
|
export default class LocalizedCredential {
|
|
@@ -6,7 +6,7 @@ export default class LocalizedCredential {
|
|
|
6
6
|
issuer: string;
|
|
7
7
|
name: string;
|
|
8
8
|
attributes: DisplayAttribute[];
|
|
9
|
-
constructor(bundle: OverlayBundle, record:
|
|
9
|
+
constructor(bundle: OverlayBundle, record: DidCommCredentialExchangeRecord, language: string);
|
|
10
10
|
get primaryAttribute(): DisplayAttribute | undefined;
|
|
11
11
|
get secondaryAttribute(): DisplayAttribute | undefined;
|
|
12
12
|
getAttribute(attributeName?: string): DisplayAttribute | undefined;
|
|
@@ -15,7 +15,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
var _LocalizedCredential_bundle;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const
|
|
18
|
+
const didcomm_1 = require("@credo-ts/didcomm");
|
|
19
19
|
const DisplayAttribute_1 = __importDefault(require("./DisplayAttribute"));
|
|
20
20
|
class LocalizedCredential {
|
|
21
21
|
constructor(bundle, record, language) {
|
|
@@ -31,7 +31,7 @@ class LocalizedCredential {
|
|
|
31
31
|
const credentialAttributes = ((_c = record.credentialAttributes) === null || _c === void 0 ? void 0 : _c.length)
|
|
32
32
|
? record.credentialAttributes
|
|
33
33
|
: bundle.attributes.map((attribute) => {
|
|
34
|
-
return new
|
|
34
|
+
return new didcomm_1.DidCommCredentialPreviewAttribute(Object.assign(Object.assign({}, attribute), { value: '' }));
|
|
35
35
|
});
|
|
36
36
|
this.attributes =
|
|
37
37
|
(_d = credentialAttributes === null || credentialAttributes === void 0 ? void 0 : credentialAttributes.filter((attribute) => bundle.getAttribute(attribute.name)).map((attribute) => new DisplayAttribute_1.default(attribute, { name: attribute.name, type: '' }, language))) !== null && _d !== void 0 ? _d : [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bifold/oca",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "TypeScript implementation of Overlay Capture Architecture (OCA) for styling Aries Verifiable Credentials",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -43,8 +43,9 @@
|
|
|
43
43
|
"typescript": "~5.9.2"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@credo-ts/anoncreds": "0.
|
|
47
|
-
"@credo-ts/core": "0.
|
|
46
|
+
"@credo-ts/anoncreds": "0.6.1",
|
|
47
|
+
"@credo-ts/core": "0.6.1",
|
|
48
|
+
"@credo-ts/didcomm": "0.6.1",
|
|
48
49
|
"axios": "~1.13.2",
|
|
49
50
|
"lodash.startcase": "~4.4.0",
|
|
50
51
|
"react-native-fs": "~2.20.0"
|