@parra/parra-js-sdk 0.3.373 → 0.3.375

Sign up to get free protection for your applications and to get access to all the features.
@@ -713,10 +713,15 @@ export interface UserEntitlement {
713
713
  entitlement_id: string;
714
714
  key: string;
715
715
  title: string;
716
+ note?: string | null;
716
717
  }
717
718
  export interface AppPurchaseResponseBody {
718
719
  entitlements: Array<UserEntitlement>;
719
720
  }
721
+ export interface CreateUserEntitlementRequestBody {
722
+ entitlement_ids?: Array<string>;
723
+ note?: string | null;
724
+ }
720
725
  export declare enum BillingSourceType {
721
726
  stripe = "stripe",
722
727
  paypal = "paypal",
@@ -1386,6 +1391,40 @@ export interface UpdateCommentRequestBody {
1386
1391
  export interface FlagCommentRequestBody {
1387
1392
  reason?: string | null;
1388
1393
  }
1394
+ export declare enum CommentReviewStatus {
1395
+ pending = "pending",
1396
+ approved = "approved",
1397
+ rejected = "rejected"
1398
+ }
1399
+ export interface CommentReview {
1400
+ id: string;
1401
+ created_at: string;
1402
+ updated_at: string;
1403
+ deleted_at?: string | null;
1404
+ tenant_id: string;
1405
+ comment_id: string;
1406
+ comment: Comment;
1407
+ status: CommentReviewStatus;
1408
+ report_count: number;
1409
+ reviewed_at?: string | null;
1410
+ reviewed_by_user_id?: string | null;
1411
+ review_comment?: string | null;
1412
+ }
1413
+ export interface CommentReviewCollectionResponse {
1414
+ page: number;
1415
+ page_count: number;
1416
+ page_size: number;
1417
+ total_count: number;
1418
+ data: Array<CommentReview>;
1419
+ }
1420
+ export declare enum SubmitCommentReviewStatus {
1421
+ approved = "approved",
1422
+ rejected = "rejected"
1423
+ }
1424
+ export interface SubmitCommentReviewRequestBody {
1425
+ status: SubmitCommentReviewStatus;
1426
+ note?: string | null;
1427
+ }
1389
1428
  export interface CreateReactionRequestBody {
1390
1429
  option_id: string;
1391
1430
  }
@@ -3606,6 +3645,11 @@ export interface UpdateTenantUserRequestBody {
3606
3645
  name?: string | null;
3607
3646
  first_name?: string | null;
3608
3647
  last_name?: string | null;
3648
+ verified?: boolean | null;
3649
+ is_blocked?: boolean | null;
3650
+ is_anonymous?: boolean | null;
3651
+ is_internal?: boolean | null;
3652
+ is_test?: boolean | null;
3609
3653
  properties?: object | null;
3610
3654
  }
3611
3655
  export interface UserDevice {
@@ -4057,6 +4101,7 @@ declare class ParraAPI {
4057
4101
  context?: string;
4058
4102
  }, options?: Options) => Promise<AppPaywall>;
4059
4103
  createPurchaseForTenantApplication: (tenant_id: string, application_id: string, body?: CreateAppPurchaseRequestBody, options?: Options) => Promise<AppPurchaseResponseBody>;
4104
+ createEntitlementForTenantUserById: (tenant_id: string, user_id: string, body: CreateUserEntitlementRequestBody, options?: Options) => Promise<Response>;
4060
4105
  listEntitlementsForTenantUserById: (tenant_id: string, user_id: string, options?: Options) => Promise<Array<UserEntitlement>>;
4061
4106
  createBillingSource: (tenant_id: string, body: CreateBillingSourceRequestBody, options?: Options) => Promise<BillingSource>;
4062
4107
  listBillingSources: (tenant_id: string, options?: Options) => Promise<Array<BillingSource>>;
@@ -4175,6 +4220,16 @@ declare class ParraAPI {
4175
4220
  updateCommentForFeedItem: (tenant_id: string, comment_id: string, body?: UpdateCommentRequestBody, options?: Options) => Promise<Comment>;
4176
4221
  removeCommentFromFeedItem: (tenant_id: string, comment_id: string, options?: Options) => Promise<Response>;
4177
4222
  flagComment: (tenant_id: string, comment_id: string, body?: FlagCommentRequestBody, options?: Options) => Promise<Response>;
4223
+ paginateCommentReviewsForTenant: (tenant_id: string, query?: {
4224
+ $select?: string;
4225
+ $top?: number;
4226
+ $skip?: number;
4227
+ $orderby?: string;
4228
+ $filter?: string;
4229
+ $expand?: string;
4230
+ $search?: string;
4231
+ }, options?: Options) => Promise<CommentReviewCollectionResponse>;
4232
+ submitCommentReview: (tenant_id: string, comment_review_id: string, body: SubmitCommentReviewRequestBody, options?: Options) => Promise<CommentReview>;
4178
4233
  addReactionToComment: (tenant_id: string, comment_id: string, body: CreateReactionRequestBody, options?: Options) => Promise<Reaction>;
4179
4234
  removeReactionFromComment: (tenant_id: string, comment_id: string, reaction_id: string, options?: Options) => Promise<Response>;
4180
4235
  addReactionToFeedItem: (tenant_id: string, feed_item_id: string, body: CreateReactionRequestBody, options?: Options) => Promise<Reaction>;
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.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;
14
+ 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.SubmitCommentReviewStatus = exports.CommentReviewStatus = 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 = exports.IntegrationScope = exports.IntegrationConnectionStatus = void 0;
16
16
  var TicketType;
17
17
  (function (TicketType) {
18
18
  TicketType["bug"] = "bug";
@@ -156,6 +156,17 @@ var ReactionType;
156
156
  ReactionType["emoji"] = "emoji";
157
157
  ReactionType["custom"] = "custom";
158
158
  })(ReactionType || (exports.ReactionType = ReactionType = {}));
159
+ var CommentReviewStatus;
160
+ (function (CommentReviewStatus) {
161
+ CommentReviewStatus["pending"] = "pending";
162
+ CommentReviewStatus["approved"] = "approved";
163
+ CommentReviewStatus["rejected"] = "rejected";
164
+ })(CommentReviewStatus || (exports.CommentReviewStatus = CommentReviewStatus = {}));
165
+ var SubmitCommentReviewStatus;
166
+ (function (SubmitCommentReviewStatus) {
167
+ SubmitCommentReviewStatus["approved"] = "approved";
168
+ SubmitCommentReviewStatus["rejected"] = "rejected";
169
+ })(SubmitCommentReviewStatus || (exports.SubmitCommentReviewStatus = SubmitCommentReviewStatus = {}));
159
170
  var QuestionType;
160
171
  (function (QuestionType) {
161
172
  QuestionType["choice"] = "choice";
@@ -524,6 +535,12 @@ var ParraAPI = /** @class */ (function () {
524
535
  "content-type": "application/json",
525
536
  } }, options));
526
537
  };
538
+ this.createEntitlementForTenantUserById = function (tenant_id, user_id, body, options) {
539
+ if (options === void 0) { options = {}; }
540
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id, "/entitlements"), __assign({ method: "post", body: JSON.stringify(body), headers: {
541
+ "content-type": "application/json",
542
+ }, raw: true }, options));
543
+ };
527
544
  this.listEntitlementsForTenantUserById = function (tenant_id, user_id, options) {
528
545
  if (options === void 0) { options = {}; }
529
546
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id, "/entitlements"), __assign({ method: "get" }, options));
@@ -848,6 +865,16 @@ var ParraAPI = /** @class */ (function () {
848
865
  "content-type": "application/json",
849
866
  }, raw: true }, options));
850
867
  };
868
+ this.paginateCommentReviewsForTenant = function (tenant_id, query, options) {
869
+ if (options === void 0) { options = {}; }
870
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/comments/reviews"), __assign({ method: "get", query: query }, options));
871
+ };
872
+ this.submitCommentReview = function (tenant_id, comment_review_id, body, options) {
873
+ if (options === void 0) { options = {}; }
874
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/comments/reviews/").concat(comment_review_id, "/review"), __assign({ method: "post", body: JSON.stringify(body), headers: {
875
+ "content-type": "application/json",
876
+ } }, options));
877
+ };
851
878
  this.addReactionToComment = function (tenant_id, comment_id, body, options) {
852
879
  if (options === void 0) { options = {}; }
853
880
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/comments/").concat(comment_id, "/reactions"), __assign({ method: "post", body: JSON.stringify(body), headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.373",
3
+ "version": "0.3.375",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",