@absolutejs/auth 0.56.2 → 0.56.4
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.
- package/dist/cli/migrate.js.map +1 -1
- package/dist/index.js +45 -1
- package/dist/index.js.map +4 -4
- package/dist/oidc/index.js +15 -1
- package/dist/oidc/index.js.map +3 -3
- package/dist/server.js +45 -1
- package/dist/server.js.map +4 -4
- package/package.json +1 -1
- package/dist/abuse/captcha.d.ts +0 -11
- package/dist/abuse/config.d.ts +0 -29
- package/dist/actions.d.ts +0 -27
- package/dist/adaptive/config.d.ts +0 -34
- package/dist/adaptive/fingerprint.d.ts +0 -2
- package/dist/adaptive/inMemoryStores.d.ts +0 -3
- package/dist/adaptive/postgresStores.d.ts +0 -245
- package/dist/adaptive/types.d.ts +0 -62
- package/dist/agents/config.d.ts +0 -44
- package/dist/agents/context.d.ts +0 -46
- package/dist/agents/idJag.d.ts +0 -49
- package/dist/agents/inMemoryStores.d.ts +0 -4
- package/dist/agents/oidcAdapter.d.ts +0 -12
- package/dist/agents/postgresStores.d.ts +0 -569
- package/dist/agents/principal.d.ts +0 -4
- package/dist/agents/registration.d.ts +0 -162
- package/dist/agents/registrationClient.d.ts +0 -50
- package/dist/agents/routes.d.ts +0 -321
- package/dist/agents/types.d.ts +0 -129
- package/dist/apikeys/config.d.ts +0 -64
- package/dist/apikeys/inMemoryStores.d.ts +0 -4
- package/dist/apikeys/postgresStores.d.ts +0 -359
- package/dist/apikeys/routes.d.ts +0 -83
- package/dist/apikeys/types.d.ts +0 -53
- package/dist/audit/config.d.ts +0 -9
- package/dist/audit/export.d.ts +0 -2
- package/dist/audit/inMemoryAuditStore.d.ts +0 -2
- package/dist/audit/integrity.d.ts +0 -19
- package/dist/audit/postgresAuditStore.d.ts +0 -116
- package/dist/audit/siem.d.ts +0 -11
- package/dist/audit/types.d.ts +0 -19
- package/dist/audit/wrap.d.ts +0 -9
- package/dist/authContext.d.ts +0 -193
- package/dist/authorization/config.d.ts +0 -19
- package/dist/authorization/protectPermission.d.ts +0 -52
- package/dist/compliance/cipher.d.ts +0 -11
- package/dist/compliance/config.d.ts +0 -18
- package/dist/compliance/redaction.d.ts +0 -8
- package/dist/compliance/routes.d.ts +0 -89
- package/dist/constants.d.ts +0 -10
- package/dist/credentials/backgroundOps.d.ts +0 -45
- package/dist/credentials/config.d.ts +0 -68
- package/dist/credentials/emailValidation.d.ts +0 -9
- package/dist/credentials/emailVerification.d.ts +0 -83
- package/dist/credentials/import.d.ts +0 -34
- package/dist/credentials/inMemoryCredentialStore.d.ts +0 -2
- package/dist/credentials/legacyHashers.d.ts +0 -3
- package/dist/credentials/login.d.ts +0 -76
- package/dist/credentials/passwordPolicy.d.ts +0 -15
- package/dist/credentials/passwordReset.d.ts +0 -87
- package/dist/credentials/postgresCredentialStore.d.ts +0 -235
- package/dist/credentials/register.d.ts +0 -54
- package/dist/credentials/routes.d.ts +0 -201
- package/dist/credentials/types.d.ts +0 -26
- package/dist/crypto.d.ts +0 -32
- package/dist/errors.d.ts +0 -12
- package/dist/federation/tokenStore.d.ts +0 -29
- package/dist/fga/config.d.ts +0 -53
- package/dist/fga/inMemoryStores.d.ts +0 -3
- package/dist/fga/postgresStores.d.ts +0 -116
- package/dist/fga/redisCheckCache.d.ts +0 -11
- package/dist/fga/schema.d.ts +0 -2
- package/dist/fga/types.d.ts +0 -28
- package/dist/htmx/configuredRoutes.d.ts +0 -542
- package/dist/htmx/renderers.d.ts +0 -8
- package/dist/htmx/routes.d.ts +0 -514
- package/dist/htmx/types.d.ts +0 -129
- package/dist/linkedProviders/inMemoryStores.d.ts +0 -9
- package/dist/linkedProviders/neonStores.d.ts +0 -484
- package/dist/linkedProviders/oauthAccountResolver.d.ts +0 -28
- package/dist/linkedProviders/oauthResolver.d.ts +0 -9
- package/dist/linkedProviders/resolver.d.ts +0 -22
- package/dist/lockout/config.d.ts +0 -17
- package/dist/lockout/inMemoryLockoutStore.d.ts +0 -2
- package/dist/lockout/postgresLockoutStore.d.ts +0 -71
- package/dist/lockout/redisLockoutStore.d.ts +0 -3
- package/dist/lockout/types.d.ts +0 -12
- package/dist/mfa/backupCodes.d.ts +0 -5
- package/dist/mfa/challenge.d.ts +0 -70
- package/dist/mfa/config.d.ts +0 -50
- package/dist/mfa/gate.d.ts +0 -2
- package/dist/mfa/inMemoryMfaStore.d.ts +0 -2
- package/dist/mfa/management.d.ts +0 -106
- package/dist/mfa/postgresMfaStore.d.ts +0 -206
- package/dist/mfa/rotation.d.ts +0 -17
- package/dist/mfa/routes.d.ts +0 -234
- package/dist/mfa/secret.d.ts +0 -2
- package/dist/mfa/sms.d.ts +0 -105
- package/dist/mfa/totp.d.ts +0 -91
- package/dist/mfa/types.d.ts +0 -23
- package/dist/migrations/generate.d.ts +0 -2
- package/dist/migrations/index.d.ts +0 -5
- package/dist/migrations/runner.d.ts +0 -13
- package/dist/migrations/types.d.ts +0 -14
- package/dist/oidc/clientAuth.d.ts +0 -19
- package/dist/oidc/clientIdMetadata.d.ts +0 -32
- package/dist/oidc/config.d.ts +0 -296
- package/dist/oidc/dpop.d.ts +0 -23
- package/dist/oidc/inMemoryStores.d.ts +0 -11
- package/dist/oidc/inMemoryVciStores.d.ts +0 -3
- package/dist/oidc/jar.d.ts +0 -14
- package/dist/oidc/keys.d.ts +0 -35
- package/dist/oidc/logout.d.ts +0 -38
- package/dist/oidc/mtls.d.ts +0 -11
- package/dist/oidc/par.d.ts +0 -28
- package/dist/oidc/postgresStores.d.ts +0 -1217
- package/dist/oidc/registration.d.ts +0 -138
- package/dist/oidc/routes.d.ts +0 -569
- package/dist/oidc/types.d.ts +0 -145
- package/dist/oidc/userinfo.d.ts +0 -21
- package/dist/oidc/vci.d.ts +0 -159
- package/dist/oidc/vciRoutes.d.ts +0 -92
- package/dist/organizations/config.d.ts +0 -46
- package/dist/organizations/inMemoryOrganizationStore.d.ts +0 -2
- package/dist/organizations/operations.d.ts +0 -39
- package/dist/organizations/postgresOrganizationStore.d.ts +0 -340
- package/dist/organizations/routes.d.ts +0 -299
- package/dist/organizations/types.d.ts +0 -45
- package/dist/passwordless/config.d.ts +0 -43
- package/dist/passwordless/inMemoryPasswordlessTokenStore.d.ts +0 -2
- package/dist/passwordless/postgresPasswordlessTokenStore.d.ts +0 -56
- package/dist/passwordless/routes.d.ts +0 -163
- package/dist/passwordless/types.d.ts +0 -9
- package/dist/pluginIdentity.d.ts +0 -2
- package/dist/portal/config.d.ts +0 -34
- package/dist/portal/inMemorySetupSessionStore.d.ts +0 -2
- package/dist/portal/operations.d.ts +0 -10
- package/dist/portal/postgresSetupSessionStore.d.ts +0 -116
- package/dist/portal/routes.d.ts +0 -160
- package/dist/portal/types.d.ts +0 -16
- package/dist/providers/clients.d.ts +0 -1818
- package/dist/providersFromEnv.d.ts +0 -19
- package/dist/roles/config.d.ts +0 -27
- package/dist/roles/inMemoryRoleStore.d.ts +0 -2
- package/dist/roles/operations.d.ts +0 -8
- package/dist/roles/postgresRoleStore.d.ts +0 -86
- package/dist/roles/resolver.d.ts +0 -17
- package/dist/roles/routes.d.ts +0 -106
- package/dist/roles/types.d.ts +0 -14
- package/dist/routes/authorize.d.ts +0 -102
- package/dist/routes/callback.d.ts +0 -64
- package/dist/routes/profile.d.ts +0 -70
- package/dist/routes/protectRoute.d.ts +0 -51
- package/dist/routes/refresh.d.ts +0 -74
- package/dist/routes/revoke.d.ts +0 -73
- package/dist/routes/sessions.d.ts +0 -103
- package/dist/routes/signout.d.ts +0 -70
- package/dist/routes/stepUp.d.ts +0 -48
- package/dist/routes/userStatus.d.ts +0 -72
- package/dist/scim/config.d.ts +0 -57
- package/dist/scim/extensions.d.ts +0 -30
- package/dist/scim/inMemoryScimTokenStore.d.ts +0 -2
- package/dist/scim/postgresScimTokenStore.d.ts +0 -86
- package/dist/scim/routes.d.ts +0 -366
- package/dist/scim/serialize.d.ts +0 -83
- package/dist/scim/types.d.ts +0 -54
- package/dist/session/access.d.ts +0 -33
- package/dist/session/anonymous.d.ts +0 -12
- package/dist/session/cleanup.d.ts +0 -45
- package/dist/session/impersonation.d.ts +0 -34
- package/dist/session/inMemoryStore.d.ts +0 -7
- package/dist/session/multiSession.d.ts +0 -27
- package/dist/session/neonStore.d.ts +0 -513
- package/dist/session/promote.d.ts +0 -23
- package/dist/session/redisStore.d.ts +0 -6
- package/dist/session/sessionsConfig.d.ts +0 -9
- package/dist/session/state.d.ts +0 -33
- package/dist/session/types.d.ts +0 -21
- package/dist/session/userSessions.d.ts +0 -19
- package/dist/sso/config.d.ts +0 -149
- package/dist/sso/discoveryRoute.d.ts +0 -63
- package/dist/sso/inMemorySamlServiceProviderStore.d.ts +0 -2
- package/dist/sso/inMemorySsoConnectionStore.d.ts +0 -2
- package/dist/sso/oidcRoutes.d.ts +0 -98
- package/dist/sso/postgresSamlServiceProviderStore.d.ts +0 -101
- package/dist/sso/postgresSsoConnectionStore.d.ts +0 -116
- package/dist/sso/samlIdpRoutes.d.ts +0 -139
- package/dist/sso/samlRoutes.d.ts +0 -179
- package/dist/sso/types.d.ts +0 -53
- package/dist/stores/postgres.d.ts +0 -5
- package/dist/stores/redis.d.ts +0 -5
- package/dist/telemetry/tracing.d.ts +0 -15
- package/dist/tenancy.d.ts +0 -9
- package/dist/typeGuards.d.ts +0 -6
- package/dist/typebox.d.ts +0 -4
- package/dist/types.d.ts +0 -421
- package/dist/utils.d.ts +0 -45
- package/dist/vault/config.d.ts +0 -20
- package/dist/vault/inMemoryVaultStore.d.ts +0 -2
- package/dist/vault/postgresVaultStore.d.ts +0 -86
- package/dist/vault/types.d.ts +0 -14
- package/dist/vc/inMemoryVpStores.d.ts +0 -2
- package/dist/vc/openid4vp.d.ts +0 -82
- package/dist/vc/postgresVcStores.d.ts +0 -300
- package/dist/vc/sdJwt.d.ts +0 -37
- package/dist/vc/statusList.d.ts +0 -29
- package/dist/vc/statusListRoutes.d.ts +0 -63
- package/dist/vc/vpRoutes.d.ts +0 -120
- package/dist/webauthn/adapter.d.ts +0 -59
- package/dist/webauthn/config.d.ts +0 -36
- package/dist/webauthn/inMemoryWebAuthnCredentialStore.d.ts +0 -2
- package/dist/webauthn/postgresWebAuthnCredentialStore.d.ts +0 -146
- package/dist/webauthn/routes.d.ts +0 -155
- package/dist/webauthn/types.d.ts +0 -17
- package/dist/webhooks/config.d.ts +0 -34
- package/dist/webhooks/dispatcher.d.ts +0 -3
- package/dist/webhooks/inMemoryStore.d.ts +0 -2
- package/dist/webhooks/postgresStore.d.ts +0 -116
- package/dist/webhooks/sign.d.ts +0 -11
- package/dist/webhooks/types.d.ts +0 -25
|
@@ -1,340 +0,0 @@
|
|
|
1
|
-
import { type AnyPgDatabase } from '../stores/postgres';
|
|
2
|
-
import type { InvitationState, MembershipStatus, OrganizationStore } from './types';
|
|
3
|
-
export declare const organizationInvitationsTable: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
4
|
-
name: "auth_organization_invitations";
|
|
5
|
-
schema: undefined;
|
|
6
|
-
columns: {
|
|
7
|
-
accepted_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organization_invitations", import("drizzle-orm/pg-core").PgBigInt53Builder, {
|
|
8
|
-
name: string;
|
|
9
|
-
tableName: "auth_organization_invitations";
|
|
10
|
-
dataType: "number int53";
|
|
11
|
-
data: number;
|
|
12
|
-
driverParam: string | number;
|
|
13
|
-
notNull: false;
|
|
14
|
-
hasDefault: false;
|
|
15
|
-
isPrimaryKey: false;
|
|
16
|
-
isAutoincrement: false;
|
|
17
|
-
hasRuntimeDefault: false;
|
|
18
|
-
enumValues: undefined;
|
|
19
|
-
identity: undefined;
|
|
20
|
-
generated: undefined;
|
|
21
|
-
}>;
|
|
22
|
-
created_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organization_invitations", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
|
|
23
|
-
name: string;
|
|
24
|
-
tableName: "auth_organization_invitations";
|
|
25
|
-
dataType: "number int53";
|
|
26
|
-
data: number;
|
|
27
|
-
driverParam: string | number;
|
|
28
|
-
notNull: true;
|
|
29
|
-
hasDefault: false;
|
|
30
|
-
isPrimaryKey: false;
|
|
31
|
-
isAutoincrement: false;
|
|
32
|
-
hasRuntimeDefault: false;
|
|
33
|
-
enumValues: undefined;
|
|
34
|
-
identity: undefined;
|
|
35
|
-
generated: undefined;
|
|
36
|
-
}>;
|
|
37
|
-
email: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organization_invitations", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
|
|
38
|
-
name: string;
|
|
39
|
-
tableName: "auth_organization_invitations";
|
|
40
|
-
dataType: "string";
|
|
41
|
-
data: string;
|
|
42
|
-
driverParam: string;
|
|
43
|
-
notNull: true;
|
|
44
|
-
hasDefault: false;
|
|
45
|
-
isPrimaryKey: false;
|
|
46
|
-
isAutoincrement: false;
|
|
47
|
-
hasRuntimeDefault: false;
|
|
48
|
-
enumValues: undefined;
|
|
49
|
-
identity: undefined;
|
|
50
|
-
generated: undefined;
|
|
51
|
-
}>;
|
|
52
|
-
expires_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organization_invitations", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
|
|
53
|
-
name: string;
|
|
54
|
-
tableName: "auth_organization_invitations";
|
|
55
|
-
dataType: "number int53";
|
|
56
|
-
data: number;
|
|
57
|
-
driverParam: string | number;
|
|
58
|
-
notNull: true;
|
|
59
|
-
hasDefault: false;
|
|
60
|
-
isPrimaryKey: false;
|
|
61
|
-
isAutoincrement: false;
|
|
62
|
-
hasRuntimeDefault: false;
|
|
63
|
-
enumValues: undefined;
|
|
64
|
-
identity: undefined;
|
|
65
|
-
generated: undefined;
|
|
66
|
-
}>;
|
|
67
|
-
invitation_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organization_invitations", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
|
|
68
|
-
name: string;
|
|
69
|
-
tableName: "auth_organization_invitations";
|
|
70
|
-
dataType: "string";
|
|
71
|
-
data: string;
|
|
72
|
-
driverParam: string;
|
|
73
|
-
notNull: true;
|
|
74
|
-
hasDefault: false;
|
|
75
|
-
isPrimaryKey: false;
|
|
76
|
-
isAutoincrement: false;
|
|
77
|
-
hasRuntimeDefault: false;
|
|
78
|
-
enumValues: undefined;
|
|
79
|
-
identity: undefined;
|
|
80
|
-
generated: undefined;
|
|
81
|
-
}>;
|
|
82
|
-
inviter_user_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organization_invitations", import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>, {
|
|
83
|
-
name: string;
|
|
84
|
-
tableName: "auth_organization_invitations";
|
|
85
|
-
dataType: "string";
|
|
86
|
-
data: string;
|
|
87
|
-
driverParam: string;
|
|
88
|
-
notNull: false;
|
|
89
|
-
hasDefault: false;
|
|
90
|
-
isPrimaryKey: false;
|
|
91
|
-
isAutoincrement: false;
|
|
92
|
-
hasRuntimeDefault: false;
|
|
93
|
-
enumValues: undefined;
|
|
94
|
-
identity: undefined;
|
|
95
|
-
generated: undefined;
|
|
96
|
-
}>;
|
|
97
|
-
organization_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organization_invitations", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
|
|
98
|
-
name: string;
|
|
99
|
-
tableName: "auth_organization_invitations";
|
|
100
|
-
dataType: "string";
|
|
101
|
-
data: string;
|
|
102
|
-
driverParam: string;
|
|
103
|
-
notNull: true;
|
|
104
|
-
hasDefault: false;
|
|
105
|
-
isPrimaryKey: false;
|
|
106
|
-
isAutoincrement: false;
|
|
107
|
-
hasRuntimeDefault: false;
|
|
108
|
-
enumValues: undefined;
|
|
109
|
-
identity: undefined;
|
|
110
|
-
generated: undefined;
|
|
111
|
-
}>;
|
|
112
|
-
roles: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organization_invitations", import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgJsonbBuilder, string[]>>>, {
|
|
113
|
-
name: string;
|
|
114
|
-
tableName: "auth_organization_invitations";
|
|
115
|
-
dataType: "object json";
|
|
116
|
-
data: string[];
|
|
117
|
-
driverParam: unknown;
|
|
118
|
-
notNull: true;
|
|
119
|
-
hasDefault: true;
|
|
120
|
-
isPrimaryKey: false;
|
|
121
|
-
isAutoincrement: false;
|
|
122
|
-
hasRuntimeDefault: false;
|
|
123
|
-
enumValues: undefined;
|
|
124
|
-
identity: undefined;
|
|
125
|
-
generated: undefined;
|
|
126
|
-
}>;
|
|
127
|
-
state: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organization_invitations", import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>, InvitationState>>>, {
|
|
128
|
-
name: string;
|
|
129
|
-
tableName: "auth_organization_invitations";
|
|
130
|
-
dataType: "string";
|
|
131
|
-
data: InvitationState;
|
|
132
|
-
driverParam: string;
|
|
133
|
-
notNull: true;
|
|
134
|
-
hasDefault: true;
|
|
135
|
-
isPrimaryKey: false;
|
|
136
|
-
isAutoincrement: false;
|
|
137
|
-
hasRuntimeDefault: false;
|
|
138
|
-
enumValues: undefined;
|
|
139
|
-
identity: undefined;
|
|
140
|
-
generated: undefined;
|
|
141
|
-
}>;
|
|
142
|
-
token_hash: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organization_invitations", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
|
|
143
|
-
name: string;
|
|
144
|
-
tableName: "auth_organization_invitations";
|
|
145
|
-
dataType: "string";
|
|
146
|
-
data: string;
|
|
147
|
-
driverParam: string;
|
|
148
|
-
notNull: true;
|
|
149
|
-
hasDefault: false;
|
|
150
|
-
isPrimaryKey: false;
|
|
151
|
-
isAutoincrement: false;
|
|
152
|
-
hasRuntimeDefault: false;
|
|
153
|
-
enumValues: undefined;
|
|
154
|
-
identity: undefined;
|
|
155
|
-
generated: undefined;
|
|
156
|
-
}>;
|
|
157
|
-
};
|
|
158
|
-
dialect: "pg";
|
|
159
|
-
}>;
|
|
160
|
-
export declare const organizationMembershipsTable: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
161
|
-
name: "auth_organization_memberships";
|
|
162
|
-
schema: undefined;
|
|
163
|
-
columns: {
|
|
164
|
-
created_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organization_memberships", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
|
|
165
|
-
name: string;
|
|
166
|
-
tableName: "auth_organization_memberships";
|
|
167
|
-
dataType: "number int53";
|
|
168
|
-
data: number;
|
|
169
|
-
driverParam: string | number;
|
|
170
|
-
notNull: true;
|
|
171
|
-
hasDefault: false;
|
|
172
|
-
isPrimaryKey: false;
|
|
173
|
-
isAutoincrement: false;
|
|
174
|
-
hasRuntimeDefault: false;
|
|
175
|
-
enumValues: undefined;
|
|
176
|
-
identity: undefined;
|
|
177
|
-
generated: undefined;
|
|
178
|
-
}>;
|
|
179
|
-
organization_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organization_memberships", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
|
|
180
|
-
name: string;
|
|
181
|
-
tableName: "auth_organization_memberships";
|
|
182
|
-
dataType: "string";
|
|
183
|
-
data: string;
|
|
184
|
-
driverParam: string;
|
|
185
|
-
notNull: true;
|
|
186
|
-
hasDefault: false;
|
|
187
|
-
isPrimaryKey: false;
|
|
188
|
-
isAutoincrement: false;
|
|
189
|
-
hasRuntimeDefault: false;
|
|
190
|
-
enumValues: undefined;
|
|
191
|
-
identity: undefined;
|
|
192
|
-
generated: undefined;
|
|
193
|
-
}>;
|
|
194
|
-
roles: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organization_memberships", import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgJsonbBuilder, string[]>>>, {
|
|
195
|
-
name: string;
|
|
196
|
-
tableName: "auth_organization_memberships";
|
|
197
|
-
dataType: "object json";
|
|
198
|
-
data: string[];
|
|
199
|
-
driverParam: unknown;
|
|
200
|
-
notNull: true;
|
|
201
|
-
hasDefault: true;
|
|
202
|
-
isPrimaryKey: false;
|
|
203
|
-
isAutoincrement: false;
|
|
204
|
-
hasRuntimeDefault: false;
|
|
205
|
-
enumValues: undefined;
|
|
206
|
-
identity: undefined;
|
|
207
|
-
generated: undefined;
|
|
208
|
-
}>;
|
|
209
|
-
status: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organization_memberships", import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>, MembershipStatus>>>, {
|
|
210
|
-
name: string;
|
|
211
|
-
tableName: "auth_organization_memberships";
|
|
212
|
-
dataType: "string";
|
|
213
|
-
data: MembershipStatus;
|
|
214
|
-
driverParam: string;
|
|
215
|
-
notNull: true;
|
|
216
|
-
hasDefault: true;
|
|
217
|
-
isPrimaryKey: false;
|
|
218
|
-
isAutoincrement: false;
|
|
219
|
-
hasRuntimeDefault: false;
|
|
220
|
-
enumValues: undefined;
|
|
221
|
-
identity: undefined;
|
|
222
|
-
generated: undefined;
|
|
223
|
-
}>;
|
|
224
|
-
updated_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organization_memberships", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
|
|
225
|
-
name: string;
|
|
226
|
-
tableName: "auth_organization_memberships";
|
|
227
|
-
dataType: "number int53";
|
|
228
|
-
data: number;
|
|
229
|
-
driverParam: string | number;
|
|
230
|
-
notNull: true;
|
|
231
|
-
hasDefault: false;
|
|
232
|
-
isPrimaryKey: false;
|
|
233
|
-
isAutoincrement: false;
|
|
234
|
-
hasRuntimeDefault: false;
|
|
235
|
-
enumValues: undefined;
|
|
236
|
-
identity: undefined;
|
|
237
|
-
generated: undefined;
|
|
238
|
-
}>;
|
|
239
|
-
user_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organization_memberships", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
|
|
240
|
-
name: string;
|
|
241
|
-
tableName: "auth_organization_memberships";
|
|
242
|
-
dataType: "string";
|
|
243
|
-
data: string;
|
|
244
|
-
driverParam: string;
|
|
245
|
-
notNull: true;
|
|
246
|
-
hasDefault: false;
|
|
247
|
-
isPrimaryKey: false;
|
|
248
|
-
isAutoincrement: false;
|
|
249
|
-
hasRuntimeDefault: false;
|
|
250
|
-
enumValues: undefined;
|
|
251
|
-
identity: undefined;
|
|
252
|
-
generated: undefined;
|
|
253
|
-
}>;
|
|
254
|
-
};
|
|
255
|
-
dialect: "pg";
|
|
256
|
-
}>;
|
|
257
|
-
export declare const organizationsTable: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
258
|
-
name: "auth_organizations";
|
|
259
|
-
schema: undefined;
|
|
260
|
-
columns: {
|
|
261
|
-
created_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organizations", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
|
|
262
|
-
name: string;
|
|
263
|
-
tableName: "auth_organizations";
|
|
264
|
-
dataType: "number int53";
|
|
265
|
-
data: number;
|
|
266
|
-
driverParam: string | number;
|
|
267
|
-
notNull: true;
|
|
268
|
-
hasDefault: false;
|
|
269
|
-
isPrimaryKey: false;
|
|
270
|
-
isAutoincrement: false;
|
|
271
|
-
hasRuntimeDefault: false;
|
|
272
|
-
enumValues: undefined;
|
|
273
|
-
identity: undefined;
|
|
274
|
-
generated: undefined;
|
|
275
|
-
}>;
|
|
276
|
-
metadata: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organizations", import("drizzle-orm/pg-core").Set$Type<import("drizzle-orm/pg-core").PgJsonbBuilder, Record<string, unknown>>, {
|
|
277
|
-
name: string;
|
|
278
|
-
tableName: "auth_organizations";
|
|
279
|
-
dataType: "object json";
|
|
280
|
-
data: Record<string, unknown>;
|
|
281
|
-
driverParam: unknown;
|
|
282
|
-
notNull: false;
|
|
283
|
-
hasDefault: false;
|
|
284
|
-
isPrimaryKey: false;
|
|
285
|
-
isAutoincrement: false;
|
|
286
|
-
hasRuntimeDefault: false;
|
|
287
|
-
enumValues: undefined;
|
|
288
|
-
identity: undefined;
|
|
289
|
-
generated: undefined;
|
|
290
|
-
}>;
|
|
291
|
-
name: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organizations", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
|
|
292
|
-
name: string;
|
|
293
|
-
tableName: "auth_organizations";
|
|
294
|
-
dataType: "string";
|
|
295
|
-
data: string;
|
|
296
|
-
driverParam: string;
|
|
297
|
-
notNull: true;
|
|
298
|
-
hasDefault: false;
|
|
299
|
-
isPrimaryKey: false;
|
|
300
|
-
isAutoincrement: false;
|
|
301
|
-
hasRuntimeDefault: false;
|
|
302
|
-
enumValues: undefined;
|
|
303
|
-
identity: undefined;
|
|
304
|
-
generated: undefined;
|
|
305
|
-
}>;
|
|
306
|
-
organization_id: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organizations", import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgVarcharBuilder<[string, ...string[]]>>, {
|
|
307
|
-
name: string;
|
|
308
|
-
tableName: "auth_organizations";
|
|
309
|
-
dataType: "string";
|
|
310
|
-
data: string;
|
|
311
|
-
driverParam: string;
|
|
312
|
-
notNull: true;
|
|
313
|
-
hasDefault: false;
|
|
314
|
-
isPrimaryKey: false;
|
|
315
|
-
isAutoincrement: false;
|
|
316
|
-
hasRuntimeDefault: false;
|
|
317
|
-
enumValues: undefined;
|
|
318
|
-
identity: undefined;
|
|
319
|
-
generated: undefined;
|
|
320
|
-
}>;
|
|
321
|
-
updated_at_ms: import("drizzle-orm/pg-core").PgBuildColumn<"auth_organizations", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
|
|
322
|
-
name: string;
|
|
323
|
-
tableName: "auth_organizations";
|
|
324
|
-
dataType: "number int53";
|
|
325
|
-
data: number;
|
|
326
|
-
driverParam: string | number;
|
|
327
|
-
notNull: true;
|
|
328
|
-
hasDefault: false;
|
|
329
|
-
isPrimaryKey: false;
|
|
330
|
-
isAutoincrement: false;
|
|
331
|
-
hasRuntimeDefault: false;
|
|
332
|
-
enumValues: undefined;
|
|
333
|
-
identity: undefined;
|
|
334
|
-
generated: undefined;
|
|
335
|
-
}>;
|
|
336
|
-
};
|
|
337
|
-
dialect: "pg";
|
|
338
|
-
}>;
|
|
339
|
-
export declare const createNeonOrganizationStore: (databaseUrl: string) => OrganizationStore;
|
|
340
|
-
export declare const createPostgresOrganizationStore: <DB extends AnyPgDatabase>(db: DB) => OrganizationStore;
|
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
import { Elysia } from 'elysia';
|
|
2
|
-
import type { SessionRecord } from '../types';
|
|
3
|
-
import { type OrganizationsRouteProps } from './config';
|
|
4
|
-
export declare const organizationRoutes: <UserType>({ authSessionStore, canCreateOrganization, canManageMembers, emit, getUserId, invitationDurationMs, onMembershipAdded, onMembershipRemoved, onOrganizationCreated, onSendInvitation, organizationsRoute, organizationStore, ownerRoles }: OrganizationsRouteProps<UserType>) => Elysia<"", {
|
|
5
|
-
decorator: {};
|
|
6
|
-
store: {
|
|
7
|
-
session: SessionRecord<UserType>;
|
|
8
|
-
unregisteredSession: import("..").UnregisteredSessionRecord;
|
|
9
|
-
};
|
|
10
|
-
derive: {};
|
|
11
|
-
resolve: {};
|
|
12
|
-
}, {
|
|
13
|
-
typebox: {};
|
|
14
|
-
error: {};
|
|
15
|
-
}, {
|
|
16
|
-
schema: {};
|
|
17
|
-
standaloneSchema: {};
|
|
18
|
-
macro: {};
|
|
19
|
-
macroFn: {};
|
|
20
|
-
parser: {};
|
|
21
|
-
response: {};
|
|
22
|
-
}, {
|
|
23
|
-
[x: string]: {
|
|
24
|
-
get: {
|
|
25
|
-
body: unknown;
|
|
26
|
-
params: {};
|
|
27
|
-
query: unknown;
|
|
28
|
-
headers: unknown;
|
|
29
|
-
response: {
|
|
30
|
-
401: "Authentication required";
|
|
31
|
-
200: {
|
|
32
|
-
readonly organizations: {
|
|
33
|
-
membership: import("./types").OrganizationMembership;
|
|
34
|
-
organization: import("./types").Organization | undefined;
|
|
35
|
-
}[];
|
|
36
|
-
};
|
|
37
|
-
422: {
|
|
38
|
-
type: "validation";
|
|
39
|
-
on: string;
|
|
40
|
-
summary?: string;
|
|
41
|
-
message?: string;
|
|
42
|
-
found?: unknown;
|
|
43
|
-
property?: string;
|
|
44
|
-
expected?: string;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
} & {
|
|
50
|
-
[x: string]: {
|
|
51
|
-
post: {
|
|
52
|
-
body: {
|
|
53
|
-
metadata?: {} | undefined;
|
|
54
|
-
name: string;
|
|
55
|
-
};
|
|
56
|
-
params: {};
|
|
57
|
-
query: unknown;
|
|
58
|
-
headers: unknown;
|
|
59
|
-
response: {
|
|
60
|
-
401: "Authentication required";
|
|
61
|
-
403: "Cannot create organizations";
|
|
62
|
-
200: {
|
|
63
|
-
readonly organization: import("./types").Organization;
|
|
64
|
-
};
|
|
65
|
-
422: {
|
|
66
|
-
type: "validation";
|
|
67
|
-
on: string;
|
|
68
|
-
summary?: string;
|
|
69
|
-
message?: string;
|
|
70
|
-
found?: unknown;
|
|
71
|
-
property?: string;
|
|
72
|
-
expected?: string;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
};
|
|
77
|
-
} & {
|
|
78
|
-
[x: string]: {
|
|
79
|
-
":organizationId": {
|
|
80
|
-
invitations: {
|
|
81
|
-
post: {
|
|
82
|
-
body: {
|
|
83
|
-
roles?: string[] | undefined;
|
|
84
|
-
email: string;
|
|
85
|
-
};
|
|
86
|
-
params: {
|
|
87
|
-
organizationId: string;
|
|
88
|
-
};
|
|
89
|
-
query: unknown;
|
|
90
|
-
headers: unknown;
|
|
91
|
-
response: {
|
|
92
|
-
401: "Authentication required";
|
|
93
|
-
403: "Cannot manage members";
|
|
94
|
-
200: {
|
|
95
|
-
readonly invitationId: string;
|
|
96
|
-
readonly token: string;
|
|
97
|
-
};
|
|
98
|
-
422: {
|
|
99
|
-
type: "validation";
|
|
100
|
-
on: string;
|
|
101
|
-
summary?: string;
|
|
102
|
-
message?: string;
|
|
103
|
-
found?: unknown;
|
|
104
|
-
property?: string;
|
|
105
|
-
expected?: string;
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
} & {
|
|
113
|
-
[x: string]: {
|
|
114
|
-
":organizationId": {
|
|
115
|
-
invitations: {
|
|
116
|
-
get: {
|
|
117
|
-
body: unknown;
|
|
118
|
-
params: {
|
|
119
|
-
organizationId: string;
|
|
120
|
-
};
|
|
121
|
-
query: unknown;
|
|
122
|
-
headers: unknown;
|
|
123
|
-
response: {
|
|
124
|
-
401: "Authentication required";
|
|
125
|
-
403: "Cannot manage members";
|
|
126
|
-
200: {
|
|
127
|
-
readonly invitations: {
|
|
128
|
-
email: string;
|
|
129
|
-
expiresAt: number;
|
|
130
|
-
invitationId: string;
|
|
131
|
-
roles: string[];
|
|
132
|
-
state: import("./types").InvitationState;
|
|
133
|
-
}[];
|
|
134
|
-
};
|
|
135
|
-
422: {
|
|
136
|
-
type: "validation";
|
|
137
|
-
on: string;
|
|
138
|
-
summary?: string;
|
|
139
|
-
message?: string;
|
|
140
|
-
found?: unknown;
|
|
141
|
-
property?: string;
|
|
142
|
-
expected?: string;
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
|
-
} & {
|
|
150
|
-
[x: string]: {
|
|
151
|
-
":organizationId": {
|
|
152
|
-
invitations: {
|
|
153
|
-
":invitationId": {
|
|
154
|
-
delete: {
|
|
155
|
-
body: unknown;
|
|
156
|
-
params: {
|
|
157
|
-
organizationId: string;
|
|
158
|
-
invitationId: string;
|
|
159
|
-
};
|
|
160
|
-
query: unknown;
|
|
161
|
-
headers: unknown;
|
|
162
|
-
response: {
|
|
163
|
-
401: "Authentication required";
|
|
164
|
-
403: "Cannot manage members";
|
|
165
|
-
404: "Invitation not found";
|
|
166
|
-
200: {
|
|
167
|
-
readonly revoked: string;
|
|
168
|
-
};
|
|
169
|
-
422: {
|
|
170
|
-
type: "validation";
|
|
171
|
-
on: string;
|
|
172
|
-
summary?: string;
|
|
173
|
-
message?: string;
|
|
174
|
-
found?: unknown;
|
|
175
|
-
property?: string;
|
|
176
|
-
expected?: string;
|
|
177
|
-
};
|
|
178
|
-
};
|
|
179
|
-
};
|
|
180
|
-
};
|
|
181
|
-
};
|
|
182
|
-
};
|
|
183
|
-
};
|
|
184
|
-
} & {
|
|
185
|
-
[x: string]: {
|
|
186
|
-
invitations: {
|
|
187
|
-
accept: {
|
|
188
|
-
post: {
|
|
189
|
-
body: {
|
|
190
|
-
token: string;
|
|
191
|
-
};
|
|
192
|
-
params: {};
|
|
193
|
-
query: unknown;
|
|
194
|
-
headers: unknown;
|
|
195
|
-
response: {
|
|
196
|
-
400: "Invalid or expired invitation";
|
|
197
|
-
401: "Authentication required";
|
|
198
|
-
200: {
|
|
199
|
-
readonly organizationId: string;
|
|
200
|
-
readonly roles: string[];
|
|
201
|
-
};
|
|
202
|
-
422: {
|
|
203
|
-
type: "validation";
|
|
204
|
-
on: string;
|
|
205
|
-
summary?: string;
|
|
206
|
-
message?: string;
|
|
207
|
-
found?: unknown;
|
|
208
|
-
property?: string;
|
|
209
|
-
expected?: string;
|
|
210
|
-
};
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
};
|
|
216
|
-
} & {
|
|
217
|
-
[x: string]: {
|
|
218
|
-
":organizationId": {
|
|
219
|
-
members: {
|
|
220
|
-
get: {
|
|
221
|
-
body: unknown;
|
|
222
|
-
params: {
|
|
223
|
-
organizationId: string;
|
|
224
|
-
};
|
|
225
|
-
query: unknown;
|
|
226
|
-
headers: unknown;
|
|
227
|
-
response: {
|
|
228
|
-
401: "Authentication required";
|
|
229
|
-
403: "Not a member";
|
|
230
|
-
200: {
|
|
231
|
-
readonly members: import("./types").OrganizationMembership[];
|
|
232
|
-
};
|
|
233
|
-
422: {
|
|
234
|
-
type: "validation";
|
|
235
|
-
on: string;
|
|
236
|
-
summary?: string;
|
|
237
|
-
message?: string;
|
|
238
|
-
found?: unknown;
|
|
239
|
-
property?: string;
|
|
240
|
-
expected?: string;
|
|
241
|
-
};
|
|
242
|
-
};
|
|
243
|
-
};
|
|
244
|
-
};
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
|
-
} & {
|
|
248
|
-
[x: string]: {
|
|
249
|
-
":organizationId": {
|
|
250
|
-
members: {
|
|
251
|
-
":userId": {
|
|
252
|
-
delete: {
|
|
253
|
-
body: unknown;
|
|
254
|
-
params: {
|
|
255
|
-
userId: string;
|
|
256
|
-
organizationId: string;
|
|
257
|
-
};
|
|
258
|
-
query: unknown;
|
|
259
|
-
headers: unknown;
|
|
260
|
-
response: {
|
|
261
|
-
401: "Authentication required";
|
|
262
|
-
403: "Cannot manage members";
|
|
263
|
-
200: {
|
|
264
|
-
readonly removed: string;
|
|
265
|
-
};
|
|
266
|
-
422: {
|
|
267
|
-
type: "validation";
|
|
268
|
-
on: string;
|
|
269
|
-
summary?: string;
|
|
270
|
-
message?: string;
|
|
271
|
-
found?: unknown;
|
|
272
|
-
property?: string;
|
|
273
|
-
expected?: string;
|
|
274
|
-
};
|
|
275
|
-
};
|
|
276
|
-
};
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
};
|
|
280
|
-
};
|
|
281
|
-
}, {
|
|
282
|
-
derive: {};
|
|
283
|
-
resolve: {};
|
|
284
|
-
schema: {};
|
|
285
|
-
standaloneSchema: {};
|
|
286
|
-
response: {};
|
|
287
|
-
}, {
|
|
288
|
-
derive: {};
|
|
289
|
-
resolve: {};
|
|
290
|
-
schema: {};
|
|
291
|
-
standaloneSchema: {};
|
|
292
|
-
response: {};
|
|
293
|
-
} & {
|
|
294
|
-
derive: {};
|
|
295
|
-
resolve: {};
|
|
296
|
-
schema: {};
|
|
297
|
-
standaloneSchema: {};
|
|
298
|
-
response: {};
|
|
299
|
-
}>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { OrganizationId } from '../tenancy';
|
|
2
|
-
export type Organization = {
|
|
3
|
-
createdAt: number;
|
|
4
|
-
metadata?: Record<string, unknown>;
|
|
5
|
-
name: string;
|
|
6
|
-
organizationId: OrganizationId;
|
|
7
|
-
updatedAt: number;
|
|
8
|
-
};
|
|
9
|
-
export type MembershipStatus = 'active' | 'suspended';
|
|
10
|
-
export type OrganizationMembership = {
|
|
11
|
-
createdAt: number;
|
|
12
|
-
organizationId: OrganizationId;
|
|
13
|
-
roles: string[];
|
|
14
|
-
status: MembershipStatus;
|
|
15
|
-
updatedAt: number;
|
|
16
|
-
userId: string;
|
|
17
|
-
};
|
|
18
|
-
export type InvitationState = 'accepted' | 'pending' | 'revoked';
|
|
19
|
-
export type OrganizationInvitation = {
|
|
20
|
-
acceptedAt?: number;
|
|
21
|
-
createdAt: number;
|
|
22
|
-
email: string;
|
|
23
|
-
expiresAt: number;
|
|
24
|
-
invitationId: string;
|
|
25
|
-
inviterUserId?: string;
|
|
26
|
-
organizationId: OrganizationId;
|
|
27
|
-
roles: string[];
|
|
28
|
-
state: InvitationState;
|
|
29
|
-
tokenHash: string;
|
|
30
|
-
};
|
|
31
|
-
export type OrganizationStore = {
|
|
32
|
-
deleteOrganization: (organizationId: OrganizationId) => Promise<void>;
|
|
33
|
-
getInvitation: (invitationId: string) => Promise<OrganizationInvitation | undefined>;
|
|
34
|
-
getInvitationByTokenHash: (tokenHash: string) => Promise<OrganizationInvitation | undefined>;
|
|
35
|
-
getMembership: (organizationId: OrganizationId, userId: string) => Promise<OrganizationMembership | undefined>;
|
|
36
|
-
getOrganization: (organizationId: OrganizationId) => Promise<Organization | undefined>;
|
|
37
|
-
listInvitationsByOrganization: (organizationId: OrganizationId) => Promise<OrganizationInvitation[]>;
|
|
38
|
-
listMembershipsByOrganization: (organizationId: OrganizationId) => Promise<OrganizationMembership[]>;
|
|
39
|
-
listMembershipsByUser: (userId: string) => Promise<OrganizationMembership[]>;
|
|
40
|
-
listOrganizations: () => Promise<Organization[]>;
|
|
41
|
-
removeMembership: (organizationId: OrganizationId, userId: string) => Promise<void>;
|
|
42
|
-
saveInvitation: (invitation: OrganizationInvitation) => Promise<void>;
|
|
43
|
-
saveMembership: (membership: OrganizationMembership) => Promise<void>;
|
|
44
|
-
saveOrganization: (organization: Organization) => Promise<void>;
|
|
45
|
-
};
|