@r5v/mongoose-paginate 1.0.8 → 1.0.10

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 CHANGED
@@ -97,6 +97,11 @@ PagingQuery(Express.Request, mongoose.Model, options )
97
97
  | pipeline | MongoPipelineStage[] | pipeline request object. if the first item in pipeline stage is a $match or another required first stage operator. it will be placed before all other modifiers | AggregationPagingQuery | true | [] |
98
98
  | removeProtected \(REMOVED\) | boolean | auto remove protected (select: false) for root Model | AggregationPagingQuery | | false |
99
99
 
100
+ ## Utilities
101
+ |Name| Description |
102
+ |:---|:-------------------------------------------------------------------------------------------------|
103
+ |buildPopulate| creates a populate object from dot notation string "author\[name\].books,user.publisher\[name\]" |
104
+
100
105
  ## Build
101
106
 
102
107
  ```text
@@ -129,7 +134,12 @@ $ yarn run start
129
134
  ## NOTES
130
135
  1. removeProtected removed from aggregation query due to inconsistent results after publication
131
136
 
137
+ ### 1.0.10
138
+ Fix Issue with Typescript build
139
+
140
+ ### 1.0.9
141
+ Fix Issue with Typescript add buildPopulate Export
132
142
 
133
143
  ### 1.0.8
144
+ Adds Deep Populate and Select Notation
134
145
 
135
- Adds Deep Populate and Select Notation
package/dist/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AggregationPagingQuery = exports.PagingQuery = void 0;
3
+ exports.buildPopulate = exports.AggregationPagingQuery = exports.PagingQuery = void 0;
4
4
  var pagingQuery_1 = require("./pagingQuery");
5
5
  Object.defineProperty(exports, "PagingQuery", { enumerable: true, get: function () { return pagingQuery_1.PagingQuery; } });
6
6
  var aggregationPagingQuery_1 = require("./aggregationPagingQuery");
7
7
  Object.defineProperty(exports, "AggregationPagingQuery", { enumerable: true, get: function () { return aggregationPagingQuery_1.AggregationPagingQuery; } });
8
+ var buildPopulateFromString_1 = require("./utils/buildPopulateFromString");
9
+ Object.defineProperty(exports, "buildPopulate", { enumerable: true, get: function () { return buildPopulateFromString_1.buildPopulate; } });
@@ -1,3 +1,4 @@
1
1
  export { PagingQuery } from './pagingQuery';
2
2
  export { AggregationPagingQuery } from './aggregationPagingQuery';
3
+ export { buildPopulate } from './utils/buildPopulateFromString';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAA;AACzC,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAA;AACzC,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAC,aAAa,EAAC,MAAM,iCAAiC,CAAA"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@r5v/mongoose-paginate",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "main": "./dist/index.js",
5
- "types": "./dist/index.d.ts",
5
+ "types": "./dist/types/index.d.ts",
6
6
  "scripts": {
7
7
  "prebuild": "rimraf dist/",
8
8
  "build": "tsc",
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,59 +0,0 @@
1
- import mongoose, { QueryOptions, SortOrder, AggregateOptions } from "mongoose";
2
- import { ParsedQs } from "qs";
3
- export interface ExpressQuery extends ParsedQs {
4
- $filter: string;
5
- $limit: string;
6
- $skip: string;
7
- $sort: string;
8
- $paging: "yes" | "no" | "0" | "false";
9
- $populate: string;
10
- $includes: string;
11
- $select: string;
12
- $count: string;
13
- }
14
- export interface StandardParsedRequestParams {
15
- $filter?: {
16
- [key: string]: any;
17
- };
18
- $limit: number;
19
- $skip: number;
20
- $paging?: boolean;
21
- $populate?: string[];
22
- $includes?: string[];
23
- $select?: string;
24
- }
25
- export interface PagingQueryParsedRequestParams extends StandardParsedRequestParams {
26
- $lean?: boolean;
27
- $sort?: [string, SortOrder][];
28
- }
29
- export interface AggregateQueryParsedRequestParams extends StandardParsedRequestParams {
30
- $preSort: {
31
- [key: string]: SortOrder;
32
- };
33
- $sort: {
34
- [key: string]: SortOrder;
35
- };
36
- $count: string[];
37
- $postFilter: {
38
- [key: string]: any;
39
- };
40
- }
41
- export interface StandardQueryOptions extends QueryOptions {
42
- disablePaging?: boolean;
43
- disableFilter?: boolean;
44
- }
45
- export interface PagingQueryOptions extends StandardQueryOptions {
46
- staticFilter?: {
47
- [key: string]: any;
48
- };
49
- single?: boolean;
50
- }
51
- export interface AggregateQueryOptions extends StandardQueryOptions, Omit<AggregateOptions, 'comment'> {
52
- disablePostFilter?: boolean;
53
- disablePreSort?: boolean;
54
- staticPostFilter?: {
55
- [key: string]: any;
56
- };
57
- pipeline: mongoose.PipelineStage[];
58
- }
59
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,EAAE,EAAC,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAC,MAAM,UAAU,CAAC;AAC7E,OAAO,EAAC,QAAQ,EAAC,MAAM,IAAI,CAAC;AAE5B,MAAM,WAAW,YAAa,SAAQ,QAAQ;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,KAAK,GAAG,IAAI,GAAG,GAAG,GAAG,OAAO,CAAA;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAClB;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