@iveri/contracts 0.102.0 → 0.104.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.
@@ -28,6 +28,19 @@ export interface ChatCall {
28
28
  /** Set once the call has ended, and only then. */
29
29
  endReason: Nullable<ChatCallEndReason>;
30
30
  startedBy: UUID;
31
+ /**
32
+ * A call in a group: it rang everybody who could be rung, anybody in the group may join it while it lasts, and
33
+ * leaving it does not end it for the others. A call between two people is not.
34
+ */
35
+ isGroup: boolean;
36
+ /** The group's title in a group call, so a ring can say where it comes from; null between two people. */
37
+ title: Nullable<string>;
38
+ /** How many people may be in it at once: 2 between two people, the group call cap in a group. */
39
+ maxParticipants: number;
40
+ /**
41
+ * Everybody it rang and everybody who joined. In a group call somebody who joins late is added, and one the call
42
+ * did not ring (they muted the group, or it was too large to ring) appears only once they join.
43
+ */
31
44
  participants: ChatCallParticipant[];
32
45
  /** When an unanswered call stops ringing and becomes missed. */
33
46
  ringExpiresAt: IsoDateTime;
@@ -52,7 +65,10 @@ export interface ChatCallJoin {
52
65
  token: string;
53
66
  expiresAt: IsoDateTime;
54
67
  }
55
- /** `GET /conversations/:conversationId/calls/current`: the call ringing or under way there, if any. */
68
+ /**
69
+ * `GET /conversations/:conversationId/calls/current`: the call ringing or under way there, if any. Between two people
70
+ * only a call I am in; in a group any live call, so a member it did not ring can see it and join.
71
+ */
56
72
  export interface ChatCurrentCall {
57
73
  call: Nullable<ChatCall>;
58
74
  }
@@ -14,6 +14,12 @@ export interface EmbeddedChatParticipant {
14
14
  avatarUrl?: Nullable<string>;
15
15
  /** `request` puts it in their Requests until they accept, which is how Ezo's message requests work. */
16
16
  asRequest?: boolean;
17
+ /**
18
+ * Whether somebody arriving reads what was said before they came. Omitted means false: a newcomer starts at the
19
+ * current end. A shop sets it for a member of staff taking up an order's conversation, who has to read what the
20
+ * customer already asked. Read only when the participant arrives or comes back.
21
+ */
22
+ seesHistory?: boolean;
17
23
  }
18
24
  /**
19
25
  * `PUT /embed/conversations`, under `chat:embed:manage`. An upsert keyed on the context, so a retry,
@@ -16,10 +16,12 @@ export declare enum ChatRefusal {
16
16
  SUSPENDED = "suspended",
17
17
  ATTACHMENT_REFUSED = "attachment-refused",
18
18
  REQUEST_PENDING = "request-pending",
19
- /** This conversation takes no calls: a group, a product's conversation that does not allow them, or an app's. */
19
+ /** This conversation takes no calls: a product's conversation that does not allow them, or an app's. */
20
20
  CALLS_OFF = "calls-off",
21
21
  /** The call has ended, or this person is not in it. */
22
22
  CALL_UNAVAILABLE = "call-unavailable",
23
+ /** A group call already has as many people in it as it takes. */
24
+ CALL_FULL = "call-full",
23
25
  /**
24
26
  * The app's plan does not allow it this month: a new user over the monthly-active-user limit, or a message over the
25
27
  * message limit. The value is `USAGE_LIMIT_REACHED_REASON` from `@iveri/contracts/billing`, and the details name the
@@ -17,10 +17,12 @@ export var ChatRefusal;
17
17
  ChatRefusal["SUSPENDED"] = "suspended";
18
18
  ChatRefusal["ATTACHMENT_REFUSED"] = "attachment-refused";
19
19
  ChatRefusal["REQUEST_PENDING"] = "request-pending";
20
- /** This conversation takes no calls: a group, a product's conversation that does not allow them, or an app's. */
20
+ /** This conversation takes no calls: a product's conversation that does not allow them, or an app's. */
21
21
  ChatRefusal["CALLS_OFF"] = "calls-off";
22
22
  /** The call has ended, or this person is not in it. */
23
23
  ChatRefusal["CALL_UNAVAILABLE"] = "call-unavailable";
24
+ /** A group call already has as many people in it as it takes. */
25
+ ChatRefusal["CALL_FULL"] = "call-full";
24
26
  /**
25
27
  * The app's plan does not allow it this month: a new user over the monthly-active-user limit, or a message over the
26
28
  * message limit. The value is `USAGE_LIMIT_REACHED_REASON` from `@iveri/contracts/billing`, and the details name the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iveri/contracts",
3
- "version": "0.102.0",
3
+ "version": "0.104.0",
4
4
  "description": "Wire contracts shared by every Iveri backend and frontend. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {