Files
discourse/frontend/discourse/app/data/schemas/index.js
T
Jarek Radosz a6e133ceab DEV: Introduce warpdrive store (with compat layer) and migrate some models (#42147)
Adds a WarpDrive store (`service:warp-store`, LegacyMode + JSON:API
cache) alongside the existing `service:store`, routing requests through
Discourse's `ajax()` helper.

`RestCompatModel` bridges legacy `RestModel` callsites
(`get`/`set`/`setProperties`, `store.createRecord`, `save`,
`destroyRecord`) onto it.

Converts **badge, user-badge, topic-details, bookmark, tag, tag-group,
tag-info, tag-notification, tag-settings and archetype**, with per-model
schemas, request builders and payload normalizers.

Attributes outside a schema (plugin `add_to_serializer` fields, ad-hoc
`create` keys) are retained separately so nothing the server sends is
dropped.
2026-09-03 08:57:28 +02:00

29 lines
917 B
JavaScript

import { ArchetypeSchema } from "./archetype";
import { BadgeSchema } from "./badge";
import { BadgeGroupingSchema } from "./badge-grouping";
import { BadgeTypeSchema } from "./badge-type";
import { BookmarkSchema } from "./bookmark";
import { TagSchema } from "./tag";
import { TagGroupSchema } from "./tag-group";
import { TagInfoSchema } from "./tag-info";
import { TagNotificationSchema } from "./tag-notification";
import { TagSettingsSchema } from "./tag-settings";
import { TopicDetailsSchema } from "./topic-details";
import { UserBadgeSchema } from "./user-badge";
/** @type {import("@warp-drive/core/types/schema/fields").LegacyResourceSchema[]} */
export const schemas = [
ArchetypeSchema,
BadgeSchema,
BadgeTypeSchema,
BadgeGroupingSchema,
BookmarkSchema,
TagSchema,
TagGroupSchema,
TagInfoSchema,
TagNotificationSchema,
TagSettingsSchema,
TopicDetailsSchema,
UserBadgeSchema,
];