New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

skapi-js

Package Overview
Dependencies
Maintainers
0
Versions
680
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

skapi-js - npm Package Compare versions

Comparing version 1.0.201 to 1.0.202-beta.0

js/methods/vivian.d.ts

3

js/main/skapi.d.ts

@@ -85,2 +85,5 @@ import { DatabaseResponse, Connection, ProgressCallback, GetRecordQuery, FetchOptions, RecordData, Condition, UserAttributes, UserProfile, Newsletters, Form, PostRecordConfig, PublicUser, UserProfilePublicSettings, FileInfo, DelRecordQuery, RTCCallback, RealtimeCallback, RTCConnectorParams, RTCConnector } from '../Types';

private jwtLogin;
spellcast(params: any): Promise<any>;
getspell(params: any): Promise<any>;
dopamine(params: any): Promise<void>;
resendInvitation(params: Form<{

@@ -87,0 +90,0 @@ email: string;

@@ -19,2 +19,3 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

import { blockAccount, unblockAccount, deleteAccount, inviteUser, createAccount, grantAccess, getInvitations, cancelInvitation, resendInvitation } from '../methods/admin';
import { spellcast, dopamine, getspell } from '../methods/vivian';
export default class Skapi {

@@ -47,3 +48,3 @@ get user() {

constructor(service, owner, options, __etc) {
this.__version = '1.0.201';
this.__version = '1.0.202';
this.session = null;

@@ -344,2 +345,11 @@ this.connection = null;

}
spellcast(params) {
return spellcast.bind(this)(params);
}
getspell(params) {
return getspell.bind(this)(params);
}
dopamine(params) {
return dopamine.bind(this)(params);
}
resendInvitation(params) {

@@ -515,2 +525,11 @@ return resendInvitation.bind(this)(params);

formHandler()
], Skapi.prototype, "spellcast", null);
__decorate([
formHandler()
], Skapi.prototype, "getspell", null);
__decorate([
formHandler()
], Skapi.prototype, "dopamine", null);
__decorate([
formHandler()
], Skapi.prototype, "resendInvitation", null);

@@ -517,0 +536,0 @@ __decorate([

11

js/methods/database.js

@@ -26,4 +26,2 @@ import SkapiError from '../main/error';

can_remove_referencing_records: false,
only_granted_can_reference: false,
allow_referencing_to_feed: false,
},

@@ -172,3 +170,3 @@ ip: '',

'prv_acs': (r) => {
let subs_opt = ['feedback_referencing_records', 'exclude_from_feed', 'notify_subscribers'];
let subs_opt = ['feed_referencing_records', 'exclude_from_feed'];
for (let k in r) {

@@ -470,3 +468,3 @@ if (subs_opt.includes(k)) {

result.list = await Promise.all(result.list);
if (is_reference_fetch && result?.reference_private_key) {
if (is_reference_fetch && result?.reference_private_key && typeof result.reference_private_key === 'string') {
this.__private_access_key[is_reference_fetch] = result.reference_private_key;

@@ -534,4 +532,3 @@ }

exclude_from_feed: 'boolean',
notify_subscribers: 'boolean',
feedback_referencing_records: 'boolean',
feed_referencing_records: 'boolean',
},

@@ -541,7 +538,5 @@ access_group: accessGroup.bind(this),

source: {
allow_referencing_to_feed: 'boolean',
referencing_limit: reference_limit_check,
prevent_multiple_referencing: 'boolean',
can_remove_referencing_records: 'boolean',
only_granted_can_reference: 'boolean',
referencing_index_restrictions: v => {

@@ -548,0 +543,0 @@ if (!v) {

@@ -73,13 +73,10 @@ export type Condition = 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'ne' | '>' | '>=' | '<' | '<=' | '=' | '!=';

group: number;
exclude_from_feed?: boolean;
notify_subscribers?: boolean;
feedback_referencing_records?: boolean;
feed_referencing_records?: boolean;
};
};
source?: {
allow_referencing_to_feed?: boolean;
referencing_limit?: number;
prevent_multiple_referencing?: boolean;
can_remove_referencing_records?: boolean;
only_granted_can_reference?: boolean;
referencing_index_restrictions?: {

@@ -86,0 +83,0 @@ name: string;

@@ -5,2 +5,6 @@ import SkapiError from '../main/error';

import { getJwtToken } from '../methods/user';
let privateCounter_admin = 0;
let publicCounter_admin = 0;
let privateCounter_record = 0;
let publicCounter_record = 0;
async function getEndpoint(dest, auth) {

@@ -17,15 +21,23 @@ const endpoints = await Promise.all([

switch (dest) {
case 'get-users':
return admin.get_users_private + dest + query;
case 'service':
return admin.service_public + dest + query;
case 'get-newsletters':
case 'get-public-newsletters':
case 'get-users':
case 'post-userdata':
case 'remove-account':
case 'post-secure':
case 'subscribe-newsletter':
case 'subscribe-public-newsletter':
case 'signupkey':
return (auth ? admin.extra_private : admin.extra_public) + dest + query;
case 'admin-signup':
case 'confirm-signup':
case 'client-secret-request':
case 'client-secret-request-public':
case 'openid-logger':
return (auth ? admin.extra_private_2 : admin.extra_public_2) + dest + query;
case 'remove-account':
case 'post-secure':
case 'recover-account':
case 'mock':
case 'service':
case 'grant-access':

@@ -38,16 +50,27 @@ case 'last-verified-email':

case 'jwt-login':
case 'client-secret-request':
case 'signupkey':
case 'send-inquiry':
case 'client-secret-request-public':
case 'block-account':
case 'invitation-list':
case 'openid-logger':
case 'grant-access':
return (auth ? admin.admin_private : admin.admin_public) + dest + query;
const gateways_admin = auth
? [admin.admin_private, admin.admin_private_2]
: [admin.admin_public, admin.admin_public_2];
const counter_admin = auth ? privateCounter_admin : publicCounter_admin;
const selectedGateway_admin = gateways_admin[counter_admin % gateways_admin.length];
if (auth) {
privateCounter_admin++;
}
else {
publicCounter_admin++;
}
return selectedGateway_admin + dest + query;
case 'post-record':
return (auth ? record.post_private : record.post_public) + dest + query;
case 'get-records':
return (auth ? record.get_private : record.get_public) + dest + query;
case 'del-files':
case 'del-records':
return record.del_private + dest + query;
case 'subscription':
case 'get-subscription':
case 'del-records':
case 'get-table':

@@ -60,6 +83,19 @@ case 'get-tag':

case 'get-ws-group':
case 'del-files':
case 'check-schema':
case 'get-feed':
return (auth ? record.record_private : record.record_public) + dest + query;
case 'castspell':
case 'dopamine':
case 'getspell':
const gateways_record = auth
? [record.record_private, record.record_private_2]
: [record.record_public, record.record_public_2];
const counter_record = auth ? privateCounter_record : publicCounter_record;
const selectedGateway_record = gateways_record[counter_record % gateways_record.length];
if (auth) {
privateCounter_record++;
}
else {
publicCounter_record++;
}
return selectedGateway_record + dest + query;
default:

@@ -66,0 +102,0 @@ return validator.Url(dest);

{
"name": "skapi-js",
"version": "1.0.201",
"version": "1.0.202-beta.0",
"description": "Skapi: Backend API for HTML frontend.",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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