nestjs-prisma-querybuilder-interface 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/{querybuilder → lib}/Query.d.ts +0 -0
- package/dist/{querybuilder → lib}/Query.js +0 -0
- package/dist/{querybuilder → lib}/Query.js.map +1 -1
- package/dist/lib/Querybuilder.d.ts +3 -0
- package/dist/lib/Querybuilder.js +13 -0
- package/dist/lib/Querybuilder.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +39 -40
- package/dist/exemple/index.d.ts +0 -1
- package/dist/exemple/index.js +0 -15
- package/dist/exemple/index.js.map +0 -1
- package/dist/querybuilder/queryBuilder.d.ts +0 -2
- package/dist/querybuilder/queryBuilder.js +0 -9
- package/dist/querybuilder/queryBuilder.js.map +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Nestjs/prisma-querybuilder-interface
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
<br/>
|
|
6
|
+
|
|
7
|
+
### Documentação / Documentation
|
|
8
|
+
|
|
9
|
+
- [Português](#português)
|
|
10
|
+
- [English](#english)
|
|
11
|
+
|
|
12
|
+
### English
|
|
13
|
+
|
|
14
|
+
- **How to install it?**
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npm install --save nestjs-prisma-querybuilder-interface
|
|
18
|
+
# or
|
|
19
|
+
yarn add nestjs-prisma-querybuilder-interface
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
- **How to use it?**
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import { Querybuilder } from 'nestjs-prisma-querybuilder-interface';
|
|
26
|
+
|
|
27
|
+
const query = QueryToUrl({
|
|
28
|
+
select: 'message title date',
|
|
29
|
+
populate: [
|
|
30
|
+
{
|
|
31
|
+
path: 'user',
|
|
32
|
+
select: 'name email'
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
sort: 'asc',
|
|
36
|
+
sortField: 'date',
|
|
37
|
+
limit: 20
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
fetch(`http://example.com/movies.json?${query}`).then(res =>
|
|
41
|
+
console.log(res)
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
// with axios
|
|
45
|
+
|
|
46
|
+
axios
|
|
47
|
+
.get(`http://example.com/movies.json?${query}`)
|
|
48
|
+
.then(res => console.log(res));
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
- **Properts**
|
|
52
|
+
|
|
53
|
+
| Name | Type | exemple |
|
|
54
|
+
| --------- | ---------------------- | ------------------------------------------------ |
|
|
55
|
+
| select | string | select: 'name email', |
|
|
56
|
+
| page | number | page: 2, |
|
|
57
|
+
| limit | number | limit: 20, |
|
|
58
|
+
| sort | 'asc' or 'desc' | sort: 'asc', |
|
|
59
|
+
| sortField | string | sortField: 'name', |
|
|
60
|
+
| populate | Populate | populate: [{path: 'car', select: 'model plate'}] |
|
|
61
|
+
| operator | 'and' or 'or' or 'not' | operator: 'and' ` => use with filter` |
|
|
62
|
+
| filter | FiltersFields[] | filter: [{path: 'name', value: 'willian'}] |
|
|
63
|
+
|
|
64
|
+
- **Populate**
|
|
65
|
+
|
|
66
|
+
| Name | Type | exemple |
|
|
67
|
+
| -------- | -------- | ------------------------------------------- |
|
|
68
|
+
| path | string | path: 'picture' |
|
|
69
|
+
| select | string | select: 'url extencion', |
|
|
70
|
+
| populate | Populate | populate: [{path: 'post', select: 'title'}] |
|
|
71
|
+
|
|
72
|
+
- **FilterFields**
|
|
73
|
+
|
|
74
|
+
| Name | Type | exemple |
|
|
75
|
+
| -------- | ------------------------------------------- | ------------------------------------ |
|
|
76
|
+
| path | string | path: 'picture' |
|
|
77
|
+
| value | string | value: 'url', |
|
|
78
|
+
| type | 'string' or 'boolean' or 'number' or 'date' | type: 'number', ` => default string` |
|
|
79
|
+
| operator | string | operator: 'equals', |
|
|
80
|
+
|
|
81
|
+
- **Operators**
|
|
82
|
+
|
|
83
|
+
contains, endsWith, startsWith, equals, gt, gte, in, lt, lte ,not, notIn
|
|
84
|
+
|
|
85
|
+
# END
|
|
86
|
+
|
|
87
|
+
- Nestjs/Prisma Querybuilder Interface is ISC licensed.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './lib/Query';
|
|
2
|
+
export * from './lib/Querybuilder';
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./lib/Query"), exports);
|
|
18
|
+
__exportStar(require("./lib/Querybuilder"), exports);
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,qDAAmC"}
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Query.js","sourceRoot":"","sources":["../../
|
|
1
|
+
{"version":3,"file":"Query.js","sourceRoot":"","sources":["../../lib/Query.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QueryToUrl = exports.QueryToParam = void 0;
|
|
4
|
+
const qs_1 = require("qs");
|
|
5
|
+
function QueryToParam(query) {
|
|
6
|
+
return (0, qs_1.stringify)(query);
|
|
7
|
+
}
|
|
8
|
+
exports.QueryToParam = QueryToParam;
|
|
9
|
+
function QueryToUrl(query) {
|
|
10
|
+
return (0, qs_1.stringify)(query);
|
|
11
|
+
}
|
|
12
|
+
exports.QueryToUrl = QueryToUrl;
|
|
13
|
+
//# sourceMappingURL=Querybuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Querybuilder.js","sourceRoot":"","sources":["../../lib/Querybuilder.ts"],"names":[],"mappings":";;;AAAA,2BAA+B;AAG/B,SAAgB,YAAY,CAAC,KAAY;IACvC,OAAO,IAAA,cAAS,EAAC,KAAK,CAAC,CAAC;AAC1B,CAAC;AAFD,oCAEC;AAED,SAAgB,UAAU,CAAC,KAAY;IACrC,OAAO,IAAA,cAAS,EAAC,KAAK,CAAC,CAAC;AAC1B,CAAC;AAFD,gCAEC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.es2021.full.d.ts","../
|
|
1
|
+
{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../node_modules/typescript/lib/lib.scripthost.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.es2021.full.d.ts","../lib/query.ts","../lib/querybuilder.ts","../index.ts"],"fileInfos":[{"version":"3ac1b83264055b28c0165688fda6dfcc39001e9e7828f649299101c23ad0a0c3","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f",{"version":"72704b10d97777e15f1a581b73f88273037ef752d2e50b72287bd0a90af64fe6","affectsGlobalScope":true},{"version":"dbb73d4d99be496175cb432c74c2615f78c76f4272f1d83cba11ee0ed6dbddf0","affectsGlobalScope":true},{"version":"7fac8cb5fc820bc2a59ae11ef1c5b38d3832c6d0dfaec5acdb5569137d09a481","affectsGlobalScope":true},{"version":"097a57355ded99c68e6df1b738990448e0bf170e606707df5a7c0481ff2427cd","affectsGlobalScope":true},{"version":"d8996609230d17e90484a2dd58f22668f9a05a3bfe00bfb1d6271171e54a31fb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"1b3fe904465430e030c93239a348f05e1be80640d91f2f004c3512c2c2c89f34","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"5075b36ab861c8c0c45377cb8c96270d7c65f0eeaf105d53fac6850da61f1027","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"e8c9f4e445a489991ca1a4232667de3ac36b07ba75ea335971fbeacf2d26fe67","affectsGlobalScope":true},"0ce99fa68940b918945c445a958e2568a5b7593f7e3a0eeef9f0f79d45651b91","a77e28529431ef82d39f6b07ea2c44d82ae8802628298c704547673a227e5708","67fbd6f3abc0fb6945b8b3ef0702e6e9fe5cb37d8b3ea1042f7276db976869a4","c8a4225f1013e791bc7a7bf1c2e04d79422ef9a76ff739000734e1d9e5624925"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"experimentalDecorators":true,"module":1,"outDir":"./","removeComments":true,"sourceMap":true,"target":8},"fileIdsList":[[48,49],[48]],"referencedMap":[[50,1],[49,2]],"exportedModulesMap":[[50,1],[49,2]],"semanticDiagnosticsPerFile":[50,48,49,9,10,14,13,2,15,16,17,18,19,20,21,22,3,4,26,23,24,25,27,28,29,5,30,31,32,33,6,34,35,36,37,7,42,38,39,40,41,8,47,46,43,44,45,1,12,11]},"version":"4.6.4"}
|
package/package.json
CHANGED
|
@@ -1,40 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "nestjs-prisma-querybuilder-interface",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Frontend interface to nestjs-prisma-querybuilder",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "./dist/index.d.ts",
|
|
7
|
-
"keywords": [
|
|
8
|
-
"query",
|
|
9
|
-
"querybuilder",
|
|
10
|
-
"prisma",
|
|
11
|
-
"nest",
|
|
12
|
-
"nestjs-prisma-querybuilder",
|
|
13
|
-
"nestjs-querybuilder",
|
|
14
|
-
"prisma-querybuilder",
|
|
15
|
-
"interface",
|
|
16
|
-
"qs"
|
|
17
|
-
],
|
|
18
|
-
"files": [
|
|
19
|
-
"dist/**/*",
|
|
20
|
-
"*.md"
|
|
21
|
-
],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"test": "echo \"Error: no test specified\" && exit 1",
|
|
24
|
-
"build": "tsc",
|
|
25
|
-
"prepare": "npm run build"
|
|
26
|
-
},
|
|
27
|
-
"repository": {
|
|
28
|
-
"type": "git",
|
|
29
|
-
"url": "git@github.com:Willian-Rodrigues/nestjs-prisma-querybuilder-interface.git"
|
|
30
|
-
},
|
|
31
|
-
"author": "Will",
|
|
32
|
-
"license": "ISC",
|
|
33
|
-
"dependencies": {
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "nestjs-prisma-querybuilder-interface",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Frontend interface to nestjs-prisma-querybuilder",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"query",
|
|
9
|
+
"querybuilder",
|
|
10
|
+
"prisma",
|
|
11
|
+
"nest",
|
|
12
|
+
"nestjs-prisma-querybuilder",
|
|
13
|
+
"nestjs-querybuilder",
|
|
14
|
+
"prisma-querybuilder",
|
|
15
|
+
"interface",
|
|
16
|
+
"qs"
|
|
17
|
+
],
|
|
18
|
+
"files": [
|
|
19
|
+
"dist/**/*",
|
|
20
|
+
"*.md"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
24
|
+
"build": "tsc",
|
|
25
|
+
"prepare": "npm run build"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git@github.com:Willian-Rodrigues/nestjs-prisma-querybuilder-interface.git"
|
|
30
|
+
},
|
|
31
|
+
"author": "Will",
|
|
32
|
+
"license": "ISC",
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"qs": "^6.10.3"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"typescript": "^4.6.4"
|
|
38
|
+
}
|
|
39
|
+
}
|
package/dist/exemple/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/exemple/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const queryBuilder_1 = require("../querybuilder/queryBuilder");
|
|
4
|
-
const teste = () => {
|
|
5
|
-
const q = (0, queryBuilder_1.queryBuilder)({
|
|
6
|
-
select: 'a b c',
|
|
7
|
-
populate: [
|
|
8
|
-
{ path: 'pop', select: 'um dois' },
|
|
9
|
-
{ path: 'populate', select: 'tres quatro' }
|
|
10
|
-
]
|
|
11
|
-
});
|
|
12
|
-
console.log(q);
|
|
13
|
-
};
|
|
14
|
-
teste();
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/exemple/index.ts"],"names":[],"mappings":";;AAAA,+DAA4D;AAE5D,MAAM,KAAK,GAAG,GAAG,EAAE;IACjB,MAAM,CAAC,GAAG,IAAA,2BAAY,EAAC;QACrB,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE;YACR,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE;YAClC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE;SAC5C;KACF,CAAC,CAAC;IAEH,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC;AACF,KAAK,EAAE,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.queryBuilder = void 0;
|
|
4
|
-
const qs_1 = require("qs");
|
|
5
|
-
const queryBuilder = (query) => {
|
|
6
|
-
return `?${qs_1.default.stringify(query)}`;
|
|
7
|
-
};
|
|
8
|
-
exports.queryBuilder = queryBuilder;
|
|
9
|
-
//# sourceMappingURL=queryBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queryBuilder.js","sourceRoot":"","sources":["../../src/querybuilder/queryBuilder.ts"],"names":[],"mappings":";;;AAAA,2BAA6B;AAGtB,MAAM,YAAY,GAAG,CAAC,KAAY,EAAE,EAAE;IAC3C,OAAO,IAAI,YAAW,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;AAC5C,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB"}
|