@mx-space/api-client 3.5.1 → 3.6.0

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.cjs CHANGED
@@ -633,6 +633,13 @@ var NoteController = class {
633
633
  ...sortOptions
634
634
  } });
635
635
  }
636
+ /**
637
+ * 获取专栏的最近更新时间(取该专栏下所有可见日记 max(modified, created))
638
+ * @param topicId 专栏 ID
639
+ */
640
+ getTopicRecentUpdate(topicId) {
641
+ return this.proxy.topics(topicId)["recent-update"].get();
642
+ }
636
643
  };
637
644
  //#endregion
638
645
  //#region controllers/owner.ts
package/dist/index.d.cts CHANGED
@@ -1688,7 +1688,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
1688
1688
  name: string;
1689
1689
  created: string;
1690
1690
  id: string;
1691
- children: Pick<PostModel, "id" | "created" | "title" | "slug" | "modified">[];
1691
+ children: Pick<PostModel, "id" | "title" | "slug" | "modified" | "created">[];
1692
1692
  } : T_1 : never : never;
1693
1693
  } : ResponseWrapper;
1694
1694
  $request: {
@@ -1740,7 +1740,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
1740
1740
  };
1741
1741
  }) ? T_1 extends unknown ? {
1742
1742
  tag: string;
1743
- data: Pick<PostModel, "category" | "id" | "created" | "title" | "slug">[];
1743
+ data: Pick<PostModel, "category" | "id" | "title" | "slug" | "created">[];
1744
1744
  } : T_1 : never : never;
1745
1745
  } : ResponseWrapper;
1746
1746
  $request: {
@@ -2069,6 +2069,26 @@ declare class NoteController<ResponseWrapper> implements IController {
2069
2069
  } ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
2070
2070
  data: PaginateResult<NoteTopicListItem>;
2071
2071
  }>;
2072
+ /**
2073
+ * 获取专栏的最近更新时间(取该专栏下所有可见日记 max(modified, created))
2074
+ * @param topicId 专栏 ID
2075
+ */
2076
+ getTopicRecentUpdate(topicId: string): RequestProxyResult<{
2077
+ ts: string | null;
2078
+ }, ResponseWrapper, ResponseWrapper extends unknown ? {
2079
+ [key: string]: any;
2080
+ data: {
2081
+ ts: string | null;
2082
+ };
2083
+ } : ResponseWrapper extends {
2084
+ data: {
2085
+ ts: string | null;
2086
+ };
2087
+ } ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
2088
+ data: {
2089
+ ts: string | null;
2090
+ };
2091
+ }>;
2072
2092
  }
2073
2093
  //#endregion
2074
2094
  //#region controllers/owner.d.ts
@@ -2581,35 +2601,35 @@ declare class SearchController<ResponseWrapper> implements IController {
2581
2601
  search(type: 'note', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<NoteModel, 'modified' | 'id' | 'title' | 'created' | 'nid'> & SearchResultHighlight>, ResponseWrapper>>;
2582
2602
  search(type: 'post', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<PostModel, 'modified' | 'id' | 'title' | 'created' | 'slug' | 'category'> & SearchResultHighlight>, ResponseWrapper>>;
2583
2603
  search(type: 'page', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<PageModel, 'modified' | 'id' | 'title' | 'created' | 'slug'> & SearchResultHighlight>, ResponseWrapper>>;
2584
- searchAll(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2604
+ searchAll(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2585
2605
  type: "post";
2586
- }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2606
+ }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & SearchResultHighlight & {
2587
2607
  type: "note";
2588
- }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2608
+ }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2589
2609
  type: "page";
2590
2610
  })>, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
2591
2611
  [key: string]: any;
2592
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2612
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2593
2613
  type: "post";
2594
- }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2614
+ }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & SearchResultHighlight & {
2595
2615
  type: "note";
2596
- }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2616
+ }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2597
2617
  type: "page";
2598
2618
  })>, ResponseWrapper>;
2599
2619
  } : ResponseWrapper extends {
2600
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2620
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2601
2621
  type: "post";
2602
- }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2622
+ }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & SearchResultHighlight & {
2603
2623
  type: "note";
2604
- }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2624
+ }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2605
2625
  type: "page";
2606
2626
  })>, ResponseWrapper>;
2607
2627
  } ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
2608
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2628
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2609
2629
  type: "post";
2610
- }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2630
+ }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & SearchResultHighlight & {
2611
2631
  type: "note";
2612
- }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2632
+ }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2613
2633
  type: "page";
2614
2634
  })>, ResponseWrapper>;
2615
2635
  }>;
package/dist/index.d.mts CHANGED
@@ -1688,7 +1688,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
1688
1688
  name: string;
1689
1689
  created: string;
1690
1690
  id: string;
1691
- children: Pick<PostModel, "id" | "created" | "title" | "slug" | "modified">[];
1691
+ children: Pick<PostModel, "id" | "title" | "slug" | "modified" | "created">[];
1692
1692
  } : T_1 : never : never;
1693
1693
  } : ResponseWrapper;
1694
1694
  $request: {
@@ -1740,7 +1740,7 @@ declare class CategoryController<ResponseWrapper> implements IController {
1740
1740
  };
1741
1741
  }) ? T_1 extends unknown ? {
1742
1742
  tag: string;
1743
- data: Pick<PostModel, "category" | "id" | "created" | "title" | "slug">[];
1743
+ data: Pick<PostModel, "category" | "id" | "title" | "slug" | "created">[];
1744
1744
  } : T_1 : never : never;
1745
1745
  } : ResponseWrapper;
1746
1746
  $request: {
@@ -2069,6 +2069,26 @@ declare class NoteController<ResponseWrapper> implements IController {
2069
2069
  } ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
2070
2070
  data: PaginateResult<NoteTopicListItem>;
2071
2071
  }>;
2072
+ /**
2073
+ * 获取专栏的最近更新时间(取该专栏下所有可见日记 max(modified, created))
2074
+ * @param topicId 专栏 ID
2075
+ */
2076
+ getTopicRecentUpdate(topicId: string): RequestProxyResult<{
2077
+ ts: string | null;
2078
+ }, ResponseWrapper, ResponseWrapper extends unknown ? {
2079
+ [key: string]: any;
2080
+ data: {
2081
+ ts: string | null;
2082
+ };
2083
+ } : ResponseWrapper extends {
2084
+ data: {
2085
+ ts: string | null;
2086
+ };
2087
+ } ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
2088
+ data: {
2089
+ ts: string | null;
2090
+ };
2091
+ }>;
2072
2092
  }
2073
2093
  //#endregion
2074
2094
  //#region controllers/owner.d.ts
@@ -2581,35 +2601,35 @@ declare class SearchController<ResponseWrapper> implements IController {
2581
2601
  search(type: 'note', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<NoteModel, 'modified' | 'id' | 'title' | 'created' | 'nid'> & SearchResultHighlight>, ResponseWrapper>>;
2582
2602
  search(type: 'post', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<PostModel, 'modified' | 'id' | 'title' | 'created' | 'slug' | 'category'> & SearchResultHighlight>, ResponseWrapper>>;
2583
2603
  search(type: 'page', keyword: string, options?: SearchOption): Promise<RequestProxyResult<PaginateResult<Pick<PageModel, 'modified' | 'id' | 'title' | 'created' | 'slug'> & SearchResultHighlight>, ResponseWrapper>>;
2584
- searchAll(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2604
+ searchAll(keyword: string, options?: SearchOption): RequestProxyResult<RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2585
2605
  type: "post";
2586
- }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2606
+ }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & SearchResultHighlight & {
2587
2607
  type: "note";
2588
- }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2608
+ }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2589
2609
  type: "page";
2590
2610
  })>, ResponseWrapper>, ResponseWrapper, ResponseWrapper extends unknown ? {
2591
2611
  [key: string]: any;
2592
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2612
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2593
2613
  type: "post";
2594
- }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2614
+ }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & SearchResultHighlight & {
2595
2615
  type: "note";
2596
- }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2616
+ }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2597
2617
  type: "page";
2598
2618
  })>, ResponseWrapper>;
2599
2619
  } : ResponseWrapper extends {
2600
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2620
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2601
2621
  type: "post";
2602
- }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2622
+ }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & SearchResultHighlight & {
2603
2623
  type: "note";
2604
- }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2624
+ }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2605
2625
  type: "page";
2606
2626
  })>, ResponseWrapper>;
2607
2627
  } ? ResponseWrapper : Omit<ResponseWrapper, "data"> & {
2608
- data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2628
+ data: RequestProxyResult<PaginateResult<(Pick<PostModel, "category" | "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2609
2629
  type: "post";
2610
- }) | (Pick<NoteModel, "id" | "created" | "title" | "modified" | "nid"> & SearchResultHighlight & {
2630
+ }) | (Pick<NoteModel, "id" | "title" | "modified" | "created" | "nid"> & SearchResultHighlight & {
2611
2631
  type: "note";
2612
- }) | (Pick<PageModel, "id" | "created" | "title" | "slug" | "modified"> & SearchResultHighlight & {
2632
+ }) | (Pick<PageModel, "id" | "title" | "slug" | "modified" | "created"> & SearchResultHighlight & {
2613
2633
  type: "page";
2614
2634
  })>, ResponseWrapper>;
2615
2635
  }>;
package/dist/index.mjs CHANGED
@@ -629,6 +629,13 @@ var NoteController = class {
629
629
  ...sortOptions
630
630
  } });
631
631
  }
632
+ /**
633
+ * 获取专栏的最近更新时间(取该专栏下所有可见日记 max(modified, created))
634
+ * @param topicId 专栏 ID
635
+ */
636
+ getTopicRecentUpdate(topicId) {
637
+ return this.proxy.topics(topicId)["recent-update"].get();
638
+ }
632
639
  };
633
640
  //#endregion
634
641
  //#region controllers/owner.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-space/api-client",
3
- "version": "3.5.1",
3
+ "version": "3.6.0",
4
4
  "description": "A api client for mx-space server@next",
5
5
  "type": "module",
6
6
  "engines": {
@@ -42,26 +42,26 @@
42
42
  "tag": false,
43
43
  "commit_message": "chore(release): bump @mx-space/api-client to v${NEW_VERSION}"
44
44
  },
45
+ "scripts": {
46
+ "package": "rm -rf dist && tsdown",
47
+ "build": "npm run package",
48
+ "prepackage": "rm -rf dist",
49
+ "test": "vitest",
50
+ "dev": "vitest"
51
+ },
45
52
  "devDependencies": {
46
53
  "@types/cors": "2.8.19",
47
54
  "@types/express": "5.0.6",
48
55
  "abort-controller": "3.0.0",
49
- "axios": "^1.15.0",
56
+ "axios": "^1.15.2",
50
57
  "camelcase-keys": "^10.0.2",
51
58
  "cors": "2.8.6",
52
- "es-toolkit": "1.45.1",
59
+ "es-toolkit": "1.46.0",
53
60
  "express": "5.2.1",
54
61
  "form-data": "4.0.5",
55
- "tsdown": "0.21.9",
62
+ "tsdown": "0.21.10",
56
63
  "umi-request": "1.4.0",
57
- "vite": "^8.0.8",
58
- "vitest": "4.1.4"
59
- },
60
- "scripts": {
61
- "package": "rm -rf dist && tsdown",
62
- "build": "npm run package",
63
- "prepackage": "rm -rf dist",
64
- "test": "vitest",
65
- "dev": "vitest"
64
+ "vite": "^8.0.10",
65
+ "vitest": "4.1.5"
66
66
  }
67
- }
67
+ }
package/LICENSE DELETED
@@ -1,33 +0,0 @@
1
- ** Mix Space Open Source License**
2
-
3
- This project is dual-licensed under different terms for different parts of the project. It is important for users and contributors to understand the licensing terms applicable to each part of the project.
4
-
5
- ### For the `apps/` Directory
6
-
7
- **License:** GNU Affero General Public License v3.0 (AGPLv3) with Additional Terms (ADDITIONAL_TERMS).
8
-
9
- **Scope:** This license applies exclusively to all files within the `apps/` directory of this project.
10
-
11
- **Summary:**
12
- - The AGPLv3 is a free, copyleft license suitable for software that will be distributed over a network. It allows users to use, modify, and distribute the software and any modifications under the same terms.
13
- - The "Additional Terms" (ADDITIONAL_TERMS) are specific conditions that are added to the AGPLv3 license. These terms must be reviewed in the accompanying LICENSE file or documentation to understand any additional restrictions or permissions that apply to the software.
14
-
15
- ### For Other Parts of the Project
16
-
17
- **License:** MIT License.
18
-
19
- **Scope:** This license applies to all parts of the project that are not included within the `apps/` directory.
20
-
21
- **Summary:**
22
- - The MIT License is a permissive open-source license that allows users considerable freedom. It permits use, copying, modification, merging, publishing, distribution, sublicensing, and/or selling copies of the software.
23
- - It also protects the authors by including a limitation of liability and a disclaimer of warranty.
24
-
25
- **General Conditions:**
26
- - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the above license notices and this permission notice appear in all copies of the software.
27
- - The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement.
28
-
29
- **Contribution:**
30
- - Contributions to this project are accepted under the terms of the same license as the part of the project to which the contribution is made.
31
-
32
- **Notice:**
33
- - This summary is not the license itself and is not a substitute for reading the licenses in their entirety. All users and contributors are encouraged to read the full text of the licenses for a comprehensive understanding.