@form-engine-ts/storage 6.8.0 → 6.10.0
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 +3 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/pagination.d.cts +3 -15
- package/dist/pagination.d.ts +3 -15
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,5 +13,6 @@ The package exports `StorageCursor`, cursor payload contracts, cursor encoders/d
|
|
|
13
13
|
`maxScanPages` bounds low-density scans, and `totalScannedCount` reports the amount of source data inspected.
|
|
14
14
|
|
|
15
15
|
`TypedPagedSubmissionStorageAdapter<TMeta>` and `iterateTypedSubmissionPages` preserve application metadata types
|
|
16
|
-
through page fetching.
|
|
17
|
-
`
|
|
16
|
+
through page fetching. MongoDB and Azure Table expose the same typed `fetchSubmissionPage` arguments and the same
|
|
17
|
+
`{ items, hasMore, nextCursor }` page result when called as `createMongoDbStorage<TMeta>(...)` or
|
|
18
|
+
`createAzureTableStorage<TMeta>(...)`. The older `fetchPage` helper remains available for compatibility.
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { TypedPagedSubmissionStorageAdapter,
|
|
1
|
+
export { TypedPagedSubmissionStorageAdapter, iterateTypedSubmissionPages, paginateWithFilter } from './pagination.cjs';
|
|
2
2
|
export { StorageFilterPushdownContract, TenantIsolationOptions } from './types.cjs';
|
|
3
|
-
export { CursorPagingOptions, PaginatedResult, StorageCursor, StorageFilterCriteria, SubmissionCursorPayload, TextAnswerCursorPayload, decodeStorageSubmissionCursor, decodeStorageTextAnswerCursor, encodeStorageSubmissionCursor, encodeStorageTextAnswerCursor } from '@form-engine-ts/core';
|
|
3
|
+
export { CursorPagingOptions, PaginatedResult, StorageCursor, StorageFilterCriteria, SubmissionCursorPayload, TextAnswerCursorPayload, TypedSubmissionPage, TypedSubmissionPageQueryOptions, decodeStorageSubmissionCursor, decodeStorageTextAnswerCursor, encodeStorageSubmissionCursor, encodeStorageTextAnswerCursor } from '@form-engine-ts/core';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { TypedPagedSubmissionStorageAdapter,
|
|
1
|
+
export { TypedPagedSubmissionStorageAdapter, iterateTypedSubmissionPages, paginateWithFilter } from './pagination.js';
|
|
2
2
|
export { StorageFilterPushdownContract, TenantIsolationOptions } from './types.js';
|
|
3
|
-
export { CursorPagingOptions, PaginatedResult, StorageCursor, StorageFilterCriteria, SubmissionCursorPayload, TextAnswerCursorPayload, decodeStorageSubmissionCursor, decodeStorageTextAnswerCursor, encodeStorageSubmissionCursor, encodeStorageTextAnswerCursor } from '@form-engine-ts/core';
|
|
3
|
+
export { CursorPagingOptions, PaginatedResult, StorageCursor, StorageFilterCriteria, SubmissionCursorPayload, TextAnswerCursorPayload, TypedSubmissionPage, TypedSubmissionPageQueryOptions, decodeStorageSubmissionCursor, decodeStorageTextAnswerCursor, encodeStorageSubmissionCursor, encodeStorageTextAnswerCursor } from '@form-engine-ts/core';
|
package/dist/pagination.d.cts
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
import { BaseSubmissionMetadata, FormSubmission, StorageCursor, PaginatedResult } from '@form-engine-ts/core';
|
|
2
|
-
export { CursorPagingOptions, PaginatedResult, StorageCursor, decodeStorageSubmissionCursor, decodeStorageTextAnswerCursor, encodeStorageSubmissionCursor, encodeStorageTextAnswerCursor } from '@form-engine-ts/core';
|
|
1
|
+
import { BaseSubmissionMetadata, TypedSubmissionPageQueryOptions, TypedSubmissionPage, FormSubmission, StorageCursor, PaginatedResult } from '@form-engine-ts/core';
|
|
2
|
+
export { CursorPagingOptions, PaginatedResult, StorageCursor, TypedSubmissionPage, TypedSubmissionPageQueryOptions, decodeStorageSubmissionCursor, decodeStorageTextAnswerCursor, encodeStorageSubmissionCursor, encodeStorageTextAnswerCursor } from '@form-engine-ts/core';
|
|
3
3
|
|
|
4
|
-
interface TypedSubmissionPageQueryOptions<TMeta extends BaseSubmissionMetadata> {
|
|
5
|
-
readonly pageSize?: number;
|
|
6
|
-
readonly fromSubmittedAt?: string;
|
|
7
|
-
readonly toSubmittedAt?: string;
|
|
8
|
-
readonly locale?: string;
|
|
9
|
-
readonly metadataFilters?: Partial<TMeta>;
|
|
10
|
-
readonly cursor?: string;
|
|
11
|
-
}
|
|
12
|
-
interface TypedSubmissionPage<TMeta extends BaseSubmissionMetadata> {
|
|
13
|
-
readonly items: readonly FormSubmission<TMeta>[];
|
|
14
|
-
readonly nextCursor?: string;
|
|
15
|
-
}
|
|
16
4
|
interface TypedPagedSubmissionStorageAdapter<TMeta extends BaseSubmissionMetadata> {
|
|
17
5
|
readonly fetchPage: (formId: string, options?: TypedSubmissionPageQueryOptions<TMeta>) => Promise<TypedSubmissionPage<TMeta>>;
|
|
18
6
|
}
|
|
@@ -29,4 +17,4 @@ declare function paginateWithFilter<T>(params: {
|
|
|
29
17
|
readonly encodeCursor: (lastItem: T) => StorageCursor;
|
|
30
18
|
}): Promise<PaginatedResult<T>>;
|
|
31
19
|
|
|
32
|
-
export { type TypedPagedSubmissionStorageAdapter,
|
|
20
|
+
export { type TypedPagedSubmissionStorageAdapter, iterateTypedSubmissionPages, paginateWithFilter };
|
package/dist/pagination.d.ts
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
|
-
import { BaseSubmissionMetadata, FormSubmission, StorageCursor, PaginatedResult } from '@form-engine-ts/core';
|
|
2
|
-
export { CursorPagingOptions, PaginatedResult, StorageCursor, decodeStorageSubmissionCursor, decodeStorageTextAnswerCursor, encodeStorageSubmissionCursor, encodeStorageTextAnswerCursor } from '@form-engine-ts/core';
|
|
1
|
+
import { BaseSubmissionMetadata, TypedSubmissionPageQueryOptions, TypedSubmissionPage, FormSubmission, StorageCursor, PaginatedResult } from '@form-engine-ts/core';
|
|
2
|
+
export { CursorPagingOptions, PaginatedResult, StorageCursor, TypedSubmissionPage, TypedSubmissionPageQueryOptions, decodeStorageSubmissionCursor, decodeStorageTextAnswerCursor, encodeStorageSubmissionCursor, encodeStorageTextAnswerCursor } from '@form-engine-ts/core';
|
|
3
3
|
|
|
4
|
-
interface TypedSubmissionPageQueryOptions<TMeta extends BaseSubmissionMetadata> {
|
|
5
|
-
readonly pageSize?: number;
|
|
6
|
-
readonly fromSubmittedAt?: string;
|
|
7
|
-
readonly toSubmittedAt?: string;
|
|
8
|
-
readonly locale?: string;
|
|
9
|
-
readonly metadataFilters?: Partial<TMeta>;
|
|
10
|
-
readonly cursor?: string;
|
|
11
|
-
}
|
|
12
|
-
interface TypedSubmissionPage<TMeta extends BaseSubmissionMetadata> {
|
|
13
|
-
readonly items: readonly FormSubmission<TMeta>[];
|
|
14
|
-
readonly nextCursor?: string;
|
|
15
|
-
}
|
|
16
4
|
interface TypedPagedSubmissionStorageAdapter<TMeta extends BaseSubmissionMetadata> {
|
|
17
5
|
readonly fetchPage: (formId: string, options?: TypedSubmissionPageQueryOptions<TMeta>) => Promise<TypedSubmissionPage<TMeta>>;
|
|
18
6
|
}
|
|
@@ -29,4 +17,4 @@ declare function paginateWithFilter<T>(params: {
|
|
|
29
17
|
readonly encodeCursor: (lastItem: T) => StorageCursor;
|
|
30
18
|
}): Promise<PaginatedResult<T>>;
|
|
31
19
|
|
|
32
|
-
export { type TypedPagedSubmissionStorageAdapter,
|
|
20
|
+
export { type TypedPagedSubmissionStorageAdapter, iterateTypedSubmissionPages, paginateWithFilter };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@form-engine-ts/storage",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.10.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"url": "git+https://github.com/nitta-a/form-engine-ts.git"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@form-engine-ts/core": "6.
|
|
40
|
+
"@form-engine-ts/core": "6.10.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "tsup src/index.ts src/types.ts src/pagination.ts --format esm,cjs --dts --clean --external @form-engine-ts/core",
|