Skip to content

A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.

TypeScript fluxerfluxerapp

feat(app): add pass and birth date APIs, drop card age check

Hampus262600e620c4
diff --git a/fluxer_app/src/features/app/constants/Endpoints.ts b/fluxer_app/src/features/app/constants/Endpoints.ts
index 3f44f4d0c..e862b1fca 100644
--- a/fluxer_app/src/features/app/constants/Endpoints.ts
+++ b/fluxer_app/src/features/app/constants/Endpoints.ts
@@ -4,6 +4,7 @@ import {ME} from '@fluxer/constants/src/AppConstants';
export const Endpoints = {
INSTANCE_SETUP_ACCOUNT_IDENTITY: '/instance/setup/account-identity',
+ INSTANCE_SETUP_TOKEN_CHECKS: '/instance/setup/token-checks',
ATTACHMENTS_REFRESH_URLS: '/attachments/refresh-urls',
AUTH_LOGIN: '/auth/login',
AUTH_LOGIN_MFA_TOTP: '/auth/login/mfa/totp',
@@ -13,6 +14,10 @@ export const Endpoints = {
AUTH_WEBAUTHN_AUTHENTICATE: '/auth/webauthn/authenticate',
AUTH_LOGOUT: '/auth/logout',
AUTH_REGISTER: '/auth/register',
+ AUTH_IDENTIFY: '/auth/identify',
+ AUTH_EMAIL_CODE_SEND: '/auth/email-code/send',
+ AUTH_EMAIL_CODE_VERIFY: '/auth/email-code/verify',
+ AUTH_ACCOUNT_HANDOFF_REDEEM: '/auth/register/handoff/redeem',
AUTH_USERNAME_SUGGESTIONS: '/auth/username-suggestions',
AUTH_USERNAME_AVAILABILITY: '/auth/username-availability',
AUTH_SESSIONS: '/auth/sessions',
@@ -35,6 +40,7 @@ export const Endpoints = {
AUTH_VERIFY_EMAIL: '/auth/verify',
AUTH_RESEND_VERIFICATION: '/auth/verify/resend',
AUTH_AUTHORIZE_IP: '/auth/authorize-ip',
+ AUTH_SIGN_IN_LINK: '/auth/sign-in-link',
AUTH_IP_AUTHORIZATION_RESEND: '/auth/ip-authorization/resend',
AUTH_IP_AUTHORIZATION_POLL: (ticket: string) => {
const params = new URLSearchParams({ticket});
@@ -136,6 +142,7 @@ export const Endpoints = {
GUILD_WEBHOOKS: (guildId: string) => `/guilds/${guildId}/webhooks`,
GUILD_AUDIT_LOGS: (guildId: string) => `/guilds/${guildId}/audit-logs`,
INVITE: (code: string) => `/invites/${code}`,
+ INVITE_VISIT: (code: string) => `/invites/${code}/visit`,
GIFT: (code: string) => `/gifts/${code}`,
GIFT_REDEEM: (code: string) => `/gifts/${code}/redeem`,
USER_GIFTS: '/users/@me/gifts',
@@ -152,7 +159,18 @@ export const Endpoints = {
PREMIUM_REFUND_LATEST: '/premium/refund-latest',
STRIPE_CHECKOUT_SUBSCRIPTION: '/stripe/checkout/subscription',
STRIPE_CHECKOUT_GIFT: '/stripe/checkout/gift',
- AGE_VERIFICATION: '/users/@me/age-verification',
+ OPERATOR_PASS_STATE: '/operator-pass/state',
+ OPERATOR_PASS_CHECKOUT: '/operator-pass/checkout',
+ OPERATOR_PASS_PURCHASES: '/operator-pass/purchases',
+ OPERATOR_PASS_LISTING: '/operator-pass/listing',
+ OPERATOR_PASS_PURCHASE_WITHDRAW: (purchaseId: string) =>
+ `/operator-pass/purchases/${encodeURIComponent(purchaseId)}/withdraw`,
+ OPERATOR_PASS_PASSES: '/operator-pass/passes',
+ OPERATOR_PASS_PASS_OFFERS: (passId: string) => `/operator-pass/passes/${encodeURIComponent(passId)}/offers`,
+ OPERATOR_PASS_PASS_WITHDRAW: (passId: string) => `/operator-pass/passes/${encodeURIComponent(passId)}/withdraw`,
+ OPERATOR_PASS_OFFER: (offerId: string) => `/operator-pass/offers/${encodeURIComponent(offerId)}`,
+ OPERATOR_PASS_OFFER_ACCEPT: (offerId: string) => `/operator-pass/offers/${encodeURIComponent(offerId)}/accept`,
+ OPERATOR_PASS_OFFER_DECLINE: (offerId: string) => `/operator-pass/offers/${encodeURIComponent(offerId)}/decline`,
READ_STATES_ACK_BULK: '/read-states/ack-bulk',
READ_STATES_ACK: '/read-states/ack',
DSA_REPORT_EMAIL_SEND: '/reports/dsa/email/send',
@@ -172,6 +190,13 @@ export const Endpoints = {
CHANNEL_BULK_DELETE_MY_MESSAGES: (channelId: string) => `/channels/${channelId}/messages/bulk-delete-mine`,
USER_ME: '/users/@me',
USER_TERMS_ACCEPTANCE: '/users/@me/terms-acceptance',
+ USER_DATE_OF_BIRTH: '/users/@me/date-of-birth',
+ USER_CLAIM: '/users/@me/claim',
+ USER_EMAIL_VERIFICATION_SEND: '/users/@me/email-verification/send',
+ USER_EMAIL_VERIFICATION_CONFIRM: '/users/@me/email-verification/confirm',
+ USER_SUDO_EMAIL_CODE: '/users/@me/sudo/email-code',
+ USER_GUILD_VISIT: (guildId: string) => `/users/@me/guild-visits/${guildId}`,
+ USER_GUILD_VISIT_JOIN: (guildId: string) => `/users/@me/guild-visits/${guildId}/join`,
USER_MENTION: (messageId: string) => `/users/@me/mentions/${messageId}`,
USER_MENTIONS: '/users/@me/mentions',
USER_MENTIONS_READ: '/users/@me/mentions/read',
@@ -218,6 +243,7 @@ export const Endpoints = {
USER_NOTE: (userId: string) => `/users/@me/notes/${userId}`,
USER_CHECK_TAG: '/users/check-tag',
USER_PROFILE: (query = ME) => `/users/${query}/profile`,
+ USER_PROFILE_BADGES_PREVIEW: '/users/@me/profile-badges/preview',
USER_RELATIONSHIP: (userId: string) => `/users/@me/relationships/${userId}`,
USER_RELATIONSHIPS: '/users/@me/relationships',
USER_THEMES: '/users/@me/themes',
@@ -249,6 +275,7 @@ export const Endpoints = {
DISCOVERY_GUILDS: '/discovery/guilds',
DISCOVERY_CATEGORIES: '/discovery/categories',
DISCOVERY_JOIN: (guildId: string) => `/discovery/guilds/${guildId}/join`,
+ DISCOVERY_VISIT: (guildId: string) => `/discovery/guilds/${guildId}/visit`,
DISCOVERY_CHANNEL_PREVIEW: (guildId: string, channelId: string) =>
`/discovery/guilds/${guildId}/channels/${channelId}`,
GUILD_DISCOVERY: (guildId: string) => `/guilds/${guildId}/discovery`,
diff --git a/fluxer_app/src/features/gateway/events/EventRouter.ts b/fluxer_app/src/features/gateway/events/EventRouter.ts
index 23ed4bac0..4fe0bd4d7 100644
--- a/fluxer_app/src/features/gateway/events/EventRouter.ts
+++ b/fluxer_app/src/features/gateway/events/EventRouter.ts
@@ -50,6 +50,7 @@ import {handleRecentMentionDelete} from '@app/features/messaging/events/RecentMe
import {handleSavedMessageCreate} from '@app/features/messaging/events/SavedMessageCreate';
import {handleSavedMessageDelete} from '@app/features/messaging/events/SavedMessageDelete';
import {handleTypingStart} from '@app/features/messaging/events/TypingStart';
+import {handleOperatorPassUpdate} from '@app/features/premium/events/OperatorPassUpdate';
import {handlePresenceUpdate} from '@app/features/presence/events/PresenceUpdate';
import {handlePresenceUpdateBulk} from '@app/features/presence/events/PresenceUpdateBulk';
import {handleRelationshipAdd} from '@app/features/relationship/events/RelationshipAdd';
@@ -108,6 +109,7 @@ export function createHandlerRegistry(): GatewayHandlerRegistry {
registry.set('USER_GUILD_SETTINGS_UPDATE', handleUserGuildSettingsUpdate as GatewayEventHandler);
registry.set('USER_PINNED_DMS_UPDATE', handleUserPinnedDmsUpdate as GatewayEventHandler);
registry.set('USER_NOTE_UPDATE', handleUserNoteUpdate as GatewayEventHandler);
+ registry.set('OPERATOR_PASS_UPDATE', handleOperatorPassUpdate as GatewayEventHandler);
registry.set('USER_CONNECTIONS_UPDATE', handleUserConnectionsUpdate as GatewayEventHandler);
registry.set('WEBAUTHN_CREDENTIALS_UPDATE', handleWebAuthnCredentialsUpdate as GatewayEventHandler);
registry.set('GUILD_CREATE', handleGuildCreate as GatewayEventHandler);