@parra/parra-js-sdk 0.3.318 → 0.3.320

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.
@@ -496,6 +496,7 @@ export interface TenantUser {
496
496
  last_seen_at?: string | null;
497
497
  last_login_at?: string | null;
498
498
  has_password: boolean;
499
+ settings: object;
499
500
  properties: object;
500
501
  metadata: object;
501
502
  identities?: Array<Identity> | null;
@@ -785,7 +786,7 @@ export interface CreateCreatorAttachmentAttachmentRequestBody {
785
786
  export interface CreateCreatorUpdateRequestBody {
786
787
  publish?: boolean | null;
787
788
  title: string;
788
- description?: string;
789
+ body?: string;
789
790
  attachments?: Array<CreateCreatorAttachmentAttachmentRequestBody>;
790
791
  }
791
792
  export declare enum CreatorUpdateStatus {
@@ -802,6 +803,30 @@ export interface CreatorUpdateAttachmentStub {
802
803
  id: string;
803
804
  image?: ImageAssetStub | null;
804
805
  }
806
+ export declare enum CreatorUpdateChannelType {
807
+ feed = "feed",
808
+ notification = "notification"
809
+ }
810
+ export interface CreatorUpdateChannelFeedData {
811
+ feed_view_id: string;
812
+ }
813
+ export interface CreatorUpdateChannelNotificationData {
814
+ notification_template_id: string;
815
+ notification_title?: string | null;
816
+ notification_body?: string | null;
817
+ }
818
+ export type CreatorUpdateChannelData = CreatorUpdateChannelFeedData | CreatorUpdateChannelNotificationData;
819
+ export interface CreatorUpdateChannel {
820
+ id: string;
821
+ created_at: string;
822
+ updated_at: string;
823
+ deleted_at?: string | null;
824
+ type: CreatorUpdateChannelType;
825
+ data: CreatorUpdateChannelData;
826
+ delivered?: boolean | null;
827
+ delivered_at?: string | null;
828
+ disabled?: boolean;
829
+ }
805
830
  export interface CreatorUpdate {
806
831
  id: string;
807
832
  created_at: string;
@@ -810,10 +835,11 @@ export interface CreatorUpdate {
810
835
  tenant_id: string;
811
836
  status: CreatorUpdateStatus;
812
837
  title: string;
813
- description?: string;
838
+ body?: string;
814
839
  sender?: CreatorUpdateSenderStub;
815
840
  template?: CreatorUpdateSenderStub;
816
- attachments?: Array<CreatorUpdateAttachmentStub>;
841
+ attachments: Array<CreatorUpdateAttachmentStub>;
842
+ channels: Array<CreatorUpdateChannel>;
817
843
  }
818
844
  export interface CreatorUpdateCollectionResponse {
819
845
  page: number;
@@ -824,7 +850,7 @@ export interface CreatorUpdateCollectionResponse {
824
850
  }
825
851
  export interface UpdateCreatorUpdateRequestBody {
826
852
  title?: string;
827
- description?: string;
853
+ body?: string;
828
854
  }
829
855
  export declare enum FeedItemType {
830
856
  youtubeVideo = "youtube_video",
@@ -888,7 +914,7 @@ export interface CreatorUpdateAppStub {
888
914
  updated_at: string;
889
915
  deleted_at?: string | null;
890
916
  title: string;
891
- description?: string;
917
+ body?: string;
892
918
  sender?: CreatorUpdateSenderStub | null;
893
919
  attachments?: Array<CreatorUpdateAttachmentStub>;
894
920
  }
@@ -2174,6 +2200,16 @@ export interface UpdateSettingsViewRequestBody {
2174
2200
  footer_label?: string | null;
2175
2201
  slug?: string;
2176
2202
  }
2203
+ export interface SettingsItemIntegerValue {
2204
+ value?: number | null;
2205
+ }
2206
+ export interface SettingsItemStringValue {
2207
+ value?: string | null;
2208
+ }
2209
+ export interface SettingsItemBooleanDataValue {
2210
+ value?: boolean | null;
2211
+ }
2212
+ export type SettingsItemValue = SettingsItemIntegerValue | SettingsItemStringValue | SettingsItemBooleanDataValue;
2177
2213
  export interface SettingsItemIntegerDataWithValue {
2178
2214
  default_value?: number | null;
2179
2215
  min_value?: number | null;
@@ -2813,6 +2849,11 @@ export interface ConnectedAppAppStoreConnectApiConnectionData {
2813
2849
  key_id: string;
2814
2850
  private_key: string;
2815
2851
  }
2852
+ export interface ConnectedApnsConnectionData {
2853
+ team_id: string;
2854
+ key_id: string;
2855
+ private_key: string;
2856
+ }
2816
2857
  export interface ConnectedAppResendConnectionData {
2817
2858
  api_key: string;
2818
2859
  }
@@ -2835,10 +2876,11 @@ export interface ConnectedAppXConnectionData {
2835
2876
  handle: string;
2836
2877
  name: string;
2837
2878
  }
2838
- export type ConnectedAppConnectionData = ConnectedAppAppStoreConnectApiConnectionData | ConnectedAppResendConnectionData | ConnectedAppSlackConnectionData | ConnectedAppSendgridConnectionData | ConnectedAppTwilioConnectionData | ConnectedAppXConnectionData;
2879
+ export type ConnectedAppConnectionData = ConnectedAppAppStoreConnectApiConnectionData | ConnectedApnsConnectionData | ConnectedAppResendConnectionData | ConnectedAppSlackConnectionData | ConnectedAppSendgridConnectionData | ConnectedAppTwilioConnectionData | ConnectedAppXConnectionData;
2839
2880
  export declare enum ConnectedAppType {
2840
2881
  parra = "parra",
2841
2882
  appStoreConnectApi = "app-store-connect-api",
2883
+ apns = "apns",
2842
2884
  resend = "resend",
2843
2885
  sendgrid = "sendgrid",
2844
2886
  slack = "slack",
@@ -2910,6 +2952,9 @@ export interface UpdateConnectedAppConnectionRequestBody {
2910
2952
  app_store_connect_api_issuer?: string;
2911
2953
  app_store_connect_api_key_id?: string;
2912
2954
  app_store_connect_api_private_key?: string;
2955
+ apns_team_id?: string;
2956
+ apns_key_id?: string;
2957
+ apns_private_key?: string;
2913
2958
  twilio_account_sid?: string;
2914
2959
  twilio_auth_token?: string;
2915
2960
  twilio_messaging_service_sid?: string;
@@ -2922,6 +2967,11 @@ export interface CreateAppStoreConnectConnectedAppConnectionRequestBody {
2922
2967
  key_id: string;
2923
2968
  private_key: string;
2924
2969
  }
2970
+ export interface CreateApnsConnectedAppConnectionRequestBody {
2971
+ team_id: string;
2972
+ key_id: string;
2973
+ private_key: string;
2974
+ }
2925
2975
  export interface CreateResendConnectedAppConnectionRequestBody {
2926
2976
  api_key: string;
2927
2977
  }
@@ -2944,7 +2994,7 @@ export interface CreateXConnectedAppConnectionRequestBody {
2944
2994
  code: string;
2945
2995
  code_verifier: string;
2946
2996
  }
2947
- export type CreateConnectedAppConnectionRequestBody = CreateAppStoreConnectConnectedAppConnectionRequestBody | CreateResendConnectedAppConnectionRequestBody | CreateSendgridConnectedAppConnectionRequestBody | CreateSlackConnectedAppConnectionRequestBody | CreateYoutubeConnectedAppConnectionRequestBody | CreateTwilioConnectedAppConnectionRequestBody | CreateXConnectedAppConnectionRequestBody;
2997
+ export type CreateConnectedAppConnectionRequestBody = CreateAppStoreConnectConnectedAppConnectionRequestBody | CreateApnsConnectedAppConnectionRequestBody | CreateResendConnectedAppConnectionRequestBody | CreateSendgridConnectedAppConnectionRequestBody | CreateSlackConnectedAppConnectionRequestBody | CreateYoutubeConnectedAppConnectionRequestBody | CreateTwilioConnectedAppConnectionRequestBody | CreateXConnectedAppConnectionRequestBody;
2948
2998
  export declare enum IntegrationType {
2949
2999
  parraFeedbackFormBoard = "parra-feedback-form-board",
2950
3000
  slackFeedbackForm = "slack-feedback-form",
@@ -3773,6 +3823,7 @@ declare class ParraAPI {
3773
3823
  }, options?: Options) => Promise<Array<SettingsView>>;
3774
3824
  updateSettingsViewForTenant: (tenant_id: string, settings_view_id: string, body?: UpdateSettingsViewRequestBody, options?: Options) => Promise<SettingsView>;
3775
3825
  deleteSettingsViewForTenant: (tenant_id: string, settings_view_id: string, options?: Options) => Promise<Response>;
3826
+ updateSettingsItemValueForTenantUser: (tenant_id: string, user_id: string, settings_item_id_or_key: string, body?: SettingsItemValue, options?: Options) => Promise<SettingsItemValue>;
3776
3827
  listSettingsViewsForTenantUser: (tenant_id: string, user_id: string, options?: Options) => Promise<Array<UserSettingsView>>;
3777
3828
  getSettingsViewForTenantUser: (tenant_id: string, user_id: string, settings_view_id: string, options?: Options) => Promise<UserSettingsView>;
3778
3829
  createSettingsGroupForSettingsView: (tenant_id: string, settings_view_id: string, body: CreateSettingsGroupRequestBody, options?: Options) => Promise<SettingsGroup>;
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.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;
14
+ 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.CreatorUpdateChannelType = 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 = exports.PolicyDocumentStatus = void 0;
16
16
  var TicketType;
17
17
  (function (TicketType) {
18
18
  TicketType["bug"] = "bug";
@@ -125,6 +125,11 @@ var CreatorUpdateStatus;
125
125
  CreatorUpdateStatus["draft"] = "draft";
126
126
  CreatorUpdateStatus["published"] = "published";
127
127
  })(CreatorUpdateStatus || (exports.CreatorUpdateStatus = CreatorUpdateStatus = {}));
128
+ var CreatorUpdateChannelType;
129
+ (function (CreatorUpdateChannelType) {
130
+ CreatorUpdateChannelType["feed"] = "feed";
131
+ CreatorUpdateChannelType["notification"] = "notification";
132
+ })(CreatorUpdateChannelType || (exports.CreatorUpdateChannelType = CreatorUpdateChannelType = {}));
128
133
  var FeedItemType;
129
134
  (function (FeedItemType) {
130
135
  FeedItemType["youtubeVideo"] = "youtube_video";
@@ -293,6 +298,7 @@ var ConnectedAppType;
293
298
  (function (ConnectedAppType) {
294
299
  ConnectedAppType["parra"] = "parra";
295
300
  ConnectedAppType["appStoreConnectApi"] = "app-store-connect-api";
301
+ ConnectedAppType["apns"] = "apns";
296
302
  ConnectedAppType["resend"] = "resend";
297
303
  ConnectedAppType["sendgrid"] = "sendgrid";
298
304
  ConnectedAppType["slack"] = "slack";
@@ -1100,6 +1106,12 @@ var ParraAPI = /** @class */ (function () {
1100
1106
  if (options === void 0) { options = {}; }
1101
1107
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/settings/views/").concat(settings_view_id), __assign({ method: "delete" }, options));
1102
1108
  };
1109
+ this.updateSettingsItemValueForTenantUser = function (tenant_id, user_id, settings_item_id_or_key, body, options) {
1110
+ if (options === void 0) { options = {}; }
1111
+ return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id, "/settings/items/").concat(settings_item_id_or_key, "/value"), __assign({ method: "put", body: JSON.stringify(body), headers: {
1112
+ "content-type": "application/json",
1113
+ } }, options));
1114
+ };
1103
1115
  this.listSettingsViewsForTenantUser = function (tenant_id, user_id, options) {
1104
1116
  if (options === void 0) { options = {}; }
1105
1117
  return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id, "/settings/views"), __assign({ method: "get" }, options));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.318",
3
+ "version": "0.3.320",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",