Skip to content

Commit

Permalink
Update Runtime (#247)
Browse files Browse the repository at this point in the history
* chore: update runtime

* refactor: use content in sdk

* fix: adapt to runtime changes

* fix: update tests

* fix: add peer deletion info

* ci: correct audit exclude
  • Loading branch information
jkoenig134 authored Aug 29, 2024
1 parent 73347e5 commit 9836926
Show file tree
Hide file tree
Showing 34 changed files with 144 additions and 283 deletions.
2 changes: 1 addition & 1 deletion .ci/runChecks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ npm run lint:prettier

# auditing
npx license-check --ignoreRegex @nmshd/connector
npx better-npm-audit audit --exclude 1096302,1098618,1093639
npx better-npm-audit audit --exclude 1096302,1098681,1093639
97 changes: 67 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@
"@js-soft/docdb-access-mongo": "1.1.8",
"@js-soft/node-logger": "1.2.0",
"@js-soft/ts-utils": "^2.3.3",
"@nmshd/iql": "^1.0.2",
"@nmshd/runtime": "5.1.0",
"@nmshd/runtime": "5.3.0",
"agentkeepalive": "4.5.0",
"amqplib": "^0.10.4",
"axios": "^1.7.5",
Expand All @@ -96,7 +95,7 @@
"helmet": "7.1.0",
"json-stringify-safe": "5.0.1",
"jsonschema": "1.4.1",
"mqtt": "^5.10.0",
"mqtt": "^5.10.1",
"multer": "^1.4.5-lts.1",
"nconf": "0.12.1",
"on-headers": "1.0.2",
Expand All @@ -114,6 +113,8 @@
"@js-soft/eslint-config-ts": "1.6.9",
"@js-soft/license-check": "1.0.9",
"@nmshd/connector-sdk": "*",
"@nmshd/content": "^5.3.0",
"@nmshd/core-types": "^5.3.0",
"@types/amqplib": "^0.10.5",
"@types/compression": "^1.7.5",
"@types/cors": "^2.8.17",
Expand All @@ -125,7 +126,7 @@
"@types/lodash": "^4.17.7",
"@types/luxon": "^3.4.2",
"@types/nconf": "^0.10.7",
"@types/node": "^22.5.0",
"@types/node": "^22.5.1",
"@types/on-headers": "^1.0.3",
"@types/swagger-ui-express": "^4.1.6",
"@types/yamljs": "^0.2.34",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/_examples/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async function run() {

const sentMessage = await client.messages.sendMessage({
recipients: ["id1343523509859032455"],
content: { A: "B" }
content: { "@type": "Mail", to: [""], subject: "Hello", body: "Hello World!" }
});
}

Expand Down
1 change: 1 addition & 0 deletions packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"build:schemas:watch": "npx nodemon -e ts -w 'src/types' --exec 'npm run build:schemas'"
},
"dependencies": {
"@nmshd/content": "^5.3.0",
"axios": "^1.7.5",
"form-data": "^4.0.0",
"qs": "^6.13.0"
Expand Down
30 changes: 3 additions & 27 deletions packages/sdk/src/types/attributes/ConnectorAttribute.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { IdentityAttributeJSON, RelationshipAttributeJSON } from "@nmshd/content";

export interface ConnectorAttribute {
id: string;
parentId?: string;
createdAt: string;
content: ConnectorIdentityAttribute | ConnectorRelationshipAttribute;
content: IdentityAttributeJSON | RelationshipAttributeJSON;
succeeds?: string;
succeededBy?: string;
deletionInfo?: ConnectorAttributeDeletionInfo;
Expand Down Expand Up @@ -37,29 +39,3 @@ export interface ConnectorAttributeShareInfoForNotification {
}

export type ConnectorAttributeShareInfo = ConnectorAttributeShareInfoForNotification | ConnectorAttributeShareInfoForRequest;

export interface ConnectorBaseAttribute {
"@type": string;
owner: string;
validFrom?: string;
validTo?: string;
}

export interface ConnectorIdentityAttribute extends ConnectorBaseAttribute {
"@type": "IdentityAttribute";
value: ConnectorAttributeValue;
tags?: string[];
}

export interface ConnectorRelationshipAttribute extends ConnectorBaseAttribute {
"@type": "RelationshipAttribute";
value: ConnectorAttributeValue;
key: string;
isTechnical?: boolean;
confidentiality: "public" | "private" | "protected";
}

export interface ConnectorAttributeValue {
"@type": string;
[key: string]: unknown;
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ConnectorAttributeValue } from "../ConnectorAttribute";
import { AttributeValues } from "@nmshd/content";

export interface CreateRepositoryAttributeRequest {
content: {
value: ConnectorAttributeValue;
value: AttributeValues.Identity.Json;
tags?: string[];
validFrom?: string;
validTo?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ConnectorAttributeValue } from "../ConnectorAttribute";
import { AttributeValues } from "@nmshd/content";

export interface SucceedAttributeRequest {
successorContent: {
value: ConnectorAttributeValue;
value: AttributeValues.Identity.Json | AttributeValues.Relationship.Json;
tags?: string[];
validFrom?: string;
validTo?: string;
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/src/types/messages/ConnectorMessage.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ConnectorMessageContentDerivation } from "./ConnectorMessageContentDerivation";
import { ArbitraryMessageContentJSON, MailJSON, NotificationJSON, RequestJSON, ResponseWrapperJSON } from "@nmshd/content";
import { ConnectorMessageRecipient } from "./ConnectorMessageRecipient";

export interface ConnectorMessage {
id: string;
content: ConnectorMessageContentDerivation;
content: MailJSON | ResponseWrapperJSON | RequestJSON | NotificationJSON | ArbitraryMessageContentJSON;
createdBy: string;
createdByDevice: string;
recipients: ConnectorMessageRecipient[];
Expand Down

This file was deleted.

Loading

0 comments on commit 9836926

Please sign in to comment.