theragist-ts 1.0.19 → 1.0.20

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.
@@ -4,7 +4,7 @@ export interface GetCalendarEventsRequest {
4
4
  from: string;
5
5
  to: string;
6
6
  role: string;
7
- /** day, week, month, year - auto-calculates from/to based on current date */
7
+ /** day, week, month, year, upcoming - auto-calculates from/to based on current date */
8
8
  filter: string;
9
9
  }
10
10
  export interface GetCalendarEventsResponse {
@@ -28,6 +28,8 @@ export interface CreateCalendarEventRequest {
28
28
  eventType: string;
29
29
  location: string;
30
30
  reminderMinutes: number;
31
+ /** optional: link to an existing therapy session */
32
+ sessionId: string;
31
33
  }
32
34
  export interface CreateCalendarEventResponse {
33
35
  event: CalendarEvent | undefined;
@@ -317,7 +317,16 @@ exports.CalendarStats = {
317
317
  },
318
318
  };
319
319
  function createBaseCreateCalendarEventRequest() {
320
- return { title: "", description: "", startAt: "", endAt: "", eventType: "", location: "", reminderMinutes: 0 };
320
+ return {
321
+ title: "",
322
+ description: "",
323
+ startAt: "",
324
+ endAt: "",
325
+ eventType: "",
326
+ location: "",
327
+ reminderMinutes: 0,
328
+ sessionId: "",
329
+ };
321
330
  }
322
331
  exports.CreateCalendarEventRequest = {
323
332
  encode(message, writer = new wire_1.BinaryWriter()) {
@@ -342,6 +351,9 @@ exports.CreateCalendarEventRequest = {
342
351
  if (message.reminderMinutes !== 0) {
343
352
  writer.uint32(56).int32(message.reminderMinutes);
344
353
  }
354
+ if (message.sessionId !== "") {
355
+ writer.uint32(66).string(message.sessionId);
356
+ }
345
357
  return writer;
346
358
  },
347
359
  decode(input, length) {
@@ -400,6 +412,13 @@ exports.CreateCalendarEventRequest = {
400
412
  message.reminderMinutes = reader.int32();
401
413
  continue;
402
414
  }
415
+ case 8: {
416
+ if (tag !== 66) {
417
+ break;
418
+ }
419
+ message.sessionId = reader.string();
420
+ continue;
421
+ }
403
422
  }
404
423
  if ((tag & 7) === 4 || tag === 0) {
405
424
  break;
@@ -417,6 +436,7 @@ exports.CreateCalendarEventRequest = {
417
436
  eventType: isSet(object.eventType) ? globalThis.String(object.eventType) : "",
418
437
  location: isSet(object.location) ? globalThis.String(object.location) : "",
419
438
  reminderMinutes: isSet(object.reminderMinutes) ? globalThis.Number(object.reminderMinutes) : 0,
439
+ sessionId: isSet(object.sessionId) ? globalThis.String(object.sessionId) : "",
420
440
  };
421
441
  },
422
442
  toJSON(message) {
@@ -442,13 +462,16 @@ exports.CreateCalendarEventRequest = {
442
462
  if (message.reminderMinutes !== 0) {
443
463
  obj.reminderMinutes = Math.round(message.reminderMinutes);
444
464
  }
465
+ if (message.sessionId !== "") {
466
+ obj.sessionId = message.sessionId;
467
+ }
445
468
  return obj;
446
469
  },
447
470
  create(base) {
448
471
  return exports.CreateCalendarEventRequest.fromPartial(base !== null && base !== void 0 ? base : {});
449
472
  },
450
473
  fromPartial(object) {
451
- var _a, _b, _c, _d, _e, _f, _g;
474
+ var _a, _b, _c, _d, _e, _f, _g, _h;
452
475
  const message = createBaseCreateCalendarEventRequest();
453
476
  message.title = (_a = object.title) !== null && _a !== void 0 ? _a : "";
454
477
  message.description = (_b = object.description) !== null && _b !== void 0 ? _b : "";
@@ -457,6 +480,7 @@ exports.CreateCalendarEventRequest = {
457
480
  message.eventType = (_e = object.eventType) !== null && _e !== void 0 ? _e : "";
458
481
  message.location = (_f = object.location) !== null && _f !== void 0 ? _f : "";
459
482
  message.reminderMinutes = (_g = object.reminderMinutes) !== null && _g !== void 0 ? _g : 0;
483
+ message.sessionId = (_h = object.sessionId) !== null && _h !== void 0 ? _h : "";
460
484
  return message;
461
485
  },
462
486
  };
@@ -1,4 +1,5 @@
1
1
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { BaseListRequest } from "../common";
2
3
  export declare const protobufPackage = "chat";
3
4
  export interface ChatUser {
4
5
  userId: string;
@@ -33,8 +34,7 @@ export interface ListConversationsResponse {
33
34
  }
34
35
  export interface ListDirectMessagesRequest {
35
36
  userId: string;
36
- page: number;
37
- pageSize: number;
37
+ pagination: BaseListRequest | undefined;
38
38
  }
39
39
  export interface ListDirectMessagesResponse {
40
40
  messages: DirectMessage[];
@@ -8,6 +8,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.DeleteMessageResponse = exports.DeleteMessageRequest = exports.MarkDirectMessagesReadResponse = exports.MarkDirectMessagesReadRequest = exports.SendDirectMessageResponse = exports.SendDirectMessageRequest = exports.ListDirectMessagesResponse = exports.ListDirectMessagesRequest = exports.ListConversationsResponse = exports.ListConversationsRequest = exports.DirectMessage = exports.Conversation = exports.ChatUser = exports.protobufPackage = void 0;
9
9
  /* eslint-disable */
10
10
  const wire_1 = require("@bufbuild/protobuf/wire");
11
+ const common_1 = require("../common");
11
12
  exports.protobufPackage = "chat";
12
13
  function createBaseChatUser() {
13
14
  return { userId: "", fullName: "", avatarUrl: "", username: "" };
@@ -536,18 +537,15 @@ exports.ListConversationsResponse = {
536
537
  },
537
538
  };
538
539
  function createBaseListDirectMessagesRequest() {
539
- return { userId: "", page: 0, pageSize: 0 };
540
+ return { userId: "", pagination: undefined };
540
541
  }
541
542
  exports.ListDirectMessagesRequest = {
542
543
  encode(message, writer = new wire_1.BinaryWriter()) {
543
544
  if (message.userId !== "") {
544
545
  writer.uint32(10).string(message.userId);
545
546
  }
546
- if (message.page !== 0) {
547
- writer.uint32(16).int32(message.page);
548
- }
549
- if (message.pageSize !== 0) {
550
- writer.uint32(24).int32(message.pageSize);
547
+ if (message.pagination !== undefined) {
548
+ common_1.BaseListRequest.encode(message.pagination, writer.uint32(18).fork()).join();
551
549
  }
552
550
  return writer;
553
551
  },
@@ -566,17 +564,10 @@ exports.ListDirectMessagesRequest = {
566
564
  continue;
567
565
  }
568
566
  case 2: {
569
- if (tag !== 16) {
570
- break;
571
- }
572
- message.page = reader.int32();
573
- continue;
574
- }
575
- case 3: {
576
- if (tag !== 24) {
567
+ if (tag !== 18) {
577
568
  break;
578
569
  }
579
- message.pageSize = reader.int32();
570
+ message.pagination = common_1.BaseListRequest.decode(reader, reader.uint32());
580
571
  continue;
581
572
  }
582
573
  }
@@ -590,8 +581,7 @@ exports.ListDirectMessagesRequest = {
590
581
  fromJSON(object) {
591
582
  return {
592
583
  userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
593
- page: isSet(object.page) ? globalThis.Number(object.page) : 0,
594
- pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : 0,
584
+ pagination: isSet(object.pagination) ? common_1.BaseListRequest.fromJSON(object.pagination) : undefined,
595
585
  };
596
586
  },
597
587
  toJSON(message) {
@@ -599,11 +589,8 @@ exports.ListDirectMessagesRequest = {
599
589
  if (message.userId !== "") {
600
590
  obj.userId = message.userId;
601
591
  }
602
- if (message.page !== 0) {
603
- obj.page = Math.round(message.page);
604
- }
605
- if (message.pageSize !== 0) {
606
- obj.pageSize = Math.round(message.pageSize);
592
+ if (message.pagination !== undefined) {
593
+ obj.pagination = common_1.BaseListRequest.toJSON(message.pagination);
607
594
  }
608
595
  return obj;
609
596
  },
@@ -611,11 +598,12 @@ exports.ListDirectMessagesRequest = {
611
598
  return exports.ListDirectMessagesRequest.fromPartial(base !== null && base !== void 0 ? base : {});
612
599
  },
613
600
  fromPartial(object) {
614
- var _a, _b, _c;
601
+ var _a;
615
602
  const message = createBaseListDirectMessagesRequest();
616
603
  message.userId = (_a = object.userId) !== null && _a !== void 0 ? _a : "";
617
- message.page = (_b = object.page) !== null && _b !== void 0 ? _b : 0;
618
- message.pageSize = (_c = object.pageSize) !== null && _c !== void 0 ? _c : 0;
604
+ message.pagination = (object.pagination !== undefined && object.pagination !== null)
605
+ ? common_1.BaseListRequest.fromPartial(object.pagination)
606
+ : undefined;
619
607
  return message;
620
608
  },
621
609
  };
@@ -58,6 +58,43 @@ export interface LeaveCommunityResponse {
58
58
  communityId: string;
59
59
  message: string;
60
60
  }
61
+ export interface AddCommunityMembersRequest {
62
+ communityId: string;
63
+ userIds: string[];
64
+ }
65
+ export interface AddCommunityMembersResponse {
66
+ invitedCount: number;
67
+ message: string;
68
+ }
69
+ export interface Invitation {
70
+ id: string;
71
+ type: string;
72
+ targetId: string;
73
+ targetName: string;
74
+ targetImageUrl: string;
75
+ inviterId: string;
76
+ inviterFullName: string;
77
+ inviterAvatarUrl: string;
78
+ inviterUsername: string;
79
+ status: string;
80
+ respondedAt: string;
81
+ createdAt: string;
82
+ }
83
+ export interface ListInvitationsRequest {
84
+ status: string;
85
+ page: number;
86
+ pageSize: number;
87
+ }
88
+ export interface ListInvitationsResponse {
89
+ invitations: Invitation[];
90
+ }
91
+ export interface RespondInvitationRequest {
92
+ invitationId: string;
93
+ }
94
+ export interface RespondInvitationResponse {
95
+ success: boolean;
96
+ message: string;
97
+ }
61
98
  export declare const Community: MessageFns<Community>;
62
99
  export declare const GetCommunitiesRequest: MessageFns<GetCommunitiesRequest>;
63
100
  export declare const GetCommunitiesResponse: MessageFns<GetCommunitiesResponse>;
@@ -71,6 +108,13 @@ export declare const CreateCommunityRequest: MessageFns<CreateCommunityRequest>;
71
108
  export declare const CreateCommunityResponse: MessageFns<CreateCommunityResponse>;
72
109
  export declare const LeaveCommunityRequest: MessageFns<LeaveCommunityRequest>;
73
110
  export declare const LeaveCommunityResponse: MessageFns<LeaveCommunityResponse>;
111
+ export declare const AddCommunityMembersRequest: MessageFns<AddCommunityMembersRequest>;
112
+ export declare const AddCommunityMembersResponse: MessageFns<AddCommunityMembersResponse>;
113
+ export declare const Invitation: MessageFns<Invitation>;
114
+ export declare const ListInvitationsRequest: MessageFns<ListInvitationsRequest>;
115
+ export declare const ListInvitationsResponse: MessageFns<ListInvitationsResponse>;
116
+ export declare const RespondInvitationRequest: MessageFns<RespondInvitationRequest>;
117
+ export declare const RespondInvitationResponse: MessageFns<RespondInvitationResponse>;
74
118
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
75
119
  export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
76
120
  [K in keyof T]?: DeepPartial<T[K]>;