@parra/parra-js-sdk 0.3.538 → 0.3.540

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.
@@ -2336,6 +2336,16 @@ export interface UpdateFeedRequestBody {
2336
2336
  slug?: string;
2337
2337
  description?: string | null;
2338
2338
  }
2339
+ export interface CreateYoutubeVideoFeedItemRequestBody {
2340
+ type: string;
2341
+ youtube_video_id?: string;
2342
+ youtube_video_url?: string;
2343
+ }
2344
+ export interface CreateContentCardFeedItemRequestBody {
2345
+ type: string;
2346
+ content_card_id: string;
2347
+ }
2348
+ export type CreateFeedItemRequestBody = CreateYoutubeVideoFeedItemRequestBody | CreateContentCardFeedItemRequestBody;
2339
2349
  export interface FeedItem {
2340
2350
  id: string;
2341
2351
  created_at: string;
@@ -5475,6 +5485,7 @@ declare class ParraAPI {
5475
5485
  getFeedById: (tenant_id: string, feed_id_or_slug: string, options?: Options) => Promise<FeedView>;
5476
5486
  updateFeedById: (tenant_id: string, feed_id_or_slug: string, body?: UpdateFeedRequestBody, options?: Options) => Promise<FeedView>;
5477
5487
  deleteFeedById: (tenant_id: string, feed_id_or_slug: string, options?: Options) => Promise<Response>;
5488
+ createFeedItem: (tenant_id: string, feed_id_or_slug: string, body?: CreateFeedItemRequestBody, options?: Options) => Promise<FeedItem>;
5478
5489
  paginateItemsForFeed: (tenant_id: string, feed_id_or_slug: string, query?: {
5479
5490
  limit?: number;
5480
5491
  offset?: number;
package/dist/ParraAPI.js CHANGED
@@ -1338,6 +1338,12 @@ var ParraAPI = /** @class */ (function () {
1338
1338
  if (options === void 0) { options = {}; }
1339
1339
  return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feeds/").concat(feed_id_or_slug), method: "delete" }, options));
1340
1340
  };
1341
+ this.createFeedItem = function (tenant_id, feed_id_or_slug, body, options) {
1342
+ if (options === void 0) { options = {}; }
1343
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feeds/").concat(feed_id_or_slug, "/items"), method: "post", body: JSON.stringify(body), headers: {
1344
+ "content-type": "application/json",
1345
+ } }, options));
1346
+ };
1341
1347
  this.paginateItemsForFeed = function (tenant_id, feed_id_or_slug, query, options) {
1342
1348
  if (options === void 0) { options = {}; }
1343
1349
  return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feeds/").concat(feed_id_or_slug, "/items"), method: "get", query: query }, options));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.538",
3
+ "version": "0.3.540",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",