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

rapiq

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rapiq - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0

dist/build/index.d.ts.map

1

dist/build/index.d.ts
export * from './module';
export * from './parameter';
export * from './type';
//# sourceMappingURL=index.d.ts.map
import { ObjectLiteral } from '../type';
import { BuildInput } from './type';
export declare function buildQuery<T extends ObjectLiteral = ObjectLiteral>(input?: BuildInput<T>): string;
//# sourceMappingURL=module.d.ts.map
export * from './type';
//# sourceMappingURL=index.d.ts.map

3

dist/build/parameter/type.d.ts
import { FieldsBuildInput, FiltersBuildInput, PaginationBuildInput, RelationsBuildInput, SortBuildInput } from '../../parameter';
import { Parameter, URLParameter } from '../../constants';
export type BuildParameterInput<P extends `${Parameter}` | `${URLParameter}`, T extends Record<string, any> = Record<string, any>> = P extends `${Parameter.FIELDS}` | `${URLParameter.FIELDS}` ? FieldsBuildInput<T> : P extends `${Parameter.FILTERS}` | `${URLParameter.FILTERS}` ? FiltersBuildInput<T> : P extends `${Parameter.RELATIONS}` | `${URLParameter.RELATIONS}` ? RelationsBuildInput<T> : P extends `${Parameter.PAGINATION}` | `${URLParameter.PAGINATION}` ? PaginationBuildInput<T> : P extends `${Parameter.SORT}` | `${URLParameter.SORT}` ? SortBuildInput<T> : never;
export type BuildParameterInput<P extends `${Parameter}` | `${URLParameter}`, T extends Record<string, any> = Record<string, any>> = P extends `${Parameter.FIELDS}` | `${URLParameter.FIELDS}` ? FieldsBuildInput<T> : P extends `${Parameter.FILTERS}` | `${URLParameter.FILTERS}` ? FiltersBuildInput<T> : P extends `${Parameter.RELATIONS}` | `${URLParameter.RELATIONS}` ? RelationsBuildInput<T> : P extends `${Parameter.PAGINATION}` | `${URLParameter.PAGINATION}` ? PaginationBuildInput : P extends `${Parameter.SORT}` | `${URLParameter.SORT}` ? SortBuildInput<T> : never;
//# sourceMappingURL=type.d.ts.map

@@ -6,1 +6,2 @@ import { Parameter, URLParameter } from '../constants';

};
//# sourceMappingURL=type.d.ts.map

@@ -16,1 +16,2 @@ export declare enum Parameter {

export declare const DEFAULT_ID = "__DEFAULT__";
//# sourceMappingURL=constants.d.ts.map

@@ -6,1 +6,2 @@ export * from './build';

export * from './type';
//# sourceMappingURL=index.d.ts.map

@@ -5,1 +5,2 @@ import { ObjectLiteral } from '../../type';

export declare function mergeQueryFields(target: Record<string, string[]> | string[], source: Record<string, string[]> | string[]): Record<string, string[]> | string[];
//# sourceMappingURL=build.d.ts.map

@@ -5,1 +5,2 @@ export declare enum FieldOperator {

}
//# sourceMappingURL=constants.d.ts.map

@@ -6,1 +6,2 @@ export * from './build';

export * from './utils';
//# sourceMappingURL=index.d.ts.map
import { ObjectLiteral } from '../../type';
import { FieldsParseOptions, FieldsParseOutput } from './type';
export declare function parseQueryFields<T extends ObjectLiteral = ObjectLiteral>(data: unknown, options?: FieldsParseOptions<T>): FieldsParseOutput;
export declare function parseQueryFields<T extends ObjectLiteral = ObjectLiteral>(input: unknown, options?: FieldsParseOptions<T>): FieldsParseOutput;
//# sourceMappingURL=parse.d.ts.map

@@ -30,1 +30,2 @@ import { Flatten, KeyWithOptionalPrefix, NestedKeys, OnlyObject, SimpleKeys } from '../../type';

export {};
//# sourceMappingURL=type.d.ts.map
export declare function buildFieldDomainRecords(data?: Record<string, string[]> | string[]): Record<string, string[]>;
//# sourceMappingURL=domain.d.ts.map
export * from './domain';
export * from './input';
export * from './name';
//# sourceMappingURL=index.d.ts.map
import { FieldsInputTransformed } from '../type';
export declare function removeFieldInputOperator(field: string): string;
export declare function transformFieldsInput(fields: string[]): FieldsInputTransformed;
export declare function parseFieldsInput(data: unknown): string[];
export declare function parseFieldsInput(input: unknown): string[];
//# sourceMappingURL=input.d.ts.map
export declare function isValidFieldName(input: string): boolean;
//# sourceMappingURL=name.d.ts.map
import { ObjectLiteral } from '../../type';
import { FiltersBuildInput } from './type';
export declare function buildQueryFilters<T extends ObjectLiteral = ObjectLiteral>(data?: FiltersBuildInput<T>): Record<string, any>;
export declare function mergeQueryFilters<T>(target?: Record<string, any>, source?: Record<string, any>): Record<string, any>;
export declare function mergeQueryFilters(target?: Record<string, any>, source?: Record<string, any>): Record<string, any>;
//# sourceMappingURL=build.d.ts.map

@@ -22,1 +22,2 @@ export declare enum FilterComparisonOperator {

}
//# sourceMappingURL=constants.d.ts.map

@@ -6,1 +6,2 @@ export * from './constants';

export * from './utils';
//# sourceMappingURL=index.d.ts.map
import { ObjectLiteral } from '../../type';
import { FiltersParseOptions, FiltersParseOutput } from './type';
export declare function parseQueryFilters<T extends ObjectLiteral = ObjectLiteral>(data: unknown, options?: FiltersParseOptions<T>): FiltersParseOutput;
//# sourceMappingURL=parse.d.ts.map

@@ -39,1 +39,2 @@ import { Flatten, NestedKeys, ObjectLiteral, OnlyObject, OnlyScalar, TypeFromNestedKeyPath } from '../../type';

export {};
//# sourceMappingURL=type.d.ts.map
export * from './value';
export * from './operator';
//# sourceMappingURL=index.d.ts.map

@@ -7,1 +7,2 @@ import { FilterComparisonOperator } from '../constants';

};
//# sourceMappingURL=operator.d.ts.map
import { FilterValueSimple } from '../type';
export declare function transformFilterValue(input: FilterValueSimple): FilterValueSimple;
//# sourceMappingURL=value.d.ts.map

@@ -8,1 +8,2 @@ export * from './fields';

export * from './utils';
//# sourceMappingURL=index.d.ts.map

@@ -1,3 +0,3 @@

import { ObjectLiteral } from '../../type';
import { PaginationBuildInput } from './type';
export declare function mergeQueryPagination<T extends ObjectLiteral = ObjectLiteral>(target?: PaginationBuildInput<T>, source?: PaginationBuildInput<T>): PaginationBuildInput<T>;
export declare function mergeQueryPagination(target?: PaginationBuildInput, source?: PaginationBuildInput): PaginationBuildInput;
//# sourceMappingURL=build.d.ts.map
export * from './build';
export * from './parse';
export * from './type';
//# sourceMappingURL=index.d.ts.map

@@ -9,1 +9,2 @@ import { PaginationParseOptions, PaginationParseOutput } from './type';

export declare function parseQueryPagination(data: unknown, options?: PaginationParseOptions): PaginationParseOutput;
//# sourceMappingURL=parse.d.ts.map

@@ -1,2 +0,2 @@

export type PaginationBuildInput<T> = {
export type PaginationBuildInput = {
limit?: number;

@@ -12,1 +12,2 @@ offset?: number;

};
//# sourceMappingURL=type.d.ts.map

@@ -5,1 +5,2 @@ import { ObjectLiteral } from '../../type';

export declare function mergeQueryRelations(target?: string[], source?: string[]): string[];
//# sourceMappingURL=build.d.ts.map
export * from './build';
export * from './parse';
export * from './type';
//# sourceMappingURL=index.d.ts.map
import { ObjectLiteral } from '../../type';
import { RelationsParseOptions, RelationsParseOutput } from './type';
export declare function parseQueryRelations<T extends ObjectLiteral = ObjectLiteral>(data: unknown, options?: RelationsParseOptions<T>): RelationsParseOutput;
export declare function parseQueryRelations<T extends ObjectLiteral = ObjectLiteral>(input: unknown, options?: RelationsParseOptions<T>): RelationsParseOutput;
//# sourceMappingURL=parse.d.ts.map

@@ -16,1 +16,2 @@ import { Flatten, NestedResourceKeys, OnlyObject } from '../../type';

export type RelationsParseOutput = RelationsParseOutputElement[];
//# sourceMappingURL=type.d.ts.map
export * from './parents';
export * from './path';
//# sourceMappingURL=index.d.ts.map
export declare function includeParents(data: string[]): string[];
//# sourceMappingURL=parents.d.ts.map
export declare function isValidRelationPath(input: string): boolean;
//# sourceMappingURL=path.d.ts.map

@@ -5,1 +5,2 @@ import { ObjectLiteral } from '../../type';

export declare function mergeQuerySort(target?: string[], source?: string[]): any[];
//# sourceMappingURL=build.d.ts.map
export * from './build';
export * from './parse';
export * from './type';
//# sourceMappingURL=index.d.ts.map

@@ -9,1 +9,2 @@ import { ObjectLiteral } from '../../type';

export declare function parseQuerySort<T extends ObjectLiteral = ObjectLiteral>(data: unknown, options?: SortParseOptions<T>): SortParseOutput;
//# sourceMappingURL=parse.d.ts.map

@@ -33,1 +33,2 @@ import { Flatten, KeyWithOptionalPrefix, NestedKeys, OnlyObject, SimpleKeys } from '../../type';

export {};
//# sourceMappingURL=type.d.ts.map

@@ -6,1 +6,2 @@ import { SortDirection } from './type';

};
//# sourceMappingURL=utils.d.ts.map

@@ -7,1 +7,2 @@ import { Flatten, NestedKeys, ObjectLiteral, OnlyObject, SimpleKeys } from '../type';

export {};
//# sourceMappingURL=type.d.ts.map
export * from './parse';
//# sourceMappingURL=index.d.ts.map

@@ -1,4 +0,5 @@

import { NestedKeys, NestedResourceKeys } from '../../../type';
import { NestedKeys, NestedResourceKeys, ObjectLiteral } from '../../../type';
import { ParseAllowedOption } from '../../type';
export declare function flattenParseAllowedOption<T>(input: ParseAllowedOption<T>): string[];
export declare function isPathCoveredByParseAllowedOption<T>(input: ParseAllowedOption<T> | NestedKeys<T>[] | NestedResourceKeys<T>[], path: string | string[]): boolean;
export declare function flattenParseAllowedOption<T extends ObjectLiteral>(input?: ParseAllowedOption<T>): string[];
export declare function isPathCoveredByParseAllowedOption<T extends ObjectLiteral>(input: ParseAllowedOption<T> | NestedKeys<T>[] | NestedResourceKeys<T>[], path: string | string[]): boolean;
//# sourceMappingURL=allowed-option.d.ts.map
export * from './allowed-option';
//# sourceMappingURL=index.d.ts.map
export * from './module';
export * from './type';
export * from './parameter';
//# sourceMappingURL=index.d.ts.map
import { ObjectLiteral } from '../type';
import { ParseInput, ParseOptions, ParseOutput } from './type';
export declare function parseQuery<T extends ObjectLiteral = ObjectLiteral>(input: ParseInput, options?: ParseOptions<T>): ParseOutput;
//# sourceMappingURL=module.d.ts.map
export * from './module';
export * from './type';
export * from './utils';
//# sourceMappingURL=index.d.ts.map

@@ -6,1 +6,2 @@ import { RelationsParseOutput } from '../../parameter';

export declare function parseQueryParameter<P extends `${Parameter}` | `${URLParameter}`, T extends ObjectLiteral = ObjectLiteral>(key: P, data: unknown, options?: ParseParameterOptions<P, T>, relations?: RelationsParseOutput): ParseParameterOutput<P>;
//# sourceMappingURL=module.d.ts.map

@@ -6,1 +6,2 @@ import { FieldsParseOptions, FieldsParseOutput, FiltersParseOptions, FiltersParseOutput, PaginationParseOptions, PaginationParseOutput, RelationsParseOptions, RelationsParseOutput, SortParseOptions, SortParseOutput } from '../../parameter';

export type ParseParameterOutput<P extends `${Parameter}` | `${URLParameter}`> = P extends `${Parameter.FIELDS}` | `${URLParameter.FIELDS}` ? FieldsParseOutput : P extends `${Parameter.FILTERS}` | `${URLParameter.FILTERS}` ? FiltersParseOutput : P extends `${Parameter.RELATIONS}` | `${URLParameter.RELATIONS}` ? RelationsParseOutput : P extends `${Parameter.PAGINATION}` | `${URLParameter.PAGINATION}` ? PaginationParseOutput : P extends `${Parameter.SORT}` | `${URLParameter.SORT}` ? SortParseOutput : never;
//# sourceMappingURL=type.d.ts.map
export declare function buildQueryParameterOptions<T extends Record<string, any>>(input?: T | boolean): T;
export declare function isQueryParameterEnabled<T extends Record<string, any>>(input?: T | boolean): boolean;
//# sourceMappingURL=utils.d.ts.map

@@ -17,1 +17,2 @@ import { Parameter, URLParameter } from '../constants';

};
//# sourceMappingURL=type.d.ts.map

@@ -27,1 +27,2 @@ export type ObjectLiteral = Record<string, any>;

export {};
//# sourceMappingURL=type.d.ts.map

@@ -8,1 +8,2 @@ export declare function buildKeyPath(key: string, prefix?: string): string;

export {};
//# sourceMappingURL=array.d.ts.map
import { FieldDetails } from './type';
export declare function getFieldDetails(field: string): FieldDetails;
//# sourceMappingURL=field.d.ts.map

@@ -10,1 +10,2 @@ export * from './array';

export * from './url';
//# sourceMappingURL=index.d.ts.map
export declare function buildKeyWithPrefix(name: string, prefix?: string): string;
//# sourceMappingURL=key.d.ts.map
export declare function applyMapping(name: string, map?: Record<string, string>, onlyKey?: boolean): string;
//# sourceMappingURL=mapping.d.ts.map

@@ -7,1 +7,2 @@ export declare function hasOwnProperty<X extends Record<string, any>, Y extends PropertyKey>(obj: X, prop: Y): obj is X & Record<Y, unknown>;

export {};
//# sourceMappingURL=object.d.ts.map

@@ -6,1 +6,2 @@ import { RelationsParseOutput } from '../parameter';

export declare function buildFieldWithPath(field: string | FieldDetails, path?: string): string;
//# sourceMappingURL=relation.d.ts.map

@@ -5,1 +5,2 @@ export declare function isSimpleValue(value: unknown, options?: {

}): boolean;
//# sourceMappingURL=simple.d.ts.map

@@ -5,1 +5,2 @@ export type FieldDetails = {

};
//# sourceMappingURL=type.d.ts.map
export declare function buildURLQueryString(data?: any, withQuestionMark?: boolean): string;
//# sourceMappingURL=url.d.ts.map
{
"name": "rapiq",
"version": "0.7.0",
"version": "0.8.0",
"description": "A tiny library which provides utility types/functions for request and response query handling.",

@@ -67,5 +67,5 @@ "main": "dist/index.cjs",

"devDependencies": {
"@commitlint/cli": "^17.4.2",
"@commitlint/config-angular": "^17.4.2",
"@commitlint/config-conventional": "^17.4.2",
"@commitlint/cli": "^17.4.3",
"@commitlint/config-angular": "^17.4.3",
"@commitlint/config-conventional": "^17.4.3",
"@commitlint/cz-commitlint": "^17.4.2",

@@ -77,18 +77,18 @@ "@rollup/plugin-node-resolve": "^15.0.0",

"@semantic-release/release-notes-generator": "^10.0.3",
"@swc/core": "^1.3.29",
"@tada5hi/eslint-config-typescript": "^1.1.1",
"@tada5hi/tsconfig": "^0.3.0",
"@swc/core": "^1.3.35",
"@tada5hi/eslint-config-typescript": "^1.1.2",
"@tada5hi/tsconfig": "^0.4.0",
"@types/jest": "^27.5.0",
"@types/node": "^18.11.18",
"@types/node": "^18.13.0",
"cross-env": "^7.0.3",
"eslint": "^8.32.0",
"eslint": "^8.34.0",
"husky": "^8.0.3",
"jest": "^27.5.1",
"rimraf": "^4.1.2",
"rollup": "^3.11.0",
"rollup": "^3.15.0",
"semantic-release": "^19.0.5",
"ts-jest": "^27.1.4",
"typescript": "^4.9.4",
"vitepress": "^1.0.0-alpha.40",
"vue": "^3.2.45"
"typescript": "^4.9.5",
"vitepress": "^1.0.0-alpha.46",
"vue": "^3.2.47"
},

@@ -95,0 +95,0 @@ "config": {

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