@substrate/playground-client
Advanced tools
Comparing version 1.9.3 to 1.9.4
@@ -43,2 +43,4 @@ import { Playground, Pool, User, UserConfiguration, UserUpdateConfiguration, Repository, RepositoryConfiguration, RepositoryUpdateConfiguration, RepositoryVersion, SessionConfiguration, Session, SessionUpdateConfiguration, SessionExecutionConfiguration, SessionExecution, Role, RoleConfiguration, RoleUpdateConfiguration } from './types'; | ||
deleteRepositoryVersion(repositoryId: Repository['id'], repositoryVersionId: RepositoryVersion['id'], timeout?: number, init?: RequestInit): Promise<void>; | ||
getRepositoryLatestVersion(repositoryId: Repository['id'], timeout?: number, init?: RequestInit): Promise<RepositoryVersion | null>; | ||
createRepositoryRepositoryVersion(repositoryId: Repository['id'], repositoryVersionId: RepositoryVersion['id'], timeout?: number, init?: RequestInit): Promise<void>; | ||
getPool(id: Pool['id'], timeout?: number, init?: RequestInit): Promise<Pool | null>; | ||
@@ -45,0 +47,0 @@ listPools(timeout?: number, init?: RequestInit): Promise<Pool[]>; |
@@ -160,2 +160,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
} | ||
// Repository versions | ||
getRepositoryVersion(repositoryId, repositoryVersionId, timeout = this.defaultTimeout, init = this.defaultInit) { | ||
@@ -181,2 +182,13 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
// Repository latest version | ||
getRepositoryLatestVersion(repositoryId, timeout = this.defaultTimeout, init = this.defaultInit) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return rpc(this.path(Client.repositoriesResource, repositoryId, 'latest-version'), init, timeout); | ||
}); | ||
} | ||
createRepositoryRepositoryVersion(repositoryId, repositoryVersionId, timeout = this.defaultTimeout, init = this.defaultInit) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return rpc(this.path(Client.repositoriesResource, repositoryId, 'latest-version', repositoryVersionId), Object.assign({ method: 'PUT' }, init), timeout); | ||
}); | ||
} | ||
// Pools | ||
@@ -183,0 +195,0 @@ getPool(id, timeout = this.defaultTimeout, init = this.defaultInit) { |
@@ -58,11 +58,11 @@ export interface IdentifiedResource { | ||
export interface User extends IdentifiedResource { | ||
roles: Array<string>; | ||
role: string; | ||
preferences: Record<string, string>; | ||
} | ||
export interface UserConfiguration { | ||
roles: Array<string>; | ||
role: string; | ||
preferences: Record<string, string>; | ||
} | ||
export interface UserUpdateConfiguration { | ||
roles: Array<string>; | ||
role: string; | ||
preferences: Record<string, string>; | ||
@@ -69,0 +69,0 @@ } |
@@ -43,2 +43,4 @@ import { Playground, Pool, User, UserConfiguration, UserUpdateConfiguration, Repository, RepositoryConfiguration, RepositoryUpdateConfiguration, RepositoryVersion, SessionConfiguration, Session, SessionUpdateConfiguration, SessionExecutionConfiguration, SessionExecution, Role, RoleConfiguration, RoleUpdateConfiguration } from './types'; | ||
deleteRepositoryVersion(repositoryId: Repository['id'], repositoryVersionId: RepositoryVersion['id'], timeout?: number, init?: RequestInit): Promise<void>; | ||
getRepositoryLatestVersion(repositoryId: Repository['id'], timeout?: number, init?: RequestInit): Promise<RepositoryVersion | null>; | ||
createRepositoryRepositoryVersion(repositoryId: Repository['id'], repositoryVersionId: RepositoryVersion['id'], timeout?: number, init?: RequestInit): Promise<void>; | ||
getPool(id: Pool['id'], timeout?: number, init?: RequestInit): Promise<Pool | null>; | ||
@@ -45,0 +47,0 @@ listPools(timeout?: number, init?: RequestInit): Promise<Pool[]>; |
@@ -339,2 +339,3 @@ "use strict"; | ||
}; | ||
// Repository versions | ||
Client.prototype.getRepositoryVersion = function (repositoryId, repositoryVersionId, timeout, init) { | ||
@@ -376,2 +377,21 @@ if (timeout === void 0) { timeout = this.defaultTimeout; } | ||
}; | ||
// Repository latest version | ||
Client.prototype.getRepositoryLatestVersion = function (repositoryId, timeout, init) { | ||
if (timeout === void 0) { timeout = this.defaultTimeout; } | ||
if (init === void 0) { init = this.defaultInit; } | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
return [2 /*return*/, (0, rpc_1.rpc)(this.path(Client.repositoriesResource, repositoryId, 'latest-version'), init, timeout)]; | ||
}); | ||
}); | ||
}; | ||
Client.prototype.createRepositoryRepositoryVersion = function (repositoryId, repositoryVersionId, timeout, init) { | ||
if (timeout === void 0) { timeout = this.defaultTimeout; } | ||
if (init === void 0) { init = this.defaultInit; } | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
return [2 /*return*/, (0, rpc_1.rpc)(this.path(Client.repositoriesResource, repositoryId, 'latest-version', repositoryVersionId), __assign({ method: 'PUT' }, init), timeout)]; | ||
}); | ||
}); | ||
}; | ||
// Pools | ||
@@ -378,0 +398,0 @@ Client.prototype.getPool = function (id, timeout, init) { |
@@ -58,11 +58,11 @@ export interface IdentifiedResource { | ||
export interface User extends IdentifiedResource { | ||
roles: Array<string>; | ||
role: string; | ||
preferences: Record<string, string>; | ||
} | ||
export interface UserConfiguration { | ||
roles: Array<string>; | ||
role: string; | ||
preferences: Record<string, string>; | ||
} | ||
export interface UserUpdateConfiguration { | ||
roles: Array<string>; | ||
role: string; | ||
preferences: Record<string, string>; | ||
@@ -69,0 +69,0 @@ } |
{ | ||
"name": "@substrate/playground-client", | ||
"version": "1.9.3", | ||
"version": "1.9.4", | ||
"description": "An isomorphic client for Substrate Playground", | ||
@@ -5,0 +5,0 @@ "main": "dist/main/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87217
1794