Skip to content

Commit

Permalink
fix: OpenAPI schema
Browse files Browse the repository at this point in the history
  • Loading branch information
simonas-notcat committed Sep 29, 2020
1 parent ea7ba3a commit 2ef0bc7
Show file tree
Hide file tree
Showing 30 changed files with 4,859 additions and 1,962 deletions.
2 changes: 1 addition & 1 deletion docs/api/daf-core.iidentitymanageraddkeyargs.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ export interface IIdentityManagerAddKeyArgs
| --- | --- | --- |
| [did](./daf-core.iidentitymanageraddkeyargs.did.md) | string | DID |
| [key](./daf-core.iidentitymanageraddkeyargs.key.md) | [IKey](./daf-core.ikey.md) | Key object |
| [options](./daf-core.iidentitymanageraddkeyargs.options.md) | any | Optional. Identity provider specific options |
| [options](./daf-core.iidentitymanageraddkeyargs.options.md) | object | Optional. Identity provider specific options |

2 changes: 1 addition & 1 deletion docs/api/daf-core.iidentitymanageraddkeyargs.options.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Optional. Identity provider specific options
<b>Signature:</b>

```typescript
options?: any;
options?: object;
```
2 changes: 1 addition & 1 deletion docs/api/daf-core.iidentitymanageraddserviceargs.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ export interface IIdentityManagerAddServiceArgs
| Property | Type | Description |
| --- | --- | --- |
| [did](./daf-core.iidentitymanageraddserviceargs.did.md) | string | DID |
| [options](./daf-core.iidentitymanageraddserviceargs.options.md) | any | Optional. Identity provider specific options |
| [options](./daf-core.iidentitymanageraddserviceargs.options.md) | object | Optional. Identity provider specific options |
| [service](./daf-core.iidentitymanageraddserviceargs.service.md) | [IService](./daf-core.iservice.md) | Service object |

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Optional. Identity provider specific options
<b>Signature:</b>

```typescript
options?: any;
options?: object;
```
2 changes: 1 addition & 1 deletion docs/api/daf-core.iidentitymanagercreateidentityargs.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ export interface IIdentityManagerCreateIdentityArgs
| --- | --- | --- |
| [alias](./daf-core.iidentitymanagercreateidentityargs.alias.md) | string | Optional. Identity alias. Can be used to reference an object in an external system |
| [kms](./daf-core.iidentitymanagercreateidentityargs.kms.md) | string | Optional. Key Management System |
| [options](./daf-core.iidentitymanagercreateidentityargs.options.md) | any | Optional. Identity provider specific options |
| [options](./daf-core.iidentitymanagercreateidentityargs.options.md) | object | Optional. Identity provider specific options |
| [provider](./daf-core.iidentitymanagercreateidentityargs.provider.md) | string | Optional. Identity provider |

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Optional. Identity provider specific options
<b>Signature:</b>

```typescript
options?: any;
options?: object;
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ export interface IIdentityManagerGetOrCreateIdentityArgs
| --- | --- | --- |
| [alias](./daf-core.iidentitymanagergetorcreateidentityargs.alias.md) | string | Identity alias. Can be used to reference an object in an external system |
| [kms](./daf-core.iidentitymanagergetorcreateidentityargs.kms.md) | string | Optional. Key Management System |
| [options](./daf-core.iidentitymanagergetorcreateidentityargs.options.md) | any | Optional. Identity provider specific options |
| [options](./daf-core.iidentitymanagergetorcreateidentityargs.options.md) | object | Optional. Identity provider specific options |
| [provider](./daf-core.iidentitymanagergetorcreateidentityargs.provider.md) | string | Optional. Identity provider |

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Optional. Identity provider specific options
<b>Signature:</b>

```typescript
options?: any;
options?: object;
```
2 changes: 1 addition & 1 deletion docs/api/daf-core.iidentitymanagerremovekeyargs.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ export interface IIdentityManagerRemoveKeyArgs
| --- | --- | --- |
| [did](./daf-core.iidentitymanagerremovekeyargs.did.md) | string | DID |
| [kid](./daf-core.iidentitymanagerremovekeyargs.kid.md) | string | Key ID |
| [options](./daf-core.iidentitymanagerremovekeyargs.options.md) | any | Optional. Identity provider specific options |
| [options](./daf-core.iidentitymanagerremovekeyargs.options.md) | object | Optional. Identity provider specific options |

2 changes: 1 addition & 1 deletion docs/api/daf-core.iidentitymanagerremovekeyargs.options.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Optional. Identity provider specific options
<b>Signature:</b>

```typescript
options?: any;
options?: object;
```
2 changes: 1 addition & 1 deletion docs/api/daf-core.iidentitymanagerremoveserviceargs.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ export interface IIdentityManagerRemoveServiceArgs
| --- | --- | --- |
| [did](./daf-core.iidentitymanagerremoveserviceargs.did.md) | string | DID |
| [id](./daf-core.iidentitymanagerremoveserviceargs.id.md) | string | Service ID |
| [options](./daf-core.iidentitymanagerremoveserviceargs.options.md) | any | Optional. Identity provider specific options |
| [options](./daf-core.iidentitymanagerremoveserviceargs.options.md) | object | Optional. Identity provider specific options |

Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Optional. Identity provider specific options
<b>Signature:</b>

```typescript
options?: any;
options?: object;
```
2 changes: 1 addition & 1 deletion docs/api/daf-core.ikey.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface IKey
| --- | --- | --- |
| [kid](./daf-core.ikey.kid.md) | string | Key ID |
| [kms](./daf-core.ikey.kms.md) | string | Key Management System |
| [meta](./daf-core.ikey.meta.md) | Record&lt;string, any&gt; | Optional. Key metadata. Can be used to store auth data to access remote kms |
| [meta](./daf-core.ikey.meta.md) | object | Optional. Key metadata. Can be used to store auth data to access remote kms |
| [privateKeyHex](./daf-core.ikey.privatekeyhex.md) | string | Optional. Private key |
| [publicKeyHex](./daf-core.ikey.publickeyhex.md) | string | Public key |
| [type](./daf-core.ikey.type.md) | [TKeyType](./daf-core.tkeytype.md) | Key type |
Expand Down
2 changes: 1 addition & 1 deletion docs/api/daf-core.ikey.meta.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Optional. Key metadata. Can be used to store auth data to access remote kms
<b>Signature:</b>

```typescript
meta?: Record<string, any>;
meta?: object;
```
2 changes: 1 addition & 1 deletion docs/api/daf-core.ikeymanagercreatekeyargs.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ export interface IKeyManagerCreateKeyArgs
| Property | Type | Description |
| --- | --- | --- |
| [kms](./daf-core.ikeymanagercreatekeyargs.kms.md) | string | Key Management System |
| [meta](./daf-core.ikeymanagercreatekeyargs.meta.md) | Record&lt;string, any&gt; | Optional. Key meta data |
| [meta](./daf-core.ikeymanagercreatekeyargs.meta.md) | object | Optional. Key meta data |
| [type](./daf-core.ikeymanagercreatekeyargs.type.md) | [TKeyType](./daf-core.tkeytype.md) | Key type |

2 changes: 1 addition & 1 deletion docs/api/daf-core.ikeymanagercreatekeyargs.meta.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Optional. Key meta data
<b>Signature:</b>

```typescript
meta?: Record<string, any>;
meta?: object;
```
2 changes: 1 addition & 1 deletion docs/api/daf-core.imessage.data.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Optional. Parsed data
<b>Signature:</b>

```typescript
data?: any;
data?: string | object;
```
2 changes: 1 addition & 1 deletion docs/api/daf-core.imessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface IMessage
| --- | --- | --- |
| [createdAt](./daf-core.imessage.createdat.md) | string | Optional. Creation date (ISO 8601) |
| [credentials](./daf-core.imessage.credentials.md) | [VerifiableCredential](./daf-core.verifiablecredential.md)<!-- -->\[\] | Optional. Array of attached verifiable credentials |
| [data](./daf-core.imessage.data.md) | any | Optional. Parsed data |
| [data](./daf-core.imessage.data.md) | string \| object | Optional. Parsed data |
| [expiresAt](./daf-core.imessage.expiresat.md) | string | Optional. Expiration date (ISO 8601) |
| [from](./daf-core.imessage.from.md) | string | Optional. Sender DID |
| [id](./daf-core.imessage.id.md) | string | Unique message ID |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ data: {
from: string;
to: string;
type: string;
body: any;
body: object | string;
};
```
2 changes: 1 addition & 1 deletion docs/api/daf-did-comm.isendmessagedidcommalpha1args.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface ISendMessageDIDCommAlpha1Args

| Property | Type | Description |
| --- | --- | --- |
| [data](./daf-did-comm.isendmessagedidcommalpha1args.data.md) | { id?: string; from: string; to: string; type: string; body: any; } | <b><i>(BETA)</i></b> |
| [data](./daf-did-comm.isendmessagedidcommalpha1args.data.md) | { id?: string; from: string; to: string; type: string; body: object \| string; } | <b><i>(BETA)</i></b> |
| [save](./daf-did-comm.isendmessagedidcommalpha1args.save.md) | boolean | <b><i>(BETA)</i></b> |
| [url](./daf-did-comm.isendmessagedidcommalpha1args.url.md) | string | <b><i>(BETA)</i></b> |

2 changes: 1 addition & 1 deletion docs/api/daf-typeorm.entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
Entities: (typeof Key | typeof Identity | typeof Service | typeof Claim | typeof Credential | typeof Presentation | typeof Message)[]
Entities: (typeof Credential | typeof Identity | typeof Claim | typeof Presentation | typeof Message | typeof Key | typeof Service)[]
```
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"build": "lerna run build && yarn docs:api && yarn docs:reference && yarn schemas && yarn lerna run --scope daf-rest build && yarn docs:clean-temp && yarn prettier:examples",
"publish": "lerna publish",
"bootstrap": "lerna bootstrap",
"schemas": "ts-node ./scripts/generate-schemas.ts",
"schemas": "ts-node --project packages/tsconfig.settings.json ./scripts/generate-schemas.ts",
"docs:api": "ts-node ./scripts/generate-docs.ts",
"docs:reference": "api-documenter markdown -i ./temp -o ./docs/api",
"docs:clean-temp": "rm -rf ./temp",
Expand All @@ -27,6 +27,7 @@
}
},
"devDependencies": {
"@apidevtools/swagger-parser": "^10.0.2",
"@commitlint/cli": "^8.3.5",
"@commitlint/config-conventional": "^8.3.4",
"@microsoft/api-documenter": "^7.8.56",
Expand Down
18 changes: 9 additions & 9 deletions packages/daf-core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export interface IKey {
/**
* Optional. Key metadata. Can be used to store auth data to access remote kms
*/
meta?: Record<string, any>
meta?: object
}

/**
Expand Down Expand Up @@ -172,7 +172,7 @@ export interface IMessage {
/**
* Optional. Parsed data
*/
data?: any
data?: string | object

/**
* Optional. List of DIDs to reply to
Expand Down Expand Up @@ -445,7 +445,7 @@ export interface IIdentityManagerCreateIdentityArgs {
/**
* Optional. Identity provider specific options
*/
options?: any
options?: object
}

/**
Expand All @@ -471,7 +471,7 @@ export interface IIdentityManagerGetOrCreateIdentityArgs {
/**
* Optional. Identity provider specific options
*/
options?: any
options?: object
}

/**
Expand All @@ -492,7 +492,7 @@ export interface IIdentityManagerAddKeyArgs {
/**
* Optional. Identity provider specific options
*/
options?: any
options?: object
}

/**
Expand All @@ -513,7 +513,7 @@ export interface IIdentityManagerRemoveKeyArgs {
/**
* Optional. Identity provider specific options
*/
options?: any
options?: object
}

/**
Expand All @@ -534,7 +534,7 @@ export interface IIdentityManagerAddServiceArgs {
/**
* Optional. Identity provider specific options
*/
options?: any
options?: object
}

/**
Expand All @@ -555,7 +555,7 @@ export interface IIdentityManagerRemoveServiceArgs {
/**
* Optional. Identity provider specific options
*/
options?: any
options?: object
}

/**
Expand Down Expand Up @@ -701,7 +701,7 @@ export interface IKeyManagerCreateKeyArgs {
/**
* Optional. Key meta data
*/
meta?: Record<string, any>
meta?: object
}

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/daf-did-comm/src/action-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface ISendMessageDIDCommAlpha1Args {
from: string
to: string
type: string
body: any
body: object | string
}
}

Expand Down Expand Up @@ -118,7 +118,7 @@ export class DIDComm implements IAgentPlugin {

if (res.status == 200) {
return await context.agent.handleMessage({
raw: data.body,
raw: JSON.stringify(data.body),
metaData: [{ type: 'DIDComm-sent' }],
save,
})
Expand Down
Loading

0 comments on commit 2ef0bc7

Please sign in to comment.