Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade runtime #227

Merged
merged 28 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5116cdb
chore: upgrade runtime
Magnus-Kuhn Aug 2, 2024
f35ee4b
chore: fix tests
sebbi08 Aug 2, 2024
2f07b50
Merge branch 'release/v5' into chore/upgrade-runtime
Magnus-Kuhn Aug 6, 2024
3a61fd8
fix: npm i
Magnus-Kuhn Aug 6, 2024
fda33a5
refactor: remove comment
Magnus-Kuhn Aug 6, 2024
4097242
chore: upgrade backbone
Magnus-Kuhn Aug 6, 2024
8467ea4
refactor: isDefault true
Magnus-Kuhn Aug 6, 2024
95c37cc
Merge branch 'release/v5' into chore/upgrade-runtime
Magnus-Kuhn Aug 6, 2024
a4efe56
fix: use syncUntil in test
Magnus-Kuhn Aug 6, 2024
2055c28
Merge branch 'release/v5' into chore/upgrade-runtime
mergify[bot] Aug 7, 2024
8f105c1
chore: bump runtime to real v5
jkoenig134 Aug 12, 2024
5d8488a
chore: undo unnecessary formatting change
jkoenig134 Aug 13, 2024
6da3ed4
Merge branch 'release/v5' into chore/upgrade-runtime
mergify[bot] Aug 13, 2024
b265029
fix: update test
jkoenig134 Aug 13, 2024
ac669fa
refactor: rename ConnectorResponse to Response
jkoenig134 Aug 14, 2024
2cabd35
refactor: Response -> ConnectorHttpResponse
jkoenig134 Aug 14, 2024
50daf37
refactor: update sdk types
jkoenig134 Aug 14, 2024
8c1a20c
refactor: update tests
jkoenig134 Aug 14, 2024
1b242f6
chore: bump local backbone
jkoenig134 Aug 14, 2024
4f335e2
ci: audit exclude
jkoenig134 Aug 14, 2024
2e4253e
Merge branch 'release/v5' into chore/upgrade-runtime
jkoenig134 Aug 14, 2024
dc4b7ed
chore: rm comment
jkoenig134 Aug 14, 2024
1026865
fix: specify atTypes
jkoenig134 Aug 14, 2024
eb84ba6
fix: do not use runtime in connector tests
jkoenig134 Aug 14, 2024
8ea0b3f
fix: more issues
jkoenig134 Aug 14, 2024
040f8ea
chore: remove relic
jkoenig134 Aug 14, 2024
c3e27c4
fix: naming
jkoenig134 Aug 15, 2024
7088ae6
fix: make only optional where necessary
jkoenig134 Aug 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dev/compose.backbone.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BACKBONE_VERSION=6.2.0
BACKBONE_VERSION=6.5.1
2 changes: 1 addition & 1 deletion .dev/compose.backbone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ services:
image: postgres
environment:
- PGPASSWORD=Passw0rd
command: /bin/bash -c 'env && apt update -y && apt install -y wget && wget https://raw.githubusercontent.com/nmshd/backbone/${BACKBONE_VERSION}/setup-db/setup-postgres.sql -O /setup-postgres.sql && psql -h postgres -U postgres -d enmeshed -f /setup-postgres.sql'
command: /bin/bash -c 'env && apt update -y && apt install -y wget && wget https://raw.githubusercontent.com/nmshd/backbone/${BACKBONE_VERSION}/scripts/sql/postgres/setup.sql -O /setup-postgres.sql && psql -h postgres -U postgres -d enmeshed -f /setup-postgres.sql'
depends_on:
database:
condition: service_healthy
Expand Down
64 changes: 26 additions & 38 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"@js-soft/node-logger": "1.2.0",
"@js-soft/ts-utils": "^2.3.3",
"@nmshd/iql": "^1.0.2",
"@nmshd/runtime": "5.0.0-alpha.9",
"@nmshd/runtime": "5.0.0",
"agentkeepalive": "4.5.0",
"amqplib": "^0.10.4",
"axios": "^1.7.4",
Expand Down
8 changes: 4 additions & 4 deletions packages/sdk/src/endpoints/AccountEndpoint.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { ConnectorResponse, ConnectorSyncInfo, IdentityInfo } from "../types";
import { ConnectorHttpResponse, ConnectorSyncInfo, IdentityInfo } from "../types";
import { Endpoint } from "./Endpoint";

export class AccountEndpoint extends Endpoint {
public async getIdentityInfo(): Promise<ConnectorResponse<IdentityInfo>> {
public async getIdentityInfo(): Promise<ConnectorHttpResponse<IdentityInfo>> {
return await this.get("/api/v2/Account/IdentityInfo");
}

public async sync(): Promise<ConnectorResponse<void>> {
public async sync(): Promise<ConnectorHttpResponse<void>> {
return await this.post("/api/v2/Account/Sync", undefined, 204);
}

public async getSyncInfo(): Promise<ConnectorResponse<ConnectorSyncInfo>> {
public async getSyncInfo(): Promise<ConnectorHttpResponse<ConnectorSyncInfo>> {
return await this.get("/api/v2/Account/SyncInfo");
}
}
40 changes: 20 additions & 20 deletions packages/sdk/src/endpoints/AttributesEndpoint.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
ConnectorAttribute,
ConnectorAttributes,
ConnectorResponse,
ConnectorHttpResponse,
CreateRepositoryAttributeRequest,
DeleteOwnSharedAttributeAndNotifyPeerResponse,
DeletePeerSharedAttributeAndNotifyOwnerResponse,
Expand All @@ -24,84 +24,84 @@ import {
import { Endpoint } from "./Endpoint";

export class AttributesEndpoint extends Endpoint {
public async createRepositoryAttribute(request: CreateRepositoryAttributeRequest): Promise<ConnectorResponse<ConnectorAttribute>> {
public async createRepositoryAttribute(request: CreateRepositoryAttributeRequest): Promise<ConnectorHttpResponse<ConnectorAttribute>> {
return await this.post("/api/v2/Attributes", request);
}

public async succeedAttribute(predecessorId: string, request: SucceedAttributeRequest): Promise<ConnectorResponse<SucceedAttributeResponse>> {
public async succeedAttribute(predecessorId: string, request: SucceedAttributeRequest): Promise<ConnectorHttpResponse<SucceedAttributeResponse>> {
return await this.post(`/api/v2/Attributes/${predecessorId}/Succeed`, request);
}

public async notifyPeerAboutRepositoryAttributeSuccession(
attributeId: string,
request: NotifyPeerAboutRepositoryAttributeSuccessionRequest
): Promise<ConnectorResponse<NotifyPeerAboutRepositoryAttributeSuccessionResponse>> {
): Promise<ConnectorHttpResponse<NotifyPeerAboutRepositoryAttributeSuccessionResponse>> {
return await this.post(`/api/v2/Attributes/${attributeId}/NotifyPeer`, request);
}

public async getAttributes(request: GetAttributesRequest): Promise<ConnectorResponse<ConnectorAttributes>> {
public async getAttributes(request: GetAttributesRequest): Promise<ConnectorHttpResponse<ConnectorAttributes>> {
return await this.get("/api/v2/Attributes", request);
}

public async getAttribute(attributeId: string): Promise<ConnectorResponse<ConnectorAttribute>> {
public async getAttribute(attributeId: string): Promise<ConnectorHttpResponse<ConnectorAttribute>> {
return await this.get(`/api/v2/Attributes/${attributeId}`);
}

public async getValidAttributes(request: GetValidAttributesRequest): Promise<ConnectorResponse<ConnectorAttributes>> {
public async getValidAttributes(request: GetValidAttributesRequest): Promise<ConnectorHttpResponse<ConnectorAttributes>> {
return await this.get("/api/v2/Attributes/Valid", request);
}

public async getOwnRepositoryAttributes(request?: GetOwnRepositoryAttributesRequest): Promise<ConnectorResponse<ConnectorAttributes>> {
public async getOwnRepositoryAttributes(request?: GetOwnRepositoryAttributesRequest): Promise<ConnectorHttpResponse<ConnectorAttributes>> {
return await this.get("/api/v2/Attributes/Own/Repository", request);
}

public async getOwnSharedIdentityAttributes(request?: GetOwnSharedIdentityAttributesRequest): Promise<ConnectorResponse<ConnectorAttributes>> {
public async getOwnSharedIdentityAttributes(request?: GetOwnSharedIdentityAttributesRequest): Promise<ConnectorHttpResponse<ConnectorAttributes>> {
return await this.get("/api/v2/Attributes/Own/Shared/Identity", request);
}

public async getPeerSharedIdentityAttributes(request?: GetPeerSharedIdentityAttributesRequest): Promise<ConnectorResponse<ConnectorAttributes>> {
public async getPeerSharedIdentityAttributes(request?: GetPeerSharedIdentityAttributesRequest): Promise<ConnectorHttpResponse<ConnectorAttributes>> {
return await this.get("/api/v2/Attributes/Peer/Shared/Identity", request);
}

public async getVersionsOfAttribute(attributeId: string): Promise<ConnectorResponse<ConnectorAttributes>> {
public async getVersionsOfAttribute(attributeId: string): Promise<ConnectorHttpResponse<ConnectorAttributes>> {
return await this.get(`/api/v2/Attributes/${attributeId}/Versions`);
}

public async getSharedVersionsOfAttribute(attributeId: string, request: GetSharedVersionsOfRepositoryAttributeRequest): Promise<ConnectorResponse<ConnectorAttributes>> {
public async getSharedVersionsOfAttribute(attributeId: string, request: GetSharedVersionsOfRepositoryAttributeRequest): Promise<ConnectorHttpResponse<ConnectorAttributes>> {
return await this.get(`/api/v2/Attributes/${attributeId}/Versions/Shared`, request);
}

public async deleteOwnSharedAttributeAndNotifyPeer(attributeId: string): Promise<ConnectorResponse<DeleteOwnSharedAttributeAndNotifyPeerResponse>> {
public async deleteOwnSharedAttributeAndNotifyPeer(attributeId: string): Promise<ConnectorHttpResponse<DeleteOwnSharedAttributeAndNotifyPeerResponse>> {
return await this.delete(`/api/v2/Attributes/Own/Shared/${attributeId}`);
}

public async deletePeerSharedAttributeAndNotifyOwner(attributeId: string): Promise<ConnectorResponse<DeletePeerSharedAttributeAndNotifyOwnerResponse>> {
public async deletePeerSharedAttributeAndNotifyOwner(attributeId: string): Promise<ConnectorHttpResponse<DeletePeerSharedAttributeAndNotifyOwnerResponse>> {
return await this.delete(`/api/v2/Attributes/Peer/Shared/${attributeId}`);
}

public async deleteRepositoryAttribute(attributeId: string): Promise<ConnectorResponse<void>> {
public async deleteRepositoryAttribute(attributeId: string): Promise<ConnectorHttpResponse<void>> {
return await this.delete(`/api/v2/Attributes/${attributeId}`, undefined, 204);
}

public async deleteThirdPartyOwnedRelationshipAttributeAndNotifyPeer(
attributeId: string
): Promise<ConnectorResponse<DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerResponse>> {
): Promise<ConnectorHttpResponse<DeleteThirdPartyOwnedRelationshipAttributeAndNotifyPeerResponse>> {
return await this.delete(`/api/v2/Attributes/ThirdParty/${attributeId}`);
}

public async executeIdentityAttributeQuery(request: ExecuteIdentityAttributeQueryRequest): Promise<ConnectorResponse<ConnectorAttributes>> {
public async executeIdentityAttributeQuery(request: ExecuteIdentityAttributeQueryRequest): Promise<ConnectorHttpResponse<ConnectorAttributes>> {
return await this.post("/api/v2/Attributes/ExecuteIdentityAttributeQuery", request, 200);
}

public async executeRelationshipAttributeQuery(request: ExecuteRelationshipAttributeQueryRequest): Promise<ConnectorResponse<ConnectorAttribute>> {
public async executeRelationshipAttributeQuery(request: ExecuteRelationshipAttributeQueryRequest): Promise<ConnectorHttpResponse<ConnectorAttribute>> {
return await this.post("/api/v2/Attributes/ExecuteRelationshipAttributeQuery", request, 200);
}

public async executeThirdPartyRelationshipAttributeQuery(request: ExecuteThirdPartyRelationshipAttributeQueryRequest): Promise<ConnectorResponse<ConnectorAttribute[]>> {
public async executeThirdPartyRelationshipAttributeQuery(request: ExecuteThirdPartyRelationshipAttributeQueryRequest): Promise<ConnectorHttpResponse<ConnectorAttribute[]>> {
return await this.post("/api/v2/Attributes/ExecuteThirdPartyRelationshipAttributeQuery", request, 200);
}

public async executeIQLQuery(request: ExecuteIQLQueryRequest): Promise<ConnectorResponse<ConnectorAttribute[]>> {
public async executeIQLQuery(request: ExecuteIQLQueryRequest): Promise<ConnectorHttpResponse<ConnectorAttribute[]>> {
return await this.post("/api/v2/Attributes/ExecuteIQLQuery", request, 200);
}
}
6 changes: 3 additions & 3 deletions packages/sdk/src/endpoints/ChallengesEndpoint.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ConnectorChallenge, ConnectorChallengeValidationResult, ConnectorResponse, CreateChallengeRequest, ValidateChallengeRequest } from "../types";
import { ConnectorChallenge, ConnectorChallengeValidationResult, ConnectorHttpResponse, CreateChallengeRequest, ValidateChallengeRequest } from "../types";
import { Endpoint } from "./Endpoint";

export class ChallengesEndpoint extends Endpoint {
public async createChallenge(request: CreateChallengeRequest): Promise<ConnectorResponse<ConnectorChallenge>> {
public async createChallenge(request: CreateChallengeRequest): Promise<ConnectorHttpResponse<ConnectorChallenge>> {
return await this.post("/api/v2/Challenges", request);
}

public async validateChallenge(request: ValidateChallengeRequest): Promise<ConnectorResponse<ConnectorChallengeValidationResult>> {
public async validateChallenge(request: ValidateChallengeRequest): Promise<ConnectorHttpResponse<ConnectorChallengeValidationResult>> {
return await this.post("/api/v2/Challenges/Validate", request, 200);
}
}
Loading
Loading