@little-samo/samo-ai-sdk 0.1.3 → 0.1.4

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 (44) hide show
  1. package/dist/dto/entities/agents/agent.d.ts +8 -0
  2. package/dist/dto/entities/agents/agent.requests.d.ts +131 -10
  3. package/dist/dto/entities/agents/agent.requests.js +38 -1
  4. package/dist/dto/entities/agents/agent.requests.js.map +1 -1
  5. package/dist/dto/entities/gimmicks/gimmick.d.ts +5 -0
  6. package/dist/dto/entities/gimmicks/gimmick.js +3 -0
  7. package/dist/dto/entities/gimmicks/gimmick.js.map +1 -0
  8. package/dist/dto/entities/gimmicks/index.d.ts +1 -0
  9. package/dist/dto/entities/gimmicks/index.js +18 -0
  10. package/dist/dto/entities/gimmicks/index.js.map +1 -0
  11. package/dist/dto/entities/index.d.ts +1 -0
  12. package/dist/dto/entities/index.js +1 -0
  13. package/dist/dto/entities/index.js.map +1 -1
  14. package/dist/dto/entities/users/user.d.ts +4 -0
  15. package/dist/dto/entities/users/user.requests.d.ts +6 -1
  16. package/dist/dto/entities/users/user.requests.js +2 -1
  17. package/dist/dto/entities/users/user.requests.js.map +1 -1
  18. package/dist/dto/items/item.requests.d.ts +12 -2
  19. package/dist/dto/items/item.requests.js +17 -32
  20. package/dist/dto/items/item.requests.js.map +1 -1
  21. package/dist/dto/locations/index.d.ts +1 -0
  22. package/dist/dto/locations/index.js +1 -0
  23. package/dist/dto/locations/index.js.map +1 -1
  24. package/dist/dto/locations/location.d.ts +25 -2
  25. package/dist/dto/locations/location.events.d.ts +29 -9
  26. package/dist/dto/locations/location.events.js +6 -2
  27. package/dist/dto/locations/location.events.js.map +1 -1
  28. package/dist/dto/locations/location.message.d.ts +1 -0
  29. package/dist/dto/locations/location.requests.d.ts +503 -209
  30. package/dist/dto/locations/location.requests.js +132 -51
  31. package/dist/dto/locations/location.requests.js.map +1 -1
  32. package/dist/dto/locations/location.snapshot.d.ts +11 -0
  33. package/dist/dto/locations/location.snapshot.js +3 -0
  34. package/dist/dto/locations/location.snapshot.js.map +1 -0
  35. package/dist/models/entities/agents/agent.config.d.ts +4 -4
  36. package/dist/models/entities/agents/agent.config.js +23 -15
  37. package/dist/models/entities/agents/agent.config.js.map +1 -1
  38. package/dist/models/locations/location.config.d.ts +18 -15
  39. package/dist/models/locations/location.config.js +16 -12
  40. package/dist/models/locations/location.config.js.map +1 -1
  41. package/dist/models/locations/location.constants.d.ts +1 -0
  42. package/dist/models/locations/location.constants.js +1 -0
  43. package/dist/models/locations/location.constants.js.map +1 -1
  44. package/package.json +3 -3
@@ -8,4 +8,12 @@ export interface AgentPublicDto {
8
8
  }
9
9
  export interface AgentPrivateDto extends AgentPublicDto {
10
10
  config: AgentConfig | null;
11
+ credentialTypes: string[];
12
+ }
13
+ export interface AgentCostDto {
14
+ agentId: AgentId;
15
+ totalCost: number;
16
+ llmPresetCost: number;
17
+ gimmickCost?: number;
18
+ canvasCost?: number;
11
19
  }
@@ -1,16 +1,16 @@
1
1
  import { AgentConfig } from '@little-samo/samo-ai-sdk/models';
2
2
  import { z } from 'zod';
3
- import { AgentPrivateDto, AgentPublicDto } from './agent';
3
+ import { AgentCostDto, AgentPrivateDto, AgentPublicDto } from './agent';
4
4
  import { AgentPresetDto } from './agent.preset';
5
5
  export declare const AgentsPaginationQuerySchema: z.ZodObject<{
6
6
  page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
7
7
  limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
8
8
  }, "strip", z.ZodTypeAny, {
9
- limit: number;
10
9
  page: number;
10
+ limit: number;
11
11
  }, {
12
- limit?: number | undefined;
13
12
  page?: number | undefined;
13
+ limit?: number | undefined;
14
14
  }>;
15
15
  export type AgentsPaginationQueryDto = z.infer<typeof AgentsPaginationQuerySchema>;
16
16
  export interface AgentsPaginatedResponseDto {
@@ -49,7 +49,7 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
49
49
  }, {
50
50
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
51
51
  }>>;
52
- llmPreset: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"gemini-low">, z.ZodLiteral<"gemini-medium">, z.ZodLiteral<"gemini-high">, z.ZodLiteral<"openai-low">, z.ZodLiteral<"openai-medium">, z.ZodLiteral<"anthropic-low">, z.ZodLiteral<"anthropic-medium">, z.ZodLiteral<"anthropic-high">, z.ZodLiteral<"deepseek-low">, z.ZodLiteral<"deepseek-medium">]>>;
52
+ llmPreset: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"gemini-low">, z.ZodLiteral<"gemini-medium">, z.ZodLiteral<"openai-low">, z.ZodLiteral<"openai-medium">]>>;
53
53
  languages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
54
54
  timeZone: z.ZodOptional<z.ZodString>;
55
55
  greeting: z.ZodOptional<z.ZodString>;
@@ -63,7 +63,7 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
63
63
  core?: {
64
64
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
65
65
  } | undefined;
66
- llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "anthropic-low" | "anthropic-medium" | "anthropic-high" | "deepseek-low" | "deepseek-medium" | undefined;
66
+ llmPreset?: "gemini-low" | "gemini-medium" | "openai-low" | "openai-medium" | undefined;
67
67
  languages?: string[] | undefined;
68
68
  timeZone?: string | undefined;
69
69
  greeting?: string | undefined;
@@ -77,7 +77,7 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
77
77
  core?: {
78
78
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
79
79
  } | undefined;
80
- llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "anthropic-low" | "anthropic-medium" | "anthropic-high" | "deepseek-low" | "deepseek-medium" | undefined;
80
+ llmPreset?: "gemini-low" | "gemini-medium" | "openai-low" | "openai-medium" | undefined;
81
81
  languages?: string[] | undefined;
82
82
  timeZone?: string | undefined;
83
83
  greeting?: string | undefined;
@@ -94,7 +94,7 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
94
94
  core?: {
95
95
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
96
96
  } | undefined;
97
- llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "anthropic-low" | "anthropic-medium" | "anthropic-high" | "deepseek-low" | "deepseek-medium" | undefined;
97
+ llmPreset?: "gemini-low" | "gemini-medium" | "openai-low" | "openai-medium" | undefined;
98
98
  languages?: string[] | undefined;
99
99
  timeZone?: string | undefined;
100
100
  greeting?: string | undefined;
@@ -111,7 +111,7 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
111
111
  core?: {
112
112
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
113
113
  } | undefined;
114
- llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | "anthropic-low" | "anthropic-medium" | "anthropic-high" | "deepseek-low" | "deepseek-medium" | undefined;
114
+ llmPreset?: "gemini-low" | "gemini-medium" | "openai-low" | "openai-medium" | undefined;
115
115
  languages?: string[] | undefined;
116
116
  timeZone?: string | undefined;
117
117
  greeting?: string | undefined;
@@ -122,15 +122,85 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
122
122
  }>;
123
123
  export type AgentUpdateConfigDto = z.infer<typeof AgentUpdateConfigSchema>;
124
124
  export type AgentUpdateConfigResponseDto = Partial<AgentConfig>;
125
+ export declare const AgentUpdateCredentialSchema: z.ZodObject<{
126
+ agentId: z.ZodBigInt;
127
+ credential: z.ZodUnion<[z.ZodObject<{
128
+ type: z.ZodLiteral<"x_twitter">;
129
+ email: z.ZodString;
130
+ password: z.ZodString;
131
+ username: z.ZodString;
132
+ }, "strip", z.ZodTypeAny, {
133
+ type: "x_twitter";
134
+ email: string;
135
+ password: string;
136
+ username: string;
137
+ }, {
138
+ type: "x_twitter";
139
+ email: string;
140
+ password: string;
141
+ username: string;
142
+ }>, z.ZodObject<{
143
+ type: z.ZodLiteral<"notion">;
144
+ token: z.ZodString;
145
+ }, "strip", z.ZodTypeAny, {
146
+ type: "notion";
147
+ token: string;
148
+ }, {
149
+ type: "notion";
150
+ token: string;
151
+ }>]>;
152
+ }, "strip", z.ZodTypeAny, {
153
+ agentId: bigint;
154
+ credential: {
155
+ type: "x_twitter";
156
+ email: string;
157
+ password: string;
158
+ username: string;
159
+ } | {
160
+ type: "notion";
161
+ token: string;
162
+ };
163
+ }, {
164
+ agentId: bigint;
165
+ credential: {
166
+ type: "x_twitter";
167
+ email: string;
168
+ password: string;
169
+ username: string;
170
+ } | {
171
+ type: "notion";
172
+ token: string;
173
+ };
174
+ }>;
175
+ export type AgentUpdateCredentialDto = z.infer<typeof AgentUpdateCredentialSchema>;
176
+ export interface AgentUpdateCredentialResponseDto {
177
+ success: boolean;
178
+ error?: string;
179
+ }
180
+ export declare const AgentDeleteCredentialSchema: z.ZodObject<{
181
+ agentId: z.ZodBigInt;
182
+ credentialType: z.ZodString;
183
+ }, "strip", z.ZodTypeAny, {
184
+ agentId: bigint;
185
+ credentialType: string;
186
+ }, {
187
+ agentId: bigint;
188
+ credentialType: string;
189
+ }>;
190
+ export type AgentDeleteCredentialDto = z.infer<typeof AgentDeleteCredentialSchema>;
191
+ export interface AgentDeleteCredentialResponseDto {
192
+ success: boolean;
193
+ error?: string;
194
+ }
125
195
  export declare const AgentPresetsPaginationQuerySchema: z.ZodObject<{
126
196
  page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
127
197
  limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
128
198
  }, "strip", z.ZodTypeAny, {
129
- limit: number;
130
199
  page: number;
200
+ limit: number;
131
201
  }, {
132
- limit?: number | undefined;
133
202
  page?: number | undefined;
203
+ limit?: number | undefined;
134
204
  }>;
135
205
  export type AgentPresetsPaginationQueryDto = z.infer<typeof AgentPresetsPaginationQuerySchema>;
136
206
  export interface AgentPresetsPaginatedResponseDto {
@@ -142,6 +212,23 @@ export interface AgentPresetsPaginatedResponseDto {
142
212
  totalPages: number;
143
213
  };
144
214
  }
215
+ export declare const CreateAgentSchema: z.ZodObject<{
216
+ name: z.ZodString;
217
+ role: z.ZodString;
218
+ avatar: z.ZodUnion<[z.ZodLiteral<string>, z.ZodLiteral<string>, ...z.ZodLiteral<string>[]]>;
219
+ }, "strip", z.ZodTypeAny, {
220
+ role: string;
221
+ name: string;
222
+ avatar: string;
223
+ }, {
224
+ role: string;
225
+ name: string;
226
+ avatar: string;
227
+ }>;
228
+ export type CreateAgentDto = z.infer<typeof CreateAgentSchema>;
229
+ export interface CreateAgentResponseDto {
230
+ agent: AgentPrivateDto;
231
+ }
145
232
  export declare const CreateAgentFromPresetSchema: z.ZodObject<{
146
233
  presetId: z.ZodBigInt;
147
234
  }, "strip", z.ZodTypeAny, {
@@ -166,3 +253,37 @@ export type GetHelperAgentDto = z.infer<typeof GetHelperAgentSchema>;
166
253
  export interface GetHelperAgentResponseDto {
167
254
  agent: AgentPrivateDto;
168
255
  }
256
+ export declare const GetAgentCostParamsSchema: z.ZodObject<{
257
+ agentId: z.ZodBigInt;
258
+ }, "strip", z.ZodTypeAny, {
259
+ agentId: bigint;
260
+ }, {
261
+ agentId: bigint;
262
+ }>;
263
+ export type GetAgentCostParamsDto = z.infer<typeof GetAgentCostParamsSchema>;
264
+ export interface GetAgentCostResponseDto {
265
+ cost: AgentCostDto;
266
+ }
267
+ export declare const UploadAgentAvatarParamsSchema: z.ZodObject<{
268
+ agentId: z.ZodBigInt;
269
+ }, "strip", z.ZodTypeAny, {
270
+ agentId: bigint;
271
+ }, {
272
+ agentId: bigint;
273
+ }>;
274
+ export type UploadAgentAvatarParamsDto = z.infer<typeof UploadAgentAvatarParamsSchema>;
275
+ export interface UploadAgentAvatarResponseDto {
276
+ avatarUrl: string;
277
+ }
278
+ export declare const DeleteAgentParamsSchema: z.ZodObject<{
279
+ agentId: z.ZodBigInt;
280
+ }, "strip", z.ZodTypeAny, {
281
+ agentId: bigint;
282
+ }, {
283
+ agentId: bigint;
284
+ }>;
285
+ export type DeleteAgentParamsDto = z.infer<typeof DeleteAgentParamsSchema>;
286
+ export interface DeleteAgentResponseDto {
287
+ success: boolean;
288
+ error?: string;
289
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetHelperAgentSchema = exports.CreateAgentFromPresetSchema = exports.AgentPresetsPaginationQuerySchema = exports.AgentUpdateConfigSchema = exports.GetAgentsByIdsQuerySchema = exports.AgentsPaginationQuerySchema = void 0;
3
+ exports.DeleteAgentParamsSchema = exports.UploadAgentAvatarParamsSchema = exports.GetAgentCostParamsSchema = exports.GetHelperAgentSchema = exports.CreateAgentFromPresetSchema = exports.CreateAgentSchema = exports.AgentPresetsPaginationQuerySchema = exports.AgentDeleteCredentialSchema = exports.AgentUpdateCredentialSchema = exports.AgentUpdateConfigSchema = exports.GetAgentsByIdsQuerySchema = exports.AgentsPaginationQuerySchema = void 0;
4
4
  const models_1 = require("@little-samo/samo-ai-sdk/models");
5
5
  const zod_1 = require("zod");
6
6
  exports.AgentsPaginationQuerySchema = zod_1.z.object({
@@ -23,14 +23,51 @@ exports.AgentUpdateConfigSchema = zod_1.z.object({
23
23
  'For the character field: properties are merged at the individual level rather than replacing entire categories. ' +
24
24
  'Empty string values ("") will delete the corresponding property. If a category becomes empty after deletions, the category itself is removed.'),
25
25
  });
26
+ exports.AgentUpdateCredentialSchema = zod_1.z.object({
27
+ agentId: zod_1.z.coerce.bigint(),
28
+ credential: zod_1.z.union([
29
+ zod_1.z.object({
30
+ type: zod_1.z.literal('x_twitter'),
31
+ email: zod_1.z.string().max(255),
32
+ password: zod_1.z.string().max(255),
33
+ username: zod_1.z.string().max(255),
34
+ }),
35
+ zod_1.z.object({
36
+ type: zod_1.z.literal('notion'),
37
+ token: zod_1.z.string().max(255),
38
+ }),
39
+ ]),
40
+ });
41
+ exports.AgentDeleteCredentialSchema = zod_1.z.object({
42
+ agentId: zod_1.z.coerce.bigint(),
43
+ credentialType: zod_1.z.string(),
44
+ });
26
45
  exports.AgentPresetsPaginationQuerySchema = zod_1.z.object({
27
46
  page: zod_1.z.coerce.number().int().min(1).optional().default(1),
28
47
  limit: zod_1.z.coerce.number().int().min(1).max(100).optional().default(20),
29
48
  });
49
+ exports.CreateAgentSchema = zod_1.z.object({
50
+ name: zod_1.z.string().max(64),
51
+ role: zod_1.z.string().max(500),
52
+ avatar: zod_1.z
53
+ .union([
54
+ ...Object.entries(models_1.PREDEFINED_AVATARS).map(([key, description]) => zod_1.z.literal(key).describe(description)),
55
+ ])
56
+ .describe('Visual representation identifier for the agent.'),
57
+ });
30
58
  exports.CreateAgentFromPresetSchema = zod_1.z.object({
31
59
  presetId: zod_1.z.coerce.bigint(),
32
60
  });
33
61
  exports.GetHelperAgentSchema = zod_1.z.object({
34
62
  helperType: zod_1.z.nativeEnum(models_1.AgentHelperType),
35
63
  });
64
+ exports.GetAgentCostParamsSchema = zod_1.z.object({
65
+ agentId: zod_1.z.coerce.bigint(),
66
+ });
67
+ exports.UploadAgentAvatarParamsSchema = zod_1.z.object({
68
+ agentId: zod_1.z.coerce.bigint(),
69
+ });
70
+ exports.DeleteAgentParamsSchema = zod_1.z.object({
71
+ agentId: zod_1.z.coerce.bigint(),
72
+ });
36
73
  //# sourceMappingURL=agent.requests.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent.requests.js","sourceRoot":"","sources":["../../../../src/dto/entities/agents/agent.requests.ts"],"names":[],"mappings":";;;AAAA,4DAIyC;AACzC,6BAAwB;AAKX,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,IAAI,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1D,KAAK,EAA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AC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE;CAC3B,CAAC,CAAC;AASU,QAAA,6BAA6B,GAAG,OAAC,CAAC,MAAM,CAAC;IACpD,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE;CAC3B,CAAC,CAAC;AAWU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,MAAM,EAAE;CAC3B,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export interface GimmickCostDto {
2
+ core: string;
3
+ executionCost: number;
4
+ agentCost: number;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=gimmick.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gimmick.js","sourceRoot":"","sources":["../../../../src/dto/entities/gimmicks/gimmick.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export * from './gimmick';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./gimmick"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/entities/gimmicks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B"}
@@ -1,2 +1,3 @@
1
1
  export * from './agents';
2
+ export * from './gimmicks';
2
3
  export * from './users';
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./agents"), exports);
18
+ __exportStar(require("./gimmicks"), exports);
18
19
  __exportStar(require("./users"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,6CAA2B;AAC3B,0CAAwB"}
@@ -9,4 +9,8 @@ export interface UserPublicDto {
9
9
  }
10
10
  export interface UserPrivateDto extends UserPublicDto {
11
11
  email: string | null;
12
+ defaultCredits: number;
13
+ maxAgents: number;
14
+ maxLocationAgents: number;
15
+ maxAgentLocations: number;
12
16
  }
@@ -1,5 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { UserPublicDto } from './user';
2
+ import { UserPrivateDto, UserPublicDto } from './user';
3
+ export declare const GetCurrentUserQuerySchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
4
+ export type GetCurrentUserQueryDto = z.infer<typeof GetCurrentUserQuerySchema>;
5
+ export interface GetCurrentUserResponseDto {
6
+ user: UserPrivateDto;
7
+ }
3
8
  export declare const GetUsersByIdsQuerySchema: z.ZodObject<{
4
9
  userIds: z.ZodEffects<z.ZodEffects<z.ZodString, bigint[], string>, bigint[], string>;
5
10
  }, "strip", z.ZodTypeAny, {
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetUsersByIdsQuerySchema = void 0;
3
+ exports.GetUsersByIdsQuerySchema = exports.GetCurrentUserQuerySchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ exports.GetCurrentUserQuerySchema = zod_1.z.object({});
5
6
  exports.GetUsersByIdsQuerySchema = zod_1.z.object({
6
7
  userIds: zod_1.z
7
8
  .string()
@@ -1 +1 @@
1
- {"version":3,"file":"user.requests.js","sourceRoot":"","sources":["../../../../src/dto/entities/users/user.requests.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAIX,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,OAAC;SACP,MAAM,EAAE;SACR,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;SACjE,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,IAAI,EAAE,EAAE;QACnD,OAAO,EAAE,oCAAoC;KAC9C,CAAC;CACL,CAAC,CAAC"}
1
+ {"version":3,"file":"user.requests.js","sourceRoot":"","sources":["../../../../src/dto/entities/users/user.requests.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AASX,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AASzC,QAAA,wBAAwB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,OAAC;SACP,MAAM,EAAE;SACR,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;SACjE,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,CAAC,MAAM,IAAI,EAAE,EAAE;QACnD,OAAO,EAAE,oCAAoC;KAC9C,CAAC;CACL,CAAC,CAAC"}
@@ -1,3 +1,13 @@
1
- export declare class ItemQueryDto {
2
- itemDataIds?: number[];
1
+ import { z } from 'zod';
2
+ import { ItemDto } from './item';
3
+ export declare const GetUserItemsQuerySchema: z.ZodObject<{
4
+ itemDataIds: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodString>, number[] | undefined, string | undefined>, number[] | undefined, string | undefined>;
5
+ }, "strip", z.ZodTypeAny, {
6
+ itemDataIds?: number[] | undefined;
7
+ }, {
8
+ itemDataIds?: string | undefined;
9
+ }>;
10
+ export type GetUserItemsQueryDto = z.infer<typeof GetUserItemsQuerySchema>;
11
+ export interface GetUserItemsResponseDto {
12
+ items: ItemDto[];
3
13
  }
@@ -1,36 +1,21 @@
1
1
  "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ItemQueryDto = void 0;
13
- const class_transformer_1 = require("class-transformer");
14
- const class_validator_1 = require("class-validator");
15
- class ItemQueryDto {
16
- }
17
- exports.ItemQueryDto = ItemQueryDto;
18
- __decorate([
19
- (0, class_validator_1.IsOptional)(),
20
- (0, class_transformer_1.Transform)(({ value }) => {
21
- if (typeof value === 'string') {
22
- return value
23
- .split(',')
24
- .map((id) => parseInt(id.trim()))
25
- .filter((id) => !isNaN(id));
26
- }
27
- if (Array.isArray(value)) {
28
- return value.map((id) => parseInt(id)).filter((id) => !isNaN(id));
29
- }
30
- return [];
3
+ exports.GetUserItemsQuerySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.GetUserItemsQuerySchema = zod_1.z.object({
6
+ itemDataIds: zod_1.z
7
+ .string()
8
+ .optional()
9
+ .transform((val) => {
10
+ if (!val)
11
+ return undefined;
12
+ return val
13
+ .split(',')
14
+ .map((id) => zod_1.z.coerce.number().parse(id.trim()))
15
+ .filter((id) => !isNaN(id));
16
+ })
17
+ .refine((arr) => !arr || arr.length <= 50, {
18
+ message: 'itemDataIds must contain at most 50 item data IDs',
31
19
  }),
32
- (0, class_validator_1.IsArray)(),
33
- (0, class_validator_1.IsNumber)({}, { each: true }),
34
- __metadata("design:type", Array)
35
- ], ItemQueryDto.prototype, "itemDataIds", void 0);
20
+ });
36
21
  //# sourceMappingURL=item.requests.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"item.requests.js","sourceRoot":"","sources":["../../../src/dto/items/item.requests.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA8C;AAC9C,qDAAgE;AAEhE,MAAa,YAAY;CAiBxB;AAjBD,oCAiBC;AADQ;IAfN,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAgC,EAAE,EAAE;QACrD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC9B,OAAO,KAAK;iBACT,KAAK,CAAC,GAAG,CAAC;iBACV,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,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AC7D,CAAC;CACL,CAAC,CAAC"}
@@ -3,4 +3,5 @@ export * from './location.message';
3
3
  export * from './location.preset';
4
4
  export * from './location.requests';
5
5
  export * from './location.scheduled-message';
6
+ export * from './location.snapshot';
6
7
  export * from './location';
@@ -19,5 +19,6 @@ __exportStar(require("./location.message"), exports);
19
19
  __exportStar(require("./location.preset"), exports);
20
20
  __exportStar(require("./location.requests"), exports);
21
21
  __exportStar(require("./location.scheduled-message"), exports);
22
+ __exportStar(require("./location.snapshot"), exports);
22
23
  __exportStar(require("./location"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/locations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,qDAAmC;AACnC,oDAAkC;AAClC,sDAAoC;AACpC,+DAA6C;AAC7C,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dto/locations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,qDAAmC;AACnC,oDAAkC;AAClC,sDAAoC;AACpC,+DAA6C;AAC7C,sDAAoC;AACpC,6CAA2B"}
@@ -1,17 +1,24 @@
1
- import { AgentId, LocationId, UserId } from '@little-samo/samo-ai';
1
+ import { AgentId, EntityId, EntityType, LocationId, UserId } from '@little-samo/samo-ai';
2
2
  import { LocationConfig, LocationEnvironment, LocationPlatform, LocationType } from '@little-samo/samo-ai-sdk/models';
3
- import { LocationMessageDto } from './location.message';
3
+ import type { LocationMessageDto } from './location.message';
4
+ import type { AgentCostDto } from '../entities/agents/agent';
5
+ import type { GimmickCostDto } from '../entities/gimmicks/gimmick';
4
6
  export interface LocationPublicDto {
5
7
  id: LocationId;
6
8
  name: string;
7
9
  platform: LocationPlatform;
8
10
  type: LocationType;
9
11
  environment: LocationEnvironment;
12
+ param1: bigint;
13
+ param2: bigint;
14
+ param3: bigint;
15
+ param4: bigint;
10
16
  createdAt: Date;
11
17
  updatedAt: Date;
12
18
  }
13
19
  export interface LocationPrivateDto extends LocationPublicDto {
14
20
  config: LocationConfig | null;
21
+ credentialTypes: string[];
15
22
  }
16
23
  export interface LocationListItemDto extends LocationPublicDto {
17
24
  lastMessage: LocationMessageDto | null;
@@ -22,3 +29,19 @@ export interface LocationListItemDto extends LocationPublicDto {
22
29
  pauseUpdateUntil: Date | null;
23
30
  pauseUpdateReason: string | null;
24
31
  }
32
+ export interface LocationCanvasDto {
33
+ lastModifierEntityType: EntityType;
34
+ lastModifierEntityId: EntityId;
35
+ text: string;
36
+ updatedAt: Date;
37
+ }
38
+ export interface LocationContentDto {
39
+ id: LocationId;
40
+ canvases: Record<string, LocationCanvasDto>;
41
+ rendering: string | null;
42
+ }
43
+ export interface LocationCostDto {
44
+ locationId: LocationId;
45
+ agents: AgentCostDto[];
46
+ gimmicks: GimmickCostDto[];
47
+ }
@@ -1,17 +1,21 @@
1
1
  import { AgentId, GimmickId, LocationId, UserId } from '@little-samo/samo-ai';
2
- import { UserPublicDto } from '../entities';
2
+ import { LocationCanvasDto } from './location';
3
3
  import { LocationMessageDto } from './location.message';
4
4
  export declare const LocationEventType: {
5
+ readonly AgentJoined: "AgentJoined";
6
+ readonly AgentLeft: "AgentLeft";
5
7
  readonly AgentExecuting: "AgentExecuting";
6
8
  readonly AgentExecuted: "AgentExecuted";
7
- readonly UserJoin: "UserJoin";
8
- readonly UserLeave: "UserLeave";
9
+ readonly UserJoined: "UserJoined";
10
+ readonly UserLeft: "UserLeft";
9
11
  readonly GimmickExecuting: "GimmickExecuting";
10
12
  readonly GimmickExecuted: "GimmickExecuted";
11
13
  readonly AddMessage: "AddMessage";
12
14
  readonly MessageProcessed: "MessageProcessed";
13
15
  readonly RenderingUpdated: "RenderingUpdated";
16
+ readonly CanvasUpdated: "CanvasUpdated";
14
17
  readonly PauseUpdateUntilUpdated: "PauseUpdateUntilUpdated";
18
+ readonly LocationUpdated: "LocationUpdated";
15
19
  };
16
20
  export type LocationEventType = (typeof LocationEventType)[keyof typeof LocationEventType];
17
21
  export interface LocationEventDtoBase {
@@ -29,12 +33,20 @@ export interface LocationAgentExecutedEventDto extends LocationEventDtoBase {
29
33
  success: boolean;
30
34
  error?: string;
31
35
  }
32
- export interface LocationUserJoinEventDto extends LocationEventDtoBase {
33
- type: typeof LocationEventType.UserJoin;
34
- user: UserPublicDto;
36
+ export interface LocationAgentJoinedEventDto extends LocationEventDtoBase {
37
+ type: typeof LocationEventType.AgentJoined;
38
+ agentId: AgentId;
39
+ }
40
+ export interface LocationAgentLeftEventDto extends LocationEventDtoBase {
41
+ type: typeof LocationEventType.AgentLeft;
42
+ agentId: AgentId;
35
43
  }
36
- export interface LocationUserLeaveEventDto extends LocationEventDtoBase {
37
- type: typeof LocationEventType.UserLeave;
44
+ export interface LocationUserJoinedEventDto extends LocationEventDtoBase {
45
+ type: typeof LocationEventType.UserJoined;
46
+ userId: UserId;
47
+ }
48
+ export interface LocationUserLeftEventDto extends LocationEventDtoBase {
49
+ type: typeof LocationEventType.UserLeft;
38
50
  userId: UserId;
39
51
  }
40
52
  export interface LocationGimmickExecutingEventDto extends LocationEventDtoBase {
@@ -59,9 +71,17 @@ export interface LocationRenderingUpdatedEventDto extends LocationEventDtoBase {
59
71
  type: typeof LocationEventType.RenderingUpdated;
60
72
  rendering: string | null;
61
73
  }
74
+ export interface LocationCanvasUpdatedEventDto extends LocationEventDtoBase {
75
+ type: typeof LocationEventType.CanvasUpdated;
76
+ name: string;
77
+ canvas: LocationCanvasDto;
78
+ }
62
79
  export interface LocationPauseUpdateUntilUpdatedEventDto extends LocationEventDtoBase {
63
80
  type: typeof LocationEventType.PauseUpdateUntilUpdated;
64
81
  pauseUpdateUntil: Date | null;
65
82
  pauseUpdateReason: string | null;
66
83
  }
67
- export type LocationEventDto = LocationAgentExecutingEventDto | LocationAgentExecutedEventDto | LocationUserJoinEventDto | LocationUserLeaveEventDto | LocationGimmickExecutingEventDto | LocationGimmickExecutedEventDto | LocationAddMessageEventDto | LocationMessageProcessedEventDto | LocationRenderingUpdatedEventDto | LocationPauseUpdateUntilUpdatedEventDto;
84
+ export interface LocationUpdatedEventDto extends LocationEventDtoBase {
85
+ type: typeof LocationEventType.LocationUpdated;
86
+ }
87
+ export type LocationEventDto = LocationAgentExecutingEventDto | LocationAgentExecutedEventDto | LocationAgentJoinedEventDto | LocationAgentLeftEventDto | LocationUserJoinedEventDto | LocationUserLeftEventDto | LocationGimmickExecutingEventDto | LocationGimmickExecutedEventDto | LocationAddMessageEventDto | LocationMessageProcessedEventDto | LocationRenderingUpdatedEventDto | LocationCanvasUpdatedEventDto | LocationPauseUpdateUntilUpdatedEventDto | LocationUpdatedEventDto;
@@ -2,15 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LocationEventType = void 0;
4
4
  exports.LocationEventType = {
5
+ AgentJoined: 'AgentJoined',
6
+ AgentLeft: 'AgentLeft',
5
7
  AgentExecuting: 'AgentExecuting',
6
8
  AgentExecuted: 'AgentExecuted',
7
- UserJoin: 'UserJoin',
8
- UserLeave: 'UserLeave',
9
+ UserJoined: 'UserJoined',
10
+ UserLeft: 'UserLeft',
9
11
  GimmickExecuting: 'GimmickExecuting',
10
12
  GimmickExecuted: 'GimmickExecuted',
11
13
  AddMessage: 'AddMessage',
12
14
  MessageProcessed: 'MessageProcessed',
13
15
  RenderingUpdated: 'RenderingUpdated',
16
+ CanvasUpdated: 'CanvasUpdated',
14
17
  PauseUpdateUntilUpdated: 'PauseUpdateUntilUpdated',
18
+ LocationUpdated: 'LocationUpdated',
15
19
  };
16
20
  //# sourceMappingURL=location.events.js.map