@parra/parra-js-sdk 0.3.417 → 0.3.419

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.
@@ -448,6 +448,13 @@ export interface TenantUserRoleStub {
448
448
  name: string;
449
449
  key: string;
450
450
  }
451
+ export interface TenantUserPermissionStub {
452
+ id: string;
453
+ permission_id: string;
454
+ role_id?: string;
455
+ name: string;
456
+ key: string;
457
+ }
451
458
  export interface TenantUserCollectionStub {
452
459
  id: string;
453
460
  created_at: string;
@@ -458,6 +465,7 @@ export interface TenantUserCollectionStub {
458
465
  avatar?: ImageAssetStub | null;
459
466
  verified: boolean;
460
467
  roles?: Array<TenantUserRoleStub> | null;
468
+ permissions?: Array<TenantUserPermissionStub> | null;
461
469
  identity?: string | null;
462
470
  username?: string | null;
463
471
  email?: string | null;
@@ -489,6 +497,7 @@ export interface TenantUserDataStub {
489
497
  avatar?: ImageAssetStub | null;
490
498
  verified: boolean;
491
499
  roles?: Array<TenantUserRoleStub> | null;
500
+ permissions?: Array<TenantUserPermissionStub> | null;
492
501
  identity?: string | null;
493
502
  username?: string | null;
494
503
  email?: string | null;
@@ -520,6 +529,7 @@ export interface TenantUser {
520
529
  avatar?: ImageAssetStub | null;
521
530
  verified: boolean;
522
531
  roles?: Array<TenantUserRoleStub> | null;
532
+ permissions?: Array<TenantUserPermissionStub> | null;
523
533
  identity?: string | null;
524
534
  username?: string | null;
525
535
  email?: string | null;
@@ -558,13 +568,6 @@ export interface AuthToken {
558
568
  refresh_token?: string;
559
569
  scope?: string;
560
570
  }
561
- export interface UploadImageRequestBody {
562
- image: File;
563
- }
564
- export interface UploadImageWithGroupRequestBody {
565
- image: File;
566
- group: string;
567
- }
568
571
  export interface ImageAsset {
569
572
  id: string;
570
573
  created_at: string;
@@ -580,6 +583,13 @@ export interface ImageAsset {
580
583
  blur_hash?: string | null;
581
584
  thumbnails?: ImageAssetThumbnails | null;
582
585
  }
586
+ export interface UploadImageRequestBody {
587
+ image: File;
588
+ }
589
+ export interface UploadImageWithGroupRequestBody {
590
+ image: File;
591
+ group: string;
592
+ }
583
593
  export interface CreateContentCardRequestBody {
584
594
  background_image: File;
585
595
  title: string;
@@ -753,21 +763,43 @@ export interface AppleSubscription {
753
763
  group_level: number;
754
764
  product?: ProductStub | null;
755
765
  }
766
+ export declare enum AppPaywallType {
767
+ apple = "apple",
768
+ parra = "parra"
769
+ }
756
770
  export interface ApplePaywallMarketingContent {
757
771
  title: string;
758
772
  subtitle?: string | null;
759
773
  product_image: ImageAssetStub | null;
760
774
  }
761
- export interface ApplePaywall {
775
+ export interface PaywallHeaderSection {
776
+ id: string;
777
+ title: string;
778
+ type: string;
779
+ description?: string | null;
780
+ icon?: ImageAssetStub | null;
781
+ }
782
+ export interface PaywallOffering {
783
+ id: string;
784
+ title: string;
785
+ }
786
+ export interface PaywallOfferingSection {
787
+ id: string;
788
+ type: string;
789
+ offerings: Array<PaywallOffering>;
790
+ }
791
+ export type PaywallSection = PaywallHeaderSection | PaywallOfferingSection;
792
+ export interface AppPaywall {
762
793
  id: string;
763
794
  created_at: string;
764
795
  updated_at: string;
765
796
  deleted_at?: string | null;
797
+ type: AppPaywallType;
766
798
  group_id?: string | null;
767
799
  product_ids?: Array<string> | null;
768
800
  marketing_content?: ApplePaywallMarketingContent | null;
801
+ sections?: Array<PaywallSection> | null;
769
802
  }
770
- export type AppPaywall = ApplePaywall;
771
803
  export interface CreateAppPurchaseRequestBody {
772
804
  apple_receipt?: string;
773
805
  apple_receipts?: Array<string>;
@@ -928,6 +960,117 @@ export interface UpdateProductEntitlementRequestBody {
928
960
  consumable_quantity?: number | null;
929
961
  update_for_all_existing_entitlements?: boolean | null;
930
962
  }
963
+ export interface CreatePaidDmChannelRequestBody {
964
+ type: string;
965
+ key: string;
966
+ }
967
+ export type CreateChatChannelRequestBody = CreatePaidDmChannelRequestBody;
968
+ export declare enum ChatChannelType {
969
+ paidDm = "paid_dm",
970
+ dm = "dm",
971
+ default = "default",
972
+ app = "app",
973
+ group = "group",
974
+ user = "user"
975
+ }
976
+ export declare enum ChatChannelStatus {
977
+ active = "active",
978
+ closed = "closed",
979
+ archived = "archived"
980
+ }
981
+ export interface TenantUserStub {
982
+ id: string;
983
+ tenant_id: string;
984
+ name?: string | null;
985
+ avatar?: ImageAssetStub | null;
986
+ verified?: boolean | null;
987
+ roles?: Array<TenantUserRoleStub> | null;
988
+ }
989
+ export declare enum ChannelMemberType {
990
+ tenantUser = "tenant_user",
991
+ user = "user",
992
+ bot = "bot"
993
+ }
994
+ export declare enum ChannelMemberRole {
995
+ admin = "admin",
996
+ member = "member",
997
+ guest = "guest"
998
+ }
999
+ export interface ChannelMember {
1000
+ id: string;
1001
+ created_at: string;
1002
+ updated_at: string;
1003
+ deleted_at?: string | null;
1004
+ user?: TenantUserStub | null;
1005
+ type: ChannelMemberType;
1006
+ roles: Array<ChannelMemberRole>;
1007
+ }
1008
+ export interface Channel {
1009
+ id: string;
1010
+ created_at: string;
1011
+ updated_at: string;
1012
+ deleted_at?: string | null;
1013
+ type: ChannelType;
1014
+ name: string;
1015
+ description?: string | null;
1016
+ apns?: CreateApnsChannelRequestBody;
1017
+ inbox?: CreateInboxChannelRequestBody;
1018
+ }
1019
+ export interface ChannelCollectionResponse {
1020
+ page: number;
1021
+ page_count: number;
1022
+ page_size: number;
1023
+ total_count: number;
1024
+ data: Array<Channel>;
1025
+ }
1026
+ export interface UpdateChatChannelRequestBody {
1027
+ status?: ChatChannelStatus;
1028
+ }
1029
+ export interface MessageCollectionStub {
1030
+ id: string;
1031
+ created_at: string;
1032
+ updated_at: string;
1033
+ deleted_at?: string | null;
1034
+ tenant_id: string;
1035
+ channel_id: string;
1036
+ member_id: string;
1037
+ content: string;
1038
+ }
1039
+ export interface MessageCollectionResponse {
1040
+ page: number;
1041
+ page_count: number;
1042
+ page_size: number;
1043
+ total_count: number;
1044
+ data: Array<MessageCollectionStub>;
1045
+ }
1046
+ export interface CreateMessageRequestBody {
1047
+ content: string;
1048
+ }
1049
+ export interface Message {
1050
+ id: string;
1051
+ created_at: string;
1052
+ updated_at: string;
1053
+ deleted_at?: string | null;
1054
+ tenant_id: string;
1055
+ channel_id: string;
1056
+ member_id: string;
1057
+ user?: TenantUserStub | null;
1058
+ content: string;
1059
+ }
1060
+ export interface FlagMessageRequestBody {
1061
+ reason?: string | null;
1062
+ }
1063
+ export interface CreateReactionRequestBody {
1064
+ option_id: string;
1065
+ }
1066
+ export interface Reaction {
1067
+ id: string;
1068
+ created_at: string;
1069
+ updated_at: string;
1070
+ deleted_at?: string | null;
1071
+ option_id: string;
1072
+ user_id: string;
1073
+ }
931
1074
  export interface AppFaq {
932
1075
  id: string;
933
1076
  created_at: string;
@@ -1142,10 +1285,12 @@ export interface CreateCreatorUpdateTemplateRequestBody {
1142
1285
  feed_view_id?: string;
1143
1286
  notification_template_id?: string;
1144
1287
  entitlement_id?: string | null;
1288
+ paywall_context?: string | null;
1145
1289
  post_visibility?: CreatorUpdateVisibilityType;
1146
1290
  attachment_visibility?: CreatorUpdateVisibilityType;
1147
1291
  }
1148
1292
  export interface CreatorUpdateVisibility {
1293
+ paywall_context?: string | null;
1149
1294
  entitlement_id?: string | null;
1150
1295
  post_visibility: CreatorUpdateVisibilityType;
1151
1296
  attachment_visibility?: CreatorUpdateVisibilityType | null;
@@ -1177,22 +1322,19 @@ export interface UpdateCreatorUpdateTemplateRequestBody {
1177
1322
  feed_view_id?: string;
1178
1323
  notification_template_id?: string;
1179
1324
  entitlement_id?: string | null;
1325
+ paywall_context?: string | null;
1180
1326
  post_visibility?: CreatorUpdateVisibilityType;
1181
1327
  attachment_visibility?: CreatorUpdateVisibilityType;
1182
1328
  }
1183
- export interface CreateCreatorAttachmentAttachmentRequestBody {
1184
- id: string;
1185
- size: Size;
1186
- url: string;
1187
- blur_hash?: string | null;
1188
- thumbnails?: ImageAssetThumbnails | null;
1189
- }
1190
1329
  export interface CreateCreatorUpdateRequestBody {
1191
1330
  publish?: boolean | null;
1192
1331
  template_id?: string | null;
1193
1332
  title?: string | null;
1194
1333
  body?: string | null;
1195
- attachments?: Array<CreateCreatorAttachmentAttachmentRequestBody>;
1334
+ attachment_ids?: Array<string> | null;
1335
+ entitlement_id?: string | null;
1336
+ post_visibility?: CreatorUpdateVisibilityType | null;
1337
+ attachment_visibility?: CreatorUpdateVisibilityType | null;
1196
1338
  }
1197
1339
  export declare enum CreatorUpdateStatus {
1198
1340
  draft = "draft",
@@ -1465,14 +1607,6 @@ export interface UpdateFeedItemRequestBody {
1465
1607
  export interface CreateCommentRequestBody {
1466
1608
  body: string;
1467
1609
  }
1468
- export interface TenantUserStub {
1469
- id: string;
1470
- tenant_id: string;
1471
- name?: string | null;
1472
- avatar?: ImageAssetStub | null;
1473
- verified?: boolean | null;
1474
- roles?: Array<TenantUserRoleStub> | null;
1475
- }
1476
1610
  export interface Comment {
1477
1611
  id: string;
1478
1612
  created_at: string;
@@ -1531,17 +1665,6 @@ export interface SubmitCommentReviewRequestBody {
1531
1665
  status: SubmitCommentReviewStatus;
1532
1666
  note?: string | null;
1533
1667
  }
1534
- export interface CreateReactionRequestBody {
1535
- option_id: string;
1536
- }
1537
- export interface Reaction {
1538
- id: string;
1539
- created_at: string;
1540
- updated_at: string;
1541
- deleted_at?: string | null;
1542
- option_id: string;
1543
- user_id: string;
1544
- }
1545
1668
  export interface SubmitFeedbackFormResponseBody {
1546
1669
  }
1547
1670
  export interface FeedbackFormResponse {
@@ -2146,13 +2269,6 @@ export interface Board {
2146
2269
  description?: string | null;
2147
2270
  components?: Array<BoardComponent>;
2148
2271
  }
2149
- export interface CreateTicketAttachmentRequestBody {
2150
- id: string;
2151
- size: Size;
2152
- url: string;
2153
- blur_hash?: string | null;
2154
- thumbnails?: ImageAssetThumbnails | null;
2155
- }
2156
2272
  export interface UpdateTicketChecklistItemRequestBody {
2157
2273
  title?: string;
2158
2274
  description?: string | null;
@@ -2178,7 +2294,7 @@ export interface CreateTicketRequestBody {
2178
2294
  estimated_start_date?: string | null;
2179
2295
  estimated_completion_date?: string | null;
2180
2296
  icon?: TicketIcon;
2181
- attachments?: Array<CreateTicketAttachmentRequestBody>;
2297
+ attachment_ids?: Array<string>;
2182
2298
  is_featured: boolean;
2183
2299
  featured_title?: string | null;
2184
2300
  featured_description?: string | null;
@@ -2616,17 +2732,6 @@ export interface CreateChannelRequestBody {
2616
2732
  apns?: CreateApnsChannelRequestBody;
2617
2733
  inbox?: CreateInboxChannelRequestBody;
2618
2734
  }
2619
- export interface Channel {
2620
- id: string;
2621
- created_at: string;
2622
- updated_at: string;
2623
- deleted_at?: string | null;
2624
- type: ChannelType;
2625
- name: string;
2626
- description?: string | null;
2627
- apns?: CreateApnsChannelRequestBody;
2628
- inbox?: CreateInboxChannelRequestBody;
2629
- }
2630
2735
  export interface NotificationTemplate {
2631
2736
  id: string;
2632
2737
  created_at: string;
@@ -4227,6 +4332,9 @@ declare class ParraAPI {
4227
4332
  checkAuthorization: (body: CheckAuthorizationRequestBody, options?: Options) => Promise<CheckAuthorization>;
4228
4333
  getUserInfo: (options?: Options) => Promise<UserInfoResponse>;
4229
4334
  getParraAuthToken: (options?: Options) => Promise<AuthToken>;
4335
+ listImageAssetsForTenantById: (tenant_id: string, query?: {
4336
+ ids?: string;
4337
+ }, options?: Options) => Promise<Array<ImageAsset>>;
4230
4338
  uploadImageAssetForTenantById: (tenant_id: string, body: UploadImageWithGroupRequestBody, options?: Options) => Promise<ImageAsset>;
4231
4339
  uploadAvatarForUser: (body: UploadImageRequestBody, options?: Options) => Promise<ImageAssetStub>;
4232
4340
  uploadAvatarForTenantUser: (tenant_id: string, body: UploadImageRequestBody, options?: Options) => Promise<ImageAssetStub>;
@@ -4281,6 +4389,23 @@ declare class ParraAPI {
4281
4389
  addEntitlementToProduct: (tenant_id: string, product_id: string, body: CreateProductEntitlementRequestBody, options?: Options) => Promise<ProductEntitlement>;
4282
4390
  updateProductEntitlement: (tenant_id: string, product_id: string, product_entitlement_id: string, body?: UpdateProductEntitlementRequestBody, options?: Options) => Promise<ProductEntitlement>;
4283
4391
  deleteProductEntitlement: (tenant_id: string, product_id: string, product_entitlement_id: string, options?: Options) => Promise<Response>;
4392
+ createChatChannel: (tenant_id: string, body?: CreateChatChannelRequestBody, options?: Options) => Promise<Channel>;
4393
+ paginateChatChannels: (tenant_id: string, query?: {
4394
+ type?: string;
4395
+ limit?: number;
4396
+ offset?: number;
4397
+ }, options?: Options) => Promise<ChannelCollectionResponse>;
4398
+ updateChatChannel: (tenant_id: string, channel_id: string, body?: UpdateChatChannelRequestBody, options?: Options) => Promise<Channel>;
4399
+ deleteChatChannel: (tenant_id: string, channel_id: string, options?: Options) => Promise<Response>;
4400
+ paginateMessagesForChatChannel: (tenant_id: string, channel_id: string, query?: {
4401
+ limit?: number;
4402
+ offset?: number;
4403
+ }, options?: Options) => Promise<MessageCollectionResponse>;
4404
+ createMessageForChatChannel: (tenant_id: string, channel_id: string, body: CreateMessageRequestBody, options?: Options) => Promise<Message>;
4405
+ deleteChatMessage: (tenant_id: string, message_id: string, options?: Options) => Promise<Response>;
4406
+ flagChatMessage: (tenant_id: string, message_id: string, body?: FlagMessageRequestBody, options?: Options) => Promise<Response>;
4407
+ addReactionToChatMessage: (tenant_id: string, message_id: string, body: CreateReactionRequestBody, options?: Options) => Promise<Reaction>;
4408
+ removeReactionFromChatMessage: (tenant_id: string, message_id: string, reaction_id: string, options?: Options) => Promise<Response>;
4284
4409
  listAppFaqs: (tenant_id: string, application_id: string, query?: {
4285
4410
  app_area_id?: string;
4286
4411
  }, options?: Options) => Promise<AppFaqView>;
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.ConnectedAppType = exports.TenantOnboardingGoal = exports.DashboardChecklistItemStatus = exports.DashboardChecklistItemType = exports.RefreshTokenRotationType = exports.RefreshTokenExpirationType = exports.JwtAlgorithm = exports.GrantType = exports.PasswordlessStrategy = exports.SsoProvider = 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.AppleSsoScope = 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 = exports.IntegrationType = exports.ConnectedAppConnectionStatus = void 0;
14
+ exports.RefreshTokenExpirationType = exports.JwtAlgorithm = exports.GrantType = exports.PasswordlessStrategy = exports.SsoProvider = 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.ChannelMemberRole = exports.ChannelMemberType = exports.ChatChannelStatus = exports.ChatChannelType = exports.BillingSourceType = exports.AppPaywallType = exports.SubscriptionStatus = exports.Interval = exports.Currency = exports.IdentityType = exports.PolicyDocumentType = exports.AppleSsoScope = 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 = exports.IntegrationType = exports.ConnectedAppConnectionStatus = exports.ConnectedAppType = exports.TenantOnboardingGoal = exports.DashboardChecklistItemStatus = exports.DashboardChecklistItemType = exports.RefreshTokenRotationType = void 0;
16
16
  var TicketType;
17
17
  (function (TicketType) {
18
18
  TicketType["bug"] = "bug";
@@ -119,6 +119,11 @@ var SubscriptionStatus;
119
119
  SubscriptionStatus["canceled"] = "canceled";
120
120
  SubscriptionStatus["unpaid"] = "unpaid";
121
121
  })(SubscriptionStatus || (exports.SubscriptionStatus = SubscriptionStatus = {}));
122
+ var AppPaywallType;
123
+ (function (AppPaywallType) {
124
+ AppPaywallType["apple"] = "apple";
125
+ AppPaywallType["parra"] = "parra";
126
+ })(AppPaywallType || (exports.AppPaywallType = AppPaywallType = {}));
122
127
  var BillingSourceType;
123
128
  (function (BillingSourceType) {
124
129
  BillingSourceType["stripe"] = "stripe";
@@ -129,6 +134,33 @@ var BillingSourceType;
129
134
  BillingSourceType["microsoft"] = "microsoft";
130
135
  BillingSourceType["other"] = "other";
131
136
  })(BillingSourceType || (exports.BillingSourceType = BillingSourceType = {}));
137
+ var ChatChannelType;
138
+ (function (ChatChannelType) {
139
+ ChatChannelType["paidDm"] = "paid_dm";
140
+ ChatChannelType["dm"] = "dm";
141
+ ChatChannelType["default"] = "default";
142
+ ChatChannelType["app"] = "app";
143
+ ChatChannelType["group"] = "group";
144
+ ChatChannelType["user"] = "user";
145
+ })(ChatChannelType || (exports.ChatChannelType = ChatChannelType = {}));
146
+ var ChatChannelStatus;
147
+ (function (ChatChannelStatus) {
148
+ ChatChannelStatus["active"] = "active";
149
+ ChatChannelStatus["closed"] = "closed";
150
+ ChatChannelStatus["archived"] = "archived";
151
+ })(ChatChannelStatus || (exports.ChatChannelStatus = ChatChannelStatus = {}));
152
+ var ChannelMemberType;
153
+ (function (ChannelMemberType) {
154
+ ChannelMemberType["tenantUser"] = "tenant_user";
155
+ ChannelMemberType["user"] = "user";
156
+ ChannelMemberType["bot"] = "bot";
157
+ })(ChannelMemberType || (exports.ChannelMemberType = ChannelMemberType = {}));
158
+ var ChannelMemberRole;
159
+ (function (ChannelMemberRole) {
160
+ ChannelMemberRole["admin"] = "admin";
161
+ ChannelMemberRole["member"] = "member";
162
+ ChannelMemberRole["guest"] = "guest";
163
+ })(ChannelMemberRole || (exports.ChannelMemberRole = ChannelMemberRole = {}));
132
164
  var FeedbackFormFieldType;
133
165
  (function (FeedbackFormFieldType) {
134
166
  FeedbackFormFieldType["text"] = "text";
@@ -436,6 +468,10 @@ var ParraAPI = /** @class */ (function () {
436
468
  if (options === void 0) { options = {}; }
437
469
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/parra/auth/token"), __assign({ method: "post" }, options));
438
470
  };
471
+ this.listImageAssetsForTenantById = function (tenant_id, query, options) {
472
+ if (options === void 0) { options = {}; }
473
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/assets/images"), __assign({ method: "get", query: query }, options));
474
+ };
439
475
  this.uploadImageAssetForTenantById = function (tenant_id, body, options) {
440
476
  if (options === void 0) { options = {}; }
441
477
  var formData = new FormData();
@@ -688,6 +724,56 @@ var ParraAPI = /** @class */ (function () {
688
724
  if (options === void 0) { options = {}; }
689
725
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/products/").concat(product_id, "/entitlements/").concat(product_entitlement_id), __assign({ method: "delete" }, options));
690
726
  };
727
+ this.createChatChannel = function (tenant_id, body, options) {
728
+ if (options === void 0) { options = {}; }
729
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels"), __assign({ method: "post", body: JSON.stringify(body), headers: {
730
+ "content-type": "application/json",
731
+ } }, options));
732
+ };
733
+ this.paginateChatChannels = function (tenant_id, query, options) {
734
+ if (options === void 0) { options = {}; }
735
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels"), __assign({ method: "get", query: query }, options));
736
+ };
737
+ this.updateChatChannel = function (tenant_id, channel_id, body, options) {
738
+ if (options === void 0) { options = {}; }
739
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels/").concat(channel_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
740
+ "content-type": "application/json",
741
+ } }, options));
742
+ };
743
+ this.deleteChatChannel = function (tenant_id, channel_id, options) {
744
+ if (options === void 0) { options = {}; }
745
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels/").concat(channel_id), __assign({ method: "delete" }, options));
746
+ };
747
+ this.paginateMessagesForChatChannel = function (tenant_id, channel_id, query, options) {
748
+ if (options === void 0) { options = {}; }
749
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels/").concat(channel_id, "/messages"), __assign({ method: "get", query: query }, options));
750
+ };
751
+ this.createMessageForChatChannel = function (tenant_id, channel_id, body, options) {
752
+ if (options === void 0) { options = {}; }
753
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/channels/").concat(channel_id, "/messages"), __assign({ method: "post", body: JSON.stringify(body), headers: {
754
+ "content-type": "application/json",
755
+ } }, options));
756
+ };
757
+ this.deleteChatMessage = function (tenant_id, message_id, options) {
758
+ if (options === void 0) { options = {}; }
759
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/messages/").concat(message_id), __assign({ method: "delete" }, options));
760
+ };
761
+ this.flagChatMessage = function (tenant_id, message_id, body, options) {
762
+ if (options === void 0) { options = {}; }
763
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/messages/").concat(message_id, "/flag"), __assign({ method: "post", body: JSON.stringify(body), headers: {
764
+ "content-type": "application/json",
765
+ }, raw: true }, options));
766
+ };
767
+ this.addReactionToChatMessage = function (tenant_id, message_id, body, options) {
768
+ if (options === void 0) { options = {}; }
769
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/messages/").concat(message_id, "/reactions"), __assign({ method: "post", body: JSON.stringify(body), headers: {
770
+ "content-type": "application/json",
771
+ } }, options));
772
+ };
773
+ this.removeReactionFromChatMessage = function (tenant_id, message_id, reaction_id, options) {
774
+ if (options === void 0) { options = {}; }
775
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/chat/messages/").concat(message_id, "/reactions/").concat(reaction_id), __assign({ method: "delete" }, options));
776
+ };
691
777
  this.listAppFaqs = function (tenant_id, application_id, query, options) {
692
778
  if (options === void 0) { options = {}; }
693
779
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/faqs"), __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.417",
3
+ "version": "0.3.419",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",