From 97b5fb467ef3933f55438e7ac96aee82a0c90c04 Mon Sep 17 00:00:00 2001 From: Jayanthi Date: Tue, 16 Sep 2025 20:56:15 +0530 Subject: [PATCH 1/4] Ednpoint points to storage service --- lib/storage/client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/storage/client.js b/lib/storage/client.js index 6b6acbe..bed7b7e 100644 --- a/lib/storage/client.js +++ b/lib/storage/client.js @@ -273,7 +273,7 @@ class Client extends CryptoConsumer { return this.authenticator .tokenFetch( this.config.apiUrl + - '/v1/storage/records/safe/' + + '/v2/storage/records/safe/' + recordId + '/' + version, @@ -307,7 +307,7 @@ class Client extends CryptoConsumer { return this.authenticator .tokenFetch( this.config.apiUrl + - '/v1/storage/records/safe/edit/' + + '/v2/storage/records/safe/edit/' + recordId + '/' + version, From 54371e9ec3a2256c3ce5870d6a3b457502cc9c81 Mon Sep 17 00:00:00 2001 From: Jayanthi Date: Tue, 23 Sep 2025 15:51:21 +0530 Subject: [PATCH 2/4] Delete and Read Endpoint --- lib/storage/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/storage/client.js b/lib/storage/client.js index bed7b7e..af82447 100644 --- a/lib/storage/client.js +++ b/lib/storage/client.js @@ -178,7 +178,7 @@ class Client extends CryptoConsumer { * @returns {Promise} */ async readRecord(recordId, fields = null) { - let path = this.config.apiUrl + '/v1/storage/records/' + recordId + let path = this.config.apiUrl + '/v2/storage/records/' + recordId if (fields !== null) { let mapped = [] From 40b5ac1cbe1e0f020903e77ba37c94a0c625d297 Mon Sep 17 00:00:00 2001 From: Jayanthi Date: Tue, 23 Sep 2025 15:55:41 +0530 Subject: [PATCH 3/4] Delete and Read Endpoint --- lib/storage/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/storage/client.js b/lib/storage/client.js index af82447..982aa7b 100644 --- a/lib/storage/client.js +++ b/lib/storage/client.js @@ -426,7 +426,7 @@ class Client extends CryptoConsumer { */ async deleteRecord(recordId, version) { const response = await this.authenticator.tokenFetch( - `${this.config.apiUrl}/v1/storage/records/safe/${recordId}/${version}`, + `${this.config.apiUrl}/v2/storage/records/safe/${recordId}/${version}`, { method: 'DELETE', headers: { From c841443578b3c416c8fda1485f97ae7a7226ffa7 Mon Sep 17 00:00:00 2001 From: Jayanthi Date: Wed, 15 Oct 2025 15:20:02 +0530 Subject: [PATCH 4/4] v1 to v2 --- lib/storage/client.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/storage/client.js b/lib/storage/client.js index 982aa7b..d435a63 100644 --- a/lib/storage/client.js +++ b/lib/storage/client.js @@ -90,7 +90,7 @@ class Client extends CryptoConsumer { */ async clientInfo(clientId) { let request = await this.authenticator.tokenFetch( - this.config.apiUrl + '/v1/storage/clients/' + clientId, + this.config.apiUrl + '/v2/storage/clients/' + clientId, { method: 'GET', headers: { @@ -238,7 +238,7 @@ class Client extends CryptoConsumer { ) } let request = await this.authenticator.tokenFetch( - this.config.apiUrl + '/v1/storage/records', + this.config.apiUrl + '/v2/storage/records', { method: 'POST', headers: { @@ -354,7 +354,7 @@ class Client extends CryptoConsumer { return this.authenticator .tokenFetch( this.config.apiUrl + - '/v1/storage/files/record/safe/' + + '/v2/storage/files/record/safe/' + recordId + '/' + version, @@ -486,7 +486,7 @@ class Client extends CryptoConsumer { record = new Record(meta, new RecordData(), signature) } const pendingResponse = await this.authenticator.tokenFetch( - `${this.config.apiUrl}/v1/storage/files/${recordId}/${version}`, + `${this.config.apiUrl}/v2/storage/files/${recordId}/${version}`, { method: 'PUT', headers: { @@ -500,7 +500,7 @@ class Client extends CryptoConsumer { await ops.upload(pendingFile.file_url, uploadFile, checksum, size) tempFile.remove() const finalizeResponse = await this.authenticator.tokenFetch( - `${this.config.apiUrl}/v1/storage/files/${pendingFile.id}`, + `${this.config.apiUrl}/v2/storage/files/${pendingFile.id}`, { method: 'PATCH', } @@ -551,7 +551,7 @@ class Client extends CryptoConsumer { record = new Record(meta, new RecordData(), signature) } const pendingResponse = await this.authenticator.tokenFetch( - `${this.config.apiUrl}/v1/storage/files/edit/${recordId}/${version}`, + `${this.config.apiUrl}/v2/storage/files/edit/${recordId}/${version}`, { method: 'PUT', headers: { @@ -565,7 +565,7 @@ class Client extends CryptoConsumer { await ops.upload(pendingFile.file_url, uploadFile, checksum, size) tempFile.remove() const finalizeResponse = await this.authenticator.tokenFetch( - `${this.config.apiUrl}/v1/storage/files/edit/${recordId}/${version}/${pendingFile.id}`, + `${this.config.apiUrl}/v2/storage/files/edit/${recordId}/${version}/${pendingFile.id}`, { method: 'PATCH', } @@ -639,7 +639,7 @@ class Client extends CryptoConsumer { record = new Record(meta, new RecordData(), signature) } const pendingResponse = await this.authenticator.tokenFetch( - `${this.config.apiUrl}/v1/storage/files`, + `${this.config.apiUrl}/v2/storage/files`, { method: 'POST', headers: { @@ -653,7 +653,7 @@ class Client extends CryptoConsumer { await ops.upload(pendingFile.file_url, uploadFile, checksum, size) tempFile.remove() const finalizeResponse = await this.authenticator.tokenFetch( - `${this.config.apiUrl}/v1/storage/files/${pendingFile.id}`, + `${this.config.apiUrl}/v2/storage/files/${pendingFile.id}`, { method: 'PATCH', }