@substrate/playground-client
Advanced tools
Comparing version 1.9.9 to 1.9.10
@@ -5,7 +5,7 @@ export interface IdentifiedResource { | ||
export interface OwnedResource { | ||
userId: string; | ||
userId: User['id']; | ||
} | ||
export interface Playground { | ||
configuration: Configuration; | ||
user?: string; | ||
userId?: User['id']; | ||
} | ||
@@ -39,3 +39,3 @@ export interface Configuration { | ||
repositoryId: Repository['id']; | ||
repositoryVersionId: RepositoryVersion['id']; | ||
repositoryVersionId?: RepositoryVersion['id']; | ||
} | ||
@@ -42,0 +42,0 @@ export interface SessionConfiguration { |
@@ -0,1 +1,2 @@ | ||
import { User } from "./types"; | ||
export declare enum EnvironmentType { | ||
@@ -8,1 +9,3 @@ dev = 0, | ||
export declare function playgroundBaseURL(env: EnvironmentType): "http://playground-dev.substrate.test/api" | "https://playground-staging.substrate.dev/api" | "https://playground.substrate.dev/api"; | ||
export declare function normalizeSessionId(sessionId: string): string; | ||
export declare function mainSessionId(user: User): string; |
@@ -31,1 +31,9 @@ export var EnvironmentType; | ||
} | ||
// Return a normalized session ID that is valid with regards to Playground constraints | ||
export function normalizeSessionId(sessionId) { | ||
return sessionId.toLocaleLowerCase(); | ||
} | ||
// Return the main session ID for a considered user | ||
export function mainSessionId(user) { | ||
return normalizeSessionId(user.id); | ||
} |
@@ -5,7 +5,7 @@ export interface IdentifiedResource { | ||
export interface OwnedResource { | ||
userId: string; | ||
userId: User['id']; | ||
} | ||
export interface Playground { | ||
configuration: Configuration; | ||
user?: string; | ||
userId?: User['id']; | ||
} | ||
@@ -39,3 +39,3 @@ export interface Configuration { | ||
repositoryId: Repository['id']; | ||
repositoryVersionId: RepositoryVersion['id']; | ||
repositoryVersionId?: RepositoryVersion['id']; | ||
} | ||
@@ -42,0 +42,0 @@ export interface SessionConfiguration { |
@@ -0,1 +1,2 @@ | ||
import { User } from "./types"; | ||
export declare enum EnvironmentType { | ||
@@ -8,1 +9,3 @@ dev = 0, | ||
export declare function playgroundBaseURL(env: EnvironmentType): "http://playground-dev.substrate.test/api" | "https://playground-staging.substrate.dev/api" | "https://playground.substrate.dev/api"; | ||
export declare function normalizeSessionId(sessionId: string): string; | ||
export declare function mainSessionId(user: User): string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.playgroundBaseURL = exports.environmentTypeFromString = exports.EnvironmentType = void 0; | ||
exports.mainSessionId = exports.normalizeSessionId = exports.playgroundBaseURL = exports.environmentTypeFromString = exports.EnvironmentType = void 0; | ||
var EnvironmentType; | ||
@@ -36,1 +36,11 @@ (function (EnvironmentType) { | ||
exports.playgroundBaseURL = playgroundBaseURL; | ||
// Return a normalized session ID that is valid with regards to Playground constraints | ||
function normalizeSessionId(sessionId) { | ||
return sessionId.toLocaleLowerCase(); | ||
} | ||
exports.normalizeSessionId = normalizeSessionId; | ||
// Return the main session ID for a considered user | ||
function mainSessionId(user) { | ||
return normalizeSessionId(user.id); | ||
} | ||
exports.mainSessionId = mainSessionId; |
{ | ||
"name": "@substrate/playground-client", | ||
"version": "1.9.9", | ||
"version": "1.9.10", | ||
"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
85844
1786