Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@substrate/playground-client

Package Overview
Dependencies
Maintainers
18
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@substrate/playground-client - npm Package Compare versions

Comparing version 1.9.13 to 1.9.14

21

dist/browser/index.d.ts
import { Playground, Pool, User, UserConfiguration, UserUpdateConfiguration, Repository, RepositoryConfiguration, RepositoryUpdateConfiguration, RepositoryVersion, SessionConfiguration, Session, SessionUpdateConfiguration, SessionExecutionConfiguration, SessionExecution, Role, RoleConfiguration, RoleUpdateConfiguration } from './types';
export declare class Client {
static userResource: string;
static usersResource: string;

@@ -24,9 +25,15 @@ static sessionsResourcePath: string;

deleteUser(id: User['id'], timeout?: number, init?: RequestInit): Promise<void>;
getSession(user_id: User['id'], id: Session['id'], timeout?: number, init?: RequestInit): Promise<Session | null>;
listSessions(user_id: User['id'], timeout?: number, init?: RequestInit): Promise<Session[]>;
listAllSessions(user_id: User['id'], timeout?: number, init?: RequestInit): Promise<Session[]>;
createSession(user_id: User['id'], id: Session['id'], conf: SessionConfiguration, timeout?: number, init?: RequestInit): Promise<void>;
updateSession(user_id: User['id'], id: Session['id'], conf: SessionUpdateConfiguration, timeout?: number, init?: RequestInit): Promise<void>;
deleteSession(user_id: User['id'], id: Session['id'], timeout?: number, init?: RequestInit): Promise<void>;
createSessionExecution(user_id: User['id'], id: Session['id'], conf: SessionExecutionConfiguration, timeout?: number, init?: RequestInit): Promise<SessionExecution>;
getUserSession(user_id: User['id'], id: Session['id'], timeout?: number, init?: RequestInit): Promise<Session | null>;
getSession(id: Session['id'], timeout?: number, init?: RequestInit): Promise<Session | null>;
listUserSessions(user_id: User['id'], timeout?: number, init?: RequestInit): Promise<Session[]>;
listSessions(timeout?: number, init?: RequestInit): Promise<Session[]>;
createUserSession(user_id: User['id'], id: Session['id'], conf: SessionConfiguration, timeout?: number, init?: RequestInit): Promise<void>;
createSession(id: Session['id'], conf: SessionConfiguration, timeout?: number, init?: RequestInit): Promise<void>;
updateUserSession(user_id: User['id'], id: Session['id'], conf: SessionUpdateConfiguration, timeout?: number, init?: RequestInit): Promise<void>;
updateSession(id: Session['id'], conf: SessionUpdateConfiguration, timeout?: number, init?: RequestInit): Promise<void>;
deleteUserSession(user_id: User['id'], id: Session['id'], timeout?: number, init?: RequestInit): Promise<void>;
deleteSession(id: Session['id'], timeout?: number, init?: RequestInit): Promise<void>;
createUserSessionExecution(user_id: User['id'], id: Session['id'], conf: SessionExecutionConfiguration, timeout?: number, init?: RequestInit): Promise<SessionExecution>;
createSessionExecution(id: Session['id'], conf: SessionExecutionConfiguration, timeout?: number, init?: RequestInit): Promise<SessionExecution>;
listAllUserSessions(timeout?: number, init?: RequestInit): Promise<Session[]>;
getRole(id: Role['id'], timeout?: number, init?: RequestInit): Promise<Role | null>;

@@ -33,0 +40,0 @@ listRoles(timeout?: number, init?: RequestInit): Promise<Role[]>;

@@ -77,3 +77,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

// Sessions
getSession(user_id, id, timeout = this.defaultTimeout, init = this.defaultInit) {
getUserSession(user_id, id, timeout = this.defaultTimeout, init = this.defaultInit) {
return __awaiter(this, void 0, void 0, function* () {

@@ -83,13 +83,18 @@ return rpc(this.path(Client.usersResource, user_id, Client.sessionsResourcePath, id), init, timeout);

}
listSessions(user_id, timeout = this.defaultTimeout, init = this.defaultInit) {
getSession(id, timeout = this.defaultTimeout, init = this.defaultInit) {
return __awaiter(this, void 0, void 0, function* () {
return rpc(this.path(Client.userResource, Client.sessionsResourcePath, id), init, timeout);
});
}
listUserSessions(user_id, timeout = this.defaultTimeout, init = this.defaultInit) {
return __awaiter(this, void 0, void 0, function* () {
return rpc(this.path(Client.usersResource, user_id, Client.sessionsResourcePath), init, timeout);
});
}
listAllSessions(user_id, timeout = this.defaultTimeout, init = this.defaultInit) {
listSessions(timeout = this.defaultTimeout, init = this.defaultInit) {
return __awaiter(this, void 0, void 0, function* () {
return rpc(this.path(Client.allSessionsResource), init, timeout);
return rpc(this.path(Client.userResource, Client.sessionsResourcePath), init, timeout);
});
}
createSession(user_id, id, conf, timeout = this.defaultTimeout, init = this.defaultInit) {
createUserSession(user_id, id, conf, timeout = this.defaultTimeout, init = this.defaultInit) {
return __awaiter(this, void 0, void 0, function* () {

@@ -99,14 +104,29 @@ return rpc(this.path(Client.usersResource, user_id, Client.sessionsResourcePath, id), Object.assign({ method: 'PUT', body: JSON.stringify(conf) }, init), timeout);

}
updateSession(user_id, id, conf, timeout = this.defaultTimeout, init = this.defaultInit) {
createSession(id, conf, timeout = this.defaultTimeout, init = this.defaultInit) {
return __awaiter(this, void 0, void 0, function* () {
return rpc(this.path(Client.userResource, Client.sessionsResourcePath, id), Object.assign({ method: 'PUT', body: JSON.stringify(conf) }, init), timeout);
});
}
updateUserSession(user_id, id, conf, timeout = this.defaultTimeout, init = this.defaultInit) {
return __awaiter(this, void 0, void 0, function* () {
return rpc(this.path(Client.usersResource, user_id, Client.sessionsResourcePath, id), Object.assign({ method: 'PATCH', body: JSON.stringify(conf) }, init), timeout);
});
}
deleteSession(user_id, id, timeout = this.defaultTimeout, init = this.defaultInit) {
updateSession(id, conf, timeout = this.defaultTimeout, init = this.defaultInit) {
return __awaiter(this, void 0, void 0, function* () {
return rpc(this.path(Client.userResource, Client.sessionsResourcePath, id), Object.assign({ method: 'PATCH', body: JSON.stringify(conf) }, init), timeout);
});
}
deleteUserSession(user_id, id, timeout = this.defaultTimeout, init = this.defaultInit) {
return __awaiter(this, void 0, void 0, function* () {
return rpc(this.path(Client.usersResource, user_id, Client.sessionsResourcePath, id), Object.assign({ method: 'DELETE' }, init), timeout);
});
}
deleteSession(id, timeout = this.defaultTimeout, init = this.defaultInit) {
return __awaiter(this, void 0, void 0, function* () {
return rpc(this.path(Client.userResource, Client.sessionsResourcePath, id), Object.assign({ method: 'DELETE' }, init), timeout);
});
}
// Session executions
createSessionExecution(user_id, id, conf, timeout = this.defaultTimeout, init = this.defaultInit) {
createUserSessionExecution(user_id, id, conf, timeout = this.defaultTimeout, init = this.defaultInit) {
return __awaiter(this, void 0, void 0, function* () {

@@ -116,2 +136,13 @@ return rpc(this.path(Client.usersResource, user_id, Client.sessionsResourcePath, id, Client.sessionExecutionResourcePath), Object.assign({ method: 'PUT', body: JSON.stringify(conf) }, init), timeout);

}
createSessionExecution(id, conf, timeout = this.defaultTimeout, init = this.defaultInit) {
return __awaiter(this, void 0, void 0, function* () {
return rpc(this.path(Client.userResource, Client.sessionsResourcePath, id, Client.sessionExecutionResourcePath), Object.assign({ method: 'PUT', body: JSON.stringify(conf) }, init), timeout);
});
}
// All Sessions
listAllUserSessions(timeout = this.defaultTimeout, init = this.defaultInit) {
return __awaiter(this, void 0, void 0, function* () {
return rpc(this.path(Client.allSessionsResource), init, timeout);
});
}
// Roles

@@ -202,2 +233,3 @@ getRole(id, timeout = this.defaultTimeout, init = this.defaultInit) {

}
Client.userResource = 'user';
Client.usersResource = 'users';

@@ -204,0 +236,0 @@ Client.sessionsResourcePath = 'sessions';

import { Playground, Pool, User, UserConfiguration, UserUpdateConfiguration, Repository, RepositoryConfiguration, RepositoryUpdateConfiguration, RepositoryVersion, SessionConfiguration, Session, SessionUpdateConfiguration, SessionExecutionConfiguration, SessionExecution, Role, RoleConfiguration, RoleUpdateConfiguration } from './types';
export declare class Client {
static userResource: string;
static usersResource: string;

@@ -24,9 +25,15 @@ static sessionsResourcePath: string;

deleteUser(id: User['id'], timeout?: number, init?: RequestInit): Promise<void>;
getSession(user_id: User['id'], id: Session['id'], timeout?: number, init?: RequestInit): Promise<Session | null>;
listSessions(user_id: User['id'], timeout?: number, init?: RequestInit): Promise<Session[]>;
listAllSessions(user_id: User['id'], timeout?: number, init?: RequestInit): Promise<Session[]>;
createSession(user_id: User['id'], id: Session['id'], conf: SessionConfiguration, timeout?: number, init?: RequestInit): Promise<void>;
updateSession(user_id: User['id'], id: Session['id'], conf: SessionUpdateConfiguration, timeout?: number, init?: RequestInit): Promise<void>;
deleteSession(user_id: User['id'], id: Session['id'], timeout?: number, init?: RequestInit): Promise<void>;
createSessionExecution(user_id: User['id'], id: Session['id'], conf: SessionExecutionConfiguration, timeout?: number, init?: RequestInit): Promise<SessionExecution>;
getUserSession(user_id: User['id'], id: Session['id'], timeout?: number, init?: RequestInit): Promise<Session | null>;
getSession(id: Session['id'], timeout?: number, init?: RequestInit): Promise<Session | null>;
listUserSessions(user_id: User['id'], timeout?: number, init?: RequestInit): Promise<Session[]>;
listSessions(timeout?: number, init?: RequestInit): Promise<Session[]>;
createUserSession(user_id: User['id'], id: Session['id'], conf: SessionConfiguration, timeout?: number, init?: RequestInit): Promise<void>;
createSession(id: Session['id'], conf: SessionConfiguration, timeout?: number, init?: RequestInit): Promise<void>;
updateUserSession(user_id: User['id'], id: Session['id'], conf: SessionUpdateConfiguration, timeout?: number, init?: RequestInit): Promise<void>;
updateSession(id: Session['id'], conf: SessionUpdateConfiguration, timeout?: number, init?: RequestInit): Promise<void>;
deleteUserSession(user_id: User['id'], id: Session['id'], timeout?: number, init?: RequestInit): Promise<void>;
deleteSession(id: Session['id'], timeout?: number, init?: RequestInit): Promise<void>;
createUserSessionExecution(user_id: User['id'], id: Session['id'], conf: SessionExecutionConfiguration, timeout?: number, init?: RequestInit): Promise<SessionExecution>;
createSessionExecution(id: Session['id'], conf: SessionExecutionConfiguration, timeout?: number, init?: RequestInit): Promise<SessionExecution>;
listAllUserSessions(timeout?: number, init?: RequestInit): Promise<Session[]>;
getRole(id: Role['id'], timeout?: number, init?: RequestInit): Promise<Role | null>;

@@ -33,0 +40,0 @@ listRoles(timeout?: number, init?: RequestInit): Promise<Role[]>;

@@ -192,3 +192,3 @@ "use strict";

// Sessions
Client.prototype.getSession = function (user_id, id, timeout, init) {
Client.prototype.getUserSession = function (user_id, id, timeout, init) {
if (timeout === void 0) { timeout = this.defaultTimeout; }

@@ -202,3 +202,3 @@ if (init === void 0) { init = this.defaultInit; }

};
Client.prototype.listSessions = function (user_id, timeout, init) {
Client.prototype.getSession = function (id, timeout, init) {
if (timeout === void 0) { timeout = this.defaultTimeout; }

@@ -208,2 +208,11 @@ if (init === void 0) { init = this.defaultInit; }

return __generator(this, function (_a) {
return [2 /*return*/, (0, rpc_1.rpc)(this.path(Client.userResource, Client.sessionsResourcePath, id), init, timeout)];
});
});
};
Client.prototype.listUserSessions = function (user_id, 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.usersResource, user_id, Client.sessionsResourcePath), init, timeout)];

@@ -213,3 +222,3 @@ });

};
Client.prototype.listAllSessions = function (user_id, timeout, init) {
Client.prototype.listSessions = function (timeout, init) {
if (timeout === void 0) { timeout = this.defaultTimeout; }

@@ -219,7 +228,7 @@ if (init === void 0) { init = this.defaultInit; }

return __generator(this, function (_a) {
return [2 /*return*/, (0, rpc_1.rpc)(this.path(Client.allSessionsResource), init, timeout)];
return [2 /*return*/, (0, rpc_1.rpc)(this.path(Client.userResource, Client.sessionsResourcePath), init, timeout)];
});
});
};
Client.prototype.createSession = function (user_id, id, conf, timeout, init) {
Client.prototype.createUserSession = function (user_id, id, conf, timeout, init) {
if (timeout === void 0) { timeout = this.defaultTimeout; }

@@ -233,3 +242,3 @@ if (init === void 0) { init = this.defaultInit; }

};
Client.prototype.updateSession = function (user_id, id, conf, timeout, init) {
Client.prototype.createSession = function (id, conf, timeout, init) {
if (timeout === void 0) { timeout = this.defaultTimeout; }

@@ -239,2 +248,11 @@ if (init === void 0) { init = this.defaultInit; }

return __generator(this, function (_a) {
return [2 /*return*/, (0, rpc_1.rpc)(this.path(Client.userResource, Client.sessionsResourcePath, id), __assign({ method: 'PUT', body: JSON.stringify(conf) }, init), timeout)];
});
});
};
Client.prototype.updateUserSession = function (user_id, id, conf, 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.usersResource, user_id, Client.sessionsResourcePath, id), __assign({ method: 'PATCH', body: JSON.stringify(conf) }, init), timeout)];

@@ -244,3 +262,3 @@ });

};
Client.prototype.deleteSession = function (user_id, id, timeout, init) {
Client.prototype.updateSession = function (id, conf, timeout, init) {
if (timeout === void 0) { timeout = this.defaultTimeout; }

@@ -250,2 +268,11 @@ if (init === void 0) { init = this.defaultInit; }

return __generator(this, function (_a) {
return [2 /*return*/, (0, rpc_1.rpc)(this.path(Client.userResource, Client.sessionsResourcePath, id), __assign({ method: 'PATCH', body: JSON.stringify(conf) }, init), timeout)];
});
});
};
Client.prototype.deleteUserSession = function (user_id, id, 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.usersResource, user_id, Client.sessionsResourcePath, id), __assign({ method: 'DELETE' }, init), timeout)];

@@ -255,4 +282,13 @@ });

};
Client.prototype.deleteSession = function (id, 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.userResource, Client.sessionsResourcePath, id), __assign({ method: 'DELETE' }, init), timeout)];
});
});
};
// Session executions
Client.prototype.createSessionExecution = function (user_id, id, conf, timeout, init) {
Client.prototype.createUserSessionExecution = function (user_id, id, conf, timeout, init) {
if (timeout === void 0) { timeout = this.defaultTimeout; }

@@ -266,2 +302,21 @@ if (init === void 0) { init = this.defaultInit; }

};
Client.prototype.createSessionExecution = function (id, conf, 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.userResource, Client.sessionsResourcePath, id, Client.sessionExecutionResourcePath), __assign({ method: 'PUT', body: JSON.stringify(conf) }, init), timeout)];
});
});
};
// All Sessions
Client.prototype.listAllUserSessions = function (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.allSessionsResource), init, timeout)];
});
});
};
// Roles

@@ -415,2 +470,3 @@ Client.prototype.getRole = function (id, timeout, init) {

};
Client.userResource = 'user';
Client.usersResource = 'users';

@@ -417,0 +473,0 @@ Client.sessionsResourcePath = 'sessions';

{
"name": "@substrate/playground-client",
"version": "1.9.13",
"version": "1.9.14",
"description": "An isomorphic client for Substrate Playground",

@@ -5,0 +5,0 @@ "main": "dist/main/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc