@parra/parra-js-sdk 0.3.601 → 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.
- package/dist/ParraAPI.d.ts +88 -58
- package/dist/ParraAPI.js +24 -0
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
@@ -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",
|
@@ -3601,7 +3615,7 @@ export interface YoutubeVideo {
|
|
3601
3615
|
live_broadcast_content?: string | null;
|
3602
3616
|
statistics?: YoutubeStatistics | null;
|
3603
3617
|
}
|
3604
|
-
export interface
|
3618
|
+
export interface AppVideoFeedStub {
|
3605
3619
|
id: string;
|
3606
3620
|
created_at: string;
|
3607
3621
|
updated_at: string;
|
@@ -3617,28 +3631,6 @@ export interface AppVideoStub {
|
|
3617
3631
|
live_broadcast_content?: string | null;
|
3618
3632
|
statistics?: YoutubeStatistics | null;
|
3619
3633
|
paywall?: AppPaywallConfiguration | null;
|
3620
|
-
}
|
3621
|
-
export interface AppVideo {
|
3622
|
-
id: string;
|
3623
|
-
created_at: string;
|
3624
|
-
updated_at: string;
|
3625
|
-
deleted_at?: string | null;
|
3626
|
-
url: string;
|
3627
|
-
video_id: string;
|
3628
|
-
title: string;
|
3629
|
-
channel_title: string;
|
3630
|
-
channel_id: string;
|
3631
|
-
description?: string;
|
3632
|
-
thumbnails: YoutubeThumbnails;
|
3633
|
-
published_at: string;
|
3634
|
-
live_broadcast_content?: string | null;
|
3635
|
-
statistics?: YoutubeStatistics | null;
|
3636
|
-
paywall?: AppPaywallConfiguration | null;
|
3637
|
-
reaction_options?: Array<ReactionOptionGroup>;
|
3638
|
-
reactions?: Array<ReactionSummary>;
|
3639
|
-
comments?: CommentSummary;
|
3640
|
-
products?: Array<AppAffiliateProduct>;
|
3641
|
-
sponsors?: Array<AppSponsor>;
|
3642
3634
|
tags?: Array<TagStub>;
|
3643
3635
|
}
|
3644
3636
|
export interface AppContentCard {
|
@@ -3678,7 +3670,7 @@ export interface AppRssItem {
|
|
3678
3670
|
enclosures?: Array<RssEnclosure> | null;
|
3679
3671
|
published_at?: string | null;
|
3680
3672
|
}
|
3681
|
-
export type FeedItemData =
|
3673
|
+
export type FeedItemData = AppVideoFeedStub | AppContentCard | CreatorUpdateAppStub | AppRssItem | AppArticle;
|
3682
3674
|
export interface AppFeedItem {
|
3683
3675
|
id: string;
|
3684
3676
|
created_at: string;
|
@@ -3804,8 +3796,10 @@ export interface Video {
|
|
3804
3796
|
live_broadcast_content?: string | null;
|
3805
3797
|
statistics?: YoutubeStatistics | null;
|
3806
3798
|
paywall?: AppPaywallConfiguration | null;
|
3799
|
+
tags?: Array<TagStub>;
|
3807
3800
|
reaction_options?: Array<ReactionOptionGroup>;
|
3808
3801
|
reactions?: Array<ReactionSummary>;
|
3802
|
+
comments?: CommentSummary;
|
3809
3803
|
}
|
3810
3804
|
export interface VideoCollectionResponse {
|
3811
3805
|
page: number;
|
@@ -3814,26 +3808,56 @@ export interface VideoCollectionResponse {
|
|
3814
3808
|
total_count: number;
|
3815
3809
|
data: Array<Video>;
|
3816
3810
|
}
|
3817
|
-
export interface
|
3818
|
-
|
3819
|
-
|
3820
|
-
|
3821
|
-
|
3822
|
-
|
3823
|
-
|
3824
|
-
|
3825
|
-
|
3811
|
+
export interface AppVideoStub {
|
3812
|
+
id: string;
|
3813
|
+
created_at: string;
|
3814
|
+
updated_at: string;
|
3815
|
+
deleted_at?: string | null;
|
3816
|
+
url: string;
|
3817
|
+
video_id: string;
|
3818
|
+
title: string;
|
3819
|
+
channel_title: string;
|
3820
|
+
channel_id: string;
|
3821
|
+
description?: string;
|
3822
|
+
thumbnails: YoutubeThumbnails;
|
3823
|
+
published_at: string;
|
3824
|
+
live_broadcast_content?: string | null;
|
3825
|
+
statistics?: YoutubeStatistics | null;
|
3826
|
+
paywall?: AppPaywallConfiguration | null;
|
3827
|
+
tags?: Array<TagStub>;
|
3828
|
+
reaction_options?: Array<ReactionOptionGroup>;
|
3829
|
+
reactions?: Array<ReactionSummary>;
|
3830
|
+
comments?: CommentSummary;
|
3826
3831
|
}
|
3827
|
-
export interface
|
3832
|
+
export interface AppVideo {
|
3828
3833
|
id: string;
|
3829
3834
|
created_at: string;
|
3830
3835
|
updated_at: string;
|
3831
3836
|
deleted_at?: string | null;
|
3832
|
-
|
3833
|
-
|
3834
|
-
|
3835
|
-
|
3837
|
+
url: string;
|
3838
|
+
video_id: string;
|
3839
|
+
title: string;
|
3840
|
+
channel_title: string;
|
3841
|
+
channel_id: string;
|
3842
|
+
description?: string;
|
3843
|
+
thumbnails: YoutubeThumbnails;
|
3844
|
+
published_at: string;
|
3845
|
+
live_broadcast_content?: string | null;
|
3846
|
+
statistics?: YoutubeStatistics | null;
|
3847
|
+
paywall?: AppPaywallConfiguration | null;
|
3848
|
+
tags?: Array<TagStub>;
|
3849
|
+
reaction_options?: Array<ReactionOptionGroup>;
|
3836
3850
|
reactions?: Array<ReactionSummary>;
|
3851
|
+
comments?: CommentSummary;
|
3852
|
+
products?: Array<AppAffiliateProduct>;
|
3853
|
+
sponsors?: Array<AppSponsor>;
|
3854
|
+
}
|
3855
|
+
export interface AppVideoCollectionResponse {
|
3856
|
+
page: number;
|
3857
|
+
page_count: number;
|
3858
|
+
page_size: number;
|
3859
|
+
total_count: number;
|
3860
|
+
data: Array<AppVideo>;
|
3837
3861
|
}
|
3838
3862
|
export interface CommentCollectionResponse {
|
3839
3863
|
page: number;
|
@@ -6790,6 +6814,9 @@ declare class ParraAPI {
|
|
6790
6814
|
deleteArticleById: (tenant_id: string, article_id: string, options?: Options) => Promise<Response>;
|
6791
6815
|
addAuthorToArticle: (tenant_id: string, article_id: string, body: CreateArticleAuthorRequestBody, options?: Options) => Promise<ArticleAuthor>;
|
6792
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>;
|
6793
6820
|
addTagToArticle: (tenant_id: string, article_id: string, body: AddTagRequestBody, options?: Options) => Promise<TagStub>;
|
6794
6821
|
removeTagFromArticle: (tenant_id: string, article_id: string, tag_id: string, options?: Options) => Promise<Response>;
|
6795
6822
|
publishArticleById: (tenant_id: string, article_id: string, options?: Options) => Promise<Article>;
|
@@ -6798,6 +6825,7 @@ declare class ParraAPI {
|
|
6798
6825
|
limit?: number;
|
6799
6826
|
offset?: number;
|
6800
6827
|
tag_id?: string;
|
6828
|
+
author_id?: string;
|
6801
6829
|
}, options?: Options) => Promise<AppArticleCollectionResponse>;
|
6802
6830
|
getAppArticleById: (tenant_id: string, article_id: string, query?: {
|
6803
6831
|
include?: string;
|
@@ -6946,6 +6974,7 @@ declare class ParraAPI {
|
|
6946
6974
|
offset?: number;
|
6947
6975
|
}, options?: Options) => Promise<CreatorUpdateSenderCollectionResponse>;
|
6948
6976
|
createCreatorUpdateSenderForTenant: (tenant_id: string, body: CreateCreatorUpdateSenderRequestBody, options?: Options) => Promise<CreatorUpdateSender>;
|
6977
|
+
getCreatorUpdateSenderById: (tenant_id: string, creator_update_sender_id: string, options?: Options) => Promise<CreatorUpdateSender>;
|
6949
6978
|
updateCreatorUpdateSenderById: (tenant_id: string, creator_update_sender_id: string, body?: UpdateCreatorUpdateSenderRequestBody, options?: Options) => Promise<CreatorUpdateSender>;
|
6950
6979
|
deleteCreatorUpdateSenderById: (tenant_id: string, creator_update_sender_id: string, options?: Options) => Promise<Response>;
|
6951
6980
|
createCreatorUpdateTemplateForTenant: (tenant_id: string, body: CreateCreatorUpdateTemplateRequestBody, options?: Options) => Promise<CreatorUpdateTemplate>;
|
@@ -7017,6 +7046,7 @@ declare class ParraAPI {
|
|
7017
7046
|
created_at?: string | null;
|
7018
7047
|
}, options?: Options) => Promise<CommentCollectionResponse>;
|
7019
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>;
|
7020
7050
|
addCommentToFeedItem: (tenant_id: string, feed_item_id: string, body: CreateCommentRequestBody, options?: Options) => Promise<Comment>;
|
7021
7051
|
paginateCommentsForFeedItem: (tenant_id: string, feed_item_id: string, query?: {
|
7022
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: {
|
@@ -1493,6 +1509,10 @@ var ParraAPI = /** @class */ (function () {
|
|
1493
1509
|
"content-type": "application/json",
|
1494
1510
|
} }, options));
|
1495
1511
|
};
|
1512
|
+
this.getCreatorUpdateSenderById = function (tenant_id, creator_update_sender_id, options) {
|
1513
|
+
if (options === void 0) { options = {}; }
|
1514
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/senders/").concat(creator_update_sender_id), method: "get" }, options));
|
1515
|
+
};
|
1496
1516
|
this.updateCreatorUpdateSenderById = function (tenant_id, creator_update_sender_id, body, options) {
|
1497
1517
|
if (options === void 0) { options = {}; }
|
1498
1518
|
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/senders/").concat(creator_update_sender_id), method: "put", body: JSON.stringify(body), headers: {
|
@@ -1671,6 +1691,10 @@ var ParraAPI = /** @class */ (function () {
|
|
1671
1691
|
"content-type": "application/json",
|
1672
1692
|
} }, options));
|
1673
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
|
+
};
|
1674
1698
|
this.addCommentToFeedItem = function (tenant_id, feed_item_id, body, options) {
|
1675
1699
|
if (options === void 0) { options = {}; }
|
1676
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: {
|