@futdevpro/nts-dynamo 1.15.264 → 1.15.266
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 +22 -0
- package/build/_modules/application-alert-delivery/_enums/application-alert-delivery-state.type-enum.d.ts +21 -0
- package/build/_modules/application-alert-delivery/_enums/application-alert-delivery-state.type-enum.d.ts.map +1 -0
- package/build/_modules/application-alert-delivery/_enums/application-alert-delivery-state.type-enum.js +27 -0
- package/build/_modules/application-alert-delivery/_enums/application-alert-delivery-state.type-enum.js.map +1 -0
- package/build/_modules/application-alert-delivery/_models/application-alert-delivery.interface.d.ts +104 -0
- package/build/_modules/application-alert-delivery/_models/application-alert-delivery.interface.d.ts.map +1 -0
- package/build/_modules/application-alert-delivery/_models/application-alert-delivery.interface.js +3 -0
- package/build/_modules/application-alert-delivery/_models/application-alert-delivery.interface.js.map +1 -0
- package/build/_modules/application-alert-delivery/application-alert-delivery.control-service.d.ts +12 -0
- package/build/_modules/application-alert-delivery/application-alert-delivery.control-service.d.ts.map +1 -0
- package/build/_modules/application-alert-delivery/application-alert-delivery.control-service.js +52 -0
- package/build/_modules/application-alert-delivery/application-alert-delivery.control-service.js.map +1 -0
- package/build/_modules/application-alert-delivery/application-alert-delivery.mongo-store.d.ts +49 -0
- package/build/_modules/application-alert-delivery/application-alert-delivery.mongo-store.d.ts.map +1 -0
- package/build/_modules/application-alert-delivery/application-alert-delivery.mongo-store.js +702 -0
- package/build/_modules/application-alert-delivery/application-alert-delivery.mongo-store.js.map +1 -0
- package/build/_modules/application-alert-delivery/index.d.ts +5 -0
- package/build/_modules/application-alert-delivery/index.d.ts.map +1 -0
- package/build/_modules/application-alert-delivery/index.js +8 -0
- package/build/_modules/application-alert-delivery/index.js.map +1 -0
- package/build/_modules/lifecycle-cleanup/_enums/lifecycle-cleanup-state.type-enum.d.ts +14 -0
- package/build/_modules/lifecycle-cleanup/_enums/lifecycle-cleanup-state.type-enum.d.ts.map +1 -0
- package/build/_modules/lifecycle-cleanup/_enums/lifecycle-cleanup-state.type-enum.js +19 -0
- package/build/_modules/lifecycle-cleanup/_enums/lifecycle-cleanup-state.type-enum.js.map +1 -0
- package/build/_modules/lifecycle-cleanup/_models/lifecycle-cleanup-mongo-store-settings.interface.d.ts +8 -0
- package/build/_modules/lifecycle-cleanup/_models/lifecycle-cleanup-mongo-store-settings.interface.d.ts.map +1 -0
- package/build/_modules/lifecycle-cleanup/_models/lifecycle-cleanup-mongo-store-settings.interface.js +3 -0
- package/build/_modules/lifecycle-cleanup/_models/lifecycle-cleanup-mongo-store-settings.interface.js.map +1 -0
- package/build/_modules/lifecycle-cleanup/_models/lifecycle-cleanup-settings.interface.d.ts +11 -0
- package/build/_modules/lifecycle-cleanup/_models/lifecycle-cleanup-settings.interface.d.ts.map +1 -0
- package/build/_modules/lifecycle-cleanup/_models/lifecycle-cleanup-settings.interface.js +3 -0
- package/build/_modules/lifecycle-cleanup/_models/lifecycle-cleanup-settings.interface.js.map +1 -0
- package/build/_modules/lifecycle-cleanup/_models/lifecycle-cleanup.interface.d.ts +118 -0
- package/build/_modules/lifecycle-cleanup/_models/lifecycle-cleanup.interface.d.ts.map +1 -0
- package/build/_modules/lifecycle-cleanup/_models/lifecycle-cleanup.interface.js +3 -0
- package/build/_modules/lifecycle-cleanup/_models/lifecycle-cleanup.interface.js.map +1 -0
- package/build/_modules/lifecycle-cleanup/index.d.ts +7 -0
- package/build/_modules/lifecycle-cleanup/index.d.ts.map +1 -0
- package/build/_modules/lifecycle-cleanup/index.js +10 -0
- package/build/_modules/lifecycle-cleanup/index.js.map +1 -0
- package/build/_modules/lifecycle-cleanup/lifecycle-cleanup.control-service.d.ts +32 -0
- package/build/_modules/lifecycle-cleanup/lifecycle-cleanup.control-service.d.ts.map +1 -0
- package/build/_modules/lifecycle-cleanup/lifecycle-cleanup.control-service.js +246 -0
- package/build/_modules/lifecycle-cleanup/lifecycle-cleanup.control-service.js.map +1 -0
- package/build/_modules/lifecycle-cleanup/lifecycle-cleanup.mongo-store.d.ts +36 -0
- package/build/_modules/lifecycle-cleanup/lifecycle-cleanup.mongo-store.d.ts.map +1 -0
- package/build/_modules/lifecycle-cleanup/lifecycle-cleanup.mongo-store.js +410 -0
- package/build/_modules/lifecycle-cleanup/lifecycle-cleanup.mongo-store.js.map +1 -0
- package/build/_modules/media-gen/_models/meshy-settings.interface.d.ts +19 -0
- package/build/_modules/media-gen/_models/meshy-settings.interface.d.ts.map +1 -0
- package/build/_modules/media-gen/_models/meshy-settings.interface.js +3 -0
- package/build/_modules/media-gen/_models/meshy-settings.interface.js.map +1 -0
- package/build/_modules/media-gen/_services/meshy-image-to-3d.control-service.d.ts +49 -0
- package/build/_modules/media-gen/_services/meshy-image-to-3d.control-service.d.ts.map +1 -0
- package/build/_modules/media-gen/_services/meshy-image-to-3d.control-service.js +173 -0
- package/build/_modules/media-gen/_services/meshy-image-to-3d.control-service.js.map +1 -0
- package/build/_modules/media-gen/index.d.ts +2 -0
- package/build/_modules/media-gen/index.d.ts.map +1 -1
- package/build/_modules/media-gen/index.js +2 -0
- package/build/_modules/media-gen/index.js.map +1 -1
- package/package.json +21 -3
package/README.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Dynamo-NTS
|
|
2
2
|
|
|
3
|
+
The additive `@futdevpro/nts-dynamo/application-alert-delivery` subpath provides an explicitly invoked, durable,
|
|
4
|
+
content-free application-alert sender outbox with idempotency, bounded retry/backoff, leases, fencing and terminal
|
|
5
|
+
delivery evidence. Its aggregate operations projection exposes only state/due/expired-lease counts and timestamps.
|
|
6
|
+
It starts no timer, poller or background worker.
|
|
7
|
+
|
|
3
8
|

|
|
4
9
|
|
|
5
10
|
**Dynamo-NTS** (NodeTS) is a comprehensive backend framework for building robust, secure, and scalable Node.js applications with TypeScript. Built on top of [Dynamo FSM](https://www.npmjs.com/package/@futdevpro/fsm-dynamo) (`@futdevpro/fsm-dynamo`), it provides a structured approach to server-side development with clear separation of concerns, extensive configuration options, and production-ready implementations for common backend tasks.
|
|
@@ -358,6 +363,23 @@ The cursor is an integrity and routing boundary, not encryption. Consumers must
|
|
|
358
363
|
values such as canonical timestamps and opaque resource identifiers into the tuple. Tenant, account, email,
|
|
359
364
|
authorization or business-content fields must remain server-derived and outside the cursor payload.
|
|
360
365
|
|
|
366
|
+
### Explicit lifecycle cleanup
|
|
367
|
+
|
|
368
|
+
The optional `@futdevpro/nts-dynamo/lifecycle-cleanup` entry point coordinates resumable product cleanup without
|
|
369
|
+
learning product collection names or retention policy. Consumers supply opaque scope/root hashes, one immutable
|
|
370
|
+
ordered stage plan and one database-only adapter per stage. Each explicit invocation runs at most one bounded
|
|
371
|
+
batch; the module never starts a timer, polling loop, scheduler or network callback.
|
|
372
|
+
|
|
373
|
+
Schedule the cleanup gate in the same caller-owned Mongo transaction as the product soft delete, and cancel it in
|
|
374
|
+
the same transaction as an allowed restore. Due work uses Mongo server time, a bounded lease and a monotonic
|
|
375
|
+
fencing token. Product mutations and progress commit share one `ClientSession`, so they commit or roll back
|
|
376
|
+
together. An expired or replaced worker cannot commit, incomplete stages resume without advancing, and parents
|
|
377
|
+
cannot run before every earlier product-defined stage is complete.
|
|
378
|
+
|
|
379
|
+
The shared store retains only opaque hashes, plan identity, aggregate counts, timestamps and result checksums.
|
|
380
|
+
Products remain responsible for exact tenant authorization, retention durations, stage meanings, deterministic
|
|
381
|
+
selection/delete predicates, operational invocation, legal review and end-to-end deletion verification.
|
|
382
|
+
|
|
361
383
|
### Privacy lifecycle
|
|
362
384
|
|
|
363
385
|
The optional `@futdevpro/nts-dynamo/privacy-lifecycle` entry point provides the shared machinery for standalone
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Durable sender states for one content-free application-alert delivery. */
|
|
2
|
+
export declare enum DyNTS_ApplicationAlertDeliveryState_Type {
|
|
3
|
+
pending = "pending",
|
|
4
|
+
dispatching = "dispatching",
|
|
5
|
+
retryWaiting = "retry-waiting",
|
|
6
|
+
succeeded = "succeeded",
|
|
7
|
+
failed = "failed"
|
|
8
|
+
}
|
|
9
|
+
/** Closed transport outcomes returned by an application-alert delivery adapter. */
|
|
10
|
+
export declare enum DyNTS_ApplicationAlertSubmissionOutcome_Type {
|
|
11
|
+
accepted = "accepted",
|
|
12
|
+
retryableFailure = "retryable-failure",
|
|
13
|
+
terminalFailure = "terminal-failure"
|
|
14
|
+
}
|
|
15
|
+
/** Result of one explicitly invoked sender cycle; no timer or polling is implied. */
|
|
16
|
+
export declare enum DyNTS_ApplicationAlertInvocationCode_Type {
|
|
17
|
+
noReadyDelivery = "no-ready-delivery",
|
|
18
|
+
deliveryClaimed = "delivery-claimed",
|
|
19
|
+
terminalFailureRecorded = "terminal-failure-recorded"
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=application-alert-delivery-state.type-enum.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-alert-delivery-state.type-enum.d.ts","sourceRoot":"","sources":["../../../../src/_modules/application-alert-delivery/_enums/application-alert-delivery-state.type-enum.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,oBAAY,wCAAwC;IAClD,OAAO,YAAY;IACnB,WAAW,gBAAgB;IAC3B,YAAY,kBAAkB;IAC9B,SAAS,cAAc;IACvB,MAAM,WAAW;CAClB;AAED,mFAAmF;AACnF,oBAAY,4CAA4C;IACtD,QAAQ,aAAa;IACrB,gBAAgB,sBAAsB;IACtC,eAAe,qBAAqB;CACrC;AAED,qFAAqF;AACrF,oBAAY,yCAAyC;IACnD,eAAe,sBAAsB;IACrC,eAAe,qBAAqB;IACpC,uBAAuB,8BAA8B;CACtD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DyNTS_ApplicationAlertInvocationCode_Type = exports.DyNTS_ApplicationAlertSubmissionOutcome_Type = exports.DyNTS_ApplicationAlertDeliveryState_Type = void 0;
|
|
4
|
+
/** Durable sender states for one content-free application-alert delivery. */
|
|
5
|
+
var DyNTS_ApplicationAlertDeliveryState_Type;
|
|
6
|
+
(function (DyNTS_ApplicationAlertDeliveryState_Type) {
|
|
7
|
+
DyNTS_ApplicationAlertDeliveryState_Type["pending"] = "pending";
|
|
8
|
+
DyNTS_ApplicationAlertDeliveryState_Type["dispatching"] = "dispatching";
|
|
9
|
+
DyNTS_ApplicationAlertDeliveryState_Type["retryWaiting"] = "retry-waiting";
|
|
10
|
+
DyNTS_ApplicationAlertDeliveryState_Type["succeeded"] = "succeeded";
|
|
11
|
+
DyNTS_ApplicationAlertDeliveryState_Type["failed"] = "failed";
|
|
12
|
+
})(DyNTS_ApplicationAlertDeliveryState_Type || (exports.DyNTS_ApplicationAlertDeliveryState_Type = DyNTS_ApplicationAlertDeliveryState_Type = {}));
|
|
13
|
+
/** Closed transport outcomes returned by an application-alert delivery adapter. */
|
|
14
|
+
var DyNTS_ApplicationAlertSubmissionOutcome_Type;
|
|
15
|
+
(function (DyNTS_ApplicationAlertSubmissionOutcome_Type) {
|
|
16
|
+
DyNTS_ApplicationAlertSubmissionOutcome_Type["accepted"] = "accepted";
|
|
17
|
+
DyNTS_ApplicationAlertSubmissionOutcome_Type["retryableFailure"] = "retryable-failure";
|
|
18
|
+
DyNTS_ApplicationAlertSubmissionOutcome_Type["terminalFailure"] = "terminal-failure";
|
|
19
|
+
})(DyNTS_ApplicationAlertSubmissionOutcome_Type || (exports.DyNTS_ApplicationAlertSubmissionOutcome_Type = DyNTS_ApplicationAlertSubmissionOutcome_Type = {}));
|
|
20
|
+
/** Result of one explicitly invoked sender cycle; no timer or polling is implied. */
|
|
21
|
+
var DyNTS_ApplicationAlertInvocationCode_Type;
|
|
22
|
+
(function (DyNTS_ApplicationAlertInvocationCode_Type) {
|
|
23
|
+
DyNTS_ApplicationAlertInvocationCode_Type["noReadyDelivery"] = "no-ready-delivery";
|
|
24
|
+
DyNTS_ApplicationAlertInvocationCode_Type["deliveryClaimed"] = "delivery-claimed";
|
|
25
|
+
DyNTS_ApplicationAlertInvocationCode_Type["terminalFailureRecorded"] = "terminal-failure-recorded";
|
|
26
|
+
})(DyNTS_ApplicationAlertInvocationCode_Type || (exports.DyNTS_ApplicationAlertInvocationCode_Type = DyNTS_ApplicationAlertInvocationCode_Type = {}));
|
|
27
|
+
//# sourceMappingURL=application-alert-delivery-state.type-enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-alert-delivery-state.type-enum.js","sourceRoot":"","sources":["../../../../src/_modules/application-alert-delivery/_enums/application-alert-delivery-state.type-enum.ts"],"names":[],"mappings":";;;AAAA,6EAA6E;AAC7E,IAAY,wCAMX;AAND,WAAY,wCAAwC;IAClD,+DAAmB,CAAA;IACnB,uEAA2B,CAAA;IAC3B,0EAA8B,CAAA;IAC9B,mEAAuB,CAAA;IACvB,6DAAiB,CAAA;AACnB,CAAC,EANW,wCAAwC,wDAAxC,wCAAwC,QAMnD;AAED,mFAAmF;AACnF,IAAY,4CAIX;AAJD,WAAY,4CAA4C;IACtD,qEAAqB,CAAA;IACrB,sFAAsC,CAAA;IACtC,oFAAoC,CAAA;AACtC,CAAC,EAJW,4CAA4C,4DAA5C,4CAA4C,QAIvD;AAED,qFAAqF;AACrF,IAAY,yCAIX;AAJD,WAAY,yCAAyC;IACnD,kFAAqC,CAAA;IACrC,iFAAoC,CAAA;IACpC,kGAAqD,CAAA;AACvD,CAAC,EAJW,yCAAyC,yDAAzC,yCAAyC,QAIpD"}
|
package/build/_modules/application-alert-delivery/_models/application-alert-delivery.interface.d.ts
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Connection } from 'mongoose';
|
|
2
|
+
import { DyFM_ApplicationAlertEnvelope_Interface } from '@futdevpro/fsm-dynamo/application-alert';
|
|
3
|
+
import { DyNTS_ApplicationAlertDeliveryState_Type, DyNTS_ApplicationAlertInvocationCode_Type, DyNTS_ApplicationAlertSubmissionOutcome_Type } from '../_enums/application-alert-delivery-state.type-enum';
|
|
4
|
+
/** Strict durable record. Raw claim tokens, transport errors and arbitrary provider data are forbidden. */
|
|
5
|
+
export interface DyNTS_ApplicationAlertDeliveryRecord_Interface {
|
|
6
|
+
_id: string;
|
|
7
|
+
readonly contractVersion: 'dynts-application-alert-delivery/1';
|
|
8
|
+
readonly sourceSystem: string;
|
|
9
|
+
readonly idempotencyKey: string;
|
|
10
|
+
readonly payloadChecksum: string;
|
|
11
|
+
readonly envelope: DyFM_ApplicationAlertEnvelope_Interface;
|
|
12
|
+
readonly state: DyNTS_ApplicationAlertDeliveryState_Type;
|
|
13
|
+
readonly attemptCount: number;
|
|
14
|
+
readonly fencingToken: number;
|
|
15
|
+
readonly claimTokenHash: string;
|
|
16
|
+
readonly claimedAt: Date;
|
|
17
|
+
readonly leaseExpiresAt: Date;
|
|
18
|
+
readonly nextAttemptAt: Date;
|
|
19
|
+
readonly lastOutcome: '' | DyNTS_ApplicationAlertSubmissionOutcome_Type;
|
|
20
|
+
readonly lastResultCode: string;
|
|
21
|
+
readonly deliveryReference: string;
|
|
22
|
+
readonly createdAt: Date;
|
|
23
|
+
readonly updatedAt: Date;
|
|
24
|
+
readonly completedAt: Date;
|
|
25
|
+
readonly expiresAt: Date;
|
|
26
|
+
}
|
|
27
|
+
/** Content-free durable delivery projection. */
|
|
28
|
+
export interface DyNTS_ApplicationAlertDeliveryView_Interface {
|
|
29
|
+
readonly contractVersion: 'dynts-application-alert-delivery-view/1';
|
|
30
|
+
readonly sourceSystem: string;
|
|
31
|
+
readonly idempotencyKey: string;
|
|
32
|
+
readonly payloadChecksum: string;
|
|
33
|
+
readonly state: DyNTS_ApplicationAlertDeliveryState_Type;
|
|
34
|
+
readonly attemptCount: number;
|
|
35
|
+
readonly fencingToken: number;
|
|
36
|
+
readonly lastOutcome: '' | DyNTS_ApplicationAlertSubmissionOutcome_Type;
|
|
37
|
+
readonly lastResultCode: string;
|
|
38
|
+
readonly deliveryReference: string;
|
|
39
|
+
readonly createdAt: string;
|
|
40
|
+
readonly updatedAt: string;
|
|
41
|
+
readonly completedAt: string;
|
|
42
|
+
readonly changed: boolean;
|
|
43
|
+
}
|
|
44
|
+
/** Aggregate content-free sender health projection; it never exposes envelopes or receiver payloads. */
|
|
45
|
+
export interface DyNTS_ApplicationAlertOperations_Interface {
|
|
46
|
+
readonly contractVersion: 'dynts-application-alert-operations/1';
|
|
47
|
+
readonly sourceSystem: string;
|
|
48
|
+
readonly pendingCount: number;
|
|
49
|
+
readonly dispatchingCount: number;
|
|
50
|
+
readonly retryWaitingCount: number;
|
|
51
|
+
readonly succeededCount: number;
|
|
52
|
+
readonly failedCount: number;
|
|
53
|
+
readonly dueCount: number;
|
|
54
|
+
readonly expiredLeaseCount: number;
|
|
55
|
+
readonly oldestOpenAt: string;
|
|
56
|
+
readonly observedAt: string;
|
|
57
|
+
}
|
|
58
|
+
/** Exclusive delivery claim; the raw token is returned only to the winning invocation. */
|
|
59
|
+
export interface DyNTS_ApplicationAlertClaim_Interface {
|
|
60
|
+
readonly contractVersion: 'dynts-application-alert-claim/1';
|
|
61
|
+
readonly code: DyNTS_ApplicationAlertInvocationCode_Type;
|
|
62
|
+
readonly claimed: boolean;
|
|
63
|
+
readonly claimToken: string;
|
|
64
|
+
readonly fencingToken: number;
|
|
65
|
+
readonly envelope?: DyFM_ApplicationAlertEnvelope_Interface;
|
|
66
|
+
readonly delivery?: DyNTS_ApplicationAlertDeliveryView_Interface;
|
|
67
|
+
}
|
|
68
|
+
/** Closed, content-free receiver result. No message, details or provider payload is accepted. */
|
|
69
|
+
export interface DyNTS_ApplicationAlertSubmission_Interface {
|
|
70
|
+
readonly contractVersion: 'dynts-application-alert-submission/1';
|
|
71
|
+
readonly outcome: DyNTS_ApplicationAlertSubmissionOutcome_Type;
|
|
72
|
+
readonly resultCode: string;
|
|
73
|
+
readonly deliveryReference: string;
|
|
74
|
+
}
|
|
75
|
+
/** Compare-and-set completion bound to one raw claim token and monotonic fencing token. */
|
|
76
|
+
export interface DyNTS_ApplicationAlertCompletion_Interface {
|
|
77
|
+
readonly contractVersion: 'dynts-application-alert-completion/1';
|
|
78
|
+
readonly sourceSystem: string;
|
|
79
|
+
readonly idempotencyKey: string;
|
|
80
|
+
readonly fencingToken: number;
|
|
81
|
+
readonly claimToken: string;
|
|
82
|
+
readonly submission: DyNTS_ApplicationAlertSubmission_Interface;
|
|
83
|
+
}
|
|
84
|
+
/** Shared sender configuration. Retry and retention are finite and product-configured. */
|
|
85
|
+
export interface DyNTS_ApplicationAlertDeliverySettings_Interface {
|
|
86
|
+
readonly connection: Connection;
|
|
87
|
+
readonly sourceSystem: string;
|
|
88
|
+
readonly maxOperationTimeMs: number;
|
|
89
|
+
readonly leaseDurationMs: number;
|
|
90
|
+
readonly maxAttempts: number;
|
|
91
|
+
readonly retryBackoffMs: readonly number[];
|
|
92
|
+
readonly retentionMs: number;
|
|
93
|
+
}
|
|
94
|
+
/** Receiver adapter for one validated claim; implementations must enforce their own finite transport timeout. */
|
|
95
|
+
export interface DyNTS_ApplicationAlertSender_Interface {
|
|
96
|
+
send(envelope: DyFM_ApplicationAlertEnvelope_Interface): Promise<unknown>;
|
|
97
|
+
}
|
|
98
|
+
/** Outcome of one explicit event- or scheduler-triggered dispatch invocation. */
|
|
99
|
+
export interface DyNTS_ApplicationAlertDispatchResult_Interface {
|
|
100
|
+
readonly contractVersion: 'dynts-application-alert-dispatch-result/1';
|
|
101
|
+
readonly code: DyNTS_ApplicationAlertInvocationCode_Type;
|
|
102
|
+
readonly delivery?: DyNTS_ApplicationAlertDeliveryView_Interface;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=application-alert-delivery.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-alert-delivery.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/application-alert-delivery/_models/application-alert-delivery.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CA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AAO,CAAC,CAAC;CAC3E;AAED,iFAAiF;AACjF,MAAM,WAAW,8CAA8C;IAC7D,QAAQ,CAAC,eAAe,EAAE,2CAA2C,CAAC;IACtE,QAAQ,CAAC,IAAI,EAAE,yCAAyC,CAAC;IACzD,QAAQ,CAAC,QAAQ,CAAC,EAAE,4CAA4C,CAAC;CAClE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-alert-delivery.interface.js","sourceRoot":"","sources":["../../../../src/_modules/application-alert-delivery/_models/application-alert-delivery.interface.ts"],"names":[],"mappings":""}
|
package/build/_modules/application-alert-delivery/application-alert-delivery.control-service.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DyNTS_ApplicationAlertDispatchResult_Interface, DyNTS_ApplicationAlertSender_Interface } from './_models/application-alert-delivery.interface';
|
|
2
|
+
import { DyNTS_ApplicationAlertDelivery_MongoStore } from './application-alert-delivery.mongo-store';
|
|
3
|
+
/** Executes at most one explicitly triggered application-alert delivery attempt. */
|
|
4
|
+
export declare class DyNTS_ApplicationAlertDelivery_ControlService {
|
|
5
|
+
private readonly store;
|
|
6
|
+
private readonly sender;
|
|
7
|
+
/** Injects the durable gate and the authenticated receiver adapter without starting background work. */
|
|
8
|
+
constructor(store: DyNTS_ApplicationAlertDelivery_MongoStore, sender: DyNTS_ApplicationAlertSender_Interface);
|
|
9
|
+
/** Claims and attempts at most one due envelope; thrown transport errors become bounded retry evidence. */
|
|
10
|
+
dispatchOne(): Promise<DyNTS_ApplicationAlertDispatchResult_Interface>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=application-alert-delivery.control-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-alert-delivery.control-service.d.ts","sourceRoot":"","sources":["../../../src/_modules/application-alert-delivery/application-alert-delivery.control-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAGL,8CAA8C,EAC9C,sCAAsC,EACvC,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,yCAAyC,EAAE,MAAM,0CAA0C,CAAC;AAErG,oFAAoF;AACpF,qBAAa,6CAA6C;IACxD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA4C;IAClE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAyC;IAEhE,wGAAwG;gBAEtG,KAAK,EAAE,yCAAyC,EAChD,MAAM,EAAE,sCAAsC;IAMhD,2GAA2G;IAC9F,WAAW,IAAI,OAAO,CAAC,8CAA8C,CAAC;CAqCpF"}
|
package/build/_modules/application-alert-delivery/application-alert-delivery.control-service.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DyNTS_ApplicationAlertDelivery_ControlService = void 0;
|
|
4
|
+
const application_alert_delivery_state_type_enum_1 = require("./_enums/application-alert-delivery-state.type-enum");
|
|
5
|
+
/** Executes at most one explicitly triggered application-alert delivery attempt. */
|
|
6
|
+
class DyNTS_ApplicationAlertDelivery_ControlService {
|
|
7
|
+
store;
|
|
8
|
+
sender;
|
|
9
|
+
/** Injects the durable gate and the authenticated receiver adapter without starting background work. */
|
|
10
|
+
constructor(store, sender) {
|
|
11
|
+
this.store = store;
|
|
12
|
+
this.sender = sender;
|
|
13
|
+
}
|
|
14
|
+
/** Claims and attempts at most one due envelope; thrown transport errors become bounded retry evidence. */
|
|
15
|
+
async dispatchOne() {
|
|
16
|
+
const claim = await this.store.claimNext();
|
|
17
|
+
if (!claim.claimed || !claim.envelope) {
|
|
18
|
+
return Object.freeze({
|
|
19
|
+
contractVersion: 'dynts-application-alert-dispatch-result/1',
|
|
20
|
+
code: claim.code,
|
|
21
|
+
delivery: claim.delivery,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
let submission;
|
|
25
|
+
try {
|
|
26
|
+
submission = await this.sender.send(claim.envelope);
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
submission = Object.freeze({
|
|
30
|
+
contractVersion: 'dynts-application-alert-submission/1',
|
|
31
|
+
outcome: application_alert_delivery_state_type_enum_1.DyNTS_ApplicationAlertSubmissionOutcome_Type.retryableFailure,
|
|
32
|
+
resultCode: 'TRANSPORT_UNAVAILABLE',
|
|
33
|
+
deliveryReference: '',
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
const delivery = await this.store.complete({
|
|
37
|
+
contractVersion: 'dynts-application-alert-completion/1',
|
|
38
|
+
sourceSystem: claim.envelope.sourceSystem,
|
|
39
|
+
idempotencyKey: claim.envelope.idempotencyKey,
|
|
40
|
+
fencingToken: claim.fencingToken,
|
|
41
|
+
claimToken: claim.claimToken,
|
|
42
|
+
submission: submission,
|
|
43
|
+
});
|
|
44
|
+
return Object.freeze({
|
|
45
|
+
contractVersion: 'dynts-application-alert-dispatch-result/1',
|
|
46
|
+
code: application_alert_delivery_state_type_enum_1.DyNTS_ApplicationAlertInvocationCode_Type.deliveryClaimed,
|
|
47
|
+
delivery: delivery,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.DyNTS_ApplicationAlertDelivery_ControlService = DyNTS_ApplicationAlertDelivery_ControlService;
|
|
52
|
+
//# sourceMappingURL=application-alert-delivery.control-service.js.map
|
package/build/_modules/application-alert-delivery/application-alert-delivery.control-service.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-alert-delivery.control-service.js","sourceRoot":"","sources":["../../../src/_modules/application-alert-delivery/application-alert-delivery.control-service.ts"],"names":[],"mappings":";;;AAAA,oHAG6D;AAS7D,oFAAoF;AACpF,MAAa,6CAA6C;IACvC,KAAK,CAA4C;IACjD,MAAM,CAAyC;IAEhE,wGAAwG;IACxG,YACE,KAAgD,EAChD,MAA8C;QAE9C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,2GA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
1
|
+
import { DyNTS_ApplicationAlertClaim_Interface, DyNTS_ApplicationAlertDeliverySettings_Interface, DyNTS_ApplicationAlertDeliveryView_Interface, DyNTS_ApplicationAlertOperations_Interface } from './_models/application-alert-delivery.interface';
|
|
2
|
+
/** Mongo-backed, explicitly invoked application-alert sender outbox. */
|
|
3
|
+
export declare class DyNTS_ApplicationAlertDelivery_MongoStore {
|
|
4
|
+
private readonly settings;
|
|
5
|
+
private readonly ownedErrors;
|
|
6
|
+
private isReady;
|
|
7
|
+
private readiness?;
|
|
8
|
+
/** Validates finite retry, lease and retention policy without starting any worker or timer. */
|
|
9
|
+
constructor(settings: DyNTS_ApplicationAlertDeliverySettings_Interface);
|
|
10
|
+
/** Creates and verifies the strict collection plus deterministic claim and TTL indexes. */
|
|
11
|
+
ensureReady(): Promise<void>;
|
|
12
|
+
/** Inserts one validated envelope or acknowledges an exact idempotent replay. */
|
|
13
|
+
schedule(value: unknown): Promise<DyNTS_ApplicationAlertDeliveryView_Interface>;
|
|
14
|
+
/** Claims at most one due item or retires one exhausted crashed claim; it never waits or polls. */
|
|
15
|
+
claimNext(): Promise<DyNTS_ApplicationAlertClaim_Interface>;
|
|
16
|
+
/** Commits accepted, retryable or terminal delivery evidence under the live DB-time fence. */
|
|
17
|
+
complete(value: unknown): Promise<DyNTS_ApplicationAlertDeliveryView_Interface>;
|
|
18
|
+
/** Reads only within the configured source-system boundary. */
|
|
19
|
+
read(idempotencyKey: string): Promise<DyNTS_ApplicationAlertDeliveryView_Interface | null>;
|
|
20
|
+
/** Returns bounded aggregate delivery health without returning any alert or receiver content. */
|
|
21
|
+
inspect(): Promise<DyNTS_ApplicationAlertOperations_Interface>;
|
|
22
|
+
private retireExhausted;
|
|
23
|
+
private completion;
|
|
24
|
+
private submission;
|
|
25
|
+
private submissionOutcome;
|
|
26
|
+
private isExactCompletionReplay;
|
|
27
|
+
private assertReplay;
|
|
28
|
+
private assertRecord;
|
|
29
|
+
private recordStateValid;
|
|
30
|
+
private copyEnvelope;
|
|
31
|
+
private view;
|
|
32
|
+
private deliveryState;
|
|
33
|
+
private lastOutcome;
|
|
34
|
+
private exactRecord;
|
|
35
|
+
private key;
|
|
36
|
+
private tokenHash;
|
|
37
|
+
private databaseTime;
|
|
38
|
+
private positiveInteger;
|
|
39
|
+
private aggregateCount;
|
|
40
|
+
private date;
|
|
41
|
+
private collection;
|
|
42
|
+
private options;
|
|
43
|
+
private assertReady;
|
|
44
|
+
private protect;
|
|
45
|
+
private error;
|
|
46
|
+
private isMongoCode;
|
|
47
|
+
private validator;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=application-alert-delivery.mongo-store.d.ts.map
|
package/build/_modules/application-alert-delivery/application-alert-delivery.mongo-store.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-alert-delivery.mongo-store.d.ts","sourceRoot":"","sources":["../../../src/_modules/application-alert-delivery/application-alert-delivery.mongo-store.ts"],"names":[],"mappings":"AAeA,OAAO,EACL,qCAAqC,EAGrC,gDAAgD,EAChD,4CAA4C,EAC5C,0CAA0C,EAE3C,MAAM,gDAAgD,CAAC;AAUxD,wEAAwE;AACxE,qBAAa,yCAAyC;IACpD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmD;IAC5E,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAwC;IACpE,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,SAAS,CAAC,CAAgB;IAElC,+FAA+F;gBAC5E,QAAQ,EAAE,gDAAgD;IAmB7E,2FAA2F;IAC9E,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAgDzC,iFAAiF;IACpE,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,4CAA4C,CAAC;IAoE5F,mGAAmG;IACtF,SAAS,IAAI,OAAO,CAAC,qCAAqC,CAAC;IA+ExE,8FAA8F;IACjF,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,4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