@rezamirzapour/pod-sdk 1.0.2 → 1.0.4
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 +266 -205
- package/dist/index.d.mts +849 -51
- package/dist/index.d.ts +849 -51
- package/dist/index.js +1295 -68
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1294 -69
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RetryConfig, RequestOptions } from '@rezamirzapour/http';
|
|
1
|
+
import { RetryConfig, RequestOptions, NextHttp } from '@rezamirzapour/http';
|
|
2
2
|
import { ILogger } from '@rezamirzapour/logger';
|
|
3
3
|
|
|
4
4
|
interface HandshakeResponse {
|
|
@@ -585,13 +585,14 @@ interface GetContentByEntityIdParams {
|
|
|
585
585
|
interface Business {
|
|
586
586
|
id: number;
|
|
587
587
|
name: string;
|
|
588
|
-
image
|
|
589
|
-
numOfProducts
|
|
590
|
-
rate
|
|
588
|
+
image?: string;
|
|
589
|
+
numOfProducts?: number;
|
|
590
|
+
rate?: {
|
|
591
591
|
rate: number;
|
|
592
592
|
rateCount: number;
|
|
593
593
|
};
|
|
594
|
-
ssoId
|
|
594
|
+
ssoId?: string | number;
|
|
595
|
+
[key: string]: any;
|
|
595
596
|
}
|
|
596
597
|
interface Rate {
|
|
597
598
|
rate: number;
|
|
@@ -606,14 +607,20 @@ interface UserPostInfo {
|
|
|
606
607
|
interface SeoType {
|
|
607
608
|
keyword?: string[];
|
|
608
609
|
description?: string;
|
|
610
|
+
[key: string]: any;
|
|
609
611
|
}
|
|
610
612
|
type MetaContent = {
|
|
611
613
|
code: number | string;
|
|
612
614
|
name: string;
|
|
613
|
-
primary
|
|
614
|
-
order
|
|
615
|
-
uiType
|
|
615
|
+
primary?: boolean;
|
|
616
|
+
order?: number;
|
|
617
|
+
uiType?: string;
|
|
616
618
|
valueTitles?: string;
|
|
619
|
+
icon?: string;
|
|
620
|
+
iconType?: string;
|
|
621
|
+
common?: boolean;
|
|
622
|
+
group?: any;
|
|
623
|
+
templateFieldCode?: string;
|
|
617
624
|
} & ({
|
|
618
625
|
value: string;
|
|
619
626
|
type: 'STRING_VALUE_TYPE';
|
|
@@ -630,28 +637,66 @@ type MetaContent = {
|
|
|
630
637
|
value: any;
|
|
631
638
|
type: string;
|
|
632
639
|
});
|
|
640
|
+
interface TagTreeMetadata {
|
|
641
|
+
icon?: string;
|
|
642
|
+
related_contents?: {
|
|
643
|
+
id: number;
|
|
644
|
+
}[];
|
|
645
|
+
longDescription?: string;
|
|
646
|
+
description?: string;
|
|
647
|
+
content?: string;
|
|
648
|
+
link?: string;
|
|
649
|
+
target?: string;
|
|
650
|
+
preview?: string;
|
|
651
|
+
displayName?: string;
|
|
652
|
+
englishName?: string;
|
|
653
|
+
created?: any[];
|
|
654
|
+
updated?: any[];
|
|
655
|
+
published?: any[];
|
|
656
|
+
unpublished?: any[];
|
|
657
|
+
parentModifier?: any[];
|
|
658
|
+
codeModifier?: any[];
|
|
659
|
+
enabled?: any[];
|
|
660
|
+
disabled?: any[];
|
|
661
|
+
[key: string]: any;
|
|
662
|
+
}
|
|
633
663
|
interface TagtreesType {
|
|
634
664
|
id: number;
|
|
635
665
|
name: string;
|
|
636
666
|
code: string;
|
|
637
667
|
categoryName?: string;
|
|
638
668
|
siblingOrder?: number;
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
669
|
+
level?: number;
|
|
670
|
+
parent?: number;
|
|
671
|
+
orderInSiblings?: number;
|
|
672
|
+
enable?: boolean;
|
|
673
|
+
creationDate?: number;
|
|
674
|
+
category?: {
|
|
675
|
+
id: number;
|
|
676
|
+
name: string;
|
|
677
|
+
businessSoftSrv?: any;
|
|
678
|
+
creationDate?: number;
|
|
679
|
+
enable?: boolean;
|
|
646
680
|
[key: string]: any;
|
|
647
681
|
};
|
|
682
|
+
metadata?: TagTreeMetadata;
|
|
683
|
+
[key: string]: any;
|
|
648
684
|
}
|
|
649
685
|
interface CmsMetadata {
|
|
650
|
-
content_type_id
|
|
651
|
-
|
|
686
|
+
content_type_id?: string;
|
|
687
|
+
content_type_name?: string;
|
|
688
|
+
content_type_description?: string;
|
|
689
|
+
content?: MetaContent[];
|
|
690
|
+
product_type_id?: string;
|
|
691
|
+
product_type_name?: string;
|
|
692
|
+
product_type_description?: string;
|
|
693
|
+
product?: MetaContent[];
|
|
652
694
|
content_related?: any[];
|
|
653
695
|
product_related?: any[];
|
|
696
|
+
contentRelatedQuery?: any[];
|
|
697
|
+
productRelatedQuery?: any[];
|
|
654
698
|
seo?: SeoType;
|
|
699
|
+
businessId?: number;
|
|
655
700
|
created?: {
|
|
656
701
|
at: number;
|
|
657
702
|
user_name: string;
|
|
@@ -662,8 +707,10 @@ interface CmsMetadata {
|
|
|
662
707
|
user_name: string;
|
|
663
708
|
ssoId: number;
|
|
664
709
|
};
|
|
665
|
-
|
|
666
|
-
|
|
710
|
+
editable?: any;
|
|
711
|
+
published?: any;
|
|
712
|
+
publishDate?: string;
|
|
713
|
+
unpublishDate?: string;
|
|
667
714
|
[key: string]: any;
|
|
668
715
|
}
|
|
669
716
|
interface ResultItem {
|
|
@@ -705,7 +752,7 @@ interface FormattedSubject extends Subject {
|
|
|
705
752
|
formatted: Record<string | number, any>;
|
|
706
753
|
__normalized: Record<string | number, any>;
|
|
707
754
|
}
|
|
708
|
-
interface ResultItemWithFormatted<T extends Record<string, any>, P = {}> extends ResultItem {
|
|
755
|
+
interface ResultItemWithFormatted<T extends Record<string, any> = Record<string, any>, P = {}> extends ResultItem {
|
|
709
756
|
formatted: T;
|
|
710
757
|
__normalized: P;
|
|
711
758
|
}
|
|
@@ -745,46 +792,634 @@ interface TimelineSearchBody {
|
|
|
745
792
|
logicalOperator?: string;
|
|
746
793
|
operands?: TimelineSearchBody['advance'][];
|
|
747
794
|
};
|
|
795
|
+
query?: string;
|
|
748
796
|
size?: number;
|
|
749
797
|
offset?: number;
|
|
798
|
+
fromDate?: string;
|
|
799
|
+
toDate?: string;
|
|
800
|
+
sortBy?: string[];
|
|
801
|
+
enable?: boolean;
|
|
802
|
+
dealerIds?: number[];
|
|
803
|
+
language?: string;
|
|
804
|
+
showDetail?: boolean;
|
|
805
|
+
newVersion?: boolean;
|
|
806
|
+
excludedFields?: string[];
|
|
750
807
|
[key: string]: any;
|
|
751
808
|
}
|
|
752
809
|
interface TimelineResponse extends Omit<GetContentResponse, 'result'> {
|
|
753
810
|
result: any[];
|
|
754
811
|
}
|
|
812
|
+
interface ContentBody {
|
|
813
|
+
name: string;
|
|
814
|
+
metaDescription?: string;
|
|
815
|
+
keyword?: string[];
|
|
816
|
+
contentDescription?: string;
|
|
817
|
+
tags?: string[];
|
|
818
|
+
tagTrees?: (number | string)[];
|
|
819
|
+
fieldCode?: string[];
|
|
820
|
+
fieldValue?: any[];
|
|
821
|
+
canRate?: boolean;
|
|
822
|
+
canLike?: boolean;
|
|
823
|
+
canComment?: boolean;
|
|
824
|
+
enable?: boolean;
|
|
825
|
+
isSearchable?: boolean;
|
|
826
|
+
publishDate?: string;
|
|
827
|
+
unpublishDate?: string;
|
|
828
|
+
[key: string]: any;
|
|
829
|
+
}
|
|
755
830
|
interface AddContentParams {
|
|
756
831
|
contentTypeUniqueId: string;
|
|
757
|
-
body:
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
tagTrees?: string[];
|
|
764
|
-
fieldCode?: string[];
|
|
765
|
-
fieldValue?: any[];
|
|
766
|
-
canRate?: boolean;
|
|
767
|
-
canLike?: boolean;
|
|
768
|
-
canComment?: boolean;
|
|
769
|
-
enable?: boolean;
|
|
770
|
-
isSearchable?: boolean;
|
|
771
|
-
[key: string]: any;
|
|
772
|
-
};
|
|
832
|
+
body: ContentBody;
|
|
833
|
+
}
|
|
834
|
+
interface EditContentParams {
|
|
835
|
+
contentTypeUniqueId: string;
|
|
836
|
+
entityId: number | string;
|
|
837
|
+
body: Partial<ContentBody>;
|
|
773
838
|
}
|
|
774
|
-
interface
|
|
775
|
-
|
|
839
|
+
interface BatchPublishParams {
|
|
840
|
+
entityIds: (number | string)[];
|
|
841
|
+
contentTypeUniqueId?: string;
|
|
842
|
+
}
|
|
843
|
+
interface BatchUnpublishParams {
|
|
844
|
+
entityIds: (number | string)[];
|
|
845
|
+
contentTypeUniqueId?: string;
|
|
846
|
+
}
|
|
847
|
+
interface ArchiveParams {
|
|
848
|
+
entityIds: (number | string)[];
|
|
849
|
+
contentTypeUniqueId?: string;
|
|
850
|
+
}
|
|
851
|
+
interface GetCommentsParams {
|
|
852
|
+
offset?: number;
|
|
853
|
+
size?: number;
|
|
854
|
+
firstId?: number;
|
|
855
|
+
lastId?: number;
|
|
856
|
+
[key: string]: any;
|
|
857
|
+
}
|
|
858
|
+
interface GetReactionsParams {
|
|
859
|
+
offset?: number;
|
|
860
|
+
size?: number;
|
|
861
|
+
[key: string]: any;
|
|
862
|
+
}
|
|
863
|
+
interface GetProductParams {
|
|
864
|
+
offset?: number;
|
|
865
|
+
size?: number;
|
|
866
|
+
excludeItems?: (string | number)[];
|
|
867
|
+
productTypeUniqueId?: string;
|
|
868
|
+
productTypeUniqueIds?: string[];
|
|
869
|
+
productUniqueId?: string;
|
|
870
|
+
businessId?: number;
|
|
871
|
+
entityIds?: (string | number)[];
|
|
872
|
+
entityId?: number;
|
|
873
|
+
postIds?: number[];
|
|
874
|
+
notPostIds?: number[];
|
|
875
|
+
fieldCode?: string[];
|
|
876
|
+
fieldValue?: (string | number)[];
|
|
877
|
+
operationFields?: string;
|
|
878
|
+
operationValues?: string;
|
|
879
|
+
operationValuesArray?: string[];
|
|
880
|
+
excludeFieldCode?: string[];
|
|
881
|
+
excludeFieldValue?: string[];
|
|
882
|
+
operationExcludeValues?: string;
|
|
883
|
+
operationExcludeValuesArray?: string;
|
|
884
|
+
relatedContentId?: number[];
|
|
885
|
+
operationRelatedContentId?: string;
|
|
886
|
+
relatedProductId?: number[];
|
|
887
|
+
operationRelatedProductId?: string;
|
|
888
|
+
metaQuery?: string;
|
|
889
|
+
tags?: string[];
|
|
890
|
+
operationTags?: string;
|
|
891
|
+
operationValueTags?: string[];
|
|
892
|
+
excludeTags?: string[];
|
|
893
|
+
operationExcludeTags?: string;
|
|
894
|
+
operationExcludeValueTags?: string;
|
|
895
|
+
orderTagTree?: string;
|
|
896
|
+
tagTrees?: (string | number)[];
|
|
897
|
+
operationValueTagTrees?: string;
|
|
898
|
+
operationTagTrees?: 'and' | 'or';
|
|
899
|
+
orderTagTreeCode?: string;
|
|
900
|
+
tagTreesCode?: string[];
|
|
901
|
+
operationTagTreesCode?: string;
|
|
902
|
+
operationValueTagTreesCode?: string;
|
|
903
|
+
name?: string;
|
|
904
|
+
operationName?: string;
|
|
905
|
+
creatorId?: number;
|
|
906
|
+
updaterId?: number;
|
|
907
|
+
publisherId?: number;
|
|
908
|
+
unpublisherId?: number;
|
|
909
|
+
fromCreateDate?: string;
|
|
910
|
+
toCreateDate?: string;
|
|
911
|
+
fromUpdateDate?: string;
|
|
912
|
+
toUpdateDate?: string;
|
|
913
|
+
fromPublisheDate?: string;
|
|
914
|
+
toPublisheDate?: string;
|
|
915
|
+
fromUnpublishDate?: string;
|
|
916
|
+
toUnpublishDate?: string;
|
|
917
|
+
fromPrice?: number;
|
|
918
|
+
toPrice?: number;
|
|
919
|
+
fromDiscount?: number;
|
|
920
|
+
toDiscount?: number;
|
|
921
|
+
description?: string;
|
|
922
|
+
tagTreesCategory?: string[];
|
|
923
|
+
orderBy?: string[];
|
|
924
|
+
follow?: boolean;
|
|
925
|
+
activityInfo?: boolean;
|
|
926
|
+
showDetail?: boolean;
|
|
927
|
+
changeRelatedContentSchema?: boolean;
|
|
928
|
+
lat?: number;
|
|
929
|
+
lng?: number;
|
|
930
|
+
distance?: number;
|
|
931
|
+
keywords?: string[];
|
|
932
|
+
isSearchable?: boolean;
|
|
933
|
+
uniqueId?: string;
|
|
934
|
+
barcode?: string;
|
|
935
|
+
showProviderDetail?: boolean;
|
|
936
|
+
showTagTreesDetail?: boolean;
|
|
937
|
+
[key: string]: any;
|
|
938
|
+
}
|
|
939
|
+
interface ProductBody {
|
|
940
|
+
name: string;
|
|
941
|
+
enable?: boolean;
|
|
942
|
+
metaDescription?: string;
|
|
943
|
+
keyword?: string[];
|
|
944
|
+
productDescription?: string;
|
|
945
|
+
isSearchable?: boolean;
|
|
946
|
+
tags?: string[];
|
|
947
|
+
tagTrees?: (number | string)[];
|
|
948
|
+
fieldCode?: string[];
|
|
949
|
+
fieldValue?: any[];
|
|
950
|
+
canRate?: boolean;
|
|
951
|
+
canLike?: boolean;
|
|
952
|
+
canComment?: boolean;
|
|
953
|
+
publishDate?: string;
|
|
954
|
+
unpublishDate?: string;
|
|
955
|
+
showFileMetadataDetail?: boolean;
|
|
956
|
+
showProviderDetail?: boolean;
|
|
957
|
+
showTagTreesDetail?: boolean;
|
|
958
|
+
[key: string]: any;
|
|
959
|
+
}
|
|
960
|
+
interface AddProductParams {
|
|
961
|
+
productTypeUniqueId: string;
|
|
962
|
+
body: ProductBody;
|
|
963
|
+
}
|
|
964
|
+
interface EditProductParams {
|
|
965
|
+
productTypeUniqueId: string;
|
|
966
|
+
entityId: number | string;
|
|
967
|
+
body: Partial<ProductBody>;
|
|
968
|
+
}
|
|
969
|
+
interface GetProductByEntityIdParams {
|
|
970
|
+
entityId: number | string;
|
|
971
|
+
productTypeUniqueId?: string;
|
|
972
|
+
}
|
|
973
|
+
interface ProductItem {
|
|
974
|
+
id: number;
|
|
975
|
+
version?: number;
|
|
976
|
+
timelineId?: number;
|
|
977
|
+
entityId: number;
|
|
978
|
+
forwardedId?: number;
|
|
979
|
+
numOfLikes?: number;
|
|
980
|
+
numOfDisLikes?: number;
|
|
981
|
+
numOfShare?: number;
|
|
982
|
+
numOfFavorites?: number;
|
|
983
|
+
numOfComments?: number;
|
|
984
|
+
timestamp?: number;
|
|
985
|
+
enable?: boolean;
|
|
986
|
+
hide?: boolean;
|
|
987
|
+
replyPostConfirmation?: boolean;
|
|
988
|
+
business?: Business;
|
|
989
|
+
userSrv?: any;
|
|
990
|
+
rate?: Rate;
|
|
991
|
+
userPostInfo?: UserPostInfo;
|
|
992
|
+
metadata: CmsMetadata;
|
|
993
|
+
latitude?: number;
|
|
994
|
+
longitude?: number;
|
|
995
|
+
uniqueId?: string;
|
|
996
|
+
canComment?: boolean;
|
|
997
|
+
canLike?: boolean;
|
|
998
|
+
canRate?: boolean;
|
|
999
|
+
tags?: string[];
|
|
1000
|
+
tagTrees?: TagtreesType[];
|
|
1001
|
+
name?: string;
|
|
1002
|
+
description?: string;
|
|
1003
|
+
categoryList?: any[];
|
|
1004
|
+
preview?: any;
|
|
1005
|
+
unlimited?: boolean;
|
|
1006
|
+
availableCount?: number;
|
|
1007
|
+
price?: number;
|
|
1008
|
+
discount?: number;
|
|
1009
|
+
saleInfo?: any;
|
|
1010
|
+
guild?: any;
|
|
1011
|
+
allowUserInvoice?: boolean;
|
|
1012
|
+
allowUserPrice?: boolean;
|
|
1013
|
+
subProducts?: any[];
|
|
1014
|
+
productGroup?: any;
|
|
1015
|
+
content?: any;
|
|
1016
|
+
currency?: any;
|
|
1017
|
+
parentProduct?: any;
|
|
1018
|
+
relatedProductsId?: any[];
|
|
1019
|
+
preferredTaxRate?: number;
|
|
1020
|
+
[key: string]: any;
|
|
1021
|
+
}
|
|
1022
|
+
interface ProductItemWithFormatted<T extends Record<string, any> = Record<string, any>, P = {}> extends ProductItem {
|
|
1023
|
+
formatted: T;
|
|
1024
|
+
__normalized: P;
|
|
1025
|
+
}
|
|
1026
|
+
interface FormattedProductSubject extends ProductItem {
|
|
1027
|
+
formatted: Record<string | number, any>;
|
|
1028
|
+
__normalized: Record<string | number, any>;
|
|
1029
|
+
}
|
|
1030
|
+
interface GetProductResponse {
|
|
1031
|
+
referenceNumber?: string;
|
|
1032
|
+
hasError: boolean;
|
|
1033
|
+
errorCode?: number;
|
|
1034
|
+
refId?: string;
|
|
1035
|
+
message?: string | any[];
|
|
1036
|
+
count?: number;
|
|
1037
|
+
aggregations?: number;
|
|
1038
|
+
result: ProductItem[];
|
|
1039
|
+
metadata?: any[];
|
|
1040
|
+
[key: string]: any;
|
|
1041
|
+
}
|
|
1042
|
+
interface FormattedGetProductResponse<T extends Record<string, any> = Record<string, any>, P = {}> extends Omit<GetProductResponse, 'result'> {
|
|
1043
|
+
result: ProductItemWithFormatted<T, P>[];
|
|
1044
|
+
}
|
|
1045
|
+
interface BatchPublishProductParams {
|
|
1046
|
+
entityIds: (number | string)[];
|
|
1047
|
+
productTypeUniqueId?: string;
|
|
1048
|
+
}
|
|
1049
|
+
interface BatchUnpublishProductParams {
|
|
1050
|
+
entityIds: (number | string)[];
|
|
1051
|
+
productTypeUniqueId?: string;
|
|
1052
|
+
}
|
|
1053
|
+
interface ArchiveProductParams {
|
|
1054
|
+
entityIds: (number | string)[];
|
|
1055
|
+
productTypeUniqueId?: string;
|
|
1056
|
+
}
|
|
1057
|
+
interface CmsRequestOptions<TSubject = any> {
|
|
1058
|
+
normalizer?: (item: TSubject) => Record<string, any>;
|
|
776
1059
|
revalidate?: number | false;
|
|
777
1060
|
cache?: RequestCache;
|
|
778
1061
|
headers?: HeadersInit;
|
|
779
1062
|
signal?: AbortSignal;
|
|
780
1063
|
}
|
|
1064
|
+
interface TagCategoryItem {
|
|
1065
|
+
id: number;
|
|
1066
|
+
name: string;
|
|
1067
|
+
businessSoftSrv?: any;
|
|
1068
|
+
creationDate?: string;
|
|
1069
|
+
enable?: boolean;
|
|
1070
|
+
desc?: string;
|
|
1071
|
+
[key: string]: any;
|
|
1072
|
+
}
|
|
1073
|
+
interface TagCategoryListParams {
|
|
1074
|
+
offset?: number;
|
|
1075
|
+
size?: number;
|
|
1076
|
+
id?: number | string;
|
|
1077
|
+
name?: string;
|
|
1078
|
+
query?: string;
|
|
1079
|
+
[key: string]: any;
|
|
1080
|
+
}
|
|
1081
|
+
interface CreateTagCategoryParams {
|
|
1082
|
+
name: string;
|
|
1083
|
+
desc?: string;
|
|
1084
|
+
[key: string]: any;
|
|
1085
|
+
}
|
|
1086
|
+
interface UpdateTagCategoryParams {
|
|
1087
|
+
name: string;
|
|
1088
|
+
desc?: string;
|
|
1089
|
+
enable?: boolean;
|
|
1090
|
+
[key: string]: any;
|
|
1091
|
+
}
|
|
1092
|
+
interface GetTagCategoriesResponse {
|
|
1093
|
+
referenceNumber?: string;
|
|
1094
|
+
hasError: boolean;
|
|
1095
|
+
errorCode?: number;
|
|
1096
|
+
refId?: string;
|
|
1097
|
+
message?: string | any[];
|
|
1098
|
+
count?: number;
|
|
1099
|
+
aggregations?: number;
|
|
1100
|
+
result: TagCategoryItem[];
|
|
1101
|
+
[key: string]: any;
|
|
1102
|
+
}
|
|
1103
|
+
interface GetTagTreeParams {
|
|
1104
|
+
parentId?: number | string;
|
|
1105
|
+
id?: string | number;
|
|
1106
|
+
parentCode?: string;
|
|
1107
|
+
includeParent?: boolean;
|
|
1108
|
+
excludeTree?: boolean;
|
|
1109
|
+
levelCount?: number;
|
|
1110
|
+
level?: number;
|
|
1111
|
+
name?: string;
|
|
1112
|
+
size?: number;
|
|
1113
|
+
offset?: number;
|
|
1114
|
+
siblingOrder?: string;
|
|
1115
|
+
enable?: boolean;
|
|
1116
|
+
[key: string]: any;
|
|
1117
|
+
}
|
|
1118
|
+
interface CreateTagTreeItemParams {
|
|
1119
|
+
name: string;
|
|
1120
|
+
parentId?: number | string;
|
|
1121
|
+
code?: string;
|
|
1122
|
+
relatedContentIds?: number[];
|
|
1123
|
+
icon?: string;
|
|
1124
|
+
description?: string;
|
|
1125
|
+
longDescription?: string;
|
|
1126
|
+
link?: string;
|
|
1127
|
+
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
1128
|
+
content?: string;
|
|
1129
|
+
preview?: string;
|
|
1130
|
+
siblingOrder?: number;
|
|
1131
|
+
displayName?: string;
|
|
1132
|
+
englishName?: string;
|
|
1133
|
+
[key: string]: any;
|
|
1134
|
+
}
|
|
1135
|
+
interface UpdateTagTreeItemParams {
|
|
1136
|
+
name?: string;
|
|
1137
|
+
parentId?: number | string;
|
|
1138
|
+
code?: string;
|
|
1139
|
+
relatedContentIds?: number[];
|
|
1140
|
+
icon?: string;
|
|
1141
|
+
description?: string;
|
|
1142
|
+
longDescription?: string;
|
|
1143
|
+
link?: string;
|
|
1144
|
+
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
1145
|
+
content?: string;
|
|
1146
|
+
preview?: string;
|
|
1147
|
+
siblingOrder?: number;
|
|
1148
|
+
displayName?: string;
|
|
1149
|
+
englishName?: string;
|
|
1150
|
+
[key: string]: any;
|
|
1151
|
+
}
|
|
1152
|
+
interface TagTreeAncestorsParams {
|
|
1153
|
+
levelCount?: number;
|
|
1154
|
+
level?: number;
|
|
1155
|
+
[key: string]: any;
|
|
1156
|
+
}
|
|
1157
|
+
interface GetTagTreeResponse {
|
|
1158
|
+
referenceNumber?: string;
|
|
1159
|
+
hasError: boolean;
|
|
1160
|
+
errorCode?: number;
|
|
1161
|
+
refId?: string;
|
|
1162
|
+
message?: string | any[];
|
|
1163
|
+
count?: number;
|
|
1164
|
+
aggregations?: number;
|
|
1165
|
+
result: TagtreesType[];
|
|
1166
|
+
metadata?: any[];
|
|
1167
|
+
[key: string]: any;
|
|
1168
|
+
}
|
|
781
1169
|
|
|
782
1170
|
declare class CmsDataFormatter {
|
|
783
1171
|
private podspaceUrl;
|
|
784
1172
|
constructor(podspaceUrl?: string);
|
|
785
1173
|
generateImage(hash?: string, defaultSrc?: string): string;
|
|
1174
|
+
formatItem<TSubject = any>(item: any, normalizer?: (item: TSubject) => Record<string, any>): any;
|
|
786
1175
|
formatContentItem(item: any, normalizer?: (item: FormattedSubject) => Record<string, any>): any;
|
|
1176
|
+
formatProductItem(item: any, normalizer?: (item: FormattedProductSubject) => Record<string, any>): any;
|
|
787
1177
|
formatGetContentResponse<T extends Record<string, any> = Record<string, any>, P = {}>(response: any, normalizer?: (item: FormattedSubject) => Record<string, any>): FormattedGetContentResponse<T, P>;
|
|
1178
|
+
formatGetProductResponse<T extends Record<string, any> = Record<string, any>, P = {}>(response: any, normalizer?: (item: FormattedProductSubject) => Record<string, any>): FormattedGetProductResponse<T, P>;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
interface CmsProductServiceOptions {
|
|
1182
|
+
baseUrl?: string;
|
|
1183
|
+
clientId: string;
|
|
1184
|
+
apiToken?: string;
|
|
1185
|
+
podspaceUrl?: string;
|
|
1186
|
+
revalidate?: number | string;
|
|
1187
|
+
http?: NextHttp;
|
|
1188
|
+
formatter?: CmsDataFormatter;
|
|
1189
|
+
}
|
|
1190
|
+
declare class CmsProductService {
|
|
1191
|
+
private http;
|
|
1192
|
+
private formatter;
|
|
1193
|
+
private clientId;
|
|
1194
|
+
private apiToken;
|
|
1195
|
+
private revalidate;
|
|
1196
|
+
constructor(options: CmsProductServiceOptions);
|
|
1197
|
+
private get commonHeaders();
|
|
1198
|
+
private get managingHeaders();
|
|
1199
|
+
/**
|
|
1200
|
+
* Retrieves enabled published products from CMS, formatted with generic metadata type T and optional normalized type P.
|
|
1201
|
+
* Swagger: GET /api/core/products/enable
|
|
1202
|
+
*/
|
|
1203
|
+
getProducts<T extends Record<string, any> = Record<string, any>, P = {}>(params?: GetProductParams, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
1204
|
+
/**
|
|
1205
|
+
* Retrieves all products using Provider credentials (Access-Token).
|
|
1206
|
+
* Swagger: GET /api/core/products
|
|
1207
|
+
*/
|
|
1208
|
+
getAllProducts<T extends Record<string, any> = Record<string, any>, P = {}>(params?: GetProductParams, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
1209
|
+
/**
|
|
1210
|
+
* Retrieves products for management view.
|
|
1211
|
+
* Swagger: GET /api/core/products/manage
|
|
1212
|
+
*/
|
|
1213
|
+
getManageProducts<T extends Record<string, any> = Record<string, any>, P = {}>(params?: GetProductParams, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
1214
|
+
/**
|
|
1215
|
+
* Retrieves products by ProductType unique identifier.
|
|
1216
|
+
* Swagger: GET /api/core/products/{productTypeUniqueId}
|
|
1217
|
+
*/
|
|
1218
|
+
getProductsByType<T extends Record<string, any> = Record<string, any>, P = {}>(productTypeUniqueId: string, params?: GetProductParams, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
1219
|
+
/**
|
|
1220
|
+
* Retrieves a single published product by entityId.
|
|
1221
|
+
* Swagger: GET /api/core/products/enable/{entityId} OR /api/core/products/{productTypeUniqueId}/enable/{entityId}
|
|
1222
|
+
*/
|
|
1223
|
+
getProductByEntityId<T extends Record<string, any> = Record<string, any>, P = {}>(params: GetProductByEntityIdParams, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
1224
|
+
/**
|
|
1225
|
+
* Retrieves a single product by uniqueId.
|
|
1226
|
+
* Swagger: GET /api/core/products/{productUniqueId}/byProductUniqueId/enable
|
|
1227
|
+
*/
|
|
1228
|
+
getProductByUniqueId<T extends Record<string, any> = Record<string, any>, P = {}>(productUniqueId: string, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
1229
|
+
/**
|
|
1230
|
+
* Retrieves products matching a barcode.
|
|
1231
|
+
* Swagger: GET /api/core/products/barcode/enable
|
|
1232
|
+
*/
|
|
1233
|
+
getProductByBarcode<T extends Record<string, any> = Record<string, any>, P = {}>(barcode: string, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
1234
|
+
/**
|
|
1235
|
+
* Searches published products by keyword.
|
|
1236
|
+
* Swagger: GET /api/core/products/enable/search
|
|
1237
|
+
*/
|
|
1238
|
+
searchProducts<T extends Record<string, any> = Record<string, any>, P = {}>(params?: {
|
|
1239
|
+
query?: string;
|
|
1240
|
+
name?: string;
|
|
1241
|
+
offset?: number;
|
|
1242
|
+
size?: number;
|
|
1243
|
+
[key: string]: any;
|
|
1244
|
+
}, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
1245
|
+
/**
|
|
1246
|
+
* Creates and publishes a new product.
|
|
1247
|
+
* Swagger: POST /api/core/products/{productTypeUniqueId}/add-publish
|
|
1248
|
+
*/
|
|
1249
|
+
addProduct<T extends Record<string, any> = Record<string, any>, P = {}>(params: AddProductParams, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
1250
|
+
/**
|
|
1251
|
+
* Creates a draft/unpublished product.
|
|
1252
|
+
* Swagger: POST /api/core/products/{productTypeUniqueId}
|
|
1253
|
+
*/
|
|
1254
|
+
createProduct<T extends Record<string, any> = Record<string, any>, P = {}>(params: AddProductParams, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
1255
|
+
/**
|
|
1256
|
+
* Edits and publishes an existing product by entityId.
|
|
1257
|
+
* Swagger: POST /api/core/products/{productTypeUniqueId}/{entityId}/edit-publish
|
|
1258
|
+
*/
|
|
1259
|
+
editProduct<T extends Record<string, any> = Record<string, any>, P = {}>(entityId: number | string, params: AddProductParams, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
1260
|
+
/**
|
|
1261
|
+
* Updates an existing product.
|
|
1262
|
+
* Swagger: POST /api/core/products/{productTypeUniqueId}/{entityId}
|
|
1263
|
+
*/
|
|
1264
|
+
updateProduct<T extends Record<string, any> = Record<string, any>, P = {}>(entityId: number | string, params: AddProductParams, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
1265
|
+
/**
|
|
1266
|
+
* Partially updates an existing product.
|
|
1267
|
+
* Swagger: PATCH /api/core/products/{productTypeUniqueId}/{entityId}
|
|
1268
|
+
*/
|
|
1269
|
+
patchProduct<T extends Record<string, any> = Record<string, any>, P = {}>(entityId: number | string, params: EditProductParams, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
1270
|
+
/**
|
|
1271
|
+
* Publishes an existing product.
|
|
1272
|
+
* Swagger: POST /api/core/products/{productTypeUniqueId}/publish/{entityId}
|
|
1273
|
+
*/
|
|
1274
|
+
publishProduct(productTypeUniqueId: string, entityId: number | string): Promise<any>;
|
|
1275
|
+
/**
|
|
1276
|
+
* Unpublishes an existing product.
|
|
1277
|
+
* Swagger: POST /api/core/products/{productTypeUniqueId}/unpublish/{entityId}
|
|
1278
|
+
*/
|
|
1279
|
+
unpublishProduct(productTypeUniqueId: string, entityId: number | string): Promise<any>;
|
|
1280
|
+
/**
|
|
1281
|
+
* Batch publishes products.
|
|
1282
|
+
* Swagger: PUT /api/core/products/{productTypeUniqueId}/publish OR /api/core/products/publish
|
|
1283
|
+
*/
|
|
1284
|
+
batchPublish(params: BatchPublishProductParams): Promise<any>;
|
|
1285
|
+
/**
|
|
1286
|
+
* Batch unpublishes products.
|
|
1287
|
+
* Swagger: PUT /api/core/products/{productTypeUniqueId}/unpublish OR /api/core/products/unpublish
|
|
1288
|
+
*/
|
|
1289
|
+
batchUnpublish(params: BatchUnpublishProductParams): Promise<any>;
|
|
1290
|
+
/**
|
|
1291
|
+
* Archives products.
|
|
1292
|
+
* Swagger: POST /api/core/products/{productTypeUniqueId}/archive OR /api/core/products/archive
|
|
1293
|
+
*/
|
|
1294
|
+
archiveProduct(params: ArchiveProductParams): Promise<any>;
|
|
1295
|
+
/**
|
|
1296
|
+
* Unarchives products.
|
|
1297
|
+
* Swagger: POST /api/core/products/{productTypeUniqueId}/unarchive OR /api/core/products/unarchive
|
|
1298
|
+
*/
|
|
1299
|
+
unarchiveProduct(params: ArchiveProductParams): Promise<any>;
|
|
1300
|
+
/**
|
|
1301
|
+
* Gets list of archived products.
|
|
1302
|
+
* Swagger: GET /api/core/products/archive OR /api/core/products/{productTypeUniqueId}/archive
|
|
1303
|
+
*/
|
|
1304
|
+
getArchivedProducts<T extends Record<string, any> = Record<string, any>, P = {}>(params?: {
|
|
1305
|
+
productTypeUniqueId?: string;
|
|
1306
|
+
offset?: number;
|
|
1307
|
+
size?: number;
|
|
1308
|
+
[key: string]: any;
|
|
1309
|
+
}, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
1310
|
+
/**
|
|
1311
|
+
* Performs advanced AI timeline search on products.
|
|
1312
|
+
* Swagger: GET /api/core/products/ai/timeline-search/enable
|
|
1313
|
+
*/
|
|
1314
|
+
timelineSearch(query?: TimelineSearchBody): Promise<TimelineResponse>;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
interface CmsTagServiceOptions {
|
|
1318
|
+
baseUrl?: string;
|
|
1319
|
+
clientId: string;
|
|
1320
|
+
apiToken?: string;
|
|
1321
|
+
revalidate?: number | string;
|
|
1322
|
+
http?: NextHttp;
|
|
1323
|
+
}
|
|
1324
|
+
declare class CmsTagService {
|
|
1325
|
+
private http;
|
|
1326
|
+
private clientId;
|
|
1327
|
+
private apiToken;
|
|
1328
|
+
private revalidate;
|
|
1329
|
+
constructor(options: CmsTagServiceOptions);
|
|
1330
|
+
private get commonHeaders();
|
|
1331
|
+
private get managingHeaders();
|
|
1332
|
+
/**
|
|
1333
|
+
* Retrieves list of tag categories.
|
|
1334
|
+
* Swagger: GET /api/core/tags/category
|
|
1335
|
+
*/
|
|
1336
|
+
getTagCategories(params?: TagCategoryListParams, options?: CmsRequestOptions): Promise<GetTagCategoriesResponse>;
|
|
1337
|
+
/**
|
|
1338
|
+
* Creates a new tag category.
|
|
1339
|
+
* Swagger: POST /api/core/tags/category
|
|
1340
|
+
*/
|
|
1341
|
+
createTagCategory(params: CreateTagCategoryParams, options?: CmsRequestOptions): Promise<any>;
|
|
1342
|
+
/**
|
|
1343
|
+
* Retrieves single tag category by ID.
|
|
1344
|
+
* Swagger: GET /api/core/tags/category/{id}
|
|
1345
|
+
*/
|
|
1346
|
+
getTagCategory(id: number | string, options?: CmsRequestOptions): Promise<any>;
|
|
1347
|
+
/**
|
|
1348
|
+
* Updates an existing tag category.
|
|
1349
|
+
* Swagger: PUT /api/core/tags/category/{id}
|
|
1350
|
+
*/
|
|
1351
|
+
updateTagCategory(id: number | string, params: UpdateTagCategoryParams, options?: CmsRequestOptions): Promise<any>;
|
|
1352
|
+
/**
|
|
1353
|
+
* Publishes a tag category.
|
|
1354
|
+
* Swagger: PUT /api/core/tags/category/{id}/publish
|
|
1355
|
+
*/
|
|
1356
|
+
publishTagCategory(id: number | string, options?: CmsRequestOptions): Promise<any>;
|
|
1357
|
+
/**
|
|
1358
|
+
* Unpublishes a tag category.
|
|
1359
|
+
* Swagger: PUT /api/core/tags/category/{id}/unpublish
|
|
1360
|
+
*/
|
|
1361
|
+
unpublishTagCategory(id: number | string, options?: CmsRequestOptions): Promise<any>;
|
|
1362
|
+
/**
|
|
1363
|
+
* Retrieves enabled published tag tree for category (defaults to 'root').
|
|
1364
|
+
* End user call (without requiring Access-Token).
|
|
1365
|
+
* Swagger: GET /api/core/tags/{categoryId}/tree/enable
|
|
1366
|
+
*/
|
|
1367
|
+
getTagTree(categoryId?: string | number, params?: GetTagTreeParams, options?: CmsRequestOptions): Promise<GetTagTreeResponse>;
|
|
1368
|
+
/**
|
|
1369
|
+
* Retrieves tag tree for category with management credentials.
|
|
1370
|
+
* Swagger: GET /api/core/tags/{categoryId}/tree/manage
|
|
1371
|
+
*/
|
|
1372
|
+
getManageTagTree(categoryId: string | number, params?: GetTagTreeParams, options?: CmsRequestOptions): Promise<GetTagTreeResponse>;
|
|
1373
|
+
/**
|
|
1374
|
+
* Creates a new tag tree node for category.
|
|
1375
|
+
* Swagger: POST /api/core/tags/{categoryId}/tree
|
|
1376
|
+
*/
|
|
1377
|
+
createTagTreeItem(categoryId: string | number, params: CreateTagTreeItemParams, options?: CmsRequestOptions): Promise<any>;
|
|
1378
|
+
/**
|
|
1379
|
+
* Shows a single enabled tag tree item for end users.
|
|
1380
|
+
* Swagger: GET /api/core/tags/{categoryId}/tree/{id}/enable
|
|
1381
|
+
*/
|
|
1382
|
+
getTagTreeItem(categoryId: string | number, id: number | string, options?: CmsRequestOptions): Promise<any>;
|
|
1383
|
+
/**
|
|
1384
|
+
* Shows a single tag tree item for manager (with token).
|
|
1385
|
+
* Swagger: GET /api/core/tags/{categoryId}/tree/{id}/manage
|
|
1386
|
+
*/
|
|
1387
|
+
getManageTagTreeItem(categoryId: string | number, id: number | string, options?: CmsRequestOptions): Promise<any>;
|
|
1388
|
+
/**
|
|
1389
|
+
* Updates an existing tag tree node.
|
|
1390
|
+
* Swagger: PUT /api/core/tags/{categoryId}/tree/{id}
|
|
1391
|
+
*/
|
|
1392
|
+
updateTagTreeItem(categoryId: string | number, id: number | string, params: UpdateTagTreeItemParams, options?: CmsRequestOptions): Promise<any>;
|
|
1393
|
+
/**
|
|
1394
|
+
* Publishes a tag tree item.
|
|
1395
|
+
* Swagger: PUT /api/core/tags/{categoryId}/tree/publish/{id}
|
|
1396
|
+
*/
|
|
1397
|
+
publishTagTreeItem(categoryId: string | number, id: number | string, options?: CmsRequestOptions): Promise<any>;
|
|
1398
|
+
/**
|
|
1399
|
+
* Unpublishes a tag tree item.
|
|
1400
|
+
* Swagger: PUT /api/core/tags/{categoryId}/tree/unpublish/{id}
|
|
1401
|
+
*/
|
|
1402
|
+
unpublishTagTreeItem(categoryId: string | number, id: number | string, options?: CmsRequestOptions): Promise<any>;
|
|
1403
|
+
/**
|
|
1404
|
+
* Updates the parent of a tag tree item.
|
|
1405
|
+
* Swagger: PUT /api/core/tags/{categoryId}/tree/parent/{id}
|
|
1406
|
+
*/
|
|
1407
|
+
updateTagTreeParent(categoryId: string | number, id: number | string, parentId?: number | string, options?: CmsRequestOptions): Promise<any>;
|
|
1408
|
+
/**
|
|
1409
|
+
* Retrieves tag tree ancestors for end user.
|
|
1410
|
+
* Swagger: GET /api/core/tags/{categoryId}/tree/parent/{id}/enable
|
|
1411
|
+
*/
|
|
1412
|
+
getTagTreeAncestors(categoryId: string | number, id: number | string, params?: TagTreeAncestorsParams, options?: CmsRequestOptions): Promise<GetTagTreeResponse>;
|
|
1413
|
+
/**
|
|
1414
|
+
* Retrieves tag tree ancestors for manager (with token).
|
|
1415
|
+
* Swagger: GET /api/core/tags/{categoryId}/tree/parent/{id}/manage
|
|
1416
|
+
*/
|
|
1417
|
+
getManageTagTreeAncestors(categoryId: string | number, id: number | string, params?: TagTreeAncestorsParams, options?: CmsRequestOptions): Promise<GetTagTreeResponse>;
|
|
1418
|
+
/**
|
|
1419
|
+
* Updates tag tree code for category.
|
|
1420
|
+
* Swagger: PUT /api/core/tags/{categoryId}/tree/code/{id}
|
|
1421
|
+
*/
|
|
1422
|
+
updateTagTreeCode(categoryId: string | number, id: number | string, code: string, options?: CmsRequestOptions): Promise<any>;
|
|
788
1423
|
}
|
|
789
1424
|
|
|
790
1425
|
interface CmsServiceOptions {
|
|
@@ -800,45 +1435,206 @@ declare class CmsService {
|
|
|
800
1435
|
private clientId;
|
|
801
1436
|
private apiToken;
|
|
802
1437
|
private revalidate;
|
|
1438
|
+
/**
|
|
1439
|
+
* Dedicated CMS Product sub-service.
|
|
1440
|
+
* Swagger: tag=product
|
|
1441
|
+
*/
|
|
1442
|
+
readonly products: CmsProductService;
|
|
1443
|
+
/**
|
|
1444
|
+
* Dedicated CMS Tags & Tag Categories sub-service.
|
|
1445
|
+
* Swagger: tag=tags
|
|
1446
|
+
*/
|
|
1447
|
+
readonly tags: CmsTagService;
|
|
803
1448
|
constructor(options: CmsServiceOptions);
|
|
804
1449
|
private get commonHeaders();
|
|
805
1450
|
private get managingHeaders();
|
|
806
1451
|
/**
|
|
807
1452
|
* Retrieves enabled published content from CMS, formatted with generic metadata type T and optional normalized type P.
|
|
1453
|
+
* Swagger: GET /api/core/contents/enable
|
|
808
1454
|
*/
|
|
809
|
-
getContent<T extends Record<string, any> = Record<string, any>, P = {}>(params?: GetContentParams, options?: CmsRequestOptions): Promise<FormattedGetContentResponse<T, P>>;
|
|
1455
|
+
getContent<T extends Record<string, any> = Record<string, any>, P = {}>(params?: GetContentParams, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
810
1456
|
/**
|
|
811
|
-
* Retrieves
|
|
1457
|
+
* Retrieves all contents using managing credentials (Access-Token).
|
|
1458
|
+
* Swagger: GET /api/core/contents
|
|
812
1459
|
*/
|
|
813
|
-
|
|
1460
|
+
getAllContents<T extends Record<string, any> = Record<string, any>, P = {}>(params?: GetContentParams, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
814
1461
|
/**
|
|
815
|
-
* Retrieves
|
|
1462
|
+
* Retrieves current user/client contents.
|
|
1463
|
+
* Swagger: GET /api/core/contents/my
|
|
816
1464
|
*/
|
|
817
|
-
|
|
1465
|
+
getMyContents<T extends Record<string, any> = Record<string, any>, P = {}>(params?: GetContentParams, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
1466
|
+
/**
|
|
1467
|
+
* Retrieves contents by ContentType unique identifier.
|
|
1468
|
+
* Swagger: GET /api/core/contents/{contentTypeUniqueId}
|
|
1469
|
+
*/
|
|
1470
|
+
getContentsByType<T extends Record<string, any> = Record<string, any>, P = {}>(contentTypeUniqueId: string, params?: GetContentParams, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
1471
|
+
/**
|
|
1472
|
+
* Retrieves unpublished content (enable: false).
|
|
1473
|
+
*/
|
|
1474
|
+
getUnpublishedContent<T extends Record<string, any> = Record<string, any>, P = {}>(params?: GetContentParams, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
818
1475
|
/**
|
|
819
1476
|
* Retrieves single content by entityId and optional contentTypeUniqueId.
|
|
1477
|
+
* Swagger: GET /api/core/contents/enable/{entityId} OR /api/core/contents/{contentTypeUniqueId}/enable/{entityId}
|
|
1478
|
+
*/
|
|
1479
|
+
getContentByEntityId<T extends Record<string, any> = Record<string, any>, P = {}>(params: GetContentByEntityIdParams, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
1480
|
+
/**
|
|
1481
|
+
* Retrieves content by unique identifier.
|
|
1482
|
+
* Swagger: GET /api/core/contents/{contentUniqueId}/byContentUniqueId/enable
|
|
1483
|
+
*/
|
|
1484
|
+
getContentByUniqueId<T extends Record<string, any> = Record<string, any>, P = {}>(contentUniqueId: string, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
1485
|
+
/**
|
|
1486
|
+
* Searches published contents by keyword.
|
|
1487
|
+
* Swagger: GET /api/core/contents/search
|
|
1488
|
+
*/
|
|
1489
|
+
searchContent<T extends Record<string, any> = Record<string, any>, P = {}>(params?: {
|
|
1490
|
+
query?: string;
|
|
1491
|
+
name?: string;
|
|
1492
|
+
offset?: number;
|
|
1493
|
+
size?: number;
|
|
1494
|
+
[key: string]: any;
|
|
1495
|
+
}, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
1496
|
+
/**
|
|
1497
|
+
* Adds and publishes new content to CMS.
|
|
1498
|
+
* Swagger: POST /api/core/contents/{contentTypeUniqueId}/add-publish
|
|
820
1499
|
*/
|
|
821
|
-
|
|
1500
|
+
addContent<T extends Record<string, any> = Record<string, any>, P = {}>(params: AddContentParams, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
1501
|
+
/**
|
|
1502
|
+
* Creates a new draft/unpublished content.
|
|
1503
|
+
* Swagger: POST /api/core/contents/{contentTypeUniqueId}
|
|
1504
|
+
*/
|
|
1505
|
+
createContent<T extends Record<string, any> = Record<string, any>, P = {}>(params: AddContentParams, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
1506
|
+
/**
|
|
1507
|
+
* Edits and publishes existing content by entityId.
|
|
1508
|
+
* Swagger: POST /api/core/contents/{contentTypeUniqueId}/{entityId}/edit-publish
|
|
1509
|
+
*/
|
|
1510
|
+
editContent<T extends Record<string, any> = Record<string, any>, P = {}>(entityId: number | string, params: AddContentParams, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
1511
|
+
/**
|
|
1512
|
+
* Updates existing content.
|
|
1513
|
+
* Swagger: POST /api/core/contents/{contentTypeUniqueId}/{entityId}
|
|
1514
|
+
*/
|
|
1515
|
+
updateContent<T extends Record<string, any> = Record<string, any>, P = {}>(entityId: number | string, params: AddContentParams, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
1516
|
+
/**
|
|
1517
|
+
* Partially updates existing content.
|
|
1518
|
+
* Swagger: PATCH /api/core/contents/{contentTypeUniqueId}/{entityId}
|
|
1519
|
+
*/
|
|
1520
|
+
patchContent<T extends Record<string, any> = Record<string, any>, P = {}>(entityId: number | string, params: EditContentParams, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
1521
|
+
/**
|
|
1522
|
+
* Publishes existing content.
|
|
1523
|
+
* Swagger: POST /api/core/contents/{contentTypeUniqueId}/publish/{entityId}
|
|
1524
|
+
*/
|
|
1525
|
+
publishContent(contentTypeUniqueId: string, entityId: number | string): Promise<any>;
|
|
1526
|
+
/**
|
|
1527
|
+
* Unpublishes existing content.
|
|
1528
|
+
* Swagger: POST /api/core/contents/{contentTypeUniqueId}/unpublish/{entityId}
|
|
1529
|
+
*/
|
|
1530
|
+
unpublishContent(contentTypeUniqueId: string, entityId: number | string): Promise<any>;
|
|
1531
|
+
/**
|
|
1532
|
+
* Batch publishes content items.
|
|
1533
|
+
* Swagger: PUT /api/core/contents/{contentTypeUniqueId}/publish OR /api/core/contents/publish
|
|
1534
|
+
*/
|
|
1535
|
+
batchPublish(params: BatchPublishParams): Promise<any>;
|
|
1536
|
+
/**
|
|
1537
|
+
* Batch unpublishes content items.
|
|
1538
|
+
* Swagger: PUT /api/core/contents/{contentTypeUniqueId}/unpublish OR /api/core/contents/unpublish
|
|
1539
|
+
*/
|
|
1540
|
+
batchUnpublish(params: BatchUnpublishParams): Promise<any>;
|
|
1541
|
+
/**
|
|
1542
|
+
* Archives content items.
|
|
1543
|
+
* Swagger: POST /api/core/contents/{contentTypeUniqueId}/archive
|
|
1544
|
+
*/
|
|
1545
|
+
archiveContent(params: ArchiveParams): Promise<any>;
|
|
1546
|
+
/**
|
|
1547
|
+
* Unarchives content items.
|
|
1548
|
+
* Swagger: POST /api/core/contents/{contentTypeUniqueId}/unarchive
|
|
1549
|
+
*/
|
|
1550
|
+
unarchiveContent(params: ArchiveParams): Promise<any>;
|
|
1551
|
+
/**
|
|
1552
|
+
* Retrieves list of archived contents.
|
|
1553
|
+
* Swagger: GET /api/core/contents/archive OR /api/core/contents/{contentTypeUniqueId}/archive
|
|
1554
|
+
*/
|
|
1555
|
+
getArchivedContents<T extends Record<string, any> = Record<string, any>, P = {}>(params?: {
|
|
1556
|
+
contentTypeUniqueId?: string;
|
|
1557
|
+
offset?: number;
|
|
1558
|
+
size?: number;
|
|
1559
|
+
[key: string]: any;
|
|
1560
|
+
}, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
1561
|
+
/**
|
|
1562
|
+
* Retrieves drafts.
|
|
1563
|
+
* Swagger: GET /api/core/contents/draft OR /api/core/contents/{contentTypeUniqueId}/draft
|
|
1564
|
+
*/
|
|
1565
|
+
getDrafts<T extends Record<string, any> = Record<string, any>, P = {}>(params?: {
|
|
1566
|
+
contentTypeUniqueId?: string;
|
|
1567
|
+
offset?: number;
|
|
1568
|
+
size?: number;
|
|
1569
|
+
[key: string]: any;
|
|
1570
|
+
}, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
1571
|
+
/**
|
|
1572
|
+
* Creates a draft.
|
|
1573
|
+
* Swagger: POST /api/core/contents/{contentTypeUniqueId}/draft
|
|
1574
|
+
*/
|
|
1575
|
+
createDraft<T extends Record<string, any> = Record<string, any>, P = {}>(params: AddContentParams, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
1576
|
+
/**
|
|
1577
|
+
* Gets a specific draft by entityId.
|
|
1578
|
+
* Swagger: GET /api/core/contents/{contentTypeUniqueId}/draft/{entityId}
|
|
1579
|
+
*/
|
|
1580
|
+
getDraftById<T extends Record<string, any> = Record<string, any>, P = {}>(contentTypeUniqueId: string, entityId: number | string, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
1581
|
+
/**
|
|
1582
|
+
* Updates a draft.
|
|
1583
|
+
* Swagger: POST /api/core/contents/{contentTypeUniqueId}/draft/{entityId}
|
|
1584
|
+
*/
|
|
1585
|
+
updateDraft<T extends Record<string, any> = Record<string, any>, P = {}>(contentTypeUniqueId: string, entityId: number | string, params: AddContentParams, options?: CmsRequestOptions<FormattedSubject>): Promise<FormattedGetContentResponse<T, P>>;
|
|
1586
|
+
/**
|
|
1587
|
+
* Undrafts content by entityId.
|
|
1588
|
+
* Swagger: POST /api/core/contents/{contentTypeUniqueId}/undraft/{entityId}
|
|
1589
|
+
*/
|
|
1590
|
+
undraftContent(contentTypeUniqueId: string, entityId: number | string): Promise<any>;
|
|
1591
|
+
/**
|
|
1592
|
+
* Retrieves comments on content.
|
|
1593
|
+
* Swagger: GET /api/core/contents/{contentTypeUniqueId}/comments/{entityId}
|
|
1594
|
+
*/
|
|
1595
|
+
getComments(contentTypeUniqueId: string, entityId: number | string, params?: GetCommentsParams): Promise<any>;
|
|
1596
|
+
/**
|
|
1597
|
+
* Retrieves list of likes for content.
|
|
1598
|
+
* Swagger: GET /api/core/contents/{contentUniqueId}/like/{entityId}
|
|
1599
|
+
*/
|
|
1600
|
+
getLikes(contentUniqueId: string, entityId: number | string, params?: GetReactionsParams): Promise<any>;
|
|
1601
|
+
/**
|
|
1602
|
+
* Retrieves list of dislikes for content.
|
|
1603
|
+
* Swagger: GET /api/core/contents/{contentUniqueId}/dislike/{entityId}
|
|
1604
|
+
*/
|
|
1605
|
+
getDislikes(contentUniqueId: string, entityId: number | string, params?: GetReactionsParams): Promise<any>;
|
|
822
1606
|
/**
|
|
823
1607
|
* Retrieves tag/category tree.
|
|
1608
|
+
* Backward-compatible delegate pointing to `cms.tags.getTagTree('root', params, options)`.
|
|
1609
|
+
* Swagger: GET /api/core/tags/{categoryId}/tree/enable
|
|
824
1610
|
*/
|
|
825
1611
|
getCategories(params?: GetCategoriesParams, options?: CmsRequestOptions): Promise<GetCategoryResponse>;
|
|
826
1612
|
/**
|
|
827
1613
|
* Retrieves details of a content type structure.
|
|
1614
|
+
* Swagger: GET /api/core/content-types/{contentTypeUniqueId}
|
|
828
1615
|
*/
|
|
829
1616
|
getContentTypeDetail(contentTypeUniqueId: string): Promise<any>;
|
|
830
1617
|
/**
|
|
831
|
-
*
|
|
1618
|
+
* Performs advanced AI timeline search on content.
|
|
1619
|
+
* Swagger: GET /api/core/contents/ai/timeline-search/enable
|
|
1620
|
+
*/
|
|
1621
|
+
timelineSearch(query?: TimelineSearchBody): Promise<TimelineResponse>;
|
|
1622
|
+
/**
|
|
1623
|
+
* Delegate to `cms.products.getProducts(...)`.
|
|
832
1624
|
*/
|
|
833
|
-
|
|
1625
|
+
getProducts<T extends Record<string, any> = Record<string, any>, P = {}>(params?: GetProductParams, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
834
1626
|
/**
|
|
835
|
-
*
|
|
1627
|
+
* Delegate to `cms.products.getProductByEntityId(...)`.
|
|
836
1628
|
*/
|
|
837
|
-
|
|
1629
|
+
getProductByEntityId<T extends Record<string, any> = Record<string, any>, P = {}>(params: GetProductByEntityIdParams, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
838
1630
|
/**
|
|
839
|
-
*
|
|
1631
|
+
* Delegate to `cms.products.addProduct(...)`.
|
|
840
1632
|
*/
|
|
841
|
-
|
|
1633
|
+
addProduct<T extends Record<string, any> = Record<string, any>, P = {}>(params: AddProductParams, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
1634
|
+
/**
|
|
1635
|
+
* Delegate to `cms.products.editProduct(...)`.
|
|
1636
|
+
*/
|
|
1637
|
+
editProduct<T extends Record<string, any> = Record<string, any>, P = {}>(entityId: number | string, params: AddProductParams, options?: CmsRequestOptions<FormattedProductSubject>): Promise<FormattedGetProductResponse<T, P>>;
|
|
842
1638
|
}
|
|
843
1639
|
|
|
844
1640
|
interface GetInfOfGraduatedByGraduateDateResponse {
|
|
@@ -880,6 +1676,8 @@ declare class PodSdk {
|
|
|
880
1676
|
readonly notification: NotificationService;
|
|
881
1677
|
readonly social: SocialService;
|
|
882
1678
|
readonly cms: CmsService;
|
|
1679
|
+
readonly product: CmsProductService;
|
|
1680
|
+
readonly tags: CmsTagService;
|
|
883
1681
|
readonly iums: IumsService;
|
|
884
1682
|
constructor(config: PodSdkConfig);
|
|
885
1683
|
/**
|
|
@@ -899,4 +1697,4 @@ declare function createPodSdk(config: PodSdkConfig): PodSdk;
|
|
|
899
1697
|
declare function encodeBase64(str: string): string;
|
|
900
1698
|
declare function generatePodSignatureHeader(keyId: string, privateKeyPem?: string): Promise<string>;
|
|
901
1699
|
|
|
902
|
-
export { type AddCommentParams, type AddContentParams, type AddCustomPostParams, type AddCustomPostResponse, type Business, CmsDataFormatter, type CmsMetadata, type CmsRequestOptions, CmsService, type CmsServiceOptions, type CommentItem, type CustomPostCrudConfig, CustomPostCrudService, type CustomPostItem, CustomPostService, type CustomPostServiceOptions, type FormattedGetContentResponse, type FormattedSubject, type GetCategoriesParams, type GetCategoryResponse, type GetCommentListParams, type GetContentByEntityIdParams, type GetContentParams, type GetContentResponse, type GetCustomPostParams, type GetCustomPostResponse, type GetInfOfGraduatedByGraduateDateResponse, type GetSessionClassInCurrentDayResponse, type HandshakeResponse, type IumsResponse, IumsService, type IumsServiceOptions, type LikeCommentParams, type LikePostParams, type MetaContent, type Metadata, NotificationService, type NotificationServiceOptions, type PodFormItem, type PodFormResponse, PodFormService, type PodFormServiceOptions, type PodResponse, PodSdk, type PodSdkConfig, type PodUrlsConfig, PodspaceService, type PodspaceServiceOptions, type PodspaceUploadResponse, type PodspaceUploadResult, type Rate, type ResultItem, type ResultItemWithFormatted, type SearchTimelineByMetadataParam, type SearchTimelineParamMetaQuery, type SearchTimelineResponse, type SearchTimelineResultItem, type SendOtpOptions, type SendSmsParams, type SendSmsResponse, type SeoType, type SocialResponse, SocialService, type SocialServiceOptions, SsoService, type SsoServiceOptions, type SsoUserProfile, type Subject, type TagtreesType, type TimelineResponse, type TimelineSearchBody, type TokenResponse, type UpdateCustomPostParams, type UserPostInfo, type VerifyResponse, createPodSdk, PodSdk as default, encodeBase64, generatePodSignatureHeader };
|
|
1700
|
+
export { type AddCommentParams, type AddContentParams, type AddCustomPostParams, type AddCustomPostResponse, type AddProductParams, type ArchiveParams, type ArchiveProductParams, type BatchPublishParams, type BatchPublishProductParams, type BatchUnpublishParams, type BatchUnpublishProductParams, type Business, CmsDataFormatter, type CmsMetadata, CmsProductService, type CmsProductServiceOptions, type CmsRequestOptions, CmsService, type CmsServiceOptions, CmsTagService, type CmsTagServiceOptions, type CommentItem, type ContentBody, type CreateTagCategoryParams, type CreateTagTreeItemParams, type CustomPostCrudConfig, CustomPostCrudService, type CustomPostItem, CustomPostService, type CustomPostServiceOptions, type EditContentParams, type EditProductParams, type FormattedGetContentResponse, type FormattedGetProductResponse, type FormattedProductSubject, type FormattedSubject, type GetCategoriesParams, type GetCategoryResponse, type GetCommentListParams, type GetCommentsParams, type GetContentByEntityIdParams, type GetContentParams, type GetContentResponse, type GetCustomPostParams, type GetCustomPostResponse, type GetInfOfGraduatedByGraduateDateResponse, type GetProductByEntityIdParams, type GetProductParams, type GetProductResponse, type GetReactionsParams, type GetSessionClassInCurrentDayResponse, type GetTagCategoriesResponse, type GetTagTreeParams, type GetTagTreeResponse, type HandshakeResponse, type IumsResponse, IumsService, type IumsServiceOptions, type LikeCommentParams, type LikePostParams, type MetaContent, type Metadata, NotificationService, type NotificationServiceOptions, type PodFormItem, type PodFormResponse, PodFormService, type PodFormServiceOptions, type PodResponse, PodSdk, type PodSdkConfig, type PodUrlsConfig, PodspaceService, type PodspaceServiceOptions, type PodspaceUploadResponse, type PodspaceUploadResult, type ProductBody, type ProductItem, type ProductItemWithFormatted, type Rate, type ResultItem, type ResultItemWithFormatted, type SearchTimelineByMetadataParam, type SearchTimelineParamMetaQuery, type SearchTimelineResponse, type SearchTimelineResultItem, type SendOtpOptions, type SendSmsParams, type SendSmsResponse, type SeoType, type SocialResponse, SocialService, type SocialServiceOptions, SsoService, type SsoServiceOptions, type SsoUserProfile, type Subject, type TagCategoryItem, type TagCategoryListParams, type TagTreeAncestorsParams, type TagTreeMetadata, type TagtreesType, type TimelineResponse, type TimelineSearchBody, type TokenResponse, type UpdateCustomPostParams, type UpdateTagCategoryParams, type UpdateTagTreeItemParams, type UserPostInfo, type VerifyResponse, createPodSdk, PodSdk as default, encodeBase64, generatePodSignatureHeader };
|