jmash-core-mp 0.1.85 → 0.1.86

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.
@@ -1,4 +1,4 @@
1
- import { CmsSiteKey, CmsSiteList, CmsSiteModel, CmsChannelReq, CmsChannelList, CmsInfoReq, CmsInfoPage, CmsInfoKey, CmsInfoModel, CmsInfoContentReq, CmsInfoContentList, CmsContentInfoReq, CmsContentInfoModel, CmsInfoFileReq, CmsInfoFileList, FrontInteractKey, FrontInteractModel, FrontLikeKey, FrontLikeModel, FrontLikeCreateReq, FrontBrowseRecordCreateReq, FrontBrowseRecordModel, CmsChannelKey, CmsChannelModel, CmsSeatsReq, CmsSeatsList, CmsSeatInfoReq, CmsSeatInfoList } from "./types";
1
+ import { CmsSiteKey, CmsSiteList, CmsSiteModel, CmsChannelReq, CmsChannelList, CmsInfoReq, CmsInfoPage, CmsInfoKey, CmsInfoModel, CmsInfoContentReq, CmsInfoContentList, CmsContentInfoReq, CmsContentInfoModel, CmsInfoFileReq, CmsInfoFileList, FrontInteractKey, FrontInteractModel, FrontLikeKey, FrontLikeModel, FrontLikeCreateReq, FrontBrowseRecordCreateReq, FrontBrowseRecordModel, FrontCommentCreateReq, FrontCommentModel, FrontCommentPage, FrontCommentReq, FrontCollectCreateReq, FrontCollectModel, FrontCollectPage, FrontCollectKey, FrontCollectReq, CmsChannelKey, CmsChannelModel, CmsSeatsReq, CmsSeatsList, CmsSeatInfoReq, CmsSeatInfoList } from "./types";
2
2
  import { ResponseData } from "../../api/types";
3
3
  declare class CmsApiImpl {
4
4
  findCmsSiteList(tenant: string): Promise<ResponseData<CmsSiteList>>;
@@ -14,9 +14,14 @@ declare class CmsApiImpl {
14
14
  findCmsSeatInfoList(data: CmsSeatInfoReq): Promise<ResponseData<CmsSeatInfoList>>;
15
15
  cmsInfoFile(data: CmsInfoFileReq): Promise<ResponseData<CmsInfoFileList>>;
16
16
  cmsInfoInteractId(data: FrontInteractKey): Promise<ResponseData<FrontInteractModel>>;
17
- isLike(data: FrontLikeKey): Promise<ResponseData<string>>;
17
+ isLike(data: FrontLikeKey): Promise<ResponseData<any>>;
18
18
  frontLike(data: FrontLikeCreateReq): Promise<ResponseData<FrontLikeModel>>;
19
19
  createfrontBrowseRecord(data: FrontBrowseRecordCreateReq): Promise<ResponseData<FrontBrowseRecordModel>>;
20
+ findFrontCommentPage(data: FrontCommentReq): Promise<ResponseData<FrontCommentPage>>;
21
+ createFrontComment(data: FrontCommentCreateReq): Promise<ResponseData<FrontCommentModel>>;
22
+ createMyFrontCollect(data: FrontCollectCreateReq): Promise<ResponseData<FrontCollectModel>>;
23
+ deleteMyFrontCollect(data: FrontCollectKey): Promise<ResponseData<FrontCollectModel>>;
24
+ findMyAllCollectPage(data: FrontCollectReq): Promise<ResponseData<FrontCollectPage>>;
20
25
  }
21
26
  declare const cmsApi: CmsApiImpl;
22
27
  export { cmsApi };
@@ -189,6 +189,70 @@ class CmsApiImpl {
189
189
  },
190
190
  });
191
191
  }
192
+ // 查询翻页信息评论表
193
+ findFrontCommentPage(data) {
194
+ if (data) {
195
+ data.hasStatus = data.status !== undefined;
196
+ }
197
+ grpc.clearEmpty(data);
198
+ return mpx.xfetch.fetch({
199
+ url: "/v1/front/front/front_comment/page/" + data.tenant,
200
+ method: "GET",
201
+ data,
202
+ header: {
203
+ "Grpc-Metadata-Tenant": data.tenant,
204
+ },
205
+ });
206
+ }
207
+ // 评论
208
+ createFrontComment(data) {
209
+ return mpx.xfetch.fetch({
210
+ url: "/v1/front/front/front_comment",
211
+ method: "POST",
212
+ data,
213
+ header: {
214
+ "Grpc-Metadata-Tenant": data.tenant,
215
+ },
216
+ });
217
+ }
218
+ // 新增我的收藏
219
+ createMyFrontCollect(data) {
220
+ return mpx.xfetch.fetch({
221
+ url: "/v1/front/front/my_front_collect",
222
+ method: "POST",
223
+ data,
224
+ header: {
225
+ "Grpc-Metadata-Tenant": data.tenant,
226
+ },
227
+ });
228
+ }
229
+ // 取消收藏
230
+ deleteMyFrontCollect(data) {
231
+ grpc.clearEmpty(data);
232
+ return mpx.xfetch.fetch({
233
+ url: "/v1/front/front/my_front_collect/id",
234
+ method: "GET",
235
+ data,
236
+ header: {
237
+ "Grpc-Metadata-Tenant": data.tenant,
238
+ },
239
+ });
240
+ }
241
+ // 查询当前库下我的全部收藏分页
242
+ findMyAllCollectPage(data) {
243
+ if (data) {
244
+ data.hasType = data.type !== undefined;
245
+ }
246
+ grpc.clearEmpty(data);
247
+ return mpx.xfetch.fetch({
248
+ url: "/v1/front/front/my_front_collect_all/page/" + data.tenant,
249
+ method: "GET",
250
+ data,
251
+ header: {
252
+ "Grpc-Metadata-Tenant": data.tenant,
253
+ },
254
+ });
255
+ }
192
256
  }
193
257
  const cmsApi = new CmsApiImpl();
194
258
  export { cmsApi };
@@ -240,7 +240,6 @@ export interface FrontLikeKey {
240
240
  }
241
241
  export interface FrontLikeCreateReq {
242
242
  tenant: string;
243
- requestId?: string;
244
243
  likeType?: string;
245
244
  relationId?: string;
246
245
  action?: boolean;
@@ -250,10 +249,111 @@ export interface FrontLikeModel {
250
249
  }
251
250
  export interface FrontBrowseRecordCreateReq {
252
251
  tenant?: string;
253
- requestId?: string;
254
252
  type?: string;
255
253
  relationId?: string;
256
254
  }
257
255
  export interface FrontBrowseRecordModel {
258
256
  browseId?: string;
259
257
  }
258
+ export interface FrontCommentCreateReq {
259
+ tenant: string;
260
+ requestId?: string;
261
+ validateOnly?: boolean;
262
+ infoId: string;
263
+ content: string;
264
+ parentId?: string;
265
+ replyCommentId?: string;
266
+ organId?: string;
267
+ }
268
+ export interface FrontCommentModel {
269
+ commentId?: string;
270
+ infoId?: string;
271
+ content?: string;
272
+ parentId?: string;
273
+ replyUserId?: string;
274
+ replyCommentId?: string;
275
+ likeCount?: number;
276
+ replyCount?: number;
277
+ orderBy?: string;
278
+ realIp?: string;
279
+ status?: boolean;
280
+ createTime?: string;
281
+ createBy?: string;
282
+ }
283
+ export interface FrontCommentModelTotal {
284
+ totalSize?: number;
285
+ }
286
+ export interface FrontCommentPage {
287
+ results: Array<FrontCommentModel>;
288
+ curPage?: number;
289
+ pageSize?: number;
290
+ totalSize?: number;
291
+ subTotalDto?: FrontCommentModelTotal;
292
+ totalDto?: FrontCommentModelTotal;
293
+ }
294
+ export interface FrontCommentReq {
295
+ tenant: string;
296
+ curPage?: number;
297
+ pageSize?: number;
298
+ orderName?: string;
299
+ orderAsc?: boolean;
300
+ createBy?: string;
301
+ infoId?: string;
302
+ hasParentId?: boolean;
303
+ parentId?: string;
304
+ hasStatus?: boolean;
305
+ status?: boolean;
306
+ likeContent?: string;
307
+ replyCommentId?: string;
308
+ hasMyPending?: boolean;
309
+ }
310
+ export interface FrontCollectCreateReq {
311
+ tenant: string;
312
+ type?: string;
313
+ relationId?: string;
314
+ relationName?: string;
315
+ coverUrl?: string;
316
+ appId?: string;
317
+ linkUrl?: string;
318
+ organId?: string;
319
+ }
320
+ export interface FrontCollectModel {
321
+ collectId?: string;
322
+ type?: string;
323
+ relationId?: string;
324
+ relationName?: string;
325
+ coverUrl?: string;
326
+ appId?: string;
327
+ linkUrl?: string;
328
+ createTime?: string;
329
+ createBy?: string;
330
+ tenant?: string;
331
+ }
332
+ export interface FrontCollectModelTotal {
333
+ totalSize?: number;
334
+ }
335
+ export interface FrontCollectPage {
336
+ results: Array<FrontCollectModel>;
337
+ curPage?: number;
338
+ pageSize?: number;
339
+ totalSize?: number;
340
+ subTotalDto?: FrontCollectModelTotal;
341
+ totalDto?: FrontCollectModelTotal;
342
+ }
343
+ export interface FrontCollectKey {
344
+ tenant?: string;
345
+ collectId?: string;
346
+ organId?: string;
347
+ }
348
+ export interface FrontCollectReq {
349
+ tenant: string;
350
+ curPage?: number;
351
+ pageSize?: number;
352
+ orderName?: string;
353
+ orderAsc?: boolean;
354
+ hasType?: boolean;
355
+ type?: string;
356
+ relationId?: string;
357
+ createBy?: string;
358
+ relationName?: string;
359
+ }
package/lib/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export type { AppConfig, ResponseData, ValidateData, EventBase, EventTarget, CanvasResponse, } from "./api/types";
2
2
  export type { LoginReq, LoginRes, RolesPerms, WebLoginReq, TokenModel, PhoneRegisterReq, PhoneReplaceReq, UpdateUserReq, UserInfoReq, UserInfo, GzhSubscribeCheckReq, } from "./api/auth/types";
3
- export type { CmsSiteList, CmsChannelReq, CmsChannelList, CmsContentInfoReq, CmsContentInfoModel, CmsInfoModel, CmsInfoContentModel, CmsChannelModel, CmsSeatsReq, CmsSeatsList, CmsSeatsModel, CmsSeatInfoReq, CmsSeatInfoList, CmsSeatInfoModel, } from "./api/cms/types";
3
+ export type { CmsSiteList, CmsChannelReq, CmsChannelList, CmsContentInfoReq, CmsContentInfoModel, CmsInfoModel, CmsInfoContentModel, CmsChannelModel, CmsSeatsReq, CmsSeatsList, CmsSeatsModel, CmsSeatInfoReq, CmsSeatInfoList, CmsSeatInfoModel, FrontInteractModel, FrontCommentCreateReq, FrontCommentModel, FrontCommentPage, FrontCommentReq, FrontCollectCreateReq, FrontCollectModel, FrontCollectPage, FrontCollectKey, FrontCollectReq, } from "./api/cms/types";
4
4
  export type { Entry, DictEntryModel, DictEntryLayModel, } from "./api/dict/types";
5
5
  export { EntryDict, EnumDict, EntryLayDict, CustomBizDict } from "./api/dicts";
6
6
  export type { FileInfo, FileBase64Req, FileDownInfo, FileWebReq, } from "./api/files/types";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jmash-core-mp",
3
- "version": "0.1.85",
3
+ "version": "0.1.86",
4
4
  "private": false,
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -21,6 +21,15 @@ import {
21
21
  FrontLikeCreateReq,
22
22
  FrontBrowseRecordCreateReq,
23
23
  FrontBrowseRecordModel,
24
+ FrontCommentCreateReq,
25
+ FrontCommentModel,
26
+ FrontCommentPage,
27
+ FrontCommentReq,
28
+ FrontCollectCreateReq,
29
+ FrontCollectModel,
30
+ FrontCollectPage,
31
+ FrontCollectKey,
32
+ FrontCollectReq,
24
33
  CmsChannelKey,
25
34
  CmsChannelModel,
26
35
  CmsSeatsReq,
@@ -214,7 +223,7 @@ class CmsApiImpl {
214
223
  }
215
224
 
216
225
  // 查看是否点赞
217
- isLike(data: FrontLikeKey): Promise<ResponseData<string>> {
226
+ isLike(data: FrontLikeKey): Promise<ResponseData<any>> {
218
227
  return mpx.xfetch.fetch({
219
228
  url:
220
229
  "/v1/front/front/front_like/is_like/" +
@@ -253,6 +262,85 @@ class CmsApiImpl {
253
262
  },
254
263
  });
255
264
  }
265
+
266
+ // 查询翻页信息评论表
267
+ findFrontCommentPage(
268
+ data: FrontCommentReq,
269
+ ): Promise<ResponseData<FrontCommentPage>> {
270
+ if (data) {
271
+ data.hasStatus = data.status !== undefined;
272
+ }
273
+ grpc.clearEmpty(data);
274
+ return mpx.xfetch.fetch({
275
+ url: "/v1/front/front/front_comment/page/" + data.tenant,
276
+ method: "GET",
277
+ data,
278
+ header: {
279
+ "Grpc-Metadata-Tenant": data.tenant,
280
+ },
281
+ });
282
+ }
283
+
284
+ // 评论
285
+ createFrontComment(
286
+ data: FrontCommentCreateReq,
287
+ ): Promise<ResponseData<FrontCommentModel>> {
288
+ return mpx.xfetch.fetch({
289
+ url: "/v1/front/front/front_comment",
290
+ method: "POST",
291
+ data,
292
+ header: {
293
+ "Grpc-Metadata-Tenant": data.tenant,
294
+ },
295
+ });
296
+ }
297
+
298
+ // 新增我的收藏
299
+ createMyFrontCollect(
300
+ data: FrontCollectCreateReq,
301
+ ): Promise<ResponseData<FrontCollectModel>> {
302
+ return mpx.xfetch.fetch({
303
+ url: "/v1/front/front/my_front_collect",
304
+ method: "POST",
305
+ data,
306
+ header: {
307
+ "Grpc-Metadata-Tenant": data.tenant,
308
+ },
309
+ });
310
+ }
311
+
312
+ // 取消收藏
313
+ deleteMyFrontCollect(
314
+ data: FrontCollectKey,
315
+ ): Promise<ResponseData<FrontCollectModel>> {
316
+ grpc.clearEmpty(data);
317
+ return mpx.xfetch.fetch({
318
+ url: "/v1/front/front/my_front_collect/id",
319
+ method: "GET",
320
+ data,
321
+ header: {
322
+ "Grpc-Metadata-Tenant": data.tenant,
323
+ },
324
+ });
325
+ }
326
+
327
+ // 查询当前库下我的全部收藏分页
328
+ findMyAllCollectPage(
329
+ data: FrontCollectReq,
330
+ ): Promise<ResponseData<FrontCollectPage>> {
331
+ if (data) {
332
+ data.hasType = data.type !== undefined;
333
+ }
334
+ grpc.clearEmpty(data);
335
+ return mpx.xfetch.fetch({
336
+ url: "/v1/front/front/my_front_collect_all/page/" + data.tenant,
337
+ method: "GET",
338
+ data,
339
+ header: {
340
+ "Grpc-Metadata-Tenant": data.tenant,
341
+ },
342
+ });
343
+ }
256
344
  }
257
345
 
258
346
  const cmsApi = new CmsApiImpl();
@@ -465,8 +465,6 @@ export interface FrontLikeKey {
465
465
  export interface FrontLikeCreateReq {
466
466
  // 租户
467
467
  tenant: string;
468
- // 用于检测重复请求的唯一字符串ID
469
- requestId?: string;
470
468
  // 点赞类型
471
469
  likeType?: string;
472
470
  // 关系ID
@@ -483,8 +481,6 @@ export interface FrontLikeModel {
483
481
  export interface FrontBrowseRecordCreateReq {
484
482
  // 租户
485
483
  tenant?: string;
486
- // 用于检测重复请求的唯一字符串ID
487
- requestId?: string;
488
484
  // 类型
489
485
  type?: string;
490
486
  // 关系ID
@@ -495,3 +491,198 @@ export interface FrontBrowseRecordModel {
495
491
  // 浏览ID
496
492
  browseId?: string;
497
493
  }
494
+
495
+ // 评论表新增
496
+ export interface FrontCommentCreateReq {
497
+ // 租户
498
+ tenant: string;
499
+ // 用于检测重复请求的唯一字符串ID
500
+ requestId?: string;
501
+ // 如果为true,则表示给定的请求仅需要被检验,而不是被执行
502
+ validateOnly?: boolean;
503
+ // 信息id
504
+ infoId: string;
505
+ // 评论内容
506
+ content: string;
507
+ // 父ID (0:一级评论;其它为一级评论的ID)
508
+ parentId?: string;
509
+ // 回复评论的ID
510
+ replyCommentId?: string;
511
+ // 组织ID
512
+ organId?: string;
513
+ }
514
+ // 评论表实体
515
+ export interface FrontCommentModel {
516
+ // 主键ID
517
+ commentId?: string;
518
+ // 信息id
519
+ infoId?: string;
520
+ // 评论内容
521
+ content?: string;
522
+ // 父ID (0:一级评论;其它为一级评论的ID)
523
+ parentId?: string;
524
+ // 回复用户ID
525
+ replyUserId?: string;
526
+ // 回复评论的ID
527
+ replyCommentId?: string;
528
+ // 点赞数
529
+ likeCount?: number;
530
+ // 回复数
531
+ replyCount?: number;
532
+ // 排序结果=(点赞数+回复数)
533
+ orderBy?: string;
534
+ // 用户IP地址
535
+ realIp?: string;
536
+ // 审批状态
537
+ status?: boolean;
538
+ // 创建时间
539
+ createTime?: string;
540
+ // 创建者
541
+ createBy?: string;
542
+ }
543
+ // 评论表合计
544
+ export interface FrontCommentModelTotal {
545
+ // 总记录数
546
+ totalSize?: number;
547
+ }
548
+ // 评论表分页
549
+ export interface FrontCommentPage {
550
+ // 当前页内容
551
+ results: Array<FrontCommentModel>;
552
+ // 当前页码
553
+ curPage?: number;
554
+ // 页尺寸
555
+ pageSize?: number;
556
+ // 总记录数
557
+ totalSize?: number;
558
+ // 本页小计
559
+ subTotalDto?: FrontCommentModelTotal;
560
+ // 合计
561
+ totalDto?: FrontCommentModelTotal;
562
+ }
563
+ // 查询翻页信息评论表
564
+ export interface FrontCommentReq {
565
+ // 租户
566
+ tenant: string;
567
+ // 当前页码
568
+ curPage?: number;
569
+ // 页尺寸
570
+ pageSize?: number;
571
+ // 排序名称
572
+ orderName?: string;
573
+ // 是否升序排序
574
+ orderAsc?: boolean;
575
+ // 创建人
576
+ createBy?: string;
577
+ // 信息id
578
+ infoId?: string;
579
+ // 是否包含父ID
580
+ hasParentId?: boolean;
581
+ // 父ID (0:一级评论;其它为一级评论的ID)
582
+ parentId?: string;
583
+ // 是否包含审核状态
584
+ hasStatus?: boolean;
585
+ // 审批状态
586
+ status?: boolean;
587
+ // 评论内容
588
+ likeContent?: string;
589
+ // 回复评论id
590
+ replyCommentId?: string;
591
+ // 是否查询我的待审核
592
+ hasMyPending?: boolean;
593
+ }
594
+
595
+ // 收藏表新增
596
+ export interface FrontCollectCreateReq {
597
+ // 租户
598
+ tenant: string;
599
+ // 收藏类型
600
+ type?: string;
601
+ // 关系id
602
+ relationId?: string;
603
+ // 关系标题
604
+ relationName?: string;
605
+ // 快照-缩略图地址
606
+ coverUrl?: string;
607
+ // 小程序id
608
+ appId?: string;
609
+ // 快照-详情页跳转链接
610
+ linkUrl?: string;
611
+ // 组织ID
612
+ organId?: string;
613
+ }
614
+ // 收藏表实体
615
+ export interface FrontCollectModel {
616
+ // 收藏id
617
+ collectId?: string;
618
+ // 类型
619
+ type?: string;
620
+ // 关系id
621
+ relationId?: string;
622
+ // 关系标题
623
+ relationName?: string;
624
+ // 快照-缩略图地址
625
+ coverUrl?: string;
626
+ // 小程序id
627
+ appId?: string;
628
+ // 快照-详情页跳转链接
629
+ linkUrl?: string;
630
+ // 创建时间
631
+ createTime?: string;
632
+ // 创建者
633
+ createBy?: string;
634
+ // 租户
635
+ tenant?: string;
636
+ }
637
+ // 收藏表合计
638
+ export interface FrontCollectModelTotal {
639
+ // 总记录数
640
+ totalSize?: number;
641
+ }
642
+ // 收藏表分页
643
+ export interface FrontCollectPage {
644
+ // 当前页内容
645
+ results: Array<FrontCollectModel>;
646
+ // 当前页码
647
+ curPage?: number;
648
+ // 页尺寸
649
+ pageSize?: number;
650
+ // 总记录数
651
+ totalSize?: number;
652
+ // 本页小计
653
+ subTotalDto?: FrontCollectModelTotal;
654
+ // 合计
655
+ totalDto?: FrontCollectModelTotal;
656
+ }
657
+ // 收藏表主键
658
+ export interface FrontCollectKey {
659
+ // 租户
660
+ tenant?: string;
661
+ // 收藏id
662
+ collectId?: string;
663
+ // 组织ID
664
+ organId?: string;
665
+ }
666
+ // 查询我的收藏分页
667
+ export interface FrontCollectReq {
668
+ // 租户
669
+ tenant: string;
670
+ // 当前页码
671
+ curPage?: number;
672
+ // 页尺寸
673
+ pageSize?: number;
674
+ // 排序名称
675
+ orderName?: string;
676
+ // 是否升序排序
677
+ orderAsc?: boolean;
678
+ // 是否有收藏类型
679
+ hasType?: boolean;
680
+ // 收藏类型
681
+ type?: string;
682
+ // 关系id
683
+ relationId?: string;
684
+ // 创建者
685
+ createBy?: string;
686
+ // 关系标题(模糊查询)
687
+ relationName?: string;
688
+ }
package/src/index.ts CHANGED
@@ -34,6 +34,16 @@ export type {
34
34
  CmsSeatInfoReq,
35
35
  CmsSeatInfoList,
36
36
  CmsSeatInfoModel,
37
+ FrontInteractModel,
38
+ FrontCommentCreateReq,
39
+ FrontCommentModel,
40
+ FrontCommentPage,
41
+ FrontCommentReq,
42
+ FrontCollectCreateReq,
43
+ FrontCollectModel,
44
+ FrontCollectPage,
45
+ FrontCollectKey,
46
+ FrontCollectReq,
37
47
  } from "./api/cms/types";
38
48
  export type {
39
49
  Entry,