theragist-ts 1.0.26 → 1.0.28

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.
package/dist/index.d.ts CHANGED
@@ -42,4 +42,5 @@ export { SoundscapeServiceDefinition } from './soundscape/service';
42
42
  export { TherapistServiceDefinition } from './therapist/service';
43
43
  export { UserServiceDefinition } from './user/service';
44
44
  export { WalletServiceDefinition } from './wallet/service';
45
+ export { WebSocketCallEndedEvent, WebSocketErrorEvent, WebSocketIncomingCallEvent, WebSocketIncomingMessage, WebSocketMissedCallEvent, WebSocketNewDirectMessageEvent, WebSocketOnlineUsersEvent, WebSocketOutgoingEvent, WebSocketServerEvent } from './websocket/message';
45
46
  export { WorkspaceServiceDefinition } from './workspace/service';
package/dist/index.js CHANGED
@@ -19,7 +19,7 @@ exports.GetDownloadUrlResponse = exports.GetDownloadUrlRequest = exports.CreateR
19
19
  exports.GetMyTherapistResponse = exports.GetMyTherapistRequest = exports.GetMyClientsResponse = exports.GetMyClientsRequest = exports.GetHomeStatsResponse = exports.GetHomeStatsRequest = exports.GetHomeResponse = exports.GetHomeRequest = exports.CurrentSeason = exports.CommunityPost = exports.ClientItem = exports.ClientHomeSummary = exports.SendDirectMessageResponse = exports.SendDirectMessageRequest = exports.MarkDirectMessagesReadResponse = exports.MarkDirectMessagesReadRequest = exports.ListDirectMessagesResponse = exports.ListDirectMessagesRequest = exports.ListConversationsResponse = exports.ListConversationsRequest = exports.DirectMessage = exports.DeleteMessageResponse = exports.DeleteMessageRequest = exports.Conversation = exports.ChatUser = exports.ChatServiceDefinition = exports.UnlockTrackResponse = exports.UnlockTrackRequest = exports.SubscribeResponse = exports.SubscribeRequest = exports.SoundscapeTrack = exports.SoundscapePlan = exports.SoundscapeCategory = exports.RecommendationItem = exports.ListTracksResponse = exports.ListTracksRequest = exports.ListRecommendationsResponse = exports.ListRecommendationsRequest = exports.ListPlansResponse = exports.ListPlansRequest = exports.ListCategoriesResponse = exports.ListCategoriesRequest = exports.GiftSubscriptionResponse = exports.GiftSubscriptionRequest = exports.GetTrackResponse = exports.GetTrackRequest = exports.GetSubscriptionResponse = exports.GetSubscriptionRequest = exports.GetPlaybackUrlResponse = exports.GetPlaybackUrlRequest = void 0;
20
20
  exports.FieldOptions_OptionRetention = exports.FieldOptions_JSType = exports.FieldOptions_FeatureSupport = exports.FieldOptions_EditionDefault = exports.FieldOptions_CType = exports.FieldOptions = exports.FieldDescriptorProto_Type = exports.FieldDescriptorProto_Label = exports.FieldDescriptorProto = exports.FeatureSet_Utf8Validation = exports.FeatureSet_RepeatedFieldEncoding = exports.FeatureSet_MessageEncoding = exports.FeatureSet_JsonFormat = exports.FeatureSet_FieldPresence = exports.FeatureSet_EnumType = exports.FeatureSetDefaults_FeatureSetEditionDefault = exports.FeatureSetDefaults = exports.FeatureSet = exports.ExtensionRangeOptions_VerificationState = exports.ExtensionRangeOptions_Declaration = exports.ExtensionRangeOptions = exports.EnumValueOptions = exports.EnumValueDescriptorProto = exports.EnumOptions = exports.EnumDescriptorProto_EnumReservedRange = exports.EnumDescriptorProto = exports.Edition = exports.DescriptorProto_ReservedRange = exports.DescriptorProto_ExtensionRange = exports.DescriptorProto = exports.HttpRule = exports.Http = exports.CustomHttpPattern = exports.CrisisServiceDefinition = exports.CommunityServiceDefinition = exports.ClientsServiceDefinition = exports.WalletSummary = exports.UserItem = exports.UpcomingSessionItem = exports.TopRatedTherapist = exports.TherapistPerformanceStats = exports.TherapistPerformance = exports.TherapistItem = exports.TherapistHomeSummary = exports.SessionSummary = exports.RecentMood = exports.RecentActivity = exports.PaginationStats = exports.ListUsersResponse = exports.ListUsersRequest = void 0;
21
21
  exports.fileOptions_OptimizeModeToJSON = exports.fileOptions_OptimizeModeFromJSON = exports.fieldOptions_OptionTargetTypeToJSON = exports.fieldOptions_OptionTargetTypeFromJSON = exports.fieldOptions_OptionRetentionToJSON = exports.fieldOptions_OptionRetentionFromJSON = exports.fieldOptions_JSTypeToJSON = exports.fieldOptions_JSTypeFromJSON = exports.fieldOptions_CTypeToJSON = exports.fieldOptions_CTypeFromJSON = exports.fieldDescriptorProto_TypeToJSON = exports.fieldDescriptorProto_TypeFromJSON = exports.fieldDescriptorProto_LabelToJSON = exports.fieldDescriptorProto_LabelFromJSON = exports.featureSet_Utf8ValidationToJSON = exports.featureSet_Utf8ValidationFromJSON = exports.featureSet_RepeatedFieldEncodingToJSON = exports.featureSet_RepeatedFieldEncodingFromJSON = exports.featureSet_MessageEncodingToJSON = exports.featureSet_MessageEncodingFromJSON = exports.featureSet_JsonFormatToJSON = exports.featureSet_JsonFormatFromJSON = exports.featureSet_FieldPresenceToJSON = exports.featureSet_FieldPresenceFromJSON = exports.featureSet_EnumTypeToJSON = exports.featureSet_EnumTypeFromJSON = exports.extensionRangeOptions_VerificationStateToJSON = exports.extensionRangeOptions_VerificationStateFromJSON = exports.editionToJSON = exports.editionFromJSON = exports.UninterpretedOption_NamePart = exports.UninterpretedOption = exports.SourceCodeInfo_Location = exports.SourceCodeInfo = exports.ServiceOptions = exports.ServiceDescriptorProto = exports.OneofOptions = exports.OneofDescriptorProto = exports.MethodOptions_IdempotencyLevel = exports.MethodOptions = exports.MethodDescriptorProto = exports.MessageOptions = exports.GeneratedCodeInfo_Annotation_Semantic = exports.GeneratedCodeInfo_Annotation = exports.GeneratedCodeInfo = exports.FileOptions_OptimizeMode = exports.FileOptions = exports.FileDescriptorSet = exports.FileDescriptorProto = exports.FieldOptions_OptionTargetType = void 0;
22
- exports.WorkspaceServiceDefinition = exports.WalletServiceDefinition = exports.UserServiceDefinition = exports.TherapistServiceDefinition = exports.SoundscapeServiceDefinition = exports.SettingsServiceDefinition = exports.SessionServiceDefinition = exports.PostServiceDefinition = exports.NotificationServiceDefinition = exports.LookupServiceDefinition = exports.HomeServiceDefinition = exports.GroupServiceDefinition = exports.Notification = exports.MarkNotificationReadResponse = exports.MarkNotificationReadRequest = exports.MarkAllNotificationsReadResponse = exports.MarkAllNotificationsReadRequest = exports.ListNotificationsResponse = exports.ListNotificationsRequest = exports.GetUnreadCountResponse = exports.GetUnreadCountRequest = exports.UpdateSettingsResponse = exports.UpdateSettingsRequest = exports.UpdateSettingItem = exports.SettingItem = exports.GetSettingsResponse = exports.GetSettingsRequest = exports.GetPublicSettingsResponse = exports.GetPublicSettingsRequest = exports.TimeSlot = exports.TherapistSearchResult = exports.SearchTherapistsResponse = exports.SearchTherapistsRequest = exports.GetAvailabilityResponse = exports.GetAvailabilityRequest = exports.methodOptions_IdempotencyLevelToJSON = exports.methodOptions_IdempotencyLevelFromJSON = exports.generatedCodeInfo_Annotation_SemanticToJSON = exports.generatedCodeInfo_Annotation_SemanticFromJSON = void 0;
22
+ exports.WorkspaceServiceDefinition = exports.WebSocketServerEvent = exports.WebSocketOutgoingEvent = exports.WebSocketOnlineUsersEvent = exports.WebSocketNewDirectMessageEvent = exports.WebSocketMissedCallEvent = exports.WebSocketIncomingMessage = exports.WebSocketIncomingCallEvent = exports.WebSocketErrorEvent = exports.WebSocketCallEndedEvent = exports.WalletServiceDefinition = exports.UserServiceDefinition = exports.TherapistServiceDefinition = exports.SoundscapeServiceDefinition = exports.SettingsServiceDefinition = exports.SessionServiceDefinition = exports.PostServiceDefinition = exports.NotificationServiceDefinition = exports.LookupServiceDefinition = exports.HomeServiceDefinition = exports.GroupServiceDefinition = exports.Notification = exports.MarkNotificationReadResponse = exports.MarkNotificationReadRequest = exports.MarkAllNotificationsReadResponse = exports.MarkAllNotificationsReadRequest = exports.ListNotificationsResponse = exports.ListNotificationsRequest = exports.GetUnreadCountResponse = exports.GetUnreadCountRequest = exports.UpdateSettingsResponse = exports.UpdateSettingsRequest = exports.UpdateSettingItem = exports.SettingItem = exports.GetSettingsResponse = exports.GetSettingsRequest = exports.GetPublicSettingsResponse = exports.GetPublicSettingsRequest = exports.TimeSlot = exports.TherapistSearchResult = exports.SearchTherapistsResponse = exports.SearchTherapistsRequest = exports.GetAvailabilityResponse = exports.GetAvailabilityRequest = exports.methodOptions_IdempotencyLevelToJSON = exports.methodOptions_IdempotencyLevelFromJSON = exports.generatedCodeInfo_Annotation_SemanticToJSON = exports.generatedCodeInfo_Annotation_SemanticFromJSON = void 0;
23
23
  var message_1 = require("./user/message");
24
24
  Object.defineProperty(exports, "AccountSettings", { enumerable: true, get: function () { return message_1.AccountSettings; } });
25
25
  Object.defineProperty(exports, "AvailabilitySlot", { enumerable: true, get: function () { return message_1.AvailabilitySlot; } });
@@ -1052,5 +1052,15 @@ var service_18 = require("./user/service");
1052
1052
  Object.defineProperty(exports, "UserServiceDefinition", { enumerable: true, get: function () { return service_18.UserServiceDefinition; } });
1053
1053
  var service_19 = require("./wallet/service");
1054
1054
  Object.defineProperty(exports, "WalletServiceDefinition", { enumerable: true, get: function () { return service_19.WalletServiceDefinition; } });
1055
+ var message_21 = require("./websocket/message");
1056
+ Object.defineProperty(exports, "WebSocketCallEndedEvent", { enumerable: true, get: function () { return message_21.WebSocketCallEndedEvent; } });
1057
+ Object.defineProperty(exports, "WebSocketErrorEvent", { enumerable: true, get: function () { return message_21.WebSocketErrorEvent; } });
1058
+ Object.defineProperty(exports, "WebSocketIncomingCallEvent", { enumerable: true, get: function () { return message_21.WebSocketIncomingCallEvent; } });
1059
+ Object.defineProperty(exports, "WebSocketIncomingMessage", { enumerable: true, get: function () { return message_21.WebSocketIncomingMessage; } });
1060
+ Object.defineProperty(exports, "WebSocketMissedCallEvent", { enumerable: true, get: function () { return message_21.WebSocketMissedCallEvent; } });
1061
+ Object.defineProperty(exports, "WebSocketNewDirectMessageEvent", { enumerable: true, get: function () { return message_21.WebSocketNewDirectMessageEvent; } });
1062
+ Object.defineProperty(exports, "WebSocketOnlineUsersEvent", { enumerable: true, get: function () { return message_21.WebSocketOnlineUsersEvent; } });
1063
+ Object.defineProperty(exports, "WebSocketOutgoingEvent", { enumerable: true, get: function () { return message_21.WebSocketOutgoingEvent; } });
1064
+ Object.defineProperty(exports, "WebSocketServerEvent", { enumerable: true, get: function () { return message_21.WebSocketServerEvent; } });
1055
1065
  var service_20 = require("./workspace/service");
1056
1066
  Object.defineProperty(exports, "WorkspaceServiceDefinition", { enumerable: true, get: function () { return service_20.WorkspaceServiceDefinition; } });
@@ -59,6 +59,9 @@ export interface SessionItem {
59
59
  therapistNotes: string;
60
60
  therapistPhone: string;
61
61
  therapistTherapeuticApproach: string;
62
+ isLive: boolean;
63
+ liveSessionId: string;
64
+ liveSessionStatus: string;
62
65
  }
63
66
  export interface GetSessionRequest {
64
67
  sessionId: string;
@@ -480,6 +480,9 @@ function createBaseSessionItem() {
480
480
  therapistNotes: "",
481
481
  therapistPhone: "",
482
482
  therapistTherapeuticApproach: "",
483
+ isLive: false,
484
+ liveSessionId: "",
485
+ liveSessionStatus: "",
483
486
  };
484
487
  }
485
488
  exports.SessionItem = {
@@ -577,6 +580,15 @@ exports.SessionItem = {
577
580
  if (message.therapistTherapeuticApproach !== "") {
578
581
  writer.uint32(250).string(message.therapistTherapeuticApproach);
579
582
  }
583
+ if (message.isLive !== false) {
584
+ writer.uint32(256).bool(message.isLive);
585
+ }
586
+ if (message.liveSessionId !== "") {
587
+ writer.uint32(266).string(message.liveSessionId);
588
+ }
589
+ if (message.liveSessionStatus !== "") {
590
+ writer.uint32(274).string(message.liveSessionStatus);
591
+ }
580
592
  return writer;
581
593
  },
582
594
  decode(input, length) {
@@ -803,6 +815,27 @@ exports.SessionItem = {
803
815
  message.therapistTherapeuticApproach = reader.string();
804
816
  continue;
805
817
  }
818
+ case 32: {
819
+ if (tag !== 256) {
820
+ break;
821
+ }
822
+ message.isLive = reader.bool();
823
+ continue;
824
+ }
825
+ case 33: {
826
+ if (tag !== 266) {
827
+ break;
828
+ }
829
+ message.liveSessionId = reader.string();
830
+ continue;
831
+ }
832
+ case 34: {
833
+ if (tag !== 274) {
834
+ break;
835
+ }
836
+ message.liveSessionStatus = reader.string();
837
+ continue;
838
+ }
806
839
  }
807
840
  if ((tag & 7) === 4 || tag === 0) {
808
841
  break;
@@ -848,6 +881,9 @@ exports.SessionItem = {
848
881
  therapistTherapeuticApproach: isSet(object.therapistTherapeuticApproach)
849
882
  ? globalThis.String(object.therapistTherapeuticApproach)
850
883
  : "",
884
+ isLive: isSet(object.isLive) ? globalThis.Boolean(object.isLive) : false,
885
+ liveSessionId: isSet(object.liveSessionId) ? globalThis.String(object.liveSessionId) : "",
886
+ liveSessionStatus: isSet(object.liveSessionStatus) ? globalThis.String(object.liveSessionStatus) : "",
851
887
  };
852
888
  },
853
889
  toJSON(message) {
@@ -946,13 +982,22 @@ exports.SessionItem = {
946
982
  if (message.therapistTherapeuticApproach !== "") {
947
983
  obj.therapistTherapeuticApproach = message.therapistTherapeuticApproach;
948
984
  }
985
+ if (message.isLive !== false) {
986
+ obj.isLive = message.isLive;
987
+ }
988
+ if (message.liveSessionId !== "") {
989
+ obj.liveSessionId = message.liveSessionId;
990
+ }
991
+ if (message.liveSessionStatus !== "") {
992
+ obj.liveSessionStatus = message.liveSessionStatus;
993
+ }
949
994
  return obj;
950
995
  },
951
996
  create(base) {
952
997
  return exports.SessionItem.fromPartial(base !== null && base !== void 0 ? base : {});
953
998
  },
954
999
  fromPartial(object) {
955
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6;
1000
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9;
956
1001
  const message = createBaseSessionItem();
957
1002
  message.sessionId = (_a = object.sessionId) !== null && _a !== void 0 ? _a : "";
958
1003
  message.clientId = (_b = object.clientId) !== null && _b !== void 0 ? _b : "";
@@ -985,6 +1030,9 @@ exports.SessionItem = {
985
1030
  message.therapistNotes = (_4 = object.therapistNotes) !== null && _4 !== void 0 ? _4 : "";
986
1031
  message.therapistPhone = (_5 = object.therapistPhone) !== null && _5 !== void 0 ? _5 : "";
987
1032
  message.therapistTherapeuticApproach = (_6 = object.therapistTherapeuticApproach) !== null && _6 !== void 0 ? _6 : "";
1033
+ message.isLive = (_7 = object.isLive) !== null && _7 !== void 0 ? _7 : false;
1034
+ message.liveSessionId = (_8 = object.liveSessionId) !== null && _8 !== void 0 ? _8 : "";
1035
+ message.liveSessionStatus = (_9 = object.liveSessionStatus) !== null && _9 !== void 0 ? _9 : "";
988
1036
  return message;
989
1037
  },
990
1038
  };
@@ -0,0 +1,117 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { DirectMessage } from "../chat/message";
3
+ export declare const protobufPackage = "websocket";
4
+ /** Client -> server payload accepted on the websocket connection. */
5
+ export interface WebSocketIncomingMessage {
6
+ action: string;
7
+ groupId: string;
8
+ communityId: string;
9
+ receiverId: string;
10
+ messageId: string;
11
+ content: {
12
+ [key: string]: any;
13
+ } | undefined;
14
+ messageType: string;
15
+ }
16
+ /** Common server event envelope currently used by chat/presence events. */
17
+ export interface WebSocketOutgoingEvent {
18
+ type: string;
19
+ groupId: string;
20
+ communityId: string;
21
+ userId: string;
22
+ receiverId: string;
23
+ messageId: string;
24
+ content: {
25
+ [key: string]: any;
26
+ } | undefined;
27
+ messageType: string;
28
+ timestamp: string;
29
+ status: string;
30
+ target: string;
31
+ }
32
+ export interface WebSocketErrorEvent {
33
+ /** error */
34
+ type: string;
35
+ code: string;
36
+ message: string;
37
+ }
38
+ export interface WebSocketOnlineUsersEvent {
39
+ /** onlineUsers */
40
+ type: string;
41
+ groupId: string;
42
+ users: string[];
43
+ }
44
+ export interface WebSocketIncomingCallEvent {
45
+ /** incoming_call */
46
+ type: string;
47
+ roomId: string;
48
+ roomName: string;
49
+ roomType: string;
50
+ callType: string;
51
+ callerId: string;
52
+ callerName: string;
53
+ callerAvatar: string;
54
+ expiresAt: string;
55
+ timestamp: string;
56
+ }
57
+ export interface WebSocketMissedCallEvent {
58
+ /** missed_call */
59
+ type: string;
60
+ roomId: string;
61
+ callerId: string;
62
+ callerName: string;
63
+ callerAvatar: string;
64
+ callType: string;
65
+ timestamp: string;
66
+ }
67
+ export interface WebSocketCallEndedEvent {
68
+ /** call_ended */
69
+ type: string;
70
+ roomId: string;
71
+ durationSeconds: number;
72
+ endedBy: string;
73
+ timestamp: string;
74
+ }
75
+ export interface WebSocketNewDirectMessageEvent {
76
+ /** newDirectMessage */
77
+ type: string;
78
+ message: DirectMessage | undefined;
79
+ }
80
+ /** Aggregated server event contract for SDK typing convenience. */
81
+ export interface WebSocketServerEvent {
82
+ outgoingEvent?: WebSocketOutgoingEvent | undefined;
83
+ errorEvent?: WebSocketErrorEvent | undefined;
84
+ onlineUsersEvent?: WebSocketOnlineUsersEvent | undefined;
85
+ incomingCallEvent?: WebSocketIncomingCallEvent | undefined;
86
+ missedCallEvent?: WebSocketMissedCallEvent | undefined;
87
+ callEndedEvent?: WebSocketCallEndedEvent | undefined;
88
+ newDirectMessageEvent?: WebSocketNewDirectMessageEvent | undefined;
89
+ }
90
+ export declare const WebSocketIncomingMessage: MessageFns<WebSocketIncomingMessage>;
91
+ export declare const WebSocketOutgoingEvent: MessageFns<WebSocketOutgoingEvent>;
92
+ export declare const WebSocketErrorEvent: MessageFns<WebSocketErrorEvent>;
93
+ export declare const WebSocketOnlineUsersEvent: MessageFns<WebSocketOnlineUsersEvent>;
94
+ export declare const WebSocketIncomingCallEvent: MessageFns<WebSocketIncomingCallEvent>;
95
+ export declare const WebSocketMissedCallEvent: MessageFns<WebSocketMissedCallEvent>;
96
+ export declare const WebSocketCallEndedEvent: MessageFns<WebSocketCallEndedEvent>;
97
+ export declare const WebSocketNewDirectMessageEvent: MessageFns<WebSocketNewDirectMessageEvent>;
98
+ export declare const WebSocketServerEvent: MessageFns<WebSocketServerEvent>;
99
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
100
+ 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 {} ? {
101
+ [K in keyof T]?: DeepPartial<T[K]>;
102
+ } : Partial<T>;
103
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
104
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
105
+ [K in keyof P]: Exact<P[K], I[K]>;
106
+ } & {
107
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
108
+ };
109
+ export interface MessageFns<T> {
110
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
111
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
112
+ fromJSON(object: any): T;
113
+ toJSON(message: T): unknown;
114
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
115
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
116
+ }
117
+ export {};