Skip to content

Commit cff6130

Browse files
Merge pull request #50 from brandongregoryscott/main
Fixes #45 Export 'UnitOfTime' and 'AnchorTargetTypes' enums in index.ts Fixes #19 Port 'PagedQuery' interface Fixes #49 preinstall -> configure:git script prevents installation on unix-based systems (ie, TravisCI or MacOS)
2 parents 27a8580 + 1f8610d commit cff6130

3 files changed

Lines changed: 30 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,13 @@
6262
"scripts": {
6363
"build": "tsc --pretty",
6464
"clean": "rimraf dist && rimraf coverage",
65-
"configure:git": "echo Ensuring git hooksPath is set to .githooks directory; git config core.hooksPath .githooks; chmod +x .githooks/*",
65+
"configure:git": "echo Ensuring git hooksPath is set to .githooks directory && git config core.hooksPath .githooks && chmod +x .githooks/*",
6666
"coverage": "jest ./src --coverage",
6767
"docs": "typedoc --mode file --excludeExternals --plugin typedoc-plugin-markdown --readme none",
6868
"format": "prettier --write \"src/**/*.ts\" --trailing-comma es5",
6969
"postbuild": "npm run docs",
7070
"postpublish": "cross-env-shell \"git add -A && git commit -m \"$npm_package_version\" && git push origin master\"",
7171
"prebuild": "npm run clean && npm run format && echo Using TypeScript && tsc --version",
72-
"preinstall": "npm run configure:git",
7372
"prepublishOnly": "npm run build",
7473
"test": "jest ./src",
7574
"watch": "npm run build -- --watch",

src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ export { BaseSpanishSpain } from "./cultures/base-spanish-spain";
2121
// #region Enumerations
2222
// -----------------------------------------------------------------------------------------
2323

24+
export { AnchorTargetTypes } from "./enumerations/anchor-target-types";
2425
export { ContentType } from "./enumerations/content-type";
2526
export { ErrorType } from "./enumerations/error-type";
2627
export { HttpHeader } from "./enumerations/http-header";
2728
export { HttpVerb } from "./enumerations/http-verb";
29+
export { UnitOfTime } from "./enumerations/unit-of-time";
2830

2931
// #endregion Enumerations
3032

@@ -37,6 +39,7 @@ export { Culture } from "./interfaces/culture";
3739
export { CultureParams } from "./interfaces/culture-params";
3840
export { Entity } from "./interfaces/entity";
3941
export { KeyValuePair } from "./interfaces/key-value-pair";
42+
export { PagedQuery } from "./interfaces/paged-query";
4043
export { PagedResult } from "./interfaces/paged-result";
4144
export { Result } from "./interfaces/result";
4245
export { ResultError } from "./interfaces/result-error";

src/interfaces/paged-query.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// -----------------------------------------------------------------------------------------
2+
// #region Interfaces
3+
// -----------------------------------------------------------------------------------------
4+
5+
interface PagedQuery {
6+
/**
7+
* Number of records to skip before retrieving rows.
8+
*/
9+
skip?: number;
10+
11+
/**
12+
* Number of records to take in the request. (_Up_ to this number of records will be returned,
13+
* if available)
14+
*/
15+
take?: number;
16+
}
17+
18+
// #endregion Interfaces
19+
20+
// -----------------------------------------------------------------------------------------
21+
// #region Exports
22+
// -----------------------------------------------------------------------------------------
23+
24+
export { PagedQuery };
25+
26+
// #endregion Exports

0 commit comments

Comments
 (0)