@iveri/contracts 0.19.0 → 0.21.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.
Files changed (82) hide show
  1. package/README.md +39 -1
  2. package/dist/cjs/api/notification/index.d.ts +5 -0
  3. package/dist/cjs/api/notification/index.d.ts.map +1 -0
  4. package/dist/cjs/api/notification/index.js +21 -0
  5. package/dist/cjs/api/notification/index.js.map +1 -0
  6. package/dist/cjs/api/notification/notification-channel.enum.d.ts +27 -0
  7. package/dist/cjs/api/notification/notification-channel.enum.d.ts.map +1 -0
  8. package/dist/cjs/api/notification/notification-channel.enum.js +31 -0
  9. package/dist/cjs/api/notification/notification-channel.enum.js.map +1 -0
  10. package/dist/cjs/api/notification/notification-delivery-status.enum.d.ts +45 -0
  11. package/dist/cjs/api/notification/notification-delivery-status.enum.d.ts.map +1 -0
  12. package/dist/cjs/api/notification/notification-delivery-status.enum.js +49 -0
  13. package/dist/cjs/api/notification/notification-delivery-status.enum.js.map +1 -0
  14. package/dist/cjs/api/notification/notification-template.type.d.ts +68 -0
  15. package/dist/cjs/api/notification/notification-template.type.d.ts.map +1 -0
  16. package/dist/cjs/api/notification/notification-template.type.js +3 -0
  17. package/dist/cjs/api/notification/notification-template.type.js.map +1 -0
  18. package/dist/cjs/api/notification/notification.type.d.ts +136 -0
  19. package/dist/cjs/api/notification/notification.type.d.ts.map +1 -0
  20. package/dist/cjs/api/notification/notification.type.js +3 -0
  21. package/dist/cjs/api/notification/notification.type.js.map +1 -0
  22. package/dist/cjs/api/realtime/index.d.ts +4 -0
  23. package/dist/cjs/api/realtime/index.d.ts.map +1 -0
  24. package/dist/cjs/api/realtime/index.js +20 -0
  25. package/dist/cjs/api/realtime/index.js.map +1 -0
  26. package/dist/cjs/api/realtime/realtime-event-type.enum.d.ts +14 -0
  27. package/dist/cjs/api/realtime/realtime-event-type.enum.d.ts.map +1 -0
  28. package/dist/cjs/api/realtime/realtime-event-type.enum.js +18 -0
  29. package/dist/cjs/api/realtime/realtime-event-type.enum.js.map +1 -0
  30. package/dist/cjs/api/realtime/realtime-resource-type.enum.d.ts +13 -0
  31. package/dist/cjs/api/realtime/realtime-resource-type.enum.d.ts.map +1 -0
  32. package/dist/cjs/api/realtime/realtime-resource-type.enum.js +17 -0
  33. package/dist/cjs/api/realtime/realtime-resource-type.enum.js.map +1 -0
  34. package/dist/cjs/api/realtime/realtime.type.d.ts +106 -0
  35. package/dist/cjs/api/realtime/realtime.type.d.ts.map +1 -0
  36. package/dist/cjs/api/realtime/realtime.type.js +21 -0
  37. package/dist/cjs/api/realtime/realtime.type.js.map +1 -0
  38. package/dist/cjs/enum/user-permission.enum.d.ts +66 -1
  39. package/dist/cjs/enum/user-permission.enum.d.ts.map +1 -1
  40. package/dist/cjs/enum/user-permission.enum.js +67 -0
  41. package/dist/cjs/enum/user-permission.enum.js.map +1 -1
  42. package/dist/esm/api/notification/index.d.ts +5 -0
  43. package/dist/esm/api/notification/index.d.ts.map +1 -0
  44. package/dist/esm/api/notification/index.js +5 -0
  45. package/dist/esm/api/notification/index.js.map +1 -0
  46. package/dist/esm/api/notification/notification-channel.enum.d.ts +27 -0
  47. package/dist/esm/api/notification/notification-channel.enum.d.ts.map +1 -0
  48. package/dist/esm/api/notification/notification-channel.enum.js +28 -0
  49. package/dist/esm/api/notification/notification-channel.enum.js.map +1 -0
  50. package/dist/esm/api/notification/notification-delivery-status.enum.d.ts +45 -0
  51. package/dist/esm/api/notification/notification-delivery-status.enum.d.ts.map +1 -0
  52. package/dist/esm/api/notification/notification-delivery-status.enum.js +46 -0
  53. package/dist/esm/api/notification/notification-delivery-status.enum.js.map +1 -0
  54. package/dist/esm/api/notification/notification-template.type.d.ts +68 -0
  55. package/dist/esm/api/notification/notification-template.type.d.ts.map +1 -0
  56. package/dist/esm/api/notification/notification-template.type.js +2 -0
  57. package/dist/esm/api/notification/notification-template.type.js.map +1 -0
  58. package/dist/esm/api/notification/notification.type.d.ts +136 -0
  59. package/dist/esm/api/notification/notification.type.d.ts.map +1 -0
  60. package/dist/esm/api/notification/notification.type.js +2 -0
  61. package/dist/esm/api/notification/notification.type.js.map +1 -0
  62. package/dist/esm/api/realtime/index.d.ts +4 -0
  63. package/dist/esm/api/realtime/index.d.ts.map +1 -0
  64. package/dist/esm/api/realtime/index.js +4 -0
  65. package/dist/esm/api/realtime/index.js.map +1 -0
  66. package/dist/esm/api/realtime/realtime-event-type.enum.d.ts +14 -0
  67. package/dist/esm/api/realtime/realtime-event-type.enum.d.ts.map +1 -0
  68. package/dist/esm/api/realtime/realtime-event-type.enum.js +15 -0
  69. package/dist/esm/api/realtime/realtime-event-type.enum.js.map +1 -0
  70. package/dist/esm/api/realtime/realtime-resource-type.enum.d.ts +13 -0
  71. package/dist/esm/api/realtime/realtime-resource-type.enum.d.ts.map +1 -0
  72. package/dist/esm/api/realtime/realtime-resource-type.enum.js +14 -0
  73. package/dist/esm/api/realtime/realtime-resource-type.enum.js.map +1 -0
  74. package/dist/esm/api/realtime/realtime.type.d.ts +106 -0
  75. package/dist/esm/api/realtime/realtime.type.d.ts.map +1 -0
  76. package/dist/esm/api/realtime/realtime.type.js +18 -0
  77. package/dist/esm/api/realtime/realtime.type.js.map +1 -0
  78. package/dist/esm/enum/user-permission.enum.d.ts +66 -1
  79. package/dist/esm/enum/user-permission.enum.d.ts.map +1 -1
  80. package/dist/esm/enum/user-permission.enum.js +67 -0
  81. package/dist/esm/enum/user-permission.enum.js.map +1 -1
  82. package/package.json +17 -1
package/README.md CHANGED
@@ -3,6 +3,22 @@
3
3
  The wire contract every Iveri service and frontend compiles against: shared types and plain
4
4
  enums, and nothing else.
5
5
 
6
+ Release `0.21.0` adds the shared realtime contract under `@iveri/contracts/realtime`: closed
7
+ resource and event vocabularies, identifier-only publish messages, and short-lived subscription
8
+ grants bound to one tenant, person and resource. It also separates permission to issue a grant
9
+ from permission to publish an event, because authorizing a read and announcing a write are
10
+ different powers.
11
+
12
+ Release `0.20.0` adds the notification contract under `@iveri/contracts/notification` —
13
+ `NotificationChannel`, `NotificationDeliveryStatus`, `NotificationTemplate`, `Notification` with
14
+ its per-channel `NotificationDelivery` list, `InAppNotification` and the submit body — plus six
15
+ `notification:*` permissions. Two absences are decisions and each carries a spec: there is no
16
+ `push` channel, because a channel a caller can name and nothing can deliver reads as a successful
17
+ submit and reaches nobody; and no `delivered` status, because a relay accepting a message is not
18
+ evidence a person received it and nothing subscribes to a bounce. Status lives on the delivery
19
+ rather than the notification — one that emailed successfully and dead-lettered in the inbox has
20
+ two true answers and no single one.
21
+
6
22
  Release `0.19.0` adds `MessageVariableInput` — a declaration as a client sends it, where the
7
23
  optional halves may be absent. A separate type rather than `MessageVariable` with everything
8
24
  optional, because omitting a field on the way in and receiving `null` on the way out are
@@ -38,9 +54,11 @@ import type { CaptureSummary, Endpoint } from '@iveri/contracts/conduit';
38
54
  import type { AuthSession, Principal } from '@iveri/contracts/identity';
39
55
  import type { Conversation, Message } from '@iveri/contracts/unibox';
40
56
  import type { Namespace, TranslationBundle } from '@iveri/contracts/localization';
57
+ import type { Notification, NotificationChannel } from '@iveri/contracts/notification';
58
+ import type { RealtimeSubscription, RealtimeResourceUpdatedMessage } from '@iveri/contracts/realtime';
41
59
  ```
42
60
 
43
- Six entry points, and no others — never `@iveri/contracts/dist/...`.
61
+ Eight entry points, and no others — never `@iveri/contracts/dist/...`.
44
62
 
45
63
  The per-service surfaces are **not** re-exported from the root, deliberately. Conduit owns a
46
64
  `Provider`, a `Connection` and an `Endpoint`; Unibox owns a `Channel` and a `Contact` and would
@@ -155,6 +173,26 @@ surface the translator panel is written against, with `TranslationStatus` and `V
155
173
  platform branches on _which_ language a string is in, so encoding the set in a type would make
156
174
  adding one a release of this package and a redeploy of every consumer, for a value no code reads.
157
175
 
176
+ ### `api/notification/` → `@iveri/contracts/notification`
177
+
178
+ `iveri-notification-api`'s surface: `NotificationTemplate` and its upsert body, `Notification`
179
+ with its per-channel `NotificationDelivery` list, `SubmitNotificationBody`, `InAppNotification`,
180
+ and the `NotificationChannel` and `NotificationDeliveryStatus` enums.
181
+
182
+ Three shapes here are decisions rather than descriptions, and each is pinned by a spec:
183
+
184
+ - **Status lives on the delivery, not the notification.** One that emailed successfully and
185
+ dead-lettered in the inbox has two true answers, and a rolled-up field would have to pick one —
186
+ hiding a dead letter behind a success, or failing a notification that mostly worked.
187
+ - **No `push` channel**, because there is no device registry, no per-platform credentials and no
188
+ token rotation behind one. A channel a caller can name and nothing can deliver looks like a
189
+ successful submit and reaches nobody.
190
+ - **No `delivered` status**, because a relay accepting a message is not evidence a person received
191
+ it and nothing subscribes to a bounce yet. `SENT` is the strongest honest statement.
192
+
193
+ A template holds message **keys**, never text — the wording lives in `iveri-localization-api`, so
194
+ there is one place with ICU validation, a review gate and Georgian, rather than two.
195
+
158
196
  ### Why the wire shapes moved here
159
197
 
160
198
  `conduit-admin-web` hand-transcribed all of it, carefully and with comments. It still drifted:
@@ -0,0 +1,5 @@
1
+ export * from './notification-channel.enum.js';
2
+ export * from './notification-delivery-status.enum.js';
3
+ export * from './notification-template.type.js';
4
+ export * from './notification.type.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/notification/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./notification-channel.enum.js"), exports);
18
+ __exportStar(require("./notification-delivery-status.enum.js"), exports);
19
+ __exportStar(require("./notification-template.type.js"), exports);
20
+ __exportStar(require("./notification.type.js"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/notification/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iEAA+C;AAC/C,yEAAuD;AACvD,kEAAgD;AAChD,yDAAuC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * A way a notification reaches a person.
3
+ *
4
+ * A channel is not a provider. `EMAIL` says a message is addressed to a mailbox; whether it
5
+ * leaves through a local SMTP sink, SES or a transactional-email vendor is an adapter detail
6
+ * `iveri-notification-api` keeps behind its own boundary, and nothing on the wire names one.
7
+ *
8
+ * **There is deliberately no `PUSH` member yet**, and adding one is not a formality. Push needs a
9
+ * device registry, per-platform credentials (APNs keys, FCM service accounts) and a token-rotation
10
+ * story, none of which exist and none of which any product currently asks for. A member declared
11
+ * before the machinery behind it is a value a caller can send that quietly goes nowhere — worse
12
+ * than a 422 saying the channel is unknown, because it looks like it worked.
13
+ */
14
+ export declare enum NotificationChannel {
15
+ /** A message to a mailbox. Needs `recipient.emailAddress`. */
16
+ EMAIL = "email",
17
+ /**
18
+ * A row in the recipient's own in-app inbox. Needs `recipient.userId`.
19
+ *
20
+ * The only channel whose delivery is a local write, which is why it is the one channel that
21
+ * cannot fail for a reason outside our control. It still goes through the same queue as
22
+ * email: a notification that fans out to both must not have one half committed inline and the
23
+ * other half queued, or a rollback leaves the two halves disagreeing about what happened.
24
+ */
25
+ IN_APP = "in-app"
26
+ }
27
+ //# sourceMappingURL=notification-channel.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-channel.enum.d.ts","sourceRoot":"","sources":["../../../../src/api/notification/notification-channel.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,oBAAY,mBAAmB;IAC3B,8DAA8D;IAC9D,KAAK,UAAU;IAEf;;;;;;;OAOG;IACH,MAAM,WAAW;CACpB"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotificationChannel = void 0;
4
+ /**
5
+ * A way a notification reaches a person.
6
+ *
7
+ * A channel is not a provider. `EMAIL` says a message is addressed to a mailbox; whether it
8
+ * leaves through a local SMTP sink, SES or a transactional-email vendor is an adapter detail
9
+ * `iveri-notification-api` keeps behind its own boundary, and nothing on the wire names one.
10
+ *
11
+ * **There is deliberately no `PUSH` member yet**, and adding one is not a formality. Push needs a
12
+ * device registry, per-platform credentials (APNs keys, FCM service accounts) and a token-rotation
13
+ * story, none of which exist and none of which any product currently asks for. A member declared
14
+ * before the machinery behind it is a value a caller can send that quietly goes nowhere — worse
15
+ * than a 422 saying the channel is unknown, because it looks like it worked.
16
+ */
17
+ var NotificationChannel;
18
+ (function (NotificationChannel) {
19
+ /** A message to a mailbox. Needs `recipient.emailAddress`. */
20
+ NotificationChannel["EMAIL"] = "email";
21
+ /**
22
+ * A row in the recipient's own in-app inbox. Needs `recipient.userId`.
23
+ *
24
+ * The only channel whose delivery is a local write, which is why it is the one channel that
25
+ * cannot fail for a reason outside our control. It still goes through the same queue as
26
+ * email: a notification that fans out to both must not have one half committed inline and the
27
+ * other half queued, or a rollback leaves the two halves disagreeing about what happened.
28
+ */
29
+ NotificationChannel["IN_APP"] = "in-app";
30
+ })(NotificationChannel || (exports.NotificationChannel = NotificationChannel = {}));
31
+ //# sourceMappingURL=notification-channel.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-channel.enum.js","sourceRoot":"","sources":["../../../../src/api/notification/notification-channel.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;GAYG;AACH,IAAY,mBAaX;AAbD,WAAY,mBAAmB;IAC3B,8DAA8D;IAC9D,sCAAe,CAAA;IAEf;;;;;;;OAOG;IACH,wCAAiB,CAAA;AACrB,CAAC,EAbW,mBAAmB,mCAAnB,mBAAmB,QAa9B"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * How far one channel's attempt at a notification got.
3
+ *
4
+ * The state lives on the **delivery**, never on the notification. A notification that fans out to
5
+ * email and the in-app inbox has two independent fates, and a single rolled-up status would have
6
+ * to pick one of them to report — which means either hiding a dead letter behind a success or
7
+ * marking a wholly delivered notification as failed because one channel bounced.
8
+ *
9
+ * These mirror `conduit-api`'s outbound states deliberately but are a **separate enum**, for the
10
+ * same reason Conduit keeps its inbound and outbound statuses apart: the words coincide and the
11
+ * stories do not. A dead-lettered dispatch means a customer's message never reached a provider; a
12
+ * dead-lettered notification means a person was never told something we decided to tell them.
13
+ */
14
+ export declare enum NotificationDeliveryStatus {
15
+ /** Waiting for its next attempt, due at `nextAttemptAt`. */
16
+ PENDING = "pending",
17
+ /**
18
+ * Claimed by a worker and in progress.
19
+ *
20
+ * A row stranded here past the claim timeout is reclaimed by the same query that claims fresh
21
+ * work, which is where at-least-once becomes visible and why every channel adapter has to
22
+ * tolerate being asked twice.
23
+ */
24
+ IN_FLIGHT = "in-flight",
25
+ /**
26
+ * The channel accepted it. Terminal, and the strongest thing we can honestly say.
27
+ *
28
+ * **There is no `DELIVERED`**, and its absence is a decision rather than an omission. An SMTP
29
+ * relay accepting a message is not evidence a person received it — the bounce arrives minutes
30
+ * later, out of band, and nothing here is listening for one yet. A `DELIVERED` state we cannot
31
+ * observe would be a field every UI renders as a green tick and no code ever sets.
32
+ */
33
+ SENT = "sent",
34
+ /**
35
+ * The attempt budget is spent, or the channel refused in a way no retry can fix. Terminal.
36
+ *
37
+ * Reached from a permanent refusal on the very first attempt — an address the relay rejects
38
+ * outright, a template that names a message key nobody has published — because four more
39
+ * identical failures buy nothing and delay the moment somebody can act.
40
+ */
41
+ DEAD_LETTERED = "dead-lettered",
42
+ /** An operator stopped it before it went out. Terminal, and not a failure. */
43
+ CANCELLED = "cancelled"
44
+ }
45
+ //# sourceMappingURL=notification-delivery-status.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-delivery-status.enum.d.ts","sourceRoot":"","sources":["../../../../src/api/notification/notification-delivery-status.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,oBAAY,0BAA0B;IAClC,4DAA4D;IAC5D,OAAO,YAAY;IAEnB;;;;;;OAMG;IACH,SAAS,cAAc;IAEvB;;;;;;;OAOG;IACH,IAAI,SAAS;IAEb;;;;;;OAMG;IACH,aAAa,kBAAkB;IAE/B,8EAA8E;IAC9E,SAAS,cAAc;CAC1B"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotificationDeliveryStatus = void 0;
4
+ /**
5
+ * How far one channel's attempt at a notification got.
6
+ *
7
+ * The state lives on the **delivery**, never on the notification. A notification that fans out to
8
+ * email and the in-app inbox has two independent fates, and a single rolled-up status would have
9
+ * to pick one of them to report — which means either hiding a dead letter behind a success or
10
+ * marking a wholly delivered notification as failed because one channel bounced.
11
+ *
12
+ * These mirror `conduit-api`'s outbound states deliberately but are a **separate enum**, for the
13
+ * same reason Conduit keeps its inbound and outbound statuses apart: the words coincide and the
14
+ * stories do not. A dead-lettered dispatch means a customer's message never reached a provider; a
15
+ * dead-lettered notification means a person was never told something we decided to tell them.
16
+ */
17
+ var NotificationDeliveryStatus;
18
+ (function (NotificationDeliveryStatus) {
19
+ /** Waiting for its next attempt, due at `nextAttemptAt`. */
20
+ NotificationDeliveryStatus["PENDING"] = "pending";
21
+ /**
22
+ * Claimed by a worker and in progress.
23
+ *
24
+ * A row stranded here past the claim timeout is reclaimed by the same query that claims fresh
25
+ * work, which is where at-least-once becomes visible and why every channel adapter has to
26
+ * tolerate being asked twice.
27
+ */
28
+ NotificationDeliveryStatus["IN_FLIGHT"] = "in-flight";
29
+ /**
30
+ * The channel accepted it. Terminal, and the strongest thing we can honestly say.
31
+ *
32
+ * **There is no `DELIVERED`**, and its absence is a decision rather than an omission. An SMTP
33
+ * relay accepting a message is not evidence a person received it — the bounce arrives minutes
34
+ * later, out of band, and nothing here is listening for one yet. A `DELIVERED` state we cannot
35
+ * observe would be a field every UI renders as a green tick and no code ever sets.
36
+ */
37
+ NotificationDeliveryStatus["SENT"] = "sent";
38
+ /**
39
+ * The attempt budget is spent, or the channel refused in a way no retry can fix. Terminal.
40
+ *
41
+ * Reached from a permanent refusal on the very first attempt — an address the relay rejects
42
+ * outright, a template that names a message key nobody has published — because four more
43
+ * identical failures buy nothing and delay the moment somebody can act.
44
+ */
45
+ NotificationDeliveryStatus["DEAD_LETTERED"] = "dead-lettered";
46
+ /** An operator stopped it before it went out. Terminal, and not a failure. */
47
+ NotificationDeliveryStatus["CANCELLED"] = "cancelled";
48
+ })(NotificationDeliveryStatus || (exports.NotificationDeliveryStatus = NotificationDeliveryStatus = {}));
49
+ //# sourceMappingURL=notification-delivery-status.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-delivery-status.enum.js","sourceRoot":"","sources":["../../../../src/api/notification/notification-delivery-status.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;GAYG;AACH,IAAY,0BAkCX;AAlCD,WAAY,0BAA0B;IAClC,4DAA4D;IAC5D,iDAAmB,CAAA;IAEnB;;;;;;OAMG;IACH,qDAAuB,CAAA;IAEvB;;;;;;;OAOG;IACH,2CAAa,CAAA;IAEb;;;;;;OAMG;IACH,6DAA+B,CAAA;IAE/B,8EAA8E;IAC9E,qDAAuB,CAAA;AAC3B,CAAC,EAlCW,0BAA0B,0CAA1B,0BAA0B,QAkCrC"}
@@ -0,0 +1,68 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { Nullable } from '../../type/nil.type.js';
3
+ import type { UUID } from '../../type/uuid.type.js';
4
+ import type { NotificationChannel } from './notification-channel.enum.js';
5
+ /**
6
+ * What a notification *type* means: which channels it reaches and which strings it renders.
7
+ *
8
+ * A template holds **no text**. It names message keys in `iveri-localization-api`, which resolves
9
+ * them into the recipient's own language at send time. Storing the wording here instead would
10
+ * give the platform two places to author user-facing copy, and the second one would be the one
11
+ * without ICU validation, without a review gate and without Russian — see §13.1 of the workspace
12
+ * guide, which draws that line for exactly this case.
13
+ *
14
+ * **Built-in templates ship in code and a tenant row overrides one by key**, the same arrangement
15
+ * `conduit-api` uses for provider and connector manifests. `user.invitation` has to exist before
16
+ * any tenant has configured anything, and a platform whose password-reset email depends on a seed
17
+ * row is a platform where one missing row means nobody can get back into their account.
18
+ */
19
+ export interface NotificationTemplate {
20
+ /**
21
+ * The stable type key a caller submits — `user.invitation`, `user.password-reset`.
22
+ *
23
+ * Dotted `<aggregate>.<event>`, lowercase. It is what a caller writes down, so it never
24
+ * changes once shipped; a rename is a new key and a deprecation of the old one.
25
+ */
26
+ key: string;
27
+ /** Null for a built-in. A tenant override is a real row and carries an id. */
28
+ id: Nullable<UUID>;
29
+ /**
30
+ * Which channels this type fans out to. One delivery row is written per channel.
31
+ *
32
+ * An empty list is refused on write rather than stored: a template that reaches nobody is a
33
+ * notification that silently disappears, and the submit would still answer 202.
34
+ */
35
+ channels: NotificationChannel[];
36
+ /** The localization namespace holding this template's strings. */
37
+ namespaceKey: string;
38
+ /** Message key for the subject line. Null for channels that have no subject. */
39
+ subjectMessageKey: Nullable<string>;
40
+ /** Message key for the body. Always present — a notification with no body says nothing. */
41
+ bodyMessageKey: string;
42
+ /**
43
+ * Placeholder names the body and subject need supplied at submit time.
44
+ *
45
+ * Checked when a notification is submitted, not when it is sent. A missing variable fails
46
+ * identically on every attempt, so discovering it five backoffs later tells the caller nothing
47
+ * they can still act on — the same rule Conduit applies to an unfillable path template.
48
+ */
49
+ requiredVariables: string[];
50
+ /**
51
+ * False for a tenant's own row, true for one of the platform's.
52
+ *
53
+ * Surfaced so a panel can say "you are overriding a built-in" rather than presenting a
54
+ * customised password-reset email as if the platform had no opinion about it.
55
+ */
56
+ isBuiltIn: boolean;
57
+ createdAt: Nullable<IsoDateTime>;
58
+ updatedAt: Nullable<IsoDateTime>;
59
+ }
60
+ /** `PUT /api/v1/templates/{key}` — create or replace a tenant's override of a template. */
61
+ export interface UpsertNotificationTemplateBody {
62
+ channels: NotificationChannel[];
63
+ namespaceKey: string;
64
+ subjectMessageKey?: Nullable<string>;
65
+ bodyMessageKey: string;
66
+ requiredVariables?: Nullable<string[]>;
67
+ }
68
+ //# sourceMappingURL=notification-template.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-template.type.d.ts","sourceRoot":"","sources":["../../../../src/api/notification/notification-template.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAE1E;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;;;OAKG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ,8EAA8E;IAC9E,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEnB;;;;;OAKG;IACH,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAEhC,kEAAkE;IAClE,YAAY,EAAE,MAAM,CAAC;IAErB,gFAAgF;IAChF,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEpC,2FAA2F;IAC3F,cAAc,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAE5B;;;;;OAKG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB,SAAS,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;IACjC,SAAS,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;CACpC;AAED,2FAA2F;AAC3F,MAAM,WAAW,8BAA8B;IAC3C,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;CAC1C"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=notification-template.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-template.type.js","sourceRoot":"","sources":["../../../../src/api/notification/notification-template.type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,136 @@
1
+ import type { CursorPage } from '../../type/cursor-page.type.js';
2
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
3
+ import type { Nullable } from '../../type/nil.type.js';
4
+ import type { UUID } from '../../type/uuid.type.js';
5
+ import type { NotificationChannel } from './notification-channel.enum.js';
6
+ import type { NotificationDeliveryStatus } from './notification-delivery-status.enum.js';
7
+ /** Who a notification is for, and in what language. */
8
+ export interface NotificationRecipient {
9
+ /**
10
+ * The person, when there is one. Required by {@link NotificationChannel.IN_APP}.
11
+ *
12
+ * Null for a notification to somebody who has no account yet — which is precisely the
13
+ * invitation case, and the reason this is nullable rather than the obvious required field.
14
+ */
15
+ userId: Nullable<UUID>;
16
+ /** Required by {@link NotificationChannel.EMAIL}. */
17
+ emailAddress: Nullable<string>;
18
+ /**
19
+ * BCP-47. The language of the **recipient**, not of whoever submitted the notification.
20
+ *
21
+ * Null falls back to the tenant's source locale. This is the field that makes rendering a
22
+ * runtime concern rather than a build-time one: an agent working in English invites a
23
+ * colleague who reads Georgian, and the email is the colleague's.
24
+ */
25
+ localeCode: Nullable<string>;
26
+ }
27
+ /**
28
+ * One attempt-tracked send of a notification down one channel.
29
+ *
30
+ * This row **is** the outbox. It is written in the same transaction as the notification it belongs
31
+ * to, claimed by a worker afterwards, and retried on its own schedule — so a channel that is down
32
+ * delays one delivery rather than failing the submit.
33
+ */
34
+ export interface NotificationDelivery {
35
+ id: UUID;
36
+ notificationId: UUID;
37
+ channel: NotificationChannel;
38
+ status: NotificationDeliveryStatus;
39
+ /** Attempts actually made. A refusal that costs no attempt does not increment it. */
40
+ attemptCount: number;
41
+ /** When the next attempt is due. Null once the delivery reaches a terminal state. */
42
+ nextAttemptAt: Nullable<IsoDateTime>;
43
+ sentAt: Nullable<IsoDateTime>;
44
+ /**
45
+ * Why the last attempt failed, in words an operator can act on.
46
+ *
47
+ * Never carries the rendered body or the recipient's address — a delivery log is read by more
48
+ * people than the mailbox it describes.
49
+ */
50
+ lastError: Nullable<string>;
51
+ /**
52
+ * The channel's own handle for what it accepted — an SMTP message id.
53
+ *
54
+ * Opaque and provider-shaped by nature, kept so a support question about one email can be
55
+ * traced into a relay's logs. Nothing branches on it.
56
+ */
57
+ providerReference: Nullable<string>;
58
+ /** When the recipient opened it. In-app only; email opens are not tracked. */
59
+ readAt: Nullable<IsoDateTime>;
60
+ createdAt: IsoDateTime;
61
+ updatedAt: IsoDateTime;
62
+ }
63
+ /**
64
+ * Something the platform decided to tell somebody.
65
+ *
66
+ * **It carries no status of its own**, and that is the load-bearing shape here. Status lives on
67
+ * {@link NotificationDelivery}, one per channel, because a notification that emailed successfully
68
+ * and dead-lettered in the inbox has two true answers and no single one. A caller asking "did it
69
+ * go" reads `deliveries`, which answers precisely rather than approximately.
70
+ */
71
+ export interface Notification {
72
+ id: UUID;
73
+ /** The {@link NotificationTemplate} key this was rendered from. */
74
+ type: string;
75
+ recipient: NotificationRecipient;
76
+ /**
77
+ * Values for the template's declared placeholders.
78
+ *
79
+ * Stored as submitted and re-used on every retry, so a message that is retried an hour later
80
+ * says what it said the first time. Rendering happens per attempt; the *inputs* do not move.
81
+ */
82
+ variables: Record<string, string | number>;
83
+ /**
84
+ * The caller's deduplication key, unique per tenant.
85
+ *
86
+ * Enforced by a unique index rather than by a read before the insert. Two replicas processing
87
+ * the same event submit at the same instant, and the read-then-insert both of them do
88
+ * succeeds — the index is the only thing that turns that into one email.
89
+ */
90
+ idempotencyKey: Nullable<string>;
91
+ deliveries: NotificationDelivery[];
92
+ createdAt: IsoDateTime;
93
+ }
94
+ /** `POST /api/v1/notifications` */
95
+ export interface SubmitNotificationBody {
96
+ /** A {@link NotificationTemplate} key. Unknown keys are refused at submit, not at send. */
97
+ type: string;
98
+ recipient: {
99
+ userId?: Nullable<UUID>;
100
+ emailAddress?: Nullable<string>;
101
+ localeCode?: Nullable<string>;
102
+ };
103
+ variables?: Nullable<Record<string, string | number>>;
104
+ /** Strongly recommended. Without one, a retried submit tells somebody the same thing twice. */
105
+ idempotencyKey?: Nullable<string>;
106
+ }
107
+ export interface SubmitNotificationResponse {
108
+ id: UUID;
109
+ /**
110
+ * True when the idempotency key matched an existing notification and nothing was created.
111
+ *
112
+ * Reported rather than flattened into success: it means the recipient was already being told,
113
+ * so a caller treating it as a fresh send would write a second record of one event.
114
+ */
115
+ isDuplicate: boolean;
116
+ deliveries: NotificationDelivery[];
117
+ }
118
+ /**
119
+ * A row in the caller's own in-app inbox, already rendered.
120
+ *
121
+ * Rendered text is returned rather than a key and variables, because it was rendered once at send
122
+ * time in the recipient's language and re-rendering it on read would let a published translation
123
+ * change what a notification from last week says.
124
+ */
125
+ export interface InAppNotification {
126
+ id: UUID;
127
+ notificationId: UUID;
128
+ type: string;
129
+ subject: Nullable<string>;
130
+ body: string;
131
+ readAt: Nullable<IsoDateTime>;
132
+ createdAt: IsoDateTime;
133
+ }
134
+ export type InAppNotificationPage = CursorPage<InAppNotification>;
135
+ export type NotificationDeliveryPage = CursorPage<NotificationDelivery>;
136
+ //# sourceMappingURL=notification.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.type.d.ts","sourceRoot":"","sources":["../../../../src/api/notification/notification.type.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=notification.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.type.js","sourceRoot":"","sources":["../../../../src/api/notification/notification.type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export * from './realtime-event-type.enum.js';
2
+ export * from './realtime-resource-type.enum.js';
3
+ export * from './realtime.type.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/realtime/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./realtime-event-type.enum.js"), exports);
18
+ __exportStar(require("./realtime-resource-type.enum.js"), exports);
19
+ __exportStar(require("./realtime.type.js"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/realtime/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA8C;AAC9C,mEAAiD;AACjD,qDAAmC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Identifier-only change notifications delivered over the shared gateway.
3
+ *
4
+ * These are prompts to refetch from an owning API, never domain state. Keeping the set closed
5
+ * prevents a typo from becoming a silently ignored update or forcing clients to refetch every
6
+ * resource for an event they do not understand.
7
+ */
8
+ export declare enum RealtimeEventType {
9
+ TAXI_RIDE_UPDATED = "taxi.ride.updated",
10
+ DELIVERY_JOB_UPDATED = "delivery.job.updated",
11
+ MOBILITY_WORKER_LOCATION_UPDATED = "mobility.worker-location.updated",
12
+ MOBILITY_ASSIGNMENT_UPDATED = "mobility.assignment.updated"
13
+ }
14
+ //# sourceMappingURL=realtime-event-type.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"realtime-event-type.enum.d.ts","sourceRoot":"","sources":["../../../../src/api/realtime/realtime-event-type.enum.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,oBAAY,iBAAiB;IACzB,iBAAiB,sBAAsB;IACvC,oBAAoB,yBAAyB;IAC7C,gCAAgC,qCAAqC;IACrE,2BAA2B,gCAAgC;CAC9D"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RealtimeEventType = void 0;
4
+ /**
5
+ * Identifier-only change notifications delivered over the shared gateway.
6
+ *
7
+ * These are prompts to refetch from an owning API, never domain state. Keeping the set closed
8
+ * prevents a typo from becoming a silently ignored update or forcing clients to refetch every
9
+ * resource for an event they do not understand.
10
+ */
11
+ var RealtimeEventType;
12
+ (function (RealtimeEventType) {
13
+ RealtimeEventType["TAXI_RIDE_UPDATED"] = "taxi.ride.updated";
14
+ RealtimeEventType["DELIVERY_JOB_UPDATED"] = "delivery.job.updated";
15
+ RealtimeEventType["MOBILITY_WORKER_LOCATION_UPDATED"] = "mobility.worker-location.updated";
16
+ RealtimeEventType["MOBILITY_ASSIGNMENT_UPDATED"] = "mobility.assignment.updated";
17
+ })(RealtimeEventType || (exports.RealtimeEventType = RealtimeEventType = {}));
18
+ //# sourceMappingURL=realtime-event-type.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"realtime-event-type.enum.js","sourceRoot":"","sources":["../../../../src/api/realtime/realtime-event-type.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IACzB,4DAAuC,CAAA;IACvC,kEAA6C,CAAA;IAC7C,0FAAqE,CAAA;IACrE,gFAA2D,CAAA;AAC/D,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Resource classes the shared realtime gateway can address.
3
+ *
4
+ * Closed by design. A publisher cannot invent a room namespace, and the gateway can map every
5
+ * resource type to the one owning service allowed to issue subscription grants for it.
6
+ */
7
+ export declare enum RealtimeResourceType {
8
+ TAXI_RIDE = "taxi.ride",
9
+ DELIVERY_JOB = "delivery.job",
10
+ MOBILITY_WORKER = "mobility.worker",
11
+ MOBILITY_DISPATCH = "mobility.dispatch"
12
+ }
13
+ //# sourceMappingURL=realtime-resource-type.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"realtime-resource-type.enum.d.ts","sourceRoot":"","sources":["../../../../src/api/realtime/realtime-resource-type.enum.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,oBAAY,oBAAoB;IAC5B,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;IACnC,iBAAiB,sBAAsB;CAC1C"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RealtimeResourceType = void 0;
4
+ /**
5
+ * Resource classes the shared realtime gateway can address.
6
+ *
7
+ * Closed by design. A publisher cannot invent a room namespace, and the gateway can map every
8
+ * resource type to the one owning service allowed to issue subscription grants for it.
9
+ */
10
+ var RealtimeResourceType;
11
+ (function (RealtimeResourceType) {
12
+ RealtimeResourceType["TAXI_RIDE"] = "taxi.ride";
13
+ RealtimeResourceType["DELIVERY_JOB"] = "delivery.job";
14
+ RealtimeResourceType["MOBILITY_WORKER"] = "mobility.worker";
15
+ RealtimeResourceType["MOBILITY_DISPATCH"] = "mobility.dispatch";
16
+ })(RealtimeResourceType || (exports.RealtimeResourceType = RealtimeResourceType = {}));
17
+ //# sourceMappingURL=realtime-resource-type.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"realtime-resource-type.enum.js","sourceRoot":"","sources":["../../../../src/api/realtime/realtime-resource-type.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC5B,+CAAuB,CAAA;IACvB,qDAA6B,CAAA;IAC7B,2DAAmC,CAAA;IACnC,+DAAuC,CAAA;AAC3C,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B"}