@iveri/contracts 0.74.0 → 0.76.0
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/api/chat/chat-conversation.type.d.ts +5 -0
- package/dist/api/social/social-activity.type.d.ts +0 -1
- package/dist/api/social/social-conversation.type.d.ts +8 -40
- package/dist/api/social/social-limits.constant.d.ts +0 -1
- package/dist/api/social/social-limits.constant.js +0 -1
- package/dist/api/social/social-member.type.d.ts +0 -2
- package/dist/api/social/social-moderation.type.d.ts +0 -7
- package/dist/api/social/social-refusal.enum.d.ts +2 -1
- package/dist/api/social/social-refusal.enum.js +2 -1
- package/dist/api/social/social-report-target.enum.d.ts +6 -3
- package/dist/api/social/social-report-target.enum.js +5 -2
- package/package.json +1 -1
|
@@ -28,6 +28,11 @@ export interface ChatLastMessagePreview {
|
|
|
28
28
|
/** Null when deleted, and for a system notice, whose key is given instead. */
|
|
29
29
|
excerpt: Nullable<string>;
|
|
30
30
|
systemKey: Nullable<string>;
|
|
31
|
+
/**
|
|
32
|
+
* A system notice's variables, as on the message itself (`{ actor, name, title, role }`), so an inbox row
|
|
33
|
+
* can say "Nino created the group" rather than a sentence with holes. Null for anything but a notice.
|
|
34
|
+
*/
|
|
35
|
+
systemVariables: Nullable<Record<string, string>>;
|
|
31
36
|
senderName: Nullable<string>;
|
|
32
37
|
isOwn: boolean;
|
|
33
38
|
isDeleted: boolean;
|
|
@@ -1,45 +1,13 @@
|
|
|
1
|
-
import type { IsoDateTime } from '../../type/iso-date-time.type.js';
|
|
2
|
-
import type { Nullable } from '../../type/nil.type.js';
|
|
3
1
|
import type { UUID } from '../../type/uuid.type.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
isOwn: boolean;
|
|
10
|
-
sentAt: IsoDateTime;
|
|
11
|
-
}
|
|
12
|
-
export interface SocialConversation {
|
|
13
|
-
id: UUID;
|
|
14
|
-
/** Null once the other person has left Ezo. */
|
|
15
|
-
other: Nullable<SocialMemberCard>;
|
|
16
|
-
/** Waiting for this member to accept it. */
|
|
17
|
-
isRequest: boolean;
|
|
18
|
-
unreadCount: number;
|
|
19
|
-
lastMessage: Nullable<SocialMessagePreview>;
|
|
20
|
-
/** Whether this member can send here now: false after a block or when the other has left. */
|
|
21
|
-
canSend: boolean;
|
|
22
|
-
/** Up to where the other person has read. Absent while a request is unanswered. */
|
|
23
|
-
otherReadAt: Nullable<IsoDateTime>;
|
|
24
|
-
}
|
|
25
|
-
export interface SocialMessage {
|
|
26
|
-
id: UUID;
|
|
27
|
-
conversationId: UUID;
|
|
28
|
-
/** Null once the sender has left Ezo. */
|
|
29
|
-
senderId: Nullable<UUID>;
|
|
30
|
-
body: Nullable<string>;
|
|
31
|
-
image: Nullable<SocialImage>;
|
|
32
|
-
isOwn: boolean;
|
|
33
|
-
/** The sender took it back. */
|
|
34
|
-
isDeleted: boolean;
|
|
35
|
-
sentAt: IsoDateTime;
|
|
36
|
-
}
|
|
2
|
+
/**
|
|
3
|
+
* `POST /conversations`: open, or return, the conversation with another member.
|
|
4
|
+
*
|
|
5
|
+
* Ezo decides whether these two may talk; Baasi, Iveri's messenger, holds what they say.
|
|
6
|
+
*/
|
|
37
7
|
export interface StartSocialConversationRequest {
|
|
38
8
|
memberId: UUID;
|
|
39
9
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
body?: Nullable<string>;
|
|
44
|
-
mediaId?: Nullable<UUID>;
|
|
10
|
+
/** The Baasi conversation for a pair of members, read and written through `@iveri/chat-kit`. */
|
|
11
|
+
export interface SocialConversationHandle {
|
|
12
|
+
conversationId: UUID;
|
|
45
13
|
}
|
|
@@ -43,7 +43,6 @@ export interface SocialMe extends SocialProfile {
|
|
|
43
43
|
deletionScheduledFor: Nullable<IsoDateTime>;
|
|
44
44
|
acceptedTermsVersion: string;
|
|
45
45
|
unreadActivityCount: number;
|
|
46
|
-
unreadMessageCount: number;
|
|
47
46
|
}
|
|
48
47
|
export interface CreateSocialProfileRequest {
|
|
49
48
|
handle: string;
|
|
@@ -70,7 +69,6 @@ export interface SocialMemberListItem {
|
|
|
70
69
|
since: IsoDateTime;
|
|
71
70
|
}
|
|
72
71
|
export interface SocialPreferences {
|
|
73
|
-
emailOnMessage: boolean;
|
|
74
72
|
emailOnFollow: boolean;
|
|
75
73
|
emailOnMention: boolean;
|
|
76
74
|
emailOnComment: boolean;
|
|
@@ -35,15 +35,8 @@ export interface CreateSocialAppealRequest {
|
|
|
35
35
|
export interface SocialCaseEvidence {
|
|
36
36
|
text: Nullable<string>;
|
|
37
37
|
imageUrls: string[];
|
|
38
|
-
/** For a reported message, what came just before it, oldest first. */
|
|
39
|
-
context: SocialCaseMessageContext[];
|
|
40
38
|
createdAt: Nullable<IsoDateTime>;
|
|
41
39
|
}
|
|
42
|
-
export interface SocialCaseMessageContext {
|
|
43
|
-
senderHandle: Nullable<string>;
|
|
44
|
-
body: Nullable<string>;
|
|
45
|
-
sentAt: IsoDateTime;
|
|
46
|
-
}
|
|
47
40
|
export interface SocialCaseSummary {
|
|
48
41
|
id: UUID;
|
|
49
42
|
targetType: SocialReportTarget;
|
|
@@ -24,7 +24,8 @@ export declare enum SocialRefusal {
|
|
|
24
24
|
COMMENTS_DISABLED = "comments-disabled",
|
|
25
25
|
CANNOT_FOLLOW_SELF = "cannot-follow-self",
|
|
26
26
|
CANNOT_MESSAGE = "cannot-message",
|
|
27
|
-
|
|
27
|
+
/** Messages are held by Baasi, which this deployment cannot reach or is not configured for. */
|
|
28
|
+
MESSAGING_UNAVAILABLE = "messaging-unavailable",
|
|
28
29
|
ALREADY_REPORTED = "already-reported",
|
|
29
30
|
ALREADY_APPEALED = "already-appealed",
|
|
30
31
|
APPEAL_NOT_ALLOWED = "appeal-not-allowed",
|
|
@@ -25,7 +25,8 @@ export var SocialRefusal;
|
|
|
25
25
|
SocialRefusal["COMMENTS_DISABLED"] = "comments-disabled";
|
|
26
26
|
SocialRefusal["CANNOT_FOLLOW_SELF"] = "cannot-follow-self";
|
|
27
27
|
SocialRefusal["CANNOT_MESSAGE"] = "cannot-message";
|
|
28
|
-
|
|
28
|
+
/** Messages are held by Baasi, which this deployment cannot reach or is not configured for. */
|
|
29
|
+
SocialRefusal["MESSAGING_UNAVAILABLE"] = "messaging-unavailable";
|
|
29
30
|
SocialRefusal["ALREADY_REPORTED"] = "already-reported";
|
|
30
31
|
SocialRefusal["ALREADY_APPEALED"] = "already-appealed";
|
|
31
32
|
SocialRefusal["APPEAL_NOT_ALLOWED"] = "appeal-not-allowed";
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* The kinds of thing a member can report.
|
|
3
|
+
*
|
|
4
|
+
* A message is reported to Baasi, which holds it, and lands in Baasi's queue for Ezo's tenant.
|
|
5
|
+
*/
|
|
2
6
|
export declare enum SocialReportTarget {
|
|
3
7
|
POST = "post",
|
|
4
8
|
COMMENT = "comment",
|
|
5
9
|
STORY = "story",
|
|
6
|
-
MEMBER = "member"
|
|
7
|
-
MESSAGE = "message"
|
|
10
|
+
MEMBER = "member"
|
|
8
11
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* The kinds of thing a member can report.
|
|
3
|
+
*
|
|
4
|
+
* A message is reported to Baasi, which holds it, and lands in Baasi's queue for Ezo's tenant.
|
|
5
|
+
*/
|
|
2
6
|
export var SocialReportTarget;
|
|
3
7
|
(function (SocialReportTarget) {
|
|
4
8
|
SocialReportTarget["POST"] = "post";
|
|
5
9
|
SocialReportTarget["COMMENT"] = "comment";
|
|
6
10
|
SocialReportTarget["STORY"] = "story";
|
|
7
11
|
SocialReportTarget["MEMBER"] = "member";
|
|
8
|
-
SocialReportTarget["MESSAGE"] = "message";
|
|
9
12
|
})(SocialReportTarget || (SocialReportTarget = {}));
|