From 39870a02408800b0fe4a7de6cb9ac429f6517fad Mon Sep 17 00:00:00 2001 From: Aitor <1726644+aaitor@users.noreply.github.com> Date: Tue, 8 Oct 2024 17:22:45 +0200 Subject: [PATCH] fix: loading just the public urls --- package.json | 2 +- src/ddo/DDO.ts | 4 +++- src/types/DDOTypes.ts | 6 ------ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 6a04cb639..473b18cd9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nevermined-io/sdk", - "version": "3.0.38", + "version": "3.0.39", "description": "Javascript SDK for connecting with Nevermined Data Platform ", "main": "./dist/node/sdk.js", "typings": "./dist/node/sdk.d.ts", diff --git a/src/ddo/DDO.ts b/src/ddo/DDO.ts index 7fa6cd496..da09d0292 100644 --- a/src/ddo/DDO.ts +++ b/src/ddo/DDO.ts @@ -789,12 +789,14 @@ export class DDO { const serviceHostUrl = new URL(webService.serviceHost) const serviceHost = serviceHostUrl.origin + const _queryProtocolEndpoints: { [verb: string]: string }[] = [] NeverminedQueryProtocolEndpoints.map((endpoint) => { Object.entries(endpoint).flatMap(([key, value]) => { const endpointUrl = `${serviceHost}${value}`.replace('{DID}', did) - webService.endpoints?.push({ [key]: endpointUrl }) + _queryProtocolEndpoints.push({ [key]: endpointUrl }) }) }) + webService.endpoints = _queryProtocolEndpoints if (webService?.isNeverminedHosted) { const openApiEndpoint = `${serviceHost}/api/v1/rest/docs-json` diff --git a/src/types/DDOTypes.ts b/src/types/DDOTypes.ts index fc635a621..489f3bdeb 100644 --- a/src/types/DDOTypes.ts +++ b/src/types/DDOTypes.ts @@ -190,12 +190,6 @@ export interface MetaDataExternalResource { } export const NeverminedQueryProtocolEndpoints: { [verb: string]: string }[] = [ - { GET: '/api/v1/agents' }, - { POST: '/api/v1/agents/search' }, - { GET: '/api/v1/agents/steps' }, - { GET: '/api/v1/agents/{DID}/tasks/(.*)/steps' }, - { POST: '/api/v1/agents/{DID}/tasks/(.*)/steps' }, - { PUT: '/api/v1/agents/{DID}/tasks/(.*)/step/(.*)' }, { POST: '/api/v1/agents/{DID}/tasks' }, { GET: '/api/v1/agents/{DID}/tasks/(.*)' }, ]