Skip to content

Commit f885aeb

Browse files
authored
Merge pull request #16 from js-items/develop
updated @js-items/foundation package
2 parents 45a71bf + 4afebcc commit f885aeb

File tree

42 files changed

+141
-277
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+141
-277
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ The main differences to the @js-entity-repos/express:
1515

1616
- different naming convention: using `item` instead of `entity`
1717
- cursor based pagination operates using `before` and `after` instead of `cursor` and `direction`
18+
- additional `totalCount` property on pagination object
1819
- optional `enveloping` response (`GET /endpoint?envelope=true`) for clients not capable of working with headers and JSONP
1920
- `granular transactions handlers` for each `request handler` - this could be used for i.e. `authentication` or `permissions` checks
2021
- possibility to `override` each `request handler`

assets/jscpd-badge.svg

Lines changed: 2 additions & 2 deletions
Loading

dist/FacadeConfig.d.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,7 @@ import DocumentIntoItem from './types/DocumentIntoItem';
66
import ItemIntoDocument from './types/ItemIntoDocument';
77
import TransactionHandler from './types/TransactionHandler';
88
export default interface FacadeConfig<I extends Item> {
9-
readonly dataKeyName: string;
109
readonly serverSideGeneratedIds: boolean;
11-
readonly totalHeaderName: string;
12-
readonly hasAfterHeaderName: string;
13-
readonly afterHeaderName: string;
14-
readonly hasBeforeHeaderName: string;
15-
readonly beforeHeaderName: string;
16-
readonly paginationKey: string;
17-
readonly afterKey: string;
18-
readonly beforeKey: string;
19-
readonly hasBeforeKey: string;
20-
readonly hasAfterKey: string;
21-
readonly totalKey: string;
2210
readonly envelopeParamName: string;
2311
readonly prettyParamName: string;
2412
readonly createFilter: CreateFilter<I>;

dist/FactoryConfig.d.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,9 @@ import ItemIntoDocument from './types/ItemIntoDocument';
77
import RequestHandlerFactory from './types/RequestHandlerFactory';
88
import TransactionHandler from './types/TransactionHandler';
99
export default interface FactoryConfig<I extends Item> {
10-
readonly dataKeyName?: string;
1110
readonly defaultSort?: Sort<I>;
1211
readonly enableJsonBodyParser?: boolean;
1312
readonly serverSideGeneratedIds?: boolean;
14-
readonly totalHeaderName?: string;
15-
readonly hasAfterHeaderName?: string;
16-
readonly afterHeaderName?: string;
17-
readonly hasBeforeHeaderName?: string;
18-
readonly beforeHeaderName?: string;
19-
readonly afterKey?: string;
20-
readonly beforeKey?: string;
21-
readonly hasBeforeKey?: string;
22-
readonly hasAfterKey?: string;
23-
readonly totalKey?: string;
24-
readonly paginationKey?: string;
2513
readonly envelopParamName?: string;
2614
readonly prettyParamName?: string;
2715
readonly createFilter?: CreateFilter<I>;

dist/factory.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Item } from '@js-items/foundation';
22
import { Router } from 'express';
33
import FactoryConfig from './FactoryConfig';
4-
declare const _default: <I extends Item>({ deleteItem, deleteItems, getItem, getItems, updateItem, replaceItem, createItem, totalHeaderName, hasAfterHeaderName, defaultSort, afterHeaderName, hasBeforeHeaderName, beforeHeaderName, afterKey, beforeKey, hasBeforeKey, hasAfterKey, totalKey, paginationKey, envelopParamName, prettyParamName, dataKeyName, serverSideGeneratedIds, ...config }: FactoryConfig<I>) => Router;
4+
declare const _default: <I extends Item>({ deleteItem, deleteItems, getItem, getItems, updateItem, replaceItem, createItem, defaultSort, envelopParamName, prettyParamName, serverSideGeneratedIds, ...config }: FactoryConfig<I>) => Router;
55
export default _default;

dist/factory.js

Lines changed: 3 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/factory.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/functions/createItem/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/functions/createItem/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/functions/getItem/index.js

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)