@parra/parra-js-sdk 0.3.360 → 0.3.362

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.
@@ -556,6 +556,7 @@ export interface ImageAsset {
556
556
  file_type: string;
557
557
  mime_type: string;
558
558
  blur_hash?: string | null;
559
+ thumbnails?: ImageAssetThumbnails | null;
559
560
  }
560
561
  export interface CreateCheckoutSessionRequestBody {
561
562
  plan_id: string;
@@ -1194,6 +1195,49 @@ export interface CreatorUpdateAppStub {
1194
1195
  attachment_paywall?: AppPaywallConfiguration | null;
1195
1196
  }
1196
1197
  export type FeedItemData = YoutubeVideo | ContentCard | CreatorUpdateAppStub;
1198
+ export declare enum ReactionType {
1199
+ emoji = "emoji",
1200
+ custom = "custom"
1201
+ }
1202
+ export interface ReactionOption {
1203
+ id: string;
1204
+ name: string;
1205
+ type: ReactionType;
1206
+ value: string;
1207
+ }
1208
+ export interface ReactionOptionGroup {
1209
+ id: string;
1210
+ name: string;
1211
+ description?: string | null;
1212
+ options: Array<ReactionOption>;
1213
+ }
1214
+ export interface ReactionSummary {
1215
+ id: string;
1216
+ name: string;
1217
+ type: ReactionType;
1218
+ value: string;
1219
+ count: number;
1220
+ reaction_id?: string | null;
1221
+ }
1222
+ export interface AppFeedItem {
1223
+ id: string;
1224
+ created_at: string;
1225
+ updated_at: string;
1226
+ deleted_at?: string | null;
1227
+ tenant_id: string;
1228
+ feed_id: string;
1229
+ type: FeedItemType;
1230
+ data: FeedItemData;
1231
+ reaction_options?: Array<ReactionOptionGroup>;
1232
+ reactions?: Array<ReactionSummary>;
1233
+ }
1234
+ export interface AppFeedItemCollectionResponse {
1235
+ page: number;
1236
+ page_count: number;
1237
+ page_size: number;
1238
+ total_count: number;
1239
+ data: Array<AppFeedItem>;
1240
+ }
1197
1241
  export interface FeedItem {
1198
1242
  id: string;
1199
1243
  created_at: string;
@@ -1202,7 +1246,10 @@ export interface FeedItem {
1202
1246
  tenant_id: string;
1203
1247
  feed_id: string;
1204
1248
  type: FeedItemType;
1249
+ disabled: boolean;
1205
1250
  data: FeedItemData;
1251
+ reaction_options?: Array<ReactionOptionGroup>;
1252
+ reactions?: Array<ReactionSummary>;
1206
1253
  }
1207
1254
  export interface FeedItemCollectionResponse {
1208
1255
  page: number;
@@ -1214,6 +1261,14 @@ export interface FeedItemCollectionResponse {
1214
1261
  export interface UpdateFeedItemRequestBody {
1215
1262
  disabled?: boolean;
1216
1263
  }
1264
+ export interface CreateReactionRequestBody {
1265
+ option_id: string;
1266
+ }
1267
+ export interface Reaction {
1268
+ id: string;
1269
+ option_id: string;
1270
+ user_id: string;
1271
+ }
1217
1272
  export interface SubmitFeedbackFormResponseBody {
1218
1273
  }
1219
1274
  export interface FeedbackFormResponse {
@@ -3909,7 +3964,7 @@ declare class ParraAPI {
3909
3964
  paginateItemsForAppFeed: (tenant_id: string, application_id: string, feed_id_or_slug: string, query?: {
3910
3965
  limit?: number;
3911
3966
  offset?: number;
3912
- }, options?: Options) => Promise<FeedItemCollectionResponse>;
3967
+ }, options?: Options) => Promise<AppFeedItemCollectionResponse>;
3913
3968
  getFeedById: (tenant_id: string, feed_id_or_slug: string, options?: Options) => Promise<FeedView>;
3914
3969
  paginateItemsForFeed: (tenant_id: string, feed_id_or_slug: string, query?: {
3915
3970
  $select?: string;
@@ -3920,8 +3975,10 @@ declare class ParraAPI {
3920
3975
  $expand?: string;
3921
3976
  $search?: string;
3922
3977
  }, options?: Options) => Promise<FeedItemCollectionResponse>;
3923
- updateFeedItem: (tenant_id: string, feed_id_or_slug: string, feed_item_id: string, body?: UpdateFeedItemRequestBody, options?: Options) => Promise<FeedItemCollectionResponse>;
3978
+ updateFeedItem: (tenant_id: string, feed_id_or_slug: string, feed_item_id: string, body?: UpdateFeedItemRequestBody, options?: Options) => Promise<FeedItem>;
3924
3979
  deleteFeedItem: (tenant_id: string, feed_id_or_slug: string, feed_item_id: string, options?: Options) => Promise<Response>;
3980
+ addReactionToFeedItem: (tenant_id: string, feed_item_id: string, body: CreateReactionRequestBody, options?: Options) => Promise<Reaction>;
3981
+ removeReactionFromFeedItem: (tenant_id: string, feed_item_id: string, reaction_id: string, options?: Options) => Promise<Response>;
3925
3982
  paginateFeedbackFormResponsesForTenantUser: (tenant_id: string, user_id: string, query?: {
3926
3983
  $select?: string;
3927
3984
  $top?: number;
package/dist/ParraAPI.js CHANGED
@@ -11,8 +11,8 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.MailTemplateType = exports.IntegrationScope = exports.IntegrationConnectionStatus = exports.IntegrationType = exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.TenantOnboardingGoal = exports.DashboardChecklistItemStatus = exports.DashboardChecklistItemType = exports.RefreshTokenRotationType = exports.RefreshTokenExpirationType = exports.JwtAlgorithm = exports.GrantType = exports.PasswordlessStrategy = exports.SettingsItemType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.TicketLinkType = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.CardItemDisplayType = exports.CardItemType = exports.QuestionKind = exports.QuestionType = exports.FeedItemType = exports.CreatorUpdateChannelType = exports.CreatorUpdateVisibilityType = exports.CreatorUpdateStatus = exports.FeedbackFormFieldType = exports.BillingSourceType = exports.SubscriptionStatus = exports.Interval = exports.Currency = exports.IdentityType = exports.PolicyDocumentType = exports.DomainStatus = exports.DomainType = exports.ApplicationType = exports.ReleaseType = exports.ReleaseStatus = exports.TicketIconType = exports.TicketPriority = exports.TicketStatus = exports.TicketType = void 0;
15
- exports.PolicyDocumentVersionStatus = exports.PolicyDocumentStatus = exports.MailTemplateStatus = exports.MailTemplateVersionStatus = void 0;
14
+ exports.IntegrationScope = exports.IntegrationConnectionStatus = exports.IntegrationType = exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.TenantOnboardingGoal = exports.DashboardChecklistItemStatus = exports.DashboardChecklistItemType = exports.RefreshTokenRotationType = exports.RefreshTokenExpirationType = exports.JwtAlgorithm = exports.GrantType = exports.PasswordlessStrategy = exports.SettingsItemType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.TicketLinkType = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = exports.CampaignActionType = exports.CardItemDisplayType = exports.CardItemType = exports.QuestionKind = exports.QuestionType = exports.ReactionType = exports.FeedItemType = exports.CreatorUpdateChannelType = exports.CreatorUpdateVisibilityType = exports.CreatorUpdateStatus = exports.FeedbackFormFieldType = exports.BillingSourceType = exports.SubscriptionStatus = exports.Interval = exports.Currency = exports.IdentityType = exports.PolicyDocumentType = exports.DomainStatus = exports.DomainType = exports.ApplicationType = exports.ReleaseType = exports.ReleaseStatus = exports.TicketIconType = exports.TicketPriority = exports.TicketStatus = exports.TicketType = void 0;
15
+ exports.PolicyDocumentVersionStatus = exports.PolicyDocumentStatus = exports.MailTemplateStatus = exports.MailTemplateVersionStatus = exports.MailTemplateType = void 0;
16
16
  var TicketType;
17
17
  (function (TicketType) {
18
18
  TicketType["bug"] = "bug";
@@ -151,6 +151,11 @@ var FeedItemType;
151
151
  FeedItemType["contentCard"] = "content_card";
152
152
  FeedItemType["creatorUpdate"] = "creator_update";
153
153
  })(FeedItemType || (exports.FeedItemType = FeedItemType = {}));
154
+ var ReactionType;
155
+ (function (ReactionType) {
156
+ ReactionType["emoji"] = "emoji";
157
+ ReactionType["custom"] = "custom";
158
+ })(ReactionType || (exports.ReactionType = ReactionType = {}));
154
159
  var QuestionType;
155
160
  (function (QuestionType) {
156
161
  QuestionType["choice"] = "choice";
@@ -761,6 +766,16 @@ var ParraAPI = /** @class */ (function () {
761
766
  if (options === void 0) { options = {}; }
762
767
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feeds/").concat(feed_id_or_slug, "/items/").concat(feed_item_id), __assign({ method: "delete" }, options));
763
768
  };
769
+ this.addReactionToFeedItem = function (tenant_id, feed_item_id, body, options) {
770
+ if (options === void 0) { options = {}; }
771
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feed/items/").concat(feed_item_id, "/reactions"), __assign({ method: "post", body: JSON.stringify(body), headers: {
772
+ "content-type": "application/json",
773
+ } }, options));
774
+ };
775
+ this.removeReactionFromFeedItem = function (tenant_id, feed_item_id, reaction_id, options) {
776
+ if (options === void 0) { options = {}; }
777
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feed/items/").concat(feed_item_id, "/reactions/").concat(reaction_id), __assign({ method: "delete" }, options));
778
+ };
764
779
  this.paginateFeedbackFormResponsesForTenantUser = function (tenant_id, user_id, query, options) {
765
780
  if (options === void 0) { options = {}; }
766
781
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id, "/feedback/form/responses"), __assign({ 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.360",
3
+ "version": "0.3.362",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",