@plyaz/types 1.4.0 → 1.4.1

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.
@@ -0,0 +1,2 @@
1
+ export type * from './types';
2
+ export type * from './providers';
@@ -0,0 +1 @@
1
+ export type * from './wordpress';
@@ -0,0 +1 @@
1
+ export type * from './types';
@@ -0,0 +1,36 @@
1
+ /**
2
+ * WordPress Provider Types
3
+ *
4
+ * Type definitions for the WordPress provider.
5
+ *
6
+ * @fileoverview WordPress provider type definitions
7
+ * @version 1.0.0
8
+ */
9
+ export interface WPPostRaw {
10
+ id: number;
11
+ date: string;
12
+ slug: string;
13
+ title: {
14
+ rendered: string;
15
+ };
16
+ excerpt: {
17
+ rendered: string;
18
+ };
19
+ content: {
20
+ rendered: string;
21
+ };
22
+ _embedded?: {
23
+ author?: {
24
+ name: string;
25
+ avatar_urls: {
26
+ [size: string]: string;
27
+ };
28
+ }[];
29
+ 'wp:featuredmedia'?: {
30
+ source_url: string;
31
+ }[];
32
+ 'wp:term'?: {
33
+ name: string;
34
+ }[][];
35
+ };
36
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Blog Domain Types
3
+ *
4
+ * Core type definitions for the blog domain.
5
+ *
6
+ * @fileoverview Blog domain type definitions
7
+ * @version 1.0.0
8
+ */
9
+ /**
10
+ * Blog post interface
11
+ * @description This interface defines the properties of a blog post.
12
+ */
13
+ export interface BlogPost {
14
+ id: number;
15
+ title: string;
16
+ excerpt: string;
17
+ content: string;
18
+ date: string;
19
+ slug: string;
20
+ featuredImage?: string;
21
+ author: {
22
+ name: string;
23
+ avatar?: string;
24
+ };
25
+ categories: string[];
26
+ readingTime: number;
27
+ }
28
+ /**
29
+ * Blog provider interface for fetching posts
30
+ * @description This interface defines the methods required for a blog provider to fetch posts.
31
+ */
32
+ export interface BlogProvider {
33
+ fetchLatestPosts(page?: number, perPage?: number): Promise<BlogPost[]>;
34
+ fetchPostBySlug(slug: string): Promise<BlogPost | null>;
35
+ }
@@ -1 +1 @@
1
- export type * from './types';
1
+ export type * from './blog';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plyaz/types",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "author": "Redeemer Pace",
5
5
  "license": "ISC",
6
6
  "description": "Provides shared TypeScript types and schema utilities for validation and parsing in the @playz ecosystem.",
@@ -1,23 +0,0 @@
1
- /**
2
- * Community Domain Types
3
- *
4
- * Core type definitions for the community domain.
5
- *
6
- * @fileoverview Community domain type definitions
7
- * @version 1.0.0
8
- */
9
- export interface BlogPost {
10
- id: number;
11
- title: string;
12
- excerpt: string;
13
- content: string;
14
- date: string;
15
- slug: string;
16
- featuredImage?: string;
17
- author: {
18
- name: string;
19
- avatar?: string;
20
- };
21
- categories: string[];
22
- readingTime: number;
23
- }