lz-api-client
Advanced tools
Comparing version 0.12.9 to 0.13.0
@@ -8,2 +8,3 @@ import { AccountService } from './services/AccountService'; | ||
import { OrganizationService } from './services/OrganizationService'; | ||
import { RenderService } from './services/RenderService'; | ||
type GetParams = Record<string, string | number | boolean>; | ||
@@ -26,2 +27,3 @@ type BodyParams = Record<string, any>; | ||
organization: OrganizationService; | ||
render: RenderService; | ||
user: UserService; | ||
@@ -28,0 +30,0 @@ workspace: WorkspaceService; |
@@ -24,2 +24,3 @@ "use strict"; | ||
const cookies_1 = require("./utils/cookies"); | ||
const RenderService_1 = require("./services/RenderService"); | ||
class Client { | ||
@@ -37,2 +38,3 @@ constructor({ apiURL, referrerPolicy }) { | ||
this.organization = new OrganizationService_1.OrganizationService(this); | ||
this.render = new RenderService_1.RenderService(this); | ||
this.user = new UserService_1.UserService(this); | ||
@@ -39,0 +41,0 @@ this.workspace = new WorkspaceService_1.WorkspaceService(this); |
@@ -57,2 +57,9 @@ import type { CreateRenderBody, InsertedId, SearchFieldsQuery, UpdateRenderBody } from 'lz-schema'; | ||
}): Promise<null>; | ||
/** | ||
* Get the render HTML URL by render id. | ||
* This URL can be used to embed the render in an iframe. | ||
*/ | ||
getRenderHtmlUrl({ id }: { | ||
id: string; | ||
}): string; | ||
} |
@@ -61,4 +61,12 @@ "use strict"; | ||
} | ||
/** | ||
* Get the render HTML URL by render id. | ||
* This URL can be used to embed the render in an iframe. | ||
*/ | ||
getRenderHtmlUrl({ id }) { | ||
const url = new URL(`/renders/${id}/html`, this.client.apiURL); | ||
return url.toString(); | ||
} | ||
} | ||
exports.RenderService = RenderService; | ||
//# sourceMappingURL=RenderService.js.map |
{ | ||
"name": "lz-api-client", | ||
"version": "0.12.9", | ||
"version": "0.13.0", | ||
"description": "client sdk for layerZ api", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
83803
66
1635