@iveri/contracts 0.1.0 → 0.3.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 (158) hide show
  1. package/README.md +72 -14
  2. package/dist/cjs/api/conduit/capture.type.d.ts +70 -0
  3. package/dist/cjs/api/conduit/capture.type.d.ts.map +1 -0
  4. package/dist/cjs/api/conduit/capture.type.js +3 -0
  5. package/dist/cjs/api/conduit/capture.type.js.map +1 -0
  6. package/dist/cjs/api/conduit/endpoint.type.d.ts +66 -0
  7. package/dist/cjs/api/conduit/endpoint.type.d.ts.map +1 -0
  8. package/dist/cjs/api/conduit/endpoint.type.js +3 -0
  9. package/dist/cjs/api/conduit/endpoint.type.js.map +1 -0
  10. package/dist/cjs/api/conduit/handshake-kind.enum.d.ts +22 -0
  11. package/dist/cjs/api/conduit/handshake-kind.enum.d.ts.map +1 -0
  12. package/dist/cjs/api/conduit/handshake-kind.enum.js +26 -0
  13. package/dist/cjs/api/conduit/handshake-kind.enum.js.map +1 -0
  14. package/dist/cjs/api/conduit/index.d.ts +11 -0
  15. package/dist/cjs/api/conduit/index.d.ts.map +1 -0
  16. package/dist/cjs/api/conduit/index.js +27 -0
  17. package/dist/cjs/api/conduit/index.js.map +1 -0
  18. package/dist/cjs/api/conduit/provider.type.d.ts +138 -0
  19. package/dist/cjs/api/conduit/provider.type.d.ts.map +1 -0
  20. package/dist/cjs/api/conduit/provider.type.js +8 -0
  21. package/dist/cjs/api/conduit/provider.type.js.map +1 -0
  22. package/dist/cjs/api/conduit/replay.type.d.ts +48 -0
  23. package/dist/cjs/api/conduit/replay.type.d.ts.map +1 -0
  24. package/dist/cjs/api/conduit/replay.type.js +3 -0
  25. package/dist/cjs/api/conduit/replay.type.js.map +1 -0
  26. package/dist/cjs/api/conduit/signature-algorithm.enum.d.ts +17 -0
  27. package/dist/cjs/api/conduit/signature-algorithm.enum.d.ts.map +1 -0
  28. package/dist/cjs/api/conduit/signature-algorithm.enum.js +21 -0
  29. package/dist/cjs/api/conduit/signature-algorithm.enum.js.map +1 -0
  30. package/dist/cjs/api/conduit/signature-encoding.enum.d.ts +13 -0
  31. package/dist/cjs/api/conduit/signature-encoding.enum.d.ts.map +1 -0
  32. package/dist/cjs/api/conduit/signature-encoding.enum.js +17 -0
  33. package/dist/cjs/api/conduit/signature-encoding.enum.js.map +1 -0
  34. package/dist/cjs/api/conduit/signature-header-scheme.enum.d.ts +19 -0
  35. package/dist/cjs/api/conduit/signature-header-scheme.enum.d.ts.map +1 -0
  36. package/dist/cjs/api/conduit/signature-header-scheme.enum.js +23 -0
  37. package/dist/cjs/api/conduit/signature-header-scheme.enum.js.map +1 -0
  38. package/dist/cjs/api/conduit/signature-verdict.enum.d.ts +50 -0
  39. package/dist/cjs/api/conduit/signature-verdict.enum.d.ts.map +1 -0
  40. package/dist/cjs/api/conduit/signature-verdict.enum.js +54 -0
  41. package/dist/cjs/api/conduit/signature-verdict.enum.js.map +1 -0
  42. package/dist/cjs/api/conduit/signature.type.d.ts +54 -0
  43. package/dist/cjs/api/conduit/signature.type.d.ts.map +1 -0
  44. package/dist/cjs/api/conduit/signature.type.js +3 -0
  45. package/dist/cjs/api/conduit/signature.type.js.map +1 -0
  46. package/dist/cjs/api/identity/auth.type.d.ts +92 -0
  47. package/dist/cjs/api/identity/auth.type.d.ts.map +1 -0
  48. package/dist/cjs/api/identity/auth.type.js +3 -0
  49. package/dist/cjs/api/identity/auth.type.js.map +1 -0
  50. package/dist/cjs/api/identity/index.d.ts +4 -0
  51. package/dist/cjs/api/identity/index.d.ts.map +1 -0
  52. package/dist/cjs/api/identity/index.js +20 -0
  53. package/dist/cjs/api/identity/index.js.map +1 -0
  54. package/dist/cjs/api/identity/membership-status.enum.d.ts +16 -0
  55. package/dist/cjs/api/identity/membership-status.enum.d.ts.map +1 -0
  56. package/dist/cjs/api/identity/membership-status.enum.js +20 -0
  57. package/dist/cjs/api/identity/membership-status.enum.js.map +1 -0
  58. package/dist/cjs/api/identity/tenant-status.enum.d.ts +28 -0
  59. package/dist/cjs/api/identity/tenant-status.enum.d.ts.map +1 -0
  60. package/dist/cjs/api/identity/tenant-status.enum.js +32 -0
  61. package/dist/cjs/api/identity/tenant-status.enum.js.map +1 -0
  62. package/dist/cjs/enum/index.d.ts +1 -0
  63. package/dist/cjs/enum/index.d.ts.map +1 -1
  64. package/dist/cjs/enum/index.js +1 -0
  65. package/dist/cjs/enum/index.js.map +1 -1
  66. package/dist/cjs/enum/user-permission.enum.d.ts +72 -0
  67. package/dist/cjs/enum/user-permission.enum.d.ts.map +1 -0
  68. package/dist/cjs/enum/user-permission.enum.js +87 -0
  69. package/dist/cjs/enum/user-permission.enum.js.map +1 -0
  70. package/dist/cjs/type/api-response.type.d.ts +24 -28
  71. package/dist/cjs/type/api-response.type.d.ts.map +1 -1
  72. package/dist/cjs/type/index.d.ts +1 -0
  73. package/dist/cjs/type/index.d.ts.map +1 -1
  74. package/dist/cjs/type/index.js +1 -0
  75. package/dist/cjs/type/index.js.map +1 -1
  76. package/dist/cjs/type/iso-date-time.type.d.ts +17 -0
  77. package/dist/cjs/type/iso-date-time.type.d.ts.map +1 -0
  78. package/dist/cjs/type/iso-date-time.type.js +3 -0
  79. package/dist/cjs/type/iso-date-time.type.js.map +1 -0
  80. package/dist/esm/api/conduit/capture.type.d.ts +70 -0
  81. package/dist/esm/api/conduit/capture.type.d.ts.map +1 -0
  82. package/dist/esm/api/conduit/capture.type.js +2 -0
  83. package/dist/esm/api/conduit/capture.type.js.map +1 -0
  84. package/dist/esm/api/conduit/endpoint.type.d.ts +66 -0
  85. package/dist/esm/api/conduit/endpoint.type.d.ts.map +1 -0
  86. package/dist/esm/api/conduit/endpoint.type.js +2 -0
  87. package/dist/esm/api/conduit/endpoint.type.js.map +1 -0
  88. package/dist/esm/api/conduit/handshake-kind.enum.d.ts +22 -0
  89. package/dist/esm/api/conduit/handshake-kind.enum.d.ts.map +1 -0
  90. package/dist/esm/api/conduit/handshake-kind.enum.js +23 -0
  91. package/dist/esm/api/conduit/handshake-kind.enum.js.map +1 -0
  92. package/dist/esm/api/conduit/index.d.ts +11 -0
  93. package/dist/esm/api/conduit/index.d.ts.map +1 -0
  94. package/dist/esm/api/conduit/index.js +11 -0
  95. package/dist/esm/api/conduit/index.js.map +1 -0
  96. package/dist/esm/api/conduit/provider.type.d.ts +138 -0
  97. package/dist/esm/api/conduit/provider.type.d.ts.map +1 -0
  98. package/dist/esm/api/conduit/provider.type.js +5 -0
  99. package/dist/esm/api/conduit/provider.type.js.map +1 -0
  100. package/dist/esm/api/conduit/replay.type.d.ts +48 -0
  101. package/dist/esm/api/conduit/replay.type.d.ts.map +1 -0
  102. package/dist/esm/api/conduit/replay.type.js +2 -0
  103. package/dist/esm/api/conduit/replay.type.js.map +1 -0
  104. package/dist/esm/api/conduit/signature-algorithm.enum.d.ts +17 -0
  105. package/dist/esm/api/conduit/signature-algorithm.enum.d.ts.map +1 -0
  106. package/dist/esm/api/conduit/signature-algorithm.enum.js +18 -0
  107. package/dist/esm/api/conduit/signature-algorithm.enum.js.map +1 -0
  108. package/dist/esm/api/conduit/signature-encoding.enum.d.ts +13 -0
  109. package/dist/esm/api/conduit/signature-encoding.enum.d.ts.map +1 -0
  110. package/dist/esm/api/conduit/signature-encoding.enum.js +14 -0
  111. package/dist/esm/api/conduit/signature-encoding.enum.js.map +1 -0
  112. package/dist/esm/api/conduit/signature-header-scheme.enum.d.ts +19 -0
  113. package/dist/esm/api/conduit/signature-header-scheme.enum.d.ts.map +1 -0
  114. package/dist/esm/api/conduit/signature-header-scheme.enum.js +20 -0
  115. package/dist/esm/api/conduit/signature-header-scheme.enum.js.map +1 -0
  116. package/dist/esm/api/conduit/signature-verdict.enum.d.ts +50 -0
  117. package/dist/esm/api/conduit/signature-verdict.enum.d.ts.map +1 -0
  118. package/dist/esm/api/conduit/signature-verdict.enum.js +51 -0
  119. package/dist/esm/api/conduit/signature-verdict.enum.js.map +1 -0
  120. package/dist/esm/api/conduit/signature.type.d.ts +54 -0
  121. package/dist/esm/api/conduit/signature.type.d.ts.map +1 -0
  122. package/dist/esm/api/conduit/signature.type.js +2 -0
  123. package/dist/esm/api/conduit/signature.type.js.map +1 -0
  124. package/dist/esm/api/identity/auth.type.d.ts +92 -0
  125. package/dist/esm/api/identity/auth.type.d.ts.map +1 -0
  126. package/dist/esm/api/identity/auth.type.js +2 -0
  127. package/dist/esm/api/identity/auth.type.js.map +1 -0
  128. package/dist/esm/api/identity/index.d.ts +4 -0
  129. package/dist/esm/api/identity/index.d.ts.map +1 -0
  130. package/dist/esm/api/identity/index.js +4 -0
  131. package/dist/esm/api/identity/index.js.map +1 -0
  132. package/dist/esm/api/identity/membership-status.enum.d.ts +16 -0
  133. package/dist/esm/api/identity/membership-status.enum.d.ts.map +1 -0
  134. package/dist/esm/api/identity/membership-status.enum.js +17 -0
  135. package/dist/esm/api/identity/membership-status.enum.js.map +1 -0
  136. package/dist/esm/api/identity/tenant-status.enum.d.ts +28 -0
  137. package/dist/esm/api/identity/tenant-status.enum.d.ts.map +1 -0
  138. package/dist/esm/api/identity/tenant-status.enum.js +29 -0
  139. package/dist/esm/api/identity/tenant-status.enum.js.map +1 -0
  140. package/dist/esm/enum/index.d.ts +1 -0
  141. package/dist/esm/enum/index.d.ts.map +1 -1
  142. package/dist/esm/enum/index.js +1 -0
  143. package/dist/esm/enum/index.js.map +1 -1
  144. package/dist/esm/enum/user-permission.enum.d.ts +72 -0
  145. package/dist/esm/enum/user-permission.enum.d.ts.map +1 -0
  146. package/dist/esm/enum/user-permission.enum.js +84 -0
  147. package/dist/esm/enum/user-permission.enum.js.map +1 -0
  148. package/dist/esm/type/api-response.type.d.ts +24 -28
  149. package/dist/esm/type/api-response.type.d.ts.map +1 -1
  150. package/dist/esm/type/index.d.ts +1 -0
  151. package/dist/esm/type/index.d.ts.map +1 -1
  152. package/dist/esm/type/index.js +1 -0
  153. package/dist/esm/type/index.js.map +1 -1
  154. package/dist/esm/type/iso-date-time.type.d.ts +17 -0
  155. package/dist/esm/type/iso-date-time.type.d.ts.map +1 -0
  156. package/dist/esm/type/iso-date-time.type.js +2 -0
  157. package/dist/esm/type/iso-date-time.type.js.map +1 -0
  158. package/package.json +22 -2
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Every action a principal can be granted in an Iveri tenant, across every service.
3
+ *
4
+ * A permission is a **contract**, not an implementation detail: `iveri-identity-api` stores
5
+ * members on role rows and resolves them into access tokens, every other service reads them
6
+ * out of that token to authorize a request, and the frontend's `<RequirePermission>` branches
7
+ * on the same values. A member's wire value therefore never changes, and a member is never
8
+ * removed while issued tokens can still carry it — removing one silently downgrades every
9
+ * live session holding it. Adding one is a minor version.
10
+ *
11
+ * **One catalogue for the whole platform, deliberately.** Identity validates custom-role input
12
+ * against this list, so a permission it has never heard of cannot be granted. A service that
13
+ * defined its own enum locally would find its permissions unassignable.
14
+ *
15
+ * Values are `<resource>:<action>` — or `<service>:<resource>:<action>` where a resource name
16
+ * would otherwise collide across services — lowercase, so a token payload is readable in a
17
+ * log and a wildcard match (`role:*`) stays possible if we ever need one.
18
+ */
19
+ export declare enum UserPermission {
20
+ TENANT_READ = "tenant:read",
21
+ TENANT_UPDATE = "tenant:update",
22
+ /** Schedules the tenant for deletion. Owner-only; there is no undo path built yet. */
23
+ TENANT_DELETE = "tenant:delete",
24
+ USER_READ = "user:read",
25
+ USER_INVITE = "user:invite",
26
+ USER_UPDATE = "user:update",
27
+ USER_REMOVE = "user:remove",
28
+ MEMBERSHIP_READ = "membership:read",
29
+ /** Suspend or reactivate someone's access without deleting their account. */
30
+ MEMBERSHIP_UPDATE = "membership:update",
31
+ /**
32
+ * Change which roles a membership holds. Separate from `MEMBERSHIP_UPDATE` because
33
+ * granting roles is privilege escalation and deserves its own gate.
34
+ */
35
+ MEMBERSHIP_ASSIGN_ROLE = "membership:assign-role",
36
+ ROLE_READ = "role:read",
37
+ ROLE_CREATE = "role:create",
38
+ ROLE_UPDATE = "role:update",
39
+ ROLE_DELETE = "role:delete",
40
+ API_KEY_READ = "api-key:read",
41
+ API_KEY_ISSUE = "api-key:issue",
42
+ API_KEY_REVOKE = "api-key:revoke",
43
+ /** Read endpoint configuration. Never exposes the signing secret. */
44
+ CONDUIT_ENDPOINT_READ = "conduit:endpoint:read",
45
+ CONDUIT_ENDPOINT_CREATE = "conduit:endpoint:create",
46
+ CONDUIT_ENDPOINT_UPDATE = "conduit:endpoint:update",
47
+ CONDUIT_ENDPOINT_DELETE = "conduit:endpoint:delete",
48
+ /**
49
+ * List and read captured requests, **including their raw bodies and headers**. Captures
50
+ * hold whatever a provider sent — order details, message contents, personal data — so
51
+ * this is closer to a data-export permission than a config one.
52
+ */
53
+ CONDUIT_CAPTURE_READ = "conduit:capture:read",
54
+ CONDUIT_CAPTURE_DELETE = "conduit:capture:delete",
55
+ /**
56
+ * Resend a captured request to an arbitrary URL. Separate from `CONDUIT_CAPTURE_READ`
57
+ * because it makes an outbound request from our infrastructure with a body the caller
58
+ * controls, which is a materially different power from reading a row.
59
+ */
60
+ CONDUIT_REPLAY_EXECUTE = "conduit:replay:execute",
61
+ CONDUIT_PROVIDER_READ = "conduit:provider:read",
62
+ /** Define or amend a custom provider manifest — signature scheme, headers, handshake. */
63
+ CONDUIT_PROVIDER_MANAGE = "conduit:provider:manage"
64
+ }
65
+ /**
66
+ * Every member, for seeding the owner role and validating custom-role input.
67
+ *
68
+ * Frozen because it is shared mutable state in a browser bundle otherwise: one caller sorting
69
+ * it in place reorders it for everyone.
70
+ */
71
+ export declare const ALL_USER_PERMISSIONS: readonly UserPermission[];
72
+ //# sourceMappingURL=user-permission.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-permission.enum.d.ts","sourceRoot":"","sources":["../../../src/enum/user-permission.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,oBAAY,cAAc;IAItB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,sFAAsF;IACtF,aAAa,kBAAkB;IAG/B,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAG3B,eAAe,oBAAoB;IACnC,6EAA6E;IAC7E,iBAAiB,sBAAsB;IACvC;;;OAGG;IACH,sBAAsB,2BAA2B;IAGjD,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAG3B,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,cAAc,mBAAmB;IAKjC,qEAAqE;IACrE,qBAAqB,0BAA0B;IAC/C,uBAAuB,4BAA4B;IACnD,uBAAuB,4BAA4B;IACnD,uBAAuB,4BAA4B;IAGnD;;;;OAIG;IACH,oBAAoB,yBAAyB;IAC7C,sBAAsB,2BAA2B;IAGjD;;;;OAIG;IACH,sBAAsB,2BAA2B;IAGjD,qBAAqB,0BAA0B;IAC/C,yFAAyF;IACzF,uBAAuB,4BAA4B;CACtD;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,cAAc,EAAiD,CAAC"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ALL_USER_PERMISSIONS = exports.UserPermission = void 0;
4
+ /**
5
+ * Every action a principal can be granted in an Iveri tenant, across every service.
6
+ *
7
+ * A permission is a **contract**, not an implementation detail: `iveri-identity-api` stores
8
+ * members on role rows and resolves them into access tokens, every other service reads them
9
+ * out of that token to authorize a request, and the frontend's `<RequirePermission>` branches
10
+ * on the same values. A member's wire value therefore never changes, and a member is never
11
+ * removed while issued tokens can still carry it — removing one silently downgrades every
12
+ * live session holding it. Adding one is a minor version.
13
+ *
14
+ * **One catalogue for the whole platform, deliberately.** Identity validates custom-role input
15
+ * against this list, so a permission it has never heard of cannot be granted. A service that
16
+ * defined its own enum locally would find its permissions unassignable.
17
+ *
18
+ * Values are `<resource>:<action>` — or `<service>:<resource>:<action>` where a resource name
19
+ * would otherwise collide across services — lowercase, so a token payload is readable in a
20
+ * log and a wildcard match (`role:*`) stays possible if we ever need one.
21
+ */
22
+ var UserPermission;
23
+ (function (UserPermission) {
24
+ // ══ iveri-identity-api ═══════════════════════════════════════════════════
25
+ // ── Tenant ──────────────────────────────────────────────────────────────
26
+ UserPermission["TENANT_READ"] = "tenant:read";
27
+ UserPermission["TENANT_UPDATE"] = "tenant:update";
28
+ /** Schedules the tenant for deletion. Owner-only; there is no undo path built yet. */
29
+ UserPermission["TENANT_DELETE"] = "tenant:delete";
30
+ // ── User ────────────────────────────────────────────────────────────────
31
+ UserPermission["USER_READ"] = "user:read";
32
+ UserPermission["USER_INVITE"] = "user:invite";
33
+ UserPermission["USER_UPDATE"] = "user:update";
34
+ UserPermission["USER_REMOVE"] = "user:remove";
35
+ // ── Membership ──────────────────────────────────────────────────────────
36
+ UserPermission["MEMBERSHIP_READ"] = "membership:read";
37
+ /** Suspend or reactivate someone's access without deleting their account. */
38
+ UserPermission["MEMBERSHIP_UPDATE"] = "membership:update";
39
+ /**
40
+ * Change which roles a membership holds. Separate from `MEMBERSHIP_UPDATE` because
41
+ * granting roles is privilege escalation and deserves its own gate.
42
+ */
43
+ UserPermission["MEMBERSHIP_ASSIGN_ROLE"] = "membership:assign-role";
44
+ // ── Role ────────────────────────────────────────────────────────────────
45
+ UserPermission["ROLE_READ"] = "role:read";
46
+ UserPermission["ROLE_CREATE"] = "role:create";
47
+ UserPermission["ROLE_UPDATE"] = "role:update";
48
+ UserPermission["ROLE_DELETE"] = "role:delete";
49
+ // ── API key ─────────────────────────────────────────────────────────────
50
+ UserPermission["API_KEY_READ"] = "api-key:read";
51
+ UserPermission["API_KEY_ISSUE"] = "api-key:issue";
52
+ UserPermission["API_KEY_REVOKE"] = "api-key:revoke";
53
+ // ══ conduit-api ══════════════════════════════════════════════════════════
54
+ // ── Endpoint ────────────────────────────────────────────────────────────
55
+ /** Read endpoint configuration. Never exposes the signing secret. */
56
+ UserPermission["CONDUIT_ENDPOINT_READ"] = "conduit:endpoint:read";
57
+ UserPermission["CONDUIT_ENDPOINT_CREATE"] = "conduit:endpoint:create";
58
+ UserPermission["CONDUIT_ENDPOINT_UPDATE"] = "conduit:endpoint:update";
59
+ UserPermission["CONDUIT_ENDPOINT_DELETE"] = "conduit:endpoint:delete";
60
+ // ── Capture ─────────────────────────────────────────────────────────────
61
+ /**
62
+ * List and read captured requests, **including their raw bodies and headers**. Captures
63
+ * hold whatever a provider sent — order details, message contents, personal data — so
64
+ * this is closer to a data-export permission than a config one.
65
+ */
66
+ UserPermission["CONDUIT_CAPTURE_READ"] = "conduit:capture:read";
67
+ UserPermission["CONDUIT_CAPTURE_DELETE"] = "conduit:capture:delete";
68
+ // ── Replay ──────────────────────────────────────────────────────────────
69
+ /**
70
+ * Resend a captured request to an arbitrary URL. Separate from `CONDUIT_CAPTURE_READ`
71
+ * because it makes an outbound request from our infrastructure with a body the caller
72
+ * controls, which is a materially different power from reading a row.
73
+ */
74
+ UserPermission["CONDUIT_REPLAY_EXECUTE"] = "conduit:replay:execute";
75
+ // ── Provider ────────────────────────────────────────────────────────────
76
+ UserPermission["CONDUIT_PROVIDER_READ"] = "conduit:provider:read";
77
+ /** Define or amend a custom provider manifest — signature scheme, headers, handshake. */
78
+ UserPermission["CONDUIT_PROVIDER_MANAGE"] = "conduit:provider:manage";
79
+ })(UserPermission || (exports.UserPermission = UserPermission = {}));
80
+ /**
81
+ * Every member, for seeding the owner role and validating custom-role input.
82
+ *
83
+ * Frozen because it is shared mutable state in a browser bundle otherwise: one caller sorting
84
+ * it in place reorders it for everyone.
85
+ */
86
+ exports.ALL_USER_PERMISSIONS = Object.freeze(Object.values(UserPermission));
87
+ //# sourceMappingURL=user-permission.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-permission.enum.js","sourceRoot":"","sources":["../../../src/enum/user-permission.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,IAAY,cAkEX;AAlED,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;IAC3E,iEAA+C,CAAA;IAC/C,yFAAyF;IACzF,qEAAmD,CAAA;AACvD,CAAC,EAlEW,cAAc,8BAAd,cAAc,QAkEzB;AAED;;;;;GAKG;AACU,QAAA,oBAAoB,GAA8B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC"}
@@ -1,18 +1,5 @@
1
1
  import type { ErrorCode } from '../enum/error-code.enum.js';
2
2
  import type { Maybe } from './nil.type.js';
3
- /**
4
- * Envelope for a successful HTTP response.
5
- *
6
- * Every service wraps its payload in this shape, so a client can branch on
7
- * `success` before touching anything else and never has to guess whether a
8
- * 200 body is data or an error report.
9
- *
10
- * @typeParam T - the response payload type.
11
- */
12
- export interface ApiSuccessResponse<T> {
13
- success: true;
14
- data: T;
15
- }
16
3
  /**
17
4
  * The error half of {@link ApiErrorResponse}.
18
5
  *
@@ -36,8 +23,30 @@ export interface ApiErrorBody {
36
23
  correlationId?: Maybe<string>;
37
24
  }
38
25
  /**
39
- * Envelope for a failed HTTP response, emitted by the SDK's global exception
40
- * filter for every non-2xx status.
26
+ * Envelope for a failed response, emitted by the SDK's `GlobalExceptionFilter` for every
27
+ * non-2xx status.
28
+ *
29
+ * **Only errors are enveloped.** A success is the bare payload — a tenant response *is* a
30
+ * tenant, not a `{ success, data }` wrapper around one. So `success: false` discriminates a
31
+ * shape the client receives *instead of* its payload, never alongside it:
32
+ *
33
+ * ```ts
34
+ * const body: unknown = await response.json();
35
+ *
36
+ * if (!response.ok) {
37
+ * throw new ApiError(body as ApiErrorResponse);
38
+ * }
39
+ *
40
+ * return body as Tenant;
41
+ * ```
42
+ *
43
+ * This file also declared `ApiSuccessResponse<T>` and a union over the two until 0.3.0.
44
+ * Nothing ever sent it: both `iveri-identity-api` and `conduit-api` register the exception
45
+ * filter and no success interceptor. A type describing a response no service produces is worse
46
+ * than no type at all — reading it, the natural thing to write is `body.data`, which is
47
+ * `undefined` for every call in the application. It was removed rather than made true, because
48
+ * bare payloads were already shipped across two services and a frontend and the envelope added
49
+ * nothing to the HTTP status a client must check regardless.
41
50
  */
42
51
  export interface ApiErrorResponse {
43
52
  success: false;
@@ -47,17 +56,4 @@ export interface ApiErrorResponse {
47
56
  /** Request path that produced the error, without the query string. */
48
57
  path: string;
49
58
  }
50
- /**
51
- * Discriminated union of both envelopes. Narrow on `success`:
52
- *
53
- * ```ts
54
- * if (!response.success) {
55
- * return handle(response.error.code);
56
- * }
57
- * use(response.data);
58
- * ```
59
- *
60
- * @typeParam T - the payload type on the success branch.
61
- */
62
- export type ApiResponse<T> = ApiSuccessResponse<T> | ApiErrorResponse;
63
59
  //# sourceMappingURL=api-response.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-response.type.d.ts","sourceRoot":"","sources":["../../../src/type/api-response.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;;;;GAQG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACjC,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,CAAC,CAAC;CACX;AAED;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IACzB,iFAAiF;IACjF,IAAI,EAAE,SAAS,CAAC;IAEhB,kFAAkF;IAClF,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAEzC;;;OAGG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,YAAY,CAAC;IAEpB,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAC;IAElB,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,kBAAkB,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC"}
1
+ {"version":3,"file":"api-response.type.d.ts","sourceRoot":"","sources":["../../../src/type/api-response.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IACzB,iFAAiF;IACjF,IAAI,EAAE,SAAS,CAAC;IAEhB,kFAAkF;IAClF,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAEzC;;;OAGG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,KAAK,CAAC;IACf,KAAK,EAAE,YAAY,CAAC;IAEpB,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAC;IAElB,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAC;CAChB"}
@@ -1,5 +1,6 @@
1
1
  export * from './api-response.type.js';
2
2
  export * from './cursor-page.type.js';
3
+ export * from './iso-date-time.type.js';
3
4
  export * from './nil.type.js';
4
5
  export * from './paginated.type.js';
5
6
  export * from './uuid.type.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/type/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/type/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC"}
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./api-response.type.js"), exports);
18
18
  __exportStar(require("./cursor-page.type.js"), exports);
19
+ __exportStar(require("./iso-date-time.type.js"), exports);
19
20
  __exportStar(require("./nil.type.js"), exports);
20
21
  __exportStar(require("./paginated.type.js"), exports);
21
22
  __exportStar(require("./uuid.type.js"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/type/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,wDAAsC;AACtC,gDAA8B;AAC9B,sDAAoC;AACpC,iDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/type/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,wDAAsC;AACtC,0DAAwC;AACxC,gDAA8B;AAC9B,sDAAoC;AACpC,iDAA+B"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * An ISO-8601 timestamp as it appears on the wire: `2026-08-02T09:41:17.312Z`.
3
+ *
4
+ * **JSON has no date type**, so every timestamp a service sends is a string, whatever the
5
+ * entity behind it holds. Naming that is not pedantry — it is the single most reliable way to
6
+ * hand-retype a backend response wrongly. A frontend interface declaring `receivedAt: Date`
7
+ * compiles, and every `receivedAt.getTime()` throws at runtime against a value that is really
8
+ * a string. `conduit-admin-web` called this out in a comment and got it right by hand; the
9
+ * point of putting the shapes in this package is that nobody has to.
10
+ *
11
+ * It is an alias, not a branded type, deliberately. A brand would force a cast at every
12
+ * boundary where a string arrives from `JSON.parse` — which is all of them — and buy nothing,
13
+ * since the value genuinely is an unvalidated string until someone parses it. What this alias
14
+ * carries is the instruction: to get a `Date`, write `new Date(value)`.
15
+ */
16
+ export type IsoDateTime = string;
17
+ //# sourceMappingURL=iso-date-time.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iso-date-time.type.d.ts","sourceRoot":"","sources":["../../../src/type/iso-date-time.type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=iso-date-time.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iso-date-time.type.js","sourceRoot":"","sources":["../../../src/type/iso-date-time.type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,70 @@
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 { SignatureVerdict } from './signature-verdict.enum.js';
6
+ /** A capture without its body — one row of the list. */
7
+ export interface CaptureSummary {
8
+ id: UUID;
9
+ endpointId: UUID;
10
+ method: string;
11
+ /** Path after the ingress token. */
12
+ path: string;
13
+ /** Raw query string, without the `?`. */
14
+ queryString: string;
15
+ contentType: Nullable<string>;
16
+ /** Body size in bytes, as received. */
17
+ bodySize: number;
18
+ /** Hex SHA-256 of the body. Compare this against what the provider says it sent. */
19
+ bodySha256: string;
20
+ /** From `x-forwarded-for`. Advisory — a client controls it. */
21
+ sourceIp: Nullable<string>;
22
+ /**
23
+ * Verdict recorded **when the request arrived**. A snapshot: fixing the endpoint's secret
24
+ * does not rewrite it. Re-run the signature route to check against current configuration.
25
+ */
26
+ signatureVerdict: Nullable<SignatureVerdict>;
27
+ /** A provider's URL-verification challenge rather than a real event. */
28
+ isHandshake: boolean;
29
+ receivedAt: IsoDateTime;
30
+ }
31
+ /** A capture with its headers and body. `GET /api/v1/capture/:id`. */
32
+ export interface CaptureDetail extends CaptureSummary {
33
+ /** Every request header, lowercase keys — including the signature headers. */
34
+ headers: Record<string, string | string[]>;
35
+ /**
36
+ * The body as UTF-8 when it decodes cleanly, otherwise `null`.
37
+ *
38
+ * A convenience only. `toString('utf8')` never fails — it substitutes U+FFFD for every
39
+ * invalid sequence — so a gzip or protobuf body would come back as convincing-looking
40
+ * mojibake that no longer hashes to `bodySha256`. Conduit round-trips the decode and sends
41
+ * `null` when it does not survive, which is the honest answer.
42
+ */
43
+ body: Nullable<string>;
44
+ /**
45
+ * The body as base64. **This is the authoritative field.** A webhook body is arbitrary
46
+ * bytes; base64 is the only representation that survives JSON without alteration, and the
47
+ * signed payload is those exact bytes.
48
+ */
49
+ bodyBase64: string;
50
+ /** The body was too large to inline and was read back from a spill file. */
51
+ isSpilled: boolean;
52
+ }
53
+ /** `GET /api/v1/capture`. */
54
+ export type CapturesPage = CursorPage<CaptureSummary>;
55
+ /**
56
+ * Query for `GET /api/v1/capture`.
57
+ *
58
+ * Cursor-paginated, unlike endpoints and providers: captures are appended to while they are
59
+ * being read — every inbound webhook lands at the top of the list, including while an operator
60
+ * pages through it — and offset paging drops or repeats rows under that.
61
+ */
62
+ export interface GetCapturesQuery {
63
+ limit?: number;
64
+ /** Opaque cursor from the previous page's `nextCursor`. Never parse it. */
65
+ after?: Nullable<string>;
66
+ endpointId?: Nullable<UUID>;
67
+ method?: Nullable<string>;
68
+ signatureVerdict?: Nullable<SignatureVerdict>;
69
+ }
70
+ //# sourceMappingURL=capture.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture.type.d.ts","sourceRoot":"","sources":["../../../../src/api/conduit/capture.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,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAEpE,wDAAwD;AACxD,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,IAAI,CAAC;IACT,UAAU,EAAE,IAAI,CAAC;IAEjB,MAAM,EAAE,MAAM,CAAC;IAEf,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IAEb,yCAAyC;IACzC,WAAW,EAAE,MAAM,CAAC;IAEpB,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAE9B,uCAAuC;IACvC,QAAQ,EAAE,MAAM,CAAC;IAEjB,oFAAoF;IACpF,UAAU,EAAE,MAAM,CAAC;IAEnB,+DAA+D;IAC/D,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAE3B;;;OAGG;IACH,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAE7C,wEAAwE;IACxE,WAAW,EAAE,OAAO,CAAC;IAErB,UAAU,EAAE,WAAW,CAAC;CAC3B;AAED,sEAAsE;AACtE,MAAM,WAAW,aAAc,SAAQ,cAAc;IACjD,8EAA8E;IAC9E,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAE3C;;;;;;;OAOG;IACH,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEvB;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB,4EAA4E;IAC5E,SAAS,EAAE,OAAO,CAAC;CACtB;AAED,6BAA6B;AAC7B,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;AAEtD;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,2EAA2E;IAC3E,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAEzB,UAAU,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5B,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1B,gBAAgB,CAAC,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;CACjD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=capture.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capture.type.js","sourceRoot":"","sources":["../../../../src/api/conduit/capture.type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,66 @@
1
+ import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
+ import type { Nullable } from '../../type/nil.type.js';
3
+ import type { Paginated } from '../../type/paginated.type.js';
4
+ import type { UUID } from '../../type/uuid.type.js';
5
+ /**
6
+ * One endpoint on the wire.
7
+ *
8
+ * Carries `hasSigningSecret`, never the secret. Not a masked value, not a last-four hint — the
9
+ * field simply does not exist, so no future change can accidentally start populating it.
10
+ */
11
+ export interface Endpoint {
12
+ id: UUID;
13
+ name: string;
14
+ description: Nullable<string>;
15
+ /** The path segment providers post to. */
16
+ ingressToken: string;
17
+ /**
18
+ * Path to register with the provider. Relative on purpose — the public origin is a tunnel or
19
+ * a load balancer this service cannot see, so the caller prepends its own.
20
+ */
21
+ ingressPath: string;
22
+ providerKey: Nullable<string>;
23
+ /** Whether a signing secret is configured. The secret itself is never returned. */
24
+ hasSigningSecret: boolean;
25
+ /** Whether a handshake verify token is configured. */
26
+ hasVerifyToken: boolean;
27
+ /** Inactive endpoints answer 410 Gone. */
28
+ isActive: boolean;
29
+ createdAt: IsoDateTime;
30
+ updatedAt: IsoDateTime;
31
+ }
32
+ /**
33
+ * `GET /api/v1/endpoint`. Offset-paginated, unlike captures: endpoints are a small, slow-moving
34
+ * collection a customer renders as numbered pages.
35
+ */
36
+ export type EndpointsPage = Paginated<Endpoint>;
37
+ /** `POST /api/v1/endpoint`. */
38
+ export interface CreateEndpointBody {
39
+ name: string;
40
+ description?: Nullable<string>;
41
+ providerKey?: Nullable<string>;
42
+ signingSecret?: Nullable<string>;
43
+ verifyToken?: Nullable<string>;
44
+ }
45
+ /**
46
+ * `PATCH /api/v1/endpoint/:id`.
47
+ *
48
+ * **Secret fields have three states, not two.** Omitting one leaves the stored secret untouched;
49
+ * sending `null` deletes it. A form must therefore never send `''` or `null` where the user
50
+ * meant "I did not change this" — that silently wipes a working signing secret, and the next
51
+ * webhook verifies as `MISSING_SECRET` with nothing to say why.
52
+ */
53
+ export interface UpdateEndpointBody {
54
+ name?: string;
55
+ description?: Nullable<string>;
56
+ providerKey?: Nullable<string>;
57
+ signingSecret?: Nullable<string>;
58
+ verifyToken?: Nullable<string>;
59
+ isActive?: boolean;
60
+ }
61
+ /** Query for `GET /api/v1/endpoint`. */
62
+ export interface GetEndpointsQuery {
63
+ limit?: number;
64
+ offset?: number;
65
+ }
66
+ //# sourceMappingURL=endpoint.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoint.type.d.ts","sourceRoot":"","sources":["../../../../src/api/conduit/endpoint.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,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,IAAI,CAAC;IACT,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAE9B,0CAA0C;IAC1C,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAE9B,mFAAmF;IACnF,gBAAgB,EAAE,OAAO,CAAC;IAE1B,sDAAsD;IACtD,cAAc,EAAE,OAAO,CAAC;IAExB,0CAA0C;IAC1C,QAAQ,EAAE,OAAO,CAAC;IAElB,SAAS,EAAE,WAAW,CAAC;IACvB,SAAS,EAAE,WAAW,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAEhD,+BAA+B;AAC/B,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/B,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/B,aAAa,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAClC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/B,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/B,aAAa,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACjC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wCAAwC;AACxC,MAAM,WAAW,iBAAiB;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=endpoint.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoint.type.js","sourceRoot":"","sources":["../../../../src/api/conduit/endpoint.type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * How a provider proves the endpoint is really ours before it will send anything.
3
+ *
4
+ * **Handshakes work in inspect mode, deliberately.** Meta will not save a callback URL that
5
+ * does not echo `hub.challenge`, and Slack will not save one that does not echo `challenge` —
6
+ * so without this, the local developer tool could never be registered with the provider at all,
7
+ * and there would be nothing to capture. It is the one piece of ingress behaviour that is not
8
+ * "store and acknowledge".
9
+ */
10
+ export declare enum HandshakeKind {
11
+ /**
12
+ * Provider sends `GET ?mode=subscribe&verify_token=…&challenge=…` and expects the challenge
13
+ * echoed back as the plain-text body. Meta (WhatsApp, Messenger, Instagram).
14
+ */
15
+ QUERY_ECHO = "query-echo",
16
+ /**
17
+ * Provider sends a JSON body carrying a trigger field and a challenge, and expects the
18
+ * challenge echoed in a JSON response. Slack (`type: url_verification`).
19
+ */
20
+ JSON_ECHO = "json-echo"
21
+ }
22
+ //# sourceMappingURL=handshake-kind.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handshake-kind.enum.d.ts","sourceRoot":"","sources":["../../../../src/api/conduit/handshake-kind.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,oBAAY,aAAa;IACrB;;;OAGG;IACH,UAAU,eAAe;IAEzB;;;OAGG;IACH,SAAS,cAAc;CAC1B"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * How a provider proves the endpoint is really ours before it will send anything.
3
+ *
4
+ * **Handshakes work in inspect mode, deliberately.** Meta will not save a callback URL that
5
+ * does not echo `hub.challenge`, and Slack will not save one that does not echo `challenge` —
6
+ * so without this, the local developer tool could never be registered with the provider at all,
7
+ * and there would be nothing to capture. It is the one piece of ingress behaviour that is not
8
+ * "store and acknowledge".
9
+ */
10
+ export var HandshakeKind;
11
+ (function (HandshakeKind) {
12
+ /**
13
+ * Provider sends `GET ?mode=subscribe&verify_token=…&challenge=…` and expects the challenge
14
+ * echoed back as the plain-text body. Meta (WhatsApp, Messenger, Instagram).
15
+ */
16
+ HandshakeKind["QUERY_ECHO"] = "query-echo";
17
+ /**
18
+ * Provider sends a JSON body carrying a trigger field and a challenge, and expects the
19
+ * challenge echoed in a JSON response. Slack (`type: url_verification`).
20
+ */
21
+ HandshakeKind["JSON_ECHO"] = "json-echo";
22
+ })(HandshakeKind || (HandshakeKind = {}));
23
+ //# sourceMappingURL=handshake-kind.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handshake-kind.enum.js","sourceRoot":"","sources":["../../../../src/api/conduit/handshake-kind.enum.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,aAYX;AAZD,WAAY,aAAa;IACrB;;;OAGG;IACH,0CAAyB,CAAA;IAEzB;;;OAGG;IACH,wCAAuB,CAAA;AAC3B,CAAC,EAZW,aAAa,KAAb,aAAa,QAYxB"}
@@ -0,0 +1,11 @@
1
+ export * from './capture.type.js';
2
+ export * from './endpoint.type.js';
3
+ export * from './handshake-kind.enum.js';
4
+ export * from './provider.type.js';
5
+ export * from './replay.type.js';
6
+ export * from './signature-algorithm.enum.js';
7
+ export * from './signature-encoding.enum.js';
8
+ export * from './signature-header-scheme.enum.js';
9
+ export * from './signature-verdict.enum.js';
10
+ export * from './signature.type.js';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/api/conduit/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,11 @@
1
+ export * from './capture.type.js';
2
+ export * from './endpoint.type.js';
3
+ export * from './handshake-kind.enum.js';
4
+ export * from './provider.type.js';
5
+ export * from './replay.type.js';
6
+ export * from './signature-algorithm.enum.js';
7
+ export * from './signature-encoding.enum.js';
8
+ export * from './signature-header-scheme.enum.js';
9
+ export * from './signature-verdict.enum.js';
10
+ export * from './signature.type.js';
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/conduit/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC"}