@namera-ai/api 0.0.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 (105) hide show
  1. package/README.md +58 -0
  2. package/dist/common.js +13 -0
  3. package/dist/common.js.map +1 -0
  4. package/dist/index.d.ts +32 -0
  5. package/dist/index.d.ts.map +1 -0
  6. package/dist/index.js +40 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/middlewares/admin.d.ts +25 -0
  9. package/dist/middlewares/admin.d.ts.map +1 -0
  10. package/dist/middlewares/admin.js +18 -0
  11. package/dist/middlewares/admin.js.map +1 -0
  12. package/dist/middlewares/auth.d.ts +640 -0
  13. package/dist/middlewares/auth.d.ts.map +1 -0
  14. package/dist/middlewares/auth.js +26 -0
  15. package/dist/middlewares/auth.js.map +1 -0
  16. package/dist/middlewares/index.d.ts +3 -0
  17. package/dist/routes/address-metadata.d.ts +147 -0
  18. package/dist/routes/address-metadata.d.ts.map +1 -0
  19. package/dist/routes/address-metadata.js +24 -0
  20. package/dist/routes/address-metadata.js.map +1 -0
  21. package/dist/routes/api-key.d.ts +864 -0
  22. package/dist/routes/api-key.d.ts.map +1 -0
  23. package/dist/routes/api-key.js +31 -0
  24. package/dist/routes/api-key.js.map +1 -0
  25. package/dist/routes/auth/core/index.d.ts +4 -0
  26. package/dist/routes/auth/core/magic-link.d.ts +34 -0
  27. package/dist/routes/auth/core/magic-link.d.ts.map +1 -0
  28. package/dist/routes/auth/core/magic-link.js +25 -0
  29. package/dist/routes/auth/core/magic-link.js.map +1 -0
  30. package/dist/routes/auth/core/session.d.ts +805 -0
  31. package/dist/routes/auth/core/session.d.ts.map +1 -0
  32. package/dist/routes/auth/core/session.js +31 -0
  33. package/dist/routes/auth/core/session.js.map +1 -0
  34. package/dist/routes/auth/core/user.d.ts +45 -0
  35. package/dist/routes/auth/core/user.d.ts.map +1 -0
  36. package/dist/routes/auth/core/user.js +15 -0
  37. package/dist/routes/auth/core/user.js.map +1 -0
  38. package/dist/routes/auth/index.d.ts +11 -0
  39. package/dist/routes/auth/notification.d.ts +392 -0
  40. package/dist/routes/auth/notification.d.ts.map +1 -0
  41. package/dist/routes/auth/notification.js +40 -0
  42. package/dist/routes/auth/notification.js.map +1 -0
  43. package/dist/routes/auth/oauth.d.ts +1347 -0
  44. package/dist/routes/auth/oauth.d.ts.map +1 -0
  45. package/dist/routes/auth/oauth.js +62 -0
  46. package/dist/routes/auth/oauth.js.map +1 -0
  47. package/dist/routes/auth/organization/index.d.ts +4 -0
  48. package/dist/routes/auth/organization/invitation.d.ts +400 -0
  49. package/dist/routes/auth/organization/invitation.d.ts.map +1 -0
  50. package/dist/routes/auth/organization/invitation.js +55 -0
  51. package/dist/routes/auth/organization/invitation.js.map +1 -0
  52. package/dist/routes/auth/organization/members.d.ts +250 -0
  53. package/dist/routes/auth/organization/members.d.ts.map +1 -0
  54. package/dist/routes/auth/organization/members.js +37 -0
  55. package/dist/routes/auth/organization/members.js.map +1 -0
  56. package/dist/routes/auth/organization/organization.d.ts +196 -0
  57. package/dist/routes/auth/organization/organization.d.ts.map +1 -0
  58. package/dist/routes/auth/organization/organization.js +31 -0
  59. package/dist/routes/auth/organization/organization.js.map +1 -0
  60. package/dist/routes/beta-invite.d.ts +24 -0
  61. package/dist/routes/beta-invite.d.ts.map +1 -0
  62. package/dist/routes/beta-invite.js +20 -0
  63. package/dist/routes/beta-invite.js.map +1 -0
  64. package/dist/routes/billing.d.ts +34 -0
  65. package/dist/routes/billing.d.ts.map +1 -0
  66. package/dist/routes/billing.js +14 -0
  67. package/dist/routes/billing.js.map +1 -0
  68. package/dist/routes/dashboard.d.ts +58 -0
  69. package/dist/routes/dashboard.d.ts.map +1 -0
  70. package/dist/routes/dashboard.js +14 -0
  71. package/dist/routes/dashboard.js.map +1 -0
  72. package/dist/routes/ens.d.ts +14 -0
  73. package/dist/routes/ens.d.ts.map +1 -0
  74. package/dist/routes/ens.js +15 -0
  75. package/dist/routes/ens.js.map +1 -0
  76. package/dist/routes/execution.d.ts +816 -0
  77. package/dist/routes/execution.d.ts.map +1 -0
  78. package/dist/routes/execution.js +50 -0
  79. package/dist/routes/execution.js.map +1 -0
  80. package/dist/routes/health.d.ts +10 -0
  81. package/dist/routes/health.d.ts.map +1 -0
  82. package/dist/routes/health.js +10 -0
  83. package/dist/routes/health.js.map +1 -0
  84. package/dist/routes/index.d.ts +23 -0
  85. package/dist/routes/portfolio.d.ts +94 -0
  86. package/dist/routes/portfolio.d.ts.map +1 -0
  87. package/dist/routes/portfolio.js +16 -0
  88. package/dist/routes/portfolio.js.map +1 -0
  89. package/dist/routes/session-key.d.ts +1844 -0
  90. package/dist/routes/session-key.d.ts.map +1 -0
  91. package/dist/routes/session-key.js +55 -0
  92. package/dist/routes/session-key.js.map +1 -0
  93. package/dist/routes/signature.d.ts +195 -0
  94. package/dist/routes/signature.d.ts.map +1 -0
  95. package/dist/routes/signature.js +38 -0
  96. package/dist/routes/signature.js.map +1 -0
  97. package/dist/routes/waitlist.d.ts +42 -0
  98. package/dist/routes/waitlist.d.ts.map +1 -0
  99. package/dist/routes/waitlist.js +27 -0
  100. package/dist/routes/waitlist.js.map +1 -0
  101. package/dist/routes/wallet.d.ts +547 -0
  102. package/dist/routes/wallet.d.ts.map +1 -0
  103. package/dist/routes/wallet.js +50 -0
  104. package/dist/routes/wallet.js.map +1 -0
  105. package/package.json +61 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.d.ts","names":[],"sources":["../../../../src/routes/auth/core/session.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAca,qBAAqB"}
@@ -0,0 +1,31 @@
1
+ import { CommonErrors } from "../../../common.js";
2
+ import { Authorization } from "../../../middlewares/auth.js";
3
+ import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
4
+ import { Schema } from "effect";
5
+ import { CurrentActorResponse, ListSessionsResponse, RevokeSessionRequest, RevokeSessionResponse, UserActorData } from "@namera-ai/protocol/dto";
6
+
7
+ //#region src/routes/auth/core/session.ts
8
+ var SessionGroup = class extends HttpApiGroup.make("session").add(HttpApiEndpoint.get("currentActor", "/actor", {
9
+ success: CurrentActorResponse,
10
+ error: CommonErrors
11
+ }).annotate(OpenApi.Summary, "Get the current user or delegated actor")).add(HttpApiEndpoint.get("currentUser", "/me", {
12
+ success: UserActorData,
13
+ error: CommonErrors
14
+ }).annotate(OpenApi.Summary, "Get the current authenticated actor")).add(HttpApiEndpoint.get("listSessions", "/sessions", {
15
+ success: ListSessionsResponse,
16
+ error: CommonErrors
17
+ }).annotate(OpenApi.Summary, "List active sessions")).add(HttpApiEndpoint.delete("logout", "/sessions/logout", {
18
+ success: Schema.Void,
19
+ error: CommonErrors
20
+ }).annotate(OpenApi.Summary, "Log out the current session")).add(HttpApiEndpoint.post("revokeOtherSessions", "/sessions/revoke", {
21
+ success: Schema.Int,
22
+ error: CommonErrors
23
+ }).annotate(OpenApi.Summary, "Revoke every other active session")).add(HttpApiEndpoint.delete("revokeSession", "/sessions/:sessionId", {
24
+ params: RevokeSessionRequest,
25
+ success: RevokeSessionResponse,
26
+ error: CommonErrors
27
+ }).annotate(OpenApi.Summary, "Revoke one user session")).annotate(OpenApi.Description, "Authenticated session management").middleware(Authorization).prefix("/auth/session") {};
28
+
29
+ //#endregion
30
+ export { SessionGroup };
31
+ //# sourceMappingURL=session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session.js","names":[],"sources":["../../../../src/routes/auth/core/session.ts"],"sourcesContent":["import { Schema } from \"effect\";\nimport { HttpApiEndpoint, HttpApiGroup, OpenApi } from \"effect/unstable/httpapi\";\n\nimport {\n ListSessionsResponse,\n CurrentActorResponse,\n RevokeSessionRequest,\n RevokeSessionResponse,\n UserActorData,\n} from \"@namera-ai/protocol/dto\";\n\nimport { CommonErrors } from \"#/common\";\nimport { Authorization } from \"#/middlewares/index\";\n\nexport class SessionGroup extends HttpApiGroup.make(\"session\")\n .add(\n HttpApiEndpoint.get(\"currentActor\", \"/actor\", {\n success: CurrentActorResponse,\n error: CommonErrors,\n }).annotate(OpenApi.Summary, \"Get the current user or delegated actor\"),\n )\n .add(\n HttpApiEndpoint.get(\"currentUser\", \"/me\", {\n success: UserActorData,\n error: CommonErrors,\n }).annotate(OpenApi.Summary, \"Get the current authenticated actor\"),\n )\n .add(\n HttpApiEndpoint.get(\"listSessions\", \"/sessions\", {\n success: ListSessionsResponse,\n error: CommonErrors,\n }).annotate(OpenApi.Summary, \"List active sessions\"),\n )\n .add(\n HttpApiEndpoint.delete(\"logout\", \"/sessions/logout\", {\n success: Schema.Void,\n error: CommonErrors,\n }).annotate(OpenApi.Summary, \"Log out the current session\"),\n )\n .add(\n HttpApiEndpoint.post(\"revokeOtherSessions\", \"/sessions/revoke\", {\n success: Schema.Int,\n error: CommonErrors,\n }).annotate(OpenApi.Summary, \"Revoke every other active session\"),\n )\n .add(\n HttpApiEndpoint.delete(\"revokeSession\", \"/sessions/:sessionId\", {\n params: RevokeSessionRequest,\n success: RevokeSessionResponse,\n error: CommonErrors,\n }).annotate(OpenApi.Summary, \"Revoke one user session\"),\n )\n .annotate(OpenApi.Description, \"Authenticated session management\")\n .middleware(Authorization)\n .prefix(\"/auth/session\") {}\n"],"mappings":";;;;;;;AAcA,IAAa,eAAb,cAAkC,aAAa,KAAK,SAAS,CAAC,CAC3D,IACC,gBAAgB,IAAI,gBAAgB,UAAU;CAC5C,SAAS;CACT,OAAO;AACT,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,yCAAyC,CACxE,CAAC,CACA,IACC,gBAAgB,IAAI,eAAe,OAAO;CACxC,SAAS;CACT,OAAO;AACT,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,qCAAqC,CACpE,CAAC,CACA,IACC,gBAAgB,IAAI,gBAAgB,aAAa;CAC/C,SAAS;CACT,OAAO;AACT,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,sBAAsB,CACrD,CAAC,CACA,IACC,gBAAgB,OAAO,UAAU,oBAAoB;CACnD,SAAS,OAAO;CAChB,OAAO;AACT,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,6BAA6B,CAC5D,CAAC,CACA,IACC,gBAAgB,KAAK,uBAAuB,oBAAoB;CAC9D,SAAS,OAAO;CAChB,OAAO;AACT,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,mCAAmC,CAClE,CAAC,CACA,IACC,gBAAgB,OAAO,iBAAiB,wBAAwB;CAC9D,QAAQ;CACR,SAAS;CACT,OAAO;AACT,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,yBAAyB,CACxD,CAAC,CACA,SAAS,QAAQ,aAAa,kCAAkC,CAAC,CACjE,WAAW,aAAa,CAAC,CACzB,OAAO,eAAe,CAAC,CAAC,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { Authorization } from "../../../middlewares/auth.js";
2
+ import "../../../middlewares/index.js";
3
+ import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
4
+ //#region src/routes/auth/core/user.d.ts
5
+ declare const UserGroup_base: HttpApiGroup.HttpApiGroup<"user", HttpApiEndpoint.HttpApiEndpoint<"update", "POST", "/auth/user/update-user", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
6
+ readonly metadata: import("effect/Schema").Struct<{
7
+ readonly version: import("effect/Schema").Literal<1>;
8
+ readonly name: import("effect/Schema").optionalKey<import("effect/Schema").String>;
9
+ readonly image: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
10
+ readonly type: import("effect/Schema").Literal<"icon">;
11
+ readonly value: import("effect/Schema").String;
12
+ readonly color: import("effect/Schema").String;
13
+ }>, import("effect/Schema").Struct<{
14
+ readonly type: import("effect/Schema").Literal<"emoji">;
15
+ readonly value: import("effect/Schema").String;
16
+ }>, import("effect/Schema").Struct<{
17
+ readonly type: import("effect/Schema").Literal<"image">;
18
+ readonly value: import("effect/Schema").String;
19
+ }>]>>;
20
+ }>;
21
+ }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
22
+ readonly metadata: import("effect/Schema").Struct<{
23
+ readonly version: import("effect/Schema").Literal<1>;
24
+ readonly name: import("effect/Schema").optionalKey<import("effect/Schema").String>;
25
+ readonly image: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
26
+ readonly type: import("effect/Schema").Literal<"icon">;
27
+ readonly value: import("effect/Schema").String;
28
+ readonly color: import("effect/Schema").String;
29
+ }>, import("effect/Schema").Struct<{
30
+ readonly type: import("effect/Schema").Literal<"emoji">;
31
+ readonly value: import("effect/Schema").String;
32
+ }>, import("effect/Schema").Struct<{
33
+ readonly type: import("effect/Schema").Literal<"image">;
34
+ readonly value: import("effect/Schema").String;
35
+ }>]>>;
36
+ }>;
37
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "UserId">;
38
+ readonly lastLoginAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
39
+ readonly email: import("effect/Schema").brand<import("effect/Schema").decodeTo<import("effect/Schema").toType<import("effect/Schema").String>, import("effect/Schema").String, never, never>, "Email">;
40
+ readonly emailVerified: import("effect/Schema").Boolean;
41
+ }>>, import("effect/Schema").toCodecJson<import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").Forbidden> | import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError> | typeof import("@namera-ai/protocol").RateLimitExceeded>, Authorization, never>, false>;
42
+ declare class UserGroup extends UserGroup_base {}
43
+ //#endregion
44
+ export { UserGroup };
45
+ //# sourceMappingURL=user.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.d.ts","names":[],"sources":["../../../../src/routes/auth/core/user.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAOa,kBAAkB"}
@@ -0,0 +1,15 @@
1
+ import { CommonErrors } from "../../../common.js";
2
+ import { Authorization } from "../../../middlewares/auth.js";
3
+ import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
4
+ import { UpdateUserRequest, UpdateUserResponse } from "@namera-ai/protocol/dto";
5
+
6
+ //#region src/routes/auth/core/user.ts
7
+ var UserGroup = class extends HttpApiGroup.make("user").add(HttpApiEndpoint.post("update", "/update-user", {
8
+ error: CommonErrors,
9
+ payload: UpdateUserRequest,
10
+ success: UpdateUserResponse
11
+ }).annotate(OpenApi.Summary, "Update the current user profile")).annotate(OpenApi.Description, "Authenticated user operations").middleware(Authorization).prefix("/auth/user") {};
12
+
13
+ //#endregion
14
+ export { UserGroup };
15
+ //# sourceMappingURL=user.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.js","names":[],"sources":["../../../../src/routes/auth/core/user.ts"],"sourcesContent":["import { HttpApiEndpoint, HttpApiGroup, OpenApi } from \"effect/unstable/httpapi\";\n\nimport { UpdateUserRequest, UpdateUserResponse } from \"@namera-ai/protocol/dto\";\n\nimport { CommonErrors } from \"#/common\";\nimport { Authorization } from \"#/middlewares/index\";\n\nexport class UserGroup extends HttpApiGroup.make(\"user\")\n .add(\n HttpApiEndpoint.post(\"update\", \"/update-user\", {\n error: CommonErrors,\n payload: UpdateUserRequest,\n success: UpdateUserResponse,\n }).annotate(OpenApi.Summary, \"Update the current user profile\"),\n )\n .annotate(OpenApi.Description, \"Authenticated user operations\")\n .middleware(Authorization)\n .prefix(\"/auth/user\") {}\n"],"mappings":";;;;;;AAOA,IAAa,YAAb,cAA+B,aAAa,KAAK,MAAM,CAAC,CACrD,IACC,gBAAgB,KAAK,UAAU,gBAAgB;CAC7C,OAAO;CACP,SAAS;CACT,SAAS;AACX,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,iCAAiC,CAChE,CAAC,CACA,SAAS,QAAQ,aAAa,+BAA+B,CAAC,CAC9D,WAAW,aAAa,CAAC,CACzB,OAAO,YAAY,CAAC,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { MagicLinkGroup } from "./core/magic-link.js";
2
+ import { SessionGroup } from "./core/session.js";
3
+ import { UserGroup } from "./core/user.js";
4
+ import "./core/index.js";
5
+ import { NotificationGroup } from "./notification.js";
6
+ import { OAuthGroup } from "./oauth.js";
7
+ import { InvitationGroup } from "./organization/invitation.js";
8
+ import { MemberGroup } from "./organization/members.js";
9
+ import { OrganizationGroup } from "./organization/organization.js";
10
+ import "./organization/index.js";
11
+ export { InvitationGroup, MagicLinkGroup, MemberGroup, NotificationGroup, OAuthGroup, OrganizationGroup, SessionGroup, UserGroup };
@@ -0,0 +1,392 @@
1
+ import { Authorization } from "../../middlewares/auth.js";
2
+ import "../../middlewares/index.js";
3
+ import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
4
+ //#region src/routes/auth/notification.d.ts
5
+ declare const NotificationGroup_base: HttpApiGroup.HttpApiGroup<"notification", HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/auth/notification/", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
6
+ readonly cursor: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "NotificationId">>;
7
+ }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
8
+ readonly items: import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
9
+ readonly readAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
10
+ readonly receivedAt: import("effect/Schema").DateTimeUtcFromDate;
11
+ readonly notification: import("effect/Schema").Struct<{
12
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationId">;
13
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
14
+ readonly actorId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "ActorId">>;
15
+ readonly idempotencyKey: import("effect/Schema").String;
16
+ readonly correlationId: import("effect/Schema").String;
17
+ readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
18
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
19
+ readonly type: import("effect/Schema").Literal<"auth.new-sign-in">;
20
+ readonly resourceType: import("effect/Schema").Literal<"session">;
21
+ readonly resourceId: import("effect/Schema").brand<import("effect/Schema").String, "SessionId">;
22
+ readonly data: import("effect/Schema").Struct<{
23
+ readonly version: import("effect/Schema").Literal<1>;
24
+ readonly ipAddress: import("effect/Schema").NullOr<import("effect/Schema").String>;
25
+ readonly userAgent: import("effect/Schema").NullOr<import("effect/Schema").String>;
26
+ }>;
27
+ }>;
28
+ }>, import("effect/Schema").Struct<{
29
+ readonly readAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
30
+ readonly receivedAt: import("effect/Schema").DateTimeUtcFromDate;
31
+ readonly notification: import("effect/Schema").Struct<{
32
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationId">;
33
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
34
+ readonly actorId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "ActorId">>;
35
+ readonly idempotencyKey: import("effect/Schema").String;
36
+ readonly correlationId: import("effect/Schema").String;
37
+ readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
38
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
39
+ readonly type: import("effect/Schema").Literal<"organization.invitation.received">;
40
+ readonly resourceType: import("effect/Schema").Literal<"invitation">;
41
+ readonly resourceId: import("effect/Schema").brand<import("effect/Schema").String, "InvitationId">;
42
+ readonly data: import("effect/Schema").Struct<{
43
+ readonly version: import("effect/Schema").Literal<1>;
44
+ }>;
45
+ }>;
46
+ }>, import("effect/Schema").Struct<{
47
+ readonly readAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
48
+ readonly receivedAt: import("effect/Schema").DateTimeUtcFromDate;
49
+ readonly notification: import("effect/Schema").Struct<{
50
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationId">;
51
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
52
+ readonly actorId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "ActorId">>;
53
+ readonly idempotencyKey: import("effect/Schema").String;
54
+ readonly correlationId: import("effect/Schema").String;
55
+ readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
56
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
57
+ readonly type: import("effect/Schema").Literal<"wallet.created">;
58
+ readonly resourceType: import("effect/Schema").Literal<"wallet">;
59
+ readonly resourceId: import("effect/Schema").brand<import("effect/Schema").String, "WalletId">;
60
+ readonly data: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
61
+ readonly version: import("effect/Schema").Literal<1>;
62
+ readonly address: import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "EthereumAddress">;
63
+ readonly implementation: import("effect/Schema").Literal<"alchemy-modular-v2">;
64
+ readonly custody: import("effect/Schema").Literal<"local">;
65
+ }>, import("effect/Schema").Struct<{
66
+ readonly version: import("effect/Schema").Literal<1>;
67
+ readonly address: import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "EthereumAddress">;
68
+ readonly implementation: import("effect/Schema").Literal<"alchemy-modular-v2">;
69
+ readonly custody: import("effect/Schema").Literal<"namera-managed">;
70
+ readonly protectionLevel: import("effect/Schema").Literals<readonly ["software", "hsm"]>;
71
+ }>]>;
72
+ }>;
73
+ }>, import("effect/Schema").Struct<{
74
+ readonly readAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
75
+ readonly receivedAt: import("effect/Schema").DateTimeUtcFromDate;
76
+ readonly notification: import("effect/Schema").Struct<{
77
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationId">;
78
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
79
+ readonly actorId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "ActorId">>;
80
+ readonly idempotencyKey: import("effect/Schema").String;
81
+ readonly correlationId: import("effect/Schema").String;
82
+ readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
83
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
84
+ readonly type: import("effect/Schema").Literal<"session_key.created">;
85
+ readonly resourceType: import("effect/Schema").Literal<"session-key">;
86
+ readonly resourceId: import("effect/Schema").brand<import("effect/Schema").String, "SessionKeyId">;
87
+ readonly data: import("effect/Schema").Struct<{
88
+ readonly version: import("effect/Schema").Literal<1>;
89
+ readonly walletId: import("effect/Schema").brand<import("effect/Schema").String, "WalletId">;
90
+ readonly namespace: import("effect/Schema").Literal<"eip155">;
91
+ readonly policyTypes: import("effect/Schema").$Array<import("effect/Schema").Literals<("evm.contract-access" | "evm.functions-on-contract" | "evm.functions-on-all-contracts" | "evm.account-functions" | "evm.erc20-token-transfer" | "evm.time-window" | "evm.chain-allowlist" | "evm.gas-budget" | "evm.native-spend-limit" | "evm.signature")[]>>;
92
+ }>;
93
+ }>;
94
+ }>, import("effect/Schema").Struct<{
95
+ readonly readAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
96
+ readonly receivedAt: import("effect/Schema").DateTimeUtcFromDate;
97
+ readonly notification: import("effect/Schema").Struct<{
98
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationId">;
99
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
100
+ readonly actorId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "ActorId">>;
101
+ readonly idempotencyKey: import("effect/Schema").String;
102
+ readonly correlationId: import("effect/Schema").String;
103
+ readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
104
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
105
+ readonly type: import("effect/Schema").Literal<"session_key.revoked">;
106
+ readonly resourceType: import("effect/Schema").Literal<"session-key">;
107
+ readonly resourceId: import("effect/Schema").brand<import("effect/Schema").String, "SessionKeyId">;
108
+ readonly data: import("effect/Schema").Struct<{
109
+ readonly version: import("effect/Schema").Literal<1>;
110
+ readonly walletId: import("effect/Schema").brand<import("effect/Schema").String, "WalletId">;
111
+ readonly namespace: import("effect/Schema").Literal<"eip155">;
112
+ readonly revokedGrantCount: import("effect/Schema").Int;
113
+ }>;
114
+ }>;
115
+ }>, import("effect/Schema").Struct<{
116
+ readonly readAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
117
+ readonly receivedAt: import("effect/Schema").DateTimeUtcFromDate;
118
+ readonly notification: import("effect/Schema").Struct<{
119
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationId">;
120
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
121
+ readonly actorId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "ActorId">>;
122
+ readonly idempotencyKey: import("effect/Schema").String;
123
+ readonly correlationId: import("effect/Schema").String;
124
+ readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
125
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
126
+ readonly type: import("effect/Schema").Literal<"api_key.created">;
127
+ readonly resourceType: import("effect/Schema").Literal<"api-key">;
128
+ readonly resourceId: import("effect/Schema").brand<import("effect/Schema").String, "ApiKeyId">;
129
+ readonly data: import("effect/Schema").Struct<{
130
+ readonly version: import("effect/Schema").Literal<1>;
131
+ readonly sessionKeyCount: import("effect/Schema").Int;
132
+ }>;
133
+ }>;
134
+ }>, import("effect/Schema").Struct<{
135
+ readonly readAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
136
+ readonly receivedAt: import("effect/Schema").DateTimeUtcFromDate;
137
+ readonly notification: import("effect/Schema").Struct<{
138
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationId">;
139
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
140
+ readonly actorId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "ActorId">>;
141
+ readonly idempotencyKey: import("effect/Schema").String;
142
+ readonly correlationId: import("effect/Schema").String;
143
+ readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
144
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
145
+ readonly type: import("effect/Schema").Literal<"api_key.revoked">;
146
+ readonly resourceType: import("effect/Schema").Literal<"api-key">;
147
+ readonly resourceId: import("effect/Schema").brand<import("effect/Schema").String, "ApiKeyId">;
148
+ readonly data: import("effect/Schema").Struct<{
149
+ readonly version: import("effect/Schema").Literal<1>;
150
+ readonly sessionKeyCount: import("effect/Schema").Int;
151
+ }>;
152
+ }>;
153
+ }>, import("effect/Schema").Struct<{
154
+ readonly readAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
155
+ readonly receivedAt: import("effect/Schema").DateTimeUtcFromDate;
156
+ readonly notification: import("effect/Schema").Struct<{
157
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationId">;
158
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
159
+ readonly actorId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "ActorId">>;
160
+ readonly idempotencyKey: import("effect/Schema").String;
161
+ readonly correlationId: import("effect/Schema").String;
162
+ readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
163
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
164
+ readonly type: import("effect/Schema").Literal<"execution.confirmed">;
165
+ readonly resourceType: import("effect/Schema").Literal<"execution">;
166
+ readonly resourceId: import("effect/Schema").brand<import("effect/Schema").String, "ExecutionId">;
167
+ readonly data: import("effect/Schema").Struct<{
168
+ readonly version: import("effect/Schema").Literal<1>;
169
+ readonly namespace: import("effect/Schema").Literal<"eip155">;
170
+ readonly chainId: import("effect/Schema").Literals<readonly ["eip155:1", "eip155:10", "eip155:8453", "eip155:42161", "eip155:84532", "eip155:421614", "eip155:11155111", "eip155:11155420"]>;
171
+ readonly transactionHash: import("effect/Schema").brand<import("effect/Schema").brand<import("effect/Schema").TemplateLiteral<readonly ["0x", import("effect/Schema").String]>, "Bytes32">, "TransactionHash">;
172
+ }>;
173
+ }>;
174
+ }>, import("effect/Schema").Struct<{
175
+ readonly readAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
176
+ readonly receivedAt: import("effect/Schema").DateTimeUtcFromDate;
177
+ readonly notification: import("effect/Schema").Struct<{
178
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationId">;
179
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
180
+ readonly actorId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "ActorId">>;
181
+ readonly idempotencyKey: import("effect/Schema").String;
182
+ readonly correlationId: import("effect/Schema").String;
183
+ readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
184
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
185
+ readonly type: import("effect/Schema").Literal<"mcp_authorization.approved">;
186
+ readonly resourceType: import("effect/Schema").Literal<"mcp-authorization">;
187
+ readonly resourceId: import("effect/Schema").brand<import("effect/Schema").String, "OAuthAuthorizationId">;
188
+ readonly data: import("effect/Schema").Struct<{
189
+ readonly version: import("effect/Schema").Literal<1>;
190
+ readonly clientName: import("effect/Schema").NonEmptyString;
191
+ readonly sessionKeyCount: import("effect/Schema").Int;
192
+ }>;
193
+ }>;
194
+ }>, import("effect/Schema").Struct<{
195
+ readonly readAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
196
+ readonly receivedAt: import("effect/Schema").DateTimeUtcFromDate;
197
+ readonly notification: import("effect/Schema").Struct<{
198
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationId">;
199
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
200
+ readonly actorId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "ActorId">>;
201
+ readonly idempotencyKey: import("effect/Schema").String;
202
+ readonly correlationId: import("effect/Schema").String;
203
+ readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
204
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
205
+ readonly type: import("effect/Schema").Literal<"mcp_authorization.revoked">;
206
+ readonly resourceType: import("effect/Schema").Literal<"mcp-authorization">;
207
+ readonly resourceId: import("effect/Schema").brand<import("effect/Schema").String, "OAuthAuthorizationId">;
208
+ readonly data: import("effect/Schema").Struct<{
209
+ readonly version: import("effect/Schema").Literal<1>;
210
+ readonly clientName: import("effect/Schema").NonEmptyString;
211
+ readonly revokedGrantCount: import("effect/Schema").Int;
212
+ }>;
213
+ }>;
214
+ }>, import("effect/Schema").Struct<{
215
+ readonly readAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
216
+ readonly receivedAt: import("effect/Schema").DateTimeUtcFromDate;
217
+ readonly notification: import("effect/Schema").Struct<{
218
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationId">;
219
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
220
+ readonly actorId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "ActorId">>;
221
+ readonly idempotencyKey: import("effect/Schema").String;
222
+ readonly correlationId: import("effect/Schema").String;
223
+ readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
224
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
225
+ readonly type: import("effect/Schema").Literal<"cli_authorization.approved">;
226
+ readonly resourceType: import("effect/Schema").Literal<"cli-authorization">;
227
+ readonly resourceId: import("effect/Schema").brand<import("effect/Schema").String, "OAuthAuthorizationId">;
228
+ readonly data: import("effect/Schema").Struct<{
229
+ readonly version: import("effect/Schema").Literal<1>;
230
+ readonly deviceName: import("effect/Schema").NonEmptyString;
231
+ readonly sessionKeyCount: import("effect/Schema").Int;
232
+ }>;
233
+ }>;
234
+ }>, import("effect/Schema").Struct<{
235
+ readonly readAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
236
+ readonly receivedAt: import("effect/Schema").DateTimeUtcFromDate;
237
+ readonly notification: import("effect/Schema").Struct<{
238
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationId">;
239
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
240
+ readonly actorId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "ActorId">>;
241
+ readonly idempotencyKey: import("effect/Schema").String;
242
+ readonly correlationId: import("effect/Schema").String;
243
+ readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
244
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
245
+ readonly type: import("effect/Schema").Literal<"cli_authorization.revoked">;
246
+ readonly resourceType: import("effect/Schema").Literal<"cli-authorization">;
247
+ readonly resourceId: import("effect/Schema").brand<import("effect/Schema").String, "OAuthAuthorizationId">;
248
+ readonly data: import("effect/Schema").Struct<{
249
+ readonly version: import("effect/Schema").Literal<1>;
250
+ readonly deviceName: import("effect/Schema").NonEmptyString;
251
+ readonly revokedGrantCount: import("effect/Schema").Int;
252
+ }>;
253
+ }>;
254
+ }>]>>;
255
+ readonly nextCursor: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "NotificationId">>;
256
+ }>>, import("effect/Schema").toCodecJson<import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").Forbidden> | import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError> | typeof import("@namera-ai/protocol").RateLimitExceeded>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"unreadCount", "GET", "/auth/notification/unread-count", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
257
+ readonly count: import("effect/Schema").Int;
258
+ }>>, import("effect/Schema").toCodecJson<import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").Forbidden> | import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError> | typeof import("@namera-ai/protocol").RateLimitExceeded>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"markRead", "POST", "/auth/notification/mark-read", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
259
+ readonly notificationId: import("effect/Schema").brand<import("effect/Schema").String, "NotificationId">;
260
+ }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Void>, import("effect/Schema").toCodecJson<import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").Forbidden> | import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError> | typeof import("@namera-ai/protocol").RateLimitExceeded>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"markAllRead", "POST", "/auth/notification/mark-all-read", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
261
+ readonly count: import("effect/Schema").Int;
262
+ }>>, import("effect/Schema").toCodecJson<import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").Forbidden> | import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError> | typeof import("@namera-ai/protocol").RateLimitExceeded>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"archive", "POST", "/auth/notification/archive", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
263
+ readonly notificationId: import("effect/Schema").brand<import("effect/Schema").String, "NotificationId">;
264
+ }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Void>, import("effect/Schema").toCodecJson<import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").Forbidden> | import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError> | typeof import("@namera-ai/protocol").RateLimitExceeded>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"listPreferences", "GET", "/auth/notification/preferences", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
265
+ readonly category: import("effect/Schema").Literal<"product">;
266
+ readonly topic: import("effect/Schema").Literals<readonly ["announcements", "changelog", "newsletter"]>;
267
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
268
+ readonly updatedAt: import("effect/Schema").DateTimeUtcFromDate;
269
+ readonly enabled: import("effect/Schema").Boolean;
270
+ readonly userId: import("effect/Schema").brand<import("effect/Schema").String, "UserId">;
271
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
272
+ readonly channel: import("effect/Schema").Literal<"email">;
273
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationPreferenceId">;
274
+ }>, import("effect/Schema").Struct<{
275
+ readonly category: import("effect/Schema").Literal<"account">;
276
+ readonly topic: import("effect/Schema").Literals<readonly ["activity", "security"]>;
277
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
278
+ readonly updatedAt: import("effect/Schema").DateTimeUtcFromDate;
279
+ readonly enabled: import("effect/Schema").Boolean;
280
+ readonly userId: import("effect/Schema").brand<import("effect/Schema").String, "UserId">;
281
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
282
+ readonly channel: import("effect/Schema").Literal<"email">;
283
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationPreferenceId">;
284
+ }>, import("effect/Schema").Struct<{
285
+ readonly category: import("effect/Schema").Literal<"organization">;
286
+ readonly topic: import("effect/Schema").Literals<readonly ["invitations", "wallets", "session-keys", "api-keys", "executions", "mcp-authorizations", "cli-authorizations"]>;
287
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
288
+ readonly updatedAt: import("effect/Schema").DateTimeUtcFromDate;
289
+ readonly enabled: import("effect/Schema").Boolean;
290
+ readonly userId: import("effect/Schema").brand<import("effect/Schema").String, "UserId">;
291
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
292
+ readonly channel: import("effect/Schema").Literal<"email">;
293
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationPreferenceId">;
294
+ }>, import("effect/Schema").Struct<{
295
+ readonly category: import("effect/Schema").Literal<"billing">;
296
+ readonly topic: import("effect/Schema").Literal<"activity">;
297
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
298
+ readonly updatedAt: import("effect/Schema").DateTimeUtcFromDate;
299
+ readonly enabled: import("effect/Schema").Boolean;
300
+ readonly userId: import("effect/Schema").brand<import("effect/Schema").String, "UserId">;
301
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
302
+ readonly channel: import("effect/Schema").Literal<"email">;
303
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationPreferenceId">;
304
+ }>]>>>, import("effect/Schema").toCodecJson<import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").Forbidden> | import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError> | typeof import("@namera-ai/protocol").RateLimitExceeded>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"updatePreference", "POST", "/auth/notification/preferences/update", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
305
+ readonly category: import("effect/Schema").Literal<"product">;
306
+ readonly topic: import("effect/Schema").Literals<readonly ["announcements", "changelog", "newsletter"]>;
307
+ readonly enabled: import("effect/Schema").Boolean;
308
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
309
+ readonly channel: import("effect/Schema").Literal<"email">;
310
+ }>, import("effect/Schema").Struct<{
311
+ readonly category: import("effect/Schema").Literal<"account">;
312
+ readonly topic: import("effect/Schema").Literals<readonly ["activity", "security"]>;
313
+ readonly enabled: import("effect/Schema").Boolean;
314
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
315
+ readonly channel: import("effect/Schema").Literal<"email">;
316
+ }>, import("effect/Schema").Struct<{
317
+ readonly category: import("effect/Schema").Literal<"organization">;
318
+ readonly topic: import("effect/Schema").Literals<readonly ["invitations", "wallets", "session-keys", "api-keys", "executions", "mcp-authorizations", "cli-authorizations"]>;
319
+ readonly enabled: import("effect/Schema").Boolean;
320
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
321
+ readonly channel: import("effect/Schema").Literal<"email">;
322
+ }>, import("effect/Schema").Struct<{
323
+ readonly category: import("effect/Schema").Literal<"billing">;
324
+ readonly topic: import("effect/Schema").Literal<"activity">;
325
+ readonly enabled: import("effect/Schema").Boolean;
326
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
327
+ readonly channel: import("effect/Schema").Literal<"email">;
328
+ }>]>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
329
+ readonly category: import("effect/Schema").Literal<"product">;
330
+ readonly topic: import("effect/Schema").Literals<readonly ["announcements", "changelog", "newsletter"]>;
331
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
332
+ readonly updatedAt: import("effect/Schema").DateTimeUtcFromDate;
333
+ readonly enabled: import("effect/Schema").Boolean;
334
+ readonly userId: import("effect/Schema").brand<import("effect/Schema").String, "UserId">;
335
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
336
+ readonly channel: import("effect/Schema").Literal<"email">;
337
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationPreferenceId">;
338
+ }>, import("effect/Schema").Struct<{
339
+ readonly category: import("effect/Schema").Literal<"account">;
340
+ readonly topic: import("effect/Schema").Literals<readonly ["activity", "security"]>;
341
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
342
+ readonly updatedAt: import("effect/Schema").DateTimeUtcFromDate;
343
+ readonly enabled: import("effect/Schema").Boolean;
344
+ readonly userId: import("effect/Schema").brand<import("effect/Schema").String, "UserId">;
345
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
346
+ readonly channel: import("effect/Schema").Literal<"email">;
347
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationPreferenceId">;
348
+ }>, import("effect/Schema").Struct<{
349
+ readonly category: import("effect/Schema").Literal<"organization">;
350
+ readonly topic: import("effect/Schema").Literals<readonly ["invitations", "wallets", "session-keys", "api-keys", "executions", "mcp-authorizations", "cli-authorizations"]>;
351
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
352
+ readonly updatedAt: import("effect/Schema").DateTimeUtcFromDate;
353
+ readonly enabled: import("effect/Schema").Boolean;
354
+ readonly userId: import("effect/Schema").brand<import("effect/Schema").String, "UserId">;
355
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
356
+ readonly channel: import("effect/Schema").Literal<"email">;
357
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationPreferenceId">;
358
+ }>, import("effect/Schema").Struct<{
359
+ readonly category: import("effect/Schema").Literal<"billing">;
360
+ readonly topic: import("effect/Schema").Literal<"activity">;
361
+ readonly createdAt: import("effect/Schema").DateTimeUtcFromDate;
362
+ readonly updatedAt: import("effect/Schema").DateTimeUtcFromDate;
363
+ readonly enabled: import("effect/Schema").Boolean;
364
+ readonly userId: import("effect/Schema").brand<import("effect/Schema").String, "UserId">;
365
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
366
+ readonly channel: import("effect/Schema").Literal<"email">;
367
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "NotificationPreferenceId">;
368
+ }>]>>, import("effect/Schema").toCodecJson<import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").Forbidden> | import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError> | typeof import("@namera-ai/protocol").RateLimitExceeded>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"resetPreference", "POST", "/auth/notification/preferences/reset", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
369
+ readonly category: import("effect/Schema").Literal<"product">;
370
+ readonly topic: import("effect/Schema").Literals<readonly ["announcements", "changelog", "newsletter"]>;
371
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
372
+ readonly channel: import("effect/Schema").Literal<"email">;
373
+ }>, import("effect/Schema").Struct<{
374
+ readonly category: import("effect/Schema").Literal<"account">;
375
+ readonly topic: import("effect/Schema").Literals<readonly ["activity", "security"]>;
376
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
377
+ readonly channel: import("effect/Schema").Literal<"email">;
378
+ }>, import("effect/Schema").Struct<{
379
+ readonly category: import("effect/Schema").Literal<"organization">;
380
+ readonly topic: import("effect/Schema").Literals<readonly ["invitations", "wallets", "session-keys", "api-keys", "executions", "mcp-authorizations", "cli-authorizations"]>;
381
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
382
+ readonly channel: import("effect/Schema").Literal<"email">;
383
+ }>, import("effect/Schema").Struct<{
384
+ readonly category: import("effect/Schema").Literal<"billing">;
385
+ readonly topic: import("effect/Schema").Literal<"activity">;
386
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">>;
387
+ readonly channel: import("effect/Schema").Literal<"email">;
388
+ }>]>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Void>, import("effect/Schema").toCodecJson<import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").Forbidden> | import("effect/unstable/httpapi/HttpApiSchema").asNoContent<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError> | typeof import("@namera-ai/protocol").RateLimitExceeded>, Authorization, never>, false>;
389
+ declare class NotificationGroup extends NotificationGroup_base {}
390
+ //#endregion
391
+ export { NotificationGroup };
392
+ //# sourceMappingURL=notification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.d.ts","names":[],"sources":["../../../src/routes/auth/notification.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmBa,0BAA0B"}
@@ -0,0 +1,40 @@
1
+ import { CommonErrors } from "../../common.js";
2
+ import { Authorization } from "../../middlewares/auth.js";
3
+ import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
4
+ import { ListNotificationPreferencesResponse, ListNotificationsRequest, ListNotificationsResponse, MarkAllNotificationsReadResponse, NotificationMutationRequest, NotificationMutationResponse, ResetNotificationPreferenceRequest, ResetNotificationPreferenceResponse, UnreadNotificationCountResponse, UpdateNotificationPreferenceRequest, UpdateNotificationPreferenceResponse } from "@namera-ai/protocol/dto";
5
+
6
+ //#region src/routes/auth/notification.ts
7
+ var NotificationGroup = class extends HttpApiGroup.make("notification").add(HttpApiEndpoint.get("list", "/", {
8
+ query: ListNotificationsRequest,
9
+ success: ListNotificationsResponse,
10
+ error: CommonErrors
11
+ }).annotate(OpenApi.Summary, "List notifications"), HttpApiEndpoint.get("unreadCount", "/unread-count", {
12
+ success: UnreadNotificationCountResponse,
13
+ error: CommonErrors
14
+ }).annotate(OpenApi.Summary, "Get the unread notification count"), HttpApiEndpoint.post("markRead", "/mark-read", {
15
+ payload: NotificationMutationRequest,
16
+ success: NotificationMutationResponse,
17
+ error: CommonErrors
18
+ }).annotate(OpenApi.Summary, "Mark a notification as read"), HttpApiEndpoint.post("markAllRead", "/mark-all-read", {
19
+ success: MarkAllNotificationsReadResponse,
20
+ error: CommonErrors
21
+ }).annotate(OpenApi.Summary, "Mark all notifications as read"), HttpApiEndpoint.post("archive", "/archive", {
22
+ payload: NotificationMutationRequest,
23
+ success: NotificationMutationResponse,
24
+ error: CommonErrors
25
+ }).annotate(OpenApi.Summary, "Archive a notification"), HttpApiEndpoint.get("listPreferences", "/preferences", {
26
+ success: ListNotificationPreferencesResponse,
27
+ error: CommonErrors
28
+ }).annotate(OpenApi.Summary, "List notification preferences"), HttpApiEndpoint.post("updatePreference", "/preferences/update", {
29
+ payload: UpdateNotificationPreferenceRequest,
30
+ success: UpdateNotificationPreferenceResponse,
31
+ error: CommonErrors
32
+ }).annotate(OpenApi.Summary, "Update a notification preference"), HttpApiEndpoint.post("resetPreference", "/preferences/reset", {
33
+ payload: ResetNotificationPreferenceRequest,
34
+ success: ResetNotificationPreferenceResponse,
35
+ error: CommonErrors
36
+ }).annotate(OpenApi.Summary, "Reset a notification preference")).annotate(OpenApi.Description, "Authenticated notification inbox and preferences").middleware(Authorization).prefix("/auth/notification") {};
37
+
38
+ //#endregion
39
+ export { NotificationGroup };
40
+ //# sourceMappingURL=notification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.js","names":[],"sources":["../../../src/routes/auth/notification.ts"],"sourcesContent":["import { HttpApiEndpoint, HttpApiGroup, OpenApi } from \"effect/unstable/httpapi\";\n\nimport {\n ListNotificationPreferencesResponse,\n ListNotificationsRequest,\n ListNotificationsResponse,\n MarkAllNotificationsReadResponse,\n NotificationMutationRequest,\n NotificationMutationResponse,\n ResetNotificationPreferenceRequest,\n ResetNotificationPreferenceResponse,\n UnreadNotificationCountResponse,\n UpdateNotificationPreferenceRequest,\n UpdateNotificationPreferenceResponse,\n} from \"@namera-ai/protocol/dto\";\n\nimport { CommonErrors } from \"#/common\";\nimport { Authorization } from \"#/middlewares/index\";\n\nexport class NotificationGroup extends HttpApiGroup.make(\"notification\")\n .add(\n HttpApiEndpoint.get(\"list\", \"/\", {\n query: ListNotificationsRequest,\n success: ListNotificationsResponse,\n error: CommonErrors,\n }).annotate(OpenApi.Summary, \"List notifications\"),\n HttpApiEndpoint.get(\"unreadCount\", \"/unread-count\", {\n success: UnreadNotificationCountResponse,\n error: CommonErrors,\n }).annotate(OpenApi.Summary, \"Get the unread notification count\"),\n HttpApiEndpoint.post(\"markRead\", \"/mark-read\", {\n payload: NotificationMutationRequest,\n success: NotificationMutationResponse,\n error: CommonErrors,\n }).annotate(OpenApi.Summary, \"Mark a notification as read\"),\n HttpApiEndpoint.post(\"markAllRead\", \"/mark-all-read\", {\n success: MarkAllNotificationsReadResponse,\n error: CommonErrors,\n }).annotate(OpenApi.Summary, \"Mark all notifications as read\"),\n HttpApiEndpoint.post(\"archive\", \"/archive\", {\n payload: NotificationMutationRequest,\n success: NotificationMutationResponse,\n error: CommonErrors,\n }).annotate(OpenApi.Summary, \"Archive a notification\"),\n HttpApiEndpoint.get(\"listPreferences\", \"/preferences\", {\n success: ListNotificationPreferencesResponse,\n error: CommonErrors,\n }).annotate(OpenApi.Summary, \"List notification preferences\"),\n HttpApiEndpoint.post(\"updatePreference\", \"/preferences/update\", {\n payload: UpdateNotificationPreferenceRequest,\n success: UpdateNotificationPreferenceResponse,\n error: CommonErrors,\n }).annotate(OpenApi.Summary, \"Update a notification preference\"),\n HttpApiEndpoint.post(\"resetPreference\", \"/preferences/reset\", {\n payload: ResetNotificationPreferenceRequest,\n success: ResetNotificationPreferenceResponse,\n error: CommonErrors,\n }).annotate(OpenApi.Summary, \"Reset a notification preference\"),\n )\n .annotate(OpenApi.Description, \"Authenticated notification inbox and preferences\")\n .middleware(Authorization)\n .prefix(\"/auth/notification\") {}\n"],"mappings":";;;;;;AAmBA,IAAa,oBAAb,cAAuC,aAAa,KAAK,cAAc,CAAC,CACrE,IACC,gBAAgB,IAAI,QAAQ,KAAK;CAC/B,OAAO;CACP,SAAS;CACT,OAAO;AACT,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,oBAAoB,GACjD,gBAAgB,IAAI,eAAe,iBAAiB;CAClD,SAAS;CACT,OAAO;AACT,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,mCAAmC,GAChE,gBAAgB,KAAK,YAAY,cAAc;CAC7C,SAAS;CACT,SAAS;CACT,OAAO;AACT,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,6BAA6B,GAC1D,gBAAgB,KAAK,eAAe,kBAAkB;CACpD,SAAS;CACT,OAAO;AACT,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,gCAAgC,GAC7D,gBAAgB,KAAK,WAAW,YAAY;CAC1C,SAAS;CACT,SAAS;CACT,OAAO;AACT,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,wBAAwB,GACrD,gBAAgB,IAAI,mBAAmB,gBAAgB;CACrD,SAAS;CACT,OAAO;AACT,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,+BAA+B,GAC5D,gBAAgB,KAAK,oBAAoB,uBAAuB;CAC9D,SAAS;CACT,SAAS;CACT,OAAO;AACT,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,kCAAkC,GAC/D,gBAAgB,KAAK,mBAAmB,sBAAsB;CAC5D,SAAS;CACT,SAAS;CACT,OAAO;AACT,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,iCAAiC,CAChE,CAAC,CACA,SAAS,QAAQ,aAAa,kDAAkD,CAAC,CACjF,WAAW,aAAa,CAAC,CACzB,OAAO,oBAAoB,CAAC,CAAC,CAAC"}