theragist-ts 1.0.17 → 1.0.19

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.
@@ -8,8 +8,8 @@ export interface GetCalendarEventsRequest {
8
8
  filter: string;
9
9
  }
10
10
  export interface GetCalendarEventsResponse {
11
- events: CalendarEvent[];
12
11
  stats: CalendarStats | undefined;
12
+ events: CalendarEvent[];
13
13
  }
14
14
  export interface CalendarStats {
15
15
  totalSessions: number;
@@ -45,6 +45,9 @@ export interface CalendarEvent {
45
45
  description: string;
46
46
  googleEventId: string;
47
47
  location: string;
48
+ counterpartName: string;
49
+ /** video, chat, voice */
50
+ sessionType: string;
48
51
  }
49
52
  export declare const GetCalendarEventsRequest: MessageFns<GetCalendarEventsRequest>;
50
53
  export declare const GetCalendarEventsResponse: MessageFns<GetCalendarEventsResponse>;
@@ -109,15 +109,15 @@ exports.GetCalendarEventsRequest = {
109
109
  },
110
110
  };
111
111
  function createBaseGetCalendarEventsResponse() {
112
- return { events: [], stats: undefined };
112
+ return { stats: undefined, events: [] };
113
113
  }
114
114
  exports.GetCalendarEventsResponse = {
115
115
  encode(message, writer = new wire_1.BinaryWriter()) {
116
- for (const v of message.events) {
117
- exports.CalendarEvent.encode(v, writer.uint32(10).fork()).join();
118
- }
119
116
  if (message.stats !== undefined) {
120
- exports.CalendarStats.encode(message.stats, writer.uint32(18).fork()).join();
117
+ exports.CalendarStats.encode(message.stats, writer.uint32(10).fork()).join();
118
+ }
119
+ for (const v of message.events) {
120
+ exports.CalendarEvent.encode(v, writer.uint32(18).fork()).join();
121
121
  }
122
122
  return writer;
123
123
  },
@@ -132,14 +132,14 @@ exports.GetCalendarEventsResponse = {
132
132
  if (tag !== 10) {
133
133
  break;
134
134
  }
135
- message.events.push(exports.CalendarEvent.decode(reader, reader.uint32()));
135
+ message.stats = exports.CalendarStats.decode(reader, reader.uint32());
136
136
  continue;
137
137
  }
138
138
  case 2: {
139
139
  if (tag !== 18) {
140
140
  break;
141
141
  }
142
- message.stats = exports.CalendarStats.decode(reader, reader.uint32());
142
+ message.events.push(exports.CalendarEvent.decode(reader, reader.uint32()));
143
143
  continue;
144
144
  }
145
145
  }
@@ -152,19 +152,19 @@ exports.GetCalendarEventsResponse = {
152
152
  },
153
153
  fromJSON(object) {
154
154
  return {
155
- events: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.events) ? object.events.map((e) => exports.CalendarEvent.fromJSON(e)) : [],
156
155
  stats: isSet(object.stats) ? exports.CalendarStats.fromJSON(object.stats) : undefined,
156
+ events: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.events) ? object.events.map((e) => exports.CalendarEvent.fromJSON(e)) : [],
157
157
  };
158
158
  },
159
159
  toJSON(message) {
160
160
  var _a;
161
161
  const obj = {};
162
- if ((_a = message.events) === null || _a === void 0 ? void 0 : _a.length) {
163
- obj.events = message.events.map((e) => exports.CalendarEvent.toJSON(e));
164
- }
165
162
  if (message.stats !== undefined) {
166
163
  obj.stats = exports.CalendarStats.toJSON(message.stats);
167
164
  }
165
+ if ((_a = message.events) === null || _a === void 0 ? void 0 : _a.length) {
166
+ obj.events = message.events.map((e) => exports.CalendarEvent.toJSON(e));
167
+ }
168
168
  return obj;
169
169
  },
170
170
  create(base) {
@@ -173,10 +173,10 @@ exports.GetCalendarEventsResponse = {
173
173
  fromPartial(object) {
174
174
  var _a;
175
175
  const message = createBaseGetCalendarEventsResponse();
176
- message.events = ((_a = object.events) === null || _a === void 0 ? void 0 : _a.map((e) => exports.CalendarEvent.fromPartial(e))) || [];
177
176
  message.stats = (object.stats !== undefined && object.stats !== null)
178
177
  ? exports.CalendarStats.fromPartial(object.stats)
179
178
  : undefined;
179
+ message.events = ((_a = object.events) === null || _a === void 0 ? void 0 : _a.map((e) => exports.CalendarEvent.fromPartial(e))) || [];
180
180
  return message;
181
181
  },
182
182
  };
@@ -527,6 +527,8 @@ function createBaseCalendarEvent() {
527
527
  description: "",
528
528
  googleEventId: "",
529
529
  location: "",
530
+ counterpartName: "",
531
+ sessionType: "",
530
532
  };
531
533
  }
532
534
  exports.CalendarEvent = {
@@ -567,6 +569,12 @@ exports.CalendarEvent = {
567
569
  if (message.location !== "") {
568
570
  writer.uint32(98).string(message.location);
569
571
  }
572
+ if (message.counterpartName !== "") {
573
+ writer.uint32(106).string(message.counterpartName);
574
+ }
575
+ if (message.sessionType !== "") {
576
+ writer.uint32(114).string(message.sessionType);
577
+ }
570
578
  return writer;
571
579
  },
572
580
  decode(input, length) {
@@ -660,6 +668,20 @@ exports.CalendarEvent = {
660
668
  message.location = reader.string();
661
669
  continue;
662
670
  }
671
+ case 13: {
672
+ if (tag !== 106) {
673
+ break;
674
+ }
675
+ message.counterpartName = reader.string();
676
+ continue;
677
+ }
678
+ case 14: {
679
+ if (tag !== 114) {
680
+ break;
681
+ }
682
+ message.sessionType = reader.string();
683
+ continue;
684
+ }
663
685
  }
664
686
  if ((tag & 7) === 4 || tag === 0) {
665
687
  break;
@@ -682,6 +704,8 @@ exports.CalendarEvent = {
682
704
  description: isSet(object.description) ? globalThis.String(object.description) : "",
683
705
  googleEventId: isSet(object.googleEventId) ? globalThis.String(object.googleEventId) : "",
684
706
  location: isSet(object.location) ? globalThis.String(object.location) : "",
707
+ counterpartName: isSet(object.counterpartName) ? globalThis.String(object.counterpartName) : "",
708
+ sessionType: isSet(object.sessionType) ? globalThis.String(object.sessionType) : "",
685
709
  };
686
710
  },
687
711
  toJSON(message) {
@@ -722,13 +746,19 @@ exports.CalendarEvent = {
722
746
  if (message.location !== "") {
723
747
  obj.location = message.location;
724
748
  }
749
+ if (message.counterpartName !== "") {
750
+ obj.counterpartName = message.counterpartName;
751
+ }
752
+ if (message.sessionType !== "") {
753
+ obj.sessionType = message.sessionType;
754
+ }
725
755
  return obj;
726
756
  },
727
757
  create(base) {
728
758
  return exports.CalendarEvent.fromPartial(base !== null && base !== void 0 ? base : {});
729
759
  },
730
760
  fromPartial(object) {
731
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
761
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
732
762
  const message = createBaseCalendarEvent();
733
763
  message.eventId = (_a = object.eventId) !== null && _a !== void 0 ? _a : "";
734
764
  message.eventType = (_b = object.eventType) !== null && _b !== void 0 ? _b : "";
@@ -742,6 +772,8 @@ exports.CalendarEvent = {
742
772
  message.description = (_k = object.description) !== null && _k !== void 0 ? _k : "";
743
773
  message.googleEventId = (_l = object.googleEventId) !== null && _l !== void 0 ? _l : "";
744
774
  message.location = (_m = object.location) !== null && _m !== void 0 ? _m : "";
775
+ message.counterpartName = (_o = object.counterpartName) !== null && _o !== void 0 ? _o : "";
776
+ message.sessionType = (_p = object.sessionType) !== null && _p !== void 0 ? _p : "";
745
777
  return message;
746
778
  },
747
779
  };
@@ -0,0 +1,190 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { BaseListRequest } from "../common";
3
+ export declare const protobufPackage = "clients";
4
+ export interface ClientDetailStats {
5
+ totalSessions: number;
6
+ completedSessions: number;
7
+ upcomingSessions: number;
8
+ cancelledSessions: number;
9
+ lastSessionDate: string;
10
+ lastSessionHuman: string;
11
+ nextSessionDate: string;
12
+ nextSessionHuman: string;
13
+ }
14
+ export interface ClinicalNoteContent {
15
+ clientMood: string;
16
+ progress: string;
17
+ nextSteps: string;
18
+ notes: string;
19
+ keyTopics: string;
20
+ interventions: string;
21
+ riskLevel: string;
22
+ }
23
+ export interface ClinicalNoteItem {
24
+ id: string;
25
+ sessionId: string;
26
+ therapistId: string;
27
+ clientId: string;
28
+ content: {
29
+ [key: string]: any;
30
+ } | undefined;
31
+ createdAt: string;
32
+ updatedAt: string;
33
+ therapistName: string;
34
+ therapistAvatar: string;
35
+ sessionStartAt: string;
36
+ sessionEndAt: string;
37
+ sessionType: string;
38
+ sessionStatus: string;
39
+ }
40
+ export interface RecentSessionItem {
41
+ sessionId: string;
42
+ startAt: string;
43
+ endAt: string;
44
+ status: string;
45
+ sessionType: string;
46
+ notes: string;
47
+ hasClinicalNote: boolean;
48
+ clinicalNoteId: string;
49
+ createdAt: string;
50
+ }
51
+ export interface TreatmentPlanGoal {
52
+ goal: string;
53
+ status: string;
54
+ targetDate: string;
55
+ notes: string;
56
+ }
57
+ export interface TreatmentPlanItem {
58
+ id: string;
59
+ therapistId: string;
60
+ clientId: string;
61
+ title: string;
62
+ description: string;
63
+ goals: TreatmentPlanGoal[];
64
+ diagnosis: string;
65
+ status: string;
66
+ startDate: string;
67
+ endDate: string;
68
+ createdAt: string;
69
+ updatedAt: string;
70
+ }
71
+ export interface GetClientDetailRequest {
72
+ clientId: string;
73
+ /** default 5 */
74
+ recentSessionLimit: number;
75
+ }
76
+ export interface GetClientDetailResponse {
77
+ id: string;
78
+ username: string;
79
+ fullName: string;
80
+ avatarUrl: string;
81
+ avatarEmoji: string;
82
+ email: string;
83
+ phoneNumber: string;
84
+ gender: string;
85
+ pronouns: string;
86
+ bio: string;
87
+ timeZone: string;
88
+ memberSince: string;
89
+ stats: ClientDetailStats | undefined;
90
+ clinicalNotes: ClinicalNoteItem[];
91
+ recentSessions: RecentSessionItem[];
92
+ treatmentPlan: TreatmentPlanItem | undefined;
93
+ }
94
+ export interface GetClientClinicalNotesRequest {
95
+ clientId: string;
96
+ pagination: BaseListRequest | undefined;
97
+ }
98
+ export interface GetClientClinicalNotesResponse {
99
+ notes: ClinicalNoteItem[];
100
+ totalCount: number;
101
+ }
102
+ export interface AddClinicalNoteRequest {
103
+ sessionId: string;
104
+ clientMood: string;
105
+ progress: string;
106
+ nextSteps: string;
107
+ notes: string;
108
+ keyTopics: string;
109
+ interventions: string;
110
+ riskLevel: string;
111
+ }
112
+ export interface AddClinicalNoteResponse {
113
+ note: ClinicalNoteItem | undefined;
114
+ }
115
+ export interface SessionHistoryStats {
116
+ totalSessions: number;
117
+ completedSessions: number;
118
+ upcomingSessions: number;
119
+ cancelledSessions: number;
120
+ uniqueCounterparts: number;
121
+ }
122
+ export interface SessionHistoryItem {
123
+ sessionId: string;
124
+ clientId: string;
125
+ therapistId: string;
126
+ startAt: string;
127
+ endAt: string;
128
+ status: string;
129
+ sessionType: string;
130
+ notes: string;
131
+ createdAt: string;
132
+ clientName: string;
133
+ clientAvatar: string;
134
+ therapistName: string;
135
+ therapistAvatar: string;
136
+ hasClinicalNote: boolean;
137
+ clinicalNoteId: string;
138
+ clinicalNoteContent: {
139
+ [key: string]: any;
140
+ } | undefined;
141
+ }
142
+ export interface GetSessionHistoryRequest {
143
+ pagination: BaseListRequest | undefined;
144
+ /** filter: video, chat, voice */
145
+ sessionType: string;
146
+ /** filter: completed, confirmed, pending, cancelled */
147
+ status: string;
148
+ /** filter: 7d, 30d, 60d, 90d, all */
149
+ range: string;
150
+ userId: string;
151
+ }
152
+ export interface GetSessionHistoryResponse {
153
+ stats: SessionHistoryStats | undefined;
154
+ sessions: SessionHistoryItem[];
155
+ }
156
+ export declare const ClientDetailStats: MessageFns<ClientDetailStats>;
157
+ export declare const ClinicalNoteContent: MessageFns<ClinicalNoteContent>;
158
+ export declare const ClinicalNoteItem: MessageFns<ClinicalNoteItem>;
159
+ export declare const RecentSessionItem: MessageFns<RecentSessionItem>;
160
+ export declare const TreatmentPlanGoal: MessageFns<TreatmentPlanGoal>;
161
+ export declare const TreatmentPlanItem: MessageFns<TreatmentPlanItem>;
162
+ export declare const GetClientDetailRequest: MessageFns<GetClientDetailRequest>;
163
+ export declare const GetClientDetailResponse: MessageFns<GetClientDetailResponse>;
164
+ export declare const GetClientClinicalNotesRequest: MessageFns<GetClientClinicalNotesRequest>;
165
+ export declare const GetClientClinicalNotesResponse: MessageFns<GetClientClinicalNotesResponse>;
166
+ export declare const AddClinicalNoteRequest: MessageFns<AddClinicalNoteRequest>;
167
+ export declare const AddClinicalNoteResponse: MessageFns<AddClinicalNoteResponse>;
168
+ export declare const SessionHistoryStats: MessageFns<SessionHistoryStats>;
169
+ export declare const SessionHistoryItem: MessageFns<SessionHistoryItem>;
170
+ export declare const GetSessionHistoryRequest: MessageFns<GetSessionHistoryRequest>;
171
+ export declare const GetSessionHistoryResponse: MessageFns<GetSessionHistoryResponse>;
172
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
173
+ 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 {} ? {
174
+ [K in keyof T]?: DeepPartial<T[K]>;
175
+ } : Partial<T>;
176
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
177
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
178
+ [K in keyof P]: Exact<P[K], I[K]>;
179
+ } & {
180
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
181
+ };
182
+ export interface MessageFns<T> {
183
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
184
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
185
+ fromJSON(object: any): T;
186
+ toJSON(message: T): unknown;
187
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
188
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
189
+ }
190
+ export {};