@chatium/sdk
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -0,3 +1,3 @@ | ||
import { ChatiumAuthType } from './ChatiumAuth'; | ||
import { ChatiumUserRole } from './ChatiumUser'; | ||
import { ChatiumAuthType } from './ChatiumAuth'; | ||
export interface ChatiumAppRequestToken { | ||
@@ -13,3 +13,4 @@ acc: number; | ||
urs?: ChatiumUserRole[]; | ||
uqid?: string; | ||
} | ||
export declare function validateChatiumAppRequestToken(token: string, secret: string): ChatiumAppRequestToken; |
@@ -13,2 +13,3 @@ "use strict"; | ||
typeof raw.host === 'string' && | ||
(!raw.uqid || typeof raw.uqid === 'string') && | ||
(!raw.aid || (typeof raw.aid === 'number' && typeof raw.tkn === 'string' && typeof raw.atp === 'string')) && | ||
@@ -15,0 +16,0 @@ (!raw.uid || |
@@ -0,3 +1,3 @@ | ||
import { OptionalAuthCtx } from './ChatiumAuth'; | ||
import { OptionalUserCtx } from './ChatiumUser'; | ||
import { OptionalAuthCtx } from './ChatiumAuth'; | ||
export interface AppCtx { | ||
@@ -15,5 +15,8 @@ app: { | ||
} | ||
export declare function getChatiumContext(ctx: AppCtx, headers: ChatiumHeaders): AppCtx & AccountCtx & OptionalAuthCtx & OptionalUserCtx; | ||
export interface UniqCtx { | ||
uniqId: string | null; | ||
} | ||
export declare function getChatiumContext(ctx: AppCtx, headers: ChatiumHeaders): AppCtx & UniqCtx & AccountCtx & OptionalAuthCtx & OptionalUserCtx; | ||
export interface ChatiumHeaders { | ||
'x-chatium-application'?: string; | ||
} |
@@ -13,2 +13,3 @@ "use strict"; | ||
...ctx, | ||
uniqId: token.uqid ? token.uqid : null, | ||
account: { | ||
@@ -15,0 +16,0 @@ id: token.acc, |
{ | ||
"name": "@chatium/sdk", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "SDK for developing custom chatium backends using NodeJS", | ||
@@ -5,0 +5,0 @@ "main": "lib/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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
33264
780
1