@bymax-one/nest-auth 1.5.0 → 1.5.2
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/CHANGELOG.md +123 -1
- package/README.md +49 -7
- package/dist/client/index.cjs +9 -9
- package/dist/client/index.mjs +10 -10
- package/dist/react/index.cjs +18 -8
- package/dist/react/index.mjs +18 -8
- package/dist/server/index.cjs +225 -27
- package/dist/server/index.d.cts +127 -12
- package/dist/server/index.d.ts +127 -12
- package/dist/server/index.mjs +225 -28
- package/dist/shared/index.cjs +1 -0
- package/dist/shared/index.d.cts +55 -1
- package/dist/shared/index.d.ts +55 -1
- package/dist/shared/index.mjs +1 -1
- package/package.json +1 -1
package/dist/shared/index.d.cts
CHANGED
|
@@ -405,6 +405,60 @@ declare const AUTH_OAUTH_ROUTES: {
|
|
|
405
405
|
/** GET — the provider redirects back here with the authorization code. */
|
|
406
406
|
readonly callback: "oauth/:provider/callback";
|
|
407
407
|
};
|
|
408
|
+
/**
|
|
409
|
+
* Workspace routes (`controllers.workspaces: true`).
|
|
410
|
+
*
|
|
411
|
+
* Mounted under `workspaces/` (`src/server/controllers/workspace.controller.ts`). The
|
|
412
|
+
* `:workspaceId` placeholder must be substituted before the request is issued; the workspace a
|
|
413
|
+
* request acts in is always this path segment, never the body or a header.
|
|
414
|
+
*/
|
|
415
|
+
declare const AUTH_WORKSPACE_ROUTES: {
|
|
416
|
+
/**
|
|
417
|
+
* GET — the caller's own active memberships and the workspace they last switched to. POST on the
|
|
418
|
+
* same path creates a workspace.
|
|
419
|
+
*/
|
|
420
|
+
readonly list: "workspaces";
|
|
421
|
+
/** GET — the workspace and the caller's role in it. */
|
|
422
|
+
readonly access: "workspaces/:workspaceId/access";
|
|
423
|
+
/** POST — record the workspace as the caller's last active one. */
|
|
424
|
+
readonly switch: "workspaces/:workspaceId/switch";
|
|
425
|
+
/** GET — the members of the workspace. */
|
|
426
|
+
readonly members: "workspaces/:workspaceId/members";
|
|
427
|
+
/** PATCH — rename the workspace. */
|
|
428
|
+
readonly rename: "workspaces/:workspaceId";
|
|
429
|
+
/**
|
|
430
|
+
* POST — schedule the workspace for deletion, re-proving the caller.
|
|
431
|
+
*
|
|
432
|
+
* POST rather than DELETE because the password travels in the body, and a payload on DELETE has
|
|
433
|
+
* no defined semantics (RFC 9110), so an intermediary or a generated client may drop it.
|
|
434
|
+
*/
|
|
435
|
+
readonly scheduleDeletion: "workspaces/:workspaceId/schedule-deletion";
|
|
436
|
+
/** POST — undo a scheduled deletion within its grace period. */
|
|
437
|
+
readonly restore: "workspaces/:workspaceId/restore";
|
|
438
|
+
/**
|
|
439
|
+
* PATCH — change a member's role. DELETE on the same path removes the member, with no body.
|
|
440
|
+
*/
|
|
441
|
+
readonly member: "workspaces/:workspaceId/members/:userId";
|
|
442
|
+
/** POST — leave the workspace. */
|
|
443
|
+
readonly leave: "workspaces/:workspaceId/leave";
|
|
444
|
+
/** POST — hand ownership to another member, re-proving the caller. */
|
|
445
|
+
readonly transferOwnership: "workspaces/:workspaceId/transfer-ownership";
|
|
446
|
+
/**
|
|
447
|
+
* POST — invite an address to the workspace (`controllers.workspaceInvitations: true`). GET on the
|
|
448
|
+
* same path lists the pending invitations.
|
|
449
|
+
*/
|
|
450
|
+
readonly invitations: "workspaces/:workspaceId/invitations";
|
|
451
|
+
/** POST — send a pending invitation again under a new token. */
|
|
452
|
+
readonly resendInvitation: "workspaces/:workspaceId/invitations/resend";
|
|
453
|
+
/** POST — withdraw a pending invitation. */
|
|
454
|
+
readonly revokeInvitation: "workspaces/:workspaceId/invitations/revoke";
|
|
455
|
+
/** POST — what a token is for, without signing in. Public. */
|
|
456
|
+
readonly previewInvitation: "workspaces/invitations/preview";
|
|
457
|
+
/** POST — accept an invitation as the signed-in account it was addressed to. */
|
|
458
|
+
readonly acceptInvitation: "workspaces/invitations/accept";
|
|
459
|
+
/** POST — accept an invitation by creating the account it was addressed to. Public. */
|
|
460
|
+
readonly acceptInvitationSignup: "workspaces/invitations/accept-signup";
|
|
461
|
+
};
|
|
408
462
|
/**
|
|
409
463
|
* Aggregated route map grouped by domain.
|
|
410
464
|
*
|
|
@@ -1170,5 +1224,5 @@ type AuthContextKind = 'dashboard' | 'platform';
|
|
|
1170
1224
|
*/
|
|
1171
1225
|
type TokenDeliveryMode = 'cookie' | 'bearer';
|
|
1172
1226
|
|
|
1173
|
-
export { AUTH_ACCESS_COOKIE_NAME, AUTH_DASHBOARD_ROUTES, AUTH_EMAIL_CHANGE_ROUTES, AUTH_ERROR_CODES, AUTH_ERROR_STATUS, AUTH_HAS_SESSION_COOKIE_NAME, AUTH_INVITATION_ROUTES, AUTH_MFA_ROUTES, AUTH_OAUTH_ROUTES, AUTH_PASSWORD_ROUTES, AUTH_PLATFORM_MFA_ROUTES, AUTH_PLATFORM_ROUTES, AUTH_PROXY_ROUTES, AUTH_REFRESH_COOKIE_NAME, AUTH_REFRESH_COOKIE_PATH, AUTH_REFRESH_SKIP_PATH_SUFFIXES, AUTH_ROUTES, AUTH_SESSION_ROUTES, AuthClientError, buildAuthRefreshSkipSuffixes, fillRoute, pathSegment, trimSlashes };
|
|
1227
|
+
export { AUTH_ACCESS_COOKIE_NAME, AUTH_DASHBOARD_ROUTES, AUTH_EMAIL_CHANGE_ROUTES, AUTH_ERROR_CODES, AUTH_ERROR_STATUS, AUTH_HAS_SESSION_COOKIE_NAME, AUTH_INVITATION_ROUTES, AUTH_MFA_ROUTES, AUTH_OAUTH_ROUTES, AUTH_PASSWORD_ROUTES, AUTH_PLATFORM_MFA_ROUTES, AUTH_PLATFORM_ROUTES, AUTH_PROXY_ROUTES, AUTH_REFRESH_COOKIE_NAME, AUTH_REFRESH_COOKIE_PATH, AUTH_REFRESH_SKIP_PATH_SUFFIXES, AUTH_ROUTES, AUTH_SESSION_ROUTES, AUTH_WORKSPACE_ROUTES, AuthClientError, buildAuthRefreshSkipSuffixes, fillRoute, pathSegment, trimSlashes };
|
|
1174
1228
|
export type { AcceptedWorkspaceInvitation, AuthContextKind, AuthCookieNames, AuthErrorCode, AuthErrorResponse, AuthJwtPayload, AuthPlatformUserClient, AuthResponseCode, AuthResult, AuthUserClient, BootstrapInvitationPreviewClient, DashboardJwtPayload, LoginResult, MemberInvitationPreviewClient, MembershipStatusClient, MfaChallengeResult, MfaTempPayload, PlatformAuthResult, PlatformJwtPayload, PlatformLoginResult, TokenDeliveryMode, WorkspaceAccessClient, WorkspaceClient, WorkspaceInvitationClient, WorkspaceInvitationPage, WorkspaceInvitationPreview, WorkspaceListResult, WorkspaceMemberClient, WorkspaceMemberPage, WorkspacePageParams, WorkspaceStatusClient };
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -405,6 +405,60 @@ declare const AUTH_OAUTH_ROUTES: {
|
|
|
405
405
|
/** GET — the provider redirects back here with the authorization code. */
|
|
406
406
|
readonly callback: "oauth/:provider/callback";
|
|
407
407
|
};
|
|
408
|
+
/**
|
|
409
|
+
* Workspace routes (`controllers.workspaces: true`).
|
|
410
|
+
*
|
|
411
|
+
* Mounted under `workspaces/` (`src/server/controllers/workspace.controller.ts`). The
|
|
412
|
+
* `:workspaceId` placeholder must be substituted before the request is issued; the workspace a
|
|
413
|
+
* request acts in is always this path segment, never the body or a header.
|
|
414
|
+
*/
|
|
415
|
+
declare const AUTH_WORKSPACE_ROUTES: {
|
|
416
|
+
/**
|
|
417
|
+
* GET — the caller's own active memberships and the workspace they last switched to. POST on the
|
|
418
|
+
* same path creates a workspace.
|
|
419
|
+
*/
|
|
420
|
+
readonly list: "workspaces";
|
|
421
|
+
/** GET — the workspace and the caller's role in it. */
|
|
422
|
+
readonly access: "workspaces/:workspaceId/access";
|
|
423
|
+
/** POST — record the workspace as the caller's last active one. */
|
|
424
|
+
readonly switch: "workspaces/:workspaceId/switch";
|
|
425
|
+
/** GET — the members of the workspace. */
|
|
426
|
+
readonly members: "workspaces/:workspaceId/members";
|
|
427
|
+
/** PATCH — rename the workspace. */
|
|
428
|
+
readonly rename: "workspaces/:workspaceId";
|
|
429
|
+
/**
|
|
430
|
+
* POST — schedule the workspace for deletion, re-proving the caller.
|
|
431
|
+
*
|
|
432
|
+
* POST rather than DELETE because the password travels in the body, and a payload on DELETE has
|
|
433
|
+
* no defined semantics (RFC 9110), so an intermediary or a generated client may drop it.
|
|
434
|
+
*/
|
|
435
|
+
readonly scheduleDeletion: "workspaces/:workspaceId/schedule-deletion";
|
|
436
|
+
/** POST — undo a scheduled deletion within its grace period. */
|
|
437
|
+
readonly restore: "workspaces/:workspaceId/restore";
|
|
438
|
+
/**
|
|
439
|
+
* PATCH — change a member's role. DELETE on the same path removes the member, with no body.
|
|
440
|
+
*/
|
|
441
|
+
readonly member: "workspaces/:workspaceId/members/:userId";
|
|
442
|
+
/** POST — leave the workspace. */
|
|
443
|
+
readonly leave: "workspaces/:workspaceId/leave";
|
|
444
|
+
/** POST — hand ownership to another member, re-proving the caller. */
|
|
445
|
+
readonly transferOwnership: "workspaces/:workspaceId/transfer-ownership";
|
|
446
|
+
/**
|
|
447
|
+
* POST — invite an address to the workspace (`controllers.workspaceInvitations: true`). GET on the
|
|
448
|
+
* same path lists the pending invitations.
|
|
449
|
+
*/
|
|
450
|
+
readonly invitations: "workspaces/:workspaceId/invitations";
|
|
451
|
+
/** POST — send a pending invitation again under a new token. */
|
|
452
|
+
readonly resendInvitation: "workspaces/:workspaceId/invitations/resend";
|
|
453
|
+
/** POST — withdraw a pending invitation. */
|
|
454
|
+
readonly revokeInvitation: "workspaces/:workspaceId/invitations/revoke";
|
|
455
|
+
/** POST — what a token is for, without signing in. Public. */
|
|
456
|
+
readonly previewInvitation: "workspaces/invitations/preview";
|
|
457
|
+
/** POST — accept an invitation as the signed-in account it was addressed to. */
|
|
458
|
+
readonly acceptInvitation: "workspaces/invitations/accept";
|
|
459
|
+
/** POST — accept an invitation by creating the account it was addressed to. Public. */
|
|
460
|
+
readonly acceptInvitationSignup: "workspaces/invitations/accept-signup";
|
|
461
|
+
};
|
|
408
462
|
/**
|
|
409
463
|
* Aggregated route map grouped by domain.
|
|
410
464
|
*
|
|
@@ -1170,5 +1224,5 @@ type AuthContextKind = 'dashboard' | 'platform';
|
|
|
1170
1224
|
*/
|
|
1171
1225
|
type TokenDeliveryMode = 'cookie' | 'bearer';
|
|
1172
1226
|
|
|
1173
|
-
export { AUTH_ACCESS_COOKIE_NAME, AUTH_DASHBOARD_ROUTES, AUTH_EMAIL_CHANGE_ROUTES, AUTH_ERROR_CODES, AUTH_ERROR_STATUS, AUTH_HAS_SESSION_COOKIE_NAME, AUTH_INVITATION_ROUTES, AUTH_MFA_ROUTES, AUTH_OAUTH_ROUTES, AUTH_PASSWORD_ROUTES, AUTH_PLATFORM_MFA_ROUTES, AUTH_PLATFORM_ROUTES, AUTH_PROXY_ROUTES, AUTH_REFRESH_COOKIE_NAME, AUTH_REFRESH_COOKIE_PATH, AUTH_REFRESH_SKIP_PATH_SUFFIXES, AUTH_ROUTES, AUTH_SESSION_ROUTES, AuthClientError, buildAuthRefreshSkipSuffixes, fillRoute, pathSegment, trimSlashes };
|
|
1227
|
+
export { AUTH_ACCESS_COOKIE_NAME, AUTH_DASHBOARD_ROUTES, AUTH_EMAIL_CHANGE_ROUTES, AUTH_ERROR_CODES, AUTH_ERROR_STATUS, AUTH_HAS_SESSION_COOKIE_NAME, AUTH_INVITATION_ROUTES, AUTH_MFA_ROUTES, AUTH_OAUTH_ROUTES, AUTH_PASSWORD_ROUTES, AUTH_PLATFORM_MFA_ROUTES, AUTH_PLATFORM_ROUTES, AUTH_PROXY_ROUTES, AUTH_REFRESH_COOKIE_NAME, AUTH_REFRESH_COOKIE_PATH, AUTH_REFRESH_SKIP_PATH_SUFFIXES, AUTH_ROUTES, AUTH_SESSION_ROUTES, AUTH_WORKSPACE_ROUTES, AuthClientError, buildAuthRefreshSkipSuffixes, fillRoute, pathSegment, trimSlashes };
|
|
1174
1228
|
export type { AcceptedWorkspaceInvitation, AuthContextKind, AuthCookieNames, AuthErrorCode, AuthErrorResponse, AuthJwtPayload, AuthPlatformUserClient, AuthResponseCode, AuthResult, AuthUserClient, BootstrapInvitationPreviewClient, DashboardJwtPayload, LoginResult, MemberInvitationPreviewClient, MembershipStatusClient, MfaChallengeResult, MfaTempPayload, PlatformAuthResult, PlatformJwtPayload, PlatformLoginResult, TokenDeliveryMode, WorkspaceAccessClient, WorkspaceClient, WorkspaceInvitationClient, WorkspaceInvitationPage, WorkspaceInvitationPreview, WorkspaceListResult, WorkspaceMemberClient, WorkspaceMemberPage, WorkspacePageParams, WorkspaceStatusClient };
|
package/dist/shared/index.mjs
CHANGED
|
@@ -436,4 +436,4 @@ var AuthClientError = class extends Error {
|
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
438
|
|
|
439
|
-
export { AUTH_ACCESS_COOKIE_NAME, AUTH_DASHBOARD_ROUTES, AUTH_EMAIL_CHANGE_ROUTES, AUTH_ERROR_CODES, AUTH_ERROR_STATUS, AUTH_HAS_SESSION_COOKIE_NAME, AUTH_INVITATION_ROUTES, AUTH_MFA_ROUTES, AUTH_OAUTH_ROUTES, AUTH_PASSWORD_ROUTES, AUTH_PLATFORM_MFA_ROUTES, AUTH_PLATFORM_ROUTES, AUTH_PROXY_ROUTES, AUTH_REFRESH_COOKIE_NAME, AUTH_REFRESH_COOKIE_PATH, AUTH_REFRESH_SKIP_PATH_SUFFIXES, AUTH_ROUTES, AUTH_SESSION_ROUTES, AuthClientError, buildAuthRefreshSkipSuffixes, fillRoute, pathSegment, trimSlashes };
|
|
439
|
+
export { AUTH_ACCESS_COOKIE_NAME, AUTH_DASHBOARD_ROUTES, AUTH_EMAIL_CHANGE_ROUTES, AUTH_ERROR_CODES, AUTH_ERROR_STATUS, AUTH_HAS_SESSION_COOKIE_NAME, AUTH_INVITATION_ROUTES, AUTH_MFA_ROUTES, AUTH_OAUTH_ROUTES, AUTH_PASSWORD_ROUTES, AUTH_PLATFORM_MFA_ROUTES, AUTH_PLATFORM_ROUTES, AUTH_PROXY_ROUTES, AUTH_REFRESH_COOKIE_NAME, AUTH_REFRESH_COOKIE_PATH, AUTH_REFRESH_SKIP_PATH_SUFFIXES, AUTH_ROUTES, AUTH_SESSION_ROUTES, AUTH_WORKSPACE_ROUTES, AuthClientError, buildAuthRefreshSkipSuffixes, fillRoute, pathSegment, trimSlashes };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bymax-one/nest-auth",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "Full-stack authentication and authorization package for NestJS, React and Next.js — JWT, MFA, OAuth, sessions, multi-tenant SaaS ready",
|
|
5
5
|
"author": "Bymax One <support@bymax.one>",
|
|
6
6
|
"license": "MIT",
|