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

@chego/chego-api

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chego/chego-api - npm Package Compare versions

Comparing version 1.0.4 to 1.1.0

77

lib/interfaces.d.ts

@@ -6,3 +6,3 @@ import { IQueryAndWhere, IQuerySelect } from './interfaces';

export interface IChego {
execute(query: IQuery): Promise<any>;
execute(...queries: IQuery[]): Promise<any>;
}

@@ -32,8 +32,4 @@ export interface IQuery extends IQueryMethods {

initialize(config: any): void;
execute(query: IQuery): Promise<any>;
execute(...queries: IQuery[]): Promise<any>;
}
export interface IQuerySchemeOld {
getFromTheEnd(index: number): QuerySyntaxEnum;
add(element: QuerySyntaxEnum): IQuerySchemeOld;
}
export interface IQuerySchemeElement {

@@ -45,3 +41,3 @@ index: number;

export interface IQueryAnd {
and: IQueryNot & IQueryEqualTo & IQueryLike & IQueryGT & IQueryLT & IQueryBetween & IQueryWhere & IQueryWrapped;
and: IQueryNot<IQueryAnd> & IQueryEqualTo & IQueryLike & IQueryGT & IQueryLT & IQueryBetween & IQueryWhere & IQueryWrapped;
}

@@ -52,21 +48,24 @@ export interface IQueryAndWhere {

export interface IQueryAre {
are: IQueryNot & IQueryEqualTo & IQueryLike & IQueryGT & IQueryLT & IQueryBetween & IQueryNull;
are: IQueryNot<IQueryAre> & IQueryEqualTo & IQueryLike & IQueryGT & IQueryLT & IQueryBetween & IQueryNull;
}
export interface IQueryBetween {
between(min: number, max: number): IQueryOrder & IQueryLimit & IQueryAnd & IQueryOr;
between(min: number, max: number): IQueryGroupBy & IQueryOrderBy & IQueryLimit & IQueryAnd & IQueryOr;
}
export interface IQueryDelete {
delete(...args: string[]): IQueryFrom;
delete(): IQueryFrom;
}
export interface IQueryEqualTo {
eq(...values: CommandProp[]): IQueryOrder & IQueryLimit & IQueryAnd & IQueryOr;
eq(...values: CommandProp[]): IQueryGroupBy & IQueryOrderBy & IQueryLimit & IQueryAnd & IQueryOr;
}
export interface IQueryWhereExists {
whereExists(fn: Fn): IQueryOrder & IQueryLimit & IQueryAndWhere & IQueryOrWhere;
export interface IQueryExists {
exists(fn: Fn): IQueryOrderBy & IQueryGroupBy & IQueryLimit & IQueryAndWhere & IQueryOrWhere;
}
export interface IQueryIn {
in(...values: AnyButFunction[]): IQueryOrderBy & IQueryGroupBy & IQueryLimit & IQueryAndWhere & IQueryOrWhere;
}
export interface IQueryFrom {
from(...tables: string[]): IQueryGroupBy & IQueryWhereExists & IQueryUnion & IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrder & IQueryWhere & IQueryLimit & IQueryWrapped;
from(...tables: string[]): IQueryGroupBy & IQueryUnion & IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryWrapped;
}
export interface IQueryGT {
gt(...values: CommandProp[]): IQueryOrder & IQueryLimit & IQueryAnd & IQueryOr;
gt(...values: CommandProp[]): IQueryGroupBy & IQueryOrderBy & IQueryLimit & IQueryAnd & IQueryOr;
}

@@ -77,21 +76,21 @@ export interface IQueryInsert {

export interface IQueryIs {
is: IQueryNot & IQueryEqualTo & IQueryLike & IQueryGT & IQueryLT & IQueryBetween & IQueryNull;
is: IQueryNot<IQueryIs> & IQueryEqualTo & IQueryLike & IQueryGT & IQueryLT & IQueryBetween & IQueryNull;
}
export interface IQueryLike {
like(...values: CommandProp[]): IQueryOrder & IQueryLimit & IQueryAnd & IQueryOr;
like(...values: CommandProp[]): IQueryGroupBy & IQueryOrderBy & IQueryLimit & IQueryAnd & IQueryOr;
}
export interface IQueryLimit {
limit(offsetOrCount: number, count?: number): IQueryWhere & IQueryOrder;
limit(offsetOrCount: number, count?: number): IQueryWhere & IQueryOrderBy;
}
export interface IQueryLT {
lt(...values: CommandProp[]): IQueryOrder & IQueryLimit & IQueryAnd & IQueryOr;
lt(...values: CommandProp[]): IQueryGroupBy & IQueryOrderBy & IQueryLimit & IQueryAnd & IQueryOr;
}
export interface IQueryNot {
not: IQueryEqualTo & IQueryLike & IQueryGT & IQueryLT & IQueryBetween & IQueryNull;
export interface IQueryNot<T> {
not: T extends IQueryWhere ? IQueryExists & IQueryIn : IQueryEqualTo & IQueryLike & IQueryGT & IQueryLT & IQueryBetween & IQueryNull;
}
export interface IQueryNull {
null: IQueryOrder & IQueryLimit & IQueryAnd & IQueryOr;
null: IQueryGroupBy & IQueryOrderBy & IQueryLimit & IQueryAnd & IQueryOr;
}
export interface IQueryOr {
or: IQueryNot & IQueryEqualTo & IQueryLike & IQueryGT & IQueryLT & IQueryBetween & IQueryWhere;
or: IQueryNot<IQueryOr> & IQueryEqualTo & IQueryLike & IQueryGT & IQueryLT & IQueryBetween & IQueryWhere;
}

@@ -101,4 +100,4 @@ export interface IQueryOrWhere {

}
export interface IQueryOrder {
orderBy(...values: StringOrProperty[]): IQueryWhere & IQueryLimit;
export interface IQueryOrderBy {
orderBy(...values: StringOrProperty[]): IQueryGroupBy & IQueryLimit;
}

@@ -109,6 +108,6 @@ export interface IQuerySelect {

export interface IQuerySet {
set(data: object): IQueryOrder & IQueryWhere & IQueryLimit & IQueryWrapped;
set(data: object): IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryWrapped;
}
export interface IQueryTo {
to(...tables: string[]): IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrder & IQueryWhere & IQueryLimit & IQueryWrapped;
to(...tables: string[]): IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryWrapped;
}

@@ -119,21 +118,27 @@ export interface IQueryUpdate {

export interface IQueryWhere {
where(...values: any[]): IQueryIs & IQueryAre & IQueryAndWhere & IQueryOrWhere & IQueryGroupBy;
where(...values: any[]): IQueryIs & IQueryAre & IQueryAndWhere & IQueryOrWhere & IQueryGroupBy & IQueryNot<IQueryWhere> & IQueryIn & IQueryExists;
}
export interface IQueryWrapped {
wrapped(fn: QueryBuildFunction<IQuery>): IQueryOrder & IQueryLimit & IQueryAnd & IQueryOr;
wrapped(fn: QueryBuildFunction<IQuery>): IQueryGroupBy & IQueryOrderBy & IQueryLimit & IQueryAnd & IQueryOr;
}
export interface IQueryHaving {
having(...values: CommandProp[]): IQueryGroupBy & IQueryOrderBy & IQueryLimit;
}
export interface IQueryOn {
on(table: string, key: string): IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrder & IQueryWhere & IQueryLimit & IQueryWrapped;
on(table: string, key: string): IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryWrapped;
}
export interface IQueryUsing {
using(key: string): IQueryLeftJoin & IQueryRightJoin & IQueryJoin & IQueryFullJoin & IQueryOrderBy & IQueryWhere & IQueryLimit & IQueryWrapped;
}
export interface IQueryLeftJoin {
leftJoin(table: string, key: string): IQueryOn;
leftJoin(table: string, key: string): IQueryOn & IQueryUsing;
}
export interface IQueryRightJoin {
rightJoin(table: string, key: string): IQueryOn;
rightJoin(table: string, key: string): IQueryOn & IQueryUsing;
}
export interface IQueryFullJoin {
fullJoin(table: string, key: string): IQueryOn;
fullJoin(table: string, key: string): IQueryOn & IQueryUsing;
}
export interface IQueryJoin {
join(table: string, key: string): IQueryOn;
join(table: string, key: string): IQueryOn & IQueryUsing;
}

@@ -144,5 +149,5 @@ export interface IQueryUnion {

export interface IQueryGroupBy {
groupBy(...values: StringOrProperty[]): IQueryWhere & IQueryOrder & IQueryLimit & IQueryAnd & IQueryOr;
groupBy(...values: StringOrProperty[]): IQueryOrderBy & IQueryLimit & IQueryHaving;
}
export interface IQueryMethods extends IQueryAnd, IQueryAre, IQueryBetween, IQueryEqualTo, IQueryGT, IQueryIs, IQueryLike, IQueryLimit, IQueryLT, IQueryNot, IQueryOr, IQueryOrder, IQueryDelete, IQuerySelect, IQueryUpdate, IQueryWhere, IQueryWrapped, IQueryFrom, IQueryInsert, IQueryTo, IQueryNull, IQueryWhereExists, IQuerySet, IQueryOn, IQueryLeftJoin, IQueryRightJoin, IQueryJoin, IQueryFullJoin, IQueryUnion, IQueryGroupBy {
export interface IQueryMethods extends IQueryAnd, IQueryAre, IQueryBetween, IQueryEqualTo, IQueryGT, IQueryIs, IQueryLike, IQueryLimit, IQueryLT, IQueryNot<any>, IQueryOr, IQueryOrderBy, IQueryDelete, IQuerySelect, IQueryUpdate, IQueryWhere, IQueryWrapped, IQueryFrom, IQueryInsert, IQueryTo, IQueryNull, IQueryExists, IQueryIn, IQuerySet, IQueryOn, IQueryUsing, IQueryLeftJoin, IQueryRightJoin, IQueryJoin, IQueryFullJoin, IQueryUnion, IQueryHaving, IQueryGroupBy {
}
{
"name": "@chego/chego-api",
"version": "1.0.4",
"version": "1.1.0",
"description": "The API layer of Chego modules.",

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

@@ -24,3 +24,3 @@ # chego-api

[Kanban boards](https://github.com/orgs/chegojs/chego/TODO.md)
[Kanban boards](https://github.com/orgs/chegojs/projects/1)

@@ -33,2 +33,2 @@ Join the team, feel free to catch any task or suggest a new one.

Licensed under the [MIT license](LICENSE).
Licensed under the [MIT license](LICENSE).

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