@bandada/api-sdk
Advanced tools
Comparing version 0.13.0 to 0.14.0
/** | ||
* @module @bandada/api-sdk | ||
* @version 0.13.0 | ||
* @version 0.14.0 | ||
* @file A Typescript SDK for the Bandada API. | ||
@@ -91,2 +91,3 @@ * @copyright Ethereum Foundation 2023 | ||
groups = _a.sent(); | ||
groups.map(function (group) { return (__assign(__assign({}, group), { credentials: JSON.parse(group.credentials) })); }); | ||
return [2 /*return*/, groups]; | ||
@@ -112,2 +113,3 @@ } | ||
group = _a.sent(); | ||
group.credentials = JSON.parse(group.credentials); | ||
return [2 /*return*/, group]; | ||
@@ -193,3 +195,3 @@ } | ||
return __awaiter(this, void 0, void 0, function () { | ||
var requestUrl; | ||
var requestUrl, newConfig; | ||
return __generator(this, function (_a) { | ||
@@ -199,8 +201,6 @@ switch (_a.label) { | ||
requestUrl = "".concat(url$1, "/").concat(groupId, "/members/").concat(memberId); | ||
return [4 /*yield*/, utils.request(requestUrl, { | ||
method: "post", | ||
data: { | ||
inviteCode: inviteCode | ||
} | ||
})]; | ||
newConfig = __assign({ method: "post", data: { | ||
inviteCode: inviteCode | ||
} }, config); | ||
return [4 /*yield*/, utils.request(requestUrl, newConfig)]; | ||
case 1: | ||
@@ -254,2 +254,3 @@ _a.sent(); | ||
invite = _a.sent(); | ||
invite.group.credentials = JSON.parse(invite.group.credentials); | ||
return [2 /*return*/, invite]; | ||
@@ -273,3 +274,3 @@ } | ||
if (!config["baseURL"]) { | ||
this._config = __assign({ baseUrl: url }, config); | ||
this._config = __assign({ baseURL: url }, config); | ||
} | ||
@@ -276,0 +277,0 @@ else { |
@@ -10,3 +10,6 @@ export type GroupResponse = { | ||
members: string[]; | ||
credentials: object; | ||
credentials: { | ||
id: string; | ||
criteria: Record<string, any>; | ||
}; | ||
}; | ||
@@ -20,3 +23,6 @@ type Group = { | ||
fingerprintDuration: number; | ||
credentials: object; | ||
credentials: { | ||
id: string; | ||
criteria: Record<string, any>; | ||
}; | ||
apiEnabled: boolean; | ||
@@ -23,0 +29,0 @@ apiKey: string; |
{ | ||
"name": "@bandada/api-sdk", | ||
"version": "0.13.0", | ||
"version": "0.14.0", | ||
"description": "A Typescript SDK for the Bandada API.", | ||
@@ -32,3 +32,3 @@ "license": "MIT", | ||
"dependencies": { | ||
"@bandada/utils": "0.13.0" | ||
"@bandada/utils": "0.14.0" | ||
}, | ||
@@ -35,0 +35,0 @@ "devDependencies": { |
@@ -33,3 +33,3 @@ import { SupportedUrl, GroupResponse, InviteResponse } from "./types" | ||
this._config = { | ||
baseUrl: url, | ||
baseURL: url, | ||
...config | ||
@@ -36,0 +36,0 @@ } |
@@ -13,2 +13,7 @@ import { request } from "@bandada/utils" | ||
groups.map((group: any) => ({ | ||
...group, | ||
credentials: JSON.parse(group.credentials) | ||
})) | ||
return groups | ||
@@ -30,2 +35,4 @@ } | ||
group.credentials = JSON.parse(group.credentials) | ||
return group | ||
@@ -110,8 +117,11 @@ } | ||
await request(requestUrl, { | ||
const newConfig: any = { | ||
method: "post", | ||
data: { | ||
inviteCode | ||
} | ||
}) | ||
}, | ||
...config | ||
} | ||
await request(requestUrl, newConfig) | ||
} | ||
@@ -118,0 +128,0 @@ |
@@ -19,3 +19,5 @@ import { request } from "@bandada/utils" | ||
invite.group.credentials = JSON.parse(invite.group.credentials) | ||
return invite | ||
} |
@@ -10,3 +10,6 @@ export type GroupResponse = { | ||
members: string[] | ||
credentials: object | ||
credentials: { | ||
id: string | ||
criteria: Record<string, any> | ||
} | ||
} | ||
@@ -21,3 +24,6 @@ | ||
fingerprintDuration: number | ||
credentials: object | ||
credentials: { | ||
id: string | ||
criteria: Record<string, any> | ||
} | ||
apiEnabled: boolean | ||
@@ -24,0 +30,0 @@ apiKey: string |
Sorry, the diff of this file is not supported yet
66802
1698
+ Added@bandada/utils@0.14.0(transitive)
- Removed@bandada/utils@0.13.0(transitive)
Updated@bandada/utils@0.14.0