@relaycast/types 0.2.3 → 0.2.5

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 (61) hide show
  1. package/dist/agent.d.ts +189 -23
  2. package/dist/agent.d.ts.map +1 -1
  3. package/dist/agent.js +73 -1
  4. package/dist/agent.js.map +1 -1
  5. package/dist/api.d.ts +209 -14
  6. package/dist/api.d.ts.map +1 -1
  7. package/dist/api.js +22 -1
  8. package/dist/api.js.map +1 -1
  9. package/dist/billing.d.ts +97 -17
  10. package/dist/billing.d.ts.map +1 -1
  11. package/dist/billing.js +44 -1
  12. package/dist/billing.js.map +1 -1
  13. package/dist/channel.d.ts +80 -16
  14. package/dist/channel.d.ts.map +1 -1
  15. package/dist/channel.js +35 -1
  16. package/dist/channel.js.map +1 -1
  17. package/dist/command.d.ts +188 -26
  18. package/dist/command.d.ts.map +1 -1
  19. package/dist/command.js +47 -1
  20. package/dist/command.js.map +1 -1
  21. package/dist/dashboard.d.ts +141 -14
  22. package/dist/dashboard.d.ts.map +1 -1
  23. package/dist/dashboard.js +32 -1
  24. package/dist/dashboard.js.map +1 -1
  25. package/dist/dm.d.ts +74 -15
  26. package/dist/dm.d.ts.map +1 -1
  27. package/dist/dm.js +33 -1
  28. package/dist/dm.js.map +1 -1
  29. package/dist/events.d.ts +1479 -75
  30. package/dist/events.d.ts.map +1 -1
  31. package/dist/events.js +186 -1
  32. package/dist/events.js.map +1 -1
  33. package/dist/file.d.ts +83 -14
  34. package/dist/file.d.ts.map +1 -1
  35. package/dist/file.js +38 -1
  36. package/dist/file.js.map +1 -1
  37. package/dist/message.d.ts +875 -52
  38. package/dist/message.d.ts.map +1 -1
  39. package/dist/message.js +75 -1
  40. package/dist/message.js.map +1 -1
  41. package/dist/reaction.d.ts +35 -7
  42. package/dist/reaction.d.ts.map +1 -1
  43. package/dist/reaction.js +16 -1
  44. package/dist/reaction.js.map +1 -1
  45. package/dist/receipt.d.ts +34 -6
  46. package/dist/receipt.d.ts.map +1 -1
  47. package/dist/receipt.js +16 -1
  48. package/dist/receipt.js.map +1 -1
  49. package/dist/subscription.d.ts +119 -20
  50. package/dist/subscription.d.ts.map +1 -1
  51. package/dist/subscription.js +49 -1
  52. package/dist/subscription.js.map +1 -1
  53. package/dist/webhook.d.ts +81 -17
  54. package/dist/webhook.d.ts.map +1 -1
  55. package/dist/webhook.js +35 -1
  56. package/dist/webhook.js.map +1 -1
  57. package/dist/workspace.d.ts +77 -12
  58. package/dist/workspace.d.ts.map +1 -1
  59. package/dist/workspace.js +32 -1
  60. package/dist/workspace.js.map +1 -1
  61. package/package.json +4 -1
package/dist/command.js CHANGED
@@ -1,2 +1,48 @@
1
- export {};
1
+ import { z } from 'zod';
2
+ export const CommandParameterSchema = z.object({
3
+ name: z.string(),
4
+ description: z.string().optional(),
5
+ type: z.enum(['string', 'number', 'boolean']),
6
+ required: z.boolean().optional(),
7
+ });
8
+ export const AgentCommandSchema = z.object({
9
+ id: z.string(),
10
+ workspace_id: z.string(),
11
+ command: z.string(),
12
+ description: z.string(),
13
+ handler_agent_id: z.string(),
14
+ handler_agent_name: z.string(),
15
+ parameters: z.array(CommandParameterSchema),
16
+ created_at: z.string(),
17
+ is_active: z.boolean(),
18
+ });
19
+ export const CreateCommandRequestSchema = z.object({
20
+ command: z.string(),
21
+ description: z.string(),
22
+ handler_agent: z.string(),
23
+ parameters: z.array(CommandParameterSchema).optional(),
24
+ });
25
+ export const CreateCommandResponseSchema = z.object({
26
+ id: z.string(),
27
+ command: z.string(),
28
+ description: z.string(),
29
+ handler_agent: z.string(),
30
+ parameters: z.array(CommandParameterSchema),
31
+ created_at: z.string(),
32
+ });
33
+ export const InvokeCommandRequestSchema = z.object({
34
+ channel: z.string(),
35
+ args: z.string().optional(),
36
+ parameters: z.record(z.unknown()).optional(),
37
+ });
38
+ export const CommandInvocationSchema = z.object({
39
+ id: z.string(),
40
+ command: z.string(),
41
+ channel: z.string(),
42
+ invoked_by: z.string(),
43
+ args: z.string().nullable(),
44
+ parameters: z.record(z.unknown()).nullable(),
45
+ response_message_id: z.string().nullable(),
46
+ created_at: z.string(),
47
+ });
2
48
  //# sourceMappingURL=command.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../src/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC7C,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC5B,kBAAkB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC9B,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,sBAAsB,CAAC;IAC3C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;CACvB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,OAAO,EAAE,CAAC,CAAC,MAAM,EA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EAAE,CAAC,QAAQ,EAAE;IAC1C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC"}
@@ -1,8 +1,81 @@
1
- export interface WorkspaceStats {
1
+ import { z } from 'zod';
2
+ export declare const WorkspaceStatsSchema: z.ZodObject<{
3
+ agents: z.ZodObject<{
4
+ total: z.ZodNumber;
5
+ online: z.ZodNumber;
6
+ offline: z.ZodNumber;
7
+ }, "strip", z.ZodTypeAny, {
8
+ online: number;
9
+ offline: number;
10
+ total: number;
11
+ }, {
12
+ online: number;
13
+ offline: number;
14
+ total: number;
15
+ }>;
16
+ channels: z.ZodObject<{
17
+ total: z.ZodNumber;
18
+ archived: z.ZodNumber;
19
+ }, "strip", z.ZodTypeAny, {
20
+ total: number;
21
+ archived: number;
22
+ }, {
23
+ total: number;
24
+ archived: number;
25
+ }>;
26
+ messages: z.ZodObject<{
27
+ total: z.ZodNumber;
28
+ today: z.ZodNumber;
29
+ }, "strip", z.ZodTypeAny, {
30
+ total: number;
31
+ today: number;
32
+ }, {
33
+ total: number;
34
+ today: number;
35
+ }>;
36
+ dms: z.ZodObject<{
37
+ total_conversations: z.ZodNumber;
38
+ }, "strip", z.ZodTypeAny, {
39
+ total_conversations: number;
40
+ }, {
41
+ total_conversations: number;
42
+ }>;
43
+ files: z.ZodObject<{
44
+ total: z.ZodNumber;
45
+ storage_bytes: z.ZodNumber;
46
+ }, "strip", z.ZodTypeAny, {
47
+ total: number;
48
+ storage_bytes: number;
49
+ }, {
50
+ total: number;
51
+ storage_bytes: number;
52
+ }>;
53
+ }, "strip", z.ZodTypeAny, {
2
54
  agents: {
55
+ online: number;
56
+ offline: number;
3
57
  total: number;
58
+ };
59
+ channels: {
60
+ total: number;
61
+ archived: number;
62
+ };
63
+ messages: {
64
+ total: number;
65
+ today: number;
66
+ };
67
+ dms: {
68
+ total_conversations: number;
69
+ };
70
+ files: {
71
+ total: number;
72
+ storage_bytes: number;
73
+ };
74
+ }, {
75
+ agents: {
4
76
  online: number;
5
77
  offline: number;
78
+ total: number;
6
79
  };
7
80
  channels: {
8
81
  total: number;
@@ -19,29 +92,83 @@ export interface WorkspaceStats {
19
92
  total: number;
20
93
  storage_bytes: number;
21
94
  };
22
- }
23
- export interface ActivityItem {
24
- type: 'message' | 'dm';
95
+ }>;
96
+ export type WorkspaceStats = z.infer<typeof WorkspaceStatsSchema>;
97
+ export declare const ActivityItemSchema: z.ZodObject<{
98
+ type: z.ZodEnum<["message", "dm"]>;
99
+ id: z.ZodString;
100
+ channel_name: z.ZodOptional<z.ZodString>;
101
+ conversation_id: z.ZodOptional<z.ZodString>;
102
+ agent_name: z.ZodString;
103
+ text: z.ZodString;
104
+ created_at: z.ZodString;
105
+ }, "strip", z.ZodTypeAny, {
106
+ type: "message" | "dm";
25
107
  id: string;
26
- channel_name?: string;
27
- conversation_id?: string;
108
+ created_at: string;
28
109
  agent_name: string;
29
110
  text: string;
30
- created_at: string;
31
- }
32
- export interface WorkspaceDmConversation {
111
+ channel_name?: string | undefined;
112
+ conversation_id?: string | undefined;
113
+ }, {
114
+ type: "message" | "dm";
33
115
  id: string;
116
+ created_at: string;
117
+ agent_name: string;
118
+ text: string;
119
+ channel_name?: string | undefined;
120
+ conversation_id?: string | undefined;
121
+ }>;
122
+ export type ActivityItem = z.infer<typeof ActivityItemSchema>;
123
+ export declare const WorkspaceDmConversationSchema: z.ZodObject<{
124
+ id: z.ZodString;
125
+ type: z.ZodString;
126
+ participants: z.ZodArray<z.ZodString, "many">;
127
+ last_message: z.ZodNullable<z.ZodObject<{
128
+ text: z.ZodString;
129
+ agent_name: z.ZodString;
130
+ created_at: z.ZodString;
131
+ }, "strip", z.ZodTypeAny, {
132
+ created_at: string;
133
+ agent_name: string;
134
+ text: string;
135
+ }, {
136
+ created_at: string;
137
+ agent_name: string;
138
+ text: string;
139
+ }>>;
140
+ message_count: z.ZodNumber;
141
+ }, "strip", z.ZodTypeAny, {
34
142
  type: string;
35
- participants: string[];
143
+ id: string;
36
144
  last_message: {
37
- text: string;
145
+ created_at: string;
38
146
  agent_name: string;
147
+ text: string;
148
+ } | null;
149
+ participants: string[];
150
+ message_count: number;
151
+ }, {
152
+ type: string;
153
+ id: string;
154
+ last_message: {
39
155
  created_at: string;
156
+ agent_name: string;
157
+ text: string;
40
158
  } | null;
159
+ participants: string[];
41
160
  message_count: number;
42
- }
43
- export interface TokenRotateResponse {
161
+ }>;
162
+ export type WorkspaceDmConversation = z.infer<typeof WorkspaceDmConversationSchema>;
163
+ export declare const TokenRotateResponseSchema: z.ZodObject<{
164
+ name: z.ZodString;
165
+ token: z.ZodString;
166
+ }, "strip", z.ZodTypeAny, {
167
+ name: string;
168
+ token: string;
169
+ }, {
44
170
  name: string;
45
171
  token: string;
46
- }
172
+ }>;
173
+ export type TokenRotateResponse = z.infer<typeof TokenRotateResponseSchema>;
47
174
  //# sourceMappingURL=dashboard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../src/dashboard.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3D,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,GAAG,EAAE;QAAE,mBAAmB,EAAE,MAAM,CAAA;KAAE,CAAC;IACrC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC;CACjD;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;IACX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;;;;;;;;EAGpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
package/dist/dashboard.js CHANGED
@@ -1,2 +1,33 @@
1
- export {};
1
+ import { z } from 'zod';
2
+ export const WorkspaceStatsSchema = z.object({
3
+ agents: z.object({ total: z.number(), online: z.number(), offline: z.number() }),
4
+ channels: z.object({ total: z.number(), archived: z.number() }),
5
+ messages: z.object({ total: z.number(), today: z.number() }),
6
+ dms: z.object({ total_conversations: z.number() }),
7
+ files: z.object({ total: z.number(), storage_bytes: z.number() }),
8
+ });
9
+ export const ActivityItemSchema = z.object({
10
+ type: z.enum(['message', 'dm']),
11
+ id: z.string(),
12
+ channel_name: z.string().optional(),
13
+ conversation_id: z.string().optional(),
14
+ agent_name: z.string(),
15
+ text: z.string(),
16
+ created_at: z.string(),
17
+ });
18
+ export const WorkspaceDmConversationSchema = z.object({
19
+ id: z.string(),
20
+ type: z.string(),
21
+ participants: z.array(z.string()),
22
+ last_message: z.object({
23
+ text: z.string(),
24
+ agent_name: z.string(),
25
+ created_at: z.string(),
26
+ }).nullable(),
27
+ message_count: z.number(),
28
+ });
29
+ export const TokenRotateResponseSchema = z.object({
30
+ name: z.string(),
31
+ token: z.string(),
32
+ });
2
33
  //# sourceMappingURL=dashboard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../src/dashboard.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../src/dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,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AC,MAAM,EAAE,CAAC;IACjC,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC;QACrB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;QACtB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;KACvB,CAAC,CAAC,QAAQ,EAAE;IACb,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC"}
package/dist/dm.d.ts CHANGED
@@ -1,33 +1,92 @@
1
- export type DmType = '1:1' | 'group';
2
- export interface DmConversation {
1
+ import { z } from 'zod';
2
+ export declare const DmTypeSchema: z.ZodEnum<["1:1", "group"]>;
3
+ export type DmType = z.infer<typeof DmTypeSchema>;
4
+ export declare const DmConversationSchema: z.ZodObject<{
5
+ id: z.ZodString;
6
+ workspace_id: z.ZodString;
7
+ channel_id: z.ZodString;
8
+ dm_type: z.ZodEnum<["1:1", "group"]>;
9
+ name: z.ZodNullable<z.ZodString>;
10
+ created_at: z.ZodString;
11
+ }, "strip", z.ZodTypeAny, {
3
12
  id: string;
4
13
  workspace_id: string;
14
+ name: string | null;
15
+ created_at: string;
5
16
  channel_id: string;
6
- dm_type: DmType;
17
+ dm_type: "1:1" | "group";
18
+ }, {
19
+ id: string;
20
+ workspace_id: string;
7
21
  name: string | null;
8
22
  created_at: string;
9
- }
10
- export interface DmParticipant {
23
+ channel_id: string;
24
+ dm_type: "1:1" | "group";
25
+ }>;
26
+ export type DmConversation = z.infer<typeof DmConversationSchema>;
27
+ export declare const DmParticipantSchema: z.ZodObject<{
28
+ conversation_id: z.ZodString;
29
+ agent_id: z.ZodString;
30
+ joined_at: z.ZodString;
31
+ left_at: z.ZodNullable<z.ZodString>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ agent_id: string;
11
34
  conversation_id: string;
35
+ joined_at: string;
36
+ left_at: string | null;
37
+ }, {
12
38
  agent_id: string;
39
+ conversation_id: string;
13
40
  joined_at: string;
14
41
  left_at: string | null;
15
- }
16
- export interface SendDmRequest {
42
+ }>;
43
+ export type DmParticipant = z.infer<typeof DmParticipantSchema>;
44
+ export declare const SendDmRequestSchema: z.ZodObject<{
45
+ to: z.ZodString;
46
+ text: z.ZodString;
47
+ }, "strip", z.ZodTypeAny, {
48
+ text: string;
17
49
  to: string;
50
+ }, {
51
+ text: string;
52
+ to: string;
53
+ }>;
54
+ export type SendDmRequest = z.infer<typeof SendDmRequestSchema>;
55
+ export declare const CreateGroupDmRequestSchema: z.ZodObject<{
56
+ participants: z.ZodArray<z.ZodString, "many">;
57
+ name: z.ZodOptional<z.ZodString>;
58
+ text: z.ZodString;
59
+ }, "strip", z.ZodTypeAny, {
18
60
  text: string;
19
- }
20
- export interface CreateGroupDmRequest {
21
61
  participants: string[];
22
- name?: string;
62
+ name?: string | undefined;
63
+ }, {
23
64
  text: string;
24
- }
25
- export interface DmConversationSummary {
65
+ participants: string[];
66
+ name?: string | undefined;
67
+ }>;
68
+ export type CreateGroupDmRequest = z.infer<typeof CreateGroupDmRequestSchema>;
69
+ export declare const DmConversationSummarySchema: z.ZodObject<{
70
+ id: z.ZodString;
71
+ type: z.ZodEnum<["1:1", "group"]>;
72
+ name: z.ZodNullable<z.ZodString>;
73
+ participants: z.ZodArray<z.ZodString, "many">;
74
+ last_message: z.ZodNullable<z.ZodString>;
75
+ unread_count: z.ZodNumber;
76
+ }, "strip", z.ZodTypeAny, {
77
+ type: "1:1" | "group";
26
78
  id: string;
27
- type: DmType;
28
79
  name: string | null;
29
- participants: string[];
80
+ unread_count: number;
30
81
  last_message: string | null;
82
+ participants: string[];
83
+ }, {
84
+ type: "1:1" | "group";
85
+ id: string;
86
+ name: string | null;
31
87
  unread_count: number;
32
- }
88
+ last_message: string | null;
89
+ participants: string[];
90
+ }>;
91
+ export type DmConversationSummary = z.infer<typeof DmConversationSummarySchema>;
33
92
  //# sourceMappingURL=dm.d.ts.map
package/dist/dm.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"dm.d.ts","sourceRoot":"","sources":["../src/dm.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;AAErC,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;CACtB"}
1
+ {"version":3,"file":"dm.d.ts","sourceRoot":"","sources":["../src/dm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,YAAY,6BAA2B,CAAC;AACrD,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;EAO/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAK9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,mBAAmB;;;;;;;;;EAG9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;EAIrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;EAOtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
package/dist/dm.js CHANGED
@@ -1,2 +1,34 @@
1
- export {};
1
+ import { z } from 'zod';
2
+ export const DmTypeSchema = z.enum(['1:1', 'group']);
3
+ export const DmConversationSchema = z.object({
4
+ id: z.string(),
5
+ workspace_id: z.string(),
6
+ channel_id: z.string(),
7
+ dm_type: DmTypeSchema,
8
+ name: z.string().nullable(),
9
+ created_at: z.string(),
10
+ });
11
+ export const DmParticipantSchema = z.object({
12
+ conversation_id: z.string(),
13
+ agent_id: z.string(),
14
+ joined_at: z.string(),
15
+ left_at: z.string().nullable(),
16
+ });
17
+ export const SendDmRequestSchema = z.object({
18
+ to: z.string(),
19
+ text: z.string(),
20
+ });
21
+ export const CreateGroupDmRequestSchema = z.object({
22
+ participants: z.array(z.string()),
23
+ name: z.string().optional(),
24
+ text: z.string(),
25
+ });
26
+ export const DmConversationSummarySchema = z.object({
27
+ id: z.string(),
28
+ type: DmTypeSchema,
29
+ name: z.string().nullable(),
30
+ participants: z.array(z.string()),
31
+ last_message: z.string().nullable(),
32
+ unread_count: z.number(),
33
+ });
2
34
  //# sourceMappingURL=dm.js.map
package/dist/dm.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"dm.js","sourceRoot":"","sources":["../src/dm.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"dm.js","sourceRoot":"","sources":["../src/dm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC;AAGrD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,OAAO,EAAE,YAAY;IACrB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC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