@futdevpro/nts-dynamo 1.15.168 → 1.15.173

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.
Files changed (26) hide show
  1. package/README.md +15 -5
  2. package/build/_modules/pagination/_models/keyset-cursor.interface.d.ts +16 -0
  3. package/build/_modules/pagination/_models/keyset-cursor.interface.d.ts.map +1 -0
  4. package/build/_modules/pagination/_models/keyset-cursor.interface.js +3 -0
  5. package/build/_modules/pagination/_models/keyset-cursor.interface.js.map +1 -0
  6. package/build/_modules/pagination/index.d.ts +3 -0
  7. package/build/_modules/pagination/index.d.ts.map +1 -0
  8. package/build/_modules/pagination/index.js +6 -0
  9. package/build/_modules/pagination/index.js.map +1 -0
  10. package/build/_modules/pagination/keyset-cursor.control-service.d.ts +21 -0
  11. package/build/_modules/pagination/keyset-cursor.control-service.d.ts.map +1 -0
  12. package/build/_modules/pagination/keyset-cursor.control-service.js +116 -0
  13. package/build/_modules/pagination/keyset-cursor.control-service.js.map +1 -0
  14. package/build/_modules/privacy-lifecycle/_models/privacy-request-cursor-value.interface.d.ts +6 -0
  15. package/build/_modules/privacy-lifecycle/_models/privacy-request-cursor-value.interface.d.ts.map +1 -0
  16. package/build/_modules/privacy-lifecycle/_models/privacy-request-cursor-value.interface.js +3 -0
  17. package/build/_modules/privacy-lifecycle/_models/privacy-request-cursor-value.interface.js.map +1 -0
  18. package/build/_modules/privacy-lifecycle/index.d.ts +2 -0
  19. package/build/_modules/privacy-lifecycle/index.d.ts.map +1 -1
  20. package/build/_modules/privacy-lifecycle/index.js +3 -1
  21. package/build/_modules/privacy-lifecycle/index.js.map +1 -1
  22. package/build/_modules/privacy-lifecycle/privacy-request-cursor.control-service.d.ts +13 -0
  23. package/build/_modules/privacy-lifecycle/privacy-request-cursor.control-service.d.ts.map +1 -0
  24. package/build/_modules/privacy-lifecycle/privacy-request-cursor.control-service.js +83 -0
  25. package/build/_modules/privacy-lifecycle/privacy-request-cursor.control-service.js.map +1 -0
  26. package/package.json +10 -1
package/README.md CHANGED
@@ -344,11 +344,21 @@ The `@futdevpro/nts-dynamo/rate-limit` entry point provides an atomic rate-limit
344
344
  - trusted `req.ip` as the safe local default instead of reading caller-controlled forwarding headers directly;
345
345
  - explicit opportunistic local cleanup with no timer, polling loop or hidden background task.
346
346
 
347
- Production consumers must implement the shared store with one atomic permit decision across every application
348
- instance. They must derive non-sensitive, purpose-scoped bucket identifiers and must not persist or log raw IP
349
- addresses, credentials, email addresses or other request content as rate-limit keys.
350
-
351
- ### Privacy lifecycle
347
+ Production consumers must implement the shared store with one atomic permit decision across every application
348
+ instance. They must derive non-sensitive, purpose-scoped bucket identifiers and must not persist or log raw IP
349
+ addresses, credentials, email addresses or other request content as rate-limit keys.
350
+
351
+ ### Namespace-bound keyset pagination
352
+
353
+ The optional `@futdevpro/nts-dynamo/pagination` entry point provides a strict keyset cursor codec for bounded
354
+ API listings. A codec instance binds every cursor to one declared namespace and an exact tuple dimension count,
355
+ uses canonical unpadded base64url, rejects expanded or reordered payloads, and returns defensive tuple copies.
356
+
357
+ The cursor is an integrity and routing boundary, not encryption. Consumers must put only non-sensitive ordering
358
+ values such as canonical timestamps and opaque resource identifiers into the tuple. Tenant, account, email,
359
+ authorization or business-content fields must remain server-derived and outside the cursor payload.
360
+
361
+ ### Privacy lifecycle
352
362
 
353
363
  The optional `@futdevpro/nts-dynamo/privacy-lifecycle` entry point provides the shared machinery for standalone
354
364
  GDPR-capable products:
@@ -0,0 +1,16 @@
1
+ /** Construction policy for one route- or capability-bound keyset cursor codec. */
2
+ export interface DyNTS_KeysetCursorSettings_Interface {
3
+ namespace: string;
4
+ dimensionCount: number;
5
+ maxValueLength?: number;
6
+ }
7
+ /** Canonical content-free ordering tuple carried by a keyset cursor. */
8
+ export interface DyNTS_KeysetCursorValue_Interface {
9
+ values: string[];
10
+ }
11
+ /** Internal versioned cursor payload. It deliberately carries no tenant or subject authority. */
12
+ export interface DyNTS_KeysetCursorPayload_Interface extends DyNTS_KeysetCursorValue_Interface {
13
+ contractVersion: 'dynts-keyset-cursor/1';
14
+ namespace: string;
15
+ }
16
+ //# sourceMappingURL=keyset-cursor.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyset-cursor.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/pagination/_models/keyset-cursor.interface.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,WAAW,oCAAoC;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wEAAwE;AACxE,MAAM,WAAW,iCAAiC;IAChD,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,iGAAiG;AACjG,MAAM,WAAW,mCAAoC,SAAQ,iCAAiC;IAC5F,eAAe,EAAE,uBAAuB,CAAC;IACzC,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=keyset-cursor.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyset-cursor.interface.js","sourceRoot":"","sources":["../../../../src/_modules/pagination/_models/keyset-cursor.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export { DyNTS_KeysetCursor_ControlService } from './keyset-cursor.control-service';
2
+ export type { DyNTS_KeysetCursorPayload_Interface, DyNTS_KeysetCursorSettings_Interface, DyNTS_KeysetCursorValue_Interface } from './_models/keyset-cursor.interface';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/_modules/pagination/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,MAAM,iCAAiC,CAAC;AACpF,YAAY,EACV,mCAAmC,EACnC,oCAAoC,EACpC,iCAAiC,EAClC,MAAM,mCAAmC,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DyNTS_KeysetCursor_ControlService = void 0;
4
+ var keyset_cursor_control_service_1 = require("./keyset-cursor.control-service");
5
+ Object.defineProperty(exports, "DyNTS_KeysetCursor_ControlService", { enumerable: true, get: function () { return keyset_cursor_control_service_1.DyNTS_KeysetCursor_ControlService; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/pagination/index.ts"],"names":[],"mappings":";;;AAAA,iFAAoF;AAA3E,kJAAA,iCAAiC,OAAA"}
@@ -0,0 +1,21 @@
1
+ import { DyNTS_KeysetCursorSettings_Interface, DyNTS_KeysetCursorValue_Interface } from './_models/keyset-cursor.interface';
2
+ /** Encodes deterministic, namespace-bound keyset positions without carrying caller authority. */
3
+ export declare class DyNTS_KeysetCursor_ControlService {
4
+ static readonly contractVersion: 'dynts-keyset-cursor/1';
5
+ private static readonly absoluteMaxDimensions;
6
+ private static readonly absoluteMaxValueLength;
7
+ private static readonly maxCursorLength;
8
+ private readonly namespace;
9
+ private readonly dimensionCount;
10
+ private readonly maxValueLength;
11
+ /** Creates one codec whose cursors cannot be replayed in another declared namespace. */
12
+ constructor(set: DyNTS_KeysetCursorSettings_Interface);
13
+ /** Encodes an exact non-sensitive sort tuple as canonical unpadded base64url. */
14
+ encode(value: DyNTS_KeysetCursorValue_Interface): string;
15
+ /** Decodes only an exact canonical payload created for this codec namespace and tuple shape. */
16
+ decode(cursor: string): DyNTS_KeysetCursorValue_Interface;
17
+ private isValidPayload;
18
+ private isValidValue;
19
+ private error;
20
+ }
21
+ //# sourceMappingURL=keyset-cursor.control-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyset-cursor.control-service.d.ts","sourceRoot":"","sources":["../../../src/_modules/pagination/keyset-cursor.control-service.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,oCAAoC,EACpC,iCAAiC,EAClC,MAAM,mCAAmC,CAAC;AAM3C,iGAAiG;AACjG,qBAAa,iCAAiC;IAC5C,gBAAuB,eAAe,EAAE,uBAAuB,CAA2B;IAC1F,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,qBAAqB,CAAa;IAC1D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAAe;IAC7D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAgB;IACvD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IACxC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IAExC,wFAAwF;gBAC5E,GAAG,EAAE,oCAAoC;IAuBrD,iFAAiF;IAC1E,MAAM,CAAC,KAAK,EAAE,iCAAiC,GAAG,MAAM;IAmB/D,gGAAgG;IACzF,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,iCAAiC;IAuChE,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,YAAY;IAapB,OAAO,CAAC,KAAK;CASd"}
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DyNTS_KeysetCursor_ControlService = void 0;
4
+ const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
5
+ const global_settings_const_1 = require("../../_collections/global-settings.const");
6
+ const DYNTS_KEYSET_CURSOR_PATTERN = /^[A-Za-z0-9_-]+$/u;
7
+ const DYNTS_KEYSET_CURSOR_NAMESPACE_PATTERN = /^[a-z0-9][a-z0-9._:/-]{0,127}$/u;
8
+ const DYNTS_KEYSET_CURSOR_VALUE_PATTERN = /^[A-Za-z0-9._:-]+$/u;
9
+ /** Encodes deterministic, namespace-bound keyset positions without carrying caller authority. */
10
+ class DyNTS_KeysetCursor_ControlService {
11
+ static contractVersion = 'dynts-keyset-cursor/1';
12
+ static absoluteMaxDimensions = 8;
13
+ static absoluteMaxValueLength = 256;
14
+ static maxCursorLength = 2048;
15
+ namespace;
16
+ dimensionCount;
17
+ maxValueLength;
18
+ /** Creates one codec whose cursors cannot be replayed in another declared namespace. */
19
+ constructor(set) {
20
+ const maxValueLength = set?.maxValueLength
21
+ ?? DyNTS_KeysetCursor_ControlService.absoluteMaxValueLength;
22
+ if (!set
23
+ || typeof set.namespace !== 'string'
24
+ || !DYNTS_KEYSET_CURSOR_NAMESPACE_PATTERN.test(set.namespace)
25
+ || !Number.isSafeInteger(set.dimensionCount)
26
+ || set.dimensionCount < 1
27
+ || set.dimensionCount > DyNTS_KeysetCursor_ControlService.absoluteMaxDimensions
28
+ || !Number.isSafeInteger(maxValueLength)
29
+ || maxValueLength < 1
30
+ || maxValueLength > DyNTS_KeysetCursor_ControlService.absoluteMaxValueLength) {
31
+ throw this.error(500, 'SETTINGS_INVALID', 'The keyset cursor settings are invalid.');
32
+ }
33
+ this.namespace = set.namespace;
34
+ this.dimensionCount = set.dimensionCount;
35
+ this.maxValueLength = maxValueLength;
36
+ }
37
+ /** Encodes an exact non-sensitive sort tuple as canonical unpadded base64url. */
38
+ encode(value) {
39
+ if (!this.isValidValue(value)) {
40
+ throw this.error(500, 'VALUE_INVALID', 'The keyset cursor value is invalid.');
41
+ }
42
+ const payload = {
43
+ contractVersion: DyNTS_KeysetCursor_ControlService.contractVersion,
44
+ namespace: this.namespace,
45
+ values: [...value.values],
46
+ };
47
+ const cursor = Buffer.from(JSON.stringify(payload), 'utf8').toString('base64url');
48
+ if (cursor.length > DyNTS_KeysetCursor_ControlService.maxCursorLength) {
49
+ throw this.error(500, 'VALUE_INVALID', 'The keyset cursor value is invalid.');
50
+ }
51
+ return cursor;
52
+ }
53
+ /** Decodes only an exact canonical payload created for this codec namespace and tuple shape. */
54
+ decode(cursor) {
55
+ try {
56
+ if (typeof cursor !== 'string'
57
+ || cursor.length < 1
58
+ || cursor.length > DyNTS_KeysetCursor_ControlService.maxCursorLength
59
+ || !DYNTS_KEYSET_CURSOR_PATTERN.test(cursor)) {
60
+ throw new Error('Cursor syntax is invalid.');
61
+ }
62
+ const decoded = Buffer.from(cursor, 'base64url');
63
+ if (decoded.toString('base64url') !== cursor) {
64
+ throw new Error('Cursor encoding is not canonical.');
65
+ }
66
+ const payload = JSON.parse(decoded.toString('utf8'));
67
+ if (!this.isValidPayload(payload)) {
68
+ throw new Error('Cursor payload is invalid.');
69
+ }
70
+ const canonicalPayload = {
71
+ contractVersion: DyNTS_KeysetCursor_ControlService.contractVersion,
72
+ namespace: this.namespace,
73
+ values: [...payload.values],
74
+ };
75
+ if (Buffer.from(JSON.stringify(canonicalPayload), 'utf8').toString('base64url') !== cursor) {
76
+ throw new Error('Cursor payload is not canonical.');
77
+ }
78
+ return { values: [...payload.values] };
79
+ }
80
+ catch {
81
+ throw this.error(400, 'CURSOR_INVALID', 'The keyset cursor is invalid.');
82
+ }
83
+ }
84
+ isValidPayload(value) {
85
+ if (typeof value !== 'object' || value === null || Array.isArray(value)) {
86
+ return false;
87
+ }
88
+ const keys = Object.keys(value).sort();
89
+ const values = Reflect.get(value, 'values');
90
+ return keys.join(',') === 'contractVersion,namespace,values'
91
+ && Reflect.get(value, 'contractVersion') === DyNTS_KeysetCursor_ControlService.contractVersion
92
+ && Reflect.get(value, 'namespace') === this.namespace
93
+ && this.isValidValue({ values: Array.isArray(values) ? values : [] });
94
+ }
95
+ isValidValue(value) {
96
+ return typeof value === 'object'
97
+ && value !== null
98
+ && Array.isArray(value.values)
99
+ && value.values.length === this.dimensionCount
100
+ && value.values.every((item) => (typeof item === 'string'
101
+ && item.length >= 1
102
+ && item.length <= this.maxValueLength
103
+ && DYNTS_KEYSET_CURSOR_VALUE_PATTERN.test(item)));
104
+ }
105
+ error(status, suffix, message) {
106
+ return new fsm_dynamo_1.DyFM_Error({
107
+ status: status,
108
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|KEYSET_CURSOR|${suffix}`,
109
+ message: message,
110
+ userMessage: status < 500 ? message : 'The keyset cursor could not be created safely.',
111
+ issuerService: this.constructor.name,
112
+ });
113
+ }
114
+ }
115
+ exports.DyNTS_KeysetCursor_ControlService = DyNTS_KeysetCursor_ControlService;
116
+ //# sourceMappingURL=keyset-cursor.control-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyset-cursor.control-service.js","sourceRoot":"","sources":["../../../src/_modules/pagination/keyset-cursor.control-service.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AAEnD,oFAAiF;AAOjF,MAAM,2BAA2B,GAAW,mBAAmB,CAAC;AAChE,MAAM,qCAAqC,GAAW,iCAAiC,CAAC;AACxF,MAAM,iCAAiC,GAAW,qBAAqB,CAAC;AAExE,iGAAiG;AACjG,MAAa,iCAAiC;IACrC,MAAM,CAAU,eAAe,GAA4B,uBAAuB,CAAC;IAClF,MAAM,CAAU,qBAAqB,GAAW,CAAC,CAAC;IAClD,MAAM,CAAU,sBAAsB,GAAW,GAAG,CAAC;IACrD,MAAM,CAAU,eAAe,GAAW,IAAI,CAAC;IACtC,SAAS,CAAS;IAClB,cAAc,CAAS;IACvB,cAAc,CAAS;IAExC,wFAAwF;IACxF,YAAY,GAAyC;QACnD,MAAM,cAAc,GAAW,GAAG,EAAE,cAAc;eAC7C,iCAAiC,CAAC,sBAAsB,CAAC;QAE9D,IACE,CAAC,GAAG;eACD,OAAO,GAAG,CAAC,SAAS,KAAK,QAAQ;eACjC,CAAC,qCAAqC,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;eAC1D,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,cAAc,CAAC;eACzC,GAAG,CAAC,cAAc,GAAG,CAAC;eACtB,GAAG,CAAC,cAAc,GAAG,iCAAiC,CAAC,qBAAqB;eAC5E,CAAC,MAAM,CAAC,aAAa,CAAC,cAAc,CAAC;eACrC,cAAc,GAAG,CAAC;eAClB,cAAc,GAAG,iCAAiC,CAAC,sBAAsB,EAC5E,CAAC;YACD,MAAM,IAAI,C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EAAE,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,gDAAgD;YACtF,aAAa,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;SACrC,CAAC,CAAC;IACL,CAAC;;AAhIH,8EAiIC"}
@@ -0,0 +1,6 @@
1
+ /** Content-free storage ordering tuple carried by the versioned opaque request-list cursor. */
2
+ export interface DyNTS_PrivacyRequestCursorValue_Interface {
3
+ createdAt: string;
4
+ requestId: string;
5
+ }
6
+ //# sourceMappingURL=privacy-request-cursor-value.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"privacy-request-cursor-value.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/privacy-lifecycle/_models/privacy-request-cursor-value.interface.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,WAAW,yCAAyC;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=privacy-request-cursor-value.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"privacy-request-cursor-value.interface.js","sourceRoot":"","sources":["../../../../src/_modules/privacy-lifecycle/_models/privacy-request-cursor-value.interface.ts"],"names":[],"mappings":""}
@@ -1,4 +1,5 @@
1
1
  export { DyNTS_PrivacyLifecycle_ControlService } from './privacy-lifecycle.control-service';
2
+ export { DyNTS_PrivacyRequestCursor_ControlService } from './privacy-request-cursor.control-service';
2
3
  export { DyNTS_PrivacyLedger_ControlService } from './privacy-ledger.control-service';
3
4
  export { DyNTS_PrivacyExportArtifact_ControlService } from './privacy-export-artifact.control-service';
4
5
  export { DyNTS_PrivacyExportArtifact_MongoStore } from './privacy-export-artifact.mongo-store';
@@ -30,6 +31,7 @@ export { DyNTS_PrivacyRequestCreateResult_Interface } from './_models/privacy-re
30
31
  export { DyNTS_PrivacyRequestOpen_Interface } from './_models/privacy-request-open.interface';
31
32
  export { DyNTS_PrivacyRequestPersistenceCreateResult_Interface } from './_models/privacy-request-persistence-create-result.interface';
32
33
  export { DyNTS_PrivacyRequestRecord_Interface } from './_models/privacy-request-record.interface';
34
+ export { DyNTS_PrivacyRequestCursorValue_Interface } from './_models/privacy-request-cursor-value.interface';
33
35
  export { DyNTS_PrivacyRequestList_Interface, DyNTS_PrivacyRequestListQuery_Interface } from './_models/privacy-request-list.interface';
34
36
  export { DyNTS_PrivacyRequestListResult_Interface, DyNTS_PrivacyRequestPersistenceListResult_Interface } from './_models/privacy-request-list-result.interface';
35
37
  export { DyNTS_PrivacyRequestResult_Interface } from './_models/privacy-request-result.interface';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/_modules/privacy-lifecycle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qCAAqC,EAAE,MAAM,qCAAqC,CAAC;AAC5F,OAAO,EAAE,kCAAkC,EAAE,MAAM,kCAAkC,CAAC;AACtF,OAAO,EAAE,0CAA0C,EAAE,MAAM,2CAA2C,CAAC;AACvG,OAAO,EAAE,sCAAsC,EAAE,MAAM,uCAAuC,CAAC;AAC/F,OAAO,EAAE,iCAAiC,EAAE,MAAM,6CAA6C,CAAC;AAChG,OAAO,EAAE,mCAAmC,EAAE,MAAM,+CAA+C,CAAC;AACpG,OAAO,EAAE,oCAAoC,EAAE,MAAM,gDAAgD,CAAC;AACtG,OAAO,EAAE,8BAA8B,EAAE,MAAM,0CAA0C,CAAC;AAC1F,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,yCAAyC,EAAE,MAAM,iDAAiD,CAAC;AAC5G,OAAO,EAAE,yCAAyC,EAAE,MAAM,iDAAiD,CAAC;AAC5G,OAAO,EAAE,sCAAsC,EAAE,MAAM,8CAA8C,CAAC;AACtG,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;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EAC/C,2CAA2C,EAC3C,2CAA2C,EAC3C,0CAA0C,EAC1C,yCAAyC,EACzC,0CAA0C,EAC3C,MAAM,6CAA6C,CAAC"}
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DyNTS_PrivacyRequest_Type = exports.DyNTS_PrivacyRequestState_Type = exports.DyNTS_PrivacyContributorOutcome_Type = exports.DyNTS_PrivacyContributorAction_Type = exports.DyNTS_PrivacyConsentDecision_Type = exports.DyNTS_PrivacyExportArtifact_MongoStore = exports.DyNTS_PrivacyExportArtifact_ControlService = exports.DyNTS_PrivacyLedger_ControlService = exports.DyNTS_PrivacyLifecycle_ControlService = void 0;
3
+ exports.DyNTS_PrivacyRequest_Type = exports.DyNTS_PrivacyRequestState_Type = exports.DyNTS_PrivacyContributorOutcome_Type = exports.DyNTS_PrivacyContributorAction_Type = exports.DyNTS_PrivacyConsentDecision_Type = exports.DyNTS_PrivacyExportArtifact_MongoStore = exports.DyNTS_PrivacyExportArtifact_ControlService = exports.DyNTS_PrivacyLedger_ControlService = exports.DyNTS_PrivacyRequestCursor_ControlService = exports.DyNTS_PrivacyLifecycle_ControlService = void 0;
4
4
  var privacy_lifecycle_control_service_1 = require("./privacy-lifecycle.control-service");
5
5
  Object.defineProperty(exports, "DyNTS_PrivacyLifecycle_ControlService", { enumerable: true, get: function () { return privacy_lifecycle_control_service_1.DyNTS_PrivacyLifecycle_ControlService; } });
6
+ var privacy_request_cursor_control_service_1 = require("./privacy-request-cursor.control-service");
7
+ Object.defineProperty(exports, "DyNTS_PrivacyRequestCursor_ControlService", { enumerable: true, get: function () { return privacy_request_cursor_control_service_1.DyNTS_PrivacyRequestCursor_ControlService; } });
6
8
  var privacy_ledger_control_service_1 = require("./privacy-ledger.control-service");
7
9
  Object.defineProperty(exports, "DyNTS_PrivacyLedger_ControlService", { enumerable: true, get: function () { return privacy_ledger_control_service_1.DyNTS_PrivacyLedger_ControlService; } });
8
10
  var privacy_export_artifact_control_service_1 = require("./privacy-export-artifact.control-service");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/privacy-lifecycle/index.ts"],"names":[],"mappings":";;;AAAA,yFAA4F;AAAnF,0JAAA,qCAAqC,OAAA;AAC9C,mFAAsF;AAA7E,oJAAA,kCAAkC,OAAA;AAC3C,qGAAuG;AAA9F,qKAAA,0CAA0C,OAAA;AACnD,6FAA+F;AAAtF,6JAAA,sCAAsC,OAAA;AAC/C,kGAAgG;AAAvF,uJAAA,iCAAiC,OAAA;AAC1C,sGAAoG;AAA3F,2JAAA,mCAAmC,OAAA;AAC5C,wGAAsG;AAA7F,6JAAA,oCAAoC,OAAA;AAC7C,4FAA0F;AAAjF,iJAAA,8BAA8B,OAAA;AACvC,gFAA+E;AAAtE,sIAAA,yBAAyB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/privacy-lifecycle/index.ts"],"names":[],"mappings":";;;AAAA,yFAA4F;AAAnF,0JAAA,qCAAqC,OAAA;AAC9C,mGAAqG;AAA5F,mKAAA,yCAAyC,OAAA;AAClD,mFAAsF;AAA7E,oJAAA,kCAAkC,OAAA;AAC3C,qGAAuG;AAA9F,qKAAA,0CAA0C,OAAA;AACnD,6FAA+F;AAAtF,6JAAA,sCAAsC,OAAA;AAC/C,kGAAgG;AAAvF,uJAAA,iCAAiC,OAAA;AAC1C,sGAAoG;AAA3F,2JAAA,mCAAmC,OAAA;AAC5C,wGAAsG;AAA7F,6JAAA,oCAAoC,OAAA;AAC7C,4FAA0F;AAAjF,iJAAA,8BAA8B,OAAA;AACvC,gFAA+E;AAAtE,sIAAA,yBAAyB,OAAA"}
@@ -0,0 +1,13 @@
1
+ import { DyNTS_PrivacyRequestCursorValue_Interface } from './_models/privacy-request-cursor-value.interface';
2
+ /** Encodes and strictly decodes content-free privacy request storage cursors. */
3
+ export declare class DyNTS_PrivacyRequestCursor_ControlService {
4
+ /** Encodes one canonical UTC ordering tuple as an unpadded base64url cursor. */
5
+ encode(value: DyNTS_PrivacyRequestCursorValue_Interface): string;
6
+ /** Decodes one canonical cursor and rejects malformed, expanded or non-content-free payloads. */
7
+ decode(cursor: string): DyNTS_PrivacyRequestCursorValue_Interface;
8
+ private isValidPayload;
9
+ private isValidValue;
10
+ private isCanonicalDate;
11
+ private error;
12
+ }
13
+ //# sourceMappingURL=privacy-request-cursor.control-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"privacy-request-cursor.control-service.d.ts","sourceRoot":"","sources":["../../../src/_modules/privacy-lifecycle/privacy-request-cursor.control-service.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,yCAAyC,EAC1C,MAAM,kDAAkD,CAAC;AAW1D,iFAAiF;AACjF,qBAAa,yCAAyC;IACpD,gFAAgF;IACzE,MAAM,CAAC,KAAK,EAAE,yCAAyC,GAAG,MAAM;IAcvE,iGAAiG;IAC1F,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,yCAAyC;IAgCxE,OAAO,CAAC,cAAc;IAgBtB,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,KAAK;CASd"}
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DyNTS_PrivacyRequestCursor_ControlService = void 0;
4
+ const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
5
+ const global_settings_const_1 = require("../../_collections/global-settings.const");
6
+ const DYNTS_PRIVACY_CURSOR_CONTRACT = 'dynts-privacy-request-cursor/1';
7
+ const DYNTS_PRIVACY_CURSOR_PATTERN = /^[A-Za-z0-9_-]+$/u;
8
+ const DYNTS_PRIVACY_REQUEST_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u;
9
+ /** Encodes and strictly decodes content-free privacy request storage cursors. */
10
+ class DyNTS_PrivacyRequestCursor_ControlService {
11
+ /** Encodes one canonical UTC ordering tuple as an unpadded base64url cursor. */
12
+ encode(value) {
13
+ if (!this.isValidValue(value)) {
14
+ throw this.error(500, 'CURSOR_VALUE_INVALID', 'The privacy request cursor value is invalid.');
15
+ }
16
+ const payload = {
17
+ contractVersion: DYNTS_PRIVACY_CURSOR_CONTRACT,
18
+ createdAt: value.createdAt,
19
+ requestId: value.requestId,
20
+ };
21
+ return Buffer.from(JSON.stringify(payload), 'utf8').toString('base64url');
22
+ }
23
+ /** Decodes one canonical cursor and rejects malformed, expanded or non-content-free payloads. */
24
+ decode(cursor) {
25
+ try {
26
+ if (typeof cursor !== 'string'
27
+ || cursor.length < 1
28
+ || cursor.length > 2048
29
+ || !DYNTS_PRIVACY_CURSOR_PATTERN.test(cursor)) {
30
+ throw new Error('Cursor syntax is invalid.');
31
+ }
32
+ const decoded = Buffer.from(cursor, 'base64url');
33
+ if (decoded.toString('base64url') !== cursor) {
34
+ throw new Error('Cursor encoding is not canonical.');
35
+ }
36
+ const payload = JSON.parse(decoded.toString('utf8'));
37
+ if (!this.isValidPayload(payload)) {
38
+ throw new Error('Cursor payload is invalid.');
39
+ }
40
+ return {
41
+ createdAt: Reflect.get(payload, 'createdAt'),
42
+ requestId: Reflect.get(payload, 'requestId'),
43
+ };
44
+ }
45
+ catch {
46
+ throw this.error(400, 'CURSOR_INVALID', 'The privacy request cursor is invalid.');
47
+ }
48
+ }
49
+ isValidPayload(value) {
50
+ if (typeof value !== 'object' || value === null || Array.isArray(value)) {
51
+ return false;
52
+ }
53
+ const keys = Object.keys(value).sort();
54
+ const cursorValue = {
55
+ createdAt: Reflect.get(value, 'createdAt'),
56
+ requestId: Reflect.get(value, 'requestId'),
57
+ };
58
+ return keys.join(',') === 'contractVersion,createdAt,requestId'
59
+ && Reflect.get(value, 'contractVersion') === DYNTS_PRIVACY_CURSOR_CONTRACT
60
+ && this.isValidValue(cursorValue);
61
+ }
62
+ isValidValue(value) {
63
+ return typeof value?.createdAt === 'string'
64
+ && this.isCanonicalDate(value.createdAt)
65
+ && typeof value.requestId === 'string'
66
+ && DYNTS_PRIVACY_REQUEST_ID_PATTERN.test(value.requestId);
67
+ }
68
+ isCanonicalDate(value) {
69
+ const timestamp = Date.parse(value);
70
+ return Number.isFinite(timestamp) && new Date(timestamp).toISOString() === value;
71
+ }
72
+ error(status, suffix, message) {
73
+ return new fsm_dynamo_1.DyFM_Error({
74
+ status: status,
75
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|PRIVACY_CURSOR|${suffix}`,
76
+ message: message,
77
+ userMessage: status < 500 ? message : 'The privacy request cursor could not be created safely.',
78
+ issuerService: this.constructor.name,
79
+ });
80
+ }
81
+ }
82
+ exports.DyNTS_PrivacyRequestCursor_ControlService = DyNTS_PrivacyRequestCursor_ControlService;
83
+ //# sourceMappingURL=privacy-request-cursor.control-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"privacy-request-cursor.control-service.js","sourceRoot":"","sources":["../../../src/_modules/privacy-lifecycle/privacy-request-cursor.control-service.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AAEnD,oFAAiF;AAKjF,MAAM,6BAA6B,GAAW,gCAAgC,CAAC;AAC/E,MAAM,4BAA4B,GAAW,mBAAmB,CAAC;AACjE,MAAM,gCAAgC,GACpC,wEAAwE,CAAC;AAM3E,iFAAiF;AACjF,MAAa,yCAAyC;IACpD,gFAAgF;IACzE,MAAM,CAAC,KAAgD;QAC5D,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;YAC9B,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,sBAAsB,EAAE,8CAA8C,CAAC,CAAC;QAChG,CAAC;QAED,MAAM,OAAO,GAAgD;YAC3D,eAAe,EAAE,6BAA6B;YAC9C,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,SAAS,EAAE,KAAK,CAAC,SAAS;SAC3B,CAAC;QAEF,OAAO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AAW,EAAE,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,yDAAyD;YAC/F,aAAa,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;SACrC,CAAC,CAAC;IACL,CAAC;CACF;AAvFD,8FAuFC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@futdevpro/nts-dynamo",
3
- "version": "01.15.168",
3
+ "version": "01.15.173",
4
4
  "description": "Dynamic NodeTS (NodeJS-Typescript), MongoDB Backend System Framework by Future Development Program Ltd.",
5
5
  "DyBu_settings": {
6
6
  "packageType": "server-package",
@@ -231,6 +231,12 @@
231
231
  "types": "./build/_modules/privacy-lifecycle/index.d.ts",
232
232
  "typings": "./build/_modules/privacy-lifecycle/index.d.ts"
233
233
  },
234
+ "./pagination": {
235
+ "default": "./build/_modules/pagination/index.js",
236
+ "module": "./build/_modules/pagination/index.js",
237
+ "types": "./build/_modules/pagination/index.d.ts",
238
+ "typings": "./build/_modules/pagination/index.d.ts"
239
+ },
234
240
  "./artifact-compiler": {
235
241
  "default": "./build/_modules/artifact-compiler/index.js",
236
242
  "module": "./build/_modules/artifact-compiler/index.js",
@@ -369,6 +375,9 @@
369
375
  "privacy-lifecycle": [
370
376
  "build/_modules/privacy-lifecycle/index.d.ts"
371
377
  ],
378
+ "pagination": [
379
+ "build/_modules/pagination/index.d.ts"
380
+ ],
372
381
  "artifact-compiler": [
373
382
  "build/_modules/artifact-compiler/index.d.ts"
374
383
  ],