@etherna/sdk-js
Version:
Etherna SDKs for operations on the network
276 lines • 9.34 kB
TypeScript
import { z } from "zod";
import { Reference } from "../clients";
export declare const PlaylistTypeEncryptedSchema: z.ZodEnum<["private", "protected"]>;
export declare const PlaylistReservedIdsSchema: z.ZodEnum<["Channel", "Saved"]>;
export declare const PlaylistTypeVisibleSchema: z.ZodLiteral<"public">;
export declare const PlaylistTypeSchema: z.ZodUnion<[z.ZodEnum<["private", "protected"]>, z.ZodLiteral<"public">]>;
export declare const PlaylistIdSchema: z.ZodUnion<[z.ZodString, z.ZodEnum<["Channel", "Saved"]>]>;
export declare const PlaylistThumbSchema: z.ZodObject<{
blurhash: z.ZodString;
path: z.ZodString;
}, "strip", z.ZodTypeAny, {
path: string;
blurhash: string;
}, {
path: string;
blurhash: string;
}>;
export declare const PlaylistVideoRawSchema: z.ZodObject<{
/** Video reference */
r: z.ZodEffects<z.ZodString, Reference, string>;
/** Video Title */
t: z.ZodString;
/** Timestamp of when the videos has been added to playlist */
a: z.ZodUnion<[z.ZodEffects<z.ZodNumber, number, number>, z.ZodEffects<z.ZodString, number, string>]>;
/** Timestamp of when the video should be visible */
p: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodNumber, number, number>, z.ZodEffects<z.ZodString, number, string>]>>;
}, "strip", z.ZodTypeAny, {
r: string & {
readonly length: 64;
};
a: number;
t: string;
p?: number | undefined;
}, {
r: string;
a: string | number;
t: string;
p?: string | number | undefined;
}>;
export declare const PlaylistPreviewRawSchema: z.ZodObject<{
/** Playlist id (used for feed update) */
id: z.ZodUnion<[z.ZodString, z.ZodEnum<["Channel", "Saved"]>]>;
/** Playlist visibility: public (visibile by anyone), private (visibible by owner), protected (visible by anyone with the password) */
type: z.ZodUnion<[z.ZodEnum<["private", "protected"]>, z.ZodLiteral<"public">]>;
/** Private type password hint */
passwordHint: z.ZodOptional<z.ZodString>;
/** Playlist name (empty for __channel & __saved) */
name: z.ZodString;
/** Playlist owner */
owner: z.ZodEffects<z.ZodString, `0x${string}`, string>;
/** Preview image */
thumb: z.ZodNullable<z.ZodObject<{
blurhash: z.ZodString;
path: z.ZodString;
}, "strip", z.ZodTypeAny, {
path: string;
blurhash: string;
}, {
path: string;
blurhash: string;
}>>;
/** Playlist creation timestamp */
createdAt: z.ZodUnion<[z.ZodEffects<z.ZodNumber, number, number>, z.ZodEffects<z.ZodString, number, string>]>;
/** Playlist update timestamp */
updatedAt: z.ZodUnion<[z.ZodEffects<z.ZodNumber, number, number>, z.ZodEffects<z.ZodString, number, string>]>;
}, "strip", z.ZodTypeAny, {
type: "private" | "protected" | "public";
name: string;
id: string;
createdAt: number;
updatedAt: number;
thumb: {
path: string;
blurhash: string;
} | null;
owner: `0x${string}`;
passwordHint?: string | undefined;
}, {
type: "private" | "protected" | "public";
name: string;
id: string;
createdAt: string | number;
updatedAt: string | number;
thumb: {
path: string;
blurhash: string;
} | null;
owner: string;
passwordHint?: string | undefined;
}>;
export declare const PlaylistDetailsRawSchema: z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
videos: z.ZodArray<z.ZodObject<{
/** Video reference */
r: z.ZodEffects<z.ZodString, Reference, string>;
/** Video Title */
t: z.ZodString;
/** Timestamp of when the videos has been added to playlist */
a: z.ZodUnion<[z.ZodEffects<z.ZodNumber, number, number>, z.ZodEffects<z.ZodString, number, string>]>;
/** Timestamp of when the video should be visible */
p: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodNumber, number, number>, z.ZodEffects<z.ZodString, number, string>]>>;
}, "strip", z.ZodTypeAny, {
r: string & {
readonly length: 64;
};
a: number;
t: string;
p?: number | undefined;
}, {
r: string;
a: string | number;
t: string;
p?: string | number | undefined;
}>, "many">;
}, "strip", z.ZodTypeAny, {
videos: {
r: string & {
readonly length: 64;
};
a: number;
t: string;
p?: number | undefined;
}[];
name?: string | undefined;
description?: string | undefined;
}, {
videos: {
r: string;
a: string | number;
t: string;
p?: string | number | undefined;
}[];
name?: string | undefined;
description?: string | undefined;
}>;
export declare const PlaylistVideoSchema: z.ZodObject<{
/** Video reference */
reference: z.ZodEffects<z.ZodString, Reference, string>;
/** Video Title */
title: z.ZodString;
/** Timestamp of when the videos has been added to playlist */
addedAt: z.ZodDate;
/** Timestamp of when the video should be visible */
publishedAt: z.ZodOptional<z.ZodDate>;
}, "strip", z.ZodTypeAny, {
reference: string & {
readonly length: 64;
};
title: string;
addedAt: Date;
publishedAt?: Date | undefined;
}, {
reference: string;
title: string;
addedAt: Date;
publishedAt?: Date | undefined;
}>;
export declare const PlaylistPreviewSchema: z.ZodObject<{
/** Epoch feed root manifest */
rootManifest: z.ZodEffects<z.ZodString, Reference, string>;
/** Playlist id (used for feed update) */
id: z.ZodUnion<[z.ZodString, z.ZodEnum<["Channel", "Saved"]>]>;
/** Playlist visibility: public (visibile by anyone), private (visibible by owner), protected (visible by anyone with the password) */
type: z.ZodUnion<[z.ZodEnum<["private", "protected"]>, z.ZodLiteral<"public">]>;
/** Private type password hint */
passwordHint: z.ZodOptional<z.ZodString>;
/** Playlist name (empty for Channel & Saved) */
name: z.ZodString;
/** Playlist owner */
owner: z.ZodEffects<z.ZodString, `0x${string}`, string>;
/** Preview image */
thumb: z.ZodNullable<z.ZodObject<{
blurhash: z.ZodString;
path: z.ZodString;
}, "strip", z.ZodTypeAny, {
path: string;
blurhash: string;
}, {
path: string;
blurhash: string;
}>>;
/** Playlist creation timestamp */
createdAt: z.ZodDate;
/** Playlist update timestamp */
updatedAt: z.ZodDate;
}, "strip", z.ZodTypeAny, {
type: "private" | "protected" | "public";
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
thumb: {
path: string;
blurhash: string;
} | null;
owner: `0x${string}`;
rootManifest: string & {
readonly length: 64;
};
passwordHint?: string | undefined;
}, {
type: "private" | "protected" | "public";
name: string;
id: string;
createdAt: Date;
updatedAt: Date;
thumb: {
path: string;
blurhash: string;
} | null;
owner: string;
rootManifest: string;
passwordHint?: string | undefined;
}>;
export declare const PlaylistDetailsSchema: z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
videos: z.ZodArray<z.ZodObject<{
/** Video reference */
reference: z.ZodEffects<z.ZodString, Reference, string>;
/** Video Title */
title: z.ZodString;
/** Timestamp of when the videos has been added to playlist */
addedAt: z.ZodDate;
/** Timestamp of when the video should be visible */
publishedAt: z.ZodOptional<z.ZodDate>;
}, "strip", z.ZodTypeAny, {
reference: string & {
readonly length: 64;
};
title: string;
addedAt: Date;
publishedAt?: Date | undefined;
}, {
reference: string;
title: string;
addedAt: Date;
publishedAt?: Date | undefined;
}>, "many">;
}, "strip", z.ZodTypeAny, {
videos: {
reference: string & {
readonly length: 64;
};
title: string;
addedAt: Date;
publishedAt?: Date | undefined;
}[];
name?: string | undefined;
description?: string | undefined;
}, {
videos: {
reference: string;
title: string;
addedAt: Date;
publishedAt?: Date | undefined;
}[];
name?: string | undefined;
description?: string | undefined;
}>;
export type PlaylistType = z.infer<typeof PlaylistTypeSchema>;
export type PlaylistId = z.infer<typeof PlaylistIdSchema>;
export type PlaylistThumb = z.infer<typeof PlaylistThumbSchema>;
export type PlaylistVideoRaw = z.infer<typeof PlaylistVideoRawSchema>;
export type PlaylistPreviewRaw = z.infer<typeof PlaylistPreviewRawSchema>;
export type PlaylistDetailsRaw = z.infer<typeof PlaylistDetailsRawSchema>;
export type PlaylistVideo = z.infer<typeof PlaylistVideoSchema>;
export type PlaylistPreview = z.infer<typeof PlaylistPreviewSchema>;
export type PlaylistDetails = z.infer<typeof PlaylistDetailsSchema>;
export type Playlist = {
reference: Reference;
preview: PlaylistPreview;
details: PlaylistDetails;
};
//# sourceMappingURL=playlist.d.ts.map