@iveri/contracts 0.73.0 → 0.75.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.
@@ -0,0 +1,5 @@
1
+ /** How an application arrived: through the careers page, or typed in by HR. */
2
+ export declare enum HrApplicationSource {
3
+ CAREERS = "careers",
4
+ ADDED = "added"
5
+ }
@@ -0,0 +1,6 @@
1
+ /** How an application arrived: through the careers page, or typed in by HR. */
2
+ export var HrApplicationSource;
3
+ (function (HrApplicationSource) {
4
+ HrApplicationSource["CAREERS"] = "careers";
5
+ HrApplicationSource["ADDED"] = "added";
6
+ })(HrApplicationSource || (HrApplicationSource = {}));
@@ -1,6 +1,7 @@
1
1
  import type { IsoDateTime } from '../../type/iso-date-time.type.js';
2
2
  import type { Nullable } from '../../type/nil.type.js';
3
3
  import type { UUID } from '../../type/uuid.type.js';
4
+ import type { HrApplicationSource } from './hr-application-source.enum.js';
4
5
  import type { HrApplicationStage } from './hr-application-stage.enum.js';
5
6
  import type { HrEmploymentType } from './hr-employment-type.enum.js';
6
7
  import type { HrOpeningStatus } from './hr-opening-status.enum.js';
@@ -25,7 +26,7 @@ export interface HrApplication {
25
26
  coverLetter: Nullable<string>;
26
27
  hasCv: boolean;
27
28
  stage: HrApplicationStage;
28
- source: string;
29
+ source: HrApplicationSource;
29
30
  consentedAt: IsoDateTime;
30
31
  stageChangedAt: IsoDateTime;
31
32
  decidedAt: Nullable<IsoDateTime>;
@@ -1,5 +1,6 @@
1
1
  export * from './hr-access-action.enum.js';
2
2
  export * from './hr-announcement.type.js';
3
+ export * from './hr-application-source.enum.js';
3
4
  export * from './hr-application-stage.enum.js';
4
5
  export * from './hr-attendance-correction-status.enum.js';
5
6
  export * from './hr-attendance-source.enum.js';
@@ -1,5 +1,6 @@
1
1
  export * from './hr-access-action.enum.js';
2
2
  export * from './hr-announcement.type.js';
3
+ export * from './hr-application-source.enum.js';
3
4
  export * from './hr-application-stage.enum.js';
4
5
  export * from './hr-attendance-correction-status.enum.js';
5
6
  export * from './hr-attendance-source.enum.js';
@@ -21,6 +21,5 @@ export interface SocialActivityItem {
21
21
  }
22
22
  export interface SocialUnreadCounts {
23
23
  activity: number;
24
- messages: number;
25
24
  followRequests: number;
26
25
  }
@@ -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
- import type { SocialImage } from './social-image.type.js';
5
- import type { SocialMemberCard } from './social-member.type.js';
6
- export interface SocialMessagePreview {
7
- excerpt: Nullable<string>;
8
- hasImage: boolean;
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
- export interface SendSocialMessageRequest {
41
- /** Chosen by the client per message, so a retry cannot send it twice. */
42
- clientId: UUID;
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
  }
@@ -8,7 +8,6 @@ export declare const SOCIAL_LIMITS: {
8
8
  readonly CAPTION_MAX: 2200;
9
9
  readonly COMMENT_MAX: 1000;
10
10
  readonly STORY_CAPTION_MAX: 200;
11
- readonly MESSAGE_MAX: 2000;
12
11
  readonly ALT_TEXT_MAX: 500;
13
12
  readonly POST_IMAGES_MAX: 10;
14
13
  readonly REPORT_DETAIL_MAX: 1000;
@@ -8,7 +8,6 @@ export const SOCIAL_LIMITS = {
8
8
  CAPTION_MAX: 2200,
9
9
  COMMENT_MAX: 1000,
10
10
  STORY_CAPTION_MAX: 200,
11
- MESSAGE_MAX: 2000,
12
11
  ALT_TEXT_MAX: 500,
13
12
  POST_IMAGES_MAX: 10,
14
13
  REPORT_DETAIL_MAX: 1000,
@@ -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
- MESSAGE_EMPTY = "message-empty",
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
- SocialRefusal["MESSAGE_EMPTY"] = "message-empty";
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
- /** The kinds of thing a member can report. */
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
- /** The kinds of thing a member can report. */
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 = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iveri/contracts",
3
- "version": "0.73.0",
3
+ "version": "0.75.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {