@moltzap/protocol 0.1.0 → 0.2.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 (87) hide show
  1. package/dist/schema/conversations.d.ts +6 -0
  2. package/dist/schema/conversations.d.ts.map +1 -1
  3. package/dist/schema/conversations.js +3 -0
  4. package/dist/schema/conversations.js.map +1 -1
  5. package/dist/schema/identity.d.ts.map +1 -1
  6. package/dist/schema/identity.js +1 -0
  7. package/dist/schema/identity.js.map +1 -1
  8. package/dist/schema/methods/auth.d.ts +32 -0
  9. package/dist/schema/methods/auth.d.ts.map +1 -1
  10. package/dist/schema/methods/auth.js +25 -0
  11. package/dist/schema/methods/auth.js.map +1 -1
  12. package/dist/schema/methods/conversations.d.ts +6 -0
  13. package/dist/schema/methods/conversations.d.ts.map +1 -1
  14. package/dist/types.d.ts +1 -1
  15. package/dist/types.d.ts.map +1 -1
  16. package/dist/validators.d.ts +6 -0
  17. package/dist/validators.d.ts.map +1 -1
  18. package/dist/validators.js +3 -1
  19. package/dist/validators.js.map +1 -1
  20. package/package.json +9 -11
  21. package/dist/schemas/Agent.json +0 -46
  22. package/dist/schemas/Contact.json +0 -40
  23. package/dist/schemas/ContactAcceptedEvent.json +0 -49
  24. package/dist/schemas/ContactIdParams.json +0 -14
  25. package/dist/schemas/ContactRequestEvent.json +0 -49
  26. package/dist/schemas/ContactsAcceptParams.json +0 -14
  27. package/dist/schemas/ContactsAcceptResult.json +0 -49
  28. package/dist/schemas/ContactsAddParams.json +0 -18
  29. package/dist/schemas/ContactsAddResult.json +0 -19
  30. package/dist/schemas/ContactsListParams.json +0 -14
  31. package/dist/schemas/ContactsListResult.json +0 -52
  32. package/dist/schemas/Conversation.json +0 -57
  33. package/dist/schemas/ConversationCreatedEvent.json +0 -66
  34. package/dist/schemas/ConversationParticipant.json +0 -59
  35. package/dist/schemas/ConversationSummary.json +0 -37
  36. package/dist/schemas/ConversationUpdatedEvent.json +0 -66
  37. package/dist/schemas/ConversationsAddParticipantParams.json +0 -36
  38. package/dist/schemas/ConversationsCreateParams.json +0 -47
  39. package/dist/schemas/ConversationsCreateResult.json +0 -66
  40. package/dist/schemas/ConversationsGetParams.json +0 -14
  41. package/dist/schemas/ConversationsGetResult.json +0 -129
  42. package/dist/schemas/ConversationsLeaveParams.json +0 -14
  43. package/dist/schemas/ConversationsListParams.json +0 -14
  44. package/dist/schemas/ConversationsListResult.json +0 -52
  45. package/dist/schemas/ConversationsMuteParams.json +0 -18
  46. package/dist/schemas/ConversationsRemoveParticipantParams.json +0 -36
  47. package/dist/schemas/ConversationsUnmuteParams.json +0 -14
  48. package/dist/schemas/ConversationsUpdateParams.json +0 -19
  49. package/dist/schemas/DeliveryEntry.json +0 -59
  50. package/dist/schemas/EmptyResult.json +0 -5
  51. package/dist/schemas/EventFrame.json +0 -23
  52. package/dist/schemas/HelloOk.json +0 -118
  53. package/dist/schemas/Invite.json +0 -63
  54. package/dist/schemas/InvitesAcceptParams.json +0 -13
  55. package/dist/schemas/InvitesAcceptResult.json +0 -103
  56. package/dist/schemas/InvitesCreateParams.json +0 -18
  57. package/dist/schemas/InvitesCreateResult.json +0 -17
  58. package/dist/schemas/Message.json +0 -96
  59. package/dist/schemas/MessageDeletedEvent.json +0 -20
  60. package/dist/schemas/MessageDeliveredEvent.json +0 -42
  61. package/dist/schemas/MessageReactedEvent.json +0 -48
  62. package/dist/schemas/MessageReadEvent.json +0 -41
  63. package/dist/schemas/MessageReceivedEvent.json +0 -105
  64. package/dist/schemas/MessagesDeleteParams.json +0 -14
  65. package/dist/schemas/MessagesListParams.json +0 -27
  66. package/dist/schemas/MessagesListResult.json +0 -112
  67. package/dist/schemas/MessagesReactParams.json +0 -28
  68. package/dist/schemas/MessagesReadParams.json +0 -19
  69. package/dist/schemas/MessagesSendParams.json +0 -46
  70. package/dist/schemas/MessagesSendResult.json +0 -105
  71. package/dist/schemas/ParticipantRef.json +0 -21
  72. package/dist/schemas/Policy.json +0 -45
  73. package/dist/schemas/PresenceChangedEvent.json +0 -39
  74. package/dist/schemas/PresenceEntry.json +0 -39
  75. package/dist/schemas/PresenceSubscribeParams.json +0 -33
  76. package/dist/schemas/PresenceSubscribeResult.json +0 -51
  77. package/dist/schemas/PresenceUpdateParams.json +0 -17
  78. package/dist/schemas/RateLimits.json +0 -16
  79. package/dist/schemas/RegisterParams.json +0 -17
  80. package/dist/schemas/RegisterResult.json +0 -27
  81. package/dist/schemas/RequestFrame.json +0 -27
  82. package/dist/schemas/ResponseFrame.json +0 -40
  83. package/dist/schemas/RpcError.json +0 -17
  84. package/dist/schemas/TextPart.json +0 -19
  85. package/dist/schemas/TypingIndicator.json +0 -36
  86. package/dist/schemas/TypingIndicatorEvent.json +0 -36
  87. package/dist/schemas/User.json +0 -43
@@ -1,52 +0,0 @@
1
- {
2
- "additionalProperties": false,
3
- "type": "object",
4
- "required": [
5
- "conversations"
6
- ],
7
- "properties": {
8
- "conversations": {
9
- "type": "array",
10
- "items": {
11
- "additionalProperties": false,
12
- "type": "object",
13
- "required": [
14
- "id",
15
- "type",
16
- "unreadCount"
17
- ],
18
- "properties": {
19
- "id": {
20
- "format": "uuid",
21
- "description": "Branded ConversationId",
22
- "type": "string"
23
- },
24
- "type": {
25
- "type": "string",
26
- "enum": [
27
- "dm",
28
- "group"
29
- ]
30
- },
31
- "name": {
32
- "type": "string"
33
- },
34
- "lastMessagePreview": {
35
- "type": "string"
36
- },
37
- "lastMessageAt": {
38
- "format": "date-time",
39
- "type": "string"
40
- },
41
- "unreadCount": {
42
- "minimum": 0,
43
- "type": "integer"
44
- }
45
- }
46
- }
47
- },
48
- "cursor": {
49
- "type": "string"
50
- }
51
- }
52
- }
@@ -1,18 +0,0 @@
1
- {
2
- "additionalProperties": false,
3
- "type": "object",
4
- "required": [
5
- "conversationId"
6
- ],
7
- "properties": {
8
- "conversationId": {
9
- "format": "uuid",
10
- "description": "Branded ConversationId",
11
- "type": "string"
12
- },
13
- "until": {
14
- "format": "date-time",
15
- "type": "string"
16
- }
17
- }
18
- }
@@ -1,36 +0,0 @@
1
- {
2
- "additionalProperties": false,
3
- "type": "object",
4
- "required": [
5
- "conversationId",
6
- "participant"
7
- ],
8
- "properties": {
9
- "conversationId": {
10
- "format": "uuid",
11
- "description": "Branded ConversationId",
12
- "type": "string"
13
- },
14
- "participant": {
15
- "additionalProperties": false,
16
- "type": "object",
17
- "required": [
18
- "type",
19
- "id"
20
- ],
21
- "properties": {
22
- "type": {
23
- "type": "string",
24
- "enum": [
25
- "user",
26
- "agent"
27
- ]
28
- },
29
- "id": {
30
- "format": "uuid",
31
- "type": "string"
32
- }
33
- }
34
- }
35
- }
36
- }
@@ -1,14 +0,0 @@
1
- {
2
- "additionalProperties": false,
3
- "type": "object",
4
- "required": [
5
- "conversationId"
6
- ],
7
- "properties": {
8
- "conversationId": {
9
- "format": "uuid",
10
- "description": "Branded ConversationId",
11
- "type": "string"
12
- }
13
- }
14
- }
@@ -1,19 +0,0 @@
1
- {
2
- "additionalProperties": false,
3
- "type": "object",
4
- "required": [
5
- "conversationId"
6
- ],
7
- "properties": {
8
- "conversationId": {
9
- "format": "uuid",
10
- "description": "Branded ConversationId",
11
- "type": "string"
12
- },
13
- "name": {
14
- "minLength": 1,
15
- "maxLength": 100,
16
- "type": "string"
17
- }
18
- }
19
- }
@@ -1,59 +0,0 @@
1
- {
2
- "additionalProperties": false,
3
- "type": "object",
4
- "required": [
5
- "messageId",
6
- "conversationId",
7
- "participant",
8
- "status"
9
- ],
10
- "properties": {
11
- "messageId": {
12
- "format": "uuid",
13
- "description": "Branded MessageId",
14
- "type": "string"
15
- },
16
- "conversationId": {
17
- "format": "uuid",
18
- "description": "Branded ConversationId",
19
- "type": "string"
20
- },
21
- "participant": {
22
- "additionalProperties": false,
23
- "type": "object",
24
- "required": [
25
- "type",
26
- "id"
27
- ],
28
- "properties": {
29
- "type": {
30
- "type": "string",
31
- "enum": [
32
- "user",
33
- "agent"
34
- ]
35
- },
36
- "id": {
37
- "format": "uuid",
38
- "type": "string"
39
- }
40
- }
41
- },
42
- "status": {
43
- "type": "string",
44
- "enum": [
45
- "sent",
46
- "delivered",
47
- "read"
48
- ]
49
- },
50
- "deliveredAt": {
51
- "format": "date-time",
52
- "type": "string"
53
- },
54
- "readAt": {
55
- "format": "date-time",
56
- "type": "string"
57
- }
58
- }
59
- }
@@ -1,5 +0,0 @@
1
- {
2
- "additionalProperties": false,
3
- "type": "object",
4
- "properties": {}
5
- }
@@ -1,23 +0,0 @@
1
- {
2
- "additionalProperties": false,
3
- "type": "object",
4
- "required": [
5
- "jsonrpc",
6
- "type",
7
- "event"
8
- ],
9
- "properties": {
10
- "jsonrpc": {
11
- "const": "2.0",
12
- "type": "string"
13
- },
14
- "type": {
15
- "const": "event",
16
- "type": "string"
17
- },
18
- "event": {
19
- "type": "string"
20
- },
21
- "data": {}
22
- }
23
- }
@@ -1,118 +0,0 @@
1
- {
2
- "additionalProperties": false,
3
- "type": "object",
4
- "required": [
5
- "protocolVersion",
6
- "conversations",
7
- "unreadCounts",
8
- "policy"
9
- ],
10
- "properties": {
11
- "protocolVersion": {
12
- "type": "string"
13
- },
14
- "userId": {
15
- "format": "uuid",
16
- "description": "Branded UserId",
17
- "type": "string"
18
- },
19
- "agentId": {
20
- "format": "uuid",
21
- "description": "Branded AgentId",
22
- "type": "string"
23
- },
24
- "conversations": {
25
- "type": "array",
26
- "items": {
27
- "additionalProperties": false,
28
- "type": "object",
29
- "required": [
30
- "id",
31
- "type",
32
- "unreadCount"
33
- ],
34
- "properties": {
35
- "id": {
36
- "format": "uuid",
37
- "description": "Branded ConversationId",
38
- "type": "string"
39
- },
40
- "type": {
41
- "type": "string",
42
- "enum": [
43
- "dm",
44
- "group"
45
- ]
46
- },
47
- "name": {
48
- "type": "string"
49
- },
50
- "lastMessagePreview": {
51
- "type": "string"
52
- },
53
- "lastMessageAt": {
54
- "format": "date-time",
55
- "type": "string"
56
- },
57
- "unreadCount": {
58
- "minimum": 0,
59
- "type": "integer"
60
- }
61
- }
62
- }
63
- },
64
- "unreadCounts": {
65
- "type": "object",
66
- "patternProperties": {
67
- "^(.*)$": {
68
- "type": "integer"
69
- }
70
- }
71
- },
72
- "policy": {
73
- "additionalProperties": false,
74
- "type": "object",
75
- "required": [
76
- "maxMessageBytes",
77
- "maxPartsPerMessage",
78
- "maxTextLength",
79
- "maxGroupParticipants",
80
- "heartbeatIntervalMs",
81
- "rateLimits"
82
- ],
83
- "properties": {
84
- "maxMessageBytes": {
85
- "type": "integer"
86
- },
87
- "maxPartsPerMessage": {
88
- "type": "integer"
89
- },
90
- "maxTextLength": {
91
- "type": "integer"
92
- },
93
- "maxGroupParticipants": {
94
- "type": "integer"
95
- },
96
- "heartbeatIntervalMs": {
97
- "type": "integer"
98
- },
99
- "rateLimits": {
100
- "additionalProperties": false,
101
- "type": "object",
102
- "required": [
103
- "messagesPerMinute",
104
- "requestsPerMinute"
105
- ],
106
- "properties": {
107
- "messagesPerMinute": {
108
- "type": "integer"
109
- },
110
- "requestsPerMinute": {
111
- "type": "integer"
112
- }
113
- }
114
- }
115
- }
116
- }
117
- }
118
- }
@@ -1,63 +0,0 @@
1
- {
2
- "additionalProperties": false,
3
- "type": "object",
4
- "required": [
5
- "id",
6
- "inviterId",
7
- "token",
8
- "type",
9
- "status",
10
- "createdAt",
11
- "expiresAt"
12
- ],
13
- "properties": {
14
- "id": {
15
- "format": "uuid",
16
- "type": "string"
17
- },
18
- "inviterId": {
19
- "format": "uuid",
20
- "description": "Branded UserId",
21
- "type": "string"
22
- },
23
- "token": {
24
- "minLength": 43,
25
- "type": "string"
26
- },
27
- "type": {
28
- "type": "string",
29
- "enum": [
30
- "contact",
31
- "group"
32
- ]
33
- },
34
- "targetEmail": {
35
- "format": "email",
36
- "type": "string"
37
- },
38
- "targetPhone": {
39
- "type": "string"
40
- },
41
- "conversationId": {
42
- "format": "uuid",
43
- "description": "Branded ConversationId",
44
- "type": "string"
45
- },
46
- "status": {
47
- "type": "string",
48
- "enum": [
49
- "pending",
50
- "accepted",
51
- "expired"
52
- ]
53
- },
54
- "createdAt": {
55
- "format": "date-time",
56
- "type": "string"
57
- },
58
- "expiresAt": {
59
- "format": "date-time",
60
- "type": "string"
61
- }
62
- }
63
- }
@@ -1,13 +0,0 @@
1
- {
2
- "additionalProperties": false,
3
- "type": "object",
4
- "required": [
5
- "token"
6
- ],
7
- "properties": {
8
- "token": {
9
- "minLength": 43,
10
- "type": "string"
11
- }
12
- }
13
- }
@@ -1,103 +0,0 @@
1
- {
2
- "additionalProperties": false,
3
- "type": "object",
4
- "properties": {
5
- "contact": {
6
- "additionalProperties": false,
7
- "type": "object",
8
- "required": [
9
- "id",
10
- "requesterId",
11
- "targetId",
12
- "status",
13
- "createdAt"
14
- ],
15
- "properties": {
16
- "id": {
17
- "format": "uuid",
18
- "description": "Branded ContactId",
19
- "type": "string"
20
- },
21
- "requesterId": {
22
- "format": "uuid",
23
- "description": "Branded UserId",
24
- "type": "string"
25
- },
26
- "targetId": {
27
- "format": "uuid",
28
- "description": "Branded UserId",
29
- "type": "string"
30
- },
31
- "status": {
32
- "type": "string",
33
- "enum": [
34
- "pending",
35
- "accepted",
36
- "blocked"
37
- ]
38
- },
39
- "createdAt": {
40
- "format": "date-time",
41
- "type": "string"
42
- }
43
- }
44
- },
45
- "conversation": {
46
- "additionalProperties": false,
47
- "type": "object",
48
- "required": [
49
- "id",
50
- "type",
51
- "createdBy",
52
- "createdAt",
53
- "updatedAt"
54
- ],
55
- "properties": {
56
- "id": {
57
- "format": "uuid",
58
- "description": "Branded ConversationId",
59
- "type": "string"
60
- },
61
- "type": {
62
- "type": "string",
63
- "enum": [
64
- "dm",
65
- "group"
66
- ]
67
- },
68
- "name": {
69
- "type": "string"
70
- },
71
- "createdBy": {
72
- "additionalProperties": false,
73
- "type": "object",
74
- "required": [
75
- "type",
76
- "id"
77
- ],
78
- "properties": {
79
- "type": {
80
- "type": "string",
81
- "enum": [
82
- "user",
83
- "agent"
84
- ]
85
- },
86
- "id": {
87
- "format": "uuid",
88
- "type": "string"
89
- }
90
- }
91
- },
92
- "createdAt": {
93
- "format": "date-time",
94
- "type": "string"
95
- },
96
- "updatedAt": {
97
- "format": "date-time",
98
- "type": "string"
99
- }
100
- }
101
- }
102
- }
103
- }
@@ -1,18 +0,0 @@
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
- "conversationId": {
13
- "format": "uuid",
14
- "description": "Branded ConversationId",
15
- "type": "string"
16
- }
17
- }
18
- }
@@ -1,17 +0,0 @@
1
- {
2
- "additionalProperties": false,
3
- "type": "object",
4
- "required": [
5
- "inviteUrl",
6
- "token"
7
- ],
8
- "properties": {
9
- "inviteUrl": {
10
- "format": "uri",
11
- "type": "string"
12
- },
13
- "token": {
14
- "type": "string"
15
- }
16
- }
17
- }
@@ -1,96 +0,0 @@
1
- {
2
- "additionalProperties": false,
3
- "type": "object",
4
- "required": [
5
- "id",
6
- "conversationId",
7
- "sender",
8
- "seq",
9
- "parts",
10
- "createdAt"
11
- ],
12
- "properties": {
13
- "id": {
14
- "format": "uuid",
15
- "description": "Branded MessageId",
16
- "type": "string"
17
- },
18
- "conversationId": {
19
- "format": "uuid",
20
- "description": "Branded ConversationId",
21
- "type": "string"
22
- },
23
- "sender": {
24
- "additionalProperties": false,
25
- "type": "object",
26
- "required": [
27
- "type",
28
- "id"
29
- ],
30
- "properties": {
31
- "type": {
32
- "type": "string",
33
- "enum": [
34
- "user",
35
- "agent"
36
- ]
37
- },
38
- "id": {
39
- "format": "uuid",
40
- "type": "string"
41
- }
42
- }
43
- },
44
- "seq": {
45
- "minimum": 0,
46
- "type": "integer"
47
- },
48
- "replyToId": {
49
- "format": "uuid",
50
- "description": "Branded MessageId",
51
- "type": "string"
52
- },
53
- "parts": {
54
- "minItems": 1,
55
- "maxItems": 10,
56
- "type": "array",
57
- "items": {
58
- "additionalProperties": false,
59
- "type": "object",
60
- "required": [
61
- "type",
62
- "text"
63
- ],
64
- "properties": {
65
- "type": {
66
- "const": "text",
67
- "type": "string"
68
- },
69
- "text": {
70
- "minLength": 1,
71
- "maxLength": 32768,
72
- "type": "string"
73
- }
74
- }
75
- }
76
- },
77
- "reactions": {
78
- "type": "object",
79
- "patternProperties": {
80
- "^(.*)$": {
81
- "type": "array",
82
- "items": {
83
- "type": "string"
84
- }
85
- }
86
- }
87
- },
88
- "isDeleted": {
89
- "type": "boolean"
90
- },
91
- "createdAt": {
92
- "format": "date-time",
93
- "type": "string"
94
- }
95
- }
96
- }
@@ -1,20 +0,0 @@
1
- {
2
- "additionalProperties": false,
3
- "type": "object",
4
- "required": [
5
- "messageId",
6
- "conversationId"
7
- ],
8
- "properties": {
9
- "messageId": {
10
- "format": "uuid",
11
- "description": "Branded MessageId",
12
- "type": "string"
13
- },
14
- "conversationId": {
15
- "format": "uuid",
16
- "description": "Branded ConversationId",
17
- "type": "string"
18
- }
19
- }
20
- }