@little-samo/samo-ai-sdk 0.2.0 → 0.2.1-rv1

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 (32) hide show
  1. package/dist/dto/entities/agents/agent.requests.d.ts +24 -24
  2. package/dist/dto/entities/gimmicks/gimmick.config.d.ts +1 -1
  3. package/dist/dto/entities/users/user.d.ts +3 -0
  4. package/dist/dto/entities/users/user.events.d.ts +7 -2
  5. package/dist/dto/entities/users/user.events.js +1 -0
  6. package/dist/dto/entities/users/user.events.js.map +1 -1
  7. package/dist/dto/entities/users/user.requests.d.ts +39 -0
  8. package/dist/dto/entities/users/user.requests.js +22 -1
  9. package/dist/dto/entities/users/user.requests.js.map +1 -1
  10. package/dist/dto/index.d.ts +1 -0
  11. package/dist/dto/index.js +1 -0
  12. package/dist/dto/index.js.map +1 -1
  13. package/dist/dto/items/item.events.d.ts +2 -1
  14. package/dist/dto/items/item.events.js.map +1 -1
  15. package/dist/dto/locations/location.d.ts +2 -0
  16. package/dist/dto/locations/location.preset.d.ts +57 -8
  17. package/dist/dto/locations/location.preset.js +19 -0
  18. package/dist/dto/locations/location.preset.js.map +1 -1
  19. package/dist/dto/locations/location.requests.d.ts +305 -43
  20. package/dist/dto/locations/location.requests.js +56 -7
  21. package/dist/dto/locations/location.requests.js.map +1 -1
  22. package/dist/dto/rankings/index.d.ts +1 -0
  23. package/dist/dto/rankings/index.js +18 -0
  24. package/dist/dto/rankings/index.js.map +1 -0
  25. package/dist/dto/rankings/ranking.d.ts +14 -0
  26. package/dist/dto/rankings/ranking.js +3 -0
  27. package/dist/dto/rankings/ranking.js.map +1 -0
  28. package/dist/models/entities/agents/agent.config.js +2 -2
  29. package/dist/models/entities/agents/agent.config.js.map +1 -1
  30. package/dist/models/locations/location.config.d.ts +12 -12
  31. package/dist/models/locations/location.config.js +1 -1
  32. package/package.json +3 -3
@@ -146,11 +146,12 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
146
146
  rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
147
147
  }, "strict", z.ZodTypeAny, {
148
148
  name?: string | undefined;
149
- avatar?: string | undefined;
150
- appearance?: string | undefined;
151
149
  core?: {
152
150
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
153
151
  } | undefined;
152
+ rules?: string[] | undefined;
153
+ appearance?: string | undefined;
154
+ avatar?: string | undefined;
154
155
  llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
155
156
  languages?: string[] | undefined;
156
157
  timeZone?: string | undefined;
@@ -176,14 +177,14 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
176
177
  mbti?: "INTJ" | "INTP" | "ENTJ" | "ENTP" | "INFJ" | "INFP" | "ENFJ" | "ENFP" | "ISTJ" | "ISFJ" | "ESTJ" | "ESFJ" | "ISTP" | "ISFP" | "ESTP" | "ESFP" | undefined;
177
178
  } | undefined;
178
179
  } | undefined;
179
- rules?: string[] | undefined;
180
180
  }, {
181
181
  name?: string | undefined;
182
- avatar?: string | undefined;
183
- appearance?: string | undefined;
184
182
  core?: {
185
183
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
186
184
  } | undefined;
185
+ rules?: string[] | undefined;
186
+ appearance?: string | undefined;
187
+ avatar?: string | undefined;
187
188
  llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
188
189
  languages?: string[] | undefined;
189
190
  timeZone?: string | undefined;
@@ -209,16 +210,16 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
209
210
  mbti?: "INTJ" | "INTP" | "ENTJ" | "ENTP" | "INFJ" | "INFP" | "ENFJ" | "ENFP" | "ISTJ" | "ISFJ" | "ESTJ" | "ESFJ" | "ISTP" | "ISFP" | "ESTP" | "ESFP" | undefined;
210
211
  } | undefined;
211
212
  } | undefined;
212
- rules?: string[] | undefined;
213
213
  }>;
214
214
  }, "strip", z.ZodTypeAny, {
215
215
  config: {
216
216
  name?: string | undefined;
217
- avatar?: string | undefined;
218
- appearance?: string | undefined;
219
217
  core?: {
220
218
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
221
219
  } | undefined;
220
+ rules?: string[] | undefined;
221
+ appearance?: string | undefined;
222
+ avatar?: string | undefined;
222
223
  llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
223
224
  languages?: string[] | undefined;
224
225
  timeZone?: string | undefined;
@@ -244,17 +245,17 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
244
245
  mbti?: "INTJ" | "INTP" | "ENTJ" | "ENTP" | "INFJ" | "INFP" | "ENFJ" | "ENFP" | "ISTJ" | "ISFJ" | "ESTJ" | "ESFJ" | "ISTP" | "ISFP" | "ESTP" | "ESFP" | undefined;
245
246
  } | undefined;
246
247
  } | undefined;
247
- rules?: string[] | undefined;
248
248
  };
249
249
  agentId: bigint;
250
250
  }, {
251
251
  config: {
252
252
  name?: string | undefined;
253
- avatar?: string | undefined;
254
- appearance?: string | undefined;
255
253
  core?: {
256
254
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
257
255
  } | undefined;
256
+ rules?: string[] | undefined;
257
+ appearance?: string | undefined;
258
+ avatar?: string | undefined;
258
259
  llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
259
260
  languages?: string[] | undefined;
260
261
  timeZone?: string | undefined;
@@ -280,7 +281,6 @@ export declare const AgentUpdateConfigSchema: z.ZodObject<{
280
281
  mbti?: "INTJ" | "INTP" | "ENTJ" | "ENTP" | "INFJ" | "INFP" | "ENFJ" | "ENFP" | "ISTJ" | "ISFJ" | "ESTJ" | "ESFJ" | "ISTP" | "ISFP" | "ESTP" | "ESFP" | undefined;
281
282
  } | undefined;
282
283
  } | undefined;
283
- rules?: string[] | undefined;
284
284
  };
285
285
  agentId: bigint;
286
286
  }>;
@@ -474,11 +474,12 @@ export declare const CreateAgentSchema: z.ZodObject<{
474
474
  rules: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
475
475
  }, "strict", z.ZodTypeAny, {
476
476
  name?: string | undefined;
477
- avatar?: string | undefined;
478
- appearance?: string | undefined;
479
477
  core?: {
480
478
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
481
479
  } | undefined;
480
+ rules?: string[] | undefined;
481
+ appearance?: string | undefined;
482
+ avatar?: string | undefined;
482
483
  llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
483
484
  languages?: string[] | undefined;
484
485
  timeZone?: string | undefined;
@@ -504,14 +505,14 @@ export declare const CreateAgentSchema: z.ZodObject<{
504
505
  mbti?: "INTJ" | "INTP" | "ENTJ" | "ENTP" | "INFJ" | "INFP" | "ENFJ" | "ENFP" | "ISTJ" | "ISFJ" | "ESTJ" | "ESFJ" | "ISTP" | "ISFP" | "ESTP" | "ESFP" | undefined;
505
506
  } | undefined;
506
507
  } | undefined;
507
- rules?: string[] | undefined;
508
508
  }, {
509
509
  name?: string | undefined;
510
- avatar?: string | undefined;
511
- appearance?: string | undefined;
512
510
  core?: {
513
511
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
514
512
  } | undefined;
513
+ rules?: string[] | undefined;
514
+ appearance?: string | undefined;
515
+ avatar?: string | undefined;
515
516
  llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
516
517
  languages?: string[] | undefined;
517
518
  timeZone?: string | undefined;
@@ -537,16 +538,16 @@ export declare const CreateAgentSchema: z.ZodObject<{
537
538
  mbti?: "INTJ" | "INTP" | "ENTJ" | "ENTP" | "INFJ" | "INFP" | "ENFJ" | "ENFP" | "ISTJ" | "ISFJ" | "ESTJ" | "ESFJ" | "ISTP" | "ISFP" | "ESTP" | "ESFP" | undefined;
538
539
  } | undefined;
539
540
  } | undefined;
540
- rules?: string[] | undefined;
541
541
  }>;
542
542
  }, "strip", z.ZodTypeAny, {
543
543
  config: {
544
544
  name?: string | undefined;
545
- avatar?: string | undefined;
546
- appearance?: string | undefined;
547
545
  core?: {
548
546
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
549
547
  } | undefined;
548
+ rules?: string[] | undefined;
549
+ appearance?: string | undefined;
550
+ avatar?: string | undefined;
550
551
  llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
551
552
  languages?: string[] | undefined;
552
553
  timeZone?: string | undefined;
@@ -572,16 +573,16 @@ export declare const CreateAgentSchema: z.ZodObject<{
572
573
  mbti?: "INTJ" | "INTP" | "ENTJ" | "ENTP" | "INFJ" | "INFP" | "ENFJ" | "ENFP" | "ISTJ" | "ISFJ" | "ESTJ" | "ESFJ" | "ISTP" | "ISFP" | "ESTP" | "ESFP" | undefined;
573
574
  } | undefined;
574
575
  } | undefined;
575
- rules?: string[] | undefined;
576
576
  };
577
577
  }, {
578
578
  config: {
579
579
  name?: string | undefined;
580
- avatar?: string | undefined;
581
- appearance?: string | undefined;
582
580
  core?: {
583
581
  name: "evaluate_and_actions" | "execute_actions" | "response_every_message";
584
582
  } | undefined;
583
+ rules?: string[] | undefined;
584
+ appearance?: string | undefined;
585
+ avatar?: string | undefined;
585
586
  llmPreset?: "gemini-low" | "gemini-medium" | "gemini-high" | "openai-low" | "openai-medium" | undefined;
586
587
  languages?: string[] | undefined;
587
588
  timeZone?: string | undefined;
@@ -607,7 +608,6 @@ export declare const CreateAgentSchema: z.ZodObject<{
607
608
  mbti?: "INTJ" | "INTP" | "ENTJ" | "ENTP" | "INFJ" | "INFP" | "ENFJ" | "ENFP" | "ISTJ" | "ISFJ" | "ESTJ" | "ESFJ" | "ISTP" | "ISFP" | "ESTP" | "ESFP" | undefined;
608
609
  } | undefined;
609
610
  } | undefined;
610
- rules?: string[] | undefined;
611
611
  };
612
612
  }>;
613
613
  export type CreateAgentDto = z.infer<typeof CreateAgentSchema>;
@@ -5,4 +5,4 @@ export declare const GimmickCoreDescriptions: {
5
5
  readonly notion: "Interacts with Notion platform for content management and collaboration";
6
6
  };
7
7
  export type GimmickCore = keyof typeof GimmickCoreDescriptions;
8
- export declare const GimmickCoreSchema: z.ZodUnion<[z.ZodLiteral<"web_search" | "image_generator" | "notion">, z.ZodLiteral<"web_search" | "image_generator" | "notion">, ...z.ZodLiteral<"web_search" | "image_generator" | "notion">[]]>;
8
+ export declare const GimmickCoreSchema: z.ZodUnion<[z.ZodLiteral<"notion" | "web_search" | "image_generator">, z.ZodLiteral<"notion" | "web_search" | "image_generator">, ...z.ZodLiteral<"notion" | "web_search" | "image_generator">[]]>;
@@ -6,11 +6,14 @@ export interface UserPublicDto {
6
6
  firstName: string | null;
7
7
  lastName: string | null;
8
8
  profilePicture: string | null;
9
+ appearance: string | null;
9
10
  }
10
11
  export interface UserPrivateDto extends UserPublicDto {
12
+ birthDate: Date | null;
11
13
  email: string | null;
12
14
  defaultCredits: number;
13
15
  maxAgents: number;
14
16
  maxLocationAgents: number;
15
17
  maxAgentLocations: number;
18
+ isAllowSensitive: boolean;
16
19
  }
@@ -1,14 +1,19 @@
1
+ import { UserId } from '@little-samo/samo-ai';
1
2
  import { ItemEventDto } from '../../items';
2
3
  export declare const UserEventType: {
3
4
  readonly ItemEvent: "ItemEvent";
5
+ readonly UserUpdated: "UserUpdated";
4
6
  };
5
7
  export type UserEventType = (typeof UserEventType)[keyof typeof UserEventType];
6
8
  export interface UserEventDtoBase {
7
- userId: number;
9
+ userId: UserId;
8
10
  type: UserEventType;
9
11
  }
10
12
  export interface UserItemEventDto extends UserEventDtoBase {
11
13
  type: typeof UserEventType.ItemEvent;
12
14
  itemEvent: ItemEventDto;
13
15
  }
14
- export type UserEventDto = UserItemEventDto;
16
+ export interface UserUpdatedEventDto extends UserEventDtoBase {
17
+ type: typeof UserEventType.UserUpdated;
18
+ }
19
+ export type UserEventDto = UserItemEventDto | UserUpdatedEventDto;
@@ -3,5 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UserEventType = void 0;
4
4
  exports.UserEventType = {
5
5
  ItemEvent: 'ItemEvent',
6
+ UserUpdated: 'UserUpdated',
6
7
  };
7
8
  //# sourceMappingURL=user.events.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"user.events.js","sourceRoot":"","sources":["../../../../src/dto/entities/users/user.events.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,WAAW;CACd,CAAC"}
1
+ {"version":3,"file":"user.events.js","sourceRoot":"","sources":["../../../../src/dto/entities/users/user.events.ts"],"names":[],"mappings":";;;AAIa,QAAA,aAAa,GAAG;IAC3B,SAAS,EAAE,WAAW;IACtB,WAAW,EAAE,aAAa;CAClB,CAAC"}
@@ -5,6 +5,45 @@ export type GetCurrentUserQueryDto = z.infer<typeof GetCurrentUserQuerySchema>;
5
5
  export interface GetCurrentUserResponseDto {
6
6
  user: UserPrivateDto;
7
7
  }
8
+ export declare const UpdateCurrentUserBodySchema: z.ZodObject<{
9
+ username: z.ZodOptional<z.ZodString>;
10
+ nickname: z.ZodOptional<z.ZodString>;
11
+ birthDate: z.ZodOptional<z.ZodDate>;
12
+ appearance: z.ZodOptional<z.ZodString>;
13
+ isAllowSensitive: z.ZodOptional<z.ZodBoolean>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ appearance?: string | undefined;
16
+ birthDate?: Date | undefined;
17
+ username?: string | undefined;
18
+ nickname?: string | undefined;
19
+ isAllowSensitive?: boolean | undefined;
20
+ }, {
21
+ appearance?: string | undefined;
22
+ birthDate?: Date | undefined;
23
+ username?: string | undefined;
24
+ nickname?: string | undefined;
25
+ isAllowSensitive?: boolean | undefined;
26
+ }>;
27
+ export type UpdateCurrentUserBodyDto = z.infer<typeof UpdateCurrentUserBodySchema>;
28
+ export interface UpdateCurrentUserResponseDto {
29
+ success: boolean;
30
+ error?: string;
31
+ }
32
+ export declare const ValidateUserFieldBodySchema: z.ZodObject<{
33
+ username: z.ZodOptional<z.ZodString>;
34
+ nickname: z.ZodOptional<z.ZodString>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ username?: string | undefined;
37
+ nickname?: string | undefined;
38
+ }, {
39
+ username?: string | undefined;
40
+ nickname?: string | undefined;
41
+ }>;
42
+ export type ValidateUserFieldBodyDto = z.infer<typeof ValidateUserFieldBodySchema>;
43
+ export interface ValidateUserFieldResponseDto {
44
+ isValid: boolean;
45
+ message?: string;
46
+ }
8
47
  export declare const GetUsersByIdsQuerySchema: z.ZodObject<{
9
48
  userIds: z.ZodEffects<z.ZodEffects<z.ZodString, bigint[], string>, bigint[], string>;
10
49
  }, "strip", z.ZodTypeAny, {
@@ -1,8 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetCurrentUserSchema = exports.GetUsersByIdsQuerySchema = exports.GetCurrentUserQuerySchema = void 0;
3
+ exports.GetCurrentUserSchema = exports.GetUsersByIdsQuerySchema = exports.ValidateUserFieldBodySchema = exports.UpdateCurrentUserBodySchema = exports.GetCurrentUserQuerySchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.GetCurrentUserQuerySchema = zod_1.z.object({});
6
+ exports.UpdateCurrentUserBodySchema = zod_1.z.object({
7
+ username: zod_1.z
8
+ .string()
9
+ .min(4)
10
+ .max(16)
11
+ .regex(/^[a-z0-9_]+$/)
12
+ .optional(),
13
+ nickname: zod_1.z.string().min(4).max(32).optional(),
14
+ birthDate: zod_1.z.coerce.date().optional(),
15
+ appearance: zod_1.z.string().max(500).optional(),
16
+ isAllowSensitive: zod_1.z.boolean().optional(),
17
+ });
18
+ exports.ValidateUserFieldBodySchema = zod_1.z.object({
19
+ username: zod_1.z
20
+ .string()
21
+ .min(4)
22
+ .max(16)
23
+ .regex(/^[a-z0-9_]+$/)
24
+ .optional(),
25
+ nickname: zod_1.z.string().min(4).max(32).optional(),
26
+ });
6
27
  exports.GetUsersByIdsQuerySchema = zod_1.z.object({
7
28
  userIds: zod_1.z
8
29
  .string()
@@ -1 +1 @@
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;AAaU,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,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,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,QAAQ,EAAE,OAAC;SACR,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,EAAE,CAAC;SACP,KAAK,CAAC,cAAc,CAAC;SACrB,QAAQ,EAAE;IACb,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC9C,SAAS,EAAE,OAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACrC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IAE1C,gBAAgB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAYU,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAClD,QAAQ,EAAE,OAAC;SACR,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,EAAE,CAAC;SACP,KAAK,CAAC,cAAc,CAAC;SACrB,QAAQ,EAAE;IACb,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAC;AAYU,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;AAaU,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export * from './entities';
2
2
  export * from './items';
3
3
  export * from './locations';
4
+ export * from './rankings';
package/dist/dto/index.js CHANGED
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./entities"), exports);
18
18
  __exportStar(require("./items"), exports);
19
19
  __exportStar(require("./locations"), exports);
20
+ __exportStar(require("./rankings"), exports);
20
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B;AAC5B,6CAA2B"}
@@ -1,3 +1,4 @@
1
+ import { ItemId } from '@little-samo/samo-ai';
1
2
  import { ItemDto, ItemUpdateDto } from './item';
2
3
  export declare const ItemEventType: {
3
4
  readonly Created: "Created";
@@ -5,7 +6,7 @@ export declare const ItemEventType: {
5
6
  };
6
7
  export type ItemEventType = (typeof ItemEventType)[keyof typeof ItemEventType];
7
8
  export interface ItemEventDtoBase {
8
- itemId: number;
9
+ itemId: ItemId;
9
10
  type: ItemEventType;
10
11
  }
11
12
  export interface ItemCreatedEventDto extends ItemEventDtoBase {
@@ -1 +1 @@
1
- {"version":3,"file":"item.events.js","sourceRoot":"","sources":["../../../src/dto/items/item.events.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAAG;IAC3B,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACV,CAAC"}
1
+ {"version":3,"file":"item.events.js","sourceRoot":"","sources":["../../../src/dto/items/item.events.ts"],"names":[],"mappings":";;;AAIa,QAAA,aAAa,GAAG;IAC3B,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACV,CAAC"}
@@ -16,6 +16,7 @@ export interface LocationPublicDto {
16
16
  isPublished: boolean;
17
17
  publishedAt: Date | null;
18
18
  publishDescription: string | null;
19
+ hashtags: string[];
19
20
  param1: bigint;
20
21
  param2: bigint;
21
22
  param3: bigint;
@@ -29,6 +30,7 @@ export interface LocationPublicDto {
29
30
  chatRequiresPaidCredit: boolean;
30
31
  isPublic: boolean;
31
32
  isAdminChat: boolean;
33
+ isSensitive: boolean;
32
34
  createdAt: Date;
33
35
  updatedAt: Date;
34
36
  }
@@ -1,14 +1,63 @@
1
- import { LocationConfig } from '@little-samo/samo-ai-sdk/models';
2
- import { UserPublicDto } from '../entities';
1
+ import { UserId } from '@little-samo/samo-ai';
2
+ import z from 'zod';
3
+ import type { AgentCostDto, AgentPublicDto, GimmickCostDto, GimmickPublicDto } from '../entities';
4
+ export declare const LocationPresetMessageSchema: z.ZodObject<{
5
+ entityType: z.ZodNativeEnum<{
6
+ readonly System: "system";
7
+ readonly Agent: "agent";
8
+ readonly User: "user";
9
+ readonly Gimmick: "gimmick";
10
+ }>;
11
+ entityId: z.ZodBigInt;
12
+ message: z.ZodOptional<z.ZodString>;
13
+ image: z.ZodOptional<z.ZodString>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ entityType: "system" | "agent" | "user" | "gimmick";
16
+ entityId: bigint;
17
+ message?: string | undefined;
18
+ image?: string | undefined;
19
+ }, {
20
+ entityType: "system" | "agent" | "user" | "gimmick";
21
+ entityId: bigint;
22
+ message?: string | undefined;
23
+ image?: string | undefined;
24
+ }>;
25
+ export type LocationPresetMessageDto = z.infer<typeof LocationPresetMessageSchema>;
26
+ export declare const LocationPresetCanvasSchema: z.ZodObject<{
27
+ name: z.ZodString;
28
+ text: z.ZodString;
29
+ }, "strip", z.ZodTypeAny, {
30
+ name: string;
31
+ text: string;
32
+ }, {
33
+ name: string;
34
+ text: string;
35
+ }>;
36
+ export type LocationPresetCanvasDto = z.infer<typeof LocationPresetCanvasSchema>;
3
37
  export interface LocationPresetDto {
4
38
  id: bigint;
5
- presetName: string;
6
- presetShortDescription: string;
7
- presetDescription: string;
8
39
  name: string;
9
- description: string;
10
- config: Partial<LocationConfig>;
11
- ownerUser?: UserPublicDto;
40
+ presetDescription: string;
41
+ presetShortDescription: string;
42
+ thumbnail: string | null;
43
+ ownerUserId: UserId | null;
44
+ agents: AgentPublicDto[];
45
+ agentCosts: AgentCostDto[];
46
+ gimmicks: GimmickPublicDto[];
47
+ gimmickCosts: GimmickCostDto[];
48
+ canvases: LocationPresetCanvasDto[];
49
+ messages: LocationPresetMessageDto[];
50
+ isPublished: boolean;
51
+ publishedAt: Date | null;
52
+ hashtags: string[];
53
+ isPublic: boolean;
54
+ isAllowImport: boolean;
55
+ isSensitive: boolean;
12
56
  createdAt: Date;
13
57
  updatedAt: Date;
14
58
  }
59
+ export interface LocationPresetDetailDto extends LocationPresetDto {
60
+ locationCount: number;
61
+ totalUsedCredit: number;
62
+ totalMessageCount: number;
63
+ }
@@ -1,3 +1,22 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LocationPresetCanvasSchema = exports.LocationPresetMessageSchema = void 0;
7
+ const samo_ai_1 = require("@little-samo/samo-ai");
8
+ const zod_1 = __importDefault(require("zod"));
9
+ exports.LocationPresetMessageSchema = zod_1.default.object({
10
+ entityType: zod_1.default.nativeEnum(samo_ai_1.EntityType),
11
+ entityId: zod_1.default.coerce.bigint(),
12
+ message: zod_1.default.string().max(800).optional(),
13
+ image: zod_1.default
14
+ .string()
15
+ .max(4 * 1024 * 1024)
16
+ .optional(),
17
+ });
18
+ exports.LocationPresetCanvasSchema = zod_1.default.object({
19
+ name: zod_1.default.string().max(32),
20
+ text: zod_1.default.string().max(5000),
21
+ });
3
22
  //# sourceMappingURL=location.preset.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"location.preset.js","sourceRoot":"","sources":["../../../src/dto/locations/location.preset.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"location.preset.js","sourceRoot":"","sources":["../../../src/dto/locations/location.preset.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0D;AAC1D,8CAAoB;AASP,QAAA,2BAA2B,GAAG,aAAC,CAAC,MAAM,CAAC;IAClD,UAAU,EAAE,aAAC,CAAC,UAAU,CAAC,oBAAU,CAAC;IACpC,QAAQ,EAAE,aAAC,CAAC,MAAM,CAAC,MAAM,EAAE;IAC3B,OAAO,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACvC,KAAK,EAAE,aAAC;SACL,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;SACpB,QAAQ,EAAE;CACd,CAAC,CAAC;AAMU,QAAA,0BAA0B,GAAG,aAAC,CAAC,MAAM,CAAC;IACjD,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;IACxB,IAAI,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC;CAC3B,CAAC,CAAC"}