@parra/parra-js-sdk 0.3.604 → 0.3.605
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/ParraAPI.d.ts +13 -7
- package/dist/ParraAPI.js +4 -0
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
@@ -1060,6 +1060,13 @@ export interface Comment {
|
|
1060
1060
|
user: TenantUserStub;
|
1061
1061
|
reactions?: Array<ReactionSummary>;
|
1062
1062
|
}
|
1063
|
+
export interface CommentCollectionResponse {
|
1064
|
+
page: number;
|
1065
|
+
page_count: number;
|
1066
|
+
page_size: number;
|
1067
|
+
total_count: number;
|
1068
|
+
data: Array<Comment>;
|
1069
|
+
}
|
1063
1070
|
export interface CreateReactionRequestBody {
|
1064
1071
|
option_id: string;
|
1065
1072
|
}
|
@@ -3862,13 +3869,6 @@ export interface AppVideoCollectionResponse {
|
|
3862
3869
|
total_count: number;
|
3863
3870
|
data: Array<AppVideo>;
|
3864
3871
|
}
|
3865
|
-
export interface CommentCollectionResponse {
|
3866
|
-
page: number;
|
3867
|
-
page_count: number;
|
3868
|
-
page_size: number;
|
3869
|
-
total_count: number;
|
3870
|
-
data: Array<Comment>;
|
3871
|
-
}
|
3872
3872
|
export interface UpdateCommentRequestBody {
|
3873
3873
|
body?: string;
|
3874
3874
|
}
|
@@ -6818,6 +6818,12 @@ declare class ParraAPI {
|
|
6818
6818
|
addAuthorToArticle: (tenant_id: string, article_id: string, body: CreateArticleAuthorRequestBody, options?: Options) => Promise<ArticleAuthor>;
|
6819
6819
|
removeAuthorFromArticle: (tenant_id: string, article_id: string, author_id: string, options?: Options) => Promise<Response>;
|
6820
6820
|
addCommentToArticle: (tenant_id: string, article_id: string, body: CreateCommentRequestBody, options?: Options) => Promise<Comment>;
|
6821
|
+
paginateCommentsForArticle: (tenant_id: string, article_id: string, query?: {
|
6822
|
+
limit?: number;
|
6823
|
+
offset?: number;
|
6824
|
+
sort?: string;
|
6825
|
+
created_at?: string | null;
|
6826
|
+
}, options?: Options) => Promise<CommentCollectionResponse>;
|
6821
6827
|
addReactionToArticle: (tenant_id: string, article_id: string, body: CreateReactionRequestBody, options?: Options) => Promise<Reaction>;
|
6822
6828
|
removeReactionFromArticle: (tenant_id: string, article_id: string, reaction_id: string, options?: Options) => Promise<Response>;
|
6823
6829
|
addTagToArticle: (tenant_id: string, article_id: string, body: AddTagRequestBody, options?: Options) => Promise<TagStub>;
|
package/dist/ParraAPI.js
CHANGED
@@ -903,6 +903,10 @@ var ParraAPI = /** @class */ (function () {
|
|
903
903
|
"content-type": "application/json",
|
904
904
|
} }, options));
|
905
905
|
};
|
906
|
+
this.paginateCommentsForArticle = function (tenant_id, article_id, query, options) {
|
907
|
+
if (options === void 0) { options = {}; }
|
908
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles/").concat(article_id, "/comments"), method: "get", query: query }, options));
|
909
|
+
};
|
906
910
|
this.addReactionToArticle = function (tenant_id, article_id, body, options) {
|
907
911
|
if (options === void 0) { options = {}; }
|
908
912
|
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles/").concat(article_id, "/reactions"), method: "post", body: JSON.stringify(body), headers: {
|