@form-engine-ts/storage 6.9.0 → 7.0.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 +7 -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/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,5 +13,10 @@ 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.
|
|
19
|
+
|
|
20
|
+
Both adapters implement the required `UnifiedSubmissionStorageAdapter` surface: typed submission paging and filters,
|
|
21
|
+
free-text answer paging, idempotent saving, typed validation, response aggregation, and CSV export. These common
|
|
22
|
+
operations use the same core contracts regardless of the backing database.
|
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, StorageSubmissionExportOptions, SubmissionCursorPayload, TextAnswerCursorPayload, TypedSubmissionPage, TypedSubmissionPageQueryOptions, UnifiedSubmissionStorageAdapter, 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, StorageSubmissionExportOptions, SubmissionCursorPayload, TextAnswerCursorPayload, TypedSubmissionPage, TypedSubmissionPageQueryOptions, UnifiedSubmissionStorageAdapter, 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/dist/types.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StorageFilterCriteria } from '@form-engine-ts/core';
|
|
2
|
-
export { CursorPagingOptions, PaginatedResult, StorageCursor, StorageFilterCriteria, SubmissionCursorPayload, TextAnswerCursorPayload } from '@form-engine-ts/core';
|
|
2
|
+
export { CursorPagingOptions, PaginatedResult, StorageCursor, StorageFilterCriteria, StorageSubmissionExportOptions, SubmissionCursorPayload, TextAnswerCursorPayload, UnifiedSubmissionStorageAdapter } from '@form-engine-ts/core';
|
|
3
3
|
|
|
4
4
|
interface StorageFilterPushdownContract {
|
|
5
5
|
readonly supportedMetadataFields: readonly string[];
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StorageFilterCriteria } from '@form-engine-ts/core';
|
|
2
|
-
export { CursorPagingOptions, PaginatedResult, StorageCursor, StorageFilterCriteria, SubmissionCursorPayload, TextAnswerCursorPayload } from '@form-engine-ts/core';
|
|
2
|
+
export { CursorPagingOptions, PaginatedResult, StorageCursor, StorageFilterCriteria, StorageSubmissionExportOptions, SubmissionCursorPayload, TextAnswerCursorPayload, UnifiedSubmissionStorageAdapter } from '@form-engine-ts/core';
|
|
3
3
|
|
|
4
4
|
interface StorageFilterPushdownContract {
|
|
5
5
|
readonly supportedMetadataFields: readonly string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@form-engine-ts/storage",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.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": "
|
|
40
|
+
"@form-engine-ts/core": "7.0.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",
|