Issue:
feat: Create new versions of BE pre-login APIs

Currently we've made SPT and decision starter APIs. Now we have to integrate SPT into email specific, signin and signup APIs.

For backwards compatibility, old version should also need to be kept. So we can do these new APIs accessible with a query param.

Resolution:
<think>
PR Context:
- Title: feat(users): Create Token only support for pre-login user flow APIs
- Merged: 2024-05-07T09:41:39Z
- Files changed: 8 files
- Commits: 11 commits

Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->

- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD

## Description
<!-- Describe your changes in detail -->
This PR will add new core functions for the following APIs which can be used with SPTs.
1. Accept Invite
2. Sign up
3. Verify Email
4. Accept Invite from Email

### Additional Changes

- [x] This PR modifies the API contract
- [ ] Thi
</think>

To implement this, you'll need to modify:


**Detailed Implementation:**


**Commit 1:** feat(users): Create Token only support for pre-login user flow APIs (#4558)
Files to modify:


**crates/api_models/src/events/user.rs**
  Add:
    - function: private::get_api_event_type
    - impl: impl ApiEventMetric for TokenOrPayloadResponse<T>

**crates/api_models/src/user.rs**
  Remove:
    - enum: pub::SignInWithTokenResponse
  Add:
    - enum: pub::TokenOrPayloadResponse

**crates/api_models/src/user_role.rs**
  Modify existing code

**crates/router/src/core/user.rs**
  Modify existing code

**crates/router/src/core/user_role.rs**
  Add:
    - function: pub::accept_invitation_token_only_flow

**crates/router/src/routes/user.rs**
  Modify existing code

**crates/router/src/routes/user_role.rs**
  Modify existing code

**crates/router/src/types/domain/user/decision_manager.rs**
  Add:
    - function: pub::get_token_with_user_role
    - function: private::from
    - function: private::from
    - impl: impl From<SPTFlow> for UserFlow
    - impl: impl From<JWTFlow> for UserFlow