@parra/parra-js-sdk 0.3.483 → 0.3.485

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.
@@ -809,6 +809,121 @@ export interface BillingPortalSession {
809
809
  export interface CreateEmailSubscriberRequestBody {
810
810
  email: string;
811
811
  }
812
+ export interface UpdateDesignSystemRequestBody {
813
+ name?: string;
814
+ key?: string;
815
+ version?: string | null;
816
+ description?: string | null;
817
+ }
818
+ export interface CreateDesignSystemRequestBody {
819
+ name?: string;
820
+ key?: string;
821
+ version?: string | null;
822
+ description?: string | null;
823
+ }
824
+ export interface DesignSystem {
825
+ id: string;
826
+ created_at: string;
827
+ updated_at: string;
828
+ deleted_at?: string | null;
829
+ name?: string;
830
+ key?: string;
831
+ version?: string | null;
832
+ description?: string | null;
833
+ tenant_id: string;
834
+ }
835
+ export interface ColorValue {
836
+ hex_value?: string;
837
+ }
838
+ export declare enum ValueUnit {
839
+ px = "px"
840
+ }
841
+ export interface SpacingValue {
842
+ value: string;
843
+ unit: ValueUnit;
844
+ }
845
+ export interface RadiusValue {
846
+ value: string;
847
+ unit: ValueUnit;
848
+ }
849
+ export type DesignTokenValue = ColorValue | SpacingValue | RadiusValue;
850
+ export interface UpdateDesignTokenRequestBody {
851
+ name?: string;
852
+ key?: string;
853
+ description?: string | null;
854
+ value?: DesignTokenValue;
855
+ is_deprecated?: boolean;
856
+ is_active?: boolean;
857
+ }
858
+ export interface CreateDesignTokenRequestBody {
859
+ name?: string;
860
+ key?: string;
861
+ description?: string | null;
862
+ value?: DesignTokenValue;
863
+ is_deprecated?: boolean;
864
+ is_active?: boolean;
865
+ type: string;
866
+ }
867
+ export interface DesignToken {
868
+ id: string;
869
+ created_at: string;
870
+ updated_at: string;
871
+ deleted_at?: string | null;
872
+ name?: string;
873
+ key?: string;
874
+ description?: string | null;
875
+ value?: DesignTokenValue;
876
+ is_deprecated?: boolean;
877
+ is_active?: boolean;
878
+ type: string;
879
+ tenant_id: string;
880
+ }
881
+ export declare enum ShareAssetType {
882
+ creatorUpdate = "creator_update"
883
+ }
884
+ export interface CreateShareAssetRequestBody {
885
+ name: string;
886
+ type?: ShareAssetType | null;
887
+ description?: string | null;
888
+ schema_id?: string | null;
889
+ }
890
+ export interface Schema {
891
+ id: string;
892
+ created_at: string;
893
+ updated_at: string;
894
+ deleted_at?: string | null;
895
+ name: string;
896
+ type: string;
897
+ content: object;
898
+ description?: string | null;
899
+ }
900
+ export interface ShareAssetStub {
901
+ id: string;
902
+ created_at: string;
903
+ updated_at: string;
904
+ deleted_at?: string | null;
905
+ tenant_id: string;
906
+ name: string;
907
+ type: ShareAssetType;
908
+ description?: string | null;
909
+ }
910
+ export interface ShareAsset {
911
+ id: string;
912
+ created_at: string;
913
+ updated_at: string;
914
+ deleted_at?: string | null;
915
+ tenant_id: string;
916
+ name: string;
917
+ type: ShareAssetType;
918
+ description?: string | null;
919
+ data: object;
920
+ schema?: Schema | null;
921
+ }
922
+ export interface UpdateShareAssetRequestBody {
923
+ name?: string;
924
+ type?: ShareAssetType | null;
925
+ description?: string | null;
926
+ }
812
927
  export interface UpdateAppleInAppPurchaseRequestBody {
813
928
  product_id?: string | null;
814
929
  }
@@ -4524,16 +4639,6 @@ export interface CreateMailTemplateVersionRequestBody {
4524
4639
  text_content?: string | null;
4525
4640
  html_content?: string | null;
4526
4641
  }
4527
- export interface Schema {
4528
- id: string;
4529
- created_at: string;
4530
- updated_at: string;
4531
- deleted_at?: string | null;
4532
- name: string;
4533
- type: string;
4534
- content: object;
4535
- description?: string | null;
4536
- }
4537
4642
  export interface MailTemplateVersion {
4538
4643
  id: string;
4539
4644
  created_at: string;
@@ -4752,6 +4857,23 @@ declare class ParraAPI {
4752
4857
  getPlansForTenantById: (tenant_id: string, options?: Options) => Promise<TenantPlansResponse>;
4753
4858
  createBillingPortalSession: (tenant_id: string, options?: Options) => Promise<BillingPortalSession>;
4754
4859
  createSubscriberForEmailAudienceById: (email_audience_id: string, body: CreateEmailSubscriberRequestBody, options?: Options) => Promise<Response>;
4860
+ createDesignSystem: (tenant_id: string, body: CreateDesignSystemRequestBody, options?: Options) => Promise<DesignSystem>;
4861
+ listDesignSystems: (tenant_id: string, options?: Options) => Promise<Array<DesignSystem>>;
4862
+ getDesignSystemJson: (tenant_id: string, design_system_id: string, options?: Options) => Promise<DesignSystem>;
4863
+ getDesignSystemById: (tenant_id: string, design_system_id: string, options?: Options) => Promise<DesignSystem>;
4864
+ updateDesignSystemById: (tenant_id: string, design_system_id: string, body?: UpdateDesignSystemRequestBody, options?: Options) => Promise<DesignSystem>;
4865
+ deleteDesignSystemById: (tenant_id: string, design_system_id: string, options?: Options) => Promise<Response>;
4866
+ createTokenForDesignSystem: (tenant_id: string, design_system_id: string, body: CreateDesignTokenRequestBody, options?: Options) => Promise<DesignToken>;
4867
+ getDesignTokenById: (tenant_id: string, design_token_id: string, options?: Options) => Promise<DesignToken>;
4868
+ updateDesignTokenById: (tenant_id: string, design_token_id: string, body?: UpdateDesignTokenRequestBody, options?: Options) => Promise<DesignToken>;
4869
+ deleteDesignTokenById: (tenant_id: string, design_token_id: string, options?: Options) => Promise<Response>;
4870
+ createShareAsset: (tenant_id: string, body: CreateShareAssetRequestBody, options?: Options) => Promise<ShareAsset>;
4871
+ listShareAssets: (tenant_id: string, query?: {
4872
+ type?: string | null;
4873
+ }, options?: Options) => Promise<Array<ShareAssetStub>>;
4874
+ getShareAssetById: (tenant_id: string, share_asset_id: string, options?: Options) => Promise<ShareAsset>;
4875
+ updateShareAssetById: (tenant_id: string, share_asset_id: string, body?: UpdateShareAssetRequestBody, options?: Options) => Promise<ShareAsset>;
4876
+ deleteShareAssetById: (tenant_id: string, share_asset_id: string, options?: Options) => Promise<Response>;
4755
4877
  updateAppleInAppPurchase: (tenant_id: string, billing_source_id: string, apple_in_app_purchase_id: string, body?: UpdateAppleInAppPurchaseRequestBody, options?: Options) => Promise<AppleInAppPurchase>;
4756
4878
  updateAppleSubscription: (tenant_id: string, billing_source_id: string, apple_subscription_id: string, body?: UpdateAppleSubscriptionRequestBody, options?: Options) => Promise<AppleSubscription>;
4757
4879
  getAppPaywall: (tenant_id: string, application_id: string, query?: {
@@ -5085,6 +5207,8 @@ declare class ParraAPI {
5085
5207
  listNotificationTopics: (tenant_id: string, options?: Options) => Promise<Array<NotificationTopic>>;
5086
5208
  updateNotificationTopicById: (tenant_id: string, notification_topic_id: string, body?: UpdateNotificationTopicRequestBody, options?: Options) => Promise<NotificationTopic>;
5087
5209
  deleteNotificationTopicById: (tenant_id: string, notification_topic_id: string, options?: Options) => Promise<Response>;
5210
+ listSchemas: (tenant_id: string, options?: Options) => Promise<Array<Schema>>;
5211
+ getSchemaById: (tenant_id: string, schema_id: string, options?: Options) => Promise<Schema>;
5088
5212
  createSettingsViewForTenant: (tenant_id: string, body: CreateSettingsViewRequestBody, options?: Options) => Promise<SettingsView>;
5089
5213
  listSettingsViewsForTenant: (tenant_id: string, query?: {
5090
5214
  limit?: 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.TicketLinkType = exports.BoardType = 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.SocialAccountType = exports.CreatorUpdateGiveawayCriteria = exports.CreatorUpdateChannelType = exports.CreatorUpdateStatus = exports.CreatorUpdateVisibilityType = exports.CreatorUpdateTopic = exports.AttachmentType = exports.ChannelMemberRole = exports.ChannelMemberType = exports.ChatChannelStatus = exports.ChatChannelType = exports.BillingSourceType = exports.ApplePurchaseType = exports.ApplePurchaseEnvironment = exports.PurchaseEnvironment = exports.PurchasePlatform = exports.PurchaseType = exports.PaywallIapType = exports.AppPaywallType = 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.PasswordlessStrategy = exports.SsoProvider = exports.SettingsItemType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = void 0;
14
+ 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.SocialAccountType = exports.CreatorUpdateGiveawayCriteria = exports.CreatorUpdateChannelType = exports.CreatorUpdateStatus = exports.CreatorUpdateVisibilityType = exports.CreatorUpdateTopic = exports.AttachmentType = exports.ChannelMemberRole = exports.ChannelMemberType = exports.ChatChannelStatus = exports.ChatChannelType = exports.BillingSourceType = exports.ApplePurchaseType = exports.ApplePurchaseEnvironment = exports.PurchaseEnvironment = exports.PurchasePlatform = exports.PurchaseType = exports.PaywallIapType = exports.AppPaywallType = exports.ShareAssetType = exports.ValueUnit = 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.PasswordlessStrategy = exports.SsoProvider = exports.SettingsItemType = exports.ApnsPushType = exports.ApnsEnvironment = exports.ChannelType = exports.AppVersionStatus = exports.TicketDisplayStatus = exports.UserNoteStatus = exports.TicketLinkType = exports.BoardType = void 0;
16
16
  var TicketType;
17
17
  (function (TicketType) {
18
18
  TicketType["bug"] = "bug";
@@ -130,6 +130,14 @@ var SubscriptionStatus;
130
130
  SubscriptionStatus["canceled"] = "canceled";
131
131
  SubscriptionStatus["unpaid"] = "unpaid";
132
132
  })(SubscriptionStatus || (exports.SubscriptionStatus = SubscriptionStatus = {}));
133
+ var ValueUnit;
134
+ (function (ValueUnit) {
135
+ ValueUnit["px"] = "px";
136
+ })(ValueUnit || (exports.ValueUnit = ValueUnit = {}));
137
+ var ShareAssetType;
138
+ (function (ShareAssetType) {
139
+ ShareAssetType["creatorUpdate"] = "creator_update";
140
+ })(ShareAssetType || (exports.ShareAssetType = ShareAssetType = {}));
133
141
  var AppPaywallType;
134
142
  (function (AppPaywallType) {
135
143
  AppPaywallType["apple"] = "apple";
@@ -675,6 +683,78 @@ var ParraAPI = /** @class */ (function () {
675
683
  "content-type": "application/json",
676
684
  }, raw: true }, options));
677
685
  };
686
+ this.createDesignSystem = function (tenant_id, body, options) {
687
+ if (options === void 0) { options = {}; }
688
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/design-systems"), __assign({ method: "post", body: JSON.stringify(body), headers: {
689
+ "content-type": "application/json",
690
+ } }, options));
691
+ };
692
+ this.listDesignSystems = function (tenant_id, options) {
693
+ if (options === void 0) { options = {}; }
694
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/design-systems"), __assign({ method: "get" }, options));
695
+ };
696
+ this.getDesignSystemJson = function (tenant_id, design_system_id, options) {
697
+ if (options === void 0) { options = {}; }
698
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/design-systems/").concat(design_system_id, "/json"), __assign({ method: "get" }, options));
699
+ };
700
+ this.getDesignSystemById = function (tenant_id, design_system_id, options) {
701
+ if (options === void 0) { options = {}; }
702
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/design-systems/").concat(design_system_id), __assign({ method: "get" }, options));
703
+ };
704
+ this.updateDesignSystemById = function (tenant_id, design_system_id, body, options) {
705
+ if (options === void 0) { options = {}; }
706
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/design-systems/").concat(design_system_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
707
+ "content-type": "application/json",
708
+ } }, options));
709
+ };
710
+ this.deleteDesignSystemById = function (tenant_id, design_system_id, options) {
711
+ if (options === void 0) { options = {}; }
712
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/design-systems/").concat(design_system_id), __assign({ method: "delete" }, options));
713
+ };
714
+ this.createTokenForDesignSystem = function (tenant_id, design_system_id, body, options) {
715
+ if (options === void 0) { options = {}; }
716
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/design-systems/").concat(design_system_id, "/tokens"), __assign({ method: "post", body: JSON.stringify(body), headers: {
717
+ "content-type": "application/json",
718
+ } }, options));
719
+ };
720
+ this.getDesignTokenById = function (tenant_id, design_token_id, options) {
721
+ if (options === void 0) { options = {}; }
722
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/design-tokens/").concat(design_token_id), __assign({ method: "get" }, options));
723
+ };
724
+ this.updateDesignTokenById = function (tenant_id, design_token_id, body, options) {
725
+ if (options === void 0) { options = {}; }
726
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/design-tokens/").concat(design_token_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
727
+ "content-type": "application/json",
728
+ } }, options));
729
+ };
730
+ this.deleteDesignTokenById = function (tenant_id, design_token_id, options) {
731
+ if (options === void 0) { options = {}; }
732
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/design-tokens/").concat(design_token_id), __assign({ method: "delete" }, options));
733
+ };
734
+ this.createShareAsset = function (tenant_id, body, options) {
735
+ if (options === void 0) { options = {}; }
736
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/share-assets"), __assign({ method: "post", body: JSON.stringify(body), headers: {
737
+ "content-type": "application/json",
738
+ } }, options));
739
+ };
740
+ this.listShareAssets = function (tenant_id, query, options) {
741
+ if (options === void 0) { options = {}; }
742
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/share-assets"), __assign({ method: "get", query: query }, options));
743
+ };
744
+ this.getShareAssetById = function (tenant_id, share_asset_id, options) {
745
+ if (options === void 0) { options = {}; }
746
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/share-assets/").concat(share_asset_id), __assign({ method: "get" }, options));
747
+ };
748
+ this.updateShareAssetById = function (tenant_id, share_asset_id, body, options) {
749
+ if (options === void 0) { options = {}; }
750
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/share-assets/").concat(share_asset_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
751
+ "content-type": "application/json",
752
+ } }, options));
753
+ };
754
+ this.deleteShareAssetById = function (tenant_id, share_asset_id, options) {
755
+ if (options === void 0) { options = {}; }
756
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/brand/share-assets/").concat(share_asset_id), __assign({ method: "delete" }, options));
757
+ };
678
758
  this.updateAppleInAppPurchase = function (tenant_id, billing_source_id, apple_in_app_purchase_id, body, options) {
679
759
  if (options === void 0) { options = {}; }
680
760
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/billing/sources/").concat(billing_source_id, "/apple/in-app-purchases/").concat(apple_in_app_purchase_id), __assign({ method: "put", body: JSON.stringify(body), headers: {
@@ -1657,6 +1737,14 @@ var ParraAPI = /** @class */ (function () {
1657
1737
  if (options === void 0) { options = {}; }
1658
1738
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/notifications/topics/").concat(notification_topic_id), __assign({ method: "delete" }, options));
1659
1739
  };
1740
+ this.listSchemas = function (tenant_id, options) {
1741
+ if (options === void 0) { options = {}; }
1742
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/schemas"), __assign({ method: "get" }, options));
1743
+ };
1744
+ this.getSchemaById = function (tenant_id, schema_id, options) {
1745
+ if (options === void 0) { options = {}; }
1746
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/schemas/").concat(schema_id), __assign({ method: "get" }, options));
1747
+ };
1660
1748
  this.createSettingsViewForTenant = function (tenant_id, body, options) {
1661
1749
  if (options === void 0) { options = {}; }
1662
1750
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/settings/views"), __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.483",
3
+ "version": "0.3.485",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",