@moltzap/protocol 0.1.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.
Files changed (160) hide show
  1. package/dist/helpers.d.ts +15 -0
  2. package/dist/helpers.d.ts.map +1 -0
  3. package/dist/helpers.js +20 -0
  4. package/dist/helpers.js.map +1 -0
  5. package/dist/index.d.ts +8 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +8 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/schema/contacts.d.ts +11 -0
  10. package/dist/schema/contacts.d.ts.map +1 -0
  11. package/dist/schema/contacts.js +12 -0
  12. package/dist/schema/contacts.js.map +1 -0
  13. package/dist/schema/conversations.d.ts +37 -0
  14. package/dist/schema/conversations.d.ts.map +1 -0
  15. package/dist/schema/conversations.js +31 -0
  16. package/dist/schema/conversations.js.map +1 -0
  17. package/dist/schema/delivery.d.ts +15 -0
  18. package/dist/schema/delivery.d.ts.map +1 -0
  19. package/dist/schema/delivery.js +14 -0
  20. package/dist/schema/delivery.js.map +1 -0
  21. package/dist/schema/errors.d.ts +24 -0
  22. package/dist/schema/errors.d.ts.map +1 -0
  23. package/dist/schema/errors.js +22 -0
  24. package/dist/schema/errors.js.map +1 -0
  25. package/dist/schema/events.d.ts +120 -0
  26. package/dist/schema/events.d.ts.map +1 -0
  27. package/dist/schema/events.js +52 -0
  28. package/dist/schema/events.js.map +1 -0
  29. package/dist/schema/frames.d.ts +29 -0
  30. package/dist/schema/frames.d.ts.map +1 -0
  31. package/dist/schema/frames.js +23 -0
  32. package/dist/schema/frames.js.map +1 -0
  33. package/dist/schema/identity.d.ts +28 -0
  34. package/dist/schema/identity.d.ts.map +1 -0
  35. package/dist/schema/identity.js +31 -0
  36. package/dist/schema/identity.js.map +1 -0
  37. package/dist/schema/index.d.ts +18 -0
  38. package/dist/schema/index.d.ts.map +1 -0
  39. package/dist/schema/index.js +18 -0
  40. package/dist/schema/index.js.map +1 -0
  41. package/dist/schema/invites.d.ts +17 -0
  42. package/dist/schema/invites.d.ts.map +1 -0
  43. package/dist/schema/invites.js +18 -0
  44. package/dist/schema/invites.js.map +1 -0
  45. package/dist/schema/messages.d.ts +25 -0
  46. package/dist/schema/messages.d.ts.map +1 -0
  47. package/dist/schema/messages.js +20 -0
  48. package/dist/schema/messages.js.map +1 -0
  49. package/dist/schema/methods/auth.d.ts +64 -0
  50. package/dist/schema/methods/auth.d.ts.map +1 -0
  51. package/dist/schema/methods/auth.js +46 -0
  52. package/dist/schema/methods/auth.js.map +1 -0
  53. package/dist/schema/methods/contacts.d.ts +38 -0
  54. package/dist/schema/methods/contacts.d.ts.map +1 -0
  55. package/dist/schema/methods/contacts.js +23 -0
  56. package/dist/schema/methods/contacts.js.map +1 -0
  57. package/dist/schema/methods/conversations.d.ts +92 -0
  58. package/dist/schema/methods/conversations.d.ts.map +1 -0
  59. package/dist/schema/methods/conversations.js +43 -0
  60. package/dist/schema/methods/conversations.js.map +1 -0
  61. package/dist/schema/methods/invites.d.ts +33 -0
  62. package/dist/schema/methods/invites.d.ts.map +1 -0
  63. package/dist/schema/methods/invites.js +19 -0
  64. package/dist/schema/methods/invites.js.map +1 -0
  65. package/dist/schema/methods/messages.d.ts +67 -0
  66. package/dist/schema/methods/messages.d.ts.map +1 -0
  67. package/dist/schema/methods/messages.js +32 -0
  68. package/dist/schema/methods/messages.js.map +1 -0
  69. package/dist/schema/methods/presence.d.ts +19 -0
  70. package/dist/schema/methods/presence.d.ts.map +1 -0
  71. package/dist/schema/methods/presence.js +7 -0
  72. package/dist/schema/methods/presence.js.map +1 -0
  73. package/dist/schema/presence.d.ts +19 -0
  74. package/dist/schema/presence.d.ts.map +1 -0
  75. package/dist/schema/presence.js +14 -0
  76. package/dist/schema/presence.js.map +1 -0
  77. package/dist/schema/primitives.d.ts +7 -0
  78. package/dist/schema/primitives.d.ts.map +1 -0
  79. package/dist/schema/primitives.js +13 -0
  80. package/dist/schema/primitives.js.map +1 -0
  81. package/dist/schemas/Agent.json +46 -0
  82. package/dist/schemas/Contact.json +40 -0
  83. package/dist/schemas/ContactAcceptedEvent.json +49 -0
  84. package/dist/schemas/ContactIdParams.json +14 -0
  85. package/dist/schemas/ContactRequestEvent.json +49 -0
  86. package/dist/schemas/ContactsAcceptParams.json +14 -0
  87. package/dist/schemas/ContactsAcceptResult.json +49 -0
  88. package/dist/schemas/ContactsAddParams.json +18 -0
  89. package/dist/schemas/ContactsAddResult.json +19 -0
  90. package/dist/schemas/ContactsListParams.json +14 -0
  91. package/dist/schemas/ContactsListResult.json +52 -0
  92. package/dist/schemas/Conversation.json +57 -0
  93. package/dist/schemas/ConversationCreatedEvent.json +66 -0
  94. package/dist/schemas/ConversationParticipant.json +59 -0
  95. package/dist/schemas/ConversationSummary.json +37 -0
  96. package/dist/schemas/ConversationUpdatedEvent.json +66 -0
  97. package/dist/schemas/ConversationsAddParticipantParams.json +36 -0
  98. package/dist/schemas/ConversationsCreateParams.json +47 -0
  99. package/dist/schemas/ConversationsCreateResult.json +66 -0
  100. package/dist/schemas/ConversationsGetParams.json +14 -0
  101. package/dist/schemas/ConversationsGetResult.json +129 -0
  102. package/dist/schemas/ConversationsLeaveParams.json +14 -0
  103. package/dist/schemas/ConversationsListParams.json +14 -0
  104. package/dist/schemas/ConversationsListResult.json +52 -0
  105. package/dist/schemas/ConversationsMuteParams.json +18 -0
  106. package/dist/schemas/ConversationsRemoveParticipantParams.json +36 -0
  107. package/dist/schemas/ConversationsUnmuteParams.json +14 -0
  108. package/dist/schemas/ConversationsUpdateParams.json +19 -0
  109. package/dist/schemas/DeliveryEntry.json +59 -0
  110. package/dist/schemas/EmptyResult.json +5 -0
  111. package/dist/schemas/EventFrame.json +23 -0
  112. package/dist/schemas/HelloOk.json +118 -0
  113. package/dist/schemas/Invite.json +63 -0
  114. package/dist/schemas/InvitesAcceptParams.json +13 -0
  115. package/dist/schemas/InvitesAcceptResult.json +103 -0
  116. package/dist/schemas/InvitesCreateParams.json +18 -0
  117. package/dist/schemas/InvitesCreateResult.json +17 -0
  118. package/dist/schemas/Message.json +96 -0
  119. package/dist/schemas/MessageDeletedEvent.json +20 -0
  120. package/dist/schemas/MessageDeliveredEvent.json +42 -0
  121. package/dist/schemas/MessageReactedEvent.json +48 -0
  122. package/dist/schemas/MessageReadEvent.json +41 -0
  123. package/dist/schemas/MessageReceivedEvent.json +105 -0
  124. package/dist/schemas/MessagesDeleteParams.json +14 -0
  125. package/dist/schemas/MessagesListParams.json +27 -0
  126. package/dist/schemas/MessagesListResult.json +112 -0
  127. package/dist/schemas/MessagesReactParams.json +28 -0
  128. package/dist/schemas/MessagesReadParams.json +19 -0
  129. package/dist/schemas/MessagesSendParams.json +46 -0
  130. package/dist/schemas/MessagesSendResult.json +105 -0
  131. package/dist/schemas/ParticipantRef.json +21 -0
  132. package/dist/schemas/Policy.json +45 -0
  133. package/dist/schemas/PresenceChangedEvent.json +39 -0
  134. package/dist/schemas/PresenceEntry.json +39 -0
  135. package/dist/schemas/PresenceSubscribeParams.json +33 -0
  136. package/dist/schemas/PresenceSubscribeResult.json +51 -0
  137. package/dist/schemas/PresenceUpdateParams.json +17 -0
  138. package/dist/schemas/RateLimits.json +16 -0
  139. package/dist/schemas/RegisterParams.json +17 -0
  140. package/dist/schemas/RegisterResult.json +27 -0
  141. package/dist/schemas/RequestFrame.json +27 -0
  142. package/dist/schemas/ResponseFrame.json +40 -0
  143. package/dist/schemas/RpcError.json +17 -0
  144. package/dist/schemas/TextPart.json +19 -0
  145. package/dist/schemas/TypingIndicator.json +36 -0
  146. package/dist/schemas/TypingIndicatorEvent.json +36 -0
  147. package/dist/schemas/User.json +43 -0
  148. package/dist/types.d.ts +11 -0
  149. package/dist/types.d.ts.map +1 -0
  150. package/dist/types.js +2 -0
  151. package/dist/types.js.map +1 -0
  152. package/dist/validators.d.ts +154 -0
  153. package/dist/validators.d.ts.map +1 -0
  154. package/dist/validators.js +40 -0
  155. package/dist/validators.js.map +1 -0
  156. package/dist/version.d.ts +2 -0
  157. package/dist/version.d.ts.map +1 -0
  158. package/dist/version.js +2 -0
  159. package/dist/version.js.map +1 -0
  160. package/package.json +42 -0
@@ -0,0 +1,67 @@
1
+ export declare const MessagesSendParamsSchema: import("@sinclair/typebox").TObject<{
2
+ conversationId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
3
+ to: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
4
+ parts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
5
+ type: import("@sinclair/typebox").TLiteral<"text">;
6
+ text: import("@sinclair/typebox").TString;
7
+ }>>;
8
+ replyToId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
9
+ }>;
10
+ export declare const MessagesSendResultSchema: import("@sinclair/typebox").TObject<{
11
+ message: import("@sinclair/typebox").TObject<{
12
+ id: import("@sinclair/typebox").TString;
13
+ conversationId: import("@sinclair/typebox").TString;
14
+ sender: import("@sinclair/typebox").TObject<{
15
+ type: import("@sinclair/typebox").TUnsafe<"user" | "agent">;
16
+ id: import("@sinclair/typebox").TString;
17
+ }>;
18
+ seq: import("@sinclair/typebox").TInteger;
19
+ replyToId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
20
+ parts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
21
+ type: import("@sinclair/typebox").TLiteral<"text">;
22
+ text: import("@sinclair/typebox").TString;
23
+ }>>;
24
+ reactions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>>;
25
+ isDeleted: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
26
+ createdAt: import("@sinclair/typebox").TString;
27
+ }>;
28
+ }>;
29
+ export declare const MessagesListParamsSchema: import("@sinclair/typebox").TObject<{
30
+ conversationId: import("@sinclair/typebox").TString;
31
+ afterSeq: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
32
+ beforeSeq: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
33
+ limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
34
+ }>;
35
+ export declare const MessagesListResultSchema: import("@sinclair/typebox").TObject<{
36
+ messages: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
37
+ id: import("@sinclair/typebox").TString;
38
+ conversationId: import("@sinclair/typebox").TString;
39
+ sender: import("@sinclair/typebox").TObject<{
40
+ type: import("@sinclair/typebox").TUnsafe<"user" | "agent">;
41
+ id: import("@sinclair/typebox").TString;
42
+ }>;
43
+ seq: import("@sinclair/typebox").TInteger;
44
+ replyToId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
45
+ parts: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
46
+ type: import("@sinclair/typebox").TLiteral<"text">;
47
+ text: import("@sinclair/typebox").TString;
48
+ }>>;
49
+ reactions: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>>;
50
+ isDeleted: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
51
+ createdAt: import("@sinclair/typebox").TString;
52
+ }>>;
53
+ hasMore: import("@sinclair/typebox").TBoolean;
54
+ }>;
55
+ export declare const MessagesReadParamsSchema: import("@sinclair/typebox").TObject<{
56
+ conversationId: import("@sinclair/typebox").TString;
57
+ seq: import("@sinclair/typebox").TInteger;
58
+ }>;
59
+ export declare const MessagesReactParamsSchema: import("@sinclair/typebox").TObject<{
60
+ messageId: import("@sinclair/typebox").TString;
61
+ emoji: import("@sinclair/typebox").TString;
62
+ action: import("@sinclair/typebox").TUnsafe<"add" | "remove">;
63
+ }>;
64
+ export declare const MessagesDeleteParamsSchema: import("@sinclair/typebox").TObject<{
65
+ messageId: import("@sinclair/typebox").TString;
66
+ }>;
67
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/schema/methods/messages.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,wBAAwB;;;;;;;;EAQpC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;EAGpC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;EAQpC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;EAMpC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;EAMpC,CAAC;AAEF,eAAO,MAAM,yBAAyB;;;;EAOrC,CAAC;AAEF,eAAO,MAAM,0BAA0B;;EAGtC,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { Type } from "@sinclair/typebox";
2
+ import { stringEnum } from "../../helpers.js";
3
+ import { ConversationId, MessageId } from "../primitives.js";
4
+ import { MessageSchema, TextPartSchema } from "../messages.js";
5
+ export const MessagesSendParamsSchema = Type.Object({
6
+ conversationId: Type.Optional(ConversationId),
7
+ to: Type.Optional(Type.String()),
8
+ parts: Type.Array(TextPartSchema, { minItems: 1, maxItems: 10 }),
9
+ replyToId: Type.Optional(MessageId),
10
+ }, { additionalProperties: false });
11
+ export const MessagesSendResultSchema = Type.Object({ message: MessageSchema }, { additionalProperties: false });
12
+ export const MessagesListParamsSchema = Type.Object({
13
+ conversationId: ConversationId,
14
+ afterSeq: Type.Optional(Type.Integer({ minimum: 0 })),
15
+ beforeSeq: Type.Optional(Type.Integer({ minimum: 0 })),
16
+ limit: Type.Optional(Type.Integer({ minimum: 1, maximum: 100 })),
17
+ }, { additionalProperties: false });
18
+ export const MessagesListResultSchema = Type.Object({
19
+ messages: Type.Array(MessageSchema),
20
+ hasMore: Type.Boolean(),
21
+ }, { additionalProperties: false });
22
+ export const MessagesReadParamsSchema = Type.Object({
23
+ conversationId: ConversationId,
24
+ seq: Type.Integer({ minimum: 0 }),
25
+ }, { additionalProperties: false });
26
+ export const MessagesReactParamsSchema = Type.Object({
27
+ messageId: MessageId,
28
+ emoji: Type.String({ minLength: 1, maxLength: 32 }),
29
+ action: stringEnum(["add", "remove"]),
30
+ }, { additionalProperties: false });
31
+ export const MessagesDeleteParamsSchema = Type.Object({ messageId: MessageId }, { additionalProperties: false });
32
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/schema/methods/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE/D,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,MAAM,CACjD;IACE,cAAc,EAAE,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC;IAC7C,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IAChC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC;IAChE,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;CACpC,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,MAAM,CACjD,EAAE,OAAO,EAAE,aAAa,EAAE,EAC1B,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,MAAM,CACjD;IACE,cAAc,EAAE,cAAc;IAC9B,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;IACrD,SAAS,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;IACtD,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;CACjE,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,MAAM,CACjD;IACE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;IACnC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE;CACxB,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,MAAM,CACjD;IACE,cAAc,EAAE,cAAc;IAC9B,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;CAClC,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC,MAAM,CAClD;IACE,SAAS,EAAE,SAAS;IACpB,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;IACnD,MAAM,EAAE,UAAU,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;CACtC,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC,MAAM,CACnD,EAAE,SAAS,EAAE,SAAS,EAAE,EACxB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC"}
@@ -0,0 +1,19 @@
1
+ export declare const PresenceUpdateParamsSchema: import("@sinclair/typebox").TObject<{
2
+ status: import("@sinclair/typebox").TUnsafe<"online" | "offline" | "away">;
3
+ }>;
4
+ export declare const PresenceSubscribeParamsSchema: import("@sinclair/typebox").TObject<{
5
+ participants: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
6
+ type: import("@sinclair/typebox").TUnsafe<"user" | "agent">;
7
+ id: import("@sinclair/typebox").TString;
8
+ }>>;
9
+ }>;
10
+ export declare const PresenceSubscribeResultSchema: import("@sinclair/typebox").TObject<{
11
+ statuses: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
12
+ participant: import("@sinclair/typebox").TObject<{
13
+ type: import("@sinclair/typebox").TUnsafe<"user" | "agent">;
14
+ id: import("@sinclair/typebox").TString;
15
+ }>;
16
+ status: import("@sinclair/typebox").TUnsafe<"online" | "offline" | "away">;
17
+ }>>;
18
+ }>;
19
+ //# sourceMappingURL=presence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presence.d.ts","sourceRoot":"","sources":["../../../src/schema/methods/presence.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,0BAA0B;;EAGtC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;EAGzC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;EAGzC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Type } from "@sinclair/typebox";
2
+ import { PresenceStatusEnum, PresenceEntrySchema } from "../presence.js";
3
+ import { ParticipantRefSchema } from "../identity.js";
4
+ export const PresenceUpdateParamsSchema = Type.Object({ status: PresenceStatusEnum }, { additionalProperties: false });
5
+ export const PresenceSubscribeParamsSchema = Type.Object({ participants: Type.Array(ParticipantRefSchema) }, { additionalProperties: false });
6
+ export const PresenceSubscribeResultSchema = Type.Object({ statuses: Type.Array(PresenceEntrySchema) }, { additionalProperties: false });
7
+ //# sourceMappingURL=presence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presence.js","sourceRoot":"","sources":["../../../src/schema/methods/presence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC,MAAM,CACnD,EAAE,MAAM,EAAE,kBAAkB,EAAE,EAC9B,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,CAAC,MAAM,CACtD,EAAE,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,EAAE,EAClD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,CAAC,MAAM,CACtD,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,EAAE,EAC7C,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { type Static } from "@sinclair/typebox";
2
+ export declare const PresenceStatusEnum: import("@sinclair/typebox").TUnsafe<"online" | "offline" | "away">;
3
+ export declare const PresenceEntrySchema: import("@sinclair/typebox").TObject<{
4
+ participant: import("@sinclair/typebox").TObject<{
5
+ type: import("@sinclair/typebox").TUnsafe<"user" | "agent">;
6
+ id: import("@sinclair/typebox").TString;
7
+ }>;
8
+ status: import("@sinclair/typebox").TUnsafe<"online" | "offline" | "away">;
9
+ }>;
10
+ export declare const TypingIndicatorSchema: import("@sinclair/typebox").TObject<{
11
+ conversationId: import("@sinclair/typebox").TString;
12
+ participant: import("@sinclair/typebox").TObject<{
13
+ type: import("@sinclair/typebox").TUnsafe<"user" | "agent">;
14
+ id: import("@sinclair/typebox").TString;
15
+ }>;
16
+ }>;
17
+ export type PresenceEntry = Static<typeof PresenceEntrySchema>;
18
+ export type TypingIndicator = Static<typeof TypingIndicatorSchema>;
19
+ //# sourceMappingURL=presence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presence.d.ts","sourceRoot":"","sources":["../../src/schema/presence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKtD,eAAO,MAAM,kBAAkB,oEAA4C,CAAC;AAE5E,eAAO,MAAM,mBAAmB;;;;;;EAM/B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;EAMjC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAC/D,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { Type } from "@sinclair/typebox";
2
+ import { stringEnum } from "../helpers.js";
3
+ import { ParticipantRefSchema } from "./identity.js";
4
+ import { ConversationId } from "./primitives.js";
5
+ export const PresenceStatusEnum = stringEnum(["online", "offline", "away"]);
6
+ export const PresenceEntrySchema = Type.Object({
7
+ participant: ParticipantRefSchema,
8
+ status: PresenceStatusEnum,
9
+ }, { additionalProperties: false });
10
+ export const TypingIndicatorSchema = Type.Object({
11
+ conversationId: ConversationId,
12
+ participant: ParticipantRefSchema,
13
+ }, { additionalProperties: false });
14
+ //# sourceMappingURL=presence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presence.js","sourceRoot":"","sources":["../../src/schema/presence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;AAE5E,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,MAAM,CAC5C;IACE,WAAW,EAAE,oBAAoB;IACjC,MAAM,EAAE,kBAAkB;CAC3B,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,MAAM,CAC9C;IACE,cAAc,EAAE,cAAc;IAC9B,WAAW,EAAE,oBAAoB;CAClC,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAChC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const UserId: import("@sinclair/typebox").TString;
2
+ export declare const AgentId: import("@sinclair/typebox").TString;
3
+ export declare const ConversationId: import("@sinclair/typebox").TString;
4
+ export declare const MessageId: import("@sinclair/typebox").TString;
5
+ export declare const ContactId: import("@sinclair/typebox").TString;
6
+ export declare const InviteToken: import("@sinclair/typebox").TString;
7
+ //# sourceMappingURL=primitives.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../src/schema/primitives.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,qCAAsB,CAAC;AAC1C,eAAO,MAAM,OAAO,qCAAuB,CAAC;AAC5C,eAAO,MAAM,cAAc,qCAA8B,CAAC;AAC1D,eAAO,MAAM,SAAS,qCAAyB,CAAC;AAChD,eAAO,MAAM,SAAS,qCAAyB,CAAC;AAEhD,eAAO,MAAM,WAAW,qCAGtB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Type } from "@sinclair/typebox";
2
+ import { brandedId } from "../helpers.js";
3
+ export const UserId = brandedId("UserId");
4
+ export const AgentId = brandedId("AgentId");
5
+ export const ConversationId = brandedId("ConversationId");
6
+ export const MessageId = brandedId("MessageId");
7
+ export const ContactId = brandedId("ContactId");
8
+ // InviteToken is base64url-encoded (43+ chars), NOT a UUID
9
+ export const InviteToken = Type.String({
10
+ minLength: 43,
11
+ description: "Base64url invite token",
12
+ });
13
+ //# sourceMappingURL=primitives.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitives.js","sourceRoot":"","sources":["../../src/schema/primitives.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,MAAM,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAC1C,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,CAAC,MAAM,cAAc,GAAG,SAAS,CAAC,gBAAgB,CAAC,CAAC;AAC1D,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC;AAChD,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC,WAAW,CAAC,CAAC;AAChD,2DAA2D;AAC3D,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC;IACrC,SAAS,EAAE,EAAE;IACb,WAAW,EAAE,wBAAwB;CACtC,CAAC,CAAC"}
@@ -0,0 +1,46 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "type": "object",
4
+ "required": [
5
+ "id",
6
+ "name",
7
+ "status",
8
+ "createdAt"
9
+ ],
10
+ "properties": {
11
+ "id": {
12
+ "format": "uuid",
13
+ "description": "Branded AgentId",
14
+ "type": "string"
15
+ },
16
+ "ownerUserId": {
17
+ "format": "uuid",
18
+ "description": "Branded UserId",
19
+ "type": "string"
20
+ },
21
+ "name": {
22
+ "pattern": "^[a-z0-9][a-z0-9_-]{1,30}[a-z0-9]$",
23
+ "minLength": 3,
24
+ "maxLength": 32,
25
+ "type": "string"
26
+ },
27
+ "displayName": {
28
+ "type": "string"
29
+ },
30
+ "description": {
31
+ "type": "string"
32
+ },
33
+ "status": {
34
+ "type": "string",
35
+ "enum": [
36
+ "pending_claim",
37
+ "active",
38
+ "suspended"
39
+ ]
40
+ },
41
+ "createdAt": {
42
+ "format": "date-time",
43
+ "type": "string"
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "type": "object",
4
+ "required": [
5
+ "id",
6
+ "requesterId",
7
+ "targetId",
8
+ "status",
9
+ "createdAt"
10
+ ],
11
+ "properties": {
12
+ "id": {
13
+ "format": "uuid",
14
+ "description": "Branded ContactId",
15
+ "type": "string"
16
+ },
17
+ "requesterId": {
18
+ "format": "uuid",
19
+ "description": "Branded UserId",
20
+ "type": "string"
21
+ },
22
+ "targetId": {
23
+ "format": "uuid",
24
+ "description": "Branded UserId",
25
+ "type": "string"
26
+ },
27
+ "status": {
28
+ "type": "string",
29
+ "enum": [
30
+ "pending",
31
+ "accepted",
32
+ "blocked"
33
+ ]
34
+ },
35
+ "createdAt": {
36
+ "format": "date-time",
37
+ "type": "string"
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "type": "object",
4
+ "required": [
5
+ "contact"
6
+ ],
7
+ "properties": {
8
+ "contact": {
9
+ "additionalProperties": false,
10
+ "type": "object",
11
+ "required": [
12
+ "id",
13
+ "requesterId",
14
+ "targetId",
15
+ "status",
16
+ "createdAt"
17
+ ],
18
+ "properties": {
19
+ "id": {
20
+ "format": "uuid",
21
+ "description": "Branded ContactId",
22
+ "type": "string"
23
+ },
24
+ "requesterId": {
25
+ "format": "uuid",
26
+ "description": "Branded UserId",
27
+ "type": "string"
28
+ },
29
+ "targetId": {
30
+ "format": "uuid",
31
+ "description": "Branded UserId",
32
+ "type": "string"
33
+ },
34
+ "status": {
35
+ "type": "string",
36
+ "enum": [
37
+ "pending",
38
+ "accepted",
39
+ "blocked"
40
+ ]
41
+ },
42
+ "createdAt": {
43
+ "format": "date-time",
44
+ "type": "string"
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "type": "object",
4
+ "required": [
5
+ "contactId"
6
+ ],
7
+ "properties": {
8
+ "contactId": {
9
+ "format": "uuid",
10
+ "description": "Branded ContactId",
11
+ "type": "string"
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "type": "object",
4
+ "required": [
5
+ "contact"
6
+ ],
7
+ "properties": {
8
+ "contact": {
9
+ "additionalProperties": false,
10
+ "type": "object",
11
+ "required": [
12
+ "id",
13
+ "requesterId",
14
+ "targetId",
15
+ "status",
16
+ "createdAt"
17
+ ],
18
+ "properties": {
19
+ "id": {
20
+ "format": "uuid",
21
+ "description": "Branded ContactId",
22
+ "type": "string"
23
+ },
24
+ "requesterId": {
25
+ "format": "uuid",
26
+ "description": "Branded UserId",
27
+ "type": "string"
28
+ },
29
+ "targetId": {
30
+ "format": "uuid",
31
+ "description": "Branded UserId",
32
+ "type": "string"
33
+ },
34
+ "status": {
35
+ "type": "string",
36
+ "enum": [
37
+ "pending",
38
+ "accepted",
39
+ "blocked"
40
+ ]
41
+ },
42
+ "createdAt": {
43
+ "format": "date-time",
44
+ "type": "string"
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "type": "object",
4
+ "required": [
5
+ "contactId"
6
+ ],
7
+ "properties": {
8
+ "contactId": {
9
+ "format": "uuid",
10
+ "description": "Branded ContactId",
11
+ "type": "string"
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "type": "object",
4
+ "required": [
5
+ "contact"
6
+ ],
7
+ "properties": {
8
+ "contact": {
9
+ "additionalProperties": false,
10
+ "type": "object",
11
+ "required": [
12
+ "id",
13
+ "requesterId",
14
+ "targetId",
15
+ "status",
16
+ "createdAt"
17
+ ],
18
+ "properties": {
19
+ "id": {
20
+ "format": "uuid",
21
+ "description": "Branded ContactId",
22
+ "type": "string"
23
+ },
24
+ "requesterId": {
25
+ "format": "uuid",
26
+ "description": "Branded UserId",
27
+ "type": "string"
28
+ },
29
+ "targetId": {
30
+ "format": "uuid",
31
+ "description": "Branded UserId",
32
+ "type": "string"
33
+ },
34
+ "status": {
35
+ "type": "string",
36
+ "enum": [
37
+ "pending",
38
+ "accepted",
39
+ "blocked"
40
+ ]
41
+ },
42
+ "createdAt": {
43
+ "format": "date-time",
44
+ "type": "string"
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "type": "object",
4
+ "properties": {
5
+ "email": {
6
+ "format": "email",
7
+ "type": "string"
8
+ },
9
+ "phone": {
10
+ "type": "string"
11
+ },
12
+ "userId": {
13
+ "format": "uuid",
14
+ "description": "Branded UserId",
15
+ "type": "string"
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "type": "object",
4
+ "required": [
5
+ "contactId",
6
+ "status"
7
+ ],
8
+ "properties": {
9
+ "contactId": {
10
+ "format": "uuid",
11
+ "description": "Branded ContactId",
12
+ "type": "string"
13
+ },
14
+ "status": {
15
+ "const": "pending",
16
+ "type": "string"
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "type": "object",
4
+ "properties": {
5
+ "status": {
6
+ "type": "string",
7
+ "enum": [
8
+ "pending",
9
+ "accepted",
10
+ "blocked"
11
+ ]
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "type": "object",
4
+ "required": [
5
+ "contacts"
6
+ ],
7
+ "properties": {
8
+ "contacts": {
9
+ "type": "array",
10
+ "items": {
11
+ "additionalProperties": false,
12
+ "type": "object",
13
+ "required": [
14
+ "id",
15
+ "requesterId",
16
+ "targetId",
17
+ "status",
18
+ "createdAt"
19
+ ],
20
+ "properties": {
21
+ "id": {
22
+ "format": "uuid",
23
+ "description": "Branded ContactId",
24
+ "type": "string"
25
+ },
26
+ "requesterId": {
27
+ "format": "uuid",
28
+ "description": "Branded UserId",
29
+ "type": "string"
30
+ },
31
+ "targetId": {
32
+ "format": "uuid",
33
+ "description": "Branded UserId",
34
+ "type": "string"
35
+ },
36
+ "status": {
37
+ "type": "string",
38
+ "enum": [
39
+ "pending",
40
+ "accepted",
41
+ "blocked"
42
+ ]
43
+ },
44
+ "createdAt": {
45
+ "format": "date-time",
46
+ "type": "string"
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,57 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "type": "object",
4
+ "required": [
5
+ "id",
6
+ "type",
7
+ "createdBy",
8
+ "createdAt",
9
+ "updatedAt"
10
+ ],
11
+ "properties": {
12
+ "id": {
13
+ "format": "uuid",
14
+ "description": "Branded ConversationId",
15
+ "type": "string"
16
+ },
17
+ "type": {
18
+ "type": "string",
19
+ "enum": [
20
+ "dm",
21
+ "group"
22
+ ]
23
+ },
24
+ "name": {
25
+ "type": "string"
26
+ },
27
+ "createdBy": {
28
+ "additionalProperties": false,
29
+ "type": "object",
30
+ "required": [
31
+ "type",
32
+ "id"
33
+ ],
34
+ "properties": {
35
+ "type": {
36
+ "type": "string",
37
+ "enum": [
38
+ "user",
39
+ "agent"
40
+ ]
41
+ },
42
+ "id": {
43
+ "format": "uuid",
44
+ "type": "string"
45
+ }
46
+ }
47
+ },
48
+ "createdAt": {
49
+ "format": "date-time",
50
+ "type": "string"
51
+ },
52
+ "updatedAt": {
53
+ "format": "date-time",
54
+ "type": "string"
55
+ }
56
+ }
57
+ }