@parra/parra-js-sdk 0.3.602 → 0.3.603

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.
@@ -1032,6 +1032,40 @@ export interface ArticleAuthor {
1032
1032
  slug?: string | null;
1033
1033
  bio?: string | null;
1034
1034
  }
1035
+ export interface CreateCommentRequestBody {
1036
+ body: string;
1037
+ }
1038
+ export interface TenantUserStub {
1039
+ id: string;
1040
+ tenant_id: string;
1041
+ name?: string | null;
1042
+ avatar?: ImageAssetStub | null;
1043
+ verified?: boolean | null;
1044
+ roles?: Array<TenantUserRoleStub> | null;
1045
+ }
1046
+ export interface Comment {
1047
+ id: string;
1048
+ created_at: string;
1049
+ updated_at: string;
1050
+ deleted_at?: string | null;
1051
+ body: string;
1052
+ user_id: string;
1053
+ feed_item_id?: string;
1054
+ user: TenantUserStub;
1055
+ reactions?: Array<ReactionSummary>;
1056
+ }
1057
+ export interface CreateReactionRequestBody {
1058
+ option_id: string;
1059
+ }
1060
+ export interface Reaction {
1061
+ id: string;
1062
+ created_at: string;
1063
+ updated_at: string;
1064
+ deleted_at?: string | null;
1065
+ option_id: string;
1066
+ user_id: string;
1067
+ user: TenantUserNameStub;
1068
+ }
1035
1069
  export interface AddTagRequestBody {
1036
1070
  tag_id: string;
1037
1071
  }
@@ -1421,14 +1455,6 @@ export interface ConsumeEntitlementRequestBody {
1421
1455
  note?: string | null;
1422
1456
  metadata?: object | null;
1423
1457
  }
1424
- export interface TenantUserStub {
1425
- id: string;
1426
- tenant_id: string;
1427
- name?: string | null;
1428
- avatar?: ImageAssetStub | null;
1429
- verified?: boolean | null;
1430
- roles?: Array<TenantUserRoleStub> | null;
1431
- }
1432
1458
  export declare enum PurchaseType {
1433
1459
  consumable = "consumable",
1434
1460
  subscription = "subscription"
@@ -1782,18 +1808,6 @@ export interface CreateMessageRequestBody {
1782
1808
  export interface FlagMessageRequestBody {
1783
1809
  reason?: string | null;
1784
1810
  }
1785
- export interface CreateReactionRequestBody {
1786
- option_id: string;
1787
- }
1788
- export interface Reaction {
1789
- id: string;
1790
- created_at: string;
1791
- updated_at: string;
1792
- deleted_at?: string | null;
1793
- option_id: string;
1794
- user_id: string;
1795
- user: TenantUserNameStub;
1796
- }
1797
1811
  export declare enum ParraTemplateType {
1798
1812
  default = "default",
1799
1813
  revenueCat = "revenue-cat",
@@ -3845,20 +3859,6 @@ export interface AppVideoCollectionResponse {
3845
3859
  total_count: number;
3846
3860
  data: Array<AppVideo>;
3847
3861
  }
3848
- export interface CreateCommentRequestBody {
3849
- body: string;
3850
- }
3851
- export interface Comment {
3852
- id: string;
3853
- created_at: string;
3854
- updated_at: string;
3855
- deleted_at?: string | null;
3856
- body: string;
3857
- user_id: string;
3858
- feed_item_id?: string;
3859
- user: TenantUserStub;
3860
- reactions?: Array<ReactionSummary>;
3861
- }
3862
3862
  export interface CommentCollectionResponse {
3863
3863
  page: number;
3864
3864
  page_count: number;
@@ -6814,6 +6814,9 @@ declare class ParraAPI {
6814
6814
  deleteArticleById: (tenant_id: string, article_id: string, options?: Options) => Promise<Response>;
6815
6815
  addAuthorToArticle: (tenant_id: string, article_id: string, body: CreateArticleAuthorRequestBody, options?: Options) => Promise<ArticleAuthor>;
6816
6816
  removeAuthorFromArticle: (tenant_id: string, article_id: string, author_id: string, options?: Options) => Promise<Response>;
6817
+ addCommentToArticle: (tenant_id: string, article_id: string, body: CreateCommentRequestBody, options?: Options) => Promise<Comment>;
6818
+ addReactionToArticle: (tenant_id: string, article_id: string, body: CreateReactionRequestBody, options?: Options) => Promise<Reaction>;
6819
+ removeReactionFromArticle: (tenant_id: string, article_id: string, reaction_id: string, options?: Options) => Promise<Response>;
6817
6820
  addTagToArticle: (tenant_id: string, article_id: string, body: AddTagRequestBody, options?: Options) => Promise<TagStub>;
6818
6821
  removeTagFromArticle: (tenant_id: string, article_id: string, tag_id: string, options?: Options) => Promise<Response>;
6819
6822
  publishArticleById: (tenant_id: string, article_id: string, options?: Options) => Promise<Article>;
@@ -7043,6 +7046,7 @@ declare class ParraAPI {
7043
7046
  created_at?: string | null;
7044
7047
  }, options?: Options) => Promise<CommentCollectionResponse>;
7045
7048
  addReactionToVideo: (tenant_id: string, video_id: string, body: CreateReactionRequestBody, options?: Options) => Promise<Reaction>;
7049
+ removeReactionFromVideo: (tenant_id: string, video_id: string, reaction_id: string, options?: Options) => Promise<Response>;
7046
7050
  addCommentToFeedItem: (tenant_id: string, feed_item_id: string, body: CreateCommentRequestBody, options?: Options) => Promise<Comment>;
7047
7051
  paginateCommentsForFeedItem: (tenant_id: string, feed_item_id: string, query?: {
7048
7052
  limit?: number;
package/dist/ParraAPI.js CHANGED
@@ -897,6 +897,22 @@ var ParraAPI = /** @class */ (function () {
897
897
  if (options === void 0) { options = {}; }
898
898
  return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles/").concat(article_id, "/authors/").concat(author_id), method: "delete" }, options));
899
899
  };
900
+ this.addCommentToArticle = function (tenant_id, article_id, body, options) {
901
+ if (options === void 0) { options = {}; }
902
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles/").concat(article_id, "/comments"), method: "post", body: JSON.stringify(body), headers: {
903
+ "content-type": "application/json",
904
+ } }, options));
905
+ };
906
+ this.addReactionToArticle = function (tenant_id, article_id, body, 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, "/reactions"), method: "post", body: JSON.stringify(body), headers: {
909
+ "content-type": "application/json",
910
+ } }, options));
911
+ };
912
+ this.removeReactionFromArticle = function (tenant_id, article_id, reaction_id, options) {
913
+ if (options === void 0) { options = {}; }
914
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles/").concat(article_id, "/reactions/").concat(reaction_id), method: "delete" }, options));
915
+ };
900
916
  this.addTagToArticle = function (tenant_id, article_id, body, options) {
901
917
  if (options === void 0) { options = {}; }
902
918
  return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles/").concat(article_id, "/tags"), method: "post", body: JSON.stringify(body), headers: {
@@ -1675,6 +1691,10 @@ var ParraAPI = /** @class */ (function () {
1675
1691
  "content-type": "application/json",
1676
1692
  } }, options));
1677
1693
  };
1694
+ this.removeReactionFromVideo = function (tenant_id, video_id, reaction_id, options) {
1695
+ if (options === void 0) { options = {}; }
1696
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/videos/").concat(video_id, "/reactions/").concat(reaction_id), method: "delete" }, options));
1697
+ };
1678
1698
  this.addCommentToFeedItem = function (tenant_id, feed_item_id, body, options) {
1679
1699
  if (options === void 0) { options = {}; }
1680
1700
  return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feed/items/").concat(feed_item_id, "/comments"), method: "post", body: JSON.stringify(body), headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.602",
3
+ "version": "0.3.603",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",