@parra/parra-js-sdk 0.3.585 → 0.3.587
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 +36 -17
- package/dist/ParraAPI.js +16 -6
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
@@ -923,13 +923,13 @@ export interface ArticleStub {
|
|
923
923
|
tenant_id: string;
|
924
924
|
title: string;
|
925
925
|
short_title?: string;
|
926
|
-
content_preview
|
926
|
+
content_preview?: string | null;
|
927
927
|
slug: string;
|
928
|
-
header_image?: ImageAssetStub;
|
928
|
+
header_image?: ImageAssetStub | null;
|
929
929
|
status: ArticleStatus;
|
930
|
-
scheduled_at?: string;
|
931
|
-
published_at?: string;
|
932
|
-
last_updated_at: string;
|
930
|
+
scheduled_at?: string | null;
|
931
|
+
published_at?: string | null;
|
932
|
+
last_updated_at: string | null;
|
933
933
|
authors: Array<CreatorUpdateSenderStub>;
|
934
934
|
reaction_options?: Array<ReactionOptionGroup>;
|
935
935
|
reactions?: Array<ReactionSummary>;
|
@@ -942,13 +942,13 @@ export interface Article {
|
|
942
942
|
tenant_id: string;
|
943
943
|
title: string;
|
944
944
|
short_title?: string;
|
945
|
-
content_preview
|
945
|
+
content_preview?: string | null;
|
946
946
|
slug: string;
|
947
|
-
header_image?: ImageAssetStub;
|
947
|
+
header_image?: ImageAssetStub | null;
|
948
948
|
status: ArticleStatus;
|
949
|
-
scheduled_at?: string;
|
950
|
-
published_at?: string;
|
951
|
-
last_updated_at: string;
|
949
|
+
scheduled_at?: string | null;
|
950
|
+
published_at?: string | null;
|
951
|
+
last_updated_at: string | null;
|
952
952
|
authors: Array<CreatorUpdateSenderStub>;
|
953
953
|
reaction_options?: Array<ReactionOptionGroup>;
|
954
954
|
reactions?: Array<ReactionSummary>;
|
@@ -961,6 +961,15 @@ export interface ArticleCollectionResponse {
|
|
961
961
|
total_count: number;
|
962
962
|
data: Array<ArticleStub>;
|
963
963
|
}
|
964
|
+
export interface CreateArticleAuthorRequestBody {
|
965
|
+
creator_id: string;
|
966
|
+
}
|
967
|
+
export interface ArticleAuthor {
|
968
|
+
id: string;
|
969
|
+
name: string;
|
970
|
+
avatar?: ImageAssetStub | null;
|
971
|
+
verified: boolean;
|
972
|
+
}
|
964
973
|
export interface ScheduleArticleRequestBody {
|
965
974
|
schedule_at: string;
|
966
975
|
}
|
@@ -973,8 +982,8 @@ export interface AppArticleStub {
|
|
973
982
|
title: string;
|
974
983
|
short_title?: string;
|
975
984
|
slug: string;
|
976
|
-
content_preview
|
977
|
-
header_image?: ImageAssetStub;
|
985
|
+
content_preview?: string | null;
|
986
|
+
header_image?: ImageAssetStub | null;
|
978
987
|
published_at: string;
|
979
988
|
last_updated_at: string;
|
980
989
|
authors: Array<CreatorUpdateSenderStub>;
|
@@ -1023,8 +1032,8 @@ export interface AppArticle {
|
|
1023
1032
|
title: string;
|
1024
1033
|
short_title?: string;
|
1025
1034
|
slug: string;
|
1026
|
-
content_preview
|
1027
|
-
header_image?: ImageAssetStub;
|
1035
|
+
content_preview?: string | null;
|
1036
|
+
header_image?: ImageAssetStub | null;
|
1028
1037
|
published_at: string;
|
1029
1038
|
last_updated_at: string;
|
1030
1039
|
authors: Array<CreatorUpdateSenderStub>;
|
@@ -6683,14 +6692,24 @@ declare class ParraAPI {
|
|
6683
6692
|
createBillingPortalSession: (tenant_id: string, options?: Options) => Promise<BillingPortalSession>;
|
6684
6693
|
createSubscriberForEmailAudienceById: (email_audience_id: string, body: CreateEmailSubscriberRequestBody, options?: Options) => Promise<Response>;
|
6685
6694
|
createArticle: (tenant_id: string, body: CreateArticleRequestBody, options?: Options) => Promise<Article>;
|
6686
|
-
paginateArticles: (tenant_id: string,
|
6695
|
+
paginateArticles: (tenant_id: string, query?: {
|
6696
|
+
limit?: number;
|
6697
|
+
offset?: number;
|
6698
|
+
}, options?: Options) => Promise<ArticleCollectionResponse>;
|
6687
6699
|
getArticleById: (tenant_id: string, article_id: string, options?: Options) => Promise<Article>;
|
6688
6700
|
updateArticleById: (tenant_id: string, article_id: string, body?: UpdateArticleRequestBody, options?: Options) => Promise<Article>;
|
6689
6701
|
deleteArticleById: (tenant_id: string, article_id: string, options?: Options) => Promise<Response>;
|
6702
|
+
addAuthorToArticle: (tenant_id: string, article_id: string, body: CreateArticleAuthorRequestBody, options?: Options) => Promise<ArticleAuthor>;
|
6703
|
+
removeAuthorFromArticle: (tenant_id: string, article_id: string, author_id: string, options?: Options) => Promise<Response>;
|
6690
6704
|
publishArticleById: (tenant_id: string, article_id: string, options?: Options) => Promise<Article>;
|
6691
6705
|
scheduleArticleById: (tenant_id: string, article_id: string, body: ScheduleArticleRequestBody, options?: Options) => Promise<Article>;
|
6692
|
-
paginateAppArticles: (tenant_id: string,
|
6693
|
-
|
6706
|
+
paginateAppArticles: (tenant_id: string, query?: {
|
6707
|
+
limit?: number;
|
6708
|
+
offset?: number;
|
6709
|
+
}, options?: Options) => Promise<AppArticleCollectionResponse>;
|
6710
|
+
getAppArticleById: (tenant_id: string, article_id: string, query?: {
|
6711
|
+
include?: string;
|
6712
|
+
}, options?: Options) => Promise<AppArticle>;
|
6694
6713
|
createDesignSystem: (tenant_id: string, body: CreateDesignSystemRequestBody, options?: Options) => Promise<DesignSystem>;
|
6695
6714
|
listDesignSystems: (tenant_id: string, options?: Options) => Promise<Array<DesignSystem>>;
|
6696
6715
|
getDesignSystemJson: (tenant_id: string, design_system_id: string, options?: Options) => Promise<DesignSystem>;
|
package/dist/ParraAPI.js
CHANGED
@@ -840,9 +840,9 @@ var ParraAPI = /** @class */ (function () {
|
|
840
840
|
"content-type": "application/json",
|
841
841
|
} }, options));
|
842
842
|
};
|
843
|
-
this.paginateArticles = function (tenant_id, options) {
|
843
|
+
this.paginateArticles = function (tenant_id, query, options) {
|
844
844
|
if (options === void 0) { options = {}; }
|
845
|
-
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles"), method: "get" }, options));
|
845
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles"), method: "get", query: query }, options));
|
846
846
|
};
|
847
847
|
this.getArticleById = function (tenant_id, article_id, options) {
|
848
848
|
if (options === void 0) { options = {}; }
|
@@ -858,6 +858,16 @@ var ParraAPI = /** @class */ (function () {
|
|
858
858
|
if (options === void 0) { options = {}; }
|
859
859
|
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles/").concat(article_id), method: "delete" }, options));
|
860
860
|
};
|
861
|
+
this.addAuthorToArticle = function (tenant_id, article_id, body, options) {
|
862
|
+
if (options === void 0) { options = {}; }
|
863
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles/").concat(article_id, "/authors"), method: "post", body: JSON.stringify(body), headers: {
|
864
|
+
"content-type": "application/json",
|
865
|
+
} }, options));
|
866
|
+
};
|
867
|
+
this.removeAuthorFromArticle = function (tenant_id, article_id, author_id, options) {
|
868
|
+
if (options === void 0) { options = {}; }
|
869
|
+
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));
|
870
|
+
};
|
861
871
|
this.publishArticleById = function (tenant_id, article_id, options) {
|
862
872
|
if (options === void 0) { options = {}; }
|
863
873
|
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/articles/").concat(article_id, "/publish"), method: "post" }, options));
|
@@ -868,13 +878,13 @@ var ParraAPI = /** @class */ (function () {
|
|
868
878
|
"content-type": "application/json",
|
869
879
|
} }, options));
|
870
880
|
};
|
871
|
-
this.paginateAppArticles = function (tenant_id, options) {
|
881
|
+
this.paginateAppArticles = function (tenant_id, query, options) {
|
872
882
|
if (options === void 0) { options = {}; }
|
873
|
-
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/app/articles"), method: "get" }, options));
|
883
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/app/articles"), method: "get", query: query }, options));
|
874
884
|
};
|
875
|
-
this.getAppArticleById = function (tenant_id, article_id, options) {
|
885
|
+
this.getAppArticleById = function (tenant_id, article_id, query, options) {
|
876
886
|
if (options === void 0) { options = {}; }
|
877
|
-
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/app/articles/").concat(article_id), method: "get" }, options));
|
887
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/app/articles/").concat(article_id), method: "get", query: query }, options));
|
878
888
|
};
|
879
889
|
this.createDesignSystem = function (tenant_id, body, options) {
|
880
890
|
if (options === void 0) { options = {}; }
|