Compare commits
5 Commits
main
...
9da626f17b
| Author | SHA1 | Date | |
|---|---|---|---|
| 9da626f17b | |||
| 3fab9cacbc | |||
| f9ca949d8e | |||
| 37b4f0bf2b | |||
| d66903400d |
@@ -17,8 +17,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@hono/swagger-ui": "^0.5.1",
|
||||
"@hono/zod-openapi": "^1.1.6",
|
||||
"@hono/zod-validator": "^0.7.6",
|
||||
"@hono/zod-openapi": "^0.19.5",
|
||||
"@hono/zod-validator": "^0.2.2",
|
||||
"drizzle-orm": "^0.44.7",
|
||||
"gql.tada": "^1.8.10",
|
||||
"graphql": "^16.12.0",
|
||||
@@ -27,7 +27,7 @@
|
||||
"jose": "^5.10.0",
|
||||
"lodash.mapkeys": "^4.6.0",
|
||||
"luxon": "^3.6.1",
|
||||
"zod": "^4.2.1"
|
||||
"zod": "^3.24.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cloudflare/vitest-pool-workers": "^0.10.15",
|
||||
|
||||
66
pnpm-lock.yaml
generated
66
pnpm-lock.yaml
generated
@@ -11,11 +11,11 @@ importers:
|
||||
specifier: ^0.5.1
|
||||
version: 0.5.2(hono@4.10.8)
|
||||
"@hono/zod-openapi":
|
||||
specifier: ^1.1.6
|
||||
version: 1.1.6(hono@4.10.8)(zod@4.2.1)
|
||||
specifier: ^0.19.5
|
||||
version: 0.19.10(hono@4.10.8)(zod@3.25.76)
|
||||
"@hono/zod-validator":
|
||||
specifier: ^0.7.6
|
||||
version: 0.7.6(hono@4.10.8)(zod@4.2.1)
|
||||
specifier: ^0.2.2
|
||||
version: 0.2.2(hono@4.10.8)(zod@3.25.76)
|
||||
drizzle-orm:
|
||||
specifier: ^0.44.7
|
||||
version: 0.44.7
|
||||
@@ -41,8 +41,8 @@ importers:
|
||||
specifier: ^3.6.1
|
||||
version: 3.7.2
|
||||
zod:
|
||||
specifier: ^4.2.1
|
||||
version: 4.2.1
|
||||
specifier: ^3.24.3
|
||||
version: 3.25.76
|
||||
devDependencies:
|
||||
"@cloudflare/vitest-pool-workers":
|
||||
specifier: ^0.10.15
|
||||
@@ -138,13 +138,13 @@ packages:
|
||||
graphql: ^15.5.0 || ^16.0.0 || ^17.0.0
|
||||
typescript: ^5.0.0
|
||||
|
||||
"@asteasolutions/zod-to-openapi@8.2.0":
|
||||
"@asteasolutions/zod-to-openapi@7.3.4":
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-u05zNUirlukJAf9oEHmxSF31L1XQhz9XdpVILt7+xhrz65oQqBpiOWFkGvRWL0IpjOUJ878idKoNmYPxrFnkeg==,
|
||||
integrity: sha512-/2rThQ5zPi9OzVwes6U7lK1+Yvug0iXu25olp7S0XsYmOqnyMfxH7gdSQjn/+DSOHRg7wnotwGJSyL+fBKdnEA==,
|
||||
}
|
||||
peerDependencies:
|
||||
zod: ^4.0.0
|
||||
zod: ^3.20.2
|
||||
|
||||
"@babel/code-frame@7.27.1":
|
||||
resolution:
|
||||
@@ -1411,20 +1411,29 @@ packages:
|
||||
peerDependencies:
|
||||
hono: "*"
|
||||
|
||||
"@hono/zod-openapi@1.1.6":
|
||||
"@hono/zod-openapi@0.19.10":
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-wEdG1MlCWAnngRVPKZJ/dv5P/b5UL3di/+SLX0Cuuc8hJ6Gf8L3vDMXcXywSYAwxK8iiatF7HoTxJ96gtckLpQ==,
|
||||
integrity: sha512-dpoS6DenvoJyvxtQ7Kd633FRZ/Qf74+4+o9s+zZI8pEqnbjdF/DtxIib08WDpCaWabMEJOL5TXpMgNEZvb7hpA==,
|
||||
}
|
||||
engines: { node: ">=16.0.0" }
|
||||
peerDependencies:
|
||||
hono: ">=4.3.6"
|
||||
zod: ^4.0.0
|
||||
zod: ">=3.0.0"
|
||||
|
||||
"@hono/zod-validator@0.7.6":
|
||||
"@hono/zod-validator@0.2.2":
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-Io1B6d011Gj1KknV4rXYz4le5+5EubcWEU/speUjuw9XMMIaP3n78yXLhjd2A3PXaXaUwEAluOiAyLqhBEJgsw==,
|
||||
integrity: sha512-dSDxaPV70Py8wuIU2QNpoVEIOSzSXZ/6/B/h4xA7eOMz7+AarKTSGV8E6QwrdcCbBLkpqfJ4Q2TmBO0eP1tCBQ==,
|
||||
}
|
||||
peerDependencies:
|
||||
hono: ">=3.9.0"
|
||||
zod: ^3.19.1
|
||||
|
||||
"@hono/zod-validator@0.7.5":
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-n4l4hutkfYU07PzRUHBOVzUEn38VSfrh+UVE5d0w4lyfWDOEhzxIupqo5iakRiJL44c3vTuFJBvcmUl8b9agIA==,
|
||||
}
|
||||
peerDependencies:
|
||||
hono: ">=3.9.0"
|
||||
@@ -4128,12 +4137,6 @@ packages:
|
||||
integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==,
|
||||
}
|
||||
|
||||
zod@4.2.1:
|
||||
resolution:
|
||||
{
|
||||
integrity: sha512-0wZ1IRqGGhMP76gLqz8EyfBXKk0J2qo2+H3fi4mcUP/KtTocoX08nmIAHl1Z2kJIZbZee8KOpBCSNPRgauucjw==,
|
||||
}
|
||||
|
||||
zx@8.1.5:
|
||||
resolution:
|
||||
{
|
||||
@@ -4153,10 +4156,10 @@ snapshots:
|
||||
graphql: 16.12.0
|
||||
typescript: 5.9.3
|
||||
|
||||
"@asteasolutions/zod-to-openapi@8.2.0(zod@4.2.1)":
|
||||
"@asteasolutions/zod-to-openapi@7.3.4(zod@3.25.76)":
|
||||
dependencies:
|
||||
openapi3-ts: 4.5.0
|
||||
zod: 4.2.1
|
||||
zod: 3.25.76
|
||||
|
||||
"@babel/code-frame@7.27.1":
|
||||
dependencies:
|
||||
@@ -4702,18 +4705,23 @@ snapshots:
|
||||
dependencies:
|
||||
hono: 4.10.8
|
||||
|
||||
"@hono/zod-openapi@1.1.6(hono@4.10.8)(zod@4.2.1)":
|
||||
"@hono/zod-openapi@0.19.10(hono@4.10.8)(zod@3.25.76)":
|
||||
dependencies:
|
||||
"@asteasolutions/zod-to-openapi": 8.2.0(zod@4.2.1)
|
||||
"@hono/zod-validator": 0.7.6(hono@4.10.8)(zod@4.2.1)
|
||||
"@asteasolutions/zod-to-openapi": 7.3.4(zod@3.25.76)
|
||||
"@hono/zod-validator": 0.7.5(hono@4.10.8)(zod@3.25.76)
|
||||
hono: 4.10.8
|
||||
openapi3-ts: 4.5.0
|
||||
zod: 4.2.1
|
||||
zod: 3.25.76
|
||||
|
||||
"@hono/zod-validator@0.7.6(hono@4.10.8)(zod@4.2.1)":
|
||||
"@hono/zod-validator@0.2.2(hono@4.10.8)(zod@3.25.76)":
|
||||
dependencies:
|
||||
hono: 4.10.8
|
||||
zod: 4.2.1
|
||||
zod: 3.25.76
|
||||
|
||||
"@hono/zod-validator@0.7.5(hono@4.10.8)(zod@3.25.76)":
|
||||
dependencies:
|
||||
hono: 4.10.8
|
||||
zod: 3.25.76
|
||||
|
||||
"@img/sharp-darwin-arm64@0.33.5":
|
||||
optionalDependencies:
|
||||
@@ -6293,8 +6301,6 @@ snapshots:
|
||||
|
||||
zod@3.25.76: {}
|
||||
|
||||
zod@4.2.1: {}
|
||||
|
||||
zx@8.1.5:
|
||||
optionalDependencies:
|
||||
"@types/fs-extra": 11.0.4
|
||||
|
||||
@@ -20,8 +20,8 @@ const UserSchema = z.object({
|
||||
}),
|
||||
statistics: z.object({
|
||||
minutesWatched: z.number().openapi({ type: "integer", format: "int64" }),
|
||||
episodesWatched: z.int(),
|
||||
count: z.int(),
|
||||
episodesWatched: z.number().int(),
|
||||
count: z.number().int(),
|
||||
meanScore: z.number().openapi({ type: "number", format: "float" }),
|
||||
}),
|
||||
});
|
||||
@@ -129,11 +129,15 @@ app.openapi(route, async (c) => {
|
||||
let hasNextPage = true;
|
||||
|
||||
do {
|
||||
const { mediaList, pageInfo } = await getWatchingTitles(
|
||||
user.name!,
|
||||
currentPage++,
|
||||
aniListToken,
|
||||
).then((data) => data!);
|
||||
const stub = env.ANILIST_DO.getByName(user.name!);
|
||||
const { mediaList, pageInfo } = await stub
|
||||
.getTitles(
|
||||
user.name!,
|
||||
currentPage++,
|
||||
["CURRENT", "PLANNING", "PAUSED", "REPEATING"],
|
||||
aniListToken,
|
||||
)
|
||||
.then((data) => data!);
|
||||
if (!mediaList) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ type AiringSchedule = {
|
||||
id: number;
|
||||
};
|
||||
|
||||
export async function getUpcomingTitlesFromAnilist() {
|
||||
export async function getUpcomingTitlesFromAnilist(req: HonoRequest) {
|
||||
const durableObjectId = env.ANILIST_DO.idFromName("GLOBAL");
|
||||
const stub = env.ANILIST_DO.get(durableObjectId);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ import { getUpcomingTitlesFromAnilist } from "./anilist";
|
||||
|
||||
const app = new Hono();
|
||||
|
||||
export async function checkUpcomingTitles() {
|
||||
const titles = await getUpcomingTitlesFromAnilist();
|
||||
app.post("/", async (c) => {
|
||||
const titles = await getUpcomingTitlesFromAnilist(c.req);
|
||||
|
||||
await Promise.allSettled(
|
||||
titles.map(async (title) => {
|
||||
@@ -44,10 +44,6 @@ export async function checkUpcomingTitles() {
|
||||
});
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
app.post("/", async (c) => {
|
||||
await checkUpcomingTitles();
|
||||
|
||||
return c.json(SuccessResponse, 200);
|
||||
});
|
||||
|
||||
@@ -23,8 +23,8 @@ const route = createRoute({
|
||||
path: "/",
|
||||
request: {
|
||||
query: z.object({
|
||||
limit: z.coerce
|
||||
.number()
|
||||
limit: z
|
||||
.number({ coerce: true })
|
||||
.int()
|
||||
.default(10)
|
||||
.describe("The number of titles to return"),
|
||||
|
||||
@@ -22,12 +22,12 @@ const route = createRoute({
|
||||
path: "/{category}",
|
||||
request: {
|
||||
query: z.object({
|
||||
limit: z.coerce
|
||||
.number()
|
||||
limit: z
|
||||
.number({ coerce: true })
|
||||
.int()
|
||||
.prefault(10)
|
||||
.default(10)
|
||||
.describe("The number of titles to return"),
|
||||
page: z.coerce.number().int().min(1).prefault(1),
|
||||
page: z.number({ coerce: true }).int().min(1).default(1),
|
||||
}),
|
||||
params: z.object({ category: PopularCategory }),
|
||||
},
|
||||
|
||||
@@ -17,8 +17,8 @@ const route = createRoute({
|
||||
request: {
|
||||
query: z.object({
|
||||
query: z.string(),
|
||||
page: z.coerce.number().int().min(1).prefault(1),
|
||||
limit: z.coerce.number().int().prefault(10),
|
||||
page: z.number({ coerce: true }).int().min(1).default(1),
|
||||
limit: z.number({ coerce: true }).int().default(10),
|
||||
}),
|
||||
},
|
||||
responses: {
|
||||
|
||||
@@ -51,7 +51,7 @@ describe('requests the "/title" route', () => {
|
||||
headers: new Headers({ "x-anilist-token": "asd" }),
|
||||
});
|
||||
|
||||
await expect(response.json()).resolves.toMatchSnapshot();
|
||||
expect(await response.json()).toMatchSnapshot();
|
||||
expect(response.status).toBe(200);
|
||||
});
|
||||
|
||||
@@ -63,7 +63,7 @@ describe('requests the "/title" route', () => {
|
||||
|
||||
const response = await app.request("/title?id=10");
|
||||
|
||||
await expect(response.json()).resolves.toMatchSnapshot();
|
||||
expect(await response.json()).toMatchSnapshot();
|
||||
expect(response.status).toBe(200);
|
||||
});
|
||||
|
||||
@@ -75,7 +75,7 @@ describe('requests the "/title" route', () => {
|
||||
|
||||
const response = await app.request("/title?id=-1");
|
||||
|
||||
await expect(response.json()).resolves.toEqual({ success: false });
|
||||
expect(await response.json()).toEqual({ success: false });
|
||||
expect(response.status).toBe(404);
|
||||
});
|
||||
});
|
||||
|
||||
17
src/index.ts
17
src/index.ts
@@ -121,20 +121,9 @@ export default {
|
||||
});
|
||||
},
|
||||
async scheduled(event, env, ctx) {
|
||||
switch (event.cron) {
|
||||
case "0 */12 * * *":
|
||||
const { processDelayedTasks } =
|
||||
await import("~/libs/tasks/processDelayedTasks");
|
||||
await processDelayedTasks(env);
|
||||
break;
|
||||
case "0 18 * * *":
|
||||
const { checkUpcomingTitles } =
|
||||
await import("~/controllers/internal/upcoming-titles");
|
||||
await checkUpcomingTitles();
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unhandled cron: ${event.cron}`);
|
||||
}
|
||||
const { processDelayedTasks } =
|
||||
await import("~/libs/tasks/processDelayedTasks");
|
||||
await processDelayedTasks(env);
|
||||
},
|
||||
} satisfies ExportedHandler<Env>;
|
||||
|
||||
|
||||
@@ -24,9 +24,9 @@ import type { Title } from "~/types/title";
|
||||
|
||||
const nextAiringEpisodeSchema = z.nullable(
|
||||
z.object({
|
||||
episode: z.int(),
|
||||
airingAt: z.int(),
|
||||
timeUntilAiring: z.int(),
|
||||
episode: z.number().int(),
|
||||
airingAt: z.number().int(),
|
||||
timeUntilAiring: z.number().int(),
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -43,7 +43,7 @@ export class AnilistDurableObject extends DurableObject {
|
||||
|
||||
async getTitle(
|
||||
id: number,
|
||||
userId?: number,
|
||||
userId?: string,
|
||||
token?: string,
|
||||
): Promise<Title | null> {
|
||||
const promises: Promise<any>[] = [
|
||||
@@ -135,7 +135,8 @@ export class AnilistDurableObject extends DurableObject {
|
||||
nextSeason,
|
||||
nextYear,
|
||||
limit,
|
||||
});
|
||||
page,
|
||||
}).then((data) => data?.Page);
|
||||
},
|
||||
DateTime.now().plus({ days: 1 }),
|
||||
);
|
||||
@@ -154,8 +155,7 @@ export class AnilistDurableObject extends DurableObject {
|
||||
nextSeason,
|
||||
nextYear,
|
||||
limit,
|
||||
page,
|
||||
}).then((data) => data?.Page);
|
||||
});
|
||||
},
|
||||
DateTime.now().plus({ days: 1 }),
|
||||
);
|
||||
@@ -276,11 +276,13 @@ export class AnilistDurableObject extends DurableObject {
|
||||
|
||||
const result = await fetcher();
|
||||
await this.state.storage.put(key, result);
|
||||
console.debug(`Retrieved alarms from cache:`, Object.entries(alarms));
|
||||
|
||||
const calculatedTtl = typeof ttl === "function" ? ttl(result) : ttl;
|
||||
if (calculatedTtl) {
|
||||
const alarmTime = calculatedTtl.toMillis();
|
||||
await this.state.storage.setAlarm(alarmTime);
|
||||
console.debug(`Deleting storage key ${storageKey} & alarm ${key}`);
|
||||
await this.state.storage.put(`alarm:${key}`, alarmTime);
|
||||
}
|
||||
|
||||
@@ -290,13 +292,11 @@ export class AnilistDurableObject extends DurableObject {
|
||||
async alarm() {
|
||||
const now = Date.now();
|
||||
const alarms = await this.state.storage.list({ prefix: "alarm:" });
|
||||
console.debug(`Retrieved alarms from cache:`, Object.entries(alarms));
|
||||
for (const [key, ttl] of Object.entries(alarms)) {
|
||||
if (now >= ttl) {
|
||||
// The key in alarms is `alarm:${storageKey}`
|
||||
// We want to delete the storageKey
|
||||
const storageKey = key.replace("alarm:", "");
|
||||
console.debug(`Deleting storage key ${storageKey} & alarm ${key}`);
|
||||
await this.state.storage.delete(storageKey);
|
||||
await this.state.storage.delete(key);
|
||||
}
|
||||
|
||||
@@ -259,8 +259,8 @@ export const NextSeasonPopularQuery = graphql(
|
||||
$nextSeason: MediaSeason
|
||||
$nextYear: Int
|
||||
$limit: Int!
|
||||
$page: Int!
|
||||
) {
|
||||
$page: Int!
|
||||
Page(page: $page, perPage: $limit) {
|
||||
media(
|
||||
season: $nextSeason
|
||||
|
||||
@@ -3,13 +3,11 @@ import mapKeys from "lodash.mapkeys";
|
||||
|
||||
import { Case, changeStringCase } from "../changeStringCase";
|
||||
|
||||
export function getAdminSdkCredentials(
|
||||
env: Cloudflare.Env = cloudflareEnv,
|
||||
): AdminSdkCredentials {
|
||||
export function getAdminSdkCredentials(env: Cloudflare.Env = cloudflareEnv) {
|
||||
return mapKeys(
|
||||
JSON.parse(env.ADMIN_SDK_JSON) as AdminSdkCredentials,
|
||||
(_, key) => changeStringCase(key, Case.snake_case, Case.camelCase),
|
||||
) satisfies AdminSdkCredentials;
|
||||
);
|
||||
}
|
||||
|
||||
export interface AdminSdkCredentials {
|
||||
|
||||
@@ -79,18 +79,7 @@ export async function queueTask(
|
||||
// Otherwise, queue directly
|
||||
const contentType =
|
||||
headers["Content-Type"] === "application/json" ? "json" : "text";
|
||||
if (env) {
|
||||
console.debug(
|
||||
`Queueing task in queue ${queueName}: ${JSON.stringify(body)}`,
|
||||
);
|
||||
await env[queueName].send(
|
||||
{ body, headers },
|
||||
{
|
||||
contentType,
|
||||
delaySeconds: scheduleTime,
|
||||
},
|
||||
);
|
||||
} else {
|
||||
if (!env) {
|
||||
const Cloudflare = await import("cloudflare").then(
|
||||
({ Cloudflare }) => Cloudflare,
|
||||
);
|
||||
@@ -114,6 +103,14 @@ export async function queueTask(
|
||||
delay_seconds: scheduleTime,
|
||||
account_id: env.CLOUDFLARE_ACCOUNT_ID,
|
||||
});
|
||||
} else {
|
||||
await env[queueName].send(
|
||||
{ body, headers },
|
||||
{
|
||||
contentType,
|
||||
delaySeconds: scheduleTime,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
function buildTask(
|
||||
@@ -125,7 +122,6 @@ function buildTask(
|
||||
let scheduleTime: number = 0;
|
||||
if (scheduleConfig) {
|
||||
const { delay, epochTime } = scheduleConfig;
|
||||
console.log("scheduleConfig", scheduleConfig);
|
||||
if (epochTime) {
|
||||
console.log("epochTime", epochTime);
|
||||
scheduleTime = DateTime.fromSeconds(epochTime)
|
||||
|
||||
@@ -9,7 +9,7 @@ export const FetchUrlResponseSchema = z.object({
|
||||
audio: z.array(z.object({ url: z.string(), lang: z.string() })),
|
||||
intro: SkippableSchema,
|
||||
outro: SkippableSchema,
|
||||
headers: z.record(z.string(), z.string()).optional(),
|
||||
headers: z.record(z.string()).optional(),
|
||||
});
|
||||
|
||||
export type FetchUrlResponse = z.infer<typeof FetchUrlResponse> & {
|
||||
|
||||
@@ -9,8 +9,8 @@ export const Episode = z.object({
|
||||
title: z.string().nullish(),
|
||||
img: z.string().nullish(),
|
||||
description: z.string().nullish(),
|
||||
rating: z.int().nullish(),
|
||||
updatedAt: z.int().prefault(0).openapi({ format: "int64" }),
|
||||
rating: z.number().int().nullish(),
|
||||
updatedAt: z.number().int().default(0).openapi({ format: "int64" }),
|
||||
});
|
||||
|
||||
export type EpisodesResponse = z.infer<typeof EpisodesResponse>;
|
||||
|
||||
@@ -24,9 +24,9 @@ export const ErrorResponseSchema = z.object({
|
||||
success: z.literal(false).openapi({ type: "boolean" }),
|
||||
});
|
||||
|
||||
export const NullableNumberSchema = z.int().nullable();
|
||||
export const NullableNumberSchema = z.number().int().nullable();
|
||||
|
||||
export const AniListIdSchema = z.int().openapi({ format: "int64" });
|
||||
export const AniListIdSchema = z.number().int().openapi({ format: "int64" });
|
||||
export const AniListIdQuerySchema = z
|
||||
.string()
|
||||
.openapi({ type: "integer", format: "int64" });
|
||||
|
||||
@@ -8,17 +8,17 @@ export type Title = z.infer<typeof Title>;
|
||||
export const Title = z.object({
|
||||
nextAiringEpisode: z.nullable(
|
||||
z.object({
|
||||
episode: z.int(),
|
||||
airingAt: z.int().openapi({ format: "int64" }),
|
||||
timeUntilAiring: z.int().openapi({ format: "int64" }),
|
||||
episode: z.number().int(),
|
||||
airingAt: z.number().int().openapi({ format: "int64" }),
|
||||
timeUntilAiring: z.number().int().openapi({ format: "int64" }),
|
||||
}),
|
||||
),
|
||||
mediaListEntry: z.nullable(
|
||||
z.object({
|
||||
status: z.nullable(WatchStatus),
|
||||
progress: NullableNumberSchema,
|
||||
id: z.int(),
|
||||
updatedAt: z.int().openapi({ format: "int64" }).optional(),
|
||||
id: z.number().int(),
|
||||
updatedAt: z.number().int().openapi({ format: "int64" }).optional(),
|
||||
}),
|
||||
),
|
||||
countryOfOrigin: countryCodeSchema,
|
||||
@@ -50,5 +50,5 @@ export const Title = z.object({
|
||||
}),
|
||||
),
|
||||
idMal: NullableNumberSchema,
|
||||
id: z.int().openapi({ format: "int64" }),
|
||||
id: z.number().int().openapi({ format: "int64" }),
|
||||
});
|
||||
|
||||
@@ -14,7 +14,7 @@ export const UserProfile = z.object({
|
||||
statistics: z.object({
|
||||
minutesWatched: z.number().openapi({ type: "integer", format: "int64" }),
|
||||
episodesWatched: z.number().openapi({ type: "integer", format: "int64" }),
|
||||
count: z.int(),
|
||||
count: z.number().int(),
|
||||
meanScore: z.number().openapi({ type: "number", format: "float" }),
|
||||
}),
|
||||
id: z.number().openapi({ type: "integer", format: "int64" }),
|
||||
|
||||
@@ -67,7 +67,7 @@ id = "c8db249d8ee7462b91f9c374321776e4"
|
||||
preview_id = "ff38240eb2aa4b1388c705f4974f5aec"
|
||||
|
||||
[triggers]
|
||||
crons = ["0 */12 * * *", "0 18 * * *"]
|
||||
crons = ["0 */12 * * *"]
|
||||
|
||||
[[d1_databases]]
|
||||
binding = "DB"
|
||||
|
||||
Reference in New Issue
Block a user