@parra/parra-js-sdk 0.3.614 → 0.3.616
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 +21 -3
- package/dist/ParraAPI.js +8 -2
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
@@ -1740,6 +1740,13 @@ export interface Product {
|
|
1740
1740
|
sort_order?: number;
|
1741
1741
|
entitlements?: Array<ProductEntitlement> | null;
|
1742
1742
|
}
|
1743
|
+
export interface ProductCollectionResponse {
|
1744
|
+
page: number;
|
1745
|
+
page_count: number;
|
1746
|
+
page_size: number;
|
1747
|
+
total_count: number;
|
1748
|
+
data: Array<Product>;
|
1749
|
+
}
|
1743
1750
|
export interface UpdateProductRequestBody {
|
1744
1751
|
title?: string;
|
1745
1752
|
key?: string;
|
@@ -3799,8 +3806,8 @@ export interface UpdateFeedRequestBody {
|
|
3799
3806
|
}
|
3800
3807
|
export interface CreateYoutubeVideoFeedItemRequestBody {
|
3801
3808
|
type: string;
|
3802
|
-
youtube_video_id?: string;
|
3803
|
-
youtube_video_url?: string;
|
3809
|
+
youtube_video_id?: string | null;
|
3810
|
+
youtube_video_url?: string | null;
|
3804
3811
|
}
|
3805
3812
|
export interface CreateContentCardFeedItemRequestBody {
|
3806
3813
|
type: string;
|
@@ -3836,6 +3843,12 @@ export interface UpdateFeedItemRequestBody {
|
|
3836
3843
|
comments_disabled?: boolean;
|
3837
3844
|
reactions_disabled?: boolean;
|
3838
3845
|
}
|
3846
|
+
export interface CreateYoutubeVideoRequestBody {
|
3847
|
+
type: string;
|
3848
|
+
youtube_video_id?: string | null;
|
3849
|
+
youtube_video_url?: string | null;
|
3850
|
+
}
|
3851
|
+
export type CreateVideoRequestBody = CreateYoutubeVideoRequestBody;
|
3839
3852
|
export interface VideoStub {
|
3840
3853
|
id: string;
|
3841
3854
|
created_at: string;
|
@@ -7055,7 +7068,11 @@ declare class ParraAPI {
|
|
7055
7068
|
updateEntitlementById: (tenant_id: string, entitlement_id: string, body?: UpdateEntitlementRequestBody, options?: Options) => Promise<Entitlement>;
|
7056
7069
|
deleteEntitlementById: (tenant_id: string, entitlement_id: string, options?: Options) => Promise<Response>;
|
7057
7070
|
createProduct: (tenant_id: string, body?: CreateProductRequestBody, options?: Options) => Promise<Product>;
|
7058
|
-
|
7071
|
+
paginateProducts: (tenant_id: string, query?: {
|
7072
|
+
limit?: number;
|
7073
|
+
offset?: number;
|
7074
|
+
type?: string | null;
|
7075
|
+
}, options?: Options) => Promise<ProductCollectionResponse>;
|
7059
7076
|
getProductById: (tenant_id: string, product_id: string, options?: Options) => Promise<Product>;
|
7060
7077
|
updateProductById: (tenant_id: string, product_id: string, body?: UpdateProductRequestBody, options?: Options) => Promise<Product>;
|
7061
7078
|
deleteProductById: (tenant_id: string, product_id: string, options?: Options) => Promise<Response>;
|
@@ -7204,6 +7221,7 @@ declare class ParraAPI {
|
|
7204
7221
|
updateFeedItem: (tenant_id: string, feed_id_or_slug: string, feed_item_id: string, body?: UpdateFeedItemRequestBody, options?: Options) => Promise<FeedItem>;
|
7205
7222
|
deleteFeedItem: (tenant_id: string, feed_id_or_slug: string, feed_item_id: string, options?: Options) => Promise<Response>;
|
7206
7223
|
getFeedItem: (tenant_id: string, feed_item_id: string, options?: Options) => Promise<FeedItem>;
|
7224
|
+
createVideoForTenant: (tenant_id: string, body?: CreateVideoRequestBody, options?: Options) => Promise<Video>;
|
7207
7225
|
paginateVideosForTenant: (tenant_id: string, query?: {
|
7208
7226
|
limit?: number;
|
7209
7227
|
offset?: number;
|
package/dist/ParraAPI.js
CHANGED
@@ -1168,9 +1168,9 @@ var ParraAPI = /** @class */ (function () {
|
|
1168
1168
|
"content-type": "application/json",
|
1169
1169
|
} }, options));
|
1170
1170
|
};
|
1171
|
-
this.
|
1171
|
+
this.paginateProducts = function (tenant_id, query, options) {
|
1172
1172
|
if (options === void 0) { options = {}; }
|
1173
|
-
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/products"), method: "get" }, options));
|
1173
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/products"), method: "get", query: query }, options));
|
1174
1174
|
};
|
1175
1175
|
this.getProductById = function (tenant_id, product_id, options) {
|
1176
1176
|
if (options === void 0) { options = {}; }
|
@@ -1686,6 +1686,12 @@ var ParraAPI = /** @class */ (function () {
|
|
1686
1686
|
if (options === void 0) { options = {}; }
|
1687
1687
|
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feed/items/").concat(feed_item_id), method: "get" }, options));
|
1688
1688
|
};
|
1689
|
+
this.createVideoForTenant = function (tenant_id, body, options) {
|
1690
|
+
if (options === void 0) { options = {}; }
|
1691
|
+
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/videos"), method: "post", body: JSON.stringify(body), headers: {
|
1692
|
+
"content-type": "application/json",
|
1693
|
+
} }, options));
|
1694
|
+
};
|
1689
1695
|
this.paginateVideosForTenant = function (tenant_id, query, options) {
|
1690
1696
|
if (options === void 0) { options = {}; }
|
1691
1697
|
return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/videos"), method: "get", query: query }, options));
|