@parra/parra-js-sdk 0.3.361 → 0.3.363

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.
@@ -1008,19 +1008,46 @@ export interface FaqSectionItemStub {
1008
1008
  faq_id: string;
1009
1009
  section_id: string;
1010
1010
  }
1011
- export interface CreateCreatorAttachmentAttachmentRequestBody {
1011
+ export interface CreatorUpdateSender {
1012
1012
  id: string;
1013
- size: Size;
1014
- url: string;
1015
- blur_hash?: string | null;
1016
- thumbnails?: ImageAssetThumbnails | null;
1013
+ created_at: string;
1014
+ updated_at: string;
1015
+ deleted_at?: string | null;
1016
+ tenant_id: string;
1017
+ name: string;
1018
+ avatar?: ImageAssetStub | null;
1019
+ verified?: boolean;
1017
1020
  }
1018
- export interface CreateCreatorUpdateRequestBody {
1019
- publish?: boolean | null;
1020
- template_id?: string | null;
1021
- title: string;
1022
- body?: string | null;
1023
- attachments?: Array<CreateCreatorAttachmentAttachmentRequestBody>;
1021
+ export interface CreatorUpdateSenderCollectionResponse {
1022
+ page: number;
1023
+ page_count: number;
1024
+ page_size: number;
1025
+ total_count: number;
1026
+ data: Array<CreatorUpdateSender>;
1027
+ }
1028
+ export interface CreateCreatorUpdateSenderRequestBody {
1029
+ name: string;
1030
+ avatar?: ImageAssetStub | null;
1031
+ verified: boolean;
1032
+ }
1033
+ export interface UpdateCreatorUpdateSenderRequestBody {
1034
+ name?: string;
1035
+ avatar?: ImageAssetStub | null;
1036
+ verified?: boolean;
1037
+ }
1038
+ export declare enum CreatorUpdateVisibilityType {
1039
+ public = "public",
1040
+ private = "private"
1041
+ }
1042
+ export interface CreateCreatorUpdateTemplateRequestBody {
1043
+ name: string;
1044
+ description?: string | null;
1045
+ sender_id: string;
1046
+ feed_view_id: string;
1047
+ notification_template_id: string;
1048
+ entitlement_id?: string | null;
1049
+ post_visibility?: CreatorUpdateVisibilityType;
1050
+ attachment_visibility?: CreatorUpdateVisibilityType;
1024
1051
  }
1025
1052
  export declare enum CreatorUpdateStatus {
1026
1053
  draft = "draft",
@@ -1036,10 +1063,6 @@ export interface CreatorUpdateAttachmentStub {
1036
1063
  id: string;
1037
1064
  image?: ImageAssetStub | null;
1038
1065
  }
1039
- export declare enum CreatorUpdateVisibilityType {
1040
- public = "public",
1041
- private = "private"
1042
- }
1043
1066
  export interface CreatorUpdateVisibility {
1044
1067
  entitlement_id?: string | null;
1045
1068
  post_visibility: CreatorUpdateVisibilityType;
@@ -1084,6 +1107,50 @@ export interface CreatorUpdate {
1084
1107
  visibility: CreatorUpdateVisibility;
1085
1108
  channels: Array<CreatorUpdateChannel>;
1086
1109
  }
1110
+ export interface CreatorUpdateTemplate {
1111
+ id: string;
1112
+ created_at: string;
1113
+ updated_at: string;
1114
+ deleted_at?: string | null;
1115
+ tenant_id: string;
1116
+ sender_id?: string;
1117
+ feed_view_id?: string;
1118
+ notification_template_id?: string;
1119
+ name: string;
1120
+ description?: string;
1121
+ visibility: CreatorUpdateVisibility;
1122
+ }
1123
+ export interface CreatorUpdateTemplateCollectionResponse {
1124
+ page: number;
1125
+ page_count: number;
1126
+ page_size: number;
1127
+ total_count: number;
1128
+ data: Array<CreatorUpdateTemplate>;
1129
+ }
1130
+ export interface UpdateCreatorUpdateTemplateRequestBody {
1131
+ name?: string;
1132
+ description?: string | null;
1133
+ sender_id?: string;
1134
+ feed_view_id?: string;
1135
+ notification_template_id?: string;
1136
+ entitlement_id?: string | null;
1137
+ post_visibility?: CreatorUpdateVisibilityType;
1138
+ attachment_visibility?: CreatorUpdateVisibilityType;
1139
+ }
1140
+ export interface CreateCreatorAttachmentAttachmentRequestBody {
1141
+ id: string;
1142
+ size: Size;
1143
+ url: string;
1144
+ blur_hash?: string | null;
1145
+ thumbnails?: ImageAssetThumbnails | null;
1146
+ }
1147
+ export interface CreateCreatorUpdateRequestBody {
1148
+ publish?: boolean | null;
1149
+ template_id?: string | null;
1150
+ title: string;
1151
+ body?: string | null;
1152
+ attachments?: Array<CreateCreatorAttachmentAttachmentRequestBody>;
1153
+ }
1087
1154
  export interface CreatorUpdateCollectionResponse {
1088
1155
  page: number;
1089
1156
  page_count: number;
@@ -1195,6 +1262,49 @@ export interface CreatorUpdateAppStub {
1195
1262
  attachment_paywall?: AppPaywallConfiguration | null;
1196
1263
  }
1197
1264
  export type FeedItemData = YoutubeVideo | ContentCard | CreatorUpdateAppStub;
1265
+ export declare enum ReactionType {
1266
+ emoji = "emoji",
1267
+ custom = "custom"
1268
+ }
1269
+ export interface ReactionOption {
1270
+ id: string;
1271
+ name: string;
1272
+ type: ReactionType;
1273
+ value: string;
1274
+ }
1275
+ export interface ReactionOptionGroup {
1276
+ id: string;
1277
+ name: string;
1278
+ description?: string | null;
1279
+ options: Array<ReactionOption>;
1280
+ }
1281
+ export interface ReactionSummary {
1282
+ id: string;
1283
+ name: string;
1284
+ type: ReactionType;
1285
+ value: string;
1286
+ count: number;
1287
+ reaction_id?: string | null;
1288
+ }
1289
+ export interface AppFeedItem {
1290
+ id: string;
1291
+ created_at: string;
1292
+ updated_at: string;
1293
+ deleted_at?: string | null;
1294
+ tenant_id: string;
1295
+ feed_id: string;
1296
+ type: FeedItemType;
1297
+ data: FeedItemData;
1298
+ reaction_options?: Array<ReactionOptionGroup>;
1299
+ reactions?: Array<ReactionSummary>;
1300
+ }
1301
+ export interface AppFeedItemCollectionResponse {
1302
+ page: number;
1303
+ page_count: number;
1304
+ page_size: number;
1305
+ total_count: number;
1306
+ data: Array<AppFeedItem>;
1307
+ }
1198
1308
  export interface FeedItem {
1199
1309
  id: string;
1200
1310
  created_at: string;
@@ -1203,7 +1313,10 @@ export interface FeedItem {
1203
1313
  tenant_id: string;
1204
1314
  feed_id: string;
1205
1315
  type: FeedItemType;
1316
+ disabled: boolean;
1206
1317
  data: FeedItemData;
1318
+ reaction_options?: Array<ReactionOptionGroup>;
1319
+ reactions?: Array<ReactionSummary>;
1207
1320
  }
1208
1321
  export interface FeedItemCollectionResponse {
1209
1322
  page: number;
@@ -1215,6 +1328,14 @@ export interface FeedItemCollectionResponse {
1215
1328
  export interface UpdateFeedItemRequestBody {
1216
1329
  disabled?: boolean;
1217
1330
  }
1331
+ export interface CreateReactionRequestBody {
1332
+ option_id: string;
1333
+ }
1334
+ export interface Reaction {
1335
+ id: string;
1336
+ option_id: string;
1337
+ user_id: string;
1338
+ }
1218
1339
  export interface SubmitFeedbackFormResponseBody {
1219
1340
  }
1220
1341
  export interface FeedbackFormResponse {
@@ -3883,6 +4004,30 @@ declare class ParraAPI {
3883
4004
  deleteFaqSectionById: (tenant_id: string, faq_view_id: string, faq_section_id: string, options?: Options) => Promise<Response>;
3884
4005
  addFaqToSection: (tenant_id: string, faq_view_id: string, faq_section_id: string, body: AddFaqToSectionRequestBody, options?: Options) => Promise<FaqSectionItemStub>;
3885
4006
  removeFaqFromSection: (tenant_id: string, faq_view_id: string, faq_section_id: string, faq_section_item_id: string, options?: Options) => Promise<Response>;
4007
+ paginateCreatorUpdateSendersForTenant: (tenant_id: string, query?: {
4008
+ $select?: string;
4009
+ $top?: number;
4010
+ $skip?: number;
4011
+ $orderby?: string;
4012
+ $filter?: string;
4013
+ $expand?: string;
4014
+ $search?: string;
4015
+ }, options?: Options) => Promise<CreatorUpdateSenderCollectionResponse>;
4016
+ createCreatorUpdateSenderForTenant: (tenant_id: string, body: CreateCreatorUpdateSenderRequestBody, options?: Options) => Promise<CreatorUpdateSender>;
4017
+ updateCreatorUpdateSenderById: (tenant_id: string, creator_update_sender_id: string, body?: UpdateCreatorUpdateSenderRequestBody, options?: Options) => Promise<CreatorUpdateSender>;
4018
+ deleteCreatorUpdateSenderById: (tenant_id: string, creator_update_sender_id: string, options?: Options) => Promise<Response>;
4019
+ createCreatorUpdateTemplateForTenant: (tenant_id: string, body: CreateCreatorUpdateTemplateRequestBody, options?: Options) => Promise<CreatorUpdate>;
4020
+ paginateCreatorUpdateTemplatesForTenant: (tenant_id: string, query?: {
4021
+ $select?: string;
4022
+ $top?: number;
4023
+ $skip?: number;
4024
+ $orderby?: string;
4025
+ $filter?: string;
4026
+ $expand?: string;
4027
+ $search?: string;
4028
+ }, options?: Options) => Promise<CreatorUpdateTemplateCollectionResponse>;
4029
+ updateCreatorUpdateTemplateById: (tenant_id: string, creator_update_template_id: string, body?: UpdateCreatorUpdateTemplateRequestBody, options?: Options) => Promise<CreatorUpdateTemplate>;
4030
+ deleteCreatorUpdateTemplateById: (tenant_id: string, creator_update_template_id: string, options?: Options) => Promise<Response>;
3886
4031
  createCreatorUpdateForTenant: (tenant_id: string, body: CreateCreatorUpdateRequestBody, options?: Options) => Promise<CreatorUpdate>;
3887
4032
  paginateCreatorUpdatesForTenant: (tenant_id: string, query?: {
3888
4033
  $select?: string;
@@ -3910,7 +4055,7 @@ declare class ParraAPI {
3910
4055
  paginateItemsForAppFeed: (tenant_id: string, application_id: string, feed_id_or_slug: string, query?: {
3911
4056
  limit?: number;
3912
4057
  offset?: number;
3913
- }, options?: Options) => Promise<FeedItemCollectionResponse>;
4058
+ }, options?: Options) => Promise<AppFeedItemCollectionResponse>;
3914
4059
  getFeedById: (tenant_id: string, feed_id_or_slug: string, options?: Options) => Promise<FeedView>;
3915
4060
  paginateItemsForFeed: (tenant_id: string, feed_id_or_slug: string, query?: {
3916
4061
  $select?: string;
@@ -3921,8 +4066,10 @@ declare class ParraAPI {
3921
4066
  $expand?: string;
3922
4067
  $search?: string;
3923
4068
  }, options?: Options) => Promise<FeedItemCollectionResponse>;
3924
- updateFeedItem: (tenant_id: string, feed_id_or_slug: string, feed_item_id: string, body?: UpdateFeedItemRequestBody, options?: Options) => Promise<FeedItemCollectionResponse>;
4069
+ updateFeedItem: (tenant_id: string, feed_id_or_slug: string, feed_item_id: string, body?: UpdateFeedItemRequestBody, options?: Options) => Promise<FeedItem>;
3925
4070
  deleteFeedItem: (tenant_id: string, feed_id_or_slug: string, feed_item_id: string, options?: Options) => Promise<Response>;
4071
+ addReactionToFeedItem: (tenant_id: string, feed_item_id: string, body: CreateReactionRequestBody, options?: Options) => Promise<Reaction>;
4072
+ removeReactionFromFeedItem: (tenant_id: string, feed_item_id: string, reaction_id: string, options?: Options) => Promise<Response>;
3926
4073
  paginateFeedbackFormResponsesForTenantUser: (tenant_id: string, user_id: string, query?: {
3927
4074
  $select?: string;
3928
4075
  $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.CreatorUpdateStatus = exports.CreatorUpdateVisibilityType = 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";
@@ -130,16 +130,16 @@ var FeedbackFormFieldType;
130
130
  FeedbackFormFieldType["input"] = "input";
131
131
  FeedbackFormFieldType["select"] = "select";
132
132
  })(FeedbackFormFieldType || (exports.FeedbackFormFieldType = FeedbackFormFieldType = {}));
133
- var CreatorUpdateStatus;
134
- (function (CreatorUpdateStatus) {
135
- CreatorUpdateStatus["draft"] = "draft";
136
- CreatorUpdateStatus["published"] = "published";
137
- })(CreatorUpdateStatus || (exports.CreatorUpdateStatus = CreatorUpdateStatus = {}));
138
133
  var CreatorUpdateVisibilityType;
139
134
  (function (CreatorUpdateVisibilityType) {
140
135
  CreatorUpdateVisibilityType["public"] = "public";
141
136
  CreatorUpdateVisibilityType["private"] = "private";
142
137
  })(CreatorUpdateVisibilityType || (exports.CreatorUpdateVisibilityType = CreatorUpdateVisibilityType = {}));
138
+ var CreatorUpdateStatus;
139
+ (function (CreatorUpdateStatus) {
140
+ CreatorUpdateStatus["draft"] = "draft";
141
+ CreatorUpdateStatus["published"] = "published";
142
+ })(CreatorUpdateStatus || (exports.CreatorUpdateStatus = CreatorUpdateStatus = {}));
143
143
  var CreatorUpdateChannelType;
144
144
  (function (CreatorUpdateChannelType) {
145
145
  CreatorUpdateChannelType["feed"] = "feed";
@@ -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";
@@ -703,6 +708,46 @@ var ParraAPI = /** @class */ (function () {
703
708
  if (options === void 0) { options = {}; }
704
709
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/faqs/views/").concat(faq_view_id, "/sections/").concat(faq_section_id, "/items/").concat(faq_section_item_id), __assign({ method: "delete" }, options));
705
710
  };
711
+ this.paginateCreatorUpdateSendersForTenant = function (tenant_id, query, options) {
712
+ if (options === void 0) { options = {}; }
713
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/senders"), __assign({ method: "get", query: query }, options));
714
+ };
715
+ this.createCreatorUpdateSenderForTenant = function (tenant_id, body, options) {
716
+ if (options === void 0) { options = {}; }
717
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/senders"), __assign({ method: "post", body: JSON.stringify(body), headers: {
718
+ "content-type": "application/json",
719
+ } }, options));
720
+ };
721
+ this.updateCreatorUpdateSenderById = function (tenant_id, creator_update_sender_id, body, options) {
722
+ if (options === void 0) { options = {}; }
723
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/senders/").concat(creator_update_sender_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
724
+ "content-type": "application/json",
725
+ } }, options));
726
+ };
727
+ this.deleteCreatorUpdateSenderById = function (tenant_id, creator_update_sender_id, options) {
728
+ if (options === void 0) { options = {}; }
729
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/senders/").concat(creator_update_sender_id), __assign({ method: "delete" }, options));
730
+ };
731
+ this.createCreatorUpdateTemplateForTenant = function (tenant_id, body, options) {
732
+ if (options === void 0) { options = {}; }
733
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/templates"), __assign({ method: "post", body: JSON.stringify(body), headers: {
734
+ "content-type": "application/json",
735
+ } }, options));
736
+ };
737
+ this.paginateCreatorUpdateTemplatesForTenant = function (tenant_id, query, options) {
738
+ if (options === void 0) { options = {}; }
739
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/templates"), __assign({ method: "get", query: query }, options));
740
+ };
741
+ this.updateCreatorUpdateTemplateById = function (tenant_id, creator_update_template_id, body, options) {
742
+ if (options === void 0) { options = {}; }
743
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/templates/").concat(creator_update_template_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
744
+ "content-type": "application/json",
745
+ } }, options));
746
+ };
747
+ this.deleteCreatorUpdateTemplateById = function (tenant_id, creator_update_template_id, options) {
748
+ if (options === void 0) { options = {}; }
749
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/templates/").concat(creator_update_template_id), __assign({ method: "delete" }, options));
750
+ };
706
751
  this.createCreatorUpdateForTenant = function (tenant_id, body, options) {
707
752
  if (options === void 0) { options = {}; }
708
753
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates"), __assign({ method: "post", body: JSON.stringify(body), headers: {
@@ -761,6 +806,16 @@ var ParraAPI = /** @class */ (function () {
761
806
  if (options === void 0) { options = {}; }
762
807
  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
808
  };
809
+ this.addReactionToFeedItem = function (tenant_id, feed_item_id, body, options) {
810
+ if (options === void 0) { options = {}; }
811
+ 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: {
812
+ "content-type": "application/json",
813
+ } }, options));
814
+ };
815
+ this.removeReactionFromFeedItem = function (tenant_id, feed_item_id, reaction_id, options) {
816
+ if (options === void 0) { options = {}; }
817
+ 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));
818
+ };
764
819
  this.paginateFeedbackFormResponsesForTenantUser = function (tenant_id, user_id, query, options) {
765
820
  if (options === void 0) { options = {}; }
766
821
  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.361",
3
+ "version": "0.3.363",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",