@vizzly/api-client
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -21,9 +21,3 @@ import { CreateDashboardParams, Dashboard, Response, UpdateDashboardParams } from '../types'; | ||
dashboard: Dashboard; | ||
permissions: ({ | ||
userReference: string; | ||
token: string; | ||
scope: "read" | "read_write"; | ||
} & { | ||
dashboardId: string; | ||
})[]; | ||
permissions: import("../types").DashboardPermission[]; | ||
}>; | ||
@@ -33,11 +27,5 @@ updateDashboard(params: UpdateDashboardParams): Promise<Response<CreateDashboardResponseBody>>; | ||
fetchDashboardAccessTokens(): Promise<{ | ||
permissions: ({ | ||
userReference: string; | ||
token: string; | ||
scope: "read" | "read_write"; | ||
} & { | ||
dashboardId: string; | ||
})[]; | ||
permissions: import("../types").DashboardPermission[]; | ||
}>; | ||
} | ||
export {}; |
@@ -1,9 +0,10 @@ | ||
import { GlobalLibrary, UpdateGlobalLibraryParams, nVizzlyApi } from '../types'; | ||
import { GlobalLibrary, GlobalLibraryPermission, UpdateGlobalLibraryParams, nVizzlyApi } from '../types'; | ||
import { Vizzly } from './Vizzly'; | ||
export declare class GlobalLibraryRepository { | ||
private vizzly; | ||
private cachedPermissions; | ||
constructor(vizzly: Vizzly); | ||
createGlobalLibrary(createParams: nVizzlyApi.CreateGlobalLibraryParams): Promise<import("../types").Response<{ | ||
global_library: GlobalLibrary; | ||
permissions: import("../types").GlobalLibraryPermission[]; | ||
permissions: GlobalLibraryPermission[]; | ||
}>>; | ||
@@ -14,9 +15,3 @@ fetchGlobalLibraries(): Promise<{ | ||
fetchGlobalLibraryAccessTokens(): Promise<{ | ||
permissions: ({ | ||
userReference: string; | ||
token: string; | ||
scope: "read" | "read_write"; | ||
} & { | ||
globalLibraryId: string; | ||
})[]; | ||
permissions: GlobalLibraryPermission[]; | ||
}>; | ||
@@ -23,0 +18,0 @@ updateGlobalLibrary(params: UpdateGlobalLibraryParams): Promise<import("../types").Response<unknown>>; |
@@ -19,2 +19,3 @@ "use strict"; | ||
constructor(vizzly) { | ||
this.cachedPermissions = { permissions: [] }; | ||
this.vizzly = vizzly; | ||
@@ -41,9 +42,2 @@ } | ||
} | ||
// async updateGlobalLibrary(params: {}) { | ||
// const vizzlyApi = this.vizzly.getVizzlyAPI(); | ||
// const accessTokens = await vizzlyApi.execute<{ | ||
// permissions: Array<{ global_library_id: string; token: string; user_reference: string, scope: 'read' | 'read_write' }>; | ||
// }>(vizzlyApi.()); | ||
// return accessTokens; | ||
// } | ||
fetchGlobalLibraryAccessTokens() { | ||
@@ -50,0 +44,0 @@ return __awaiter(this, void 0, void 0, function* () { |
@@ -1,12 +0,2 @@ | ||
type BasePermission = { | ||
userReference: string; | ||
token: string; | ||
scope: 'read' | 'read_write'; | ||
}; | ||
type DashboardPermission = BasePermission & { | ||
dashboardId: string; | ||
}; | ||
type GlobalLibraryPermission = BasePermission & { | ||
globalLibraryId: string; | ||
}; | ||
import { DashboardPermission, GlobalLibraryPermission } from '../types'; | ||
export declare class Permission { | ||
@@ -26,2 +16,1 @@ static formatDashboardPermission(permission: { | ||
} | ||
export {}; |
@@ -5,3 +5,3 @@ import { APIs, PartialBy } from '../types'; | ||
import { GlobalLibraryRepository } from './GlobalLibraryRepository'; | ||
import { Dashboard } from './Dashboard'; | ||
import { DashboardManager } from './DashboardManager'; | ||
export declare class Vizzly { | ||
@@ -17,3 +17,3 @@ private APIs; | ||
getGlobalLibraryRepository(): GlobalLibraryRepository; | ||
getDashboard(): Dashboard; | ||
getDashboardManager(): DashboardManager; | ||
} |
@@ -7,3 +7,3 @@ "use strict"; | ||
const GlobalLibraryRepository_1 = require("./GlobalLibraryRepository"); | ||
const Dashboard_1 = require("./Dashboard"); | ||
const DashboardManager_1 = require("./DashboardManager"); | ||
class Vizzly { | ||
@@ -35,7 +35,6 @@ constructor(APIs, implementationStrategy) { | ||
} | ||
// TODO; what should this be called!? | ||
getDashboard() { | ||
return new Dashboard_1.Dashboard(this); | ||
getDashboardManager() { | ||
return new DashboardManager_1.DashboardManager(this); | ||
} | ||
} | ||
exports.Vizzly = Vizzly; |
@@ -400,7 +400,12 @@ import { VizzlyQueryEngineApi } from './models/VizzlyQueryEngineApi'; | ||
}; | ||
export type GlobalLibraryPermission = { | ||
global_library_id: string; | ||
scope: 'read_write' | 'read'; | ||
type BasePermission = { | ||
userReference: string; | ||
token: string; | ||
user_reference: string; | ||
scope: 'read' | 'read_write'; | ||
}; | ||
export type DashboardPermission = BasePermission & { | ||
dashboardId: string; | ||
}; | ||
export type GlobalLibraryPermission = BasePermission & { | ||
globalLibraryId: string; | ||
}; |
{ | ||
"name": "@vizzly/api-client", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "license": "NONE", |
111746
2675