@substrate/playground-client
Advanced tools
Comparing version 1.1.9 to 1.2.0
@@ -13,2 +13,3 @@ import { Playground, Session, SessionConfiguration, User, UserConfiguration } from './types'; | ||
getCurrentUser(init?: RequestInit): Promise<User>; | ||
getUser(id: string, init?: RequestInit): Promise<User | null>; | ||
listUsers(init?: RequestInit): Promise<Record<string, User>>; | ||
@@ -15,0 +16,0 @@ createOrUpdateUser(id: string, conf: UserConfiguration, init?: RequestInit): Promise<User>; |
@@ -31,2 +31,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
// Users | ||
getUser(id, init = this.defaultInit) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return rpc(this.path(Client.usersResource, id), init); | ||
}); | ||
} | ||
listUsers(init = this.defaultInit) { | ||
@@ -33,0 +38,0 @@ return __awaiter(this, void 0, void 0, function* () { |
@@ -8,2 +8,3 @@ export interface Playground { | ||
export interface Environment { | ||
secured: boolean; | ||
host: string; | ||
@@ -60,3 +61,3 @@ namespace: string; | ||
description: string; | ||
tags: Record<string, string>; | ||
tags?: Record<string, string>; | ||
runtime?: RuntimeConfiguration; | ||
@@ -63,0 +64,0 @@ } |
@@ -13,2 +13,3 @@ import { Playground, Session, SessionConfiguration, User, UserConfiguration } from './types'; | ||
getCurrentUser(init?: RequestInit): Promise<User>; | ||
getUser(id: string, init?: RequestInit): Promise<User | null>; | ||
listUsers(init?: RequestInit): Promise<Record<string, User>>; | ||
@@ -15,0 +16,0 @@ createOrUpdateUser(id: string, conf: UserConfiguration, init?: RequestInit): Promise<User>; |
@@ -99,2 +99,10 @@ "use strict"; | ||
// Users | ||
Client.prototype.getUser = function (id, init) { | ||
if (init === void 0) { init = this.defaultInit; } | ||
return __awaiter(this, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
return [2 /*return*/, rpc_1.rpc(this.path(Client.usersResource, id), init)]; | ||
}); | ||
}); | ||
}; | ||
Client.prototype.listUsers = function (init) { | ||
@@ -101,0 +109,0 @@ if (init === void 0) { init = this.defaultInit; } |
@@ -8,2 +8,3 @@ export interface Playground { | ||
export interface Environment { | ||
secured: boolean; | ||
host: string; | ||
@@ -60,3 +61,3 @@ namespace: string; | ||
description: string; | ||
tags: Record<string, string>; | ||
tags?: Record<string, string>; | ||
runtime?: RuntimeConfiguration; | ||
@@ -63,0 +64,0 @@ } |
{ | ||
"name": "@substrate/playground-client", | ||
"version": "1.1.9", | ||
"version": "1.2.0", | ||
"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
34372
767