lz-api-client
Advanced tools
Comparing version 0.1.1 to 0.2.1
@@ -44,4 +44,4 @@ "use strict"; | ||
referrerPolicy: this.referrerPolicy, | ||
}).then(this.handleResponse) | ||
.then((res) => res); | ||
}).then((this.handleResponse)) | ||
.catch((this.handleResponse)); | ||
}); | ||
@@ -63,4 +63,4 @@ } | ||
referrerPolicy: this.referrerPolicy, | ||
}).then(this.handleResponse) | ||
.then((res) => res); | ||
}).then((this.handleResponse)) | ||
.catch((this.handleResponse)); | ||
}); | ||
@@ -70,7 +70,4 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (response.ok) { | ||
const txt = yield response.text(); | ||
return txt ? JSON.parse(txt) : {}; | ||
} | ||
throw new Error(response.statusText); | ||
const txt = yield response.text(); | ||
return txt ? JSON.parse(txt) : {}; | ||
}); | ||
@@ -77,0 +74,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { Account, SignInResponse } from "lz-schema"; | ||
import { Account, SignInResponse, Response } from "lz-schema"; | ||
import { Client } from "../Client"; | ||
@@ -14,2 +14,3 @@ export declare class AccountService { | ||
signOut(): void; | ||
getAuth(): Promise<Response<Account>>; | ||
} |
@@ -30,4 +30,7 @@ "use strict"; | ||
} | ||
getAuth() { | ||
return this.client.get("/account-auth", {}); | ||
} | ||
} | ||
exports.AccountService = AccountService; | ||
//# sourceMappingURL=AccountService.js.map |
@@ -11,2 +11,8 @@ "use strict"; | ||
} | ||
// TODO method get campaigns list with search | ||
// TODO method create campaigns | ||
// TODO method update campaigns | ||
// TODO method delete campaigns | ||
// TODO add fields to campaign target, collaborators, updatedBy, createdBy, | ||
// createdAt, updatedAt, status. | ||
getJourneys({ campaignId }) { | ||
@@ -13,0 +19,0 @@ return this.client.get(`/campaigns/${campaignId}/journeys`, {}); |
{ | ||
"name": "lz-api-client", | ||
"version": "0.1.1", | ||
"version": "0.2.1", | ||
"description": "client sdk for layerZ api", | ||
@@ -27,4 +27,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"lz-schema": "^0.2.0" | ||
"lz-schema": "^0.3.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
23343
353
+ Addedlz-schema@0.3.0(transitive)
- Removedlz-schema@0.2.3(transitive)
Updatedlz-schema@^0.3.0