@ph-cms/client-sdk 0.1.46 → 0.1.47

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @ph-cms/client-sdk 0.1.45
1
+ # @ph-cms/client-sdk 0.1.46
2
2
 
3
3
  PH-CMS 클라이언트 SDK — 브라우저 및 React 애플리케이션을 위한 통합 클라이언트.
4
4
 
@@ -1,4 +1,4 @@
1
- import { ChannelDto, CheckHierarchyQuery } from "@ph-cms/api-contract";
1
+ import { ChannelContentCountsQuery, ChannelContentCountsResponse, ChannelDto, ChannelPublicContentSummaryResponse, CheckHierarchyQuery } from "@ph-cms/api-contract";
2
2
  import { AxiosInstance } from "axios";
3
3
  export declare class ChannelModule {
4
4
  private client;
@@ -11,4 +11,6 @@ export declare class ChannelModule {
11
11
  allowed: boolean;
12
12
  message?: string;
13
13
  }>;
14
+ getManageContentCounts(uid: string, params?: ChannelContentCountsQuery): Promise<ChannelContentCountsResponse>;
15
+ getContentSummary(uid: string): Promise<ChannelPublicContentSummaryResponse>;
14
16
  }
@@ -31,5 +31,21 @@ class ChannelModule {
31
31
  }
32
32
  return this.client.get(`${this.prefix}/contents/check-hierarchy`, { params });
33
33
  }
34
+ async getManageContentCounts(uid, params = {}) {
35
+ if (!uid)
36
+ throw new errors_1.ValidationError("UID is required", []);
37
+ const validation = api_contract_1.ChannelContentCountsQuerySchema.safeParse(params);
38
+ if (!validation.success) {
39
+ throw new errors_1.ValidationError("Invalid channel content counts params", validation.error.errors);
40
+ }
41
+ return this.client.get(`${this.prefix}/channels/${uid}/manage/content-counts`, {
42
+ params: validation.data,
43
+ });
44
+ }
45
+ async getContentSummary(uid) {
46
+ if (!uid)
47
+ throw new errors_1.ValidationError("UID is required", []);
48
+ return this.client.get(`${this.prefix}/channels/${uid}/content-summary`);
49
+ }
34
50
  }
35
51
  exports.ChannelModule = ChannelModule;
package/dist/types.d.ts CHANGED
@@ -6,7 +6,7 @@ export type { FirebaseAuthSyncProps, UseFirebaseAuthSyncOptions, UseFirebaseAuth
6
6
  export type { StampAvailability, CheckStampAvailabilityParams } from './hooks/useStampTour';
7
7
  export type { AnonymousLoginRequest, AuthResponse, FirebaseExchangeRequest, FirebaseRegisterRequest, LoginRequest, RefreshTokenRequest, RegisterRequest, } from '@ph-cms/api-contract';
8
8
  export type { UserDto, UserProfileDto, FollowStatusResponse, FollowUserResponse, ListUserFollowQuery, PagedUserProfileListResponse, } from '@ph-cms/api-contract';
9
- export type { ChannelDto, CheckHierarchyQuery } from '@ph-cms/api-contract';
9
+ export type { ChannelContentCountDto, ChannelContentCountsQuery, ChannelContentCountsResponse, ChannelDto, ChannelPublicContentSummaryResponse, CheckHierarchyQuery, } from '@ph-cms/api-contract';
10
10
  export type { ContentDto, ContentStatDto, ContentMediaDto, ContentStatus, CreateContentRequest, ListContentQuery, PagedContentListResponse, UpdateContentRequest, } from '@ph-cms/api-contract';
11
11
  export type { HierarchySetDto } from '@ph-cms/api-contract';
12
12
  export type { PermissionPolicySetDto } from '@ph-cms/api-contract';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ph-cms/client-sdk",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "description": "Unified PH-CMS Client SDK (React + Core)",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -30,7 +30,7 @@
30
30
  "LICENSE"
31
31
  ],
32
32
  "dependencies": {
33
- "@ph-cms/api-contract": "^0.1.23",
33
+ "@ph-cms/api-contract": "^0.1.24",
34
34
  "@tanstack/react-query": "^5.0.0",
35
35
  "axios": "^1.6.0",
36
36
  "zod": "^3.22.4"