@parra/parra-js-sdk 0.3.547 → 0.3.550

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.
@@ -841,12 +841,22 @@ export interface CreateDesignSystemRequestBody {
841
841
  version?: string | null;
842
842
  description?: string | null;
843
843
  }
844
+ export declare enum ThemeCornerRadiusStyle {
845
+ rounded = "rounded",
846
+ circle = "circle",
847
+ square = "square"
848
+ }
844
849
  export interface ThemeStyles {
845
850
  primary_color_key?: string | null;
846
851
  secondary_color_key?: string | null;
847
852
  tertiary_color_key?: string | null;
848
853
  accent_color_key?: string | null;
849
- corner_radius_style?: string | null;
854
+ success_color_key?: string | null;
855
+ warning_color_key?: string | null;
856
+ danger_color_key?: string | null;
857
+ info_color_key?: string | null;
858
+ neutral_color_key?: string | null;
859
+ corner_radius_style?: ThemeCornerRadiusStyle | null;
850
860
  }
851
861
  export interface ThemeStub {
852
862
  id: string;
@@ -854,6 +864,7 @@ export interface ThemeStub {
854
864
  updated_at: string;
855
865
  deleted_at?: string | null;
856
866
  tenant_id: string;
867
+ design_system_id: string;
857
868
  name: string;
858
869
  key: string;
859
870
  description?: string | null;
@@ -915,6 +926,42 @@ export interface DesignToken {
915
926
  type: string;
916
927
  tenant_id: string;
917
928
  }
929
+ export interface CreateThemeRequestBody {
930
+ name: string;
931
+ key: string;
932
+ is_dark: boolean;
933
+ }
934
+ export interface Theme {
935
+ id: string;
936
+ created_at: string;
937
+ updated_at: string;
938
+ deleted_at?: string | null;
939
+ tenant_id: string;
940
+ design_system_id: string;
941
+ name: string;
942
+ key: string;
943
+ description?: string | null;
944
+ is_dark: boolean;
945
+ is_active: boolean;
946
+ is_default: boolean;
947
+ styles?: ThemeStyles | null;
948
+ }
949
+ export interface UpdateThemeRequestBody {
950
+ name?: string;
951
+ key?: string;
952
+ is_dark?: boolean;
953
+ is_active?: boolean;
954
+ primary_color_key?: string | null;
955
+ secondary_color_key?: string | null;
956
+ tertiary_color_key?: string | null;
957
+ accent_color_key?: string | null;
958
+ success_color_key?: string | null;
959
+ warning_color_key?: string | null;
960
+ danger_color_key?: string | null;
961
+ info_color_key?: string | null;
962
+ neutral_color_key?: string | null;
963
+ corner_radius_style?: ThemeCornerRadiusStyle | null;
964
+ }
918
965
  export declare enum ShareAssetType {
919
966
  creatorUpdate = "creator_update"
920
967
  }
@@ -5385,6 +5432,10 @@ declare class ParraAPI {
5385
5432
  getDesignTokenById: (tenant_id: string, design_token_id: string, options?: Options) => Promise<DesignToken>;
5386
5433
  updateDesignTokenById: (tenant_id: string, design_token_id: string, body?: UpdateDesignTokenRequestBody, options?: Options) => Promise<DesignToken>;
5387
5434
  deleteDesignTokenById: (tenant_id: string, design_token_id: string, options?: Options) => Promise<Response>;
5435
+ createTheme: (tenant_id: string, body: CreateThemeRequestBody, options?: Options) => Promise<Theme>;
5436
+ getThemeById: (tenant_id: string, theme_id: string, options?: Options) => Promise<Theme>;
5437
+ updateThemeById: (tenant_id: string, theme_id: string, body?: UpdateThemeRequestBody, options?: Options) => Promise<Theme>;
5438
+ deleteThemeById: (tenant_id: string, theme_id: string, options?: Options) => Promise<Response>;
5388
5439
  createShareAsset: (tenant_id: string, body: CreateShareAssetRequestBody, options?: Options) => Promise<ShareAsset>;
5389
5440
  listShareAssets: (tenant_id: string, query?: {
5390
5441
  type?: string | null;
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.CampaignActionDisplayType = exports.CampaignActionType = exports.CardItemDisplayType = exports.CardItemType = exports.QuestionKind = exports.QuestionType = exports.SubmitCommentReviewStatus = exports.CommentReviewStatus = exports.FeedChannelType = exports.ReactionType = exports.FeedItemType = exports.SocialAccountType = exports.CreatorUpdateGiveawayCriteria = exports.CreatorUpdateChannelType = exports.CreatorUpdateStatus = exports.CreatorUpdateVisibilityType = exports.CreatorUpdateTopic = exports.LessonType = exports.AttachmentType = exports.ChannelMemberRole = exports.ChannelMemberType = exports.ChatChannelStatus = exports.ChatChannelType = exports.BillingSourceType = exports.ApplePurchaseType = exports.ApplePurchaseEnvironment = exports.PurchaseEnvironment = exports.PurchasePlatform = exports.PurchaseStatus = exports.PurchaseType = exports.PaywallIapType = exports.AppPaywallType = exports.ShareAssetType = exports.SubscriptionStatus = exports.Interval = exports.Currency = exports.FeedbackFormFieldType = exports.ContentCardActionType = 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.TenantUserMetricType = 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.ClientType = exports.PasswordlessStrategy = exports.SsoProvider = exports.SettingsItemType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.TicketLinkType = exports.BoardType = exports.TemplateType = exports.CampaignStatus = void 0;
14
+ exports.CampaignActionType = exports.CardItemDisplayType = exports.CardItemType = exports.QuestionKind = exports.QuestionType = exports.SubmitCommentReviewStatus = exports.CommentReviewStatus = exports.FeedChannelType = exports.ReactionType = exports.FeedItemType = exports.SocialAccountType = exports.CreatorUpdateGiveawayCriteria = exports.CreatorUpdateChannelType = exports.CreatorUpdateStatus = exports.CreatorUpdateVisibilityType = exports.CreatorUpdateTopic = exports.LessonType = exports.AttachmentType = exports.ChannelMemberRole = exports.ChannelMemberType = exports.ChatChannelStatus = exports.ChatChannelType = exports.BillingSourceType = exports.ApplePurchaseType = exports.ApplePurchaseEnvironment = exports.PurchaseEnvironment = exports.PurchasePlatform = exports.PurchaseStatus = exports.PurchaseType = exports.PaywallIapType = exports.AppPaywallType = exports.ShareAssetType = exports.ThemeCornerRadiusStyle = exports.SubscriptionStatus = exports.Interval = exports.Currency = exports.FeedbackFormFieldType = exports.ContentCardActionType = 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.TenantUserMetricType = 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.ClientType = exports.PasswordlessStrategy = exports.SsoProvider = exports.SettingsItemType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.TicketLinkType = exports.BoardType = exports.TemplateType = exports.CampaignStatus = exports.CampaignActionDisplayType = void 0;
16
16
  var TicketType;
17
17
  (function (TicketType) {
18
18
  TicketType["bug"] = "bug";
@@ -130,6 +130,12 @@ var SubscriptionStatus;
130
130
  SubscriptionStatus["canceled"] = "canceled";
131
131
  SubscriptionStatus["unpaid"] = "unpaid";
132
132
  })(SubscriptionStatus || (exports.SubscriptionStatus = SubscriptionStatus = {}));
133
+ var ThemeCornerRadiusStyle;
134
+ (function (ThemeCornerRadiusStyle) {
135
+ ThemeCornerRadiusStyle["rounded"] = "rounded";
136
+ ThemeCornerRadiusStyle["circle"] = "circle";
137
+ ThemeCornerRadiusStyle["square"] = "square";
138
+ })(ThemeCornerRadiusStyle || (exports.ThemeCornerRadiusStyle = ThemeCornerRadiusStyle = {}));
133
139
  var ShareAssetType;
134
140
  (function (ShareAssetType) {
135
141
  ShareAssetType["creatorUpdate"] = "creator_update";
@@ -745,6 +751,26 @@ var ParraAPI = /** @class */ (function () {
745
751
  if (options === void 0) { options = {}; }
746
752
  return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/design-tokens/").concat(design_token_id), method: "delete" }, options));
747
753
  };
754
+ this.createTheme = function (tenant_id, body, options) {
755
+ if (options === void 0) { options = {}; }
756
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/themes"), method: "post", body: JSON.stringify(body), headers: {
757
+ "content-type": "application/json",
758
+ } }, options));
759
+ };
760
+ this.getThemeById = function (tenant_id, theme_id, options) {
761
+ if (options === void 0) { options = {}; }
762
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/themes/").concat(theme_id), method: "get" }, options));
763
+ };
764
+ this.updateThemeById = function (tenant_id, theme_id, body, options) {
765
+ if (options === void 0) { options = {}; }
766
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/themes/").concat(theme_id), method: "put", body: JSON.stringify(body), headers: {
767
+ "content-type": "application/json",
768
+ } }, options));
769
+ };
770
+ this.deleteThemeById = function (tenant_id, theme_id, options) {
771
+ if (options === void 0) { options = {}; }
772
+ return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/themes/").concat(theme_id), method: "delete" }, options));
773
+ };
748
774
  this.createShareAsset = function (tenant_id, body, options) {
749
775
  if (options === void 0) { options = {}; }
750
776
  return _this.http.execute(__assign({ path: "".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/share-assets"), 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.547",
3
+ "version": "0.3.550",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",