@parra/parra-js-sdk 0.3.441 → 0.3.442
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.
- package/dist/ParraAPI.d.ts +43 -0
- package/dist/ParraAPI.js +20 -2
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
@@ -1105,6 +1105,17 @@ export interface ChannelMember {
|
|
1105
1105
|
type: ChannelMemberType;
|
1106
1106
|
roles: Array<ChannelMemberRole>;
|
1107
1107
|
}
|
1108
|
+
export declare enum AttachmentType {
|
1109
|
+
image = "image"
|
1110
|
+
}
|
1111
|
+
export interface MessageAttachment {
|
1112
|
+
id: string;
|
1113
|
+
created_at: string;
|
1114
|
+
updated_at: string;
|
1115
|
+
deleted_at?: string | null;
|
1116
|
+
type: AttachmentType;
|
1117
|
+
image?: ImageAssetStub;
|
1118
|
+
}
|
1108
1119
|
export interface Message {
|
1109
1120
|
id: string;
|
1110
1121
|
created_at: string;
|
@@ -1115,6 +1126,7 @@ export interface Message {
|
|
1115
1126
|
member_id: string;
|
1116
1127
|
user?: TenantUserStub | null;
|
1117
1128
|
content: string;
|
1129
|
+
attachments?: Array<MessageAttachment>;
|
1118
1130
|
}
|
1119
1131
|
export interface Channel {
|
1120
1132
|
id: string;
|
@@ -1144,8 +1156,13 @@ export interface MessageCollectionResponse {
|
|
1144
1156
|
total_count: number;
|
1145
1157
|
data: Array<MessageCollectionStub>;
|
1146
1158
|
}
|
1159
|
+
export interface CreateMessageAttachment {
|
1160
|
+
type: AttachmentType;
|
1161
|
+
image_asset_id?: string;
|
1162
|
+
}
|
1147
1163
|
export interface CreateMessageRequestBody {
|
1148
1164
|
content: string;
|
1165
|
+
attachments?: Array<CreateMessageAttachment>;
|
1149
1166
|
}
|
1150
1167
|
export interface FlagMessageRequestBody {
|
1151
1168
|
reason?: string | null;
|
@@ -4014,6 +4031,25 @@ export interface AddRolesToUserRequestBody {
|
|
4014
4031
|
role_id?: string | null;
|
4015
4032
|
role_ids?: Array<string> | null;
|
4016
4033
|
}
|
4034
|
+
export declare enum TenantUserMetricType {
|
4035
|
+
total = "total",
|
4036
|
+
new = "new",
|
4037
|
+
dau = "dau"
|
4038
|
+
}
|
4039
|
+
export interface TenantUserMetricsQuery {
|
4040
|
+
start_at: string;
|
4041
|
+
end_at: string;
|
4042
|
+
metric: TenantUserMetricType;
|
4043
|
+
}
|
4044
|
+
export interface TenantUserMetricsData {
|
4045
|
+
date?: string;
|
4046
|
+
value?: number;
|
4047
|
+
}
|
4048
|
+
export interface TenantUserMetrics {
|
4049
|
+
message?: string | null;
|
4050
|
+
query: TenantUserMetricsQuery;
|
4051
|
+
data: Array<TenantUserMetricsData>;
|
4052
|
+
}
|
4017
4053
|
export interface UpdateTenantUserRequestBody {
|
4018
4054
|
identity?: string | null;
|
4019
4055
|
name?: string | null;
|
@@ -4631,6 +4667,7 @@ declare class ParraAPI {
|
|
4631
4667
|
}, options?: Options) => Promise<FeedItemCollectionResponse>;
|
4632
4668
|
updateFeedItem: (tenant_id: string, feed_id_or_slug: string, feed_item_id: string, body?: UpdateFeedItemRequestBody, options?: Options) => Promise<FeedItem>;
|
4633
4669
|
deleteFeedItem: (tenant_id: string, feed_id_or_slug: string, feed_item_id: string, options?: Options) => Promise<Response>;
|
4670
|
+
getFeedItem: (tenant_id: string, feed_item_id: string, options?: Options) => Promise<FeedItem>;
|
4634
4671
|
addCommentToFeedItem: (tenant_id: string, feed_item_id: string, body: CreateCommentRequestBody, options?: Options) => Promise<Comment>;
|
4635
4672
|
paginateCommentsForFeedItem: (tenant_id: string, feed_item_id: string, query?: {
|
4636
4673
|
limit?: number;
|
@@ -5001,6 +5038,12 @@ declare class ParraAPI {
|
|
5001
5038
|
deleteRoleById: (tenant_id: string, role_id: string, options?: Options) => Promise<Response>;
|
5002
5039
|
addRolesToUser: (tenant_id: string, user_id: string, body?: AddRolesToUserRequestBody, options?: Options) => Promise<Response>;
|
5003
5040
|
removeRoleFromUser: (tenant_id: string, user_id: string, user_role_id: string, options?: Options) => Promise<Response>;
|
5041
|
+
getUsersMetricsForTenantById: (tenant_id: string, query?: {
|
5042
|
+
start_at?: string;
|
5043
|
+
end_at?: string;
|
5044
|
+
metric?: string;
|
5045
|
+
include_anonymous?: boolean;
|
5046
|
+
}, options?: Options) => Promise<TenantUserMetrics>;
|
5004
5047
|
getUserForTenantById: (tenant_id: string, user_id: string, query?: {
|
5005
5048
|
include?: string;
|
5006
5049
|
}, options?: Options) => Promise<TenantUser>;
|
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.
|
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 = exports.RefreshTokenExpirationType = exports.JwtAlgorithm = exports.GrantType = exports.PasswordlessStrategy = void 0;
|
14
|
+
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.CreatorUpdateGiveawayCriteria = exports.CreatorUpdateChannelType = exports.CreatorUpdateStatus = exports.CreatorUpdateVisibilityType = exports.CreatorUpdateTopic = exports.AttachmentType = exports.ChannelMemberRole = exports.ChannelMemberType = exports.ChatChannelStatus = exports.ChatChannelType = exports.BillingSourceType = 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 = void 0;
|
16
16
|
var TicketType;
|
17
17
|
(function (TicketType) {
|
18
18
|
TicketType["bug"] = "bug";
|
@@ -178,6 +178,10 @@ var ChannelMemberRole;
|
|
178
178
|
ChannelMemberRole["member"] = "member";
|
179
179
|
ChannelMemberRole["guest"] = "guest";
|
180
180
|
})(ChannelMemberRole || (exports.ChannelMemberRole = ChannelMemberRole = {}));
|
181
|
+
var AttachmentType;
|
182
|
+
(function (AttachmentType) {
|
183
|
+
AttachmentType["image"] = "image";
|
184
|
+
})(AttachmentType || (exports.AttachmentType = AttachmentType = {}));
|
181
185
|
var CreatorUpdateTopic;
|
182
186
|
(function (CreatorUpdateTopic) {
|
183
187
|
CreatorUpdateTopic["giveaway"] = "giveaway";
|
@@ -438,6 +442,12 @@ var IntegrationScope;
|
|
438
442
|
IntegrationScope["collection"] = "collection";
|
439
443
|
IntegrationScope["resource"] = "resource";
|
440
444
|
})(IntegrationScope || (exports.IntegrationScope = IntegrationScope = {}));
|
445
|
+
var TenantUserMetricType;
|
446
|
+
(function (TenantUserMetricType) {
|
447
|
+
TenantUserMetricType["total"] = "total";
|
448
|
+
TenantUserMetricType["new"] = "new";
|
449
|
+
TenantUserMetricType["dau"] = "dau";
|
450
|
+
})(TenantUserMetricType || (exports.TenantUserMetricType = TenantUserMetricType = {}));
|
441
451
|
var MailTemplateType;
|
442
452
|
(function (MailTemplateType) {
|
443
453
|
MailTemplateType["accountCreated"] = "account-created";
|
@@ -1045,6 +1055,10 @@ var ParraAPI = /** @class */ (function () {
|
|
1045
1055
|
if (options === void 0) { options = {}; }
|
1046
1056
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feeds/").concat(feed_id_or_slug, "/items/").concat(feed_item_id), __assign({ method: "delete" }, options));
|
1047
1057
|
};
|
1058
|
+
this.getFeedItem = function (tenant_id, feed_item_id, options) {
|
1059
|
+
if (options === void 0) { options = {}; }
|
1060
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feed/items/").concat(feed_item_id), __assign({ method: "get" }, options));
|
1061
|
+
};
|
1048
1062
|
this.addCommentToFeedItem = function (tenant_id, feed_item_id, body, options) {
|
1049
1063
|
if (options === void 0) { options = {}; }
|
1050
1064
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/feed/items/").concat(feed_item_id, "/comments"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
@@ -1975,6 +1989,10 @@ var ParraAPI = /** @class */ (function () {
|
|
1975
1989
|
if (options === void 0) { options = {}; }
|
1976
1990
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id, "/roles/").concat(user_role_id), __assign({ method: "delete" }, options));
|
1977
1991
|
};
|
1992
|
+
this.getUsersMetricsForTenantById = function (tenant_id, query, options) {
|
1993
|
+
if (options === void 0) { options = {}; }
|
1994
|
+
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/metrics"), __assign({ method: "get", query: query }, options));
|
1995
|
+
};
|
1978
1996
|
this.getUserForTenantById = function (tenant_id, user_id, query, options) {
|
1979
1997
|
if (options === void 0) { options = {}; }
|
1980
1998
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id), __assign({ method: "get", query: query }, options));
|