Skip to content

Commit

Permalink
fix(issuerFields): fix to issuerFields on publishPublicClaim
Browse files Browse the repository at this point in the history
  • Loading branch information
Passerino committed Nov 17, 2021
1 parent c3ba0c8 commit f3b32f9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
Expand Up @@ -59,6 +59,7 @@
| `__namedParameters.claim.claimType` | `string` |
| `__namedParameters.claim.claimTypeVersion` | `number` |
| `__namedParameters.claim.fields` | { `key`: `string` ; `value`: `string` \| `number` }[] |
| `__namedParameters.claim.issuerFields?` | { `key`: `string` ; `value`: `string` \| `number` }[] |
| `__namedParameters.registrationTypes?` | [`RegistrationTypes`](../enums/modules_claims_claims_types.RegistrationTypes.md)[] |
| `__namedParameters.subject?` | `string` |

Expand Down Expand Up @@ -301,7 +302,7 @@ ___
| :------ | :------ |
| `__namedParameters` | `Object` |
| `__namedParameters.id` | `string` |
| `__namedParameters.issuerFields` | { `key`: `string` ; `value`: `string` \| `number` }[] |
| `__namedParameters.issuerFields?` | { `key`: `string` ; `value`: `string` \| `number` }[] |
| `__namedParameters.registrationTypes` | [`RegistrationTypes`](../enums/modules_claims_claims_types.RegistrationTypes.md)[] |
| `__namedParameters.requester` | `string` |
| `__namedParameters.subjectAgreement` | `string` |
Expand Down
14 changes: 7 additions & 7 deletions docs/api/interfaces/modules_didRegistry_did_types.ClaimData.md
Expand Up @@ -12,19 +12,13 @@

### Properties

- [claimParams](modules_didRegistry_did_types.ClaimData.md#claimparams)
- [claimType](modules_didRegistry_did_types.ClaimData.md#claimtype)
- [claimTypeVersion](modules_didRegistry_did_types.ClaimData.md#claimtypeversion)
- [issuerFields](modules_didRegistry_did_types.ClaimData.md#issuerfields)
- [profile](modules_didRegistry_did_types.ClaimData.md#profile)

## Properties

### claimParams

`Optional` **claimParams**: `Record`<`string`, `string`\>

___

### claimType

`Optional` **claimType**: `string`
Expand All @@ -37,6 +31,12 @@ ___

___

### issuerFields

`Optional` **issuerFields**: { `key`: `string` ; `value`: `string` \| `number` }[]

___

### profile

`Optional` **profile**: [`Profile`](modules_didRegistry_did_types.Profile.md)
9 changes: 7 additions & 2 deletions src/modules/claims/claims.service.ts
Expand Up @@ -116,7 +116,12 @@ export class ClaimsService {
subject = this._signerService.did,
registrationTypes = [RegistrationTypes.OffChain],
}: {
claim: { claimType: string; claimTypeVersion: number; fields: { key: string; value: string | number }[] };
claim: {
claimType: string;
claimTypeVersion: number;
fields: { key: string; value: string | number }[];
issuerFields?: { key: string; value: string | number }[];
};
subject?: string;
registrationTypes?: RegistrationTypes[];
}) {
Expand Down Expand Up @@ -161,7 +166,7 @@ export class ClaimsService {
id: string;
subjectAgreement: string;
registrationTypes: RegistrationTypes[];
issuerFields: { key: string; value: string | number }[];
issuerFields?: { key: string; value: string | number }[];
}) {
const { claimData, sub } = this._didRegistry.jwt.decode(token) as {
claimData: { claimType: string; claimTypeVersion: number; expiry: number };
Expand Down
2 changes: 1 addition & 1 deletion src/modules/didRegistry/did.types.ts
Expand Up @@ -18,5 +18,5 @@ export interface ClaimData extends Record<string, unknown> {
profile?: Profile;
claimType?: string;
claimTypeVersion?: number;
claimParams?: Record<string, string>;
issuerFields?: { key: string; value: string | number }[];
}

0 comments on commit f3b32f9

Please sign in to comment.