@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,250 @@
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/organization/members.d.ts
5
+ declare const MemberGroup_base: HttpApiGroup.HttpApiGroup<"member", HttpApiEndpoint.HttpApiEndpoint<"listOrgMembers", "GET", "/auth/member/list-org-members", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").$Array<import("effect/Schema").Struct<{
6
+ readonly organizationMember: import("effect/Schema").Struct<{
7
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationMemberId">;
8
+ readonly organizationId: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">;
9
+ readonly userId: import("effect/Schema").brand<import("effect/Schema").String, "UserId">;
10
+ readonly organizationRoleId: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationRoleId">;
11
+ readonly joinedAt: import("effect/Schema").DateTimeUtcFromDate;
12
+ }>;
13
+ readonly user: import("effect/Schema").Struct<{
14
+ readonly metadata: import("effect/Schema").Struct<{
15
+ readonly version: import("effect/Schema").Literal<1>;
16
+ readonly name: import("effect/Schema").optionalKey<import("effect/Schema").String>;
17
+ readonly image: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
18
+ readonly type: import("effect/Schema").Literal<"icon">;
19
+ readonly value: import("effect/Schema").String;
20
+ readonly color: import("effect/Schema").String;
21
+ }>, import("effect/Schema").Struct<{
22
+ readonly type: import("effect/Schema").Literal<"emoji">;
23
+ readonly value: import("effect/Schema").String;
24
+ }>, import("effect/Schema").Struct<{
25
+ readonly type: import("effect/Schema").Literal<"image">;
26
+ readonly value: import("effect/Schema").String;
27
+ }>]>>;
28
+ }>;
29
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "UserId">;
30
+ readonly lastLoginAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
31
+ 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">;
32
+ readonly emailVerified: import("effect/Schema").Boolean;
33
+ }>;
34
+ readonly organizationRole: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
35
+ readonly type: import("effect/Schema").Literal<"system">;
36
+ readonly metadata: import("effect/Schema").Struct<{
37
+ readonly version: import("effect/Schema").Literal<1>;
38
+ readonly name: import("effect/Schema").String;
39
+ readonly logo: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
40
+ readonly type: import("effect/Schema").Literal<"icon">;
41
+ readonly value: import("effect/Schema").String;
42
+ readonly color: import("effect/Schema").String;
43
+ }>, import("effect/Schema").Struct<{
44
+ readonly type: import("effect/Schema").Literal<"emoji">;
45
+ readonly value: import("effect/Schema").String;
46
+ }>, import("effect/Schema").Struct<{
47
+ readonly type: import("effect/Schema").Literal<"image">;
48
+ readonly value: import("effect/Schema").String;
49
+ }>]>>;
50
+ readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
51
+ }>;
52
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationRoleId">;
53
+ readonly systemRoleId: import("effect/Schema").brand<import("effect/Schema").String, "SystemRoleId">;
54
+ readonly key: import("effect/Schema").String;
55
+ readonly permissions: import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["organization:read", "organization:update", "member:read", "member:update", "member:remove", "invitation:read", "invitation:create", "invitation:cancel", "role:read", "role:create", "role:update", "role:delete", "billing:read", "billing:update", "billing:cancel", "wallet:read", "wallet:create", "wallet:update", "session-key:read", "session-key:create", "session-key:revoke", "api-key:read", "api-key:create", "api-key:revoke", "execution:read", "mcp-authorization:read", "mcp-authorization:create", "mcp-authorization:revoke", "cli-authorization:read", "cli-authorization:create", "cli-authorization:revoke"]>>;
56
+ }>, import("effect/Schema").Struct<{
57
+ readonly type: import("effect/Schema").Literal<"custom">;
58
+ readonly metadata: import("effect/Schema").Struct<{
59
+ readonly version: import("effect/Schema").Literal<1>;
60
+ readonly name: import("effect/Schema").String;
61
+ readonly logo: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
62
+ readonly type: import("effect/Schema").Literal<"icon">;
63
+ readonly value: import("effect/Schema").String;
64
+ readonly color: import("effect/Schema").String;
65
+ }>, import("effect/Schema").Struct<{
66
+ readonly type: import("effect/Schema").Literal<"emoji">;
67
+ readonly value: import("effect/Schema").String;
68
+ }>, import("effect/Schema").Struct<{
69
+ readonly type: import("effect/Schema").Literal<"image">;
70
+ readonly value: import("effect/Schema").String;
71
+ }>]>>;
72
+ readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
73
+ }>;
74
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationRoleId">;
75
+ readonly systemRoleId: import("effect/Schema").Null;
76
+ readonly key: import("effect/Schema").String;
77
+ readonly permissions: import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["organization:read", "organization:update", "member:read", "member:update", "member:remove", "invitation:read", "invitation:create", "invitation:cancel", "role:read", "role:create", "role:update", "role:delete", "billing:read", "billing:update", "billing:cancel", "wallet:read", "wallet:create", "wallet:update", "session-key:read", "session-key:create", "session-key:revoke", "api-key:read", "api-key:create", "api-key:revoke", "execution:read", "mcp-authorization:read", "mcp-authorization:create", "mcp-authorization:revoke", "cli-authorization:read", "cli-authorization:create", "cli-authorization:revoke"]>>;
78
+ }>]>;
79
+ }>>>, 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 | typeof import("@namera-ai/protocol").OrganizationNotFoundError | typeof import("@namera-ai/protocol").OrganizationPermissionError>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"listOrgRoles", "GET", "/auth/member/list-org-roles", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
80
+ readonly type: import("effect/Schema").Literal<"system">;
81
+ readonly metadata: import("effect/Schema").Struct<{
82
+ readonly version: import("effect/Schema").Literal<1>;
83
+ readonly name: import("effect/Schema").String;
84
+ readonly logo: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
85
+ readonly type: import("effect/Schema").Literal<"icon">;
86
+ readonly value: import("effect/Schema").String;
87
+ readonly color: import("effect/Schema").String;
88
+ }>, import("effect/Schema").Struct<{
89
+ readonly type: import("effect/Schema").Literal<"emoji">;
90
+ readonly value: import("effect/Schema").String;
91
+ }>, import("effect/Schema").Struct<{
92
+ readonly type: import("effect/Schema").Literal<"image">;
93
+ readonly value: import("effect/Schema").String;
94
+ }>]>>;
95
+ readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
96
+ }>;
97
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationRoleId">;
98
+ readonly systemRoleId: import("effect/Schema").brand<import("effect/Schema").String, "SystemRoleId">;
99
+ readonly key: import("effect/Schema").String;
100
+ readonly permissions: import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["organization:read", "organization:update", "member:read", "member:update", "member:remove", "invitation:read", "invitation:create", "invitation:cancel", "role:read", "role:create", "role:update", "role:delete", "billing:read", "billing:update", "billing:cancel", "wallet:read", "wallet:create", "wallet:update", "session-key:read", "session-key:create", "session-key:revoke", "api-key:read", "api-key:create", "api-key:revoke", "execution:read", "mcp-authorization:read", "mcp-authorization:create", "mcp-authorization:revoke", "cli-authorization:read", "cli-authorization:create", "cli-authorization:revoke"]>>;
101
+ }>, import("effect/Schema").Struct<{
102
+ readonly type: import("effect/Schema").Literal<"custom">;
103
+ readonly metadata: import("effect/Schema").Struct<{
104
+ readonly version: import("effect/Schema").Literal<1>;
105
+ readonly name: import("effect/Schema").String;
106
+ readonly logo: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
107
+ readonly type: import("effect/Schema").Literal<"icon">;
108
+ readonly value: import("effect/Schema").String;
109
+ readonly color: import("effect/Schema").String;
110
+ }>, import("effect/Schema").Struct<{
111
+ readonly type: import("effect/Schema").Literal<"emoji">;
112
+ readonly value: import("effect/Schema").String;
113
+ }>, import("effect/Schema").Struct<{
114
+ readonly type: import("effect/Schema").Literal<"image">;
115
+ readonly value: import("effect/Schema").String;
116
+ }>]>>;
117
+ readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
118
+ }>;
119
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationRoleId">;
120
+ readonly systemRoleId: import("effect/Schema").Null;
121
+ readonly key: import("effect/Schema").String;
122
+ readonly permissions: import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["organization:read", "organization:update", "member:read", "member:update", "member:remove", "invitation:read", "invitation:create", "invitation:cancel", "role:read", "role:create", "role:update", "role:delete", "billing:read", "billing:update", "billing:cancel", "wallet:read", "wallet:create", "wallet:update", "session-key:read", "session-key:create", "session-key:revoke", "api-key:read", "api-key:create", "api-key:revoke", "execution:read", "mcp-authorization:read", "mcp-authorization:create", "mcp-authorization:revoke", "cli-authorization:read", "cli-authorization:create", "cli-authorization:revoke"]>>;
123
+ }>]>>>, 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 | typeof import("@namera-ai/protocol").OrganizationNotFoundError | typeof import("@namera-ai/protocol").OrganizationPermissionError>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"listAssignableRoles", "GET", "/auth/member/list-assignable-roles", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").$Array<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
124
+ readonly type: import("effect/Schema").Literal<"system">;
125
+ readonly metadata: import("effect/Schema").Struct<{
126
+ readonly version: import("effect/Schema").Literal<1>;
127
+ readonly name: import("effect/Schema").String;
128
+ readonly logo: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
129
+ readonly type: import("effect/Schema").Literal<"icon">;
130
+ readonly value: import("effect/Schema").String;
131
+ readonly color: import("effect/Schema").String;
132
+ }>, import("effect/Schema").Struct<{
133
+ readonly type: import("effect/Schema").Literal<"emoji">;
134
+ readonly value: import("effect/Schema").String;
135
+ }>, import("effect/Schema").Struct<{
136
+ readonly type: import("effect/Schema").Literal<"image">;
137
+ readonly value: import("effect/Schema").String;
138
+ }>]>>;
139
+ readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
140
+ }>;
141
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationRoleId">;
142
+ readonly systemRoleId: import("effect/Schema").brand<import("effect/Schema").String, "SystemRoleId">;
143
+ readonly key: import("effect/Schema").String;
144
+ readonly permissions: import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["organization:read", "organization:update", "member:read", "member:update", "member:remove", "invitation:read", "invitation:create", "invitation:cancel", "role:read", "role:create", "role:update", "role:delete", "billing:read", "billing:update", "billing:cancel", "wallet:read", "wallet:create", "wallet:update", "session-key:read", "session-key:create", "session-key:revoke", "api-key:read", "api-key:create", "api-key:revoke", "execution:read", "mcp-authorization:read", "mcp-authorization:create", "mcp-authorization:revoke", "cli-authorization:read", "cli-authorization:create", "cli-authorization:revoke"]>>;
145
+ }>, import("effect/Schema").Struct<{
146
+ readonly type: import("effect/Schema").Literal<"custom">;
147
+ readonly metadata: import("effect/Schema").Struct<{
148
+ readonly version: import("effect/Schema").Literal<1>;
149
+ readonly name: import("effect/Schema").String;
150
+ readonly logo: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
151
+ readonly type: import("effect/Schema").Literal<"icon">;
152
+ readonly value: import("effect/Schema").String;
153
+ readonly color: import("effect/Schema").String;
154
+ }>, import("effect/Schema").Struct<{
155
+ readonly type: import("effect/Schema").Literal<"emoji">;
156
+ readonly value: import("effect/Schema").String;
157
+ }>, import("effect/Schema").Struct<{
158
+ readonly type: import("effect/Schema").Literal<"image">;
159
+ readonly value: import("effect/Schema").String;
160
+ }>]>>;
161
+ readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
162
+ }>;
163
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationRoleId">;
164
+ readonly systemRoleId: import("effect/Schema").Null;
165
+ readonly key: import("effect/Schema").String;
166
+ readonly permissions: import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["organization:read", "organization:update", "member:read", "member:update", "member:remove", "invitation:read", "invitation:create", "invitation:cancel", "role:read", "role:create", "role:update", "role:delete", "billing:read", "billing:update", "billing:cancel", "wallet:read", "wallet:create", "wallet:update", "session-key:read", "session-key:create", "session-key:revoke", "api-key:read", "api-key:create", "api-key:revoke", "execution:read", "mcp-authorization:read", "mcp-authorization:create", "mcp-authorization:revoke", "cli-authorization:read", "cli-authorization:create", "cli-authorization:revoke"]>>;
167
+ }>]>>>, 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 | typeof import("@namera-ai/protocol").OrganizationNotFoundError | typeof import("@namera-ai/protocol").OrganizationPermissionError>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"updateMemberRole", "POST", "/auth/member/update-member-role", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
168
+ readonly organizationMemberId: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationMemberId">;
169
+ readonly organizationRoleId: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationRoleId">;
170
+ }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
171
+ readonly organizationMember: import("effect/Schema").Struct<{
172
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationMemberId">;
173
+ readonly organizationId: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">;
174
+ readonly userId: import("effect/Schema").brand<import("effect/Schema").String, "UserId">;
175
+ readonly organizationRoleId: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationRoleId">;
176
+ readonly joinedAt: import("effect/Schema").DateTimeUtcFromDate;
177
+ }>;
178
+ readonly user: import("effect/Schema").Struct<{
179
+ readonly metadata: import("effect/Schema").Struct<{
180
+ readonly version: import("effect/Schema").Literal<1>;
181
+ readonly name: import("effect/Schema").optionalKey<import("effect/Schema").String>;
182
+ readonly image: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
183
+ readonly type: import("effect/Schema").Literal<"icon">;
184
+ readonly value: import("effect/Schema").String;
185
+ readonly color: import("effect/Schema").String;
186
+ }>, import("effect/Schema").Struct<{
187
+ readonly type: import("effect/Schema").Literal<"emoji">;
188
+ readonly value: import("effect/Schema").String;
189
+ }>, import("effect/Schema").Struct<{
190
+ readonly type: import("effect/Schema").Literal<"image">;
191
+ readonly value: import("effect/Schema").String;
192
+ }>]>>;
193
+ }>;
194
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "UserId">;
195
+ readonly lastLoginAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
196
+ 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">;
197
+ readonly emailVerified: import("effect/Schema").Boolean;
198
+ }>;
199
+ readonly organizationRole: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
200
+ readonly type: import("effect/Schema").Literal<"system">;
201
+ readonly metadata: import("effect/Schema").Struct<{
202
+ readonly version: import("effect/Schema").Literal<1>;
203
+ readonly name: import("effect/Schema").String;
204
+ readonly logo: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
205
+ readonly type: import("effect/Schema").Literal<"icon">;
206
+ readonly value: import("effect/Schema").String;
207
+ readonly color: import("effect/Schema").String;
208
+ }>, import("effect/Schema").Struct<{
209
+ readonly type: import("effect/Schema").Literal<"emoji">;
210
+ readonly value: import("effect/Schema").String;
211
+ }>, import("effect/Schema").Struct<{
212
+ readonly type: import("effect/Schema").Literal<"image">;
213
+ readonly value: import("effect/Schema").String;
214
+ }>]>>;
215
+ readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
216
+ }>;
217
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationRoleId">;
218
+ readonly systemRoleId: import("effect/Schema").brand<import("effect/Schema").String, "SystemRoleId">;
219
+ readonly key: import("effect/Schema").String;
220
+ readonly permissions: import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["organization:read", "organization:update", "member:read", "member:update", "member:remove", "invitation:read", "invitation:create", "invitation:cancel", "role:read", "role:create", "role:update", "role:delete", "billing:read", "billing:update", "billing:cancel", "wallet:read", "wallet:create", "wallet:update", "session-key:read", "session-key:create", "session-key:revoke", "api-key:read", "api-key:create", "api-key:revoke", "execution:read", "mcp-authorization:read", "mcp-authorization:create", "mcp-authorization:revoke", "cli-authorization:read", "cli-authorization:create", "cli-authorization:revoke"]>>;
221
+ }>, import("effect/Schema").Struct<{
222
+ readonly type: import("effect/Schema").Literal<"custom">;
223
+ readonly metadata: import("effect/Schema").Struct<{
224
+ readonly version: import("effect/Schema").Literal<1>;
225
+ readonly name: import("effect/Schema").String;
226
+ readonly logo: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
227
+ readonly type: import("effect/Schema").Literal<"icon">;
228
+ readonly value: import("effect/Schema").String;
229
+ readonly color: import("effect/Schema").String;
230
+ }>, import("effect/Schema").Struct<{
231
+ readonly type: import("effect/Schema").Literal<"emoji">;
232
+ readonly value: import("effect/Schema").String;
233
+ }>, import("effect/Schema").Struct<{
234
+ readonly type: import("effect/Schema").Literal<"image">;
235
+ readonly value: import("effect/Schema").String;
236
+ }>]>>;
237
+ readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
238
+ }>;
239
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationRoleId">;
240
+ readonly systemRoleId: import("effect/Schema").Null;
241
+ readonly key: import("effect/Schema").String;
242
+ readonly permissions: import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["organization:read", "organization:update", "member:read", "member:update", "member:remove", "invitation:read", "invitation:create", "invitation:cancel", "role:read", "role:create", "role:update", "role:delete", "billing:read", "billing:update", "billing:cancel", "wallet:read", "wallet:create", "wallet:update", "session-key:read", "session-key:create", "session-key:revoke", "api-key:read", "api-key:create", "api-key:revoke", "execution:read", "mcp-authorization:read", "mcp-authorization:create", "mcp-authorization:revoke", "cli-authorization:read", "cli-authorization:create", "cli-authorization:revoke"]>>;
243
+ }>]>;
244
+ }>>, 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 | typeof import("@namera-ai/protocol").OrganizationNotFoundError | typeof import("@namera-ai/protocol").OrganizationPermissionError | typeof import("@namera-ai/protocol").OrganizationMemberNotFoundError>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"removeMember", "POST", "/auth/member/remove-member", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
245
+ readonly organizationMemberId: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationMemberId">;
246
+ }>>, 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 | typeof import("@namera-ai/protocol").OrganizationNotFoundError | typeof import("@namera-ai/protocol").OrganizationPermissionError | typeof import("@namera-ai/protocol").OrganizationMemberNotFoundError>, Authorization, never>, false>;
247
+ declare class MemberGroup extends MemberGroup_base {}
248
+ //#endregion
249
+ export { MemberGroup };
250
+ //# sourceMappingURL=members.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"members.d.ts","names":[],"sources":["../../../../src/routes/auth/organization/members.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgBa,oBAAoB"}
@@ -0,0 +1,37 @@
1
+ import { CommonErrors } from "../../../common.js";
2
+ import { Authorization } from "../../../middlewares/auth.js";
3
+ import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi";
4
+ import { OrganizationErrors, OrganizationMemberErrors } from "@namera-ai/protocol";
5
+ import { ListAssignableOrganizationRolesResponse, ListOrganizationMemberResponse, ListOrganizationRolesResponse, RemoveOrganizationMemberRequest, RemoveOrganizationMemberResponse, UpdateOrganizationMemberRoleRequest, UpdateOrganizationMemberRoleResponse } from "@namera-ai/protocol/dto";
6
+
7
+ //#region src/routes/auth/organization/members.ts
8
+ var MemberGroup = class extends HttpApiGroup.make("member").add(HttpApiEndpoint.get("listOrgMembers", "/list-org-members", {
9
+ error: [...OrganizationErrors, ...CommonErrors],
10
+ success: ListOrganizationMemberResponse
11
+ }).annotate(OpenApi.Summary, "List active organization members"), HttpApiEndpoint.get("listOrgRoles", "/list-org-roles", {
12
+ error: [...OrganizationErrors, ...CommonErrors],
13
+ success: ListOrganizationRolesResponse
14
+ }).annotate(OpenApi.Summary, "List roles for the active organization"), HttpApiEndpoint.get("listAssignableRoles", "/list-assignable-roles", {
15
+ error: [...OrganizationErrors, ...CommonErrors],
16
+ success: ListAssignableOrganizationRolesResponse
17
+ }).annotate(OpenApi.Summary, "List roles assignable by the current member"), HttpApiEndpoint.post("updateMemberRole", "/update-member-role", {
18
+ payload: UpdateOrganizationMemberRoleRequest,
19
+ error: [
20
+ ...OrganizationMemberErrors,
21
+ ...OrganizationErrors,
22
+ ...CommonErrors
23
+ ],
24
+ success: UpdateOrganizationMemberRoleResponse
25
+ }).annotate(OpenApi.Summary, "Update an organization member's role"), HttpApiEndpoint.post("removeMember", "/remove-member", {
26
+ payload: RemoveOrganizationMemberRequest,
27
+ error: [
28
+ ...OrganizationMemberErrors,
29
+ ...OrganizationErrors,
30
+ ...CommonErrors
31
+ ],
32
+ success: RemoveOrganizationMemberResponse
33
+ }).annotate(OpenApi.Summary, "Remove an organization member")).annotate(OpenApi.Description, "Organization membership").middleware(Authorization).prefix("/auth/member") {};
34
+
35
+ //#endregion
36
+ export { MemberGroup };
37
+ //# sourceMappingURL=members.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"members.js","names":[],"sources":["../../../../src/routes/auth/organization/members.ts"],"sourcesContent":["import { HttpApiEndpoint, HttpApiGroup, OpenApi } from \"effect/unstable/httpapi\";\n\nimport { OrganizationErrors, OrganizationMemberErrors } from \"@namera-ai/protocol\";\nimport {\n ListAssignableOrganizationRolesResponse,\n ListOrganizationMemberResponse,\n ListOrganizationRolesResponse,\n RemoveOrganizationMemberRequest,\n RemoveOrganizationMemberResponse,\n UpdateOrganizationMemberRoleRequest,\n UpdateOrganizationMemberRoleResponse,\n} from \"@namera-ai/protocol/dto\";\n\nimport { CommonErrors } from \"#/common\";\nimport { Authorization } from \"#/middlewares/index\";\n\nexport class MemberGroup extends HttpApiGroup.make(\"member\")\n .add(\n HttpApiEndpoint.get(\"listOrgMembers\", \"/list-org-members\", {\n error: [...OrganizationErrors, ...CommonErrors],\n success: ListOrganizationMemberResponse,\n }).annotate(OpenApi.Summary, \"List active organization members\"),\n HttpApiEndpoint.get(\"listOrgRoles\", \"/list-org-roles\", {\n error: [...OrganizationErrors, ...CommonErrors],\n success: ListOrganizationRolesResponse,\n }).annotate(OpenApi.Summary, \"List roles for the active organization\"),\n HttpApiEndpoint.get(\"listAssignableRoles\", \"/list-assignable-roles\", {\n error: [...OrganizationErrors, ...CommonErrors],\n success: ListAssignableOrganizationRolesResponse,\n }).annotate(OpenApi.Summary, \"List roles assignable by the current member\"),\n HttpApiEndpoint.post(\"updateMemberRole\", \"/update-member-role\", {\n payload: UpdateOrganizationMemberRoleRequest,\n error: [...OrganizationMemberErrors, ...OrganizationErrors, ...CommonErrors],\n success: UpdateOrganizationMemberRoleResponse,\n }).annotate(OpenApi.Summary, \"Update an organization member's role\"),\n HttpApiEndpoint.post(\"removeMember\", \"/remove-member\", {\n payload: RemoveOrganizationMemberRequest,\n error: [...OrganizationMemberErrors, ...OrganizationErrors, ...CommonErrors],\n success: RemoveOrganizationMemberResponse,\n }).annotate(OpenApi.Summary, \"Remove an organization member\"),\n )\n .annotate(OpenApi.Description, \"Organization membership\")\n .middleware(Authorization)\n .prefix(\"/auth/member\") {}\n"],"mappings":";;;;;;;AAgBA,IAAa,cAAb,cAAiC,aAAa,KAAK,QAAQ,CAAC,CACzD,IACC,gBAAgB,IAAI,kBAAkB,qBAAqB;CACzD,OAAO,CAAC,GAAG,oBAAoB,GAAG,YAAY;CAC9C,SAAS;AACX,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,kCAAkC,GAC/D,gBAAgB,IAAI,gBAAgB,mBAAmB;CACrD,OAAO,CAAC,GAAG,oBAAoB,GAAG,YAAY;CAC9C,SAAS;AACX,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,wCAAwC,GACrE,gBAAgB,IAAI,uBAAuB,0BAA0B;CACnE,OAAO,CAAC,GAAG,oBAAoB,GAAG,YAAY;CAC9C,SAAS;AACX,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,6CAA6C,GAC1E,gBAAgB,KAAK,oBAAoB,uBAAuB;CAC9D,SAAS;CACT,OAAO;EAAC,GAAG;EAA0B,GAAG;EAAoB,GAAG;CAAY;CAC3E,SAAS;AACX,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,sCAAsC,GACnE,gBAAgB,KAAK,gBAAgB,kBAAkB;CACrD,SAAS;CACT,OAAO;EAAC,GAAG;EAA0B,GAAG;EAAoB,GAAG;CAAY;CAC3E,SAAS;AACX,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,+BAA+B,CAC9D,CAAC,CACA,SAAS,QAAQ,aAAa,yBAAyB,CAAC,CACxD,WAAW,aAAa,CAAC,CACzB,OAAO,cAAc,CAAC,CAAC,CAAC"}
@@ -0,0 +1,196 @@
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/organization/organization.d.ts
5
+ declare const OrganizationGroup_base: HttpApiGroup.HttpApiGroup<"organization", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/auth/organization/create-organization", 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").String;
9
+ readonly logo: 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
+ readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
21
+ }>;
22
+ }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
23
+ readonly metadata: import("effect/Schema").Struct<{
24
+ readonly version: import("effect/Schema").Literal<1>;
25
+ readonly name: import("effect/Schema").String;
26
+ readonly logo: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
27
+ readonly type: import("effect/Schema").Literal<"icon">;
28
+ readonly value: import("effect/Schema").String;
29
+ readonly color: import("effect/Schema").String;
30
+ }>, import("effect/Schema").Struct<{
31
+ readonly type: import("effect/Schema").Literal<"emoji">;
32
+ readonly value: import("effect/Schema").String;
33
+ }>, import("effect/Schema").Struct<{
34
+ readonly type: import("effect/Schema").Literal<"image">;
35
+ readonly value: import("effect/Schema").String;
36
+ }>]>>;
37
+ readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
38
+ }>;
39
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">;
40
+ }>>, 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 | typeof import("@namera-ai/protocol").OrganizationNotFoundError | typeof import("@namera-ai/protocol").OrganizationPermissionError>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/auth/organization/list-user-organizations", never, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").$Array<import("effect/Schema").Struct<{
41
+ readonly organization: import("effect/Schema").Struct<{
42
+ readonly metadata: import("effect/Schema").Struct<{
43
+ readonly version: import("effect/Schema").Literal<1>;
44
+ readonly name: import("effect/Schema").String;
45
+ readonly logo: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
46
+ readonly type: import("effect/Schema").Literal<"icon">;
47
+ readonly value: import("effect/Schema").String;
48
+ readonly color: import("effect/Schema").String;
49
+ }>, import("effect/Schema").Struct<{
50
+ readonly type: import("effect/Schema").Literal<"emoji">;
51
+ readonly value: import("effect/Schema").String;
52
+ }>, import("effect/Schema").Struct<{
53
+ readonly type: import("effect/Schema").Literal<"image">;
54
+ readonly value: import("effect/Schema").String;
55
+ }>]>>;
56
+ readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
57
+ }>;
58
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">;
59
+ }>;
60
+ readonly organizationMember: import("effect/Schema").Struct<{
61
+ readonly organizationMember: import("effect/Schema").Struct<{
62
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationMemberId">;
63
+ readonly organizationId: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">;
64
+ readonly userId: import("effect/Schema").brand<import("effect/Schema").String, "UserId">;
65
+ readonly organizationRoleId: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationRoleId">;
66
+ readonly joinedAt: import("effect/Schema").DateTimeUtcFromDate;
67
+ }>;
68
+ readonly user: import("effect/Schema").Struct<{
69
+ readonly metadata: import("effect/Schema").Struct<{
70
+ readonly version: import("effect/Schema").Literal<1>;
71
+ readonly name: import("effect/Schema").optionalKey<import("effect/Schema").String>;
72
+ readonly image: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
73
+ readonly type: import("effect/Schema").Literal<"icon">;
74
+ readonly value: import("effect/Schema").String;
75
+ readonly color: import("effect/Schema").String;
76
+ }>, import("effect/Schema").Struct<{
77
+ readonly type: import("effect/Schema").Literal<"emoji">;
78
+ readonly value: import("effect/Schema").String;
79
+ }>, import("effect/Schema").Struct<{
80
+ readonly type: import("effect/Schema").Literal<"image">;
81
+ readonly value: import("effect/Schema").String;
82
+ }>]>>;
83
+ }>;
84
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "UserId">;
85
+ readonly lastLoginAt: import("effect/Schema").NullOr<import("effect/Schema").DateTimeUtcFromDate>;
86
+ 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">;
87
+ readonly emailVerified: import("effect/Schema").Boolean;
88
+ }>;
89
+ readonly organizationRole: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
90
+ readonly type: import("effect/Schema").Literal<"system">;
91
+ readonly metadata: import("effect/Schema").Struct<{
92
+ readonly version: import("effect/Schema").Literal<1>;
93
+ readonly name: import("effect/Schema").String;
94
+ readonly logo: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
95
+ readonly type: import("effect/Schema").Literal<"icon">;
96
+ readonly value: import("effect/Schema").String;
97
+ readonly color: import("effect/Schema").String;
98
+ }>, import("effect/Schema").Struct<{
99
+ readonly type: import("effect/Schema").Literal<"emoji">;
100
+ readonly value: import("effect/Schema").String;
101
+ }>, import("effect/Schema").Struct<{
102
+ readonly type: import("effect/Schema").Literal<"image">;
103
+ readonly value: import("effect/Schema").String;
104
+ }>]>>;
105
+ readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
106
+ }>;
107
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationRoleId">;
108
+ readonly systemRoleId: import("effect/Schema").brand<import("effect/Schema").String, "SystemRoleId">;
109
+ readonly key: import("effect/Schema").String;
110
+ readonly permissions: import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["organization:read", "organization:update", "member:read", "member:update", "member:remove", "invitation:read", "invitation:create", "invitation:cancel", "role:read", "role:create", "role:update", "role:delete", "billing:read", "billing:update", "billing:cancel", "wallet:read", "wallet:create", "wallet:update", "session-key:read", "session-key:create", "session-key:revoke", "api-key:read", "api-key:create", "api-key:revoke", "execution:read", "mcp-authorization:read", "mcp-authorization:create", "mcp-authorization:revoke", "cli-authorization:read", "cli-authorization:create", "cli-authorization:revoke"]>>;
111
+ }>, import("effect/Schema").Struct<{
112
+ readonly type: import("effect/Schema").Literal<"custom">;
113
+ readonly metadata: import("effect/Schema").Struct<{
114
+ readonly version: import("effect/Schema").Literal<1>;
115
+ readonly name: import("effect/Schema").String;
116
+ readonly logo: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
117
+ readonly type: import("effect/Schema").Literal<"icon">;
118
+ readonly value: import("effect/Schema").String;
119
+ readonly color: import("effect/Schema").String;
120
+ }>, import("effect/Schema").Struct<{
121
+ readonly type: import("effect/Schema").Literal<"emoji">;
122
+ readonly value: import("effect/Schema").String;
123
+ }>, import("effect/Schema").Struct<{
124
+ readonly type: import("effect/Schema").Literal<"image">;
125
+ readonly value: import("effect/Schema").String;
126
+ }>]>>;
127
+ readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
128
+ }>;
129
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationRoleId">;
130
+ readonly systemRoleId: import("effect/Schema").Null;
131
+ readonly key: import("effect/Schema").String;
132
+ readonly permissions: import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["organization:read", "organization:update", "member:read", "member:update", "member:remove", "invitation:read", "invitation:create", "invitation:cancel", "role:read", "role:create", "role:update", "role:delete", "billing:read", "billing:update", "billing:cancel", "wallet:read", "wallet:create", "wallet:update", "session-key:read", "session-key:create", "session-key:revoke", "api-key:read", "api-key:create", "api-key:revoke", "execution:read", "mcp-authorization:read", "mcp-authorization:create", "mcp-authorization:revoke", "cli-authorization:read", "cli-authorization:create", "cli-authorization:revoke"]>>;
133
+ }>]>;
134
+ }>;
135
+ }>>>, 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 | typeof import("@namera-ai/protocol").OrganizationNotFoundError | typeof import("@namera-ai/protocol").OrganizationPermissionError>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"setActive", "POST", "/auth/organization/set-active-organization", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
136
+ readonly organizationId: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">;
137
+ }>>, 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 | typeof import("@namera-ai/protocol").OrganizationNotFoundError | typeof import("@namera-ai/protocol").OrganizationPermissionError>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"getOrganization", "GET", "/auth/organization/get-organization", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
138
+ readonly organizationId: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">;
139
+ }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
140
+ readonly metadata: import("effect/Schema").Struct<{
141
+ readonly version: import("effect/Schema").Literal<1>;
142
+ readonly name: import("effect/Schema").String;
143
+ readonly logo: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
144
+ readonly type: import("effect/Schema").Literal<"icon">;
145
+ readonly value: import("effect/Schema").String;
146
+ readonly color: import("effect/Schema").String;
147
+ }>, import("effect/Schema").Struct<{
148
+ readonly type: import("effect/Schema").Literal<"emoji">;
149
+ readonly value: import("effect/Schema").String;
150
+ }>, import("effect/Schema").Struct<{
151
+ readonly type: import("effect/Schema").Literal<"image">;
152
+ readonly value: import("effect/Schema").String;
153
+ }>]>>;
154
+ readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
155
+ }>;
156
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">;
157
+ }>>, 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 | typeof import("@namera-ai/protocol").OrganizationNotFoundError | typeof import("@namera-ai/protocol").OrganizationPermissionError>, Authorization, never> | HttpApiEndpoint.HttpApiEndpoint<"update", "POST", "/auth/organization/update-organization", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
158
+ readonly metadata: import("effect/Schema").Struct<{
159
+ readonly version: import("effect/Schema").Literal<1>;
160
+ readonly name: import("effect/Schema").String;
161
+ readonly logo: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
162
+ readonly type: import("effect/Schema").Literal<"icon">;
163
+ readonly value: import("effect/Schema").String;
164
+ readonly color: import("effect/Schema").String;
165
+ }>, import("effect/Schema").Struct<{
166
+ readonly type: import("effect/Schema").Literal<"emoji">;
167
+ readonly value: import("effect/Schema").String;
168
+ }>, import("effect/Schema").Struct<{
169
+ readonly type: import("effect/Schema").Literal<"image">;
170
+ readonly value: import("effect/Schema").String;
171
+ }>]>>;
172
+ readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
173
+ }>;
174
+ }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
175
+ readonly metadata: import("effect/Schema").Struct<{
176
+ readonly version: import("effect/Schema").Literal<1>;
177
+ readonly name: import("effect/Schema").String;
178
+ readonly logo: import("effect/Schema").optionalKey<import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
179
+ readonly type: import("effect/Schema").Literal<"icon">;
180
+ readonly value: import("effect/Schema").String;
181
+ readonly color: import("effect/Schema").String;
182
+ }>, import("effect/Schema").Struct<{
183
+ readonly type: import("effect/Schema").Literal<"emoji">;
184
+ readonly value: import("effect/Schema").String;
185
+ }>, import("effect/Schema").Struct<{
186
+ readonly type: import("effect/Schema").Literal<"image">;
187
+ readonly value: import("effect/Schema").String;
188
+ }>]>>;
189
+ readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
190
+ }>;
191
+ readonly id: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">;
192
+ }>>, 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 | typeof import("@namera-ai/protocol").OrganizationNotFoundError | typeof import("@namera-ai/protocol").OrganizationPermissionError>, Authorization, never>, false>;
193
+ declare class OrganizationGroup extends OrganizationGroup_base {}
194
+ //#endregion
195
+ export { OrganizationGroup };
196
+ //# sourceMappingURL=organization.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization.d.ts","names":[],"sources":["../../../../src/routes/auth/organization/organization.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkBa,0BAA0B"}
@@ -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 { OrganizationErrors } from "@namera-ai/protocol";
5
+ import { CreateOrganizationRequest, CreateOrganizationResponse, GetOrganizationRequest, GetOrganizationResponse, ListUserOrganizationsResponse, SetActiveOrganizationRequest, SetActiveOrganizationResponse, UpdateOrganizationRequest, UpdateOrganizationResponse } from "@namera-ai/protocol/dto";
6
+
7
+ //#region src/routes/auth/organization/organization.ts
8
+ var OrganizationGroup = class extends HttpApiGroup.make("organization").add(HttpApiEndpoint.post("create", "/create-organization", {
9
+ payload: CreateOrganizationRequest,
10
+ error: [...OrganizationErrors, ...CommonErrors],
11
+ success: CreateOrganizationResponse
12
+ }).annotate(OpenApi.Summary, "Create an organization"), HttpApiEndpoint.get("list", "/list-user-organizations", {
13
+ success: ListUserOrganizationsResponse,
14
+ error: [...OrganizationErrors, ...CommonErrors]
15
+ }).annotate(OpenApi.Summary, "List organizations for the current user"), HttpApiEndpoint.post("setActive", "/set-active-organization", {
16
+ payload: SetActiveOrganizationRequest,
17
+ error: [...OrganizationErrors, ...CommonErrors],
18
+ success: SetActiveOrganizationResponse
19
+ }).annotate(OpenApi.Summary, "Set the session's active organization"), HttpApiEndpoint.get("getOrganization", "/get-organization", {
20
+ query: GetOrganizationRequest,
21
+ error: [...OrganizationErrors, ...CommonErrors],
22
+ success: GetOrganizationResponse
23
+ }).annotate(OpenApi.Summary, "Get an organization"), HttpApiEndpoint.post("update", "/update-organization", {
24
+ payload: UpdateOrganizationRequest,
25
+ error: [...OrganizationErrors, ...CommonErrors],
26
+ success: UpdateOrganizationResponse
27
+ }).annotate(OpenApi.Summary, "Update the active organization")).annotate(OpenApi.Description, "Organization lifecycle and selection").middleware(Authorization).prefix("/auth/organization") {};
28
+
29
+ //#endregion
30
+ export { OrganizationGroup };
31
+ //# sourceMappingURL=organization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization.js","names":[],"sources":["../../../../src/routes/auth/organization/organization.ts"],"sourcesContent":["import { HttpApiEndpoint, HttpApiGroup, OpenApi } from \"effect/unstable/httpapi\";\n\nimport { OrganizationErrors } from \"@namera-ai/protocol\";\nimport {\n CreateOrganizationRequest,\n CreateOrganizationResponse,\n GetOrganizationRequest,\n GetOrganizationResponse,\n ListUserOrganizationsResponse,\n SetActiveOrganizationRequest,\n SetActiveOrganizationResponse,\n UpdateOrganizationRequest,\n UpdateOrganizationResponse,\n} from \"@namera-ai/protocol/dto\";\n\nimport { CommonErrors } from \"#/common\";\nimport { Authorization } from \"#/middlewares/index\";\n\nexport class OrganizationGroup extends HttpApiGroup.make(\"organization\")\n .add(\n HttpApiEndpoint.post(\"create\", \"/create-organization\", {\n payload: CreateOrganizationRequest,\n error: [...OrganizationErrors, ...CommonErrors],\n success: CreateOrganizationResponse,\n }).annotate(OpenApi.Summary, \"Create an organization\"),\n HttpApiEndpoint.get(\"list\", \"/list-user-organizations\", {\n success: ListUserOrganizationsResponse,\n error: [...OrganizationErrors, ...CommonErrors],\n }).annotate(OpenApi.Summary, \"List organizations for the current user\"),\n HttpApiEndpoint.post(\"setActive\", \"/set-active-organization\", {\n payload: SetActiveOrganizationRequest,\n error: [...OrganizationErrors, ...CommonErrors],\n success: SetActiveOrganizationResponse,\n }).annotate(OpenApi.Summary, \"Set the session's active organization\"),\n HttpApiEndpoint.get(\"getOrganization\", \"/get-organization\", {\n query: GetOrganizationRequest,\n error: [...OrganizationErrors, ...CommonErrors],\n success: GetOrganizationResponse,\n }).annotate(OpenApi.Summary, \"Get an organization\"),\n HttpApiEndpoint.post(\"update\", \"/update-organization\", {\n payload: UpdateOrganizationRequest,\n error: [...OrganizationErrors, ...CommonErrors],\n success: UpdateOrganizationResponse,\n }).annotate(OpenApi.Summary, \"Update the active organization\"),\n )\n .annotate(OpenApi.Description, \"Organization lifecycle and selection\")\n .middleware(Authorization)\n .prefix(\"/auth/organization\") {}\n"],"mappings":";;;;;;;AAkBA,IAAa,oBAAb,cAAuC,aAAa,KAAK,cAAc,CAAC,CACrE,IACC,gBAAgB,KAAK,UAAU,wBAAwB;CACrD,SAAS;CACT,OAAO,CAAC,GAAG,oBAAoB,GAAG,YAAY;CAC9C,SAAS;AACX,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,wBAAwB,GACrD,gBAAgB,IAAI,QAAQ,4BAA4B;CACtD,SAAS;CACT,OAAO,CAAC,GAAG,oBAAoB,GAAG,YAAY;AAChD,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,yCAAyC,GACtE,gBAAgB,KAAK,aAAa,4BAA4B;CAC5D,SAAS;CACT,OAAO,CAAC,GAAG,oBAAoB,GAAG,YAAY;CAC9C,SAAS;AACX,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,uCAAuC,GACpE,gBAAgB,IAAI,mBAAmB,qBAAqB;CAC1D,OAAO;CACP,OAAO,CAAC,GAAG,oBAAoB,GAAG,YAAY;CAC9C,SAAS;AACX,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,qBAAqB,GAClD,gBAAgB,KAAK,UAAU,wBAAwB;CACrD,SAAS;CACT,OAAO,CAAC,GAAG,oBAAoB,GAAG,YAAY;CAC9C,SAAS;AACX,CAAC,CAAC,CAAC,SAAS,QAAQ,SAAS,gCAAgC,CAC/D,CAAC,CACA,SAAS,QAAQ,aAAa,sCAAsC,CAAC,CACrE,WAAW,aAAa,CAAC,CACzB,OAAO,oBAAoB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { AdminAuthorization } from "../middlewares/admin.js";
2
+ import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
3
+ import { Schema } from "effect";
4
+ //#region src/routes/beta-invite.d.ts
5
+ declare const BetaInviteGroup_base: HttpApiGroup.HttpApiGroup<"betaInvite", HttpApiEndpoint.HttpApiEndpoint<"create", "POST", "/internal/invites", never, never, Schema.toCodecJson<Schema.Struct<{
6
+ readonly count: Schema.Int;
7
+ readonly expiresInDays: Schema.optionalKey<Schema.Int>;
8
+ readonly email: Schema.optionalKey<Schema.brand<Schema.decodeTo<Schema.toType<Schema.String>, Schema.String, never, never>, "Email">>;
9
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
10
+ readonly invites: Schema.$Array<Schema.Struct<{
11
+ readonly id: Schema.String;
12
+ readonly code: Schema.String;
13
+ readonly url: Schema.String;
14
+ readonly expiresAt: Schema.DateTimeUtcFromDate;
15
+ }>>;
16
+ }>>, 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>, AdminAuthorization, never> | HttpApiEndpoint.HttpApiEndpoint<"revoke", "DELETE", "/internal/invites/:id", Schema.toCodecStringTree<Schema.Struct<{
17
+ id: Schema.String;
18
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
19
+ readonly revoked: Schema.Boolean;
20
+ }>>, 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>, AdminAuthorization, never>, false>;
21
+ declare class BetaInviteGroup extends BetaInviteGroup_base {}
22
+ //#endregion
23
+ export { BetaInviteGroup };
24
+ //# sourceMappingURL=beta-invite.d.ts.map