lz-api-client
Advanced tools
Comparing version 0.10.1 to 0.11.0
@@ -1,2 +0,2 @@ | ||
import type { CampaignStatus, CreateCampaignBody, SearchFieldsBody, UpdateCampaignBody } from 'lz-schema'; | ||
import type { CreateCampaignBody, UpdateCampaignBody, SearchCampaignQuery } from 'lz-schema'; | ||
import type { Client } from '../Client'; | ||
@@ -16,3 +16,3 @@ export declare class CampaignService { | ||
name: string; | ||
status: CampaignStatus; | ||
status: import("lz-schema").CampaignStatus; | ||
createdAt: number; | ||
@@ -43,12 +43,10 @@ updatedAt: number; | ||
* Search campaigns by name and/or status. | ||
* If no params are provided, it will return all campaigns. | ||
* If no query is provided, it will return all campaigns in the workspace. | ||
* @throws { ClientError } | ||
* @throws { ServerError } | ||
*/ | ||
search(params: SearchFieldsBody & { | ||
status?: CampaignStatus; | ||
}): Promise<{ | ||
search(workspaceId: string, query: SearchCampaignQuery): Promise<{ | ||
id: string; | ||
name: string; | ||
status: CampaignStatus; | ||
status: import("lz-schema").CampaignStatus; | ||
createdAt: number; | ||
@@ -55,0 +53,0 @@ updatedAt: number; |
@@ -29,8 +29,8 @@ "use strict"; | ||
* Search campaigns by name and/or status. | ||
* If no params are provided, it will return all campaigns. | ||
* If no query is provided, it will return all campaigns in the workspace. | ||
* @throws { ClientError } | ||
* @throws { ServerError } | ||
*/ | ||
search(params) { | ||
return this.client.get('/campaigns', params); | ||
search(workspaceId, query) { | ||
return this.client.get(`/workspaces/${workspaceId}/campaigns`, query); | ||
} | ||
@@ -37,0 +37,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import type { CreateJourneyBody, InsertedId, SearchFieldsBody } from 'lz-schema'; | ||
import type { CreateJourneyBody, InsertedId, SearchJourneyQuery } from 'lz-schema'; | ||
import type { Client } from '../Client'; | ||
@@ -38,6 +38,7 @@ export declare class JourneyService { | ||
* Get all journeys filtered by query | ||
* If no query is provided, it will return all journeys in the workspace. | ||
* @throws { ClientError } | ||
* @throws { ServerError } | ||
*/ | ||
search(params: SearchFieldsBody): Promise<{ | ||
search(workspaceId: string, query: SearchJourneyQuery): Promise<{ | ||
id: string; | ||
@@ -44,0 +45,0 @@ name: string; |
@@ -29,7 +29,8 @@ "use strict"; | ||
* Get all journeys filtered by query | ||
* If no query is provided, it will return all journeys in the workspace. | ||
* @throws { ClientError } | ||
* @throws { ServerError } | ||
*/ | ||
search(params) { | ||
return this.client.get('/journeys', params); | ||
search(workspaceId, query) { | ||
return this.client.get(`/workspaces/${workspaceId}/journeys`, query); | ||
} | ||
@@ -36,0 +37,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import type { SearchFieldsBody } from 'lz-schema'; | ||
import type { SearchLayerQuery } from 'lz-schema'; | ||
import type { Client } from '../Client'; | ||
@@ -38,7 +38,7 @@ export declare class LayerService { | ||
* Search layers by name. | ||
* If no params are provided, it will return all layers. | ||
* If no query is provided, it will return all layers in the workspace. | ||
* @throws { ClientError } | ||
* @throws { ServerError } | ||
*/ | ||
search(params: SearchFieldsBody): Promise<{ | ||
search(workspaceId: string, query: SearchLayerQuery): Promise<{ | ||
id: string; | ||
@@ -45,0 +45,0 @@ name: string; |
@@ -18,8 +18,8 @@ "use strict"; | ||
* Search layers by name. | ||
* If no params are provided, it will return all layers. | ||
* If no query is provided, it will return all layers in the workspace. | ||
* @throws { ClientError } | ||
* @throws { ServerError } | ||
*/ | ||
search(params) { | ||
return this.client.get('/layers', params); | ||
search(workspaceId, query) { | ||
return this.client.get(`/workspaces/${workspaceId}/layers`, query); | ||
} | ||
@@ -26,0 +26,0 @@ } |
{ | ||
"name": "lz-api-client", | ||
"version": "0.10.1", | ||
"version": "0.11.0", | ||
"description": "client sdk for layerZ api", | ||
@@ -34,4 +34,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"lz-schema": "^0.11.1" | ||
"lz-schema": "^0.12.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
71589
+ Addedlz-schema@0.12.1(transitive)
- Removedlz-schema@0.11.1(transitive)
Updatedlz-schema@^0.12.0