@playcademy/sdk 0.0.5 → 0.0.6
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/dist/index.d.ts +3998 -7
- package/dist/index.js +1962 -1938
- package/dist/types.d.ts +4219 -31
- package/dist/types.js +1 -748
- package/package.json +5 -3
- package/dist/core/auth/flows/popup.d.ts +0 -14
- package/dist/core/auth/flows/redirect.d.ts +0 -15
- package/dist/core/auth/flows/unified.d.ts +0 -11
- package/dist/core/auth/login.d.ts +0 -20
- package/dist/core/auth/oauth.d.ts +0 -115
- package/dist/core/auth/utils.d.ts +0 -23
- package/dist/core/cache/cooldown-cache.d.ts +0 -31
- package/dist/core/cache/index.d.ts +0 -14
- package/dist/core/cache/permanent-cache.d.ts +0 -39
- package/dist/core/cache/singleton-cache.d.ts +0 -29
- package/dist/core/cache/ttl-cache.d.ts +0 -54
- package/dist/core/cache/types.d.ts +0 -23
- package/dist/core/client.d.ts +0 -521
- package/dist/core/errors.d.ts +0 -11
- package/dist/core/namespaces/achievements.d.ts +0 -84
- package/dist/core/namespaces/admin.d.ts +0 -385
- package/dist/core/namespaces/auth.d.ts +0 -54
- package/dist/core/namespaces/character.d.ts +0 -205
- package/dist/core/namespaces/credits.d.ts +0 -51
- package/dist/core/namespaces/dev.d.ts +0 -323
- package/dist/core/namespaces/games.d.ts +0 -173
- package/dist/core/namespaces/identity.d.ts +0 -98
- package/dist/core/namespaces/index.d.ts +0 -19
- package/dist/core/namespaces/leaderboard.d.ts +0 -48
- package/dist/core/namespaces/levels.d.ts +0 -90
- package/dist/core/namespaces/maps.d.ts +0 -93
- package/dist/core/namespaces/realtime.client.d.ts +0 -129
- package/dist/core/namespaces/realtime.d.ts +0 -90
- package/dist/core/namespaces/runtime.d.ts +0 -222
- package/dist/core/namespaces/scores.d.ts +0 -55
- package/dist/core/namespaces/shop.d.ts +0 -25
- package/dist/core/namespaces/sprites.d.ts +0 -35
- package/dist/core/namespaces/telemetry.d.ts +0 -28
- package/dist/core/namespaces/timeback.d.ts +0 -111
- package/dist/core/namespaces/users.d.ts +0 -172
- package/dist/core/request.d.ts +0 -24
- package/dist/core/static/identity.d.ts +0 -37
- package/dist/core/static/index.d.ts +0 -3
- package/dist/core/static/init.d.ts +0 -21
- package/dist/core/static/login.d.ts +0 -34
- package/dist/messaging.d.ts +0 -544
package/dist/types.js
CHANGED
|
@@ -1,748 +1 @@
|
|
|
1
|
-
|
|
2
|
-
var __export = (target, all) => {
|
|
3
|
-
for (var name in all)
|
|
4
|
-
__defProp(target, name, {
|
|
5
|
-
get: all[name],
|
|
6
|
-
enumerable: true,
|
|
7
|
-
configurable: true,
|
|
8
|
-
set: (newValue) => all[name] = () => newValue
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
12
|
-
|
|
13
|
-
// ../data/src/domains/game/table.ts
|
|
14
|
-
import {
|
|
15
|
-
jsonb,
|
|
16
|
-
pgEnum,
|
|
17
|
-
pgTable,
|
|
18
|
-
text,
|
|
19
|
-
timestamp,
|
|
20
|
-
uniqueIndex,
|
|
21
|
-
uuid,
|
|
22
|
-
varchar
|
|
23
|
-
} from "drizzle-orm/pg-core";
|
|
24
|
-
var gamePlatformEnum, gameBootModeEnum, gameTypeEnum, games, gameSessions, gameStates;
|
|
25
|
-
var init_table = __esm(() => {
|
|
26
|
-
init_table3();
|
|
27
|
-
init_table4();
|
|
28
|
-
gamePlatformEnum = pgEnum("game_platform", ["web", "godot", "unity"]);
|
|
29
|
-
gameBootModeEnum = pgEnum("game_boot_mode", ["iframe", "module"]);
|
|
30
|
-
gameTypeEnum = pgEnum("game_type", ["hosted", "external"]);
|
|
31
|
-
games = pgTable("games", {
|
|
32
|
-
id: uuid("id").primaryKey().defaultRandom(),
|
|
33
|
-
developerId: text("developer_id").references(() => users.id, {
|
|
34
|
-
onDelete: "set null"
|
|
35
|
-
}),
|
|
36
|
-
slug: varchar("slug", { length: 255 }).notNull().unique(),
|
|
37
|
-
displayName: varchar("display_name", { length: 255 }).notNull(),
|
|
38
|
-
version: varchar("version", { length: 50 }).notNull(),
|
|
39
|
-
gameType: gameTypeEnum("game_type").notNull().default("hosted"),
|
|
40
|
-
assetBundleBase: text("asset_bundle_base"),
|
|
41
|
-
externalUrl: text("external_url"),
|
|
42
|
-
platform: gamePlatformEnum("platform").notNull().default("web"),
|
|
43
|
-
mapElementId: uuid("map_element_id").references(() => mapElements.id, {
|
|
44
|
-
onDelete: "set null"
|
|
45
|
-
}),
|
|
46
|
-
metadata: jsonb("metadata").$type().notNull().default({}),
|
|
47
|
-
createdAt: timestamp("created_at", { withTimezone: true }).defaultNow(),
|
|
48
|
-
updatedAt: timestamp("updated_at", { withTimezone: true }).defaultNow()
|
|
49
|
-
});
|
|
50
|
-
gameSessions = pgTable("game_sessions", {
|
|
51
|
-
id: uuid("id").primaryKey().defaultRandom(),
|
|
52
|
-
userId: text("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
53
|
-
gameId: uuid("game_id").notNull().references(() => games.id, { onDelete: "cascade" }),
|
|
54
|
-
startedAt: timestamp("started_at", { withTimezone: true }).notNull().defaultNow(),
|
|
55
|
-
endedAt: timestamp("ended_at", { withTimezone: true })
|
|
56
|
-
});
|
|
57
|
-
gameStates = pgTable("game_states", {
|
|
58
|
-
userId: text("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
59
|
-
gameId: uuid("game_id").notNull().references(() => games.id, { onDelete: "cascade" }),
|
|
60
|
-
data: jsonb("data").default("{}"),
|
|
61
|
-
updatedAt: timestamp("updated_at", { withTimezone: true }).defaultNow()
|
|
62
|
-
}, (table) => [uniqueIndex("unique_user_game_idx").on(table.userId, table.gameId)]);
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
// ../data/src/domains/inventory/table.ts
|
|
66
|
-
import { relations, sql } from "drizzle-orm";
|
|
67
|
-
import {
|
|
68
|
-
boolean,
|
|
69
|
-
integer,
|
|
70
|
-
jsonb as jsonb2,
|
|
71
|
-
pgEnum as pgEnum2,
|
|
72
|
-
pgTable as pgTable2,
|
|
73
|
-
text as text2,
|
|
74
|
-
timestamp as timestamp2,
|
|
75
|
-
uniqueIndex as uniqueIndex2,
|
|
76
|
-
uuid as uuid2
|
|
77
|
-
} from "drizzle-orm/pg-core";
|
|
78
|
-
var itemTypeEnum, items, inventoryItems, currencies, shopListings, itemsRelations, currenciesRelations, shopListingsRelations, inventoryItemsRelations;
|
|
79
|
-
var init_table2 = __esm(() => {
|
|
80
|
-
init_table();
|
|
81
|
-
init_table3();
|
|
82
|
-
init_table4();
|
|
83
|
-
itemTypeEnum = pgEnum2("item_type", [
|
|
84
|
-
"currency",
|
|
85
|
-
"badge",
|
|
86
|
-
"trophy",
|
|
87
|
-
"collectible",
|
|
88
|
-
"consumable",
|
|
89
|
-
"unlock",
|
|
90
|
-
"upgrade",
|
|
91
|
-
"accessory",
|
|
92
|
-
"other"
|
|
93
|
-
]);
|
|
94
|
-
items = pgTable2("items", {
|
|
95
|
-
id: uuid2("id").primaryKey().defaultRandom(),
|
|
96
|
-
slug: text2("slug").notNull(),
|
|
97
|
-
gameId: uuid2("game_id").references(() => games.id, {
|
|
98
|
-
onDelete: "cascade"
|
|
99
|
-
}),
|
|
100
|
-
displayName: text2("display_name").notNull(),
|
|
101
|
-
description: text2("description"),
|
|
102
|
-
type: itemTypeEnum("type").notNull().default("other"),
|
|
103
|
-
isPlaceable: boolean("is_placeable").default(false).notNull(),
|
|
104
|
-
imageUrl: text2("image_url"),
|
|
105
|
-
metadata: jsonb2("metadata").default({}),
|
|
106
|
-
createdAt: timestamp2("created_at").defaultNow().notNull()
|
|
107
|
-
}, (table) => [
|
|
108
|
-
uniqueIndex2("items_game_slug_idx").on(table.gameId, table.slug),
|
|
109
|
-
uniqueIndex2("items_global_slug_idx").on(table.slug).where(sql`game_id IS NULL`)
|
|
110
|
-
]);
|
|
111
|
-
inventoryItems = pgTable2("inventory_items", {
|
|
112
|
-
id: uuid2("id").primaryKey().defaultRandom(),
|
|
113
|
-
userId: text2("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
114
|
-
itemId: uuid2("item_id").notNull().references(() => items.id, { onDelete: "cascade" }),
|
|
115
|
-
quantity: integer("quantity").notNull().default(1),
|
|
116
|
-
updatedAt: timestamp2("updated_at", { withTimezone: true }).defaultNow()
|
|
117
|
-
}, (table) => [uniqueIndex2("unique_user_item_idx").on(table.userId, table.itemId)]);
|
|
118
|
-
currencies = pgTable2("currencies", {
|
|
119
|
-
id: uuid2("id").primaryKey().defaultRandom(),
|
|
120
|
-
itemId: uuid2("item_id").notNull().references(() => items.id, { onDelete: "cascade" }),
|
|
121
|
-
symbol: text2("symbol"),
|
|
122
|
-
isPrimary: boolean("is_primary").default(false).notNull(),
|
|
123
|
-
createdAt: timestamp2("created_at").defaultNow().notNull(),
|
|
124
|
-
updatedAt: timestamp2("updated_at", { withTimezone: true }).defaultNow().$onUpdate(() => new Date)
|
|
125
|
-
}, (table) => [uniqueIndex2("currency_item_id_idx").on(table.itemId)]);
|
|
126
|
-
shopListings = pgTable2("shop_listings", {
|
|
127
|
-
id: uuid2("id").primaryKey().defaultRandom(),
|
|
128
|
-
itemId: uuid2("item_id").notNull().references(() => items.id, { onDelete: "cascade" }),
|
|
129
|
-
currencyId: uuid2("currency_id").notNull().references(() => currencies.id, { onDelete: "restrict" }),
|
|
130
|
-
price: integer("price").notNull(),
|
|
131
|
-
sellBackPercentage: integer("sell_back_percentage"),
|
|
132
|
-
stock: integer("stock"),
|
|
133
|
-
isActive: boolean("is_active").default(true).notNull(),
|
|
134
|
-
availableFrom: timestamp2("available_from", { withTimezone: true }),
|
|
135
|
-
availableUntil: timestamp2("available_until", { withTimezone: true }),
|
|
136
|
-
createdAt: timestamp2("created_at").defaultNow().notNull(),
|
|
137
|
-
updatedAt: timestamp2("updated_at", { withTimezone: true }).defaultNow().$onUpdate(() => new Date)
|
|
138
|
-
}, (table) => [uniqueIndex2("unique_item_currency_listing_idx").on(table.itemId, table.currencyId)]);
|
|
139
|
-
itemsRelations = relations(items, ({ many }) => ({
|
|
140
|
-
shopListings: many(shopListings),
|
|
141
|
-
inventoryItems: many(inventoryItems),
|
|
142
|
-
mapObjects: many(mapObjects)
|
|
143
|
-
}));
|
|
144
|
-
currenciesRelations = relations(currencies, ({ many }) => ({
|
|
145
|
-
shopListings: many(shopListings)
|
|
146
|
-
}));
|
|
147
|
-
shopListingsRelations = relations(shopListings, ({ one }) => ({
|
|
148
|
-
item: one(items, {
|
|
149
|
-
fields: [shopListings.itemId],
|
|
150
|
-
references: [items.id]
|
|
151
|
-
}),
|
|
152
|
-
currency: one(currencies, {
|
|
153
|
-
fields: [shopListings.currencyId],
|
|
154
|
-
references: [currencies.id]
|
|
155
|
-
})
|
|
156
|
-
}));
|
|
157
|
-
inventoryItemsRelations = relations(inventoryItems, ({ one }) => ({
|
|
158
|
-
item: one(items, {
|
|
159
|
-
fields: [inventoryItems.itemId],
|
|
160
|
-
references: [items.id]
|
|
161
|
-
}),
|
|
162
|
-
user: one(users, {
|
|
163
|
-
fields: [inventoryItems.userId],
|
|
164
|
-
references: [users.id]
|
|
165
|
-
})
|
|
166
|
-
}));
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
// ../data/src/domains/map/table.ts
|
|
170
|
-
import { relations as relations2 } from "drizzle-orm";
|
|
171
|
-
import {
|
|
172
|
-
doublePrecision,
|
|
173
|
-
index,
|
|
174
|
-
integer as integer2,
|
|
175
|
-
jsonb as jsonb3,
|
|
176
|
-
pgEnum as pgEnum3,
|
|
177
|
-
pgTable as pgTable3,
|
|
178
|
-
text as text3,
|
|
179
|
-
timestamp as timestamp3,
|
|
180
|
-
uniqueIndex as uniqueIndex3,
|
|
181
|
-
uuid as uuid3,
|
|
182
|
-
varchar as varchar2
|
|
183
|
-
} from "drizzle-orm/pg-core";
|
|
184
|
-
var interactionTypeEnum, maps, mapElements, mapObjects, mapElementsRelations, mapsRelations, mapObjectsRelations;
|
|
185
|
-
var init_table3 = __esm(() => {
|
|
186
|
-
init_table();
|
|
187
|
-
init_table2();
|
|
188
|
-
init_table4();
|
|
189
|
-
interactionTypeEnum = pgEnum3("interaction_type", [
|
|
190
|
-
"game_entry",
|
|
191
|
-
"game_registry",
|
|
192
|
-
"info",
|
|
193
|
-
"teleport",
|
|
194
|
-
"door_in",
|
|
195
|
-
"door_out",
|
|
196
|
-
"npc_interaction",
|
|
197
|
-
"quest_trigger"
|
|
198
|
-
]);
|
|
199
|
-
maps = pgTable3("maps", {
|
|
200
|
-
id: uuid3("id").primaryKey().defaultRandom(),
|
|
201
|
-
identifier: varchar2("identifier", { length: 255 }).notNull().unique(),
|
|
202
|
-
displayName: varchar2("display_name", { length: 255 }).notNull(),
|
|
203
|
-
filePath: varchar2("file_path", { length: 255 }).notNull(),
|
|
204
|
-
tilesetBasePath: varchar2("tileset_base_path", { length: 255 }).notNull().default("/tilesets"),
|
|
205
|
-
defaultSpawnTileX: doublePrecision("default_spawn_tile_x").notNull().default(0),
|
|
206
|
-
defaultSpawnTileY: doublePrecision("default_spawn_tile_y").notNull().default(0),
|
|
207
|
-
description: text3("description")
|
|
208
|
-
});
|
|
209
|
-
mapElements = pgTable3("map_elements", {
|
|
210
|
-
id: uuid3("id").primaryKey().defaultRandom(),
|
|
211
|
-
mapId: uuid3("map_id").references(() => maps.id, {
|
|
212
|
-
onDelete: "cascade"
|
|
213
|
-
}),
|
|
214
|
-
elementSlug: varchar2("element_slug", { length: 255 }).notNull(),
|
|
215
|
-
interactionType: interactionTypeEnum("interaction_type").notNull(),
|
|
216
|
-
gameId: uuid3("game_id").references(() => games.id, {
|
|
217
|
-
onDelete: "set null"
|
|
218
|
-
}),
|
|
219
|
-
metadata: jsonb3("metadata").$type().default({})
|
|
220
|
-
}, (table) => [uniqueIndex3("map_id_element_slug_unique_idx").on(table.mapId, table.elementSlug)]);
|
|
221
|
-
mapObjects = pgTable3("map_objects", {
|
|
222
|
-
id: uuid3("id").primaryKey().defaultRandom(),
|
|
223
|
-
userId: text3("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
224
|
-
mapId: uuid3("map_id").notNull().references(() => maps.id, { onDelete: "cascade" }),
|
|
225
|
-
itemId: uuid3("item_id").notNull().references(() => items.id, { onDelete: "cascade" }),
|
|
226
|
-
worldX: doublePrecision("world_x").notNull(),
|
|
227
|
-
worldY: doublePrecision("world_y").notNull(),
|
|
228
|
-
rotation: integer2("rotation").default(0).notNull(),
|
|
229
|
-
scale: doublePrecision("scale").default(1).notNull(),
|
|
230
|
-
createdAt: timestamp3("created_at").defaultNow().notNull()
|
|
231
|
-
}, (table) => [
|
|
232
|
-
index("map_objects_map_idx").on(table.mapId),
|
|
233
|
-
index("map_objects_spatial_idx").on(table.mapId, table.worldX, table.worldY)
|
|
234
|
-
]);
|
|
235
|
-
mapElementsRelations = relations2(mapElements, ({ one }) => ({
|
|
236
|
-
game: one(games, {
|
|
237
|
-
fields: [mapElements.gameId],
|
|
238
|
-
references: [games.id]
|
|
239
|
-
}),
|
|
240
|
-
map: one(maps, {
|
|
241
|
-
fields: [mapElements.mapId],
|
|
242
|
-
references: [maps.id]
|
|
243
|
-
})
|
|
244
|
-
}));
|
|
245
|
-
mapsRelations = relations2(maps, ({ many }) => ({
|
|
246
|
-
elements: many(mapElements),
|
|
247
|
-
objects: many(mapObjects)
|
|
248
|
-
}));
|
|
249
|
-
mapObjectsRelations = relations2(mapObjects, ({ one }) => ({
|
|
250
|
-
user: one(users, {
|
|
251
|
-
fields: [mapObjects.userId],
|
|
252
|
-
references: [users.id]
|
|
253
|
-
}),
|
|
254
|
-
map: one(maps, {
|
|
255
|
-
fields: [mapObjects.mapId],
|
|
256
|
-
references: [maps.id]
|
|
257
|
-
}),
|
|
258
|
-
item: one(items, {
|
|
259
|
-
fields: [mapObjects.itemId],
|
|
260
|
-
references: [items.id]
|
|
261
|
-
})
|
|
262
|
-
}));
|
|
263
|
-
});
|
|
264
|
-
|
|
265
|
-
// ../data/src/domains/user/table.ts
|
|
266
|
-
import { relations as relations3 } from "drizzle-orm";
|
|
267
|
-
import { boolean as boolean2, pgEnum as pgEnum4, pgTable as pgTable4, text as text4, timestamp as timestamp4, uniqueIndex as uniqueIndex4 } from "drizzle-orm/pg-core";
|
|
268
|
-
var userRoleEnum, developerStatusEnum, users, accounts, sessions, verification, ssoProvider, usersRelations;
|
|
269
|
-
var init_table4 = __esm(() => {
|
|
270
|
-
init_table3();
|
|
271
|
-
userRoleEnum = pgEnum4("user_role", ["admin", "player", "developer"]);
|
|
272
|
-
developerStatusEnum = pgEnum4("developer_status", ["none", "pending", "approved"]);
|
|
273
|
-
users = pgTable4("user", {
|
|
274
|
-
id: text4("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
|
|
275
|
-
name: text4("name").notNull(),
|
|
276
|
-
username: text4("username").unique(),
|
|
277
|
-
email: text4("email").notNull().unique(),
|
|
278
|
-
timebackId: text4("timeback_id").unique(),
|
|
279
|
-
emailVerified: boolean2("email_verified").notNull().default(false),
|
|
280
|
-
image: text4("image"),
|
|
281
|
-
role: userRoleEnum("role").notNull().default("player"),
|
|
282
|
-
developerStatus: developerStatusEnum("developer_status").notNull().default("none"),
|
|
283
|
-
characterCreated: boolean2("character_created").notNull().default(false),
|
|
284
|
-
createdAt: timestamp4("created_at", {
|
|
285
|
-
mode: "date",
|
|
286
|
-
withTimezone: true
|
|
287
|
-
}).notNull(),
|
|
288
|
-
updatedAt: timestamp4("updated_at", {
|
|
289
|
-
mode: "date",
|
|
290
|
-
withTimezone: true
|
|
291
|
-
}).notNull()
|
|
292
|
-
});
|
|
293
|
-
accounts = pgTable4("account", {
|
|
294
|
-
id: text4("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
|
|
295
|
-
userId: text4("userId").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
296
|
-
accountId: text4("account_id").notNull(),
|
|
297
|
-
providerId: text4("provider_id").notNull(),
|
|
298
|
-
accessToken: text4("access_token"),
|
|
299
|
-
refreshToken: text4("refresh_token"),
|
|
300
|
-
idToken: text4("id_token"),
|
|
301
|
-
accessTokenExpiresAt: timestamp4("access_token_expires_at", {
|
|
302
|
-
mode: "date",
|
|
303
|
-
withTimezone: true
|
|
304
|
-
}),
|
|
305
|
-
refreshTokenExpiresAt: timestamp4("refresh_token_expires_at", {
|
|
306
|
-
mode: "date",
|
|
307
|
-
withTimezone: true
|
|
308
|
-
}),
|
|
309
|
-
scope: text4("scope"),
|
|
310
|
-
password: text4("password"),
|
|
311
|
-
createdAt: timestamp4("created_at", {
|
|
312
|
-
mode: "date",
|
|
313
|
-
withTimezone: true
|
|
314
|
-
}).notNull(),
|
|
315
|
-
updatedAt: timestamp4("updated_at", {
|
|
316
|
-
mode: "date",
|
|
317
|
-
withTimezone: true
|
|
318
|
-
}).notNull()
|
|
319
|
-
}, (table) => [uniqueIndex4("account_provider_providerId_idx").on(table.accountId, table.providerId)]);
|
|
320
|
-
sessions = pgTable4("session", {
|
|
321
|
-
id: text4("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
|
|
322
|
-
userId: text4("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
323
|
-
expiresAt: timestamp4("expires_at", {
|
|
324
|
-
mode: "date",
|
|
325
|
-
withTimezone: true
|
|
326
|
-
}).notNull(),
|
|
327
|
-
token: text4("token").notNull().unique(),
|
|
328
|
-
ipAddress: text4("ip_address"),
|
|
329
|
-
userAgent: text4("user_agent"),
|
|
330
|
-
createdAt: timestamp4("created_at", {
|
|
331
|
-
mode: "date",
|
|
332
|
-
withTimezone: true
|
|
333
|
-
}).notNull(),
|
|
334
|
-
updatedAt: timestamp4("updated_at", {
|
|
335
|
-
mode: "date",
|
|
336
|
-
withTimezone: true
|
|
337
|
-
}).notNull()
|
|
338
|
-
});
|
|
339
|
-
verification = pgTable4("verification", {
|
|
340
|
-
id: text4("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
|
|
341
|
-
identifier: text4("identifier").notNull(),
|
|
342
|
-
value: text4("value").notNull(),
|
|
343
|
-
expiresAt: timestamp4("expires_at", {
|
|
344
|
-
mode: "date",
|
|
345
|
-
withTimezone: true
|
|
346
|
-
}).notNull(),
|
|
347
|
-
createdAt: timestamp4("created_at", {
|
|
348
|
-
mode: "date",
|
|
349
|
-
withTimezone: true
|
|
350
|
-
}).notNull(),
|
|
351
|
-
updatedAt: timestamp4("updated_at", {
|
|
352
|
-
mode: "date",
|
|
353
|
-
withTimezone: true
|
|
354
|
-
}).notNull()
|
|
355
|
-
});
|
|
356
|
-
ssoProvider = pgTable4("sso_provider", {
|
|
357
|
-
id: text4("id").primaryKey().$defaultFn(() => crypto.randomUUID()),
|
|
358
|
-
issuer: text4("issuer").notNull(),
|
|
359
|
-
oidcConfig: text4("oidc_config"),
|
|
360
|
-
samlConfig: text4("saml_config"),
|
|
361
|
-
userId: text4("user_id").references(() => users.id, { onDelete: "cascade" }),
|
|
362
|
-
providerId: text4("provider_id").notNull().unique(),
|
|
363
|
-
organizationId: text4("organization_id"),
|
|
364
|
-
domain: text4("domain").notNull()
|
|
365
|
-
});
|
|
366
|
-
usersRelations = relations3(users, ({ many }) => ({
|
|
367
|
-
mapObjects: many(mapObjects)
|
|
368
|
-
}));
|
|
369
|
-
});
|
|
370
|
-
|
|
371
|
-
// ../data/src/domains/developer/table.ts
|
|
372
|
-
import { pgTable as pgTable5, text as text5, timestamp as timestamp5, uuid as uuid4, varchar as varchar3 } from "drizzle-orm/pg-core";
|
|
373
|
-
var developerKeys;
|
|
374
|
-
var init_table5 = __esm(() => {
|
|
375
|
-
init_table4();
|
|
376
|
-
developerKeys = pgTable5("developer_keys", {
|
|
377
|
-
id: uuid4("id").primaryKey().defaultRandom(),
|
|
378
|
-
userId: text5("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
379
|
-
label: varchar3("label", { length: 255 }),
|
|
380
|
-
keyHash: text5("key_hash").notNull().unique(),
|
|
381
|
-
createdAt: timestamp5("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
382
|
-
});
|
|
383
|
-
});
|
|
384
|
-
|
|
385
|
-
// ../data/src/domains/level/table.ts
|
|
386
|
-
import { relations as relations4 } from "drizzle-orm";
|
|
387
|
-
import {
|
|
388
|
-
doublePrecision as doublePrecision2,
|
|
389
|
-
integer as integer3,
|
|
390
|
-
pgTable as pgTable6,
|
|
391
|
-
text as text6,
|
|
392
|
-
timestamp as timestamp6,
|
|
393
|
-
uniqueIndex as uniqueIndex5,
|
|
394
|
-
uuid as uuid5
|
|
395
|
-
} from "drizzle-orm/pg-core";
|
|
396
|
-
var userLevels, levelConfigs, userLevelsRelations;
|
|
397
|
-
var init_table6 = __esm(() => {
|
|
398
|
-
init_table4();
|
|
399
|
-
userLevels = pgTable6("user_levels", {
|
|
400
|
-
userId: text6("user_id").primaryKey().references(() => users.id, { onDelete: "cascade" }),
|
|
401
|
-
currentLevel: integer3("current_level").notNull().default(1),
|
|
402
|
-
currentXp: doublePrecision2("current_xp").notNull().default(0),
|
|
403
|
-
totalXP: doublePrecision2("total_xp").notNull().default(0),
|
|
404
|
-
lastLevelUpAt: timestamp6("last_level_up_at", { withTimezone: true }),
|
|
405
|
-
createdAt: timestamp6("created_at").defaultNow().notNull(),
|
|
406
|
-
updatedAt: timestamp6("updated_at", { withTimezone: true }).defaultNow().$onUpdate(() => new Date)
|
|
407
|
-
});
|
|
408
|
-
levelConfigs = pgTable6("level_configs", {
|
|
409
|
-
id: uuid5("id").primaryKey().defaultRandom(),
|
|
410
|
-
level: integer3("level").notNull().unique(),
|
|
411
|
-
xpRequired: integer3("xp_required").notNull(),
|
|
412
|
-
creditsReward: integer3("credits_reward").notNull().default(0),
|
|
413
|
-
createdAt: timestamp6("created_at").defaultNow().notNull()
|
|
414
|
-
}, (table) => [uniqueIndex5("unique_level_config_idx").on(table.level)]);
|
|
415
|
-
userLevelsRelations = relations4(userLevels, ({ one }) => ({
|
|
416
|
-
user: one(users, {
|
|
417
|
-
fields: [userLevels.userId],
|
|
418
|
-
references: [users.id]
|
|
419
|
-
})
|
|
420
|
-
}));
|
|
421
|
-
});
|
|
422
|
-
|
|
423
|
-
// ../data/src/domains/leaderboard/table.ts
|
|
424
|
-
import { relations as relations5 } from "drizzle-orm";
|
|
425
|
-
import { index as index2, integer as integer4, jsonb as jsonb4, pgTable as pgTable7, text as text7, timestamp as timestamp7, uuid as uuid6 } from "drizzle-orm/pg-core";
|
|
426
|
-
var gameScores, gameScoresRelations;
|
|
427
|
-
var init_table7 = __esm(() => {
|
|
428
|
-
init_table();
|
|
429
|
-
init_table4();
|
|
430
|
-
gameScores = pgTable7("game_scores", {
|
|
431
|
-
id: uuid6("id").primaryKey().defaultRandom(),
|
|
432
|
-
userId: text7("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
433
|
-
gameId: uuid6("game_id").notNull().references(() => games.id, { onDelete: "cascade" }),
|
|
434
|
-
score: integer4("score").notNull(),
|
|
435
|
-
metadata: jsonb4("metadata").default("{}"),
|
|
436
|
-
achievedAt: timestamp7("achieved_at", { withTimezone: true }).defaultNow().notNull(),
|
|
437
|
-
sessionId: uuid6("session_id").references(() => gameSessions.id, { onDelete: "set null" })
|
|
438
|
-
}, (table) => [
|
|
439
|
-
index2("game_scores_user_game_idx").on(table.userId, table.gameId),
|
|
440
|
-
index2("game_scores_game_score_idx").on(table.gameId, table.score),
|
|
441
|
-
index2("game_scores_achieved_at_idx").on(table.achievedAt)
|
|
442
|
-
]);
|
|
443
|
-
gameScoresRelations = relations5(gameScores, ({ one }) => ({
|
|
444
|
-
user: one(users, {
|
|
445
|
-
fields: [gameScores.userId],
|
|
446
|
-
references: [users.id]
|
|
447
|
-
}),
|
|
448
|
-
game: one(games, {
|
|
449
|
-
fields: [gameScores.gameId],
|
|
450
|
-
references: [games.id]
|
|
451
|
-
}),
|
|
452
|
-
session: one(gameSessions, {
|
|
453
|
-
fields: [gameScores.sessionId],
|
|
454
|
-
references: [gameSessions.id]
|
|
455
|
-
})
|
|
456
|
-
}));
|
|
457
|
-
});
|
|
458
|
-
|
|
459
|
-
// ../data/src/domains/sprite/table.ts
|
|
460
|
-
import { relations as relations6 } from "drizzle-orm";
|
|
461
|
-
import { integer as integer5, pgTable as pgTable8, timestamp as timestamp8, uuid as uuid7, varchar as varchar4 } from "drizzle-orm/pg-core";
|
|
462
|
-
var spriteTemplates, spriteSheets, spriteTemplatesRelations, spriteSheetsRelations;
|
|
463
|
-
var init_table8 = __esm(() => {
|
|
464
|
-
spriteTemplates = pgTable8("sprite_templates", {
|
|
465
|
-
id: uuid7("id").primaryKey().defaultRandom(),
|
|
466
|
-
slug: varchar4("slug", { length: 64 }).notNull().unique(),
|
|
467
|
-
url: varchar4("url", { length: 255 }).notNull(),
|
|
468
|
-
createdAt: timestamp8("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
469
|
-
updatedAt: timestamp8("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
470
|
-
});
|
|
471
|
-
spriteSheets = pgTable8("sprite_sheets", {
|
|
472
|
-
id: uuid7("id").primaryKey().defaultRandom(),
|
|
473
|
-
templateId: uuid7("template_id").notNull().references(() => spriteTemplates.id, { onDelete: "cascade" }),
|
|
474
|
-
width: integer5("width").notNull(),
|
|
475
|
-
height: integer5("height").notNull(),
|
|
476
|
-
url: varchar4("url", { length: 255 }).notNull(),
|
|
477
|
-
createdAt: timestamp8("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
478
|
-
updatedAt: timestamp8("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
479
|
-
});
|
|
480
|
-
spriteTemplatesRelations = relations6(spriteTemplates, ({ many }) => ({
|
|
481
|
-
sheets: many(spriteSheets)
|
|
482
|
-
}));
|
|
483
|
-
spriteSheetsRelations = relations6(spriteSheets, ({ one }) => ({
|
|
484
|
-
template: one(spriteTemplates, {
|
|
485
|
-
fields: [spriteSheets.templateId],
|
|
486
|
-
references: [spriteTemplates.id]
|
|
487
|
-
})
|
|
488
|
-
}));
|
|
489
|
-
});
|
|
490
|
-
|
|
491
|
-
// ../data/src/domains/character/table.ts
|
|
492
|
-
import { relations as relations7 } from "drizzle-orm";
|
|
493
|
-
import {
|
|
494
|
-
integer as integer6,
|
|
495
|
-
pgEnum as pgEnum5,
|
|
496
|
-
pgTable as pgTable9,
|
|
497
|
-
text as text8,
|
|
498
|
-
timestamp as timestamp9,
|
|
499
|
-
uniqueIndex as uniqueIndex6,
|
|
500
|
-
uuid as uuid8,
|
|
501
|
-
varchar as varchar5
|
|
502
|
-
} from "drizzle-orm/pg-core";
|
|
503
|
-
var characterComponentTypeEnum, characterComponents, playerCharacters, playerCharacterAccessories, characterComponentsRelations, playerCharactersRelations, playerCharacterAccessoriesRelations;
|
|
504
|
-
var init_table9 = __esm(() => {
|
|
505
|
-
init_table8();
|
|
506
|
-
init_table4();
|
|
507
|
-
characterComponentTypeEnum = pgEnum5("character_component_type", [
|
|
508
|
-
"body",
|
|
509
|
-
"outfit",
|
|
510
|
-
"hairstyle",
|
|
511
|
-
"eyes",
|
|
512
|
-
"accessory"
|
|
513
|
-
]);
|
|
514
|
-
characterComponents = pgTable9("character_components", {
|
|
515
|
-
id: uuid8("id").primaryKey().defaultRandom(),
|
|
516
|
-
componentType: characterComponentTypeEnum("component_type").notNull(),
|
|
517
|
-
slug: varchar5("slug", { length: 128 }).notNull().unique(),
|
|
518
|
-
displayName: varchar5("display_name", { length: 128 }).notNull(),
|
|
519
|
-
slot: varchar5("slot", { length: 64 }).notNull(),
|
|
520
|
-
spriteSheetId: uuid8("sprite_sheet_id").notNull().references(() => spriteSheets.id, { onDelete: "cascade" }),
|
|
521
|
-
unlockLevel: integer6("unlock_level").notNull().default(0),
|
|
522
|
-
variant: integer6("variant").notNull().default(0),
|
|
523
|
-
createdAt: timestamp9("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
524
|
-
updatedAt: timestamp9("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
525
|
-
});
|
|
526
|
-
playerCharacters = pgTable9("player_characters", {
|
|
527
|
-
id: uuid8("id").primaryKey().defaultRandom(),
|
|
528
|
-
userId: text8("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
529
|
-
bodyComponentId: uuid8("body_component_id").notNull().references(() => characterComponents.id, { onDelete: "restrict" }),
|
|
530
|
-
eyesComponentId: uuid8("eyes_component_id").notNull().references(() => characterComponents.id, { onDelete: "restrict" }),
|
|
531
|
-
hairstyleComponentId: uuid8("hairstyle_component_id").notNull().references(() => characterComponents.id, { onDelete: "restrict" }),
|
|
532
|
-
outfitComponentId: uuid8("outfit_component_id").notNull().references(() => characterComponents.id, { onDelete: "restrict" }),
|
|
533
|
-
createdAt: timestamp9("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
534
|
-
updatedAt: timestamp9("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
535
|
-
});
|
|
536
|
-
playerCharacterAccessories = pgTable9("player_character_accessories", {
|
|
537
|
-
id: uuid8("id").primaryKey().defaultRandom(),
|
|
538
|
-
playerCharacterId: uuid8("player_character_id").notNull().references(() => playerCharacters.id, { onDelete: "cascade" }),
|
|
539
|
-
accessoryComponentId: uuid8("accessory_component_id").notNull().references(() => characterComponents.id, { onDelete: "cascade" }),
|
|
540
|
-
slot: varchar5("slot", { length: 64 }).notNull(),
|
|
541
|
-
equippedAt: timestamp9("equipped_at", { withTimezone: true }).notNull().defaultNow(),
|
|
542
|
-
updatedAt: timestamp9("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
543
|
-
}, (table) => [
|
|
544
|
-
uniqueIndex6("unique_player_character_slot_idx").on(table.playerCharacterId, table.slot),
|
|
545
|
-
uniqueIndex6("player_character_accessory_idx").on(table.playerCharacterId, table.accessoryComponentId)
|
|
546
|
-
]);
|
|
547
|
-
characterComponentsRelations = relations7(characterComponents, ({ one }) => ({
|
|
548
|
-
sheet: one(spriteSheets, {
|
|
549
|
-
fields: [characterComponents.spriteSheetId],
|
|
550
|
-
references: [spriteSheets.id]
|
|
551
|
-
})
|
|
552
|
-
}));
|
|
553
|
-
playerCharactersRelations = relations7(playerCharacters, ({ one, many }) => ({
|
|
554
|
-
user: one(users, {
|
|
555
|
-
fields: [playerCharacters.userId],
|
|
556
|
-
references: [users.id]
|
|
557
|
-
}),
|
|
558
|
-
body: one(characterComponents, {
|
|
559
|
-
fields: [playerCharacters.bodyComponentId],
|
|
560
|
-
references: [characterComponents.id]
|
|
561
|
-
}),
|
|
562
|
-
eyes: one(characterComponents, {
|
|
563
|
-
fields: [playerCharacters.eyesComponentId],
|
|
564
|
-
references: [characterComponents.id]
|
|
565
|
-
}),
|
|
566
|
-
hair: one(characterComponents, {
|
|
567
|
-
fields: [playerCharacters.hairstyleComponentId],
|
|
568
|
-
references: [characterComponents.id]
|
|
569
|
-
}),
|
|
570
|
-
outfit: one(characterComponents, {
|
|
571
|
-
fields: [playerCharacters.outfitComponentId],
|
|
572
|
-
references: [characterComponents.id]
|
|
573
|
-
}),
|
|
574
|
-
accessories: many(playerCharacterAccessories)
|
|
575
|
-
}));
|
|
576
|
-
playerCharacterAccessoriesRelations = relations7(playerCharacterAccessories, ({ one }) => ({
|
|
577
|
-
playerCharacter: one(playerCharacters, {
|
|
578
|
-
fields: [playerCharacterAccessories.playerCharacterId],
|
|
579
|
-
references: [playerCharacters.id]
|
|
580
|
-
}),
|
|
581
|
-
accessoryComponent: one(characterComponents, {
|
|
582
|
-
fields: [playerCharacterAccessories.accessoryComponentId],
|
|
583
|
-
references: [characterComponents.id]
|
|
584
|
-
})
|
|
585
|
-
}));
|
|
586
|
-
});
|
|
587
|
-
|
|
588
|
-
// ../data/src/domains/timeback/table.ts
|
|
589
|
-
import { doublePrecision as doublePrecision3, pgTable as pgTable10, text as text9, timestamp as timestamp10, uniqueIndex as uniqueIndex7, uuid as uuid9 } from "drizzle-orm/pg-core";
|
|
590
|
-
var timebackDailyXp, timebackXpEvents;
|
|
591
|
-
var init_table10 = __esm(() => {
|
|
592
|
-
init_table4();
|
|
593
|
-
timebackDailyXp = pgTable10("timeback_daily_xp", {
|
|
594
|
-
userId: text9("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
595
|
-
date: timestamp10("date", { mode: "date", withTimezone: true }).notNull(),
|
|
596
|
-
xp: doublePrecision3("xp").notNull().default(0),
|
|
597
|
-
createdAt: timestamp10("created_at", { mode: "date", withTimezone: true }).notNull().defaultNow(),
|
|
598
|
-
updatedAt: timestamp10("updated_at", { mode: "date", withTimezone: true }).notNull().defaultNow()
|
|
599
|
-
}, (table) => [uniqueIndex7("timeback_daily_xp_user_date_idx").on(table.userId, table.date)]);
|
|
600
|
-
timebackXpEvents = pgTable10("timeback_xp_event", {
|
|
601
|
-
id: uuid9("id").primaryKey().defaultRandom(),
|
|
602
|
-
userId: text9("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
603
|
-
occurredAt: timestamp10("occurred_at", { withTimezone: true }).notNull(),
|
|
604
|
-
xpDelta: doublePrecision3("xp_delta").notNull(),
|
|
605
|
-
source: text9("source").notNull(),
|
|
606
|
-
sourceId: text9("source_id"),
|
|
607
|
-
sensor: text9("sensor"),
|
|
608
|
-
appName: text9("app_name"),
|
|
609
|
-
createdAt: timestamp10("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
610
|
-
updatedAt: timestamp10("updated_at", { withTimezone: true }).notNull().defaultNow()
|
|
611
|
-
}, (table) => [uniqueIndex7("timeback_xp_events_source_id_idx").on(table.source, table.sourceId)]);
|
|
612
|
-
});
|
|
613
|
-
|
|
614
|
-
// ../data/src/domains/achievement/table.ts
|
|
615
|
-
import { relations as relations8 } from "drizzle-orm";
|
|
616
|
-
import {
|
|
617
|
-
boolean as boolean3,
|
|
618
|
-
index as index3,
|
|
619
|
-
integer as integer7,
|
|
620
|
-
jsonb as jsonb5,
|
|
621
|
-
pgEnum as pgEnum6,
|
|
622
|
-
pgTable as pgTable11,
|
|
623
|
-
text as text10,
|
|
624
|
-
timestamp as timestamp11,
|
|
625
|
-
uniqueIndex as uniqueIndex8,
|
|
626
|
-
uuid as uuid10,
|
|
627
|
-
varchar as varchar6
|
|
628
|
-
} from "drizzle-orm/pg-core";
|
|
629
|
-
var achievementIntervalEnum, achievements, userAchievementProgress, userAchievementClaims, userAchievementProgressRelations, userAchievementClaimsRelations;
|
|
630
|
-
var init_table11 = __esm(() => {
|
|
631
|
-
init_table4();
|
|
632
|
-
achievementIntervalEnum = pgEnum6("achievement_interval", ["daily", "weekly"]);
|
|
633
|
-
achievements = pgTable11("achievements", {
|
|
634
|
-
id: varchar6("id", { length: 255 }).primaryKey(),
|
|
635
|
-
title: varchar6("title", { length: 255 }).notNull(),
|
|
636
|
-
description: text10("description"),
|
|
637
|
-
intervalType: achievementIntervalEnum("interval_type").notNull(),
|
|
638
|
-
rewardCredits: integer7("reward_credits").notNull().default(0),
|
|
639
|
-
limitPerInterval: integer7("limit_per_interval").notNull().default(1),
|
|
640
|
-
completionType: varchar6("completion_type", { length: 50 }).notNull(),
|
|
641
|
-
completionConfig: jsonb5("completion_config").notNull().default({}),
|
|
642
|
-
scope: jsonb5("scope").notNull().default({}),
|
|
643
|
-
active: boolean3("active").notNull().default(true),
|
|
644
|
-
createdAt: timestamp11("created_at", { withTimezone: true }).defaultNow(),
|
|
645
|
-
updatedAt: timestamp11("updated_at", { withTimezone: true }).defaultNow()
|
|
646
|
-
});
|
|
647
|
-
userAchievementProgress = pgTable11("user_achievement_progress", {
|
|
648
|
-
id: uuid10("id").primaryKey().defaultRandom(),
|
|
649
|
-
userId: text10("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
650
|
-
achievementId: varchar6("achievement_id", { length: 255 }).notNull().references(() => achievements.id, { onDelete: "cascade" }),
|
|
651
|
-
intervalKey: text10("interval_key").notNull(),
|
|
652
|
-
progress: jsonb5("progress").notNull().default({}),
|
|
653
|
-
updatedAt: timestamp11("updated_at", { withTimezone: true }).defaultNow().notNull()
|
|
654
|
-
}, (table) => [
|
|
655
|
-
index3("user_achievement_progress_idx").on(table.userId, table.achievementId, table.intervalKey)
|
|
656
|
-
]);
|
|
657
|
-
userAchievementClaims = pgTable11("user_achievement_claims", {
|
|
658
|
-
id: uuid10("id").primaryKey().defaultRandom(),
|
|
659
|
-
userId: text10("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
|
|
660
|
-
achievementId: varchar6("achievement_id", { length: 255 }).notNull().references(() => achievements.id, { onDelete: "cascade" }),
|
|
661
|
-
intervalKey: text10("interval_key").notNull(),
|
|
662
|
-
rewardCredits: integer7("reward_credits").notNull(),
|
|
663
|
-
createdAt: timestamp11("created_at", { withTimezone: true }).defaultNow().notNull()
|
|
664
|
-
}, (table) => [
|
|
665
|
-
uniqueIndex8("user_achievement_claims_unique").on(table.userId, table.achievementId, table.intervalKey)
|
|
666
|
-
]);
|
|
667
|
-
userAchievementProgressRelations = relations8(userAchievementProgress, ({ one }) => ({
|
|
668
|
-
user: one(users, {
|
|
669
|
-
fields: [userAchievementProgress.userId],
|
|
670
|
-
references: [users.id]
|
|
671
|
-
}),
|
|
672
|
-
achievement: one(achievements, {
|
|
673
|
-
fields: [userAchievementProgress.achievementId],
|
|
674
|
-
references: [achievements.id]
|
|
675
|
-
})
|
|
676
|
-
}));
|
|
677
|
-
userAchievementClaimsRelations = relations8(userAchievementClaims, ({ one }) => ({
|
|
678
|
-
user: one(users, {
|
|
679
|
-
fields: [userAchievementClaims.userId],
|
|
680
|
-
references: [users.id]
|
|
681
|
-
}),
|
|
682
|
-
achievement: one(achievements, {
|
|
683
|
-
fields: [userAchievementClaims.achievementId],
|
|
684
|
-
references: [achievements.id]
|
|
685
|
-
})
|
|
686
|
-
}));
|
|
687
|
-
});
|
|
688
|
-
|
|
689
|
-
// ../data/src/tables.index.ts
|
|
690
|
-
var init_tables_index = __esm(() => {
|
|
691
|
-
init_table4();
|
|
692
|
-
init_table5();
|
|
693
|
-
init_table();
|
|
694
|
-
init_table2();
|
|
695
|
-
init_table3();
|
|
696
|
-
init_table6();
|
|
697
|
-
init_table7();
|
|
698
|
-
init_table8();
|
|
699
|
-
init_table9();
|
|
700
|
-
init_table10();
|
|
701
|
-
init_table11();
|
|
702
|
-
});
|
|
703
|
-
|
|
704
|
-
// ../data/src/constants.ts
|
|
705
|
-
var ITEM_SLUGS, CURRENCIES, BADGES, ACHIEVEMENT_COMPLETION_TYPES, ACHIEVEMENT_COMPLETION_TYPE, INTERACTION_TYPE;
|
|
706
|
-
var init_constants = __esm(() => {
|
|
707
|
-
init_tables_index();
|
|
708
|
-
ITEM_SLUGS = {
|
|
709
|
-
PLAYCADEMY_CREDITS: "PLAYCADEMY_CREDITS",
|
|
710
|
-
PLAYCADEMY_XP: "PLAYCADEMY_XP",
|
|
711
|
-
FOUNDING_MEMBER_BADGE: "FOUNDING_MEMBER_BADGE",
|
|
712
|
-
EARLY_ADOPTER_BADGE: "EARLY_ADOPTER_BADGE",
|
|
713
|
-
FIRST_GAME_BADGE: "FIRST_GAME_BADGE",
|
|
714
|
-
COMMON_SWORD: "COMMON_SWORD",
|
|
715
|
-
SMALL_HEALTH_POTION: "SMALL_HEALTH_POTION",
|
|
716
|
-
SMALL_BACKPACK: "SMALL_BACKPACK",
|
|
717
|
-
LAVA_LAMP: "LAVA_LAMP",
|
|
718
|
-
BOOMBOX: "BOOMBOX",
|
|
719
|
-
CABIN_BED: "CABIN_BED"
|
|
720
|
-
};
|
|
721
|
-
CURRENCIES = {
|
|
722
|
-
PRIMARY: ITEM_SLUGS.PLAYCADEMY_CREDITS,
|
|
723
|
-
XP: ITEM_SLUGS.PLAYCADEMY_XP
|
|
724
|
-
};
|
|
725
|
-
BADGES = {
|
|
726
|
-
FOUNDING_MEMBER: ITEM_SLUGS.FOUNDING_MEMBER_BADGE,
|
|
727
|
-
EARLY_ADOPTER: ITEM_SLUGS.EARLY_ADOPTER_BADGE,
|
|
728
|
-
FIRST_GAME: ITEM_SLUGS.FIRST_GAME_BADGE
|
|
729
|
-
};
|
|
730
|
-
ACHIEVEMENT_COMPLETION_TYPES = [
|
|
731
|
-
"time_played_session",
|
|
732
|
-
"interaction",
|
|
733
|
-
"leaderboard_rank"
|
|
734
|
-
];
|
|
735
|
-
ACHIEVEMENT_COMPLETION_TYPE = Object.fromEntries(ACHIEVEMENT_COMPLETION_TYPES.map((value) => [value, value]));
|
|
736
|
-
INTERACTION_TYPE = Object.fromEntries(interactionTypeEnum.enumValues.map((value) => [value, value]));
|
|
737
|
-
});
|
|
738
|
-
|
|
739
|
-
// src/types.ts
|
|
740
|
-
init_constants();
|
|
741
|
-
var AuthProvider = {
|
|
742
|
-
TIMEBACK: "TIMEBACK"
|
|
743
|
-
};
|
|
744
|
-
export {
|
|
745
|
-
CURRENCIES,
|
|
746
|
-
BADGES,
|
|
747
|
-
AuthProvider
|
|
748
|
-
};
|
|
1
|
+
export {};
|