@parra/parra-js-sdk 0.3.303 → 0.3.304

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.
@@ -777,6 +777,37 @@ export interface CreateFaqSectionRequestBody {
777
777
  description?: string | null;
778
778
  display_description?: string | null;
779
779
  }
780
+ export interface CreateCreatorUpdateRequestBody {
781
+ title?: string;
782
+ description?: string;
783
+ }
784
+ export declare enum CreatorUpdateStatus {
785
+ draft = "draft",
786
+ published = "published"
787
+ }
788
+ export interface CreatorUpdateSenderStub {
789
+ id: string;
790
+ name: string;
791
+ avatar?: ImageAssetStub | null;
792
+ verified?: boolean;
793
+ }
794
+ export interface CreatorUpdateAttachmentStub {
795
+ id: string;
796
+ image?: ImageAssetStub | null;
797
+ }
798
+ export interface CreatorUpdate {
799
+ id: string;
800
+ created_at: string;
801
+ updated_at: string;
802
+ deleted_at?: string | null;
803
+ tenant_id: string;
804
+ status: CreatorUpdateStatus;
805
+ title: string;
806
+ description?: string;
807
+ sender?: CreatorUpdateSenderStub;
808
+ template?: CreatorUpdateSenderStub;
809
+ attachments?: Array<CreatorUpdateAttachmentStub>;
810
+ }
780
811
  export declare enum FeedItemType {
781
812
  youtubeVideo = "youtube_video",
782
813
  contentCard = "content_card",
@@ -833,16 +864,6 @@ export interface ContentCard {
833
864
  description?: string | null;
834
865
  action?: ContentCardAction | null;
835
866
  }
836
- export interface CreatorUpdateSenderStub {
837
- id: string;
838
- name: string;
839
- avatar?: ImageAssetStub | null;
840
- verified?: boolean;
841
- }
842
- export interface CreatorUpdateAttachmentStub {
843
- id: string;
844
- image?: ImageAssetStub | null;
845
- }
846
867
  export interface CreatorUpdateAppStub {
847
868
  id: string;
848
869
  created_at: string;
@@ -3482,6 +3503,9 @@ declare class ParraAPI {
3482
3503
  getFaqSectionById: (tenant_id: string, faq_view_id: string, faq_section_id: string, options?: Options) => Promise<FaqSection>;
3483
3504
  updateFaqSectionById: (tenant_id: string, faq_view_id: string, faq_section_id: string, body: UpdateFaqSectionRequestBody, options?: Options) => Promise<FaqSection>;
3484
3505
  deleteFaqSectionById: (tenant_id: string, faq_view_id: string, faq_section_id: string, options?: Options) => Promise<Response>;
3506
+ createCreatorUpdateForTenant: (tenant_id: string, body: CreateCreatorUpdateRequestBody, options?: Options) => Promise<CreatorUpdate>;
3507
+ updateCreatorUpdate: (tenant_id: string, creator_update_id: string, body?: CreateCreatorUpdateRequestBody, options?: Options) => Promise<CreatorUpdate>;
3508
+ sendCreatorUpdateForTenant: (tenant_id: string, creator_update_id: string, options?: Options) => Promise<CreatorUpdate>;
3485
3509
  paginateItemsForAppFeed: (tenant_id: string, application_id: string, feed_id_or_slug: string, query?: {
3486
3510
  limit?: number;
3487
3511
  offset?: number;
package/dist/ParraAPI.js CHANGED
@@ -11,7 +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.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 = 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.FeedbackFormFieldType = 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;
14
+ 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 = 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.CreatorUpdateStatus = exports.FeedbackFormFieldType = 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 = void 0;
15
16
  var TicketType;
16
17
  (function (TicketType) {
17
18
  TicketType["bug"] = "bug";
@@ -119,6 +120,11 @@ var FeedbackFormFieldType;
119
120
  FeedbackFormFieldType["input"] = "input";
120
121
  FeedbackFormFieldType["select"] = "select";
121
122
  })(FeedbackFormFieldType || (exports.FeedbackFormFieldType = FeedbackFormFieldType = {}));
123
+ var CreatorUpdateStatus;
124
+ (function (CreatorUpdateStatus) {
125
+ CreatorUpdateStatus["draft"] = "draft";
126
+ CreatorUpdateStatus["published"] = "published";
127
+ })(CreatorUpdateStatus || (exports.CreatorUpdateStatus = CreatorUpdateStatus = {}));
122
128
  var FeedItemType;
123
129
  (function (FeedItemType) {
124
130
  FeedItemType["youtubeVideo"] = "youtube_video";
@@ -537,6 +543,22 @@ var ParraAPI = /** @class */ (function () {
537
543
  if (options === void 0) { options = {}; }
538
544
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/faqs/views/").concat(faq_view_id, "/sections/").concat(faq_section_id), __assign({ method: "delete" }, options));
539
545
  };
546
+ this.createCreatorUpdateForTenant = function (tenant_id, body, options) {
547
+ if (options === void 0) { options = {}; }
548
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates"), __assign({ method: "post", body: JSON.stringify(body), headers: {
549
+ "content-type": "application/json",
550
+ } }, options));
551
+ };
552
+ this.updateCreatorUpdate = function (tenant_id, creator_update_id, body, options) {
553
+ if (options === void 0) { options = {}; }
554
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/").concat(creator_update_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
555
+ "content-type": "application/json",
556
+ } }, options));
557
+ };
558
+ this.sendCreatorUpdateForTenant = function (tenant_id, creator_update_id, options) {
559
+ if (options === void 0) { options = {}; }
560
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/creator/updates/").concat(creator_update_id, "/send"), __assign({ method: "post" }, options));
561
+ };
540
562
  this.paginateItemsForAppFeed = function (tenant_id, application_id, feed_id_or_slug, query, options) {
541
563
  if (options === void 0) { options = {}; }
542
564
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/applications/").concat(application_id, "/feeds/").concat(feed_id_or_slug, "/items"), __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.303",
3
+ "version": "0.3.304",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",