jr-common-micro 1.1.90 → 1.1.91

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.
@@ -1,5 +1,5 @@
1
1
  import { ByIdRequest, EmptyRequest, EmptyResponse } from "../general_pb.js";
2
- import { VoiceHandsResponse, VoiceJoinResponse, VoiceReactRequest, VoiceRoomByGroupRequest, VoiceRoomIdRequest, VoiceRoomListResponse, VoiceRoomResponse, VoiceSpeakerRequest, VoiceStartRequest } from "./voice_messages_pb.js";
2
+ import { VoiceHandsResponse, VoiceJoinResponse, VoiceReactRequest, VoiceRemindRequest, VoiceRoomByGroupRequest, VoiceRoomIdRequest, VoiceRoomListResponse, VoiceRoomResponse, VoiceSpeakerRequest, VoiceStartRequest } from "./voice_messages_pb.js";
3
3
  import { MethodKind } from "@bufbuild/protobuf";
4
4
  export declare const PVoiceService: {
5
5
  readonly typeName: "micro.v1.voice.PVoiceService";
@@ -64,6 +64,12 @@ export declare const PVoiceService: {
64
64
  readonly O: typeof EmptyResponse;
65
65
  readonly kind: MethodKind.ServerStreaming;
66
66
  };
67
+ readonly remind: {
68
+ readonly name: "Remind";
69
+ readonly I: typeof VoiceRemindRequest;
70
+ readonly O: typeof EmptyResponse;
71
+ readonly kind: MethodKind.ServerStreaming;
72
+ };
67
73
  readonly removeUserData: {
68
74
  readonly name: "RemoveUserData";
69
75
  readonly I: typeof ByIdRequest;
@@ -67,6 +67,12 @@ exports.PVoiceService = {
67
67
  O: general_pb_js_1.EmptyResponse,
68
68
  kind: protobuf_1.MethodKind.ServerStreaming,
69
69
  },
70
+ remind: {
71
+ name: "Remind",
72
+ I: voice_messages_pb_js_1.VoiceRemindRequest,
73
+ O: general_pb_js_1.EmptyResponse,
74
+ kind: protobuf_1.MethodKind.ServerStreaming,
75
+ },
70
76
  removeUserData: {
71
77
  name: "RemoveUserData",
72
78
  I: general_pb_js_1.ByIdRequest,
@@ -1,7 +1,7 @@
1
1
  import type { Metadata } from "@grpc/grpc-js";
2
2
  import { Observable } from "rxjs";
3
3
  import { ByIdRequest, EmptyRequest, EmptyResponse } from "../general_nest";
4
- import { VoiceHandsResponse, VoiceJoinResponse, VoiceReactRequest, VoiceRoomByGroupRequest, VoiceRoomIdRequest, VoiceRoomListResponse, VoiceRoomResponse, VoiceSpeakerRequest, VoiceStartRequest } from "./voice_messages_nest";
4
+ import { VoiceHandsResponse, VoiceJoinResponse, VoiceReactRequest, VoiceRemindRequest, VoiceRoomByGroupRequest, VoiceRoomIdRequest, VoiceRoomListResponse, VoiceRoomResponse, VoiceSpeakerRequest, VoiceStartRequest } from "./voice_messages_nest";
5
5
  export declare const protobufPackage = "micro.v1.voice";
6
6
  export declare const MICRO_V1_VOICE_PACKAGE_NAME = "micro.v1.voice";
7
7
  export interface PVoiceServiceClient {
@@ -15,6 +15,7 @@ export interface PVoiceServiceClient {
15
15
  listHands(request: VoiceRoomIdRequest, metadata?: Metadata): Observable<VoiceHandsResponse>;
16
16
  setSpeaker(request: VoiceSpeakerRequest, metadata?: Metadata): Observable<EmptyResponse>;
17
17
  react(request: VoiceReactRequest, metadata?: Metadata): Observable<EmptyResponse>;
18
+ remind(request: VoiceRemindRequest, metadata?: Metadata): Observable<EmptyResponse>;
18
19
  removeUserData(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
19
20
  }
20
21
  export interface PVoiceServiceController {
@@ -28,6 +29,7 @@ export interface PVoiceServiceController {
28
29
  listHands(request: VoiceRoomIdRequest, metadata?: Metadata): Observable<VoiceHandsResponse>;
29
30
  setSpeaker(request: VoiceSpeakerRequest, metadata?: Metadata): Observable<EmptyResponse>;
30
31
  react(request: VoiceReactRequest, metadata?: Metadata): Observable<EmptyResponse>;
32
+ remind(request: VoiceRemindRequest, metadata?: Metadata): Observable<EmptyResponse>;
31
33
  removeUserData(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
32
34
  }
33
35
  export declare function PVoiceServiceControllerMethods(): (constructor: Function) => void;
@@ -18,6 +18,7 @@ function PVoiceServiceControllerMethods() {
18
18
  "listHands",
19
19
  "setSpeaker",
20
20
  "react",
21
+ "remind",
21
22
  "removeUserData",
22
23
  ];
23
24
  for (const method of grpcMethods) {
@@ -16,6 +16,9 @@ export interface VoiceRoom {
16
16
  ended_at: string;
17
17
  livekit_room: string;
18
18
  reactions_enabled: boolean;
19
+ scheduled_at: string;
20
+ reminder_set: boolean;
21
+ reminder_count: number;
19
22
  }
20
23
  export interface VoiceReactRequest {
21
24
  room_id: string;
@@ -30,10 +33,17 @@ export interface VoiceRoomIdRequest {
30
33
  export interface VoiceStartRequest {
31
34
  group_slug: string;
32
35
  title: string;
36
+ scheduled_at: string;
37
+ scheduled_id: string;
38
+ }
39
+ export interface VoiceRemindRequest {
40
+ room_id: string;
41
+ on: boolean;
33
42
  }
34
43
  export interface VoiceRoomResponse {
35
44
  status: ResponseStatus | undefined;
36
45
  room?: VoiceRoom | undefined;
46
+ scheduled: VoiceRoom[];
37
47
  }
38
48
  export interface VoiceRoomListResponse {
39
49
  status: ResponseStatus | undefined;
@@ -17,6 +17,9 @@ export declare class VoiceRoom extends Message<VoiceRoom> {
17
17
  endedAt: string;
18
18
  livekitRoom: string;
19
19
  reactionsEnabled: boolean;
20
+ scheduledAt: string;
21
+ reminderSet: boolean;
22
+ reminderCount: number;
20
23
  constructor(data?: PartialMessage<VoiceRoom>);
21
24
  static readonly runtime: typeof proto3;
22
25
  static readonly typeName = "micro.v1.voice.VoiceRoom";
@@ -63,6 +66,8 @@ export declare class VoiceRoomIdRequest extends Message<VoiceRoomIdRequest> {
63
66
  export declare class VoiceStartRequest extends Message<VoiceStartRequest> {
64
67
  groupSlug: string;
65
68
  title: string;
69
+ scheduledAt: string;
70
+ scheduledId: string;
66
71
  constructor(data?: PartialMessage<VoiceStartRequest>);
67
72
  static readonly runtime: typeof proto3;
68
73
  static readonly typeName = "micro.v1.voice.VoiceStartRequest";
@@ -72,9 +77,22 @@ export declare class VoiceStartRequest extends Message<VoiceStartRequest> {
72
77
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VoiceStartRequest;
73
78
  static equals(a: VoiceStartRequest | PlainMessage<VoiceStartRequest> | undefined, b: VoiceStartRequest | PlainMessage<VoiceStartRequest> | undefined): boolean;
74
79
  }
80
+ export declare class VoiceRemindRequest extends Message<VoiceRemindRequest> {
81
+ roomId: string;
82
+ on: boolean;
83
+ constructor(data?: PartialMessage<VoiceRemindRequest>);
84
+ static readonly runtime: typeof proto3;
85
+ static readonly typeName = "micro.v1.voice.VoiceRemindRequest";
86
+ static readonly fields: FieldList;
87
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): VoiceRemindRequest;
88
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): VoiceRemindRequest;
89
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): VoiceRemindRequest;
90
+ static equals(a: VoiceRemindRequest | PlainMessage<VoiceRemindRequest> | undefined, b: VoiceRemindRequest | PlainMessage<VoiceRemindRequest> | undefined): boolean;
91
+ }
75
92
  export declare class VoiceRoomResponse extends Message<VoiceRoomResponse> {
76
93
  status?: ResponseStatus;
77
94
  room?: VoiceRoom;
95
+ scheduled: VoiceRoom[];
78
96
  constructor(data?: PartialMessage<VoiceRoomResponse>);
79
97
  static readonly runtime: typeof proto3;
80
98
  static readonly typeName = "micro.v1.voice.VoiceRoomResponse";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VoiceHandsResponse = exports.VoiceHand = exports.VoiceSpeakerRequest = exports.VoiceJoinResponse = exports.VoiceRoomListResponse = exports.VoiceRoomResponse = exports.VoiceStartRequest = exports.VoiceRoomIdRequest = exports.VoiceRoomByGroupRequest = exports.VoiceReactRequest = exports.VoiceRoom = void 0;
3
+ exports.VoiceHandsResponse = exports.VoiceHand = exports.VoiceSpeakerRequest = exports.VoiceJoinResponse = exports.VoiceRoomListResponse = exports.VoiceRoomResponse = exports.VoiceRemindRequest = exports.VoiceStartRequest = exports.VoiceRoomIdRequest = exports.VoiceRoomByGroupRequest = exports.VoiceReactRequest = exports.VoiceRoom = void 0;
4
4
  const protobuf_1 = require("@bufbuild/protobuf");
5
5
  const general_pb_js_1 = require("../general_pb.js");
6
6
  class VoiceRoom extends protobuf_1.Message {
@@ -19,6 +19,9 @@ class VoiceRoom extends protobuf_1.Message {
19
19
  endedAt = "";
20
20
  livekitRoom = "";
21
21
  reactionsEnabled = false;
22
+ scheduledAt = "";
23
+ reminderSet = false;
24
+ reminderCount = 0;
22
25
  constructor(data) {
23
26
  super();
24
27
  protobuf_1.proto3.util.initPartial(data, this);
@@ -41,6 +44,9 @@ class VoiceRoom extends protobuf_1.Message {
41
44
  { no: 13, name: "ended_at", kind: "scalar", T: 9 },
42
45
  { no: 14, name: "livekit_room", kind: "scalar", T: 9 },
43
46
  { no: 15, name: "reactions_enabled", kind: "scalar", T: 8 },
47
+ { no: 16, name: "scheduled_at", kind: "scalar", T: 9 },
48
+ { no: 17, name: "reminder_set", kind: "scalar", T: 8 },
49
+ { no: 18, name: "reminder_count", kind: "scalar", T: 5 },
44
50
  ]);
45
51
  static fromBinary(bytes, options) {
46
52
  return new VoiceRoom().fromBinary(bytes, options);
@@ -136,6 +142,8 @@ exports.VoiceRoomIdRequest = VoiceRoomIdRequest;
136
142
  class VoiceStartRequest extends protobuf_1.Message {
137
143
  groupSlug = "";
138
144
  title = "";
145
+ scheduledAt = "";
146
+ scheduledId = "";
139
147
  constructor(data) {
140
148
  super();
141
149
  protobuf_1.proto3.util.initPartial(data, this);
@@ -145,6 +153,8 @@ class VoiceStartRequest extends protobuf_1.Message {
145
153
  static fields = protobuf_1.proto3.util.newFieldList(() => [
146
154
  { no: 1, name: "group_slug", kind: "scalar", T: 9 },
147
155
  { no: 2, name: "title", kind: "scalar", T: 9 },
156
+ { no: 3, name: "scheduled_at", kind: "scalar", T: 9 },
157
+ { no: 4, name: "scheduled_id", kind: "scalar", T: 9 },
148
158
  ]);
149
159
  static fromBinary(bytes, options) {
150
160
  return new VoiceStartRequest().fromBinary(bytes, options);
@@ -160,9 +170,37 @@ class VoiceStartRequest extends protobuf_1.Message {
160
170
  }
161
171
  }
162
172
  exports.VoiceStartRequest = VoiceStartRequest;
173
+ class VoiceRemindRequest extends protobuf_1.Message {
174
+ roomId = "";
175
+ on = false;
176
+ constructor(data) {
177
+ super();
178
+ protobuf_1.proto3.util.initPartial(data, this);
179
+ }
180
+ static runtime = protobuf_1.proto3;
181
+ static typeName = "micro.v1.voice.VoiceRemindRequest";
182
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
183
+ { no: 1, name: "room_id", kind: "scalar", T: 9 },
184
+ { no: 2, name: "on", kind: "scalar", T: 8 },
185
+ ]);
186
+ static fromBinary(bytes, options) {
187
+ return new VoiceRemindRequest().fromBinary(bytes, options);
188
+ }
189
+ static fromJson(jsonValue, options) {
190
+ return new VoiceRemindRequest().fromJson(jsonValue, options);
191
+ }
192
+ static fromJsonString(jsonString, options) {
193
+ return new VoiceRemindRequest().fromJsonString(jsonString, options);
194
+ }
195
+ static equals(a, b) {
196
+ return protobuf_1.proto3.util.equals(VoiceRemindRequest, a, b);
197
+ }
198
+ }
199
+ exports.VoiceRemindRequest = VoiceRemindRequest;
163
200
  class VoiceRoomResponse extends protobuf_1.Message {
164
201
  status;
165
202
  room;
203
+ scheduled = [];
166
204
  constructor(data) {
167
205
  super();
168
206
  protobuf_1.proto3.util.initPartial(data, this);
@@ -172,6 +210,7 @@ class VoiceRoomResponse extends protobuf_1.Message {
172
210
  static fields = protobuf_1.proto3.util.newFieldList(() => [
173
211
  { no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
174
212
  { no: 2, name: "room", kind: "message", T: VoiceRoom, opt: true },
213
+ { no: 3, name: "scheduled", kind: "message", T: VoiceRoom, repeated: true },
175
214
  ]);
176
215
  static fromBinary(bytes, options) {
177
216
  return new VoiceRoomResponse().fromBinary(bytes, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jr-common-micro",
3
- "version": "1.1.90",
3
+ "version": "1.1.91",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -22,6 +22,8 @@ service PVoiceService {
22
22
  rpc SetSpeaker(VoiceSpeakerRequest) returns(stream EmptyResponse) {}
23
23
  // Listener: one emoji, rate-limited per person on the service.
24
24
  rpc React(VoiceReactRequest) returns(stream EmptyResponse) {}
25
+ // "Remind me" on a scheduled room.
26
+ rpc Remind(VoiceRemindRequest) returns(stream EmptyResponse) {}
25
27
  // Account deletion parity with every other micro.
26
28
  rpc RemoveUserData(ByIdRequest) returns(stream EmptyResponse) {}
27
29
  }
@@ -16,7 +16,7 @@ message VoiceRoom {
16
16
  string title = 5;
17
17
  string host_user_id = 6;
18
18
  string host_username = 7;
19
- // live | ended
19
+ // live | ended | scheduled | cancelled
20
20
  string status = 8;
21
21
  int32 listener_count = 9;
22
22
  int32 speaker_count = 10;
@@ -27,6 +27,12 @@ message VoiceRoom {
27
27
  string livekit_room = 14;
28
28
  // Emoji reactions allowed (the group's setting when the room opened).
29
29
  bool reactions_enabled = 15;
30
+ // Scheduled rooms only: when it is meant to start (RFC 3339, UTC).
31
+ string scheduled_at = 16;
32
+ // Scheduled rooms only: whether the caller asked to be reminded, and how
33
+ // many people did.
34
+ bool reminder_set = 17;
35
+ int32 reminder_count = 18;
30
36
  }
31
37
 
32
38
  // A listener's emoji reaction; the service batches them per second and
@@ -42,12 +48,24 @@ message VoiceRoomIdRequest { string room_id = 1; }
42
48
  message VoiceStartRequest {
43
49
  string group_slug = 1;
44
50
  string title = 2;
51
+ // Set: do not open a room now, plan one for this instant (RFC 3339).
52
+ string scheduled_at = 3;
53
+ // Set: open the scheduled room with this id now (its title is used).
54
+ string scheduled_id = 4;
55
+ }
56
+
57
+ // A member's "remind me" on a scheduled room (on = false withdraws it).
58
+ message VoiceRemindRequest {
59
+ string room_id = 1;
60
+ bool on = 2;
45
61
  }
46
62
 
47
63
  message VoiceRoomResponse {
48
64
  ResponseStatus status = 1;
49
65
  // Absent when the group has no live room.
50
66
  optional VoiceRoom room = 2;
67
+ // The group's upcoming scheduled rooms, soonest first.
68
+ repeated VoiceRoom scheduled = 3;
51
69
  }
52
70
 
53
71
  message VoiceRoomListResponse {