@iveri/contracts 0.18.0 → 0.20.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 (54) hide show
  1. package/README.md +37 -1
  2. package/dist/cjs/api/localization/message.type.d.ts +18 -2
  3. package/dist/cjs/api/localization/message.type.d.ts.map +1 -1
  4. package/dist/cjs/api/notification/index.d.ts +5 -0
  5. package/dist/cjs/api/notification/index.d.ts.map +1 -0
  6. package/dist/cjs/api/notification/index.js +21 -0
  7. package/dist/cjs/api/notification/index.js.map +1 -0
  8. package/dist/cjs/api/notification/notification-channel.enum.d.ts +27 -0
  9. package/dist/cjs/api/notification/notification-channel.enum.d.ts.map +1 -0
  10. package/dist/cjs/api/notification/notification-channel.enum.js +31 -0
  11. package/dist/cjs/api/notification/notification-channel.enum.js.map +1 -0
  12. package/dist/cjs/api/notification/notification-delivery-status.enum.d.ts +45 -0
  13. package/dist/cjs/api/notification/notification-delivery-status.enum.d.ts.map +1 -0
  14. package/dist/cjs/api/notification/notification-delivery-status.enum.js +49 -0
  15. package/dist/cjs/api/notification/notification-delivery-status.enum.js.map +1 -0
  16. package/dist/cjs/api/notification/notification-template.type.d.ts +68 -0
  17. package/dist/cjs/api/notification/notification-template.type.d.ts.map +1 -0
  18. package/dist/cjs/api/notification/notification-template.type.js +3 -0
  19. package/dist/cjs/api/notification/notification-template.type.js.map +1 -0
  20. package/dist/cjs/api/notification/notification.type.d.ts +136 -0
  21. package/dist/cjs/api/notification/notification.type.d.ts.map +1 -0
  22. package/dist/cjs/api/notification/notification.type.js +3 -0
  23. package/dist/cjs/api/notification/notification.type.js.map +1 -0
  24. package/dist/cjs/enum/user-permission.enum.d.ts +54 -1
  25. package/dist/cjs/enum/user-permission.enum.d.ts.map +1 -1
  26. package/dist/cjs/enum/user-permission.enum.js +54 -0
  27. package/dist/cjs/enum/user-permission.enum.js.map +1 -1
  28. package/dist/esm/api/localization/message.type.d.ts +18 -2
  29. package/dist/esm/api/localization/message.type.d.ts.map +1 -1
  30. package/dist/esm/api/notification/index.d.ts +5 -0
  31. package/dist/esm/api/notification/index.d.ts.map +1 -0
  32. package/dist/esm/api/notification/index.js +5 -0
  33. package/dist/esm/api/notification/index.js.map +1 -0
  34. package/dist/esm/api/notification/notification-channel.enum.d.ts +27 -0
  35. package/dist/esm/api/notification/notification-channel.enum.d.ts.map +1 -0
  36. package/dist/esm/api/notification/notification-channel.enum.js +28 -0
  37. package/dist/esm/api/notification/notification-channel.enum.js.map +1 -0
  38. package/dist/esm/api/notification/notification-delivery-status.enum.d.ts +45 -0
  39. package/dist/esm/api/notification/notification-delivery-status.enum.d.ts.map +1 -0
  40. package/dist/esm/api/notification/notification-delivery-status.enum.js +46 -0
  41. package/dist/esm/api/notification/notification-delivery-status.enum.js.map +1 -0
  42. package/dist/esm/api/notification/notification-template.type.d.ts +68 -0
  43. package/dist/esm/api/notification/notification-template.type.d.ts.map +1 -0
  44. package/dist/esm/api/notification/notification-template.type.js +2 -0
  45. package/dist/esm/api/notification/notification-template.type.js.map +1 -0
  46. package/dist/esm/api/notification/notification.type.d.ts +136 -0
  47. package/dist/esm/api/notification/notification.type.d.ts.map +1 -0
  48. package/dist/esm/api/notification/notification.type.js +2 -0
  49. package/dist/esm/api/notification/notification.type.js.map +1 -0
  50. package/dist/esm/enum/user-permission.enum.d.ts +54 -1
  51. package/dist/esm/enum/user-permission.enum.d.ts.map +1 -1
  52. package/dist/esm/enum/user-permission.enum.js +54 -0
  53. package/dist/esm/enum/user-permission.enum.js.map +1 -1
  54. package/package.json +9 -1
@@ -319,6 +319,60 @@ var UserPermission;
319
319
  * key catalogue, and separating it keeps a compromised worker from enumerating it.
320
320
  */
321
321
  UserPermission["LOCALIZATION_RENDER"] = "localization:render";
322
+ // ══ iveri-notification-api ══════════════════════════════════════════════
323
+ /**
324
+ * Submit a notification for delivery.
325
+ *
326
+ * **A service permission, and the sharpest one here.** It reaches a real person's mailbox with
327
+ * text the platform composed, and it is not deliberately absent from the seeded `ADMIN` role
328
+ * the way `UNIBOX_REALTIME_PUBLISH` is — an admin has no reason to hold it, because there is
329
+ * nothing for a human to prove by sending a notification to somebody else by hand.
330
+ *
331
+ * Note what it does *not* let a holder do: a submission names a **template key**, never a
332
+ * subject and body. The wording of every notification the platform sends was written by
333
+ * somebody holding {@link UserPermission.NOTIFICATION_TEMPLATE_MANAGE} and translated by
334
+ * somebody holding {@link UserPermission.LOCALIZATION_TRANSLATE}. This is the same shape as
335
+ * `CONDUIT_DISPATCH_SEND` naming an operation rather than a URL, and it is load-bearing for
336
+ * the same reason: without it, a compromised service principal is an authenticated way to
337
+ * send arbitrary text from our own domain to any address it likes.
338
+ */
339
+ UserPermission["NOTIFICATION_SEND"] = "notification:send";
340
+ /**
341
+ * Read **your own** in-app inbox, and mark your own rows read.
342
+ *
343
+ * Scoped to the calling principal by the endpoint, not by this permission — there is no
344
+ * variant that reads somebody else's inbox, because a notification is addressed to one person
345
+ * and reading another's is reading their mail. It belongs in every human role, including the
346
+ * narrowest, for the same reason: without it a member cannot see what the product is telling
347
+ * them.
348
+ */
349
+ UserPermission["NOTIFICATION_READ"] = "notification:read";
350
+ /** Read the tenant's notification templates and the platform's built-in ones. */
351
+ UserPermission["NOTIFICATION_TEMPLATE_READ"] = "notification:template:read";
352
+ /**
353
+ * Override a built-in template, or define a new one — which channels a notification type
354
+ * reaches and which message keys it renders.
355
+ *
356
+ * Configuration that decides what every future notification of a type says, including the
357
+ * password-reset email. Overriding one badly is a way to stop people getting back into their
358
+ * accounts, so it is separated from reading for the same reason `CONDUIT_CONNECTOR_MANAGE` is.
359
+ */
360
+ UserPermission["NOTIFICATION_TEMPLATE_MANAGE"] = "notification:template:manage";
361
+ /**
362
+ * Read the delivery log and the dead-letter queue, including each delivery's last error.
363
+ *
364
+ * Grouped with reading rather than with operating the queue, and it is closer to a data-read
365
+ * permission than a config one: the log names who was written to and about what.
366
+ */
367
+ UserPermission["NOTIFICATION_DELIVERY_READ"] = "notification:delivery:read";
368
+ /**
369
+ * Redrive a dead-lettered delivery, or cancel one still pending.
370
+ *
371
+ * Separate from reading because it causes a message to be sent to a person rather than
372
+ * returning a row — and because redriving a backlog is a way to mail somebody the same thing
373
+ * fifty times an hour after an outage.
374
+ */
375
+ UserPermission["NOTIFICATION_DELIVERY_OPERATE"] = "notification:delivery:operate";
322
376
  })(UserPermission || (exports.UserPermission = UserPermission = {}));
323
377
  /**
324
378
  * Every member, for seeding the owner role and validating custom-role input.
@@ -1 +1 @@
1
- {"version":3,"file":"user-permission.enum.js","sourceRoot":"","sources":["../../../src/enum/user-permission.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,IAAY,cAqVX;AArVD,WAAY,cAAc;IACtB,4EAA4E;IAE5E,2EAA2E;IAC3E,6CAA2B,CAAA;IAC3B,iDAA+B,CAAA;IAC/B,sFAAsF;IACtF,iDAA+B,CAAA;IAE/B,2EAA2E;IAC3E,yCAAuB,CAAA;IACvB,6CAA2B,CAAA;IAC3B,6CAA2B,CAAA;IAC3B,6CAA2B,CAAA;IAE3B,2EAA2E;IAC3E,qDAAmC,CAAA;IACnC,6EAA6E;IAC7E,yDAAuC,CAAA;IACvC;;;OAGG;IACH,mEAAiD,CAAA;IAEjD,2EAA2E;IAC3E,yCAAuB,CAAA;IACvB,6CAA2B,CAAA;IAC3B,6CAA2B,CAAA;IAC3B,6CAA2B,CAAA;IAE3B,2EAA2E;IAC3E,+CAA6B,CAAA;IAC7B,iDAA+B,CAAA;IAC/B,mDAAiC,CAAA;IAEjC,4EAA4E;IAE5E,2EAA2E;IAC3E,qEAAqE;IACrE,iEAA+C,CAAA;IAC/C,qEAAmD,CAAA;IACnD,qEAAmD,CAAA;IACnD,qEAAmD,CAAA;IAEnD,2EAA2E;IAC3E;;;;OAIG;IACH,+DAA6C,CAAA;IAC7C,mEAAiD,CAAA;IAEjD,2EAA2E;IAC3E;;;;OAIG;IACH,mEAAiD,CAAA;IAEjD,2EAA2E;I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cAAc,QAkZzB;AAED;;;;;GAKG;AACU,QAAA,oBAAoB,GAA8B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC"}
@@ -24,6 +24,22 @@ export interface MessageVariable {
24
24
  */
25
25
  options: Nullable<string[]>;
26
26
  }
27
+ /**
28
+ * A declaration as a *client sends* it, where the optional halves may simply be absent.
29
+ *
30
+ * A separate type from {@link MessageVariable} rather than that one with everything optional,
31
+ * because the two directions genuinely differ: on the way in, omitting `description` means "I
32
+ * have nothing to say"; on the way out, the field is always present and `null` says the same
33
+ * thing explicitly. Collapsing them forces every reader to handle `undefined` for a field the
34
+ * server always sends.
35
+ */
36
+ export interface MessageVariableInput {
37
+ name: string;
38
+ type: VariableType;
39
+ description?: Nullable<string>;
40
+ example?: Nullable<string>;
41
+ options?: Nullable<string[]>;
42
+ }
27
43
  /**
28
44
  * A translatable string, identified by a key that never changes.
29
45
  *
@@ -71,7 +87,7 @@ export type MessagesPage = Paginated<Message>;
71
87
  export interface CreateMessageBody {
72
88
  key: string;
73
89
  description?: Nullable<string>;
74
- variables?: MessageVariable[];
90
+ variables?: MessageVariableInput[];
75
91
  /** The source-locale text. Written as an `APPROVED` translation in the same transaction. */
76
92
  sourceValue: string;
77
93
  }
@@ -84,7 +100,7 @@ export interface CreateMessageBody {
84
100
  */
85
101
  export interface UpdateMessageBody {
86
102
  description?: Nullable<string>;
87
- variables?: MessageVariable[];
103
+ variables?: MessageVariableInput[];
88
104
  isArchived?: boolean;
89
105
  }
90
106
  //# sourceMappingURL=message.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"message.type.d.ts","sourceRoot":"","sources":["../../../../src/api/localization/message.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,SAAS,EAAE,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B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAC9B,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/B,SAAS,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB"}
@@ -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,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.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","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,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,28 @@
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 var NotificationChannel;
15
+ (function (NotificationChannel) {
16
+ /** A message to a mailbox. Needs `recipient.emailAddress`. */
17
+ NotificationChannel["EMAIL"] = "email";
18
+ /**
19
+ * A row in the recipient's own in-app inbox. Needs `recipient.userId`.
20
+ *
21
+ * The only channel whose delivery is a local write, which is why it is the one channel that
22
+ * cannot fail for a reason outside our control. It still goes through the same queue as
23
+ * email: a notification that fans out to both must not have one half committed inline and the
24
+ * other half queued, or a rollback leaves the two halves disagreeing about what happened.
25
+ */
26
+ NotificationChannel["IN_APP"] = "in-app";
27
+ })(NotificationChannel || (NotificationChannel = {}));
28
+ //# 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,MAAM,CAAN,IAAY,mBAaX;AAbD,WAAY,mBAAmB;IAC3B,8DAA8D;IAC9D,sCAAe,CAAA;IAEf;;;;;;;OAOG;IACH,wCAAiB,CAAA;AACrB,CAAC,EAbW,mBAAmB,KAAnB,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,46 @@
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 var NotificationDeliveryStatus;
15
+ (function (NotificationDeliveryStatus) {
16
+ /** Waiting for its next attempt, due at `nextAttemptAt`. */
17
+ NotificationDeliveryStatus["PENDING"] = "pending";
18
+ /**
19
+ * Claimed by a worker and in progress.
20
+ *
21
+ * A row stranded here past the claim timeout is reclaimed by the same query that claims fresh
22
+ * work, which is where at-least-once becomes visible and why every channel adapter has to
23
+ * tolerate being asked twice.
24
+ */
25
+ NotificationDeliveryStatus["IN_FLIGHT"] = "in-flight";
26
+ /**
27
+ * The channel accepted it. Terminal, and the strongest thing we can honestly say.
28
+ *
29
+ * **There is no `DELIVERED`**, and its absence is a decision rather than an omission. An SMTP
30
+ * relay accepting a message is not evidence a person received it — the bounce arrives minutes
31
+ * later, out of band, and nothing here is listening for one yet. A `DELIVERED` state we cannot
32
+ * observe would be a field every UI renders as a green tick and no code ever sets.
33
+ */
34
+ NotificationDeliveryStatus["SENT"] = "sent";
35
+ /**
36
+ * The attempt budget is spent, or the channel refused in a way no retry can fix. Terminal.
37
+ *
38
+ * Reached from a permanent refusal on the very first attempt — an address the relay rejects
39
+ * outright, a template that names a message key nobody has published — because four more
40
+ * identical failures buy nothing and delay the moment somebody can act.
41
+ */
42
+ NotificationDeliveryStatus["DEAD_LETTERED"] = "dead-lettered";
43
+ /** An operator stopped it before it went out. Terminal, and not a failure. */
44
+ NotificationDeliveryStatus["CANCELLED"] = "cancelled";
45
+ })(NotificationDeliveryStatus || (NotificationDeliveryStatus = {}));
46
+ //# 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,MAAM,CAAN,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,KAA1B,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,2 @@
1
+ export {};
2
+ //# 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":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,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;AAC1E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AAEzF,uDAAuD;AACvD,MAAM,WAAW,qBAAqB;IAClC;;;;;OAKG;IACH,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEvB,qDAAqD;IACrD,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAE/B;;;;;;OAMG;IACH,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAChC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACjC,EAAE,EAAE,IAAI,CAAC;IAET,cAAc,EAAE,IAAI,CAAC;IAErB,OAAO,EAAE,mBAAmB,CAAC;IAE7B,MAAM,EAAE,0BAA0B,CAAC;IAEnC,qFAAqF;IACrF,YAAY,EAAE,MAAM,CAAC;IAErB,qFAAqF;IACrF,aAAa,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;IAErC,MAAM,EAAE,QAAQ,CAAC,WA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U,EAAE,oBAAoB,EAAE,CAAC;CACtC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,IAAI,CAAC;IAET,cAAc,EAAE,IAAI,CAAC;IAErB,IAAI,EAAE,MAAM,CAAC;IAEb,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAE1B,IAAI,EAAE,MAAM,CAAC;IAEb,MAAM,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;IAE9B,SAAS,EAAE,WAAW,CAAC;CAC1B;AAED,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC;AAElE,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# 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":""}
@@ -271,7 +271,60 @@ export declare enum UserPermission {
271
271
  * rendering an invoice line hold this and nothing else here — they have no reason to read the
272
272
  * key catalogue, and separating it keeps a compromised worker from enumerating it.
273
273
  */
274
- LOCALIZATION_RENDER = "localization:render"
274
+ LOCALIZATION_RENDER = "localization:render",
275
+ /**
276
+ * Submit a notification for delivery.
277
+ *
278
+ * **A service permission, and the sharpest one here.** It reaches a real person's mailbox with
279
+ * text the platform composed, and it is not deliberately absent from the seeded `ADMIN` role
280
+ * the way `UNIBOX_REALTIME_PUBLISH` is — an admin has no reason to hold it, because there is
281
+ * nothing for a human to prove by sending a notification to somebody else by hand.
282
+ *
283
+ * Note what it does *not* let a holder do: a submission names a **template key**, never a
284
+ * subject and body. The wording of every notification the platform sends was written by
285
+ * somebody holding {@link UserPermission.NOTIFICATION_TEMPLATE_MANAGE} and translated by
286
+ * somebody holding {@link UserPermission.LOCALIZATION_TRANSLATE}. This is the same shape as
287
+ * `CONDUIT_DISPATCH_SEND` naming an operation rather than a URL, and it is load-bearing for
288
+ * the same reason: without it, a compromised service principal is an authenticated way to
289
+ * send arbitrary text from our own domain to any address it likes.
290
+ */
291
+ NOTIFICATION_SEND = "notification:send",
292
+ /**
293
+ * Read **your own** in-app inbox, and mark your own rows read.
294
+ *
295
+ * Scoped to the calling principal by the endpoint, not by this permission — there is no
296
+ * variant that reads somebody else's inbox, because a notification is addressed to one person
297
+ * and reading another's is reading their mail. It belongs in every human role, including the
298
+ * narrowest, for the same reason: without it a member cannot see what the product is telling
299
+ * them.
300
+ */
301
+ NOTIFICATION_READ = "notification:read",
302
+ /** Read the tenant's notification templates and the platform's built-in ones. */
303
+ NOTIFICATION_TEMPLATE_READ = "notification:template:read",
304
+ /**
305
+ * Override a built-in template, or define a new one — which channels a notification type
306
+ * reaches and which message keys it renders.
307
+ *
308
+ * Configuration that decides what every future notification of a type says, including the
309
+ * password-reset email. Overriding one badly is a way to stop people getting back into their
310
+ * accounts, so it is separated from reading for the same reason `CONDUIT_CONNECTOR_MANAGE` is.
311
+ */
312
+ NOTIFICATION_TEMPLATE_MANAGE = "notification:template:manage",
313
+ /**
314
+ * Read the delivery log and the dead-letter queue, including each delivery's last error.
315
+ *
316
+ * Grouped with reading rather than with operating the queue, and it is closer to a data-read
317
+ * permission than a config one: the log names who was written to and about what.
318
+ */
319
+ NOTIFICATION_DELIVERY_READ = "notification:delivery:read",
320
+ /**
321
+ * Redrive a dead-lettered delivery, or cancel one still pending.
322
+ *
323
+ * Separate from reading because it causes a message to be sent to a person rather than
324
+ * returning a row — and because redriving a backlog is a way to mail somebody the same thing
325
+ * fifty times an hour after an outage.
326
+ */
327
+ NOTIFICATION_DELIVERY_OPERATE = "notification:delivery:operate"
275
328
  }
276
329
  /**
277
330
  * Every member, for seeding the owner role and validating custom-role input.
@@ -1 +1 @@
1
- {"version":3,"file":"user-permission.enum.d.ts","sourceRoot":"","sources":["../../../src/enum/user-permission.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;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