@narrative.io/data-collaboration-sdk-ts 0.16.1 → 0.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,7 +10,7 @@ class AccessTokensApi extends BaseApi {
|
|
|
10
10
|
* console.log(tokens);
|
|
11
11
|
*/
|
|
12
12
|
async getAccessTokens() {
|
|
13
|
-
return await this.get(resourceName);
|
|
13
|
+
return await this.get(`${resourceName}/tokens`);
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Retrieves a single access token by its ID.
|
|
@@ -22,7 +22,7 @@ class AccessTokensApi extends BaseApi {
|
|
|
22
22
|
* console.log(tokenMetadata);
|
|
23
23
|
*/
|
|
24
24
|
async getAccessToken(id) {
|
|
25
|
-
return await this.get(`${resourceName}/${id}`);
|
|
25
|
+
return await this.get(`${resourceName}/tokens/${id}`);
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Creates a new access token with the provided data.
|
|
@@ -38,7 +38,7 @@ class AccessTokensApi extends BaseApi {
|
|
|
38
38
|
* console.log(newToken);
|
|
39
39
|
*/
|
|
40
40
|
async createAccessToken(data) {
|
|
41
|
-
return await this.post(resourceName
|
|
41
|
+
return await this.post(`${resourceName}/tokens`, data);
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Updates an existing access token by ID with the provided data.
|
|
@@ -55,7 +55,7 @@ class AccessTokensApi extends BaseApi {
|
|
|
55
55
|
* console.log(updatedToken);
|
|
56
56
|
*/
|
|
57
57
|
async updateAccessToken(id, data) {
|
|
58
|
-
return await this.put(`${resourceName}/${id}`, data);
|
|
58
|
+
return await this.put(`${resourceName}/tokens/${id}`, data);
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
61
|
* Deletes an access token by its ID.
|
|
@@ -67,7 +67,7 @@ class AccessTokensApi extends BaseApi {
|
|
|
67
67
|
* console.log('Token deleted successfully');
|
|
68
68
|
*/
|
|
69
69
|
async deleteAccessToken(id) {
|
|
70
|
-
await this.delete(`${resourceName}/${id}`);
|
|
70
|
+
await this.delete(`${resourceName}/tokens/${id}`);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
export { AccessTokensApi, };
|