mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-19 05:55:34 +09:00
feat(premium): add the Plutonium page behind an experiment (#3097)
This commit is contained in:
1 parent
9a074adb11
commit
be69333eaf
118 files changed
+18252
-2368
No files matched your search
@@ -4,6 +4,10 @@ import {
|
||||
DomainMigrationAssignmentResponse,
|
||||
INERT_DOMAIN_MIGRATION_ASSIGNMENT,
|
||||
} from '@fluxer/schema/src/domains/admin/DomainMigrationSchemas';
|
||||
import {
|
||||
INERT_PLUTONIUM_PAGE_ASSIGNMENT,
|
||||
PlutoniumPageAssignmentResponse,
|
||||
} from '@fluxer/schema/src/domains/admin/PlutoniumPageSchemas';
|
||||
import {z} from 'zod';
|
||||
|
||||
export const EXPERIMENT_MIN_POLL_INTERVAL_SECONDS = 60;
|
||||
@@ -42,6 +46,7 @@ export type ExperimentDeliveryConfigResponse = z.infer<typeof ExperimentDelivery
|
||||
|
||||
const ExperimentAssignmentsSchema = z.object({
|
||||
domain_migration: DomainMigrationAssignmentResponse.optional(),
|
||||
plutonium_page: PlutoniumPageAssignmentResponse.optional(),
|
||||
});
|
||||
|
||||
export const ExperimentAssignmentsResponse = z.object({
|
||||
@@ -63,3 +68,7 @@ export function readDomainMigrationAssignment(
|
||||
): DomainMigrationAssignmentResponse {
|
||||
return response.assignments.domain_migration ?? INERT_DOMAIN_MIGRATION_ASSIGNMENT;
|
||||
}
|
||||
|
||||
export function readPlutoniumPageAssignment(response: ExperimentAssignmentsResponse): PlutoniumPageAssignmentResponse {
|
||||
return response.assignments.plutonium_page ?? INERT_PLUTONIUM_PAGE_ASSIGNMENT;
|
||||
}
|
||||
Reference in new issue
Block a user